Skip to content

fix(tui): support exit shortcuts in startup session picker - #473

Merged
liruifengv merged 3 commits into
MoonshotAI:mainfrom
MicroGery:fix/session-picker-exit-shortcuts
Jun 8, 2026
Merged

fix(tui): support exit shortcuts in startup session picker#473
liruifengv merged 3 commits into
MoonshotAI:mainfrom
MicroGery:fix/session-picker-exit-shortcuts

Conversation

@MicroGery

@MicroGery MicroGery commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Related Issue

Resolve #535

Problem

Running kimi -r without a session id opens the startup session picker. When the current directory has no sessions, the picker can only be dismissed with Escape, while the normal Kimi Code TUI supports exiting with repeated Ctrl-C or repeated Ctrl-D. This makes the startup picker inconsistent with the rest of the TUI.

What changed

Added optional Ctrl-C and Ctrl-D handlers to the session picker component, then wired them only for the startup kimi -r picker path. In that startup flow, the picker now reuses the existing editor exit-confirmation behavior, so the first Ctrl-C or Ctrl-D shows the standard “press again to exit” hint and the second exits Kimi Code.

The regular in-session session picker behavior is unchanged.

Added a focused component test covering Ctrl-C and Ctrl-D forwarding from the session picker.

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.

Verification

  • pnpm --filter @moonshot-ai/kimi-code exec vitest run test/tui/components/dialogs/session-picker.test.ts
  • pnpm --filter @moonshot-ai/kimi-code run typecheck

@changeset-bot

changeset-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3082a93

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

@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: dafe866ca6

ℹ️ 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/kimi-tui.ts
@pkg-pr-new

pkg-pr-new Bot commented Jun 8, 2026

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

commit: 3082a93

@liruifengv liruifengv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@liruifengv
liruifengv merged commit 3787c30 into MoonshotAI:main Jun 8, 2026
8 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 8, 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.

kimi -r startup session picker does not support repeated Ctrl-C/Ctrl-D exit

2 participants