/** * Shared fuzzy ranking for `/` and `@` menu candidates: the query must be a * case-insensitive ordered subsequence of the candidate name. Prefix hits * rank first, then the strongest alignment score, then the source order of * the input. Ported from the upstream web client's ui-primitives * (rank-by-name.ts) so the terminal matches the web menu's discovery feel; * the algorithm is unchanged, only the module's home moved. * * @module @deepseek-ai/dsh-code/render/fuzzy */ /** * Rank named items by a menu query. * @param items - candidates in source order (the caller's composition order * is the final tie-breaker, e.g. local commands before registry entries). * @param rawQuery - the text typed after the trigger, matched case-insensitively. * @returns the matching items: prefix hits first, then by alignment score, * then in source order. The input list itself for an empty query. */ export declare function rankByName(items: readonly T[], rawQuery: string): readonly T[];