@google/gemini-cli 0.42.0 → 0.44.0-nightly.20260513.g5ee05c775

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 (80) hide show
  1. package/bundle/{chunk-COQP2M4D.js → chunk-27SPXGT2.js} +562 -437
  2. package/bundle/{chunk-EDKX67D6.js → chunk-2VH3SA6M.js} +43 -23
  3. package/bundle/{chunk-PUDLNWHE.js → chunk-3KOQHVJU.js} +3 -3
  4. package/bundle/{chunk-COKAF5GM.js → chunk-4QQ5AHZP.js} +2 -2
  5. package/bundle/{chunk-KVEAHIIV.js → chunk-5EEEHNEE.js} +3 -3
  6. package/bundle/{chunk-G2VTSEZ6.js → chunk-5SMSFUPB.js} +1 -1
  7. package/bundle/{chunk-7VVHSNDQ.js → chunk-AC2EWTF7.js} +1970 -731
  8. package/bundle/{chunk-GA527JB7.js → chunk-ATSNFRDF.js} +1 -1
  9. package/bundle/{chunk-3IS7GD6D.js → chunk-BA752AEU.js} +3 -3
  10. package/bundle/{chunk-CYEIWMZJ.js → chunk-FGYOOMPI.js} +1 -1
  11. package/bundle/{chunk-QOZSZYL7.js → chunk-FK45PHSI.js} +3 -3
  12. package/bundle/{chunk-I7AME6VC.js → chunk-FTY6BJEY.js} +9 -8
  13. package/bundle/{chunk-NTOPH4WG.js → chunk-GCWBZXBS.js} +2 -2
  14. package/bundle/chunk-I2JHD4D3.js +512 -0
  15. package/bundle/{chunk-7C6GGDK6.js → chunk-IZJOLGNO.js} +3 -3
  16. package/bundle/{chunk-4SLGT6YD.js → chunk-J4YAW3P3.js} +1 -1
  17. package/bundle/chunk-KADNKBXT.js +118 -0
  18. package/bundle/{chunk-DN4XSYRG.js → chunk-LF33N5QM.js} +8696 -13355
  19. package/bundle/{chunk-CHERUG6W.js → chunk-LO22NRY4.js} +502 -390
  20. package/bundle/{chunk-JEW7ZIWE.js → chunk-M7OUJJZ2.js} +5270 -5234
  21. package/bundle/{chunk-WIXUKOZA.js → chunk-MFNKZZOB.js} +1 -1
  22. package/bundle/chunk-MLPM54XD.js +357247 -0
  23. package/bundle/{chunk-ECNYAST2.js → chunk-N22WUHJE.js} +5419 -5378
  24. package/bundle/chunk-OC7XGTLV.js +81656 -0
  25. package/bundle/{chunk-ZNMQA242.js → chunk-QDEK3TQ6.js} +3 -3
  26. package/bundle/{chunk-BCYBA52D.js → chunk-QMXQUBC4.js} +43 -23
  27. package/bundle/chunk-TBHMNRI3.js +1571 -0
  28. package/bundle/{chunk-LATVEETM.js → chunk-TOOOS4HD.js} +2 -2
  29. package/bundle/{chunk-XUMRUXOT.js → chunk-UHSQLPNG.js} +50 -27
  30. package/bundle/chunk-USS2A6NQ.js +156 -0
  31. package/bundle/chunk-WMTLLWRC.js +391 -0
  32. package/bundle/chunk-XDWZDV7C.js +17250 -0
  33. package/bundle/{chunk-DMWX7UP6.js → chunk-YBYQH75I.js} +2252 -829
  34. package/bundle/{chunk-FCAODPNO.js → chunk-ZZN56QZ3.js} +502 -390
  35. package/bundle/{cleanup-3RILFNVM.js → cleanup-2H3SANYB.js} +3 -3
  36. package/bundle/{cleanup-SVRKYBR6.js → cleanup-7GY7BVC6.js} +3 -3
  37. package/bundle/{cleanup-XFVHHDVO.js → cleanup-FERREFU6.js} +3 -3
  38. package/bundle/cleanup-VIITMMDH.js +33 -0
  39. package/bundle/{core-FRVSDP2C.js → core-GS6NXK7Y.js} +30 -2
  40. package/bundle/{devtoolsService-VM2WTHBX.js → devtoolsService-FKC6Y4OE.js} +3 -3
  41. package/bundle/{devtoolsService-TRDGMQLJ.js → devtoolsService-K2DRCZEY.js} +5 -4
  42. package/bundle/{devtoolsService-RUEO5PGP.js → devtoolsService-PS6RYICL.js} +3 -3
  43. package/bundle/devtoolsService-ZDXC2NPD.js +857 -0
  44. package/bundle/{dist-6BN2CJPN.js → dist-S3YUNQKP.js} +30 -2
  45. package/bundle/{core-B5S6HZJT.js → dist-TBGNMYU2.js} +30 -2
  46. package/bundle/dist-ZEW43MLQ.js +2124 -0
  47. package/bundle/docs/changelogs/index.md +30 -0
  48. package/bundle/docs/changelogs/latest.md +261 -166
  49. package/bundle/docs/changelogs/preview.md +178 -103
  50. package/bundle/docs/cli/auto-memory.md +60 -38
  51. package/bundle/docs/cli/settings.md +1 -1
  52. package/bundle/docs/cli/tutorials/memory-management.md +1 -1
  53. package/bundle/docs/extensions/releasing.md +58 -24
  54. package/bundle/docs/reference/configuration.md +14 -1
  55. package/bundle/docs/reference/keyboard-shortcuts.md +23 -0
  56. package/bundle/{gemini-QSTQ2DBG.js → gemini-6YGVETF3.js} +165 -61
  57. package/bundle/{gemini-GHUELHBF.js → gemini-7FCGNXOV.js} +350 -232
  58. package/bundle/gemini-IXZUGRVP.js +16360 -0
  59. package/bundle/{gemini-NQPVX5JC.js → gemini-WYTY4CD5.js} +165 -61
  60. package/bundle/gemini.js +8 -8
  61. package/bundle/{interactiveCli-AG2YWL2O.js → interactiveCli-A2FV6NYD.js} +1721 -1472
  62. package/bundle/{interactiveCli-MZFG35NB.js → interactiveCli-DWNRHVIB.js} +2003 -1736
  63. package/bundle/{interactiveCli-453M2IVE.js → interactiveCli-H7N4UXVQ.js} +1720 -1472
  64. package/bundle/interactiveCli-XRZEELCX.js +34754 -0
  65. package/bundle/{liteRtServerManager-G4Q7OVBX.js → liteRtServerManager-5C5EONBK.js} +5 -5
  66. package/bundle/{liteRtServerManager-S7WL25VD.js → liteRtServerManager-NQKPNCLR.js} +5 -5
  67. package/bundle/{liteRtServerManager-BXQ6VVWP.js → liteRtServerManager-UJBPII3P.js} +5 -5
  68. package/bundle/liteRtServerManager-UZCAJJCS.js +66 -0
  69. package/bundle/{memoryDiscovery-KSYZVCWF.js → memoryDiscovery-ALKMYAPP.js} +1 -1
  70. package/bundle/{memoryDiscovery-FB7MMKTA.js → memoryDiscovery-XFCKEF3F.js} +1 -1
  71. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  72. package/bundle/{oauth2-provider-VR4DL6AL.js → oauth2-provider-JNOY6NUI.js} +2 -2
  73. package/bundle/{oauth2-provider-H7G6RSFW.js → oauth2-provider-O6OA5EMU.js} +2 -2
  74. package/bundle/{oauth2-provider-5UF5WEE2.js → oauth2-provider-QYCLASEA.js} +39 -73
  75. package/bundle/oauth2-provider-VWLTUFO7.js +237 -0
  76. package/bundle/{start-CQBSKFYB.js → start-6FV3VPPH.js} +7 -7
  77. package/bundle/{start-NIMXQJYB.js → start-IWAUTCYF.js} +7 -7
  78. package/bundle/{start-2SKRN43X.js → start-L4DAQUQM.js} +7 -7
  79. package/bundle/start-XTXUKP77.js +19 -0
  80. package/package.json +1 -1
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  exitCli,
8
8
  require_source
9
- } from "./chunk-4SLGT6YD.js";
9
+ } from "./chunk-MFNKZZOB.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,14 +58,14 @@ import {
57
58
  stripUnsafeCharacters,
58
59
  toCodePoints,
59
60
  validateCustomTheme
60
- } from "./chunk-EDKX67D6.js";
61
+ } from "./chunk-2VH3SA6M.js";
61
62
  import {
62
63
  isDevelopment
63
- } from "./chunk-QOZSZYL7.js";
64
+ } from "./chunk-FK45PHSI.js";
64
65
  import {
65
66
  emptyIcon,
66
67
  require_react
67
- } from "./chunk-G2VTSEZ6.js";
68
+ } from "./chunk-5SMSFUPB.js";
68
69
  import {
69
70
  AsyncFzf,
70
71
  AuthType,
@@ -212,7 +213,7 @@ import {
212
213
  stripAnsi,
213
214
  tokenLimit,
214
215
  uiTelemetryService
215
- } from "./chunk-7VVHSNDQ.js";
216
+ } from "./chunk-LF33N5QM.js";
216
217
  import {
217
218
  ApprovalMode,
218
219
  CoreEvent,
@@ -239,7 +240,7 @@ import {
239
240
  shortenPath,
240
241
  tildeifyPath,
241
242
  unescapePath
242
- } from "./chunk-JEW7ZIWE.js";
243
+ } from "./chunk-M7OUJJZ2.js";
243
244
  import {
244
245
  require_src
245
246
  } from "./chunk-RJTRUG2J.js";
@@ -1742,8 +1743,8 @@ var require_react_reconciler_production = __commonJS({
1742
1743
  currentEntangledActionThenable = {
1743
1744
  status: "pending",
1744
1745
  value: void 0,
1745
- then: function(resolve8) {
1746
- entangledListeners.push(resolve8);
1746
+ then: function(resolve9) {
1747
+ entangledListeners.push(resolve9);
1747
1748
  }
1748
1749
  };
1749
1750
  }
@@ -1766,8 +1767,8 @@ var require_react_reconciler_production = __commonJS({
1766
1767
  status: "pending",
1767
1768
  value: null,
1768
1769
  reason: null,
1769
- then: function(resolve8) {
1770
- listeners.push(resolve8);
1770
+ then: function(resolve9) {
1771
+ listeners.push(resolve9);
1771
1772
  }
1772
1773
  };
1773
1774
  thenable.then(
@@ -9761,7 +9762,7 @@ var require_prompt = __commonJS({
9761
9762
  var require_text = __commonJS({
9762
9763
  "node_modules/prompts/dist/elements/text.js"(exports, module) {
9763
9764
  "use strict";
9764
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
9765
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
9765
9766
  try {
9766
9767
  var info = gen[key](arg);
9767
9768
  var value = info.value;
@@ -9770,7 +9771,7 @@ var require_text = __commonJS({
9770
9771
  return;
9771
9772
  }
9772
9773
  if (info.done) {
9773
- resolve8(value);
9774
+ resolve9(value);
9774
9775
  } else {
9775
9776
  Promise.resolve(value).then(_next, _throw);
9776
9777
  }
@@ -9778,13 +9779,13 @@ var require_text = __commonJS({
9778
9779
  function _asyncToGenerator(fn2) {
9779
9780
  return function() {
9780
9781
  var self = this, args = arguments;
9781
- return new Promise(function(resolve8, reject) {
9782
+ return new Promise(function(resolve9, reject) {
9782
9783
  var gen = fn2.apply(self, args);
9783
9784
  function _next(value) {
9784
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
9785
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
9785
9786
  }
9786
9787
  function _throw(err) {
9787
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
9788
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
9788
9789
  }
9789
9790
  _next(void 0);
9790
9791
  });
@@ -10500,7 +10501,7 @@ var require_dateparts = __commonJS({
10500
10501
  var require_date = __commonJS({
10501
10502
  "node_modules/prompts/dist/elements/date.js"(exports, module) {
10502
10503
  "use strict";
10503
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
10504
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
10504
10505
  try {
10505
10506
  var info = gen[key](arg);
10506
10507
  var value = info.value;
@@ -10509,7 +10510,7 @@ var require_date = __commonJS({
10509
10510
  return;
10510
10511
  }
10511
10512
  if (info.done) {
10512
- resolve8(value);
10513
+ resolve9(value);
10513
10514
  } else {
10514
10515
  Promise.resolve(value).then(_next, _throw);
10515
10516
  }
@@ -10517,13 +10518,13 @@ var require_date = __commonJS({
10517
10518
  function _asyncToGenerator(fn2) {
10518
10519
  return function() {
10519
10520
  var self = this, args = arguments;
10520
- return new Promise(function(resolve8, reject) {
10521
+ return new Promise(function(resolve9, reject) {
10521
10522
  var gen = fn2.apply(self, args);
10522
10523
  function _next(value) {
10523
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
10524
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
10524
10525
  }
10525
10526
  function _throw(err) {
10526
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
10527
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
10527
10528
  }
10528
10529
  _next(void 0);
10529
10530
  });
@@ -10726,7 +10727,7 @@ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
10726
10727
  var require_number = __commonJS({
10727
10728
  "node_modules/prompts/dist/elements/number.js"(exports, module) {
10728
10729
  "use strict";
10729
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
10730
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
10730
10731
  try {
10731
10732
  var info = gen[key](arg);
10732
10733
  var value = info.value;
@@ -10735,7 +10736,7 @@ var require_number = __commonJS({
10735
10736
  return;
10736
10737
  }
10737
10738
  if (info.done) {
10738
- resolve8(value);
10739
+ resolve9(value);
10739
10740
  } else {
10740
10741
  Promise.resolve(value).then(_next, _throw);
10741
10742
  }
@@ -10743,13 +10744,13 @@ var require_number = __commonJS({
10743
10744
  function _asyncToGenerator(fn2) {
10744
10745
  return function() {
10745
10746
  var self = this, args = arguments;
10746
- return new Promise(function(resolve8, reject) {
10747
+ return new Promise(function(resolve9, reject) {
10747
10748
  var gen = fn2.apply(self, args);
10748
10749
  function _next(value) {
10749
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
10750
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
10750
10751
  }
10751
10752
  function _throw(err) {
10752
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
10753
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
10753
10754
  }
10754
10755
  _next(void 0);
10755
10756
  });
@@ -11172,7 +11173,7 @@ Instructions:
11172
11173
  var require_autocomplete = __commonJS({
11173
11174
  "node_modules/prompts/dist/elements/autocomplete.js"(exports, module) {
11174
11175
  "use strict";
11175
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
11176
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
11176
11177
  try {
11177
11178
  var info = gen[key](arg);
11178
11179
  var value = info.value;
@@ -11181,7 +11182,7 @@ var require_autocomplete = __commonJS({
11181
11182
  return;
11182
11183
  }
11183
11184
  if (info.done) {
11184
- resolve8(value);
11185
+ resolve9(value);
11185
11186
  } else {
11186
11187
  Promise.resolve(value).then(_next, _throw);
11187
11188
  }
@@ -11189,13 +11190,13 @@ var require_autocomplete = __commonJS({
11189
11190
  function _asyncToGenerator(fn2) {
11190
11191
  return function() {
11191
11192
  var self = this, args = arguments;
11192
- return new Promise(function(resolve8, reject) {
11193
+ return new Promise(function(resolve9, reject) {
11193
11194
  var gen = fn2.apply(self, args);
11194
11195
  function _next(value) {
11195
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
11196
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
11196
11197
  }
11197
11198
  function _throw(err) {
11198
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
11199
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
11199
11200
  }
11200
11201
  _next(void 0);
11201
11202
  });
@@ -11826,7 +11827,7 @@ var require_dist = __commonJS({
11826
11827
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
11827
11828
  return arr2;
11828
11829
  }
11829
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
11830
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
11830
11831
  try {
11831
11832
  var info = gen[key](arg);
11832
11833
  var value = info.value;
@@ -11835,7 +11836,7 @@ var require_dist = __commonJS({
11835
11836
  return;
11836
11837
  }
11837
11838
  if (info.done) {
11838
- resolve8(value);
11839
+ resolve9(value);
11839
11840
  } else {
11840
11841
  Promise.resolve(value).then(_next, _throw);
11841
11842
  }
@@ -11843,13 +11844,13 @@ var require_dist = __commonJS({
11843
11844
  function _asyncToGenerator(fn2) {
11844
11845
  return function() {
11845
11846
  var self = this, args = arguments;
11846
- return new Promise(function(resolve8, reject) {
11847
+ return new Promise(function(resolve9, reject) {
11847
11848
  var gen = fn2.apply(self, args);
11848
11849
  function _next(value) {
11849
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
11850
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
11850
11851
  }
11851
11852
  function _throw(err) {
11852
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
11853
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
11853
11854
  }
11854
11855
  _next(void 0);
11855
11856
  });
@@ -14186,7 +14187,7 @@ var require_get_stream = __commonJS({
14186
14187
  };
14187
14188
  const { maxBuffer } = options;
14188
14189
  let stream;
14189
- await new Promise((resolve8, reject) => {
14190
+ await new Promise((resolve9, reject) => {
14190
14191
  const rejectPromise = (error) => {
14191
14192
  if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
14192
14193
  error.bufferedData = stream.getBufferedValue();
@@ -14198,7 +14199,7 @@ var require_get_stream = __commonJS({
14198
14199
  rejectPromise(error);
14199
14200
  return;
14200
14201
  }
14201
- resolve8();
14202
+ resolve9();
14202
14203
  });
14203
14204
  stream.on("data", () => {
14204
14205
  if (stream.getBufferedLength() > maxBuffer) {
@@ -14274,7 +14275,7 @@ var require_pend = __commonJS({
14274
14275
  // node_modules/fd-slicer/index.js
14275
14276
  var require_fd_slicer = __commonJS({
14276
14277
  "node_modules/fd-slicer/index.js"(exports) {
14277
- var fs38 = __require("fs");
14278
+ var fs39 = __require("fs");
14278
14279
  var util2 = __require("util");
14279
14280
  var stream = __require("stream");
14280
14281
  var Readable = stream.Readable;
@@ -14299,7 +14300,7 @@ var require_fd_slicer = __commonJS({
14299
14300
  FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
14300
14301
  var self = this;
14301
14302
  self.pend.go(function(cb) {
14302
- fs38.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
14303
+ fs39.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
14303
14304
  cb();
14304
14305
  callback(err, bytesRead, buffer2);
14305
14306
  });
@@ -14308,7 +14309,7 @@ var require_fd_slicer = __commonJS({
14308
14309
  FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
14309
14310
  var self = this;
14310
14311
  self.pend.go(function(cb) {
14311
- fs38.write(self.fd, buffer, offset, length, position, function(err, written, buffer2) {
14312
+ fs39.write(self.fd, buffer, offset, length, position, function(err, written, buffer2) {
14312
14313
  cb();
14313
14314
  callback(err, written, buffer2);
14314
14315
  });
@@ -14329,7 +14330,7 @@ var require_fd_slicer = __commonJS({
14329
14330
  if (self.refCount > 0) return;
14330
14331
  if (self.refCount < 0) throw new Error("invalid unref");
14331
14332
  if (self.autoClose) {
14332
- fs38.close(self.fd, onCloseDone);
14333
+ fs39.close(self.fd, onCloseDone);
14333
14334
  }
14334
14335
  function onCloseDone(err) {
14335
14336
  if (err) {
@@ -14366,7 +14367,7 @@ var require_fd_slicer = __commonJS({
14366
14367
  self.context.pend.go(function(cb) {
14367
14368
  if (self.destroyed) return cb();
14368
14369
  var buffer = new Buffer(toRead);
14369
- fs38.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
14370
+ fs39.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
14370
14371
  if (err) {
14371
14372
  self.destroy(err);
14372
14373
  } else if (bytesRead === 0) {
@@ -14413,7 +14414,7 @@ var require_fd_slicer = __commonJS({
14413
14414
  }
14414
14415
  self.context.pend.go(function(cb) {
14415
14416
  if (self.destroyed) return cb();
14416
- fs38.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err2, bytes) {
14417
+ fs39.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err2, bytes) {
14417
14418
  if (err2) {
14418
14419
  self.destroy();
14419
14420
  cb();
@@ -14840,7 +14841,7 @@ var require_buffer_crc32 = __commonJS({
14840
14841
  // node_modules/yauzl/index.js
14841
14842
  var require_yauzl = __commonJS({
14842
14843
  "node_modules/yauzl/index.js"(exports) {
14843
- var fs38 = __require("fs");
14844
+ var fs39 = __require("fs");
14844
14845
  var zlib = __require("zlib");
14845
14846
  var fd_slicer = require_fd_slicer();
14846
14847
  var crc32 = require_buffer_crc32();
@@ -14858,7 +14859,7 @@ var require_yauzl = __commonJS({
14858
14859
  exports.ZipFile = ZipFile;
14859
14860
  exports.Entry = Entry;
14860
14861
  exports.RandomAccessReader = RandomAccessReader;
14861
- function open(path37, options, callback) {
14862
+ function open(path38, options, callback) {
14862
14863
  if (typeof options === "function") {
14863
14864
  callback = options;
14864
14865
  options = null;
@@ -14870,10 +14871,10 @@ var require_yauzl = __commonJS({
14870
14871
  if (options.validateEntrySizes == null) options.validateEntrySizes = true;
14871
14872
  if (options.strictFileNames == null) options.strictFileNames = false;
14872
14873
  if (callback == null) callback = defaultCallback;
14873
- fs38.open(path37, "r", function(err, fd) {
14874
+ fs39.open(path38, "r", function(err, fd) {
14874
14875
  if (err) return callback(err);
14875
14876
  fromFd(fd, options, function(err2, zipfile) {
14876
- if (err2) fs38.close(fd, defaultCallback);
14877
+ if (err2) fs39.close(fd, defaultCallback);
14877
14878
  callback(err2, zipfile);
14878
14879
  });
14879
14880
  });
@@ -14890,7 +14891,7 @@ var require_yauzl = __commonJS({
14890
14891
  if (options.validateEntrySizes == null) options.validateEntrySizes = true;
14891
14892
  if (options.strictFileNames == null) options.strictFileNames = false;
14892
14893
  if (callback == null) callback = defaultCallback;
14893
- fs38.fstat(fd, function(err, stats) {
14894
+ fs39.fstat(fd, function(err, stats) {
14894
14895
  if (err) return callback(err);
14895
14896
  var reader = fd_slicer.createFromFd(fd, { autoClose: true });
14896
14897
  fromRandomAccessReader(reader, stats.size, options, callback);
@@ -15470,9 +15471,9 @@ var require_yauzl = __commonJS({
15470
15471
  var require_extract_zip = __commonJS({
15471
15472
  "node_modules/extract-zip/index.js"(exports, module) {
15472
15473
  var debug = require_src()("extract-zip");
15473
- var { createWriteStream: createWriteStream5, promises: fs38 } = __require("fs");
15474
+ var { createWriteStream: createWriteStream5, promises: fs39 } = __require("fs");
15474
15475
  var getStream = require_get_stream();
15475
- var path37 = __require("path");
15476
+ var path38 = __require("path");
15476
15477
  var { promisify: promisify5 } = __require("util");
15477
15478
  var stream = __require("stream");
15478
15479
  var yauzl = require_yauzl();
@@ -15487,7 +15488,7 @@ var require_extract_zip = __commonJS({
15487
15488
  debug("opening", this.zipPath, "with opts", this.opts);
15488
15489
  this.zipfile = await openZip(this.zipPath, { lazyEntries: true });
15489
15490
  this.canceled = false;
15490
- return new Promise((resolve8, reject) => {
15491
+ return new Promise((resolve9, reject) => {
15491
15492
  this.zipfile.on("error", (err) => {
15492
15493
  this.canceled = true;
15493
15494
  reject(err);
@@ -15496,7 +15497,7 @@ var require_extract_zip = __commonJS({
15496
15497
  this.zipfile.on("close", () => {
15497
15498
  if (!this.canceled) {
15498
15499
  debug("zip extraction complete");
15499
- resolve8();
15500
+ resolve9();
15500
15501
  }
15501
15502
  });
15502
15503
  this.zipfile.on("entry", async (entry) => {
@@ -15509,12 +15510,12 @@ var require_extract_zip = __commonJS({
15509
15510
  this.zipfile.readEntry();
15510
15511
  return;
15511
15512
  }
15512
- const destDir = path37.dirname(path37.join(this.opts.dir, entry.fileName));
15513
+ const destDir = path38.dirname(path38.join(this.opts.dir, entry.fileName));
15513
15514
  try {
15514
- await fs38.mkdir(destDir, { recursive: true });
15515
- const canonicalDestDir = await fs38.realpath(destDir);
15516
- const relativeDestDir = path37.relative(this.opts.dir, canonicalDestDir);
15517
- if (relativeDestDir.split(path37.sep).includes("..")) {
15515
+ await fs39.mkdir(destDir, { recursive: true });
15516
+ const canonicalDestDir = await fs39.realpath(destDir);
15517
+ const relativeDestDir = path38.relative(this.opts.dir, canonicalDestDir);
15518
+ if (relativeDestDir.split(path38.sep).includes("..")) {
15518
15519
  throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
15519
15520
  }
15520
15521
  await this.extractEntry(entry);
@@ -15536,7 +15537,7 @@ var require_extract_zip = __commonJS({
15536
15537
  if (this.opts.onEntry) {
15537
15538
  this.opts.onEntry(entry, this.zipfile);
15538
15539
  }
15539
- const dest = path37.join(this.opts.dir, entry.fileName);
15540
+ const dest = path38.join(this.opts.dir, entry.fileName);
15540
15541
  const mode = entry.externalFileAttributes >> 16 & 65535;
15541
15542
  const IFMT = 61440;
15542
15543
  const IFDIR = 16384;
@@ -15550,20 +15551,20 @@ var require_extract_zip = __commonJS({
15550
15551
  if (!isDir) isDir = madeBy === 0 && entry.externalFileAttributes === 16;
15551
15552
  debug("extracting entry", { filename: entry.fileName, isDir, isSymlink: symlink2 });
15552
15553
  const procMode = this.getExtractedMode(mode, isDir) & 511;
15553
- const destDir = isDir ? dest : path37.dirname(dest);
15554
+ const destDir = isDir ? dest : path38.dirname(dest);
15554
15555
  const mkdirOptions = { recursive: true };
15555
15556
  if (isDir) {
15556
15557
  mkdirOptions.mode = procMode;
15557
15558
  }
15558
15559
  debug("mkdir", { dir: destDir, ...mkdirOptions });
15559
- await fs38.mkdir(destDir, mkdirOptions);
15560
+ await fs39.mkdir(destDir, mkdirOptions);
15560
15561
  if (isDir) return;
15561
15562
  debug("opening read stream", dest);
15562
15563
  const readStream = await promisify5(this.zipfile.openReadStream.bind(this.zipfile))(entry);
15563
15564
  if (symlink2) {
15564
15565
  const link2 = await getStream(readStream);
15565
15566
  debug("creating symlink", link2, dest);
15566
- await fs38.symlink(link2, dest);
15567
+ await fs39.symlink(link2, dest);
15567
15568
  } else {
15568
15569
  await pipeline2(readStream, createWriteStream5(dest, { mode: procMode }));
15569
15570
  }
@@ -15592,11 +15593,11 @@ var require_extract_zip = __commonJS({
15592
15593
  };
15593
15594
  module.exports = async function(zipPath, opts) {
15594
15595
  debug("creating target directory", opts.dir);
15595
- if (!path37.isAbsolute(opts.dir)) {
15596
+ if (!path38.isAbsolute(opts.dir)) {
15596
15597
  throw new Error("Target directory is expected to be absolute");
15597
15598
  }
15598
- await fs38.mkdir(opts.dir, { recursive: true });
15599
- opts.dir = await fs38.realpath(opts.dir);
15599
+ await fs39.mkdir(opts.dir, { recursive: true });
15600
+ opts.dir = await fs39.realpath(opts.dir);
15600
15601
  return new Extractor(zipPath, opts).extract();
15601
15602
  };
15602
15603
  }
@@ -17053,7 +17054,7 @@ var require_strip_final_newline = __commonJS({
17053
17054
  var require_npm_run_path = __commonJS({
17054
17055
  "node_modules/run-jxa/node_modules/npm-run-path/index.js"(exports, module) {
17055
17056
  "use strict";
17056
- var path37 = __require("path");
17057
+ var path38 = __require("path");
17057
17058
  var pathKey = require_path_key();
17058
17059
  var npmRunPath = (options) => {
17059
17060
  options = {
@@ -17063,16 +17064,16 @@ var require_npm_run_path = __commonJS({
17063
17064
  ...options
17064
17065
  };
17065
17066
  let previous;
17066
- let cwdPath = path37.resolve(options.cwd);
17067
+ let cwdPath = path38.resolve(options.cwd);
17067
17068
  const result = [];
17068
17069
  while (previous !== cwdPath) {
17069
- result.push(path37.join(cwdPath, "node_modules/.bin"));
17070
+ result.push(path38.join(cwdPath, "node_modules/.bin"));
17070
17071
  previous = cwdPath;
17071
- cwdPath = path37.resolve(cwdPath, "..");
17072
+ cwdPath = path38.resolve(cwdPath, "..");
17072
17073
  }
17073
- const execPathDir = path37.resolve(options.cwd, options.execPath, "..");
17074
+ const execPathDir = path38.resolve(options.cwd, options.execPath, "..");
17074
17075
  result.push(execPathDir);
17075
- return result.concat(options.path).join(path37.delimiter);
17076
+ return result.concat(options.path).join(path38.delimiter);
17076
17077
  };
17077
17078
  module.exports = npmRunPath;
17078
17079
  module.exports.default = npmRunPath;
@@ -17082,9 +17083,9 @@ var require_npm_run_path = __commonJS({
17082
17083
  ...options
17083
17084
  };
17084
17085
  const env3 = { ...options.env };
17085
- const path38 = pathKey({ env: env3 });
17086
- options.path = env3[path38];
17087
- env3[path38] = module.exports(options);
17086
+ const path39 = pathKey({ env: env3 });
17087
+ options.path = env3[path39];
17088
+ env3[path39] = module.exports(options);
17088
17089
  return env3;
17089
17090
  };
17090
17091
  }
@@ -17807,7 +17808,7 @@ var require_signal_exit3 = __commonJS({
17807
17808
  var require_kill = __commonJS({
17808
17809
  "node_modules/run-jxa/node_modules/execa/lib/kill.js"(exports, module) {
17809
17810
  "use strict";
17810
- var os8 = __require("os");
17811
+ var os9 = __require("os");
17811
17812
  var onExit = require_signal_exit3();
17812
17813
  var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
17813
17814
  var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
@@ -17831,7 +17832,7 @@ var require_kill = __commonJS({
17831
17832
  return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
17832
17833
  };
17833
17834
  var isSigterm = (signal) => {
17834
- return signal === os8.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
17835
+ return signal === os9.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
17835
17836
  };
17836
17837
  var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
17837
17838
  if (forceKillAfterTimeout === true) {
@@ -17857,7 +17858,7 @@ var require_kill = __commonJS({
17857
17858
  return spawnedPromise;
17858
17859
  }
17859
17860
  let timeoutId;
17860
- const timeoutPromise = new Promise((resolve8, reject) => {
17861
+ const timeoutPromise = new Promise((resolve9, reject) => {
17861
17862
  timeoutId = setTimeout(() => {
17862
17863
  timeoutKill(spawned, killSignal, reject);
17863
17864
  }, timeout);
@@ -17963,7 +17964,7 @@ var require_get_stream2 = __commonJS({
17963
17964
  };
17964
17965
  const { maxBuffer } = options;
17965
17966
  const stream2 = bufferStream(options);
17966
- await new Promise((resolve8, reject) => {
17967
+ await new Promise((resolve9, reject) => {
17967
17968
  const rejectPromise = (error) => {
17968
17969
  if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
17969
17970
  error.bufferedData = stream2.getBufferedValue();
@@ -17973,7 +17974,7 @@ var require_get_stream2 = __commonJS({
17973
17974
  (async () => {
17974
17975
  try {
17975
17976
  await streamPipelinePromisified(inputStream, stream2);
17976
- resolve8();
17977
+ resolve9();
17977
17978
  } catch (error) {
17978
17979
  rejectPromise(error);
17979
17980
  }
@@ -18130,9 +18131,9 @@ var require_promise = __commonJS({
18130
18131
  return spawned;
18131
18132
  };
18132
18133
  var getSpawnedPromise = (spawned) => {
18133
- return new Promise((resolve8, reject) => {
18134
+ return new Promise((resolve9, reject) => {
18134
18135
  spawned.on("exit", (exitCode, signal) => {
18135
- resolve8({ exitCode, signal });
18136
+ resolve9({ exitCode, signal });
18136
18137
  });
18137
18138
  spawned.on("error", (error) => {
18138
18139
  reject(error);
@@ -18200,7 +18201,7 @@ var require_command = __commonJS({
18200
18201
  var require_execa = __commonJS({
18201
18202
  "node_modules/run-jxa/node_modules/execa/index.js"(exports, module) {
18202
18203
  "use strict";
18203
- var path37 = __require("path");
18204
+ var path38 = __require("path");
18204
18205
  var childProcess3 = __require("child_process");
18205
18206
  var crossSpawn = require_cross_spawn();
18206
18207
  var stripFinalNewline = require_strip_final_newline();
@@ -18242,7 +18243,7 @@ var require_execa = __commonJS({
18242
18243
  };
18243
18244
  options.env = getEnv(options);
18244
18245
  options.stdio = normalizeStdio(options);
18245
- if (process.platform === "win32" && path37.basename(file, ".exe") === "cmd") {
18246
+ if (process.platform === "win32" && path38.basename(file, ".exe") === "cmd") {
18246
18247
  args.unshift("/q");
18247
18248
  }
18248
18249
  return { file, args, options, parsed };
@@ -25599,13 +25600,13 @@ var setTextNodeValue = (node, text) => {
25599
25600
  markNodeAsDirty(node);
25600
25601
  };
25601
25602
  var getPathToRoot = (node) => {
25602
- const path37 = [];
25603
+ const path38 = [];
25603
25604
  let current = node;
25604
25605
  while (current) {
25605
- path37.unshift(current);
25606
+ path38.unshift(current);
25606
25607
  current = current.parentNode;
25607
25608
  }
25608
- return path37;
25609
+ return path38;
25609
25610
  };
25610
25611
  var isNodeSelectable = (node) => {
25611
25612
  let current = node;
@@ -30083,8 +30084,8 @@ function Text({ color, backgroundColor, dimColor = false, bold = false, italic =
30083
30084
  }
30084
30085
 
30085
30086
  // node_modules/ink/build/components/ErrorOverview.js
30086
- var cleanupPath = (path37) => {
30087
- return path37?.replace(`file://${cwd()}/`, "");
30087
+ var cleanupPath = (path38) => {
30088
+ return path38?.replace(`file://${cwd()}/`, "");
30088
30089
  };
30089
30090
  var stackUtils = new import_stack_utils.default({
30090
30091
  cwd: cwd(),
@@ -31280,12 +31281,12 @@ var TerminalWriter = class {
31280
31281
  if (chunk) {
31281
31282
  this.synchronizedWrite(chunk);
31282
31283
  }
31283
- await new Promise((resolve8) => {
31284
+ await new Promise((resolve9) => {
31284
31285
  let finished = false;
31285
31286
  const timer = setTimeout(() => {
31286
31287
  finished = true;
31287
31288
  this.cancelSlowFlush = void 0;
31288
- resolve8();
31289
+ resolve9();
31289
31290
  }, 50);
31290
31291
  this.cancelSlowFlush = () => {
31291
31292
  if (!finished) {
@@ -31296,7 +31297,7 @@ var TerminalWriter = class {
31296
31297
  this.outputBuffer = [];
31297
31298
  }
31298
31299
  this.cancelSlowFlush = void 0;
31299
- resolve8();
31300
+ resolve9();
31300
31301
  }
31301
31302
  };
31302
31303
  });
@@ -31687,8 +31688,8 @@ var AnimationController = class {
31687
31688
  if (!this.isRunning) {
31688
31689
  return;
31689
31690
  }
31690
- return new Promise((resolve8) => {
31691
- this.idleResolvers.push(resolve8);
31691
+ return new Promise((resolve9) => {
31692
+ this.idleResolvers.push(resolve9);
31692
31693
  });
31693
31694
  }
31694
31695
  /**
@@ -31728,8 +31729,8 @@ var AnimationController = class {
31728
31729
  clearInterval(this.intervalId);
31729
31730
  this.intervalId = void 0;
31730
31731
  }
31731
- for (const resolve8 of this.idleResolvers) {
31732
- resolve8();
31732
+ for (const resolve9 of this.idleResolvers) {
31733
+ resolve9();
31733
31734
  }
31734
31735
  this.idleResolvers = [];
31735
31736
  }
@@ -33234,11 +33235,11 @@ var TerminalBuffer = class {
33234
33235
  if (!this.worker?.connected) {
33235
33236
  return 0;
33236
33237
  }
33237
- return new Promise((resolve8) => {
33238
+ return new Promise((resolve9) => {
33238
33239
  const handler2 = (message) => {
33239
33240
  if (message.type === "linesUpdated") {
33240
33241
  this.worker?.off("message", handler2);
33241
- resolve8(message.count);
33242
+ resolve9(message.count);
33242
33243
  }
33243
33244
  };
33244
33245
  this.worker?.on("message", handler2);
@@ -33247,7 +33248,7 @@ var TerminalBuffer = class {
33247
33248
  } catch (error) {
33248
33249
  this.worker?.off("message", handler2);
33249
33250
  console.error("Failed to send getLinesUpdated message to worker:", error);
33250
- resolve8(0);
33251
+ resolve9(0);
33251
33252
  }
33252
33253
  });
33253
33254
  }
@@ -33759,8 +33760,8 @@ var Ink = class {
33759
33760
  }
33760
33761
  }
33761
33762
  async waitUntilExit() {
33762
- this.exitPromise ||= new Promise((resolve8, reject) => {
33763
- this.resolveExitPromise = resolve8;
33763
+ this.exitPromise ||= new Promise((resolve9, reject) => {
33764
+ this.resolveExitPromise = resolve9;
33764
33765
  this.rejectExitPromise = reject;
33765
33766
  });
33766
33767
  return this.exitPromise;
@@ -34559,7 +34560,7 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
34559
34560
  process.on("exit", cleanupTerminalOnExit);
34560
34561
  process.on("SIGTERM", cleanupTerminalOnExit);
34561
34562
  process.on("SIGINT", cleanupTerminalOnExit);
34562
- return new Promise((resolve8) => {
34563
+ return new Promise((resolve9) => {
34563
34564
  const originalRawMode = process.stdin.isRaw;
34564
34565
  if (!originalRawMode) {
34565
34566
  process.stdin.setRawMode(true);
@@ -34580,7 +34581,7 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
34580
34581
  process.stdin.setRawMode(false);
34581
34582
  }
34582
34583
  this.detectionComplete = true;
34583
- resolve8();
34584
+ resolve9();
34584
34585
  };
34585
34586
  timeoutId = setTimeout(cleanup, 1e3);
34586
34587
  const onData = (data) => {
@@ -38973,7 +38974,6 @@ var ThemeManager = class {
38973
38974
  try {
38974
38975
  const theme2 = createCustomTheme(themeWithDefaults);
38975
38976
  this.extensionThemes.set(namespacedName, theme2);
38976
- debugLogger.log(`Registered theme: ${namespacedName}`);
38977
38977
  } catch (error) {
38978
38978
  debugLogger.warn(
38979
38979
  `Failed to load custom theme "${namespacedName}":`,
@@ -38999,7 +38999,6 @@ var ThemeManager = class {
38999
38999
  for (const theme2 of customThemes) {
39000
39000
  const namespacedName = `${theme2.name} (${extensionName})`;
39001
39001
  this.extensionThemes.delete(namespacedName);
39002
- debugLogger.log(`Unregistered theme: ${namespacedName}`);
39003
39002
  }
39004
39003
  }
39005
39004
  /**
@@ -40278,25 +40277,25 @@ async function promptForConsentNonInteractive(prompt, defaultValue = true) {
40278
40277
  input: process.stdin,
40279
40278
  output: process.stdout
40280
40279
  });
40281
- return new Promise((resolve8) => {
40280
+ return new Promise((resolve9) => {
40282
40281
  rl.question(prompt, (answer) => {
40283
40282
  rl.close();
40284
40283
  const trimmedAnswer = answer.trim().toLowerCase();
40285
40284
  if (trimmedAnswer === "") {
40286
- resolve8(defaultValue);
40285
+ resolve9(defaultValue);
40287
40286
  } else {
40288
- resolve8(["y", "yes"].includes(trimmedAnswer));
40287
+ resolve9(["y", "yes"].includes(trimmedAnswer));
40289
40288
  }
40290
40289
  });
40291
40290
  });
40292
40291
  }
40293
40292
  async function promptForConsentInteractive(prompt, addExtensionUpdateConfirmationRequest, clearConfirmationRequest) {
40294
- return new Promise((resolve8) => {
40293
+ return new Promise((resolve9) => {
40295
40294
  addExtensionUpdateConfirmationRequest({
40296
40295
  prompt,
40297
40296
  onConfirm: (resolvedConfirmed) => {
40298
40297
  clearConfirmationRequest?.();
40299
- setImmediate(() => resolve8(resolvedConfirmed));
40298
+ setImmediate(() => resolve9(resolvedConfirmed));
40300
40299
  }
40301
40300
  });
40302
40301
  });
@@ -40461,10 +40460,7 @@ function recursivelyHydrateStrings(obj, values) {
40461
40460
  }
40462
40461
  if (Array.isArray(obj)) {
40463
40462
  return obj.map(
40464
- (item) => (
40465
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
40466
- recursivelyHydrateStrings(item, values)
40467
- )
40463
+ (item) => recursivelyHydrateStrings(item, values)
40468
40464
  );
40469
40465
  }
40470
40466
  if (typeof obj === "object" && obj !== null) {
@@ -40559,7 +40555,9 @@ async function maybePromptForSettings(extensionConfig, extensionId, requestSetti
40559
40555
  settingsChanges.promptForEnv
40560
40556
  )) {
40561
40557
  const answer = await requestSetting(setting);
40562
- allSettings[setting.envVar] = answer;
40558
+ if (answer !== void 0) {
40559
+ allSettings[setting.envVar] = answer;
40560
+ }
40563
40561
  }
40564
40562
  const nonSensitiveSettings = {};
40565
40563
  for (const setting of settings) {
@@ -40610,7 +40608,7 @@ async function promptForSetting(setting) {
40610
40608
  message: `${setting.name}
40611
40609
  ${setting.description}`
40612
40610
  });
40613
- return response.value;
40611
+ return typeof response.value === "string" ? response.value : void 0;
40614
40612
  }
40615
40613
  async function getScopedEnvContents(extensionConfig, extensionId, scope, workspaceDir) {
40616
40614
  const { name: extensionName } = extensionConfig;
@@ -40669,6 +40667,9 @@ async function updateSetting(extensionConfig, extensionId, settingKey, requestSe
40669
40667
  return;
40670
40668
  }
40671
40669
  const newValue = await requestSetting(settingToUpdate);
40670
+ if (newValue === void 0) {
40671
+ return;
40672
+ }
40672
40673
  const keychain = new KeychainTokenStorage(
40673
40674
  getKeychainStorageName(extensionName, extensionId, scope, workspaceDir)
40674
40675
  );
@@ -40817,8 +40818,8 @@ var Override = class _Override {
40817
40818
  output() {
40818
40819
  return `${this.isDisable ? "!" : ""}${this.baseRule}${this.includeSubdirs ? "*" : ""}`;
40819
40820
  }
40820
- matchesPath(path37) {
40821
- return this.asRegex().test(path37);
40821
+ matchesPath(path38) {
40822
+ return this.asRegex().test(path38);
40822
40823
  }
40823
40824
  };
40824
40825
  var ensureLeadingAndTrailingSlash = function(dirPath) {
@@ -40889,7 +40890,12 @@ var ExtensionEnablementManager = class {
40889
40890
  readConfig() {
40890
40891
  try {
40891
40892
  const content = fs12.readFileSync(this.configFilePath, "utf-8");
40892
- return JSON.parse(content);
40893
+ const parsed = JSON.parse(content);
40894
+ const schema = external_exports.record(
40895
+ external_exports.string(),
40896
+ external_exports.object({ overrides: external_exports.array(external_exports.string()) })
40897
+ );
40898
+ return schema.parse(parsed);
40893
40899
  } catch (error) {
40894
40900
  if (error instanceof Error && "code" in error && error.code === "ENOENT") {
40895
40901
  return {};
@@ -43959,7 +43965,7 @@ async function fetchJson(url, redirectCount = 0) {
43959
43965
  if (token) {
43960
43966
  headers.Authorization = `token ${token}`;
43961
43967
  }
43962
- return new Promise((resolve8, reject) => {
43968
+ return new Promise((resolve9, reject) => {
43963
43969
  https.get(url, { headers }, (res) => {
43964
43970
  if (res.statusCode === 302 || res.statusCode === 301) {
43965
43971
  if (redirectCount >= 10) {
@@ -43972,7 +43978,7 @@ async function fetchJson(url, redirectCount = 0) {
43972
43978
  fetchJson(
43973
43979
  new URL(res.headers.location, url).toString(),
43974
43980
  redirectCount + 1
43975
- ).then(resolve8).catch(reject);
43981
+ ).then(resolve9).catch(reject);
43976
43982
  return;
43977
43983
  }
43978
43984
  if (res.statusCode !== 200) {
@@ -43984,7 +43990,7 @@ async function fetchJson(url, redirectCount = 0) {
43984
43990
  res.on("data", (chunk) => chunks.push(chunk));
43985
43991
  res.on("end", () => {
43986
43992
  const data = Buffer.concat(chunks).toString();
43987
- resolve8(JSON.parse(data));
43993
+ resolve9(JSON.parse(data));
43988
43994
  });
43989
43995
  }).on("error", reject);
43990
43996
  });
@@ -44344,7 +44350,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44344
44350
  if (token) {
44345
44351
  headers["Authorization"] = `token ${token}`;
44346
44352
  }
44347
- return new Promise((resolve8, reject) => {
44353
+ return new Promise((resolve9, reject) => {
44348
44354
  https2.get(url, { headers }, (res) => {
44349
44355
  if (res.statusCode === 302 || res.statusCode === 301) {
44350
44356
  if (redirectCount >= 10) {
@@ -44355,7 +44361,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44355
44361
  new Error("Redirect response missing Location header")
44356
44362
  );
44357
44363
  }
44358
- downloadFile(res.headers.location, dest, options, redirectCount + 1).then(resolve8).catch(reject);
44364
+ downloadFile(res.headers.location, dest, options, redirectCount + 1).then(resolve9).catch(reject);
44359
44365
  return;
44360
44366
  }
44361
44367
  if (res.statusCode !== 200) {
@@ -44365,7 +44371,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44365
44371
  }
44366
44372
  const file = fs15.createWriteStream(dest);
44367
44373
  res.pipe(file);
44368
- file.on("finish", () => file.close(resolve8));
44374
+ file.on("finish", () => file.close(resolve9));
44369
44375
  }).on("error", reject);
44370
44376
  });
44371
44377
  }
@@ -44396,7 +44402,7 @@ var defaultRequestConfirmation = async (message) => {
44396
44402
  message,
44397
44403
  initial: false
44398
44404
  });
44399
- return response.confirm;
44405
+ return typeof response.confirm === "boolean" ? response.confirm : false;
44400
44406
  };
44401
44407
  async function getExtensionManager() {
44402
44408
  const workspaceDir = process.cwd();
@@ -45524,7 +45530,7 @@ function validateName(name) {
45524
45530
  }
45525
45531
  }
45526
45532
  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:")) {
45533
+ if (source2.startsWith("http://") || source2.startsWith("https://") || source2.startsWith("git@") || source2.startsWith("sso://") || source2.startsWith("github:") || source2.startsWith("gitlab:") || source2.startsWith("ssh://")) {
45528
45534
  return {
45529
45535
  source: source2,
45530
45536
  type: "git",
@@ -45846,9 +45852,9 @@ function isSettingsValue(value) {
45846
45852
  const type = typeof value;
45847
45853
  return type === "string" || type === "number" || type === "boolean" || type === "object";
45848
45854
  }
45849
- function getNestedValue(obj, path37) {
45855
+ function getNestedValue(obj, path38) {
45850
45856
  let current = obj;
45851
- for (const key of path37) {
45857
+ for (const key of path38) {
45852
45858
  if (!isRecord(current) || !(key in current)) {
45853
45859
  return void 0;
45854
45860
  }
@@ -45861,8 +45867,8 @@ function getEffectiveValue(key, settings) {
45861
45867
  if (!definition) {
45862
45868
  return void 0;
45863
45869
  }
45864
- const path37 = key.split(".");
45865
- const value = getNestedValue(settings, path37);
45870
+ const path38 = key.split(".");
45871
+ const value = getNestedValue(settings, path38);
45866
45872
  if (value !== void 0 && isSettingsValue(value)) {
45867
45873
  return value;
45868
45874
  }
@@ -45872,8 +45878,8 @@ function getDialogSettingKeys() {
45872
45878
  return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
45873
45879
  }
45874
45880
  function isInSettingsScope(key, scopeSettings) {
45875
- const path37 = key.split(".");
45876
- const value = getNestedValue(scopeSettings, path37);
45881
+ const path38 = key.split(".");
45882
+ const value = getNestedValue(scopeSettings, path38);
45877
45883
  return value !== void 0;
45878
45884
  }
45879
45885
  function getDisplayValue(key, scopeSettings, _mergedSettings) {
@@ -46938,7 +46944,7 @@ async function writeClipboardImages(filePaths) {
46938
46944
  if (process22.platform !== "darwin") {
46939
46945
  return;
46940
46946
  }
46941
- const paths = filePaths.map((path37) => path37 instanceof URL ? fileURLToPath2(path37) : path37);
46947
+ const paths = filePaths.map((path38) => path38 instanceof URL ? fileURLToPath2(path38) : path38);
46942
46948
  await runJxa((...paths2) => {
46943
46949
  ObjC.import("AppKit");
46944
46950
  ObjC.import("Foundation");
@@ -47441,7 +47447,7 @@ var OSC52_FOOTER = BEL3;
47441
47447
  var MAX_OSC52_BODY_B64_BYTES = MAX_OSC52_SEQUENCE_BYTES - Buffer.byteLength(OSC52_HEADER) - Buffer.byteLength(OSC52_FOOTER);
47442
47448
  var MAX_OSC52_DATA_BYTES = Math.floor(MAX_OSC52_BODY_B64_BYTES / 4) * 3;
47443
47449
  var SCREEN_DCS_CHUNK_SIZE = 240;
47444
- var pickTty = () => new Promise((resolve8) => {
47450
+ var pickTty = () => new Promise((resolve9) => {
47445
47451
  if (process.platform !== "win32") {
47446
47452
  try {
47447
47453
  const devTty = fs22.createWriteStream("/dev/tty");
@@ -47449,25 +47455,25 @@ var pickTty = () => new Promise((resolve8) => {
47449
47455
  devTty.removeAllListeners("open");
47450
47456
  devTty.removeAllListeners("error");
47451
47457
  devTty.destroy();
47452
- resolve8(getStdioTty());
47458
+ resolve9(getStdioTty());
47453
47459
  }, 100);
47454
47460
  devTty.once("open", () => {
47455
47461
  clearTimeout(timeout);
47456
47462
  devTty.removeAllListeners("error");
47457
47463
  devTty.on("error", () => {
47458
47464
  });
47459
- resolve8({ stream: devTty, closeAfter: true });
47465
+ resolve9({ stream: devTty, closeAfter: true });
47460
47466
  });
47461
47467
  devTty.once("error", () => {
47462
47468
  clearTimeout(timeout);
47463
47469
  devTty.removeAllListeners("open");
47464
- resolve8(getStdioTty());
47470
+ resolve9(getStdioTty());
47465
47471
  });
47466
47472
  return;
47467
47473
  } catch {
47468
47474
  }
47469
47475
  }
47470
- resolve8(getStdioTty());
47476
+ resolve9(getStdioTty());
47471
47477
  });
47472
47478
  var getStdioTty = () => {
47473
47479
  if (process.platform === "win32") {
@@ -47521,12 +47527,12 @@ var wrapForScreen = (seq) => {
47521
47527
  }
47522
47528
  return out;
47523
47529
  };
47524
- var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47530
+ var writeAll = (stream, data) => new Promise((resolve9, reject) => {
47525
47531
  const fd = stream.fd;
47526
47532
  if (process.platform === "win32" && typeof fd === "number" && (stream === process.stdout || stream === process.stderr)) {
47527
47533
  try {
47528
47534
  fs22.writeSync(fd, data);
47529
- resolve8();
47535
+ resolve9();
47530
47536
  return;
47531
47537
  } catch (e) {
47532
47538
  debugLogger.warn(
@@ -47541,7 +47547,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47541
47547
  };
47542
47548
  const onDrain = () => {
47543
47549
  cleanup();
47544
- resolve8();
47550
+ resolve9();
47545
47551
  };
47546
47552
  const cleanup = () => {
47547
47553
  stream.off("error", onError);
@@ -47550,7 +47556,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47550
47556
  stream.once("error", onError);
47551
47557
  if (stream.write(data)) {
47552
47558
  cleanup();
47553
- resolve8();
47559
+ resolve9();
47554
47560
  } else {
47555
47561
  stream.once("drain", onDrain);
47556
47562
  }
@@ -47680,14 +47686,14 @@ function getUserLinuxClipboardTool() {
47680
47686
  }
47681
47687
  }
47682
47688
  async function saveFromCommand(command, args, destination) {
47683
- return new Promise((resolve8) => {
47689
+ return new Promise((resolve9) => {
47684
47690
  const child = spawn(command, args);
47685
47691
  const fileStream = createWriteStream2(destination);
47686
47692
  let resolved = false;
47687
47693
  const safeResolve = (value) => {
47688
47694
  if (!resolved) {
47689
47695
  resolved = true;
47690
- resolve8(value);
47696
+ resolve9(value);
47691
47697
  }
47692
47698
  };
47693
47699
  child.stdout.pipe(fileStream);
@@ -49545,7 +49551,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49545
49551
  throw err;
49546
49552
  }
49547
49553
  } else {
49548
- await new Promise((resolve8, reject) => {
49554
+ await new Promise((resolve9, reject) => {
49549
49555
  const child = spawn2(executable, [...initialArgs, ...args], {
49550
49556
  stdio: "inherit",
49551
49557
  shell: process.platform === "win32"
@@ -49570,7 +49576,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49570
49576
  );
49571
49577
  reject(err);
49572
49578
  } else {
49573
- resolve8();
49579
+ resolve9();
49574
49580
  }
49575
49581
  });
49576
49582
  });
@@ -53948,14 +53954,17 @@ var FileCommandLoader = class {
53948
53954
  getCommandDirectories() {
53949
53955
  const dirs = [];
53950
53956
  const storage = this.config?.storage ?? new Storage(this.projectRoot);
53957
+ const userCommandsDir = Storage.getUserCommandsDir();
53951
53958
  dirs.push({
53952
- path: Storage.getUserCommandsDir(),
53959
+ path: userCommandsDir,
53953
53960
  kind: "user-file" /* USER_FILE */
53954
53961
  });
53955
- dirs.push({
53956
- path: storage.getProjectCommandsDir(),
53957
- kind: "workspace-file" /* WORKSPACE_FILE */
53958
- });
53962
+ if (!storage.isWorkspaceHomeDir()) {
53963
+ dirs.push({
53964
+ path: storage.getProjectCommandsDir(),
53965
+ kind: "workspace-file" /* WORKSPACE_FILE */
53966
+ });
53967
+ }
53959
53968
  if (this.config) {
53960
53969
  const activeExtensions = this.config.getExtensions().filter((ext) => ext.isActive).sort((a, b2) => a.name.localeCompare(b2.name));
53961
53970
  const extensionCommandDirs = activeExtensions.map((ext) => ({
@@ -55960,10 +55969,10 @@ function enableFeature(settings, featureName, strategy) {
55960
55969
  };
55961
55970
  }
55962
55971
  const modifiedScopes = [];
55963
- for (const { scope, path: path37 } of foundInDisabledScopes) {
55972
+ for (const { scope, path: path38 } of foundInDisabledScopes) {
55964
55973
  if (isLoadableSettingScope(scope)) {
55965
55974
  strategy.enable(settings, scope, featureName);
55966
- modifiedScopes.push({ scope, path: path37 });
55975
+ modifiedScopes.push({ scope, path: path38 });
55967
55976
  }
55968
55977
  }
55969
55978
  return {
@@ -56454,7 +56463,7 @@ var authCommand = {
56454
56463
  import process28 from "node:process";
56455
56464
 
56456
56465
  // packages/cli/src/generated/git-commit.ts
56457
- var GIT_COMMIT_INFO = "68e2196d5";
56466
+ var GIT_COMMIT_INFO = "5ee05c775";
56458
56467
 
56459
56468
  // packages/cli/src/ui/utils/historyExportUtils.ts
56460
56469
  import * as fsPromises from "node:fs/promises";
@@ -57119,7 +57128,7 @@ var clearCommand = {
57119
57128
  if (hookSystem) {
57120
57129
  result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
57121
57130
  }
57122
- await new Promise((resolve8) => setImmediate(resolve8));
57131
+ await new Promise((resolve9) => setImmediate(resolve9));
57123
57132
  if (config) {
57124
57133
  await flushTelemetry(config);
57125
57134
  }
@@ -57393,10 +57402,85 @@ ${docsUrl}`
57393
57402
  }
57394
57403
  };
57395
57404
 
57405
+ // packages/cli/src/ui/commands/exportSessionCommand.ts
57406
+ import * as fs30 from "node:fs/promises";
57407
+ import * as path27 from "node:path";
57408
+ var exportSessionCommand = {
57409
+ name: "export-session",
57410
+ description: "Export the current session to a JSON file",
57411
+ kind: "built-in" /* BUILT_IN */,
57412
+ autoExecute: true,
57413
+ action: async (context) => {
57414
+ const { ui: ui2 } = context;
57415
+ const args = context.invocation?.args.trim();
57416
+ if (!args) {
57417
+ return {
57418
+ type: "message",
57419
+ messageType: "error",
57420
+ content: "Please provide a file path to export the session to. Example: /export-session ./my-session.json"
57421
+ };
57422
+ }
57423
+ const sessionId = context.services.agentContext?.config.getSessionId();
57424
+ if (!sessionId) {
57425
+ return {
57426
+ type: "message",
57427
+ messageType: "error",
57428
+ content: "No active session found to export."
57429
+ };
57430
+ }
57431
+ if (ui2.pendingItem) {
57432
+ ui2.addItem(
57433
+ {
57434
+ type: "error" /* ERROR */,
57435
+ text: "Operation already in progress, please wait."
57436
+ },
57437
+ Date.now()
57438
+ );
57439
+ return;
57440
+ }
57441
+ const pendingMessage = {
57442
+ type: "export_session" /* EXPORT_SESSION */,
57443
+ exportSession: {
57444
+ isPending: true
57445
+ }
57446
+ };
57447
+ try {
57448
+ ui2.setPendingItem(pendingMessage);
57449
+ const storage = context.services.agentContext.config.storage;
57450
+ const sessionSelector = new SessionSelector(storage);
57451
+ const { sessionData } = await sessionSelector.resolveSession(sessionId);
57452
+ const targetPath = path27.resolve(process.cwd(), args);
57453
+ await fs30.writeFile(
57454
+ targetPath,
57455
+ JSON.stringify(sessionData, null, 2),
57456
+ "utf-8"
57457
+ );
57458
+ ui2.addItem(
57459
+ {
57460
+ type: "export_session" /* EXPORT_SESSION */,
57461
+ exportSession: {
57462
+ isPending: false,
57463
+ targetPath
57464
+ }
57465
+ },
57466
+ Date.now()
57467
+ );
57468
+ } catch (error) {
57469
+ return {
57470
+ type: "message",
57471
+ messageType: "error",
57472
+ content: `Failed to export session: ${error instanceof Error ? error.message : "Unknown error"}`
57473
+ };
57474
+ } finally {
57475
+ ui2.setPendingItem(null);
57476
+ }
57477
+ }
57478
+ };
57479
+
57396
57480
  // packages/cli/src/ui/commands/directoryCommand.tsx
57397
57481
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
57398
- import * as path27 from "node:path";
57399
- import * as fs30 from "node:fs";
57482
+ import * as path28 from "node:path";
57483
+ import * as fs31 from "node:fs";
57400
57484
  async function finishAddingDirectories(config, addItem, added, errors) {
57401
57485
  if (!config) {
57402
57486
  addItem({
@@ -57464,15 +57548,15 @@ var directoryCommand = {
57464
57548
  if (context.services.agentContext?.config) {
57465
57549
  const workspaceContext = context.services.agentContext.config.getWorkspaceContext();
57466
57550
  const existingDirs = new Set(
57467
- workspaceContext.getDirectories().map((dir) => path27.resolve(dir))
57551
+ workspaceContext.getDirectories().map((dir) => path28.resolve(dir))
57468
57552
  );
57469
57553
  filteredSuggestions = suggestions.filter((s3) => {
57470
57554
  const expanded = expandHomeDir(s3);
57471
- const absolute = path27.resolve(expanded);
57555
+ const absolute = path28.resolve(expanded);
57472
57556
  if (existingDirs.has(absolute)) {
57473
57557
  return false;
57474
57558
  }
57475
- if (absolute.endsWith(path27.sep) && existingDirs.has(absolute.slice(0, -1))) {
57559
+ if (absolute.endsWith(path28.sep) && existingDirs.has(absolute.slice(0, -1))) {
57476
57560
  return false;
57477
57561
  }
57478
57562
  return true;
@@ -57522,11 +57606,11 @@ var directoryCommand = {
57522
57606
  const trimmedPath = pathToAdd.trim();
57523
57607
  const expandedPath = expandHomeDir(trimmedPath);
57524
57608
  try {
57525
- const absolutePath = path27.resolve(
57609
+ const absolutePath = path28.resolve(
57526
57610
  workspaceContext.targetDir,
57527
57611
  expandedPath
57528
57612
  );
57529
- const resolvedPath = fs30.realpathSync(absolutePath);
57613
+ const resolvedPath = fs31.realpathSync(absolutePath);
57530
57614
  if (currentWorkspaceDirs.includes(resolvedPath)) {
57531
57615
  alreadyAdded.push(trimmedPath);
57532
57616
  continue;
@@ -57552,7 +57636,7 @@ var directoryCommand = {
57552
57636
  const dirsToConfirm = [];
57553
57637
  const trustedDirs = [];
57554
57638
  for (const pathToAdd of pathsToProcess) {
57555
- const expandedPath = path27.resolve(expandHomeDir(pathToAdd.trim()));
57639
+ const expandedPath = path28.resolve(expandHomeDir(pathToAdd.trim()));
57556
57640
  const isTrusted = trustedFolders.isPathTrusted(expandedPath);
57557
57641
  if (isTrusted === true) {
57558
57642
  trustedDirs.push(pathToAdd.trim());
@@ -57773,14 +57857,14 @@ var ConfigExtensionDialog = ({
57773
57857
  [loggerAdapter]
57774
57858
  );
57775
57859
  const requestSetting = (0, import_react62.useCallback)(
57776
- async (setting) => new Promise((resolve8) => {
57860
+ async (setting) => new Promise((resolve9) => {
57777
57861
  if (!mounted.current) return;
57778
57862
  settingBuffer.setText("");
57779
57863
  setState({
57780
57864
  type: "ASK_SETTING",
57781
57865
  setting,
57782
57866
  resolve: (val) => {
57783
- resolve8(val);
57867
+ resolve9(val);
57784
57868
  setState({ type: "BUSY", message: "Updating..." });
57785
57869
  }
57786
57870
  });
@@ -57788,13 +57872,13 @@ var ConfigExtensionDialog = ({
57788
57872
  [settingBuffer]
57789
57873
  );
57790
57874
  const requestConfirmation = (0, import_react62.useCallback)(
57791
- async (message) => new Promise((resolve8) => {
57875
+ async (message) => new Promise((resolve9) => {
57792
57876
  if (!mounted.current) return;
57793
57877
  setState({
57794
57878
  type: "ASK_CONFIRMATION",
57795
57879
  message,
57796
57880
  resolve: (val) => {
57797
- resolve8(val);
57881
+ resolve9(val);
57798
57882
  setState({ type: "BUSY", message: "Processing..." });
57799
57883
  }
57800
57884
  });
@@ -58131,7 +58215,7 @@ function SearchableList({
58131
58215
  var import_react64 = __toESM(require_react(), 1);
58132
58216
 
58133
58217
  // packages/cli/src/config/extensionRegistryClient.ts
58134
- import * as fs31 from "node:fs/promises";
58218
+ import * as fs32 from "node:fs/promises";
58135
58219
  var ExtensionRegistryClient = class _ExtensionRegistryClient {
58136
58220
  static DEFAULT_REGISTRY_URL = "https://geminicli.com/extensions.json";
58137
58221
  static FETCH_TIMEOUT_MS = 1e4;
@@ -58209,7 +58293,7 @@ var ExtensionRegistryClient = class _ExtensionRegistryClient {
58209
58293
  return await response.json();
58210
58294
  } else {
58211
58295
  const filePath = resolveToRealPath(uri);
58212
- const content = await fs31.readFile(filePath, "utf-8");
58296
+ const content = await fs32.readFile(filePath, "utf-8");
58213
58297
  return JSON.parse(content);
58214
58298
  }
58215
58299
  } catch (error) {
@@ -58380,8 +58464,8 @@ function ExtensionDetails({
58380
58464
  if (keyMatchers["basic.confirm" /* RETURN */](key) && !isInstalled && !isInstalling) {
58381
58465
  setIsInstalling(true);
58382
58466
  void onInstall(
58383
- (prompt) => new Promise((resolve8) => {
58384
- setConsentRequest({ prompt, resolve: resolve8 });
58467
+ (prompt) => new Promise((resolve9) => {
58468
+ setConsentRequest({ prompt, resolve: resolve9 });
58385
58469
  })
58386
58470
  );
58387
58471
  return true;
@@ -58389,8 +58473,8 @@ function ExtensionDetails({
58389
58473
  if (keyMatchers["extension.link" /* LINK_EXTENSION */](key) && isLinkable && !isInstalled && !isInstalling) {
58390
58474
  setIsInstalling(true);
58391
58475
  void onLink(
58392
- (prompt) => new Promise((resolve8) => {
58393
- setConsentRequest({ prompt, resolve: resolve8 });
58476
+ (prompt) => new Promise((resolve9) => {
58477
+ setConsentRequest({ prompt, resolve: resolve9 });
58394
58478
  })
58395
58479
  );
58396
58480
  return true;
@@ -58794,7 +58878,7 @@ function updateAction(context, args) {
58794
58878
  }
58795
58879
  let resolveUpdateComplete;
58796
58880
  const updateComplete = new Promise(
58797
- (resolve8) => resolveUpdateComplete = resolve8
58881
+ (resolve9) => resolveUpdateComplete = resolve9
58798
58882
  );
58799
58883
  const extensions = context.services.agentContext?.config ? listExtensions(context.services.agentContext.config) : [];
58800
58884
  if (showMessageIfNoExtensions(context, extensions)) {
@@ -59503,6 +59587,7 @@ var ConsoleSummaryDisplay = ({
59503
59587
 
59504
59588
  // packages/cli/src/ui/components/Footer.tsx
59505
59589
  import process33 from "node:process";
59590
+ import os7 from "node:os";
59506
59591
 
59507
59592
  // packages/cli/src/ui/components/MemoryUsageDisplay.tsx
59508
59593
  var import_react69 = __toESM(require_react(), 1);
@@ -59673,6 +59758,11 @@ var ALL_ITEMS = [
59673
59758
  header: "session",
59674
59759
  description: "Unique identifier for the current session"
59675
59760
  },
59761
+ {
59762
+ id: "hostname",
59763
+ header: "machine",
59764
+ description: "Current machine hostname"
59765
+ },
59676
59766
  {
59677
59767
  id: "auth",
59678
59768
  header: "/auth",
@@ -59698,6 +59788,7 @@ var DEFAULT_ORDER = [
59698
59788
  "quota",
59699
59789
  "memory-usage",
59700
59790
  "session-id",
59791
+ "hostname",
59701
59792
  "auth",
59702
59793
  "code-changes",
59703
59794
  "token-count"
@@ -59746,6 +59837,7 @@ function resolveFooterState(settings) {
59746
59837
 
59747
59838
  // packages/cli/src/ui/components/Footer.tsx
59748
59839
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
59840
+ var HOSTNAME = os7.hostname();
59749
59841
  var CwdIndicator = ({
59750
59842
  targetDir,
59751
59843
  maxWidth,
@@ -60021,6 +60113,15 @@ var Footer = () => {
60021
60113
  );
60022
60114
  break;
60023
60115
  }
60116
+ case "hostname": {
60117
+ addCol(
60118
+ id,
60119
+ header,
60120
+ () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: itemColor, children: HOSTNAME }),
60121
+ HOSTNAME.length
60122
+ );
60123
+ break;
60124
+ }
60024
60125
  case "auth": {
60025
60126
  if (!settings.merged.ui.showUserIdentity) break;
60026
60127
  if (!authType) break;
@@ -60298,6 +60399,7 @@ var FooterConfigDialog = ({
60298
60399
  quota: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("quota", itemColor), children: "42% used" }),
60299
60400
  "memory-usage": /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("memory-usage", itemColor), children: "260 MB" }),
60300
60401
  "session-id": /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("session-id", itemColor), children: "769992f9" }),
60402
+ hostname: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("hostname", itemColor), children: "dev-machine" }),
60301
60403
  "code-changes": /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { flexDirection: "row", children: [
60302
60404
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes", theme.status.success), children: "+12" }),
60303
60405
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes"), children: " " }),
@@ -60467,7 +60569,7 @@ var import_react74 = __toESM(require_react(), 1);
60467
60569
  var import_react72 = __toESM(require_react(), 1);
60468
60570
 
60469
60571
  // packages/cli/src/ui/utils/rewindFileOps.ts
60470
- import fs32 from "node:fs/promises";
60572
+ import fs33 from "node:fs/promises";
60471
60573
  function calculateTurnStats(conversation, userMessage) {
60472
60574
  const msgIndex = conversation.messages.indexOf(userMessage);
60473
60575
  if (msgIndex === -1) return null;
@@ -60554,7 +60656,7 @@ async function revertFileChanges(conversation, targetMessageId) {
60554
60656
  try {
60555
60657
  let currentContent = null;
60556
60658
  try {
60557
- currentContent = await fs32.readFile(filePath, "utf8");
60659
+ currentContent = await fs33.readFile(filePath, "utf8");
60558
60660
  } catch (e) {
60559
60661
  const error = e;
60560
60662
  if ("code" in error && error.code === "ENOENT") {
@@ -60572,9 +60674,9 @@ async function revertFileChanges(conversation, targetMessageId) {
60572
60674
  }
60573
60675
  if (currentContent === newContent) {
60574
60676
  if (!isNewFile2) {
60575
- await fs32.writeFile(filePath, originalContent ?? "");
60677
+ await fs33.writeFile(filePath, originalContent ?? "");
60576
60678
  } else {
60577
- await fs32.unlink(filePath);
60679
+ await fs33.unlink(filePath);
60578
60680
  }
60579
60681
  } else if (currentContent !== null) {
60580
60682
  const originalText = originalContent ?? "";
@@ -60586,9 +60688,9 @@ async function revertFileChanges(conversation, targetMessageId) {
60586
60688
  const patchedContent = applyPatch(currentContent, undoPatch);
60587
60689
  if (typeof patchedContent === "string") {
60588
60690
  if (patchedContent === "" && isNewFile2) {
60589
- await fs32.unlink(filePath);
60691
+ await fs33.unlink(filePath);
60590
60692
  } else {
60591
- await fs32.writeFile(filePath, patchedContent);
60693
+ await fs33.writeFile(filePath, patchedContent);
60592
60694
  }
60593
60695
  } else {
60594
60696
  coreEvents.emitFeedback(
@@ -61224,14 +61326,14 @@ function enableHook(settings, hookName) {
61224
61326
  }
61225
61327
  const modifiedScopes = [];
61226
61328
  try {
61227
- for (const { scope, path: path37 } of foundInDisabledScopes) {
61329
+ for (const { scope, path: path38 } of foundInDisabledScopes) {
61228
61330
  if (isLoadableSettingScope(scope)) {
61229
61331
  const currentScopeDisabled = settings.forScope(scope).settings.hooksConfig?.disabled ?? [];
61230
61332
  const newDisabled = currentScopeDisabled.filter(
61231
61333
  (name) => name !== hookName
61232
61334
  );
61233
61335
  settings.setValue(scope, "hooksConfig.disabled", newDisabled);
61234
- modifiedScopes.push({ scope, path: path37 });
61336
+ modifiedScopes.push({ scope, path: path38 });
61235
61337
  }
61236
61338
  }
61237
61339
  } catch (error) {
@@ -61526,7 +61628,7 @@ async function enableAction3(context, args) {
61526
61628
  }
61527
61629
  const feedback = renderHookActionFeedback(
61528
61630
  result,
61529
- (label, path37) => `${label} (${path37})`
61631
+ (label, path38) => `${label} (${path38})`
61530
61632
  );
61531
61633
  return {
61532
61634
  type: "message",
@@ -61568,7 +61670,7 @@ async function disableAction3(context, args) {
61568
61670
  }
61569
61671
  const feedback = renderHookActionFeedback(
61570
61672
  result,
61571
- (label, path37) => `${label} (${path37})`
61673
+ (label, path38) => `${label} (${path38})`
61572
61674
  );
61573
61675
  return {
61574
61676
  type: "message",
@@ -61767,7 +61869,7 @@ var hooksCommand = {
61767
61869
  };
61768
61870
 
61769
61871
  // packages/cli/src/ui/commands/ideCommand.ts
61770
- import path28 from "node:path";
61872
+ import path29 from "node:path";
61771
61873
  function getIdeStatusMessage(ideClient) {
61772
61874
  const connection = ideClient.getConnectionStatus();
61773
61875
  switch (connection.status) {
@@ -61796,13 +61898,13 @@ function getIdeStatusMessage(ideClient) {
61796
61898
  function formatFileList(openFiles) {
61797
61899
  const basenameCounts = /* @__PURE__ */ new Map();
61798
61900
  for (const file of openFiles) {
61799
- const basename6 = path28.basename(file.path);
61901
+ const basename6 = path29.basename(file.path);
61800
61902
  basenameCounts.set(basename6, (basenameCounts.get(basename6) || 0) + 1);
61801
61903
  }
61802
61904
  const fileList = openFiles.map((file) => {
61803
- const basename6 = path28.basename(file.path);
61905
+ const basename6 = path29.basename(file.path);
61804
61906
  const isDuplicate = (basenameCounts.get(basename6) || 0) > 1;
61805
- const parentDir = path28.basename(path28.dirname(file.path));
61907
+ const parentDir = path29.basename(path29.dirname(file.path));
61806
61908
  const displayName = isDuplicate ? `${basename6} (/${parentDir})` : basename6;
61807
61909
  return ` - ${displayName}${file.isActive ? " (active)" : ""}`;
61808
61910
  }).join("\n");
@@ -61942,7 +62044,7 @@ var ideCommand = async () => {
61942
62044
  if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
61943
62045
  break;
61944
62046
  }
61945
- await new Promise((resolve8) => setTimeout(resolve8, 500));
62047
+ await new Promise((resolve9) => setTimeout(resolve9, 500));
61946
62048
  }
61947
62049
  const { messageType, content } = getIdeStatusMessage(ideClient);
61948
62050
  if (messageType === "error") {
@@ -62030,8 +62132,8 @@ var ideCommand = async () => {
62030
62132
  };
62031
62133
 
62032
62134
  // packages/cli/src/ui/commands/initCommand.ts
62033
- import * as fs33 from "node:fs";
62034
- import * as path29 from "node:path";
62135
+ import * as fs34 from "node:fs";
62136
+ import * as path30 from "node:path";
62035
62137
  var initCommand = {
62036
62138
  name: "init",
62037
62139
  description: "Analyzes the project and creates a tailored GEMINI.md file",
@@ -62046,10 +62148,10 @@ var initCommand = {
62046
62148
  };
62047
62149
  }
62048
62150
  const targetDir = context.services.agentContext.config.getTargetDir();
62049
- const geminiMdPath = path29.join(targetDir, "GEMINI.md");
62050
- const result = performInit(fs33.existsSync(geminiMdPath));
62151
+ const geminiMdPath = path30.join(targetDir, "GEMINI.md");
62152
+ const result = performInit(fs34.existsSync(geminiMdPath));
62051
62153
  if (result.type === "submit_prompt") {
62052
- fs33.writeFileSync(geminiMdPath, "", "utf8");
62154
+ fs34.writeFileSync(geminiMdPath, "", "utf8");
62053
62155
  context.ui.addItem(
62054
62156
  {
62055
62157
  type: "info",
@@ -62122,7 +62224,7 @@ Use /mcp auth <server-name> to authenticate.`
62122
62224
  type: "info",
62123
62225
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
62124
62226
  });
62125
- const { MCPOAuthProvider } = await import("./dist-6BN2CJPN.js");
62227
+ const { MCPOAuthProvider } = await import("./dist-S3YUNQKP.js");
62126
62228
  let oauthConfig = server.oauth;
62127
62229
  if (!oauthConfig) {
62128
62230
  oauthConfig = { enabled: false };
@@ -62490,7 +62592,7 @@ var import_react81 = __toESM(require_react(), 1);
62490
62592
 
62491
62593
  // packages/cli/src/ui/components/InboxDialog.tsx
62492
62594
  var import_react80 = __toESM(require_react(), 1);
62493
- import * as path31 from "node:path";
62595
+ import * as path32 from "node:path";
62494
62596
 
62495
62597
  // packages/cli/src/ui/components/messages/DiffRenderer.tsx
62496
62598
  var import_react79 = __toESM(require_react(), 1);
@@ -76288,10 +76390,10 @@ function colorizeCode({
76288
76390
  }
76289
76391
 
76290
76392
  // packages/cli/src/ui/utils/fileUtils.ts
76291
- import * as path30 from "node:path";
76393
+ import * as path31 from "node:path";
76292
76394
  function getFileExtension(filename) {
76293
76395
  if (!filename) return null;
76294
- const ext = path30.extname(filename);
76396
+ const ext = path31.extname(filename);
76295
76397
  return ext ? ext.slice(1) : null;
76296
76398
  }
76297
76399
 
@@ -76654,11 +76756,11 @@ var MEMORY_PATCH_ACTION_CHOICES = [
76654
76756
  }
76655
76757
  ];
76656
76758
  function normalizePathForUi(filePath) {
76657
- return path31.posix.normalize(filePath.replaceAll("\\", "/"));
76759
+ return path32.posix.normalize(filePath.replaceAll("\\", "/"));
76658
76760
  }
76659
76761
  function getPathBasename(filePath) {
76660
76762
  const normalizedPath = normalizePathForUi(filePath);
76661
- const basename6 = path31.posix.basename(normalizedPath);
76763
+ const basename6 = path32.posix.basename(normalizedPath);
76662
76764
  return basename6 === "." ? filePath : basename6;
76663
76765
  }
76664
76766
  function formatMemoryPatchSummary(patch) {
@@ -77615,97 +77717,62 @@ var InboxDialog = ({
77615
77717
  };
77616
77718
 
77617
77719
  // packages/cli/src/ui/commands/memoryCommand.ts
77618
- var memoryCommand = {
77619
- name: "memory",
77620
- description: "Commands for interacting with memory",
77720
+ var showSubCommand = {
77721
+ name: "show",
77722
+ description: "Show the current memory contents",
77723
+ kind: "built-in" /* BUILT_IN */,
77724
+ autoExecute: true,
77725
+ action: async (context) => {
77726
+ const config = context.services.agentContext?.config;
77727
+ if (!config) return;
77728
+ const result = showMemory(config);
77729
+ context.ui.addItem(
77730
+ {
77731
+ type: "info" /* INFO */,
77732
+ text: result.content
77733
+ },
77734
+ Date.now()
77735
+ );
77736
+ }
77737
+ };
77738
+ var addSubCommand = {
77739
+ name: "add",
77740
+ description: "Add content to the memory",
77621
77741
  kind: "built-in" /* BUILT_IN */,
77622
77742
  autoExecute: false,
77623
- subCommands: [
77624
- {
77625
- name: "show",
77626
- description: "Show the current memory contents",
77627
- kind: "built-in" /* BUILT_IN */,
77628
- autoExecute: true,
77629
- action: async (context) => {
77630
- const config = context.services.agentContext?.config;
77631
- if (!config) return;
77632
- const result = showMemory(config);
77633
- context.ui.addItem(
77634
- {
77635
- type: "info" /* INFO */,
77636
- text: result.content
77637
- },
77638
- Date.now()
77639
- );
77640
- }
77641
- },
77642
- {
77643
- name: "add",
77644
- description: "Add content to the memory",
77645
- kind: "built-in" /* BUILT_IN */,
77646
- autoExecute: false,
77647
- action: (context, args) => {
77648
- const result = addMemory(args);
77649
- if (result.type === "message") {
77650
- return result;
77651
- }
77652
- context.ui.addItem(
77653
- {
77654
- type: "info" /* INFO */,
77655
- text: `Attempting to save to memory: "${args.trim()}"`
77656
- },
77657
- Date.now()
77658
- );
77659
- return result;
77660
- }
77661
- },
77662
- {
77663
- name: "reload",
77664
- altNames: ["refresh"],
77665
- description: "Reload the memory from the source",
77666
- kind: "built-in" /* BUILT_IN */,
77667
- autoExecute: true,
77668
- action: async (context) => {
77669
- context.ui.addItem(
77670
- {
77671
- type: "info" /* INFO */,
77672
- text: "Reloading memory from source files..."
77673
- },
77674
- Date.now()
77675
- );
77676
- try {
77677
- const config = context.services.agentContext?.config;
77678
- if (config) {
77679
- const result = await refreshMemory(config);
77680
- context.ui.addItem(
77681
- {
77682
- type: "info" /* INFO */,
77683
- text: result.content
77684
- },
77685
- Date.now()
77686
- );
77687
- }
77688
- } catch (error) {
77689
- context.ui.addItem(
77690
- {
77691
- type: "error" /* ERROR */,
77692
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
77693
- text: `Error reloading memory: ${error.message}`
77694
- },
77695
- Date.now()
77696
- );
77697
- }
77698
- }
77699
- },
77700
- {
77701
- name: "list",
77702
- description: "Lists the paths of the GEMINI.md files in use",
77703
- kind: "built-in" /* BUILT_IN */,
77704
- autoExecute: true,
77705
- action: async (context) => {
77706
- const config = context.services.agentContext?.config;
77707
- if (!config) return;
77708
- const result = listMemoryFiles(config);
77743
+ action: (context, args) => {
77744
+ const result = addMemory(args);
77745
+ if (result.type === "message") {
77746
+ return result;
77747
+ }
77748
+ context.ui.addItem(
77749
+ {
77750
+ type: "info" /* INFO */,
77751
+ text: `Attempting to save to memory: "${args.trim()}"`
77752
+ },
77753
+ Date.now()
77754
+ );
77755
+ return result;
77756
+ }
77757
+ };
77758
+ var reloadSubCommand = {
77759
+ name: "reload",
77760
+ altNames: ["refresh"],
77761
+ description: "Reload the memory from the source",
77762
+ kind: "built-in" /* BUILT_IN */,
77763
+ autoExecute: true,
77764
+ action: async (context) => {
77765
+ context.ui.addItem(
77766
+ {
77767
+ type: "info" /* INFO */,
77768
+ text: "Reloading memory from source files..."
77769
+ },
77770
+ Date.now()
77771
+ );
77772
+ try {
77773
+ const config = context.services.agentContext?.config;
77774
+ if (config) {
77775
+ const result = await refreshMemory(config);
77709
77776
  context.ui.addItem(
77710
77777
  {
77711
77778
  type: "info" /* INFO */,
@@ -77714,45 +77781,89 @@ var memoryCommand = {
77714
77781
  Date.now()
77715
77782
  );
77716
77783
  }
77717
- },
77718
- {
77719
- name: "inbox",
77720
- description: "Review skills extracted from past sessions and move them to global or project skills",
77721
- kind: "built-in" /* BUILT_IN */,
77722
- autoExecute: true,
77723
- action: (context) => {
77724
- const config = context.services.agentContext?.config;
77725
- if (!config) {
77726
- return {
77727
- type: "message",
77728
- messageType: "error",
77729
- content: "Config not loaded."
77730
- };
77731
- }
77732
- if (!config.isAutoMemoryEnabled()) {
77733
- return {
77734
- type: "message",
77735
- messageType: "info",
77736
- content: "The memory inbox requires Auto Memory. Enable it with: experimental.autoMemory = true in settings."
77737
- };
77738
- }
77739
- return {
77740
- type: "custom_dialog",
77741
- component: import_react81.default.createElement(InboxDialog, {
77742
- config,
77743
- onClose: () => context.ui.removeComponent(),
77744
- onReloadSkills: async () => {
77745
- await config.reloadSkills();
77746
- context.ui.reloadCommands();
77747
- },
77748
- onReloadMemory: async () => {
77749
- await refreshMemory(config);
77750
- }
77751
- })
77752
- };
77753
- }
77784
+ } catch (error) {
77785
+ context.ui.addItem(
77786
+ {
77787
+ type: "error" /* ERROR */,
77788
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
77789
+ text: `Error reloading memory: ${error.message}`
77790
+ },
77791
+ Date.now()
77792
+ );
77754
77793
  }
77755
- ]
77794
+ }
77795
+ };
77796
+ var listSubCommand = {
77797
+ name: "list",
77798
+ description: "Lists the paths of the GEMINI.md files in use",
77799
+ kind: "built-in" /* BUILT_IN */,
77800
+ autoExecute: true,
77801
+ action: async (context) => {
77802
+ const config = context.services.agentContext?.config;
77803
+ if (!config) return;
77804
+ const result = listMemoryFiles(config);
77805
+ context.ui.addItem(
77806
+ {
77807
+ type: "info" /* INFO */,
77808
+ text: result.content
77809
+ },
77810
+ Date.now()
77811
+ );
77812
+ }
77813
+ };
77814
+ var inboxSubCommand = {
77815
+ name: "inbox",
77816
+ description: "Review skills extracted from past sessions and move them to global or project skills",
77817
+ kind: "built-in" /* BUILT_IN */,
77818
+ autoExecute: true,
77819
+ action: (context) => {
77820
+ const config = context.services.agentContext?.config;
77821
+ if (!config) {
77822
+ return {
77823
+ type: "message",
77824
+ messageType: "error",
77825
+ content: "Config not loaded."
77826
+ };
77827
+ }
77828
+ if (!config.isAutoMemoryEnabled()) {
77829
+ return {
77830
+ type: "message",
77831
+ messageType: "info",
77832
+ content: "The memory inbox requires Auto Memory. Enable it with: experimental.autoMemory = true in settings."
77833
+ };
77834
+ }
77835
+ return {
77836
+ type: "custom_dialog",
77837
+ component: import_react81.default.createElement(InboxDialog, {
77838
+ config,
77839
+ onClose: () => context.ui.removeComponent(),
77840
+ onReloadSkills: async () => {
77841
+ await config.reloadSkills();
77842
+ context.ui.reloadCommands();
77843
+ },
77844
+ onReloadMemory: async () => {
77845
+ await refreshMemory(config);
77846
+ }
77847
+ })
77848
+ };
77849
+ }
77850
+ };
77851
+ var memoryCommand = (config) => {
77852
+ const isMemoryV2 = config?.isMemoryV2Enabled() ?? false;
77853
+ const subCommands = [
77854
+ showSubCommand,
77855
+ ...isMemoryV2 ? [] : [addSubCommand],
77856
+ reloadSubCommand,
77857
+ listSubCommand,
77858
+ inboxSubCommand
77859
+ ];
77860
+ return {
77861
+ name: "memory",
77862
+ description: "Commands for interacting with memory",
77863
+ kind: "built-in" /* BUILT_IN */,
77864
+ autoExecute: false,
77865
+ subCommands
77866
+ };
77756
77867
  };
77757
77868
 
77758
77869
  // packages/cli/src/ui/commands/modelCommand.ts
@@ -79286,8 +79397,8 @@ var oncallCommand = {
79286
79397
 
79287
79398
  // packages/cli/src/ui/commands/permissionsCommand.ts
79288
79399
  import * as process34 from "node:process";
79289
- import * as path32 from "node:path";
79290
- import * as fs34 from "node:fs";
79400
+ import * as path33 from "node:path";
79401
+ import * as fs35 from "node:fs";
79291
79402
  var permissionsCommand = {
79292
79403
  name: "permissions",
79293
79404
  description: "Manage folder trust settings and other permissions",
@@ -79305,10 +79416,10 @@ var permissionsCommand = {
79305
79416
  if (!dirPath) {
79306
79417
  targetDirectory = process34.cwd();
79307
79418
  } else {
79308
- targetDirectory = path32.resolve(expandHomeDir(dirPath));
79419
+ targetDirectory = path33.resolve(expandHomeDir(dirPath));
79309
79420
  }
79310
79421
  try {
79311
- if (!fs34.statSync(targetDirectory).isDirectory()) {
79422
+ if (!fs35.statSync(targetDirectory).isDirectory()) {
79312
79423
  return {
79313
79424
  type: "message",
79314
79425
  messageType: "error",
@@ -79352,7 +79463,7 @@ var permissionsCommand = {
79352
79463
  };
79353
79464
 
79354
79465
  // packages/cli/src/ui/commands/planCommand.ts
79355
- import * as path33 from "node:path";
79466
+ import * as path34 from "node:path";
79356
79467
  async function copyAction(context) {
79357
79468
  const config = context.services.agentContext?.config;
79358
79469
  if (!config) {
@@ -79369,7 +79480,7 @@ async function copyAction(context) {
79369
79480
  await copyToClipboard(content);
79370
79481
  coreEvents.emitFeedback(
79371
79482
  "info",
79372
- `Plan copied to clipboard (${path33.basename(planPath)}).`
79483
+ `Plan copied to clipboard (${path34.basename(planPath)}).`
79373
79484
  );
79374
79485
  } catch (error) {
79375
79486
  coreEvents.emitFeedback("error", `Failed to copy plan: ${error}`, error);
@@ -79407,7 +79518,7 @@ var planCommand = {
79407
79518
  config.storage.getPlansDir(),
79408
79519
  config.getFileSystemService()
79409
79520
  );
79410
- const fileName = path33.basename(approvedPlanPath);
79521
+ const fileName = path34.basename(approvedPlanPath);
79411
79522
  coreEvents.emitFeedback("info", `Approved Plan: ${fileName}`);
79412
79523
  context.ui.addItem({
79413
79524
  type: "gemini" /* GEMINI */,
@@ -79592,8 +79703,8 @@ var quitCommand = {
79592
79703
  };
79593
79704
 
79594
79705
  // packages/cli/src/ui/commands/restoreCommand.ts
79595
- import * as fs35 from "node:fs/promises";
79596
- import path34 from "node:path";
79706
+ import * as fs36 from "node:fs/promises";
79707
+ import path35 from "node:path";
79597
79708
  var HistoryItemSchema = external_exports.object({
79598
79709
  type: external_exports.string(),
79599
79710
  id: external_exports.number()
@@ -79612,8 +79723,8 @@ async function restoreAction(context, args) {
79612
79723
  };
79613
79724
  }
79614
79725
  try {
79615
- await fs35.mkdir(checkpointDir, { recursive: true });
79616
- const files = await fs35.readdir(checkpointDir);
79726
+ await fs36.mkdir(checkpointDir, { recursive: true });
79727
+ const files = await fs36.readdir(checkpointDir);
79617
79728
  const jsonFiles = files.filter((file) => file.endsWith(".json"));
79618
79729
  if (!args) {
79619
79730
  if (jsonFiles.length === 0) {
@@ -79640,8 +79751,8 @@ ${fileList}`
79640
79751
  content: `File not found: ${selectedFile}`
79641
79752
  };
79642
79753
  }
79643
- const filePath = path34.join(checkpointDir, selectedFile);
79644
- const data = await fs35.readFile(filePath, "utf-8");
79754
+ const filePath = path35.join(checkpointDir, selectedFile);
79755
+ const data = await fs36.readFile(filePath, "utf-8");
79645
79756
  const parseResult = ToolCallDataSchema.safeParse(JSON.parse(data));
79646
79757
  if (!parseResult.success) {
79647
79758
  return {
@@ -79689,7 +79800,7 @@ async function completion(context, _partialArg) {
79689
79800
  return [];
79690
79801
  }
79691
79802
  try {
79692
- const files = await fs35.readdir(checkpointDir);
79803
+ const files = await fs36.readdir(checkpointDir);
79693
79804
  const jsonFiles = files.filter((file) => file.endsWith(".json"));
79694
79805
  return getTruncatedCheckpointNames(jsonFiles);
79695
79806
  } catch {
@@ -79865,7 +79976,7 @@ async function listTools(context, showDescriptions) {
79865
79976
  };
79866
79977
  context.ui.addItem(toolsListItem);
79867
79978
  }
79868
- var listSubCommand = {
79979
+ var listSubCommand2 = {
79869
79980
  name: "list",
79870
79981
  description: "List available Gemini CLI tools.",
79871
79982
  kind: "built-in" /* BUILT_IN */,
@@ -79885,7 +79996,7 @@ var toolsCommand = {
79885
79996
  description: "List available Gemini CLI tools. Use /tools desc to include descriptions.",
79886
79997
  kind: "built-in" /* BUILT_IN */,
79887
79998
  autoExecute: false,
79888
- subCommands: [listSubCommand, descSubCommand],
79999
+ subCommands: [listSubCommand2, descSubCommand],
79889
80000
  action: async (context, args) => {
79890
80001
  const subCommand = args?.trim();
79891
80002
  const useShowDescriptions = subCommand === "desc" || subCommand === "descriptions";
@@ -79942,9 +80053,9 @@ function disableSkill(settings, skillName, scope) {
79942
80053
 
79943
80054
  // packages/cli/src/utils/skillUtils.ts
79944
80055
  var import_extract_zip2 = __toESM(require_extract_zip(), 1);
79945
- import * as fs36 from "node:fs/promises";
79946
- import * as path35 from "node:path";
79947
- import * as os7 from "node:os";
80056
+ import * as fs37 from "node:fs/promises";
80057
+ import * as path36 from "node:path";
80058
+ import * as os8 from "node:os";
79948
80059
  function renderSkillActionFeedback(result, formatScope) {
79949
80060
  const { skillName, action, status, error } = result;
79950
80061
  if (status === "error") {
@@ -79983,8 +80094,8 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
79983
80094
  const isSkillFile = source2.toLowerCase().endsWith(".skill");
79984
80095
  try {
79985
80096
  if (isGitUrl) {
79986
- tempDirToClean = await fs36.mkdtemp(
79987
- path35.join(os7.tmpdir(), "gemini-skill-")
80097
+ tempDirToClean = await fs37.mkdtemp(
80098
+ path36.join(os8.tmpdir(), "gemini-skill-")
79988
80099
  );
79989
80100
  sourcePath = tempDirToClean;
79990
80101
  onLog(`Cloning skill from ${source2}...`);
@@ -79996,18 +80107,18 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
79996
80107
  tempDirToClean
79997
80108
  );
79998
80109
  } else if (isSkillFile) {
79999
- tempDirToClean = await fs36.mkdtemp(
80000
- path35.join(os7.tmpdir(), "gemini-skill-")
80110
+ tempDirToClean = await fs37.mkdtemp(
80111
+ path36.join(os8.tmpdir(), "gemini-skill-")
80001
80112
  );
80002
80113
  sourcePath = tempDirToClean;
80003
80114
  onLog(`Extracting skill from ${source2}...`);
80004
- await (0, import_extract_zip2.default)(path35.resolve(source2), { dir: tempDirToClean });
80115
+ await (0, import_extract_zip2.default)(path36.resolve(source2), { dir: tempDirToClean });
80005
80116
  }
80006
80117
  if (subpath) {
80007
- sourcePath = path35.join(sourcePath, subpath);
80118
+ sourcePath = path36.join(sourcePath, subpath);
80008
80119
  }
80009
- sourcePath = path35.resolve(sourcePath);
80010
- if (tempDirToClean && !sourcePath.startsWith(path35.resolve(tempDirToClean))) {
80120
+ sourcePath = path36.resolve(sourcePath);
80121
+ if (tempDirToClean && !sourcePath.startsWith(path36.resolve(tempDirToClean))) {
80011
80122
  throw new Error("Invalid path: Directory traversal not allowed.");
80012
80123
  }
80013
80124
  onLog(`Searching for skills in ${sourcePath}...`);
@@ -80023,29 +80134,29 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
80023
80134
  if (!await requestConsent(skills, targetDir)) {
80024
80135
  throw new Error("Skill installation cancelled by user.");
80025
80136
  }
80026
- await fs36.mkdir(targetDir, { recursive: true });
80137
+ await fs37.mkdir(targetDir, { recursive: true });
80027
80138
  const installedSkills = [];
80028
80139
  for (const skill of skills) {
80029
80140
  const skillName = skill.name;
80030
- const skillDir = path35.dirname(skill.location);
80031
- const destPath = path35.join(targetDir, skillName);
80032
- const exists = await fs36.stat(destPath).catch(() => null);
80141
+ const skillDir = path36.dirname(skill.location);
80142
+ const destPath = path36.join(targetDir, skillName);
80143
+ const exists = await fs37.stat(destPath).catch(() => null);
80033
80144
  if (exists) {
80034
80145
  onLog(`Skill "${skillName}" already exists. Overwriting...`);
80035
- await fs36.rm(destPath, { recursive: true, force: true });
80146
+ await fs37.rm(destPath, { recursive: true, force: true });
80036
80147
  }
80037
- await fs36.cp(skillDir, destPath, { recursive: true });
80148
+ await fs37.cp(skillDir, destPath, { recursive: true });
80038
80149
  installedSkills.push({ name: skillName, location: destPath });
80039
80150
  }
80040
80151
  return installedSkills;
80041
80152
  } finally {
80042
80153
  if (tempDirToClean) {
80043
- await fs36.rm(tempDirToClean, { recursive: true, force: true });
80154
+ await fs37.rm(tempDirToClean, { recursive: true, force: true });
80044
80155
  }
80045
80156
  }
80046
80157
  }
80047
80158
  async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.resolve(true)) {
80048
- const sourcePath = path35.resolve(source2);
80159
+ const sourcePath = path36.resolve(source2);
80049
80160
  onLog(`Searching for skills in ${sourcePath}...`);
80050
80161
  const skills = await loadSkillsFromDir(sourcePath);
80051
80162
  if (skills.length === 0) {
@@ -80070,20 +80181,20 @@ async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.r
80070
80181
  if (!await requestConsent(skills, targetDir)) {
80071
80182
  throw new Error("Skill linking cancelled by user.");
80072
80183
  }
80073
- await fs36.mkdir(targetDir, { recursive: true });
80184
+ await fs37.mkdir(targetDir, { recursive: true });
80074
80185
  const linkedSkills = [];
80075
80186
  for (const skill of skills) {
80076
80187
  const skillName = skill.name;
80077
- const skillSourceDir = path35.dirname(skill.location);
80078
- const destPath = path35.join(targetDir, skillName);
80079
- const exists = await fs36.lstat(destPath).catch(() => null);
80188
+ const skillSourceDir = path36.dirname(skill.location);
80189
+ const destPath = path36.join(targetDir, skillName);
80190
+ const exists = await fs37.lstat(destPath).catch(() => null);
80080
80191
  if (exists) {
80081
80192
  onLog(
80082
80193
  `Skill "${skillName}" already exists at destination. Overwriting...`
80083
80194
  );
80084
- await fs36.rm(destPath, { recursive: true, force: true });
80195
+ await fs37.rm(destPath, { recursive: true, force: true });
80085
80196
  }
80086
- await fs36.symlink(
80197
+ await fs37.symlink(
80087
80198
  skillSourceDir,
80088
80199
  destPath,
80089
80200
  process.platform === "win32" ? "junction" : "dir"
@@ -80099,19 +80210,19 @@ async function uninstallSkill(name, scope) {
80099
80210
  const discoveredSkills = await loadSkillsFromDir(targetDir);
80100
80211
  const skillToUninstall = discoveredSkills.find((s3) => s3.name === name);
80101
80212
  if (!skillToUninstall) {
80102
- const skillPath = path35.resolve(targetDir, name);
80103
- if (!skillPath.startsWith(path35.resolve(targetDir))) {
80213
+ const skillPath = path36.resolve(targetDir, name);
80214
+ if (!skillPath.startsWith(path36.resolve(targetDir))) {
80104
80215
  return null;
80105
80216
  }
80106
- const exists = await fs36.lstat(skillPath).catch(() => null);
80217
+ const exists = await fs37.lstat(skillPath).catch(() => null);
80107
80218
  if (!exists) {
80108
80219
  return null;
80109
80220
  }
80110
- await fs36.rm(skillPath, { recursive: true, force: true });
80221
+ await fs37.rm(skillPath, { recursive: true, force: true });
80111
80222
  return { location: skillPath };
80112
80223
  }
80113
- const skillDir = path35.dirname(skillToUninstall.location);
80114
- await fs36.rm(skillDir, { recursive: true, force: true });
80224
+ const skillDir = path36.dirname(skillToUninstall.location);
80225
+ await fs37.rm(skillDir, { recursive: true, force: true });
80115
80226
  return { location: skillDir };
80116
80227
  }
80117
80228
 
@@ -80241,7 +80352,7 @@ async function disableAction4(context, args) {
80241
80352
  const result = disableSkill(context.services.settings, skillName, scope);
80242
80353
  let feedback = renderSkillActionFeedback(
80243
80354
  result,
80244
- (label, path37) => `${label} (${path37})`
80355
+ (label, path38) => `${label} (${path38})`
80245
80356
  );
80246
80357
  if (result.status === "success" || result.status === "no-op") {
80247
80358
  feedback += ' You can run "/skills reload" to refresh your current instance.';
@@ -80277,7 +80388,7 @@ async function enableAction4(context, args) {
80277
80388
  const result = enableSkill(context.services.settings, skillName);
80278
80389
  let feedback = renderSkillActionFeedback(
80279
80390
  result,
80280
- (label, path37) => `${label} (${path37})`
80391
+ (label, path38) => `${label} (${path38})`
80281
80392
  );
80282
80393
  if (result.status === "success" || result.status === "no-op") {
80283
80394
  feedback += ' You can run "/skills reload" to refresh your current instance.';
@@ -80315,7 +80426,7 @@ async function reloadAction2(context) {
80315
80426
  const minVisibleDuration = 500;
80316
80427
  if (elapsed < minVisibleDuration) {
80317
80428
  await new Promise(
80318
- (resolve8) => setTimeout(resolve8, minVisibleDuration - elapsed)
80429
+ (resolve9) => setTimeout(resolve9, minVisibleDuration - elapsed)
80319
80430
  );
80320
80431
  }
80321
80432
  context.ui.setPendingItem(null);
@@ -80468,8 +80579,8 @@ var vimCommand = {
80468
80579
 
80469
80580
  // packages/cli/src/ui/commands/setupGithubCommand.ts
80470
80581
  var import_undici2 = __toESM(require_undici(), 1);
80471
- import path36 from "node:path";
80472
- import * as fs37 from "node:fs";
80582
+ import path37 from "node:path";
80583
+ import * as fs38 from "node:fs";
80473
80584
  import { Writable } from "node:stream";
80474
80585
 
80475
80586
  // packages/cli/src/utils/gitUtils.ts
@@ -80519,7 +80630,7 @@ var getLatestGitHubRelease = async (proxy) => {
80519
80630
  if (!releaseTag) {
80520
80631
  throw new Error(`Response did not include tag_name field`);
80521
80632
  }
80522
- return releaseTag;
80633
+ return typeof releaseTag === "string" ? releaseTag : "";
80523
80634
  } catch (error) {
80524
80635
  debugLogger.debug(
80525
80636
  `Failed to determine latest run-gemini-cli release:`,
@@ -80596,25 +80707,25 @@ function getOpenUrlsCommands(readmeUrl) {
80596
80707
  }
80597
80708
  async function updateGitignore(gitRepoRoot) {
80598
80709
  const gitignoreEntries = [".gemini/", "gha-creds-*.json"];
80599
- const gitignorePath = path36.join(gitRepoRoot, ".gitignore");
80710
+ const gitignorePath = path37.join(gitRepoRoot, ".gitignore");
80600
80711
  try {
80601
80712
  let existingContent = "";
80602
80713
  let fileExists2 = true;
80603
80714
  try {
80604
- existingContent = await fs37.promises.readFile(gitignorePath, "utf8");
80715
+ existingContent = await fs38.promises.readFile(gitignorePath, "utf8");
80605
80716
  } catch {
80606
80717
  fileExists2 = false;
80607
80718
  }
80608
80719
  if (!fileExists2) {
80609
80720
  const contentToWrite = gitignoreEntries.join("\n") + "\n";
80610
- await fs37.promises.writeFile(gitignorePath, contentToWrite);
80721
+ await fs38.promises.writeFile(gitignorePath, contentToWrite);
80611
80722
  } else {
80612
80723
  const missingEntries = gitignoreEntries.filter(
80613
80724
  (entry) => !existingContent.split(/\r?\n/).some((line) => line.split("#")[0].trim() === entry)
80614
80725
  );
80615
80726
  if (missingEntries.length > 0) {
80616
80727
  const contentToAdd = "\n" + missingEntries.join("\n") + "\n";
80617
- await fs37.promises.appendFile(gitignorePath, contentToAdd);
80728
+ await fs38.promises.appendFile(gitignorePath, contentToAdd);
80618
80729
  }
80619
80730
  }
80620
80731
  } catch (error) {
@@ -80652,11 +80763,11 @@ async function downloadFiles({
80652
80763
  `Empty body while downloading ${endpoint}: ${response.status} - ${response.statusText}`
80653
80764
  );
80654
80765
  }
80655
- const destination = path36.resolve(
80766
+ const destination = path37.resolve(
80656
80767
  targetDir,
80657
- path36.basename(fileBasename)
80768
+ path37.basename(fileBasename)
80658
80769
  );
80659
- const fileStream = fs37.createWriteStream(destination, {
80770
+ const fileStream = fs38.createWriteStream(destination, {
80660
80771
  mode: 420,
80661
80772
  // -rw-r--r--, user(rw), group(r), other(r)
80662
80773
  flags: "w",
@@ -80673,7 +80784,7 @@ async function downloadFiles({
80673
80784
  }
80674
80785
  async function createDirectory(dirPath) {
80675
80786
  try {
80676
- await fs37.promises.mkdir(dirPath, { recursive: true });
80787
+ await fs38.promises.mkdir(dirPath, { recursive: true });
80677
80788
  } catch (error) {
80678
80789
  debugLogger.debug(`Failed to create ${dirPath} directory:`, error);
80679
80790
  throw new Error(
@@ -80727,9 +80838,9 @@ var setupGithubCommand = {
80727
80838
  const proxy = context?.services?.agentContext?.config.getProxy();
80728
80839
  const releaseTag = await getLatestGitHubRelease(proxy);
80729
80840
  const readmeUrl = `https://github.com/google-github-actions/run-gemini-cli/blob/${releaseTag}/README.md#quick-start`;
80730
- const workflowsDir = path36.join(gitRepoRoot, ".github", "workflows");
80841
+ const workflowsDir = path37.join(gitRepoRoot, ".github", "workflows");
80731
80842
  await createDirectory(workflowsDir);
80732
- const commandsDir = path36.join(gitRepoRoot, ".github", "commands");
80843
+ const commandsDir = path37.join(gitRepoRoot, ".github", "commands");
80733
80844
  await createDirectory(commandsDir);
80734
80845
  await downloadSetupFiles({
80735
80846
  configs: [
@@ -80949,6 +81060,7 @@ var BuiltinCommandLoader = class {
80949
81060
  copyCommand,
80950
81061
  corgiCommand,
80951
81062
  docsCommand,
81063
+ exportSessionCommand,
80952
81064
  directoryCommand,
80953
81065
  editorCommand,
80954
81066
  ...this.config?.getExtensionsEnabled() === false ? [
@@ -80990,7 +81102,7 @@ var BuiltinCommandLoader = class {
80990
81102
  })
80991
81103
  }
80992
81104
  ] : [mcpCommand],
80993
- memoryCommand,
81105
+ memoryCommand(this.config),
80994
81106
  modelCommand,
80995
81107
  ...this.config?.getFolderTrust() ? [permissionsCommand] : [],
80996
81108
  ...this.config?.isPlanEnabled() ? [planCommand] : [],