From e966c9463b6f8c9d1cf05bf73758b00d4a123bf5 Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Fri, 5 Dec 2025 15:04:33 -0800 Subject: [PATCH 1/2] Fix copilot tool call flash --- .../components/copilot/components/tool-call/tool-call.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx index 05c642bacf..aae94cee62 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx @@ -268,8 +268,10 @@ function shouldShowRunSkipButtons(toolCall: CopilotToolCall): boolean { } // Also show buttons for integration tools in pending state (they need user confirmation) + // But NOT if the tool is auto-allowed (it will auto-execute) const mode = useCopilotStore.getState().mode - if (mode === 'build' && isIntegrationTool(toolCall.name) && toolCall.state === 'pending') { + const isAutoAllowed = useCopilotStore.getState().isToolAutoAllowed(toolCall.name) + if (mode === 'build' && isIntegrationTool(toolCall.name) && toolCall.state === 'pending' && !isAutoAllowed) { return true } From f523dabd3824bffce8eda36b602429db2662d57b Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Fri, 5 Dec 2025 15:10:14 -0800 Subject: [PATCH 2/2] Fix lint --- .../components/copilot/components/tool-call/tool-call.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx index aae94cee62..75bfbc3743 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx @@ -271,7 +271,12 @@ function shouldShowRunSkipButtons(toolCall: CopilotToolCall): boolean { // But NOT if the tool is auto-allowed (it will auto-execute) const mode = useCopilotStore.getState().mode const isAutoAllowed = useCopilotStore.getState().isToolAutoAllowed(toolCall.name) - if (mode === 'build' && isIntegrationTool(toolCall.name) && toolCall.state === 'pending' && !isAutoAllowed) { + if ( + mode === 'build' && + isIntegrationTool(toolCall.name) && + toolCall.state === 'pending' && + !isAutoAllowed + ) { return true }