Skip to content

统一 Agent 权限及思考强度的上游名称与图标 - #1008

Open
Mucheen wants to merge 3 commits into
1lck:previewfrom
Mucheen:fix/agent-permission-thinking-labels
Open

Mucheen wants to merge 3 commits into
1lck:previewfrom
Mucheen:fix/agent-permission-thinking-labels

Conversation

@Mucheen

@Mucheen Mucheen commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

权限模式名称经过全局翻译表后,中文界面里的 Plan 会单独变成“计划”;同时思考强度也会混用中英文。本 PR 统一 Agent 自己提供的名称规则,菜单、当前值和输入框底栏保持一致,并补齐 Claude 权限图标和说明。

改动内容

  • model、mode、thought_level 的选项名称保留上游原文。Claude 的 Manual / Accept edits / Plan / Auto / Bypass permissions,以及 Claude/Codex 实际提供的思考强度,都不会命中其他界面的通用翻译。思考强度标题、速度和其他配置仍按界面语言显示。
  • 保留通用 Plan → “计划”翻译,移除此前新增的权限名称翻译,避免影响其他界面。新增三项显式加载中文、英文资源 Bundle 的回归测试,验证权限菜单与底栏、模型/思考强度名称,以及速度/其他控制的本地化。
  • Claude 和 Codex 按权限 ID 共享图标:请求批准使用对话气泡、自动审批使用盾牌勾选、完全访问使用闪电;Claude 额外的编辑/计划选项使用铅笔/列表。兼容 default 和 manual,未知 ID 使用默认图标。
  • 五项 Claude 说明提供中英文资源,保留实际审批与环境约束。自动编辑不等于所有操作免审批,跳过权限提示仍受环境和管理策略限制。
  • 不改变上游选项 ID、数量、顺序或确认/失败流程。同步更新 Agent Note、两项功能矩阵记录及生成视图;权限呈现策略改变后,运行时验证状态恢复为 pending。
  • 合并当前 preview(afb7a766),同步 GitHub PR 的 base SHA;实际审查差异为本轮 8 个文件。解决矩阵冲突时:保留 JSON 能力记录,从 JSON 重新生成 Markdown/CSV。没有新增资源、下载、缓存、依赖或运行时写入。

验证

  • Swift 6.3.3:87 项 Agent 回归通过,计时报告记录 86 项测试条目(其中一项参数化测试包含两个用例),无超时、停滞或性能警告。
  • 新增名称测试全部通过,独立运行最长 3ms;两份 PR 组合运行时最长 25ms。HTML/JUnit:.artifacts/test-stability/pr1008-review-macos.html、pr1008-review-macos.junit.xml。
  • Agent Notes、测试稳定性、平台矩阵及实际 base/head 变更门禁、runtime bundle 只读、Windows 边界、中英文 strings 语法、diff 空白检查通过。
  • 两份 PR 的本地组合:89 项 Agent 回归通过,5 项新增测试最长 77ms;macOS debug 构建通过(./scripts/build-macos.sh --configuration debug --triple arm64-apple-macosx)。源码、Note 和矩阵 JSON 自动合并,生成的 Markdown/CSV 冲突通过重新生成解决。
  • 新提交 f7225991 的 Windows Rust CI 通过:共享 Rust Core 779 项计时记录,Windows 项目/终端/host 分别 27/37/214 项。此前 fix(macos): 收紧 Agent 配置菜单并修复双行说明裁剪 #1023 首次失败的子模块发布测试本次以 7512ms 通过,未增加预算或修改 Rust/CI 代码。
  • 全仓服务边界仍在基线 AppModel+RunConfiguration.swift 616 行超过 600 行处失败;文件与 preview 一致,本 PR 未修改。
./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh \
  --report .artifacts/test-stability/pr1008-review-macos.json -- \
  --filter 'AgentConversation|AgentSessionSelector|AgentHistory|AgentFileReference|AgentProviderConfiguration|AgentBrandIconResource|AgentManagement'
./scripts/verify-agent-notes.sh
./scripts/verify-platform-feature-matrix-change.sh afb7a76649e4707db2455ff62b0f9b71c8247aa4 HEAD
./scripts/verify-platform-feature-matrix.sh
./scripts/verify-runtime-bundle-immutability.sh
./scripts/verify-windows-boundaries.sh

与 #1023 的关系

按 #1023 的 review 统一呈现策略:本 PR 负责名称、图标和说明;#1023 只负责紧凑布局及双行说明/长列表回归。建议先审查并合并本 PR,再同步 #1023 的基线和生成矩阵。两份 PR 均保留等待审查。

此前中文真实界面验收是在含 #1007 前置修复的组合构建中完成的,不能替代这次改为上游原名后的运行时验收。Windows Agent 对话 UI 尚未实现,本轮没有 Windows 实机验收;权限呈现矩阵如实保留 pending。

@ghfind-review ghfind-review Bot added the review: medium ghfind author score; see https://ghfind.com label Oct 1, 2026
xiaoyumuxi
xiaoyumuxi previously approved these changes Oct 1, 2026

@xiaoyumuxi xiaoyumuxi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

检查了 thought_level 的英文呈现、Claude/Codex 权限模式名称与图标映射,以及中英文本地化。改动只影响 presentation,不改上游 option ID、顺序和确认流程;未知选项仍保留默认回退。当前 CI 全绿。没有发现阻断项;PR 当前存在合并冲突,需要在合入前解决。

@xiaoyumuxi

Copy link
Copy Markdown
Collaborator

@Mucheen 还有一个冲突来着

@Mucheen Mucheen changed the title 统一 Claude 权限菜单并将思考强度显示为英文 统一 Agent 权限及思考强度的上游名称与图标 Oct 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: medium ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants