Repository navigation
Conversation
Collects usage statistics, quotas, and model breakdowns for Google Antigravity (agy) into the AI agents panel in the Omarchy status bar. - Quotas and rate limits: probes agy /usage via structured JSON output (with text fallback) to extract 5-hour and 7-day quotas for Gemini and Claude/GPT models, with clean UI titles and reset timestamps. - Smart caching: caches rate limits in $XDG_CACHE_HOME/omarchy/agent-usage/ with 120s TTL; respects --force and --limits-only flags. - Token volume and model stats: scans ~/.gemini/antigravity-cli transcripts to compute realistic input/output tokens and per-model consumption, with history.jsonl prompt counting and graceful fallback. - Dynamic tier: reads the active model tier from settings.json. - Ships antigravity.svg asset and unit tests covering offline fallback, token extraction, and quota parsing.
cicciokio
force-pushed
the
add-antigravity-usage-collector
branch
from
September 19, 2026 08:18
acefc4a to
0113fd0
Compare
Member
|
Automated duplication check: this pull request looks similar to #8479, which covers the same Antigravity usage collector. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Google Antigravity (
agy) to the AI agent usage monitoring panel in the Omarchy status bar (omarchy.agents), joining the existingclaude,codex, andfireworkscollectors.Collector (
bin/omarchy-agent-usage-antigravity)agy /usagevia structured JSON output (with graceful fallback to text regex) to extract 5-hour session and 7-day weekly quotas for Gemini Models and Claude/GPT models:Gemini Weekly,Gemini Session,Claude/GPT Weekly,Claude/GPT Session).resetsAt)./usageprobe results for 120 seconds in$XDG_CACHE_HOME/omarchy/agent-usage/antigravity-limits.jsonto prevent unnecessary CLI spawning during periodic shell bar refreshes. Respects--forceand--limits-onlyto bypass cache.~/.gemini/antigravity-cli/brain/*/transcripts to accurately aggregate input and output tokens across conversation steps, dynamic model switches, and recent days (recentDays/todayTotalTokens).modelUsage,todayTokensByModel), enabling the "TOKENS BY DAY" and "TOKENS BY MODEL" panel sections.history.jsonlwith prompt-based token fallback when transcripts are absent.schemaVersion1 with dynamictierLabelread fromsettings.json,ready,hasPromptStats, andauthHelpText.Asset & Docs
shell/plugins/agents/assets/antigravity.svgfor the panel hero and switcher chip.shell/plugins/agents/README.mddocumenting Antigravity in the collector table.Tests
test/shell.d/agent-usage-antigravity-test.shcovering unauthenticated/offline fallback, prompt aggregation, transcript token calculation, dynamic tierLabel, and structured JSON quota parsing.