import { type Component } from "@gajae-code/tui"; import { type AppKeybinding, type KeybindingsManager, type KeyDisplayContext } from "../../config/keybindings"; import type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle } from "../../config/settings-schema"; import type { AgentSession } from "../../session/agent-session"; import { type SkillActiveEntry } from "../../skill-state/active-state"; import type { ActionRegistry, FocusDomain } from "../action-registry"; import { type JobsSnapshot } from "../jobs-observer"; export interface StatusLineSegmentOptions { model?: { showThinkingLevel?: boolean; showContextPercent?: boolean; }; path?: { abbreviate?: boolean; maxLength?: number; stripWorkPrefix?: boolean; }; git?: { showBranch?: boolean; showStaged?: boolean; showUnstaged?: boolean; showUntracked?: boolean; }; time?: { format?: "12h" | "24h"; showSeconds?: boolean; }; usage?: { mode?: "used" | "remaining"; }; } export interface StatusLineSettings { preset?: StatusLinePreset; leftSegments?: StatusLineSegmentId[]; rightSegments?: StatusLineSegmentId[]; separator?: StatusLineSeparatorStyle; segmentOptions?: StatusLineSegmentOptions; previewHighlightSegment?: StatusLineSegmentId; showHookStatus?: boolean; showSkillHud?: boolean; showActionHints?: boolean; sessionAccent?: boolean; maxRows?: number; } export interface StatusLineComponentOptions { version?: string; actionRegistry?: ActionRegistry; getKeybindings?: () => KeybindingsManager; focusDomain?: FocusDomain; keyDisplayContext?: KeyDisplayContext; } export interface StatusLineActionHint { id: AppKeybinding; content: string; } /** * Produces whole, bound action hints for the current focus domain. The registry * remains the authority for availability; KEYBINDINGS remains the authority for * whether an action has a binding and the active manager supplies overrides. */ export declare function getAvailableActionHints(actionRegistry: ActionRegistry | undefined, getKeybindings: (() => KeybindingsManager) | undefined, width: number, domain?: FocusDomain, keyDisplayContext?: KeyDisplayContext): StatusLineActionHint[]; export declare class StatusLineComponent implements Component { #private; private readonly session; constructor(session: AgentSession, options?: StatusLineComponentOptions); updateSettings(settings: StatusLineSettings): void; setActionRegistry(actionRegistry: ActionRegistry, getKeybindings: () => KeybindingsManager): void; setFocusDomain(domain: FocusDomain): void; setAutoCompactEnabled(enabled: boolean): void; setSubagentCount(count: number): void; setJobs(jobs: JobsSnapshot): void; setSessionStartTime(time: number): void; setPlanModeStatus(status: { enabled: boolean; paused: boolean; } | undefined): void; setGoalModeStatus(status: { enabled: boolean; paused: boolean; } | undefined): void; setSkillHudEntriesForTest(entries: SkillActiveEntry[]): void; setHookStatus(key: string, text: string | undefined): void; watchBranch(onBranchChange: () => void): void; dispose(): void; invalidate(): void; /** * Background-refresh the OAuth quota report. Guarded by a 5-min TTL on both * success (cache lifetime) and error (backoff). Exposed (non-private) so * unit tests can verify the backoff invariant. */ refreshUsageInBackground(): void; getTopBorder(width: number): { content: string; width: number; }; /** * Multi-row-aware content for the settings preview: the wrapped rows joined * with newlines so a single `Text` renders them stacked. Honors the current * `maxRows`; identical to the single status line when `maxRows` is 1 or when * everything fits on one row. */ getPreviewContent(width: number): string; getCacheStatsForTest(): { rowHits: number; rowMisses: number; }; invalidateBranchForTest(): void; setCachedPrForTest(pr: { number: number; url: string; } | null): void; render(width: number): string[]; }