Add Antigravity CLI fallback to Antigravity provider#513
Conversation
There was a problem hiding this comment.
1 issue found across 5 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
b6dc757 to
f7eae91
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe PR adds multi-DB OAuth discovery and an Antigravity CLI keychain fallback to the Antigravity plugin, centralizes Cloud Code requests, updates model parsing, adds refresh/retry orchestration, exposes an optional ChangesAntigravity CLI Token Fallback Support
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Probe as probe()
participant LS as LS probe
participant DBs as DB candidates
participant Refresh as OAuth refresh
participant CloudCode as Cloud Code API
participant CliKeychain as CLI Keychain
Caller->>Probe: probe()
Probe->>LS: discover language server
alt LS succeeds
LS-->>Probe: quota result
else LS fails or no port
Probe->>DBs: collect access tokens
Probe->>CloudCode: probe with DB token
alt Cloud Code succeeds
CloudCode-->>Probe: quota result
else auth failure
Probe->>DBs: collect refresh tokens
Probe->>Refresh: refresh tokens
Refresh-->>Probe: new access tokens
Probe->>CloudCode: retry with refreshed token
alt Cloud Code succeeds
CloudCode-->>Probe: quota result
else still fails
Probe->>CliKeychain: read CLI token
Probe->>CloudCode: probe with CLI token
alt Cloud Code succeeds
CloudCode-->>Probe: quota result
else CLI fallback fails
Probe->>Caller: throw LOGIN_MESSAGE
end
end
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
f7eae91 to
2e6e123
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/providers/antigravity.md`:
- Around line 24-25: The ps pipeline using "ps -ax -o pid=,command=" followed by
"grep 'language_server.*antigravity'" can false-match the grep process and miss
case variants; update the pipeline to perform a case-insensitive search for the
language_server + antigravity pattern and avoid matching the grep command itself
(for example, use a pattern that prevents self-match or switch to pgrep with
-i/-f options) so process discovery is robust and case-insensitive while still
locating the language_server antigravity process.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d57bd421-ec43-49e2-940f-b744139524a2
📒 Files selected for processing (5)
docs/plugins/api.mddocs/providers/antigravity.mdplugins/antigravity/plugin.jsplugins/antigravity/plugin.test.jssrc-tauri/src/plugin_engine/host_api.rs
2e6e123 to
91aa6c8
Compare
Summary
agy) as a fallback inside the existingantigravityprovider instead of introducing a separate providerhost.keychain.readGenericPassword(service, account?)Closes #475.
Why
#477 added an
antigravity-cliprovider, but the review feedback was to consolidate this into one Antigravity provider because the IDE, app, and CLI share the same quota pools. Gemini stays unchanged for now.This keeps the UI simple: one Antigravity entry, same existing quota rows, more fallback paths when the standalone app or CLI is the only authenticated source.
Notes
I kept
plugins/antigravity/plugin.jsonunchanged, so this does not add new links, rows, or visual layout changes. The provider still shows quota only; local Antigravity transcripts/logs do not expose reliable token/cost accounting.Manual verification with only the standalone
/Applications/Antigravity.appinstalled returned:Validation
git diff --checkbun run buildCI=1 bun run test(1118 tests passed)cargo test --manifest-path src-tauri/Cargo.toml keychaincargo test --manifest-path src-tauri/Cargo.toml redact_log_message_redacts_account_and_pathsSummary by CodeRabbit
Documentation
New Features
User Experience