繁體中文

新功能

免登入接 Gemini API,自訂端點也能順利進入

公司給你一把 Gemini API 金鑰(供程式證明身分的密碼)時,現在不用先登入就能讓 CLI 直接使用 Gemini API。在 settings.json 加入 {"modelProvider": "gemini"},再匯出 GEMINI_API_KEY;要連自己的端點,另把 GOOGLE_GEMINI_BASE_URL 指向它。畫面橫幅和 /help 會明說憑證來自 Gemini API key,/logout 也會解釋它來自環境變數(由作業系統提供給程式的設定值),不是要結束一段登入工作階段。原本直連會停在登入畫面的問題已修好;自訂端點收到模型請求時,也不再附上它未必支援的工作階段欄位。門禁卡放在口袋就能開門,不必先到櫃台辦訪客證。

新功能

搜尋用不了 ripgrep 仍有備援,內建檔案先驗證

圖書館的索引機故障後,館員仍能改查本地卡片櫃;新送來的工具則先驗封條,再上架。你在專案裡找一段文字,卻被端點安全軟體擋住 ripgrep(快速搜尋檔案內容的工具)時,/codesearch 現在會改用本機搜尋,不會因為那個執行檔跑不起來就停住。內嵌的 ripgrep 也換了保存方式:解出的檔案放進使用者快取(cache,把算過或查過的結果暫存起來直接用)目錄,不再放 /tmp。它會以內容對應的 SHA-256 驗證檔案,並用原子重新命名(一次完成的換名動作)確保完整性,避免同時執行時互相搶跑。

新功能

檔案預覽少重讀,寬字清單不再擠出面板

把清單當書架:先在書背標好頁數,再把全形字書名和書架上下邊界一起量進尺寸,翻找時就不必一直抽出整本書重看。檔案清單很長時,每按一次方向鍵都重新從磁碟讀所有預覽內容,畫面自然會拖慢。現在清單會快取(cache,把算過或查過的結果暫存起來直接用)每個檔案預覽有幾行,捲動時不必反覆重讀。清單也修了寬 CJK 字元(中日韓文字)和表情符號 emoji 造成的亂碼與超出面板問題;項目消失後,游標不會還指向清單末端之外,捲動計算也納入標頭、頁尾。

新功能

自訂代理能管自己的工作,背景任務不再被催著輪詢

你替重複工作做了自訂代理(custom agent,按你規則執行任務的 AI 角色)後,它現在可用 manage_task 查看並終止自己的背景任務,前提是它沒有選擇退出基礎元件。工具步驟也改成清楚的 Killed task X 與 Checked task X,不再讓人猜任務發生了什麼。另一個容易繞圈的來源也移除了:工作被轉成背景執行後,manage_task 與 manage_inbox 的結果不再塞入反輪詢提醒文字;那段提醒本身曾反而推模型進入輪詢迴圈。這像給值班者一張能查看、撤銷自己待辦的卡,同時拿走牆上那張一直叫他重複確認的便條。

新功能

網頁搜尋還在跑,先亮出查詢詞

你請代理查網頁資料,等待結果時不必盯著一個沒有線索的步驟。search_web 現在搜尋尚未回來,就會先顯示它送出的查詢詞;結果回來前,你已能知道它正在找什麼。這沒有改變搜尋內容或結果,只把原本藏到最後才出現的資訊提早攤開,也能及早發現查錯方向。像請人到資料室找資料,他一出門就先告訴你要查哪個題目,而不是回來才給你看索引卡。

新功能

`/resume` 分頁名稱分清楚,刪除改用 `f4`

要從 /resume 找回舊對話時,第二個分頁原先的名稱和第一個分不清;現在名稱已改,選錯地方的機會少了。刪除對話的按鍵也從 ctrl+delete 換成 f4,因為 macOS 終端機對 delete 鍵回報不一致,舊按鍵在那裡會悄悄失效。來回切換第二個分頁後,對話不會再消失並顯示 No conversations available;分頁空白時,快捷列的 tab 提示也會一併隱藏。這像抽屜的兩個標籤終於寫出不同內容,壞掉的開鎖動作換成另一個能被鎖認得的按鈕。

新功能

長對話保住歷史,背景喚醒不再膨脹或寫壞

打開很長的對話,現在會分批載入步驟標頭,也不會只為了知道步驟類型就讀取完整內容。長對話要縮減記錄時,過去的大小預算把受保護檢查點和早已清掉卻不能回收的殘留也算進去,結果可能刪掉幾乎全部歷史。現在預算只計入實際能回收位元組的步驟。背景任務、子代理或代理訊息喚醒工作階段時,資料庫不會再把重複的授權與設定加到每一列;背景訊息剛好在內容壓縮重寫逐字稿時加入,也不會寫出無法解析的 JSON。另修正沙盒(sandbox,隔離執行環境)設定卡住後,步驟未解除註冊而吞掉後續訊息、讓工作階段像死掉直到重啟的問題。像整理倉庫時只丟真能騰出空間的箱子,同時防止夜班人員重複貼標籤或在帳本改寫時把新紙條塞斷頁面。

問題修復

子代理名稱先驗證,不能逃出專屬資料夾

寄物櫃的標籤若能寫成「往上一層」,管理員便可能把東西放到隔壁櫃;現在會先檢查標籤,物品只留在指定櫃位。子代理(subagent,主代理分出去執行一部分工作的 AI)取名時,名稱不再能直接拿來當資料夾名。以前 define_subagent 若收到含有 .. 的模型提供名稱,寫入 agent.md 時可能越過該對話的產出資料夾。現在工具和處理端都會驗證名稱,才建立檔案。這修的是既有路徑處理,不是新增讓子代理做更多事的功能。

問題修復

工具群組補回名稱,完成的審查不再重送

檢視產出檔時按 Esc 離開 artifact viewer(產出檢視器),先前回合已完成的審查不會再冒出多餘的送出確認;真的送出時,也不會重複回報那些舊審查。工具呼叫被收合或展開成群組時,invoke_subagent、send_message、manage_subagents、define_subagent、generate_image 也會重新顯示工具呼叫那一行,不只留著 (ctrl+o to expand) 提示。Cloud Shell 的網頁終端機還會自動啟用保守的繪製模式,避開游標最佳化跳脫序列造成的啟動畫面變形。像展開收據夾時,每張收據重新露出標題;已蓋章的申請不會又回到待送件堆。

English

FEATURE

Use the Gemini API without signing in, including custom endpoints

If your company gives you a Gemini API key, the CLI can now use the Gemini API directly without making you sign in first. Add {"modelProvider": "gemini"} to settings.json, export GEMINI_API_KEY, and point GOOGLE_GEMINI_BASE_URL at your own endpoint when needed. The banner and /help identify the credential as a Gemini API key, while /logout explains that it came from the environment rather than ending a signed-in session. Direct API use no longer gets stuck on the sign-in screen, and requests to a custom endpoint no longer include a session field that endpoint may not support. Your staff badge opens the door without first visiting reception for a visitor pass.

FEATURE

Search has a fallback, and bundled ripgrep files are verified

When a library's index machine breaks, staff can still use the local card cabinet, while each newly delivered tool is seal-checked before it reaches the shelf. Likewise, when endpoint security blocks ripgrep, the file-content search tool, /codesearch falls back to local search instead of stopping because that binary cannot run. The embedded ripgrep also changes where it lives: extracted files go in the user cache directory rather than /tmp. Their contents are checked with SHA-256, and atomic renaming keeps the file intact and avoids races between concurrent runs.

FEATURE

Artifact previews stop rereading files, and wide text stays in its panel

Treat the list like a bookshop shelf: note page counts on the spine, then measure full-width titles and both shelf edges before arranging it, so browsing does not mean pulling out every book again. In a long artifact list, every arrow-key press used to reread every preview from disk. The list now caches each file's preview line count, so scrolling does not repeat that work. It also fixes garbled or overflowing previews caused by wide CJK characters and emoji; when entries disappear, the cursor no longer points past the end, and the scroll calculation includes the header and footer.

FEATURE

Custom agents can manage their work without being nudged to poll

After you create a custom agent for recurring work, it can now use manage_task to list and kill its own background tasks, provided it has not opted out of fundamental components. Its tool steps now say Killed task X and Checked task X, so the outcome is visible. A separate source of loops has also gone: once work moves to the background, manage_task and manage_inbox results no longer include anti-polling reminder text, because that text itself could nudge the model into a polling loop. It is like giving the person on duty a card to inspect and cancel their own to-do list, while removing the wall note that keeps telling them to check it again.

FEATURE

Web search shows the query before results return

When you ask an agent to look up information on the web, you no longer have to stare at an unexplained step while results are pending. search_web now shows the query while the search is running, so you can see what it is looking for before it returns. The search itself and its results are unchanged; information that appeared only at the end now appears earlier. It is like asking someone to visit a records room and having them name the topic before they leave, rather than showing you the index card only after they return.

FEATURE

`/resume` tabs are clearer, and deletion moves to `f4`

When you open /resume to find an old conversation, its second tab now has a name that distinguishes it from the first. The keybinding for deleting a conversation has moved from ctrl+delete to f4, because macOS terminals report the delete key inconsistently and the old binding silently did nothing there. Switching to the second tab and back no longer makes conversations disappear with No conversations available; when a tab is empty, the tab hint also leaves the shortcut bar. It is like finally giving two drawers distinct labels and replacing a broken unlocking gesture with a button the lock can recognize.

FEATURE

Long conversations keep their history, and background wakes stop bloating data

Opening a long conversation now loads step headers in batches and no longer reads each full payload merely to learn its type. When a long conversation trims its record, the old size budget counted protected checkpoints and residue from steps that had already been cleared but could not be reclaimed, which could destroy nearly all history. The budget now counts only steps whose bytes can actually be reclaimed. When background tasks, subagents, or agent messages wake a session, the database no longer appends duplicate grants and settings to every saved row; nor can a background message corrupt the saved transcript into unparseable JSON while compaction is rewriting it. A stalled sandbox setup also no longer leaves its step registered, swallowing later messages and making the session look dead until restart. It is like clearing only boxes that free warehouse space, while keeping the night shift from duplicating labels or tearing an account book as a note is inserted.

BUGFIX

Subagent names are checked before they can escape their own folder

If a storage-locker label can say “go up one level,” an attendant might put an item in the next locker; now the label is checked first and the item stays in its assigned compartment. A subagent name is no longer used directly as a directory name. Previously, if define_subagent received a model-supplied name containing .., writing agent.md could escape the conversation's artifact directory. The name is now validated both by the tool and by the handler before the file is created. This fixes existing path handling; it does not add new powers to subagents.

BUGFIX

Tool groups show their names again, and completed reviews stay completed

When you press Esc to leave the artifact viewer, reviews completed in earlier turns no longer trigger a stray submission confirmation; submitting also stops reporting those same old reviews again. Collapsed and expanded tool groups now restore the tool-call line for invoke_subagent, send_message, manage_subagents, define_subagent, and generate_image, instead of showing only (ctrl+o to expand). In Cloud Shell, the web terminal now automatically uses a conservative rendering mode to avoid a distorted startup banner caused by cursor-optimization escape sequences. It is like opening a receipt folder and seeing each receipt's heading again, while already stamped applications stay out of the submission pile.

原始 CHANGELOG

Original changelog免登入接 Gemini API,自訂端點也能順利進入
Added support for `GEMINI_API_KEY`, so the CLI can run against the Gemini API directly without signing in. Set `modelProvider: "gemini"` in `settings.json`, export `GEMINI_API_KEY`, and point `GOOGLE_GEMINI_BASE_URL` at a custom endpoint if you need one. The banner and `/help` show `Gemini API key` as the credential, and `/logout` explains that it comes from the environment rather than appearing to end a session.
Fixed the direct Gemini API route parking on the sign-in screen instead of booting straight into the main UI, and fixed model requests failing against a custom endpoint set through `GOOGLE_GEMINI_BASE_URL` by dropping a session field such an endpoint is not guaranteed to support.
Original changelog搜尋用不了 ripgrep 仍有備援,內建檔案先驗證
Improved `/codesearch` resilience by falling back to a local search when the `ripgrep` binary cannot be executed, such as when an endpoint security agent blocks it.
Improved embedded ripgrep reliability and security by saving extracted binaries to the user cache directory instead of /tmp. Added content-addressed SHA-256 verification and atomic renaming to guarantee binary integrity and prevent concurrent execution races.
Original changelog檔案預覽少重讀,寬字清單不再擠出面板
Improved artifact list scrolling by caching each file's preview line count, which previously re-read every listed file from disk on every keypress.
Fixed artifact list rendering, where previews produced garbled text and overflowed the panel on wide CJK or emoji characters, the cursor could point past the end of the list when entries disappeared, and the header and footer lines were left out of the scroll math so the list overflowed its viewport.
Original changelog自訂代理能管自己的工作,背景任務不再被催著輪詢
Improved custom agent support by making `manage_task` available to declarative agents that have not opted out of fundamental components, so a custom agent can list and kill its own background tasks, and reworded its step lines to read `Killed task X` and `Checked task X`.
Improved the agent's behavior after backgrounding work by removing the anti-polling reminder text from the `manage_task` and `manage_inbox` tool results, which could itself nudge the model into a polling loop.
Original changelog網頁搜尋還在跑,先亮出查詢詞
Improved `search_web` steps by showing the query while the search is still running rather than only after it returns.
Original changelog`/resume` 分頁名稱分清楚,刪除改用 `f4`
Improved the `/resume` picker by relabeling its second tab, which previously carried a name that did not distinguish it from the first.
Improved deleting a conversation from the `/resume` picker by moving the keybinding from `ctrl+delete` to `f4`, since macOS terminals disagree on how they report the delete key and the old binding silently did nothing there.
Fixed conversations disappearing from the `/resume` picker after cycling to the second tab and back, which left it reporting `No conversations available`, and kept the `tab` hint in the shortcut bar even when a tab is empty.
Original changelog長對話保住歷史,背景喚醒不再膨脹或寫壞
Improved the time to open a large conversation by loading step headers in batches and no longer reading each step's full payload just to read its type.
Fixed trajectory truncation destroying nearly all of a long conversation's history, by charging the size budget only against steps whose bytes can actually be reclaimed instead of against protected checkpoints and the unreclaimable residue of already-cleared steps.
Fixed unbounded growth of the on-disk conversation database in sessions woken by background tasks, subagents or agent messages, where each wake appended duplicate grants and settings to every persisted row.
Fixed corruption of the saved transcript when a background message appended to it while context compaction was rewriting it, which left malformed JSON that no longer parsed.
Fixed a hung sandbox setup killing the rest of the conversation, where the step was never unregistered so every later message was silently swallowed and the session appeared dead until a restart.
Original changelog子代理名稱先驗證,不能逃出專屬資料夾
Fixed `define_subagent` using a model-supplied agent name directly as a directory name, so a name containing `..` could write its `agent.md` outside the conversation's artifact directory; names are now validated at both the tool and the handler.
Original changelog工具群組補回名稱,完成的審查不再重送
Fixed a distorted startup banner in Cloud Shell, where the web terminal mishandles the cursor-optimization escape sequences the renderer emits; a conservative rendering mode now turns on automatically there.
Fixed `Esc` in the artifact viewer showing a spurious submit confirmation for reviews that had completed in earlier turns, and fixed submitting re-reporting those same reviews.
Fixed `invoke_subagent`, `send_message`, `manage_subagents`, `define_subagent`, and `generate_image` rendering with no tool call line at all in collapsed and expanded tool groups, leaving a bare `(ctrl+o to expand)` hint with no tool name.