feat(cli): open permission selector from /yolo and /auto - #3515
Conversation
|
commit: |
There was a problem hiding this comment.
💡 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".
| name: 'yolo', | ||
| aliases: ['yes'], |
There was a problem hiding this comment.
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 👍 / 👎.
| case 'yolo': | ||
| showPermissionPicker(host, 'yolo'); | ||
| return; | ||
| case 'never-ask': | ||
| await handleAutoCommand(host, args); | ||
| case 'auto': | ||
| showPermissionPicker(host, 'auto'); |
There was a problem hiding this comment.
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
f7a7756 to
249f01c
Compare
Related Issue
No linked issue — internal feature request.
Problem
/yoloand/auto(formerly/ask-when-neededand/never-ask) switched the permission mode immediately: one command flipped the mode without showing the trade-offs of the three modes, and theiron/offarguments duplicated what the/permissionselector 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
/yoloand/auto(/yesis kept as an alias of/yolo), and theiron/offarguments are removed./permissionmode 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,ChoicePickerComponentgains aninitialValueoption that controls only the initial cursor position.PERMISSION_MODE_DESCRIPTIONS) is shown as the yellow status line, replacing the identical generic unconfirmed-changes warning; the oldUNCONFIRMED_FILE_CHANGES_WARNINGconstant is removed.Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.