## 新功能
- **GitLab Agent 平台** (#18014):GitLab Agent 平台现已全面支持,可从您的 GitLab 实例自动发现工作流模型。工作流模型可通过 WebSocket 使用 opencode 的本地工具(文件读写、Shell 等)。
- **基于 Git 的会话审查** (#17961):新增基于 Git 的会话审查模式,使用户能直接在 opencode 内审查未提交的更改和分支差异。Git 更改现为默认审查源,桌面审查树与所选源保持同步。
- **多步身份验证** (#18103, #18035):桌面应用现支持多步身份验证流程,可直接在应用内使用 OAuth 提供商、SAML 及其他复杂身份验证方法登录。身份验证过程中需要回答额外问题的提供商现已全面支持。
- **交互式更新流程** (#18662):主要和次要版本更新现会在升级前显示确认对话框,允许您在更新前审查更改。您也可以跳过特定版本以停留在当前版本。
- **Node.js 支持** (#18324):除 Bun 外,opencode 现可在 Node.js 上运行,并提供专用的 Node.js 入口点和构建脚本,该脚本会将服务器与数据库迁移捆绑在一起。
## 桌面应用改进
- **项目导航** (#18502):使用键盘快捷键(cmd+option+方向键)可在项目间更快导航。
- **文件上传** (#18403):桌面应用现支持文件上传时的文件类型筛选和多文件选择。
- **审查面板访问** (#18251):用户现可在开始会话前访问审查面板,当尚无更改时会显示适当的空状态。
- **工作区切换** (#18207):修复了在工作区或项目间切换时的视觉闪烁问题——界面现可平滑过渡,导航期间不再显示加载指示器。
- **侧边栏调整大小** (#18647):修复了侧边栏在调整至最小宽度时会自动关闭的问题。侧边栏现会在最小宽度处固定,而非关闭。
- **加载状态** (#18501):改进了应用内加载状态管理,在异步操作期间提供更流畅、更一致的反馈。
- **控制台登录** (#18281):修复了控制台设备登录以正确处理待定授权状态,确保登录过程在等待批准时继续轮询而非失败。
## 终端与编辑器
- **终端重命名** (#18263):修复了从上下文菜单重命名终端的问题,此前因下拉菜单焦点冲突导致失败。
- **终端错误恢复** (#17591):修复了当服务器对终端会话返回“未找到”错误时终端会无响应的问题。终端现能正确重新初始化并保持交互。
- **粘贴操作** (#18079):粘贴操作现保留原始字节数据,从而在粘贴到终端时能正确处理二进制内容和特殊字符。
- **防止重复提交** (#18148):修复了快速按 Enter 键可能导致提示多次提交的问题。现会忽略重复的 Enter 提交。
## 提供商与模型
- **xAI 响应 API** (#18175):通过切换到支持加密内容的响应 API,提升了 xAI 推理模型在长多轮对话中的性能。
- **GPT 模型列表** (#18101):使用最新可用模型更新了 GPT 订阅模型列表。
- **Vertex AI 修复** (#18283):通过仅对支持推理能力的模型应用思考配置,修复了非思考模型(如 gemini-2.0-flash)的 Vertex AI 错误。
- **vLLM 上下文溢出** (#17763):改进了 vLLM 上下文溢出错误的错误检测,在推理期间超出上下文限制时提供更清晰的反馈。
- **成本块格式** (#16817):修复了流式错误,其中成本数据以上游提供商格式而非客户端请求格式发送,防止在混合提供商格式时出现验证错误。
## 审查与协作
- **审查评论** (#18406):文件审查评论现点击即提交,且显示时无水平溢出,与差异审查评论的行为一致。
- **文件附件** (#17815):修复了在重用或复刻带有附件的先前提示时,文件和图像附件会静默丢失的问题。
- **快照还原** (#18093):修复了快照还原问题,其中重叠的文件更改可能应用错误的补丁哈希,并解决了隐藏文件排序中的错误。
## 身份验证与账户
- **陈旧凭据** (#18426):修复了重新登录时服务器 URL 和邮箱陈旧的问题。此前,登录到不同服务器可能因前一环境的缓存凭据而失败。
- **Codex 访问** (#18337):OAuth 计划用户现可不受先前白名单限制,自由访问 codex 指令。
## UI/UX 改进
- **主题改进** (#17958):改善了 UI 对比度并降低了悬停/激活元素的亮度,以提高可读性并减少眼部疲劳。
- **系统提示** (#18140):通过精简的回退系统提示移除了不必要的样板文本,使 AI 响应更简洁。
- **代理与技能排序** (#18261):通过稳定系统提示中代理和技能的顺序以改进提示缓存,从而使 AI 响应更一致。
## 错误修复
- **远程服务器切换** (#17214):修复了在远程服务器间切换时导致陈旧项目数据、终端生成失败以及侧边栏显示错误项目的问题。
- **Windows 命令** (#18010):修复了 Windows 上 shim(.cmd/.bat 文件)的命令执行,解决了升级、卸载、IDE 安装和 LSP 启动期间的失败问题。
- **工具发现** (#18320):通过将缓存 bin 目录包含在 PATH 查找中,修复了 npm 安装包的工具发现,确保本地安装的工具能被正确找到。
- **错误消息** (#18165):工具和会话错误消息现以清晰、人类可读的格式显示,而非显示令人困惑的技术错误字符串。
- **块超时** (#18264):默认禁用块超时以防止跨各种用例的问题;用户仍可在需要时在配置中启用它。
- **事件排序** (#18259):实时流中的事件现按顺序处理,确保一致且可预测的事件显示,而非可能乱序传递。
- **桌面稳定性** (#18300):通过更可靠的工作区和会话路由提升了桌面稳定性,修复了侧边栏选择不匹配以及切换项目时的竞争条件。
**感谢 16 位社区贡献者:**
- @jquense:
- fix(opencode): preserve prompt tool enables with empty agent permissions (#17064)
- @bugulo:
- fix(app): agent switch should not reset thinking level (#17470)
- @ghost91-:
- fix(core): consider code: context_length_exceeded as context overflow in API call errors (#17748)
- fix(core): detect vLLM context overflow errors (#17763)
- @Tarquinen:
- fix(opencode): apply message transforms during compaction (#17823)
- @AbigailJixiangyuyu:
- fix(windows): restore /editor support on Windows (#17146)
- @altendky:
- fix(tui): check for selected text instead of any selection in dialog escape handler (#16779)
- docs: add describe annotation to snapshot config field (#17861)
- @OpeOginni:
- docs: mark tools config as deprecated (#17951)
- docs(cli): update experimental TY LSP flag description for clarity across multiple languages (#14770)
- fix(desktop): fix error handling by adding errorName function to identify NotFoundError rather than statusCode (#17591)
- fix(desktop): remote server switching (#17214)
- @ariane-emory:
- fix: Add apply_patch to EDIT_TOOLS filter (#18009)
- @anduimagui:
- fix(app): ignore repeated Enter submits in prompt input (#18148)
- @jorgitin02:
- fix: stabilize agent and skill ordering in prompt descriptions (#18261)
- @Jaaneek:
- feat: switch xai provider to responses API (#18175)
- @mchenco:
- docs: add Cloudflare Workers AI provider (#18322)
- @vglafirov:
- feat: enable GitLab Agent Platform with workflow model discovery (#18014)
- @github-actions[bot]:
- Update VOUCHED list
- @Protocol-zero-0:
- fix(provider): only set thinkingConfig for models with reasoning capability (#18283)
- @neriousy:
- fix(app): terminal rename from context menu (#18263)
## 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 - the interface now transitions smoothly without showing loading spinners during navigation.
- **Sidebar Resize** (#18647): Fixed issue where sidebar would automatically close when being resized to minimum width. The sidebar now clamps at minimum width instead of closing.
- **Loading States** (#18501): Improved loading state management across the app for smoother, more consistent feedback during async operations.
- **Console Login** (#18281): Fixed console device login to properly handle pending authorization states, ensuring the login process continues polling instead of failing while waiting for approval.
## Terminal & Editor
- **Terminal Rename** (#18263): Fixed terminal renaming from the context menu, which previously failed due to dropdown focus conflicts.
- **Terminal Error Recovery** (#17591): Fixed an issue where terminals would become unresponsive when the server returned a "not found" error for terminal sessions. Terminals now properly reinitialize and remain interactive.
- **Paste Operations** (#18079): Paste operations now preserve raw byte data, enabling proper handling of binary content and special characters when pasting into the terminal.
- **Prevent Duplicate Submits** (#18148): Fixed issue where rapidly pressing Enter could submit prompts multiple times. Now ignores repeated Enter submits.
## Providers & Models
- **xAI Responses API** (#18175): Improved xAI reasoning models performance in long multi-turn conversations by switching to the responses API with encrypted content support.
- **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 (like gemini-2.0-flash) by only applying thinking configuration to models that support reasoning capabilities.
- **vLLM Context Overflow** (#17763): Improved error detection for vLLM context overflow errors, providing clearer feedback when context limits are exceeded during inference.
- **Cost Chunk Format** (#16817): Fixed streaming error where cost data was sent in upstream provider format instead of client-requested format, preventing validation errors when mixing provider formats.
## Review & Collaboration
- **Review Comments** (#18406): Review file comments now submit when clicked and display without horizontal overflow, matching the behavior of diff review comments.
- **File Attachments** (#17815): Fixed file and image attachments being silently lost when reusing or forking a previous prompt with attachments.
- **Snapshot Revert** (#18093): Fixed snapshot revert issues where overlapping file changes could apply the wrong patch hash, and resolved a sorting bug in hidden file ordering.
## Authentication & Account
- **Stale Credentials** (#18426): Fixed stale server URL and email on re-login. Previously, logging into a different server could fail due to cached credentials from a previous environment.
- **Codex Access** (#18337): OAuth plan users can now access codex instructions freely without the previous whitelisting restrictions.
## UI/UX Improvements
- **Theme Improvements** (#17958): Improved UI contrast and reduced brightness of hover/active elements for better readability and reduced eye strain.
- **System Prompt** (#18140): Cleaner AI responses with a streamlined fallback system prompt that removes unnecessary boilerplate text.
- **Agent & Skill Ordering** (#18261): More consistent AI responses with improved prompt caching by stabilizing the order of agents and skills in system prompts.
## Bug Fixes
- **Remote Server Switching** (#17214): Fixed issues when switching between remote servers that caused stale project data, broken terminal spawning, and sidebar showing incorrect projects.
- **Windows Commands** (#18010): Fixed Windows command execution for shims (.cmd/.bat files) to resolve failures during upgrades, uninstalls, IDE installs, and LSP launches.
- **Tool Discovery** (#18320): Fixed tool discovery for npm-installed packages by including the cache bin directory in PATH lookups, ensuring locally installed tools are properly found.
- **Error Messages** (#18165): Tool and session error messages now display in clean, human-readable format instead of showing confusing technical error strings.
- **Chunk Timeout** (#18264): Disabled chunk timeout by default to prevent issues across various use cases; users can still enable it in their configuration if needed.
- **Event Ordering** (#18259): Events in real-time streams now process sequentially in order, ensuring consistent and predictable event display instead of potentially out-of-order delivery.
- **Desktop Stability** (#18300): Improved desktop stability with more reliable workspace and session routing, fixing sidebar selection mismatches and race conditions when switching projects.
**Thank you to 16 community contributors:**
- @jquense:
- fix(opencode): preserve prompt tool enables with empty agent permissions (#17064)
- @bugulo:
- fix(app): agent switch should not reset thinking level (#17470)
- @ghost91-:
- fix(core): consider code: context_length_exceeded as context overflow in API call errors (#17748)
- fix(core): detect vLLM context overflow errors (#17763)
- @Tarquinen:
- fix(opencode): apply message transforms during compaction (#17823)
- @AbigailJixiangyuyu:
- fix(windows): restore /editor support on Windows (#17146)
- @altendky:
- fix(tui): check for selected text instead of any selection in dialog escape handler (#16779)
- docs: add describe annotation to snapshot config field (#17861)
- @OpeOginni:
- docs: mark tools config as deprecated (#17951)
- docs(cli): update experimental TY LSP flag description for clarity across multiple languages (#14770)
- fix(desktop): fix error handling by adding errorName function to identify NotFoundError rather than statusCode (#17591)
- fix(desktop): remote server switching (#17214)
- @ariane-emory:
- fix: Add apply_patch to EDIT_TOOLS filter (#18009)
- @anduimagui:
- fix(app): ignore repeated Enter submits in prompt input (#18148)
- @jorgitin02:
- fix: stabilize agent and skill ordering in prompt descriptions (#18261)
- @Jaaneek:
- feat: switch xai provider to responses API (#18175)
- @mchenco:
- docs: add Cloudflare Workers AI provider (#18322)
- @vglafirov:
- feat: enable GitLab Agent Platform with workflow model discovery (#18014)
- @github-actions[bot]:
- Update VOUCHED list
- @Protocol-zero-0:
- fix(provider): only set thinkingConfig for models with reasoning capability (#18283)
- @neriousy:
- fix(app): terminal rename from context menu (#18263)