fix: failing tests
This commit is contained in:
parent
73b2250d33
commit
08ccc19ee8
1 changed files with 5 additions and 12 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue