fix: failing tests

This commit is contained in:
Tomasz Stefaniak 2025-08-28 15:25:44 -07:00
parent 73b2250d33
commit 08ccc19ee8

View file

@ -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(