@google/gemini-cli-a2a-server 0.33.0-preview.8 → 0.33.0-preview.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -134455,7 +134455,8 @@ var init_billing = __esm({
134455
134455
  G1_CREDIT_TYPE = "GOOGLE_ONE_AI";
134456
134456
  OVERAGE_ELIGIBLE_MODELS = /* @__PURE__ */ new Set([
134457
134457
  PREVIEW_GEMINI_MODEL,
134458
- PREVIEW_GEMINI_3_1_MODEL
134458
+ PREVIEW_GEMINI_3_1_MODEL,
134459
+ PREVIEW_GEMINI_FLASH_MODEL
134459
134460
  ]);
134460
134461
  MIN_CREDIT_BALANCE = 50;
134461
134462
  }
@@ -214236,8 +214237,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
214236
214237
  var init_git_commit = __esm({
214237
214238
  "packages/core/dist/src/generated/git-commit.js"() {
214238
214239
  "use strict";
214239
- GIT_COMMIT_INFO = "302b48a0b";
214240
- CLI_VERSION = "0.33.0-preview.8";
214240
+ GIT_COMMIT_INFO = "5e80faf38";
214241
+ CLI_VERSION = "0.33.0-preview.9";
214241
214242
  }
214242
214243
  });
214243
214244
 
@@ -291495,7 +291496,7 @@ function getVersion() {
291495
291496
  }
291496
291497
  versionPromise = (async () => {
291497
291498
  const pkgJson = await getPackageJson(__dirname3);
291498
- return "0.33.0-preview.8";
291499
+ return "0.33.0-preview.9";
291499
291500
  })();
291500
291501
  return versionPromise;
291501
291502
  }
@@ -291574,6 +291575,7 @@ var init_server = __esm({
291574
291575
  init_types8();
291575
291576
  init_billing();
291576
291577
  init_loggers();
291578
+ init_events();
291577
291579
  init_billingEvents();
291578
291580
  init_converter();
291579
291581
  init_telemetry2();
@@ -291604,6 +291606,10 @@ var init_server = __esm({
291604
291606
  const autoUse = this.config ? shouldAutoUseCredits(this.config.getBillingSettings().overageStrategy, getG1CreditBalance(this.paidTier)) : false;
291605
291607
  const modelIsEligible = isOverageEligibleModel(req.model);
291606
291608
  const shouldEnableCredits = modelIsEligible && autoUse;
291609
+ if (shouldEnableCredits && !this.config?.getCreditsNotificationShown()) {
291610
+ this.config?.setCreditsNotificationShown(true);
291611
+ coreEvents.emitFeedback("info", "Using AI Credits for this request.");
291612
+ }
291607
291613
  const enabledCreditTypes = shouldEnableCredits ? [G1_CREDIT_TYPE] : void 0;
291608
291614
  const responses = await this.requestStreamingPost("streamGenerateContent", toGenerateContentRequest(req, userPromptId, this.projectId, this.sessionId, enabledCreditTypes), req.config?.abortSignal);
291609
291615
  const streamingLatency = {};
@@ -418996,6 +419002,7 @@ var init_config4 = __esm({
418996
419002
  fallbackModelHandler;
418997
419003
  validationHandler;
418998
419004
  quotaErrorOccurred = false;
419005
+ creditsNotificationShown = false;
418999
419006
  modelQuotas = /* @__PURE__ */ new Map();
419000
419007
  lastRetrievedQuota;
419001
419008
  lastQuotaFetchTime = 0;
@@ -419528,6 +419535,11 @@ var init_config4 = __esm({
419528
419535
  resetTurn() {
419529
419536
  this.modelAvailabilityService.resetTurn();
419530
419537
  }
419538
+ /** Resets billing state (overageStrategy, creditsNotificationShown) once per user prompt. */
419539
+ resetBillingTurnState(overageStrategy) {
419540
+ this.creditsNotificationShown = false;
419541
+ this.billing.overageStrategy = overageStrategy ?? "ask";
419542
+ }
419531
419543
  getMaxSessionTurns() {
419532
419544
  return this.maxSessionTurns;
419533
419545
  }
@@ -419537,6 +419549,12 @@ var init_config4 = __esm({
419537
419549
  getQuotaErrorOccurred() {
419538
419550
  return this.quotaErrorOccurred;
419539
419551
  }
419552
+ setCreditsNotificationShown(value) {
419553
+ this.creditsNotificationShown = value;
419554
+ }
419555
+ getCreditsNotificationShown() {
419556
+ return this.creditsNotificationShown;
419557
+ }
419540
419558
  setQuota(remaining, limit, modelId) {
419541
419559
  const activeModel = modelId ?? this.getActiveModel();
419542
419560
  if (remaining !== void 0 && limit !== void 0) {