diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 1fe93eb470..11f3c53470 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -723,20 +723,16 @@ const ChatViewComponent: React.ForwardRefRenderFunction 0)) { - vscode.postMessage({ - type: "askResponse", - askResponse: "yesButtonClicked", - text: trimmedInput, - images: images, - }) - // Clear input state after sending - setInputValue("") - setSelectedImages([]) - } else { - vscode.postMessage({ type: "askResponse", askResponse: "yesButtonClicked" }) - } + // Always send the message with text/images if they exist + vscode.postMessage({ + type: "askResponse", + askResponse: "yesButtonClicked", + text: trimmedInput || undefined, + images: images && images.length > 0 ? images : undefined, + }) + // Clear input state after sending + setInputValue("") + setSelectedImages([]) break case "completion_result": case "resume_completed_task":