Tool result refactor (return an object instead of a string)

This commit is contained in:
Alex Gleason committed 2025-12-08 15:13:34 -06:00
1 parent 9c86ced552
commit f7b2d754e9
40 files changed
+315 -276

No files matched your search

+3 -1
View File
@@ -374,9 +374,11 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
]
});
const result = await tool.execute({ filter: 'error' });
await addMessage({
role: 'tool',
content: await tool.execute({ filter: 'error' }),
content: result.content,
tool_call_id: toolCallId,
});
+2 -2
View File
@@ -145,8 +145,8 @@ export function Terminal({ cwd, className }: TerminalProps) {
const result = await shellToolRef.current.execute({ command });
// Add output
if (result && result.trim()) {
addLine('output', result);
if (result.content && result.content.trim()) {
addLine('output', result.content);
}
}
}