Skip to content

Releases: heimoshuiyu/opencode

OpenCode v1.15.3-hmsy

17 May 14:02
34a34df

Choose a tag to compare

Major Features

Desktop Pet

Added an Electron desktop pet application (@opencode-ai/pet) that displays a Live2D animated character reacting in real-time to your coding activity. The pet connects to OpenCode via SSE, monitors 20+ event types, and transitions through 17 distinct animation states.

  • Live2D animation engine — powered by PixiJS + Cubism 4 with 412+ curated motions from the PJSK Miku model, bongo-cat, and Hiyori skins
  • Two-tier state system — Activity states (idle, thinking, generating, etc.) loop continuously while Reaction states (file-written, completed, error, etc.) auto-revert after a timeout, preventing animation conflicts
  • AI comment bubble — the pet has its own persistent OpenCode session that generates contextual commentary about your work, displayed as speech bubbles
  • Direct chat — click the pet to talk to it directly; right-click for a settings panel with skin switching, motion tester, and scale control
  • Cooldown queue — buffers rapid SSE state changes (500ms/3500ms) with last-write-wins to prevent animation flicker
  • Custom pet:// protocol — serves Live2D model assets securely with path-traversal protection
  • Transparent click-through — non-pet areas pass clicks through to windows below via dynamic hit-testing

Voice Input

Added a complete voice input pipeline allowing users to dictate text into the prompt using their microphone. Works across both the web app and terminal TUI.

  • Dual transcription backend — supports LALM (Large Audio Language Model, using multimodal LLMs like GPT-4o Audio) and traditional Whisper API, selectable via config
  • Automatic audio conversion — uses ffmpeg to convert browser WebM/Opus recordings to compatible formats
  • HTTP API endpointPOST /audio/transcribe with base64 audio transport and abort signal propagation
  • Web app integration — SolidJS createVoiceInput() primitive with MediaRecorder API, showing mic/stop/spinner states with retry UI
  • TUI integrationuseVoice() hook for the terminal UI with recording state management

Background Job Management for Bash Commands

Implemented a complete background job system allowing the AI agent to start, monitor, and control long-running shell commands.

  • Background execution — bash tool now supports a background: true parameter, returning a job ID immediately
  • Auto-conversion — foreground commands exceeding 60 seconds are automatically converted to background jobs, preventing tool timeouts
  • Job lifecycle toolsjob_list to view all jobs, job_output for offset-based incremental output reading, job_kill for graceful (SIGTERM) or forced (SIGKILL) termination
  • Concurrency control — maximum 50 concurrent jobs per project instance
  • Auto-cleanup — completed jobs are retained for 8 hours then automatically cleaned
  • Effect-based architecture — uses SynchronizedRef for thread-safe state, forked fibers for output streaming, and Deferred for completion signaling

Improvements

VSCode Extension: WebView Migration

Replaced the VSCode extension's terminal-based approach with a WebView panel hosting the OpenCode web UI via iframe. This provides a richer, more interactive experience compared to the previous terminal TUI mode.

  • Runs opencode serve as a headless background process on a random port
  • Embeds the full web UI in a WebView with CSP locked to localhost
  • Reuses server and panel per workspace folder
  • Supports file reference injection from the active editor

Structured Output Compatibility

Removed the toolChoice: "required" parameter from structured output requests, improving compatibility with LLM providers that don't support the tool_choice parameter. The system prompt and tool definition alone are sufficient to guide the model.

Bug Fixes

PWA Status Bar Theme Sync

Fixed the browser/PWA status bar theme-color meta tag not updating when switching between light and dark themes. The color is now dynamically applied through the theme context, with a preload script preventing a flash of incorrect color on initial page load.

Downloads

Platform Architecture File
Linux x64 opencode-linux-x64.zst
Linux ARM64 opencode-linux-arm64.zst
macOS x64 opencode-darwin-x64.zst
macOS ARM64 opencode-darwin-arm64.zst
Windows x64 opencode-windows-x64.zip

OpenCode v1.14.41-hmsy

09 May 10:27
7587904

Choose a tag to compare

What's New in v1.14.41-hmsy

🎤 Voice Input

Speak to OpenCode instead of typing. The new voice input feature supports two transcription backends:

  • Whisper API — Send audio to any Whisper-compatible endpoint (OpenAI, local, etc.)
  • LALM (Large Audio Language Model) — Use audio-capable LLMs like gpt-4o-audio-preview or gemini-3-flash for transcription with session-aware context

Available in both the Web UI (mic button) and TUI (<leader>v keybind). Audio is automatically converted via ffmpeg for format compatibility. The JS SDK also exposes a new Audio.transcribe() method for programmatic use.

🐱 Desktop Pet

A Live2D desktop pet that lives on your desktop and reacts to your coding activity in real-time:

  • 3 skins: Miku (412+ motions), Bongo Cat, Hiyori
  • 17 pet states across activity (idle, thinking, generating, acting...) and reaction (greeting, completed, error...) categories
  • AI comment bubbles — the pet runs its own agent (deepseek-v4-flash) and comments on your work
  • Direct chat — click the pet to chat directly
  • Customizable — drag to reposition, adjustable scale (0.5x–3x), skin hot-swap, always-on-top toggle
  • Built with Electron + PixiJS + Live2D Cubism 4, connects to OpenCode via SSE

🔧 Background Job Management

Long-running bash commands are now automatically managed:

  • Commands exceeding 60 seconds are automatically converted to background jobs without killing them
  • Explicit background: true parameter to spawn directly into background
  • Three new tools: job_list, job_output, job_kill
  • Real-time output streaming with up to 300s wait
  • Graceful kill with SIGTERM → SIGKILL escalation
  • Max 50 concurrent jobs with 8-hour auto-cleanup

🦊 GitLab OpenCode Agent

Self-hosted GitLab integration for AI-powered code review:

  • Webhook service that triggers on @opencode mentions in MR comments
  • Automatically clones MRs, runs code review, posts comments, and commits fixes
  • Docker-ready with docker-compose.yml for easy deployment
  • Full SDK sub-package with generated API clients

🖥️ VSCode Extension Refactor

The VSCode extension has been completely reworked:

  • Replaced terminal-based TUI with a WebView panel
  • Now spawns opencode serve as a headless background process
  • Loads the full web UI in a VSCode WebView for a richer experience
  • Supports multi-root workspaces

Bug Fixes

  • Token validation crash fix: Clamped token values to non-negative to prevent NonNegativeInt schema validation errors that could permanently block session loading
  • Theme-color sync: Browser <meta name="theme-color"> now stays in sync with the active theme, preventing white flash on load
  • Auth bypass for static assets: Frontend static paths are now exempt from authentication, allowing the web UI login page to load correctly
  • Structured output compatibility: Removed toolChoice: "required" from structured output calls for better LLM API compatibility

Improvements

  • Simplified shell prompt: Removed verbose git/PR workflow instructions from bash tool system prompt, reducing token usage per invocation
  • SDK updates: Added audio transcription types and voice configuration schemas to the JavaScript SDK

Downloads

Platform Architecture File
Linux x86_64 opencode-linux-x64.zst
Linux ARM64 opencode-linux-arm64.zst
macOS x86_64 opencode-darwin-x64.zst
macOS ARM64 (Apple Silicon) opencode-darwin-arm64.zst
Windows x86_64 opencode-windows-x64.zip

Note: Decompress .zst files with zstd -d <file>.zst and .zip files with your preferred unzip tool.

OpenCode v1.14.33-hmsy

04 May 05:53
b787dd1

Choose a tag to compare

🎉 OpenCode v1.14.33-hmsy

基于 v1.14.33 构建,包含以下自定义增强功能。


🚀 新功能

🐱 桌面宠物 (Desktop Pet)

新增 packages/pet 包,基于 Electron + Live2D 的桌面宠物应用:

  • 三种 Live2D 皮肤:Bongo Cat(打字动画)、Hiyori(日向)、Miku(初音未来,含 200+ 动作文件)
  • 键盘互动:Bongo Cat 皮肤根据实际按键显示对应的键盘按键动画
  • 丰富的表情和动作系统:每个皮肤配有独立的 persona 配置和多组动作映射
  • 桌面窗口:可拖拽、置顶的桌面伴侣窗口

🎤 语音输入 (Voice Input)

新增完整的语音输入功能,支持通过麦克风录音并自动转录为文本:

  • 双引擎支持:Whisper API(默认)和 LALM(Large Audio Language Model,如 Gemini、GPT-4o-audio)
  • TUI 集成:通过快捷键触发录音,支持 ffmpeg/sox/arecord 等多种录音工具,显示录音/转录状态
  • Web UI 集成:麦克风按钮(Cmd+Shift+M),使用浏览器原生 MediaRecorder API
  • 服务端 APIPOST /voice/transcribe 端点,支持 base64 音频数据
  • 灵活配置:可自定义 API 端点、模型、语言、系统提示词等

Whisper 配置示例

{
  "$schema": "https://opencode.ai/config.json",
  "voice": {
    "type": "whisper",
    "whisper": {
      "url": "http://127.0.0.1:5000/v1/audio/transcriptions",
      "apiKey": "{env:OPENCODE_WHISPER_API_KEY}",
      "model": "whisper-1",
      "language": "en"
    }
  }
}

LALM 配置示例(Gemini、GPT-4o-audio 等):

{
  "$schema": "https://opencode.ai/config.json",
  "voice": {
    "type": "lalm",
    "lalm": {
      "model": "opencode/gemini-3-flash",
      "system": "You are a professional speech-to-text transcriber. Your task is to transcribe the audio into text.",
      "prompt": "Keep technical terms unchanged."
    }
  }
}

配置选项

选项 说明
type 转录引擎(whisperlalm
whisper.url Whisper 转录端点 URL
whisper.apiKey Whisper 服务 API Key
whisper.model Whisper 模型名(默认 whisper-1
whisper.language 语言提示(如 enzh
lalm.model 大音频语言模型,格式 provider/model(如 opencode/gemini-3-flash
lalm.prompt 基础提示词
lalm.system 系统提示词

⚙️ 后台任务管理 (Background Job Management)

为 Bash 工具新增后台任务管理系统,支持长时间运行的命令:

  • 显式后台执行:通过 background: true 参数启动后台命令
  • 自动转换:前台命令运行超过 60 秒自动转为后台任务
  • 生命周期管理:任务状态追踪、输出收集、自动清理(8 小时)
  • 三个新工具job_list(列出任务)、job_output(获取输出)、job_kill(终止任务)
  • 事件驱动:基于 EventEmitter 的实时更新通知

🦊 GitLab OpenCode Agent

新增可自托管的 GitLab Webhook 服务,实现 AI 驱动的代码审查:

  • MR 评论中 @opencode 触发自动审查、代码修复和评论回复
  • 串行任务队列、MR diff 解析、自动 git push 代码修改
  • Docker 部署支持,内置 SDK 客户端
  • 多项目配置,自定义 mention 触发词和模型

🔧 重构

VSCode 扩展:WebView 替代终端模式

VSCode 扩展不再在终端中启动 TUI,改为启动 opencode serve 无头进程并通过 WebView 面板加载 Web UI:

  • 随机端口分配(16384-65535),自动健康检查
  • WebView iframe 嵌入,CSP 策略配置
  • 文件引用注入:通过 API 向 Webview 注入当前编辑器文件路径

精简 Bash 工具提示词

大幅简化 bash.txt 中的工具使用说明,移除冗余的验证步骤、Git 提交指南和 PR 创建指南,保留核心说明。


🐛 Bug 修复

  • 移除结构化输出的 toolChoice: 'required':提升 LLM API 兼容性,某些 API 不支持 tool_choice 参数
  • 同步 theme-color 元数据与当前主题:修复浏览器/移动端地址栏颜色与实际主题不同步的问题
  • 前端静态资源路径绕过认证:允许未认证请求访问 Web UI 静态文件,确保页面能正常加载后再通过应用层认证

📦 下载

平台 架构 下载链接
Linux x64 opencode-linux-x64.zst
Linux arm64 opencode-linux-arm64.zst
macOS x64 opencode-darwin-x64.zst
macOS arm64 opencode-darwin-arm64.zst
Windows x64 opencode-windows-x64.zip

解压说明

  • .zst 文件:zstd -d opencode-<platform>.zst -o opencode && chmod +x opencode
  • .zip 文件:7z x opencode-windows-x64.zip

OpenCode v1.14.31-hmsy

02 May 09:11
c2e9603

Choose a tag to compare

🎉 OpenCode v1.14.31-hmsy

基于 v1.14.31 构建,包含以下自定义增强功能。


🚀 新功能

语音输入 (Voice Input)

新增完整的语音输入功能,支持通过麦克风录音并自动转录为文本:

  • 双引擎支持:Whisper API(默认)和 LALM(Large Audio Language Model,如 Gemini、GPT-4o-audio)
  • TUI 集成:通过快捷键触发录音,支持 ffmpeg/sox/arecord 等多种录音工具,显示录音/转录状态
  • Web UI 集成:麦克风按钮(Cmd+Shift+M),使用浏览器原生 MediaRecorder API
  • 服务端 APIPOST /voice/transcribe 端点,支持 base64 音频数据
  • 灵活配置:可自定义 API 端点、模型、语言、系统提示词等

后台任务管理 (Background Job Management)

为 Bash 工具新增后台任务管理系统,支持长时间运行的命令:

  • 显式后台执行:通过 background: true 参数启动后台命令
  • 自动转换:前台命令运行超过 60 秒自动转为后台任务
  • 生命周期管理:任务状态追踪、输出收集、自动清理(8 小时)
  • 三个新工具job_list(列出任务)、job_output(获取输出)、job_kill(终止任务)
  • 事件驱动:基于 EventEmitter 的实时更新通知

GitLab OpenCode Agent

新增可自托管的 GitLab Webhook 服务,实现 AI 驱动的代码审查:

  • MR 评论中 @opencode 触发自动审查、代码修复和评论回复
  • 串行任务队列、MR diff 解析、自动 git push 代码修改
  • Docker 部署支持,内置 SDK 客户端
  • 多项目配置,自定义 mention 触发词和模型

🔧 重构

VSCode 扩展:WebView 替代终端模式

VSCode 扩展不再在终端中启动 TUI,改为启动 opencode serve 无头进程并通过 WebView 面板加载 Web UI:

  • 随机端口分配(16384-65535),自动健康检查
  • WebView iframe 嵌入,CSP 策略配置
  • 文件引用注入:通过 API 向 Webview 注入当前编辑器文件路径

精简 Bash 工具提示词

大幅简化 bash.txt 中的工具使用说明,移除冗余的验证步骤、Git 提交指南和 PR 创建指南,保留核心说明。


🐛 Bug 修复

  • 移除结构化输出的 toolChoice: 'required':提升 LLM API 兼容性,某些 API 不支持 tool_choice 参数
  • 同步 theme-color 元数据与当前主题:修复浏览器/移动端地址栏颜色与实际主题不同步的问题
  • 前端静态资源路径绕过认证:允许未认证请求访问 Web UI 静态文件,确保页面能正常加载后再通过应用层认证

📦 下载

平台 架构 下载链接
Linux x64 opencode-linux-x64.zst
Linux arm64 opencode-linux-arm64.zst
macOS x64 opencode-darwin-x64.zst
macOS arm64 opencode-darwin-arm64.zst
Windows x64 opencode-windows-x64.zip

解压说明

  • .zst 文件:zstd -d opencode-<platform>.zst -o opencode && chmod +x opencode
  • .zip 文件:7z x opencode-windows-x64.zip

OpenCode v1.14.29-hmsy

29 Apr 20:31
f157ae2

Choose a tag to compare

OpenCode v1.14.29-hmsy

🎙️ 语音输入

  • 新增语音输入功能:支持通过麦克风进行语音输入,集成 Whisper 和 LALM 两种语音识别引擎
  • Web UI 和 TUI 均支持语音输入,新增麦克风图标和快捷键绑定
  • 新增语音相关配置项(voice.typevoice.whispervoice.lalm),可在 opencode.json 中自定义

配置示例 — 使用 LALM(大音频语言模型):

{
  "voice": {
    "type": "lalm",
    "lalm": {
      "model": "opencode-go/mimo-v2.5"
    }
  }
}

配置示例 — 使用 Whisper:

{
  "voice": {
    "type": "whisper",
    "whisper": {
      "apiKey": "sk-xxx",
      "url": "https://api.openai.com/v1/audio/transcriptions",
      "model": "whisper-1",
      "language": "zh"
    }
  }
}

voice.type 默认为 "whisper"。Whisper 模式需要配置 apiKey;LALM 模式需要配置 model(格式为 provider/model),使用支持音频输入的模型即可。

🤖 GitLab Agent

  • 新增 GitLab OpenCode Agent:自托管的 Webhook 服务,在自托管 GitLab 实例上启用 AI 驱动的代码审查
  • 在 MR 评论中 @OpenCode 即可触发自动审查、代码修复和 review comment
  • 支持 Webhook 签名验证和权限检查
  • 串行任务队列处理 MR 审查
  • Docker 部署支持(Dockerfile.release + docker-compose)
  • 多项目支持(通过 config.json 配置)

🔧 后台任务管理

  • 新增 Bash 后台任务管理:支持将 Bash 命令在后台运行,并管理后台作业
  • 新增 job_listjob_killjob_output 三个工具,可查看、终止和获取后台任务输出
  • 改进了 bash.ts 的实现,支持后台运行模式

🖥️ VSCode 扩展重构

  • 重构 VSCode 扩展:使用 WebView + iframe 加载 OpenCode Web UI,替代在 VSCode 终端中启动 TUI 的方式
  • 启动 opencode serve 作为无头后台进程,在 WebView 面板中打开嵌入式 Web UI
  • 提供 .vsix 扩展包,可通过 code --install-extension opencode-1.14.29.vsix 安装

🐛 Bug 修复

  • 修复 Web 主题色同步问题:同步 theme-color 元数据与当前活动主题,确保 PWA 主题色正确显示
  • 移除 structured output 中的 toolChoice: 'required':部分 LLM API 不支持 tool_choice 参数,系统提示和 StructuredOutput 工具注入已足以引导模型

🛡️ 服务端改进

  • 前端静态路径跳过认证:服务器中间件为前端静态文件路径绕过认证,改善 Web UI 访问体验

📝 其他改进

  • 精简 bash.txt 提示词:删除 84 行冗余内容,简化 Bash 工具的系统提示
  • 更新 SDK 类型定义:同步最新的 API 类型

📦 下载

平台 架构 文件
Linux x64 opencode-linux-x64.zst
Linux ARM64 opencode-linux-arm64.zst
macOS x64 opencode-darwin-x64.zst
macOS ARM64 opencode-darwin-arm64.zst
Windows x64 opencode-windows-x64.zip
VSCode opencode-1.14.29.vsix

解压 zst 文件:zstd -d opencode-linux-x64.zst -o opencode && chmod +x opencode
安装 VSCode 扩展:code --install-extension opencode-1.14.29.vsix

OpenCode v1.14.25-hmsy

26 Apr 08:29
d7dfc72

Choose a tag to compare

OpenCode v1.14.25-hmsy

🎤 语音输入

新增语音转文字输入功能,支持通过麦克风录音将语音自动转录为文本并填入提示框。

  • 支持 WhisperLALM(大音频语言模型) 两种转录后端,通过配置切换
  • Whisper 后端调用兼容 OpenAI Whisper API 的转录服务
  • LALM 后端利用多模态 LLM(如 gpt-4o-audio-preview)进行转录
  • 利用当前对话上下文(助手最后的回复 + 用户已有输入)作为转录提示词,提高专有名词转录准确率
  • 音频格式自动适配(Web 端 webm → mp3,TUI 端自动探测录音工具 ffmpeg/sox/arecord)
  • Web UI 和 TUI 终端均已集成,支持快捷键触发

🔧 后台任务管理

为 Bash 工具新增完整的后台任务管理系统,支持长时间运行命令的后台执行、监控和管理。

  • 新增 BackgroundJobManager 核心管理器,支持最多 50 个并发任务
  • 每个任务有唯一 4 位十六进制 ID,状态包括 running / completed / failed / killed
  • 新增 job_listjob_outputjob_kill 三个工具用于任务管理
  • 自动后台转换:命令运行超过 60 秒时自动转为后台任务
  • 优雅终止支持(SIGTERM → 3s → SIGKILL),自动清理 8 小时前的已完成任务

🦊 GitLab OpenCode Agent

新增 GitLab OpenCode Agent,实现 AI 驱动的代码审查。

  • 自托管的 Webhook 服务,在 MR 评论中 @opencode 即可触发自动代码审查
  • 串行任务队列,避免并发冲突
  • 自动 clone 源分支、构建 MR 上下文 prompt、启动 opencode 服务处理
  • AI 审查完成后自动 commit & push 代码变更,并将结果作为 MR 评论发布
  • 提供 Docker 部署方案,支持多项目配置

🐛 Bug 修复

  • 会话列表过滤修复:将会话 roots 过滤从客户端移到 SQL 层(parent_id IS NULL),防止子代理会话占满 LIMIT 配额导致根会话不可见
  • 主题色同步:主题切换时动态更新 <meta name="theme-color"> 元数据,使其与当前主题背景色保持一致
  • 静态路径鉴权绕过:前端静态资源路径跳过鉴权检查,确保未登录用户也能正常加载页面
  • Bash prompt 简化:精简 bash 工具的提示词

📦 SDK 更新

  • JS SDK 新增 Audio 客户端类及 transcribe 方法,支持语音转写功能

下载

平台 架构 文件
Linux x64 opencode-linux-x64.zst
Linux arm64 opencode-linux-arm64.zst
macOS x64 opencode-darwin-x64.zst
macOS arm64 opencode-darwin-arm64.zst
Windows x64 opencode-windows-x64.zip

解压 ZST 文件:zstd -d opencode-linux-x64.zst -o opencode && chmod +x opencode

OpenCode v1.14.24-hmsy

24 Apr 17:47
5465b8f

Choose a tag to compare

OpenCode v1.14.24-hmsy

🎉 主要功能

新增 GitLab OpenCode Agent

为自托管 GitLab 实例提供 AI 驱动的代码审查能力。部署为常驻 Webhook 服务后,团队成员只需在 Merge Request 中 @opencode 即可触发 AI 自动审查代码、生成修复补丁并推送代码、将审查意见回写为 MR 评论。

  • Webhook 签名验证与基于角色的权限控制(需 Developer 及以上权限)
  • 串行任务队列,每个 MR 独立工作目录与会话隔离
  • 通过 opencode serve + SDK 集成实现 AI 会话管理
  • 自动 clone 代码、构建上下文 Prompt、监听 SSE 完成事件
  • AI 修改的代码自动 commit & push 到源分支
  • 多项目支持,配置文件支持环境变量引用
  • Docker / docker-compose 一键部署,内置健康检查

新增语音输入功能

用户可以通过麦克风录音,将语音自动转录为文字并插入到提示词输入框中。支持 Web 端TUI 终端界面两种交互方式。

  • 支持两种转录引擎:
    • Whisper(默认):调用 OpenAI Whisper 兼容的 REST API
    • LALM:利用多模态大语言模型(如 gpt-4o-audio-previewgemini-3-flash)直接进行语音转文字
  • Web 端:浏览器原生 MediaRecorder API 录音,Mod+Shift+M 快捷键触发
  • TUI 端:自动检测系统录音工具(ffmpeg/sox/arecord),<leader>v 快捷键触发
  • 自动从当前会话上下文提取信息,提升转录准确性

新增后台任务管理

为 Bash 命令提供完整的后台任务管理系统,允许长时间运行的命令在后台执行,并提供生命周期管理能力。

  • 新增三个工具:job_list(列出任务)、job_output(获取输出/等待完成)、job_kill(终止任务)
  • Bash 工具新增 background 参数,支持显式后台执行
  • 前台命令运行超过 60 秒自动转为后台任务,不阻塞工作流
  • 最多同时运行 50 个后台任务,已完成任务保留 8 小时后自动清理
  • 支持优雅终止(SIGTERM)和强制终止(SIGKILL)

🐛 Bug 修复

Web 端 theme-color 与主题同步

修复了浏览器 <meta name="theme-color"> 标签不随主题切换更新的问题。实现了从页面初始加载到运行时主题切换的全链路同步,消除了浏览器 UI 与应用主题之间的视觉割裂感。

服务器认证绕过静态资源

修复了启用 HTTP Basic Auth 后前端页面无法加载的问题。前端静态资源路径(HTML、JS、CSS、manifest 等)现在绕过认证检查,确保用户可以在前端 UI 中完成认证。

📦 其他

  • 更新 SDK 生成代码
  • 简化 Bash 工具提示词
  • 新增 opencode-release 和 web-s3-deploy 自动化技能

📥 下载

平台 架构 文件
Linux x64 opencode-linux-x64.zst
Linux ARM64 opencode-linux-arm64.zst
macOS x64 opencode-darwin-x64.zst
macOS ARM64 opencode-darwin-arm64.zst
Windows x64 opencode-windows-x64.zip

Linux/macOS 文件使用 ZSTD 压缩,解压命令:zstd -d <file> -o opencode && chmod +x opencode

Windows 文件为 ZIP 格式,直接解压即可使用。


Based on v1.14.24 with custom enhancements.

OpenCode v1.14.21-hmsy

23 Apr 10:24
852d492

Choose a tag to compare

🆕 新功能

语音输入

在 Web 界面和终端 TUI 中均支持通过麦克风录音并自动将语音转录为文本,支持两种转录引擎:

  • Whisper:通过 OpenAI Whisper API 或兼容接口进行转录,可自定义端点、API Key、模型和语言
  • LALM(大音频语言模型):使用支持音频输入的 LLM(如 gpt-4o-audio-previewgemini-3-flash)进行转录,认证由已有的 Provider 配置处理

Web 端快捷键为 mod+shift+m,TUI 端为 <leader>v。TUI 自动检测系统录音工具(ffmpeg/sox/arecord),也可通过配置自定义录音命令。

GitLab OpenCode Agent

新增自托管的 Webhook 服务,为自托管 GitLab 实例提供 AI 驱动的代码审查能力。用户在 Merge Request 评论中 @opencode 即可触发自动审查。

核心功能:

  • Webhook 接收器:验证签名、权限检查,仅处理 MR 评论中的 @mention 事件
  • 串行任务队列:MR 审查逐一处理,避免并发冲突
  • AI 审查流程:自动克隆仓库 → 获取 MR 上下文和 diff → 启动 opencode serve 进行分析 → 自动提交代码修复 → 发布审查评论
  • 多项目支持:通过 config.json 配置多个 GitLab 项目,每个项目可独立配置
  • Docker 部署:提供 Dockerfiledocker-compose.yml 和健康检查,开箱即用

Bash 后台任务管理

为 Bash 工具引入了完整的后台任务管理能力:

  • 自动转后台机制:Bash 命令运行超过 60 秒且未设置 background: true 时,自动转为后台任务执行,避免阻塞主流程
  • 显式后台模式:Bash 工具新增 background 参数,设为 true 时直接在后台启动命令
  • 三个新工具
    • job_list — 列出所有后台任务,支持按状态过滤(running/completed/failed/killed)
    • job_output — 获取后台任务的输出内容和状态,支持等待任务完成(最长 300 秒)
    • job_kill — 终止后台任务,支持优雅终止(SIGTERM)和强制终止(SIGKILL)
  • 任务管理器:最多并发 50 个任务,已完成任务 8 小时后自动清理

🔧 优化与修复

Web 前端

  • 主题色同步:浏览器 theme-color meta 标签现在会与当前活跃主题的背景色保持同步,确保浏览器 UI 颜色与应用一致
  • 静态资源免认证:前端静态资源(HTML、JS、CSS 等)无需认证即可访问,Web UI 能在未登录状态下正常加载

SDK

  • 新增语音转录 API 支持(Audio.transcribe
  • 新增 Voice 配置类型(Whisper / LALM)

其他

  • 精简 Bash 工具提示词:移除约 100 行冗余内容,降低 token 消耗,提升模型响应效率
  • 新增 opencode-release 技能:建立完整的自动化版本发布工作流
  • 新增 web-s3-deploy 技能:提供可重复执行的 Web 前端部署工作流

📦 下载

平台 架构 下载链接
Linux x86_64 opencode-linux-x64.zst
Linux ARM64 opencode-linux-arm64.zst
macOS x86_64 opencode-darwin-x64.zst
macOS ARM64 (Apple Silicon) opencode-darwin-arm64.zst
Windows x86_64 opencode-windows-x64.zip

解压说明.zst 文件使用 zstd -d <filename> 解压,.zip 文件使用常规解压工具。

OpenCode v1.14.20-hmsy

22 Apr 09:31

Choose a tag to compare

主要功能

🎙️ 语音输入

新增完整的语音输入功能,支持通过麦克风录音并将语音转写为文字插入提示输入框。

  • 支持两种转写引擎:Whisper(OpenAI Whisper API)和 LALM(大音频语言模型如 GPT-4o)
  • Web 端使用 MediaRecorder API 录音,TUI 端通过 ffmpeg/sox/arecord 系统命令录音
  • 转写时利用对话上下文(assistant 最近消息)提升准确度
  • 支持自定义 API 地址、模型、语言等配置
  • 新增 POST /transcribe 端点,SDK 同步更新

⚙️ 后台任务管理

为 Bash 工具引入完整的后台任务管理系统,长时间运行的命令不再阻塞会话。

  • 新增 job_listjob_outputjob_kill 三个工具
  • 命令运行超过 60 秒自动转为后台任务(adopt 机制,平滑过渡不丢失输出)
  • job_output 支持等待完成(非轮询式事件监听,最长 300 秒)
  • 支持显式 background=true 参数直接后台启动
  • 进程树杀死(确保子进程也被清理)
  • 8 小时自动清理已完成任务

🦊 GitLab Agent

新增 packages/gitlab-agent 包,实现自托管的 GitLab AI 代码审查机器人。

  • 接收 GitLab Note Webhook,在 MR 中 @opencode 触发审查
  • 自动 clone 代码、启动 opencode serve、AI 审查并自动修复
  • 串行任务队列处理,支持多项目配置
  • 权限校验、即时反馈评论、错误处理
  • 提供 Docker 部署方案

Bug 修复

  • 修复语音录音 base64 编码栈溢出:长录音的 Uint8Array 通过展开运算符传入 String.fromCharCode 导致调用栈溢出,改为分块处理(每块 8192 字节)
  • 修复主题色不同步:浏览器地址栏/状态栏颜色现在随主题切换实时更新,消除深色模式下的白色闪烁
  • 修复带密码部署时前端无法加载:静态资源路径(HTML/JS/CSS/favicon 等)绕过 Basic Auth 认证,同时限制为 GET/HEAD 方法确保安全

下载

平台 架构 文件
Linux x86_64 opencode-linux-x64.zst
Linux x86_64 (musl) opencode-linux-x64-musl.zst
Linux ARM64 opencode-linux-arm64.zst
Linux ARM64 (musl) opencode-linux-arm64-musl.zst
macOS x86_64 opencode-darwin-x64.zst
macOS ARM64 opencode-darwin-arm64.zst
Windows x86_64 opencode-windows-x64.zip

安装说明:zst 文件使用 zstd -d opencode-xxx.zst -o opencode && chmod +x opencode 解压;zip 文件使用 unzip opencode-windows-x64.zip 解压。

OpenCode v1.14.18-hmsy

19 Apr 13:12
41e81f8

Choose a tag to compare

OpenCode v1.14.18-hmsy

🎤 语音输入功能

  • 新增语音输入:在 Web 端和 TUI 终端端同时添加了语音转文字输入功能。支持 Whisper API 和 ALM(音频语言模型)两种转写引擎,可通过配置切换。Web 端使用浏览器原生 MediaRecorder API 录音,TUI 端通过 ffmpeg/sox/arecord 录制。转写结果自动插入到输入框中。
  • 语音按钮布局修复:将语音输入按钮移入可滚动的工具栏区域,避免在小屏幕上布局错乱。

⚙️ 后台任务管理

  • 新增 Bash 后台任务机制:为 Bash 工具添加了后台任务管理能力。长时间运行的命令(超过 60 秒)会自动转为后台执行,也可通过 background: true 参数显式指定。
  • 新增三个管理工具
    • job_list — 列出所有后台任务,支持按状态过滤
    • job_output — 获取指定任务输出,支持等待完成(最长 300 秒)
    • job_kill — 终止指定后台任务
  • 并发限制:最大 50 个并发任务,8 小时后自动清理

🐛 Bug 修复

  • 修复助手消息匹配逻辑:使用 parentID 精确匹配替代位置扫描,解决消息编辑/分支后 assistant 回复显示错误的问题
  • 修复主题色同步:浏览器 theme-color meta 标签现在会随主题切换动态更新,解决深色模式下标题栏显示白色的问题
  • 修复静态资源认证:前端静态文件路径(/index.html/assets/ 等)不再需要认证即可访问,修复密码保护模式下 SPA 无法加载的问题
  • 修复小屏幕工具栏:prompt 输入工具栏支持水平滚动,解决小屏幕上控件被压缩的问题

🔧 代码质量

  • 精简 Bash 工具 prompt:移除了与顶层 system prompt 重复的 Git 提交协议和 PR 创建流程,减少约 84 行,降低每次工具调用的 token 消耗
  • Shell 优雅退出SIGKILL_TIMEOUT_MS 从 200ms 提高到 3000ms,给进程更多时间优雅退出

📦 SDK 更新

  • 重新生成 JavaScript SDK:新增 Audio(语音转写)API 客户端和类型定义,包括 AudioTranscribeDataAudioTranscribeResponsesConfig.voice 配置类型

🛠 开发工具

  • 新增 opencode-release skill:完整的版本发布自动化工作流,涵盖构建、压缩、分析、发布、部署全流程
  • 新增 web-s3-deploy skill:Web 前端一键部署到 S3 + CloudFront

下载

平台 架构 文件
Linux x64 opencode-linux-x64.zst
Linux arm64 opencode-linux-arm64.zst
macOS x64 opencode-darwin-x64.zst
macOS arm64 opencode-darwin-arm64.zst
Windows x64 opencode-windows-x64.zip

基于 v1.14.18 构建,包含 10 个 commits。