zag-cli 0.16.0

A unified CLI for AI coding agents — Claude, Codex, Gemini, Copilot, and Ollama
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use anyhow::{Result, bail};
use zag_agent::session;

pub(crate) fn run(id: &str, json: bool, root: Option<&str>) -> Result<()> {
    let mut store = session::SessionStore::load(root)?;
    if store.get(id).is_none() {
        bail!("Session not found: {id}");
    }
    store.remove(id);
    store.save(root)?;
    if json {
        println!(r#"{{"deleted":"{id}"}}"#);
    } else {
        println!("Deleted session: {id}");
    }
    Ok(())
}