fix(chat): prevent clearing input state for resume task

This commit is contained in:
NaccOll 2025-07-29 16:39:56 +08:00
parent 00a3738d30
commit 3323c3f174

View file

@ -734,9 +734,11 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
} else {
vscode.postMessage({ type: "askResponse", askResponse: "yesButtonClicked" })
}
// Clear input state after sending
setInputValue("")
setSelectedImages([])
if (clineAsk !== "resume_task") {
// Clear input state after sending
setInputValue("")
setSelectedImages([])
}
break
case "completion_result":
case "resume_completed_task":
@ -790,9 +792,6 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
// Responds to the API with a "This operation failed" and lets it try again
vscode.postMessage({ type: "askResponse", askResponse: "noButtonClicked" })
}
// Clear input state after sending
setInputValue("")
setSelectedImages([])
break
case "command_output":
vscode.postMessage({ type: "terminalOperation", terminalOperation: "abort" })