Skip to content

Commit 6a29a8b

Browse files
committed
Prevents accidental task deletions by requiring explicit user confirmation through a modal dialog. This improves the user experience by adding a safety check before performing irreversible actions.
1 parent de1519a commit 6a29a8b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2309,6 +2309,17 @@ export class ClineProvider implements vscode.WebviewViewProvider {
23092309
}
23102310

23112311
async deleteTaskWithId(id: string) {
2312+
const answer = await vscode.window.showInformationMessage(
2313+
"Are you sure you want to delete this task? This action cannot be undone.",
2314+
{ modal: true },
2315+
"Delete",
2316+
"Cancel",
2317+
)
2318+
2319+
if (answer !== "Delete") {
2320+
return
2321+
}
2322+
23122323
if (id === this.cline?.taskId) {
23132324
await this.clearTask()
23142325
}

0 commit comments

Comments
 (0)