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

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-WL5MCPV2.js → chunk-35STMVQ6.js} +2 -2
  2. package/bundle/{chunk-EFCQXWIF.js → chunk-47HVBRLD.js} +3 -3
  3. package/bundle/{chunk-HV36F4CL.js → chunk-5UA5NDVP.js} +134 -354
  4. package/bundle/{chunk-IUVLJUOL.js → chunk-B4NHGUNE.js} +2 -2
  5. package/bundle/{chunk-NO7STVVM.js → chunk-EEQGWBJU.js} +1413 -1089
  6. package/bundle/{chunk-IMEC72NS.js → chunk-EJ5U5A3P.js} +1 -1
  7. package/bundle/{chunk-33ANPP4S.js → chunk-ELANWZTZ.js} +3 -3
  8. package/bundle/{chunk-3GU3LF3I.js → chunk-F2KGMQCY.js} +180 -9
  9. package/bundle/{chunk-VCGILCZV.js → chunk-F73F75XM.js} +16 -0
  10. package/bundle/{chunk-PLUWJHZZ.js → chunk-FRCZJECU.js} +237 -54
  11. package/bundle/{chunk-UBXB5AEJ.js → chunk-GDNYA45E.js} +3 -3
  12. package/bundle/{chunk-TDW6FM3A.js → chunk-KITSDDOZ.js} +1 -1
  13. package/bundle/{chunk-WHIWQCI5.js → chunk-KKO2XSBY.js} +1 -1
  14. package/bundle/{chunk-GXRQOXQF.js → chunk-KUAEOA2Q.js} +177 -7
  15. package/bundle/{chunk-4IJPDKI6.js → chunk-KVGAAOEJ.js} +146 -364
  16. package/bundle/{chunk-QK7UWGBN.js → chunk-MRSOTTBM.js} +1380 -1081
  17. package/bundle/{chunk-MUGUV6RZ.js → chunk-MUEKKRWF.js} +2 -2
  18. package/bundle/chunk-R4ZCSDPK.js +80018 -0
  19. package/bundle/chunk-RMQT572G.js +156 -0
  20. package/bundle/chunk-RVU5Q4NB.js +118 -0
  21. package/bundle/{chunk-2RHFUIH4.js → chunk-UHHRGNIO.js} +16 -0
  22. package/bundle/chunk-UX5CFZ75.js +17505 -0
  23. package/bundle/{chunk-RM43GNQQ.js → chunk-UZ5SUJO4.js} +7709 -12907
  24. package/bundle/chunk-VQVLJLWD.js +1571 -0
  25. package/bundle/{chunk-NIVCRM5L.js → chunk-VUHGADMU.js} +134 -354
  26. package/bundle/chunk-YCTQOSY2.js +351149 -0
  27. package/bundle/{cleanup-A7WXWAMI.js → cleanup-BWZ7GONS.js} +3 -3
  28. package/bundle/{cleanup-EWPIME2M.js → cleanup-F6XR3KDW.js} +3 -3
  29. package/bundle/{cleanup-IPLJJT5S.js → cleanup-PS3UGKWX.js} +3 -3
  30. package/bundle/cleanup-VV6AV4T2.js +33 -0
  31. package/bundle/{core-VCDK23ZC.js → core-NDKZ44LE.js} +28 -2
  32. package/bundle/{devtoolsService-B5VVZ752.js → devtoolsService-DNFLMYOX.js} +3 -3
  33. package/bundle/{devtoolsService-2JXSALRU.js → devtoolsService-F6QBRWPB.js} +5 -4
  34. package/bundle/{devtoolsService-6Y6YER6T.js → devtoolsService-XGIYIDBD.js} +3 -3
  35. package/bundle/devtoolsService-YD6JSR34.js +852 -0
  36. package/bundle/{dist-UIXQETMC.js → dist-54TUMSKA.js} +28 -2
  37. package/bundle/{core-BQT6T3CH.js → dist-6KUUELBS.js} +28 -2
  38. package/bundle/dist-QHCXV4N4.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-HLGERR6W.js} +65 -21
  43. package/bundle/{gemini-54LH6RUH.js → gemini-IRPF2U4N.js} +241 -182
  44. package/bundle/gemini-QZM4UKD6.js +16087 -0
  45. package/bundle/{gemini-44W2QEZI.js → gemini-TU6PHHWE.js} +63 -20
  46. package/bundle/gemini.js +3 -3
  47. package/bundle/{interactiveCli-5MTJDFYC.js → interactiveCli-374EDFUA.js} +17 -167
  48. package/bundle/{interactiveCli-JFBPGMNM.js → interactiveCli-EKTBCA5F.js} +30 -179
  49. package/bundle/{interactiveCli-5B3X6RNB.js → interactiveCli-GRSDCSR3.js} +300 -432
  50. package/bundle/interactiveCli-HN4DKCW5.js +34448 -0
  51. package/bundle/{liteRtServerManager-76V63PRJ.js → liteRtServerManager-46V57ROR.js} +4 -4
  52. package/bundle/{liteRtServerManager-WQMDPACQ.js → liteRtServerManager-E34UIEBJ.js} +4 -4
  53. package/bundle/{liteRtServerManager-6GJWEP5W.js → liteRtServerManager-EAWDC35K.js} +4 -4
  54. package/bundle/liteRtServerManager-HTDKEOQC.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-JCKLNKRV.js → oauth2-provider-N7Q7FNNA.js} +2 -2
  59. package/bundle/{oauth2-provider-EX6SQEZP.js → oauth2-provider-TW3RXTUS.js} +2 -2
  60. package/bundle/{oauth2-provider-ZF52AWQY.js → oauth2-provider-UQIDMKYA.js} +39 -73
  61. package/bundle/oauth2-provider-WTRWHBI2.js +237 -0
  62. package/bundle/{start-CYDJTOAP.js → start-4D5PYHGK.js} +6 -6
  63. package/bundle/{start-SHOUHW3Y.js → start-7DJXXKMH.js} +6 -6
  64. package/bundle/{start-B6EMQCH5.js → start-ERRBQVDH.js} +6 -6
  65. package/bundle/start-TKRKH572.js +18 -0
  66. package/package.json +1 -1
@@ -70,8 +70,15 @@ import {
70
70
  formatDuration,
71
71
  formatResetTime,
72
72
  getBoundingBox,
73
+ getDialogRestartRequiredSettings,
74
+ getDialogSettingKeys,
75
+ getDisplayValue,
76
+ getEditValue,
77
+ getEffectiveValue,
73
78
  getFileExtension,
74
79
  getFormattedSettingValue,
80
+ getNestedValue,
81
+ getSettingDefinition,
75
82
  getStatusColor,
76
83
  getTransformUnderCursor,
77
84
  getUsedStatusColor,
@@ -83,8 +90,10 @@ import {
83
90
  isBrowser,
84
91
  isContextUsageHigh,
85
92
  isDevelopment,
93
+ isInSettingsScope,
86
94
  isNarrowWidth,
87
95
  isNewFile,
96
+ isRecord,
88
97
  isSlashCommand,
89
98
  isUltraTier,
90
99
  loadKeyMatchers,
@@ -93,6 +102,7 @@ import {
93
102
  openFileInEditor,
94
103
  parseColor,
95
104
  parseDiffWithLineNumbers,
105
+ parseEditedValue,
96
106
  parseSlashCommand,
97
107
  persistentState,
98
108
  profiler,
@@ -144,13 +154,13 @@ import {
144
154
  widestLineFromStyledChars,
145
155
  wordBreakStyledChars,
146
156
  wrapStyledChars
147
- } from "./chunk-3GU3LF3I.js";
157
+ } from "./chunk-FRCZJECU.js";
148
158
  import {
149
159
  appEvents
150
160
  } from "./chunk-5PS3AYFU.js";
151
161
  import {
152
162
  require_source
153
- } from "./chunk-IMEC72NS.js";
163
+ } from "./chunk-VQVLJLWD.js";
154
164
  import {
155
165
  ACTIVE_SHELL_MAX_LINES,
156
166
  COMPACT_TOOL_SUBVIEW_MAX_LINES,
@@ -188,7 +198,6 @@ import {
188
198
  getCachedStringWidth,
189
199
  getLuminance,
190
200
  getSessionFiles,
191
- getSettingsSchema,
192
201
  interpolateColor,
193
202
  isLoadableSettingScope,
194
203
  isTodoList,
@@ -204,13 +213,13 @@ import {
204
213
  stringWidth,
205
214
  stripUnsafeCharacters,
206
215
  toCodePoints
207
- } from "./chunk-HV36F4CL.js";
216
+ } from "./chunk-KVGAAOEJ.js";
208
217
  import {
209
218
  registerCleanup,
210
219
  removeCleanup,
211
220
  runExitCleanup,
212
221
  setupTtyCheck
213
- } from "./chunk-WL5MCPV2.js";
222
+ } from "./chunk-RMQT572G.js";
214
223
  import {
215
224
  ApiKeyUpdatedEvent,
216
225
  AsyncFzf,
@@ -250,6 +259,7 @@ import {
250
259
  ShellExecutionService,
251
260
  SlashCommandStatus,
252
261
  TerminalQuotaError,
262
+ TrustLevel,
253
263
  UserAccountManager,
254
264
  UserPromptEvent,
255
265
  UserTierId,
@@ -337,7 +347,7 @@ import {
337
347
  validatePlanContent,
338
348
  validatePlanPath,
339
349
  writeToStdout
340
- } from "./chunk-QK7UWGBN.js";
350
+ } from "./chunk-YCTQOSY2.js";
341
351
  import {
342
352
  ACTIVATE_SKILL_TOOL_NAME,
343
353
  AGENT_TOOL_NAME,
@@ -402,7 +412,7 @@ import {
402
412
  safeJsonToMarkdown,
403
413
  shortenPath,
404
414
  tildeifyPath
405
- } from "./chunk-VCGILCZV.js";
415
+ } from "./chunk-F73F75XM.js";
406
416
  import "./chunk-664ZODQF.js";
407
417
  import "./chunk-RJTRUG2J.js";
408
418
  import "./chunk-IUUIT4SU.js";
@@ -6717,7 +6727,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6717
6727
  settings.merged,
6718
6728
  process3.cwd()
6719
6729
  );
6720
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6730
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6721
6731
  return {
6722
6732
  currentTrustLevel: explicitTrustLevel,
6723
6733
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6762,7 +6772,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6762
6772
  process3.cwd(),
6763
6773
  newConfig
6764
6774
  );
6765
- if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6775
+ if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6766
6776
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6767
6777
  if (source === "file") {
6768
6778
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6836,18 +6846,18 @@ function PermissionsModifyTrustDialog({
6836
6846
  const TRUST_LEVEL_ITEMS = [
6837
6847
  {
6838
6848
  label: `Trust this folder (${dirName})`,
6839
- value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6840
- key: "TRUST_FOLDER" /* TRUST_FOLDER */
6849
+ value: TrustLevel.TRUST_FOLDER,
6850
+ key: TrustLevel.TRUST_FOLDER
6841
6851
  },
6842
6852
  {
6843
6853
  label: `Trust parent folder (${parentFolder})`,
6844
- value: "TRUST_PARENT" /* TRUST_PARENT */,
6845
- key: "TRUST_PARENT" /* TRUST_PARENT */
6854
+ value: TrustLevel.TRUST_PARENT,
6855
+ key: TrustLevel.TRUST_PARENT
6846
6856
  },
6847
6857
  {
6848
6858
  label: "Don't trust",
6849
- value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6850
- key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6859
+ value: TrustLevel.DO_NOT_TRUST,
6860
+ key: TrustLevel.DO_NOT_TRUST
6851
6861
  }
6852
6862
  ];
6853
6863
  const {
@@ -13531,165 +13541,6 @@ var ConsentPrompt = (props) => {
13531
13541
  // packages/cli/src/ui/components/ThemeDialog.tsx
13532
13542
  var import_react47 = __toESM(require_react(), 1);
13533
13543
 
13534
- // packages/cli/src/utils/settingsUtils.ts
13535
- function flattenSchema(schema, prefix = "") {
13536
- let result = {};
13537
- for (const key in schema) {
13538
- const newKey = prefix ? `${prefix}.${key}` : key;
13539
- const definition = schema[key];
13540
- result[newKey] = { ...definition, key: newKey };
13541
- if (definition.properties) {
13542
- result = { ...result, ...flattenSchema(definition.properties, newKey) };
13543
- }
13544
- }
13545
- return result;
13546
- }
13547
- var _FLATTENED_SCHEMA;
13548
- function getFlattenedSchema() {
13549
- return _FLATTENED_SCHEMA ?? (_FLATTENED_SCHEMA = flattenSchema(getSettingsSchema()));
13550
- }
13551
- function getSettingDefinition(key) {
13552
- return getFlattenedSchema()[key];
13553
- }
13554
- function getDefaultValue(key) {
13555
- return getFlattenedSchema()[key]?.default;
13556
- }
13557
- function getDialogRestartRequiredSettings() {
13558
- return Object.values(getFlattenedSchema()).filter(
13559
- (definition) => definition.requiresRestart && definition.showInDialog !== false
13560
- ).map((definition) => definition.key);
13561
- }
13562
- function isRecord(value) {
13563
- return typeof value === "object" && value !== null;
13564
- }
13565
- function isSettingsValue(value) {
13566
- if (value === void 0) return true;
13567
- if (value === null) return false;
13568
- const type = typeof value;
13569
- return type === "string" || type === "number" || type === "boolean" || type === "object";
13570
- }
13571
- function getNestedValue(obj, path15) {
13572
- let current = obj;
13573
- for (const key of path15) {
13574
- if (!isRecord(current) || !(key in current)) {
13575
- return void 0;
13576
- }
13577
- current = current[key];
13578
- }
13579
- return current;
13580
- }
13581
- function getEffectiveValue(key, settings) {
13582
- const definition = getSettingDefinition(key);
13583
- if (!definition) {
13584
- return void 0;
13585
- }
13586
- const path15 = key.split(".");
13587
- const value = getNestedValue(settings, path15);
13588
- if (value !== void 0 && isSettingsValue(value)) {
13589
- return value;
13590
- }
13591
- return definition.default;
13592
- }
13593
- function getDialogSettingKeys() {
13594
- return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
13595
- }
13596
- function isInSettingsScope(key, scopeSettings) {
13597
- const path15 = key.split(".");
13598
- const value = getNestedValue(scopeSettings, path15);
13599
- return value !== void 0;
13600
- }
13601
- function getDisplayValue(key, scopeSettings, _mergedSettings) {
13602
- const definition = getSettingDefinition(key);
13603
- const existsInScope = isInSettingsScope(key, scopeSettings);
13604
- let value;
13605
- if (existsInScope) {
13606
- value = getEffectiveValue(key, scopeSettings);
13607
- } else {
13608
- value = getDefaultValue(key);
13609
- }
13610
- let valueString = String(value);
13611
- if (definition?.type === "object" && value !== null && typeof value === "object") {
13612
- valueString = JSON.stringify(value);
13613
- } else if (definition?.type === "enum" && definition.options) {
13614
- const option = definition.options?.find((option2) => option2.value === value);
13615
- valueString = option?.label ?? `${value}`;
13616
- }
13617
- if (definition?.unit === "%" && typeof value === "number") {
13618
- valueString = `${value} (${Math.round(value * 100)}%)`;
13619
- } else if (definition?.unit) {
13620
- valueString = `${valueString}${definition.unit}`;
13621
- }
13622
- if (existsInScope) {
13623
- return `${valueString}*`;
13624
- }
13625
- return valueString;
13626
- }
13627
- function tryParseJsonStringArray(input) {
13628
- try {
13629
- const parsed = JSON.parse(input);
13630
- if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) {
13631
- return parsed;
13632
- }
13633
- return null;
13634
- } catch {
13635
- return null;
13636
- }
13637
- }
13638
- function tryParseJsonObject(input) {
13639
- try {
13640
- const parsed = JSON.parse(input);
13641
- if (isRecord(parsed) && !Array.isArray(parsed)) {
13642
- return parsed;
13643
- }
13644
- return null;
13645
- } catch {
13646
- return null;
13647
- }
13648
- }
13649
- function parseStringArrayValue(input) {
13650
- const trimmed = input.trim();
13651
- if (trimmed === "") return [];
13652
- return tryParseJsonStringArray(trimmed) ?? input.split(",").map((p) => p.trim()).filter((p) => p.length > 0);
13653
- }
13654
- function parseObjectValue(input) {
13655
- const trimmed = input.trim();
13656
- if (trimmed === "") {
13657
- return null;
13658
- }
13659
- return tryParseJsonObject(trimmed);
13660
- }
13661
- function parseEditedValue(type, newValue) {
13662
- if (type === "number") {
13663
- if (newValue.trim() === "") {
13664
- return null;
13665
- }
13666
- const numParsed = Number(newValue.trim());
13667
- if (Number.isNaN(numParsed)) {
13668
- return null;
13669
- }
13670
- return numParsed;
13671
- }
13672
- if (type === "array") {
13673
- return parseStringArrayValue(newValue);
13674
- }
13675
- if (type === "object") {
13676
- return parseObjectValue(newValue);
13677
- }
13678
- return newValue;
13679
- }
13680
- function getEditValue(type, rawValue) {
13681
- if (rawValue === void 0) {
13682
- return void 0;
13683
- }
13684
- if (type === "array" && Array.isArray(rawValue)) {
13685
- return rawValue.join(", ");
13686
- }
13687
- if (type === "object" && rawValue !== null && typeof rawValue === "object") {
13688
- return JSON.stringify(rawValue);
13689
- }
13690
- return void 0;
13691
- }
13692
-
13693
13544
  // packages/cli/src/utils/dialogScopeUtils.ts
13694
13545
  var SCOPE_LABELS = {
13695
13546
  ["User" /* User */]: "User Settings",
@@ -30098,9 +29949,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30098
29949
  const handleFolderTrustSelect = (0, import_react108.useCallback)(
30099
29950
  async (choice) => {
30100
29951
  const trustLevelMap = {
30101
- ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30102
- ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30103
- ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
29952
+ ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
29953
+ ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
29954
+ ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30104
29955
  };
30105
29956
  const trustLevel = trustLevelMap[choice];
30106
29957
  if (!trustLevel) return;
@@ -30119,7 +29970,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30119
29970
  }, 100);
30120
29971
  return;
30121
29972
  }
30122
- const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
29973
+ const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30123
29974
  onTrustChange(currentIsTrusted);
30124
29975
  setIsTrusted(currentIsTrusted);
30125
29976
  const wasTrusted = isTrusted ?? false;
@@ -33607,7 +33458,7 @@ ${queuedText}` : queuedText;
33607
33458
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33608
33459
  if (settings.merged.general.devtools) {
33609
33460
  void (async () => {
33610
- const { toggleDevToolsPanel } = await import("./devtoolsService-B5VVZ752.js");
33461
+ const { toggleDevToolsPanel } = await import("./devtoolsService-F6QBRWPB.js");
33611
33462
  await toggleDevToolsPanel(
33612
33463
  config,
33613
33464
  showErrorDetails,