Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion webview-ui/src/components/chat/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor Author

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:

  • Input text is preserved when queueing
  • Input is properly cleared when the message is actually sent
  • Selected images are cleared immediately (current behavior)

// The input will be cleared when the message is actually sent
setSelectedImages([])
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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(
Expand Down
Loading