Skip to main content

Module prompt_history

Module prompt_history 

Source
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 candidates matching query, best match first.