fix: preserve draft message when switching tasks

The draft should persist at the workspace level regardless of which task
you're viewing. Removed the clearDraftMessage() call from showTaskWithId()
so the draft is only cleared when the message is actually sent, not when
switching between tasks.
This commit is contained in:
Hannes Rudolph 2025-12-03 16:38:37 -07:00
parent 50d40f260b
commit 841aa4057e

View file

@ -1660,9 +1660,6 @@ export class ClineProvider
}
async showTaskWithId(id: string) {
// Clear draft when switching tasks
await this.clearDraftMessage()
if (id !== this.getCurrentTask()?.taskId) {
// Non-current task.
const { historyItem } = await this.getTaskWithId(id)