@google/gemini-cli 0.42.0-preview.1 → 0.43.0-preview.0

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-AS4E6DX7.js → chunk-43AGRA7S.js} +3 -3
  2. package/bundle/{chunk-UZZVXATH.js → chunk-46T44JOY.js} +1 -1
  3. package/bundle/{chunk-BI5ZICGL.js → chunk-4TLQKGTR.js} +1 -1
  4. package/bundle/{chunk-BZZHETT5.js → chunk-6XOSIMPZ.js} +8 -9
  5. package/bundle/{chunk-6K3EFSDX.js → chunk-HQXINMBL.js} +2 -2
  6. package/bundle/{chunk-I5JMJ2LU.js → chunk-JENIU3E3.js} +1 -1
  7. package/bundle/{chunk-LK7LIPO6.js → chunk-LBQFRHYD.js} +1 -1
  8. package/bundle/{chunk-5AFGMGVT.js → chunk-LFGJVOVZ.js} +486 -381
  9. package/bundle/{chunk-UVBJHP26.js → chunk-MRHFLHPJ.js} +2 -2
  10. package/bundle/{chunk-7LOMS5HP.js → chunk-MXKXLNQD.js} +3 -3
  11. package/bundle/{chunk-ECNYAST2.js → chunk-N6QYTC2T.js} +5417 -5376
  12. package/bundle/{chunk-QZ2JZRLK.js → chunk-NBRZ4A3S.js} +2170 -791
  13. package/bundle/{chunk-L7GACEVA.js → chunk-P4UQCQUB.js} +3 -3
  14. package/bundle/{chunk-NHDN46IK.js → chunk-PGJUNQPO.js} +34 -16
  15. package/bundle/{chunk-GZ4FSF4B.js → chunk-PSWUV2OO.js} +3 -3
  16. package/bundle/{chunk-UKCYYERR.js → chunk-PYLHDAUK.js} +3 -3
  17. package/bundle/{chunk-47QC6PWE.js → chunk-Q23X5R4A.js} +486 -381
  18. package/bundle/{chunk-VERP26KN.js → chunk-QYUN3J2L.js} +533 -441
  19. package/bundle/{chunk-A564QXJJ.js → chunk-SAISHGWW.js} +1907 -716
  20. package/bundle/{chunk-IBIKJW2L.js → chunk-SYD5SJFT.js} +38 -23
  21. package/bundle/{chunk-WX6CHISQ.js → chunk-T3SUXLQQ.js} +2 -2
  22. package/bundle/{chunk-BUJZOWQ7.js → chunk-UIG2IVPJ.js} +34 -16
  23. package/bundle/{chunk-JEW7ZIWE.js → chunk-UJ26GAE5.js} +5326 -5290
  24. package/bundle/{chunk-ARLWCFGI.js → chunk-UNAVBUTP.js} +14729 -7452
  25. package/bundle/{chunk-7H3CQGS6.js → chunk-WQOLTO3C.js} +1 -1
  26. package/bundle/{chunk-KSNNZBTV.js → chunk-X26T73X6.js} +3 -3
  27. package/bundle/{cleanup-6PVHIK4C.js → cleanup-EIZJH2E3.js} +3 -3
  28. package/bundle/{cleanup-FRS7FPOS.js → cleanup-MI76P55B.js} +3 -3
  29. package/bundle/{cleanup-NDTUQVOW.js → cleanup-NZBQYB7U.js} +3 -3
  30. package/bundle/{core-RZFMBCSX.js → core-ERSGIOMQ.js} +30 -2
  31. package/bundle/{dist-7BJPFNU7.js → core-T2TBFAYG.js} +30 -2
  32. package/bundle/{devtoolsService-WER5PRLG.js → devtoolsService-7KZDSYEF.js} +3 -3
  33. package/bundle/{devtoolsService-6D355RSX.js → devtoolsService-FYTOIC37.js} +3 -3
  34. package/bundle/{devtoolsService-7SBW23VD.js → devtoolsService-LV5NJ2BT.js} +4 -5
  35. package/bundle/{dist-DTPIOJ3P.js → dist-ETX67B7P.js} +30 -2
  36. package/bundle/docs/changelogs/index.md +14 -0
  37. package/bundle/docs/changelogs/latest.md +108 -166
  38. package/bundle/docs/changelogs/preview.md +227 -103
  39. package/bundle/docs/cli/auto-memory.md +60 -38
  40. package/bundle/docs/cli/settings.md +1 -1
  41. package/bundle/docs/cli/tutorials/memory-management.md +1 -1
  42. package/bundle/docs/extensions/releasing.md +58 -24
  43. package/bundle/docs/reference/configuration.md +14 -1
  44. package/bundle/docs/reference/keyboard-shortcuts.md +23 -0
  45. package/bundle/{gemini-KMMF6AK3.js → gemini-IVKBXHDT.js} +160 -60
  46. package/bundle/{gemini-GLORNPU2.js → gemini-JKWQQTKP.js} +160 -60
  47. package/bundle/{gemini-HCJBP42A.js → gemini-Z77GAAR6.js} +331 -245
  48. package/bundle/gemini.js +8 -8
  49. package/bundle/{interactiveCli-5UVCH7FM.js → interactiveCli-36WZS6KT.js} +1704 -1457
  50. package/bundle/{interactiveCli-HBRMSAIT.js → interactiveCli-BQ36B66Z.js} +1703 -1457
  51. package/bundle/{interactiveCli-TWDP2H52.js → interactiveCli-SME5QTEN.js} +1967 -1739
  52. package/bundle/{liteRtServerManager-3YA2HL46.js → liteRtServerManager-2QD4R3A3.js} +5 -5
  53. package/bundle/{liteRtServerManager-BYQVAM6Y.js → liteRtServerManager-ISYDOBNC.js} +5 -5
  54. package/bundle/{liteRtServerManager-IQHHDTUM.js → liteRtServerManager-N6OMT6W5.js} +5 -5
  55. package/bundle/{memoryDiscovery-FB7MMKTA.js → memoryDiscovery-LLSKN6HL.js} +1 -1
  56. package/bundle/{memoryDiscovery-KSYZVCWF.js → memoryDiscovery-SJ7P6RCN.js} +1 -1
  57. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  58. package/bundle/{oauth2-provider-C66JRVDQ.js → oauth2-provider-DOSIH6VE.js} +2 -2
  59. package/bundle/{oauth2-provider-TUVQXNLY.js → oauth2-provider-TZF6EZRX.js} +2 -2
  60. package/bundle/{oauth2-provider-OAXWX3Z3.js → oauth2-provider-VFOABWBW.js} +73 -39
  61. package/bundle/{start-ELTWFVNO.js → start-3GPIRK3E.js} +7 -7
  62. package/bundle/{start-HHZI73VV.js → start-6NONW677.js} +7 -7
  63. package/bundle/{start-NCMR7HOQ.js → start-M6MUPEJS.js} +7 -7
  64. package/package.json +1 -1
  65. package/bundle/chunk-5MQ5VMQK.js +0 -17230
  66. package/bundle/chunk-66C7JVNE.js +0 -391
  67. package/bundle/chunk-A3GDBSEI.js +0 -512
  68. package/bundle/chunk-L6GBKGQX.js +0 -118
  69. package/bundle/chunk-LCB7VVYS.js +0 -356008
  70. package/bundle/chunk-OGZGOFAJ.js +0 -1571
  71. package/bundle/chunk-PBD26LJQ.js +0 -81544
  72. package/bundle/chunk-YDSDSLSO.js +0 -156
  73. package/bundle/cleanup-O4IDJYU2.js +0 -33
  74. package/bundle/devtoolsService-SPV43SGI.js +0 -857
  75. package/bundle/dist-ZZ5HEQGP.js +0 -2096
  76. package/bundle/gemini-3NXWUDHV.js +0 -16256
  77. package/bundle/interactiveCli-BNDKNCVJ.js +0 -34505
  78. package/bundle/liteRtServerManager-RTBP2SLV.js +0 -66
  79. package/bundle/oauth2-provider-ZPJOR5SG.js +0 -237
  80. package/bundle/start-S3TEO5BN.js +0 -19
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  exitCli,
8
8
  require_source
9
- } from "./chunk-OGZGOFAJ.js";
9
+ } from "./chunk-JENIU3E3.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-IBIKJW2L.js";
61
+ } from "./chunk-UIG2IVPJ.js";
61
62
  import {
62
63
  isDevelopment
63
- } from "./chunk-UKCYYERR.js";
64
+ } from "./chunk-MXKXLNQD.js";
64
65
  import {
65
66
  emptyIcon,
66
67
  require_react
67
- } from "./chunk-A3GDBSEI.js";
68
+ } from "./chunk-WQOLTO3C.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-LCB7VVYS.js";
216
+ } from "./chunk-SAISHGWW.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-UJ26GAE5.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
  });
@@ -40817,8 +40816,8 @@ var Override = class _Override {
40817
40816
  output() {
40818
40817
  return `${this.isDisable ? "!" : ""}${this.baseRule}${this.includeSubdirs ? "*" : ""}`;
40819
40818
  }
40820
- matchesPath(path37) {
40821
- return this.asRegex().test(path37);
40819
+ matchesPath(path38) {
40820
+ return this.asRegex().test(path38);
40822
40821
  }
40823
40822
  };
40824
40823
  var ensureLeadingAndTrailingSlash = function(dirPath) {
@@ -43959,7 +43958,7 @@ async function fetchJson(url, redirectCount = 0) {
43959
43958
  if (token) {
43960
43959
  headers.Authorization = `token ${token}`;
43961
43960
  }
43962
- return new Promise((resolve8, reject) => {
43961
+ return new Promise((resolve9, reject) => {
43963
43962
  https.get(url, { headers }, (res) => {
43964
43963
  if (res.statusCode === 302 || res.statusCode === 301) {
43965
43964
  if (redirectCount >= 10) {
@@ -43972,7 +43971,7 @@ async function fetchJson(url, redirectCount = 0) {
43972
43971
  fetchJson(
43973
43972
  new URL(res.headers.location, url).toString(),
43974
43973
  redirectCount + 1
43975
- ).then(resolve8).catch(reject);
43974
+ ).then(resolve9).catch(reject);
43976
43975
  return;
43977
43976
  }
43978
43977
  if (res.statusCode !== 200) {
@@ -43984,7 +43983,7 @@ async function fetchJson(url, redirectCount = 0) {
43984
43983
  res.on("data", (chunk) => chunks.push(chunk));
43985
43984
  res.on("end", () => {
43986
43985
  const data = Buffer.concat(chunks).toString();
43987
- resolve8(JSON.parse(data));
43986
+ resolve9(JSON.parse(data));
43988
43987
  });
43989
43988
  }).on("error", reject);
43990
43989
  });
@@ -44344,7 +44343,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44344
44343
  if (token) {
44345
44344
  headers["Authorization"] = `token ${token}`;
44346
44345
  }
44347
- return new Promise((resolve8, reject) => {
44346
+ return new Promise((resolve9, reject) => {
44348
44347
  https2.get(url, { headers }, (res) => {
44349
44348
  if (res.statusCode === 302 || res.statusCode === 301) {
44350
44349
  if (redirectCount >= 10) {
@@ -44355,7 +44354,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44355
44354
  new Error("Redirect response missing Location header")
44356
44355
  );
44357
44356
  }
44358
- downloadFile(res.headers.location, dest, options, redirectCount + 1).then(resolve8).catch(reject);
44357
+ downloadFile(res.headers.location, dest, options, redirectCount + 1).then(resolve9).catch(reject);
44359
44358
  return;
44360
44359
  }
44361
44360
  if (res.statusCode !== 200) {
@@ -44365,7 +44364,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44365
44364
  }
44366
44365
  const file = fs15.createWriteStream(dest);
44367
44366
  res.pipe(file);
44368
- file.on("finish", () => file.close(resolve8));
44367
+ file.on("finish", () => file.close(resolve9));
44369
44368
  }).on("error", reject);
44370
44369
  });
44371
44370
  }
@@ -45524,7 +45523,7 @@ function validateName(name) {
45524
45523
  }
45525
45524
  }
45526
45525
  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:")) {
45526
+ if (source2.startsWith("http://") || source2.startsWith("https://") || source2.startsWith("git@") || source2.startsWith("sso://") || source2.startsWith("github:") || source2.startsWith("gitlab:") || source2.startsWith("ssh://")) {
45528
45527
  return {
45529
45528
  source: source2,
45530
45529
  type: "git",
@@ -45846,9 +45845,9 @@ function isSettingsValue(value) {
45846
45845
  const type = typeof value;
45847
45846
  return type === "string" || type === "number" || type === "boolean" || type === "object";
45848
45847
  }
45849
- function getNestedValue(obj, path37) {
45848
+ function getNestedValue(obj, path38) {
45850
45849
  let current = obj;
45851
- for (const key of path37) {
45850
+ for (const key of path38) {
45852
45851
  if (!isRecord(current) || !(key in current)) {
45853
45852
  return void 0;
45854
45853
  }
@@ -45861,8 +45860,8 @@ function getEffectiveValue(key, settings) {
45861
45860
  if (!definition) {
45862
45861
  return void 0;
45863
45862
  }
45864
- const path37 = key.split(".");
45865
- const value = getNestedValue(settings, path37);
45863
+ const path38 = key.split(".");
45864
+ const value = getNestedValue(settings, path38);
45866
45865
  if (value !== void 0 && isSettingsValue(value)) {
45867
45866
  return value;
45868
45867
  }
@@ -45872,8 +45871,8 @@ function getDialogSettingKeys() {
45872
45871
  return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
45873
45872
  }
45874
45873
  function isInSettingsScope(key, scopeSettings) {
45875
- const path37 = key.split(".");
45876
- const value = getNestedValue(scopeSettings, path37);
45874
+ const path38 = key.split(".");
45875
+ const value = getNestedValue(scopeSettings, path38);
45877
45876
  return value !== void 0;
45878
45877
  }
45879
45878
  function getDisplayValue(key, scopeSettings, _mergedSettings) {
@@ -46938,7 +46937,7 @@ async function writeClipboardImages(filePaths) {
46938
46937
  if (process22.platform !== "darwin") {
46939
46938
  return;
46940
46939
  }
46941
- const paths = filePaths.map((path37) => path37 instanceof URL ? fileURLToPath2(path37) : path37);
46940
+ const paths = filePaths.map((path38) => path38 instanceof URL ? fileURLToPath2(path38) : path38);
46942
46941
  await runJxa((...paths2) => {
46943
46942
  ObjC.import("AppKit");
46944
46943
  ObjC.import("Foundation");
@@ -47441,7 +47440,7 @@ var OSC52_FOOTER = BEL3;
47441
47440
  var MAX_OSC52_BODY_B64_BYTES = MAX_OSC52_SEQUENCE_BYTES - Buffer.byteLength(OSC52_HEADER) - Buffer.byteLength(OSC52_FOOTER);
47442
47441
  var MAX_OSC52_DATA_BYTES = Math.floor(MAX_OSC52_BODY_B64_BYTES / 4) * 3;
47443
47442
  var SCREEN_DCS_CHUNK_SIZE = 240;
47444
- var pickTty = () => new Promise((resolve8) => {
47443
+ var pickTty = () => new Promise((resolve9) => {
47445
47444
  if (process.platform !== "win32") {
47446
47445
  try {
47447
47446
  const devTty = fs22.createWriteStream("/dev/tty");
@@ -47449,25 +47448,25 @@ var pickTty = () => new Promise((resolve8) => {
47449
47448
  devTty.removeAllListeners("open");
47450
47449
  devTty.removeAllListeners("error");
47451
47450
  devTty.destroy();
47452
- resolve8(getStdioTty());
47451
+ resolve9(getStdioTty());
47453
47452
  }, 100);
47454
47453
  devTty.once("open", () => {
47455
47454
  clearTimeout(timeout);
47456
47455
  devTty.removeAllListeners("error");
47457
47456
  devTty.on("error", () => {
47458
47457
  });
47459
- resolve8({ stream: devTty, closeAfter: true });
47458
+ resolve9({ stream: devTty, closeAfter: true });
47460
47459
  });
47461
47460
  devTty.once("error", () => {
47462
47461
  clearTimeout(timeout);
47463
47462
  devTty.removeAllListeners("open");
47464
- resolve8(getStdioTty());
47463
+ resolve9(getStdioTty());
47465
47464
  });
47466
47465
  return;
47467
47466
  } catch {
47468
47467
  }
47469
47468
  }
47470
- resolve8(getStdioTty());
47469
+ resolve9(getStdioTty());
47471
47470
  });
47472
47471
  var getStdioTty = () => {
47473
47472
  if (process.platform === "win32") {
@@ -47521,12 +47520,12 @@ var wrapForScreen = (seq) => {
47521
47520
  }
47522
47521
  return out;
47523
47522
  };
47524
- var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47523
+ var writeAll = (stream, data) => new Promise((resolve9, reject) => {
47525
47524
  const fd = stream.fd;
47526
47525
  if (process.platform === "win32" && typeof fd === "number" && (stream === process.stdout || stream === process.stderr)) {
47527
47526
  try {
47528
47527
  fs22.writeSync(fd, data);
47529
- resolve8();
47528
+ resolve9();
47530
47529
  return;
47531
47530
  } catch (e) {
47532
47531
  debugLogger.warn(
@@ -47541,7 +47540,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47541
47540
  };
47542
47541
  const onDrain = () => {
47543
47542
  cleanup();
47544
- resolve8();
47543
+ resolve9();
47545
47544
  };
47546
47545
  const cleanup = () => {
47547
47546
  stream.off("error", onError);
@@ -47550,7 +47549,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47550
47549
  stream.once("error", onError);
47551
47550
  if (stream.write(data)) {
47552
47551
  cleanup();
47553
- resolve8();
47552
+ resolve9();
47554
47553
  } else {
47555
47554
  stream.once("drain", onDrain);
47556
47555
  }
@@ -47680,14 +47679,14 @@ function getUserLinuxClipboardTool() {
47680
47679
  }
47681
47680
  }
47682
47681
  async function saveFromCommand(command, args, destination) {
47683
- return new Promise((resolve8) => {
47682
+ return new Promise((resolve9) => {
47684
47683
  const child = spawn(command, args);
47685
47684
  const fileStream = createWriteStream2(destination);
47686
47685
  let resolved = false;
47687
47686
  const safeResolve = (value) => {
47688
47687
  if (!resolved) {
47689
47688
  resolved = true;
47690
- resolve8(value);
47689
+ resolve9(value);
47691
47690
  }
47692
47691
  };
47693
47692
  child.stdout.pipe(fileStream);
@@ -49545,7 +49544,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49545
49544
  throw err;
49546
49545
  }
49547
49546
  } else {
49548
- await new Promise((resolve8, reject) => {
49547
+ await new Promise((resolve9, reject) => {
49549
49548
  const child = spawn2(executable, [...initialArgs, ...args], {
49550
49549
  stdio: "inherit",
49551
49550
  shell: process.platform === "win32"
@@ -49570,7 +49569,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49570
49569
  );
49571
49570
  reject(err);
49572
49571
  } else {
49573
- resolve8();
49572
+ resolve9();
49574
49573
  }
49575
49574
  });
49576
49575
  });
@@ -53948,14 +53947,17 @@ var FileCommandLoader = class {
53948
53947
  getCommandDirectories() {
53949
53948
  const dirs = [];
53950
53949
  const storage = this.config?.storage ?? new Storage(this.projectRoot);
53950
+ const userCommandsDir = Storage.getUserCommandsDir();
53951
53951
  dirs.push({
53952
- path: Storage.getUserCommandsDir(),
53952
+ path: userCommandsDir,
53953
53953
  kind: "user-file" /* USER_FILE */
53954
53954
  });
53955
- dirs.push({
53956
- path: storage.getProjectCommandsDir(),
53957
- kind: "workspace-file" /* WORKSPACE_FILE */
53958
- });
53955
+ if (!storage.isWorkspaceHomeDir()) {
53956
+ dirs.push({
53957
+ path: storage.getProjectCommandsDir(),
53958
+ kind: "workspace-file" /* WORKSPACE_FILE */
53959
+ });
53960
+ }
53959
53961
  if (this.config) {
53960
53962
  const activeExtensions = this.config.getExtensions().filter((ext) => ext.isActive).sort((a, b2) => a.name.localeCompare(b2.name));
53961
53963
  const extensionCommandDirs = activeExtensions.map((ext) => ({
@@ -55960,10 +55962,10 @@ function enableFeature(settings, featureName, strategy) {
55960
55962
  };
55961
55963
  }
55962
55964
  const modifiedScopes = [];
55963
- for (const { scope, path: path37 } of foundInDisabledScopes) {
55965
+ for (const { scope, path: path38 } of foundInDisabledScopes) {
55964
55966
  if (isLoadableSettingScope(scope)) {
55965
55967
  strategy.enable(settings, scope, featureName);
55966
- modifiedScopes.push({ scope, path: path37 });
55968
+ modifiedScopes.push({ scope, path: path38 });
55967
55969
  }
55968
55970
  }
55969
55971
  return {
@@ -56454,7 +56456,7 @@ var authCommand = {
56454
56456
  import process28 from "node:process";
56455
56457
 
56456
56458
  // packages/cli/src/generated/git-commit.ts
56457
- var GIT_COMMIT_INFO = "246f98459";
56459
+ var GIT_COMMIT_INFO = "20495d600";
56458
56460
 
56459
56461
  // packages/cli/src/ui/utils/historyExportUtils.ts
56460
56462
  import * as fsPromises from "node:fs/promises";
@@ -57119,7 +57121,7 @@ var clearCommand = {
57119
57121
  if (hookSystem) {
57120
57122
  result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
57121
57123
  }
57122
- await new Promise((resolve8) => setImmediate(resolve8));
57124
+ await new Promise((resolve9) => setImmediate(resolve9));
57123
57125
  if (config) {
57124
57126
  await flushTelemetry(config);
57125
57127
  }
@@ -57393,10 +57395,85 @@ ${docsUrl}`
57393
57395
  }
57394
57396
  };
57395
57397
 
57398
+ // packages/cli/src/ui/commands/exportSessionCommand.ts
57399
+ import * as fs30 from "node:fs/promises";
57400
+ import * as path27 from "node:path";
57401
+ var exportSessionCommand = {
57402
+ name: "export-session",
57403
+ description: "Export the current session to a JSON file",
57404
+ kind: "built-in" /* BUILT_IN */,
57405
+ autoExecute: true,
57406
+ action: async (context) => {
57407
+ const { ui: ui2 } = context;
57408
+ const args = context.invocation?.args.trim();
57409
+ if (!args) {
57410
+ return {
57411
+ type: "message",
57412
+ messageType: "error",
57413
+ content: "Please provide a file path to export the session to. Example: /export-session ./my-session.json"
57414
+ };
57415
+ }
57416
+ const sessionId = context.services.agentContext?.config.getSessionId();
57417
+ if (!sessionId) {
57418
+ return {
57419
+ type: "message",
57420
+ messageType: "error",
57421
+ content: "No active session found to export."
57422
+ };
57423
+ }
57424
+ if (ui2.pendingItem) {
57425
+ ui2.addItem(
57426
+ {
57427
+ type: "error" /* ERROR */,
57428
+ text: "Operation already in progress, please wait."
57429
+ },
57430
+ Date.now()
57431
+ );
57432
+ return;
57433
+ }
57434
+ const pendingMessage = {
57435
+ type: "export_session" /* EXPORT_SESSION */,
57436
+ exportSession: {
57437
+ isPending: true
57438
+ }
57439
+ };
57440
+ try {
57441
+ ui2.setPendingItem(pendingMessage);
57442
+ const storage = context.services.agentContext.config.storage;
57443
+ const sessionSelector = new SessionSelector(storage);
57444
+ const { sessionData } = await sessionSelector.resolveSession(sessionId);
57445
+ const targetPath = path27.resolve(process.cwd(), args);
57446
+ await fs30.writeFile(
57447
+ targetPath,
57448
+ JSON.stringify(sessionData, null, 2),
57449
+ "utf-8"
57450
+ );
57451
+ ui2.addItem(
57452
+ {
57453
+ type: "export_session" /* EXPORT_SESSION */,
57454
+ exportSession: {
57455
+ isPending: false,
57456
+ targetPath
57457
+ }
57458
+ },
57459
+ Date.now()
57460
+ );
57461
+ } catch (error) {
57462
+ return {
57463
+ type: "message",
57464
+ messageType: "error",
57465
+ content: `Failed to export session: ${error instanceof Error ? error.message : "Unknown error"}`
57466
+ };
57467
+ } finally {
57468
+ ui2.setPendingItem(null);
57469
+ }
57470
+ }
57471
+ };
57472
+
57396
57473
  // packages/cli/src/ui/commands/directoryCommand.tsx
57397
57474
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
57398
- import * as path27 from "node:path";
57399
- import * as fs30 from "node:fs";
57475
+ import * as path28 from "node:path";
57476
+ import * as fs31 from "node:fs";
57400
57477
  async function finishAddingDirectories(config, addItem, added, errors) {
57401
57478
  if (!config) {
57402
57479
  addItem({
@@ -57464,15 +57541,15 @@ var directoryCommand = {
57464
57541
  if (context.services.agentContext?.config) {
57465
57542
  const workspaceContext = context.services.agentContext.config.getWorkspaceContext();
57466
57543
  const existingDirs = new Set(
57467
- workspaceContext.getDirectories().map((dir) => path27.resolve(dir))
57544
+ workspaceContext.getDirectories().map((dir) => path28.resolve(dir))
57468
57545
  );
57469
57546
  filteredSuggestions = suggestions.filter((s3) => {
57470
57547
  const expanded = expandHomeDir(s3);
57471
- const absolute = path27.resolve(expanded);
57548
+ const absolute = path28.resolve(expanded);
57472
57549
  if (existingDirs.has(absolute)) {
57473
57550
  return false;
57474
57551
  }
57475
- if (absolute.endsWith(path27.sep) && existingDirs.has(absolute.slice(0, -1))) {
57552
+ if (absolute.endsWith(path28.sep) && existingDirs.has(absolute.slice(0, -1))) {
57476
57553
  return false;
57477
57554
  }
57478
57555
  return true;
@@ -57522,11 +57599,11 @@ var directoryCommand = {
57522
57599
  const trimmedPath = pathToAdd.trim();
57523
57600
  const expandedPath = expandHomeDir(trimmedPath);
57524
57601
  try {
57525
- const absolutePath = path27.resolve(
57602
+ const absolutePath = path28.resolve(
57526
57603
  workspaceContext.targetDir,
57527
57604
  expandedPath
57528
57605
  );
57529
- const resolvedPath = fs30.realpathSync(absolutePath);
57606
+ const resolvedPath = fs31.realpathSync(absolutePath);
57530
57607
  if (currentWorkspaceDirs.includes(resolvedPath)) {
57531
57608
  alreadyAdded.push(trimmedPath);
57532
57609
  continue;
@@ -57552,7 +57629,7 @@ var directoryCommand = {
57552
57629
  const dirsToConfirm = [];
57553
57630
  const trustedDirs = [];
57554
57631
  for (const pathToAdd of pathsToProcess) {
57555
- const expandedPath = path27.resolve(expandHomeDir(pathToAdd.trim()));
57632
+ const expandedPath = path28.resolve(expandHomeDir(pathToAdd.trim()));
57556
57633
  const isTrusted = trustedFolders.isPathTrusted(expandedPath);
57557
57634
  if (isTrusted === true) {
57558
57635
  trustedDirs.push(pathToAdd.trim());
@@ -57773,14 +57850,14 @@ var ConfigExtensionDialog = ({
57773
57850
  [loggerAdapter]
57774
57851
  );
57775
57852
  const requestSetting = (0, import_react62.useCallback)(
57776
- async (setting) => new Promise((resolve8) => {
57853
+ async (setting) => new Promise((resolve9) => {
57777
57854
  if (!mounted.current) return;
57778
57855
  settingBuffer.setText("");
57779
57856
  setState({
57780
57857
  type: "ASK_SETTING",
57781
57858
  setting,
57782
57859
  resolve: (val) => {
57783
- resolve8(val);
57860
+ resolve9(val);
57784
57861
  setState({ type: "BUSY", message: "Updating..." });
57785
57862
  }
57786
57863
  });
@@ -57788,13 +57865,13 @@ var ConfigExtensionDialog = ({
57788
57865
  [settingBuffer]
57789
57866
  );
57790
57867
  const requestConfirmation = (0, import_react62.useCallback)(
57791
- async (message) => new Promise((resolve8) => {
57868
+ async (message) => new Promise((resolve9) => {
57792
57869
  if (!mounted.current) return;
57793
57870
  setState({
57794
57871
  type: "ASK_CONFIRMATION",
57795
57872
  message,
57796
57873
  resolve: (val) => {
57797
- resolve8(val);
57874
+ resolve9(val);
57798
57875
  setState({ type: "BUSY", message: "Processing..." });
57799
57876
  }
57800
57877
  });
@@ -58131,7 +58208,7 @@ function SearchableList({
58131
58208
  var import_react64 = __toESM(require_react(), 1);
58132
58209
 
58133
58210
  // packages/cli/src/config/extensionRegistryClient.ts
58134
- import * as fs31 from "node:fs/promises";
58211
+ import * as fs32 from "node:fs/promises";
58135
58212
  var ExtensionRegistryClient = class _ExtensionRegistryClient {
58136
58213
  static DEFAULT_REGISTRY_URL = "https://geminicli.com/extensions.json";
58137
58214
  static FETCH_TIMEOUT_MS = 1e4;
@@ -58209,7 +58286,7 @@ var ExtensionRegistryClient = class _ExtensionRegistryClient {
58209
58286
  return await response.json();
58210
58287
  } else {
58211
58288
  const filePath = resolveToRealPath(uri);
58212
- const content = await fs31.readFile(filePath, "utf-8");
58289
+ const content = await fs32.readFile(filePath, "utf-8");
58213
58290
  return JSON.parse(content);
58214
58291
  }
58215
58292
  } catch (error) {
@@ -58380,8 +58457,8 @@ function ExtensionDetails({
58380
58457
  if (keyMatchers["basic.confirm" /* RETURN */](key) && !isInstalled && !isInstalling) {
58381
58458
  setIsInstalling(true);
58382
58459
  void onInstall(
58383
- (prompt) => new Promise((resolve8) => {
58384
- setConsentRequest({ prompt, resolve: resolve8 });
58460
+ (prompt) => new Promise((resolve9) => {
58461
+ setConsentRequest({ prompt, resolve: resolve9 });
58385
58462
  })
58386
58463
  );
58387
58464
  return true;
@@ -58389,8 +58466,8 @@ function ExtensionDetails({
58389
58466
  if (keyMatchers["extension.link" /* LINK_EXTENSION */](key) && isLinkable && !isInstalled && !isInstalling) {
58390
58467
  setIsInstalling(true);
58391
58468
  void onLink(
58392
- (prompt) => new Promise((resolve8) => {
58393
- setConsentRequest({ prompt, resolve: resolve8 });
58469
+ (prompt) => new Promise((resolve9) => {
58470
+ setConsentRequest({ prompt, resolve: resolve9 });
58394
58471
  })
58395
58472
  );
58396
58473
  return true;
@@ -58794,7 +58871,7 @@ function updateAction(context, args) {
58794
58871
  }
58795
58872
  let resolveUpdateComplete;
58796
58873
  const updateComplete = new Promise(
58797
- (resolve8) => resolveUpdateComplete = resolve8
58874
+ (resolve9) => resolveUpdateComplete = resolve9
58798
58875
  );
58799
58876
  const extensions = context.services.agentContext?.config ? listExtensions(context.services.agentContext.config) : [];
58800
58877
  if (showMessageIfNoExtensions(context, extensions)) {
@@ -59503,6 +59580,7 @@ var ConsoleSummaryDisplay = ({
59503
59580
 
59504
59581
  // packages/cli/src/ui/components/Footer.tsx
59505
59582
  import process33 from "node:process";
59583
+ import os7 from "node:os";
59506
59584
 
59507
59585
  // packages/cli/src/ui/components/MemoryUsageDisplay.tsx
59508
59586
  var import_react69 = __toESM(require_react(), 1);
@@ -59673,6 +59751,11 @@ var ALL_ITEMS = [
59673
59751
  header: "session",
59674
59752
  description: "Unique identifier for the current session"
59675
59753
  },
59754
+ {
59755
+ id: "hostname",
59756
+ header: "machine",
59757
+ description: "Current machine hostname"
59758
+ },
59676
59759
  {
59677
59760
  id: "auth",
59678
59761
  header: "/auth",
@@ -59698,6 +59781,7 @@ var DEFAULT_ORDER = [
59698
59781
  "quota",
59699
59782
  "memory-usage",
59700
59783
  "session-id",
59784
+ "hostname",
59701
59785
  "auth",
59702
59786
  "code-changes",
59703
59787
  "token-count"
@@ -59746,6 +59830,7 @@ function resolveFooterState(settings) {
59746
59830
 
59747
59831
  // packages/cli/src/ui/components/Footer.tsx
59748
59832
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
59833
+ var HOSTNAME = os7.hostname();
59749
59834
  var CwdIndicator = ({
59750
59835
  targetDir,
59751
59836
  maxWidth,
@@ -60021,6 +60106,15 @@ var Footer = () => {
60021
60106
  );
60022
60107
  break;
60023
60108
  }
60109
+ case "hostname": {
60110
+ addCol(
60111
+ id,
60112
+ header,
60113
+ () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: itemColor, children: HOSTNAME }),
60114
+ HOSTNAME.length
60115
+ );
60116
+ break;
60117
+ }
60024
60118
  case "auth": {
60025
60119
  if (!settings.merged.ui.showUserIdentity) break;
60026
60120
  if (!authType) break;
@@ -60298,6 +60392,7 @@ var FooterConfigDialog = ({
60298
60392
  quota: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("quota", itemColor), children: "42% used" }),
60299
60393
  "memory-usage": /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("memory-usage", itemColor), children: "260 MB" }),
60300
60394
  "session-id": /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("session-id", itemColor), children: "769992f9" }),
60395
+ hostname: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("hostname", itemColor), children: "dev-machine" }),
60301
60396
  "code-changes": /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { flexDirection: "row", children: [
60302
60397
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes", theme.status.success), children: "+12" }),
60303
60398
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes"), children: " " }),
@@ -60467,7 +60562,7 @@ var import_react74 = __toESM(require_react(), 1);
60467
60562
  var import_react72 = __toESM(require_react(), 1);
60468
60563
 
60469
60564
  // packages/cli/src/ui/utils/rewindFileOps.ts
60470
- import fs32 from "node:fs/promises";
60565
+ import fs33 from "node:fs/promises";
60471
60566
  function calculateTurnStats(conversation, userMessage) {
60472
60567
  const msgIndex = conversation.messages.indexOf(userMessage);
60473
60568
  if (msgIndex === -1) return null;
@@ -60554,7 +60649,7 @@ async function revertFileChanges(conversation, targetMessageId) {
60554
60649
  try {
60555
60650
  let currentContent = null;
60556
60651
  try {
60557
- currentContent = await fs32.readFile(filePath, "utf8");
60652
+ currentContent = await fs33.readFile(filePath, "utf8");
60558
60653
  } catch (e) {
60559
60654
  const error = e;
60560
60655
  if ("code" in error && error.code === "ENOENT") {
@@ -60572,9 +60667,9 @@ async function revertFileChanges(conversation, targetMessageId) {
60572
60667
  }
60573
60668
  if (currentContent === newContent) {
60574
60669
  if (!isNewFile2) {
60575
- await fs32.writeFile(filePath, originalContent ?? "");
60670
+ await fs33.writeFile(filePath, originalContent ?? "");
60576
60671
  } else {
60577
- await fs32.unlink(filePath);
60672
+ await fs33.unlink(filePath);
60578
60673
  }
60579
60674
  } else if (currentContent !== null) {
60580
60675
  const originalText = originalContent ?? "";
@@ -60586,9 +60681,9 @@ async function revertFileChanges(conversation, targetMessageId) {
60586
60681
  const patchedContent = applyPatch(currentContent, undoPatch);
60587
60682
  if (typeof patchedContent === "string") {
60588
60683
  if (patchedContent === "" && isNewFile2) {
60589
- await fs32.unlink(filePath);
60684
+ await fs33.unlink(filePath);
60590
60685
  } else {
60591
- await fs32.writeFile(filePath, patchedContent);
60686
+ await fs33.writeFile(filePath, patchedContent);
60592
60687
  }
60593
60688
  } else {
60594
60689
  coreEvents.emitFeedback(
@@ -61224,14 +61319,14 @@ function enableHook(settings, hookName) {
61224
61319
  }
61225
61320
  const modifiedScopes = [];
61226
61321
  try {
61227
- for (const { scope, path: path37 } of foundInDisabledScopes) {
61322
+ for (const { scope, path: path38 } of foundInDisabledScopes) {
61228
61323
  if (isLoadableSettingScope(scope)) {
61229
61324
  const currentScopeDisabled = settings.forScope(scope).settings.hooksConfig?.disabled ?? [];
61230
61325
  const newDisabled = currentScopeDisabled.filter(
61231
61326
  (name) => name !== hookName
61232
61327
  );
61233
61328
  settings.setValue(scope, "hooksConfig.disabled", newDisabled);
61234
- modifiedScopes.push({ scope, path: path37 });
61329
+ modifiedScopes.push({ scope, path: path38 });
61235
61330
  }
61236
61331
  }
61237
61332
  } catch (error) {
@@ -61526,7 +61621,7 @@ async function enableAction3(context, args) {
61526
61621
  }
61527
61622
  const feedback = renderHookActionFeedback(
61528
61623
  result,
61529
- (label, path37) => `${label} (${path37})`
61624
+ (label, path38) => `${label} (${path38})`
61530
61625
  );
61531
61626
  return {
61532
61627
  type: "message",
@@ -61568,7 +61663,7 @@ async function disableAction3(context, args) {
61568
61663
  }
61569
61664
  const feedback = renderHookActionFeedback(
61570
61665
  result,
61571
- (label, path37) => `${label} (${path37})`
61666
+ (label, path38) => `${label} (${path38})`
61572
61667
  );
61573
61668
  return {
61574
61669
  type: "message",
@@ -61767,7 +61862,7 @@ var hooksCommand = {
61767
61862
  };
61768
61863
 
61769
61864
  // packages/cli/src/ui/commands/ideCommand.ts
61770
- import path28 from "node:path";
61865
+ import path29 from "node:path";
61771
61866
  function getIdeStatusMessage(ideClient) {
61772
61867
  const connection = ideClient.getConnectionStatus();
61773
61868
  switch (connection.status) {
@@ -61796,13 +61891,13 @@ function getIdeStatusMessage(ideClient) {
61796
61891
  function formatFileList(openFiles) {
61797
61892
  const basenameCounts = /* @__PURE__ */ new Map();
61798
61893
  for (const file of openFiles) {
61799
- const basename6 = path28.basename(file.path);
61894
+ const basename6 = path29.basename(file.path);
61800
61895
  basenameCounts.set(basename6, (basenameCounts.get(basename6) || 0) + 1);
61801
61896
  }
61802
61897
  const fileList = openFiles.map((file) => {
61803
- const basename6 = path28.basename(file.path);
61898
+ const basename6 = path29.basename(file.path);
61804
61899
  const isDuplicate = (basenameCounts.get(basename6) || 0) > 1;
61805
- const parentDir = path28.basename(path28.dirname(file.path));
61900
+ const parentDir = path29.basename(path29.dirname(file.path));
61806
61901
  const displayName = isDuplicate ? `${basename6} (/${parentDir})` : basename6;
61807
61902
  return ` - ${displayName}${file.isActive ? " (active)" : ""}`;
61808
61903
  }).join("\n");
@@ -61942,7 +62037,7 @@ var ideCommand = async () => {
61942
62037
  if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
61943
62038
  break;
61944
62039
  }
61945
- await new Promise((resolve8) => setTimeout(resolve8, 500));
62040
+ await new Promise((resolve9) => setTimeout(resolve9, 500));
61946
62041
  }
61947
62042
  const { messageType, content } = getIdeStatusMessage(ideClient);
61948
62043
  if (messageType === "error") {
@@ -62030,8 +62125,8 @@ var ideCommand = async () => {
62030
62125
  };
62031
62126
 
62032
62127
  // packages/cli/src/ui/commands/initCommand.ts
62033
- import * as fs33 from "node:fs";
62034
- import * as path29 from "node:path";
62128
+ import * as fs34 from "node:fs";
62129
+ import * as path30 from "node:path";
62035
62130
  var initCommand = {
62036
62131
  name: "init",
62037
62132
  description: "Analyzes the project and creates a tailored GEMINI.md file",
@@ -62046,10 +62141,10 @@ var initCommand = {
62046
62141
  };
62047
62142
  }
62048
62143
  const targetDir = context.services.agentContext.config.getTargetDir();
62049
- const geminiMdPath = path29.join(targetDir, "GEMINI.md");
62050
- const result = performInit(fs33.existsSync(geminiMdPath));
62144
+ const geminiMdPath = path30.join(targetDir, "GEMINI.md");
62145
+ const result = performInit(fs34.existsSync(geminiMdPath));
62051
62146
  if (result.type === "submit_prompt") {
62052
- fs33.writeFileSync(geminiMdPath, "", "utf8");
62147
+ fs34.writeFileSync(geminiMdPath, "", "utf8");
62053
62148
  context.ui.addItem(
62054
62149
  {
62055
62150
  type: "info",
@@ -62122,7 +62217,7 @@ Use /mcp auth <server-name> to authenticate.`
62122
62217
  type: "info",
62123
62218
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
62124
62219
  });
62125
- const { MCPOAuthProvider } = await import("./dist-DTPIOJ3P.js");
62220
+ const { MCPOAuthProvider } = await import("./dist-ETX67B7P.js");
62126
62221
  let oauthConfig = server.oauth;
62127
62222
  if (!oauthConfig) {
62128
62223
  oauthConfig = { enabled: false };
@@ -62490,7 +62585,7 @@ var import_react81 = __toESM(require_react(), 1);
62490
62585
 
62491
62586
  // packages/cli/src/ui/components/InboxDialog.tsx
62492
62587
  var import_react80 = __toESM(require_react(), 1);
62493
- import * as path31 from "node:path";
62588
+ import * as path32 from "node:path";
62494
62589
 
62495
62590
  // packages/cli/src/ui/components/messages/DiffRenderer.tsx
62496
62591
  var import_react79 = __toESM(require_react(), 1);
@@ -76288,10 +76383,10 @@ function colorizeCode({
76288
76383
  }
76289
76384
 
76290
76385
  // packages/cli/src/ui/utils/fileUtils.ts
76291
- import * as path30 from "node:path";
76386
+ import * as path31 from "node:path";
76292
76387
  function getFileExtension(filename) {
76293
76388
  if (!filename) return null;
76294
- const ext = path30.extname(filename);
76389
+ const ext = path31.extname(filename);
76295
76390
  return ext ? ext.slice(1) : null;
76296
76391
  }
76297
76392
 
@@ -76654,11 +76749,11 @@ var MEMORY_PATCH_ACTION_CHOICES = [
76654
76749
  }
76655
76750
  ];
76656
76751
  function normalizePathForUi(filePath) {
76657
- return path31.posix.normalize(filePath.replaceAll("\\", "/"));
76752
+ return path32.posix.normalize(filePath.replaceAll("\\", "/"));
76658
76753
  }
76659
76754
  function getPathBasename(filePath) {
76660
76755
  const normalizedPath = normalizePathForUi(filePath);
76661
- const basename6 = path31.posix.basename(normalizedPath);
76756
+ const basename6 = path32.posix.basename(normalizedPath);
76662
76757
  return basename6 === "." ? filePath : basename6;
76663
76758
  }
76664
76759
  function formatMemoryPatchSummary(patch) {
@@ -77615,97 +77710,62 @@ var InboxDialog = ({
77615
77710
  };
77616
77711
 
77617
77712
  // packages/cli/src/ui/commands/memoryCommand.ts
77618
- var memoryCommand = {
77619
- name: "memory",
77620
- description: "Commands for interacting with memory",
77713
+ var showSubCommand = {
77714
+ name: "show",
77715
+ description: "Show the current memory contents",
77716
+ kind: "built-in" /* BUILT_IN */,
77717
+ autoExecute: true,
77718
+ action: async (context) => {
77719
+ const config = context.services.agentContext?.config;
77720
+ if (!config) return;
77721
+ const result = showMemory(config);
77722
+ context.ui.addItem(
77723
+ {
77724
+ type: "info" /* INFO */,
77725
+ text: result.content
77726
+ },
77727
+ Date.now()
77728
+ );
77729
+ }
77730
+ };
77731
+ var addSubCommand = {
77732
+ name: "add",
77733
+ description: "Add content to the memory",
77621
77734
  kind: "built-in" /* BUILT_IN */,
77622
77735
  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);
77736
+ action: (context, args) => {
77737
+ const result = addMemory(args);
77738
+ if (result.type === "message") {
77739
+ return result;
77740
+ }
77741
+ context.ui.addItem(
77742
+ {
77743
+ type: "info" /* INFO */,
77744
+ text: `Attempting to save to memory: "${args.trim()}"`
77745
+ },
77746
+ Date.now()
77747
+ );
77748
+ return result;
77749
+ }
77750
+ };
77751
+ var reloadSubCommand = {
77752
+ name: "reload",
77753
+ altNames: ["refresh"],
77754
+ description: "Reload the memory from the source",
77755
+ kind: "built-in" /* BUILT_IN */,
77756
+ autoExecute: true,
77757
+ action: async (context) => {
77758
+ context.ui.addItem(
77759
+ {
77760
+ type: "info" /* INFO */,
77761
+ text: "Reloading memory from source files..."
77762
+ },
77763
+ Date.now()
77764
+ );
77765
+ try {
77766
+ const config = context.services.agentContext?.config;
77767
+ if (config) {
77768
+ const result = await refreshMemory(config);
77709
77769
  context.ui.addItem(
77710
77770
  {
77711
77771
  type: "info" /* INFO */,
@@ -77714,45 +77774,89 @@ var memoryCommand = {
77714
77774
  Date.now()
77715
77775
  );
77716
77776
  }
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
- }
77777
+ } catch (error) {
77778
+ context.ui.addItem(
77779
+ {
77780
+ type: "error" /* ERROR */,
77781
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
77782
+ text: `Error reloading memory: ${error.message}`
77783
+ },
77784
+ Date.now()
77785
+ );
77754
77786
  }
77755
- ]
77787
+ }
77788
+ };
77789
+ var listSubCommand = {
77790
+ name: "list",
77791
+ description: "Lists the paths of the GEMINI.md files in use",
77792
+ kind: "built-in" /* BUILT_IN */,
77793
+ autoExecute: true,
77794
+ action: async (context) => {
77795
+ const config = context.services.agentContext?.config;
77796
+ if (!config) return;
77797
+ const result = listMemoryFiles(config);
77798
+ context.ui.addItem(
77799
+ {
77800
+ type: "info" /* INFO */,
77801
+ text: result.content
77802
+ },
77803
+ Date.now()
77804
+ );
77805
+ }
77806
+ };
77807
+ var inboxSubCommand = {
77808
+ name: "inbox",
77809
+ description: "Review skills extracted from past sessions and move them to global or project skills",
77810
+ kind: "built-in" /* BUILT_IN */,
77811
+ autoExecute: true,
77812
+ action: (context) => {
77813
+ const config = context.services.agentContext?.config;
77814
+ if (!config) {
77815
+ return {
77816
+ type: "message",
77817
+ messageType: "error",
77818
+ content: "Config not loaded."
77819
+ };
77820
+ }
77821
+ if (!config.isAutoMemoryEnabled()) {
77822
+ return {
77823
+ type: "message",
77824
+ messageType: "info",
77825
+ content: "The memory inbox requires Auto Memory. Enable it with: experimental.autoMemory = true in settings."
77826
+ };
77827
+ }
77828
+ return {
77829
+ type: "custom_dialog",
77830
+ component: import_react81.default.createElement(InboxDialog, {
77831
+ config,
77832
+ onClose: () => context.ui.removeComponent(),
77833
+ onReloadSkills: async () => {
77834
+ await config.reloadSkills();
77835
+ context.ui.reloadCommands();
77836
+ },
77837
+ onReloadMemory: async () => {
77838
+ await refreshMemory(config);
77839
+ }
77840
+ })
77841
+ };
77842
+ }
77843
+ };
77844
+ var memoryCommand = (config) => {
77845
+ const isMemoryV2 = config?.isMemoryV2Enabled() ?? false;
77846
+ const subCommands = [
77847
+ showSubCommand,
77848
+ ...isMemoryV2 ? [] : [addSubCommand],
77849
+ reloadSubCommand,
77850
+ listSubCommand,
77851
+ inboxSubCommand
77852
+ ];
77853
+ return {
77854
+ name: "memory",
77855
+ description: "Commands for interacting with memory",
77856
+ kind: "built-in" /* BUILT_IN */,
77857
+ autoExecute: false,
77858
+ subCommands
77859
+ };
77756
77860
  };
77757
77861
 
77758
77862
  // packages/cli/src/ui/commands/modelCommand.ts
@@ -79286,8 +79390,8 @@ var oncallCommand = {
79286
79390
 
79287
79391
  // packages/cli/src/ui/commands/permissionsCommand.ts
79288
79392
  import * as process34 from "node:process";
79289
- import * as path32 from "node:path";
79290
- import * as fs34 from "node:fs";
79393
+ import * as path33 from "node:path";
79394
+ import * as fs35 from "node:fs";
79291
79395
  var permissionsCommand = {
79292
79396
  name: "permissions",
79293
79397
  description: "Manage folder trust settings and other permissions",
@@ -79305,10 +79409,10 @@ var permissionsCommand = {
79305
79409
  if (!dirPath) {
79306
79410
  targetDirectory = process34.cwd();
79307
79411
  } else {
79308
- targetDirectory = path32.resolve(expandHomeDir(dirPath));
79412
+ targetDirectory = path33.resolve(expandHomeDir(dirPath));
79309
79413
  }
79310
79414
  try {
79311
- if (!fs34.statSync(targetDirectory).isDirectory()) {
79415
+ if (!fs35.statSync(targetDirectory).isDirectory()) {
79312
79416
  return {
79313
79417
  type: "message",
79314
79418
  messageType: "error",
@@ -79352,7 +79456,7 @@ var permissionsCommand = {
79352
79456
  };
79353
79457
 
79354
79458
  // packages/cli/src/ui/commands/planCommand.ts
79355
- import * as path33 from "node:path";
79459
+ import * as path34 from "node:path";
79356
79460
  async function copyAction(context) {
79357
79461
  const config = context.services.agentContext?.config;
79358
79462
  if (!config) {
@@ -79369,7 +79473,7 @@ async function copyAction(context) {
79369
79473
  await copyToClipboard(content);
79370
79474
  coreEvents.emitFeedback(
79371
79475
  "info",
79372
- `Plan copied to clipboard (${path33.basename(planPath)}).`
79476
+ `Plan copied to clipboard (${path34.basename(planPath)}).`
79373
79477
  );
79374
79478
  } catch (error) {
79375
79479
  coreEvents.emitFeedback("error", `Failed to copy plan: ${error}`, error);
@@ -79407,7 +79511,7 @@ var planCommand = {
79407
79511
  config.storage.getPlansDir(),
79408
79512
  config.getFileSystemService()
79409
79513
  );
79410
- const fileName = path33.basename(approvedPlanPath);
79514
+ const fileName = path34.basename(approvedPlanPath);
79411
79515
  coreEvents.emitFeedback("info", `Approved Plan: ${fileName}`);
79412
79516
  context.ui.addItem({
79413
79517
  type: "gemini" /* GEMINI */,
@@ -79592,8 +79696,8 @@ var quitCommand = {
79592
79696
  };
79593
79697
 
79594
79698
  // packages/cli/src/ui/commands/restoreCommand.ts
79595
- import * as fs35 from "node:fs/promises";
79596
- import path34 from "node:path";
79699
+ import * as fs36 from "node:fs/promises";
79700
+ import path35 from "node:path";
79597
79701
  var HistoryItemSchema = external_exports.object({
79598
79702
  type: external_exports.string(),
79599
79703
  id: external_exports.number()
@@ -79612,8 +79716,8 @@ async function restoreAction(context, args) {
79612
79716
  };
79613
79717
  }
79614
79718
  try {
79615
- await fs35.mkdir(checkpointDir, { recursive: true });
79616
- const files = await fs35.readdir(checkpointDir);
79719
+ await fs36.mkdir(checkpointDir, { recursive: true });
79720
+ const files = await fs36.readdir(checkpointDir);
79617
79721
  const jsonFiles = files.filter((file) => file.endsWith(".json"));
79618
79722
  if (!args) {
79619
79723
  if (jsonFiles.length === 0) {
@@ -79640,8 +79744,8 @@ ${fileList}`
79640
79744
  content: `File not found: ${selectedFile}`
79641
79745
  };
79642
79746
  }
79643
- const filePath = path34.join(checkpointDir, selectedFile);
79644
- const data = await fs35.readFile(filePath, "utf-8");
79747
+ const filePath = path35.join(checkpointDir, selectedFile);
79748
+ const data = await fs36.readFile(filePath, "utf-8");
79645
79749
  const parseResult = ToolCallDataSchema.safeParse(JSON.parse(data));
79646
79750
  if (!parseResult.success) {
79647
79751
  return {
@@ -79689,7 +79793,7 @@ async function completion(context, _partialArg) {
79689
79793
  return [];
79690
79794
  }
79691
79795
  try {
79692
- const files = await fs35.readdir(checkpointDir);
79796
+ const files = await fs36.readdir(checkpointDir);
79693
79797
  const jsonFiles = files.filter((file) => file.endsWith(".json"));
79694
79798
  return getTruncatedCheckpointNames(jsonFiles);
79695
79799
  } catch {
@@ -79865,7 +79969,7 @@ async function listTools(context, showDescriptions) {
79865
79969
  };
79866
79970
  context.ui.addItem(toolsListItem);
79867
79971
  }
79868
- var listSubCommand = {
79972
+ var listSubCommand2 = {
79869
79973
  name: "list",
79870
79974
  description: "List available Gemini CLI tools.",
79871
79975
  kind: "built-in" /* BUILT_IN */,
@@ -79885,7 +79989,7 @@ var toolsCommand = {
79885
79989
  description: "List available Gemini CLI tools. Use /tools desc to include descriptions.",
79886
79990
  kind: "built-in" /* BUILT_IN */,
79887
79991
  autoExecute: false,
79888
- subCommands: [listSubCommand, descSubCommand],
79992
+ subCommands: [listSubCommand2, descSubCommand],
79889
79993
  action: async (context, args) => {
79890
79994
  const subCommand = args?.trim();
79891
79995
  const useShowDescriptions = subCommand === "desc" || subCommand === "descriptions";
@@ -79942,9 +80046,9 @@ function disableSkill(settings, skillName, scope) {
79942
80046
 
79943
80047
  // packages/cli/src/utils/skillUtils.ts
79944
80048
  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";
80049
+ import * as fs37 from "node:fs/promises";
80050
+ import * as path36 from "node:path";
80051
+ import * as os8 from "node:os";
79948
80052
  function renderSkillActionFeedback(result, formatScope) {
79949
80053
  const { skillName, action, status, error } = result;
79950
80054
  if (status === "error") {
@@ -79983,8 +80087,8 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
79983
80087
  const isSkillFile = source2.toLowerCase().endsWith(".skill");
79984
80088
  try {
79985
80089
  if (isGitUrl) {
79986
- tempDirToClean = await fs36.mkdtemp(
79987
- path35.join(os7.tmpdir(), "gemini-skill-")
80090
+ tempDirToClean = await fs37.mkdtemp(
80091
+ path36.join(os8.tmpdir(), "gemini-skill-")
79988
80092
  );
79989
80093
  sourcePath = tempDirToClean;
79990
80094
  onLog(`Cloning skill from ${source2}...`);
@@ -79996,18 +80100,18 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
79996
80100
  tempDirToClean
79997
80101
  );
79998
80102
  } else if (isSkillFile) {
79999
- tempDirToClean = await fs36.mkdtemp(
80000
- path35.join(os7.tmpdir(), "gemini-skill-")
80103
+ tempDirToClean = await fs37.mkdtemp(
80104
+ path36.join(os8.tmpdir(), "gemini-skill-")
80001
80105
  );
80002
80106
  sourcePath = tempDirToClean;
80003
80107
  onLog(`Extracting skill from ${source2}...`);
80004
- await (0, import_extract_zip2.default)(path35.resolve(source2), { dir: tempDirToClean });
80108
+ await (0, import_extract_zip2.default)(path36.resolve(source2), { dir: tempDirToClean });
80005
80109
  }
80006
80110
  if (subpath) {
80007
- sourcePath = path35.join(sourcePath, subpath);
80111
+ sourcePath = path36.join(sourcePath, subpath);
80008
80112
  }
80009
- sourcePath = path35.resolve(sourcePath);
80010
- if (tempDirToClean && !sourcePath.startsWith(path35.resolve(tempDirToClean))) {
80113
+ sourcePath = path36.resolve(sourcePath);
80114
+ if (tempDirToClean && !sourcePath.startsWith(path36.resolve(tempDirToClean))) {
80011
80115
  throw new Error("Invalid path: Directory traversal not allowed.");
80012
80116
  }
80013
80117
  onLog(`Searching for skills in ${sourcePath}...`);
@@ -80023,29 +80127,29 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
80023
80127
  if (!await requestConsent(skills, targetDir)) {
80024
80128
  throw new Error("Skill installation cancelled by user.");
80025
80129
  }
80026
- await fs36.mkdir(targetDir, { recursive: true });
80130
+ await fs37.mkdir(targetDir, { recursive: true });
80027
80131
  const installedSkills = [];
80028
80132
  for (const skill of skills) {
80029
80133
  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);
80134
+ const skillDir = path36.dirname(skill.location);
80135
+ const destPath = path36.join(targetDir, skillName);
80136
+ const exists = await fs37.stat(destPath).catch(() => null);
80033
80137
  if (exists) {
80034
80138
  onLog(`Skill "${skillName}" already exists. Overwriting...`);
80035
- await fs36.rm(destPath, { recursive: true, force: true });
80139
+ await fs37.rm(destPath, { recursive: true, force: true });
80036
80140
  }
80037
- await fs36.cp(skillDir, destPath, { recursive: true });
80141
+ await fs37.cp(skillDir, destPath, { recursive: true });
80038
80142
  installedSkills.push({ name: skillName, location: destPath });
80039
80143
  }
80040
80144
  return installedSkills;
80041
80145
  } finally {
80042
80146
  if (tempDirToClean) {
80043
- await fs36.rm(tempDirToClean, { recursive: true, force: true });
80147
+ await fs37.rm(tempDirToClean, { recursive: true, force: true });
80044
80148
  }
80045
80149
  }
80046
80150
  }
80047
80151
  async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.resolve(true)) {
80048
- const sourcePath = path35.resolve(source2);
80152
+ const sourcePath = path36.resolve(source2);
80049
80153
  onLog(`Searching for skills in ${sourcePath}...`);
80050
80154
  const skills = await loadSkillsFromDir(sourcePath);
80051
80155
  if (skills.length === 0) {
@@ -80070,20 +80174,20 @@ async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.r
80070
80174
  if (!await requestConsent(skills, targetDir)) {
80071
80175
  throw new Error("Skill linking cancelled by user.");
80072
80176
  }
80073
- await fs36.mkdir(targetDir, { recursive: true });
80177
+ await fs37.mkdir(targetDir, { recursive: true });
80074
80178
  const linkedSkills = [];
80075
80179
  for (const skill of skills) {
80076
80180
  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);
80181
+ const skillSourceDir = path36.dirname(skill.location);
80182
+ const destPath = path36.join(targetDir, skillName);
80183
+ const exists = await fs37.lstat(destPath).catch(() => null);
80080
80184
  if (exists) {
80081
80185
  onLog(
80082
80186
  `Skill "${skillName}" already exists at destination. Overwriting...`
80083
80187
  );
80084
- await fs36.rm(destPath, { recursive: true, force: true });
80188
+ await fs37.rm(destPath, { recursive: true, force: true });
80085
80189
  }
80086
- await fs36.symlink(
80190
+ await fs37.symlink(
80087
80191
  skillSourceDir,
80088
80192
  destPath,
80089
80193
  process.platform === "win32" ? "junction" : "dir"
@@ -80099,19 +80203,19 @@ async function uninstallSkill(name, scope) {
80099
80203
  const discoveredSkills = await loadSkillsFromDir(targetDir);
80100
80204
  const skillToUninstall = discoveredSkills.find((s3) => s3.name === name);
80101
80205
  if (!skillToUninstall) {
80102
- const skillPath = path35.resolve(targetDir, name);
80103
- if (!skillPath.startsWith(path35.resolve(targetDir))) {
80206
+ const skillPath = path36.resolve(targetDir, name);
80207
+ if (!skillPath.startsWith(path36.resolve(targetDir))) {
80104
80208
  return null;
80105
80209
  }
80106
- const exists = await fs36.lstat(skillPath).catch(() => null);
80210
+ const exists = await fs37.lstat(skillPath).catch(() => null);
80107
80211
  if (!exists) {
80108
80212
  return null;
80109
80213
  }
80110
- await fs36.rm(skillPath, { recursive: true, force: true });
80214
+ await fs37.rm(skillPath, { recursive: true, force: true });
80111
80215
  return { location: skillPath };
80112
80216
  }
80113
- const skillDir = path35.dirname(skillToUninstall.location);
80114
- await fs36.rm(skillDir, { recursive: true, force: true });
80217
+ const skillDir = path36.dirname(skillToUninstall.location);
80218
+ await fs37.rm(skillDir, { recursive: true, force: true });
80115
80219
  return { location: skillDir };
80116
80220
  }
80117
80221
 
@@ -80241,7 +80345,7 @@ async function disableAction4(context, args) {
80241
80345
  const result = disableSkill(context.services.settings, skillName, scope);
80242
80346
  let feedback = renderSkillActionFeedback(
80243
80347
  result,
80244
- (label, path37) => `${label} (${path37})`
80348
+ (label, path38) => `${label} (${path38})`
80245
80349
  );
80246
80350
  if (result.status === "success" || result.status === "no-op") {
80247
80351
  feedback += ' You can run "/skills reload" to refresh your current instance.';
@@ -80277,7 +80381,7 @@ async function enableAction4(context, args) {
80277
80381
  const result = enableSkill(context.services.settings, skillName);
80278
80382
  let feedback = renderSkillActionFeedback(
80279
80383
  result,
80280
- (label, path37) => `${label} (${path37})`
80384
+ (label, path38) => `${label} (${path38})`
80281
80385
  );
80282
80386
  if (result.status === "success" || result.status === "no-op") {
80283
80387
  feedback += ' You can run "/skills reload" to refresh your current instance.';
@@ -80315,7 +80419,7 @@ async function reloadAction2(context) {
80315
80419
  const minVisibleDuration = 500;
80316
80420
  if (elapsed < minVisibleDuration) {
80317
80421
  await new Promise(
80318
- (resolve8) => setTimeout(resolve8, minVisibleDuration - elapsed)
80422
+ (resolve9) => setTimeout(resolve9, minVisibleDuration - elapsed)
80319
80423
  );
80320
80424
  }
80321
80425
  context.ui.setPendingItem(null);
@@ -80468,8 +80572,8 @@ var vimCommand = {
80468
80572
 
80469
80573
  // packages/cli/src/ui/commands/setupGithubCommand.ts
80470
80574
  var import_undici2 = __toESM(require_undici(), 1);
80471
- import path36 from "node:path";
80472
- import * as fs37 from "node:fs";
80575
+ import path37 from "node:path";
80576
+ import * as fs38 from "node:fs";
80473
80577
  import { Writable } from "node:stream";
80474
80578
 
80475
80579
  // packages/cli/src/utils/gitUtils.ts
@@ -80596,25 +80700,25 @@ function getOpenUrlsCommands(readmeUrl) {
80596
80700
  }
80597
80701
  async function updateGitignore(gitRepoRoot) {
80598
80702
  const gitignoreEntries = [".gemini/", "gha-creds-*.json"];
80599
- const gitignorePath = path36.join(gitRepoRoot, ".gitignore");
80703
+ const gitignorePath = path37.join(gitRepoRoot, ".gitignore");
80600
80704
  try {
80601
80705
  let existingContent = "";
80602
80706
  let fileExists2 = true;
80603
80707
  try {
80604
- existingContent = await fs37.promises.readFile(gitignorePath, "utf8");
80708
+ existingContent = await fs38.promises.readFile(gitignorePath, "utf8");
80605
80709
  } catch {
80606
80710
  fileExists2 = false;
80607
80711
  }
80608
80712
  if (!fileExists2) {
80609
80713
  const contentToWrite = gitignoreEntries.join("\n") + "\n";
80610
- await fs37.promises.writeFile(gitignorePath, contentToWrite);
80714
+ await fs38.promises.writeFile(gitignorePath, contentToWrite);
80611
80715
  } else {
80612
80716
  const missingEntries = gitignoreEntries.filter(
80613
80717
  (entry) => !existingContent.split(/\r?\n/).some((line) => line.split("#")[0].trim() === entry)
80614
80718
  );
80615
80719
  if (missingEntries.length > 0) {
80616
80720
  const contentToAdd = "\n" + missingEntries.join("\n") + "\n";
80617
- await fs37.promises.appendFile(gitignorePath, contentToAdd);
80721
+ await fs38.promises.appendFile(gitignorePath, contentToAdd);
80618
80722
  }
80619
80723
  }
80620
80724
  } catch (error) {
@@ -80652,11 +80756,11 @@ async function downloadFiles({
80652
80756
  `Empty body while downloading ${endpoint}: ${response.status} - ${response.statusText}`
80653
80757
  );
80654
80758
  }
80655
- const destination = path36.resolve(
80759
+ const destination = path37.resolve(
80656
80760
  targetDir,
80657
- path36.basename(fileBasename)
80761
+ path37.basename(fileBasename)
80658
80762
  );
80659
- const fileStream = fs37.createWriteStream(destination, {
80763
+ const fileStream = fs38.createWriteStream(destination, {
80660
80764
  mode: 420,
80661
80765
  // -rw-r--r--, user(rw), group(r), other(r)
80662
80766
  flags: "w",
@@ -80673,7 +80777,7 @@ async function downloadFiles({
80673
80777
  }
80674
80778
  async function createDirectory(dirPath) {
80675
80779
  try {
80676
- await fs37.promises.mkdir(dirPath, { recursive: true });
80780
+ await fs38.promises.mkdir(dirPath, { recursive: true });
80677
80781
  } catch (error) {
80678
80782
  debugLogger.debug(`Failed to create ${dirPath} directory:`, error);
80679
80783
  throw new Error(
@@ -80727,9 +80831,9 @@ var setupGithubCommand = {
80727
80831
  const proxy = context?.services?.agentContext?.config.getProxy();
80728
80832
  const releaseTag = await getLatestGitHubRelease(proxy);
80729
80833
  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");
80834
+ const workflowsDir = path37.join(gitRepoRoot, ".github", "workflows");
80731
80835
  await createDirectory(workflowsDir);
80732
- const commandsDir = path36.join(gitRepoRoot, ".github", "commands");
80836
+ const commandsDir = path37.join(gitRepoRoot, ".github", "commands");
80733
80837
  await createDirectory(commandsDir);
80734
80838
  await downloadSetupFiles({
80735
80839
  configs: [
@@ -80949,6 +81053,7 @@ var BuiltinCommandLoader = class {
80949
81053
  copyCommand,
80950
81054
  corgiCommand,
80951
81055
  docsCommand,
81056
+ exportSessionCommand,
80952
81057
  directoryCommand,
80953
81058
  editorCommand,
80954
81059
  ...this.config?.getExtensionsEnabled() === false ? [
@@ -80990,7 +81095,7 @@ var BuiltinCommandLoader = class {
80990
81095
  })
80991
81096
  }
80992
81097
  ] : [mcpCommand],
80993
- memoryCommand,
81098
+ memoryCommand(this.config),
80994
81099
  modelCommand,
80995
81100
  ...this.config?.getFolderTrust() ? [permissionsCommand] : [],
80996
81101
  ...this.config?.isPlanEnabled() ? [planCommand] : [],