You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f49bdd1
Browse filesBrowse the repository at this point in the historyBrowse files
fix(server): branch worktree vs workspace error and use stat
Address review feedback on the workspace existence guard:
- Use fs.stat + isDirectory instead of fs.exists so a path that
is a file is also rejected
- Branch the error message on thread.worktreePath so a missing
worktree gets worktree-specific guidance, not the Settings prompt
- Use per-run temp dirs in tests to avoid concurrent run races
detail: `Could not access workspace directory '${effectiveCwd}': ${cause.reason._tag}`,
620
+
cause,
621
+
}),
622
+
}),
623
+
);
624
+
if(stat===null||stat.type!=="Directory"){
625
+
constisWorktree=thread.worktreePath!=null;
613
626
returnyield*newProviderAdapterRequestError({
614
627
provider: preferredProvider,
615
628
method: "thread.turn.start",
616
-
detail: `Workspace directory '${effectiveCwd}' no longer exists. Has it been moved or renamed? Update the project's workspace root in Settings to point at the new location.`,
629
+
detail: isWorktree
630
+
? `Worktree directory '${effectiveCwd}' no longer exists. It may have been cleaned up — start a new thread or recreate the worktree to continue.`
631
+
: `Workspace directory '${effectiveCwd}' no longer exists. Has it been moved or renamed? Update the project's workspace root in Settings to point at the new location.`,
0 commit comments