kshitijk4poor
0fdab53ef0
feat(cli): ranked fuzzy search in the curses model picker
...
Wires the salvaged search helpers into the shared curses menu driver and
turns on type-to-filter for the CLI model pickers (the 100+ model lists
that previously required scrolling).
- Search lives in the shared `_run_curses_menu` driver behind a
`searchable` flag + `search_labels`, so both `curses_radiolist` and
`curses_single_select` get it without per-menu duplication. `/` opens
the filter, BACKSPACE edits, Ctrl+U clears, ESC clears the filter then
cancels. Returned values are always original item indices.
- `_filter_indices` RANKS matches (best-first) via a Python port of the
TS scorer in ui-tui/src/lib/fuzzy.ts and web/src/lib/fuzzy.ts. The port
is byte-identical in score: same per-char bonuses, prefix (+8) and
exact (+20) bonuses, camelCase/word-boundary detection (matching on the
lowercased target, boundary on the original case), and the -len*0.01
length tiebreak — so the CLI, TUI, and WebUI rank results identically.
A cross-language parity test pins the exact scores.
- `_prompt_model_selection` (the canonical picker across the model flows)
and the custom-provider model list pass `searchable=True`.
- Split `_decode_menu_key` out of `read_menu_key` so the search loop can
peek the raw key (catch `/`) before nav decoding.
- ESC during active search now clears the query (restores the full list)
so a no-match filter can't strand the user; printable-key capture is
restricted to ASCII to avoid Latin-1 mojibake.
- Update two setup-menu tests whose mock signatures predate the new
`searchable` kwarg; add ranked-scorer + parity + state-machine tests.
2026-06-01 16:58:58 -07:00
..
2026-05-27 02:12:27 -07:00
2026-05-19 11:10:51 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 01:20:33 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 00:43:32 -07:00
2026-05-28 22:26:25 -07:00
2026-06-01 09:57:10 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 02:24:48 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 05:47:30 -07:00
2026-05-29 02:24:48 -07:00
2026-05-27 09:38:58 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-24 04:25:32 -07:00
2026-05-19 14:51:21 -07:00
2026-05-18 20:01:34 -07:00
2026-05-18 10:14:38 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 13:22:54 -07:00
2026-05-28 15:14:05 +10:00
2026-05-15 14:45:43 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 15:14:05 +10:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 01:20:33 -07:00
2026-05-28 15:50:25 +10:00
2026-05-31 17:46:56 -05:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 12:16:15 -07:00
2026-05-28 22:26:25 -07:00
2026-05-17 02:29:41 -07:00
2026-05-28 22:26:25 -07:00
2026-05-13 09:34:15 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-01 11:28:56 +10:00
2026-05-28 22:26:25 -07:00
2026-05-29 23:45:05 -07:00
2026-05-18 17:39:50 +00:00
2026-05-28 22:26:25 -07:00
2026-05-09 18:43:40 -07:00
2026-05-31 13:59:56 +05:30
2026-05-28 22:26:25 -07:00
2026-06-01 16:58:58 -07:00
2026-06-01 16:58:58 -07:00
2026-05-31 03:19:37 -07:00
2026-06-01 02:58:02 -07:00
2026-06-01 15:10:20 +10:00
2026-05-27 02:12:27 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 02:12:27 -07:00
2026-05-29 12:17:12 +10:00
2026-05-27 02:12:27 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 02:12:27 -07:00
2026-05-29 12:17:12 +10:00
2026-05-27 02:12:27 -07:00
2026-05-31 17:46:56 -05:00
2026-05-27 02:12:27 -07:00
2026-05-28 22:26:25 -07:00
2026-05-12 13:59:22 -04:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 11:04:46 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 13:36:33 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 15:14:05 +10:00
2026-06-01 13:27:30 +10:00
2026-05-13 18:40:14 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 17:54:17 -07:00
2026-05-30 23:05:56 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 12:36:59 -07:00
2026-05-28 03:25:32 -07:00
2026-05-28 22:26:25 -07:00
2026-05-31 17:46:56 -05:00
2026-05-28 22:26:25 -07:00
2026-05-29 23:45:05 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 01:23:06 -07:00
2026-06-01 01:39:03 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 00:19:31 -07:00
2026-05-21 19:17:45 -07:00
2026-05-31 17:46:56 -05:00
2026-05-28 22:26:25 -07:00
2026-05-30 01:40:57 -07:00
2026-05-18 20:17:10 -07:00
2026-05-28 21:00:46 -07:00
2026-05-18 21:33:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-30 01:40:49 -07:00
2026-05-30 01:40:57 -07:00
2026-05-18 09:40:44 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 19:02:55 -07:00
2026-05-18 20:47:01 -07:00
2026-05-31 01:16:33 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 19:02:55 -07:00
2026-05-23 23:10:36 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 17:50:42 -07:00
2026-05-31 17:46:56 -05:00
2026-05-19 01:28:32 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 12:32:19 -07:00
2026-05-28 22:26:25 -07:00
2026-05-30 07:45:26 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 22:29:48 -07:00
2026-05-20 09:18:23 -07:00
2026-05-31 17:46:56 -05:00
2026-05-28 22:26:25 -07:00
2026-05-31 03:19:37 -07:00
2026-05-29 12:32:35 -07:00
2026-05-29 23:45:05 -07:00
2026-05-28 22:26:25 -07:00
2026-05-30 20:57:01 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 00:19:31 -07:00
2026-05-13 18:40:14 -07:00
2026-05-29 02:24:48 -07:00
2026-06-01 06:32:48 +05:30
2026-05-28 22:26:25 -07:00
2026-05-29 23:45:05 -07:00
2026-05-09 23:17:25 -07:00
2026-05-17 02:29:41 -07:00
2026-05-28 22:26:25 -07:00
2026-05-30 00:22:46 -07:00
2026-05-23 17:49:47 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 00:59:42 -07:00
2026-05-31 17:46:56 -05:00
2026-05-25 01:41:19 -07:00
2026-05-24 18:04:54 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 13:02:25 -07:00
2026-05-17 13:54:12 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-24 18:07:47 -07:00
2026-05-29 22:29:48 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 01:20:33 -07:00
2026-05-30 02:53:42 -07:00
2026-05-28 22:26:25 -07:00
2026-05-31 15:02:26 -07:00
2026-05-29 02:24:48 -07:00
2026-05-28 02:36:09 -07:00
2026-05-21 16:40:04 +05:30
2026-05-31 03:19:37 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 03:34:47 -07:00
2026-05-29 12:32:35 -07:00
2026-05-25 01:20:33 -07:00
2026-05-12 01:02:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-10 13:06:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-15 10:36:38 +05:30
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-01 16:58:58 -07:00
2026-05-31 09:13:06 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-19 01:28:32 -07:00
2026-05-25 01:20:33 -07:00
2026-05-31 09:13:06 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 11:59:58 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 04:53:13 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 22:26:24 +05:30
2026-05-28 00:19:31 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-31 03:19:37 -07:00
2026-05-25 01:47:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-31 17:46:56 -05:00
2026-05-24 18:04:54 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 22:03:45 -05:00
2026-05-22 00:16:52 -05:00
2026-05-30 07:31:48 -07:00
2026-05-29 17:24:38 -07:00
2026-05-14 14:28:14 -07:00
2026-05-29 13:30:28 -07:00
2026-05-30 02:38:40 -07:00
2026-05-28 22:26:25 -07:00
2026-05-19 03:01:02 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-30 02:08:11 -07:00
2026-05-15 12:11:32 -07:00
2026-05-29 02:24:48 -07:00
2026-05-25 01:15:24 -07:00
2026-05-24 15:00:44 -07:00
2026-05-24 17:47:24 -07:00
2026-06-01 15:39:35 +10:00
2026-05-31 17:46:56 -05:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-17 12:35:01 -07:00
2026-05-24 18:12:16 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00