Skip to content

Commit 1a4ed7f

Browse files
committed
fix(useToolCalls): handle null parsedArgs gracefully
1 parent 69efc94 commit 1a4ed7f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/plugins/robot/src/composables/features/useToolCalls.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const callTools = async (tool_calls: any, hooks: CallToolHooks, signal: A
3535
const result = []
3636
for (const tool of tool_calls) {
3737
const { name, arguments: args } = tool.function
38-
const parsedArgs = parseArgs(args)
38+
const parsedArgs = parseArgs(args) ?? {}
3939
tool.parsedArgs = parsedArgs
4040
tool.name = name
4141

0 commit comments

Comments
 (0)