From d2f3aade75c5a90623c8a9a1b1e762ebebeedb88 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Sun, 21 Dec 2025 17:25:44 +0000 Subject: [PATCH] fix: preserve user message during command execution When a command is running and user types a message before clicking "Proceed While Running", the message was being lost. The frontend was only sending a terminal continue operation without including the user's typed text and images. Fixed by sending the message as a messageResponse (similar to other tool cases) when text/images are present, which the backend already properly handles in ExecuteCommandTool.ts. Fixes issue where messages disappear during command execution. --- webview-ui/src/components/chat/ChatView.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index a002abf8cfb..f555fb39ec3 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -727,7 +727,21 @@ const ChatViewComponent: React.ForwardRefRenderFunction 0)) { + vscode.postMessage({ + type: "askResponse", + askResponse: "messageResponse", + text: trimmedInput, + images: images, + }) + // Clear input state after sending + setInputValue("") + setSelectedImages([]) + } else { + // If no message, just continue the command + vscode.postMessage({ type: "terminalOperation", terminalOperation: "continue" }) + } break }