mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
fix: process queued messages after execute_command completes
The ExecuteCommandTool was not calling task.processQueuedMessages() after command execution, unlike other tools such as EditFileTool, WriteToFileTool, ApplyDiffTool, etc. This caused user messages sent during command execution to remain stuck in the queue instead of being processed. The fix adds processQueuedMessages() call after command execution completes, matching the pattern used by other tools. Fixes EXT-638
This commit is contained in:
parent
17d3456e96
commit
cc5986818f
2 changed files with 20 additions and 0 deletions
|
|
@ -128,6 +128,9 @@ export class ExecuteCommandTool extends BaseTool<"execute_command"> {
|
|||
}
|
||||
}
|
||||
|
||||
// Process any queued messages after command execution completes
|
||||
task.processQueuedMessages()
|
||||
|
||||
return
|
||||
} catch (error) {
|
||||
await handleError("executing command", error as Error)
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ describe("executeCommandTool", () => {
|
|||
},
|
||||
recordToolUsage: vitest.fn().mockReturnValue({} as ToolUsage),
|
||||
recordToolError: vitest.fn(),
|
||||
processQueuedMessages: vitest.fn(),
|
||||
providerRef: {
|
||||
deref: vitest.fn().mockResolvedValue({
|
||||
getState: vitest.fn().mockResolvedValue({
|
||||
|
|
@ -158,6 +159,22 @@ describe("executeCommandTool", () => {
|
|||
expect(result).toContain("Command")
|
||||
})
|
||||
|
||||
it("should process queued messages after command execution", async () => {
|
||||
// Setup
|
||||
mockToolUse.params.command = "echo test"
|
||||
mockToolUse.nativeArgs = { command: "echo test" }
|
||||
|
||||
// Execute
|
||||
await executeCommandTool.handle(mockCline as unknown as Task, mockToolUse, {
|
||||
askApproval: mockAskApproval as unknown as AskApproval,
|
||||
handleError: mockHandleError as unknown as HandleError,
|
||||
pushToolResult: mockPushToolResult as unknown as PushToolResult,
|
||||
})
|
||||
|
||||
// Verify that processQueuedMessages was called after command execution
|
||||
expect(mockCline.processQueuedMessages).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it("should pass along custom working directory if provided", async () => {
|
||||
// Setup
|
||||
mockToolUse.params.command = "echo test"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue