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
This commit is contained in:
Roo Code 2025-08-01 14:07:57 +00:00
parent 305a5da369
commit 0d0cab872a

View file

@ -723,20 +723,16 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
case "use_mcp_server":
case "resume_task":
case "mistake_limit_reached":
// Only send text/images if they exist
if (trimmedInput || (images && images.length > 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":