/** * Pure display helpers for the plan pane + Ctrl+P pager body (PLAN-001, V2-070). */ import type { PlanStatus, PlanTask, SessionPlan, TaskState } from "../../store/plan.js"; export interface PlanProgressView { readonly done: number; readonly total: number; /** Single compact label, e.g. "8/8 complete" — no bar, no duplication. */ readonly label: string; } export declare const TASK_GLYPH: Record; export declare const TASK_STATE_LABEL: Record; export declare const STATUS_LABEL: Record; /** * Theme keys used for plan/task pane text. Keep these high-contrast on the * pane background (statusBackground) — avoid washed slate for body text. */ export type PlanColorToken = "muted" | "foreground" | "accent" | "success" | "activity" | "cyan" | "magenta" | "mode" | "response" | "diffDel"; export declare function planStatusColor(status: PlanStatus): PlanColorToken; /** * Task row colors (tasks pane): * - pending → solid foreground (not light gray wash) * - active → yellow activity (already good) * - done → bright success green * - failed → red * - skipped → muted secondary */ export declare function taskStateColor(state: TaskState): PlanColorToken; export declare function progressView(plan: SessionPlan): PlanProgressView; /** * Compact progress bar for the tasks pane header. * Example (width=8, 3/8): `███░░░░░` */ export declare function progressBar(done: number, total: number, width: number): string; /** Short uppercase chip label for plan status (TASKS header). */ export declare function planStatusChip(status: PlanStatus): string; /** Short chip label for a task state. */ export declare function taskStateChip(state: TaskState): string; export declare function taskLabel(task: PlanTask): string; /** * The row the pane highlights and scrolls to. Responder children are concurrent * background work, so they never take the active plate away from the foreground * task the model is actually on. */ export declare function activeTaskId(plan: SessionPlan): string | undefined; /** Stable display order with each responder subtree immediately after its parent. */ export declare function orderPlanTasksForDisplay(tasks: readonly PlanTask[]): PlanTask[]; /** Responder ownership stays visible while terminal state colors remain truthful. */ export declare function taskRowColor(task: PlanTask): PlanColorToken; export declare function taskGlyph(task: PlanTask): string; /** Short chip that explains why a row is not foreground work, plus its phase. */ export declare function taskOwnerChip(task: PlanTask): string | undefined; /** Soft-wrap without ellipsis — full text, never truncated. */ export declare function wrapPlanText(text: string, width: number): string[]; /** * Strip redundant `t1:` / `t1 -` prefixes when the model baked the task id * into the title (keeps the pager readable). */ export declare function cleanTaskTitle(task: PlanTask): string; /** * Full plan body for the OpenTUI pager (Ctrl+P / /plan). * Markdown so the pager renders headings, tables, and lists cleanly. */ export declare function formatPlanPagerDocument(plan: SessionPlan): string;