Set process title to agent name in agent mode
When running g3 --agent butler, the process title is now "g3 [butler]" which shows up in ps, Activity Monitor, top, etc. Uses the proctitle crate for cross-platform support.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user