mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-16 00:00:52 -07:00
update: add Pro 3.1
This commit is contained in:
@@ -835,7 +835,7 @@ const SETTINGS_SCHEMA = {
|
||||
requiresRestart: false,
|
||||
default: {},
|
||||
description: 'Billing and AI credits settings.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
overageStrategy: {
|
||||
type: 'enum',
|
||||
|
||||
@@ -62,7 +62,7 @@ describe('statsCommand', () => {
|
||||
tier: undefined,
|
||||
userEmail: 'mock@example.com',
|
||||
currentModel: undefined,
|
||||
creditBalance: null,
|
||||
creditBalance: undefined,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ function getUserIdentity(context: CommandContext) {
|
||||
|
||||
const tier = context.services.config?.getUserTierName();
|
||||
const paidTier = context.services.config?.getUserPaidTier();
|
||||
const creditBalance = getG1CreditBalance(paidTier);
|
||||
const creditBalance = getG1CreditBalance(paidTier) ?? undefined;
|
||||
|
||||
return { selectedAuthType, userEmail, tier, creditBalance };
|
||||
}
|
||||
|
||||
@@ -395,8 +395,7 @@ interface StatsDisplayProps {
|
||||
tier?: string;
|
||||
currentModel?: string;
|
||||
quotaStats?: QuotaStats;
|
||||
/** G1 AI Credits balance, null if not eligible */
|
||||
creditBalance?: number | null;
|
||||
creditBalance?: number;
|
||||
}
|
||||
|
||||
export const StatsDisplay: React.FC<StatsDisplayProps> = ({
|
||||
|
||||
@@ -74,8 +74,8 @@ export async function handleCreditsFlow(
|
||||
const { overageStrategy } = args;
|
||||
|
||||
// If credits are already auto-enabled (strategy='always'), the request
|
||||
// that just failed already included credits — they didn't help.
|
||||
// Fall through to ProQuotaDialog which offers the Flash downgrade.
|
||||
// that just failed already included enabledCreditTypes — credits didn't
|
||||
// help. Fall through to ProQuotaDialog which offers the Flash downgrade.
|
||||
if (shouldAutoUseCredits(overageStrategy, creditBalance)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -201,8 +201,7 @@ export type HistoryItemStats = HistoryItemQuotaBase & {
|
||||
type: 'stats';
|
||||
duration: string;
|
||||
quotas?: RetrieveUserQuotaResponse;
|
||||
/** G1 AI Credits balance, null if not eligible */
|
||||
creditBalance?: number | null;
|
||||
creditBalance?: number;
|
||||
};
|
||||
|
||||
export type HistoryItemModelStats = HistoryItemQuotaBase & {
|
||||
|
||||
Reference in New Issue
Block a user