fix(copilot): fix tool call flash (#2221)

* Fix copilot tool call flash

* Fix lint
This commit is contained in:
Siddharth Ganesan
2025-12-05 15:12:35 -08:00
committed by GitHub
parent 75da06adf8
commit 9f604f379e

View File

@@ -268,8 +268,15 @@ 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
}