mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
fix: execute command after whitelisting with 'Always allow' button
- Modified addToWhitelist handler to trigger command execution after whitelisting - Fixes issue where chat was stuck after clicking 'Always allow' - Command now gets whitelisted AND executed in one action
This commit is contained in:
parent
c58268b88f
commit
c43927b935
2 changed files with 5 additions and 2 deletions
|
|
@ -588,7 +588,7 @@ export const webviewMessageHandler = async (
|
|||
break
|
||||
}
|
||||
case "addToWhitelist": {
|
||||
// Handle adding a command pattern to the whitelist without running it
|
||||
// Handle adding a command pattern to the whitelist and then running it
|
||||
if (message.pattern) {
|
||||
// Get current allowed commands
|
||||
const currentAllowedCommands = getGlobalState("allowedCommands") || []
|
||||
|
|
@ -608,6 +608,9 @@ export const webviewMessageHandler = async (
|
|||
// Post state update to webview
|
||||
await provider.postStateToWebview()
|
||||
}
|
||||
|
||||
// After whitelisting, approve the pending command execution
|
||||
provider.getCurrentCline()?.handleWebviewAskResponse("yesButtonClicked")
|
||||
}
|
||||
break
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1659,7 +1659,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|||
<>
|
||||
{/* Command approval with auto-approve pattern */}
|
||||
{clineAsk === "command" && !isStreaming ? (
|
||||
<div className="flex flex-col gap-[6px]">
|
||||
<div className="flex flex-col gap-[6px] mb-[10px]">
|
||||
{/* Top row: Run Command and Reject */}
|
||||
<div className="flex gap-[6px]">
|
||||
<StandardTooltip content={t("chat:runCommand.tooltip")}>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue