From 08884c127c2d45f78d4fbd5e4bc6111cc76c60ef Mon Sep 17 00:00:00 2001 From: mesalogo Date: Tue, 18 Aug 2026 12:36:18 +0800 Subject: [PATCH] fix: hide inactive browser profile settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Managed browser profile controls suggested that login state and cookies would be reused, but named profiles do not yet affect browser execution. The settings UI now hides profile management while preserving the built-in browser switch, diagnostics, stored profile metadata, and compatibility APIs. Release note: 暂时隐藏尚未实际生效的托管浏览器配置,避免误以为登录状态和 Cookie 会被复用;已有底层数据不会删除。 --- UI-DESIGN.md | 2 +- .../computer-control-implementation-status.md | 13 +- src/main/capabilities/capability-service.ts | 2 +- .../computer-capability-catalog.ts | 2 +- src/renderer/src/McpSettingsSection.tsx | 204 ------------------ src/renderer/src/SettingsPanel.test.tsx | 40 +--- .../src/i18n/locales/en-US/integrations.ts | 23 +- .../src/i18n/locales/zh-CN/integrations.ts | 22 +- src/renderer/src/styles.css | 60 ------ 9 files changed, 20 insertions(+), 348 deletions(-) diff --git a/UI-DESIGN.md b/UI-DESIGN.md index 709634b..dcb1fe2 100644 --- a/UI-DESIGN.md +++ b/UI-DESIGN.md @@ -539,7 +539,7 @@ GoodBuddy 是可调整窗口大小的桌面应用。响应式设计优先保证 - Agent Runtime 页面在低层程序与配置覆盖之外提供“能力与默认配置”区域。能力清单使用共享 `PageTabs`,按 Agents、Tools、Commands、Skills、MCP、Rules、Prompts、Resources、LSP、Formatters 和上下文 11 类单行滚动展示,一次只呈现当前分类的 `tabpanel`;清单只显示 Runtime 自有能力,不混入 GoodBuddy 分配的 Skills、临时 MCP 或 Continue 预设。Tools 必须独立于 Commands、LSP 和 Formatters,显示工具类型、来源及 Ask/Execute 可用性;清单状态必须区分完整、部分、不可用、仅连接和不支持,不能用进程连通性冒充清单可读。 - “能力与默认配置”只显示一个模块标题,刷新入口位于该标题右侧,能力状态压缩为一行并排在默认 Agent 或 Continue 预设编辑器之前;不得再复制“Runtime 原生能力”等同义标题、说明或状态结论。刷新只更新能力快照,不覆盖未保存的原生定制草稿。 - OpenCode 的默认 Agent 使用原生下拉选择;Continue 预设编辑器允许管理名称、说明、启用的 Rules 以及 Prompt 名称、说明和正文,并可展开查看原生 Rules 与启用预设 Rules 的最终合并顺序。持久启停仍使用共享 Switch,添加与删除使用明确按钮和可访问名称。 -- MCP 设置按“内置 MCP / 直连模型 / 自定义 MCP / 电脑控制”四个同级 `PageTabs` 组织。直连模型中的联网搜索与内置浏览器使用一致的折叠卡片和独立总开关;内置浏览器必须明确说明其操作 GoodBuddy 隔离浏览器,不控制客户端已安装的浏览器,开启后可由 Execute 直接使用,不逐次询问。托管浏览器配置归入直连模型,“电脑控制”只显示实际操作客户端电脑的能力。内置 MCP 卡片与 Skills 一样提供持久启停和 Runtime 分配;直连模型、GoodBuddy 管理的 OpenCode 与 Continue 默认选中且可调整,DeepSeek Harness 必须以置灰、未选择和“暂不支持”文案持续显示,不能呈现为可保存的分配。魔法笔记 MCP 的自身启停与平台功能依赖分别显示,依赖未开启时保留用户配置并说明当前不会加载。 +- MCP 设置按“内置 MCP / 直连模型 / 自定义 MCP / 电脑控制”四个同级 `PageTabs` 组织。直连模型中的联网搜索与内置浏览器使用一致的折叠卡片和独立总开关;内置浏览器必须明确说明其操作 GoodBuddy 隔离浏览器,不控制客户端已安装的浏览器,开启后可由 Execute 直接使用,不逐次询问。尚未生效的命名浏览器配置不得显示在界面中,“电脑控制”只显示实际操作客户端电脑的能力。内置 MCP 卡片与 Skills 一样提供持久启停和 Runtime 分配;直连模型、GoodBuddy 管理的 OpenCode 与 Continue 默认选中且可调整,DeepSeek Harness 必须以置灰、未选择和“暂不支持”文案持续显示,不能呈现为可保存的分配。魔法笔记 MCP 的自身启停与平台功能依赖分别显示,依赖未开启时保留用户配置并说明当前不会加载。 - MCP Server 测试结果在同一展开卡片中分组显示 Tools、Prompts 和 Resources 的支持状态、数量与有界元数据;Prompt 参数标明必填项,Resource 只显示 URI、名称、类型和说明,不读取或渲染 Resource 内容。 ### 13.8 文档解析设置 diff --git a/docs/computer-control-implementation-status.md b/docs/computer-control-implementation-status.md index 692043c..b71aa6a 100644 --- a/docs/computer-control-implementation-status.md +++ b/docs/computer-control-implementation-status.md @@ -6,7 +6,7 @@ | --- | --- | | 文档类型 | 实施进度 | | 状态 | 持续更新 | -| 版本 | 0.2 | +| 版本 | 0.3 | | 日期 | 2026-08-18 | | 适用能力 | 内置浏览器与客户端电脑控制 | @@ -63,7 +63,9 @@ Linux x64 和 Linux arm64。 - 内置浏览器已归入“直连模型”工具,与联网搜索并列,并明确说明不会控制 客户端已安装的浏览器;原有开关和配置 ID 保持不变,用户状态无需迁移。 - 用户通过内置浏览器总开关决定是否向直连模型提供工具;开启后可在 Execute - 模式直接使用,不逐次询问。托管浏览器配置和诊断也位于同一分类。 + 模式直接使用,不逐次询问。诊断位于同一分类。 +- 尚未实际参与浏览器执行的命名配置已从界面隐藏;底层旧数据和兼容接口继续 + 保留,不删除用户已有记录。 - “电脑控制”只显示实际操作客户端电脑的能力。能力启用、配置变更和本地 数据清除仍会替换或清理相关 Runtime 和会话。 @@ -135,10 +137,11 @@ Linux x64 和 Linux arm64。 区分代理、分区、窗口、CDP 初始化、DNS 或页面导航失败。需要增加有界、脱敏的 阶段错误码,并保留用户可执行的修复建议。 -### P1:命名浏览器配置尚未用于执行 +### P1:命名浏览器配置尚未用于执行,界面已隐藏 -设置中的命名浏览器配置当前只保存未来托管隔离所需的元数据。实际执行仍使用 -每个会话随机创建的临时分区,不复用登录状态。 +命名浏览器配置当前只保存未来托管隔离所需的元数据,实际执行仍使用每个会话 +随机创建的临时分区,不复用登录状态。为避免用户误以为该配置已经生效,设置 +界面暂不显示创建、选择、重命名或删除入口;底层数据与兼容接口继续保留。 ## 下一步顺序 diff --git a/src/main/capabilities/capability-service.ts b/src/main/capabilities/capability-service.ts index 313ca75..ecabf6e 100644 --- a/src/main/capabilities/capability-service.ts +++ b/src/main/capabilities/capability-service.ts @@ -733,7 +733,7 @@ export class CapabilityService { await this.browserProfiles.getSnapshot() return { status: 'available', - summary: '隔离的托管浏览器配置存储可用。' + summary: '内置浏览器隔离存储可用。' } } } diff --git a/src/main/capabilities/computer-capability-catalog.ts b/src/main/capabilities/computer-capability-catalog.ts index 34dfd12..bfeddf2 100644 --- a/src/main/capabilities/computer-capability-catalog.ts +++ b/src/main/capabilities/computer-capability-catalog.ts @@ -36,7 +36,7 @@ export const computerCapabilityCatalog: readonly ComputerCapabilityCatalogEntry[ id: 'host-browser-control', name: '内置浏览器', description: - '使用 GoodBuddy 内置的临时隔离浏览器执行网页操作,不会控制客户端已安装的浏览器;命名配置当前仅保存未来托管隔离所需的元数据。', + '使用 GoodBuddy 内置的临时隔离浏览器执行网页操作,不会控制客户端已安装的浏览器。', enabledByDefault: false, implementationKind: 'managed-browser-driver', supportedTargets: Object.freeze([ diff --git a/src/renderer/src/McpSettingsSection.tsx b/src/renderer/src/McpSettingsSection.tsx index 7ad698e..47ce44c 100644 --- a/src/renderer/src/McpSettingsSection.tsx +++ b/src/renderer/src/McpSettingsSection.tsx @@ -3,7 +3,6 @@ import { CircleAlert, Database, FlaskConical, - Globe2, MonitorCog, Network, Pencil, @@ -136,10 +135,6 @@ export function McpSettingsSection({ const [diagnostics, setDiagnostics] = useState< Partial> >({}) - const [newProfileName, setNewProfileName] = useState('') - const [profileNames, setProfileNames] = useState>( - {} - ) const [activeTab, setActiveTab] = useState('builtin') const editorDialogRef = useRef(null) @@ -231,21 +226,6 @@ export function McpSettingsSection({ } } - const createProfile = async (): Promise => { - const name = newProfileName.trim() - if (!name) { - return - } - if ( - await run('profile:create', () => - window.goodbuddy.capabilities.createBrowserProfile?.({ name }) ?? - Promise.reject(new Error(t('mcp.errors.unsupportedProfiles'))) - ) - ) { - setNewProfileName('') - } - } - const save = async (): Promise => { if (!editor) { return @@ -405,10 +385,6 @@ export function McpSettingsSection({ const builtinMcpStates = new Map( snapshot?.builtinMcpServers?.map((server) => [server.id, server]) ) - const browserProfiles = snapshot?.browserProfiles ?? { - profiles: [], - defaultProfileId: null - } const webSearch = snapshot?.webSearch ?? { provider: 'exa' as const, enabled: true, @@ -601,154 +577,6 @@ export function McpSettingsSection({ )} - {activeTab === 'model-tools' && browserCapability && ( -
-
-
- - - {t('mcp.profiles.title')} - -
- - {t('mcp.profiles.count', { - count: browserProfiles.profiles.length - })} - -
-

- {t('mcp.profiles.notice')} -

-
- - -
-
- {browserProfiles.profiles.length === 0 && ( -

{t('mcp.profiles.empty')}

- )} - {browserProfiles.profiles.map((profile) => { - const referenced = computerCapabilities.some( - (capability) => - capability.browserProfileId === profile.id - ) - return ( -
- - - - -
- ) - })} -
-
- )} - {activeTab === 'builtin' && (