/** * Fuzzy matching utilities. * Matches if all query characters appear in order (not necessarily consecutive). * Lower score = better match. */ /** * [WHO]: FuzzyMatch, fuzzyMatch, fuzzyFilter * [FROM]: No external dependencies * [TO]: Consumed by core/lib/tui/src/index.ts * [HERE]: core/lib/tui/src/fuzzy.ts - */ export interface FuzzyMatch { matches: boolean; score: number; } export declare function fuzzyMatch(query: string, text: string): FuzzyMatch; /** * Filter and sort items by fuzzy match quality (best matches first). * Supports space-separated tokens: all tokens must match. */ export declare function fuzzyFilter(items: T[], query: string, getText: (item: T) => string): T[]; /** * Weighted fuzzy filter for command autocomplete. * Scores items by multiple fields with different weights. * Higher score = better match. */ export interface WeightedField { name: string; getText: (item: T) => string; weight: number; } export declare function weightedFuzzyFilter(items: T[], query: string, fields: WeightedField[]): T[];