v1.2.9:MCP 附件修复、性能优化
发布日期:2026-02-20
这个版本修复了MCP 工具附件缺少 ID 的问题,并进行了多项性能优化。
🎯 一句话总结
修复 MCP 工具附件 ID 缺失问题;使用原生 structuredClone 提升性能;桌面端恢复设置头部遮罩。
🐛 问题修复
MCP 工具附件 ID 修复
MCP 工具的附件现在包含正确的 id、sessionID 和 messageID。
影响:之前某些 MCP 工具返回的附件可能无法正确关联到会话,现已修复。
⚡ 性能优化
使用原生 structuredClone
TUI 现在使用 JavaScript 原生的 structuredClone 替代 remeda 库的 clone 函数。
收益:更好的性能和原生支持。
移除不必要的深拷贝
从会话循环和 LLM 流中移除了不必要的深拷贝操作,提升处理速度。
测试修复
移除了 LLM 测试中的 User-Agent 断言,修复了测试失败问题。
🖥️ 桌面端更新
恢复设置头部遮罩
恢复了桌面端设置界面的头部遮罩显示。
📊 要不要升级?
| 情况 | 建议 |
|---|---|
| 使用 MCP 工具 | ✅ 推荐 |
| 关注性能 | ✅ 推荐 |
| 一切正常 | ⚪ 可选升级 |
⬆️ 升级命令
bash
opencode upgrade📋 技术细节
点击展开原始 Release Notes
Core
- Add missing id, sessionID, and messageID to MCP tool attachments (@NatChung)
- Remove unnecessary deep clones from session loop and LLM stream
- Remove User-Agent header assertion from LLM test to fix failing test
TUI
- Use structuredClone instead of remeda's clone for better performance and native support (@mhart)
Desktop
- Restore settings header mask
Thank you to 2 community contributors:
- @mhart: Use structuredClone instead of remeda's clone
- @NatChung: fix: add missing id/sessionID/messageID to MCP tool attachments

