Skip to main content

agent_procs/cli/
down.rs

1use crate::config::{load_config, resolve_session};
2
3pub async fn execute(cli_session: Option<&str>) -> i32 {
4    let session = match cli_session {
5        Some(s) => s.to_string(),
6        None => {
7            let config_session = load_config(None).ok().and_then(|(_, c)| c.session);
8            resolve_session(None, config_session.as_deref()).to_string()
9        }
10    };
11
12    crate::cli::stop::execute_all(&session).await
13}