From a953f6e76831d0975345da3db9ddf879b024af8b Mon Sep 17 00:00:00 2001 From: Frostbourne Date: Mon, 5 May 2025 14:55:18 -0700 Subject: [PATCH] Add confirmation dialog to Delete All History (#3316) * delete all confirmation dialog * changeset * Use showWarningMessage instead Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --- .changeset/gentle-paws-shout.md | 5 +++++ src/core/controller/index.ts | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .changeset/gentle-paws-shout.md diff --git a/.changeset/gentle-paws-shout.md b/.changeset/gentle-paws-shout.md new file mode 100644 index 00000000..fad258ff --- /dev/null +++ b/.changeset/gentle-paws-shout.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Add confirmation dialog to Delete All History button diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index cf5344e1..c7b9f2e1 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -632,9 +632,16 @@ export class Controller { break } case "clearAllTaskHistory": { - await this.deleteAllTaskHistory() - await this.postStateToWebview() - this.refreshTotalTasksSize() + const answer = await vscode.window.showWarningMessage( + "Are you sure you want to delete all history?", + "Delete", + "Cancel", + ) + if (answer === "Delete") { + await this.deleteAllTaskHistory() + await this.postStateToWebview() + this.refreshTotalTasksSize() + } this.postMessageToWebview({ type: "relinquishControl" }) break }