Skip to content

feat(tui): persist default permission mode#278

Open
haosenwang1018 wants to merge 1 commit into
MoonshotAI:mainfrom
haosenwang1018:feat/permission-default-command
Open

feat(tui): persist default permission mode#278
haosenwang1018 wants to merge 1 commit into
MoonshotAI:mainfrom
haosenwang1018:feat/permission-default-command

Conversation

@haosenwang1018
Copy link
Copy Markdown

Related Issue

Fixes #258.

Problem

Kimi Code already supports default_permission_mode in config.toml, but the TUI only exposed session-scoped permission toggles. Users could turn on /yolo or pick a permission mode for the current session, then lose that preference when starting future sessions unless they edited config manually.

What changed

  • Added /permission [manual|auto|yolo] for direct current-session permission changes while keeping the existing picker when no args are passed.
  • Added /permission default <manual|auto|yolo> to persist defaultPermissionMode for new sessions and apply it to the active session so in-process /new uses the same mode.
  • Added a Default Permission entry to /settings.
  • Updated slash-command docs in English and Chinese.
  • Added tests for direct permission args, persistent default permission, and the settings picker option.

Verification

  • pnpm exec vitest run apps/kimi-code/test/tui/kimi-tui-message-flow.test.ts apps/kimi-code/test/tui/components/dialogs/choice-picker.test.ts
  • pnpm --filter @moonshot-ai/kimi-code typecheck
  • pnpm -C docs build
  • pnpm run lint (0 errors; existing warnings only)
  • pnpm --filter @moonshot-ai/kimi-code test
  • pnpm changeset status --since origin/main
  • git diff --check

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 1, 2026

🦋 Changeset detected

Latest commit: de4cdee

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

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.

/yolo does not persist across sessions/is not possible to set persistant in settings

1 participant