Skip to content

Commit 2ace725

Browse files
committed
Store tool call results
1 parent bcdfc85 commit 2ace725

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

apps/sim/lib/copilot/client-sse/handlers.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,11 @@ export const sseHandlers: Record<string, SSEHandler> = {
246246
updatedMap[toolCallId] = {
247247
...current,
248248
state: targetState,
249+
result: {
250+
success: !!data?.success,
251+
output: data?.result ?? undefined,
252+
error: (data?.error as string) ?? undefined,
253+
},
249254
display: resolveToolDisplay(
250255
current.name,
251256
targetState,

apps/sim/stores/panel/copilot/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ export interface CopilotToolCall {
2929
display?: ClientToolDisplay
3030
/** UI metadata from the copilot SSE event (used as fallback for unregistered tools) */
3131
serverUI?: ServerToolUI
32+
/** Persisted tool call result for rendering resources on chat reload */
33+
result?: { success: boolean; output?: unknown; error?: string }
3234
/** Tool should be executed client-side (set by Go backend via SSE) */
3335
clientExecutable?: boolean
3436
/** Content streamed from a subagent (e.g., debug agent) */

0 commit comments

Comments
 (0)