Skip to content

Conversation

@catrielmuller
Copy link
Contributor

@catrielmuller catrielmuller commented Dec 1, 2025

Context

Resolve: #3743

Implementation

  • Added pagination (10 items per page) with navigation commands (next, prev, page)
  • Implemented sorting options (name, context, price, preferred)
  • Added filtering by capabilities (images, cache, reasoning, free)

Screenshots

image image image image image image

@catrielmuller catrielmuller requested a review from Copilot December 1, 2025 17:31
@changeset-bot
Copy link

changeset-bot bot commented Dec 1, 2025

🦋 Changeset detected

Latest commit: 78db59c

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 Patch

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds pagination, filtering, and sorting capabilities to the /model list command in the CLI, resolving issue #3743. The implementation introduces state management for model list operations and extends the command with new subcommands for navigation and filtering.

Key changes:

  • Added pagination (10 items per page) with navigation commands (next, prev, page)
  • Implemented sorting options (name, context, price, preferred)
  • Added filtering by capabilities (images, cache, reasoning, free)

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cli/vitest.config.ts Updated test file pattern to allow co-located tests (src/**/*.test.ts)
cli/src/state/atoms/modelList.ts New state management atoms for pagination, filters, and sort options
cli/src/state/atoms/index.ts Exported new model list atoms and types
cli/src/state/hooks/useCommandContext.ts Integrated model list state into command context
cli/src/commands/core/types.ts Added model list state properties to CommandContext interface
cli/src/commands/model.ts Implemented pagination, sorting, filtering logic and new list subcommands
cli/src/commands/__tests__/model.test.ts Added comprehensive test coverage for pagination, sorting, and filtering
cli/src/commands/__tests__/helpers/mockContext.ts Updated mock context with model list state defaults
.changeset/public-radios-pull.md Added changeset for the feature

Copy link
Contributor

@pandemicsyn pandemicsyn left a comment

Choose a reason for hiding this comment

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

one question inline, but preapproved because theres a good chance im wrong 😁

@RSO
Copy link
Contributor

RSO commented Dec 2, 2025

Out of curiosity: Why can we not use the scrollable autocomplete box underneath the CommandInput for this?

@catrielmuller
Copy link
Contributor Author

Out of curiosity: Why can we not use the scrollable autocomplete box underneath the CommandInput for this?

We use the autocomplete suggestions, to display the models on the selection and info, However you don't have a way there to search what model are free for example.

image

Copy link
Contributor

@pandemicsyn pandemicsyn left a comment

Choose a reason for hiding this comment

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

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve model ordering from the extension into the CLI

4 participants