flow/render/live-text¶
Source: src/flow/render/live-text.ts
The live view as text: the summary line, then one line per live line, indented under the line that holds it, each cut to the width the caller draws in.
The glyphs are the plan’s ○ for what is not visited yet and the TUI’s for
the rest, from statusIcon, so a flow’s visit and a subagent’s row read
alike; – marks a node its sequence never reached.
LiveRow¶
type
export type LiveRow = {
/** How many lines hold it. */
readonly depth: number;
/** How its visit stands, which a caller colours it by. */
readonly state: LiveState;
/** `●`, `✓`, `✗`, `○` or `–`. */
readonly glyph: string;
/** What it says after its glyph, facts joined by ` · `, without who works on it. */
readonly text: string;
/** The subagents of a visit running now, which {@link showLive} names after its text; none once it ended. */
readonly subagents: readonly string[];
};
One line of the live view as text, before any cut.
liveRows¶
function
export function liveRows(live: LivePlan): LiveRow[] { /* … */ }
live’s lines under its summary, one row each, for a caller that draws
them its own way: in colour, with what each subagent is doing under its
visit. subagents are those of a visit running now.
showLive¶
function
export function showLive(live: LivePlan, width: number): string { /* … */ }
live as lines of text, none longer than width, pure.
showSummary¶
function
export function showSummary(live: LivePlan, width: number): string { /* … */ }
The one line live collapses to, no longer than width: ✓ build · 14 visits · 1 failed · deliver not converged · 12m · ↑310k ↓12k.