@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-IMEC72NS.js";
9
+ } from "./chunk-ATGIEBEB.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-HV36F4CL.js";
62
+ } from "./chunk-H4NQBTXN.js";
62
63
  import {
63
64
  runExitCleanup
64
- } from "./chunk-WL5MCPV2.js";
65
+ } from "./chunk-LVHUYMBU.js";
65
66
  import {
66
67
  AsyncFzf,
67
68
  AuthType,
@@ -95,6 +96,7 @@ import {
95
96
  SessionStartSource,
96
97
  ShellExecutionService,
97
98
  StartSessionEvent,
99
+ TrustLevel,
98
100
  UPGRADE_URL_PAGE,
99
101
  UserAccountManager,
100
102
  ValidationRequiredError,
@@ -206,7 +208,7 @@ import {
206
208
  stripAnsi,
207
209
  tokenLimit,
208
210
  uiTelemetryService
209
- } from "./chunk-QK7UWGBN.js";
211
+ } from "./chunk-CIO3GUGQ.js";
210
212
  import {
211
213
  ApprovalMode,
212
214
  CoreEvent,
@@ -233,7 +235,7 @@ import {
233
235
  shortenPath,
234
236
  tildeifyPath,
235
237
  unescapePath
236
- } from "./chunk-VCGILCZV.js";
238
+ } from "./chunk-F73F75XM.js";
237
239
  import {
238
240
  require_src
239
241
  } from "./chunk-RJTRUG2J.js";
@@ -35177,13 +35179,7 @@ function* emitKeys(keypressHandler) {
35177
35179
  } else if (ch === " ") {
35178
35180
  name = "tab";
35179
35181
  alt = escaped;
35180
- } else if (ch === "\b") {
35181
- name = "backspace";
35182
- if (typeof process !== "undefined" && (process.env?.["OS"] === "Windows_NT" || !!process.env?.["WT_SESSION"])) {
35183
- ctrl = true;
35184
- }
35185
- alt = escaped;
35186
- } else if (ch === "\x7F") {
35182
+ } else if (ch === "\b" || ch === "\x7F") {
35187
35183
  name = "backspace";
35188
35184
  alt = escaped;
35189
35185
  } else if (ch === ESC3) {
@@ -44616,7 +44612,7 @@ var ExtensionManager = class extends ExtensionLoader {
44616
44612
  const trustedFolders = loadTrustedFolders();
44617
44613
  await trustedFolders.setValue(
44618
44614
  this.workspaceDir,
44619
- "TRUST_FOLDER" /* TRUST_FOLDER */
44615
+ TrustLevel.TRUST_FOLDER
44620
44616
  );
44621
44617
  } else {
44622
44618
  throw new Error(
@@ -45785,6 +45781,165 @@ var McpServerEnablementManager = class _McpServerEnablementManager {
45785
45781
  }
45786
45782
  };
45787
45783
 
45784
+ // packages/cli/src/utils/settingsUtils.ts
45785
+ function flattenSchema(schema, prefix = "") {
45786
+ let result = {};
45787
+ for (const key in schema) {
45788
+ const newKey = prefix ? `${prefix}.${key}` : key;
45789
+ const definition = schema[key];
45790
+ result[newKey] = { ...definition, key: newKey };
45791
+ if (definition.properties) {
45792
+ result = { ...result, ...flattenSchema(definition.properties, newKey) };
45793
+ }
45794
+ }
45795
+ return result;
45796
+ }
45797
+ var _FLATTENED_SCHEMA;
45798
+ function getFlattenedSchema() {
45799
+ return _FLATTENED_SCHEMA ?? (_FLATTENED_SCHEMA = flattenSchema(getSettingsSchema()));
45800
+ }
45801
+ function getSettingDefinition(key) {
45802
+ return getFlattenedSchema()[key];
45803
+ }
45804
+ function getDefaultValue(key) {
45805
+ return getFlattenedSchema()[key]?.default;
45806
+ }
45807
+ function getDialogRestartRequiredSettings() {
45808
+ return Object.values(getFlattenedSchema()).filter(
45809
+ (definition) => definition.requiresRestart && definition.showInDialog !== false
45810
+ ).map((definition) => definition.key);
45811
+ }
45812
+ function isRecord(value) {
45813
+ return typeof value === "object" && value !== null;
45814
+ }
45815
+ function isSettingsValue(value) {
45816
+ if (value === void 0) return true;
45817
+ if (value === null) return false;
45818
+ const type = typeof value;
45819
+ return type === "string" || type === "number" || type === "boolean" || type === "object";
45820
+ }
45821
+ function getNestedValue(obj, path37) {
45822
+ let current = obj;
45823
+ for (const key of path37) {
45824
+ if (!isRecord(current) || !(key in current)) {
45825
+ return void 0;
45826
+ }
45827
+ current = current[key];
45828
+ }
45829
+ return current;
45830
+ }
45831
+ function getEffectiveValue(key, settings) {
45832
+ const definition = getSettingDefinition(key);
45833
+ if (!definition) {
45834
+ return void 0;
45835
+ }
45836
+ const path37 = key.split(".");
45837
+ const value = getNestedValue(settings, path37);
45838
+ if (value !== void 0 && isSettingsValue(value)) {
45839
+ return value;
45840
+ }
45841
+ return definition.default;
45842
+ }
45843
+ function getDialogSettingKeys() {
45844
+ return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
45845
+ }
45846
+ function isInSettingsScope(key, scopeSettings) {
45847
+ const path37 = key.split(".");
45848
+ const value = getNestedValue(scopeSettings, path37);
45849
+ return value !== void 0;
45850
+ }
45851
+ function getDisplayValue(key, scopeSettings, _mergedSettings) {
45852
+ const definition = getSettingDefinition(key);
45853
+ const existsInScope = isInSettingsScope(key, scopeSettings);
45854
+ let value;
45855
+ if (existsInScope) {
45856
+ value = getEffectiveValue(key, scopeSettings);
45857
+ } else {
45858
+ value = getDefaultValue(key);
45859
+ }
45860
+ let valueString = String(value);
45861
+ if (definition?.type === "object" && value !== null && typeof value === "object") {
45862
+ valueString = JSON.stringify(value);
45863
+ } else if (definition?.type === "enum" && definition.options) {
45864
+ const option = definition.options?.find((option2) => option2.value === value);
45865
+ valueString = option?.label ?? `${value}`;
45866
+ }
45867
+ if (definition?.unit === "%" && typeof value === "number") {
45868
+ valueString = `${value} (${Math.round(value * 100)}%)`;
45869
+ } else if (definition?.unit) {
45870
+ valueString = `${valueString}${definition.unit}`;
45871
+ }
45872
+ if (existsInScope) {
45873
+ return `${valueString}*`;
45874
+ }
45875
+ return valueString;
45876
+ }
45877
+ function tryParseJsonStringArray(input) {
45878
+ try {
45879
+ const parsed = JSON.parse(input);
45880
+ if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) {
45881
+ return parsed;
45882
+ }
45883
+ return null;
45884
+ } catch {
45885
+ return null;
45886
+ }
45887
+ }
45888
+ function tryParseJsonObject(input) {
45889
+ try {
45890
+ const parsed = JSON.parse(input);
45891
+ if (isRecord(parsed) && !Array.isArray(parsed)) {
45892
+ return parsed;
45893
+ }
45894
+ return null;
45895
+ } catch {
45896
+ return null;
45897
+ }
45898
+ }
45899
+ function parseStringArrayValue(input) {
45900
+ const trimmed = input.trim();
45901
+ if (trimmed === "") return [];
45902
+ return tryParseJsonStringArray(trimmed) ?? input.split(",").map((p2) => p2.trim()).filter((p2) => p2.length > 0);
45903
+ }
45904
+ function parseObjectValue(input) {
45905
+ const trimmed = input.trim();
45906
+ if (trimmed === "") {
45907
+ return null;
45908
+ }
45909
+ return tryParseJsonObject(trimmed);
45910
+ }
45911
+ function parseEditedValue(type, newValue) {
45912
+ if (type === "number") {
45913
+ if (newValue.trim() === "") {
45914
+ return null;
45915
+ }
45916
+ const numParsed = Number(newValue.trim());
45917
+ if (Number.isNaN(numParsed)) {
45918
+ return null;
45919
+ }
45920
+ return numParsed;
45921
+ }
45922
+ if (type === "array") {
45923
+ return parseStringArrayValue(newValue);
45924
+ }
45925
+ if (type === "object") {
45926
+ return parseObjectValue(newValue);
45927
+ }
45928
+ return newValue;
45929
+ }
45930
+ function getEditValue(type, rawValue) {
45931
+ if (rawValue === void 0) {
45932
+ return void 0;
45933
+ }
45934
+ if (type === "array" && Array.isArray(rawValue)) {
45935
+ return rawValue.join(", ");
45936
+ }
45937
+ if (type === "object" && rawValue !== null && typeof rawValue === "object") {
45938
+ return JSON.stringify(rawValue);
45939
+ }
45940
+ return void 0;
45941
+ }
45942
+
45788
45943
  // packages/cli/src/ui/hooks/atCommandProcessor.ts
45789
45944
  import * as fs19 from "node:fs/promises";
45790
45945
  import * as path13 from "node:path";
@@ -54070,7 +54225,7 @@ var MultiFolderTrustDialog = ({
54070
54225
  if (choice === 1 /* YES_AND_REMEMBER */) {
54071
54226
  await trustedFolders.setValue(
54072
54227
  expandedPath,
54073
- "TRUST_FOLDER" /* TRUST_FOLDER */
54228
+ TrustLevel.TRUST_FOLDER
54074
54229
  );
54075
54230
  }
54076
54231
  workspaceContext.addDirectory(expandedPath);
@@ -54849,7 +55004,7 @@ var authCommand = {
54849
55004
  import process29 from "node:process";
54850
55005
 
54851
55006
  // packages/cli/src/generated/git-commit.ts
54852
- var GIT_COMMIT_INFO = "ee7e037c9";
55007
+ var GIT_COMMIT_INFO = "31bdf112d";
54853
55008
 
54854
55009
  // packages/cli/src/ui/utils/historyExportUtils.ts
54855
55010
  import * as fsPromises from "node:fs/promises";
@@ -60334,7 +60489,7 @@ Use /mcp auth <server-name> to authenticate.`
60334
60489
  type: "info",
60335
60490
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
60336
60491
  });
60337
- const { MCPOAuthProvider } = await import("./dist-UIXQETMC.js");
60492
+ const { MCPOAuthProvider } = await import("./dist-UH565MTG.js");
60338
60493
  let oauthConfig = server.oauth;
60339
60494
  if (!oauthConfig) {
60340
60495
  oauthConfig = { enabled: false };
@@ -79618,6 +79773,16 @@ export {
79618
79773
  linkSkill,
79619
79774
  uninstallSkill,
79620
79775
  statusCommand,
79776
+ getSettingDefinition,
79777
+ getDialogRestartRequiredSettings,
79778
+ isRecord,
79779
+ getNestedValue,
79780
+ getEffectiveValue,
79781
+ getDialogSettingKeys,
79782
+ isInSettingsScope,
79783
+ getDisplayValue,
79784
+ parseEditedValue,
79785
+ getEditValue,
79621
79786
  ConsolePatcher,
79622
79787
  clipboardy_default,
79623
79788
  escapeAtSymbols,