Skip to content

Commit 0d0cab8

Browse files
committed
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
1 parent 305a5da commit 0d0cab8

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -723,20 +723,16 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
723723
case "use_mcp_server":
724724
case "resume_task":
725725
case "mistake_limit_reached":
726-
// Only send text/images if they exist
727-
if (trimmedInput || (images && images.length > 0)) {
728-
vscode.postMessage({
729-
type: "askResponse",
730-
askResponse: "yesButtonClicked",
731-
text: trimmedInput,
732-
images: images,
733-
})
734-
// Clear input state after sending
735-
setInputValue("")
736-
setSelectedImages([])
737-
} else {
738-
vscode.postMessage({ type: "askResponse", askResponse: "yesButtonClicked" })
739-
}
726+
// Always send the message with text/images if they exist
727+
vscode.postMessage({
728+
type: "askResponse",
729+
askResponse: "yesButtonClicked",
730+
text: trimmedInput || undefined,
731+
images: images && images.length > 0 ? images : undefined,
732+
})
733+
// Clear input state after sending
734+
setInputValue("")
735+
setSelectedImages([])
740736
break
741737
case "completion_result":
742738
case "resume_completed_task":

0 commit comments

Comments
 (0)