@google/gemini-cli 0.40.0-preview.2 → 0.40.0-preview.4

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 (66) hide show
  1. package/bundle/{chunk-3GU3LF3I.js → chunk-4XVBQQNJ.js} +181 -16
  2. package/bundle/{chunk-PLUWJHZZ.js → chunk-547AWTTH.js} +238 -61
  3. package/bundle/{chunk-EFCQXWIF.js → chunk-63PTTRTA.js} +3 -3
  4. package/bundle/{chunk-IMEC72NS.js → chunk-ATGIEBEB.js} +1 -1
  5. package/bundle/{chunk-WL5MCPV2.js → chunk-BV2W6YE6.js} +2 -2
  6. package/bundle/{chunk-QK7UWGBN.js → chunk-CIO3GUGQ.js} +1382 -1083
  7. package/bundle/{chunk-HV36F4CL.js → chunk-CJQVVQSH.js} +134 -354
  8. package/bundle/{chunk-VCGILCZV.js → chunk-F73F75XM.js} +16 -0
  9. package/bundle/{chunk-TDW6FM3A.js → chunk-G356GKHH.js} +1 -1
  10. package/bundle/{chunk-4IJPDKI6.js → chunk-H4NQBTXN.js} +146 -364
  11. package/bundle/{chunk-GXRQOXQF.js → chunk-H7F2VOIJ.js} +178 -14
  12. package/bundle/chunk-HF7X35D3.js +80012 -0
  13. package/bundle/{chunk-WHIWQCI5.js → chunk-HGFADN5A.js} +1 -1
  14. package/bundle/{chunk-NO7STVVM.js → chunk-KG7ZFMJL.js} +1413 -1089
  15. package/bundle/{chunk-33ANPP4S.js → chunk-LMVZLINC.js} +3 -3
  16. package/bundle/chunk-LODNDE3S.js +17505 -0
  17. package/bundle/{chunk-IUVLJUOL.js → chunk-LVHUYMBU.js} +2 -2
  18. package/bundle/{chunk-NIVCRM5L.js → chunk-M76FWZ5L.js} +134 -354
  19. package/bundle/{chunk-RM43GNQQ.js → chunk-NV6UCR4K.js} +7711 -12909
  20. package/bundle/{chunk-MUGUV6RZ.js → chunk-PRZIW6SM.js} +2 -2
  21. package/bundle/chunk-RENFZ63F.js +351149 -0
  22. package/bundle/chunk-SYPUOR3U.js +156 -0
  23. package/bundle/{chunk-2RHFUIH4.js → chunk-UHHRGNIO.js} +16 -0
  24. package/bundle/chunk-VQ7N6NVX.js +1571 -0
  25. package/bundle/{chunk-UBXB5AEJ.js → chunk-WSTHO4WR.js} +3 -3
  26. package/bundle/chunk-ZQNX6OWU.js +118 -0
  27. package/bundle/{cleanup-A7WXWAMI.js → cleanup-4EFDM2N7.js} +3 -3
  28. package/bundle/{cleanup-EWPIME2M.js → cleanup-4RRVO4GO.js} +3 -3
  29. package/bundle/{cleanup-IPLJJT5S.js → cleanup-DNS7PXYC.js} +3 -3
  30. package/bundle/cleanup-DXHNV2J6.js +33 -0
  31. package/bundle/{core-VCDK23ZC.js → core-WQSFCPEO.js} +28 -2
  32. package/bundle/{devtoolsService-6Y6YER6T.js → devtoolsService-JWET4G6G.js} +3 -3
  33. package/bundle/{devtoolsService-B5VVZ752.js → devtoolsService-LPEBYJVD.js} +3 -3
  34. package/bundle/{devtoolsService-2JXSALRU.js → devtoolsService-S2LBUUZU.js} +5 -4
  35. package/bundle/devtoolsService-YCRNWWXE.js +852 -0
  36. package/bundle/{dist-UIXQETMC.js → dist-ANTOB3YW.js} +28 -2
  37. package/bundle/{core-BQT6T3CH.js → dist-RIVCP5ZD.js} +28 -2
  38. package/bundle/dist-UH565MTG.js +2046 -0
  39. package/bundle/docs/cli/cli-reference.md +1 -0
  40. package/bundle/docs/cli/trusted-folders.md +28 -0
  41. package/bundle/docs/reference/configuration.md +14 -0
  42. package/bundle/{gemini-ID44Z5SV.js → gemini-27FQ5BI4.js} +66 -22
  43. package/bundle/{gemini-54LH6RUH.js → gemini-57EC2ZF7.js} +241 -182
  44. package/bundle/{gemini-44W2QEZI.js → gemini-JAZVYRDD.js} +64 -21
  45. package/bundle/gemini-TQZRS37Q.js +16087 -0
  46. package/bundle/gemini.js +3 -3
  47. package/bundle/{interactiveCli-5MTJDFYC.js → interactiveCli-E35R6QQC.js} +17 -167
  48. package/bundle/{interactiveCli-JFBPGMNM.js → interactiveCli-FPHSBRV3.js} +30 -179
  49. package/bundle/{interactiveCli-5B3X6RNB.js → interactiveCli-L3EK4XEX.js} +300 -432
  50. package/bundle/interactiveCli-MVHR4VV7.js +34448 -0
  51. package/bundle/{liteRtServerManager-76V63PRJ.js → liteRtServerManager-LXEAYAUP.js} +4 -4
  52. package/bundle/{liteRtServerManager-WQMDPACQ.js → liteRtServerManager-ORSW3R4F.js} +4 -4
  53. package/bundle/{liteRtServerManager-6GJWEP5W.js → liteRtServerManager-PI4ZNFB5.js} +4 -4
  54. package/bundle/liteRtServerManager-YYXO5Q3I.js +65 -0
  55. package/bundle/{memoryDiscovery-RYHYLAPJ.js → memoryDiscovery-CZURD35O.js} +1 -1
  56. package/bundle/{memoryDiscovery-HWEYBJE7.js → memoryDiscovery-GZLXKRGB.js} +1 -1
  57. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  58. package/bundle/{oauth2-provider-EX6SQEZP.js → oauth2-provider-B3NTBNAM.js} +2 -2
  59. package/bundle/{oauth2-provider-ZF52AWQY.js → oauth2-provider-ENF2D4Q7.js} +39 -73
  60. package/bundle/{oauth2-provider-JCKLNKRV.js → oauth2-provider-I3G773GE.js} +2 -2
  61. package/bundle/oauth2-provider-WTF7AHQ2.js +237 -0
  62. package/bundle/{start-CYDJTOAP.js → start-CRIFZ3SW.js} +6 -6
  63. package/bundle/{start-SHOUHW3Y.js → start-KVFKS3IT.js} +6 -6
  64. package/bundle/{start-B6EMQCH5.js → start-OTLGMCNH.js} +6 -6
  65. package/bundle/start-S3REI3X2.js +18 -0
  66. package/package.json +1 -1
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  exitCli,
8
8
  require_source
9
- } from "./chunk-WHIWQCI5.js";
9
+ } from "./chunk-VQ7N6NVX.js";
10
10
  import {
11
11
  DEFAULT_BACKGROUND_OPACITY,
12
12
  DEFAULT_BORDER_OPACITY,
@@ -32,6 +32,7 @@ import {
32
32
  escapeAnsiCtrlCodes,
33
33
  getBinaryPath,
34
34
  getCachedStringWidth,
35
+ getSettingsSchema,
35
36
  getThemeTypeFromBackgroundColor,
36
37
  interpolateColor,
37
38
  isBinaryInstalled,
@@ -58,10 +59,10 @@ import {
58
59
  stripUnsafeCharacters,
59
60
  toCodePoints,
60
61
  validateCustomTheme
61
- } from "./chunk-4IJPDKI6.js";
62
+ } from "./chunk-M76FWZ5L.js";
62
63
  import {
63
64
  runExitCleanup
64
- } from "./chunk-MUGUV6RZ.js";
65
+ } from "./chunk-PRZIW6SM.js";
65
66
  import {
66
67
  AsyncFzf,
67
68
  Config,
@@ -195,7 +196,7 @@ import {
195
196
  stripAnsi,
196
197
  tokenLimit,
197
198
  uiTelemetryService
198
- } from "./chunk-RM43GNQQ.js";
199
+ } from "./chunk-KG7ZFMJL.js";
199
200
  import {
200
201
  ApprovalMode,
201
202
  CoreEvent,
@@ -221,7 +222,7 @@ import {
221
222
  shortenPath,
222
223
  tildeifyPath,
223
224
  unescapePath
224
- } from "./chunk-2RHFUIH4.js";
225
+ } from "./chunk-UHHRGNIO.js";
225
226
  import {
226
227
  require_src
227
228
  } from "./chunk-RJTRUG2J.js";
@@ -35165,13 +35166,7 @@ function* emitKeys(keypressHandler) {
35165
35166
  } else if (ch === " ") {
35166
35167
  name = "tab";
35167
35168
  alt = escaped;
35168
- } else if (ch === "\b") {
35169
- name = "backspace";
35170
- if (typeof process !== "undefined" && (process.env?.["OS"] === "Windows_NT" || !!process.env?.["WT_SESSION"])) {
35171
- ctrl = true;
35172
- }
35173
- alt = escaped;
35174
- } else if (ch === "\x7F") {
35169
+ } else if (ch === "\b" || ch === "\x7F") {
35175
35170
  name = "backspace";
35176
35171
  alt = escaped;
35177
35172
  } else if (ch === ESC3) {
@@ -45773,6 +45768,165 @@ var McpServerEnablementManager = class _McpServerEnablementManager {
45773
45768
  }
45774
45769
  };
45775
45770
 
45771
+ // packages/cli/src/utils/settingsUtils.ts
45772
+ function flattenSchema(schema, prefix = "") {
45773
+ let result = {};
45774
+ for (const key in schema) {
45775
+ const newKey = prefix ? `${prefix}.${key}` : key;
45776
+ const definition = schema[key];
45777
+ result[newKey] = { ...definition, key: newKey };
45778
+ if (definition.properties) {
45779
+ result = { ...result, ...flattenSchema(definition.properties, newKey) };
45780
+ }
45781
+ }
45782
+ return result;
45783
+ }
45784
+ var _FLATTENED_SCHEMA;
45785
+ function getFlattenedSchema() {
45786
+ return _FLATTENED_SCHEMA ?? (_FLATTENED_SCHEMA = flattenSchema(getSettingsSchema()));
45787
+ }
45788
+ function getSettingDefinition(key) {
45789
+ return getFlattenedSchema()[key];
45790
+ }
45791
+ function getDefaultValue(key) {
45792
+ return getFlattenedSchema()[key]?.default;
45793
+ }
45794
+ function getDialogRestartRequiredSettings() {
45795
+ return Object.values(getFlattenedSchema()).filter(
45796
+ (definition) => definition.requiresRestart && definition.showInDialog !== false
45797
+ ).map((definition) => definition.key);
45798
+ }
45799
+ function isRecord(value) {
45800
+ return typeof value === "object" && value !== null;
45801
+ }
45802
+ function isSettingsValue(value) {
45803
+ if (value === void 0) return true;
45804
+ if (value === null) return false;
45805
+ const type = typeof value;
45806
+ return type === "string" || type === "number" || type === "boolean" || type === "object";
45807
+ }
45808
+ function getNestedValue(obj, path37) {
45809
+ let current = obj;
45810
+ for (const key of path37) {
45811
+ if (!isRecord(current) || !(key in current)) {
45812
+ return void 0;
45813
+ }
45814
+ current = current[key];
45815
+ }
45816
+ return current;
45817
+ }
45818
+ function getEffectiveValue(key, settings) {
45819
+ const definition = getSettingDefinition(key);
45820
+ if (!definition) {
45821
+ return void 0;
45822
+ }
45823
+ const path37 = key.split(".");
45824
+ const value = getNestedValue(settings, path37);
45825
+ if (value !== void 0 && isSettingsValue(value)) {
45826
+ return value;
45827
+ }
45828
+ return definition.default;
45829
+ }
45830
+ function getDialogSettingKeys() {
45831
+ return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
45832
+ }
45833
+ function isInSettingsScope(key, scopeSettings) {
45834
+ const path37 = key.split(".");
45835
+ const value = getNestedValue(scopeSettings, path37);
45836
+ return value !== void 0;
45837
+ }
45838
+ function getDisplayValue(key, scopeSettings, _mergedSettings) {
45839
+ const definition = getSettingDefinition(key);
45840
+ const existsInScope = isInSettingsScope(key, scopeSettings);
45841
+ let value;
45842
+ if (existsInScope) {
45843
+ value = getEffectiveValue(key, scopeSettings);
45844
+ } else {
45845
+ value = getDefaultValue(key);
45846
+ }
45847
+ let valueString = String(value);
45848
+ if (definition?.type === "object" && value !== null && typeof value === "object") {
45849
+ valueString = JSON.stringify(value);
45850
+ } else if (definition?.type === "enum" && definition.options) {
45851
+ const option = definition.options?.find((option2) => option2.value === value);
45852
+ valueString = option?.label ?? `${value}`;
45853
+ }
45854
+ if (definition?.unit === "%" && typeof value === "number") {
45855
+ valueString = `${value} (${Math.round(value * 100)}%)`;
45856
+ } else if (definition?.unit) {
45857
+ valueString = `${valueString}${definition.unit}`;
45858
+ }
45859
+ if (existsInScope) {
45860
+ return `${valueString}*`;
45861
+ }
45862
+ return valueString;
45863
+ }
45864
+ function tryParseJsonStringArray(input) {
45865
+ try {
45866
+ const parsed = JSON.parse(input);
45867
+ if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) {
45868
+ return parsed;
45869
+ }
45870
+ return null;
45871
+ } catch {
45872
+ return null;
45873
+ }
45874
+ }
45875
+ function tryParseJsonObject(input) {
45876
+ try {
45877
+ const parsed = JSON.parse(input);
45878
+ if (isRecord(parsed) && !Array.isArray(parsed)) {
45879
+ return parsed;
45880
+ }
45881
+ return null;
45882
+ } catch {
45883
+ return null;
45884
+ }
45885
+ }
45886
+ function parseStringArrayValue(input) {
45887
+ const trimmed = input.trim();
45888
+ if (trimmed === "") return [];
45889
+ return tryParseJsonStringArray(trimmed) ?? input.split(",").map((p2) => p2.trim()).filter((p2) => p2.length > 0);
45890
+ }
45891
+ function parseObjectValue(input) {
45892
+ const trimmed = input.trim();
45893
+ if (trimmed === "") {
45894
+ return null;
45895
+ }
45896
+ return tryParseJsonObject(trimmed);
45897
+ }
45898
+ function parseEditedValue(type, newValue) {
45899
+ if (type === "number") {
45900
+ if (newValue.trim() === "") {
45901
+ return null;
45902
+ }
45903
+ const numParsed = Number(newValue.trim());
45904
+ if (Number.isNaN(numParsed)) {
45905
+ return null;
45906
+ }
45907
+ return numParsed;
45908
+ }
45909
+ if (type === "array") {
45910
+ return parseStringArrayValue(newValue);
45911
+ }
45912
+ if (type === "object") {
45913
+ return parseObjectValue(newValue);
45914
+ }
45915
+ return newValue;
45916
+ }
45917
+ function getEditValue(type, rawValue) {
45918
+ if (rawValue === void 0) {
45919
+ return void 0;
45920
+ }
45921
+ if (type === "array" && Array.isArray(rawValue)) {
45922
+ return rawValue.join(", ");
45923
+ }
45924
+ if (type === "object" && rawValue !== null && typeof rawValue === "object") {
45925
+ return JSON.stringify(rawValue);
45926
+ }
45927
+ return void 0;
45928
+ }
45929
+
45776
45930
  // packages/cli/src/ui/hooks/atCommandProcessor.ts
45777
45931
  import * as fs19 from "node:fs/promises";
45778
45932
  import * as path13 from "node:path";
@@ -54837,7 +54991,7 @@ var authCommand = {
54837
54991
  import process29 from "node:process";
54838
54992
 
54839
54993
  // packages/cli/src/generated/git-commit.ts
54840
- var GIT_COMMIT_INFO = "aa05b4583";
54994
+ var GIT_COMMIT_INFO = "31bdf112d";
54841
54995
 
54842
54996
  // packages/cli/src/ui/utils/historyExportUtils.ts
54843
54997
  import * as fsPromises from "node:fs/promises";
@@ -60322,7 +60476,7 @@ Use /mcp auth <server-name> to authenticate.`
60322
60476
  type: "info",
60323
60477
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
60324
60478
  });
60325
- const { MCPOAuthProvider } = await import("./core-VCDK23ZC.js");
60479
+ const { MCPOAuthProvider } = await import("./core-WQSFCPEO.js");
60326
60480
  let oauthConfig = server.oauth;
60327
60481
  if (!oauthConfig) {
60328
60482
  oauthConfig = { enabled: false };
@@ -79606,6 +79760,16 @@ export {
79606
79760
  linkSkill,
79607
79761
  uninstallSkill,
79608
79762
  statusCommand,
79763
+ getSettingDefinition,
79764
+ getDialogRestartRequiredSettings,
79765
+ isRecord,
79766
+ getNestedValue,
79767
+ getEffectiveValue,
79768
+ getDialogSettingKeys,
79769
+ isInSettingsScope,
79770
+ getDisplayValue,
79771
+ parseEditedValue,
79772
+ getEditValue,
79609
79773
  ConsolePatcher,
79610
79774
  clipboardy_default,
79611
79775
  escapeAtSymbols,