diff --git a/gui/src/redux/thunks/streamNormalInput.ts b/gui/src/redux/thunks/streamNormalInput.ts index 6941eee6d..748658c9b 100644 --- a/gui/src/redux/thunks/streamNormalInput.ts +++ b/gui/src/redux/thunks/streamNormalInput.ts @@ -335,12 +335,12 @@ export const streamNormalInput = createAsyncThunk< ); const policies = await Promise.all(policyPromises); - // Process all tool calls based on their policies + // Handle disabled tool calls policies.forEach((policy, index) => { - const toolCallId = generatingToolCalls[index].toolCallId; - const toolCall = generatingToolCalls[index].toolCall; - if (policy === "disabled") { + const toolCallId = generatingToolCalls[index].toolCallId; + const toolCall = generatingToolCalls[index].toolCall; + // Get the actual command from parsed arguments if it's runTerminalCommand let command = toolCall.function.name; try { @@ -373,15 +373,8 @@ export const streamNormalInput = createAsyncThunk< ], }), ); - } else { - // For non-disabled tools, set them to generated status - dispatch( - setToolGenerated({ - toolCallId, - tools: newState.config.config.tools, - }), - ); } + // Non-disabled tools will be set to "generated" by handleToolCallExecution }); allAutoApproved = policies.every(