Feat: Render tool metadata after permission rejection. (#1949)

Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
Mariano Uvalle
2025-08-15 04:16:40 -07:00
committed by GitHub
parent 8355ee2061
commit 0befc5d602
6 changed files with 34 additions and 9 deletions

View File

@@ -1268,6 +1268,7 @@ export namespace Session {
status: "error",
input: value.input,
error: (value.error as any).toString(),
metadata: value.error instanceof Permission.RejectedError ? value.error.metadata : undefined,
time: {
start: match.state.time.start,
end: Date.now(),

View File

@@ -64,6 +64,7 @@ export namespace MessageV2 {
status: z.literal("error"),
input: z.record(z.any()),
error: z.string(),
metadata: z.record(z.any()).optional(),
time: z.object({
start: z.number(),
end: z.number(),