eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
41 lines (40 loc) • 2.09 kB
TypeScript
import type { Theme } from "./theme.js";
import type { LogDisplayMode } from "./log-display-mode.js";
import type { VercelStatusSnapshot } from "./vercel-status.js";
import type { ModelEndpointStatus } from "#shared/model-endpoint-status.js";
export interface StatusLineInput {
/** Resolved model slug, e.g. "anthropic/claude-sonnet-4-6"; absent when `/eve/v1/info` failed. */
model?: string;
/** Preformatted token-flow segment (formatTokenFlow output), e.g. `↑ 394.4K ↓ 4.3K`. */
tokens?: string;
/**
* Transient dev-TUI log-display mode shown after a Ctrl+L cycle, e.g.
* `sandbox`. Rendered as a prominent leading `logs: <mode>` segment that
* survives width degradation and can stand alone; absent once the hint times
* out.
*/
logLevel?: LogDisplayMode;
/** Model endpoint readiness: external, or AI Gateway connected/not-connected. */
endpoint?: ModelEndpointStatus;
/** Workspace-scoped Vercel state; identity absent while unlinked or still resolving. */
vercel?: VercelStatusSnapshot;
theme: Theme;
width: number;
}
/**
* Builds the dev TUI's persistent one-row status line:
*
* `model · tokens · AI Gateway (project) · /deploy pending`
*
* The model-endpoint segment folds in the linked project name when connected
* (`AI Gateway (project)`), drops to a bare `AI Gateway` when connected without
* a linked project, and goes yellow with a `⚠` when the gateway has no usable
* credential. Everything else renders dim except the yellow action signals (a
* pending deploy, the not-connected gateway). On narrow widths segments degrade
* in order, the endpoint first and then the model, keeping tokens and the
* pending-deploy marker longest. A transient `logs: <mode>` segment from a
* Ctrl+L cycle leads the row when present and is kept longest of all. Segments
* stay recoverable from the agent header in scrollback. Returns undefined when
* no segment has content so callers skip the row.
*/
export declare function buildStatusLine(input: StatusLineInput): string | undefined;