Skip to content

Commit b17802a

Browse files
cteroomote[bot]
andauthored
Update webview-ui/src/components/chat/ChatView.tsx
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
1 parent e4f157b commit b17802a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,18 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
584584

585585
if (text || images.length > 0) {
586586
if (sendingDisabled) {
587-
console.log("queueMessage", text, images)
587+
if (sendingDisabled) {
588+
try {
589+
console.log("queueMessage", text, images)
590+
vscode.postMessage({ type: "queueMessage", text, images })
591+
setInputValue("")
592+
setSelectedImages([])
593+
} catch (error) {
594+
console.error("Failed to queue message:", error)
595+
// Consider showing user feedback
596+
}
597+
return
598+
}
588599
vscode.postMessage({ type: "queueMessage", text, images })
589600
setInputValue("")
590601
setSelectedImages([])

0 commit comments

Comments
 (0)