Repository navigation
fix(agy): skip quota queries without usable local sign-in - #10233
Merged
farion1231 merged 2 commits intoDec 2, 2026
Merged
Conversation
# Conflicts: # src-tauri/src/services/subscription_agy.rs
Owner
|
Thanks @ruixiazS2023! This fixes a real annoyance: with agy installed but signed out (or after I merged the latest Two non-blocking follow-ups, if you're interested:
#10066 stays open for the main case (token refresh failing and falling back to browser sign-in). |
3 tasks
2 tasks done
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.
Human Note / 本人说明
在查询Agy额度前,先检查本地登录状态。钥匙串没有可用凭证时,在应用内提示并跳过查询。
Summary / 概述
Checking official Antigravity quota starts
agy --print /usage. When the local keychain has no usable sign-in, that command can fall back to interactive sign-in and open a browser.Check the keychain in the shared quota launcher before starting the CLI. An absent, malformed, or expired login with no usable token produces an in-app sign-in error. A read failure produces a retryable message without exposing credentials or underlying keychain error details. A usable login can be queried even if it has not been imported into CC Switch. Explicit ADC sessions keep their existing path.
This guards failures detectable from local credentials. OAuth renewal can still fail at runtime after the check.
Related Issue / 关联 Issue
Refs #10066. This change is independent of the timeout cache in #10232.
Verification / 验证
Checklist / 检查清单
pnpm typecheckpnpm format:checkcargo clippy