Skip to content

feat(cli): open permission selector from /yolo and /auto - #3515

Merged
sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:feat-141-09-02-yolo-auto-permission-entry
Sep 4, 2026
Merged

feat(cli): open permission selector from /yolo and /auto#3515
sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:feat-141-09-02-yolo-auto-permission-entry

Conversation

@sailist

@sailist sailist commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — internal feature request.

Problem

/yolo and /auto (formerly /ask-when-needed and /never-ask) switched the permission mode immediately: one command flipped the mode without showing the trade-offs of the three modes, and their on/off arguments duplicated what the /permission selector already does. After a switch, both permissive modes printed the same generic warning line, so the confirmation gave no hint about which mode had actually been enabled.

What changed

  • The two commands are renamed to /yolo and /auto (/yes is kept as an alias of /yolo), and their on/off arguments are removed.
  • Running either command now opens the /permission mode list with the corresponding mode preselected; pressing Enter applies it through the same path as /permission. To support preselection without faking the current-mode ✓ marker, ChoicePickerComponent gains an initialValue option that controls only the initial cursor position.
  • After a mode switch, the mode-specific description (shared with the selector via PERMISSION_MODE_DESCRIPTIONS) is shown as the yellow status line, replacing the identical generic unconfirmed-changes warning; the old UNCONFIRMED_FILE_CHANGES_WARNING constant is removed.
  • Docs (en/zh) updated for the renamed commands and the new interaction.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve).
  • 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.

@changeset-bot

changeset-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 249f01c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Sep 3, 2026

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

commit: 249f01c

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

ℹ️ 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 on lines +149 to +150
name: 'yolo',
aliases: ['yes'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the former permission-command aliases

After upgrading, users who enter the previously documented /ask-when-needed or /never-ask commands no longer match a built-in command; resolveSlashCommandInput consequently classifies the input as a normal message and sends it to the agent instead of changing permissions. Retain these names as aliases unless this is released as an explicitly approved major breaking change.

AGENTS.md reference: AGENTS.md:L62-L62

Useful? React with 👍 / 👎.

Comment on lines +564 to +568
case 'yolo':
showPermissionPicker(host, 'yolo');
return;
case 'never-ask':
await handleAutoCommand(host, args);
case 'auto':
showPermissionPicker(host, 'auto');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add a changeset for the new permission-command behavior

This changes shipped CLI behavior by replacing immediate permission toggles and their arguments with a selector, but the commit adds no changeset describing that user-visible interaction. The existing permission-mode-file-warning.md only covers the earlier warning change, so this behavior will be absent from the generated release notes and versioning metadata unless a dedicated @moonshot-ai/kimi-code changeset is added.

AGENTS.md reference: AGENTS.md:L85-L86

Useful? React with 👍 / 👎.

- rename the mode commands to /yolo and /auto (formerly
  /ask-when-needed and /never-ask) and drop their on/off arguments
- running either command now opens the permission mode list with the
  corresponding mode preselected; Enter confirms the switch
- decouple the choice picker's initial cursor from the current-value
  marker via a new initialValue option
- after a mode switch, show the mode-specific description as the yellow
  status line instead of the generic unconfirmed-changes warning
@sailist
sailist force-pushed the feat-141-09-02-yolo-auto-permission-entry branch from f7a7756 to 249f01c Compare September 4, 2026 09:11
@sailist
sailist merged commit ac01bc4 into MoonshotAI:main Sep 4, 2026
15 checks passed
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