Skip to content

v1.3.0:GitLab Agent 平台 + Node.js 支持

发布日期:2026-03-23


🎯 一句话总结

支持 GitLab Agent 平台、多步骤认证、更新前确认,还能用 Node.js 运行 OpenCode!


🚀 重大更新:GitLab Agent Platform

这次更新了什么?

OpenCode 现在完全支持 GitLab Agent 平台,可以自动发现你 GitLab 实例上的 Workflow 模型。

GitLab Agent Platform 是什么?

如果你使用 GitLab 托管代码,现在可以让 Agent 通过 WebSocket 使用 OpenCode 的本地工具(文件读写、Shell 执行等),直接在你的 GitLab 工作流中运行 AI 辅助功能。

如何使用?

  1. 确保你的 GitLab 实例已配置 Agent 支持
  2. OpenCode 会自动发现可用的 Workflow 模型
  3. 在对话中选择 GitLab 相关的 Agent 即可

🆕 新功能:Git 代码审查模式

这次更新了什么?

新增基于 Git 的代码审查模式,可以在 OpenCode 内直接查看未提交的更改和分支差异。

这有什么用?

  • 默认审查源改为 Git 更改:更符合代码审查的真实场景
  • 桌面端审查面板同步:与你选择的审查源保持同步
  • 更直观的代码审查体验:不用离开 OpenCode 就能完成代码 Review

如何使用?

在桌面版中,审查面板会自动显示你的 Git 更改。你可以选择查看:

  • 未提交的更改
  • 当前分支与目标分支的差异

🔐 新功能:多步骤认证

这次更新了什么?

桌面版现在支持多步骤认证流程,可以使用 OAuth、SAML 等复杂认证方式登录。

这有什么用?

如果你的公司或组织使用企业级认证(如 SSO、OAuth),现在可以直接在 OpenCode 桌面版中完成登录,不再需要跳转到浏览器。

支持的认证方式:

  • OAuth 提供商
  • SAML 单点登录
  • 需要额外问题的认证流程

⚠️ 新功能:交互式更新流程

这次更新了什么?

主版本和次版本更新前,现在会显示确认对话框,让你先了解更新内容再决定是否升级。

这有什么用?

  • 预览更新内容:升级前可以看到这次更新有什么变化
  • 跳过特定版本:如果某个版本你不想升级,可以跳过
  • 更可控的升级体验:避免意外升级到不兼容的版本

如何使用?

当你运行 opencode upgrade 时,如果是重要版本更新,会自动弹出确认对话框。


🟢 新功能:Node.js 支持

这次更新了什么?

OpenCode 现在可以在 Node.js 上运行,不再仅限于 Bun!

这有什么用?

如果你的开发环境没有安装 Bun,或者你更习惯使用 Node.js,现在有了新选择。

如何使用?

OpenCode 会提供专门的 Node.js 入口点和构建脚本,包含数据库迁移的打包。


🖥️ 桌面版改进

功能说明
项目快速切换使用 Cmd+Option+方向键 快速切换项目
文件上传增强支持文件类型过滤和多选上传
审查面板预访问启动会话前就能打开审查面板
工作区切换优化切换工作区时不再闪烁
侧边栏调整修复侧边栏调整到最小宽度时不再自动关闭

🖥️ 终端和编辑器改进

  • 终端重命名:修复了从上下文菜单重命名终端失败的问题
  • 终端错误恢复:终端会话出错时能自动重新初始化
  • 粘贴操作:粘贴操作现在能保留原始字节数据,支持二进制内容
  • 防止重复提交:快速按回车不会重复发送提示词

🤖 模型和供应商改进

供应商改进
xAI推理模型在长对话中性能提升,使用加密内容 API
GPT更新模型列表,支持最新模型
Vertex AI修复非思考模型(如 gemini-2.0-flash)的错误
vLLM改进上下文溢出错误检测,提供更清晰的反馈

📊 要不要升级?

情况建议
使用 GitLab✅ 强烈推荐
使用企业认证✅ 强烈推荐
需要 Node.js 运行✅ 强烈推荐
所有用户✅ 推荐(这是次版本更新)

⬆️ 升级命令

bash
opencode upgrade

📋 技术细节

点击展开原始 Release Notes

New Features

  • GitLab Agent Platform (#18014): GitLab Agent Platform is now fully supported with automatic discovery of workflow models from your GitLab instance. Workflow models can use opencode's local tools (file read/write, shell, etc.) over WebSocket.
  • Git-backed Session Review (#17961): Added git-backed session review modes, enabling users to review uncommitted changes and branch diffs directly within opencode. Git changes are now the default review source with the desktop review tree staying synchronized with your selected source.
  • Multistep Authentication (#18103, #18035): Desktop app now supports multistep authentication flows, enabling login with OAuth providers, SAML, and other complex auth methods directly in the app. Providers that require additional questions during authentication are now fully supported.
  • Interactive Update Flow (#18662): Major and minor updates now show a confirmation dialog before upgrading, allowing you to review changes before updating. You can also skip specific versions if you prefer to stay on your current release.
  • Node.js Support (#18324): opencode can now run on Node.js in addition to Bun, with a dedicated Node.js entry point and build script that bundles the server with database migrations.

Desktop App Improvements

  • Project Navigation (#18502): Navigate between projects faster using keyboard shortcuts (cmd+option+arrow keys).
  • File Uploads (#18403): Desktop app now supports file type filters and multiple file selection when uploading files.
  • Review Panel Access (#18251): Users can now access the review panel before starting a session, with proper empty states shown when no changes exist yet.
  • Workspace Switching (#18207): Fixed visual flickering when switching between workspaces or projects.
  • Sidebar Resize (#18647): Fixed issue where sidebar would automatically close when being resized to minimum width.
  • Loading States (#18501): Improved loading state management across the app.
  • Console Login (#18281): Fixed console device login to properly handle pending authorization states.

Terminal & Editor

  • Terminal Rename (#18263): Fixed terminal renaming from the context menu.
  • Terminal Error Recovery (#17591): Fixed an issue where terminals would become unresponsive when the server returned a "not found" error.
  • Paste Operations (#18079): Paste operations now preserve raw byte data.
  • Prevent Duplicate Submits (#18148): Fixed issue where rapidly pressing Enter could submit prompts multiple times.

Providers & Models

  • xAI Responses API (#18175): Improved xAI reasoning models performance in long multi-turn conversations.
  • GPT Model List (#18101): Updated the GPT subscription model list with the latest available models.
  • Vertex AI Fix (#18283): Fixed Vertex AI errors with non-thinking models.
  • vLLM Context Overflow (#17763): Improved error detection for vLLM context overflow errors.
  • Cost Chunk Format (#16817): Fixed streaming error where cost data was sent in wrong format.

Bug Fixes

  • Remote Server Switching (#17214): Fixed issues when switching between remote servers.
  • Windows Commands (#18010): Fixed Windows command execution for shims (.cmd/.bat files).
  • Tool Discovery (#18320): Fixed tool discovery for npm-installed packages.
  • Error Messages (#18165): Tool and session error messages now display in clean format.
  • Chunk Timeout (#18264): Disabled chunk timeout by default.
  • Event Ordering (#18259): Events in real-time streams now process sequentially.
  • Desktop Stability (#18300): Improved desktop stability with more reliable workspace and session routing.

Thank you to 16 community contributors


← 返回更新日志