AISpot

opencode v2.2.5 新增 worktree 與 shell 模式快捷鍵

OpenCode releases版本更新開發工具

opencode 發布 v2.2.5,桌面端新增快捷鍵:macOS 按 ⌘⌥O 選 worktree、⌘⌥B 選基線分支,⌘⇧X 切換 shell 模式(Windows/Linux 對應 Ctrl+Alt+O、Ctrl+Alt+B、Ctrl+Shift+X)。配置項 compaction.buffer 現在也可寫百分比(如 20%),按各模型上下文視窗留出餘量,token 數值寫法仍可用。引用彈窗中按住 ⌘/Ctrl 或按 ⌘Enter 可只傳送這條引用與評論。

更新日誌把 worktree 切換、shell 模式、單條引用傳送都做成了快捷鍵,並讓上下文壓縮緩衝可按百分比統一配置,對經常在 opencode 裡跨分支與多模型切換的使用者最直接。

原標題:v2.2.5
閱讀原文

評分60 / 62(平均 61,門檻 60)
狀態精選

全文翻譯

亮點 - Worktree 和 Shell 模式快捷鍵:在 macOS 上按 ⌘⌥O,在 Windows 和 Linux 上按 Ctrl+Alt+O 可選擇 worktree;按 ⌘⌥B 或 Ctrl+Alt+B 可選擇其基礎分支。現在 ⌘⇧X 或 Ctrl+Shift+X 可在 composer 中切換 shell 模式。( #60713 ) - 從評論彈窗傳送引用:在引用彈窗中按住 ⌘ 或 Ctrl,將其勾選標記變為傳送;或按 ⌘Enter 或 Ctrl+Enter,僅傳送該引用及其評論,同時保持 composer 的其餘部分不變。( #60640 ) - 百分比壓縮緩衝區:在 opencode.json 中設定 "compaction": { "buffer": "20%" },為每個模型的上下文視窗保留一部分空閒空間,這樣一個設定就能適配視窗較小和較大的模型。Token 計數仍然有效。( #60647 ) 核心 改進 - compaction.buffer 除接受 token 數外,現在還接受模型上下文視窗的百分比,例如 "20%"。( #60647 ) - 當 read 因資料夾缺失而未命中時,錯誤資訊會指出該資料夾以及最近的已存在資料夾。( #60688 ) - 當 edit 找不到 oldString 時,錯誤資訊會顯示檔案中最為接近的行,或提示該更改已經存在。( #60689 ) - 對名為 bash 的工具的呼叫現在會作為 shell 執行而不是失敗,並具有相同權限。實際名為 bash 的外掛工具仍然優先。( #60687 ) Bug 修復 - 傳送大於 10 MiB 的 stdio 訊息的 MCP 伺服器不再被斷開,並且大訊息的讀取速度快得多。( #60694 ) - 空閒位置在關閉後不再立即重啟其 MCP 伺服器。( #60668 ) - 當輸入上限更大時,壓縮現在會將其提示限制在模型的上下文視窗內。( #60660 ) - LiteLLM 上下文視窗錯誤現在會觸發壓縮,而不是停止會話。( #60692 ) - 當你切換模型或恢復中斷的回應時,推理內容不再被轉換成純文字,這一行為曾在某些提供商上導致請求錯誤。( #60498 ) TUI Bug 修復 - 連線選單不再列出 MCP 伺服器,這些伺服器在各自專屬的位置進行管理。( #60675 ) 桌面端 改進 - 新增了用於選擇 worktree 及其基礎分支的鍵盤快捷鍵(顯示在工具提示中),以及用於切換 shell 模式的快捷鍵。可選擇 worktree 路徑以複製完整目錄。( #60713 ) - 在引用彈窗中按住 ⌘ 或 Ctrl,可直接傳送引用及其評論。( #60640 ) - 新增了扁平化輸入外觀和緊湊輸入尺寸。( #60598 ) Bug 修復 - 連線選單不再列出 MCP 伺服器。( #60675 ) - 為“最近關閉”選單中的搜尋欄位新增了缺失的頂部內邊距。( #60652 )

由 AI 翻譯,以原文為準。

原文
Highlights Worktree and Shell Mode Shortcuts : Press ⌘⌥O on macOS or Ctrl+Alt+O on Windows and Linux to choose a worktree, and ⌘⌥B or Ctrl+Alt+B to choose its base branch. ⌘⇧X or Ctrl+Shift+X now toggles shell mode in the composer. ( #60713 ) Send Quotes From the Comment Popup : Hold ⌘ or Ctrl in the quote popup to turn its checkmark into send, or press ⌘Enter or Ctrl+Enter , to send just that quote and comment while leaving the rest of the composer untouched. ( #60640 ) Percentage Compaction Buffer : Set "compaction": { "buffer": "20%" } in opencode.json to keep a share of each model's context window free, so one setting fits models with small and large windows. Token counts still work. ( #60647 ) Core Improvements compaction.buffer accepts a percentage of the model's context window, such as "20%" , in addition to a token count. ( #60647 ) When read misses because a folder is missing, the error names that folder and the nearest one that exists. ( #60688 ) When edit can't find oldString , the error shows the file's closest lines, or says the change is already there. ( #60689 ) Calls to a tool named bash now run as shell instead of failing, with the same permissions. A plugin tool actually named bash still takes precedence. ( #60687 ) Bug fixes MCP servers that send stdio messages larger than 10 MiB no longer get disconnected, and large messages are read much faster. ( #60694 ) Idle locations no longer restart their MCP servers right after shutting down. ( #60668 ) Compaction now caps its prompt at the model's context window when the input limit is larger. ( #60660 ) LiteLLM context window errors now trigger compaction instead of stopping the session. ( #60692 ) Reasoning is no longer turned into plain text when you switch models or resume an interrupted response, which caused request errors on some providers. ( #60498 ) TUI Bug fixes The connect menu no longer lists MCP servers, which are managed in their own place. ( #60675 ) Desktop Improvements Added keyboard shortcuts to choose a worktree and its base branch, shown in tooltips, and a shortcut to toggle shell mode. The worktree path can be selected to copy the full directory. ( #60713 ) Hold ⌘ or Ctrl in the quote popup to send a quote and its comment directly. ( #60640 ) Added flat input surfaces and a compact input size. ( #60598 ) Bug fixes The connect menu no longer lists MCP servers. ( #60675 ) Added the missing top inset to the search field in the recently closed menu. ( #60652 )

相關報導

OpenCode releases● 精選AI 評分71

OpenCode v2.2.4:桌面終端可跨重啟保留,還能發布 HTML 工件

OpenCode v2.2.4 發布,桌面終端歸屬於會話,伺服器重啟後終端與滾動緩衝仍在,並與 TUI 及其他視窗保持同步,重新命名也會保留。在 opencode.json 啟用 experimental.artifacts 後,agent 可發布、更新並通過內建本地 provider 或外掛儲存提供 HTML 與靜態工件。

OpenCode releases● 精選AI 評分72

OpenCode 2.2.0 發布:桌面端支援外掛,新增 GPT-6.1 Terra

OpenCode 發布 2.2.0 版,桌面端可建立、安裝和共享外掛(實驗性),桌面應用介面也做了重新設計。Sign in with ChatGPT 新增 GPT-6.1 Terra 與 GPT-6.1 Terra Fast 兩個模型,外掛側新增實驗性影像與決策生成 API。破壞性變更包括:@opencode/ai 包根匯出改為 Promise API,Effect API 移至 @opencode/ai/effect;OpenCode GitHub Action 不再發布;

Hacker News front page● 精選AI 評分83

OpenCode 2.0 發布:MCP 預設啟用 Code Mode,新增後臺子代理

OpenCode 2.0 是一次大規模重構,核心新功能是 Code Mode:用 @opencode/codemode 包內建的極簡 JavaScript 直譯器,把 MCP 伺服器與 OpenAPI 端點轉成代理可呼叫的函式,2.0 中所有 MCP 伺服器預設啟用 Code Mode,一次指令碼就能串起多個工具呼叫,減少往返。服務端也改為在本地自動以單一後臺程序執行,TUI、Web 與桌面端共用同一程序,並推出 @opencode/client 客戶端包與從頭重寫的 API。

OpenCode releases● 精選AI 評分78

OpenCode 2.2.1 發布:新增 /goal 持續目標與影像生成

OpenCode 2.2.1 發布,最值得注意的是新增 /goal 命令:在 TUI 或 Desktop 輸入 /goal <objective>,會話會持續推進直到審查者確認目標達成,並可用 pause、resume、clear 控制。同時加入需手動開啟的 image_generate 工具,可建立或編輯圖片並指定預設模型;Desktop 預設啟用可搜尋的新模型選擇器,活動欄能直接檢視並停止後臺 shell 輸出。

OpenCode releasesAI 評分53

OpenCode 1.19.0 發布,更新改為手動安裝,可升級至 OpenCode 2

OpenCode 發布 v1.19.0,使用者可通過 opencode upgrade --major 升級到 OpenCode 2;TUI 內改用 /update 來安裝更新或完成升級,更新不再自動安裝。本次還允許使用 OpenAI ultrafast 服務層級,並在檢查 PTY 是否存在前先校驗 PTY 連線來源與票據。另有社群貢獻者提交 Exo 用量統計歸屬修復及 Zen 文件條目增刪。