diff --git a/.changeset/few-badgers-call.md b/.changeset/few-badgers-call.md new file mode 100644 index 00000000..ca99572d --- /dev/null +++ b/.changeset/few-badgers-call.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Fix for files being deleted when switching modes or closing tasks diff --git a/src/integrations/editor/DiffViewProvider.ts b/src/integrations/editor/DiffViewProvider.ts index 96291501..cdc23ff3 100644 --- a/src/integrations/editor/DiffViewProvider.ts +++ b/src/integrations/editor/DiffViewProvider.ts @@ -295,7 +295,7 @@ export abstract class DiffViewProvider { } async revertChanges(): Promise { - if (!this.absolutePath) { + if (!this.absolutePath || !this.isEditing) { return } const fileExists = this.editType === "modify"