-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix: Restore comment consumption when clicking Save button #6551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment could be more specific about why we're always sending the message. Consider: |
||
| vscode.postMessage({ | ||
| type: "askResponse", | ||
| askResponse: "yesButtonClicked", | ||
| text: trimmedInput || undefined, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency, consider using the same validation pattern for both text and images. Currently checking but only without a length check. Could we use: |
||
| images: images && images.length > 0 ? images : undefined, | ||
| }) | ||
| // Clear input state after sending | ||
| setInputValue("") | ||
| setSelectedImages([]) | ||
| break | ||
| case "completion_result": | ||
| case "resume_completed_task": | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a test case to prevent future regressions. Specifically, a test that verifies comments are included in the askResponse when the Save button is clicked would help ensure this functionality doesn't break again.