From f3d18c0eb8d8c79cbb73bc51cd903e28f30bc134 Mon Sep 17 00:00:00 2001 From: l0ng-ai Date: Mon, 23 Nov 2026 16:35:39 +0800 Subject: [PATCH] fix(agents): clarify settings names and align the import dialog (#5403) * fix(agents): align and shorten the Import Sessions dialog * fix(agents): clarify settings page names --- docs/en/guide/agents.mdx | 6 +++--- docs/en/reference/settings.mdx | 2 +- docs/zh/guide/agents.mdx | 6 +++--- docs/zh/reference/settings.mdx | 2 +- e2e/agentMcp.spec.ts | 12 ++++++++---- src/features/agents/AgentList.tsx | 2 +- src/features/agents/AgentPolicyPage.tsx | 5 ++--- src/features/agents/AgentRegistryPage.tsx | 2 +- src/features/agents/Agents.module.css | 3 ++- src/features/agents/AgentsView.test.tsx | 3 ++- src/features/agents/ImportSessionsDialog.tsx | 4 ++-- src/features/agents/McpPicker.tsx | 4 ++-- src/features/agents/McpServersPage.tsx | 4 ++-- src/features/agents/agentPolicy.test.tsx | 6 +++--- src/features/agents/index.ts | 9 ++++----- src/features/agents/mcpModel.ts | 2 +- src/features/agents/model.ts | 6 +++--- src/features/agents/providerOptions.ts | 2 +- src/features/agents/sessionState.test.tsx | 2 +- src/features/agents/settingsPages.ts | 13 ++++++------- src/features/agents/store.ts | 2 +- src/features/agents/taskActions.ts | 4 ++-- src/platform/locales/text/en.json | 11 +++++++---- src/platform/locales/text/es.json | 2 +- src/platform/locales/text/fr.json | 2 +- src/platform/locales/text/ko.json | 2 +- src/platform/locales/text/pl.json | 2 +- src/platform/locales/text/pt.json | 2 +- src/platform/locales/text/tr.json | 11 ++++++----- src/platform/locales/text/zh-TW.json | 12 +++++++----- src/platform/locales/text/zh.json | 12 +++++++----- 31 files changed, 84 insertions(+), 73 deletions(-) diff --git a/docs/en/guide/agents.mdx b/docs/en/guide/agents.mdx index 3d27296a5..bbf2d0ba9 100644 --- a/docs/en/guide/agents.mdx +++ b/docs/en/guide/agents.mdx @@ -125,16 +125,16 @@ Tasks are saved per project and survive restarts. When the agent supports resumi ## Manage agents -**Settings › Tools › Agents** (also **More Agents…** in the agent picker) has two tabs: +**Settings › Agents › Agent Setup** (also **More Agents…** in the agent picker) lists built-in agents and agents from the ACP Registry. - **Built-in**: for each built-in agent, whether its executable was found on `PATH`, a field to point at a **Custom executable**, **Environment variables** for the agent process (written as `NAME=value; OTHER=value`; the values are kept in the OS credential store) and how to sign in. Changes apply to new sessions. When the agent is a global npm install (such as Claude Code, Codex or Gemini CLI), **Check for updates** compares it with npm's latest stable release and **Update to…** updates that installation. - **ACP Registry**: agents published in the [ACP Registry](https://agentclientprotocol.com). Search, **Install**, **Update** and **Remove**. Installed agents are kept in OpenIDEA's data directory; downloads are checked against the registry's SHA-256 when it provides one. -**Settings › Tools › Agents › Chat** chooses what the task header shows: **Context window usage**, **Time spent on the task**, **Usage limits** (when the agent reports them, such as Claude Code) and **Session cost**. +**Settings › Agents › Chat** chooses what the task header shows: **Context window usage**, **Time spent on the task**, **Usage limits** (when the agent reports them, such as Claude Code) and **Session cost**. ### External MCP servers -**Settings › Agents › External MCP Servers** configures MCP servers across three persistent levels, while the composer's **MCP** picker (or `/mcp`) controls them per session: +**Settings › Agents › MCP Connections** configures MCP servers across three persistent levels, while the composer's **MCP** picker (or `/mcp`) controls them per session: - **Global (`User`)**: saved in `settings.toml` with environment variable and HTTP header values stored in the OS credential store, shared across projects and agents (or scoped to selected agents). - **Project (`Workspace`)**: saved in `.openidea/settings.toml`; entries with the same name override Global servers, and servers added outside OpenIDEA stay off until approved. diff --git a/docs/en/reference/settings.mdx b/docs/en/reference/settings.mdx index 2b78d2f6d..1ca55d0f7 100644 --- a/docs/en/reference/settings.mdx +++ b/docs/en/reference/settings.mdx @@ -20,7 +20,7 @@ A file holds only the values that differ from the layer below. Tables merge key Some settings are ignored in the project file: `mcpServer`, imported color schemes (`editor.customSchemes`) and `agents.newTaskApprovals` are global only. Project trust is never read from settings. -A project file can't loosen what coding agents may do: `agentSecurity.allowedCommands` and `agents.defaults` are global only, and `agentSecurity.blockedCommands` in a project adds to the global list rather than replacing it. An MCP server in the project's `agents.mcpServers` stays off until you turn it on in **Settings › Agents › External MCP Servers**, and again after its definition changes. +A project file can't loosen what coding agents may do: `agentSecurity.allowedCommands` and `agents.defaults` are global only, and `agentSecurity.blockedCommands` in a project adds to the global list rather than replacing it. An MCP server in the project's `agents.mcpServers` stays off until you turn it on in **Settings › Agents › MCP Connections**, and again after its definition changes. ## File format diff --git a/docs/zh/guide/agents.mdx b/docs/zh/guide/agents.mdx index bd96115e2..f2087b8c3 100644 --- a/docs/zh/guide/agents.mdx +++ b/docs/zh/guide/agents.mdx @@ -125,16 +125,16 @@ agent 运行过一个任务后,新任务会以它自动批准所有操作的 ## 管理 agent -**设置 › 工具 › 智能体**(也可以在 agent 选择器中点 **更多 Agent…**)有两个标签页: +**设置 › 智能体 › 智能体配置**(也可以在 agent 选择器中点 **更多 Agent…**)列出了内置智能体和 ACP Registry 提供的智能体。 - **内置**:每个内置 agent 的可执行文件是否在 `PATH` 中找到、指定 **自定义可执行文件** 的输入框、传给 agent 进程的 **环境变量**(格式为 `NAME=value; OTHER=value`;这些值保存在系统凭据存储中)以及登录方式。改动对新会话生效。如果 agent 是 npm 全局安装(例如 Claude Code、Codex、Gemini CLI),**检查更新** 会与 npm 的最新稳定版比较,点击 **更新至…** 即可更新这份安装。 - **ACP 注册表**:[ACP Registry](https://agentclientprotocol.com) 中发布的 agent,可以搜索、**安装**、**更新** 和 **移除**。安装的 agent 保存在 OpenIDEA 的数据目录中;注册表提供 SHA-256 时会校验下载内容。 -**设置 › 工具 › 智能体 › 聊天** 决定任务标题栏显示哪些信息:**上下文窗口用量**、**任务耗时**、**用量限额**(agent 报告时,例如 Claude Code)和 **会话花费**。 +**设置 › 智能体 › 聊天** 决定任务标题栏显示哪些信息:**上下文窗口用量**、**任务耗时**、**用量限额**(agent 报告时,例如 Claude Code)和 **会话花费**。 ### 外部 MCP 服务器 -**设置 › 智能体 › 外部 MCP 服务器** 按三个持久层级管理 MCP 服务器,输入框底部的 **MCP** 选择器(或 `/mcp` 命令)则按单个会话控制它们: +**设置 › 智能体 › MCP 连接** 按三个持久层级管理 MCP 服务器,输入框底部的 **MCP** 选择器(或 `/mcp` 命令)则按单个会话控制它们: - **全局(`用户`)**:保存在 `settings.toml` 中,环境变量与 HTTP 请求头的值保存在系统凭据存储里,跨项目与各智能体共享(也可限定给选定的智能体)。 - **项目(`工作区`)**:保存在 `.openidea/settings.toml` 中,同名服务器覆盖全局配置;在 OpenIDEA 外部写入的项目服务器在批准启用前保持关闭。 diff --git a/docs/zh/reference/settings.mdx b/docs/zh/reference/settings.mdx index c544cb0b7..e1fd187a6 100644 --- a/docs/zh/reference/settings.mdx +++ b/docs/zh/reference/settings.mdx @@ -20,7 +20,7 @@ description: "OpenIDEA 的设置保存在哪里、全局文件与项目文件如 有些设置在项目文件中会被忽略:`mcpServer`、导入的配色方案(`editor.customSchemes`)和 `agents.newTaskApprovals` 只能全局配置。项目信任状态永远不会从设置文件中读取。 -项目文件不能放宽编码智能体的权限:`agentSecurity.allowedCommands` 和 `agents.defaults` 只能全局配置;项目中的 `agentSecurity.blockedCommands` 会追加到全局列表中,而不是替换它。项目 `agents.mcpServers` 中的 MCP 服务器会保持关闭,直到你在 **设置 › 智能体 › 外部 MCP 服务器** 中将其开启;服务器定义改变后也需要重新开启。 +项目文件不能放宽编码智能体的权限:`agentSecurity.allowedCommands` 和 `agents.defaults` 只能全局配置;项目中的 `agentSecurity.blockedCommands` 会追加到全局列表中,而不是替换它。项目 `agents.mcpServers` 中的 MCP 服务器会保持关闭,直到你在 **设置 › 智能体 › MCP 连接** 中将其开启;服务器定义改变后也需要重新开启。 ## 文件格式 diff --git a/e2e/agentMcp.spec.ts b/e2e/agentMcp.spec.ts index 0319adcf3..cbe716679 100644 --- a/e2e/agentMcp.spec.ts +++ b/e2e/agentMcp.spec.ts @@ -308,11 +308,15 @@ test("manages multi-level MCP servers in Settings and per-session overrides via await sessionPopup.getByRole("button", { name: "Reset" }).click(); await expect(sessionPopup.getByRole("button", { name: "Reset" })).toHaveCount(0); - // 2. Jump directly from the session MCP popover's gear button to Settings › External MCP Servers. - await sessionPopup.getByRole("button", { name: "External MCP Servers…" }).click(); + // 2. Jump directly from the session MCP popover's gear button to Settings › Agents › MCP Connections. + await sessionPopup.getByRole("button", { name: "MCP Connections…", exact: true }).click(); const settingsDialog = page.getByRole("dialog", { name: "Settings", exact: true }); await expect(settingsDialog).toBeVisible(); - await expect(settingsDialog.getByRole("heading", { name: "External MCP Servers" })).toBeVisible(); + await expect(settingsDialog.getByRole("heading", { name: "MCP Connections", exact: true })).toBeVisible(); + await expect(settingsDialog.getByRole("treeitem", { name: "MCP Connections", exact: true })).toHaveAttribute( + "aria-selected", + "true", + ); // Probe `github-mcp-server` and inspect discovered tools inside the expandable card. await settingsDialog.getByRole("button", { name: "Test github-mcp-server" }).click(); @@ -321,7 +325,7 @@ test("manages multi-level MCP servers in Settings and per-session overrides via if (screenshotDir) { await settingsDialog - .getByRole("heading", { name: "External MCP Servers" }) + .getByRole("heading", { name: "MCP Connections", exact: true }) .evaluate((el) => el.scrollIntoView({ block: "start" })); await settingsDialog.screenshot({ path: `${screenshotDir}/mcp-hub-levels.png` }); await settingsDialog.getByRole("button", { name: "Add from JSON" }).click(); diff --git a/src/features/agents/AgentList.tsx b/src/features/agents/AgentList.tsx index 9455b0c3b..53c088e64 100644 --- a/src/features/agents/AgentList.tsx +++ b/src/features/agents/AgentList.tsx @@ -1,5 +1,5 @@ /** - * Settings › Agents › Coding Agents: one searchable list of every agent, those this machine can run first + * Agent Setup lists every agent, with those this machine can run first * (built in, installed from the ACP Registry, or defined in an agent file), then those it * can install. The selected agent's page holds its actions, the settings its new tasks * start with, and how it is launched. Launch edits are staged until Apply; installs run in diff --git a/src/features/agents/AgentPolicyPage.tsx b/src/features/agents/AgentPolicyPage.tsx index 22625a7fe..47b333606 100644 --- a/src/features/agents/AgentPolicyPage.tsx +++ b/src/features/agents/AgentPolicyPage.tsx @@ -1,6 +1,5 @@ /** - * Settings › Tools › Agents › Command Permissions: whitelist (auto-approve) - * and blacklist (auto-reject) command patterns evaluated on agent permission requests. + * Command Rules defines the allow and block patterns for agent permission requests. */ import { useMemo, useState } from "react"; import { tx } from "@/platform/i18n"; @@ -47,7 +46,7 @@ export function AgentPolicyPage() { }; return ( -
+

Allowed commands run without asking, with or without extra arguments. Blocked commands are always rejected, diff --git a/src/features/agents/AgentRegistryPage.tsx b/src/features/agents/AgentRegistryPage.tsx index 243b9938c..d46129b6b 100644 --- a/src/features/agents/AgentRegistryPage.tsx +++ b/src/features/agents/AgentRegistryPage.tsx @@ -1,4 +1,4 @@ -/** Settings › Agents › Coding Agents. */ +/** Settings › Agents › Agent Setup. */ import { AgentList } from "./AgentList"; import { tauriCommands, tauriRegistry, type CommandsBackend, type RegistryBackend } from "./registry"; import styles from "./AgentRegistry.module.css"; diff --git a/src/features/agents/Agents.module.css b/src/features/agents/Agents.module.css index 721a9dd14..d3575fb56 100644 --- a/src/features/agents/Agents.module.css +++ b/src/features/agents/Agents.module.css @@ -224,11 +224,12 @@ flex: none; } -/* Import Sessions from Other Apps: filter above a fixed-height list, so the dialog doesn't grow. */ +/* Keep the import list height stable while filtering. */ .chooser { display: flex; flex-direction: column; gap: var(--space-2); + padding: var(--space-3) var(--space-4) 0; } .chooserList { height: 312px; diff --git a/src/features/agents/AgentsView.test.tsx b/src/features/agents/AgentsView.test.tsx index e86c6d389..36241ffa1 100644 --- a/src/features/agents/AgentsView.test.tsx +++ b/src/features/agents/AgentsView.test.tsx @@ -281,8 +281,9 @@ describe("Agents docked view", () => { ]); }); - it("lists Import Sessions from Other Apps in Find Action", () => { + it("lists Import Sessions in Find Action", () => { const action = taskActions.find((a) => a.id === "agents.importSessions"); + expect(action?.title).toBe("Import Sessions…"); expect(action?.hidden).toBeFalsy(); expect(action?.when).toBe("projectOpen"); act(() => void action?.run({} as never)); diff --git a/src/features/agents/ImportSessionsDialog.tsx b/src/features/agents/ImportSessionsDialog.tsx index 74b77d34e..278c0f3d9 100644 --- a/src/features/agents/ImportSessionsDialog.tsx +++ b/src/features/agents/ImportSessionsDialog.tsx @@ -1,4 +1,4 @@ -/** Import Sessions from Other Apps: pick sessions a scan found now, and import them as tasks. */ +/** Pick external sessions and import them as agent tasks. */ import { useEffect, useId, useMemo, useRef, useState, type KeyboardEvent, type MouseEvent } from "react"; import { Button, Dialog, Icon, List, SearchField, Spinner, T, listNavigate, rowSelectionMode, selectRow } from "@/ui"; import { useRowHeight } from "@/ui/density"; @@ -160,7 +160,7 @@ function ImportSessionsDialog() {

diff --git a/src/features/agents/McpPicker.tsx b/src/features/agents/McpPicker.tsx index cf8d612f4..658e871b8 100644 --- a/src/features/agents/McpPicker.tsx +++ b/src/features/agents/McpPicker.tsx @@ -1,7 +1,7 @@ /** * Per-session MCP picker for the New Task and Session composers: shows inherited IDE, Project, * Global, and Agent-Native CLI MCP servers, lets the user toggle servers for this session only, - * reset session overrides, or jump to Settings › Agents › External MCP Servers. + * reset session overrides, or jump to Settings › Agents › MCP Connections. */ import { useMemo, useState } from "react"; import type { McpExternalSource, McpServer } from "@/bindings"; @@ -110,7 +110,7 @@ export function McpPicker({ }} triggerAriaLabel={tx("MCP servers")} popupTitle={tx("Session MCP Servers")} - settingsTitle={tx("External MCP Servers…")} + settingsTitle={tx("MCP Connections…")} settingsPage={MCP_PAGE} counts={{ active: resolved.activeCount, total: resolved.totalCount, overrides: resolved.overrideCount }} search={{ placeholder: tx("Filter MCP servers…"), ariaLabel: tx("Filter MCP servers"), shown: totalRows > 5 }} diff --git a/src/features/agents/McpServersPage.tsx b/src/features/agents/McpServersPage.tsx index 6f379333c..4bf4d48a5 100644 --- a/src/features/agents/McpServersPage.tsx +++ b/src/features/agents/McpServersPage.tsx @@ -1,5 +1,5 @@ /** - * Settings › Agents › External MCP Servers: multi-level MCP management across Global (`settings.toml` + * Settings › Agents › MCP Connections: multi-level MCP management across Global (`settings.toml` * + Keychain), Project (`.openidea/settings.toml`), and Agent CLI config directories * (`~/.copilot/mcp-config.json`, `~/.claude.json`, `~/.codex/config.toml`, `~/.cursor/mcp.json`, * `~/.gemini/settings.json`, `~/.jetbrains/mcp/mcp.json`, `.mcp.json`, `.vscode/mcp.json`), with @@ -535,7 +535,7 @@ export function McpServersPage({ backend = defaultMcpBackend }: { backend?: McpB

- External MCP Servers + MCP Connections