usage

Antigravity 1.5.8

工具與目錄
在這頁

新功能 5 項

01

/model 新增 Gemini 4 Hydrogen 與 Carbon 模型支援

當你想嘗試最新一代模型來處理日常任務時,現在可以直接切換到 Gemini 4 系列。⟦如同工具行進駐新一代動力機具,架上依照出力大小整齊陳列,只要憑會員卡或企業通行證就能隨時提領使用。⟧透過 GEMINI_API_KEY 連線時,/model 與 --model 迎來了 Gemini 4 Hydrogen(提供 Low、Medium、High 與 XHigh 四種思考強度)。選單也同步加入了 Gemini 4 Carbon(提供 Low、Medium 與 High 三種思考強度)。如果你習慣使用應用程式預設憑證(AGY_ADC_AUTH)登入,同樣可以使用這四種強度的 Hydrogen 模型。而在透過企業模型閘道連線的工作環境裡,也已經支援使用 Gemini 4 Hydrogen。

官方原文

Added Gemini 4 Hydrogen (Low, Medium, High, and XHigh) and Gemini 4 Carbon (Low, Medium, and High) to /model and --model when you connect with a GEMINI_API_KEY, added Gemini 4 Hydrogen (Low, Medium, High, and XHigh) when you sign in with Application Default Credentials (AGY_ADC_AUTH), and added support for Gemini 4 Hydrogen through an enterprise model gateway.

02

全螢幕渲染模式支援點擊展開,免按快速鍵收合單一區塊

在終端機裡閱讀長篇回應與工具記錄時,若想確認某段內容,翻找起來常需要反覆切換檢視。⟦就像閱讀互動式摺疊目錄一樣,以前想看細節必須按下開關整批掀開,現在只要用滑鼠輕點目標,就能單獨展開或收起該段落。⟧在全螢幕 full screen (altscreen) 渲染模式下,終端機介面新增了滑鼠點擊展開機制。現在只要點擊工具分組、思考過程、提示詞隨附的圖片,或是多行指令輸出,就能直接展開或摺疊特定項目。你不必再透過 Ctrl+O 鍵來回切換。預設的渲染模式(Rendering Mode)則維持原樣。

官方原文

Added click-to-expand in the full screen (altscreen) rendering mode: clicking a tool group, a thought, a prompt's attached images, or multi-line command output now expands or collapses just that item, so you no longer have to use Ctrl+O. The default Rendering Mode is unchanged.

03

agy acp 即時回報上下文用量,編輯器可顯示使用比例

當你在外部編輯器裡調用助手時,常想掌握對話佔據了模型多少記憶容量。⟦類似儀表板即時顯示油量,車輛啟動、行駛加速或變更檔位時指針都會更新,駕駛隨時能掌握剩餘行駛額度。⟧在 agy acp 建立的工作階段中,現在會主動回報上下文視窗(模型單次能容納的文字量)的使用進度。這讓 JetBrains AI Chat 等外接編輯器能夠即時顯示對話佔用的比例。該數值會在工作階段剛啟動或重新載入時送出。每當模型完成一次呼叫,或是你切換模型與調整思考層級時,終端機也會立即推送最新用量。

官方原文

Added context window usage updates to agy acp sessions, so editors such as JetBrains AI Chat can show how much of the model's context window the conversation is using; the value is sent when a session starts or is reloaded, after each model call, and after a model or thinking level change.

04

新增企業管理員設定,可嚴格控管網頁讀取與停用遠端操控

企業在落實資安合規政策時,常需要集中管理員工終端對外連線與遠端存取權限。⟦宛若大樓管委會為辦公室出入口設定門禁規範,既能關閉遠端遙控門鎖,也能強制所有包裹必須經由指定櫃檯轉交。⟧新增的 gateway.routeWebFetch 設定鍵可防止代理人讀取網頁時繞過企業模型閘道。除非額外配置了 proxy.address,否則會直接停用讀取網址的功能。在搭配企業模型閘道的情況下,網頁會改由你的電腦直接抓取(有配置時走 proxy.address 轉發),不再經過 Google 的抓取服務。另一項 featureControls.remoteControlEnabled 則能讓組織停用遠端操控(Remote Control)功能。

官方原文

Added support for two admin settings: gateway.routeWebFetch stops the agent's web page reads from going around an enterprise model gateway by disabling URL reading unless a proxy.address is configured, and featureControls.remoteControlEnabled lets an organization turn off Remote Control. With an enterprise model gateway, web pages are now fetched directly from your machine (through proxy.address when set) instead of through Google's fetch service.

05

--remote-agent 背景預先喚醒遠端環境,首則訊息零等待

當你使用遠端代理人連線開發時,每次開啟對話往往要乾等遠端主機完成啟動。⟦猶如外勤駕駛在預約乘客抵達前就先暖好車輛,乘客一開門就能直接出發,不必坐在車內原地等待熱機。⟧在 --remote-agent 建立的工作階段中,送出首則訊息時不再需要停滯等待。只要確認了遠端專案,終端機就會立即在背景備妥新對話的執行環境。輸入 /new 或切換專案時也會再次提前準備。若透過 --continue 或 --conversation=<id> 恢復先前對話,閒置中的環境也會在對話開啟的瞬間於背景喚醒。

官方原文

Improved the first message of a conversation in --remote-agent sessions, which no longer waits for its remote environment to start or resume: the CLI now prepares a new conversation's environment as soon as the session knows its remote project, and again after /new or switching projects, and starts a resumed conversation's idle environment in the background as soon as it opens with --continue or --conversation=<id>.

修正 7 項

06

修復多項權限與安全防護漏洞,阻斷繞過沙盒與指令白名單

當你為代理人配置安全規則時,各層防護現在能確實阻截繞過行為。

終端機沙盒會檢查網址路徑的各種解析,阻擋 %2F、反斜線、.. 繞過憑證與 API 限制,只傳送清理後的路徑。

Windows 的 cmd、powershell 指令須完全符合一律允許規則,夾帶額外陳述式不再放行。

預載 MCP(讓 AI 連接外部工具的協定)工具與 /browser 除錯工具會遵守拒絕或詢問規則。

/plugin、agy plugin、無頭模式(headless,無終端機畫面的執行模式)-p 均受組織管制:停用外掛後,安裝、匯入、啟用會報 plugins are disabled by your organization;停用市集則不抓目錄、不能從市集安裝。列出、停用、解除安裝仍可用。

官方原文

Fixed a security issue in the terminal sandbox's network proxy where a command could get around path-based network rules, such as those limiting where credentials are sent or which Git and API paths are allowed, by using percent-encoded slashes (%2F), backslashes, or .. segments in a URL path; every way of reading the path is now checked against the rules, and the cleaned-up path is the one sent upstream.

Fixed always-allow command rules on Windows so they can no longer be bypassed when the shell is cmd, cmd.exe, powershell.exe, pwsh.exe, or a full path to one of them. Commands run in PowerShell or Command Prompt now always need an exact match, because their quoting rules differ from POSIX shells. A command with hidden extra statements, such as git status '&& del secret.txt', could otherwise be approved by a rule meant only for git status.

Fixed permission rules for MCP tools, such as an mcp(server/tool) deny or ask rule, being ignored for MCP tools that are loaded up front (marked eager in mcp_config.json) and for the /browser subagent's Chrome DevTools tools; these tools now ask for approval or are blocked according to your rules, like other MCP tools.

Fixed /plugin, agy plugin, and headless -p runs ignoring your organization's Gemini Enterprise admin controls for plugins: when an administrator disables plugins, installing, importing, or enabling one now fails with plugins are disabled by your organization, and when the plugin marketplace is disabled, marketplace catalogs are not fetched and marketplace installs fail; listing, disabling, and uninstalling plugins still work.

07

Windows 修正 UTF-8 BOM 讀取、路徑反斜線與掛鉤引號問題

在 Windows 環境下配置設定與執行腳本時,檔案編碼與指令呼叫的幾處問題已經修好。

掛鉤(hook,事件發生時觸發的小程式)含雙引號時不再被略過;PreInvocation、PreToolUse 攔截會生效,指令原樣傳給 cmd.exe。

UTF-8 BOM(檔案開頭的編碼標記)不再讓檔案被忽略。settings.json、--settings 指定檔案不再被誤判格式錯誤。hooks.json 的掛鉤會在 /hooks 正常顯示並執行。自訂代理人與規則檔不再從 /agents、代理人選單消失,或失去檔案開頭設定的觸發條件。

EDITOR 的 Windows 路徑不再掉落反斜線,/open 等功能能正常喚起編輯器。

以 ! 執行的殼層指令大量寫入標準錯誤時不再卡死,會完整執行並按順序印出所有輸出。

官方原文

Fixed hook commands on Windows that contain double quotes, such as type "C:\my dir\deny.json", failing and being silently skipped, which let a PreInvocation or PreToolUse hook that should block the agent go unenforced; hook commands are now passed to cmd.exe exactly as written.

Fixed files saved with a UTF-8 byte order mark (BOM), as Windows PowerShell, Visual Studio, and Notepad's "UTF-8 with BOM" option do, being silently ignored: settings.json and files passed to --settings are no longer rejected as malformed, a hooks.json no longer leaves /hooks empty with none of its hooks running, and custom agent and rule files no longer go missing from /agents and the agent picker or lose their frontmatter trigger.

Fixed opening your external editor on Windows when EDITOR or the Editor setting is a normal Windows path such as C:\Tools\ed.cmd or "C:\Program Files\Vim\vim.exe"; backslashes were dropped, so Ctrl+G, /open, /keybindings, and artifact review failed with an editor ... not found in PATH error.

Fixed ! shell commands hanging forever with no output when the command wrote a lot to stderr, which was easy to hit on Windows with build tools that print progress or warnings to stderr; such commands now finish and show their stdout and stderr lines in the order they were written.

08

修復網路斷線重試機制,排解背景任務與訊息佇列卡死

當網路環境不穩或長時間執行任務時,斷線會以新連線重試,背景阻塞的幾處問題也已修好。

代理人對話遇到連線失效或 HTTP/2 中斷,模型請求會用新連線重試;次數耗盡仍會顯示終端機的網路錯誤。組織管理員設定代理伺服器或自訂 CA 憑證(用來確認連線對象可信的證明)時,緩慢回應不再於 60 秒後強制逾時。

產生對話標題、工作樹(worktree,平行開啟專案副本的功能)名稱或提交訊息等背景請求時,模型若回傳非預期的超長文字,先前會卡死請求,或使工作階段結束後無法退出;現在已修好。

排程佇列中因異常關閉留下的空白或損壞檔案,不再阻擋後續通知、計時器與次代理人回覆;無法讀取的檔案會被隔離,其餘訊息正常遞送。

代理人運作期間若登出再重新登入,進度旋轉指示條不再凍結停擺,會持續正常旋轉。

官方原文

Fixed agent turns failing when a network connection silently went stale or the network dropped a shared HTTP/2 connection, for example with http2: client connection force closed via ClientConn.Close or after a socket write error; model requests now retry on a fresh connection and, if retries run out, show the CLI's network error message. Slow model responses also no longer time out after 60 seconds when an organization's admin settings configure a proxy or custom CA certificate.

Fixed the CLI sometimes never exiting after a session, and background requests such as generating a conversation title, worktree name, or commit message hanging, when the model answered one of those requests with an unexpectedly long reply.

Fixed a single empty or corrupted queued message file, for example one left behind by an unclean shutdown, blocking every later message to the agent, so background task completions, timers, and subagent replies no longer silently stop reaching it; the unreadable file is set aside and the remaining messages are delivered.

Fixed the in-progress spinner line freezing until you restarted the CLI after you logged out while the agent was working and then signed back in; it now keeps animating.

09

修復遠端 MCP 權杖更新、外掛登入提示與模型切換簽章錯誤

當你整合外部擴充服務或切換不同模型時,驗證交握與操作提示的幾處中斷狀況已經排除。

遠端 MCP(讓 AI 連接外部工具的協定)伺服器若使用無需密鑰的 OAuth 登入,先前會在憑證過期後立即被登出。通常一小時後 token(授權令牌)失效連線就中斷;現在更新權杖時會依規範送出客戶端識別碼,舊版儲存的登入也一併保持連線。

當外掛或其 MCP 伺服器需要認證時,代理人先前會叫你點擊介面上不存在的登入按鈕。現在會正確引導你透過 /plugin 登入並發送訊息繼續,/mcp 也會顯示一致的指引。

將現有對話從 Gemini 模型切換至自訂或管理員管理的非 Gemini 模型,例如 Claude 時,先前會出現思考區塊簽章錯誤(Invalid signature in thinking block),該問題已順利排除。

官方原文

Fixed remote MCP servers that sign in with OAuth without a client secret signing you out as soon as the access token expired, typically after an hour; token refreshes now send the client ID the way the server requires, so you stay signed in, including with sign-ins saved by earlier versions.

Fixed the agent telling you to click a Sign in button or use an Accounts tab, which the CLI doesn't have, when a plugin or plugin MCP server needs you to sign in; it now tells you to sign in with /plugin and then send a message to continue, and /mcp shows the same /plugin guidance for a server that is waiting on a sign-in.

Fixed switching a conversation from a Gemini model to a custom or admin-managed non-Gemini model, such as Claude, failing with an Invalid signature in thinking block error.

10

/learn 新增規則大小上限檢查,避免指令重複追加導致內容被截斷

當你經常使用 /learn 指令教導代理人個人工作偏好時,持續累積的規則可能不知不覺超過限制。⟦好比隨身便條本頁數有限,寫滿前就先提醒你整理重點、把舊筆記分類歸檔,而不是任由後面的文字直接被頁尾裁掉。⟧先前 /learn 會重複向 GEMINI.md 或 AGENTS.md 等檔案追加內容,直到超出規則容量上限,導致末端條目在每輪對話中被悄悄截斷。現在更新規則前會主動比對大小限制;當長度接近或超標時,終端機會提議精簡現有條目、拆分出特定範圍的規則,或是將逐步操作引導改寫成技能(skill)。

官方原文

Fixed /learn repeatedly appending to rule files such as GEMINI.md or AGENTS.md until they grew past the rule size limit, after which their endings were silently cut off on every turn. Before updating a rule, /learn now checks the documented size limits, and when an update would get close to or exceed them, it proposes condensing existing entries, splitting them into a scoped rule, or moving step-by-step guidance into a skill.

11

修復 /btw 旁支提問逾時、結構化輸出提醒與 /rewind 倒帶錯誤

在對話過程中穿插側邊提問、結構化回應或回退歷史時,幾處流程中斷的瑕疵已經修好。

用 /btw、/help 發問,先前超過 5 分鐘會報 stream timed out after 5m0s。現在會執行到完成或你按 Esc;Thinking... 與 already in progress 提示也會說明。若需要卡片無法顯示的權限核准,會立即中止並提示改到主對話詢問。

透過 --conversation 恢復以 --json-schema 啟動的對話時,先前輪次若已給出結構化結果,後續提問容易退回純文字。現在每則新訊息各有結構化輸出提醒,仍受每則訊息通常的提醒次數上限約束。

在回合剛開始時按 Esc 並隨即用 /rewind 撤回訊息,先前會出現 step_index out of bounds 錯誤而無法撤回;現在已修好。

官方原文

Fixed /btw and /help side questions failing with stream timed out after 5m0s while the side question was still working: they now run until they finish or you press Esc, which the Thinking... line and the "already in progress" message now mention, and a side question that needs an approval the card can't show stops right away and tells you to ask in the main conversation instead.

Fixed follow-up turns in a --json-schema conversation resumed with --conversation ending on a plain-text reply with no structured result once an earlier turn had produced one; each new message now gets its own reminders to return the structured output, up to the usual limit per message.

Fixed /rewind failing with a step_index out of bounds error when you pressed Esc while a turn was still starting and then rewound to remove that message.

12

修復 /diff 大檔比對虛構變更、產物搜尋斷詞與自訂狀態列通知

當你比對程式變更、搜尋產物內容或自訂終端介面時,畫面顯示的多處瑕疵已經修正。

針對大於 500 KB 的檔案執行 /diff 檢視時,若先前的編輯更動了檔案長度,結尾處先前會出現憑空捏造的虛構變更。現在兩份版本會截斷在相同行數,確保只呈現真正的修改。

產物檢視器的 / 搜尋先前會漏掉跨樣式的文字(例如包含數字或行內程式碼),且比對反白後會讓同行其餘樣式消失;現在各色彩主題下當前比對項目的標記都清楚易讀。

使用自訂狀態列(statusLine,顯示在終端機最底下的狀態列)時,複製文字提示、儲存失敗或權限重載訊息先前完全不會顯示。現在這些通知會短暫替換狀態列並在關閉後復原,且不造成畫面位移。

官方原文

Fixed /diff showing a made-up change at the end of a turn's diff for files larger than 500 KB when an earlier edit changed the file's length; the two versions are now cut off at the same line, so the preview shows only real edits.

Fixed / search in the artifact viewer missing text split across different styles, such as a sentence containing a number or inline code, and leaving the rest of a styled line unstyled after a highlighted match; the current match is also now easier to pick out from the other matches in every color scheme.

Fixed status messages such as "Copied 3 lines (42 characters)" after selecting text, settings save errors, and permission reload notices never appearing when you use a custom status line; they now briefly replace your custom status line, which comes back once the message clears, without shifting the layout.