-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix: preserve chat input when processing queued messages #7866
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 |
|---|---|---|
|
|
@@ -599,7 +599,8 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro | |
| try { | ||
| console.log("queueMessage", text, images) | ||
| vscode.postMessage({ type: "queueMessage", text, images }) | ||
| setInputValue("") | ||
| // Don't clear the input when queueing - user may be typing more | ||
| // The input will be cleared when the message is actually sent | ||
| setSelectedImages([]) | ||
|
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. Is clearing images immediately intentional? Users might want to continue adding images while waiting, similar to how text is now preserved. This could be a nice enhancement for consistency, though the current behavior might be by design to show images are attached to the queued message. |
||
| } catch (error) { | ||
| console.error( | ||
|
|
||
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.
Good fix! The comment clearly explains why we're not clearing the input when queueing. However, consider adding a test specifically for this queue behavior to prevent regression. The test should verify: