diff --git a/Cargo.lock b/Cargo.lock index c1d1373..c4080c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1361,6 +1361,7 @@ dependencies = [ "hex", "indicatif", "once_cell", + "proctitle", "rand", "ratatui", "regex", @@ -2763,6 +2764,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proctitle" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924cd8a0de90723d63fed19c5035ea129913a0bc998b37686a67f1eaf6a2aab5" +dependencies = [ + "lazy_static", + "libc", + "winapi", +] + [[package]] name = "qoi" version = "0.4.1" diff --git a/crates/g3-cli/Cargo.toml b/crates/g3-cli/Cargo.toml index 69e068e..072cf65 100644 --- a/crates/g3-cli/Cargo.toml +++ b/crates/g3-cli/Cargo.toml @@ -31,6 +31,7 @@ regex = "1.10" syntect = "5.3" once_cell = "1.19" rand = "0.8" +proctitle = "0.1.1" [dev-dependencies] tempfile = "3.8" diff --git a/crates/g3-cli/src/agent_mode.rs b/crates/g3-cli/src/agent_mode.rs index 0344504..593d239 100644 --- a/crates/g3-cli/src/agent_mode.rs +++ b/crates/g3-cli/src/agent_mode.rs @@ -29,6 +29,9 @@ pub async fn run_agent_mode( use g3_core::find_incomplete_agent_session; use g3_core::get_agent_system_prompt; + // Set process title to agent name (shows in ps, Activity Monitor, etc.) + proctitle::set_title(format!("g3 [{}]", agent_name)); + // Initialize logging use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; let filter = EnvFilter::from_default_env()