import type { Theme } from "@earendil-works/pi-coding-agent"; import type { ConfigTuiState } from "../state/model.js"; /** Themed horizontal rule spanning the full width. */ export declare function rule(width: number, theme: Theme): string; /** * Compute a windowed slice of `items` around `cursor` so that long lists fit * inside `maxRows`. Returns the visible items, their absolute start index, * and scroll indicator counts. Default window: 10 rows. */ export declare function windowList(items: T[], cursor: number, maxRows?: number): { visible: T[]; start: number; aboveCount: number; belowCount: number; }; export declare function authBadgeFor(state: ConfigTuiState, provider: string, theme: Theme): string; export declare function authStatusLine(state: ConfigTuiState, theme: Theme): string; export declare function resolvedSummary(state: ConfigTuiState, theme: Theme): string; export declare function formatOverride(override: string | { provider: string; model: string; } | undefined): string; /** Render the four-rule cascade footer in plain English. * This is the "How models get picked" section from Screen 3. */ export declare function cascadeFooter(width: number, theme: Theme): string[]; /** Render a tier badge like "Heavy", "Standard", "Light" in themed color. */ export declare function tierBadge(tier: "heavy" | "standard" | "light", theme: Theme): string; /** Width-safe final guard: truncate every line to the given terminal width. */ export declare function safeLines(lines: string[], width: number): string[]; /** * Filter a list of items using fuzzy search. * When `query` is empty, returns items unfiltered (original order). * When non-empty, returns items matching the fuzzy query (best matches first). */ export declare function filterWithSearch(items: T[], query: string, getText: (item: T) => string): T[]; /** * Render the search/filter input line. * Shows a prompt, the current query, a block cursor, and a hint when empty. */ export declare function renderFilterLine(query: string, theme: Theme): string; /** * Render search result count line. */ export declare function renderResultCount(shown: number, total: number, theme: Theme): string; /** * Determine if a raw key event represents a printable character suitable for * appending to a search query. Excludes control sequences, ESC sequences, * and other non-printable input. */ export declare function isPrintableInput(data: string): boolean; /** * Process a search key event and return the updated query, or undefined if * the key is not search-related. * * - Printable characters: append to query * - Backspace: remove last character * - Ctrl+U / Ctrl+W: clear entire query * * Returns the new query string, or `undefined` if the key isn't a search action. */ export declare function handleSearchKey(currentQuery: string, data: string): string | undefined;