Skip to main content

save_session_metadata

Function save_session_metadata 

Source
pub fn save_session_metadata(
    branch_name: &str,
    ai_tool: &str,
    worktree_path: &str,
) -> Result<()>
Expand description

Save session metadata for a branch.

Uses an atomic temp-then-rename write so that a concurrent gw resume on the same branch never sees a partially-written file. The rename is atomic on POSIX and best-effort on Windows (falls back to a direct write if the temp file ends up on a different filesystem than the metadata directory, which is impossible in practice since both live under ~/.config/).