Skip to content

Commit fd395dc

Browse files
committed
fix: ensure Resume Task sends user feedback instead of clearing it
- Modified handlePrimaryButtonClick to always send text/images when Resume Task is clicked - This ensures user feedback is preserved and sent, matching the behavior of Save/Reject buttons - Fixes #9328 where prompt was being cleared without being sent
1 parent e742511 commit fd395dc

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

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

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -638,20 +638,17 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
638638
case "use_mcp_server":
639639
case "resume_task":
640640
case "mistake_limit_reached":
641-
// Only send text/images if they exist
642-
if (trimmedInput || (images && images.length > 0)) {
643-
vscode.postMessage({
644-
type: "askResponse",
645-
askResponse: "yesButtonClicked",
646-
text: trimmedInput,
647-
images: images,
648-
})
649-
// Clear input state after sending
650-
setInputValue("")
651-
setSelectedImages([])
652-
} else {
653-
vscode.postMessage({ type: "askResponse", askResponse: "yesButtonClicked" })
654-
}
641+
// Always send the message with text/images if they exist
642+
// This ensures user feedback is sent when resuming a task
643+
vscode.postMessage({
644+
type: "askResponse",
645+
askResponse: "yesButtonClicked",
646+
text: trimmedInput || undefined,
647+
images: images && images.length > 0 ? images : undefined,
648+
})
649+
// Clear input state after sending
650+
setInputValue("")
651+
setSelectedImages([])
655652
break
656653
case "completion_result":
657654
case "resume_completed_task":

0 commit comments

Comments
 (0)