Expand description
Stored-session working-directory recovery.
Port of the upstream packages/coding-agent/src/core/session-cwd.ts. A
session file records the cwd it was created in; when that directory has
since been deleted, restoring the session must either fall back to the
current cwd or fail with a clear, actionable message instead of silently
operating in a non-existent directory.
Structs§
- Missing
Session CwdError - Error raised when a session’s cwd cannot be resolved and no override was supplied.
- Session
CwdIssue - A session whose recorded working directory no longer exists on disk.
Functions§
- assert_
session_ cwd_ exists - Fail unless the session cwd exists (native
assertSessionCwdExists). - format_
missing_ session_ cwd_ error - One-line error message (native
formatMissingSessionCwdError). - format_
missing_ session_ cwd_ prompt - Short prompt shown by the startup selector (native
formatMissingSessionCwdPrompt). - get_
missing_ session_ cwd_ issue - Detect a missing session cwd. Returns
Nonewhen there is no session file, the stored cwd is empty, or the stored cwd still exists.