Skip to content

feat(tui): ctrl+a toggle to hide unconfigured providers in the model picker - #49296

Open
SilentKnight87 wants to merge 1 commit into
NousResearch:mainfrom
SilentKnight87:feat/model-picker-configured-only
Open

feat(tui): ctrl+a toggle to hide unconfigured providers in the model picker#49296
SilentKnight87 wants to merge 1 commit into
NousResearch:mainfrom
SilentKnight87:feat/model-picker-configured-only

Conversation

@SilentKnight87

@SilentKnight87 SilentKnight87 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a ^a toggle to the TUI model picker's provider stage that hides providers the user hasn't explicitly configured — the same explicit-providers subset the desktop chat picker now defaults to after #60514.

History / scope note: as originally filed (June 19) this PR implemented configured-only filtering across CLI/REST/gateway/desktop/TUI. #60514 (fixing #56974) has since landed the backend params (explicit_only, include_unconfigured) and the desktop-picker defaults, so this PR is rescoped to the surface it left open: the TUI picker deliberately keeps the full provider universe for setup affordances ("paste KEY to activate"), and this change adds user control without touching that default.

Type of Change

  • ✨ New feature (non-breaking change that adds functionality)
  • ✅ Tests (adding or improving test coverage)

Changes Made

  • ui-tui/src/components/modelPicker.tsx
    • ^a in the provider stage toggles between the full universe (include_unconfigured: true — unchanged default) and explicitly configured providers (explicit_only: true, reusing the param introduced by fix: limit desktop model pickers to explicit providers (#56974) #60514).
    • model.options request params extracted into a pure modelOptionsRequestParams helper; refetch effect gains a cancellation guard and loading state on toggle.
    • Footer hint advertises the binding: ^a hide unconfigured^a show all.
  • ui-tui/src/__tests__/modelPicker.test.ts
    • Param construction for both toggle states, including refresh preservation.

How to Test

  1. Open the TUI /model picker — full provider list with setup rows, as today.
  2. Press ^a — only explicitly configured providers remain (matches the desktop chat picker subset).
  3. Press ^a again — full list returns. Filter and selection state reset cleanly on toggle.

Checklist

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs to make sure this isn't a duplicate (rescoped to complement fix: limit desktop model pickers to explicit providers (#56974) #60514 rather than duplicate it)
  • My PR contains only changes related to this feature (2 files, +91/−16)
  • I've added tests for my changes
  • I've tested on my platform: macOS
  • I've considered cross-platform impact (frontend-only, no platform-specific code)

Screenshots / Logs

  • npm exec --workspace ui-tui prettier -- --check — pass
  • npm run typecheck --workspace ui-tui — pass
  • npm run test --workspace ui-tui -- src/__tests__/modelPicker.test.ts src/__tests__/providers.test.ts — 16 passed

@SilentKnight87
SilentKnight87 force-pushed the feat/model-picker-configured-only branch from ff632ea to bf7cc95 Compare June 19, 2026 22:35
@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/gateway Gateway runner, session dispatch, delivery comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/desktop Electron desktop app (apps/desktop/*) labels Jun 19, 2026
@SilentKnight87

Copy link
Copy Markdown
Contributor Author

Updated this branch against current main and resolved the merge conflicts in:

  • apps/desktop/src/app/shell/model-menu-panel.tsx
  • hermes_cli/inventory.py

Resolution kept the configured-only query key behavior and preserved the newer upstream moa exclusion for unconfigured rows.

Local validation after the merge:

  • scripts/run_tests.sh tests/hermes_cli/test_inventory.py tests/test_tui_gateway_server.py -k configured_only — 6 passed
  • npm run test:ui --workspace apps/desktop -- src/lib/model-options-query.test.ts — 2 passed

I also ran the broader targeted Python files (tests/hermes_cli/test_inventory.py and tests/test_tui_gateway_server.py): inventory passed 39/39; the TUI gateway file had the existing unrelated test_browser_manage_connect_default_local_reports_launch_hint browser-launch-hint failure that was already documented in the PR body.

GitHub now reports the PR as mergeable; waiting on repository checks/review state.

@SilentKnight87
SilentKnight87 force-pushed the feat/model-picker-configured-only branch from d17608b to c732ef9 Compare July 8, 2026 13:06
@SilentKnight87 SilentKnight87 changed the title feat(picker): show configured providers by default feat(tui): ctrl+a toggle to hide unconfigured providers in the model picker Jul 8, 2026
@SilentKnight87

Copy link
Copy Markdown
Contributor Author

Rescoped following #60514. The original version of this PR (June 19) implemented configured-only filtering across the backend, desktop, and TUI; #60514 has since landed the backend params and desktop defaults in response to #56974, so this PR now carries only the remaining surface — a ^a toggle in the TUI picker, reusing the explicit_only param #60514 introduced. The TUI's full-universe default is unchanged. Diff is now 2 files, +91/−16.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for narrowing this to the remaining TUI surface. The current picker still unconditionally requests include_unconfigured: true at ui-tui/src/components/modelPicker.tsx:60-69, while the existing RPC already accepts explicit_only at tui_gateway/server.py:12902-12913.

Problems

  • The added tests at ui-tui/src/__tests__/modelPicker.test.ts:53-82 validate only modelOptionsRequestParams. They do not cover the new Ctrl+A path in the changed picker: refetching with explicit_only, restoring include_unconfigured, or resetting the filter and selection.

Suggested changes

  • Add one interaction-level picker test that sends Ctrl+A and asserts both toggle requests and the visible-state reset.

Automated hermes-sweeper review.

@teknium1 teknium1 added the sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users label Jul 14, 2026
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/desktop Electron desktop app (apps/desktop/*) comp/gateway Gateway runner, session dispatch, delivery comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants