pub enum StatusItem {
Mode,
Model,
Cost,
Cache,
ContextPercent,
Tokens,
Balance,
SessionMetrics,
Ttft,
OutputRate,
Workspace,
GitBranch,
}Expand description
One configurable bottom-chrome item.
Every variant owns exactly one thing on screen, and /statusline turns
that thing on or off:
| Variant | What it paints |
|---|---|
Mode | the posture bar’s plan/act/operate chip |
Model | the metrics line’s route segment |
ContextPercent | the metrics line’s ctx NN% reading |
Cost | the metrics line’s session price |
SessionMetrics | the metrics line’s ttft and tok/s |
Cache | the metrics line’s cache NN% |
Tokens | the metrics line’s ↓ NNN output tokens |
Balance | the metrics line’s prepaid-credit reading (also gates the fetch) |
Workspace | the metrics line’s workspace leaf-directory chip |
GitBranch | the metrics line’s current-branch chip (short SHA when detached) |
A variant that paints nothing does not belong here. Eight variants were
retired in #5950 because the 0.9.12 shell gave their facts to a surface
/statusline does not own — the posture bar’s clock and live counts
(Status, Agents), the launch header and git dock (GitBranch) — or
because they were never wired at all (ReasoningReplay,
PrefixStability, LastToolElapsed, RateLimit). #6112 revived
GitBranch (and added Workspace) as opt-in metrics-line chips fed by
the cached workspace context, not by a per-frame git call. The other
retired keys still parse out of an old config.toml:
StatusItem::from_key returns None and deser_status_items skips
them with a warning, so an upgrader’s file keeps loading.
Variants§
Mode
“act” / “plan” / “operate” chip.
Model
Model identifier (e.g. deepseek-v4-pro).
Cost
Session cost in the configured display currency.
Cache
Cache hit rate (“cache 73%”).
ContextPercent
Context-window utilisation percent (“ctx 48%”).
Tokens
Output tokens of the live or last turn (“↓ 1.2K”).
Balance
Prepaid remaining credit, refreshed once per turn completion.
SessionMetrics
Legacy configuration alias enabling both TTFT and output rate. The picker expands it into independently editable readings.
Ttft
Mean measured time from request dispatch to the first token.
OutputRate
Provider output tokens divided by measured request time.
Workspace
Leaf directory of the session workspace, left-truncated when long. Opt-in (#6112); off the default footer.
GitBranch
Current git branch from the cached workspace context — the short SHA when HEAD is detached, absent outside a repository. Opt-in (#6112); off the default footer.
Implementations§
Source§impl StatusItem
impl StatusItem
Default footer composition for the always-on status line. Used when
tui.status_items is missing from config.toml so upgraders see a
concise footer by default; diagnostic chips remain available via
/statusline without crowding the main UI.
Sourcepub fn from_key(key: &str) -> Option<Self>
pub fn from_key(key: &str) -> Option<Self>
Reverse of key: parse a config string back to a variant.
Returns None for unknown keys so the config parser can silently skip
items added by newer versions rather than crashing with “unknown variant”.
Sourcepub fn hint(self, locale: Locale) -> Cow<'static, str>
pub fn hint(self, locale: Locale) -> Cow<'static, str>
One-line hint shown beside the label so the user knows what each item surfaces without having to toggle it on first.
Sourcepub fn all() -> &'static [StatusItem]
pub fn all() -> &'static [StatusItem]
Editable items in display order. Legacy combined metrics parse but expand to the two individual controls instead of appearing twice.
Sourcepub fn is_available_for(self, provider: ProviderKind) -> bool
pub fn is_available_for(self, provider: ProviderKind) -> bool
Whether this item is relevant for provider. Provider-specific
items return false for unsupported providers so the picker doesn’t
offer toggles that can never show useful data.
Trait Implementations§
Source§impl Clone for StatusItem
impl Clone for StatusItem
impl Copy for StatusItem
Source§impl Debug for StatusItem
impl Debug for StatusItem
Source§impl<'de> Deserialize<'de> for StatusItem
impl<'de> Deserialize<'de> for StatusItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for StatusItem
Source§impl Hash for StatusItem
impl Hash for StatusItem
Source§impl PartialEq for StatusItem
impl PartialEq for StatusItem
Source§impl Serialize for StatusItem
impl Serialize for StatusItem
impl StructuralPartialEq for StatusItem
Auto Trait Implementations§
impl Forget for StatusItem
impl Freeze for StatusItem
impl Move for StatusItem
impl RefUnwindSafe for StatusItem
impl Send for StatusItem
impl Sync for StatusItem
impl Unpin for StatusItem
impl UnsafeUnpin for StatusItem
impl UnwindSafe for StatusItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.