From 180a9287dd890057ad4b3cd115555a1b2034e1ee Mon Sep 17 00:00:00 2001 From: Acbox Date: Sun, 29 Mar 2026 19:58:52 +0800 Subject: [PATCH] fix(web): read tool result from correct field in history loading The SDK persists tool results as ToolResultPart with a "result" JSON field, but extractAllToolResults was only reading "output", causing exec tool stdout/stderr/exit_code to be lost when loading chat history. --- apps/web/src/composables/api/useChat.content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/composables/api/useChat.content.ts b/apps/web/src/composables/api/useChat.content.ts index 56384634..fbc6b422 100644 --- a/apps/web/src/composables/api/useChat.content.ts +++ b/apps/web/src/composables/api/useChat.content.ts @@ -46,7 +46,7 @@ export function extractAllToolResults( const part = p as Record return { toolCallId: String(part.toolCallId ?? ''), - output: part.output ?? null, + output: part.output ?? part.result ?? null, } }) }