Claude Code 2.1.300:新增 mod 钩子与 OpenTelemetry 属性并修复多项问题
原标题:2.1.300
AI 摘要
Claude Code 发布 2.1.300 版本更新,为 mod 系统新增 virtualText 提示装饰、agentId 视图切换、RTL 文本支持及 prompt.change 等钩子,并扩展 OpenTelemetry 缓存写入与 GenAI 语义属性。同时修复了大量问题,涵盖云会话网络策略误报、worktree 与 reftable 仓库兼容、子代理消失、登录令牌残留、MCP 工具 schema 被拒导致 400 错误等。整体提升了 mod 扩展能力、可观测性与会话稳定性。
正文节选
- Added `virtualText` to a mod's prompt decorations: text drawn in the prompt box that never enters the draft or the submitted prompt - Added `cache_creation_5m_tokens` and `cache_creation_1h_tokens` to the OpenTelemetry `api_request` event, splitting cache writes by lifetime - Added `$.ui.view({ agentId })` for mods: shows an agent's transcript in the main view when you ask, and `$.ui.view({})` goes back - Added a `dir` prop on a mod's `Text` for right-to-left text: on Windows and in VS Code's