Skip to content

Conversation

@Githubguy132010
Copy link
Contributor

@Githubguy132010 Githubguy132010 commented Jan 9, 2026

Context

Replaces /model list and /model select with an interactive, searchable, paginated model catalog interface in the CLI so users can discover and pick models more easily across providers. This is intended to make the /model workflow faster and more discoverable while keeping backwards-compatible behavior (with deprecation warnings for the old commands).

Implementation

High level

  • Adds a Model Catalog UI mode for the CLI that shows models from all providers grouped by provider, with realtime search, pagination, sorting, and capability/provider filters.
  • Keeps the existing /model command entrypoint but opens the new interactive catalog; /model list and /model select will show deprecation warnings directing users to the new catalog.
  • Keyboard-first UX with common keys for discoverability (see How to Test).

Files added

  • cli/src/types/modelCatalog.ts — Type definitions for catalog entries and UI state
  • cli/src/state/atoms/modelSelection.ts — Recoil/state atoms for catalog mode and selections
  • cli/src/ui/components/ModelCatalogMenu.tsx — The interactive model catalog component

Files modified

  • cli/src/constants/providers/models.ts — helper functions and model metadata grouping
  • cli/src/state/atoms/ui.ts — added modelCatalog to InputMode enum/state
  • cli/src/state/atoms/keyboard.ts — keyboard handler additions to support catalog navigation
  • cli/src/state/hooks/useCommandContext.ts — added openModelCatalog to programmatically open the catalog
  • cli/src/commands/core/types.ts — added openModelCatalog to command context types
  • cli/src/ui/UI.tsx — integrated the catalog menu into the main CLI UI
  • cli/src/commands/model.ts — updated handler to open the catalog and emit deprecation warnings for old commands

Feature list

  • Shows all models from all providers, grouped by provider
  • Realtime search filtering as the user types
  • Pagination — 10 models per page
  • Sort options (preferred / name / context / price) — toggle with s
  • Capability filters (images / cache / reasoning / free) — toggle with f
  • Provider filter — cycle with p
  • Current model marked with a ⭐
  • Keyboard navigation:
    • Arrow Up / Down — move selection
    • Left / Right — change pages
    • Enter — select model
    • Esc — exit catalog
    • s — sort options
    • f — capability filters
    • p — provider filter
  • Deprecation warnings for /model list and /model select that point users to the new interactive catalog

Notes and tradeoffs

  • This PR focuses on the CLI UX and the catalog data surface. It intentionally defers adding automated E2E tests for the interactive UI; manual test steps are included below. We can follow up with automated UI tests if desired.
  • Performance: catalog queries and model lists are in-memory from the provider metadata; if we later support remote model discovery, we should introduce incremental loading.
  • Accessibility: the component is keyboard-first; please review focus behavior and screen-reader labels.

Screenshots

before after
(previous /model list output) (interactive model catalog inside the CLI — searchable, paginated, grouped by provider)

(If you want, I can attach animated GIFs or terminal recording showing search, pagination and selection.)

How to Test

  1. Run the CLI locally (from the repo root):
    • Build/start whatever local dev flow you usually use for the cli package (e.g. run the CLI in dev mode or your local binary that executes the CLI UI).
  2. Open the CLI and trigger the model command:
    • Run the /model command in the CLI.
    • Expect: the interactive model catalog opens (not the old flat list).
  3. Verify basic interactions:
    • Type a search query — the list should filter in realtime.
    • Use Arrow Up/Down — selection moves between entries.
    • Use Left/Right — pages change (10 models per page).
    • Press Enter on a model — it should select that model (same effect as prior selection flow).
    • Press Esc — the catalog should exit.
  4. Verify filters and sort:
    • Press s to cycle sort options (preferred / name / context / price) and observe that results reorder.
    • Press f to toggle capability filters; check images/cache/reasoning/free flags filter results.
    • Press p to cycle provider filter and confirm provider grouping filters to the selected provider.
  5. Verify deprecation messages:
    • Run /model list and /model select — confirm a clear deprecation warning is printed that points to the new /model interactive catalog.
  6. Edge cases:
    • Search for an unknown string — confirm empty state is displayed with an affordance to clear search.
    • Verify that the current model (if set) is marked with a ⭐ in the listing.
    • Verify behavior when models have missing metadata (should not crash).

If you want exact dev-run commands added to the README or the PR body (e.g., the pnpm command to boot the CLI dev mode), tell me which runner you use and I’ll add precise steps.

Get in Touch

If you have questions or want a demo recording, ping me on GitHub @Githubguy132010 or leave comments on this PR and I’ll respond. I’m also available in the Kilo Discord server as thomas07374 if you prefer a quick walkthrough.

Replaces /model list and /model select with an interactive,
searchable, paginated model catalog interface.

Features:
- Shows all models from all providers, grouped by provider
- Realtime search filtering as user types
- Pagination (10 models per page)
- Sort options (preferred/name/context/price) - press s
- Capability filters (images/cache/reasoning/free) - press f
- Provider filter - press p to cycle through providers
- Current model marked with ⭐
- Keyboard navigation: ↑↓ navigate, ←→ pagination, Enter select, Esc exit
- Deprecation warnings for /model list and /model select

New files:
- cli/src/types/modelCatalog.ts - Type definitions
- cli/src/state/atoms/modelSelection.ts - State atoms for catalog mode
- cli/src/ui/components/ModelCatalogMenu.tsx - UI component

Modified:
- cli/src/constants/providers/models.ts - Added helper functions
- cli/src/state/atoms/ui.ts - Added modelCatalog to InputMode
- cli/src/state/atoms/keyboard.ts - Added keyboard handler
- cli/src/state/hooks/useCommandContext.ts - Added openModelCatalog
- cli/src/commands/core/types.ts - Added openModelCatalog to context
- cli/src/ui/UI.tsx - Integrated catalog menu
- cli/src/commands/model.ts - Updated handler with deprecation warnings
@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

🦋 Changeset detected

Latest commit: efc9bfb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kilocode/cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Githubguy132010 Githubguy132010 marked this pull request as ready for review January 11, 2026 13:08
@marius-kilocode marius-kilocode added the CLI Kilo Code CLI label Jan 12, 2026
Copy link

@Ari4ka Ari4ka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marius-kilocode
Copy link
Collaborator

marius-kilocode commented Jan 13, 2026

I like where this is going @Githubguy132010! I have a few suggestions to get it even better for Kilo users:

image -> In order to be consistent we want to show the same meta info in your new UI as in the standard `/model select `

Why the abbreviation ctx? Does context not fit?

@marius-kilocode
Copy link
Collaborator

I cannot search for models with letters s, f and p. Im not sure what would be the best way to solve this, but this would be a blocker.

@marius-kilocode
Copy link
Collaborator

image

I wonder if we can make the scrolling experience rather continuous. So that if users get to the bottom of the page automatically end up at the next model in the next way. But in such a way that my selected position does not jump here.

@Githubguy132010
Copy link
Contributor Author

@marius-kilocode Review comments should now be adressed. I'm going to add tests later in a seperate commit. I will also look at the continuous scrolling idea later.

@Githubguy132010
Copy link
Contributor Author

I cannot search for models with letters s, f and p. Im not sure what would be the best way to solve this, but this would be a blocker.

Fixed in commit a5d0fad

Copy link

@Ari4ka Ari4ka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@Githubguy132010
Copy link
Contributor Author

.

@Ari4ka Could you explain what '.' means?

…catalog

- Change navigation from page-based to item-based with a fixed visible window
- Update selection logic to wrap around the entire list
- Remove page atoms and keyboard handlers for left/right navigation
- Add total items and window start atoms for UI display
- Update tests and UI to reflect new scrolling behavior

BREAKING CHANGE: Model catalog navigation now uses continuous scrolling instead of pagination, changing user interaction from page navigation to item-by-item with wrap-around.
Remove unused modelCatalogPageAtom, modelCatalogPageCountAtom,
nextModelCatalogPageAtom, and prevModelCatalogPageAtom imports
as part of replacing pagination with continuous scrolling.
@Githubguy132010
Copy link
Contributor Author

image

I wonder if we can make the scrolling experience rather continuous. So that if users get to the bottom of the page automatically end up at the next model in the next way. But in such a way that my selected position does not jump here.

@marius-kilocode Implemented virtual scrolling, but it's a breaking change. I removed the pagination for this to work, so that should be taken into consideration.

@Githubguy132010
Copy link
Contributor Author

Will close this due to CLI 1.0 launching soon.

@Githubguy132010 Githubguy132010 deleted the feature/interactive-model-catalog branch January 30, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI Kilo Code CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants