Skip to content

v1.2.11:Windows 全面支持、workspace-serve 实验命令

发布日期:2026-02-24

重大版本更新,全面支持 Windows 平台,新增 workspace-serve 实验命令,ACP 流式输出增强。

🎯 一句话总结

Windows 用户终于可以畅用 OpenCode 了!路径处理、终端、Git 操作全面兼容,还新增了远程工作区服务命令。


✨ 新功能

1. workspace-serve 命令(实验性)

新增 opencode workspace-serve 命令,用于远程工作区服务。

怎么用

bash
# 启动工作区服务
opencode workspace-serve

对谁有价值:需要在远程服务器或容器中使用 OpenCode 的开发者。


2. ACP 流式 Bash 输出

ACP(Agent Communication Protocol)现在支持流式 Bash 输出,并添加了合成待定事件。

收益

  • 长时间运行的命令可以实时看到输出
  • 更好地追踪任务执行状态

对谁有价值:使用 ACP 协议与 OpenCode 集成的 IDE 用户(VS Code 等)。


3. Windows 全面支持

这是 Windows 用户期待已久的更新!主要包括:

路径规范化

  • 自动处理 Windows 反斜杠路径(\
  • 配置文件的 rel() 方法支持跨平台路径
  • 文件忽略模式正确处理 Windows 路径

Git 操作优化

  • Git 快照操作添加跨平台标志
  • 修复 .gitignore 和 excludesFile 在 Windows 上的路径问题
  • 正确处理 CRLF 行尾的文件

终端和插件

  • 修复插件解析(使用 createRequire 回退)
  • 预加载清理时处理 Windows EBUSY 错误
  • 权限边界路径规范化

测试兼容性

  • 所有测试现在都能在 Windows 上通过
  • 使用 path.seppath.join 替代硬编码斜杠
  • 处理 NTFS 文件时间的精度差异(添加 50ms 容差)

对谁有价值:所有 Windows 用户!特别是之前遇到路径、Git 或终端问题的用户。


4. GitHub Actions 支持 variant 参数

GitHub Actions 工作流和 OpenCode GitHub run 命令现在支持 variant 参数。

怎么用

yaml
- uses: opencode/github-action@v1
  with:
    variant: 'lite'  # 或其他变体

对谁有价值:使用 OpenCode GitHub Action 进行 CI/CD 自动化的团队。


5. 实验性会话列表端点

新增实验性 API 端点,用于列出所有会话。

对谁有价值:需要程序化管理会话的高级用户或工具开发者。


🔧 修复与改进

桌面端

  1. 取消评论后取消行高亮 - 修复了评论取消后代码行仍保持高亮的问题
  2. 错误处理增强 - 使用 serverErrorMessage 工具统一错误处理,添加 ConfigInvalidError 检查
  3. 文件加载优化 - 等待 loadFile 完成后再打开文件标签页
  4. 信息流定制 - 新增信息流定制选项
  5. 音效 UX 优化 - 更好的音效禁用体验
  6. 自动滚动改进 - Todo、问题和权限列表自动保持固定并跟随滚动
  7. 大文本输入优化 - 大量文本粘贴到输入框不再导致主线程卡顿
  8. 删除文件树工具提示 - 简化文件树界面

TUI

  1. 缺失插件依赖处理 - 修复缺失插件依赖导致 TUI 黑屏的问题
  2. Chevron 方向修正 - 修复 Todo 列表中 Chevron 图标方向颠倒的问题

Core

  1. 自定义工具导入 - 支持通过文件 URL 导入自定义工具
  2. Bun 升级 - 升级到 Bun 1.3.10 canary,强制使用 baseline 构建
  3. Git ID 缓存 - 等待 Git ID 缓存写入完成
  4. 快照改进 - 尊重 info.exclude 配置,改进快照暂存
  5. 平台二进制缓存 - 在 postinstall 中缓存平台二进制文件,加快启动速度

📊 要不要升级?

情况建议
Windows 用户强烈推荐 - Windows 支持已完善
使用 ACP/IDE 集成✅ 推荐 - 流式输出体验更好
需要远程工作区✅ 推荐 - 试试新命令
macOS/Linux 普通用户⚪ 可选升级

⬆️ 升级命令

bash
opencode upgrade

🙏 致谢

感谢 10 位社区贡献者:

  • @elithrar: 修复插件依赖导致 TUI 黑屏、GitHub Actions 支持 variant
  • @edemaine: Windows 路径支持、Cygwin 变更检测
  • @noamzbr: ACP 流式 Bash 输出和合成待定事件
  • @neriousy: 取消评论取消行高亮
  • @kevinWangSheng: 修复 Chevron 方向
  • @OpeOginni: 错误处理重构
  • @tuhin-cmd: Bangla README 翻译
  • @Seungjun0906: 韩语文档改进
  • @pirrozani: TUI 文档拼写修复

📋 技术细节

点击展开原始 Release Notes

Core

  • Add workspace-serve command (experimental)
  • ACP both live and load share synthetic pending status preceding actual data (@noamzbr)
  • Replace structuredClone with spread operator for process.env in tests
  • Add 50ms tolerance for NTFS mtime precision in Windows FileTime assertions
  • Replace Unix-only test assumptions with cross-platform alternatives
  • Use path.sep in discovery test for cross-platform path matching
  • Normalize backslash paths in config rel() and file ignore on Windows
  • Fix plugin resolution with createRequire fallback on Windows
  • Harden preload cleanup against Windows EBUSY errors
  • Normalize git excludesFile path for Windows in tests
  • Stream bash output and add synthetic pending events to ACP (@noamzbr)
  • Add git flags for snapshot operations and fix tests for cross-platform on Windows
  • Handle CRLF line endings in markdown frontmatter parsing on Windows
  • Use path.join for cross-platform glob test assertions
  • Upgrade to Bun 1.3.10 canary and force baseline builds always
  • Normalize paths at permission boundaries on Windows
  • Windows path support and canonicalization (@edemaine)
  • Upgrade OpenTUI to v0.1.81
  • Change detection on Windows, especially Cygwin (@edemaine)
  • Cache platform binary in postinstall for faster startup
  • Publish desktop beta releases to a separate repository
  • Add experimental endpoint to list all sessions
  • Fixed terminal issues in the app
  • Respect info exclude in snapshot staging
  • Missing plugin dependencies cause TUI to black screen (@elithrar)

TUI

  • Support variant parameter in GitHub Actions and OpenCode GitHub run command (@elithrar)

Desktop

  • Ignore stale part deltas in the application
  • Fix bug where lines remain highlighted after canceling a comment (@neriousy)
  • Replace error handling with serverErrorMessage utility and add ConfigInvalidError checks (@OpeOginni)
  • Preserve native path separators in file path helpers
  • Remove file tree tooltips
  • Update createOpenReviewFile test to match new call order
  • Wait for loadFile to complete before opening file tab
  • Windows E2E test failures due to IPv6 networking issues resolved
  • Correct inverted chevron direction in todo list (@kevinWangSheng)
  • Feed customization options
  • Add beta icon to desktop application
  • E2E test updated to current version
  • Remove double-border in share button
  • Better sound effect disabling UX
  • Add custom scroll view to app
  • Show and hide reasoning summaries in the app
  • Stay pinned with auto-scroll on todos, questions, and permissions
  • Bring back -i flag in sidecar arguments for desktop
  • Large text pasted into prompt input no longer causes main thread to lock

SDK

  • Scripts using Turbo commands would not run on Windows

← 返回更新日志