Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/en/guides/interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ When the agent calls a tool that has side effects — modifying files, running c

Approvals are not triggered for regular tool calls in Ask When Needed mode, nor for writes to plan files in Plan mode.

### Ask When Needed / Never Ask mode
### The three permission modes

**Ask When Needed mode** (`/ask-when-needed`) auto-approves regular tool calls, making it suitable for batch tasks you know are safe. It still asks before sensitive actions — accessing sensitive files such as `.env` or SSH keys, running dangerous commands such as `shutdown` or `rm -rf`, or exiting Plan mode — and the agent can still ask you questions.
**Always Ask mode** (formerly Manual) is the default: read-only operations run automatically, while every other action — editing files, running commands — asks for your confirmation one by one. Use it when you want full control over every change.

**Never Ask mode** (`/never-ask`) is the fully unattended mode: every tool approval is handled automatically, including sensitive files and plan exits, and the agent never asks you questions — it decides everything on its own. The only exception is the built-in dangerous-command guard: commands such as `shutdown`, `reboot`, or `rm -rf` are always blocked in Never Ask mode, and always require your confirmation in Always Ask and Ask When Needed mode.
**Ask When Needed mode** (formerly YOLO), toggled with `/ask-when-needed`, auto-approves regular tool calls, making it suitable for batch tasks you know are safe. It still asks before sensitive actions — accessing sensitive files such as `.env` or SSH keys, running dangerous commands such as `shutdown` or `rm -rf`, or exiting Plan mode — and the agent can still ask you questions.

**Never Ask mode** (formerly Auto), toggled with `/never-ask`, is the fully unattended mode: every tool approval is handled automatically, including sensitive files and plan exits, and the agent never asks you questions — it decides everything on its own. The only exception is the built-in dangerous-command guard: commands such as `shutdown`, `reboot`, or `rm -rf` are always blocked in Never Ask mode, and always require your confirmation in Always Ask and Ask When Needed mode.


## Mode switching
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/configuration/config-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ timeout = 5
| 字段 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| `default_model` | `string` | — | 默认模型别名,必须在 `models` 中定义 |
| `default_permission_mode` | `string` | `manual` | 新会话的默认权限模式,可选 `manual`(始终询问:仅自动读取,其余操作逐一向你确认)、`yolo`(必要时询问:自动完成常规修改和命令;高危操作、提问和计划仍会问你)、`auto`(完全自动:完全不打断,所有操作和判断自动完成,但危险命令仍会被拒绝) |
| `default_permission_mode` | `string` | `manual` | 新会话的默认权限模式,可选 `manual`("Always Ask":仅自动读取,其余操作逐一向你确认)、`yolo`("Ask When Needed":自动完成常规修改和命令;高危操作、提问和计划仍会问你)、`auto`("Never Ask":完全不打断,所有操作和判断自动完成,但危险命令仍会被拒绝) |

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 Restore the prescribed Chinese permission-mode names

In the Chinese locale, this replacement removes the established localized names and leaves raw English labels throughout the configuration, guide, customization, and reference pages. The repository terminology table explicitly maps these modes to 始终询问, 必要时询问, and 完全自动; retain those Chinese terms, optionally annotating the English UI labels on first use as the new interaction callout does, so Chinese readers see consistent terminology.

AGENTS.md reference: docs/AGENTS.md:L65-L76

Useful? React with 👍 / 👎.

| `default_plan_mode` | `boolean` | `false` | 新会话是否默认以 Plan 模式(先出计划再执行)启动 |
| `merge_all_available_skills` | `boolean` | `true` | 是否合并所有目录中的 Agent Skills |
| `extra_skill_dirs` | `array<string>` | — | 额外 Skill 搜索目录,叠加到默认目录之上 |
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/configuration/overrides.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Kimi Code CLI 有三个地方可以影响运行参数:配置文件、命令行
| --- | --- |
| `-S, --session [id]` | 恢复指定会话;不带 id 时进入交互式选择 |
| `-c, --continue` | 续上当前目录的上一次会话 |
| `-y, --yolo` | 「必要时询问」模式:常规修改和命令自动完成,Agent 仍可能提问 |
| `--auto` | 「完全自动」模式:完全不打断,Agent 不会向用户提问 |
| `-y, --yolo` | "Ask When Needed" 模式:常规修改和命令自动完成,Agent 仍可能提问 |
| `--auto` | "Never Ask" 模式:完全不打断,Agent 不会向用户提问 |
| `--plan` | 以 Plan 模式启动 |
| `-m, --model <model>` | 指定本次使用的模型别名 |
| `-p, --prompt <prompt>` | 非交互模式:执行单条提示词后退出 |
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/customization/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Kimi Code CLI 内置三种 subagent,开箱即用,分别面向不同任务形

subagent 由 main agent 自动调度——根据任务复杂度、上下文消耗和子任务的独立性,在适当时机派发,无需用户手动指定。

每次派发都会在终端以审批请求的形式呈现(除非命中 allow 规则或处于「必要时询问」模式),方便你审视任务描述。你也可以在对话中直接指示 main agent 使用特定 subagent,例如"先用 explore 把相关文件梳理一遍再动手"。
每次派发都会在终端以审批请求的形式呈现(除非命中 allow 规则或处于 "Ask When Needed" 模式),方便你审视任务描述。你也可以在对话中直接指示 main agent 使用特定 subagent,例如"先用 explore 把相关文件梳理一遍再动手"。

subagent 支持在后台运行:完成后结果自动回到 main agent,无需手动轮询。也可以唤回已有的 subagent 实例继续推进同一任务。

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/customization/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pattern = "mcp__filesystem__write_file"
- 对高风险工具(写文件、执行命令等)维持手动审批,避免用 `mcp__*` 通配放行全部工具

::: warning 注意
「必要时询问」模式下,MCP 工具调用会被自动批准。仅在完全信任所接入的 MCP server 时使用此模式。
"Ask When Needed" 模式下,MCP 工具调用会被自动批准。仅在完全信任所接入的 MCP server 时使用此模式。
:::

## 下一步
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/customization/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Kimi Code CLI 可以使用内置配色,也可以使用自定义 JSON 主题文
| `border` | `#5A5A5A` | `#737373` | 面板与编辑器的普通边框、Markdown 分隔线 |
| `borderFocus` | `#E8A838` | `#92660A` | 聚焦/注意边框,目前仅审批面板使用 |
| `success` | `#4EC87E` | `#0E7A38` | 成功态。`✓`、已启用、完成 |
| `warning` | `#E8A838` | `#92660A` | 警告态。「必要时询问」/「完全自动」徽章、过期标记、Plan 模式提示 |
| `warning` | `#E8A838` | `#92660A` | 警告态。"Ask When Needed" / "Never Ask" 徽章、过期标记、Plan 模式提示 |
| `error` | `#E85454` | `#B91C1C` | 错误态。错误信息、失败的工具输出 |
| `diffAdded` | `#4EC87E` | `#0E7A38` | diff 新增行 |
| `diffRemoved` | `#E85454` | `#B91C1C` | diff 删除行 |
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,6 @@ npm uninstall -g @moonshot-ai/kimi-code

## 下一步

- [交互与输入](./interaction.md) — 输入框操作、审批流程、Plan 模式和必要时询问模式详解
- [交互与输入](./interaction.md) — 输入框操作、审批流程、Plan 模式和 "Ask When Needed" 模式详解
- [会话与上下文](./sessions.md) — 恢复会话、上下文压缩、导出会话
- [常见使用案例](./use-cases.md) — 典型任务的 prompt 示例
14 changes: 8 additions & 6 deletions docs/zh/guides/interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Kimi Code CLI 支持在输入框中直接粘贴图片和视频,让 AI 结合
| `/undo` | 撤销最近的提示词 |
| `/model` | 切换当前会话使用的模型 |
| `/plan` | 切换 Plan 模式(先出计划再动手) |
| `/ask-when-needed` | 切换「必要时询问」模式(常规修改和命令自动完成) |
| `/ask-when-needed` | 切换 "Ask When Needed" 模式(常规修改和命令自动完成) |
| `/goal` | 开始或管理目标模式 |
| `/help` | 查看全部命令 |

Expand All @@ -58,13 +58,15 @@ Agent 调用会产生副作用的工具(修改文件、执行命令等)时
- **会话内放行**:选「Approve for this session」,本次会话内同类调用不再询问
- **永久规则**:在[配置文件](../configuration/config-files.md#permission)预置 allow / deny 规则

「必要时询问」模式下的普通工具调用、Plan 模式下对计划文件的写入,不触发审批。
"Ask When Needed" 模式下的普通工具调用、Plan 模式下对计划文件的写入,不触发审批。

### 必要时询问 / 完全自动 模式
### 三种权限模式

**必要时询问**(`/ask-when-needed`)自动批准普通工具调用,适合已知安全的批处理任务。敏感操作仍会询问——例如访问 `.env`、SSH 私钥等敏感文件、执行 `shutdown`、`rm -rf` 这类危险命令,或退出 Plan 模式——Agent 也仍可能向你提问
**"Always Ask"**(始终询问,原 Manual)是默认模式:只读操作自动放行,修改文件、执行命令等其余操作都会逐一向你确认,适合需要全程掌控每个改动的场景

**完全自动**(`/never-ask`)是完全无人值守模式:所有工具审批自动处理,包括敏感文件和计划退出,且 Agent 不会向你提问,完全由它自己做决定。唯一的例外是内置的危险命令拦截:`shutdown`、`reboot`、`rm -rf` 这类命令在完全自动模式下会被直接拒绝,在始终询问和必要时询问模式下必须经你确认。
**"Ask When Needed"**(必要时询问,原 YOLO)用 `/ask-when-needed` 切换,自动批准普通工具调用,适合已知安全的批处理任务。敏感操作仍会询问——例如访问 `.env`、SSH 私钥等敏感文件、执行 `shutdown`、`rm -rf` 这类危险命令,或退出 Plan 模式——Agent 也仍可能向你提问。

**"Never Ask"**(完全自动,原 Auto)用 `/never-ask` 切换,是完全无人值守模式:所有工具审批自动处理,包括敏感文件和计划退出,且 Agent 不会向你提问,完全由它自己做决定。唯一的例外是内置的危险命令拦截:`shutdown`、`reboot`、`rm -rf` 这类命令在 "Never Ask" 模式下会被直接拒绝,在 "Always Ask" 和 "Ask When Needed" 模式下必须经你确认。


## 模式切换
Expand All @@ -76,7 +78,7 @@ Plan 模式下,Agent 先输出行动计划,等待你确认后才动手修改
- 切换:`Shift-Tab` 或 `/plan`
- 清除当前计划:`/plan clear`(仅空闲时)

Agent 输出方案后会等待你审批——可批准执行、拒绝、或要求修改。退出 Plan 模式需要你确认,即使开启了必要时询问模式也不例外。完全自动模式例外:计划退出会自动批准,并在记录中标记为 "Auto-approved"。
Agent 输出方案后会等待你审批——可批准执行、拒绝、或要求修改。退出 Plan 模式需要你确认,即使开启了 "Ask When Needed" 模式也不例外。"Never Ask" 模式例外:计划退出会自动批准,并在记录中标记为 "Auto-approved"。

### Shell 模式

Expand Down
6 changes: 3 additions & 3 deletions docs/zh/reference/kimi-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ kimi <subcommand> [options]
| `--model <model>` | `-m` | 为本次启动指定模型别名。省略时新会话使用配置文件中的 `default_model` |
| `--prompt <prompt>` | `-p` | 非交互执行单次 prompt,并把 Assistant 输出流式写到 stdout。该模式不会打开 TUI |
| `--output-format <format>` | | 设置非交互输出格式,支持 `text` 与 `stream-json`。仅可与 `--prompt` 一起使用,默认 `text` |
| `--yolo` | `-y` | 以「必要时询问」模式启动:常规修改和命令自动完成;高危操作、提问和计划仍会问你 |
| `--auto` | | 以「完全自动」模式启动:完全不打断,所有操作和判断自动完成 |
| `--yolo` | `-y` | 以 "Ask When Needed" 模式启动:常规修改和命令自动完成;高危操作、提问和计划仍会问你 |
| `--auto` | | 以 "Never Ask" 模式启动:完全不打断,所有操作和判断自动完成 |
| `--plan` | | 以 Plan 模式启动新会话,AI 会优先使用只读工具进行探索和规划 |
| `--skills-dir <dir>` | | 从指定目录加载 Skills,替换自动发现的用户和项目目录。可重复传入 |
| `--agent <name>` | | 以指定 Agent 作为 main agent 启动新会话。不能与 `--session`/`--continue` 同时使用 |
Expand All @@ -43,7 +43,7 @@ kimi <subcommand> [options]
- `--prompt` 不能与 `--yolo`、`--auto` 或 `--plan` 同时使用——非交互模式固定使用 `auto` 权限
- `--output-format` 只能与 `--prompt` 一起使用

恢复会话时,可以通过 `--auto`、`--yolo` 或 `--plan` 覆盖原会话保存的权限或计划模式。例如,`kimi --continue --auto` 会恢复最近会话并切换到「完全自动」模式。
恢复会话时,可以通过 `--auto`、`--yolo` 或 `--plan` 覆盖原会话保存的权限或计划模式。例如,`kimi --continue --auto` 会恢复最近会话并切换到 "Never Ask" 模式。

## 典型用法

Expand Down
6 changes: 3 additions & 3 deletions docs/zh/reference/slash-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@

| 命令 | 别名 | 说明 | 随时可用 |
| --- | --- | --- | --- |
| `/ask-when-needed [on\|off]` | `/yolo`、`/yes` | 切换「必要时询问」模式。不带参数时翻转;显式传 `on`/`off` 时强制设置。开启后常规修改和命令自动完成;高危操作、提问和计划仍会问你 | 是 |
| `/never-ask [on\|off]` | `/auto` | 切换「完全自动」模式。开启后完全不打断,所有操作和判断自动完成 | 是 |
| `/ask-when-needed [on\|off]` | `/yolo`、`/yes` | 切换 "Ask When Needed" 模式。不带参数时翻转;显式传 `on`/`off` 时强制设置。开启后常规修改和命令自动完成;高危操作、提问和计划仍会问你 | 是 |
| `/never-ask [on\|off]` | `/auto` | 切换 "Never Ask" 模式。开启后完全不打断,所有操作和判断自动完成 | 是 |
| `/plan [on\|off]` | — | 切换 Plan 模式。不带参数时翻转;显式传 `on`/`off` 时强制设置。单纯切换不会创建空计划文件 | 是 |
| `/plan clear` | — | 清除当前 plan 方案 | 否 |
| `/swarm on\|off` | — | 开启或关闭 swarm mode,但不发送提示词。 | 是 |
| `/swarm <task>` | — | 先开启 swarm mode,再把 `<task>` 作为普通提示词发送。如果该轮次正常完成,swarm mode 会自动关闭。若当前是 `manual` 权限模式,启动前会提示是否切换到「必要时询问」或「完全自动」模式。 | 否 |
| `/swarm <task>` | — | 先开启 swarm mode,再把 `<task>` 作为普通提示词发送。如果该轮次正常完成,swarm mode 会自动关闭。若当前是 `manual` 权限模式,启动前会提示是否切换到 "Ask When Needed" 或 "Never Ask" 模式。 | 否 |
| `/goal [...]` | — | 开始或管理目标模式 | 见下文 |

::: warning 注意
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/reference/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

内置工具是 Kimi Code CLI 随核心引擎提供的工具集,无需安装 MCP server 即可使用。Agent 在每次对话中会根据任务需要自动选择并调用这些工具;用户可以通过权限审批界面查看每次工具调用的细节。

与 MCP 工具相比,内置工具由运行时直接管理,生命周期与会话绑定,无需外部进程。两者都遵循统一的审批机制:**只读类工具**(如 `Read`、`Grep`、`Glob`)默认自动放行,**写入与执行类工具**(如 `Write`、`Edit`、`Bash`)默认需要用户审批。「必要时询问」模式下普通工具调用的审批会被跳过,但 Plan 模式下的退出审批不受影响。
与 MCP 工具相比,内置工具由运行时直接管理,生命周期与会话绑定,无需外部进程。两者都遵循统一的审批机制:**只读类工具**(如 `Read`、`Grep`、`Glob`)默认自动放行,**写入与执行类工具**(如 `Write`、`Edit`、`Bash`)默认需要用户审批。"Ask When Needed" 模式下普通工具调用的审批会被跳过,但 Plan 模式下的退出审批不受影响。

## 文件类

Expand Down
Loading