Skip to main content

project_dir

Function project_dir 

Source
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):

  1. If root is provided, sanitize it directly.
  2. Otherwise locate the git repository root containing cwd.
  3. Otherwise fall back to the global base directory (no project subdir).