Expand description
Prompt-history ranking shared by the CLI history picker and the desktop history palette.
Both surfaces must find the same prompts for the same query, so the match,
rank, dedup, and cap rules live here instead of being reimplemented per UI.
Matching is crate::search::FuzzyQuery (nucleo) so a multi-word query
such as impl chg finds Implement current changes; a plain substring
test cannot express that.
Constants§
- MAX_
PROMPT_ HISTORY_ ROWS - Maximum prompt-history rows any surface shows for one query.
Functions§
- prompt_
history_ row_ label - Compact history row label:
first line · 3h ago · +2 lines. - rank_
prompt_ history - Indices of
candidatesmatchingquery, best match first.