mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Tool result refactor (return an object instead of a string)
This commit is contained in:
40 files changed
+315
-276
No files matched your search
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user