Skip to content

Commit 3323c3f

Browse files
committed
fix(chat): prevent clearing input state for resume task
1 parent 00a3738 commit 3323c3f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,11 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
734734
} else {
735735
vscode.postMessage({ type: "askResponse", askResponse: "yesButtonClicked" })
736736
}
737-
// Clear input state after sending
738-
setInputValue("")
739-
setSelectedImages([])
737+
if (clineAsk !== "resume_task") {
738+
// Clear input state after sending
739+
setInputValue("")
740+
setSelectedImages([])
741+
}
740742
break
741743
case "completion_result":
742744
case "resume_completed_task":
@@ -790,9 +792,6 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
790792
// Responds to the API with a "This operation failed" and lets it try again
791793
vscode.postMessage({ type: "askResponse", askResponse: "noButtonClicked" })
792794
}
793-
// Clear input state after sending
794-
setInputValue("")
795-
setSelectedImages([])
796795
break
797796
case "command_output":
798797
vscode.postMessage({ type: "terminalOperation", terminalOperation: "abort" })

0 commit comments

Comments
 (0)