diff --git a/.changeset/trust-prompt-default-trust.md b/.changeset/trust-prompt-default-trust.md new file mode 100644 index 00000000000..5931ba5f9df --- /dev/null +++ b/.changeset/trust-prompt-default-trust.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Default the workspace trust prompt selection to "Trust this folder" instead of "Don't trust". diff --git a/apps/kimi-code/src/tui/components/dialogs/trust-prompt.ts b/apps/kimi-code/src/tui/components/dialogs/trust-prompt.ts index 811ad888e63..a42256a8998 100644 --- a/apps/kimi-code/src/tui/components/dialogs/trust-prompt.ts +++ b/apps/kimi-code/src/tui/components/dialogs/trust-prompt.ts @@ -43,7 +43,7 @@ const OPTIONS: readonly TrustPromptOption[] = [ export class TrustPromptComponent implements Component, Focusable { focused = false; - private selectedIndex = 1; + private selectedIndex = 0; constructor(private readonly opts: TrustPromptOptions) {} diff --git a/apps/kimi-code/test/tui/components/dialogs/trust-prompt.test.ts b/apps/kimi-code/test/tui/components/dialogs/trust-prompt.test.ts index 4fe7d5361dd..a1627893d5b 100644 --- a/apps/kimi-code/test/tui/components/dialogs/trust-prompt.test.ts +++ b/apps/kimi-code/test/tui/components/dialogs/trust-prompt.test.ts @@ -55,7 +55,7 @@ describe('TrustPromptComponent', () => { expect(text).not.toContain('\u001B]8;;https://evil.test'); }); - it("defaults to Don't trust", () => { + it('defaults to Trust this folder', () => { const onSelect = vi.fn(); const prompt = new TrustPromptComponent({ workDir: '/tmp/demo-workspace', @@ -63,10 +63,10 @@ describe('TrustPromptComponent', () => { onSelect, }); prompt.handleInput('\r'); - expect(onSelect).toHaveBeenCalledWith('distrust'); + expect(onSelect).toHaveBeenCalledWith('trust'); }); - it('selects trust only after moving to it explicitly', () => { + it('stays on trust when moving up past the top', () => { const onSelect = vi.fn(); const prompt = new TrustPromptComponent({ workDir: '/tmp/demo-workspace', diff --git a/docs/en/customization/mcp.md b/docs/en/customization/mcp.md index 019576d976e..cf7dd9c4c1c 100644 --- a/docs/en/customization/mcp.md +++ b/docs/en/customization/mcp.md @@ -23,7 +23,7 @@ Run `/mcp-config` in the TUI to interactively add, edit, or delete servers witho Deleting a server from the configuration does not interrupt open sessions: the server stays listed in `/mcp` as `removed`, its tools remain visible there, and calls to them fail with a removal notice, while new sessions do not register the tools at all. Conversely, a server added mid-session — by editing `mcp.json` or installing a plugin — is not registered in already-open sessions; it only joins sessions created later. -When Kimi Code finds project-level MCP servers in an untrusted folder, it shows each server's transport and launch target in the workspace trust prompt. The prompt defaults to `Don't trust`; move to `Trust this folder` and confirm only after reviewing the listed command and arguments or remote URL. Trusting the folder enables the project-level MCP servers for that workspace. +When Kimi Code finds project-level MCP servers in an untrusted folder, it shows each server's transport and launch target in the workspace trust prompt. The prompt defaults to `Trust this folder`; review the listed command and arguments or remote URL before confirming. Trusting the folder enables the project-level MCP servers for that workspace. Structure of `mcp.json`: diff --git a/docs/zh/customization/mcp.md b/docs/zh/customization/mcp.md index 0bd78a2bfc3..7ff61b2dcd9 100644 --- a/docs/zh/customization/mcp.md +++ b/docs/zh/customization/mcp.md @@ -23,7 +23,7 @@ MCP server 配置写在 `mcp.json` 中,分两层: 从配置中删除某个 server 不会打断进行中的会话:该 server 在 `/mcp` 中仍显示为 `removed`,其工具在这些会话中保持可见,但调用会失败并返回移除提示;新会话则完全不会注册这些工具。反过来,会话进行中新增的 server——无论是编辑 `mcp.json` 还是安装 plugin——都不会注册到已打开的会话中,只会加入之后创建的会话。 -当 Kimi Code 在不受信任的文件夹中发现项目级 MCP server 时,工作区信任提示会显示每个 server 的传输方式和启动目标。提示默认选中 `Don't trust`;请先移动到 `Trust this folder`,核对列出的命令与参数或远程 URL 后,再确认信任。信任文件夹后,该工作区的项目级 MCP server 才会启用。 +当 Kimi Code 在不受信任的文件夹中发现项目级 MCP server 时,工作区信任提示会显示每个 server 的传输方式和启动目标。提示默认选中 `Trust this folder`;请先核对列出的命令与参数或远程 URL,再确认信任。信任文件夹后,该工作区的项目级 MCP server 才会启用。 `mcp.json` 的结构: