mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
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.
This commit is contained in:
parent
de1519ad39
commit
6a29a8bd99
1 changed files with 11 additions and 0 deletions
|
|
@ -2309,6 +2309,17 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||
}
|
||||
|
||||
async deleteTaskWithId(id: string) {
|
||||
const answer = await vscode.window.showInformationMessage(
|
||||
"Are you sure you want to delete this task? This action cannot be undone.",
|
||||
{ modal: true },
|
||||
"Delete",
|
||||
"Cancel",
|
||||
)
|
||||
|
||||
if (answer !== "Delete") {
|
||||
return
|
||||
}
|
||||
|
||||
if (id === this.cline?.taskId) {
|
||||
await this.clearTask()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue