From 76dd4a0c95aa7e90a1e4942541358050355f015f Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Thu, 22 Jan 2026 11:57:57 -0800 Subject: [PATCH] Fix always allow, credential validation --- .../components/tool-call/tool-call.tsx | 15 +- .../tools/server/workflow/edit-workflow.ts | 9 +- .../copilot/validation/selector-validator.ts | 25 +++ apps/sim/stores/panel/copilot/store.ts | 145 ++++++++++++++++-- 4 files changed, 169 insertions(+), 25 deletions(-) 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 fd601b7ea..1468d750a 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 @@ -1412,10 +1412,13 @@ function RunSkipButtons({ setIsProcessing(true) setButtonsHidden(true) try { - // Add to auto-allowed list first + // Add to auto-allowed list - this also executes all pending integration tools of this type await addAutoAllowedTool(toolCall.name) - // Then execute - await handleRun(toolCall, setToolCallState, onStateChange, editedParams) + // For client tools with interrupts (not integration tools), we still need to call handleRun + // since executeIntegrationTool only works for server-side tools + if (!isIntegrationTool(toolCall.name)) { + await handleRun(toolCall, setToolCallState, onStateChange, editedParams) + } } finally { setIsProcessing(false) actionInProgressRef.current = false @@ -1438,10 +1441,10 @@ function RunSkipButtons({ if (buttonsHidden) return null - // Hide "Always Allow" for integration tools (only show for client tools with interrupts) - const showAlwaysAllow = !isIntegrationTool(toolCall.name) + // Show "Always Allow" for all tools that require confirmation + const showAlwaysAllow = true - // Standardized buttons for all interrupt tools: Allow, (Always Allow for client tools only), Skip + // Standardized buttons for all interrupt tools: Allow, Always Allow, Skip return (