@sourcegraph/amp 0.0.1748548891-gfb902f → 0.0.1748563307-g76b426

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.
Files changed (41) hide show
  1. package/dist/amp.js +2 -2
  2. package/dist/{color-Bs5UNAQf.js → color-ldrInzKB.js} +4901 -4944
  3. package/dist/color-ldrInzKB.js.map +1 -0
  4. package/dist/{create_file.node-DhqtPKLL.js → create_file.node-pHiRAwrz.js} +2 -2
  5. package/dist/{create_file.node-DhqtPKLL.js.map → create_file.node-pHiRAwrz.js.map} +1 -1
  6. package/dist/{edit_file.node-_jUhb0Ej.js → edit_file.node-nAUP_3bW.js} +3 -3
  7. package/dist/{edit_file.node-_jUhb0Ej.js.map → edit_file.node-nAUP_3bW.js.map} +1 -1
  8. package/dist/{executable-De4-Iq-q.js → executable-D9Dr9Z2U.js} +2 -2
  9. package/dist/{executable-De4-Iq-q.js.map → executable-D9Dr9Z2U.js.map} +1 -1
  10. package/dist/{files-Cahfcbk6.js → files-C7vv9BDa.js} +2 -2
  11. package/dist/{files-Cahfcbk6.js.map → files-C7vv9BDa.js.map} +1 -1
  12. package/dist/{glob.node-DMC-mbKX.js → glob.node-Mg2vA9hM.js} +3 -3
  13. package/dist/{glob.node-DMC-mbKX.js.map → glob.node-Mg2vA9hM.js.map} +1 -1
  14. package/dist/{list_directory.node-BiNTY-zJ.js → list_directory.node-BQq4XK-y.js} +2 -2
  15. package/dist/{list_directory.node-BiNTY-zJ.js.map → list_directory.node-BQq4XK-y.js.map} +1 -1
  16. package/dist/{load-profile-Gn3gm8Ha.js → load-profile-D7KCxFft.js} +2 -2
  17. package/dist/{load-profile-Gn3gm8Ha.js.map → load-profile-D7KCxFft.js.map} +1 -1
  18. package/dist/{main-e0U8PkGs.js → main-B8n5KdeK.js} +218 -212
  19. package/dist/main-B8n5KdeK.js.map +1 -0
  20. package/dist/{node-T5hkN-Bz.js → node-4YOMf-Tu.js} +3 -3
  21. package/dist/{node-T5hkN-Bz.js.map → node-4YOMf-Tu.js.map} +1 -1
  22. package/dist/{node-B-VoRsW5.js → node-C2XZ5nUw.js} +2 -2
  23. package/dist/{node-B-VoRsW5.js.map → node-C2XZ5nUw.js.map} +1 -1
  24. package/dist/{node-IbYXJXx-.js → node-CCnEMObW.js} +3 -3
  25. package/dist/{node-IbYXJXx-.js.map → node-CCnEMObW.js.map} +1 -1
  26. package/dist/{node-CD0uLwWO.js → node-CjTxUnpu.js} +3 -3
  27. package/dist/{node-CD0uLwWO.js.map → node-CjTxUnpu.js.map} +1 -1
  28. package/dist/{node-BeQHJ-gW.js → node-mEGuz3HH.js} +2 -2
  29. package/dist/{node-BeQHJ-gW.js.map → node-mEGuz3HH.js.map} +1 -1
  30. package/dist/{node-CKT_qFZU.js → node-n3roOnuX.js} +3 -3
  31. package/dist/{node-CKT_qFZU.js.map → node-n3roOnuX.js.map} +1 -1
  32. package/dist/{read_file.node-D_famz3I.js → read_file.node-Da0ma4-1.js} +2 -2
  33. package/dist/{read_file.node-D_famz3I.js.map → read_file.node-Da0ma4-1.js.map} +1 -1
  34. package/dist/{stdio-BWNPoNat.js → stdio-D2dcTskV.js} +3 -3
  35. package/dist/{stdio-BWNPoNat.js.map → stdio-D2dcTskV.js.map} +1 -1
  36. package/dist/storybook.js +1 -1
  37. package/dist/{undo_edit.node-C8sU5262.js → undo_edit.node-BH-4_Rkm.js} +2 -2
  38. package/dist/{undo_edit.node-C8sU5262.js.map → undo_edit.node-BH-4_Rkm.js.map} +1 -1
  39. package/package.json +1 -1
  40. package/dist/color-Bs5UNAQf.js.map +0 -1
  41. package/dist/main-e0U8PkGs.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { B as _i, O as Qt, s as fn, c as $E, a as Jn, b as tc, f as pt, d as ta, p as es, m as Et, e as da, g as un, h as ha, i as zO, j as UE, k as rc, M as Qn, l as KO, n as ae, N as gu, o as Dm, r as Pr, q as Fm, t as JO, u as YO, v as $m, w as jO, x as ZO, y as Ky, z as Ru, A as QO, C as Sn, D as dW, E as ra, F as XO, G as eM, H as tM, I as Qi, J as qE, K as rM, L as wi, P as BE, Q as VE, R as nM, S as iM, T as Kp, U as oM, V as sM, W as aM, X as lM, Y as uM, Z as rd, _ as cM, $ as HE, a0 as Jy, a1 as fM, a2 as dM, a3 as hM, a4 as pM, a5 as mM, a6 as GE, a7 as gM, a8 as vM, a9 as yM, aa as _M, ab as Yy, ac as wM, ad as bM, ae as SM, af as EM, ag as TM, ah as CM, ai as AM, aj as PM, ak as IM, al as RM, am as xM, an as kM, ao as OM, ap as MM, aq as LM, ar as NM, as as xu, at as DM, au as FM, av as $M, aw as UM, ax as qM, ay as BM, az as WE, aA as Jp, aB as Tt, aC as VM, aD as HM, aE as zE, aF as KE, aG as GM, aH as WM, aI as zM, aJ as KM, aK as jy, aL as Zy } from "./color-Bs5UNAQf.js";
2
+ import { B as _i, O as Qt, s as fn, c as $E, a as Jn, b as tc, f as pt, d as ta, p as es, m as Et, e as da, g as un, h as ha, i as zO, j as UE, k as rc, M as Qn, l as KO, n as ae, N as gu, o as Dm, r as Pr, q as Fm, t as JO, u as YO, v as $m, w as jO, x as ZO, y as Ky, z as Ru, A as QO, C as Sn, D as dW, E as ra, F as XO, G as eM, H as tM, I as Qi, J as qE, K as rM, L as wi, P as BE, Q as VE, R as nM, S as iM, T as Kp, U as oM, V as sM, W as aM, X as lM, Y as uM, Z as rd, _ as cM, $ as HE, a0 as Jy, a1 as fM, a2 as dM, a3 as hM, a4 as pM, a5 as mM, a6 as GE, a7 as gM, a8 as vM, a9 as yM, aa as _M, ab as Yy, ac as wM, ad as bM, ae as SM, af as EM, ag as TM, ah as CM, ai as AM, aj as PM, ak as IM, al as RM, am as xM, an as kM, ao as OM, ap as MM, aq as LM, ar as NM, as as xu, at as DM, au as FM, av as $M, aw as UM, ax as qM, ay as BM, az as WE, aA as Jp, aB as Tt, aC as VM, aD as HM, aE as zE, aF as KE, aG as GM, aH as WM, aI as zM, aJ as KM, aK as jy, aL as Zy } from "./color-ldrInzKB.js";
3
3
  import * as JM from "node:fs/promises";
4
4
  import Yo, { readdir as YM, stat as JE, readFile as Ji, mkdir as Um, writeFile as qm, unlink as jM, readlink as ZM } from "node:fs/promises";
5
5
  import * as QM from "node:path";
@@ -17,7 +17,7 @@ import aL from "node:zlib";
17
17
  import lL from "node:string_decoder";
18
18
  import uL, { createServer as ZE } from "node:http";
19
19
  import cL from "node:https";
20
- import { r as fL } from "./executable-De4-Iq-q.js";
20
+ import { r as fL } from "./executable-D9Dr9Z2U.js";
21
21
  function dL() {
22
22
  const i = /* @__PURE__ */ new Set(), e = new _i(i);
23
23
  return {
@@ -7752,10 +7752,10 @@ async function c2(i, e, t) {
7752
7752
  if ("url" in i)
7753
7753
  n = new l2(new URL(i.url));
7754
7754
  else {
7755
- const { loadProfileEnvironmentVariables: r } = await import("./load-profile-Gn3gm8Ha.js"), o = t.loadProfile === "never" || !t.workingDirectory ? process.env : await pt(
7755
+ const { loadProfileEnvironmentVariables: r } = await import("./load-profile-D7KCxFft.js"), o = t.loadProfile === "never" || !t.workingDirectory ? process.env : await pt(
7756
7756
  r(t.workingDirectory, t.loadProfile)
7757
7757
  );
7758
- n = await import("./stdio-BWNPoNat.js").then(
7758
+ n = await import("./stdio-D2dcTskV.js").then(
7759
7759
  ({ StdioClientTransport: s }) => new s({
7760
7760
  ...i,
7761
7761
  stderr: "pipe",
@@ -8055,7 +8055,7 @@ This tool converts web content to markdown format for better readability.`,
8055
8055
  requiresNetwork: !0
8056
8056
  }
8057
8057
  },
8058
- fn: import("./node-B-VoRsW5.js").then(({ nodeReadWebPageTool: i }) => i)
8058
+ fn: import("./node-C2XZ5nUw.js").then(({ nodeReadWebPageTool: i }) => i)
8059
8059
  }, v2 = "web_search", y2 = `Search the web for information.
8060
8060
 
8061
8061
  Returns search result titles, associated URLs, and a small summary of the
@@ -8103,7 +8103,7 @@ the \`${cm}\` with the url.
8103
8103
  requiresNetwork: !0
8104
8104
  }
8105
8105
  },
8106
- fn: import("./node-CKT_qFZU.js").then(({ nodeWebSearchTool: i }) => i)
8106
+ fn: import("./node-n3roOnuX.js").then(({ nodeWebSearchTool: i }) => i)
8107
8107
  };
8108
8108
  function w2(i) {
8109
8109
  const { interval: e, fn: t, cacheKey: n } = i, r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
@@ -13762,37 +13762,37 @@ function pw(i, e) {
13762
13762
  ]);
13763
13763
  return u != null && y(t, ["usageMetadata"], u), t;
13764
13764
  }
13765
- function e9(i, e) {
13765
+ function eB(i, e) {
13766
13766
  const t = {}, n = m(e, ["truncated"]);
13767
13767
  n != null && y(t, ["truncated"], n);
13768
13768
  const r = m(e, ["token_count"]);
13769
13769
  return r != null && y(t, ["tokenCount"], r), t;
13770
13770
  }
13771
- function t9(i, e) {
13771
+ function tB(i, e) {
13772
13772
  const t = {}, n = m(e, ["values"]);
13773
13773
  n != null && y(t, ["values"], n);
13774
13774
  const r = m(e, ["statistics"]);
13775
- return r != null && y(t, ["statistics"], e9(i, r)), t;
13775
+ return r != null && y(t, ["statistics"], eB(i, r)), t;
13776
13776
  }
13777
- function r9(i, e) {
13777
+ function rB(i, e) {
13778
13778
  const t = {}, n = m(e, [
13779
13779
  "billableCharacterCount"
13780
13780
  ]);
13781
13781
  return n != null && y(t, ["billableCharacterCount"], n), t;
13782
13782
  }
13783
- function n9(i, e) {
13783
+ function nB(i, e) {
13784
13784
  const t = {}, n = m(e, [
13785
13785
  "predictions[]",
13786
13786
  "embeddings"
13787
13787
  ]);
13788
13788
  if (n != null) {
13789
13789
  let o = n;
13790
- Array.isArray(o) && (o = o.map((s) => t9(i, s))), y(t, ["embeddings"], o);
13790
+ Array.isArray(o) && (o = o.map((s) => tB(i, s))), y(t, ["embeddings"], o);
13791
13791
  }
13792
13792
  const r = m(e, ["metadata"]);
13793
- return r != null && y(t, ["metadata"], r9(i, r)), t;
13793
+ return r != null && y(t, ["metadata"], rB(i, r)), t;
13794
13794
  }
13795
- function i9(i, e) {
13795
+ function iB(i, e) {
13796
13796
  const t = {}, n = m(e, ["gcsUri"]);
13797
13797
  n != null && y(t, ["gcsUri"], n);
13798
13798
  const r = m(e, [
@@ -13818,7 +13818,7 @@ function ZT(i, e) {
13818
13818
  }
13819
13819
  function tg(i, e) {
13820
13820
  const t = {}, n = m(e, ["_self"]);
13821
- n != null && y(t, ["image"], i9(i, n));
13821
+ n != null && y(t, ["image"], iB(i, n));
13822
13822
  const r = m(e, [
13823
13823
  "raiFilteredReason"
13824
13824
  ]);
@@ -13828,7 +13828,7 @@ function tg(i, e) {
13828
13828
  const s = m(e, ["prompt"]);
13829
13829
  return s != null && y(t, ["enhancedPrompt"], s), t;
13830
13830
  }
13831
- function o9(i, e) {
13831
+ function oB(i, e) {
13832
13832
  const t = {}, n = m(e, [
13833
13833
  "predictions"
13834
13834
  ]);
@@ -13841,7 +13841,7 @@ function o9(i, e) {
13841
13841
  ]);
13842
13842
  return r != null && y(t, ["positivePromptSafetyAttributes"], ZT(i, r)), t;
13843
13843
  }
13844
- function s9(i, e) {
13844
+ function sB(i, e) {
13845
13845
  const t = {}, n = m(e, [
13846
13846
  "predictions"
13847
13847
  ]);
@@ -13851,7 +13851,7 @@ function s9(i, e) {
13851
13851
  }
13852
13852
  return t;
13853
13853
  }
13854
- function a9(i, e) {
13854
+ function aB(i, e) {
13855
13855
  const t = {}, n = m(e, [
13856
13856
  "predictions"
13857
13857
  ]);
@@ -13861,7 +13861,7 @@ function a9(i, e) {
13861
13861
  }
13862
13862
  return t;
13863
13863
  }
13864
- function l9(i, e) {
13864
+ function lB(i, e) {
13865
13865
  const t = {}, n = m(e, ["endpoint"]);
13866
13866
  n != null && y(t, ["name"], n);
13867
13867
  const r = m(e, [
@@ -13869,7 +13869,7 @@ function l9(i, e) {
13869
13869
  ]);
13870
13870
  return r != null && y(t, ["deployedModelId"], r), t;
13871
13871
  }
13872
- function u9(i, e) {
13872
+ function uB(i, e) {
13873
13873
  const t = {}, n = m(e, [
13874
13874
  "labels",
13875
13875
  "google-vertex-llm-tuning-base-model-id"
@@ -13880,7 +13880,7 @@ function u9(i, e) {
13880
13880
  const o = m(e, ["updateTime"]);
13881
13881
  return o != null && y(t, ["updateTime"], o), t;
13882
13882
  }
13883
- function c9(i, e) {
13883
+ function cB(i, e) {
13884
13884
  const t = {}, n = m(e, ["checkpointId"]);
13885
13885
  n != null && y(t, ["checkpointId"], n);
13886
13886
  const r = m(e, ["epoch"]);
@@ -13900,12 +13900,12 @@ function vm(i, e) {
13900
13900
  const a = m(e, ["deployedModels"]);
13901
13901
  if (a != null) {
13902
13902
  let g = a;
13903
- Array.isArray(g) && (g = g.map((v) => l9(i, v))), y(t, ["endpoints"], g);
13903
+ Array.isArray(g) && (g = g.map((v) => lB(i, v))), y(t, ["endpoints"], g);
13904
13904
  }
13905
13905
  const u = m(e, ["labels"]);
13906
13906
  u != null && y(t, ["labels"], u);
13907
13907
  const c = m(e, ["_self"]);
13908
- c != null && y(t, ["tunedModelInfo"], u9(i, c));
13908
+ c != null && y(t, ["tunedModelInfo"], uB(i, c));
13909
13909
  const d = m(e, [
13910
13910
  "defaultCheckpointId"
13911
13911
  ]);
@@ -13913,11 +13913,11 @@ function vm(i, e) {
13913
13913
  const p = m(e, ["checkpoints"]);
13914
13914
  if (p != null) {
13915
13915
  let g = p;
13916
- Array.isArray(g) && (g = g.map((v) => c9(i, v))), y(t, ["checkpoints"], g);
13916
+ Array.isArray(g) && (g = g.map((v) => cB(i, v))), y(t, ["checkpoints"], g);
13917
13917
  }
13918
13918
  return t;
13919
13919
  }
13920
- function f9(i, e) {
13920
+ function fB(i, e) {
13921
13921
  const t = {}, n = m(e, [
13922
13922
  "nextPageToken"
13923
13923
  ]);
@@ -13929,18 +13929,18 @@ function f9(i, e) {
13929
13929
  }
13930
13930
  return t;
13931
13931
  }
13932
- function d9() {
13932
+ function dB() {
13933
13933
  return {};
13934
13934
  }
13935
- function h9(i, e) {
13935
+ function hB(i, e) {
13936
13936
  const t = {}, n = m(e, ["totalTokens"]);
13937
13937
  return n != null && y(t, ["totalTokens"], n), t;
13938
13938
  }
13939
- function p9(i, e) {
13939
+ function pB(i, e) {
13940
13940
  const t = {}, n = m(e, ["tokensInfo"]);
13941
13941
  return n != null && y(t, ["tokensInfo"], n), t;
13942
13942
  }
13943
- function m9(i, e) {
13943
+ function mB(i, e) {
13944
13944
  const t = {}, n = m(e, ["gcsUri"]);
13945
13945
  n != null && y(t, ["uri"], n);
13946
13946
  const r = m(e, [
@@ -13950,15 +13950,15 @@ function m9(i, e) {
13950
13950
  const o = m(e, ["mimeType"]);
13951
13951
  return o != null && y(t, ["mimeType"], o), t;
13952
13952
  }
13953
- function g9(i, e) {
13953
+ function gB(i, e) {
13954
13954
  const t = {}, n = m(e, ["_self"]);
13955
- return n != null && y(t, ["video"], m9(i, n)), t;
13955
+ return n != null && y(t, ["video"], mB(i, n)), t;
13956
13956
  }
13957
- function v9(i, e) {
13957
+ function vB(i, e) {
13958
13958
  const t = {}, n = m(e, ["videos"]);
13959
13959
  if (n != null) {
13960
13960
  let s = n;
13961
- Array.isArray(s) && (s = s.map((a) => g9(i, a))), y(t, ["generatedVideos"], s);
13961
+ Array.isArray(s) && (s = s.map((a) => gB(i, a))), y(t, ["generatedVideos"], s);
13962
13962
  }
13963
13963
  const r = m(e, [
13964
13964
  "raiMediaFilteredCount"
@@ -13969,7 +13969,7 @@ function v9(i, e) {
13969
13969
  ]);
13970
13970
  return o != null && y(t, ["raiMediaFilteredReasons"], o), t;
13971
13971
  }
13972
- function y9(i, e) {
13972
+ function yB(i, e) {
13973
13973
  const t = {}, n = m(e, ["name"]);
13974
13974
  n != null && y(t, ["name"], n);
13975
13975
  const r = m(e, ["metadata"]);
@@ -13979,14 +13979,14 @@ function y9(i, e) {
13979
13979
  const s = m(e, ["error"]);
13980
13980
  s != null && y(t, ["error"], s);
13981
13981
  const a = m(e, ["response"]);
13982
- return a != null && y(t, ["response"], v9(i, a)), t;
13982
+ return a != null && y(t, ["response"], vB(i, a)), t;
13983
13983
  }
13984
13984
  /**
13985
13985
  * @license
13986
13986
  * Copyright 2025 Google LLC
13987
13987
  * SPDX-License-Identifier: Apache-2.0
13988
13988
  */
13989
- const _9 = "Content-Type", w9 = "X-Server-Timeout", b9 = "User-Agent", ym = "x-goog-api-client", S9 = "1.0.0", E9 = `google-genai-sdk/${S9}`, T9 = "v1beta1", C9 = "v1beta", mw = /^data: (.*)(?:\n\n|\r\r|\r\n\r\n)/;
13989
+ const _B = "Content-Type", wB = "X-Server-Timeout", bB = "User-Agent", ym = "x-goog-api-client", SB = "1.0.0", EB = `google-genai-sdk/${SB}`, TB = "v1beta1", CB = "v1beta", mw = /^data: (.*)(?:\n\n|\r\r|\r\n\r\n)/;
13990
13990
  class QT extends Error {
13991
13991
  constructor(e, t) {
13992
13992
  t ? super(e, { cause: t }) : super(e, { cause: new Error().stack }), this.message = e, this.name = "ClientError";
@@ -13997,12 +13997,12 @@ class _m extends Error {
13997
13997
  t ? super(e, { cause: t }) : super(e, { cause: new Error().stack }), this.message = e, this.name = "ServerError";
13998
13998
  }
13999
13999
  }
14000
- class A9 {
14000
+ class AB {
14001
14001
  constructor(e) {
14002
14002
  var t, n;
14003
14003
  this.clientOptions = Object.assign(Object.assign({}, e), { project: e.project, location: e.location, apiKey: e.apiKey, vertexai: e.vertexai });
14004
14004
  const r = {};
14005
- this.clientOptions.vertexai ? (r.apiVersion = (t = this.clientOptions.apiVersion) !== null && t !== void 0 ? t : T9, r.baseUrl = this.baseUrlFromProjectLocation(), this.normalizeAuthParameters()) : (r.apiVersion = (n = this.clientOptions.apiVersion) !== null && n !== void 0 ? n : C9, r.baseUrl = "https://generativelanguage.googleapis.com/"), r.headers = this.getDefaultHeaders(), this.clientOptions.httpOptions = r, e.httpOptions && (this.clientOptions.httpOptions = this.patchHttpOptions(r, e.httpOptions));
14005
+ this.clientOptions.vertexai ? (r.apiVersion = (t = this.clientOptions.apiVersion) !== null && t !== void 0 ? t : TB, r.baseUrl = this.baseUrlFromProjectLocation(), this.normalizeAuthParameters()) : (r.apiVersion = (n = this.clientOptions.apiVersion) !== null && n !== void 0 ? n : CB, r.baseUrl = "https://generativelanguage.googleapis.com/"), r.headers = this.getDefaultHeaders(), this.clientOptions.httpOptions = r, e.httpOptions && (this.clientOptions.httpOptions = this.patchHttpOptions(r, e.httpOptions));
14006
14006
  }
14007
14007
  /**
14008
14008
  * Determines the base URL for Vertex AI based on project and location.
@@ -14189,15 +14189,15 @@ class A9 {
14189
14189
  });
14190
14190
  }
14191
14191
  getDefaultHeaders() {
14192
- const e = {}, t = E9 + " " + this.clientOptions.userAgentExtra;
14193
- return e[b9] = t, e[ym] = t, e[_9] = "application/json", e;
14192
+ const e = {}, t = EB + " " + this.clientOptions.userAgentExtra;
14193
+ return e[bB] = t, e[ym] = t, e[_B] = "application/json", e;
14194
14194
  }
14195
14195
  async getHeadersInternal(e) {
14196
14196
  const t = new Headers();
14197
14197
  if (e && e.headers) {
14198
14198
  for (const [n, r] of Object.entries(e.headers))
14199
14199
  t.append(n, r);
14200
- e.timeout && e.timeout > 0 && t.append(w9, String(Math.ceil(e.timeout / 1e3)));
14200
+ e.timeout && e.timeout > 0 && t.append(wB, String(Math.ceil(e.timeout / 1e3)));
14201
14201
  }
14202
14202
  return await this.clientOptions.auth.addAuthHeaders(t), t;
14203
14203
  }
@@ -14298,11 +14298,11 @@ function eC(i) {
14298
14298
  const t = (e = i[ym]) !== null && e !== void 0 ? e : "";
14299
14299
  t.includes(vw) || (i[ym] = (t + ` ${vw}`).trimStart());
14300
14300
  }
14301
- function P9(i) {
14301
+ function PB(i) {
14302
14302
  var e, t, n;
14303
14303
  return (n = (t = (e = i.config) === null || e === void 0 ? void 0 : e.tools) === null || t === void 0 ? void 0 : t.some((r) => rg(r))) !== null && n !== void 0 ? n : !1;
14304
14304
  }
14305
- function I9(i) {
14305
+ function IB(i) {
14306
14306
  var e, t, n;
14307
14307
  return (n = (t = (e = i.config) === null || e === void 0 ? void 0 : e.tools) === null || t === void 0 ? void 0 : t.some((r) => !rg(r))) !== null && n !== void 0 ? n : !1;
14308
14308
  }
@@ -14314,14 +14314,14 @@ function rg(i) {
14314
14314
  * Copyright 2025 Google LLC
14315
14315
  * SPDX-License-Identifier: Apache-2.0
14316
14316
  */
14317
- async function R9(i, e, t) {
14317
+ async function RB(i, e, t) {
14318
14318
  const n = new B2();
14319
14319
  let r;
14320
14320
  t.data instanceof Blob ? r = JSON.parse(await t.data.text()) : r = JSON.parse(t.data);
14321
14321
  const o = jU(i, r);
14322
14322
  Object.assign(n, o), e(n);
14323
14323
  }
14324
- class x9 {
14324
+ class xB {
14325
14325
  constructor(e, t, n) {
14326
14326
  this.apiClient = e, this.auth = t, this.webSocketFactory = n;
14327
14327
  }
@@ -14360,7 +14360,7 @@ class x9 {
14360
14360
  if (this.apiClient.isVertexAI())
14361
14361
  throw new Error("Live music is not supported for Vertex AI.");
14362
14362
  console.warn("Live music generation is experimental and may change in future versions.");
14363
- const r = this.apiClient.getWebsocketBaseUrl(), o = this.apiClient.getApiVersion(), s = M9(this.apiClient.getDefaultHeaders()), a = this.apiClient.getApiKey(), u = `${r}/ws/google.ai.generativelanguage.${o}.GenerativeService.BidiGenerateMusic?key=${a}`;
14363
+ const r = this.apiClient.getWebsocketBaseUrl(), o = this.apiClient.getApiVersion(), s = MB(this.apiClient.getDefaultHeaders()), a = this.apiClient.getApiKey(), u = `${r}/ws/google.ai.generativelanguage.${o}.GenerativeService.BidiGenerateMusic?key=${a}`;
14364
14364
  let c = () => {
14365
14365
  };
14366
14366
  const d = new Promise((T) => {
@@ -14370,21 +14370,21 @@ class x9 {
14370
14370
  }, v = this.apiClient, w = {
14371
14371
  onopen: g,
14372
14372
  onmessage: (T) => {
14373
- R9(v, p.onmessage, T);
14373
+ RB(v, p.onmessage, T);
14374
14374
  },
14375
14375
  onerror: (t = p?.onerror) !== null && t !== void 0 ? t : function(T) {
14376
14376
  },
14377
14377
  onclose: (n = p?.onclose) !== null && n !== void 0 ? n : function(T) {
14378
14378
  }
14379
- }, _ = this.webSocketFactory.create(u, O9(s), w);
14379
+ }, _ = this.webSocketFactory.create(u, OB(s), w);
14380
14380
  _.connect(), await d;
14381
14381
  const b = Ot(this.apiClient, e.model), h = zT(this.apiClient, {
14382
14382
  model: b
14383
14383
  }), S = mm(this.apiClient, { setup: h });
14384
- return _.send(JSON.stringify(S)), new k9(_, this.apiClient);
14384
+ return _.send(JSON.stringify(S)), new kB(_, this.apiClient);
14385
14385
  }
14386
14386
  }
14387
- class k9 {
14387
+ class kB {
14388
14388
  constructor(e, t) {
14389
14389
  this.conn = e, this.apiClient = t;
14390
14390
  }
@@ -14471,13 +14471,13 @@ class k9 {
14471
14471
  this.conn.close();
14472
14472
  }
14473
14473
  }
14474
- function O9(i) {
14474
+ function OB(i) {
14475
14475
  const e = {};
14476
14476
  return i.forEach((t, n) => {
14477
14477
  e[n] = t;
14478
14478
  }), e;
14479
14479
  }
14480
- function M9(i) {
14480
+ function MB(i) {
14481
14481
  const e = new Headers();
14482
14482
  for (const [t, n] of Object.entries(i))
14483
14483
  e.append(t, n);
@@ -14488,8 +14488,8 @@ function M9(i) {
14488
14488
  * Copyright 2025 Google LLC
14489
14489
  * SPDX-License-Identifier: Apache-2.0
14490
14490
  */
14491
- const L9 = "FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.";
14492
- async function N9(i, e, t) {
14491
+ const LB = "FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.";
14492
+ async function NB(i, e, t) {
14493
14493
  const n = new q2();
14494
14494
  let r;
14495
14495
  if (t.data instanceof Blob ? r = JSON.parse(await t.data.text()) : r = JSON.parse(t.data), i.isVertexAI()) {
@@ -14501,9 +14501,9 @@ async function N9(i, e, t) {
14501
14501
  }
14502
14502
  e(n);
14503
14503
  }
14504
- class D9 {
14504
+ class DB {
14505
14505
  constructor(e, t, n) {
14506
- this.apiClient = e, this.auth = t, this.webSocketFactory = n, this.music = new x9(this.apiClient, this.auth, this.webSocketFactory);
14506
+ this.apiClient = e, this.auth = t, this.webSocketFactory = n, this.music = new xB(this.apiClient, this.auth, this.webSocketFactory);
14507
14507
  }
14508
14508
  /**
14509
14509
  Establishes a connection to the specified model with the given
@@ -14553,7 +14553,7 @@ class D9 {
14553
14553
  let d;
14554
14554
  const p = this.apiClient.getDefaultHeaders();
14555
14555
  e.config && e.config.tools && XT(e.config.tools) && eC(p);
14556
- const g = q9(p);
14556
+ const g = qB(p);
14557
14557
  if (this.apiClient.isVertexAI())
14558
14558
  d = `${u}/ws/google.cloud.aiplatform.${c}.LlmBidiService/BidiGenerateContent`, await this.auth.addAuthHeaders(g);
14559
14559
  else {
@@ -14570,13 +14570,13 @@ class D9 {
14570
14570
  }, h = this.apiClient, S = {
14571
14571
  onopen: b,
14572
14572
  onmessage: (R) => {
14573
- N9(h, _.onmessage, R);
14573
+ NB(h, _.onmessage, R);
14574
14574
  },
14575
14575
  onerror: (t = _?.onerror) !== null && t !== void 0 ? t : function(R) {
14576
14576
  },
14577
14577
  onclose: (n = _?.onclose) !== null && n !== void 0 ? n : function(R) {
14578
14578
  }
14579
- }, T = this.webSocketFactory.create(d, U9(g), S);
14579
+ }, T = this.webSocketFactory.create(d, UB(g), S);
14580
14580
  T.connect(), await w;
14581
14581
  let C = Ot(this.apiClient, e.model);
14582
14582
  if (this.apiClient.isVertexAI() && C.startsWith("publishers/")) {
@@ -14598,17 +14598,17 @@ class D9 {
14598
14598
  config: e.config,
14599
14599
  callbacks: e.callbacks
14600
14600
  };
14601
- return this.apiClient.isVertexAI() ? A = oU(this.apiClient, x) : A = iU(this.apiClient, x), delete A.config, T.send(JSON.stringify(A)), new $9(T, this.apiClient);
14601
+ return this.apiClient.isVertexAI() ? A = oU(this.apiClient, x) : A = iU(this.apiClient, x), delete A.config, T.send(JSON.stringify(A)), new $B(T, this.apiClient);
14602
14602
  }
14603
14603
  // TODO: b/416041229 - Abstract this method to a common place.
14604
14604
  isCallableTool(e) {
14605
14605
  return "callTool" in e && typeof e.callTool == "function";
14606
14606
  }
14607
14607
  }
14608
- const F9 = {
14608
+ const FB = {
14609
14609
  turnComplete: !0
14610
14610
  };
14611
- class $9 {
14611
+ class $B {
14612
14612
  constructor(e, t) {
14613
14613
  this.conn = e, this.apiClient = t;
14614
14614
  }
@@ -14638,7 +14638,7 @@ class $9 {
14638
14638
  if (typeof o != "object" || o === null || !("name" in o) || !("response" in o))
14639
14639
  throw new Error(`Could not parse function response, type '${typeof o}'.`);
14640
14640
  if (!e.isVertexAI() && !("id" in o))
14641
- throw new Error(L9);
14641
+ throw new Error(LB);
14642
14642
  }
14643
14643
  return {
14644
14644
  toolResponse: { functionResponses: n }
@@ -14694,7 +14694,7 @@ class $9 {
14694
14694
  @experimental
14695
14695
  */
14696
14696
  sendClientContent(e) {
14697
- e = Object.assign(Object.assign({}, F9), e);
14697
+ e = Object.assign(Object.assign({}, FB), e);
14698
14698
  const t = this.tLiveClientContent(this.apiClient, e);
14699
14699
  this.conn.send(JSON.stringify(t));
14700
14700
  }
@@ -14775,13 +14775,13 @@ class $9 {
14775
14775
  this.conn.close();
14776
14776
  }
14777
14777
  }
14778
- function U9(i) {
14778
+ function UB(i) {
14779
14779
  const e = {};
14780
14780
  return i.forEach((t, n) => {
14781
14781
  e[n] = t;
14782
14782
  }), e;
14783
14783
  }
14784
- function q9(i) {
14784
+ function qB(i) {
14785
14785
  const e = new Headers();
14786
14786
  for (const [t, n] of Object.entries(i))
14787
14787
  e.append(t, n);
@@ -14820,14 +14820,14 @@ function ww(i) {
14820
14820
  * Copyright 2025 Google LLC
14821
14821
  * SPDX-License-Identifier: Apache-2.0
14822
14822
  */
14823
- class B9 extends _a {
14823
+ class BB extends _a {
14824
14824
  constructor(e) {
14825
14825
  super(), this.apiClient = e, this.generateContent = async (t) => {
14826
14826
  var n, r, o, s, a;
14827
14827
  const u = await this.processParamsForMcpUsage(t);
14828
- if (!P9(t) || _w(t.config))
14828
+ if (!PB(t) || _w(t.config))
14829
14829
  return await this.generateContentInternal(u);
14830
- if (I9(t))
14830
+ if (IB(t))
14831
14831
  throw new Error("Automatic function calling with CallableTools and Tools is not yet supported.");
14832
14832
  let c, d;
14833
14833
  const p = cn(this.apiClient, u.contents), g = (o = (r = (n = u.config) === null || n === void 0 ? void 0 : n.automaticFunctionCalling) === null || r === void 0 ? void 0 : r.maximumRemoteCalls) !== null && o !== void 0 ? o : yw;
@@ -15134,7 +15134,7 @@ class B9 extends _a {
15134
15134
  httpOptions: (t = e.config) === null || t === void 0 ? void 0 : t.httpOptions,
15135
15135
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
15136
15136
  }).then((d) => d.json()), s.then((d) => {
15137
- const p = n9(this.apiClient, d), g = new W0();
15137
+ const p = nB(this.apiClient, d), g = new W0();
15138
15138
  return Object.assign(g, p), g;
15139
15139
  });
15140
15140
  } else {
@@ -15184,7 +15184,7 @@ class B9 extends _a {
15184
15184
  httpOptions: (t = e.config) === null || t === void 0 ? void 0 : t.httpOptions,
15185
15185
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
15186
15186
  }).then((d) => d.json()), s.then((d) => {
15187
- const p = o9(this.apiClient, d), g = new z0();
15187
+ const p = oB(this.apiClient, d), g = new z0();
15188
15188
  return Object.assign(g, p), g;
15189
15189
  });
15190
15190
  } else {
@@ -15215,7 +15215,7 @@ class B9 extends _a {
15215
15215
  httpOptions: (t = e.config) === null || t === void 0 ? void 0 : t.httpOptions,
15216
15216
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
15217
15217
  }).then((u) => u.json()), r.then((u) => {
15218
- const c = s9(this.apiClient, u), d = new L2();
15218
+ const c = sB(this.apiClient, u), d = new L2();
15219
15219
  return Object.assign(d, c), d;
15220
15220
  });
15221
15221
  } else
@@ -15234,7 +15234,7 @@ class B9 extends _a {
15234
15234
  httpOptions: (t = e.config) === null || t === void 0 ? void 0 : t.httpOptions,
15235
15235
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
15236
15236
  }).then((u) => u.json()), r.then((u) => {
15237
- const c = a9(this.apiClient, u), d = new N2();
15237
+ const c = aB(this.apiClient, u), d = new N2();
15238
15238
  return Object.assign(d, c), d;
15239
15239
  });
15240
15240
  } else
@@ -15286,7 +15286,7 @@ class B9 extends _a {
15286
15286
  httpOptions: (t = e.config) === null || t === void 0 ? void 0 : t.httpOptions,
15287
15287
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
15288
15288
  }).then((d) => d.json()), s.then((d) => {
15289
- const p = f9(this.apiClient, d), g = new K0();
15289
+ const p = fB(this.apiClient, d), g = new K0();
15290
15290
  return Object.assign(g, p), g;
15291
15291
  });
15292
15292
  } else {
@@ -15370,7 +15370,7 @@ class B9 extends _a {
15370
15370
  httpOptions: (t = e.config) === null || t === void 0 ? void 0 : t.httpOptions,
15371
15371
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
15372
15372
  }).then((d) => d.json()), s.then(() => {
15373
- const d = d9(), p = new J0();
15373
+ const d = dB(), p = new J0();
15374
15374
  return Object.assign(p, d), p;
15375
15375
  });
15376
15376
  } else {
@@ -15417,7 +15417,7 @@ class B9 extends _a {
15417
15417
  httpOptions: (t = e.config) === null || t === void 0 ? void 0 : t.httpOptions,
15418
15418
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
15419
15419
  }).then((d) => d.json()), s.then((d) => {
15420
- const p = h9(this.apiClient, d), g = new Y0();
15420
+ const p = hB(this.apiClient, d), g = new Y0();
15421
15421
  return Object.assign(g, p), g;
15422
15422
  });
15423
15423
  } else {
@@ -15466,7 +15466,7 @@ class B9 extends _a {
15466
15466
  httpOptions: (t = e.config) === null || t === void 0 ? void 0 : t.httpOptions,
15467
15467
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
15468
15468
  }).then((u) => u.json()), r.then((u) => {
15469
- const c = p9(this.apiClient, u), d = new D2();
15469
+ const c = pB(this.apiClient, u), d = new D2();
15470
15470
  return Object.assign(d, c), d;
15471
15471
  });
15472
15472
  } else
@@ -15507,7 +15507,7 @@ class B9 extends _a {
15507
15507
  httpMethod: "POST",
15508
15508
  httpOptions: (t = e.config) === null || t === void 0 ? void 0 : t.httpOptions,
15509
15509
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
15510
- }).then((d) => d.json()), s.then((d) => y9(this.apiClient, d));
15510
+ }).then((d) => d.json()), s.then((d) => yB(this.apiClient, d));
15511
15511
  } else {
15512
15512
  const c = Oq(this.apiClient, e);
15513
15513
  return a = Be("{model}:predictLongRunning", c._url), u = c._query, delete c.config, delete c._url, delete c._query, s = this.apiClient.request({
@@ -15526,7 +15526,7 @@ class B9 extends _a {
15526
15526
  * Copyright 2025 Google LLC
15527
15527
  * SPDX-License-Identifier: Apache-2.0
15528
15528
  */
15529
- function V9(i, e) {
15529
+ function VB(i, e) {
15530
15530
  const t = {}, n = m(e, [
15531
15531
  "operationName"
15532
15532
  ]);
@@ -15534,7 +15534,7 @@ function V9(i, e) {
15534
15534
  const r = m(e, ["config"]);
15535
15535
  return r != null && y(t, ["config"], r), t;
15536
15536
  }
15537
- function H9(i, e) {
15537
+ function HB(i, e) {
15538
15538
  const t = {}, n = m(e, [
15539
15539
  "operationName"
15540
15540
  ]);
@@ -15542,7 +15542,7 @@ function H9(i, e) {
15542
15542
  const r = m(e, ["config"]);
15543
15543
  return r != null && y(t, ["config"], r), t;
15544
15544
  }
15545
- function G9(i, e) {
15545
+ function GB(i, e) {
15546
15546
  const t = {}, n = m(e, [
15547
15547
  "operationName"
15548
15548
  ]);
@@ -15552,7 +15552,7 @@ function G9(i, e) {
15552
15552
  const o = m(e, ["config"]);
15553
15553
  return o != null && y(t, ["config"], o), t;
15554
15554
  }
15555
- function W9(i, e) {
15555
+ function WB(i, e) {
15556
15556
  const t = {}, n = m(e, ["video", "uri"]);
15557
15557
  n != null && y(t, ["uri"], n);
15558
15558
  const r = m(e, [
@@ -15563,17 +15563,17 @@ function W9(i, e) {
15563
15563
  const o = m(e, ["encoding"]);
15564
15564
  return o != null && y(t, ["mimeType"], o), t;
15565
15565
  }
15566
- function z9(i, e) {
15566
+ function zB(i, e) {
15567
15567
  const t = {}, n = m(e, ["_self"]);
15568
- return n != null && y(t, ["video"], W9(i, n)), t;
15568
+ return n != null && y(t, ["video"], WB(i, n)), t;
15569
15569
  }
15570
- function K9(i, e) {
15570
+ function KB(i, e) {
15571
15571
  const t = {}, n = m(e, [
15572
15572
  "generatedSamples"
15573
15573
  ]);
15574
15574
  if (n != null) {
15575
15575
  let s = n;
15576
- Array.isArray(s) && (s = s.map((a) => z9(i, a))), y(t, ["generatedVideos"], s);
15576
+ Array.isArray(s) && (s = s.map((a) => zB(i, a))), y(t, ["generatedVideos"], s);
15577
15577
  }
15578
15578
  const r = m(e, [
15579
15579
  "raiMediaFilteredCount"
@@ -15584,7 +15584,7 @@ function K9(i, e) {
15584
15584
  ]);
15585
15585
  return o != null && y(t, ["raiMediaFilteredReasons"], o), t;
15586
15586
  }
15587
- function J9(i, e) {
15587
+ function JB(i, e) {
15588
15588
  const t = {}, n = m(e, ["name"]);
15589
15589
  n != null && y(t, ["name"], n);
15590
15590
  const r = m(e, ["metadata"]);
@@ -15597,9 +15597,9 @@ function J9(i, e) {
15597
15597
  "response",
15598
15598
  "generateVideoResponse"
15599
15599
  ]);
15600
- return a != null && y(t, ["response"], K9(i, a)), t;
15600
+ return a != null && y(t, ["response"], KB(i, a)), t;
15601
15601
  }
15602
- function Y9(i, e) {
15602
+ function YB(i, e) {
15603
15603
  const t = {}, n = m(e, ["gcsUri"]);
15604
15604
  n != null && y(t, ["uri"], n);
15605
15605
  const r = m(e, [
@@ -15609,15 +15609,15 @@ function Y9(i, e) {
15609
15609
  const o = m(e, ["mimeType"]);
15610
15610
  return o != null && y(t, ["mimeType"], o), t;
15611
15611
  }
15612
- function j9(i, e) {
15612
+ function jB(i, e) {
15613
15613
  const t = {}, n = m(e, ["_self"]);
15614
- return n != null && y(t, ["video"], Y9(i, n)), t;
15614
+ return n != null && y(t, ["video"], YB(i, n)), t;
15615
15615
  }
15616
- function Z9(i, e) {
15616
+ function ZB(i, e) {
15617
15617
  const t = {}, n = m(e, ["videos"]);
15618
15618
  if (n != null) {
15619
15619
  let s = n;
15620
- Array.isArray(s) && (s = s.map((a) => j9(i, a))), y(t, ["generatedVideos"], s);
15620
+ Array.isArray(s) && (s = s.map((a) => jB(i, a))), y(t, ["generatedVideos"], s);
15621
15621
  }
15622
15622
  const r = m(e, [
15623
15623
  "raiMediaFilteredCount"
@@ -15638,14 +15638,14 @@ function bw(i, e) {
15638
15638
  const s = m(e, ["error"]);
15639
15639
  s != null && y(t, ["error"], s);
15640
15640
  const a = m(e, ["response"]);
15641
- return a != null && y(t, ["response"], Z9(i, a)), t;
15641
+ return a != null && y(t, ["response"], ZB(i, a)), t;
15642
15642
  }
15643
15643
  /**
15644
15644
  * @license
15645
15645
  * Copyright 2025 Google LLC
15646
15646
  * SPDX-License-Identifier: Apache-2.0
15647
15647
  */
15648
- class Q9 extends _a {
15648
+ class QB extends _a {
15649
15649
  constructor(e) {
15650
15650
  super(), this.apiClient = e;
15651
15651
  }
@@ -15677,7 +15677,7 @@ class Q9 extends _a {
15677
15677
  var t, n, r, o;
15678
15678
  let s, a = "", u = {};
15679
15679
  if (this.apiClient.isVertexAI()) {
15680
- const c = H9(this.apiClient, e);
15680
+ const c = HB(this.apiClient, e);
15681
15681
  return a = Be("{operationName}", c._url), u = c._query, delete c.config, delete c._url, delete c._query, s = this.apiClient.request({
15682
15682
  path: a,
15683
15683
  queryParams: u,
@@ -15687,7 +15687,7 @@ class Q9 extends _a {
15687
15687
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
15688
15688
  }).then((d) => d.json()), s.then((d) => bw(this.apiClient, d));
15689
15689
  } else {
15690
- const c = V9(this.apiClient, e);
15690
+ const c = VB(this.apiClient, e);
15691
15691
  return a = Be("{operationName}", c._url), u = c._query, delete c.config, delete c._url, delete c._query, s = this.apiClient.request({
15692
15692
  path: a,
15693
15693
  queryParams: u,
@@ -15695,14 +15695,14 @@ class Q9 extends _a {
15695
15695
  httpMethod: "GET",
15696
15696
  httpOptions: (r = e.config) === null || r === void 0 ? void 0 : r.httpOptions,
15697
15697
  abortSignal: (o = e.config) === null || o === void 0 ? void 0 : o.abortSignal
15698
- }).then((d) => d.json()), s.then((d) => J9(this.apiClient, d));
15698
+ }).then((d) => d.json()), s.then((d) => JB(this.apiClient, d));
15699
15699
  }
15700
15700
  }
15701
15701
  async fetchPredictVideosOperationInternal(e) {
15702
15702
  var t, n;
15703
15703
  let r, o = "", s = {};
15704
15704
  if (this.apiClient.isVertexAI()) {
15705
- const a = G9(this.apiClient, e);
15705
+ const a = GB(this.apiClient, e);
15706
15706
  return o = Be("{resourceName}:fetchPredictOperation", a._url), s = a._query, delete a.config, delete a._url, delete a._query, r = this.apiClient.request({
15707
15707
  path: o,
15708
15708
  queryParams: s,
@@ -15720,13 +15720,13 @@ class Q9 extends _a {
15720
15720
  * Copyright 2025 Google LLC
15721
15721
  * SPDX-License-Identifier: Apache-2.0
15722
15722
  */
15723
- function X9(i, e) {
15723
+ function XB(i, e) {
15724
15724
  const t = {}, n = m(e, ["name"]);
15725
15725
  n != null && y(t, ["_url", "name"], n);
15726
15726
  const r = m(e, ["config"]);
15727
15727
  return r != null && y(t, ["config"], r), t;
15728
15728
  }
15729
- function eB(i, e, t) {
15729
+ function e9(i, e, t) {
15730
15730
  const n = {}, r = m(e, ["pageSize"]);
15731
15731
  t !== void 0 && r != null && y(t, ["_query", "pageSize"], r);
15732
15732
  const o = m(e, ["pageToken"]);
@@ -15734,28 +15734,28 @@ function eB(i, e, t) {
15734
15734
  const s = m(e, ["filter"]);
15735
15735
  return t !== void 0 && s != null && y(t, ["_query", "filter"], s), n;
15736
15736
  }
15737
- function tB(i, e) {
15737
+ function t9(i, e) {
15738
15738
  const t = {}, n = m(e, ["config"]);
15739
- return n != null && y(t, ["config"], eB(i, n, t)), t;
15739
+ return n != null && y(t, ["config"], e9(i, n, t)), t;
15740
15740
  }
15741
- function rB(i, e) {
15741
+ function r9(i, e) {
15742
15742
  const t = {}, n = m(e, ["textInput"]);
15743
15743
  n != null && y(t, ["textInput"], n);
15744
15744
  const r = m(e, ["output"]);
15745
15745
  return r != null && y(t, ["output"], r), t;
15746
15746
  }
15747
- function nB(i, e) {
15747
+ function n9(i, e) {
15748
15748
  const t = {};
15749
15749
  if (m(e, ["gcsUri"]) !== void 0)
15750
15750
  throw new Error("gcsUri parameter is not supported in Gemini API.");
15751
15751
  const n = m(e, ["examples"]);
15752
15752
  if (n != null) {
15753
15753
  let r = n;
15754
- Array.isArray(r) && (r = r.map((o) => rB(i, o))), y(t, ["examples", "examples"], r);
15754
+ Array.isArray(r) && (r = r.map((o) => r9(i, o))), y(t, ["examples", "examples"], r);
15755
15755
  }
15756
15756
  return t;
15757
15757
  }
15758
- function iB(i, e, t) {
15758
+ function i9(i, e, t) {
15759
15759
  const n = {};
15760
15760
  if (m(e, ["validationDataset"]) !== void 0)
15761
15761
  throw new Error("validationDataset parameter is not supported in Gemini API.");
@@ -15778,23 +15778,23 @@ function iB(i, e, t) {
15778
15778
  const u = m(e, ["learningRate"]);
15779
15779
  return t !== void 0 && u != null && y(t, ["tuningTask", "hyperparameters", "learningRate"], u), n;
15780
15780
  }
15781
- function oB(i, e) {
15781
+ function o9(i, e) {
15782
15782
  const t = {}, n = m(e, ["baseModel"]);
15783
15783
  n != null && y(t, ["baseModel"], n);
15784
15784
  const r = m(e, [
15785
15785
  "trainingDataset"
15786
15786
  ]);
15787
- r != null && y(t, ["tuningTask", "trainingData"], nB(i, r));
15787
+ r != null && y(t, ["tuningTask", "trainingData"], n9(i, r));
15788
15788
  const o = m(e, ["config"]);
15789
- return o != null && y(t, ["config"], iB(i, o, t)), t;
15789
+ return o != null && y(t, ["config"], i9(i, o, t)), t;
15790
15790
  }
15791
- function sB(i, e) {
15791
+ function s9(i, e) {
15792
15792
  const t = {}, n = m(e, ["name"]);
15793
15793
  n != null && y(t, ["_url", "name"], n);
15794
15794
  const r = m(e, ["config"]);
15795
15795
  return r != null && y(t, ["config"], r), t;
15796
15796
  }
15797
- function aB(i, e, t) {
15797
+ function a9(i, e, t) {
15798
15798
  const n = {}, r = m(e, ["pageSize"]);
15799
15799
  t !== void 0 && r != null && y(t, ["_query", "pageSize"], r);
15800
15800
  const o = m(e, ["pageToken"]);
@@ -15802,25 +15802,25 @@ function aB(i, e, t) {
15802
15802
  const s = m(e, ["filter"]);
15803
15803
  return t !== void 0 && s != null && y(t, ["_query", "filter"], s), n;
15804
15804
  }
15805
- function lB(i, e) {
15805
+ function l9(i, e) {
15806
15806
  const t = {}, n = m(e, ["config"]);
15807
- return n != null && y(t, ["config"], aB(i, n, t)), t;
15807
+ return n != null && y(t, ["config"], a9(i, n, t)), t;
15808
15808
  }
15809
- function uB(i, e, t) {
15809
+ function u9(i, e, t) {
15810
15810
  const n = {}, r = m(e, ["gcsUri"]);
15811
15811
  if (t !== void 0 && r != null && y(t, ["supervisedTuningSpec", "trainingDatasetUri"], r), m(e, ["examples"]) !== void 0)
15812
15812
  throw new Error("examples parameter is not supported in Vertex AI.");
15813
15813
  return n;
15814
15814
  }
15815
- function cB(i, e) {
15815
+ function c9(i, e) {
15816
15816
  const t = {}, n = m(e, ["gcsUri"]);
15817
15817
  return n != null && y(t, ["validationDatasetUri"], n), t;
15818
15818
  }
15819
- function fB(i, e, t) {
15819
+ function f9(i, e, t) {
15820
15820
  const n = {}, r = m(e, [
15821
15821
  "validationDataset"
15822
15822
  ]);
15823
- t !== void 0 && r != null && y(t, ["supervisedTuningSpec"], cB(i, r));
15823
+ t !== void 0 && r != null && y(t, ["supervisedTuningSpec"], c9(i, r));
15824
15824
  const o = m(e, [
15825
15825
  "tunedModelDisplayName"
15826
15826
  ]);
@@ -15844,17 +15844,17 @@ function fB(i, e, t) {
15844
15844
  throw new Error("learningRate parameter is not supported in Vertex AI.");
15845
15845
  return n;
15846
15846
  }
15847
- function dB(i, e) {
15847
+ function d9(i, e) {
15848
15848
  const t = {}, n = m(e, ["baseModel"]);
15849
15849
  n != null && y(t, ["baseModel"], n);
15850
15850
  const r = m(e, [
15851
15851
  "trainingDataset"
15852
15852
  ]);
15853
- r != null && y(t, ["supervisedTuningSpec", "trainingDatasetUri"], uB(i, r, t));
15853
+ r != null && y(t, ["supervisedTuningSpec", "trainingDatasetUri"], u9(i, r, t));
15854
15854
  const o = m(e, ["config"]);
15855
- return o != null && y(t, ["config"], fB(i, o, t)), t;
15855
+ return o != null && y(t, ["config"], f9(i, o, t)), t;
15856
15856
  }
15857
- function hB(i, e) {
15857
+ function h9(i, e) {
15858
15858
  const t = {}, n = m(e, ["name"]);
15859
15859
  n != null && y(t, ["model"], n);
15860
15860
  const r = m(e, ["name"]);
@@ -15884,7 +15884,7 @@ function tC(i, e) {
15884
15884
  const d = m(e, ["baseModel"]);
15885
15885
  d != null && y(t, ["baseModel"], d);
15886
15886
  const p = m(e, ["_self"]);
15887
- p != null && y(t, ["tunedModel"], hB(i, p));
15887
+ p != null && y(t, ["tunedModel"], h9(i, p));
15888
15888
  const g = m(e, [
15889
15889
  "distillationSpec"
15890
15890
  ]);
@@ -15900,7 +15900,7 @@ function tC(i, e) {
15900
15900
  ]);
15901
15901
  return b != null && y(t, ["tunedModelDisplayName"], b), t;
15902
15902
  }
15903
- function pB(i, e) {
15903
+ function p9(i, e) {
15904
15904
  const t = {}, n = m(e, [
15905
15905
  "nextPageToken"
15906
15906
  ]);
@@ -15912,7 +15912,7 @@ function pB(i, e) {
15912
15912
  }
15913
15913
  return t;
15914
15914
  }
15915
- function mB(i, e) {
15915
+ function m9(i, e) {
15916
15916
  const t = {}, n = m(e, ["name"]);
15917
15917
  n != null && y(t, ["name"], n);
15918
15918
  const r = m(e, ["metadata"]);
@@ -15922,7 +15922,7 @@ function mB(i, e) {
15922
15922
  const s = m(e, ["error"]);
15923
15923
  return s != null && y(t, ["error"], s), t;
15924
15924
  }
15925
- function gB(i, e) {
15925
+ function g9(i, e) {
15926
15926
  const t = {}, n = m(e, ["checkpointId"]);
15927
15927
  n != null && y(t, ["checkpointId"], n);
15928
15928
  const r = m(e, ["epoch"]);
@@ -15932,7 +15932,7 @@ function gB(i, e) {
15932
15932
  const s = m(e, ["endpoint"]);
15933
15933
  return s != null && y(t, ["endpoint"], s), t;
15934
15934
  }
15935
- function vB(i, e) {
15935
+ function v9(i, e) {
15936
15936
  const t = {}, n = m(e, ["model"]);
15937
15937
  n != null && y(t, ["model"], n);
15938
15938
  const r = m(e, ["endpoint"]);
@@ -15940,7 +15940,7 @@ function vB(i, e) {
15940
15940
  const o = m(e, ["checkpoints"]);
15941
15941
  if (o != null) {
15942
15942
  let s = o;
15943
- Array.isArray(s) && (s = s.map((a) => gB(i, a))), y(t, ["checkpoints"], s);
15943
+ Array.isArray(s) && (s = s.map((a) => g9(i, a))), y(t, ["checkpoints"], s);
15944
15944
  }
15945
15945
  return t;
15946
15946
  }
@@ -15964,7 +15964,7 @@ function wm(i, e) {
15964
15964
  const p = m(e, ["baseModel"]);
15965
15965
  p != null && y(t, ["baseModel"], p);
15966
15966
  const g = m(e, ["tunedModel"]);
15967
- g != null && y(t, ["tunedModel"], vB(i, g));
15967
+ g != null && y(t, ["tunedModel"], v9(i, g));
15968
15968
  const v = m(e, [
15969
15969
  "supervisedTuningSpec"
15970
15970
  ]);
@@ -15996,7 +15996,7 @@ function wm(i, e) {
15996
15996
  ]);
15997
15997
  return A != null && y(t, ["tunedModelDisplayName"], A), t;
15998
15998
  }
15999
- function yB(i, e) {
15999
+ function y9(i, e) {
16000
16000
  const t = {}, n = m(e, [
16001
16001
  "nextPageToken"
16002
16002
  ]);
@@ -16013,7 +16013,7 @@ function yB(i, e) {
16013
16013
  * Copyright 2025 Google LLC
16014
16014
  * SPDX-License-Identifier: Apache-2.0
16015
16015
  */
16016
- class _B extends _a {
16016
+ class _9 extends _a {
16017
16017
  constructor(e) {
16018
16018
  super(), this.apiClient = e, this.get = async (t) => await this.getInternal(t), this.list = async (t = {}) => new gc(os.PAGED_ITEM_TUNING_JOBS, (n) => this.listInternal(n), await this.listInternal(t), t), this.tune = async (t) => {
16019
16019
  if (this.apiClient.isVertexAI())
@@ -16032,7 +16032,7 @@ class _B extends _a {
16032
16032
  var t, n, r, o;
16033
16033
  let s, a = "", u = {};
16034
16034
  if (this.apiClient.isVertexAI()) {
16035
- const c = sB(this.apiClient, e);
16035
+ const c = s9(this.apiClient, e);
16036
16036
  return a = Be("{name}", c._url), u = c._query, delete c.config, delete c._url, delete c._query, s = this.apiClient.request({
16037
16037
  path: a,
16038
16038
  queryParams: u,
@@ -16042,7 +16042,7 @@ class _B extends _a {
16042
16042
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
16043
16043
  }).then((d) => d.json()), s.then((d) => wm(this.apiClient, d));
16044
16044
  } else {
16045
- const c = X9(this.apiClient, e);
16045
+ const c = XB(this.apiClient, e);
16046
16046
  return a = Be("{name}", c._url), u = c._query, delete c.config, delete c._url, delete c._query, s = this.apiClient.request({
16047
16047
  path: a,
16048
16048
  queryParams: u,
@@ -16057,7 +16057,7 @@ class _B extends _a {
16057
16057
  var t, n, r, o;
16058
16058
  let s, a = "", u = {};
16059
16059
  if (this.apiClient.isVertexAI()) {
16060
- const c = lB(this.apiClient, e);
16060
+ const c = l9(this.apiClient, e);
16061
16061
  return a = Be("tuningJobs", c._url), u = c._query, delete c.config, delete c._url, delete c._query, s = this.apiClient.request({
16062
16062
  path: a,
16063
16063
  queryParams: u,
@@ -16066,11 +16066,11 @@ class _B extends _a {
16066
16066
  httpOptions: (t = e.config) === null || t === void 0 ? void 0 : t.httpOptions,
16067
16067
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
16068
16068
  }).then((d) => d.json()), s.then((d) => {
16069
- const p = yB(this.apiClient, d), g = new j0();
16069
+ const p = y9(this.apiClient, d), g = new j0();
16070
16070
  return Object.assign(g, p), g;
16071
16071
  });
16072
16072
  } else {
16073
- const c = tB(this.apiClient, e);
16073
+ const c = t9(this.apiClient, e);
16074
16074
  return a = Be("tunedModels", c._url), u = c._query, delete c.config, delete c._url, delete c._query, s = this.apiClient.request({
16075
16075
  path: a,
16076
16076
  queryParams: u,
@@ -16079,7 +16079,7 @@ class _B extends _a {
16079
16079
  httpOptions: (r = e.config) === null || r === void 0 ? void 0 : r.httpOptions,
16080
16080
  abortSignal: (o = e.config) === null || o === void 0 ? void 0 : o.abortSignal
16081
16081
  }).then((d) => d.json()), s.then((d) => {
16082
- const p = pB(this.apiClient, d), g = new j0();
16082
+ const p = p9(this.apiClient, d), g = new j0();
16083
16083
  return Object.assign(g, p), g;
16084
16084
  });
16085
16085
  }
@@ -16088,7 +16088,7 @@ class _B extends _a {
16088
16088
  var t, n;
16089
16089
  let r, o = "", s = {};
16090
16090
  if (this.apiClient.isVertexAI()) {
16091
- const a = dB(this.apiClient, e);
16091
+ const a = d9(this.apiClient, e);
16092
16092
  return o = Be("tuningJobs", a._url), s = a._query, delete a.config, delete a._url, delete a._query, r = this.apiClient.request({
16093
16093
  path: o,
16094
16094
  queryParams: s,
@@ -16106,7 +16106,7 @@ class _B extends _a {
16106
16106
  if (this.apiClient.isVertexAI())
16107
16107
  throw new Error("This method is only supported by the Gemini Developer API.");
16108
16108
  {
16109
- const a = oB(this.apiClient, e);
16109
+ const a = o9(this.apiClient, e);
16110
16110
  return o = Be("tunedModels", a._url), s = a._query, delete a.config, delete a._url, delete a._query, r = this.apiClient.request({
16111
16111
  path: o,
16112
16112
  queryParams: s,
@@ -16114,7 +16114,7 @@ class _B extends _a {
16114
16114
  httpMethod: "POST",
16115
16115
  httpOptions: (t = e.config) === null || t === void 0 ? void 0 : t.httpOptions,
16116
16116
  abortSignal: (n = e.config) === null || n === void 0 ? void 0 : n.abortSignal
16117
- }).then((u) => u.json()), r.then((u) => mB(this.apiClient, u));
16117
+ }).then((u) => u.json()), r.then((u) => m9(this.apiClient, u));
16118
16118
  }
16119
16119
  }
16120
16120
  }
@@ -16123,20 +16123,20 @@ class _B extends _a {
16123
16123
  * Copyright 2025 Google LLC
16124
16124
  * SPDX-License-Identifier: Apache-2.0
16125
16125
  */
16126
- class wB {
16126
+ class w9 {
16127
16127
  async download(e, t) {
16128
16128
  throw new Error("Download to file is not supported in the browser, please use a browser compliant download like an <a> tag.");
16129
16129
  }
16130
16130
  }
16131
- const bB = 1024 * 1024 * 8, SB = 3, EB = 1e3, TB = 2, Yd = "x-goog-upload-status";
16132
- async function CB(i, e, t) {
16131
+ const b9 = 1024 * 1024 * 8, S9 = 3, E9 = 1e3, T9 = 2, Yd = "x-goog-upload-status";
16132
+ async function C9(i, e, t) {
16133
16133
  var n, r, o;
16134
16134
  let s = 0, a = 0, u = new dm(new Response()), c = "upload";
16135
16135
  for (s = i.size; a < s; ) {
16136
- const p = Math.min(bB, s - a), g = i.slice(a, a + p);
16136
+ const p = Math.min(b9, s - a), g = i.slice(a, a + p);
16137
16137
  a + p >= s && (c += ", finalize");
16138
- let v = 0, w = EB;
16139
- for (; v < SB && (u = await t.request({
16138
+ let v = 0, w = E9;
16139
+ for (; v < S9 && (u = await t.request({
16140
16140
  path: "",
16141
16141
  body: g,
16142
16142
  httpMethod: "POST",
@@ -16150,7 +16150,7 @@ async function CB(i, e, t) {
16150
16150
  }
16151
16151
  }
16152
16152
  }), !(!((n = u?.headers) === null || n === void 0) && n[Yd])); )
16153
- v++, await PB(w), w = w * TB;
16153
+ v++, await P9(w), w = w * T9;
16154
16154
  if (a += p, ((r = u?.headers) === null || r === void 0 ? void 0 : r[Yd]) !== "active")
16155
16155
  break;
16156
16156
  if (s <= a)
@@ -16161,22 +16161,22 @@ async function CB(i, e, t) {
16161
16161
  throw new Error("Failed to upload file: Upload status is not finalized.");
16162
16162
  return d.file;
16163
16163
  }
16164
- async function AB(i) {
16164
+ async function A9(i) {
16165
16165
  return { size: i.size, type: i.type };
16166
16166
  }
16167
- function PB(i) {
16167
+ function P9(i) {
16168
16168
  return new Promise((e) => setTimeout(e, i));
16169
16169
  }
16170
- class IB {
16170
+ class I9 {
16171
16171
  async upload(e, t, n) {
16172
16172
  if (typeof e == "string")
16173
16173
  throw new Error("File path is not supported in browser uploader.");
16174
- return await CB(e, t, n);
16174
+ return await C9(e, t, n);
16175
16175
  }
16176
16176
  async stat(e) {
16177
16177
  if (typeof e == "string")
16178
16178
  throw new Error("File path is not supported in browser uploader.");
16179
- return await AB(e);
16179
+ return await A9(e);
16180
16180
  }
16181
16181
  }
16182
16182
  /**
@@ -16184,12 +16184,12 @@ class IB {
16184
16184
  * Copyright 2025 Google LLC
16185
16185
  * SPDX-License-Identifier: Apache-2.0
16186
16186
  */
16187
- class RB {
16187
+ class R9 {
16188
16188
  create(e, t, n) {
16189
- return new xB(e, t, n);
16189
+ return new x9(e, t, n);
16190
16190
  }
16191
16191
  }
16192
- class xB {
16192
+ class x9 {
16193
16193
  constructor(e, t, n) {
16194
16194
  this.url = e, this.headers = t, this.callbacks = n;
16195
16195
  }
@@ -16213,7 +16213,7 @@ class xB {
16213
16213
  * SPDX-License-Identifier: Apache-2.0
16214
16214
  */
16215
16215
  const Sw = "x-goog-api-key";
16216
- class kB {
16216
+ class k9 {
16217
16217
  constructor(e) {
16218
16218
  this.apiKey = e;
16219
16219
  }
@@ -16226,8 +16226,8 @@ class kB {
16226
16226
  * Copyright 2025 Google LLC
16227
16227
  * SPDX-License-Identifier: Apache-2.0
16228
16228
  */
16229
- const OB = "gl-node/";
16230
- class MB {
16229
+ const O9 = "gl-node/";
16230
+ class M9 {
16231
16231
  constructor(e) {
16232
16232
  var t;
16233
16233
  if (e.apiKey == null)
@@ -16243,17 +16243,17 @@ class MB {
16243
16243
  void 0
16244
16244
  );
16245
16245
  n && (e.httpOptions ? e.httpOptions.baseUrl = n : e.httpOptions = { baseUrl: n }), this.apiVersion = e.apiVersion;
16246
- const r = new kB(this.apiKey);
16247
- this.apiClient = new A9({
16246
+ const r = new k9(this.apiKey);
16247
+ this.apiClient = new AB({
16248
16248
  auth: r,
16249
16249
  apiVersion: this.apiVersion,
16250
16250
  apiKey: this.apiKey,
16251
16251
  vertexai: this.vertexai,
16252
16252
  httpOptions: e.httpOptions,
16253
- userAgentExtra: OB + "web",
16254
- uploader: new IB(),
16255
- downloader: new wB()
16256
- }), this.models = new B9(this.apiClient), this.live = new D9(this.apiClient, r, new RB()), this.chats = new QF(this.models, this.apiClient), this.caches = new YF(this.apiClient), this.files = new f$(this.apiClient), this.operations = new Q9(this.apiClient), this.tunings = new _B(this.apiClient);
16253
+ userAgentExtra: O9 + "web",
16254
+ uploader: new I9(),
16255
+ downloader: new w9()
16256
+ }), this.models = new BB(this.apiClient), this.live = new DB(this.apiClient, r, new R9()), this.chats = new QF(this.models, this.apiClient), this.caches = new YF(this.apiClient), this.files = new f$(this.apiClient), this.operations = new QB(this.apiClient), this.tunings = new _9(this.apiClient);
16257
16257
  }
16258
16258
  }
16259
16259
  var Xs = { exports: {} };
@@ -16265,8 +16265,8 @@ var Xs = { exports: {} };
16265
16265
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
16266
16266
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
16267
16267
  */
16268
- var LB = Xs.exports, Ew;
16269
- function NB() {
16268
+ var L9 = Xs.exports, Ew;
16269
+ function N9() {
16270
16270
  return Ew || (Ew = 1, function(i, e) {
16271
16271
  (function() {
16272
16272
  var t, n = "4.17.21", r = 200, o = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", s = "Expected a function", a = "Invalid `variable` option passed into `_.template`", u = "__lodash_hash_undefined__", c = 500, d = "__lodash_placeholder__", p = 1, g = 2, v = 4, w = 1, _ = 2, b = 1, h = 2, S = 4, T = 8, C = 16, A = 32, M = 64, F = 128, x = 256, R = 512, L = 30, N = "...", k = 800, q = 16, z = 1, W = 2, I = 3, D = 1 / 0, Z = 9007199254740991, K = 17976931348623157e292, Y = NaN, ee = 4294967295, se = ee - 1, ce = ee >>> 1, ie = [
@@ -19926,17 +19926,17 @@ function print() { __p += __j.call(arguments, '') }
19926
19926
  }], st.prototype.clone = oP, st.prototype.reverse = sP, st.prototype.value = aP, B.prototype.at = DR, B.prototype.chain = FR, B.prototype.commit = $R, B.prototype.next = UR, B.prototype.plant = BR, B.prototype.reverse = VR, B.prototype.toJSON = B.prototype.valueOf = B.prototype.value = HR, B.prototype.first = B.prototype.head, Cs && (B.prototype[Cs] = qR), B;
19927
19927
  }, So = $A();
19928
19928
  Di ? ((Di.exports = So)._ = So, jc._ = So) : er._ = So;
19929
- }).call(LB);
19929
+ }).call(L9);
19930
19930
  }(Xs, Xs.exports)), Xs.exports;
19931
19931
  }
19932
- var IW = NB();
19933
- const DB = {
19932
+ var IW = N9();
19933
+ const D9 = {
19934
19934
  fromNativeThread(i) {
19935
19935
  const e = [];
19936
19936
  for (const t of i.messages)
19937
19937
  switch (t.role) {
19938
19938
  case "user": {
19939
- const n = GB(t);
19939
+ const n = G9(t);
19940
19940
  if (n.length === 0)
19941
19941
  continue;
19942
19942
  e.push({
@@ -19956,7 +19956,7 @@ const DB = {
19956
19956
  );
19957
19957
  if (n.length === 0)
19958
19958
  break;
19959
- const o = WB(n);
19959
+ const o = W9(n);
19960
19960
  o.length > 0 && e.push({
19961
19961
  role: "model",
19962
19962
  parts: o
@@ -19969,16 +19969,16 @@ const DB = {
19969
19969
  toNativeThread(i) {
19970
19970
  return { messages: [] };
19971
19971
  }
19972
- }, Tw = "gemini-2.5-pro-preview-05-06", FB = 1048576, $B = 65535;
19973
- async function* UB(i, e, t, n, r) {
19972
+ }, Tw = "gemini-2.5-pro-preview-05-06", F9 = 1048576, $9 = 65535;
19973
+ async function* U9(i, e, t, n, r) {
19974
19974
  const o = await pt(Pr, r);
19975
19975
  r?.throwIfAborted();
19976
- const s = await HB(o, { threadID: n });
19976
+ const s = await H9(o, { threadID: n });
19977
19977
  r?.throwIfAborted();
19978
19978
  const a = i.pop();
19979
19979
  if (a?.role !== "user")
19980
19980
  throw ae.warn("expected last message to be a user message", a), new Error("expected last message to be a user message");
19981
- const u = qB(e), c = {
19981
+ const u = q9(e), c = {
19982
19982
  model: Tw,
19983
19983
  history: i,
19984
19984
  config: {
@@ -19991,7 +19991,7 @@ async function* UB(i, e, t, n, r) {
19991
19991
  config: {
19992
19992
  tools: [u],
19993
19993
  systemInstruction: t,
19994
- maxOutputTokens: $B,
19994
+ maxOutputTokens: $9,
19995
19995
  thinkingConfig: {
19996
19996
  includeThoughts: !0
19997
19997
  }
@@ -20008,7 +20008,7 @@ async function* UB(i, e, t, n, r) {
20008
20008
  streamedMessages: v
20009
20009
  },
20010
20010
  "~debugUsage": {
20011
- maxInputTokens: FB,
20011
+ maxInputTokens: F9,
20012
20012
  inputTokens: w?.usageMetadata?.promptTokenCount ?? 0,
20013
20013
  outputTokens: (w?.usageMetadata?.candidatesTokenCount ?? 0) + (w?.usageMetadata?.thoughtsTokenCount ?? 0),
20014
20014
  totalInputTokens: w?.usageMetadata?.promptTokenCount ?? 0,
@@ -20017,19 +20017,19 @@ async function* UB(i, e, t, n, r) {
20017
20017
  }
20018
20018
  };
20019
20019
  }
20020
- function qB(i) {
20020
+ function q9(i) {
20021
20021
  return {
20022
- functionDeclarations: [...i.map(BB)]
20022
+ functionDeclarations: [...i.map(B9)]
20023
20023
  };
20024
20024
  }
20025
- function BB(i) {
20025
+ function B9(i) {
20026
20026
  return {
20027
20027
  name: i.name,
20028
20028
  description: i.description ?? "",
20029
20029
  parameters: bm(i.inputSchema)
20030
20030
  };
20031
20031
  }
20032
- const VB = {
20032
+ const V9 = {
20033
20033
  string: or.STRING,
20034
20034
  number: or.NUMBER,
20035
20035
  integer: or.INTEGER,
@@ -20038,7 +20038,7 @@ const VB = {
20038
20038
  array: or.ARRAY
20039
20039
  };
20040
20040
  function bm(i) {
20041
- const e = {}, t = VB[i.type ?? "any"];
20041
+ const e = {}, t = V9[i.type ?? "any"];
20042
20042
  return t && (e.type = t), i.description && (e.description = i.description), i.required && (e.required = i.required), i.properties && (e.properties = Object.fromEntries(
20043
20043
  Object.entries(i.properties).map(([n, r]) => [
20044
20044
  n,
@@ -20046,11 +20046,11 @@ function bm(i) {
20046
20046
  ])
20047
20047
  )), i.items && (e.items = bm(i.items)), e;
20048
20048
  }
20049
- async function HB(i, e) {
20049
+ async function H9(i, e) {
20050
20050
  const { settings: t, secrets: n } = i, { url: r } = t, o = await n.getToken("apiKey", r);
20051
20051
  if (!o)
20052
20052
  throw new Error("API key not found. You must provide an API key in settings.");
20053
- return new MB({
20053
+ return new M9({
20054
20054
  apiKey: "",
20055
20055
  vertexai: !0,
20056
20056
  httpOptions: {
@@ -20062,7 +20062,7 @@ async function HB(i, e) {
20062
20062
  }
20063
20063
  });
20064
20064
  }
20065
- function GB(i) {
20065
+ function G9(i) {
20066
20066
  const e = [];
20067
20067
  i.fileMentions && i.fileMentions.files.length > 0 && e.push({ text: XO(i.fileMentions) }), i.userState && e.push({ text: eM(i.userState) });
20068
20068
  for (const t of i.content)
@@ -20086,7 +20086,7 @@ function GB(i) {
20086
20086
  }
20087
20087
  return e;
20088
20088
  }
20089
- function WB(i) {
20089
+ function W9(i) {
20090
20090
  const e = [];
20091
20091
  for (const t of i)
20092
20092
  t.type === "text" ? e.push({ text: t.text }) : t.type === "tool_use" ? e.push({
@@ -20118,7 +20118,7 @@ function Bt(i) {
20118
20118
  }
20119
20119
  return !1;
20120
20120
  }
20121
- const zB = (i) => (At(i) || qt(i)) && !!i.anchor, Ar = Symbol("break visit"), nC = Symbol("skip children"), Cn = Symbol("remove node");
20121
+ const z9 = (i) => (At(i) || qt(i)) && !!i.anchor, Ar = Symbol("break visit"), nC = Symbol("skip children"), Cn = Symbol("remove node");
20122
20122
  function Pi(i, e) {
20123
20123
  const t = iC(e);
20124
20124
  uo(i) ? Go(null, i.contents, t, Object.freeze([i])) === Cn && (i.contents = null) : Go(null, i, t, Object.freeze([]));
@@ -20237,14 +20237,14 @@ function sC(i, e, t) {
20237
20237
  throw new Error(`Cannot replace node with ${r} parent`);
20238
20238
  }
20239
20239
  }
20240
- const KB = {
20240
+ const K9 = {
20241
20241
  "!": "%21",
20242
20242
  ",": "%2C",
20243
20243
  "[": "%5B",
20244
20244
  "]": "%5D",
20245
20245
  "{": "%7B",
20246
20246
  "}": "%7D"
20247
- }, JB = (i) => i.replace(/[!,[\]{}]/g, (e) => KB[e]);
20247
+ }, J9 = (i) => i.replace(/[!,[\]{}]/g, (e) => K9[e]);
20248
20248
  class pr {
20249
20249
  constructor(e, t) {
20250
20250
  this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, pr.defaultYaml, e), this.tags = Object.assign({}, pr.defaultTags, t);
@@ -20334,7 +20334,7 @@ class pr {
20334
20334
  tagString(e) {
20335
20335
  for (const [t, n] of Object.entries(this.tags))
20336
20336
  if (e.startsWith(n))
20337
- return t + JB(e.substring(n.length));
20337
+ return t + J9(e.substring(n.length));
20338
20338
  return e[0] === "!" ? e : `!<${e}>`;
20339
20339
  }
20340
20340
  toString(e) {
@@ -20377,7 +20377,7 @@ function uC(i, e) {
20377
20377
  return n;
20378
20378
  }
20379
20379
  }
20380
- function YB(i, e) {
20380
+ function Y9(i, e) {
20381
20381
  const t = [], n = /* @__PURE__ */ new Map();
20382
20382
  let r = null;
20383
20383
  return {
@@ -20433,7 +20433,7 @@ function Zr(i, e, t) {
20433
20433
  if (Array.isArray(i))
20434
20434
  return i.map((n, r) => Zr(n, String(r), t));
20435
20435
  if (i && typeof i.toJSON == "function") {
20436
- if (!t || !zB(i))
20436
+ if (!t || !z9(i))
20437
20437
  return i.toJSON(e, t);
20438
20438
  const n = { aliasCount: 0, count: 1, res: void 0 };
20439
20439
  t.anchors.set(i, n), t.onCreate = (o) => {
@@ -20559,8 +20559,8 @@ Ke.BLOCK_LITERAL = "BLOCK_LITERAL";
20559
20559
  Ke.PLAIN = "PLAIN";
20560
20560
  Ke.QUOTE_DOUBLE = "QUOTE_DOUBLE";
20561
20561
  Ke.QUOTE_SINGLE = "QUOTE_SINGLE";
20562
- const jB = "tag:yaml.org,2002:";
20563
- function ZB(i, e, t) {
20562
+ const j9 = "tag:yaml.org,2002:";
20563
+ function Z9(i, e, t) {
20564
20564
  if (e) {
20565
20565
  const n = t.filter((o) => o.tag === e), r = n.find((o) => !o.format) ?? n[0];
20566
20566
  if (!r)
@@ -20584,8 +20584,8 @@ function ma(i, e, t) {
20584
20584
  return u.anchor || (u.anchor = r(i)), new _c(u.anchor);
20585
20585
  u = { anchor: null, node: null }, a.set(i, u);
20586
20586
  }
20587
- e?.startsWith("!!") && (e = jB + e.slice(2));
20588
- let c = ZB(i, e, s.tags);
20587
+ e?.startsWith("!!") && (e = j9 + e.slice(2));
20588
+ let c = Z9(i, e, s.tags);
20589
20589
  if (!c) {
20590
20590
  if (i && typeof i.toJSON == "function" && (i = i.toJSON()), !i || typeof i != "object") {
20591
20591
  const p = new Ke(i);
@@ -20713,7 +20713,7 @@ class fC extends ig {
20713
20713
  }
20714
20714
  }
20715
20715
  }
20716
- const QB = (i) => i.replace(/^(?!$)(?: $)?/gm, "#");
20716
+ const Q9 = (i) => i.replace(/^(?!$)(?: $)?/gm, "#");
20717
20717
  function Yn(i, e) {
20718
20718
  return /^\n+$/.test(i) ? i.substring(1) : e ? i.replace(/^(?! *$)/gm, e) : i;
20719
20719
  }
@@ -20806,7 +20806,7 @@ const bc = (i, e) => ({
20806
20806
  lineWidth: i.options.lineWidth,
20807
20807
  minContentWidth: i.options.minContentWidth
20808
20808
  }), Sc = (i) => /^(%|---|\.\.\.)/m.test(i);
20809
- function XB(i, e, t) {
20809
+ function X9(i, e, t) {
20810
20810
  if (!e || e < 0)
20811
20811
  return !1;
20812
20812
  const n = e - t, r = i.length;
@@ -20915,7 +20915,7 @@ function Cu({ comment: i, type: e, value: t }, n, r, o) {
20915
20915
  const { blockQuote: s, commentString: a, lineWidth: u } = n.options;
20916
20916
  if (!s || /\n[\t ]+$/.test(t) || /^\s*$/.test(t))
20917
20917
  return Ko(t, n);
20918
- const c = n.indent || (n.forceBlockIndent || Sc(t) ? " " : ""), d = s === "literal" ? !0 : s === "folded" || e === Ke.BLOCK_FOLDED ? !1 : e === Ke.BLOCK_LITERAL ? !0 : !XB(t, u, c.length);
20918
+ const c = n.indent || (n.forceBlockIndent || Sc(t) ? " " : ""), d = s === "literal" ? !0 : s === "folded" || e === Ke.BLOCK_FOLDED ? !1 : e === Ke.BLOCK_LITERAL ? !0 : !X9(t, u, c.length);
20919
20919
  if (!t)
20920
20920
  return d ? `|
20921
20921
  ` : `>
@@ -21018,7 +21018,7 @@ function wa(i, e, t, n) {
21018
21018
  function hC(i, e) {
21019
21019
  const t = Object.assign({
21020
21020
  blockQuote: !0,
21021
- commentString: QB,
21021
+ commentString: Q9,
21022
21022
  defaultKeyType: null,
21023
21023
  defaultStringType: "PLAIN",
21024
21024
  directives: null,
@@ -22280,7 +22280,7 @@ class gs {
22280
22280
  const b = (S) => typeof S == "number" || S instanceof String || S instanceof Number, h = t.filter(b).map(String);
22281
22281
  h.length > 0 && (t = t.concat(h)), r = t;
22282
22282
  } else n === void 0 && t && (n = t, t = void 0);
22283
- const { aliasDuplicateObjects: o, anchorPrefix: s, flow: a, keepUndefined: u, onTagObj: c, tag: d } = n ?? {}, { onAnchor: p, setAnchors: g, sourceObjects: v } = YB(
22283
+ const { aliasDuplicateObjects: o, anchorPrefix: s, flow: a, keepUndefined: u, onTagObj: c, tag: d } = n ?? {}, { onAnchor: p, setAnchors: g, sourceObjects: v } = Y9(
22284
22284
  this,
22285
22285
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
22286
22286
  s || "a"
@@ -24941,7 +24941,7 @@ async function o4(i, e) {
24941
24941
  }
24942
24942
  }
24943
24943
  async function s4(i, e) {
24944
- return (await import("./list_directory.node-BiNTY-zJ.js")).resolveArgumentDirectoryNode(i, e);
24944
+ return (await import("./list_directory.node-BQq4XK-y.js")).resolveArgumentDirectoryNode(i, e);
24945
24945
  }
24946
24946
  function a4(i) {
24947
24947
  if (!i._regex)
@@ -26113,7 +26113,7 @@ async function m4({
26113
26113
  fileMentions: void 0,
26114
26114
  userState: void 0
26115
26115
  };
26116
- const o = (await import("./files-Cahfcbk6.js").then(
26116
+ const o = (await import("./files-C7vv9BDa.js").then(
26117
26117
  ({ getFileMentions: a }) => a(
26118
26118
  VE(t.content),
26119
26119
  r,
@@ -26753,7 +26753,7 @@ class Jo {
26753
26753
  s
26754
26754
  );
26755
26755
  t?.throwIfAborted();
26756
- const u = DB.fromNativeThread(e), c = UB(u, r, a, e.id, t);
26756
+ const u = D9.fromNativeThread(e), c = U9(u, r, a, e.id, t);
26757
26757
  return t?.throwIfAborted(), c;
26758
26758
  }
26759
26759
  async findAndCancelToolRun(e, t) {
@@ -26943,7 +26943,7 @@ IMPORTANT: The result of this tool (if any) should be displayed directly to the
26943
26943
  },
26944
26944
  source: "builtin"
26945
26945
  },
26946
- fn: import("./node-T5hkN-Bz.js").then(({ runRoutine: i }) => i)
26946
+ fn: import("./node-4YOMf-Tu.js").then(({ runRoutine: i }) => i)
26947
26947
  };
26948
26948
  let $w = !1;
26949
26949
  async function YC(i, e = !1) {
@@ -29507,7 +29507,7 @@ function Pu(i) {
29507
29507
  changes: t
29508
29508
  };
29509
29509
  }
29510
- const M4 = import("./node-BeQHJ-gW.js").then(
29510
+ const M4 = import("./node-mEGuz3HH.js").then(
29511
29511
  ({ nodeFileSystem: i }) => i
29512
29512
  );
29513
29513
  class L4 {
@@ -37871,6 +37871,11 @@ const L1 = {
37871
37871
  visible: !1,
37872
37872
  description: "Enable tab completion features"
37873
37873
  },
37874
+ "tab.disabledLanguages": {
37875
+ value: [],
37876
+ visible: !1,
37877
+ description: "List of language IDs for which tab completion is disabled"
37878
+ },
37874
37879
  "tab.verboseLogs": {
37875
37880
  value: !1,
37876
37881
  visible: !1,
@@ -39352,7 +39357,7 @@ async function Iu(i, e) {
39352
39357
  Pg({
39353
39358
  logLevel: e.logLevel || process.env.AMP_LOG_LEVEL,
39354
39359
  logFile: e.logFile || process.env.AMP_LOG_FILE
39355
- }), zM("0.0.1748548891-gfb902f");
39360
+ }), zM("0.0.1748563307-g76b426");
39356
39361
  const t = e.settingsFile ?? process.env.AMP_SETTINGS_FILE;
39357
39362
  ae.info("Using settings file", { settingsFile: t });
39358
39363
  const n = Pu(), r = e1({ settingsFile: t }), o = process.env.AMP_API_KEY;
@@ -39449,7 +39454,7 @@ Login failed: ${r instanceof Error ? r.message : String(r)}
39449
39454
  }
39450
39455
  }
39451
39456
  function nW(i) {
39452
- const e = new C4().name("amp").description("AI-powered coding assistant").version("0.0.1748548891-gfb902f").option("--thread-id [THREAD_ID]", "ID of the thread to continue running", void 0);
39457
+ const e = new C4().name("amp").description("AI-powered coding assistant").version("0.0.1748563307-g76b426").option("--thread-id [THREAD_ID]", "ID of the thread to continue running", void 0);
39453
39458
  e.addHelpText(
39454
39459
  "after",
39455
39460
  (() => {
@@ -39844,7 +39849,8 @@ async function FE(i, e) {
39844
39849
  ze.disable(), Ye.write(`Shutting down...
39845
39850
  `), await d?.sync().catch((I) => {
39846
39851
  ae.error("Thread sync error", I, { threadID: _ });
39847
- }), T.dispose(), d && d.dispose(), u.dispose(), await a.dispose(), v.dispose(), w.dispose(), process.exit(0);
39852
+ }), T.dispose(), d && d.dispose(), u.dispose(), await a.dispose(), v.dispose(), w.dispose(), ct.write(i.printer.print(`Thread ID: ${_}`, { foreground: "gray" }) + `
39853
+ `), process.exit(0);
39848
39854
  }
39849
39855
  i.isInteractiveMode && (ze.enable(), Ye.write(
39850
39856
  `${i.printer.print("Type ", { foreground: "gray" })}${i.printer.print("\\", { foreground: "gray", style: "bold" })}${i.printer.print(" followed by ", { foreground: "gray" })}${i.printer.print("Enter", { foreground: "gray", style: "bold" })}${i.printer.print(" to insert newlines, or use ", { foreground: "gray" })}${i.printer.print("Shift+Enter", { foreground: "gray", style: "bold" })}${i.printer.print(` in supported terminals.
@@ -40643,7 +40649,7 @@ function Tr() {
40643
40649
  }
40644
40650
  async function lW(i, e) {
40645
40651
  try {
40646
- const t = await KG("0.0.1748548891-gfb902f");
40652
+ const t = await KG("0.0.1748563307-g76b426");
40647
40653
  t.hasUpdate && t.latestVersion ? e ? (i.next({ type: "update-start-updating" }), setTimeout(async () => {
40648
40654
  try {
40649
40655
  await ZG(t.latestVersion), i.next({
@@ -40658,7 +40664,7 @@ async function lW(i, e) {
40658
40664
  version: t.latestVersion
40659
40665
  });
40660
40666
  }
40661
- }, 100)) : ae.info(`New version available: 0.0.1748548891-gfb902f → ${t.latestVersion}`) : ae.info("No update available");
40667
+ }, 100)) : ae.info(`New version available: 0.0.1748563307-g76b426 → ${t.latestVersion}`) : ae.info("No update available");
40662
40668
  } catch (t) {
40663
40669
  ae.debug("Update check failed", t);
40664
40670
  }
@@ -40713,4 +40719,4 @@ export {
40713
40719
  ve as s,
40714
40720
  lr as u
40715
40721
  };
40716
- //# sourceMappingURL=main-e0U8PkGs.js.map
40722
+ //# sourceMappingURL=main-B8n5KdeK.js.map