feat(antigravity-cli): support independent client with correct token mapping and pricing - #703
feat(antigravity-cli): support independent client with correct token mapping and pricing#703ddarkr wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
6 issues found across 14 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid β if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".asw/plans/antigravity-cli-migration.md">
<violation number="1" location=".asw/plans/antigravity-cli-migration.md:43">
P2: Documentation uses machine-local absolute file URIs that are non-portable for other environments</violation>
<violation number="2" location=".asw/plans/antigravity-cli-migration.md:48">
P2: Migration plan contains ambiguity about whether to remove or keep the combined `*.json|*.jsonl|*.db` matcher in `scan_directory`, which could result in overlapping file match paths and duplicate/misattributed session processing.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| ### Task 1: Gemini ν΄λΌμ΄μΈνΈ λ‘€λ°± λ° Antigravity ν΄λΌμ΄μΈνΈ νμ₯ | ||
| - **λͺ©ν**: `ClientId::Gemini`λ₯Ό λ‘€λ°±νκ³ `ClientId::Antigravity`κ° `.db` νμΌμ νμνλλ‘ μ€μΊλμ ν΄λΌμ΄μΈνΈ μ μλ₯Ό μμ ν©λλ€. | ||
| - **μμ νμΌ**: | ||
| - [clients.rs](file:///Users/doda/workspace/tokscale/crates/tokscale-core/src/clients.rs) |
There was a problem hiding this comment.
P2: Documentation uses machine-local absolute file URIs that are non-portable for other environments
Prompt for AI agents
Check if this issue is valid β if so, understand the root cause and fix it. At .asw/plans/antigravity-cli-migration.md, line 43:
<comment>Documentation uses machine-local absolute file URIs that are non-portable for other environments</comment>
<file context>
@@ -0,0 +1,87 @@
+### Task 1: Gemini ν΄λΌμ΄μΈνΈ λ‘€λ°± λ° Antigravity ν΄λΌμ΄μΈνΈ νμ₯
+- **λͺ©ν**: `ClientId::Gemini`λ₯Ό λ‘€λ°±νκ³ `ClientId::Antigravity`κ° `.db` νμΌμ νμνλλ‘ μ€μΊλμ ν΄λΌμ΄μΈνΈ μ μλ₯Ό μμ ν©λλ€.
+- **μμ νμΌ**:
+ - [clients.rs](file:///Users/doda/workspace/tokscale/crates/tokscale-core/src/clients.rs)
+ - [scanner.rs](file:///Users/doda/workspace/tokscale/crates/tokscale-core/src/scanner.rs)
+- **μμ
λ΄μ©**:
</file context>
| - **μμ λ΄μ©**: | ||
| - `clients.rs`: `Gemini` ν¨ν΄μ λ€μ `*.json|*.jsonl`λ‘ λ‘€λ°±νκ³ , `Antigravity` ν¨ν΄μ `*.jsonl|*.db` λ‘ λ³κ²½ν©λλ€. | ||
| - `scanner.rs`: `built_in_extra_scan_paths_for`μμ `ClientId::Gemini` λΆκΈ°λ₯Ό μ κ±°νκ³ , `ClientId::Antigravity` λΆκΈ°λ‘ `~/.gemini/antigravity-cli/conversations` κ²½λ‘λ₯Ό μΆκ°ν©λλ€. | ||
| - `scanner.rs`: `scan_directory` ν¨ν΄ λ§€μΉ λΆκΈ°μμ `*.json|*.jsonl|*.db`λ₯Ό μ κ±°νκ³ (λλ λλκ³ ), `*.jsonl|*.db` λ§€μΉ λΆκΈ°λ₯Ό μΆκ°ν©λλ€. |
There was a problem hiding this comment.
P2: Migration plan contains ambiguity about whether to remove or keep the combined *.json|*.jsonl|*.db matcher in scan_directory, which could result in overlapping file match paths and duplicate/misattributed session processing.
Prompt for AI agents
Check if this issue is valid β if so, understand the root cause and fix it. At .asw/plans/antigravity-cli-migration.md, line 48:
<comment>Migration plan contains ambiguity about whether to remove or keep the combined `*.json|*.jsonl|*.db` matcher in `scan_directory`, which could result in overlapping file match paths and duplicate/misattributed session processing.</comment>
<file context>
@@ -0,0 +1,87 @@
+- **μμ
λ΄μ©**:
+ - `clients.rs`: `Gemini` ν¨ν΄μ λ€μ `*.json|*.jsonl`λ‘ λ‘€λ°±νκ³ , `Antigravity` ν¨ν΄μ `*.jsonl|*.db` λ‘ λ³κ²½ν©λλ€.
+ - `scanner.rs`: `built_in_extra_scan_paths_for`μμ `ClientId::Gemini` λΆκΈ°λ₯Ό μ κ±°νκ³ , `ClientId::Antigravity` λΆκΈ°λ‘ `~/.gemini/antigravity-cli/conversations` κ²½λ‘λ₯Ό μΆκ°ν©λλ€.
+ - `scanner.rs`: `scan_directory` ν¨ν΄ λ§€μΉ λΆκΈ°μμ `*.json|*.jsonl|*.db`λ₯Ό μ κ±°νκ³ (λλ λλκ³ ), `*.jsonl|*.db` λ§€μΉ λΆκΈ°λ₯Ό μΆκ°ν©λλ€.
+- **RED Test**: `cargo test test_scan_all_clients_gemini_antigravity_cli_db`κ° κΉ¨μ§λμ§ νμΈνκ³ , μ΄λ₯Ό `ClientId::Antigravity` μ© ν
μ€νΈ(`test_scan_all_clients_antigravity_cli_db`)λ‘ μμ νμ¬ RED μνλ₯Ό νμΈν©λλ€.
+- **GREEN Check**: `cargo test test_scan_all_clients_antigravity_cli_db` ν
μ€νΈκ° ν΅κ³Όνλ κ²μ νμΈν©λλ€.
</file context>
677a98d to
13fba72
Compare
β¦mapping and monotonic timestamps
13fba72 to
3399a16
Compare
|
Thanks for the detailed protobuf reverse-engineering here! We're landing the Antigravity CLI source via #713, which independently arrived at the same feature with byte-identical verification against real databases and the full frontend registry wiring. The One important note for the record: the Closing in favor of #713 β your reverse-engineering work and the pricing direction were genuinely helpful in validating it. π |
|
Hi @ddarkr β thank you for this work! To be transparent about the decision: we're landing Antigravity CLI support via @haunchen's #713, which independently implemented the same SQLite source with byte-identical verification against real databases plus the full frontend registry wiring. Your For the record (and for anyone who finds this later): the Closing in favor of #713. Your reverse-engineering genuinely helped validate the field mapping β thank you, and please keep the contributions coming! π |
This PR adds independent client support for the
antigravity-cliclient, ensuring accurate token usage mapping and custom pricing calculations.Key Changes
antigravity-clias a dedicated client alongside existing clients, defining scan paths and database parsing pipelines.antigravity_cli.rs(Field 5 forcached_tokensand Field 9 forthoughts_tokens), correcting cache read and reasoning token counts.thoughts_tokens) from total completion tokens (candidates_token_count) to prevent double-charging on reasoning models.gemini-3.5-flash-highandgemini-3.5-flash-medium).google/gemini-3.5-flashvariants.try_fromcasting, clarifies token field overlapping layout with code documentation, and tests new model aliases.