mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-29 14:34:55 -07:00
Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com> Co-authored-by: galz10 <galzahavi@google.com>
This commit is contained in:
@@ -47,7 +47,9 @@ import {
|
||||
isOverageEligibleModel,
|
||||
shouldAutoUseCredits,
|
||||
} from '../billing/billing.js';
|
||||
|
||||
import { logBillingEvent } from '../telemetry/loggers.js';
|
||||
import { coreEvents } from '../utils/events.js';
|
||||
import { CreditsUsedEvent } from '../telemetry/billingEvents.js';
|
||||
import type {
|
||||
CaCountTokenResponse,
|
||||
@@ -102,6 +104,11 @@ export class CodeAssistServer implements ContentGenerator {
|
||||
const modelIsEligible = isOverageEligibleModel(req.model);
|
||||
const shouldEnableCredits = modelIsEligible && autoUse;
|
||||
|
||||
if (shouldEnableCredits && !this.config?.getCreditsNotificationShown()) {
|
||||
this.config?.setCreditsNotificationShown(true);
|
||||
coreEvents.emitFeedback('info', 'Using AI Credits for this request.');
|
||||
}
|
||||
|
||||
const enabledCreditTypes = shouldEnableCredits
|
||||
? ([G1_CREDIT_TYPE] as string[])
|
||||
: undefined;
|
||||
|
||||
Reference in New Issue
Block a user