# 文档变更分析摘要
## 1. Overall Summary (总体摘要)
版本 2.1.172 是一次重要的功能增强与维护更新,引入了递归子代理功能,并修复了多项影响稳定性的关键问题(如 1M 上下文会话卡死、后台代理隔离权限)。此外,该版本显著优化了模型选择器逻辑、AWS Bedrock 配置读取以及 UI 性能。
## 2. Key Themes (关键主题)
* **代理架构增强**:引入递归子代理能力(支持最多 5 层嵌套),并修复了后台代理可能跨目录读取错误项目设置(`.mcp.json` approvals, trust)的严重隔离问题。
* **模型与配置深度修复**:修复了 `availableModels` 限制未正确应用、模型 ID 后缀重复、以及模型选择器 UI 显示错误;改进了 AWS Bedrock 区域读取优先级。
* **系统稳定性提升**:解决了无额度 1M 上下文会话永久卡死、多图处理重复报错、权限通配符(`WebFetch`, `Read`)不匹配等核心 Bug。
* **性能与 UX 优化**:减少长对话和空闲时的 CPU 占用与 UI 重绘,优化 Chrome 工具加载速度,并改善了 VSCode 中 PowerShell 的渲染效果。
## 3. Impact Level (影响级别)
**High** (高)
* **理由**:本次更新解决了可能导致用户会话永久卡死的严重 Bug,以及涉及多项目环境下的配置隔离安全风险。递归代理的引入更是显著扩展了自动化工作流的能力边界。
## 4. Action Items for developers (开发者行动建议)
* **验证权限规则**:检查此前可能因通配符(如 `*.domain.com` 或路径中间的 `*`)失效而未能生效的 `WebFetch` 或文件读取规则,确认新修复后的实际约束是否收紧。
* **测试递归工作流**:利用新解锁的 5 层子代理能力,重构或设计更复杂的多步骤自动化任务。
* **审查工作流脚本**:重新提交此前因包含 `Date.now()` 或 `Math.random()` 字符串而被误判拒绝的脚本。
* **检查 Bedrock 配置**:如果使用 Amazon Bedrock,确认 `~/.aws` 配置文件中的区域设置是否按新的优先级逻辑被正确读取。
* **回顾 1M 上下文设置**:确保 `opusplan` 等模型的 1M 上下文配置现在无需使用变通方法即可正常工作。
💭 Model Reasoning
1. **Analyze the Request:**
* **Role:** World-class programmer analyzing documentation changes.
* **Format:** Markdown, concise, insightful.
* **Language:** Chinese.
* **Input:** A single diff of `CHANGELOG.md.md` showing version `2.1.172`.
* **Output Structure:** Overall Summary, Key Themes, Impact Level, Action Items.
2. **Analyze the Diff (`CHANGELOG.md.md`):**
* *Version:* 2.1.172.
* *Feature Additions:*
* Recursive sub-agents (up to 5 levels).
* Bedrock config reading (`~/.aws` precedence).
* Plugin marketplace search bar.
* OTEL metric enhancement (`model` attribute).
* *Bug Fixes (Significant):*
* Sessions stuck at 1M context without credits (auto-compaction).
* Image processing errors (repeating).
* Agent view UI issues (busy spinner, stuck status).
* Security/Isolation: Background agents reading wrong project settings (`.mcp.json`, trust).
* `availableModels` restrictions applied incorrectly (allowlists, overrides).
* Model ID issues (doubled suffix, picker bugs).
* Permission/Domain rules (wildcards not matching subdomains, mid-pattern wildcards rejected).
* Prompt history (subagent tab showing main agent history).
* Memory recall (mounted stores in remote sessions).
* Workflow validation (false positives on `Date.now()`/`Math.random()`).
* *Performance/UX Improvements:*
* Long conversation performance (removed redundant normalization).
* Reduced idle CPU usage (less re-rendering).
* Chrome tool loading (batched calls).
* Non-interactive usage policy message.
* `/code-review` UI (ultra option visibility).
* Remote Control footer.
* `/loop` promotion logic.
* VSCode PowerShell rendering.
3. **Synthesize Overall Summary:**
* This update (v2.1.172) is a heavy maintenance and feature expansion release.
* It significantly upgrades agent capabilities (recursion), stabilizes complex scenarios (1M context, background agents), and polishes the UX/UI (model picker, performance).
* *Draft (Internal):* Version 2.1.172 introduces recursive sub-agents and fixes numerous bugs related to 1M context handling, model selection, and background agent isolation. It also improves performance and UI responsiveness across various interfaces including VSCode and the CLI.
4. **Identify Key Themes:**
* *Agent Architecture:* Recursive sub-agents, isolation fixes for background agents.
* *Model & Configuration:* Deep fixes for model pickers, AWS Bedrock config, 1M context handling, and `availableModels` logic.
* *Bug Fixes & Stability:* Critical fixes for stuck sessions, image processing, and permission validation (wildcards).
* *Performance & UX:* Optimizations for CPU usage and rendering, plus better tool loading in Chrome.
5. **Determine Impact Level:**
* *Reasoning:* The fixes regarding "background agents reading another directory's project settings" and "sessions stuck at 1M context" are high-stability issues. Recursive sub-agents unlock new workflows.
* *Level:* High. While not "Breaking", the resolution of session-stuck issues and isolation bugs is critical for reliability in multi-agent environments.
6. **Formulate Action Items for Developers:**
* Check sub-agent nesting limits (now 5 levels).
* Review AWS config if using Bedrock (automatic detection might change behavior).
* Re-evaluate wildcard permission rules (they actually work now/mid-pattern support).
* Update workflows previously blocked by false positive validation (`Date.now()`).
* Test background agent isolation to ensure security posture is updated based on fixed settings reading.
7. **Translate to Chinese & Format:**
* *Overall Summary:* 版本 2.1.172 是一次重要的功能增强与维护更新,引入了递归子代理功能,并修复了多项影响稳定性的关键问题(如 1M 上下文会话卡死、后台代理隔离权限)。同时,对 AWS Bedrock 配置读取、模型选择器逻辑及 UI 性能进行了显著优化。
* *Key Themes:*
* **代理架构升级**:支持子代理递归生成(最多5层),并修复了后台代理可能读取错误目录项目设置的安全隔离问题。
* **模型与配置修复**:深入修复了 1M 上下文模型 ID 格式错误、`availableModels` 限制未生效、AWS Bedrock 区域读取逻辑以及模型选择器显示错误。
* **稳定性与性能**:解决了会话卡死、重复报错、权限通配符不匹配等 Bug,并优化了长对话性能和空闲 CPU 占用。
* **开发体验改进**:增强了 Chrome 工具加载、VSCode PowerShell 显示及 `/plugin` 市场的交互体验。
* *Impact Level:* **High** (高)。
* *Reasoning:* 修复了可能导致会话永久卡死的严重 Bug,以及涉及多租户/多项目隔离(后台代理读取错误配置)的安全稳定性问题。此外,递归代理是重大功能解锁。
* *Action Items:*
* **测试递归代理**:现在可以设计更深层次(最多5层)的代理调用逻辑。
* **验证权限规则**:检查此前可能因通配符(如 `*.domain.com` 或 `secrets-*`)失效而放宽的权限规则,确认新修复后的实际约束。
* **审核 AWS 配置**:如果使用 Bedrock,确认 `~/.aws` 配置中的区域设置是否按预期生效。
* **检查工作流**:重新提交此前因包含 `Date.now()` 等字符串而被错误拒绝的工作流脚本。
8. **Final Review:** Ensure the tone is professional, concise, and "developer-focused". The markdown format looks correct. The Chinese translation is natural.