The Russian localization patch for Google AntiGravity has grown into Toolkit: agent context fill shown in 4 ms
In the agentic IDE Google AntiGravity 2.0, the model's context can suddenly compress in the middle of a task, and the agent loses details. The author of the localizer has released the open-source Toolkit v3.0.5. Its fill indicator reads the tail of the local session log in 4 ms, with no network requests. When the bar reaches 80%, you can call /compact yourself in advance. For long sessions, this is a cheap way to keep the thread of a task.
AI-processed from Habr AI; edited by Hamidun News
Picture this: you have been working with an agent in the IDE on a complex task for an hour, and suddenly the model's context window, the "memory" that holds the entire conversation and code, overflows and is compressed automatically. The agent loses some details, and you find out only after the fact. That pain is what led an independent developer to turn their local localizer for Google AntiGravity 2.
0 into Toolkit v3.0.5, an open set of add-ons under the MIT license.
The main feature is a context fill indicator that reads data from the local log in 4 milliseconds (roughly tens of times faster than a single screen frame) and makes not a single network request. Beyond it, the kit includes bookmarks for messages and an interface in 12 languages. This is an unofficial add-on, not a Google product, but the lessons from working around the quirks of an Electron application are useful to anyone building extensions for other people's desktop IDEs.
A context monitor with no network requests
The idea: don't intercept traffic to the model, but read what the IDE already writes to disk. AntiGravity keeps a local session log, transcript.jsonl, in the ~/.gemini/antigravity/brain/ folder. Each model response record contains token telemetry: how many went into the prompt, how many were read from the cache, and where the last compression happened.
The file can be megabytes in size, so the local service on 127.0.0.1:39228 does not read it whole. It opens the file and takes only the tail, using a window of fixed size. According to the author, this takes less than 4 ms, does not load the disk, and creates no network calls. A fill indicator appears in the IDE header and changes color from green to coral. Clicking it shows exact token counts, the active model, and the cache hit rate, along with a button to copy the /compact command. The threshold for the silent warning is configurable from 50% to 95%.
The practical point is simple: you decide when to compress the context, rather than finding out when the agent has already lost half the details. For sessions with expensive models, this is also a way to control token spending.
Bookmarks in a React app and "rubber" scrolling
The obvious way to add bookmarks to messages is to put a button directly inside the message element. In React, this breaks: when the list re-renders, a removeChild error appears. So the author moved the bookmarks into a separate layer in document.body, clipped to the bounds of the chat's scroll area. The React tree does not touch this layer. Bookmarks are tied to a hash of the text preview and an occurrence index, so they survive re-rendering and restarts.
In version 3.0.3, bookmark icons lagged during fast scrolling. There were four causes: a CSS position animation with an 80 ms delay, updates through requestAnimationFrame, interleaved reading of geometry and writing of styles in a single loop, and a faulty position calculation for long messages. The fix is classic: remove transform from the transition, update the position synchronously within the same frame, and split the loop into phases, with all reads first and then all writes. For long agent responses, the icon behaves like position: sticky.
Two Electron pitfalls and multilingual support
The first pitfall concerns the built-in browser. In AntiGravity it is implemented as a native WebContentsView that is drawn on top of the HTML window, so even z-index 999999 doesn't help: popups get clipped. The author hooked into the same IPC call the IDE itself uses for modal windows. But the Base-UI library leaves empty portal containers in the DOM, and the overlay would not be removed. Now removal is tied to the real classes of the native popups.
The second pitfall: settings were reset after restarts. The IDE brings up its interface on a new random port each time, and localStorage is isolated by scheme, host, and port, so the storage was empty every time. An attempt to save through a local HTTP server and cookies ran into Chromium's preflight requests and session isolation on macOS. A working solution was found in the IDE's own code: it already has an atomic StorageManager with an appStorage.json file, accessible over IPC. Settings are now written there, and a copy is kept in backups/settings.json.
The interface supports 12 languages, including Chinese, Japanese, Spanish, German, and Turkish. The language is detected from the system on first launch. Each dictionary contains 7,077 terms and the names of 109 Marketplace plugins. It is loaded on demand and cached in IndexedDB, so only one language is active in memory. Code, the terminal, and user input are not affected by the translation.
Security and limitations
The author abandoned the CDP debugging port 9222. Updates go through local HTTP and IPC, and every JS file is checked with node --check before it is replaced. On macOS, the toolkit re-signs the bundle and verifies the SHA-512 and the Apple/Google signature before updating the IDE. There is one-click removal with a return to the original app.asar.
The caveats are obvious. The toolkit modifies a Google application, so any IDE update may break compatibility. Figures such as 4 ms and "dozens of installs per day" come from the author himself, with no independent measurements. Installing via curl or irm piped into a shell requires trust in the repository, so it is worth reading the script first. Still, the approach of reading local logs instead of intercepting the network, and storing settings in the IDE's standard storage, applies to any extension for agentic editors.
- Dec 1, 2026Virtual delivery robot powered by GPT-5.6 shot an environmental activist in 21 of 30 runs
- Dec 1, 2026Anthropic-Assisted AI Finds Quantum Attack on ML-KEM, but It Requires 10^3131 Measurements
- Dec 1, 2026Mistral Releases Open Photo and Video Search Model Six Times Smaller Than the Leader
- Dec 1, 2026A 20-number controller with no goal and no reward learned to find food: the "It" idea for AI agents
Key Questions Answered
What are the key details on A context monitor with no network requests?
The idea: don't intercept traffic to the model, but read what the IDE already writes to disk. AntiGravity keeps a local session log, transcript.jsonl, in the ~/.gemini/antigravity/brain/ folder. Each model response record contains token telemetry: how many went into the prompt, how many were read from the cache, and where the last compression happened. The file can be megabytes in size, so the local service on 127.0.0.1:39228 does not read it whole.
What are the key details on Bookmarks in a React app and "rubber" scrolling?
The obvious way to add bookmarks to messages is to put a button directly inside the message element. In React, this breaks: when the list re-renders, a removeChild error appears. So the author moved the bookmarks into a separate layer in document.body, clipped to the bounds of the chat's scroll area. The React tree does not touch this layer. Bookmarks are tied to a hash of the text preview and an occurrence index, so they survive re-rendering and restarts.
What are the key details on Two Electron pitfalls and multilingual support?
The first pitfall concerns the built-in browser. In AntiGravity it is implemented as a native WebContentsView that is drawn on top of the HTML window, so even z-index 999999 doesn't help: popups get clipped. The author hooked into the same IPC call the IDE itself uses for modal windows. But the Base-UI library leaves empty portal containers in the DOM, and the overlay would not be removed. Now removal is tied to the real classes of the native popups. The second pitfall: settings were reset after restarts.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
