[AI Assisted] Usage: add Google Antigravity usage tracking #1490
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.
Intent
Enable usage tracking for the
google-antigravityprovider so users can monitor their quota consumption and remaining credits in the/statusoutput, similar to existing providers (Claude, Copilot, etc.).Problem: Users running Clawdbot with Google Antigravity have no visibility into their credit usage or per-model quota limits.
Solution: Add dedicated fetcher that queries Google Cloud Code API to display:
User Impact: Users can now see quota information like:
Implementation
API Integration:
loadCodeAssist- retrieves credits and plan informationfetchAvailableModels- retrieves per-model quota dataData Processing:
gemini-pro-1.5,gemini-flash-2.0) rather than grouping by familieschat_ortab_)Error Handling:
Debug Logging:
[antigravity]prefixlogging.level: "debug"is set in configTesting
14 comprehensive test cases covering:
Files Changed
src/infra/provider-usage.fetch.antigravity.ts(new, 272 lines)src/infra/provider-usage.fetch.antigravity.test.ts(new, 467 lines, 14 tests)src/infra/provider-usage.fetch.ts(export added)src/infra/provider-usage.load.ts(case added for google-antigravity)Reference
Implementation based on: https://github.com/skainguyen1412/antigravity-usage
Test Plan