Skip to content

feat(cli): show recent models in the model selector - #259

Open
xuxujo97-coder wants to merge 1 commit into
mainfrom
feat/recent-models-gh
Open

xuxujo97-coder wants to merge 1 commit into
mainfrom
feat/recent-models-gh

Conversation

@xuxujo97-coder

@xuxujo97-coder xuxujo97-coder commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Switching back to a recently used model requires searching or navigating the full model list each time.

Changes

  • Show up to ten available recent models above the existing list, without duplicate rows. Respect the active model scope and hide section headings during search.
  • Record successful interactive selections, exact /model selections, and model cycling. Repeated selections move the provider/model pair to the front.
  • Keep persistence in the coding-agent settings manager and merge concurrent writes under the existing storage lock. The CLI only records selections and renders history references; packages/tui is unchanged.
  • Add six selector regression tests, five persistence tests, and behavior documentation. OpenCode v1.2.0 was used as a behavior reference, not copied.

Behavior and compatibility

The optional global recentModels setting stores only provider/id pairs. Missing or malformed history is ignored, project overrides do not replace global history, and unavailable references are hidden without deleting them. Existing configurations need no migration.

Startup defaults, thinking settings, model cycling order, fuzzy search ranking, and default-model shortcuts remain unchanged. Startup, restoration, cancellation, and failed selections do not record history. External active-model configuration remains separate from wrapped global history.

Validation

  • npm run check: passed, including formatting, TypeScript, dependency direction, UI boundaries, and public-boundary checks; no additional formatter changes.
  • TMPDIR=/tmp ./test.sh: passed across the repository on macOS. Coding-agent: 330 files and 4,760 tests passed; CLI: 90 files and 699 tests passed. Existing credential-dependent and unavailable-PowerShell cases remained skipped.
  • The initial ./test.sh run hit the macOS Unix socket path-length limit in a subprocess test. Re-running with a short temporary directory passed without changing or skipping the test.
  • Focused CLI validation: six files and 63 tests passed, including selector regressions, package command paths, and TUI acceptance snapshots.
  • git diff --check: passed. The branch contains one feature commit and only six intended files, based on public main.

Limitations

Real-terminal manual interaction and standalone-binary behavior have not been verified for this change. CI and the required non-author maintainer review are pending.

This pull request description was generated with AI assistance.

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.

1 participant