mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: emit command_output instead of error on cancel for cloud UI transition
The cloud message parser only recognizes say:"command_output" to transition pending commands. Using say:"error" left the pending command stuck in the UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
014dfdc465
commit
80e6750f38
2 changed files with 2 additions and 2 deletions
|
|
@ -373,7 +373,7 @@ export async function executeCommandInTerminal(
|
|||
task.isTerminalAbortedExternally = false
|
||||
const status: CommandExecutionStatus = { executionId, status: "cancelled" }
|
||||
provider?.postMessageToWebview({ type: "commandExecutionStatus", text: JSON.stringify(status) })
|
||||
await task.say("error", "The command was cancelled by the user.")
|
||||
await task.say("command_output", "Command cancelled.")
|
||||
task.didToolFailInCurrentTurn = true
|
||||
task.terminalProcess = undefined
|
||||
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ describe("executeCommand", () => {
|
|||
// Verify: should return a clean tool result, not throw
|
||||
expect(rejected).toBe(false)
|
||||
expect(result).toBe("The command was cancelled by the user.")
|
||||
expect(mockTask.say).toHaveBeenCalledWith("error", "The command was cancelled by the user.")
|
||||
expect(mockTask.say).toHaveBeenCalledWith("command_output", "Command cancelled.")
|
||||
expect(mockTask.didToolFailInCurrentTurn).toBe(true)
|
||||
expect(mockTask.terminalProcess).toBeUndefined()
|
||||
// Verify the flag was reset
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue