Skip to content

Commit 74c5f77

Browse files
committed
fix: Update webview state after clearing completed right-click tasks
Fixes issue #5772 where clicking the plus button after completing right-click context menu tasks (like "Explain Code" or "Improve Code") would incorrectly show the previous completed task interface instead of the new task interface on the first attempt. The issue was in the clearTask() method in ClineProvider.ts which only called removeClineFromStack() but did not update the webview state. This caused the UI to continue showing the old task interface because the webview was not notified that the task had been cleared. The fix adds await this.postStateToWebview() to the clearTask() method to ensure the UI is properly updated when a task is cleared, which resolves the issue where users had to click the plus button twice to get the new task interface.
1 parent d513b9c commit 74c5f77

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ export class ClineProvider
238238
// This is used when the user cancels a task that is not a subtask
239239
async clearTask() {
240240
await this.removeClineFromStack()
241+
await this.postStateToWebview()
241242
}
242243

243244
/*

0 commit comments

Comments
 (0)