@google/gemini-cli 0.65.0-preview.0 → 0.66.0-nightly.20261017.ged96faedf

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 (75) hide show
  1. package/README.md +21 -56
  2. package/bundle/{chunk-NL7ZHGCH.js → chunk-464WBVYM.js} +1 -1
  3. package/bundle/{chunk-QJK54DSE.js → chunk-5VQUE3OF.js} +1 -1
  4. package/bundle/{chunk-VF5WQSOE.js → chunk-7ARQMEMX.js} +1 -1
  5. package/bundle/{chunk-2WVLIJA5.js → chunk-BUG4N6U5.js} +145 -77
  6. package/bundle/{chunk-F6AJM4WN.js → chunk-DPV3ZEOC.js} +3 -3
  7. package/bundle/{chunk-GSQEBEGC.js → chunk-ERBSM2HU.js} +3 -3
  8. package/bundle/{chunk-WTRK3NVX.js → chunk-GEUFOF2X.js} +106 -1500
  9. package/bundle/{chunk-V2R74WAG.js → chunk-H4U2CWBQ.js} +151 -81
  10. package/bundle/chunk-HDP6V6JI.js +1956 -0
  11. package/bundle/{chunk-RPHDSDL6.js → chunk-IDCWFZU3.js} +1 -1
  12. package/bundle/{chunk-SN7QZKXC.js → chunk-IGOTAEJY.js} +170 -1551
  13. package/bundle/chunk-J5QPCO3J.js +101859 -0
  14. package/bundle/{chunk-H2CZXS7F.js → chunk-JY3DYBJT.js} +1 -1
  15. package/bundle/{chunk-HLOOE7YN.js → chunk-LDGJJCVW.js} +9 -8
  16. package/bundle/chunk-MH4KAY5W.js +512 -0
  17. package/bundle/{chunk-LLE5Z636.js → chunk-NAPT3FAL.js} +106 -1500
  18. package/bundle/chunk-NOSWGXRT.js +1956 -0
  19. package/bundle/{chunk-43EXRO7A.js → chunk-NU74STQ5.js} +145 -77
  20. package/bundle/{chunk-K7NOVQ6G.js → chunk-QCWGLPCO.js} +376 -231
  21. package/bundle/{chunk-WGL5FJOS.js → chunk-QF3ALSJN.js} +3 -3
  22. package/bundle/{chunk-K4G5D5ZZ.js → chunk-R4KPURFC.js} +1 -1
  23. package/bundle/chunk-R6XDLHLP.js +1956 -0
  24. package/bundle/chunk-R7UPATQC.js +1956 -0
  25. package/bundle/chunk-RACMC24X.js +118 -0
  26. package/bundle/{chunk-4JGVVJGK.js → chunk-RE4V6I3G.js} +1 -1
  27. package/bundle/{chunk-S7BCRBI4.js → chunk-UTTFPWGQ.js} +1 -1
  28. package/bundle/chunk-VXYA6LA4.js +1571 -0
  29. package/bundle/chunk-XY2QSBID.js +17603 -0
  30. package/bundle/{chunk-K7AA35SP.js → chunk-YOI4DS3V.js} +365 -230
  31. package/bundle/chunk-YP27UYI4.js +154 -0
  32. package/bundle/{chunk-TP236FKO.js → chunk-YPLMNSM4.js} +8243 -15166
  33. package/bundle/chunk-ZFQ347ZN.js +402181 -0
  34. package/bundle/{cleanup-HPADDONA.js → cleanup-6FAZDCL3.js} +2 -2
  35. package/bundle/{cleanup-JOMSXKMP.js → cleanup-GNZLZG55.js} +2 -2
  36. package/bundle/{cleanup-LYRJHMMO.js → cleanup-RX3AC5ET.js} +2 -2
  37. package/bundle/cleanup-WAU2KYGS.js +32 -0
  38. package/bundle/{core-NCJTYARO.js → core-AGGXDQOT.js} +13 -1
  39. package/bundle/{devtoolsService-WP2OPVPB.js → devtoolsService-6XOCGTLC.js} +2 -2
  40. package/bundle/{devtoolsService-JFJBTZ4B.js → devtoolsService-FBTSVQ57.js} +4 -3
  41. package/bundle/{devtoolsService-HIZA3JGR.js → devtoolsService-UO6ZB72B.js} +2 -2
  42. package/bundle/devtoolsService-W5QGZ3SW.js +4359 -0
  43. package/bundle/{dist-GQKLLBDW.js → dist-2ELAEESC.js} +13 -1
  44. package/bundle/{core-IVQAI4S6.js → dist-2R7C2WHA.js} +13 -1
  45. package/bundle/dist-PALH7PJS.js +2280 -0
  46. package/bundle/docs/changelogs/index.md +22 -0
  47. package/bundle/docs/changelogs/latest.md +64 -54
  48. package/bundle/docs/changelogs/preview.md +91 -55
  49. package/bundle/docs/reference/configuration.md +8 -3
  50. package/bundle/docs/reference/keyboard-shortcuts.md +18 -4
  51. package/bundle/{gemini-5TUKZVGS.js → gemini-6MH55Y7F.js} +37 -18
  52. package/bundle/{gemini-7CHJYSHM.js → gemini-DOXUDJDY.js} +37 -18
  53. package/bundle/{gemini-546WMAHG.js → gemini-OHYXI52N.js} +237 -202
  54. package/bundle/gemini-OUEDCH4P.js +17970 -0
  55. package/bundle/gemini.js +14 -15
  56. package/bundle/{interactiveCli-E3PUPYMZ.js → interactiveCli-7LIKGDTJ.js} +1061 -989
  57. package/bundle/{interactiveCli-5XIAIY74.js → interactiveCli-EGQYN3KR.js} +1371 -1280
  58. package/bundle/{interactiveCli-L4PK7YY3.js → interactiveCli-TG7PGV4V.js} +1061 -989
  59. package/bundle/interactiveCli-YEXCUIFZ.js +35601 -0
  60. package/bundle/{liteRtServerManager-JCTYJBV5.js → liteRtServerManager-KAPXZ3EU.js} +4 -4
  61. package/bundle/{liteRtServerManager-JERG6KYC.js → liteRtServerManager-MSJIWMWP.js} +4 -4
  62. package/bundle/{liteRtServerManager-22ISMNN2.js → liteRtServerManager-PD2N3GLD.js} +4 -4
  63. package/bundle/liteRtServerManager-X5SCFYXM.js +65 -0
  64. package/bundle/{oauth2-provider-XRUER2XR.js → oauth2-provider-IUN6Z4IO.js} +1 -1
  65. package/bundle/{oauth2-provider-477UJQX6.js → oauth2-provider-MKJIQNWP.js} +41 -79
  66. package/bundle/{oauth2-provider-MKWWBW4K.js → oauth2-provider-RMF7U2UN.js} +1 -1
  67. package/bundle/oauth2-provider-ZM5GWCNX.js +273 -0
  68. package/bundle/{start-MVIPJNQ5.js → start-5GIUIER3.js} +6 -6
  69. package/bundle/{start-RZWSVT55.js → start-APIVGXZ3.js} +6 -6
  70. package/bundle/{start-AGMBPY3O.js → start-GJ4TH4KZ.js} +6 -6
  71. package/bundle/start-WDS52ZNE.js +18 -0
  72. package/package.json +1 -1
  73. package/bundle/chunk-4DCA4L53.js +0 -425
  74. package/bundle/chunk-BFIV7GTA.js +0 -425
  75. package/bundle/chunk-V72FRESD.js +0 -425
@@ -2,6 +2,8 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  AuthProviderType,
4
4
  AuthType,
5
+ CoreEvent,
6
+ CoreToolCallStatus,
5
7
  DEFAULT_MODEL_CONFIGS,
6
8
  DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
7
9
  EDITOR_OPTIONS,
@@ -31,7 +33,7 @@ import {
31
33
  partListUnionToString,
32
34
  require_strip_json_comments,
33
35
  sanitizeFilenamePart
34
- } from "./chunk-K7NOVQ6G.js";
36
+ } from "./chunk-YPLMNSM4.js";
35
37
  import {
36
38
  __commonJS,
37
39
  __require,
@@ -10289,7 +10291,7 @@ function convertSessionToHistoryFormats(messages) {
10289
10291
  args: tool.args,
10290
10292
  description: tool.description || "",
10291
10293
  renderOutputAsMarkdown: tool.renderOutputAsMarkdown ?? true,
10292
- status: tool.status === "success" ? "success" /* Success */ : "error" /* Error */,
10294
+ status: tool.status === "success" ? CoreToolCallStatus.Success : CoreToolCallStatus.Error,
10293
10295
  resultDisplay: tool.resultDisplay,
10294
10296
  confirmationDetails: void 0
10295
10297
  }))
@@ -16386,6 +16388,18 @@ var LoadedSettings = class {
16386
16388
  return;
16387
16389
  }
16388
16390
  this.isTrusted = isTrusted;
16391
+ if (isTrusted && Object.keys(this._workspaceFile.settings).length === 0 && Object.keys(this._workspaceFile.originalSettings).length > 0) {
16392
+ const resolvedWorkspaceSettings = resolveSettings(
16393
+ this._workspaceFile.originalSettings,
16394
+ this._workspaceFile.path,
16395
+ this.errors
16396
+ );
16397
+ normalizeLegacyTheme(resolvedWorkspaceSettings);
16398
+ this._workspaceFile = {
16399
+ ...this._workspaceFile,
16400
+ settings: resolvedWorkspaceSettings
16401
+ };
16402
+ }
16389
16403
  this.workspace = isTrusted ? this._workspaceFile : this.createEmptyWorkspace(this._workspaceFile);
16390
16404
  this._merged = this.computeMergedSettings();
16391
16405
  coreEvents.emitSettingsChanged();
@@ -16400,12 +16414,12 @@ var LoadedSettings = class {
16400
16414
  }
16401
16415
  computeMergedSettings(forceTrusted = false) {
16402
16416
  const isTrusted = forceTrusted || this.isTrusted;
16403
- const workspace = forceTrusted ? this._workspaceFile : this.workspace;
16417
+ const workspaceSettings = forceTrusted ? Object.keys(this._workspaceFile.settings).length > 0 ? this._workspaceFile.settings : this._workspaceFile.originalSettings : this.workspace.settings;
16404
16418
  const merged = mergeSettings(
16405
16419
  this.system.settings,
16406
16420
  this.systemDefaults.settings,
16407
16421
  this.user.settings,
16408
- workspace.settings,
16422
+ workspaceSettings,
16409
16423
  isTrusted
16410
16424
  );
16411
16425
  const adminSettingSchema = getSettingsSchema().admin;
@@ -16440,8 +16454,8 @@ var LoadedSettings = class {
16440
16454
  // React will pass a listener fn into this subscribe fn
16441
16455
  // that listener fn will perform an object identity check on the snapshot and trigger a React re render if the snapshot has changed
16442
16456
  subscribe(listener) {
16443
- coreEvents.on("settings-changed" /* SettingsChanged */, listener);
16444
- return () => coreEvents.off("settings-changed" /* SettingsChanged */, listener);
16457
+ coreEvents.on(CoreEvent.SettingsChanged, listener);
16458
+ return () => coreEvents.off(CoreEvent.SettingsChanged, listener);
16445
16459
  }
16446
16460
  getSnapshot() {
16447
16461
  return this._snapshot;
@@ -16593,7 +16607,7 @@ function setUpCloudShellEnvironment(envFilePath, isTrusted, isSandboxed, selecte
16593
16607
  }
16594
16608
  }
16595
16609
  let value = "cloudshell-gca";
16596
- if (selectedAuthType === "vertex-ai" /* USE_VERTEX_AI */) {
16610
+ if (selectedAuthType === AuthType.USE_VERTEX_AI) {
16597
16611
  value = process2.env[USER_GCP_PROJECT];
16598
16612
  }
16599
16613
  if (envFilePath && fs4.existsSync(envFilePath)) {
@@ -16672,6 +16686,75 @@ function loadSettings(workspaceDir = process2.cwd()) {
16672
16686
  () => _doLoadSettings(normalizedWorkspaceDir)
16673
16687
  );
16674
16688
  }
16689
+ function isRecord(value) {
16690
+ return typeof value === "object" && value !== null && !Array.isArray(value);
16691
+ }
16692
+ function getParentRecord(root, objectPath) {
16693
+ let current = root;
16694
+ for (let i = 0; i < objectPath.length - 1; i++) {
16695
+ if (!isRecord(current)) {
16696
+ return void 0;
16697
+ }
16698
+ current = current[objectPath[i]];
16699
+ }
16700
+ return isRecord(current) ? current : void 0;
16701
+ }
16702
+ function coerceValidSettings(expandedSettings, issues) {
16703
+ const clone2 = structuredClone(expandedSettings);
16704
+ const pathsToRestore = [];
16705
+ for (const issue of issues) {
16706
+ const firstNumberIdx = issue.path.findIndex((p) => typeof p === "number");
16707
+ const objectPath = (firstNumberIdx === -1 ? issue.path : issue.path.slice(0, firstNumberIdx)).filter((p) => typeof p === "string");
16708
+ if (objectPath.length === 0) {
16709
+ return expandedSettings;
16710
+ }
16711
+ const lastKey = objectPath[objectPath.length - 1];
16712
+ const container = getParentRecord(clone2, objectPath);
16713
+ if (container && Object.hasOwn(container, lastKey)) {
16714
+ delete container[lastKey];
16715
+ pathsToRestore.push(objectPath);
16716
+ }
16717
+ }
16718
+ const partialValidation = validateSettings(clone2);
16719
+ if (!partialValidation.success || !partialValidation.data) {
16720
+ return expandedSettings;
16721
+ }
16722
+ const coerced = partialValidation.data;
16723
+ for (const objectPath of pathsToRestore) {
16724
+ const lastKey = objectPath[objectPath.length - 1];
16725
+ const sourceContainer = getParentRecord(expandedSettings, objectPath);
16726
+ const targetContainer = getParentRecord(coerced, objectPath);
16727
+ if (sourceContainer && targetContainer && Object.hasOwn(sourceContainer, lastKey)) {
16728
+ targetContainer[lastKey] = sourceContainer[lastKey];
16729
+ }
16730
+ }
16731
+ return coerced;
16732
+ }
16733
+ function normalizeLegacyTheme(settings) {
16734
+ if (settings.ui?.theme === "VS") {
16735
+ settings.ui.theme = DefaultLight.name;
16736
+ } else if (settings.ui?.theme === "VS2015") {
16737
+ settings.ui.theme = DefaultDark.name;
16738
+ }
16739
+ }
16740
+ function resolveSettings(rawSettings, filePath, settingsErrors) {
16741
+ if (Object.keys(rawSettings).length === 0) {
16742
+ return {};
16743
+ }
16744
+ const expandedSettings = resolveEnvVarsInObject(rawSettings);
16745
+ const validationResult = validateSettings(expandedSettings);
16746
+ if (!validationResult.success && validationResult.error) {
16747
+ if (settingsErrors) {
16748
+ settingsErrors.push({
16749
+ message: formatValidationError(validationResult.error, filePath),
16750
+ path: filePath,
16751
+ severity: "warning"
16752
+ });
16753
+ }
16754
+ return coerceValidSettings(expandedSettings, validationResult.error.issues);
16755
+ }
16756
+ return validationResult.data ?? expandedSettings;
16757
+ }
16675
16758
  function _doLoadSettings(workspaceDir) {
16676
16759
  let systemSettings = {};
16677
16760
  let systemDefaultSettings = {};
@@ -16693,37 +16776,9 @@ function _doLoadSettings(workspaceDir) {
16693
16776
  path: filePath,
16694
16777
  severity: "error"
16695
16778
  });
16696
- return { settings: {}, rawSettings: {} };
16697
- }
16698
- const settingsObject = rawSettings;
16699
- const expandedSettings = resolveEnvVarsInObject(
16700
- settingsObject
16701
- );
16702
- const validationResult = validateSettings(expandedSettings);
16703
- if (!validationResult.success && validationResult.error) {
16704
- const errorMessage = formatValidationError(
16705
- validationResult.error,
16706
- filePath
16707
- );
16708
- settingsErrors.push({
16709
- message: errorMessage,
16710
- path: filePath,
16711
- severity: "warning"
16712
- });
16713
- return {
16714
- settings: expandedSettings,
16715
- rawSettings: settingsObject,
16716
- rawJson: content
16717
- };
16779
+ return { rawSettings: {} };
16718
16780
  }
16719
- return {
16720
- // Since we've successfully validated expandedSettings against settingsZodSchema,
16721
- // it's safe to cast the resulting data to the Settings type.
16722
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
16723
- settings: validationResult.data ?? expandedSettings,
16724
- rawSettings: settingsObject,
16725
- rawJson: content
16726
- };
16781
+ return { rawSettings, rawJson: content };
16727
16782
  }
16728
16783
  } catch (error) {
16729
16784
  settingsErrors.push({
@@ -16732,12 +16787,12 @@ function _doLoadSettings(workspaceDir) {
16732
16787
  severity: "error"
16733
16788
  });
16734
16789
  }
16735
- return { settings: {}, rawSettings: {} };
16790
+ return { rawSettings: {} };
16736
16791
  };
16737
16792
  const securityCache = createPathSecurityCache();
16738
16793
  const loadSystemFile = (filePath, fileLabel) => {
16739
16794
  if (!fs4.existsSync(filePath)) {
16740
- return { settings: {}, rawSettings: {} };
16795
+ return { rawSettings: {} };
16741
16796
  }
16742
16797
  const check = isFileAndDirectorySecureSync(filePath, securityCache);
16743
16798
  if (!check.secure) {
@@ -16746,7 +16801,7 @@ function _doLoadSettings(workspaceDir) {
16746
16801
  path: filePath,
16747
16802
  severity: "warning"
16748
16803
  });
16749
- return { settings: {}, rawSettings: {} };
16804
+ return { rawSettings: {} };
16750
16805
  }
16751
16806
  return load(filePath);
16752
16807
  };
@@ -16756,26 +16811,10 @@ function _doLoadSettings(workspaceDir) {
16756
16811
  "system defaults"
16757
16812
  );
16758
16813
  const userResult = load(USER_SETTINGS_PATH);
16759
- let workspaceResult = {
16760
- settings: {},
16761
- rawSettings: {},
16762
- rawJson: void 0
16763
- };
16814
+ let workspaceResult = { rawSettings: {} };
16764
16815
  if (!storage.isWorkspaceHomeDir()) {
16765
16816
  workspaceResult = load(workspaceSettingsPath);
16766
16817
  }
16767
- const systemOriginalSettings = structuredClone(systemResult.rawSettings);
16768
- const systemDefaultsOriginalSettings = structuredClone(
16769
- systemDefaultsResult.rawSettings
16770
- );
16771
- const userOriginalSettings = structuredClone(userResult.rawSettings);
16772
- const workspaceOriginalSettings = structuredClone(
16773
- workspaceResult.rawSettings
16774
- );
16775
- systemSettings = systemResult.settings;
16776
- systemDefaultSettings = systemDefaultsResult.settings;
16777
- userSettings = userResult.settings;
16778
- workspaceSettings = workspaceResult.settings;
16779
16818
  const envAuthOverride = process2.env["GEMINI_CLI_AUTH_OVERRIDE"];
16780
16819
  if (envAuthOverride) {
16781
16820
  delete process2.env["GEMINI_CLI_AUTH_OVERRIDE"];
@@ -16786,31 +16825,34 @@ function _doLoadSettings(workspaceDir) {
16786
16825
  envAuthOverride
16787
16826
  ) : void 0;
16788
16827
  if (authOverride) {
16789
- if (!userSettings.security) {
16790
- userSettings.security = {};
16791
- }
16792
- if (!userSettings.security.auth) {
16793
- userSettings.security.auth = {};
16794
- }
16795
- userSettings.security.auth.selectedType = authOverride;
16796
- if (!userOriginalSettings.security) {
16797
- userOriginalSettings.security = {};
16798
- }
16799
- if (!userOriginalSettings.security.auth) {
16800
- userOriginalSettings.security.auth = {};
16801
- }
16802
- userOriginalSettings.security.auth.selectedType = authOverride;
16803
- }
16804
- if (userSettings.ui?.theme === "VS") {
16805
- userSettings.ui.theme = DefaultLight.name;
16806
- } else if (userSettings.ui?.theme === "VS2015") {
16807
- userSettings.ui.theme = DefaultDark.name;
16808
- }
16809
- if (workspaceSettings.ui?.theme === "VS") {
16810
- workspaceSettings.ui.theme = DefaultLight.name;
16811
- } else if (workspaceSettings.ui?.theme === "VS2015") {
16812
- workspaceSettings.ui.theme = DefaultDark.name;
16828
+ userResult.rawSettings = {
16829
+ ...userResult.rawSettings,
16830
+ security: {
16831
+ ...userResult.rawSettings?.security,
16832
+ auth: {
16833
+ ...userResult.rawSettings?.security?.auth,
16834
+ selectedType: authOverride
16835
+ }
16836
+ }
16837
+ };
16813
16838
  }
16839
+ const systemOriginalSettings = structuredClone(systemResult.rawSettings);
16840
+ const systemDefaultsOriginalSettings = structuredClone(
16841
+ systemDefaultsResult.rawSettings
16842
+ );
16843
+ const userOriginalSettings = structuredClone(userResult.rawSettings);
16844
+ const workspaceOriginalSettings = structuredClone(
16845
+ workspaceResult.rawSettings
16846
+ );
16847
+ systemSettings = resolveSettings(
16848
+ systemResult.rawSettings,
16849
+ systemSettingsPath
16850
+ );
16851
+ systemDefaultSettings = resolveSettings(
16852
+ systemDefaultsResult.rawSettings,
16853
+ systemDefaultsPath
16854
+ );
16855
+ userSettings = resolveSettings(userResult.rawSettings, USER_SETTINGS_PATH);
16814
16856
  const initialTrustCheckSettings = customDeepMerge(
16815
16857
  getMergeStrategyForPath,
16816
16858
  getDefaultsFromSchema(),
@@ -16819,6 +16861,12 @@ function _doLoadSettings(workspaceDir) {
16819
16861
  systemSettings
16820
16862
  );
16821
16863
  const isTrusted = isWorkspaceTrusted(initialTrustCheckSettings, workspaceDir)?.isTrusted ?? false;
16864
+ if (isTrusted) {
16865
+ workspaceSettings = resolveSettings(
16866
+ workspaceResult.rawSettings,
16867
+ workspaceSettingsPath
16868
+ );
16869
+ }
16822
16870
  const tempMergedSettings = mergeSettings(
16823
16871
  systemSettings,
16824
16872
  systemDefaultSettings,
@@ -16827,6 +16875,28 @@ function _doLoadSettings(workspaceDir) {
16827
16875
  isTrusted
16828
16876
  );
16829
16877
  loadEnvironment(tempMergedSettings, workspaceDir);
16878
+ systemSettings = resolveSettings(
16879
+ systemResult.rawSettings,
16880
+ systemSettingsPath,
16881
+ settingsErrors
16882
+ );
16883
+ systemDefaultSettings = resolveSettings(
16884
+ systemDefaultsResult.rawSettings,
16885
+ systemDefaultsPath,
16886
+ settingsErrors
16887
+ );
16888
+ userSettings = resolveSettings(
16889
+ userResult.rawSettings,
16890
+ USER_SETTINGS_PATH,
16891
+ settingsErrors
16892
+ );
16893
+ workspaceSettings = isTrusted ? resolveSettings(
16894
+ workspaceResult.rawSettings,
16895
+ workspaceSettingsPath,
16896
+ settingsErrors
16897
+ ) : {};
16898
+ normalizeLegacyTheme(userSettings);
16899
+ normalizeLegacyTheme(workspaceSettings);
16830
16900
  const fatalErrors = settingsErrors.filter((e) => e.severity === "error");
16831
16901
  if (fatalErrors.length > 0) {
16832
16902
  const errorMessages = fatalErrors.map(