Store tool call results

This commit is contained in:
Siddharth Ganesan
2026-03-09 11:35:20 -07:00
parent bcdfc85ccb
commit 2ace7252f9
2 changed files with 7 additions and 0 deletions

View File

@@ -246,6 +246,11 @@ export const sseHandlers: Record<string, SSEHandler> = {
updatedMap[toolCallId] = {
...current,
state: targetState,
result: {
success: !!data?.success,
output: data?.result ?? undefined,
error: (data?.error as string) ?? undefined,
},
display: resolveToolDisplay(
current.name,
targetState,

View File

@@ -29,6 +29,8 @@ export interface CopilotToolCall {
display?: ClientToolDisplay
/** UI metadata from the copilot SSE event (used as fallback for unregistered tools) */
serverUI?: ServerToolUI
/** Persisted tool call result for rendering resources on chat reload */
result?: { success: boolean; output?: unknown; error?: string }
/** Tool should be executed client-side (set by Go backend via SSE) */
clientExecutable?: boolean
/** Content streamed from a subagent (e.g., debug agent) */