Changesets · Branches · Tags · Compare
| Changeset | 73fcda533e5b9ebc18e0c543d1b3ab172d969b2d3b1e9c1502bcf0ae1aeaef9b |
|---|---|
| Author | adarshramiyer <adarsh.r.iyer@gmail.com> · 2025-07-02 16:07 -07:00 |
| Committer | adarshramiyer <adarsh.r.iyer@gmail.com> · 2025-07-02 16:07 -07:00 |
| Parents | a0c996c3d18a |
7 files changed
modified core/index.d.ts +1 −0
| @@ -443,6 +443,7 @@ | ||
| 443 | 443 | status: ToolStatus; |
| 444 | 444 | parsedArgs: any; |
| 445 | 445 | output?: ContextItem[]; |
| 446 | + tool?: Tool; | |
| 446 | 447 | } |
| 447 | 448 | |
| 448 | 449 | interface Reasoning { |
modified core/tools/callTool.ts +0 −1
| @@ -186,7 +186,6 @@ | ||
| 186 | 186 | functionName: toolCall.function.name, |
| 187 | 187 | functionArgs: toolCall.function.arguments, |
| 188 | 188 | toolCallArgs: args, |
| 189 | - parsedArgs: args, | |
| 190 | 189 | output: contextItems, |
| 191 | 190 | succeeded: success, |
| 192 | 191 | }, |
modified gui/src/redux/slices/sessionSlice.ts +9 −0
| @@ -18,6 +18,7 @@ | ||
| 18 | 18 | RuleWithSource, |
| 19 | 19 | Session, |
| 20 | 20 | SessionMetadata, |
| 21 | + Tool, | |
| 21 | 22 | } from "core"; |
| 22 | 23 | import { NEW_SESSION_TITLE } from "core/util/constants"; |
| 23 | 24 | import { |
| @@ -535,6 +536,7 @@ | ||
| 535 | 536 | state, |
| 536 | 537 | action: PayloadAction<{ |
| 537 | 538 | toolCallId: string; |
| 539 | + tools: Tool[]; | |
| 538 | 540 | }>, |
| 539 | 541 | ) => { |
| 540 | 542 | const toolCallState = findToolCall( |
| @@ -543,6 +545,13 @@ | ||
| 543 | 545 | ); |
| 544 | 546 | if (toolCallState) { |
| 545 | 547 | toolCallState.status = "generated"; |
| 548 | + | |
| 549 | + const tool = action.payload.tools.find( | |
| 550 | + (t) => t.function.name === toolCallState.toolCall.function.name, | |
| 551 | + ); | |
| 552 | + if (tool) { | |
| 553 | + toolCallState.tool = tool; | |
| 554 | + } | |
| 546 | 555 | } |
| 547 | 556 | }, |
| 548 | 557 | updateToolCallOutput: ( |
modified gui/src/redux/thunks/streamNormalInput.ts +1 −0
| @@ -154,6 +154,7 @@ | ||
| 154 | 154 | dispatch( |
| 155 | 155 | setToolGenerated({ |
| 156 | 156 | toolCallId: toolCallState.toolCallId, |
| 157 | + tools: state.config.config.tools, | |
| 157 | 158 | }), |
| 158 | 159 | ); |
| 159 | 160 |
modified gui/src/redux/util/index.ts +0 −1
| @@ -43,7 +43,6 @@ | ||
| 43 | 43 | functionName: toolCallState.toolCall?.function?.name, |
| 44 | 44 | functionArgs: toolCallState.toolCall?.function?.arguments, |
| 45 | 45 | toolCallArgs: safeParseToolCallArgs(toolCallState.toolCall), |
| 46 | - parsedArgs: toolCallState.parsedArgs, | |
| 47 | 46 | output: finalOutput || toolCallState.output || [], |
| 48 | 47 | succeeded: success, |
| 49 | 48 | }, |
modified packages/config-yaml/src/schemas/data/toolUsage/index.ts +0 −1
| @@ -6,7 +6,6 @@ | ||
| 6 | 6 | functionName: z.string(), |
| 7 | 7 | functionArgs: z.string(), |
| 8 | 8 | toolCallArgs: z.any(), |
| 9 | - parsedArgs: z.any(), | |
| 10 | 9 | succeeded: z.boolean(), |
| 11 | 10 | output: z.array(z.any()).optional(), |
| 12 | 11 | }); |
modified packages/config-yaml/src/schemas/data/toolUsage/v0.2.0.ts +1 −2
| @@ -14,7 +14,6 @@ | ||
| 14 | 14 | functionName: true, |
| 15 | 15 | functionArgs: true, |
| 16 | 16 | toolCallArgs: true, |
| 17 | - parsedArgs: true, | |
| 18 | 17 | succeeded: true, |
| 19 | 18 | output: true, |
| 20 | 19 | }); |
| @@ -22,6 +21,6 @@ | ||
| 22 | 21 | export const toolUsageEventSchema_0_2_0_noCode = |
| 23 | 22 | toolUsageEventSchema_0_2_0.omit({ |
| 24 | 23 | functionArgs: true, |
| 25 | - parsedArgs: true, | |
| 24 | + toolCallArgs: true, | |
| 26 | 25 | output: true, |
| 27 | 26 | }); |