agent_status/commands/mod.rs
1//! Helpers used by each `agent-status` subcommand. One file per subcommand
2//! (`set`, `status`, `list`, `agent-extension`); `mod.rs` re-exports the
3//! public API and houses the shared `needs_attention` filter consumed by
4//! both `format_status` and `format_list`.
5
6mod agent_extension;
7mod list;
8mod set;
9mod status;
10
11pub use agent_extension::{build_extension, ExtensionFile};
12pub use list::format_list;
13pub use set::build_entry;
14pub use status::format_status;
15
16/// Whether an `event` value represents a session that wants the user's eyes
17/// right now. `notify` is an explicit "Claude is blocked on you" signal;
18/// `done` is the just-finished state that the next prompt will move on from.
19/// Other values (`working`, `idle`, or anything the agent layer invents
20/// later) are alive-but-not-asking and are hidden from the tmux indicator
21/// and the legacy fzf TSV. The switcher reads the store directly and
22/// surfaces every event value, so this filter does NOT apply there.
23pub(crate) fn needs_attention(event: &str) -> bool {
24 !matches!(event, "working" | "idle")
25}