@google/gemini-cli-a2a-server 0.23.0-preview.4 → 0.23.0-preview.5

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.
@@ -310224,7 +310224,7 @@ var __filename = fileURLToPath4(import.meta.url);
310224
310224
  var __dirname3 = path20.dirname(__filename);
310225
310225
  async function getVersion() {
310226
310226
  const pkgJson = await getPackageJson(__dirname3);
310227
- return "0.23.0-preview.4";
310227
+ return "0.23.0-preview.5";
310228
310228
  }
310229
310229
 
310230
310230
  // packages/core/dist/src/code_assist/experiments/client_metadata.js
@@ -312995,8 +312995,8 @@ var Float64Vector = import_vector.default.Float64Vector;
312995
312995
  var PointerVector = import_vector.default.PointerVector;
312996
312996
 
312997
312997
  // packages/core/dist/src/generated/git-commit.js
312998
- var GIT_COMMIT_INFO = "b7ad7e103";
312999
- var CLI_VERSION = "0.23.0-preview.4";
312998
+ var GIT_COMMIT_INFO = "17fb75866";
312999
+ var CLI_VERSION = "0.23.0-preview.5";
313000
313000
 
313001
313001
  // packages/core/dist/src/ide/detect-ide.js
313002
313002
  var IDE_DEFINITIONS = {
@@ -369384,6 +369384,7 @@ function partListUnionToString(value) {
369384
369384
  // packages/core/dist/src/utils/tokenCalculation.js
369385
369385
  var ASCII_TOKENS_PER_CHAR = 0.25;
369386
369386
  var NON_ASCII_TOKENS_PER_CHAR = 1.3;
369387
+ var IMAGE_TOKEN_ESTIMATE = 3e3;
369387
369388
  function estimateTokenCountSync(parts2) {
369388
369389
  let totalTokens = 0;
369389
369390
  for (const part of parts2) {
@@ -369396,7 +369397,14 @@ function estimateTokenCountSync(parts2) {
369396
369397
  }
369397
369398
  }
369398
369399
  } else {
369399
- totalTokens += JSON.stringify(part).length / 4;
369400
+ const inlineData = "inlineData" in part ? part.inlineData : void 0;
369401
+ const fileData = "fileData" in part ? part.fileData : void 0;
369402
+ const mimeType = inlineData?.mimeType || fileData?.mimeType;
369403
+ if (mimeType?.startsWith("image/")) {
369404
+ totalTokens += IMAGE_TOKEN_ESTIMATE;
369405
+ } else {
369406
+ totalTokens += JSON.stringify(part).length / 4;
369407
+ }
369400
369408
  }
369401
369409
  }
369402
369410
  return Math.floor(totalTokens);
@@ -369414,7 +369422,8 @@ async function calculateRequestTokenCount(request3, contentGenerator, model) {
369414
369422
  contents: [{ role: "user", parts: parts2 }]
369415
369423
  });
369416
369424
  return response.totalTokens ?? 0;
369417
- } catch {
369425
+ } catch (error2) {
369426
+ debugLogger.debug("countTokens API failed:", error2);
369418
369427
  return estimateTokenCountSync(parts2);
369419
369428
  }
369420
369429
  }
@@ -371733,7 +371742,7 @@ var GeminiClient = class {
371733
371742
  if (this.currentSequenceModel) {
371734
371743
  return this.currentSequenceModel;
371735
371744
  }
371736
- return this.config.getActiveModel();
371745
+ return resolveModel(this.config.getActiveModel());
371737
371746
  }
371738
371747
  async *sendMessageStream(request3, signal, prompt_id, turns = MAX_TURNS, isInvalidStreamRetry = false) {
371739
371748
  if (!isInvalidStreamRetry) {
@@ -390429,6 +390438,11 @@ if (import.meta.url.startsWith("file:") && isMainModule && process.env["NODE_ENV
390429
390438
  * Copyright 2025 Google LLC
390430
390439
  * SPDX-License-Identifier: Apache-2.0
390431
390440
  */
390441
+ /**
390442
+ * @license
390443
+ * Copyright 2026 Google LLC
390444
+ * SPDX-License-Identifier: Apache-2.0
390445
+ */
390432
390446
  /*! Bundled license information:
390433
390447
 
390434
390448
  safe-buffer/index.js: