From fa4c7942d6965c950574544578b0198708747a06 Mon Sep 17 00:00:00 2001 From: Will Li Date: Fri, 15 Aug 2025 08:19:32 -0700 Subject: [PATCH] undo merge change --- src/core/task/Task.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/core/task/Task.ts b/src/core/task/Task.ts index 739480e6df..e882450c35 100644 --- a/src/core/task/Task.ts +++ b/src/core/task/Task.ts @@ -303,17 +303,6 @@ export class Task extends EventEmitter implements TaskLike { this.instanceId = crypto.randomUUID().slice(0, 8) this.taskNumber = -1 - // Initialize workspacePath FIRST before any code that uses this.cwd - // This MUST happen before creating RooIgnoreController or RooProtectedController - const defaultPath = path.join(os.homedir(), "Desktop") - const workspaceFromVSCode = getWorkspacePath(defaultPath) - - // Ensure workspacePath is never undefined or empty - use the VSCode workspace or fallback - // Check for both undefined and empty string from parentTask - const parentWorkspace = parentTask?.workspacePath - this.workspacePath = parentWorkspace && parentWorkspace.trim() !== "" ? parentWorkspace : workspaceFromVSCode - - // Now create controllers with properly initialized workspacePath this.rooIgnoreController = new RooIgnoreController(this.cwd) this.rooProtectedController = new RooProtectedController(this.cwd) this.fileContextTracker = new FileContextTracker(provider, this.taskId)