mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 00:02:31 +00:00
feat(antigravity): show native quota in accounts
This commit is contained in:
@@ -76,6 +76,7 @@ export function AccountsPane({
|
||||
const codexRateLimits = useAppStore((s) => s.rateLimits.codex)
|
||||
const codexRateLimitTarget = useAppStore((s) => s.rateLimits.codexTarget)
|
||||
const miniMaxRateLimits = useAppStore((s) => s.rateLimits.minimax)
|
||||
const antigravityRateLimits = useAppStore((s) => s.rateLimits.antigravity)
|
||||
const recordFeatureInteraction = useAppStore((s) => s.recordFeatureInteraction)
|
||||
const fetchSettings = useAppStore((s) => s.fetchSettings)
|
||||
const runtimeEnvironments = useAppStore((s) => s.runtimeEnvironments)
|
||||
@@ -370,7 +371,9 @@ export function AccountsPane({
|
||||
matchesSettingsSearch(searchQuery, getAccountsGeminiSearchEntries())
|
||||
? renderGeminiAccountsSection(model)
|
||||
: null,
|
||||
!isRemoteAccountScope ? <AntigravityAccountsSection key="antigravity" /> : null,
|
||||
!isRemoteAccountScope ? (
|
||||
<AntigravityAccountsSection key="antigravity" quota={antigravityRateLimits} />
|
||||
) : null,
|
||||
matchesSettingsSearch(searchQuery, getAccountsOpencodeSearchEntries())
|
||||
? renderOpenCodeAccountsSection(model)
|
||||
: null,
|
||||
|
||||
@@ -4,8 +4,13 @@ import { translate } from '@/i18n/i18n'
|
||||
import { Button } from '../ui/button'
|
||||
import { GeminiIcon } from '../status-bar/icons'
|
||||
import type { AntigravityAccountState } from '../../../../preload/api/agent-account-api'
|
||||
import type { ProviderRateLimits } from '../../../../shared/rate-limit-types'
|
||||
|
||||
export function AntigravityAccountsSection(): React.JSX.Element {
|
||||
export function AntigravityAccountsSection({
|
||||
quota
|
||||
}: {
|
||||
quota: ProviderRateLimits | null
|
||||
}): React.JSX.Element {
|
||||
const [state, setState] = useState<AntigravityAccountState>({
|
||||
accounts: [],
|
||||
activeAccountId: null
|
||||
@@ -53,6 +58,14 @@ export function AntigravityAccountsSection(): React.JSX.Element {
|
||||
</p>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
{quota && (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Quota:{' '}
|
||||
{quota.status === 'ok'
|
||||
? `${quota.buckets?.length ?? 0} model windows available`
|
||||
: (quota.error ?? 'Unavailable')}
|
||||
</p>
|
||||
)}
|
||||
{state.accounts.map((account) => (
|
||||
<div
|
||||
key={account.id}
|
||||
|
||||
Reference in New Issue
Block a user