pub fn project_dir(root: Option<&str>) -> Option<PathBuf>Expand description
Resolve the project directory for session storage.
Mirrors zag’s Config::resolve_project_dir (zag-agent/src/config.rs:188):
- If
rootis provided, sanitize it directly. - Otherwise locate the git repository root containing
cwd. - Otherwise fall back to the global base directory (no project subdir).