Skip to content

Commit e84008a

Browse files
committed
fix: preserve chat input when processing queued messages
- Modified handleSendMessage to not clear input value when queueing - Only clear selected images when queueing a message - Input will be cleared when message is actually sent, not when queued - Fixes #7861 where unsent text was lost when queued messages were processed
1 parent 8fee312 commit e84008a

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 more
603+
// The input will be cleared when the message is actually sent
603604
setSelectedImages([])
604605
} catch (error) {
605606
console.error(

0 commit comments

Comments
 (0)