@mmmbuto/gemini-cli-termux 0.42.0-termux → 0.46.0-termux

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 (79) hide show
  1. package/README.md +22 -2
  2. package/bundle/builtin/antigravity-support/SKILL.md +58 -0
  3. package/bundle/{chunk-BF6DCDLJ.js → chunk-4TSWR3AN.js} +145 -55
  4. package/bundle/{chunk-PL5MCDGY.js → chunk-6HI7VNOG.js} +55 -70
  5. package/bundle/{chunk-6PXDEURC.js → chunk-7QZTHDKK.js} +2 -4
  6. package/bundle/{chunk-ORXUJRZC.js → chunk-B7I47N5E.js} +3 -3
  7. package/bundle/{chunk-EHTAR2YP.js → chunk-G2G6HEZZ.js} +1 -1
  8. package/bundle/{chunk-LX6GOGBA.js → chunk-IB4Q6NBY.js} +123186 -73766
  9. package/bundle/{chunk-MP2YMAMR.js → chunk-IT3YFQ3I.js} +1 -1
  10. package/bundle/{chunk-RJTRUG2J.js → chunk-TUDYL3X4.js} +29 -5
  11. package/bundle/{chunk-A6KCGXPK.js → chunk-WUVOS6TV.js} +13 -6
  12. package/bundle/{chunk-SLMD2AMF.js → chunk-YGU42N5I.js} +847 -655
  13. package/bundle/{cleanup-RTDYF5DD.js → cleanup-GEP2OOHM.js} +4 -5
  14. package/bundle/{devtools-ZLHMA45S.js → devtools-V7NE4CQA.js} +1 -1
  15. package/bundle/{devtoolsService-SKRXJOXW.js → devtoolsService-EVM2JJLB.js} +5 -6
  16. package/bundle/{dist-B3HBIK36.js → dist-R3LOFA4X.js} +331 -285
  17. package/bundle/docs/changelogs/index.md +59 -0
  18. package/bundle/docs/changelogs/latest.md +201 -167
  19. package/bundle/docs/changelogs/preview.md +45 -102
  20. package/bundle/docs/cli/auto-memory.md +61 -40
  21. package/bundle/docs/cli/gemini-md.md +0 -2
  22. package/bundle/docs/cli/plan-mode.md +0 -1
  23. package/bundle/docs/cli/settings.md +19 -19
  24. package/bundle/docs/cli/tutorials/memory-management.md +3 -3
  25. package/bundle/docs/extensions/reference.md +16 -0
  26. package/bundle/docs/extensions/releasing.md +58 -24
  27. package/bundle/docs/extensions/writing-extensions.md +7 -0
  28. package/bundle/docs/get-started/installation.mdx +2 -2
  29. package/bundle/docs/issue-and-pr-automation.md +29 -1
  30. package/bundle/docs/reference/commands.md +0 -3
  31. package/bundle/docs/reference/configuration.md +173 -78
  32. package/bundle/docs/reference/keyboard-shortcuts.md +23 -0
  33. package/bundle/docs/reference/tools.md +0 -2
  34. package/bundle/docs/tools/mcp-server.md +24 -3
  35. package/bundle/docs/tools/memory.md +10 -13
  36. package/bundle/examples/custom-commands/commands/fs/grep-code.toml +6 -0
  37. package/bundle/examples/custom-commands/gemini-extension.json +4 -0
  38. package/bundle/examples/exclude-tools/gemini-extension.json +5 -0
  39. package/bundle/examples/hooks/gemini-extension.json +4 -0
  40. package/bundle/examples/hooks/hooks/hooks.json +14 -0
  41. package/bundle/examples/hooks/scripts/on-start.js +8 -0
  42. package/bundle/examples/mcp-server/README.md +35 -0
  43. package/bundle/examples/mcp-server/example.js +60 -0
  44. package/bundle/examples/mcp-server/gemini-extension.json +11 -0
  45. package/bundle/examples/mcp-server/package.json +11 -0
  46. package/bundle/examples/policies/README.md +41 -0
  47. package/bundle/examples/policies/gemini-extension.json +5 -0
  48. package/bundle/examples/policies/policies/policies.toml +28 -0
  49. package/bundle/examples/skills/gemini-extension.json +4 -0
  50. package/bundle/examples/skills/skills/greeter/SKILL.md +7 -0
  51. package/bundle/examples/themes-example/README.md +31 -0
  52. package/bundle/examples/themes-example/gemini-extension.json +29 -0
  53. package/bundle/{gemini-NJWIVDFH.js → gemini-SGAFQX2R.js} +450 -297
  54. package/bundle/gemini.js +18 -13
  55. package/bundle/{dist-T73EYRDX.js → https-proxy-agent-AVGR4LHR.js} +8 -3
  56. package/bundle/{interactiveCli-QHKQZZJU.js → interactiveCli-MEEXSI2X.js} +1922 -1675
  57. package/bundle/{liteRtServerManager-USDJEPCM.js → liteRtServerManager-3EZO3JZ5.js} +6 -7
  58. package/bundle/{oauth2-provider-ARATJNEE.js → oauth2-provider-AJMTKEL6.js} +8 -10
  59. package/bundle/package.json +1 -1
  60. package/bundle/policies/plan.toml +1 -1
  61. package/bundle/policies/write.toml +0 -7
  62. package/bundle/src-LG4OHBW7.js +343 -0
  63. package/bundle/{start-IWR7MCIR.js → start-YW7YIVR7.js} +8 -9
  64. package/bundle/worker/worker-entry.js +7863 -0
  65. package/package.json +3 -3
  66. package/bundle/chunk-2X6HJV2G.js +0 -52710
  67. package/bundle/memoryDiscovery-EEGUKQ5C.js +0 -29
  68. package/bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js +0 -96
  69. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.d.ts +0 -7
  70. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js +0 -9
  71. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js.map +0 -1
  72. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.d.ts +0 -48
  73. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js +0 -333
  74. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js.map +0 -1
  75. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.d.ts +0 -36
  76. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js +0 -7
  77. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js.map +0 -1
  78. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +0 -33
  79. package/bundle/policies/memory-manager.toml +0 -20
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  exitCli,
8
8
  require_source
9
- } from "./chunk-EHTAR2YP.js";
9
+ } from "./chunk-G2G6HEZZ.js";
10
10
  import {
11
11
  DEFAULT_BACKGROUND_OPACITY,
12
12
  DEFAULT_BORDER_OPACITY,
@@ -19,6 +19,7 @@ import {
19
19
  GEMMA_MODEL_NAME,
20
20
  LRU_BUFFER_PERF_CACHE_LIMIT,
21
21
  MIN_TERMINAL_WIDTH_FOR_FULL_LABEL,
22
+ SessionSelector,
22
23
  Theme,
23
24
  convertSessionToHistoryFormats,
24
25
  cpIndexToOffset,
@@ -57,19 +58,23 @@ import {
57
58
  stripUnsafeCharacters,
58
59
  toCodePoints,
59
60
  validateCustomTheme
60
- } from "./chunk-BF6DCDLJ.js";
61
+ } from "./chunk-4TSWR3AN.js";
61
62
  import {
62
63
  isDevelopment
63
- } from "./chunk-A6KCGXPK.js";
64
+ } from "./chunk-WUVOS6TV.js";
64
65
  import {
65
66
  emptyIcon,
66
67
  require_react
67
- } from "./chunk-MP2YMAMR.js";
68
+ } from "./chunk-IT3YFQ3I.js";
68
69
  import {
70
+ ALL_EDITORS,
71
+ ApprovalMode,
69
72
  AsyncFzf,
70
73
  AuthType,
71
74
  Config,
75
+ CoreEvent,
72
76
  CoreToolCallStatus,
77
+ DiscoveredMCPTool,
73
78
  ExtensionDisableEvent,
74
79
  ExtensionEnableEvent,
75
80
  ExtensionInstallEvent,
@@ -78,6 +83,7 @@ import {
78
83
  ExtensionUninstallEvent,
79
84
  ExtensionUpdateEvent,
80
85
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
86
+ GEMINI_DIR,
81
87
  HookType,
82
88
  IDEConnectionStatus,
83
89
  INITIAL_HISTORY_LENGTH,
@@ -91,28 +97,35 @@ import {
91
97
  MCPOAuthTokenStorage,
92
98
  MCPServerStatus,
93
99
  ModelSlashCommandEvent,
100
+ PolicyDecision,
94
101
  ProjectIdRequiredError,
102
+ REFERENCE_CONTENT_END,
103
+ REFERENCE_CONTENT_START,
95
104
  ReadManyFilesTool,
96
105
  RewindEvent,
97
106
  SessionEndReason,
98
107
  SessionStartSource,
99
108
  ShellExecutionService,
100
109
  StartSessionEvent,
110
+ Storage,
101
111
  TrustLevel,
102
112
  UPGRADE_URL_PAGE,
103
113
  UserAccountManager,
104
114
  ValidationRequiredError,
105
- addMemory,
106
115
  appendToLastTextPart,
107
116
  applyAdminAllowlist,
108
117
  applyInboxMemoryPatch,
109
118
  applyInboxPatch,
119
+ applyPatch,
110
120
  assumeExhaustive,
111
121
  checkExhaustive,
112
122
  clearCachedCredentialFile,
113
123
  computeModelAddedAndRemovedLines,
114
124
  convertSessionToClientHistory,
115
125
  convertToRestPayload,
126
+ coreEvents,
127
+ createPatch,
128
+ debugLogger,
116
129
  decodeTagName,
117
130
  disableBracketedPasteMode,
118
131
  disableKittyKeyboardProtocol,
@@ -124,9 +137,11 @@ import {
124
137
  enableBracketedPasteMode,
125
138
  enableKittyKeyboardProtocol,
126
139
  enableModifyOtherKeys,
140
+ escapePath,
127
141
  escapeShellArg,
128
142
  execa,
129
143
  execaSync,
144
+ external_exports,
130
145
  fetchWithTimeout,
131
146
  fileExists,
132
147
  flatMapTextParts,
@@ -134,7 +149,11 @@ import {
134
149
  formatCheckpointDisplayList,
135
150
  getAdminBlockedMcpServersMessage,
136
151
  getAdminErrorMessage,
152
+ getDisplayString,
137
153
  getEditorCommand,
154
+ getEditorExtraArgs,
155
+ getEditorWaitFlag,
156
+ getErrorMessage,
138
157
  getFileDiffFromResultDisplay,
139
158
  getG1CreditBalance,
140
159
  getIdeInstaller,
@@ -147,16 +166,21 @@ import {
147
166
  getTruncatedCheckpointNames,
148
167
  getVersion,
149
168
  glob,
169
+ homedir,
150
170
  ideContextStore,
151
171
  import_fixed_deque,
152
172
  import_lru_cache,
153
173
  import_lru_map_with_delete,
154
174
  import_multi_map,
175
+ isAccountSuspendedError,
155
176
  isGuiEditor,
156
177
  isNightly,
178
+ isNodeError,
157
179
  isPrivateIp,
158
180
  isProjectSkillPatchTarget,
181
+ isSubpath,
159
182
  isTerminalEditor,
183
+ isValidEditorType,
160
184
  is_wsl_default,
161
185
  listExtensions,
162
186
  listInboxMemoryPatches,
@@ -164,6 +188,7 @@ import {
164
188
  listInboxSkills,
165
189
  listMemoryFiles,
166
190
  loadAgentsFromDirectory,
191
+ loadApiKey,
167
192
  loadConversationRecord,
168
193
  loadExtensionPolicies,
169
194
  loadSkillsFromDir,
@@ -203,6 +228,10 @@ import {
203
228
  require_undici,
204
229
  require_valid,
205
230
  resetBrowserSession,
231
+ resolveAtCommandPath,
232
+ resolveEditorTypeFromCommand,
233
+ resolveToRealPath,
234
+ shortenPath,
206
235
  shouldLaunchBrowser,
207
236
  showMemory,
208
237
  simpleGit,
@@ -210,39 +239,14 @@ import {
210
239
  startMemoryService,
211
240
  startupProfiler,
212
241
  stripAnsi,
213
- tokenLimit,
214
- uiTelemetryService
215
- } from "./chunk-LX6GOGBA.js";
216
- import {
217
- ApprovalMode,
218
- CoreEvent,
219
- DiscoveredMCPTool,
220
- GEMINI_DIR,
221
- PolicyDecision,
222
- REFERENCE_CONTENT_END,
223
- REFERENCE_CONTENT_START,
224
- Storage,
225
- applyPatch,
226
- coreEvents,
227
- createPatch,
228
- debugLogger,
229
- escapePath,
230
- external_exports,
231
- getDisplayString,
232
- getErrorMessage,
233
- homedir,
234
- isAccountSuspendedError,
235
- isNodeError,
236
- isSubpath,
237
- refreshServerHierarchicalMemory,
238
- resolveToRealPath,
239
- shortenPath,
240
242
  tildeifyPath,
243
+ tokenLimit,
244
+ uiTelemetryService,
241
245
  unescapePath
242
- } from "./chunk-2X6HJV2G.js";
246
+ } from "./chunk-IB4Q6NBY.js";
243
247
  import {
244
248
  require_src
245
- } from "./chunk-RJTRUG2J.js";
249
+ } from "./chunk-TUDYL3X4.js";
246
250
  import {
247
251
  __commonJS,
248
252
  __export,
@@ -290,11 +294,11 @@ var require_signals = __commonJS({
290
294
  // node_modules/ink/node_modules/signal-exit/index.js
291
295
  var require_signal_exit = __commonJS({
292
296
  "node_modules/ink/node_modules/signal-exit/index.js"(exports, module) {
293
- var process35 = global.process;
294
- var processOk = function(process36) {
295
- return process36 && typeof process36 === "object" && typeof process36.removeListener === "function" && typeof process36.emit === "function" && typeof process36.reallyExit === "function" && typeof process36.listeners === "function" && typeof process36.kill === "function" && typeof process36.pid === "number" && typeof process36.on === "function";
297
+ var process36 = global.process;
298
+ var processOk = function(process37) {
299
+ return process37 && typeof process37 === "object" && typeof process37.removeListener === "function" && typeof process37.emit === "function" && typeof process37.reallyExit === "function" && typeof process37.listeners === "function" && typeof process37.kill === "function" && typeof process37.pid === "number" && typeof process37.on === "function";
296
300
  };
297
- if (!processOk(process35)) {
301
+ if (!processOk(process36)) {
298
302
  module.exports = function() {
299
303
  return function() {
300
304
  };
@@ -302,15 +306,15 @@ var require_signal_exit = __commonJS({
302
306
  } else {
303
307
  assert = __require("assert");
304
308
  signals = require_signals();
305
- isWin = /^win/i.test(process35.platform);
309
+ isWin = /^win/i.test(process36.platform);
306
310
  EE = __require("events");
307
311
  if (typeof EE !== "function") {
308
312
  EE = EE.EventEmitter;
309
313
  }
310
- if (process35.__signal_exit_emitter__) {
311
- emitter = process35.__signal_exit_emitter__;
314
+ if (process36.__signal_exit_emitter__) {
315
+ emitter = process36.__signal_exit_emitter__;
312
316
  } else {
313
- emitter = process35.__signal_exit_emitter__ = new EE();
317
+ emitter = process36.__signal_exit_emitter__ = new EE();
314
318
  emitter.count = 0;
315
319
  emitter.emitted = {};
316
320
  }
@@ -347,12 +351,12 @@ var require_signal_exit = __commonJS({
347
351
  loaded = false;
348
352
  signals.forEach(function(sig) {
349
353
  try {
350
- process35.removeListener(sig, sigListeners[sig]);
354
+ process36.removeListener(sig, sigListeners[sig]);
351
355
  } catch (er2) {
352
356
  }
353
357
  });
354
- process35.emit = originalProcessEmit;
355
- process35.reallyExit = originalProcessReallyExit;
358
+ process36.emit = originalProcessEmit;
359
+ process36.reallyExit = originalProcessReallyExit;
356
360
  emitter.count -= 1;
357
361
  };
358
362
  module.exports.unload = unload;
@@ -369,7 +373,7 @@ var require_signal_exit = __commonJS({
369
373
  if (!processOk(global.process)) {
370
374
  return;
371
375
  }
372
- var listeners = process35.listeners(sig);
376
+ var listeners = process36.listeners(sig);
373
377
  if (listeners.length === emitter.count) {
374
378
  unload();
375
379
  emit("exit", null, sig);
@@ -377,7 +381,7 @@ var require_signal_exit = __commonJS({
377
381
  if (isWin && sig === "SIGHUP") {
378
382
  sig = "SIGINT";
379
383
  }
380
- process35.kill(process35.pid, sig);
384
+ process36.kill(process36.pid, sig);
381
385
  }
382
386
  };
383
387
  });
@@ -393,36 +397,36 @@ var require_signal_exit = __commonJS({
393
397
  emitter.count += 1;
394
398
  signals = signals.filter(function(sig) {
395
399
  try {
396
- process35.on(sig, sigListeners[sig]);
400
+ process36.on(sig, sigListeners[sig]);
397
401
  return true;
398
402
  } catch (er2) {
399
403
  return false;
400
404
  }
401
405
  });
402
- process35.emit = processEmit;
403
- process35.reallyExit = processReallyExit;
406
+ process36.emit = processEmit;
407
+ process36.reallyExit = processReallyExit;
404
408
  };
405
409
  module.exports.load = load;
406
- originalProcessReallyExit = process35.reallyExit;
410
+ originalProcessReallyExit = process36.reallyExit;
407
411
  processReallyExit = function processReallyExit2(code) {
408
412
  if (!processOk(global.process)) {
409
413
  return;
410
414
  }
411
- process35.exitCode = code || /* istanbul ignore next */
415
+ process36.exitCode = code || /* istanbul ignore next */
412
416
  0;
413
- emit("exit", process35.exitCode, null);
414
- emit("afterexit", process35.exitCode, null);
415
- originalProcessReallyExit.call(process35, process35.exitCode);
417
+ emit("exit", process36.exitCode, null);
418
+ emit("afterexit", process36.exitCode, null);
419
+ originalProcessReallyExit.call(process36, process36.exitCode);
416
420
  };
417
- originalProcessEmit = process35.emit;
421
+ originalProcessEmit = process36.emit;
418
422
  processEmit = function processEmit2(ev, arg) {
419
423
  if (ev === "exit" && processOk(global.process)) {
420
424
  if (arg !== void 0) {
421
- process35.exitCode = arg;
425
+ process36.exitCode = arg;
422
426
  }
423
427
  var ret = originalProcessEmit.apply(this, arguments);
424
- emit("exit", process35.exitCode, null);
425
- emit("afterexit", process35.exitCode, null);
428
+ emit("exit", process36.exitCode, null);
429
+ emit("afterexit", process36.exitCode, null);
426
430
  return ret;
427
431
  } else {
428
432
  return originalProcessEmit.apply(this, arguments);
@@ -1742,8 +1746,8 @@ var require_react_reconciler_production = __commonJS({
1742
1746
  currentEntangledActionThenable = {
1743
1747
  status: "pending",
1744
1748
  value: void 0,
1745
- then: function(resolve8) {
1746
- entangledListeners.push(resolve8);
1749
+ then: function(resolve9) {
1750
+ entangledListeners.push(resolve9);
1747
1751
  }
1748
1752
  };
1749
1753
  }
@@ -1766,8 +1770,8 @@ var require_react_reconciler_production = __commonJS({
1766
1770
  status: "pending",
1767
1771
  value: null,
1768
1772
  reason: null,
1769
- then: function(resolve8) {
1770
- listeners.push(resolve8);
1773
+ then: function(resolve9) {
1774
+ listeners.push(resolve9);
1771
1775
  }
1772
1776
  };
1773
1777
  thenable.then(
@@ -8803,11 +8807,11 @@ var require_signals2 = __commonJS({
8803
8807
  // node_modules/restore-cursor/node_modules/signal-exit/index.js
8804
8808
  var require_signal_exit2 = __commonJS({
8805
8809
  "node_modules/restore-cursor/node_modules/signal-exit/index.js"(exports, module) {
8806
- var process35 = global.process;
8807
- var processOk = function(process36) {
8808
- return process36 && typeof process36 === "object" && typeof process36.removeListener === "function" && typeof process36.emit === "function" && typeof process36.reallyExit === "function" && typeof process36.listeners === "function" && typeof process36.kill === "function" && typeof process36.pid === "number" && typeof process36.on === "function";
8810
+ var process36 = global.process;
8811
+ var processOk = function(process37) {
8812
+ return process37 && typeof process37 === "object" && typeof process37.removeListener === "function" && typeof process37.emit === "function" && typeof process37.reallyExit === "function" && typeof process37.listeners === "function" && typeof process37.kill === "function" && typeof process37.pid === "number" && typeof process37.on === "function";
8809
8813
  };
8810
- if (!processOk(process35)) {
8814
+ if (!processOk(process36)) {
8811
8815
  module.exports = function() {
8812
8816
  return function() {
8813
8817
  };
@@ -8815,15 +8819,15 @@ var require_signal_exit2 = __commonJS({
8815
8819
  } else {
8816
8820
  assert = __require("assert");
8817
8821
  signals = require_signals2();
8818
- isWin = /^win/i.test(process35.platform);
8822
+ isWin = /^win/i.test(process36.platform);
8819
8823
  EE = __require("events");
8820
8824
  if (typeof EE !== "function") {
8821
8825
  EE = EE.EventEmitter;
8822
8826
  }
8823
- if (process35.__signal_exit_emitter__) {
8824
- emitter = process35.__signal_exit_emitter__;
8827
+ if (process36.__signal_exit_emitter__) {
8828
+ emitter = process36.__signal_exit_emitter__;
8825
8829
  } else {
8826
- emitter = process35.__signal_exit_emitter__ = new EE();
8830
+ emitter = process36.__signal_exit_emitter__ = new EE();
8827
8831
  emitter.count = 0;
8828
8832
  emitter.emitted = {};
8829
8833
  }
@@ -8860,12 +8864,12 @@ var require_signal_exit2 = __commonJS({
8860
8864
  loaded = false;
8861
8865
  signals.forEach(function(sig) {
8862
8866
  try {
8863
- process35.removeListener(sig, sigListeners[sig]);
8867
+ process36.removeListener(sig, sigListeners[sig]);
8864
8868
  } catch (er2) {
8865
8869
  }
8866
8870
  });
8867
- process35.emit = originalProcessEmit;
8868
- process35.reallyExit = originalProcessReallyExit;
8871
+ process36.emit = originalProcessEmit;
8872
+ process36.reallyExit = originalProcessReallyExit;
8869
8873
  emitter.count -= 1;
8870
8874
  };
8871
8875
  module.exports.unload = unload;
@@ -8882,7 +8886,7 @@ var require_signal_exit2 = __commonJS({
8882
8886
  if (!processOk(global.process)) {
8883
8887
  return;
8884
8888
  }
8885
- var listeners = process35.listeners(sig);
8889
+ var listeners = process36.listeners(sig);
8886
8890
  if (listeners.length === emitter.count) {
8887
8891
  unload();
8888
8892
  emit("exit", null, sig);
@@ -8890,7 +8894,7 @@ var require_signal_exit2 = __commonJS({
8890
8894
  if (isWin && sig === "SIGHUP") {
8891
8895
  sig = "SIGINT";
8892
8896
  }
8893
- process35.kill(process35.pid, sig);
8897
+ process36.kill(process36.pid, sig);
8894
8898
  }
8895
8899
  };
8896
8900
  });
@@ -8906,36 +8910,36 @@ var require_signal_exit2 = __commonJS({
8906
8910
  emitter.count += 1;
8907
8911
  signals = signals.filter(function(sig) {
8908
8912
  try {
8909
- process35.on(sig, sigListeners[sig]);
8913
+ process36.on(sig, sigListeners[sig]);
8910
8914
  return true;
8911
8915
  } catch (er2) {
8912
8916
  return false;
8913
8917
  }
8914
8918
  });
8915
- process35.emit = processEmit;
8916
- process35.reallyExit = processReallyExit;
8919
+ process36.emit = processEmit;
8920
+ process36.reallyExit = processReallyExit;
8917
8921
  };
8918
8922
  module.exports.load = load;
8919
- originalProcessReallyExit = process35.reallyExit;
8923
+ originalProcessReallyExit = process36.reallyExit;
8920
8924
  processReallyExit = function processReallyExit2(code) {
8921
8925
  if (!processOk(global.process)) {
8922
8926
  return;
8923
8927
  }
8924
- process35.exitCode = code || /* istanbul ignore next */
8928
+ process36.exitCode = code || /* istanbul ignore next */
8925
8929
  0;
8926
- emit("exit", process35.exitCode, null);
8927
- emit("afterexit", process35.exitCode, null);
8928
- originalProcessReallyExit.call(process35, process35.exitCode);
8930
+ emit("exit", process36.exitCode, null);
8931
+ emit("afterexit", process36.exitCode, null);
8932
+ originalProcessReallyExit.call(process36, process36.exitCode);
8929
8933
  };
8930
- originalProcessEmit = process35.emit;
8934
+ originalProcessEmit = process36.emit;
8931
8935
  processEmit = function processEmit2(ev, arg) {
8932
8936
  if (ev === "exit" && processOk(global.process)) {
8933
8937
  if (arg !== void 0) {
8934
- process35.exitCode = arg;
8938
+ process36.exitCode = arg;
8935
8939
  }
8936
8940
  var ret = originalProcessEmit.apply(this, arguments);
8937
- emit("exit", process35.exitCode, null);
8938
- emit("afterexit", process35.exitCode, null);
8941
+ emit("exit", process36.exitCode, null);
8942
+ emit("afterexit", process36.exitCode, null);
8939
8943
  return ret;
8940
8944
  } else {
8941
8945
  return originalProcessEmit.apply(this, arguments);
@@ -9761,7 +9765,7 @@ var require_prompt = __commonJS({
9761
9765
  var require_text = __commonJS({
9762
9766
  "node_modules/prompts/dist/elements/text.js"(exports, module) {
9763
9767
  "use strict";
9764
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
9768
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
9765
9769
  try {
9766
9770
  var info = gen[key](arg);
9767
9771
  var value = info.value;
@@ -9770,7 +9774,7 @@ var require_text = __commonJS({
9770
9774
  return;
9771
9775
  }
9772
9776
  if (info.done) {
9773
- resolve8(value);
9777
+ resolve9(value);
9774
9778
  } else {
9775
9779
  Promise.resolve(value).then(_next, _throw);
9776
9780
  }
@@ -9778,13 +9782,13 @@ var require_text = __commonJS({
9778
9782
  function _asyncToGenerator(fn2) {
9779
9783
  return function() {
9780
9784
  var self = this, args = arguments;
9781
- return new Promise(function(resolve8, reject) {
9785
+ return new Promise(function(resolve9, reject) {
9782
9786
  var gen = fn2.apply(self, args);
9783
9787
  function _next(value) {
9784
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
9788
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
9785
9789
  }
9786
9790
  function _throw(err) {
9787
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
9791
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
9788
9792
  }
9789
9793
  _next(void 0);
9790
9794
  });
@@ -10500,7 +10504,7 @@ var require_dateparts = __commonJS({
10500
10504
  var require_date = __commonJS({
10501
10505
  "node_modules/prompts/dist/elements/date.js"(exports, module) {
10502
10506
  "use strict";
10503
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
10507
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
10504
10508
  try {
10505
10509
  var info = gen[key](arg);
10506
10510
  var value = info.value;
@@ -10509,7 +10513,7 @@ var require_date = __commonJS({
10509
10513
  return;
10510
10514
  }
10511
10515
  if (info.done) {
10512
- resolve8(value);
10516
+ resolve9(value);
10513
10517
  } else {
10514
10518
  Promise.resolve(value).then(_next, _throw);
10515
10519
  }
@@ -10517,13 +10521,13 @@ var require_date = __commonJS({
10517
10521
  function _asyncToGenerator(fn2) {
10518
10522
  return function() {
10519
10523
  var self = this, args = arguments;
10520
- return new Promise(function(resolve8, reject) {
10524
+ return new Promise(function(resolve9, reject) {
10521
10525
  var gen = fn2.apply(self, args);
10522
10526
  function _next(value) {
10523
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
10527
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
10524
10528
  }
10525
10529
  function _throw(err) {
10526
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
10530
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
10527
10531
  }
10528
10532
  _next(void 0);
10529
10533
  });
@@ -10726,7 +10730,7 @@ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
10726
10730
  var require_number = __commonJS({
10727
10731
  "node_modules/prompts/dist/elements/number.js"(exports, module) {
10728
10732
  "use strict";
10729
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
10733
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
10730
10734
  try {
10731
10735
  var info = gen[key](arg);
10732
10736
  var value = info.value;
@@ -10735,7 +10739,7 @@ var require_number = __commonJS({
10735
10739
  return;
10736
10740
  }
10737
10741
  if (info.done) {
10738
- resolve8(value);
10742
+ resolve9(value);
10739
10743
  } else {
10740
10744
  Promise.resolve(value).then(_next, _throw);
10741
10745
  }
@@ -10743,13 +10747,13 @@ var require_number = __commonJS({
10743
10747
  function _asyncToGenerator(fn2) {
10744
10748
  return function() {
10745
10749
  var self = this, args = arguments;
10746
- return new Promise(function(resolve8, reject) {
10750
+ return new Promise(function(resolve9, reject) {
10747
10751
  var gen = fn2.apply(self, args);
10748
10752
  function _next(value) {
10749
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
10753
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
10750
10754
  }
10751
10755
  function _throw(err) {
10752
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
10756
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
10753
10757
  }
10754
10758
  _next(void 0);
10755
10759
  });
@@ -11172,7 +11176,7 @@ Instructions:
11172
11176
  var require_autocomplete = __commonJS({
11173
11177
  "node_modules/prompts/dist/elements/autocomplete.js"(exports, module) {
11174
11178
  "use strict";
11175
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
11179
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
11176
11180
  try {
11177
11181
  var info = gen[key](arg);
11178
11182
  var value = info.value;
@@ -11181,7 +11185,7 @@ var require_autocomplete = __commonJS({
11181
11185
  return;
11182
11186
  }
11183
11187
  if (info.done) {
11184
- resolve8(value);
11188
+ resolve9(value);
11185
11189
  } else {
11186
11190
  Promise.resolve(value).then(_next, _throw);
11187
11191
  }
@@ -11189,13 +11193,13 @@ var require_autocomplete = __commonJS({
11189
11193
  function _asyncToGenerator(fn2) {
11190
11194
  return function() {
11191
11195
  var self = this, args = arguments;
11192
- return new Promise(function(resolve8, reject) {
11196
+ return new Promise(function(resolve9, reject) {
11193
11197
  var gen = fn2.apply(self, args);
11194
11198
  function _next(value) {
11195
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
11199
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
11196
11200
  }
11197
11201
  function _throw(err) {
11198
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
11202
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
11199
11203
  }
11200
11204
  _next(void 0);
11201
11205
  });
@@ -11826,7 +11830,7 @@ var require_dist = __commonJS({
11826
11830
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
11827
11831
  return arr2;
11828
11832
  }
11829
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
11833
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
11830
11834
  try {
11831
11835
  var info = gen[key](arg);
11832
11836
  var value = info.value;
@@ -11835,7 +11839,7 @@ var require_dist = __commonJS({
11835
11839
  return;
11836
11840
  }
11837
11841
  if (info.done) {
11838
- resolve8(value);
11842
+ resolve9(value);
11839
11843
  } else {
11840
11844
  Promise.resolve(value).then(_next, _throw);
11841
11845
  }
@@ -11843,13 +11847,13 @@ var require_dist = __commonJS({
11843
11847
  function _asyncToGenerator(fn2) {
11844
11848
  return function() {
11845
11849
  var self = this, args = arguments;
11846
- return new Promise(function(resolve8, reject) {
11850
+ return new Promise(function(resolve9, reject) {
11847
11851
  var gen = fn2.apply(self, args);
11848
11852
  function _next(value) {
11849
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
11853
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
11850
11854
  }
11851
11855
  function _throw(err) {
11852
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
11856
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
11853
11857
  }
11854
11858
  _next(void 0);
11855
11859
  });
@@ -14186,7 +14190,7 @@ var require_get_stream = __commonJS({
14186
14190
  };
14187
14191
  const { maxBuffer } = options;
14188
14192
  let stream;
14189
- await new Promise((resolve8, reject) => {
14193
+ await new Promise((resolve9, reject) => {
14190
14194
  const rejectPromise = (error) => {
14191
14195
  if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
14192
14196
  error.bufferedData = stream.getBufferedValue();
@@ -14198,7 +14202,7 @@ var require_get_stream = __commonJS({
14198
14202
  rejectPromise(error);
14199
14203
  return;
14200
14204
  }
14201
- resolve8();
14205
+ resolve9();
14202
14206
  });
14203
14207
  stream.on("data", () => {
14204
14208
  if (stream.getBufferedLength() > maxBuffer) {
@@ -14858,7 +14862,7 @@ var require_yauzl = __commonJS({
14858
14862
  exports.ZipFile = ZipFile;
14859
14863
  exports.Entry = Entry;
14860
14864
  exports.RandomAccessReader = RandomAccessReader;
14861
- function open(path37, options, callback) {
14865
+ function open(path38, options, callback) {
14862
14866
  if (typeof options === "function") {
14863
14867
  callback = options;
14864
14868
  options = null;
@@ -14870,7 +14874,7 @@ var require_yauzl = __commonJS({
14870
14874
  if (options.validateEntrySizes == null) options.validateEntrySizes = true;
14871
14875
  if (options.strictFileNames == null) options.strictFileNames = false;
14872
14876
  if (callback == null) callback = defaultCallback;
14873
- fs38.open(path37, "r", function(err, fd) {
14877
+ fs38.open(path38, "r", function(err, fd) {
14874
14878
  if (err) return callback(err);
14875
14879
  fromFd(fd, options, function(err2, zipfile) {
14876
14880
  if (err2) fs38.close(fd, defaultCallback);
@@ -15472,7 +15476,7 @@ var require_extract_zip = __commonJS({
15472
15476
  var debug = require_src()("extract-zip");
15473
15477
  var { createWriteStream: createWriteStream5, promises: fs38 } = __require("fs");
15474
15478
  var getStream = require_get_stream();
15475
- var path37 = __require("path");
15479
+ var path38 = __require("path");
15476
15480
  var { promisify: promisify5 } = __require("util");
15477
15481
  var stream = __require("stream");
15478
15482
  var yauzl = require_yauzl();
@@ -15487,7 +15491,7 @@ var require_extract_zip = __commonJS({
15487
15491
  debug("opening", this.zipPath, "with opts", this.opts);
15488
15492
  this.zipfile = await openZip(this.zipPath, { lazyEntries: true });
15489
15493
  this.canceled = false;
15490
- return new Promise((resolve8, reject) => {
15494
+ return new Promise((resolve9, reject) => {
15491
15495
  this.zipfile.on("error", (err) => {
15492
15496
  this.canceled = true;
15493
15497
  reject(err);
@@ -15496,7 +15500,7 @@ var require_extract_zip = __commonJS({
15496
15500
  this.zipfile.on("close", () => {
15497
15501
  if (!this.canceled) {
15498
15502
  debug("zip extraction complete");
15499
- resolve8();
15503
+ resolve9();
15500
15504
  }
15501
15505
  });
15502
15506
  this.zipfile.on("entry", async (entry) => {
@@ -15509,12 +15513,12 @@ var require_extract_zip = __commonJS({
15509
15513
  this.zipfile.readEntry();
15510
15514
  return;
15511
15515
  }
15512
- const destDir = path37.dirname(path37.join(this.opts.dir, entry.fileName));
15516
+ const destDir = path38.dirname(path38.join(this.opts.dir, entry.fileName));
15513
15517
  try {
15514
15518
  await fs38.mkdir(destDir, { recursive: true });
15515
15519
  const canonicalDestDir = await fs38.realpath(destDir);
15516
- const relativeDestDir = path37.relative(this.opts.dir, canonicalDestDir);
15517
- if (relativeDestDir.split(path37.sep).includes("..")) {
15520
+ const relativeDestDir = path38.relative(this.opts.dir, canonicalDestDir);
15521
+ if (relativeDestDir.split(path38.sep).includes("..")) {
15518
15522
  throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
15519
15523
  }
15520
15524
  await this.extractEntry(entry);
@@ -15536,7 +15540,7 @@ var require_extract_zip = __commonJS({
15536
15540
  if (this.opts.onEntry) {
15537
15541
  this.opts.onEntry(entry, this.zipfile);
15538
15542
  }
15539
- const dest = path37.join(this.opts.dir, entry.fileName);
15543
+ const dest = path38.join(this.opts.dir, entry.fileName);
15540
15544
  const mode = entry.externalFileAttributes >> 16 & 65535;
15541
15545
  const IFMT = 61440;
15542
15546
  const IFDIR = 16384;
@@ -15550,7 +15554,7 @@ var require_extract_zip = __commonJS({
15550
15554
  if (!isDir) isDir = madeBy === 0 && entry.externalFileAttributes === 16;
15551
15555
  debug("extracting entry", { filename: entry.fileName, isDir, isSymlink: symlink2 });
15552
15556
  const procMode = this.getExtractedMode(mode, isDir) & 511;
15553
- const destDir = isDir ? dest : path37.dirname(dest);
15557
+ const destDir = isDir ? dest : path38.dirname(dest);
15554
15558
  const mkdirOptions = { recursive: true };
15555
15559
  if (isDir) {
15556
15560
  mkdirOptions.mode = procMode;
@@ -15592,7 +15596,7 @@ var require_extract_zip = __commonJS({
15592
15596
  };
15593
15597
  module.exports = async function(zipPath, opts) {
15594
15598
  debug("creating target directory", opts.dir);
15595
- if (!path37.isAbsolute(opts.dir)) {
15599
+ if (!path38.isAbsolute(opts.dir)) {
15596
15600
  throw new Error("Target directory is expected to be absolute");
15597
15601
  }
15598
15602
  await fs38.mkdir(opts.dir, { recursive: true });
@@ -17053,7 +17057,7 @@ var require_strip_final_newline = __commonJS({
17053
17057
  var require_npm_run_path = __commonJS({
17054
17058
  "node_modules/run-jxa/node_modules/npm-run-path/index.js"(exports, module) {
17055
17059
  "use strict";
17056
- var path37 = __require("path");
17060
+ var path38 = __require("path");
17057
17061
  var pathKey = require_path_key();
17058
17062
  var npmRunPath = (options) => {
17059
17063
  options = {
@@ -17063,16 +17067,16 @@ var require_npm_run_path = __commonJS({
17063
17067
  ...options
17064
17068
  };
17065
17069
  let previous;
17066
- let cwdPath = path37.resolve(options.cwd);
17070
+ let cwdPath = path38.resolve(options.cwd);
17067
17071
  const result = [];
17068
17072
  while (previous !== cwdPath) {
17069
- result.push(path37.join(cwdPath, "node_modules/.bin"));
17073
+ result.push(path38.join(cwdPath, "node_modules/.bin"));
17070
17074
  previous = cwdPath;
17071
- cwdPath = path37.resolve(cwdPath, "..");
17075
+ cwdPath = path38.resolve(cwdPath, "..");
17072
17076
  }
17073
- const execPathDir = path37.resolve(options.cwd, options.execPath, "..");
17077
+ const execPathDir = path38.resolve(options.cwd, options.execPath, "..");
17074
17078
  result.push(execPathDir);
17075
- return result.concat(options.path).join(path37.delimiter);
17079
+ return result.concat(options.path).join(path38.delimiter);
17076
17080
  };
17077
17081
  module.exports = npmRunPath;
17078
17082
  module.exports.default = npmRunPath;
@@ -17082,9 +17086,9 @@ var require_npm_run_path = __commonJS({
17082
17086
  ...options
17083
17087
  };
17084
17088
  const env3 = { ...options.env };
17085
- const path38 = pathKey({ env: env3 });
17086
- options.path = env3[path38];
17087
- env3[path38] = module.exports(options);
17089
+ const path39 = pathKey({ env: env3 });
17090
+ options.path = env3[path39];
17091
+ env3[path39] = module.exports(options);
17088
17092
  return env3;
17089
17093
  };
17090
17094
  }
@@ -17647,11 +17651,11 @@ var require_signals4 = __commonJS({
17647
17651
  // node_modules/run-jxa/node_modules/signal-exit/index.js
17648
17652
  var require_signal_exit3 = __commonJS({
17649
17653
  "node_modules/run-jxa/node_modules/signal-exit/index.js"(exports, module) {
17650
- var process35 = global.process;
17651
- var processOk = function(process36) {
17652
- return process36 && typeof process36 === "object" && typeof process36.removeListener === "function" && typeof process36.emit === "function" && typeof process36.reallyExit === "function" && typeof process36.listeners === "function" && typeof process36.kill === "function" && typeof process36.pid === "number" && typeof process36.on === "function";
17654
+ var process36 = global.process;
17655
+ var processOk = function(process37) {
17656
+ return process37 && typeof process37 === "object" && typeof process37.removeListener === "function" && typeof process37.emit === "function" && typeof process37.reallyExit === "function" && typeof process37.listeners === "function" && typeof process37.kill === "function" && typeof process37.pid === "number" && typeof process37.on === "function";
17653
17657
  };
17654
- if (!processOk(process35)) {
17658
+ if (!processOk(process36)) {
17655
17659
  module.exports = function() {
17656
17660
  return function() {
17657
17661
  };
@@ -17659,15 +17663,15 @@ var require_signal_exit3 = __commonJS({
17659
17663
  } else {
17660
17664
  assert = __require("assert");
17661
17665
  signals = require_signals4();
17662
- isWin = /^win/i.test(process35.platform);
17666
+ isWin = /^win/i.test(process36.platform);
17663
17667
  EE = __require("events");
17664
17668
  if (typeof EE !== "function") {
17665
17669
  EE = EE.EventEmitter;
17666
17670
  }
17667
- if (process35.__signal_exit_emitter__) {
17668
- emitter = process35.__signal_exit_emitter__;
17671
+ if (process36.__signal_exit_emitter__) {
17672
+ emitter = process36.__signal_exit_emitter__;
17669
17673
  } else {
17670
- emitter = process35.__signal_exit_emitter__ = new EE();
17674
+ emitter = process36.__signal_exit_emitter__ = new EE();
17671
17675
  emitter.count = 0;
17672
17676
  emitter.emitted = {};
17673
17677
  }
@@ -17704,12 +17708,12 @@ var require_signal_exit3 = __commonJS({
17704
17708
  loaded = false;
17705
17709
  signals.forEach(function(sig) {
17706
17710
  try {
17707
- process35.removeListener(sig, sigListeners[sig]);
17711
+ process36.removeListener(sig, sigListeners[sig]);
17708
17712
  } catch (er2) {
17709
17713
  }
17710
17714
  });
17711
- process35.emit = originalProcessEmit;
17712
- process35.reallyExit = originalProcessReallyExit;
17715
+ process36.emit = originalProcessEmit;
17716
+ process36.reallyExit = originalProcessReallyExit;
17713
17717
  emitter.count -= 1;
17714
17718
  };
17715
17719
  module.exports.unload = unload;
@@ -17726,7 +17730,7 @@ var require_signal_exit3 = __commonJS({
17726
17730
  if (!processOk(global.process)) {
17727
17731
  return;
17728
17732
  }
17729
- var listeners = process35.listeners(sig);
17733
+ var listeners = process36.listeners(sig);
17730
17734
  if (listeners.length === emitter.count) {
17731
17735
  unload();
17732
17736
  emit("exit", null, sig);
@@ -17734,7 +17738,7 @@ var require_signal_exit3 = __commonJS({
17734
17738
  if (isWin && sig === "SIGHUP") {
17735
17739
  sig = "SIGINT";
17736
17740
  }
17737
- process35.kill(process35.pid, sig);
17741
+ process36.kill(process36.pid, sig);
17738
17742
  }
17739
17743
  };
17740
17744
  });
@@ -17750,36 +17754,36 @@ var require_signal_exit3 = __commonJS({
17750
17754
  emitter.count += 1;
17751
17755
  signals = signals.filter(function(sig) {
17752
17756
  try {
17753
- process35.on(sig, sigListeners[sig]);
17757
+ process36.on(sig, sigListeners[sig]);
17754
17758
  return true;
17755
17759
  } catch (er2) {
17756
17760
  return false;
17757
17761
  }
17758
17762
  });
17759
- process35.emit = processEmit;
17760
- process35.reallyExit = processReallyExit;
17763
+ process36.emit = processEmit;
17764
+ process36.reallyExit = processReallyExit;
17761
17765
  };
17762
17766
  module.exports.load = load;
17763
- originalProcessReallyExit = process35.reallyExit;
17767
+ originalProcessReallyExit = process36.reallyExit;
17764
17768
  processReallyExit = function processReallyExit2(code) {
17765
17769
  if (!processOk(global.process)) {
17766
17770
  return;
17767
17771
  }
17768
- process35.exitCode = code || /* istanbul ignore next */
17772
+ process36.exitCode = code || /* istanbul ignore next */
17769
17773
  0;
17770
- emit("exit", process35.exitCode, null);
17771
- emit("afterexit", process35.exitCode, null);
17772
- originalProcessReallyExit.call(process35, process35.exitCode);
17774
+ emit("exit", process36.exitCode, null);
17775
+ emit("afterexit", process36.exitCode, null);
17776
+ originalProcessReallyExit.call(process36, process36.exitCode);
17773
17777
  };
17774
- originalProcessEmit = process35.emit;
17778
+ originalProcessEmit = process36.emit;
17775
17779
  processEmit = function processEmit2(ev, arg) {
17776
17780
  if (ev === "exit" && processOk(global.process)) {
17777
17781
  if (arg !== void 0) {
17778
- process35.exitCode = arg;
17782
+ process36.exitCode = arg;
17779
17783
  }
17780
17784
  var ret = originalProcessEmit.apply(this, arguments);
17781
- emit("exit", process35.exitCode, null);
17782
- emit("afterexit", process35.exitCode, null);
17785
+ emit("exit", process36.exitCode, null);
17786
+ emit("afterexit", process36.exitCode, null);
17783
17787
  return ret;
17784
17788
  } else {
17785
17789
  return originalProcessEmit.apply(this, arguments);
@@ -17807,7 +17811,7 @@ var require_signal_exit3 = __commonJS({
17807
17811
  var require_kill = __commonJS({
17808
17812
  "node_modules/run-jxa/node_modules/execa/lib/kill.js"(exports, module) {
17809
17813
  "use strict";
17810
- var os8 = __require("os");
17814
+ var os9 = __require("os");
17811
17815
  var onExit = require_signal_exit3();
17812
17816
  var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
17813
17817
  var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
@@ -17831,7 +17835,7 @@ var require_kill = __commonJS({
17831
17835
  return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
17832
17836
  };
17833
17837
  var isSigterm = (signal) => {
17834
- return signal === os8.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
17838
+ return signal === os9.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
17835
17839
  };
17836
17840
  var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
17837
17841
  if (forceKillAfterTimeout === true) {
@@ -17857,7 +17861,7 @@ var require_kill = __commonJS({
17857
17861
  return spawnedPromise;
17858
17862
  }
17859
17863
  let timeoutId;
17860
- const timeoutPromise = new Promise((resolve8, reject) => {
17864
+ const timeoutPromise = new Promise((resolve9, reject) => {
17861
17865
  timeoutId = setTimeout(() => {
17862
17866
  timeoutKill(spawned, killSignal, reject);
17863
17867
  }, timeout);
@@ -17963,7 +17967,7 @@ var require_get_stream2 = __commonJS({
17963
17967
  };
17964
17968
  const { maxBuffer } = options;
17965
17969
  const stream2 = bufferStream(options);
17966
- await new Promise((resolve8, reject) => {
17970
+ await new Promise((resolve9, reject) => {
17967
17971
  const rejectPromise = (error) => {
17968
17972
  if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
17969
17973
  error.bufferedData = stream2.getBufferedValue();
@@ -17973,7 +17977,7 @@ var require_get_stream2 = __commonJS({
17973
17977
  (async () => {
17974
17978
  try {
17975
17979
  await streamPipelinePromisified(inputStream, stream2);
17976
- resolve8();
17980
+ resolve9();
17977
17981
  } catch (error) {
17978
17982
  rejectPromise(error);
17979
17983
  }
@@ -18130,9 +18134,9 @@ var require_promise = __commonJS({
18130
18134
  return spawned;
18131
18135
  };
18132
18136
  var getSpawnedPromise = (spawned) => {
18133
- return new Promise((resolve8, reject) => {
18137
+ return new Promise((resolve9, reject) => {
18134
18138
  spawned.on("exit", (exitCode, signal) => {
18135
- resolve8({ exitCode, signal });
18139
+ resolve9({ exitCode, signal });
18136
18140
  });
18137
18141
  spawned.on("error", (error) => {
18138
18142
  reject(error);
@@ -18200,7 +18204,7 @@ var require_command = __commonJS({
18200
18204
  var require_execa = __commonJS({
18201
18205
  "node_modules/run-jxa/node_modules/execa/index.js"(exports, module) {
18202
18206
  "use strict";
18203
- var path37 = __require("path");
18207
+ var path38 = __require("path");
18204
18208
  var childProcess3 = __require("child_process");
18205
18209
  var crossSpawn = require_cross_spawn();
18206
18210
  var stripFinalNewline = require_strip_final_newline();
@@ -18242,7 +18246,7 @@ var require_execa = __commonJS({
18242
18246
  };
18243
18247
  options.env = getEnv(options);
18244
18248
  options.stdio = normalizeStdio(options);
18245
- if (process.platform === "win32" && path37.basename(file, ".exe") === "cmd") {
18249
+ if (process.platform === "win32" && path38.basename(file, ".exe") === "cmd") {
18246
18250
  args.unshift("/q");
18247
18251
  }
18248
18252
  return { file, args, options, parsed };
@@ -25599,13 +25603,13 @@ var setTextNodeValue = (node, text) => {
25599
25603
  markNodeAsDirty(node);
25600
25604
  };
25601
25605
  var getPathToRoot = (node) => {
25602
- const path37 = [];
25606
+ const path38 = [];
25603
25607
  let current = node;
25604
25608
  while (current) {
25605
- path37.unshift(current);
25609
+ path38.unshift(current);
25606
25610
  current = current.parentNode;
25607
25611
  }
25608
- return path37;
25612
+ return path38;
25609
25613
  };
25610
25614
  var isNodeSelectable = (node) => {
25611
25615
  let current = node;
@@ -25869,7 +25873,7 @@ var styles_default = styles3;
25869
25873
  // node_modules/ink/build/reconciler.js
25870
25874
  if (process3.env["DEV"] === "true") {
25871
25875
  try {
25872
- await import("./devtools-ZLHMA45S.js");
25876
+ await import("./devtools-V7NE4CQA.js");
25873
25877
  } catch (error) {
25874
25878
  if (error.code === "ERR_MODULE_NOT_FOUND") {
25875
25879
  console.warn(`
@@ -30083,8 +30087,8 @@ function Text({ color, backgroundColor, dimColor = false, bold = false, italic =
30083
30087
  }
30084
30088
 
30085
30089
  // node_modules/ink/build/components/ErrorOverview.js
30086
- var cleanupPath = (path37) => {
30087
- return path37?.replace(`file://${cwd()}/`, "");
30090
+ var cleanupPath = (path38) => {
30091
+ return path38?.replace(`file://${cwd()}/`, "");
30088
30092
  };
30089
30093
  var stackUtils = new import_stack_utils.default({
30090
30094
  cwd: cwd(),
@@ -31280,12 +31284,12 @@ var TerminalWriter = class {
31280
31284
  if (chunk) {
31281
31285
  this.synchronizedWrite(chunk);
31282
31286
  }
31283
- await new Promise((resolve8) => {
31287
+ await new Promise((resolve9) => {
31284
31288
  let finished = false;
31285
31289
  const timer = setTimeout(() => {
31286
31290
  finished = true;
31287
31291
  this.cancelSlowFlush = void 0;
31288
- resolve8();
31292
+ resolve9();
31289
31293
  }, 50);
31290
31294
  this.cancelSlowFlush = () => {
31291
31295
  if (!finished) {
@@ -31296,7 +31300,7 @@ var TerminalWriter = class {
31296
31300
  this.outputBuffer = [];
31297
31301
  }
31298
31302
  this.cancelSlowFlush = void 0;
31299
- resolve8();
31303
+ resolve9();
31300
31304
  }
31301
31305
  };
31302
31306
  });
@@ -31687,8 +31691,8 @@ var AnimationController = class {
31687
31691
  if (!this.isRunning) {
31688
31692
  return;
31689
31693
  }
31690
- return new Promise((resolve8) => {
31691
- this.idleResolvers.push(resolve8);
31694
+ return new Promise((resolve9) => {
31695
+ this.idleResolvers.push(resolve9);
31692
31696
  });
31693
31697
  }
31694
31698
  /**
@@ -31728,8 +31732,8 @@ var AnimationController = class {
31728
31732
  clearInterval(this.intervalId);
31729
31733
  this.intervalId = void 0;
31730
31734
  }
31731
- for (const resolve8 of this.idleResolvers) {
31732
- resolve8();
31735
+ for (const resolve9 of this.idleResolvers) {
31736
+ resolve9();
31733
31737
  }
31734
31738
  this.idleResolvers = [];
31735
31739
  }
@@ -33234,11 +33238,11 @@ var TerminalBuffer = class {
33234
33238
  if (!this.worker?.connected) {
33235
33239
  return 0;
33236
33240
  }
33237
- return new Promise((resolve8) => {
33241
+ return new Promise((resolve9) => {
33238
33242
  const handler2 = (message) => {
33239
33243
  if (message.type === "linesUpdated") {
33240
33244
  this.worker?.off("message", handler2);
33241
- resolve8(message.count);
33245
+ resolve9(message.count);
33242
33246
  }
33243
33247
  };
33244
33248
  this.worker?.on("message", handler2);
@@ -33247,7 +33251,7 @@ var TerminalBuffer = class {
33247
33251
  } catch (error) {
33248
33252
  this.worker?.off("message", handler2);
33249
33253
  console.error("Failed to send getLinesUpdated message to worker:", error);
33250
- resolve8(0);
33254
+ resolve9(0);
33251
33255
  }
33252
33256
  });
33253
33257
  }
@@ -33759,8 +33763,8 @@ var Ink = class {
33759
33763
  }
33760
33764
  }
33761
33765
  async waitUntilExit() {
33762
- this.exitPromise ||= new Promise((resolve8, reject) => {
33763
- this.resolveExitPromise = resolve8;
33766
+ this.exitPromise ||= new Promise((resolve9, reject) => {
33767
+ this.resolveExitPromise = resolve9;
33764
33768
  this.rejectExitPromise = reject;
33765
33769
  });
33766
33770
  return this.exitPromise;
@@ -34559,7 +34563,7 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
34559
34563
  process.on("exit", cleanupTerminalOnExit);
34560
34564
  process.on("SIGTERM", cleanupTerminalOnExit);
34561
34565
  process.on("SIGINT", cleanupTerminalOnExit);
34562
- return new Promise((resolve8) => {
34566
+ return new Promise((resolve9) => {
34563
34567
  const originalRawMode = process.stdin.isRaw;
34564
34568
  if (!originalRawMode) {
34565
34569
  process.stdin.setRawMode(true);
@@ -34580,7 +34584,7 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
34580
34584
  process.stdin.setRawMode(false);
34581
34585
  }
34582
34586
  this.detectionComplete = true;
34583
- resolve8();
34587
+ resolve9();
34584
34588
  };
34585
34589
  timeoutId = setTimeout(cleanup, 1e3);
34586
34590
  const onData = (data) => {
@@ -38973,7 +38977,6 @@ var ThemeManager = class {
38973
38977
  try {
38974
38978
  const theme2 = createCustomTheme(themeWithDefaults);
38975
38979
  this.extensionThemes.set(namespacedName, theme2);
38976
- debugLogger.log(`Registered theme: ${namespacedName}`);
38977
38980
  } catch (error) {
38978
38981
  debugLogger.warn(
38979
38982
  `Failed to load custom theme "${namespacedName}":`,
@@ -38999,7 +39002,6 @@ var ThemeManager = class {
38999
39002
  for (const theme2 of customThemes) {
39000
39003
  const namespacedName = `${theme2.name} (${extensionName})`;
39001
39004
  this.extensionThemes.delete(namespacedName);
39002
- debugLogger.log(`Unregistered theme: ${namespacedName}`);
39003
39005
  }
39004
39006
  }
39005
39007
  /**
@@ -40209,13 +40211,14 @@ async function initializeApp(config, settings) {
40209
40211
  }
40210
40212
 
40211
40213
  // packages/cli/src/config/auth.ts
40212
- function validateAuthMethod(authMethod) {
40214
+ async function validateAuthMethod(authMethod) {
40213
40215
  loadEnvironment(loadSettings().merged, process.cwd());
40214
40216
  if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
40215
40217
  return null;
40216
40218
  }
40217
40219
  if (authMethod === AuthType.USE_GEMINI) {
40218
- if (!process.env["GEMINI_API_KEY"]) {
40220
+ const key = process.env["GEMINI_API_KEY"] || await loadApiKey();
40221
+ if (!key) {
40219
40222
  return "When using Gemini API, you must specify the GEMINI_API_KEY environment variable.\nUpdate your environment and try again (no reload needed if using .env)!";
40220
40223
  }
40221
40224
  return null;
@@ -40278,25 +40281,25 @@ async function promptForConsentNonInteractive(prompt, defaultValue = true) {
40278
40281
  input: process.stdin,
40279
40282
  output: process.stdout
40280
40283
  });
40281
- return new Promise((resolve8) => {
40284
+ return new Promise((resolve9) => {
40282
40285
  rl.question(prompt, (answer) => {
40283
40286
  rl.close();
40284
40287
  const trimmedAnswer = answer.trim().toLowerCase();
40285
40288
  if (trimmedAnswer === "") {
40286
- resolve8(defaultValue);
40289
+ resolve9(defaultValue);
40287
40290
  } else {
40288
- resolve8(["y", "yes"].includes(trimmedAnswer));
40291
+ resolve9(["y", "yes"].includes(trimmedAnswer));
40289
40292
  }
40290
40293
  });
40291
40294
  });
40292
40295
  }
40293
40296
  async function promptForConsentInteractive(prompt, addExtensionUpdateConfirmationRequest, clearConfirmationRequest) {
40294
- return new Promise((resolve8) => {
40297
+ return new Promise((resolve9) => {
40295
40298
  addExtensionUpdateConfirmationRequest({
40296
40299
  prompt,
40297
40300
  onConfirm: (resolvedConfirmed) => {
40298
40301
  clearConfirmationRequest?.();
40299
- setImmediate(() => resolve8(resolvedConfirmed));
40302
+ setImmediate(() => resolve9(resolvedConfirmed));
40300
40303
  }
40301
40304
  });
40302
40305
  });
@@ -40461,10 +40464,7 @@ function recursivelyHydrateStrings(obj, values) {
40461
40464
  }
40462
40465
  if (Array.isArray(obj)) {
40463
40466
  return obj.map(
40464
- (item) => (
40465
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
40466
- recursivelyHydrateStrings(item, values)
40467
- )
40467
+ (item) => recursivelyHydrateStrings(item, values)
40468
40468
  );
40469
40469
  }
40470
40470
  if (typeof obj === "object" && obj !== null) {
@@ -40559,7 +40559,9 @@ async function maybePromptForSettings(extensionConfig, extensionId, requestSetti
40559
40559
  settingsChanges.promptForEnv
40560
40560
  )) {
40561
40561
  const answer = await requestSetting(setting);
40562
- allSettings[setting.envVar] = answer;
40562
+ if (answer !== void 0) {
40563
+ allSettings[setting.envVar] = answer;
40564
+ }
40563
40565
  }
40564
40566
  const nonSensitiveSettings = {};
40565
40567
  for (const setting of settings) {
@@ -40575,8 +40577,8 @@ async function maybePromptForSettings(extensionConfig, extensionId, requestSetti
40575
40577
  }
40576
40578
  const envContent = formatEnvContent(nonSensitiveSettings);
40577
40579
  if (fsSync.existsSync(envFilePath)) {
40578
- const stat9 = fsSync.statSync(envFilePath);
40579
- if (stat9.isDirectory()) {
40580
+ const stat8 = fsSync.statSync(envFilePath);
40581
+ if (stat8.isDirectory()) {
40580
40582
  throw new Error(
40581
40583
  `Cannot write extension settings to ${envFilePath} because it is a directory.`
40582
40584
  );
@@ -40610,7 +40612,7 @@ async function promptForSetting(setting) {
40610
40612
  message: `${setting.name}
40611
40613
  ${setting.description}`
40612
40614
  });
40613
- return response.value;
40615
+ return typeof response.value === "string" ? response.value : void 0;
40614
40616
  }
40615
40617
  async function getScopedEnvContents(extensionConfig, extensionId, scope, workspaceDir) {
40616
40618
  const { name: extensionName } = extensionConfig;
@@ -40620,8 +40622,8 @@ async function getScopedEnvContents(extensionConfig, extensionId, scope, workspa
40620
40622
  const envFilePath = getEnvFilePath(extensionName, scope, workspaceDir);
40621
40623
  let customEnv = {};
40622
40624
  if (fsSync.existsSync(envFilePath)) {
40623
- const stat9 = fsSync.statSync(envFilePath);
40624
- if (!stat9.isDirectory()) {
40625
+ const stat8 = fsSync.statSync(envFilePath);
40626
+ if (!stat8.isDirectory()) {
40625
40627
  const envFile = fsSync.readFileSync(envFilePath, "utf-8");
40626
40628
  customEnv = dotenv.parse(envFile);
40627
40629
  }
@@ -40669,6 +40671,9 @@ async function updateSetting(extensionConfig, extensionId, settingKey, requestSe
40669
40671
  return;
40670
40672
  }
40671
40673
  const newValue = await requestSetting(settingToUpdate);
40674
+ if (newValue === void 0) {
40675
+ return;
40676
+ }
40672
40677
  const keychain = new KeychainTokenStorage(
40673
40678
  getKeychainStorageName(extensionName, extensionId, scope, workspaceDir)
40674
40679
  );
@@ -40686,8 +40691,8 @@ async function updateSetting(extensionConfig, extensionId, settingKey, requestSe
40686
40691
  const envFilePath = getEnvFilePath(extensionName, scope, workspaceDir);
40687
40692
  let envContent = "";
40688
40693
  if (fsSync.existsSync(envFilePath)) {
40689
- const stat9 = fsSync.statSync(envFilePath);
40690
- if (stat9.isDirectory()) {
40694
+ const stat8 = fsSync.statSync(envFilePath);
40695
+ if (stat8.isDirectory()) {
40691
40696
  throw new Error(
40692
40697
  `Cannot write extension settings to ${envFilePath} because it is a directory.`
40693
40698
  );
@@ -40735,8 +40740,8 @@ function getSettingsChanges(settings, oldSettings) {
40735
40740
  }
40736
40741
  async function clearSettings(envFilePath, keychain) {
40737
40742
  if (fsSync.existsSync(envFilePath)) {
40738
- const stat9 = fsSync.statSync(envFilePath);
40739
- if (!stat9.isDirectory()) {
40743
+ const stat8 = fsSync.statSync(envFilePath);
40744
+ if (!stat8.isDirectory()) {
40740
40745
  await fs11.writeFile(envFilePath, "");
40741
40746
  }
40742
40747
  }
@@ -40817,8 +40822,8 @@ var Override = class _Override {
40817
40822
  output() {
40818
40823
  return `${this.isDisable ? "!" : ""}${this.baseRule}${this.includeSubdirs ? "*" : ""}`;
40819
40824
  }
40820
- matchesPath(path37) {
40821
- return this.asRegex().test(path37);
40825
+ matchesPath(path38) {
40826
+ return this.asRegex().test(path38);
40822
40827
  }
40823
40828
  };
40824
40829
  var ensureLeadingAndTrailingSlash = function(dirPath) {
@@ -40889,7 +40894,12 @@ var ExtensionEnablementManager = class {
40889
40894
  readConfig() {
40890
40895
  try {
40891
40896
  const content = fs12.readFileSync(this.configFilePath, "utf-8");
40892
- return JSON.parse(content);
40897
+ const parsed = JSON.parse(content);
40898
+ const schema = external_exports.record(
40899
+ external_exports.string(),
40900
+ external_exports.object({ overrides: external_exports.array(external_exports.string()) })
40901
+ );
40902
+ return schema.parse(parsed);
40893
40903
  } catch (error) {
40894
40904
  if (error instanceof Error && "code" in error && error.code === "ENOENT") {
40895
40905
  return {};
@@ -43959,7 +43969,7 @@ async function fetchJson(url, redirectCount = 0) {
43959
43969
  if (token) {
43960
43970
  headers.Authorization = `token ${token}`;
43961
43971
  }
43962
- return new Promise((resolve8, reject) => {
43972
+ return new Promise((resolve9, reject) => {
43963
43973
  https.get(url, { headers }, (res) => {
43964
43974
  if (res.statusCode === 302 || res.statusCode === 301) {
43965
43975
  if (redirectCount >= 10) {
@@ -43972,7 +43982,7 @@ async function fetchJson(url, redirectCount = 0) {
43972
43982
  fetchJson(
43973
43983
  new URL(res.headers.location, url).toString(),
43974
43984
  redirectCount + 1
43975
- ).then(resolve8).catch(reject);
43985
+ ).then(resolve9).catch(reject);
43976
43986
  return;
43977
43987
  }
43978
43988
  if (res.statusCode !== 200) {
@@ -43984,7 +43994,7 @@ async function fetchJson(url, redirectCount = 0) {
43984
43994
  res.on("data", (chunk) => chunks.push(chunk));
43985
43995
  res.on("end", () => {
43986
43996
  const data = Buffer.concat(chunks).toString();
43987
- resolve8(JSON.parse(data));
43997
+ resolve9(JSON.parse(data));
43988
43998
  });
43989
43999
  }).on("error", reject);
43990
44000
  });
@@ -44344,7 +44354,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44344
44354
  if (token) {
44345
44355
  headers["Authorization"] = `token ${token}`;
44346
44356
  }
44347
- return new Promise((resolve8, reject) => {
44357
+ return new Promise((resolve9, reject) => {
44348
44358
  https2.get(url, { headers }, (res) => {
44349
44359
  if (res.statusCode === 302 || res.statusCode === 301) {
44350
44360
  if (redirectCount >= 10) {
@@ -44355,7 +44365,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44355
44365
  new Error("Redirect response missing Location header")
44356
44366
  );
44357
44367
  }
44358
- downloadFile(res.headers.location, dest, options, redirectCount + 1).then(resolve8).catch(reject);
44368
+ downloadFile(res.headers.location, dest, options, redirectCount + 1).then(resolve9).catch(reject);
44359
44369
  return;
44360
44370
  }
44361
44371
  if (res.statusCode !== 200) {
@@ -44365,7 +44375,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44365
44375
  }
44366
44376
  const file = fs15.createWriteStream(dest);
44367
44377
  res.pipe(file);
44368
- file.on("finish", () => file.close(resolve8));
44378
+ file.on("finish", () => file.close(resolve9));
44369
44379
  }).on("error", reject);
44370
44380
  });
44371
44381
  }
@@ -44396,7 +44406,7 @@ var defaultRequestConfirmation = async (message) => {
44396
44406
  message,
44397
44407
  initial: false
44398
44408
  });
44399
- return response.confirm;
44409
+ return typeof response.confirm === "boolean" ? response.confirm : false;
44400
44410
  };
44401
44411
  async function getExtensionManager() {
44402
44412
  const workspaceDir = process.cwd();
@@ -45524,7 +45534,7 @@ function validateName(name) {
45524
45534
  }
45525
45535
  }
45526
45536
  async function inferInstallMetadata(source2, args = {}) {
45527
- if (source2.startsWith("http://") || source2.startsWith("https://") || source2.startsWith("git@") || source2.startsWith("sso://") || source2.startsWith("github:") || source2.startsWith("gitlab:")) {
45537
+ if (source2.startsWith("http://") || source2.startsWith("https://") || source2.startsWith("git@") || source2.startsWith("sso://") || source2.startsWith("github:") || source2.startsWith("gitlab:") || source2.startsWith("ssh://")) {
45528
45538
  return {
45529
45539
  source: source2,
45530
45540
  type: "git",
@@ -45595,7 +45605,7 @@ async function canLoadServer(serverId, config) {
45595
45605
  blockType: "admin"
45596
45606
  };
45597
45607
  }
45598
- if (config.allowedList && config.allowedList.length > 0) {
45608
+ if (config.allowedList !== void 0) {
45599
45609
  const { found, deprecationWarning } = isInSettingsList(
45600
45610
  normalizedId,
45601
45611
  config.allowedList
@@ -45846,9 +45856,9 @@ function isSettingsValue(value) {
45846
45856
  const type = typeof value;
45847
45857
  return type === "string" || type === "number" || type === "boolean" || type === "object";
45848
45858
  }
45849
- function getNestedValue(obj, path37) {
45859
+ function getNestedValue(obj, path38) {
45850
45860
  let current = obj;
45851
- for (const key of path37) {
45861
+ for (const key of path38) {
45852
45862
  if (!isRecord(current) || !(key in current)) {
45853
45863
  return void 0;
45854
45864
  }
@@ -45861,8 +45871,8 @@ function getEffectiveValue(key, settings) {
45861
45871
  if (!definition) {
45862
45872
  return void 0;
45863
45873
  }
45864
- const path37 = key.split(".");
45865
- const value = getNestedValue(settings, path37);
45874
+ const path38 = key.split(".");
45875
+ const value = getNestedValue(settings, path38);
45866
45876
  if (value !== void 0 && isSettingsValue(value)) {
45867
45877
  return value;
45868
45878
  }
@@ -45872,8 +45882,8 @@ function getDialogSettingKeys() {
45872
45882
  return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
45873
45883
  }
45874
45884
  function isInSettingsScope(key, scopeSettings) {
45875
- const path37 = key.split(".");
45876
- const value = getNestedValue(scopeSettings, path37);
45885
+ const path38 = key.split(".");
45886
+ const value = getNestedValue(scopeSettings, path38);
45877
45887
  return value !== void 0;
45878
45888
  }
45879
45889
  function getDisplayValue(key, scopeSettings, _mergedSettings) {
@@ -45969,7 +45979,6 @@ function getEditValue(type, rawValue) {
45969
45979
  }
45970
45980
 
45971
45981
  // packages/cli/src/ui/hooks/atCommandProcessor.ts
45972
- import * as fs18 from "node:fs/promises";
45973
45982
  import * as path12 from "node:path";
45974
45983
  import { Buffer as Buffer5 } from "node:buffer";
45975
45984
  var REF_CONTENT_HEADER = `
@@ -46048,9 +46057,14 @@ async function checkPermissions(query, config) {
46048
46057
  for (const part of fileParts) {
46049
46058
  const pathName = part.content.substring(1);
46050
46059
  if (!pathName) continue;
46051
- const resolvedPathName = resolveToRealPath(
46052
- path12.resolve(config.getTargetDir(), pathName)
46053
- );
46060
+ let resolvedPathName;
46061
+ try {
46062
+ resolvedPathName = resolveToRealPath(
46063
+ path12.resolve(config.getTargetDir(), pathName)
46064
+ );
46065
+ } catch {
46066
+ continue;
46067
+ }
46054
46068
  if (config.validatePathAccess(resolvedPathName, "read")) {
46055
46069
  if (await fileExists(resolvedPathName)) {
46056
46070
  permissionsRequired.push(resolvedPathName);
@@ -46087,91 +46101,86 @@ async function resolveFilePaths(fileParts, config, onDebugMessage, signal) {
46087
46101
  onDebugMessage(`Path ${pathName} is ${reasonText} and will be skipped.`);
46088
46102
  continue;
46089
46103
  }
46090
- for (const dir of config.getWorkspaceContext().getDirectories()) {
46091
- try {
46092
- const absolutePath = path12.resolve(dir, pathName);
46093
- const stats = await fs18.stat(absolutePath);
46094
- const relativePath = path12.isAbsolute(pathName) ? path12.relative(dir, absolutePath) : pathName;
46095
- if (stats.isDirectory()) {
46096
- const pathSpec = path12.join(relativePath, "**");
46097
- resolvedFiles.push({
46098
- part,
46099
- pathSpec,
46100
- displayLabel: path12.isAbsolute(pathName) ? relativePath : pathName,
46101
- absolutePath
46102
- });
46103
- onDebugMessage(
46104
- `Path ${pathName} resolved to directory, using glob: ${pathSpec}`
46105
- );
46106
- } else {
46107
- resolvedFiles.push({
46108
- part,
46109
- pathSpec: relativePath,
46110
- displayLabel: path12.isAbsolute(pathName) ? relativePath : pathName,
46111
- absolutePath
46112
- });
46113
- onDebugMessage(
46114
- `Path ${pathName} resolved to file: ${absolutePath}, using relative path: ${relativePath}`
46115
- );
46116
- }
46117
- break;
46118
- } catch (error) {
46119
- if (isNodeError(error) && error.code === "ENOENT") {
46120
- if (config.getEnableRecursiveFileSearch() && globTool) {
46121
- onDebugMessage(
46122
- `Path ${pathName} not found directly, attempting glob search.`
46104
+ const result = await resolveAtCommandPath(pathName, config, onDebugMessage);
46105
+ if (result.status === "resolved") {
46106
+ const { absolutePath, relativePath, stats } = result.resolved;
46107
+ if (stats.isDirectory()) {
46108
+ const pathSpec = path12.join(relativePath, "**");
46109
+ resolvedFiles.push({
46110
+ part,
46111
+ pathSpec,
46112
+ displayLabel: path12.isAbsolute(pathName) ? relativePath : pathName,
46113
+ absolutePath
46114
+ });
46115
+ onDebugMessage(
46116
+ `Path ${pathName} resolved to directory, using glob: ${pathSpec}`
46117
+ );
46118
+ } else {
46119
+ resolvedFiles.push({
46120
+ part,
46121
+ pathSpec: relativePath,
46122
+ displayLabel: path12.isAbsolute(pathName) ? relativePath : pathName,
46123
+ absolutePath
46124
+ });
46125
+ onDebugMessage(
46126
+ `Path ${pathName} resolved to file: ${absolutePath}, using relative path: ${relativePath}`
46127
+ );
46128
+ }
46129
+ } else if (result.status === "not_found" || result.status === "unauthorized") {
46130
+ if (config.getEnableRecursiveFileSearch() && globTool) {
46131
+ onDebugMessage(
46132
+ `Path ${pathName} not found directly, attempting glob search.`
46133
+ );
46134
+ for (const dir of config.getWorkspaceContext().getDirectories()) {
46135
+ try {
46136
+ const globResult = await globTool.buildAndExecute(
46137
+ {
46138
+ pattern: `**/*${pathName}*`,
46139
+ path: dir
46140
+ },
46141
+ signal
46123
46142
  );
46124
- try {
46125
- const globResult = await globTool.buildAndExecute(
46126
- {
46127
- pattern: `**/*${pathName}*`,
46128
- path: dir
46129
- },
46130
- signal
46131
- );
46132
- if (globResult.llmContent && typeof globResult.llmContent === "string" && !globResult.llmContent.startsWith("No files found") && !globResult.llmContent.startsWith("Error:")) {
46133
- const lines = globResult.llmContent.split("\n");
46134
- if (lines.length > 1 && lines[1]) {
46135
- const firstMatchAbsolute = lines[1].trim();
46136
- const pathSpec = path12.relative(dir, firstMatchAbsolute);
46137
- resolvedFiles.push({
46138
- part,
46139
- pathSpec,
46140
- displayLabel: path12.isAbsolute(pathName) ? pathSpec : pathName
46141
- });
46142
- onDebugMessage(
46143
- `Glob search for ${pathName} found ${firstMatchAbsolute}, using relative path: ${pathSpec}`
46144
- );
46145
- break;
46146
- } else {
46147
- onDebugMessage(
46148
- `Glob search for '**/*${pathName}*' did not return a usable path. Path ${pathName} will be skipped.`
46149
- );
46143
+ if (globResult.llmContent && typeof globResult.llmContent === "string" && !globResult.llmContent.startsWith("No files found") && !globResult.llmContent.startsWith("Error:")) {
46144
+ const lines = globResult.llmContent.split("\n");
46145
+ if (lines.length > 1 && lines[1]) {
46146
+ const rawMatch = lines[1].trim();
46147
+ let firstMatchAbsolute;
46148
+ try {
46149
+ firstMatchAbsolute = resolveToRealPath(rawMatch);
46150
+ } catch {
46151
+ firstMatchAbsolute = rawMatch;
46150
46152
  }
46153
+ const pathSpec = path12.relative(dir, firstMatchAbsolute);
46154
+ resolvedFiles.push({
46155
+ part,
46156
+ pathSpec,
46157
+ displayLabel: path12.isAbsolute(pathName) ? pathSpec : pathName,
46158
+ absolutePath: firstMatchAbsolute
46159
+ });
46160
+ onDebugMessage(
46161
+ `Glob search for ${pathName} found ${firstMatchAbsolute}, using relative path: ${pathSpec}`
46162
+ );
46163
+ break;
46151
46164
  } else {
46152
46165
  onDebugMessage(
46153
- `Glob search for '**/*${pathName}*' found no files or an error. Path ${pathName} will be skipped.`
46166
+ `Glob search for '**/*${pathName}*' did not return a usable path. Path ${pathName} will be skipped.`
46154
46167
  );
46155
46168
  }
46156
- } catch (globError) {
46157
- debugLogger.warn(
46158
- `Error during glob search for ${pathName}: ${getErrorMessage(globError)}`
46159
- );
46169
+ } else {
46160
46170
  onDebugMessage(
46161
- `Error during glob search for ${pathName}. Path ${pathName} will be skipped.`
46171
+ `Glob search for '**/*${pathName}*' found no files or an error. Path ${pathName} will be skipped.`
46162
46172
  );
46163
46173
  }
46164
- } else {
46165
- onDebugMessage(
46166
- `Glob tool not found. Path ${pathName} will be skipped.`
46174
+ } catch (globError) {
46175
+ debugLogger.warn(
46176
+ `Error during glob search for ${pathName}: ${getErrorMessage(globError)}`
46167
46177
  );
46168
46178
  }
46169
- } else {
46170
- debugLogger.warn(
46171
- `Error stating path ${pathName}: ${getErrorMessage(error)}`
46172
- );
46179
+ }
46180
+ } else {
46181
+ if (!config.getEnableRecursiveFileSearch() || !globTool) {
46173
46182
  onDebugMessage(
46174
- `Error stating path ${pathName}. Path ${pathName} will be skipped.`
46183
+ `Glob tool not found. Path ${pathName} will be skipped.`
46175
46184
  );
46176
46185
  }
46177
46186
  }
@@ -46285,7 +46294,12 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
46285
46294
  config,
46286
46295
  config.getMessageBus()
46287
46296
  );
46288
- const pathSpecsToRead = resolvedFiles.map((rf) => rf.pathSpec);
46297
+ const pathSpecsToRead = resolvedFiles.map((rf) => {
46298
+ if (rf.absolutePath) {
46299
+ return rf.pathSpec.endsWith("**") ? path12.join(rf.absolutePath, "**") : rf.absolutePath;
46300
+ }
46301
+ return rf.pathSpec;
46302
+ });
46289
46303
  const fileLabelsForDisplay = resolvedFiles.map((rf) => rf.displayLabel);
46290
46304
  const respectFileIgnore = config.getFileFilteringOptions();
46291
46305
  const toolArgs = {
@@ -46746,7 +46760,7 @@ var Subsume = class _Subsume {
46746
46760
  // node_modules/macos-version/index.js
46747
46761
  var import_semver = __toESM(require_semver2(), 1);
46748
46762
  import process21 from "node:process";
46749
- import fs19 from "node:fs";
46763
+ import fs18 from "node:fs";
46750
46764
  var isMacOS = process21.platform === "darwin";
46751
46765
  var version;
46752
46766
  var clean = (version2) => {
@@ -46771,7 +46785,7 @@ function macOSVersion() {
46771
46785
  return;
46772
46786
  }
46773
46787
  if (!version) {
46774
- const file = fs19.readFileSync("/System/Library/CoreServices/SystemVersion.plist", "utf8");
46788
+ const file = fs18.readFileSync("/System/Library/CoreServices/SystemVersion.plist", "utf8");
46775
46789
  const matches = parseVersion(file);
46776
46790
  if (!matches) {
46777
46791
  return;
@@ -46938,7 +46952,7 @@ async function writeClipboardImages(filePaths) {
46938
46952
  if (process22.platform !== "darwin") {
46939
46953
  return;
46940
46954
  }
46941
- const paths = filePaths.map((path37) => path37 instanceof URL ? fileURLToPath2(path37) : path37);
46955
+ const paths = filePaths.map((path38) => path38 instanceof URL ? fileURLToPath2(path38) : path38);
46942
46956
  await runJxa((...paths2) => {
46943
46957
  ObjC.import("AppKit");
46944
46958
  ObjC.import("Foundation");
@@ -47018,13 +47032,13 @@ var clipboard = {
47018
47032
  var termux_default = clipboard;
47019
47033
 
47020
47034
  // packages/cli/node_modules/clipboardy/lib/linux.js
47021
- import fs20 from "node:fs";
47035
+ import fs19 from "node:fs";
47022
47036
  import path13 from "node:path";
47023
47037
  import { fileURLToPath as fileURLToPath3 } from "node:url";
47024
47038
  var __dirname = path13.dirname(fileURLToPath3(import.meta.url));
47025
47039
  var xsel = "xsel";
47026
47040
  var xselFallbackPath = path13.join(__dirname, "../fallbacks/linux/xsel");
47027
- var hasXselFallback = fs20.existsSync(xselFallbackPath);
47041
+ var hasXselFallback = fs19.existsSync(xselFallbackPath);
47028
47042
  var copyArguments = ["--clipboard", "--input"];
47029
47043
  var pasteArguments = ["--clipboard", "--output"];
47030
47044
  var isDisplayError = (error) => /Can't open display|Inappropriate ioctl/i.test(error.stderr ?? "");
@@ -47160,7 +47174,7 @@ var clipboard4 = {
47160
47174
  var macos_default = clipboard4;
47161
47175
 
47162
47176
  // packages/cli/node_modules/clipboardy/lib/windows.js
47163
- import fs21 from "node:fs";
47177
+ import fs20 from "node:fs";
47164
47178
  import path14 from "node:path";
47165
47179
  import { fileURLToPath as fileURLToPath4 } from "node:url";
47166
47180
 
@@ -47241,7 +47255,7 @@ executePowerShell.createArguments = createArguments;
47241
47255
  var __dirname2 = path14.dirname(fileURLToPath4(import.meta.url));
47242
47256
  var binarySuffix = is64bitSync() ? "x86_64" : "i686";
47243
47257
  var windowBinaryPath = path14.join(__dirname2, `../fallbacks/windows/clipboard_${binarySuffix}.exe`);
47244
- var hasWindowsBinaryFallback = fs21.existsSync(windowBinaryPath);
47258
+ var hasWindowsBinaryFallback = fs20.existsSync(windowBinaryPath);
47245
47259
  var psCopyScript = `
47246
47260
  try {
47247
47261
  [Console]::InputEncoding = [System.Text.Encoding]::UTF8
@@ -47415,7 +47429,7 @@ var clipboard7 = {
47415
47429
  var clipboardy_default = clipboard7;
47416
47430
 
47417
47431
  // packages/cli/src/ui/utils/commandUtils.ts
47418
- import fs22 from "node:fs";
47432
+ import fs21 from "node:fs";
47419
47433
  var AT_COMMAND_DETECT_REGEX = new RegExp(
47420
47434
  `(?<!\\\\)@${AT_COMMAND_PATH_REGEX_SOURCE}`
47421
47435
  );
@@ -47441,33 +47455,33 @@ var OSC52_FOOTER = BEL3;
47441
47455
  var MAX_OSC52_BODY_B64_BYTES = MAX_OSC52_SEQUENCE_BYTES - Buffer.byteLength(OSC52_HEADER) - Buffer.byteLength(OSC52_FOOTER);
47442
47456
  var MAX_OSC52_DATA_BYTES = Math.floor(MAX_OSC52_BODY_B64_BYTES / 4) * 3;
47443
47457
  var SCREEN_DCS_CHUNK_SIZE = 240;
47444
- var pickTty = () => new Promise((resolve8) => {
47458
+ var pickTty = () => new Promise((resolve9) => {
47445
47459
  if (process.platform !== "win32") {
47446
47460
  try {
47447
- const devTty = fs22.createWriteStream("/dev/tty");
47461
+ const devTty = fs21.createWriteStream("/dev/tty");
47448
47462
  const timeout = setTimeout(() => {
47449
47463
  devTty.removeAllListeners("open");
47450
47464
  devTty.removeAllListeners("error");
47451
47465
  devTty.destroy();
47452
- resolve8(getStdioTty());
47466
+ resolve9(getStdioTty());
47453
47467
  }, 100);
47454
47468
  devTty.once("open", () => {
47455
47469
  clearTimeout(timeout);
47456
47470
  devTty.removeAllListeners("error");
47457
47471
  devTty.on("error", () => {
47458
47472
  });
47459
- resolve8({ stream: devTty, closeAfter: true });
47473
+ resolve9({ stream: devTty, closeAfter: true });
47460
47474
  });
47461
47475
  devTty.once("error", () => {
47462
47476
  clearTimeout(timeout);
47463
47477
  devTty.removeAllListeners("open");
47464
- resolve8(getStdioTty());
47478
+ resolve9(getStdioTty());
47465
47479
  });
47466
47480
  return;
47467
47481
  } catch {
47468
47482
  }
47469
47483
  }
47470
- resolve8(getStdioTty());
47484
+ resolve9(getStdioTty());
47471
47485
  });
47472
47486
  var getStdioTty = () => {
47473
47487
  if (process.platform === "win32") {
@@ -47521,12 +47535,12 @@ var wrapForScreen = (seq) => {
47521
47535
  }
47522
47536
  return out;
47523
47537
  };
47524
- var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47538
+ var writeAll = (stream, data) => new Promise((resolve9, reject) => {
47525
47539
  const fd = stream.fd;
47526
47540
  if (process.platform === "win32" && typeof fd === "number" && (stream === process.stdout || stream === process.stderr)) {
47527
47541
  try {
47528
- fs22.writeSync(fd, data);
47529
- resolve8();
47542
+ fs21.writeSync(fd, data);
47543
+ resolve9();
47530
47544
  return;
47531
47545
  } catch (e) {
47532
47546
  debugLogger.warn(
@@ -47541,7 +47555,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47541
47555
  };
47542
47556
  const onDrain = () => {
47543
47557
  cleanup();
47544
- resolve8();
47558
+ resolve9();
47545
47559
  };
47546
47560
  const cleanup = () => {
47547
47561
  stream.off("error", onError);
@@ -47550,7 +47564,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47550
47564
  stream.once("error", onError);
47551
47565
  if (stream.write(data)) {
47552
47566
  cleanup();
47553
- resolve8();
47567
+ resolve9();
47554
47568
  } else {
47555
47569
  stream.once("drain", onDrain);
47556
47570
  }
@@ -47644,13 +47658,13 @@ var parseSlashCommand = (query, commands) => {
47644
47658
 
47645
47659
  // packages/cli/src/ui/components/shared/text-buffer.ts
47646
47660
  var import_react41 = __toESM(require_react(), 1);
47647
- import fs24 from "node:fs";
47661
+ import fs23 from "node:fs";
47648
47662
  import os5 from "node:os";
47649
47663
  import pathMod from "node:path";
47650
47664
  import * as path16 from "node:path";
47651
47665
 
47652
47666
  // packages/cli/src/ui/utils/clipboardUtils.ts
47653
- import * as fs23 from "node:fs/promises";
47667
+ import * as fs22 from "node:fs/promises";
47654
47668
  import { createWriteStream as createWriteStream2, existsSync as existsSync5, statSync as statSync2 } from "node:fs";
47655
47669
  import { execSync, spawn } from "node:child_process";
47656
47670
  import * as path15 from "node:path";
@@ -47683,14 +47697,14 @@ function getUserLinuxClipboardTool() {
47683
47697
  }
47684
47698
  }
47685
47699
  async function saveFromCommand(command, args, destination) {
47686
- return new Promise((resolve8) => {
47700
+ return new Promise((resolve9) => {
47687
47701
  const child = spawn(command, args);
47688
47702
  const fileStream = createWriteStream2(destination);
47689
47703
  let resolved = false;
47690
47704
  const safeResolve = (value) => {
47691
47705
  if (!resolved) {
47692
47706
  resolved = true;
47693
- resolve8(value);
47707
+ resolve9(value);
47694
47708
  }
47695
47709
  };
47696
47710
  child.stdout.pipe(fileStream);
@@ -47713,7 +47727,7 @@ async function saveFromCommand(command, args, destination) {
47713
47727
  }
47714
47728
  const checkFile = async () => {
47715
47729
  try {
47716
- const stats = await fs23.stat(destination);
47730
+ const stats = await fs22.stat(destination);
47717
47731
  safeResolve(stats.size > 0);
47718
47732
  } catch (e) {
47719
47733
  debugLogger.debug(`Failed to stat output file ${destination}:`, e);
@@ -47800,7 +47814,7 @@ async function saveFileWithWlPaste(tempFilePath) {
47800
47814
  return true;
47801
47815
  }
47802
47816
  try {
47803
- await fs23.unlink(tempFilePath);
47817
+ await fs22.unlink(tempFilePath);
47804
47818
  } catch {
47805
47819
  }
47806
47820
  return false;
@@ -47815,7 +47829,7 @@ var saveFileWithXclip = async (tempFilePath) => {
47815
47829
  return true;
47816
47830
  }
47817
47831
  try {
47818
- await fs23.unlink(tempFilePath);
47832
+ await fs22.unlink(tempFilePath);
47819
47833
  } catch {
47820
47834
  }
47821
47835
  return false;
@@ -47829,7 +47843,7 @@ async function getProjectClipboardImagesDir(targetDir) {
47829
47843
  async function saveClipboardImage(targetDir) {
47830
47844
  try {
47831
47845
  const tempDir = await getProjectClipboardImagesDir(targetDir);
47832
- await fs23.mkdir(tempDir, { recursive: true });
47846
+ await fs22.mkdir(tempDir, { recursive: true });
47833
47847
  const timestamp = (/* @__PURE__ */ new Date()).getTime();
47834
47848
  if (process.platform === "linux") {
47835
47849
  const tempFilePath = path15.join(tempDir, `clipboard-${timestamp}.png`);
@@ -47863,7 +47877,7 @@ async function saveClipboardImage(targetDir) {
47863
47877
  ]);
47864
47878
  if (stdout.trim() === "success") {
47865
47879
  try {
47866
- const stats = await fs23.stat(tempFilePath);
47880
+ const stats = await fs22.stat(tempFilePath);
47867
47881
  if (stats.size > 0) {
47868
47882
  return tempFilePath;
47869
47883
  }
@@ -47898,7 +47912,7 @@ async function saveClipboardImage(targetDir) {
47898
47912
  const { stdout } = await spawnAsync("osascript", ["-e", script]);
47899
47913
  if (stdout.trim() === "success") {
47900
47914
  try {
47901
- const stats = await fs23.stat(tempFilePath);
47915
+ const stats = await fs22.stat(tempFilePath);
47902
47916
  if (stats.size > 0) {
47903
47917
  return tempFilePath;
47904
47918
  }
@@ -47907,7 +47921,7 @@ async function saveClipboardImage(targetDir) {
47907
47921
  }
47908
47922
  }
47909
47923
  try {
47910
- await fs23.unlink(tempFilePath);
47924
+ await fs22.unlink(tempFilePath);
47911
47925
  } catch (e) {
47912
47926
  debugLogger.debug("Failed to clean up temp file:", tempFilePath, e);
47913
47927
  }
@@ -47921,15 +47935,15 @@ async function saveClipboardImage(targetDir) {
47921
47935
  async function cleanupOldClipboardImages(targetDir) {
47922
47936
  try {
47923
47937
  const tempDir = await getProjectClipboardImagesDir(targetDir);
47924
- const files = await fs23.readdir(tempDir);
47938
+ const files = await fs22.readdir(tempDir);
47925
47939
  const oneHourAgo = Date.now() - 60 * 60 * 1e3;
47926
47940
  for (const file of files) {
47927
47941
  const ext = path15.extname(file).toLowerCase();
47928
47942
  if (file.startsWith("clipboard-") && IMAGE_EXTENSIONS.includes(ext)) {
47929
47943
  const filePath = path15.join(tempDir, file);
47930
- const stats = await fs23.stat(filePath);
47944
+ const stats = await fs22.stat(filePath);
47931
47945
  if (stats.mtimeMs < oneHourAgo) {
47932
- await fs23.unlink(filePath);
47946
+ await fs22.unlink(filePath);
47933
47947
  }
47934
47948
  }
47935
47949
  }
@@ -49490,24 +49504,55 @@ function handleVimAction(state, action) {
49490
49504
 
49491
49505
  // packages/cli/src/ui/utils/editorUtils.ts
49492
49506
  import { spawn as spawn2, spawnSync } from "node:child_process";
49493
- async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType) {
49507
+ var HEURISTIC_GUI_COMMANDS = [
49508
+ "code",
49509
+ "cursor",
49510
+ "subl",
49511
+ "zed",
49512
+ "atom",
49513
+ "agy"
49514
+ ];
49515
+ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType, openInNewWindow) {
49494
49516
  let command = void 0;
49495
49517
  const args = [filePath];
49518
+ const extraArgs = [];
49496
49519
  if (preferredEditorType) {
49520
+ if (!isValidEditorType(preferredEditorType)) {
49521
+ coreEvents.emitFeedback(
49522
+ "error",
49523
+ `Editor '${preferredEditorType}' is not a recognized editor identifier. Supported editors: ${ALL_EDITORS.join(", ")}. Use /editor to select one, or set the $VISUAL or $EDITOR environment variable.`
49524
+ );
49525
+ return;
49526
+ }
49497
49527
  command = getEditorCommand(preferredEditorType);
49498
49528
  if (isGuiEditor(preferredEditorType)) {
49499
- args.unshift("--wait");
49529
+ args.unshift(getEditorWaitFlag(preferredEditorType));
49500
49530
  }
49531
+ extraArgs.push(
49532
+ ...getEditorExtraArgs(preferredEditorType, {
49533
+ newWindow: openInNewWindow
49534
+ })
49535
+ );
49501
49536
  }
49502
49537
  if (!command) {
49503
- command = process.env["VISUAL"] ?? process.env["EDITOR"];
49504
- if (command) {
49505
- const lowerCommand = command.toLowerCase();
49506
- const isGui = ["code", "cursor", "subl", "zed", "atom"].some(
49507
- (gui) => lowerCommand.includes(gui)
49508
- );
49509
- if (isGui && !lowerCommand.includes("--wait") && !lowerCommand.includes("-w")) {
49510
- args.unshift(lowerCommand.includes("subl") ? "-w" : "--wait");
49538
+ const envCommand = process.env["VISUAL"] ?? process.env["EDITOR"];
49539
+ if (envCommand) {
49540
+ command = envCommand;
49541
+ const [envExecutable = ""] = envCommand.split(" ");
49542
+ const resolvedType = resolveEditorTypeFromCommand(envExecutable);
49543
+ if (resolvedType) {
49544
+ if (isGuiEditor(resolvedType) && !envCommand.includes("--wait") && !envCommand.includes("-w")) {
49545
+ args.unshift(getEditorWaitFlag(resolvedType));
49546
+ }
49547
+ extraArgs.push(
49548
+ ...getEditorExtraArgs(resolvedType, { newWindow: openInNewWindow })
49549
+ );
49550
+ } else {
49551
+ const lower = envCommand.toLowerCase();
49552
+ const isGui = HEURISTIC_GUI_COMMANDS.some((g2) => lower.includes(g2));
49553
+ if (isGui && !lower.includes("--wait") && !lower.includes("-w")) {
49554
+ args.unshift(lower.includes("subl") ? "-w" : "--wait");
49555
+ }
49511
49556
  }
49512
49557
  }
49513
49558
  }
@@ -49515,7 +49560,16 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49515
49560
  command = process.platform === "win32" ? "notepad" : "vi";
49516
49561
  }
49517
49562
  const [executable = "", ...initialArgs] = command.split(" ");
49518
- const terminalEditors = ["vi", "vim", "nvim", "emacs", "hx", "nano"];
49563
+ const terminalEditors = [
49564
+ "vi",
49565
+ "vim",
49566
+ "nvim",
49567
+ "emacs",
49568
+ "emacsclient",
49569
+ "hx",
49570
+ "nano",
49571
+ "micro"
49572
+ ];
49519
49573
  const isTerminal = preferredEditorType ? isTerminalEditor(preferredEditorType) : terminalEditors.some((te2) => executable.toLowerCase().includes(te2));
49520
49574
  if (isTerminal && (executable.includes("vi") || executable.includes("vim") || executable.includes("nvim"))) {
49521
49575
  args.unshift("-i", "NONE");
@@ -49524,56 +49578,54 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49524
49578
  setRawMode?.(false);
49525
49579
  try {
49526
49580
  if (isTerminal) {
49527
- const result = spawnSync(executable, [...initialArgs, ...args], {
49528
- stdio: "inherit",
49529
- shell: process.platform === "win32"
49530
- });
49581
+ const result = spawnSync(
49582
+ executable,
49583
+ [...initialArgs, ...extraArgs, ...args],
49584
+ {
49585
+ stdio: "inherit",
49586
+ shell: process.platform === "win32"
49587
+ }
49588
+ );
49531
49589
  if (result.error) {
49590
+ const spawnErr = result.error;
49532
49591
  coreEvents.emitFeedback(
49533
49592
  "error",
49534
- "[editorUtils] external terminal editor error",
49535
- result.error
49593
+ spawnErr.code === "ENOENT" ? `Editor command '${executable}' was not found in PATH. Install it or use /editor to choose another editor.` : spawnErr.message ?? String(spawnErr)
49536
49594
  );
49537
- throw result.error;
49595
+ return;
49538
49596
  }
49539
49597
  if (typeof result.status === "number" && result.status !== 0) {
49540
- const err = new Error(
49541
- `External editor exited with status ${result.status}`
49542
- );
49543
49598
  coreEvents.emitFeedback(
49544
49599
  "error",
49545
- "[editorUtils] external editor error",
49546
- err
49600
+ `External editor exited with status ${result.status}`
49547
49601
  );
49548
- throw err;
49602
+ return;
49549
49603
  }
49550
49604
  } else {
49551
- await new Promise((resolve8, reject) => {
49552
- const child = spawn2(executable, [...initialArgs, ...args], {
49553
- stdio: "inherit",
49554
- shell: process.platform === "win32"
49555
- });
49605
+ await new Promise((resolve9) => {
49606
+ const child = spawn2(
49607
+ executable,
49608
+ [...initialArgs, ...extraArgs, ...args],
49609
+ {
49610
+ stdio: "inherit",
49611
+ shell: process.platform === "win32"
49612
+ }
49613
+ );
49556
49614
  child.on("error", (err) => {
49615
+ const spawnErr = err;
49616
+ resolve9();
49557
49617
  coreEvents.emitFeedback(
49558
49618
  "error",
49559
- "[editorUtils] external editor spawn error",
49560
- err
49619
+ spawnErr.code === "ENOENT" ? `Editor command '${executable}' was not found in PATH. Install it or use /editor to choose another editor.` : spawnErr.message ?? String(spawnErr)
49561
49620
  );
49562
- reject(err);
49563
49621
  });
49564
49622
  child.on("close", (status) => {
49623
+ resolve9();
49565
49624
  if (typeof status === "number" && status !== 0) {
49566
- const err = new Error(
49567
- `External editor exited with status ${status}`
49568
- );
49569
49625
  coreEvents.emitFeedback(
49570
49626
  "error",
49571
- "[editorUtils] external editor error",
49572
- err
49627
+ `External editor exited with status ${status}`
49573
49628
  );
49574
- reject(err);
49575
- } else {
49576
- resolve8();
49577
49629
  }
49578
49630
  });
49579
49631
  });
@@ -51348,6 +51400,7 @@ function useTextBuffer({
51348
51400
  singleLine = false,
51349
51401
  getPreferredEditor
51350
51402
  }) {
51403
+ const settings = useSettings();
51351
51404
  const keyMatchers = useKeyMatchers();
51352
51405
  const initialState = (0, import_react41.useMemo)(() => {
51353
51406
  const lines2 = initialText.split("\n");
@@ -51722,19 +51775,20 @@ function useTextBuffer({
51722
51775
  dispatch({ type: "vim_paste_before", payload: { count } });
51723
51776
  }, []);
51724
51777
  const openInExternalEditor = (0, import_react41.useCallback)(async () => {
51725
- const tmpDir = fs24.mkdtempSync(pathMod.join(os5.tmpdir(), "gemini-edit-"));
51778
+ const tmpDir = fs23.mkdtempSync(pathMod.join(os5.tmpdir(), "gemini-edit-"));
51726
51779
  const filePath = pathMod.join(tmpDir, "buffer.txt");
51727
51780
  const expandedText = expandPastePlaceholders(text, pastedContent);
51728
- fs24.writeFileSync(filePath, expandedText, "utf8");
51781
+ fs23.writeFileSync(filePath, expandedText, "utf8");
51729
51782
  dispatch({ type: "create_undo_snapshot" });
51730
51783
  try {
51731
51784
  await openFileInEditor(
51732
51785
  filePath,
51733
51786
  stdin,
51734
51787
  setRawMode,
51735
- getPreferredEditor?.()
51788
+ getPreferredEditor?.(),
51789
+ settings.merged.general.openEditorInNewWindow
51736
51790
  );
51737
- let newText = fs24.readFileSync(filePath, "utf8");
51791
+ let newText = fs23.readFileSync(filePath, "utf8");
51738
51792
  newText = newText.replace(/\r\n?/g, "\n");
51739
51793
  const sortedPlaceholders = Object.entries(pastedContent).sort(
51740
51794
  (a, b2) => b2[1].length - a[1].length
@@ -51746,22 +51800,25 @@ function useTextBuffer({
51746
51800
  }
51747
51801
  dispatch({ type: "set_text", payload: newText, pushToUndo: false });
51748
51802
  } catch (err) {
51749
- coreEvents.emitFeedback(
51750
- "error",
51751
- "[useTextBuffer] external editor error",
51752
- err
51753
- );
51803
+ coreEvents.emitFeedback("error", getErrorMessage(err), err);
51754
51804
  } finally {
51755
51805
  try {
51756
- fs24.unlinkSync(filePath);
51806
+ fs23.unlinkSync(filePath);
51757
51807
  } catch {
51758
51808
  }
51759
51809
  try {
51760
- fs24.rmdirSync(tmpDir);
51810
+ fs23.rmdirSync(tmpDir);
51761
51811
  } catch {
51762
51812
  }
51763
51813
  }
51764
- }, [text, pastedContent, stdin, setRawMode, getPreferredEditor]);
51814
+ }, [
51815
+ text,
51816
+ pastedContent,
51817
+ stdin,
51818
+ setRawMode,
51819
+ getPreferredEditor,
51820
+ settings.merged.general.openEditorInNewWindow
51821
+ ]);
51765
51822
  const handleInput = (0, import_react41.useCallback)(
51766
51823
  (key) => {
51767
51824
  const { sequence: input } = key;
@@ -52248,7 +52305,7 @@ function useTextBuffer({
52248
52305
  var import_react42 = __toESM(require_react(), 1);
52249
52306
 
52250
52307
  // packages/cli/src/config/extensions/update.ts
52251
- import * as fs25 from "node:fs";
52308
+ import * as fs24 from "node:fs";
52252
52309
  async function updateExtension(extension, extensionManager, currentState, dispatchExtensionStateUpdate, enableExtensionReloading) {
52253
52310
  if (currentState === "updating" /* UPDATING */) {
52254
52311
  return void 0;
@@ -52350,7 +52407,7 @@ ${e}`
52350
52407
  await copyExtension(tempDir, extension.path);
52351
52408
  throw e;
52352
52409
  } finally {
52353
- await fs25.promises.rm(tempDir, { recursive: true, force: true });
52410
+ await fs24.promises.rm(tempDir, { recursive: true, force: true });
52354
52411
  }
52355
52412
  }
52356
52413
  async function updateAllUpdatableExtensions(extensions, extensionsState, extensionManager, dispatch, enableExtensionReloading) {
@@ -52698,7 +52755,7 @@ var useSessionBrowser = (config, onLoadHistory) => {
52698
52755
  };
52699
52756
 
52700
52757
  // packages/cli/src/ui/utils/terminalSetup.ts
52701
- import { promises as fs27 } from "node:fs";
52758
+ import { promises as fs26 } from "node:fs";
52702
52759
  import * as os6 from "node:os";
52703
52760
  import * as path19 from "node:path";
52704
52761
  import { exec as exec2 } from "node:child_process";
@@ -52706,7 +52763,7 @@ import { promisify as promisify4 } from "node:util";
52706
52763
  var import_react47 = __toESM(require_react(), 1);
52707
52764
 
52708
52765
  // packages/cli/src/utils/persistentState.ts
52709
- import * as fs26 from "node:fs";
52766
+ import * as fs25 from "node:fs";
52710
52767
  import * as path18 from "node:path";
52711
52768
  var STATE_FILENAME = "state.json";
52712
52769
  var PersistentState = class {
@@ -52724,8 +52781,8 @@ var PersistentState = class {
52724
52781
  }
52725
52782
  try {
52726
52783
  const filePath = this.getPath();
52727
- if (fs26.existsSync(filePath)) {
52728
- const content = fs26.readFileSync(filePath, "utf-8");
52784
+ if (fs25.existsSync(filePath)) {
52785
+ const content = fs25.readFileSync(filePath, "utf-8");
52729
52786
  this.cache = JSON.parse(content);
52730
52787
  } else {
52731
52788
  this.cache = {};
@@ -52741,10 +52798,10 @@ var PersistentState = class {
52741
52798
  try {
52742
52799
  const filePath = this.getPath();
52743
52800
  const dir = path18.dirname(filePath);
52744
- if (!fs26.existsSync(dir)) {
52745
- fs26.mkdirSync(dir, { recursive: true });
52801
+ if (!fs25.existsSync(dir)) {
52802
+ fs25.mkdirSync(dir, { recursive: true });
52746
52803
  }
52747
- fs26.writeFileSync(filePath, JSON.stringify(this.cache, null, 2));
52804
+ fs25.writeFileSync(filePath, JSON.stringify(this.cache, null, 2));
52748
52805
  } catch (error) {
52749
52806
  debugLogger.warn("Failed to save persistent state:", error);
52750
52807
  }
@@ -52827,7 +52884,7 @@ async function backupFile(filePath) {
52827
52884
  try {
52828
52885
  const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
52829
52886
  const backupPath = `${filePath}.backup.${timestamp}`;
52830
- await fs27.copyFile(filePath, backupPath);
52887
+ await fs26.copyFile(filePath, backupPath);
52831
52888
  } catch (error) {
52832
52889
  debugLogger.warn(`Failed to create backup of ${filePath}:`, error);
52833
52890
  }
@@ -52861,10 +52918,10 @@ async function configureVSCodeStyle(terminalName, appName) {
52861
52918
  }
52862
52919
  const keybindingsFile = path19.join(configDir, "keybindings.json");
52863
52920
  try {
52864
- await fs27.mkdir(configDir, { recursive: true });
52921
+ await fs26.mkdir(configDir, { recursive: true });
52865
52922
  let keybindings = [];
52866
52923
  try {
52867
- const content = await fs27.readFile(keybindingsFile, "utf8");
52924
+ const content = await fs26.readFile(keybindingsFile, "utf8");
52868
52925
  await backupFile(keybindingsFile);
52869
52926
  try {
52870
52927
  const cleanContent = stripJsonComments(content);
@@ -52962,7 +53019,7 @@ Please check and modify manually if needed: ${keybindingsFile}`
52962
53019
  keybindings.unshift(target);
52963
53020
  }
52964
53021
  }
52965
- await fs27.writeFile(keybindingsFile, JSON.stringify(keybindings, null, 4));
53022
+ await fs26.writeFile(keybindingsFile, JSON.stringify(keybindings, null, 4));
52966
53023
  return {
52967
53024
  success: true,
52968
53025
  message: `Added ${targetBindings.map((b2) => b2.key.charAt(0).toUpperCase() + b2.key.slice(1)).join(
@@ -52998,7 +53055,7 @@ async function shouldPromptForTerminalSetup() {
52998
53055
  }
52999
53056
  const keybindingsFile = path19.join(configDir, "keybindings.json");
53000
53057
  try {
53001
- const content = await fs27.readFile(keybindingsFile, "utf8");
53058
+ const content = await fs26.readFile(keybindingsFile, "utf8");
53002
53059
  const cleanContent = stripJsonComments(content);
53003
53060
  const parsedContent = JSON.parse(cleanContent);
53004
53061
  if (!Array.isArray(parsedContent)) {
@@ -53556,7 +53613,7 @@ var formatResetTime = (resetTime, format = "full") => {
53556
53613
 
53557
53614
  // packages/cli/src/services/FileCommandLoader.ts
53558
53615
  var import_toml = __toESM(require_toml(), 1);
53559
- import { promises as fs28 } from "node:fs";
53616
+ import { promises as fs27 } from "node:fs";
53560
53617
  import path20 from "node:path";
53561
53618
 
53562
53619
  // packages/cli/src/services/prompt-processors/argumentProcessor.ts
@@ -53951,14 +54008,17 @@ var FileCommandLoader = class {
53951
54008
  getCommandDirectories() {
53952
54009
  const dirs = [];
53953
54010
  const storage = this.config?.storage ?? new Storage(this.projectRoot);
54011
+ const userCommandsDir = Storage.getUserCommandsDir();
53954
54012
  dirs.push({
53955
- path: Storage.getUserCommandsDir(),
54013
+ path: userCommandsDir,
53956
54014
  kind: "user-file" /* USER_FILE */
53957
54015
  });
53958
- dirs.push({
53959
- path: storage.getProjectCommandsDir(),
53960
- kind: "workspace-file" /* WORKSPACE_FILE */
53961
- });
54016
+ if (!storage.isWorkspaceHomeDir()) {
54017
+ dirs.push({
54018
+ path: storage.getProjectCommandsDir(),
54019
+ kind: "workspace-file" /* WORKSPACE_FILE */
54020
+ });
54021
+ }
53962
54022
  if (this.config) {
53963
54023
  const activeExtensions = this.config.getExtensions().filter((ext) => ext.isActive).sort((a, b2) => a.name.localeCompare(b2.name));
53964
54024
  const extensionCommandDirs = activeExtensions.map((ext) => ({
@@ -53982,7 +54042,7 @@ var FileCommandLoader = class {
53982
54042
  async parseAndAdaptFile(filePath, baseDir, kind, extensionName, extensionId) {
53983
54043
  let fileContent;
53984
54044
  try {
53985
- fileContent = await fs28.readFile(filePath, "utf-8");
54045
+ fileContent = await fs27.readFile(filePath, "utf-8");
53986
54046
  } catch (error) {
53987
54047
  coreEvents.emitFeedback(
53988
54048
  "error",
@@ -54634,7 +54694,7 @@ function RadioButtonSelect({
54634
54694
 
54635
54695
  // packages/cli/src/ui/utils/directoryUtils.ts
54636
54696
  import * as path21 from "node:path";
54637
- import * as fs29 from "node:fs";
54697
+ import * as fs28 from "node:fs";
54638
54698
  import { opendir } from "node:fs/promises";
54639
54699
  var MAX_SUGGESTIONS = 50;
54640
54700
  var MATCH_BUFFER_MULTIPLIER = 3;
@@ -54685,7 +54745,7 @@ function parsePartialPath(partialPath) {
54685
54745
  async function getDirectorySuggestions(partialPath) {
54686
54746
  try {
54687
54747
  const { searchDir, filter, resultPrefix } = parsePartialPath(partialPath);
54688
- if (!fs29.existsSync(searchDir) || !fs29.statSync(searchDir).isDirectory()) {
54748
+ if (!fs28.existsSync(searchDir) || !fs28.statSync(searchDir).isDirectory()) {
54689
54749
  return [];
54690
54750
  }
54691
54751
  const matches = [];
@@ -54854,6 +54914,36 @@ var MultiFolderTrustDialog = ({
54854
54914
  ] });
54855
54915
  };
54856
54916
 
54917
+ // packages/cli/src/ui/utils/antigravityUtils.ts
54918
+ import process26 from "node:process";
54919
+ var ANTIGRAVITY_SH_INSTALL = "curl -fsSL https://antigravity.google/cli/install.sh | bash";
54920
+ function getAntigravityInstallInfo() {
54921
+ if (process26.platform === "win32") {
54922
+ if (process26.env["PSModulePath"]) {
54923
+ return {
54924
+ platformName: "Windows (PowerShell)",
54925
+ installCmd: "irm https://antigravity.google/cli/install.ps1 | iex"
54926
+ };
54927
+ } else {
54928
+ return {
54929
+ platformName: "Windows (Command Prompt)",
54930
+ installCmd: "curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd"
54931
+ };
54932
+ }
54933
+ } else if (process26.platform === "darwin") {
54934
+ return {
54935
+ platformName: "macOS",
54936
+ installCmd: ANTIGRAVITY_SH_INSTALL
54937
+ };
54938
+ } else if (process26.platform === "linux") {
54939
+ return {
54940
+ platformName: "Linux",
54941
+ installCmd: ANTIGRAVITY_SH_INSTALL
54942
+ };
54943
+ }
54944
+ return null;
54945
+ }
54946
+
54857
54947
  // node_modules/ink-spinner/build/index.js
54858
54948
  var import_react52 = __toESM(require_react(), 1);
54859
54949
  var import_cli_spinners = __toESM(require_cli_spinners(), 1);
@@ -54975,7 +55065,7 @@ var _ExpandableText = ({
54975
55065
  var ExpandableText = import_react54.default.memo(_ExpandableText);
54976
55066
 
54977
55067
  // packages/cli/src/ui/key/keybindingUtils.ts
54978
- import process26 from "node:process";
55068
+ import process27 from "node:process";
54979
55069
  var KEY_NAME_MAP = {
54980
55070
  enter: "Enter",
54981
55071
  escape: "Esc",
@@ -55019,7 +55109,7 @@ var MODIFIER_MAPS = {
55019
55109
  }
55020
55110
  };
55021
55111
  function formatKeyBinding(binding, platform5) {
55022
- const activePlatform = platform5 ?? (process26.env["FORCE_GENERIC_KEYBINDING_HINTS"] ? "default" : process26.platform);
55112
+ const activePlatform = platform5 ?? (process27.env["FORCE_GENERIC_KEYBINDING_HINTS"] ? "default" : process27.platform);
55023
55113
  const modMap = MODIFIER_MAPS[activePlatform] || MODIFIER_MAPS["default"];
55024
55114
  const parts = [];
55025
55115
  if (binding.ctrl) parts.push(modMap.ctrl);
@@ -55888,7 +55978,7 @@ var useAlternateBuffer = () => {
55888
55978
  };
55889
55979
 
55890
55980
  // packages/cli/src/ui/commands/aboutCommand.ts
55891
- import process27 from "node:process";
55981
+ import process28 from "node:process";
55892
55982
  var aboutCommand = {
55893
55983
  name: "about",
55894
55984
  description: "Show version info",
@@ -55896,17 +55986,17 @@ var aboutCommand = {
55896
55986
  autoExecute: true,
55897
55987
  isSafeConcurrent: true,
55898
55988
  action: async (context) => {
55899
- const osVersion = process27.platform;
55989
+ const osVersion = process28.platform;
55900
55990
  let sandboxEnv = "no sandbox";
55901
- if (process27.env["SANDBOX"] && process27.env["SANDBOX"] !== "sandbox-exec") {
55902
- sandboxEnv = process27.env["SANDBOX"];
55903
- } else if (process27.env["SANDBOX"] === "sandbox-exec") {
55904
- sandboxEnv = `sandbox-exec (${process27.env["SEATBELT_PROFILE"] || "unknown"})`;
55991
+ if (process28.env["SANDBOX"] && process28.env["SANDBOX"] !== "sandbox-exec") {
55992
+ sandboxEnv = process28.env["SANDBOX"];
55993
+ } else if (process28.env["SANDBOX"] === "sandbox-exec") {
55994
+ sandboxEnv = `sandbox-exec (${process28.env["SEATBELT_PROFILE"] || "unknown"})`;
55905
55995
  }
55906
55996
  const modelVersion = context.services.agentContext?.config.getModel() || "Unknown";
55907
55997
  const cliVersion = await getVersion();
55908
55998
  const selectedAuthType = context.services.settings.merged.security.auth.selectedType || "";
55909
- const gcpProject = process27.env["GOOGLE_CLOUD_PROJECT"] || "";
55999
+ const gcpProject = process28.env["GOOGLE_CLOUD_PROJECT"] || "";
55910
56000
  const ideClient = await getIdeClientName(context);
55911
56001
  const userAccountManager = new UserAccountManager();
55912
56002
  const cachedAccount = userAccountManager.getCachedGoogleAccount();
@@ -55963,10 +56053,10 @@ function enableFeature(settings, featureName, strategy) {
55963
56053
  };
55964
56054
  }
55965
56055
  const modifiedScopes = [];
55966
- for (const { scope, path: path37 } of foundInDisabledScopes) {
56056
+ for (const { scope, path: path38 } of foundInDisabledScopes) {
55967
56057
  if (isLoadableSettingScope(scope)) {
55968
56058
  strategy.enable(settings, scope, featureName);
55969
- modifiedScopes.push({ scope, path: path37 });
56059
+ modifiedScopes.push({ scope, path: path38 });
55970
56060
  }
55971
56061
  }
55972
56062
  return {
@@ -56454,10 +56544,10 @@ var authCommand = {
56454
56544
  };
56455
56545
 
56456
56546
  // packages/cli/src/ui/commands/bugCommand.ts
56457
- import process28 from "node:process";
56547
+ import process29 from "node:process";
56458
56548
 
56459
56549
  // packages/cli/src/generated/git-commit.ts
56460
- var GIT_COMMIT_INFO = "2249c15a2";
56550
+ var GIT_COMMIT_INFO = "bfd6a65f5";
56461
56551
 
56462
56552
  // packages/cli/src/ui/utils/historyExportUtils.ts
56463
56553
  import * as fsPromises from "node:fs/promises";
@@ -56517,7 +56607,7 @@ async function captureHeapSnapshot(filePath) {
56517
56607
  }
56518
56608
 
56519
56609
  // packages/cli/src/ui/commands/bugCommand.ts
56520
- import { stat as stat4 } from "node:fs/promises";
56610
+ import { stat as stat3 } from "node:fs/promises";
56521
56611
  import path24 from "node:path";
56522
56612
  var bugCommand = {
56523
56613
  name: "bug",
@@ -56528,16 +56618,16 @@ var bugCommand = {
56528
56618
  const bugDescription = (args || "").trim();
56529
56619
  const agentContext = context.services.agentContext;
56530
56620
  const config = agentContext?.config;
56531
- const osVersion = `${process28.platform} ${process28.version}`;
56621
+ const osVersion = `${process29.platform} ${process29.version}`;
56532
56622
  let sandboxEnv = "no sandbox";
56533
- if (process28.env["SANDBOX"] && process28.env["SANDBOX"] !== "sandbox-exec") {
56534
- sandboxEnv = process28.env["SANDBOX"].replace(/^gemini-(?:code-)?/, "");
56535
- } else if (process28.env["SANDBOX"] === "sandbox-exec") {
56536
- sandboxEnv = `sandbox-exec (${process28.env["SEATBELT_PROFILE"] || "unknown"})`;
56623
+ if (process29.env["SANDBOX"] && process29.env["SANDBOX"] !== "sandbox-exec") {
56624
+ sandboxEnv = process29.env["SANDBOX"].replace(/^gemini-(?:code-)?/, "");
56625
+ } else if (process29.env["SANDBOX"] === "sandbox-exec") {
56626
+ sandboxEnv = `sandbox-exec (${process29.env["SEATBELT_PROFILE"] || "unknown"})`;
56537
56627
  }
56538
56628
  const modelVersion = config?.getModel() || "Unknown";
56539
56629
  const cliVersion = await getVersion();
56540
- const memoryUsage = formatBytes(process28.memoryUsage().rss);
56630
+ const memoryUsage = formatBytes(process29.memoryUsage().rss);
56541
56631
  const ideClient = await getIdeClientName2(context);
56542
56632
  const terminalName = terminalCapabilityManager.getTerminalName() || "Unknown";
56543
56633
  const terminalBgColor = terminalCapabilityManager.getTerminalBackgroundColor() || "Unknown";
@@ -56619,7 +56709,7 @@ ${bugReportUrl}${historyFileMessage}`
56619
56709
  Date.now()
56620
56710
  );
56621
56711
  }
56622
- const rss = process28.memoryUsage().rss;
56712
+ const rss = process29.memoryUsage().rss;
56623
56713
  const tempDir = config?.storage?.getProjectTempDir();
56624
56714
  if (rss >= MEMORY_SNAPSHOT_AUTO_THRESHOLD_BYTES && tempDir) {
56625
56715
  const snapshotPath = path24.join(
@@ -56640,7 +56730,7 @@ This can take 20+ seconds and the CLI may be temporarily unresponsive; please do
56640
56730
  const durationMs = Date.now() - startedAt;
56641
56731
  let sizeText = "";
56642
56732
  try {
56643
- const { size } = await stat4(snapshotPath);
56733
+ const { size } = await stat3(snapshotPath);
56644
56734
  sizeText = ` (${formatBytes(size)})`;
56645
56735
  } catch {
56646
56736
  }
@@ -56679,9 +56769,9 @@ async function getIdeClientName2(context) {
56679
56769
  }
56680
56770
 
56681
56771
  // packages/cli/src/ui/commands/bugMemoryCommand.ts
56682
- import { stat as stat5 } from "node:fs/promises";
56772
+ import { stat as stat4 } from "node:fs/promises";
56683
56773
  import path25 from "node:path";
56684
- import process29 from "node:process";
56774
+ import process30 from "node:process";
56685
56775
  var bugMemoryCommand = {
56686
56776
  name: "bug-memory",
56687
56777
  description: "Capture a V8 heap snapshot to disk to attach to a bug report",
@@ -56703,7 +56793,7 @@ var bugMemoryCommand = {
56703
56793
  tempDir,
56704
56794
  `bug-memory-${Date.now()}.heapsnapshot`
56705
56795
  );
56706
- const rss = process29.memoryUsage().rss;
56796
+ const rss = process30.memoryUsage().rss;
56707
56797
  context.ui.addItem(
56708
56798
  {
56709
56799
  type: "info" /* INFO */,
@@ -56731,7 +56821,7 @@ Destination: ${filePath}`
56731
56821
  const durationMs = Date.now() - startedAt;
56732
56822
  let sizeText = "";
56733
56823
  try {
56734
- const { size } = await stat5(filePath);
56824
+ const { size } = await stat4(filePath);
56735
56825
  sizeText = ` (${formatBytes(size)})`;
56736
56826
  } catch {
56737
56827
  }
@@ -57122,7 +57212,7 @@ var clearCommand = {
57122
57212
  if (hookSystem) {
57123
57213
  result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
57124
57214
  }
57125
- await new Promise((resolve8) => setImmediate(resolve8));
57215
+ await new Promise((resolve9) => setImmediate(resolve9));
57126
57216
  if (config) {
57127
57217
  await flushTelemetry(config);
57128
57218
  }
@@ -57366,7 +57456,7 @@ var corgiCommand = {
57366
57456
  };
57367
57457
 
57368
57458
  // packages/cli/src/ui/commands/docsCommand.ts
57369
- import process30 from "node:process";
57459
+ import process31 from "node:process";
57370
57460
  var docsCommand = {
57371
57461
  name: "docs",
57372
57462
  description: "Open full Gemini CLI documentation in your browser",
@@ -57374,7 +57464,7 @@ var docsCommand = {
57374
57464
  autoExecute: true,
57375
57465
  action: async (context) => {
57376
57466
  const docsUrl = "https://goo.gle/gemini-cli-docs";
57377
- if (process30.env["SANDBOX"] && process30.env["SANDBOX"] !== "sandbox-exec") {
57467
+ if (process31.env["SANDBOX"] && process31.env["SANDBOX"] !== "sandbox-exec") {
57378
57468
  context.ui.addItem(
57379
57469
  {
57380
57470
  type: "info" /* INFO */,
@@ -57396,9 +57486,84 @@ ${docsUrl}`
57396
57486
  }
57397
57487
  };
57398
57488
 
57489
+ // packages/cli/src/ui/commands/exportSessionCommand.ts
57490
+ import * as fs29 from "node:fs/promises";
57491
+ import * as path27 from "node:path";
57492
+ var exportSessionCommand = {
57493
+ name: "export-session",
57494
+ description: "Export the current session to a JSON file",
57495
+ kind: "built-in" /* BUILT_IN */,
57496
+ autoExecute: true,
57497
+ action: async (context) => {
57498
+ const { ui: ui2 } = context;
57499
+ const args = context.invocation?.args.trim();
57500
+ if (!args) {
57501
+ return {
57502
+ type: "message",
57503
+ messageType: "error",
57504
+ content: "Please provide a file path to export the session to. Example: /export-session ./my-session.json"
57505
+ };
57506
+ }
57507
+ const sessionId = context.services.agentContext?.config.getSessionId();
57508
+ if (!sessionId) {
57509
+ return {
57510
+ type: "message",
57511
+ messageType: "error",
57512
+ content: "No active session found to export."
57513
+ };
57514
+ }
57515
+ if (ui2.pendingItem) {
57516
+ ui2.addItem(
57517
+ {
57518
+ type: "error" /* ERROR */,
57519
+ text: "Operation already in progress, please wait."
57520
+ },
57521
+ Date.now()
57522
+ );
57523
+ return;
57524
+ }
57525
+ const pendingMessage = {
57526
+ type: "export_session" /* EXPORT_SESSION */,
57527
+ exportSession: {
57528
+ isPending: true
57529
+ }
57530
+ };
57531
+ try {
57532
+ ui2.setPendingItem(pendingMessage);
57533
+ const storage = context.services.agentContext.config.storage;
57534
+ const sessionSelector = new SessionSelector(storage);
57535
+ const { sessionData } = await sessionSelector.resolveSession(sessionId);
57536
+ const targetPath = path27.resolve(process.cwd(), args);
57537
+ await fs29.writeFile(
57538
+ targetPath,
57539
+ JSON.stringify(sessionData, null, 2),
57540
+ "utf-8"
57541
+ );
57542
+ ui2.addItem(
57543
+ {
57544
+ type: "export_session" /* EXPORT_SESSION */,
57545
+ exportSession: {
57546
+ isPending: false,
57547
+ targetPath
57548
+ }
57549
+ },
57550
+ Date.now()
57551
+ );
57552
+ } catch (error) {
57553
+ return {
57554
+ type: "message",
57555
+ messageType: "error",
57556
+ content: `Failed to export session: ${error instanceof Error ? error.message : "Unknown error"}`
57557
+ };
57558
+ } finally {
57559
+ ui2.setPendingItem(null);
57560
+ }
57561
+ }
57562
+ };
57563
+
57399
57564
  // packages/cli/src/ui/commands/directoryCommand.tsx
57400
57565
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
57401
- import * as path27 from "node:path";
57566
+ import * as path28 from "node:path";
57402
57567
  import * as fs30 from "node:fs";
57403
57568
  async function finishAddingDirectories(config, addItem, added, errors) {
57404
57569
  if (!config) {
@@ -57411,7 +57576,7 @@ async function finishAddingDirectories(config, addItem, added, errors) {
57411
57576
  if (added.length > 0) {
57412
57577
  try {
57413
57578
  if (config.shouldLoadMemoryFromIncludeDirectories()) {
57414
- await refreshServerHierarchicalMemory(config);
57579
+ await config.getMemoryContextManager()?.refresh();
57415
57580
  }
57416
57581
  addItem({
57417
57582
  type: "info" /* INFO */,
@@ -57467,15 +57632,15 @@ var directoryCommand = {
57467
57632
  if (context.services.agentContext?.config) {
57468
57633
  const workspaceContext = context.services.agentContext.config.getWorkspaceContext();
57469
57634
  const existingDirs = new Set(
57470
- workspaceContext.getDirectories().map((dir) => path27.resolve(dir))
57635
+ workspaceContext.getDirectories().map((dir) => path28.resolve(dir))
57471
57636
  );
57472
57637
  filteredSuggestions = suggestions.filter((s3) => {
57473
57638
  const expanded = expandHomeDir(s3);
57474
- const absolute = path27.resolve(expanded);
57639
+ const absolute = path28.resolve(expanded);
57475
57640
  if (existingDirs.has(absolute)) {
57476
57641
  return false;
57477
57642
  }
57478
- if (absolute.endsWith(path27.sep) && existingDirs.has(absolute.slice(0, -1))) {
57643
+ if (absolute.endsWith(path28.sep) && existingDirs.has(absolute.slice(0, -1))) {
57479
57644
  return false;
57480
57645
  }
57481
57646
  return true;
@@ -57525,7 +57690,7 @@ var directoryCommand = {
57525
57690
  const trimmedPath = pathToAdd.trim();
57526
57691
  const expandedPath = expandHomeDir(trimmedPath);
57527
57692
  try {
57528
- const absolutePath = path27.resolve(
57693
+ const absolutePath = path28.resolve(
57529
57694
  workspaceContext.targetDir,
57530
57695
  expandedPath
57531
57696
  );
@@ -57555,7 +57720,7 @@ var directoryCommand = {
57555
57720
  const dirsToConfirm = [];
57556
57721
  const trustedDirs = [];
57557
57722
  for (const pathToAdd of pathsToProcess) {
57558
- const expandedPath = path27.resolve(expandHomeDir(pathToAdd.trim()));
57723
+ const expandedPath = path28.resolve(expandHomeDir(pathToAdd.trim()));
57559
57724
  const isTrusted = trustedFolders.isPathTrusted(expandedPath);
57560
57725
  if (isTrusted === true) {
57561
57726
  trustedDirs.push(pathToAdd.trim());
@@ -57641,8 +57806,8 @@ var editorCommand = {
57641
57806
  };
57642
57807
 
57643
57808
  // packages/cli/src/ui/commands/extensionsCommand.ts
57644
- import process31 from "node:process";
57645
- import { stat as stat7 } from "node:fs/promises";
57809
+ import process32 from "node:process";
57810
+ import { stat as stat6 } from "node:fs/promises";
57646
57811
 
57647
57812
  // packages/cli/src/ui/components/ConfigExtensionDialog.tsx
57648
57813
  var import_react62 = __toESM(require_react(), 1);
@@ -57776,14 +57941,14 @@ var ConfigExtensionDialog = ({
57776
57941
  [loggerAdapter]
57777
57942
  );
57778
57943
  const requestSetting = (0, import_react62.useCallback)(
57779
- async (setting) => new Promise((resolve8) => {
57944
+ async (setting) => new Promise((resolve9) => {
57780
57945
  if (!mounted.current) return;
57781
57946
  settingBuffer.setText("");
57782
57947
  setState({
57783
57948
  type: "ASK_SETTING",
57784
57949
  setting,
57785
57950
  resolve: (val) => {
57786
- resolve8(val);
57951
+ resolve9(val);
57787
57952
  setState({ type: "BUSY", message: "Updating..." });
57788
57953
  }
57789
57954
  });
@@ -57791,13 +57956,13 @@ var ConfigExtensionDialog = ({
57791
57956
  [settingBuffer]
57792
57957
  );
57793
57958
  const requestConfirmation = (0, import_react62.useCallback)(
57794
- async (message) => new Promise((resolve8) => {
57959
+ async (message) => new Promise((resolve9) => {
57795
57960
  if (!mounted.current) return;
57796
57961
  setState({
57797
57962
  type: "ASK_CONFIRMATION",
57798
57963
  message,
57799
57964
  resolve: (val) => {
57800
- resolve8(val);
57965
+ resolve9(val);
57801
57966
  setState({ type: "BUSY", message: "Processing..." });
57802
57967
  }
57803
57968
  });
@@ -58383,8 +58548,8 @@ function ExtensionDetails({
58383
58548
  if (keyMatchers["basic.confirm" /* RETURN */](key) && !isInstalled && !isInstalling) {
58384
58549
  setIsInstalling(true);
58385
58550
  void onInstall(
58386
- (prompt) => new Promise((resolve8) => {
58387
- setConsentRequest({ prompt, resolve: resolve8 });
58551
+ (prompt) => new Promise((resolve9) => {
58552
+ setConsentRequest({ prompt, resolve: resolve9 });
58388
58553
  })
58389
58554
  );
58390
58555
  return true;
@@ -58392,8 +58557,8 @@ function ExtensionDetails({
58392
58557
  if (keyMatchers["extension.link" /* LINK_EXTENSION */](key) && isLinkable && !isInstalled && !isInstalling) {
58393
58558
  setIsInstalling(true);
58394
58559
  void onLink(
58395
- (prompt) => new Promise((resolve8) => {
58396
- setConsentRequest({ prompt, resolve: resolve8 });
58560
+ (prompt) => new Promise((resolve9) => {
58561
+ setConsentRequest({ prompt, resolve: resolve9 });
58397
58562
  })
58398
58563
  );
58399
58564
  return true;
@@ -58797,7 +58962,7 @@ function updateAction(context, args) {
58797
58962
  }
58798
58963
  let resolveUpdateComplete;
58799
58964
  const updateComplete = new Promise(
58800
- (resolve8) => resolveUpdateComplete = resolve8
58965
+ (resolve9) => resolveUpdateComplete = resolve9
58801
58966
  );
58802
58967
  const extensions = context.services.agentContext?.config ? listExtensions(context.services.agentContext.config) : [];
58803
58968
  if (showMessageIfNoExtensions(context, extensions)) {
@@ -58977,12 +59142,12 @@ async function exploreAction(context) {
58977
59142
  }
58978
59143
  }
58979
59144
  const extensionsUrl = "https://geminicli.com/extensions/";
58980
- if (process31.env["NODE_ENV"] === "test") {
59145
+ if (process32.env["NODE_ENV"] === "test") {
58981
59146
  context.ui.addItem({
58982
59147
  type: "info" /* INFO */,
58983
59148
  text: `Would open extensions page in your browser: ${extensionsUrl} (skipped in test environment)`
58984
59149
  });
58985
- } else if (process31.env["SANDBOX"] && process31.env["SANDBOX"] !== "sandbox-exec") {
59150
+ } else if (process32.env["SANDBOX"] && process32.env["SANDBOX"] !== "sandbox-exec") {
58986
59151
  context.ui.addItem({
58987
59152
  type: "info" /* INFO */,
58988
59153
  text: `View available extensions at ${extensionsUrl}`
@@ -59191,7 +59356,7 @@ async function linkAction(context, args, requestConsentOverride) {
59191
59356
  return;
59192
59357
  }
59193
59358
  try {
59194
- await stat7(sourceFilepath);
59359
+ await stat6(sourceFilepath);
59195
59360
  } catch (error) {
59196
59361
  context.ui.addItem({
59197
59362
  type: "error" /* ERROR */,
@@ -59505,11 +59670,12 @@ var ConsoleSummaryDisplay = ({
59505
59670
  };
59506
59671
 
59507
59672
  // packages/cli/src/ui/components/Footer.tsx
59508
- import process33 from "node:process";
59673
+ import process34 from "node:process";
59674
+ import os7 from "node:os";
59509
59675
 
59510
59676
  // packages/cli/src/ui/components/MemoryUsageDisplay.tsx
59511
59677
  var import_react69 = __toESM(require_react(), 1);
59512
- import process32 from "node:process";
59678
+ import process33 from "node:process";
59513
59679
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
59514
59680
  var MemoryUsageDisplay = ({ color = theme.text.primary, isActive = true }) => {
59515
59681
  const [memoryUsage, setMemoryUsage] = (0, import_react69.useState)("");
@@ -59519,7 +59685,7 @@ var MemoryUsageDisplay = ({ color = theme.text.primary, isActive = true }) => {
59519
59685
  return;
59520
59686
  }
59521
59687
  const updateMemory = () => {
59522
- const usage = process32.memoryUsage().rss;
59688
+ const usage = process33.memoryUsage().rss;
59523
59689
  setMemoryUsage(formatBytes(usage));
59524
59690
  setMemoryUsageColor(
59525
59691
  usage >= 2 * 1024 * 1024 * 1024 ? theme.status.error : color
@@ -59676,6 +59842,11 @@ var ALL_ITEMS = [
59676
59842
  header: "session",
59677
59843
  description: "Unique identifier for the current session"
59678
59844
  },
59845
+ {
59846
+ id: "hostname",
59847
+ header: "machine",
59848
+ description: "Current machine hostname"
59849
+ },
59679
59850
  {
59680
59851
  id: "auth",
59681
59852
  header: "/auth",
@@ -59701,6 +59872,7 @@ var DEFAULT_ORDER = [
59701
59872
  "quota",
59702
59873
  "memory-usage",
59703
59874
  "session-id",
59875
+ "hostname",
59704
59876
  "auth",
59705
59877
  "code-changes",
59706
59878
  "token-count"
@@ -59749,6 +59921,7 @@ function resolveFooterState(settings) {
59749
59921
 
59750
59922
  // packages/cli/src/ui/components/Footer.tsx
59751
59923
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
59924
+ var HOSTNAME = os7.hostname();
59752
59925
  var CwdIndicator = ({
59753
59926
  targetDir,
59754
59927
  maxWidth,
@@ -59772,7 +59945,7 @@ var SandboxIndicator = ({
59772
59945
  if (isTrustedFolder === false) {
59773
59946
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.status.warning, children: "untrusted" });
59774
59947
  }
59775
- const sandbox = process33.env["SANDBOX"];
59948
+ const sandbox = process34.env["SANDBOX"];
59776
59949
  if (sandbox) {
59777
59950
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.status.warning, children: "current process" });
59778
59951
  }
@@ -59947,7 +60120,7 @@ var Footer = () => {
59947
60120
  }
59948
60121
  case "sandbox": {
59949
60122
  let str = "no sandbox";
59950
- const sandbox = process33.env["SANDBOX"];
60123
+ const sandbox = process34.env["SANDBOX"];
59951
60124
  if (isTrustedFolder === false) str = "untrusted";
59952
60125
  else if (sandbox) str = "current process";
59953
60126
  else if (config.getSandboxEnabled()) str = "all tools";
@@ -60024,6 +60197,15 @@ var Footer = () => {
60024
60197
  );
60025
60198
  break;
60026
60199
  }
60200
+ case "hostname": {
60201
+ addCol(
60202
+ id,
60203
+ header,
60204
+ () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: itemColor, children: HOSTNAME }),
60205
+ HOSTNAME.length
60206
+ );
60207
+ break;
60208
+ }
60027
60209
  case "auth": {
60028
60210
  if (!settings.merged.ui.showUserIdentity) break;
60029
60211
  if (!authType) break;
@@ -60301,6 +60483,7 @@ var FooterConfigDialog = ({
60301
60483
  quota: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("quota", itemColor), children: "42% used" }),
60302
60484
  "memory-usage": /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("memory-usage", itemColor), children: "260 MB" }),
60303
60485
  "session-id": /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("session-id", itemColor), children: "769992f9" }),
60486
+ hostname: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("hostname", itemColor), children: "dev-machine" }),
60304
60487
  "code-changes": /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { flexDirection: "row", children: [
60305
60488
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes", theme.status.success), children: "+12" }),
60306
60489
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes"), children: " " }),
@@ -60442,7 +60625,27 @@ var helpCommand = {
60442
60625
  kind: "built-in" /* BUILT_IN */,
60443
60626
  description: "For help on gemini-cli",
60444
60627
  autoExecute: true,
60445
- action: async (context) => {
60628
+ action: async (context, args) => {
60629
+ const lowerArgs = args?.toLowerCase() || "";
60630
+ const hasAntigravity = lowerArgs.includes("antigravity");
60631
+ const hasInstallOrMigrate = lowerArgs.includes("install") || lowerArgs.includes("migrate");
60632
+ if (hasAntigravity && hasInstallOrMigrate) {
60633
+ const info = getAntigravityInstallInfo();
60634
+ if (info) {
60635
+ context.ui.addItem({
60636
+ type: "info" /* INFO */,
60637
+ text: `To install the Antigravity CLI on ${info.platformName}, run the following command:
60638
+
60639
+ '${info.installCmd}'`
60640
+ });
60641
+ } else {
60642
+ context.ui.addItem({
60643
+ type: "info" /* INFO */,
60644
+ text: `Learn more about Antigravity CLI at https://antigravity.google/docs/cli-getting-started`
60645
+ });
60646
+ }
60647
+ return;
60648
+ }
60446
60649
  const helpItem = {
60447
60650
  type: "help" /* HELP */,
60448
60651
  timestamp: /* @__PURE__ */ new Date()
@@ -61227,14 +61430,14 @@ function enableHook(settings, hookName) {
61227
61430
  }
61228
61431
  const modifiedScopes = [];
61229
61432
  try {
61230
- for (const { scope, path: path37 } of foundInDisabledScopes) {
61433
+ for (const { scope, path: path38 } of foundInDisabledScopes) {
61231
61434
  if (isLoadableSettingScope(scope)) {
61232
61435
  const currentScopeDisabled = settings.forScope(scope).settings.hooksConfig?.disabled ?? [];
61233
61436
  const newDisabled = currentScopeDisabled.filter(
61234
61437
  (name) => name !== hookName
61235
61438
  );
61236
61439
  settings.setValue(scope, "hooksConfig.disabled", newDisabled);
61237
- modifiedScopes.push({ scope, path: path37 });
61440
+ modifiedScopes.push({ scope, path: path38 });
61238
61441
  }
61239
61442
  }
61240
61443
  } catch (error) {
@@ -61529,7 +61732,7 @@ async function enableAction3(context, args) {
61529
61732
  }
61530
61733
  const feedback = renderHookActionFeedback(
61531
61734
  result,
61532
- (label, path37) => `${label} (${path37})`
61735
+ (label, path38) => `${label} (${path38})`
61533
61736
  );
61534
61737
  return {
61535
61738
  type: "message",
@@ -61571,7 +61774,7 @@ async function disableAction3(context, args) {
61571
61774
  }
61572
61775
  const feedback = renderHookActionFeedback(
61573
61776
  result,
61574
- (label, path37) => `${label} (${path37})`
61777
+ (label, path38) => `${label} (${path38})`
61575
61778
  );
61576
61779
  return {
61577
61780
  type: "message",
@@ -61770,7 +61973,7 @@ var hooksCommand = {
61770
61973
  };
61771
61974
 
61772
61975
  // packages/cli/src/ui/commands/ideCommand.ts
61773
- import path28 from "node:path";
61976
+ import path29 from "node:path";
61774
61977
  function getIdeStatusMessage(ideClient) {
61775
61978
  const connection = ideClient.getConnectionStatus();
61776
61979
  switch (connection.status) {
@@ -61799,13 +62002,13 @@ function getIdeStatusMessage(ideClient) {
61799
62002
  function formatFileList(openFiles) {
61800
62003
  const basenameCounts = /* @__PURE__ */ new Map();
61801
62004
  for (const file of openFiles) {
61802
- const basename6 = path28.basename(file.path);
62005
+ const basename6 = path29.basename(file.path);
61803
62006
  basenameCounts.set(basename6, (basenameCounts.get(basename6) || 0) + 1);
61804
62007
  }
61805
62008
  const fileList = openFiles.map((file) => {
61806
- const basename6 = path28.basename(file.path);
62009
+ const basename6 = path29.basename(file.path);
61807
62010
  const isDuplicate = (basenameCounts.get(basename6) || 0) > 1;
61808
- const parentDir = path28.basename(path28.dirname(file.path));
62011
+ const parentDir = path29.basename(path29.dirname(file.path));
61809
62012
  const displayName = isDuplicate ? `${basename6} (/${parentDir})` : basename6;
61810
62013
  return ` - ${displayName}${file.isActive ? " (active)" : ""}`;
61811
62014
  }).join("\n");
@@ -61945,7 +62148,7 @@ var ideCommand = async () => {
61945
62148
  if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
61946
62149
  break;
61947
62150
  }
61948
- await new Promise((resolve8) => setTimeout(resolve8, 500));
62151
+ await new Promise((resolve9) => setTimeout(resolve9, 500));
61949
62152
  }
61950
62153
  const { messageType, content } = getIdeStatusMessage(ideClient);
61951
62154
  if (messageType === "error") {
@@ -62034,7 +62237,7 @@ var ideCommand = async () => {
62034
62237
 
62035
62238
  // packages/cli/src/ui/commands/initCommand.ts
62036
62239
  import * as fs33 from "node:fs";
62037
- import * as path29 from "node:path";
62240
+ import * as path30 from "node:path";
62038
62241
  var initCommand = {
62039
62242
  name: "init",
62040
62243
  description: "Analyzes the project and creates a tailored GEMINI.md file",
@@ -62049,7 +62252,7 @@ var initCommand = {
62049
62252
  };
62050
62253
  }
62051
62254
  const targetDir = context.services.agentContext.config.getTargetDir();
62052
- const geminiMdPath = path29.join(targetDir, "GEMINI.md");
62255
+ const geminiMdPath = path30.join(targetDir, "GEMINI.md");
62053
62256
  const result = performInit(fs33.existsSync(geminiMdPath));
62054
62257
  if (result.type === "submit_prompt") {
62055
62258
  fs33.writeFileSync(geminiMdPath, "", "utf8");
@@ -62125,7 +62328,7 @@ Use /mcp auth <server-name> to authenticate.`
62125
62328
  type: "info",
62126
62329
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
62127
62330
  });
62128
- const { MCPOAuthProvider } = await import("./dist-B3HBIK36.js");
62331
+ const { MCPOAuthProvider } = await import("./dist-R3LOFA4X.js");
62129
62332
  let oauthConfig = server.oauth;
62130
62333
  if (!oauthConfig) {
62131
62334
  oauthConfig = { enabled: false };
@@ -62493,7 +62696,7 @@ var import_react81 = __toESM(require_react(), 1);
62493
62696
 
62494
62697
  // packages/cli/src/ui/components/InboxDialog.tsx
62495
62698
  var import_react80 = __toESM(require_react(), 1);
62496
- import * as path31 from "node:path";
62699
+ import * as path32 from "node:path";
62497
62700
 
62498
62701
  // packages/cli/src/ui/components/messages/DiffRenderer.tsx
62499
62702
  var import_react79 = __toESM(require_react(), 1);
@@ -76291,10 +76494,10 @@ function colorizeCode({
76291
76494
  }
76292
76495
 
76293
76496
  // packages/cli/src/ui/utils/fileUtils.ts
76294
- import * as path30 from "node:path";
76497
+ import * as path31 from "node:path";
76295
76498
  function getFileExtension(filename) {
76296
76499
  if (!filename) return null;
76297
- const ext = path30.extname(filename);
76500
+ const ext = path31.extname(filename);
76298
76501
  return ext ? ext.slice(1) : null;
76299
76502
  }
76300
76503
 
@@ -76657,11 +76860,11 @@ var MEMORY_PATCH_ACTION_CHOICES = [
76657
76860
  }
76658
76861
  ];
76659
76862
  function normalizePathForUi(filePath) {
76660
- return path31.posix.normalize(filePath.replaceAll("\\", "/"));
76863
+ return path32.posix.normalize(filePath.replaceAll("\\", "/"));
76661
76864
  }
76662
76865
  function getPathBasename(filePath) {
76663
76866
  const normalizedPath = normalizePathForUi(filePath);
76664
- const basename6 = path31.posix.basename(normalizedPath);
76867
+ const basename6 = path32.posix.basename(normalizedPath);
76665
76868
  return basename6 === "." ? filePath : basename6;
76666
76869
  }
76667
76870
  function formatMemoryPatchSummary(patch) {
@@ -77618,97 +77821,42 @@ var InboxDialog = ({
77618
77821
  };
77619
77822
 
77620
77823
  // packages/cli/src/ui/commands/memoryCommand.ts
77621
- var memoryCommand = {
77622
- name: "memory",
77623
- description: "Commands for interacting with memory",
77824
+ var showSubCommand = {
77825
+ name: "show",
77826
+ description: "Show the current memory contents",
77624
77827
  kind: "built-in" /* BUILT_IN */,
77625
- autoExecute: false,
77626
- subCommands: [
77627
- {
77628
- name: "show",
77629
- description: "Show the current memory contents",
77630
- kind: "built-in" /* BUILT_IN */,
77631
- autoExecute: true,
77632
- action: async (context) => {
77633
- const config = context.services.agentContext?.config;
77634
- if (!config) return;
77635
- const result = showMemory(config);
77636
- context.ui.addItem(
77637
- {
77638
- type: "info" /* INFO */,
77639
- text: result.content
77640
- },
77641
- Date.now()
77642
- );
77643
- }
77644
- },
77645
- {
77646
- name: "add",
77647
- description: "Add content to the memory",
77648
- kind: "built-in" /* BUILT_IN */,
77649
- autoExecute: false,
77650
- action: (context, args) => {
77651
- const result = addMemory(args);
77652
- if (result.type === "message") {
77653
- return result;
77654
- }
77655
- context.ui.addItem(
77656
- {
77657
- type: "info" /* INFO */,
77658
- text: `Attempting to save to memory: "${args.trim()}"`
77659
- },
77660
- Date.now()
77661
- );
77662
- return result;
77663
- }
77664
- },
77665
- {
77666
- name: "reload",
77667
- altNames: ["refresh"],
77668
- description: "Reload the memory from the source",
77669
- kind: "built-in" /* BUILT_IN */,
77670
- autoExecute: true,
77671
- action: async (context) => {
77672
- context.ui.addItem(
77673
- {
77674
- type: "info" /* INFO */,
77675
- text: "Reloading memory from source files..."
77676
- },
77677
- Date.now()
77678
- );
77679
- try {
77680
- const config = context.services.agentContext?.config;
77681
- if (config) {
77682
- const result = await refreshMemory(config);
77683
- context.ui.addItem(
77684
- {
77685
- type: "info" /* INFO */,
77686
- text: result.content
77687
- },
77688
- Date.now()
77689
- );
77690
- }
77691
- } catch (error) {
77692
- context.ui.addItem(
77693
- {
77694
- type: "error" /* ERROR */,
77695
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
77696
- text: `Error reloading memory: ${error.message}`
77697
- },
77698
- Date.now()
77699
- );
77700
- }
77701
- }
77702
- },
77703
- {
77704
- name: "list",
77705
- description: "Lists the paths of the GEMINI.md files in use",
77706
- kind: "built-in" /* BUILT_IN */,
77707
- autoExecute: true,
77708
- action: async (context) => {
77709
- const config = context.services.agentContext?.config;
77710
- if (!config) return;
77711
- const result = listMemoryFiles(config);
77828
+ autoExecute: true,
77829
+ action: async (context) => {
77830
+ const config = context.services.agentContext?.config;
77831
+ if (!config) return;
77832
+ const result = showMemory(config);
77833
+ context.ui.addItem(
77834
+ {
77835
+ type: "info" /* INFO */,
77836
+ text: result.content
77837
+ },
77838
+ Date.now()
77839
+ );
77840
+ }
77841
+ };
77842
+ var reloadSubCommand = {
77843
+ name: "reload",
77844
+ altNames: ["refresh"],
77845
+ description: "Reload the memory from the source",
77846
+ kind: "built-in" /* BUILT_IN */,
77847
+ autoExecute: true,
77848
+ action: async (context) => {
77849
+ context.ui.addItem(
77850
+ {
77851
+ type: "info" /* INFO */,
77852
+ text: "Reloading memory from source files..."
77853
+ },
77854
+ Date.now()
77855
+ );
77856
+ try {
77857
+ const config = context.services.agentContext?.config;
77858
+ if (config) {
77859
+ const result = await refreshMemory(config);
77712
77860
  context.ui.addItem(
77713
77861
  {
77714
77862
  type: "info" /* INFO */,
@@ -77717,45 +77865,87 @@ var memoryCommand = {
77717
77865
  Date.now()
77718
77866
  );
77719
77867
  }
77720
- },
77721
- {
77722
- name: "inbox",
77723
- description: "Review skills extracted from past sessions and move them to global or project skills",
77724
- kind: "built-in" /* BUILT_IN */,
77725
- autoExecute: true,
77726
- action: (context) => {
77727
- const config = context.services.agentContext?.config;
77728
- if (!config) {
77729
- return {
77730
- type: "message",
77731
- messageType: "error",
77732
- content: "Config not loaded."
77733
- };
77734
- }
77735
- if (!config.isAutoMemoryEnabled()) {
77736
- return {
77737
- type: "message",
77738
- messageType: "info",
77739
- content: "The memory inbox requires Auto Memory. Enable it with: experimental.autoMemory = true in settings."
77740
- };
77741
- }
77742
- return {
77743
- type: "custom_dialog",
77744
- component: import_react81.default.createElement(InboxDialog, {
77745
- config,
77746
- onClose: () => context.ui.removeComponent(),
77747
- onReloadSkills: async () => {
77748
- await config.reloadSkills();
77749
- context.ui.reloadCommands();
77750
- },
77751
- onReloadMemory: async () => {
77752
- await refreshMemory(config);
77753
- }
77754
- })
77755
- };
77756
- }
77868
+ } catch (error) {
77869
+ context.ui.addItem(
77870
+ {
77871
+ type: "error" /* ERROR */,
77872
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
77873
+ text: `Error reloading memory: ${error.message}`
77874
+ },
77875
+ Date.now()
77876
+ );
77757
77877
  }
77758
- ]
77878
+ }
77879
+ };
77880
+ var listSubCommand = {
77881
+ name: "list",
77882
+ description: "Lists the paths of the GEMINI.md files in use",
77883
+ kind: "built-in" /* BUILT_IN */,
77884
+ autoExecute: true,
77885
+ action: async (context) => {
77886
+ const config = context.services.agentContext?.config;
77887
+ if (!config) return;
77888
+ const result = listMemoryFiles(config);
77889
+ context.ui.addItem(
77890
+ {
77891
+ type: "info" /* INFO */,
77892
+ text: result.content
77893
+ },
77894
+ Date.now()
77895
+ );
77896
+ }
77897
+ };
77898
+ var inboxSubCommand = {
77899
+ name: "inbox",
77900
+ description: "Review skills extracted from past sessions and move them to global or project skills",
77901
+ kind: "built-in" /* BUILT_IN */,
77902
+ autoExecute: true,
77903
+ action: (context) => {
77904
+ const config = context.services.agentContext?.config;
77905
+ if (!config) {
77906
+ return {
77907
+ type: "message",
77908
+ messageType: "error",
77909
+ content: "Config not loaded."
77910
+ };
77911
+ }
77912
+ if (!config.isAutoMemoryEnabled()) {
77913
+ return {
77914
+ type: "message",
77915
+ messageType: "info",
77916
+ content: "The memory inbox requires Auto Memory. Enable it with: experimental.autoMemory = true in settings."
77917
+ };
77918
+ }
77919
+ return {
77920
+ type: "custom_dialog",
77921
+ component: import_react81.default.createElement(InboxDialog, {
77922
+ config,
77923
+ onClose: () => context.ui.removeComponent(),
77924
+ onReloadSkills: async () => {
77925
+ await config.reloadSkills();
77926
+ context.ui.reloadCommands();
77927
+ },
77928
+ onReloadMemory: async () => {
77929
+ await refreshMemory(config);
77930
+ }
77931
+ })
77932
+ };
77933
+ }
77934
+ };
77935
+ var memoryCommand = (_config) => {
77936
+ const subCommands = [
77937
+ showSubCommand,
77938
+ reloadSubCommand,
77939
+ listSubCommand,
77940
+ inboxSubCommand
77941
+ ];
77942
+ return {
77943
+ name: "memory",
77944
+ description: "Commands for interacting with memory",
77945
+ kind: "built-in" /* BUILT_IN */,
77946
+ autoExecute: false,
77947
+ subCommands
77948
+ };
77759
77949
  };
77760
77950
 
77761
77951
  // packages/cli/src/ui/commands/modelCommand.ts
@@ -79288,8 +79478,8 @@ var oncallCommand = {
79288
79478
  };
79289
79479
 
79290
79480
  // packages/cli/src/ui/commands/permissionsCommand.ts
79291
- import * as process34 from "node:process";
79292
- import * as path32 from "node:path";
79481
+ import * as process35 from "node:process";
79482
+ import * as path33 from "node:path";
79293
79483
  import * as fs34 from "node:fs";
79294
79484
  var permissionsCommand = {
79295
79485
  name: "permissions",
@@ -79306,9 +79496,9 @@ var permissionsCommand = {
79306
79496
  const dirPath = input.trim();
79307
79497
  let targetDirectory;
79308
79498
  if (!dirPath) {
79309
- targetDirectory = process34.cwd();
79499
+ targetDirectory = process35.cwd();
79310
79500
  } else {
79311
- targetDirectory = path32.resolve(expandHomeDir(dirPath));
79501
+ targetDirectory = path33.resolve(expandHomeDir(dirPath));
79312
79502
  }
79313
79503
  try {
79314
79504
  if (!fs34.statSync(targetDirectory).isDirectory()) {
@@ -79355,7 +79545,7 @@ var permissionsCommand = {
79355
79545
  };
79356
79546
 
79357
79547
  // packages/cli/src/ui/commands/planCommand.ts
79358
- import * as path33 from "node:path";
79548
+ import * as path34 from "node:path";
79359
79549
  async function copyAction(context) {
79360
79550
  const config = context.services.agentContext?.config;
79361
79551
  if (!config) {
@@ -79372,7 +79562,7 @@ async function copyAction(context) {
79372
79562
  await copyToClipboard(content);
79373
79563
  coreEvents.emitFeedback(
79374
79564
  "info",
79375
- `Plan copied to clipboard (${path33.basename(planPath)}).`
79565
+ `Plan copied to clipboard (${path34.basename(planPath)}).`
79376
79566
  );
79377
79567
  } catch (error) {
79378
79568
  coreEvents.emitFeedback("error", `Failed to copy plan: ${error}`, error);
@@ -79410,7 +79600,7 @@ var planCommand = {
79410
79600
  config.storage.getPlansDir(),
79411
79601
  config.getFileSystemService()
79412
79602
  );
79413
- const fileName = path33.basename(approvedPlanPath);
79603
+ const fileName = path34.basename(approvedPlanPath);
79414
79604
  coreEvents.emitFeedback("info", `Approved Plan: ${fileName}`);
79415
79605
  context.ui.addItem({
79416
79606
  type: "gemini" /* GEMINI */,
@@ -79596,7 +79786,7 @@ var quitCommand = {
79596
79786
 
79597
79787
  // packages/cli/src/ui/commands/restoreCommand.ts
79598
79788
  import * as fs35 from "node:fs/promises";
79599
- import path34 from "node:path";
79789
+ import path35 from "node:path";
79600
79790
  var HistoryItemSchema = external_exports.object({
79601
79791
  type: external_exports.string(),
79602
79792
  id: external_exports.number()
@@ -79643,7 +79833,7 @@ ${fileList}`
79643
79833
  content: `File not found: ${selectedFile}`
79644
79834
  };
79645
79835
  }
79646
- const filePath = path34.join(checkpointDir, selectedFile);
79836
+ const filePath = path35.join(checkpointDir, selectedFile);
79647
79837
  const data = await fs35.readFile(filePath, "utf-8");
79648
79838
  const parseResult = ToolCallDataSchema.safeParse(JSON.parse(data));
79649
79839
  if (!parseResult.success) {
@@ -79868,7 +80058,7 @@ async function listTools(context, showDescriptions) {
79868
80058
  };
79869
80059
  context.ui.addItem(toolsListItem);
79870
80060
  }
79871
- var listSubCommand = {
80061
+ var listSubCommand2 = {
79872
80062
  name: "list",
79873
80063
  description: "List available Gemini CLI tools.",
79874
80064
  kind: "built-in" /* BUILT_IN */,
@@ -79888,7 +80078,7 @@ var toolsCommand = {
79888
80078
  description: "List available Gemini CLI tools. Use /tools desc to include descriptions.",
79889
80079
  kind: "built-in" /* BUILT_IN */,
79890
80080
  autoExecute: false,
79891
- subCommands: [listSubCommand, descSubCommand],
80081
+ subCommands: [listSubCommand2, descSubCommand],
79892
80082
  action: async (context, args) => {
79893
80083
  const subCommand = args?.trim();
79894
80084
  const useShowDescriptions = subCommand === "desc" || subCommand === "descriptions";
@@ -79946,8 +80136,8 @@ function disableSkill(settings, skillName, scope) {
79946
80136
  // packages/cli/src/utils/skillUtils.ts
79947
80137
  var import_extract_zip2 = __toESM(require_extract_zip(), 1);
79948
80138
  import * as fs36 from "node:fs/promises";
79949
- import * as path35 from "node:path";
79950
- import * as os7 from "node:os";
80139
+ import * as path36 from "node:path";
80140
+ import * as os8 from "node:os";
79951
80141
  function renderSkillActionFeedback(result, formatScope) {
79952
80142
  const { skillName, action, status, error } = result;
79953
80143
  if (status === "error") {
@@ -79987,7 +80177,7 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
79987
80177
  try {
79988
80178
  if (isGitUrl) {
79989
80179
  tempDirToClean = await fs36.mkdtemp(
79990
- path35.join(os7.tmpdir(), "gemini-skill-")
80180
+ path36.join(os8.tmpdir(), "gemini-skill-")
79991
80181
  );
79992
80182
  sourcePath = tempDirToClean;
79993
80183
  onLog(`Cloning skill from ${source2}...`);
@@ -80000,17 +80190,17 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
80000
80190
  );
80001
80191
  } else if (isSkillFile) {
80002
80192
  tempDirToClean = await fs36.mkdtemp(
80003
- path35.join(os7.tmpdir(), "gemini-skill-")
80193
+ path36.join(os8.tmpdir(), "gemini-skill-")
80004
80194
  );
80005
80195
  sourcePath = tempDirToClean;
80006
80196
  onLog(`Extracting skill from ${source2}...`);
80007
- await (0, import_extract_zip2.default)(path35.resolve(source2), { dir: tempDirToClean });
80197
+ await (0, import_extract_zip2.default)(path36.resolve(source2), { dir: tempDirToClean });
80008
80198
  }
80009
80199
  if (subpath) {
80010
- sourcePath = path35.join(sourcePath, subpath);
80200
+ sourcePath = path36.join(sourcePath, subpath);
80011
80201
  }
80012
- sourcePath = path35.resolve(sourcePath);
80013
- if (tempDirToClean && !sourcePath.startsWith(path35.resolve(tempDirToClean))) {
80202
+ sourcePath = path36.resolve(sourcePath);
80203
+ if (tempDirToClean && !sourcePath.startsWith(path36.resolve(tempDirToClean))) {
80014
80204
  throw new Error("Invalid path: Directory traversal not allowed.");
80015
80205
  }
80016
80206
  onLog(`Searching for skills in ${sourcePath}...`);
@@ -80030,8 +80220,8 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
80030
80220
  const installedSkills = [];
80031
80221
  for (const skill of skills) {
80032
80222
  const skillName = skill.name;
80033
- const skillDir = path35.dirname(skill.location);
80034
- const destPath = path35.join(targetDir, skillName);
80223
+ const skillDir = path36.dirname(skill.location);
80224
+ const destPath = path36.join(targetDir, skillName);
80035
80225
  const exists = await fs36.stat(destPath).catch(() => null);
80036
80226
  if (exists) {
80037
80227
  onLog(`Skill "${skillName}" already exists. Overwriting...`);
@@ -80048,7 +80238,7 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
80048
80238
  }
80049
80239
  }
80050
80240
  async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.resolve(true)) {
80051
- const sourcePath = path35.resolve(source2);
80241
+ const sourcePath = path36.resolve(source2);
80052
80242
  onLog(`Searching for skills in ${sourcePath}...`);
80053
80243
  const skills = await loadSkillsFromDir(sourcePath);
80054
80244
  if (skills.length === 0) {
@@ -80077,8 +80267,8 @@ async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.r
80077
80267
  const linkedSkills = [];
80078
80268
  for (const skill of skills) {
80079
80269
  const skillName = skill.name;
80080
- const skillSourceDir = path35.dirname(skill.location);
80081
- const destPath = path35.join(targetDir, skillName);
80270
+ const skillSourceDir = path36.dirname(skill.location);
80271
+ const destPath = path36.join(targetDir, skillName);
80082
80272
  const exists = await fs36.lstat(destPath).catch(() => null);
80083
80273
  if (exists) {
80084
80274
  onLog(
@@ -80102,8 +80292,8 @@ async function uninstallSkill(name, scope) {
80102
80292
  const discoveredSkills = await loadSkillsFromDir(targetDir);
80103
80293
  const skillToUninstall = discoveredSkills.find((s3) => s3.name === name);
80104
80294
  if (!skillToUninstall) {
80105
- const skillPath = path35.resolve(targetDir, name);
80106
- if (!skillPath.startsWith(path35.resolve(targetDir))) {
80295
+ const skillPath = path36.resolve(targetDir, name);
80296
+ if (!skillPath.startsWith(path36.resolve(targetDir))) {
80107
80297
  return null;
80108
80298
  }
80109
80299
  const exists = await fs36.lstat(skillPath).catch(() => null);
@@ -80113,7 +80303,7 @@ async function uninstallSkill(name, scope) {
80113
80303
  await fs36.rm(skillPath, { recursive: true, force: true });
80114
80304
  return { location: skillPath };
80115
80305
  }
80116
- const skillDir = path35.dirname(skillToUninstall.location);
80306
+ const skillDir = path36.dirname(skillToUninstall.location);
80117
80307
  await fs36.rm(skillDir, { recursive: true, force: true });
80118
80308
  return { location: skillDir };
80119
80309
  }
@@ -80244,7 +80434,7 @@ async function disableAction4(context, args) {
80244
80434
  const result = disableSkill(context.services.settings, skillName, scope);
80245
80435
  let feedback = renderSkillActionFeedback(
80246
80436
  result,
80247
- (label, path37) => `${label} (${path37})`
80437
+ (label, path38) => `${label} (${path38})`
80248
80438
  );
80249
80439
  if (result.status === "success" || result.status === "no-op") {
80250
80440
  feedback += ' You can run "/skills reload" to refresh your current instance.';
@@ -80280,7 +80470,7 @@ async function enableAction4(context, args) {
80280
80470
  const result = enableSkill(context.services.settings, skillName);
80281
80471
  let feedback = renderSkillActionFeedback(
80282
80472
  result,
80283
- (label, path37) => `${label} (${path37})`
80473
+ (label, path38) => `${label} (${path38})`
80284
80474
  );
80285
80475
  if (result.status === "success" || result.status === "no-op") {
80286
80476
  feedback += ' You can run "/skills reload" to refresh your current instance.';
@@ -80318,7 +80508,7 @@ async function reloadAction2(context) {
80318
80508
  const minVisibleDuration = 500;
80319
80509
  if (elapsed < minVisibleDuration) {
80320
80510
  await new Promise(
80321
- (resolve8) => setTimeout(resolve8, minVisibleDuration - elapsed)
80511
+ (resolve9) => setTimeout(resolve9, minVisibleDuration - elapsed)
80322
80512
  );
80323
80513
  }
80324
80514
  context.ui.setPendingItem(null);
@@ -80471,7 +80661,7 @@ var vimCommand = {
80471
80661
 
80472
80662
  // packages/cli/src/ui/commands/setupGithubCommand.ts
80473
80663
  var import_undici2 = __toESM(require_undici(), 1);
80474
- import path36 from "node:path";
80664
+ import path37 from "node:path";
80475
80665
  import * as fs37 from "node:fs";
80476
80666
  import { Writable } from "node:stream";
80477
80667
 
@@ -80522,7 +80712,7 @@ var getLatestGitHubRelease = async (proxy) => {
80522
80712
  if (!releaseTag) {
80523
80713
  throw new Error(`Response did not include tag_name field`);
80524
80714
  }
80525
- return releaseTag;
80715
+ return typeof releaseTag === "string" ? releaseTag : "";
80526
80716
  } catch (error) {
80527
80717
  debugLogger.debug(
80528
80718
  `Failed to determine latest run-gemini-cli release:`,
@@ -80599,7 +80789,7 @@ function getOpenUrlsCommands(readmeUrl) {
80599
80789
  }
80600
80790
  async function updateGitignore(gitRepoRoot) {
80601
80791
  const gitignoreEntries = [".gemini/", "gha-creds-*.json"];
80602
- const gitignorePath = path36.join(gitRepoRoot, ".gitignore");
80792
+ const gitignorePath = path37.join(gitRepoRoot, ".gitignore");
80603
80793
  try {
80604
80794
  let existingContent = "";
80605
80795
  let fileExists2 = true;
@@ -80655,9 +80845,9 @@ async function downloadFiles({
80655
80845
  `Empty body while downloading ${endpoint}: ${response.status} - ${response.statusText}`
80656
80846
  );
80657
80847
  }
80658
- const destination = path36.resolve(
80848
+ const destination = path37.resolve(
80659
80849
  targetDir,
80660
- path36.basename(fileBasename)
80850
+ path37.basename(fileBasename)
80661
80851
  );
80662
80852
  const fileStream = fs37.createWriteStream(destination, {
80663
80853
  mode: 420,
@@ -80730,9 +80920,9 @@ var setupGithubCommand = {
80730
80920
  const proxy = context?.services?.agentContext?.config.getProxy();
80731
80921
  const releaseTag = await getLatestGitHubRelease(proxy);
80732
80922
  const readmeUrl = `https://github.com/google-github-actions/run-gemini-cli/blob/${releaseTag}/README.md#quick-start`;
80733
- const workflowsDir = path36.join(gitRepoRoot, ".github", "workflows");
80923
+ const workflowsDir = path37.join(gitRepoRoot, ".github", "workflows");
80734
80924
  await createDirectory(workflowsDir);
80735
- const commandsDir = path36.join(gitRepoRoot, ".github", "commands");
80925
+ const commandsDir = path37.join(gitRepoRoot, ".github", "commands");
80736
80926
  await createDirectory(commandsDir);
80737
80927
  await downloadSetupFiles({
80738
80928
  configs: [
@@ -80952,6 +81142,7 @@ var BuiltinCommandLoader = class {
80952
81142
  copyCommand,
80953
81143
  corgiCommand,
80954
81144
  docsCommand,
81145
+ exportSessionCommand,
80955
81146
  directoryCommand,
80956
81147
  editorCommand,
80957
81148
  ...this.config?.getExtensionsEnabled() === false ? [
@@ -80993,7 +81184,7 @@ var BuiltinCommandLoader = class {
80993
81184
  })
80994
81185
  }
80995
81186
  ] : [mcpCommand],
80996
- memoryCommand,
81187
+ memoryCommand(this.config),
80997
81188
  modelCommand,
80998
81189
  ...this.config?.getFolderTrust() ? [permissionsCommand] : [],
80999
81190
  ...this.config?.isPlanEnabled() ? [planCommand] : [],
@@ -81421,6 +81612,7 @@ export {
81421
81612
  InputContext,
81422
81613
  useInputState,
81423
81614
  Footer,
81615
+ getAntigravityInstallInfo,
81424
81616
  build_default,
81425
81617
  CliSpinner,
81426
81618
  MAX_WIDTH,