StatusLineSnapshot class final

Everything one status-bar frame renders from, built entirely host-side (see the library docs: zero fetches, zero subprocesses from here down). Fields the host cannot supply stay null and their segments hide — a hidden segment is data absence, never a fallback string.

Constructors

StatusLineSnapshot({required String cwd, String? homeDir, String? workRoot, String? modelName, String? providerName, String? thinkingLevel, String? approvalMode, String? agentLoadMode, StatusLineGit? git, String? pr, int contextTokens = 0, int contextWindow = 0, int tokensIn = 0, int tokensOut = 0, int cacheRead = 0, int cacheWrite = 0, double? tokensPerSecond, double? tokensPerSecondAvg, double? costUsd, String? sessionName, String? sessionId, int subagents = 0, Duration elapsed = Duration.zero, int deadlineRemainingMs = -1, DateTime? now, String? hostname, bool idle = true, int? idleChangedAgoMs, String? brandFrame})
const

Properties

agentLoadMode → String?
Agent load mode label for mode (omp, pi, …; default renders as nothing — it is the absence of a special mode).
final
approvalMode → String?
Approval mode label for mode (yolo, write, …). Must be the CLI label (ApprovalModeLabel.label), NOT the enum name — the autopilot highlight matches this string against kAutopilotLabel exactly; a host that feeds .name (unattended) silently renders as a plain muted mode with no highlight.
final
brandFrame → String?
The brand-zone animation frame (gh-1446 AC5): the CURRENT activity ring glyph, resolved by the host from the compile-time TuiSymbols.activitySpinner list — never model text (a model-authored string can never become a frame). null/idle renders the BLANK frame cell so the Fa column is constant in both states; while streaming the host passes ringframe % ring.length off the live spinner tick.
final
cacheRead → int
final
cacheWrite → int
final
contextPercent → double?
Live context pressure as a percent (0–100+); null when the window is unknown. Derived, never carried: one source of truth.
no setter
contextTokens → int
Live context estimate: provider-reported usage plus the trailing in-flight estimate (what the NEXT request carries).
final
contextWindow → int
Effective context window in tokens; 0 = unknown (the context_pct segment then renders used/? and the gauge renders without labels).
final
costUsd → double?
Running session cost in USD; null = unpriced model → the cost segment hides (E2: never $0.00 for an unknown price).
final
cwd → String
Working directory for the path segment.
final
deadlineRemainingMs → int
gh-1556: LIVE remaining deadline budget in ms for the timer countdown chip; negative hides the segment. The host recomputes this from its SessionDeadline per frame tick — the chip is a pure projection of the one clock, never a second timer source.
final
elapsed → Duration
Active-processing time for time_spent and the streaming spinner cadence (idle wall clock excluded).
final
git → StatusLineGit?
Git working-tree state; null or a branchless clean state hides git.
final
hashCode → int
The hash code for this object.
no setterinherited
homeDir → String?
Home directory root, ~-abbreviated by the path segment.
final
hostname → String?
Machine hostname; null hides hostname.
final
idle → bool
Whether the agent is idle (vs streaming/working): idle dims the bar and drives the pi brand fade toward its dim endpoint.
final
idleChangedAgoMs → int?
Milliseconds since the last idle↔working flip; null = no flip observed (the brand mark sits at its endpoint). Drives the 450 ms brand fade (see statusLineBrandFadeT).
final
modelName → String?
Active model id/name; null hides the model segment.
final
now → DateTime?
Wall clock for the time segment. Injected (never read from the system here) so renders stay pure and testable on a virtual clock.
final
pr → String?
Host-resolved open PR for the current branch (#123); null hides pr (no tool, unauthed, other forge — the host owns that policy).
final
providerName → String?
Provider display label for model (the host's _statusProviderLabel policy: a saved custom entry's name beats the catalog protocol kind); rendered as provider / model when non-empty, the bare model otherwise (issue #920).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessionId → String?
Session id (first 8 chars render); null renders the new fallback.
final
sessionName → String?
Session display name; null hides session_name.
final
subagents → int
Live background subagent count; hidden when zero.
final
thinkingLevel → String?
Thinking-level suffix for model (rendered only when StatusLineSegmentOptions.showThinkingLevel is on).
final
tokensIn → int
Provider usage counters (cumulative session totals).
final
tokensOut → int
final
tokensPerSecond → double?
Live output rate for token_rate (tok/s); hidden when null/zero.
final
tokensPerSecondAvg → double?
Session-average output rate for token_rate_avg (tok/s): the usage ledger's total output over accumulated active-stream time (gh-1762). Hidden when null — until a completed turn exists it stays null, never 0 t/s.
final
workRoot → String?
Workspace root the path segment strips when StatusLineSegmentOptions.stripWorkPrefix is on.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited