Skip to main content

Module engine

Module engine 

Source

Structs§

HistoryEntry
A history entry with its metadata
SearchEngine
Search engine that combines SQLite queries with nucleo fuzzy matching

Functions§

directory_boost 🔒
Boost for commands last run in the current working directory, so global mode softly prefers project-local history without hiding everything else (the directory filter mode remains the hard version). In directory mode every entry shares the cwd, making the boost uniform and rank-neutral.
format_relative_time
Format a timestamp as a relative time string (e.g., “2m”, “3h”, “2d”)
frecency_boost 🔒
Recency boost added to nucleo’s fuzzy score so freshly-used commands outrank stale ones at similar match quality. The step values are tuned to nucleo’s natural range (~16-32 for single-char queries): the boost can flip ordering for short queries, but for longer queries – where nucleo scores grow with each matched char – it degrades gracefully into a tiebreaker.
frequency_boost 🔒
Boost for commands used repeatedly within the loaded window, so workhorse commands outrank one-offs at similar match quality. Log-scale and capped below a single matched char (~16 in nucleo’s scale) so frequency can break near-ties but never swamp match quality: 1 use → 0, 2-3 → 4, 4-7 → 8, 8+ → 12.