From 841aa4057ef6e65e362c3bd3b0ce134b8eb4e00d Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Wed, 3 Dec 2025 16:38:37 -0700 Subject: [PATCH] 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. --- src/core/webview/ClineProvider.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 97fc67cf7f..754c88d908 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -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)