Skip to content

feat(tui): add Alt+S to switch model for current session only#1020

Merged
liruifengv merged 2 commits into
mainfrom
change-model-for-session-only
Jun 23, 2026
Merged

feat(tui): add Alt+S to switch model for current session only#1020
liruifengv merged 2 commits into
mainfrom
change-model-for-session-only

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

N/A — no prior issue; see Problem below.

Problem

Switching the model with /model always persists the choice as the default in the config file, so there is no way to use a different model for just the current session without also changing the default that future sessions will pick up.

What changed

Added an Alt+S shortcut in the /model picker that applies the selected model to the current session only, without writing to the config file. Enter keeps the existing behavior (switch and persist as default). The picker hint now shows Alt+S session-only, and the confirmation status notes when a switch applies to the current session only.

This reuses the existing runtime model-switch path and simply skips the persistence step, so no core changes are needed.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

In the /model picker, Enter still switches the model and saves it as the
default; Alt+S now switches only for the current session without writing
to the config file.
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 065603f

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

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code 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

@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@065603f
npx https://pkg.pr.new/@moonshot-ai/kimi-code@065603f

commit: 065603f

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c40232535

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/commands/config.ts
@liruifengv liruifengv merged commit 9c553e4 into main Jun 23, 2026
8 checks passed
@liruifengv liruifengv deleted the change-model-for-session-only branch June 23, 2026 09:14
@github-actions github-actions Bot mentioned this pull request Jun 23, 2026
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