Skip to content

feat: make model and provider list searchable#22758

Open
counterposition wants to merge 1 commit into
NousResearch:mainfrom
counterposition:codex/searchable-model-selectors
Open

feat: make model and provider list searchable#22758
counterposition wants to merge 1 commit into
NousResearch:mainfrom
counterposition:codex/searchable-model-selectors

Conversation

@counterposition

@counterposition counterposition commented May 9, 2026

Copy link
Copy Markdown
Contributor

Demo

hermes-model-search-demo.mp4
hermes-tui-model-search-demo-half-speed.mp4

Rationale

Model and provider lists have grown large enough that arrow-only selection is slow and error-prone, especially for users switching among many hosted providers and model IDs. The TUI /model picker already had keyboard navigation, and hermes model had curses navigation, but neither offered a consistent way to filter the list. This adds searchable selection to those surfaces with the smallest maintainable shared helpers: a tokenized subsequence matcher for model-style abbreviations such as co47, shared Ink list/search handling, and opt-in curses filtering without introducing new simple_term_menu usage.

Implementation

  • Add searchable curses support to curses_radiolist / curses_single_select, including / search mode, Backspace, Ctrl+U clear, Enter select, Esc exit search, and filtered arrow navigation.
  • Use that curses path for hermes model provider/model selection instead of adding new simple_term_menu usage.
  • Add shared TUI helpers for tokenized subsequence filtering and indexed searchable lists.
  • Apply the shared TUI search behavior to /model, session picker, skills hub, and agents overlay.
  • Keep provider search focused on provider identity fields so status text like “needs setup” does not create noisy matches.

Tests

  • uv run --extra dev pytest -o addopts= tests/hermes_cli/test_curses_ui_search.py tests/hermes_cli/test_terminal_menu_fallbacks.py tests/hermes_cli/test_model_picker_viewport.py tests/test_model_picker_scroll.py tests/hermes_cli/test_setup_model_provider.py -q
  • npx eslint src/lib/fuzzy.ts src/lib/fuzzy.test.ts src/lib/searchableList.ts src/lib/searchableList.test.ts src/components/modelPicker.tsx src/components/sessionPicker.tsx src/components/skillsHub.tsx src/components/agentsOverlay.tsx
  • npm run type-check
  • npm test -- --run src/lib/fuzzy.test.ts src/lib/searchableList.test.ts

All checks were run from a clean worktree based on upstream/main at 369cee018.

Risks

  • Curses and Ink picker behavior is partly state-machine driven, so the regression coverage focuses on the shared filtering/key-handling helpers plus existing picker tests rather than full terminal E2E automation.
  • Search is opt-in via /, preserving existing arrow-key selection as the default interaction.

@counterposition counterposition changed the title Add searchable model selectors feat: add searchable model selectors May 9, 2026
@counterposition counterposition changed the title feat: add searchable model selectors feat: make model and provider list searchable May 9, 2026
@counterposition counterposition force-pushed the codex/searchable-model-selectors branch from d88012d to 014e161 Compare May 9, 2026 20:07
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels May 9, 2026
kshitijk4poor pushed a commit to kshitijk4poor/hermes-agent that referenced this pull request Jun 1, 2026
Pure, refactor-independent helpers for type-to-filter search in the
curses single-/radio-select menus: subsequence matching, filtered-index
mapping, cursor reconciliation, scroll clamping, and an active-search
key handler, plus unit tests.

Salvaged from NousResearch#22758 (the curses event loop was since refactored into a
shared driver on main, so the integration is rebuilt in a follow-up
commit; these pure helpers and their tests carry over unchanged).
teknium1 pushed a commit that referenced this pull request Jun 1, 2026
Pure, refactor-independent helpers for type-to-filter search in the
curses single-/radio-select menus: subsequence matching, filtered-index
mapping, cursor reconciliation, scroll clamping, and an active-search
key handler, plus unit tests.

Salvaged from #22758 (the curses event loop was since refactored into a
shared driver on main, so the integration is rebuilt in a follow-up
commit; these pure helpers and their tests carry over unchanged).
changman pushed a commit to changman/hermes-agent that referenced this pull request Jun 10, 2026
Pure, refactor-independent helpers for type-to-filter search in the
curses single-/radio-select menus: subsequence matching, filtered-index
mapping, cursor reconciliation, scroll clamping, and an active-search
key handler, plus unit tests.

Salvaged from NousResearch#22758 (the curses event loop was since refactored into a
shared driver on main, so the integration is rebuilt in a follow-up
commit; these pure helpers and their tests carry over unchanged).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants