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:
Dhanji R. Prasanna
2026-01-16 14:37:58 +05:30
parent 1f6a5671b2
commit 4c6878a63d
3 changed files with 16 additions and 0 deletions

12
Cargo.lock generated
View File

@@ -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"