v1.14.21:LSP Pull 诊断 + Roslyn C# + UTF-8 BOM 保留
发布日期:2026年4月23日
🎯 一句话总结
LSP 支持 Pull 诊断(C#、Kotlin 等),C# 语言服务切换到 Roslyn,编辑文件保留 UTF-8 BOM,会话压缩保留更多有用上下文。
🆕 新功能:LSP Pull 诊断
这次更新了什么?
LSP 现在支持 Pull 诊断(pull diagnostics),而不仅仅是之前的 Push 诊断。
这有什么用?
某些语言服务器(如 C# 的 OmniSharp、Kotlin 的 kotlin-language-server)使用 Pull 诊断模式。之前这些语言的诊断信息(错误、警告)不会显示在 OpenCode 中,现在可以了。
🆕 新功能:Roslyn Language Server(C#)
这次更新了什么?
C# 支持从 csharp-ls 切换到了 Roslyn Language Server。
这有什么用?
Roslyn 是微软官方的 C# 编译器平台,提供更准确的代码补全、跳转、诊断等功能。之前使用的 csharp-ls 功能有限。
🆕 改进:UTF-8 BOM 保留
这次更新了什么?
通过编辑、补丁或重写工具修改文件时,UTF-8 BOM 会被保留。
这有什么用?
Windows 环境和某些旧项目依赖 BOM 标记来识别文件编码。之前编辑后 BOM 丢失,可能导致这些工具或项目出问题。
🆕 改进:会话压缩保留更多上下文
这次更新了什么?
长会话压缩时,保留更多有用的上下文信息,而不是过度压缩。
🔧 问题修复
TUI 升级检查
问题:即使关闭了自动更新,TUI 仍然会检查版本升级。
修复:关闭自动更新后不再检查升级。
无效会话启动
问题:打开一个无效或已删除的会话时,TUI 会进入损坏状态。
修复:快速失败并显示错误信息,而不是进入损坏状态。
📊 要不要升级?
| 情况 | 建议 |
|---|---|
| C# / Kotlin 开发者 | ✅ 强烈推荐 |
| 编辑含 BOM 的文件 | ✅ 推荐 |
| 使用长会话对话 | ✅ 推荐 |
| 正常使用中 | ✅ 推荐 |
⬆️ 升级命令
bash
opencode upgrade📋 技术细节
点击展开完整更新列表
Core
- Support pull diagnostics from LSP servers that use them, including C# and Kotlin.
- Fix project detection and caching for bare Git repos and worktrees. (@StevenTCramer)
- Improve session compaction so long threads keep more useful context when older history is summarized.
- Preserve UTF-8 BOMs when files are edited, patched, or rewritten through tools.
- Use Roslyn Language Server for C# support instead of
csharp-ls. (@jmbryan4) - Add the high reasoning variant for supported Mistral Small models. (@rubdos)
- Hide unsupported variants for Kimi models that do not expose them.
TUI
- Fail fast when opening an invalid or missing session instead of starting the TUI in a broken state.
- Skip upgrade checks when auto-update is disabled. (@rahuliyer95)
Desktop
- Keep project avatar previews consistent between the sidebar and edit dialog.
- Improve project icon overrides so uploaded icons and color fallbacks behave correctly in the edit dialog.
- Improve Linux desktop metadata for app listings and categorization. (@NN708)
Thank you to 6 community contributors (see GitHub release for full list)

