← 返回更新日志

OpenCode v2.2.3

2026-10-30 · GitHub 原文
### 亮点 - **在 OpenCode 中使用 Claude Code**:安装 Claude Code,运行 `claude auth login`,然后在 `/connect` 中选择 **Claude Agent**,即可使用你的 Claude Code 登录信息和模型。([#58782](https://github.com/anomalyco/opencode/pull/58782)) - **提升桌面端长会话性能**:流式回复和长对话现在所需的渲染工作大幅减少。([#60489](https://github.com/anomalyco/opencode/pull/60489)、[#60521](https://github.com/anomalyco/opencode/pull/60521)、[#60513](https://github.com/anomalyco/opencode/pull/60513)、[#60481](https://github.com/anomalyco/opencode/pull/60481)) - **桌面端稳定性修复**:修复了侧边面板标签页、重复出现的“Session not found”提示,以及通过 HTTP 使用**打开文件**功能的问题。([#60430](https://github.com/anomalyco/opencode/pull/60430)、[#60436](https://github.com/anomalyco/opencode/pull/60436)、[#60459](https://github.com/anomalyco/opencode/pull/60459)、[#60462](https://github.com/anomalyco/opencode/pull/60462)) ### 破坏性变更 #### TUI 插件需要 OpenTUI 0.8 `@opencode/plugin` 现在需要 0.8.0 或更高版本的 `@opentui/core` 和 `@opentui/solid`。在 OpenTUI 0.8 中,ScrollBox 的 `wrapper`、`viewport`、`content` 和滚动条现在是外观对象,而不是可渲染对象;自定义 `RenderContext` 必须实现 `clock` 和 `onAnimationTick`。请参阅 [OpenTUI 0.8.0 发行说明](https://opentui.com/docs/releases/0.8.0)。([#60385](https://github.com/anomalyco/opencode/pull/60385)) #### 托管策略:`integration.use` 仅涵盖集成 `integration.use` 现在控制可以使用哪些集成账户,新增的 `mcp.use`、`skill.use` 和 `plugin.use` 操作则分别控制 MCP 服务器、技能和插件。带有旧版 `mcp:`、`skill:` 和 `plugin:` 资源前缀的规则会自动转换,但不带资源前缀的 `integration.use` 规则不再适用于 MCP 服务器、技能或插件。([#60315](https://github.com/anomalyco/opencode/pull/60315)) ### 核心 #### 改进 - 新增内置的 **Claude Agent** 提供商。安装 Claude Code,运行 `claude auth login`,然后在 `/connect` 中选择 **Claude Agent**;可以使用 `OPENCODE_CLAUDE_PATH` 覆盖 Claude 可执行文件的路径。感谢 [@Tarquinen](https://github.com/Tarquinen)。([#58782](https://github.com/anomalyco/opencode/pull/58782)) - 为实验性计划任务新增 Code Mode JavaScript 检查,包括经过静态授权的工具调用、持久化状态和自定义唤醒消息。([#60140](https://github.com/anomalyco/opencode/pull/60140)) - 新增独立的托管策略操作,用于连接集成,以及使用集成、MCP 服务器、技能和插件。([#60315](https://github.com/anomalyco/opencode/pull/60315)) #### 错误修复 - 保留插件提供的模型变体,并将动态提供商回退延迟到外部 SDK 钩子运行之后。([#60097](https://github.com/anomalyco/opencode/pull/60097)、[#60380](https://github.com/anomalyco/opencode/pull/60380)) - 在 MCP 失败时保留权限原因和反馈,并使 Code Mode 失败与直接工具调用失败保持一致。([#60102](https://github.com/anomalyco/opencode/pull/60102)、[#60109](https://github.com/anomalyco/opencode/pull/60109)) - 修复无效的 Code Mode 计划任务检查,使其在创建时立即失败,并让已有的无效检查暂停,而不是重复执行。([#60349](https://github.com/anomalyco/opencode/pull/60349)) - 删除会话时,同时移除该会话的持久化终端。([#60322](https://github.com/anomalyco/opencode/pull/60322)) - 防止嵌套工具的进度替换父级 `execute` 调用行。([#60480](https://github.com/anomalyco/opencode/pull/60480)) ### TUI #### 改进 - 当启用 `experimental.media_blob` 时,为已存储的图像引用新增延迟加载功能。图像仅在预览时下载,而撤销、还原、分叉和提示词恢复操作可以安全地恢复引用的附件。([#60116](https://github.com/anomalyco/opencode/pull/60116)) - 在新设计中,为编辑器内选中的建议项新增了不同的标记。([#60393](https://github.com/anomalyco/opencode/pull/60393)) #### 错误修复 - 修复没有起始 `<?php` 标签的代码块无法正确进行 PHP 语法高亮的问题。([#60359](https://github.com/anomalyco/opencode/pull/60359)) - 除非 `#` 引入有效的行范围,否则在文件搜索路径中保留 `#`。([#60336](https://github.com/anomalyco/opencode/pull/60336)) - 配置重新加载后继续保留已配置的默认光标样式。([#60302](https://github.com/anomalyco/opencode/pull/60302)) - 当选择对话框中没有查询内容时,使搜索光标与高亮行保持一致。([#60310](https://github.com/anomalyco/opencode/pull/60310)) ### 桌面端 #### 改进 - 在**设置 → 通用**下新增桌面端拼写检查开关,并在 Windows 和 Linux 上新增系统语言词典选择功能。([#59129](https://github.com/anomalyco/opencode/pull/59129)) - 支持在编辑器中使用 `PageUp` 和 `PageDown` 对时间线进行翻页,而不会移动草稿光标或焦点。([#59426](https://github.com/anomalyco/opencode/pull/59426)) - 在**设置 → 通知 → 问题**下新增可独立配置的问题通知和声音。感谢 [@YuriNek0](https://github.com/YuriNek0)。([#60358](https://github.com/anomalyco/opencode/pull/60358)) - 在新建会话控件中新增独立的项目和工作树操作。([#60486](https://github.com/anomalyco/opencode/pull/60486)) - 在**设置 → 关于**中新增一键复制版本号功能。([#52356](https://github.com/anomalyco/opencode/pull/52356)) - 在工作区设置中对已添加的项目进行分组。([#60221](https://github.com/anomalyco/opencode/pull/60221)) - 使问题回答文本可以被选中。([#60372](https://github.com/anomalyco/opencode/pull/60372)) - 调整会话标题栏,使其适配较窄的时间线宽度。([#59512](https://github.com/anomalyco/opencode/pull/59512)) #### 错误修复 - 侧边面板标签页现在可以再次关闭,“新建标签页”启动器也能响应点击,修复了 2.2.2 中的回归问题。([#60430](https://github.com/anomalyco/opencode/pull/60430)、[#60436](https://github.com/anomalyco/opencode/pull/60436)) - 侧边面板中的**打开文件**功能现在可以再次在通过 HTTP 访问的 Web 应用中使用。([#60462](https://github.com/anomalyco/opencode/pull/60462)) - 确保在移动端仍可访问问题选项和提交控件。([#60335](https://github.com/anomalyco/opencode/pull/60335)) - 打开会话时,保留同时出现的请求通知以及收件箱的滚动位置。([#60378](https://github.com/anomalyco/opencode/pull/60378)、[#60356](https://github.com/anomalyco/opencode/pull/60356)) - 修复连续拖放文件时的问题,确保每个文件引用都会插入编辑器。([#60463](https://github.com/anomalyco/opencode/pull/60463)) - 当结果在静止指针下更新时,保持当前的 `@` 选项和命令菜单选项稳定。([#59434](https://github.com/anomalyco/opencode/pull/59434)、[#60368](https://github.com/anomalyco/opencode/pull/60368)) - 修复使用 `⌘W` 关闭侧边面板,以及没有可关闭标签页时恢复焦点的问题。([#59002](https://github.com/anomalyco/opencode/pull/59002)、[#60435](https://github.com/anomalyco/opencode/pull/60435)) - 在会话加载期间保持移动端会话抽屉处于打开状态。([#59427](https://github.com/anomalyco/opencode/pull/59427)) - 在之前保存的显示器上恢复最大化窗口,并在共享会话窗口之间保留渲染器权限。([#60482](https://github.com/anomalyco/opencode/pull/60482)、[#60458](https://github.com/anomalyco/opencode/pull/60458)) - 修复长会话中的时间线增长、缩放结束后的滚动、高亮显示和 DOM 观察器性能问题。([#60489](https://github.com/anomalyco/opencode/pull/60489)、[#60481](https://github.com/anomalyco/opencode/pull/60481)、[#60488](https://github.com/anomalyco/opencode/pull/60488)、[#60513](https://github.com/anomalyco/opencode/pull/60513)、[#60521](https://github.com/anomalyco/opencode/pull/60521)) - 继续显示发布日期未知的模型。感谢 [@joe-ieta](https://github.com/joe-ieta)。([#60496](https://github.com/anomalyco/opencode/pull/60496)) - 修复对通过变体或兼容性元数据公开推理能力的模型进行推理能力检测的问题。([#60457](https://github.com/anomalyco/opencode/pull/60457)) - 在收到 `404` 后移除已删除的会话,而不是重试或重复显示错误。([#60459](https://github.com/anomalyco/opencode/pull/60459)) - 修复 macOS 应用程序图标,并将所需的文件夹访问说明添加到应用程序包。([#60020](https://github.com/anomalyco/opencode/pull/60020)、[#60503](https://github.com/anomalyco/opencode/pull/60503)) ### SDK #### 改进 - 当生成、对象生成或工具循环失败时,在 `AIError.partial` 中保留部分 `LLMResponse` 输出。([#60477](https://github.com/anomalyco/opencode/pull/60477)) - 围绕 `tool(...)` 统一 Effect 和 Promise 工具声明,支持可选的输出架构,以及可执行工具或仅声明工具。([#60407](https://github.com/anomalyco/opencode/pull/60407)) - 为 Responses 路由新增类型化的 OpenRouter `debug`、`models`、`plugins`、`provider` 和 `user` 选项。([#60044](https://github.com/anomalyco/opencode/pull/60044)) - 为 Promise 客户端新增 `withMediaRefs`、`mediaHashFromUri` 和 `MediaRequestOptions`,用于实验性的已存储媒体引用。([#60116](https://github.com/anomalyco/opencode/pull/60116)) #### 错误修复 - 使 Promise AI 客户端与 Effect API 更加一致,并在循环中接受类型化工具。([#60465](https://github.com/anomalyco/opencode/pull/60465)、[#60390](https://github.com/anomalyco/opencode/pull/60390)) - 对于 `execute` 处理程序可能抛出异常的工具,继续使其可供 AI 客户端使用。([#60431](https://github.com/anomalyco/opencode/pull/60431)) - 当提供商返回未知的中间状态时,继续轮询排队中的媒体生成任务。([#59988](https://github.com/anomalyco/opencode/pull/59988)) - 停止在 OpenAI Responses 请求中随 `file_url` 一起发送不兼容的 `filename`。([#60382](https://github.com/anomalyco/opencode/pull/60382)) ### 扩展 #### 改进 - 为进程守护程序新增持久化终端重命名功能,包括能力发现,以及在清除前覆盖 Shell 所提供标题的用户标题。([#60324](https://github.com/anomalyco/opencode/pull/60324)) #### 错误修复 - 在 Code Mode 文本编码中保留 `null` 值。感谢 [@xiajiahang](https://github.com/xiajiahang)。([#57639](https://github.com/anomalyco/opencode/pull/57639)) - 整理了嵌套的“扩展”菜单。([#59468](https://github.com/anomalyco/opencode/pull/59468))