Skip to content

Commit 8c4a97d

Browse files
committed
fix: prevent chat input from being cleared when queueing messages
When a message is queued while sending is disabled, the input field should not be cleared to preserve any new text the user is typing. Only the selected images are cleared since they were included with the queued message. Fixes #7861
1 parent 9da9785 commit 8c4a97d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,8 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
599599
try {
600600
console.log("queueMessage", text, images)
601601
vscode.postMessage({ type: "queueMessage", text, images })
602-
setInputValue("")
602+
// Don't clear the input when queueing - user may be typing a new message
603+
// Only clear the images since they were queued with this message
603604
setSelectedImages([])
604605
} catch (error) {
605606
console.error(

0 commit comments

Comments
 (0)