-
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
Conversation
- 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
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.
Reviewed my own code. Found it suspiciously free of my usual chaos. I've reviewed the changes and have some suggestions for improvement.
| } else { | ||
| vscode.postMessage({ type: "askResponse", askResponse: "yesButtonClicked" }) | ||
| } | ||
| // Always send the message with text/images if they exist |
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.
| vscode.postMessage({ | ||
| type: "askResponse", | ||
| askResponse: "yesButtonClicked", | ||
| text: trimmedInput || undefined, |
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.
For consistency, consider using the same validation pattern for both text and images. Currently checking but only without a length check. Could we use:
| } else { | ||
| vscode.postMessage({ type: "askResponse", askResponse: "yesButtonClicked" }) | ||
| } | ||
| // Always send the message with text/images if they exist |
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.
The comment could be more specific about why we're always sending the message. Consider:
|
The check shouldn't interfere with sending actual string and images, closing for now |
Fixes #6549
Summary
This PR restores the functionality where comments typed before clicking the Save button are properly consumed and sent to the LLM. This was a regression that prevented user comments from being included when approving file changes.
Changes
handlePrimaryButtonClickinChatView.tsxto always include text and images in theaskResponsemessageundefinedfor empty values instead of conditionally excluding themTesting
Impact
Users can once again add comments when approving file changes, which will be sent to the LLM for processing.
Important
Fixes regression in
ChatView.tsxto ensure comments are sent to LLM when Save is clicked, by always including text and images inaskResponse.handlePrimaryButtonClickinChatView.tsxto ensure comments are sent to LLM when Save is clicked.askResponsemessage, sendingundefinedfor empty values.This description was created by
for 0d0cab8. You can customize this summary. It will automatically update as commits are pushed.