/** * TUI filter bar component — interactive search and filter controls. * * Provides text-based agent/session search, inline status toggle buttons, * and session ID filtering, plus a "filtered: N of M items" indicator. * * Rendered below the pulse when filter mode is toggled via `ctrl+f`. * * Inline "buttons" are rendered as styled text spans — active filters * are bracketed and bold, inactive ones are dimmed. Status toggles are * driven by `1`-`4` keys. * * @module */ import type { ThemeColors } from "../helpers.ts"; export interface StatusFilterDef { key: string; label: string; glyph: string; } export declare const STATUS_FILTERS: StatusFilterDef[]; export interface FilterBarProps { c: ThemeColors; /** Current text-based filter string. */ filterText: string; /** Set of status keys currently active. Empty = all statuses shown. */ activeStatuses: Set; /** Currently selected session ID for filtering, or null for all. */ sessionFilterId: string | null; /** Filter indicator counts. */ totalItems: number; filteredItems: number; /** Available session IDs to filter by (deduplicated, sorted). */ availableSessions: string[]; /** The sidebar's own session ID (always shown). */ currentSessionId: string; /** Called when a status filter button is clicked. */ onToggleStatus?: (status: string) => void; /** Called when a session filter selector is clicked (pass session ID or null for all). */ onSelectSession?: (sessionId: string | null) => void; /** Called when the filter bar close is clicked. */ onClose?: () => void; } export declare function renderFilterBar(props: FilterBarProps): any; /** * Compute total unfiltered item count from a snapshot. * Sums active functions, tasks, graphs, engine graphs, and loops. */ export declare function countTotalItems(data: { fns: unknown[]; tasks: unknown[]; graphs: unknown[]; engineGraphs?: unknown[]; loops: unknown[]; }): number; /** * Collect unique session IDs from the activity data for the filter selector. */ export declare function collectSessionIds(tasks: { sessionId?: string | null; }[], fns: { sessionId: string; }[], graphs: { sessionId: string; }[], loops: { originSessionId?: string | null; }[]): string[]; //# sourceMappingURL=FilterBar.d.ts.map