From 0d0cab872aaccba14d94263ca84ff1f6ac60b4c2 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Fri, 1 Aug 2025 14:07:57 +0000 Subject: [PATCH] fix: restore comment consumption when clicking Save button - Modified handlePrimaryButtonClick to always include text/images in askResponse - Ensures comments typed before clicking Save are properly consumed and sent to LLM - Fixes regression where comments were being ignored during file approval Fixes #6549 --- webview-ui/src/components/chat/ChatView.tsx | 24 +++++++++------------ 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 1fe93eb470..11f3c53470 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -723,20 +723,16 @@ const ChatViewComponent: React.ForwardRefRenderFunction 0)) { - vscode.postMessage({ - type: "askResponse", - askResponse: "yesButtonClicked", - text: trimmedInput, - images: images, - }) - // Clear input state after sending - setInputValue("") - setSelectedImages([]) - } else { - vscode.postMessage({ type: "askResponse", askResponse: "yesButtonClicked" }) - } + // Always send the message with text/images if they exist + vscode.postMessage({ + type: "askResponse", + askResponse: "yesButtonClicked", + text: trimmedInput || undefined, + images: images && images.length > 0 ? images : undefined, + }) + // Clear input state after sending + setInputValue("") + setSelectedImages([]) break case "completion_result": case "resume_completed_task":