Skip to main content

build_status_lines

Function build_status_lines 

Source
pub fn build_status_lines(
    status: GenerationStatus,
    elapsed_secs: u64,
    tokens_received: usize,
    tokens_estimated: bool,
    status_override: Option<&str>,
    agents: &[AgentPanelRow],
    bg_available: bool,
    task_headline: Option<&str>,
    queued_messages: &VecDeque<QueuedMessage>,
    exit_armed: bool,
    theme: &Theme,
    width: u16,
) -> Vec<Line<'static>>
Expand description

Build the status-line rows: a generation/tool spinner followed by one row per queued message.

When the spinner fits in width it stays on one row. When it doesn’t (a long task headline), it splits into exactly two rows — the status text on row 1, the (esc to interrupt …) metadata on row 2 (indented under the status text) — and each row is truncated to width so nothing ever bleeds off the right edge. The fixed 1-or-2-row shape keeps the reserved height stable as the timer/token counter tick (no per-frame reflow).