Skip to content

Commit 9f604f3

Browse files
authored
fix(copilot): fix tool call flash (#2221)
* Fix copilot tool call flash * Fix lint
1 parent 75da06a commit 9f604f3

File tree

1 file changed

+8
-1
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call

1 file changed

+8
-1
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,15 @@ function shouldShowRunSkipButtons(toolCall: CopilotToolCall): boolean {
268268
}
269269

270270
// Also show buttons for integration tools in pending state (they need user confirmation)
271+
// But NOT if the tool is auto-allowed (it will auto-execute)
271272
const mode = useCopilotStore.getState().mode
272-
if (mode === 'build' && isIntegrationTool(toolCall.name) && toolCall.state === 'pending') {
273+
const isAutoAllowed = useCopilotStore.getState().isToolAutoAllowed(toolCall.name)
274+
if (
275+
mode === 'build' &&
276+
isIntegrationTool(toolCall.name) &&
277+
toolCall.state === 'pending' &&
278+
!isAutoAllowed
279+
) {
273280
return true
274281
}
275282

0 commit comments

Comments
 (0)