feat: make model and provider list searchable#22758
Open
counterposition wants to merge 1 commit into
Open
Conversation
d88012d to
014e161
Compare
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
/modelpicker already had keyboard navigation, andhermes modelhad 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 asco47, shared Ink list/search handling, and opt-in curses filtering without introducing newsimple_term_menuusage.Implementation
curses_radiolist/curses_single_select, including/search mode, Backspace, Ctrl+U clear, Enter select, Esc exit search, and filtered arrow navigation.hermes modelprovider/model selection instead of adding newsimple_term_menuusage./model, session picker, skills hub, and agents overlay.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 -qnpx 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.tsxnpm run type-checknpm test -- --run src/lib/fuzzy.test.ts src/lib/searchableList.test.tsAll checks were run from a clean worktree based on
upstream/mainat369cee018.Risks
/, preserving existing arrow-key selection as the default interaction.