Repository navigation
fix(cli): save model selection as default on Enter - #285
Merged
liuedcson merged 1 commit intoOct 23, 2026
Merged
Conversation
li-xiu-qi
requested review from
MelodyVAR,
Uking-xxx,
ZouR-Ma and
liuedcson
as code owners
October 21, 2026 12:39
The /model picker had two save paths: Enter switched the model for the current session only, while Ctrl+S additionally persisted it as the startup default. The session model and the startup default therefore drifted apart silently whenever Enter was used, and the only way to re-align them was to discover the Ctrl+S chord. Peer tools confirm-and-save on a single Enter. Enter now selects and saves as default, and the Ctrl+S branch is removed from the picker. Exact `/model <provider/id>` matches persist as well, so every selection path shares one rule: picking a model saves it. The picker hint, status messages, tests, and docs follow. * fix(cli): Enter in the model picker saves the selection as default * fix(cli): drop the Ctrl+S save-as-default branch from the picker * fix(cli): persist exact /model matches and report them as defaults * test(cli): cover the new picker hint and drop the Ctrl+S case * docs: describe Enter as the save path in the model docs
li-xiu-qi
force-pushed
the
fix/model-picker-enter-saves-default
branch
from
October 21, 2026 13:09
6ae32c6 to
f42e1de
Compare
liuedcson
approved these changes
Oct 23, 2026
liuedcson
added a commit
that referenced
this pull request
Oct 23, 2026
Brings the seven commits main gained since dff413f: - feat(coding-agent): make a feedback report investigable (#297) - fix(coding-agent): settle extension command turns before returning (#298) - fix(coding-agent): keep the tool block stable across plan mode (#296) - fix(cli): save model selection as default on Enter (#285) - feat(cli): add -C/--cwd flag (#289) - fix(coding-agent): preserve task-state prompt cache prefixes (#293) Two conflicts, both in the plan extension, where this branch had added behaviour on top of files main rewrote: - `plan-mode-tools.ts`: main's comment for `exitPlanMode` ("restore any tools plan mode added") with this branch's optional `submittedPlanHash` parameter, which records the proposal handed to an external reviewer. - `step-plan.ts`: main's `version: 2` entry and `carriesLegacyTools` migration path, plus this branch's `submittedPlanHash` / `planHashAtEnter` on the same entry, and both sides of the restore step (legacy tool baseline and the persisted hashes). Main's `resolveToCwd` guard and `planModeAddedTools` bookkeeping are kept as-is: plan mode now appends tools instead of replacing the list, which is what keeps the request's tool block stable. The host plan-mode test asserted the old refusal wording; the guard now says "Only the plan file may be written", so it matches on that.
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.
Fixes #281
Problem
The
/modelpicker had two save paths with different persistence: Enterswitched the model for the current session only, while Ctrl+S additionally
persisted it as the startup default. The session model and the startup
default therefore drifted apart silently whenever Enter was used, and the
only way to re-align them was to discover the Ctrl+S chord. Peer tools
(step-dev, Kimi Code, Claude Code) confirm-and-save on a single Enter.
Changes
startup default; the Ctrl+S branch is removed from the picker.
/model <provider/id>matches persist as well, so every selectionpath shares one rule: picking a model saves it.
cancel", and the post-selection status message reports
"Default model: provider/id".
pins the picker hint. Five constructor calls drop the removed parameter.
as the save path; the
/thinkingpicker and session-sort Ctrl+S areuntouched.
Behavior and compatibility
Enter behavior. Selections made with Enter are now saved as the startup
default; a session-only switch requires
--modelon the command line(which never persisted) or editing
defaultModelin settings.recordRecentModelbehavior is unchanged: every successful selectionstill records the provider/id pair.
Validation
vitest --run test/model-selector.test.ts: 8 passed(7 existing + 1 new hint case).
5 passed.
npm run check(biome, 16 repo checks, tsgo, browsersmoke): passed locally on Windows, including via the husky pre-commit
hook.
Limitations