Fix file deletion bug (#5125)
* Fix for files being deleted when switching modes or closing tasks * changeset * Added check to see if we are waiting for API response * More targetted fix * Create hot-onions-promise.md * Delete .changeset/hot-onions-promise.md --------- Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local> Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
This commit is contained in:
2 files changed
+6
-1
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": patch
|
||||
---
|
||||
|
||||
Fix for files being deleted when switching modes or closing tasks
|
||||
@@ -295,7 +295,7 @@ export abstract class DiffViewProvider {
|
||||
}
|
||||
|
||||
async revertChanges(): Promise<void> {
|
||||
if (!this.absolutePath) {
|
||||
if (!this.absolutePath || !this.isEditing) {
|
||||
return
|
||||
}
|
||||
const fileExists = this.editType === "modify"
|
||||
|
||||
Reference in new issue
Block a user