@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-I5JMJ2LU.js";
9
+ } from "./chunk-4TLQKGTR.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-NHDN46IK.js";
61
+ } from "./chunk-PGJUNQPO.js";
61
62
  import {
62
63
  isDevelopment
63
- } from "./chunk-7LOMS5HP.js";
64
+ } from "./chunk-PYLHDAUK.js";
64
65
  import {
65
66
  emptyIcon,
66
67
  require_react
67
- } from "./chunk-UZZVXATH.js";
68
+ } from "./chunk-6XOSIMPZ.js";
68
69
  import {
69
70
  AsyncFzf,
70
71
  Config,
@@ -200,7 +201,7 @@ import {
200
201
  stripAnsi,
201
202
  tokenLimit,
202
203
  uiTelemetryService
203
- } from "./chunk-QZ2JZRLK.js";
204
+ } from "./chunk-NBRZ4A3S.js";
204
205
  import {
205
206
  ApprovalMode,
206
207
  CoreEvent,
@@ -226,7 +227,7 @@ import {
226
227
  shortenPath,
227
228
  tildeifyPath,
228
229
  unescapePath
229
- } from "./chunk-ECNYAST2.js";
230
+ } from "./chunk-N6QYTC2T.js";
230
231
  import {
231
232
  require_src
232
233
  } from "./chunk-RJTRUG2J.js";
@@ -1729,8 +1730,8 @@ var require_react_reconciler_production = __commonJS({
1729
1730
  currentEntangledActionThenable = {
1730
1731
  status: "pending",
1731
1732
  value: void 0,
1732
- then: function(resolve8) {
1733
- entangledListeners.push(resolve8);
1733
+ then: function(resolve9) {
1734
+ entangledListeners.push(resolve9);
1734
1735
  }
1735
1736
  };
1736
1737
  }
@@ -1753,8 +1754,8 @@ var require_react_reconciler_production = __commonJS({
1753
1754
  status: "pending",
1754
1755
  value: null,
1755
1756
  reason: null,
1756
- then: function(resolve8) {
1757
- listeners.push(resolve8);
1757
+ then: function(resolve9) {
1758
+ listeners.push(resolve9);
1758
1759
  }
1759
1760
  };
1760
1761
  thenable.then(
@@ -9748,7 +9749,7 @@ var require_prompt = __commonJS({
9748
9749
  var require_text = __commonJS({
9749
9750
  "node_modules/prompts/dist/elements/text.js"(exports, module) {
9750
9751
  "use strict";
9751
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
9752
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
9752
9753
  try {
9753
9754
  var info = gen[key](arg);
9754
9755
  var value = info.value;
@@ -9757,7 +9758,7 @@ var require_text = __commonJS({
9757
9758
  return;
9758
9759
  }
9759
9760
  if (info.done) {
9760
- resolve8(value);
9761
+ resolve9(value);
9761
9762
  } else {
9762
9763
  Promise.resolve(value).then(_next, _throw);
9763
9764
  }
@@ -9765,13 +9766,13 @@ var require_text = __commonJS({
9765
9766
  function _asyncToGenerator(fn2) {
9766
9767
  return function() {
9767
9768
  var self = this, args = arguments;
9768
- return new Promise(function(resolve8, reject) {
9769
+ return new Promise(function(resolve9, reject) {
9769
9770
  var gen = fn2.apply(self, args);
9770
9771
  function _next(value) {
9771
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
9772
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
9772
9773
  }
9773
9774
  function _throw(err) {
9774
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
9775
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
9775
9776
  }
9776
9777
  _next(void 0);
9777
9778
  });
@@ -10487,7 +10488,7 @@ var require_dateparts = __commonJS({
10487
10488
  var require_date = __commonJS({
10488
10489
  "node_modules/prompts/dist/elements/date.js"(exports, module) {
10489
10490
  "use strict";
10490
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
10491
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
10491
10492
  try {
10492
10493
  var info = gen[key](arg);
10493
10494
  var value = info.value;
@@ -10496,7 +10497,7 @@ var require_date = __commonJS({
10496
10497
  return;
10497
10498
  }
10498
10499
  if (info.done) {
10499
- resolve8(value);
10500
+ resolve9(value);
10500
10501
  } else {
10501
10502
  Promise.resolve(value).then(_next, _throw);
10502
10503
  }
@@ -10504,13 +10505,13 @@ var require_date = __commonJS({
10504
10505
  function _asyncToGenerator(fn2) {
10505
10506
  return function() {
10506
10507
  var self = this, args = arguments;
10507
- return new Promise(function(resolve8, reject) {
10508
+ return new Promise(function(resolve9, reject) {
10508
10509
  var gen = fn2.apply(self, args);
10509
10510
  function _next(value) {
10510
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
10511
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
10511
10512
  }
10512
10513
  function _throw(err) {
10513
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
10514
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
10514
10515
  }
10515
10516
  _next(void 0);
10516
10517
  });
@@ -10713,7 +10714,7 @@ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
10713
10714
  var require_number = __commonJS({
10714
10715
  "node_modules/prompts/dist/elements/number.js"(exports, module) {
10715
10716
  "use strict";
10716
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
10717
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
10717
10718
  try {
10718
10719
  var info = gen[key](arg);
10719
10720
  var value = info.value;
@@ -10722,7 +10723,7 @@ var require_number = __commonJS({
10722
10723
  return;
10723
10724
  }
10724
10725
  if (info.done) {
10725
- resolve8(value);
10726
+ resolve9(value);
10726
10727
  } else {
10727
10728
  Promise.resolve(value).then(_next, _throw);
10728
10729
  }
@@ -10730,13 +10731,13 @@ var require_number = __commonJS({
10730
10731
  function _asyncToGenerator(fn2) {
10731
10732
  return function() {
10732
10733
  var self = this, args = arguments;
10733
- return new Promise(function(resolve8, reject) {
10734
+ return new Promise(function(resolve9, reject) {
10734
10735
  var gen = fn2.apply(self, args);
10735
10736
  function _next(value) {
10736
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
10737
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
10737
10738
  }
10738
10739
  function _throw(err) {
10739
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
10740
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
10740
10741
  }
10741
10742
  _next(void 0);
10742
10743
  });
@@ -11159,7 +11160,7 @@ Instructions:
11159
11160
  var require_autocomplete = __commonJS({
11160
11161
  "node_modules/prompts/dist/elements/autocomplete.js"(exports, module) {
11161
11162
  "use strict";
11162
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
11163
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
11163
11164
  try {
11164
11165
  var info = gen[key](arg);
11165
11166
  var value = info.value;
@@ -11168,7 +11169,7 @@ var require_autocomplete = __commonJS({
11168
11169
  return;
11169
11170
  }
11170
11171
  if (info.done) {
11171
- resolve8(value);
11172
+ resolve9(value);
11172
11173
  } else {
11173
11174
  Promise.resolve(value).then(_next, _throw);
11174
11175
  }
@@ -11176,13 +11177,13 @@ var require_autocomplete = __commonJS({
11176
11177
  function _asyncToGenerator(fn2) {
11177
11178
  return function() {
11178
11179
  var self = this, args = arguments;
11179
- return new Promise(function(resolve8, reject) {
11180
+ return new Promise(function(resolve9, reject) {
11180
11181
  var gen = fn2.apply(self, args);
11181
11182
  function _next(value) {
11182
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
11183
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
11183
11184
  }
11184
11185
  function _throw(err) {
11185
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
11186
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
11186
11187
  }
11187
11188
  _next(void 0);
11188
11189
  });
@@ -11813,7 +11814,7 @@ var require_dist = __commonJS({
11813
11814
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
11814
11815
  return arr2;
11815
11816
  }
11816
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
11817
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
11817
11818
  try {
11818
11819
  var info = gen[key](arg);
11819
11820
  var value = info.value;
@@ -11822,7 +11823,7 @@ var require_dist = __commonJS({
11822
11823
  return;
11823
11824
  }
11824
11825
  if (info.done) {
11825
- resolve8(value);
11826
+ resolve9(value);
11826
11827
  } else {
11827
11828
  Promise.resolve(value).then(_next, _throw);
11828
11829
  }
@@ -11830,13 +11831,13 @@ var require_dist = __commonJS({
11830
11831
  function _asyncToGenerator(fn2) {
11831
11832
  return function() {
11832
11833
  var self = this, args = arguments;
11833
- return new Promise(function(resolve8, reject) {
11834
+ return new Promise(function(resolve9, reject) {
11834
11835
  var gen = fn2.apply(self, args);
11835
11836
  function _next(value) {
11836
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
11837
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
11837
11838
  }
11838
11839
  function _throw(err) {
11839
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
11840
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
11840
11841
  }
11841
11842
  _next(void 0);
11842
11843
  });
@@ -14173,7 +14174,7 @@ var require_get_stream = __commonJS({
14173
14174
  };
14174
14175
  const { maxBuffer } = options;
14175
14176
  let stream;
14176
- await new Promise((resolve8, reject) => {
14177
+ await new Promise((resolve9, reject) => {
14177
14178
  const rejectPromise = (error) => {
14178
14179
  if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
14179
14180
  error.bufferedData = stream.getBufferedValue();
@@ -14185,7 +14186,7 @@ var require_get_stream = __commonJS({
14185
14186
  rejectPromise(error);
14186
14187
  return;
14187
14188
  }
14188
- resolve8();
14189
+ resolve9();
14189
14190
  });
14190
14191
  stream.on("data", () => {
14191
14192
  if (stream.getBufferedLength() > maxBuffer) {
@@ -14261,7 +14262,7 @@ var require_pend = __commonJS({
14261
14262
  // node_modules/fd-slicer/index.js
14262
14263
  var require_fd_slicer = __commonJS({
14263
14264
  "node_modules/fd-slicer/index.js"(exports) {
14264
- var fs38 = __require("fs");
14265
+ var fs39 = __require("fs");
14265
14266
  var util2 = __require("util");
14266
14267
  var stream = __require("stream");
14267
14268
  var Readable = stream.Readable;
@@ -14286,7 +14287,7 @@ var require_fd_slicer = __commonJS({
14286
14287
  FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
14287
14288
  var self = this;
14288
14289
  self.pend.go(function(cb) {
14289
- fs38.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
14290
+ fs39.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
14290
14291
  cb();
14291
14292
  callback(err, bytesRead, buffer2);
14292
14293
  });
@@ -14295,7 +14296,7 @@ var require_fd_slicer = __commonJS({
14295
14296
  FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
14296
14297
  var self = this;
14297
14298
  self.pend.go(function(cb) {
14298
- fs38.write(self.fd, buffer, offset, length, position, function(err, written, buffer2) {
14299
+ fs39.write(self.fd, buffer, offset, length, position, function(err, written, buffer2) {
14299
14300
  cb();
14300
14301
  callback(err, written, buffer2);
14301
14302
  });
@@ -14316,7 +14317,7 @@ var require_fd_slicer = __commonJS({
14316
14317
  if (self.refCount > 0) return;
14317
14318
  if (self.refCount < 0) throw new Error("invalid unref");
14318
14319
  if (self.autoClose) {
14319
- fs38.close(self.fd, onCloseDone);
14320
+ fs39.close(self.fd, onCloseDone);
14320
14321
  }
14321
14322
  function onCloseDone(err) {
14322
14323
  if (err) {
@@ -14353,7 +14354,7 @@ var require_fd_slicer = __commonJS({
14353
14354
  self.context.pend.go(function(cb) {
14354
14355
  if (self.destroyed) return cb();
14355
14356
  var buffer = new Buffer(toRead);
14356
- fs38.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
14357
+ fs39.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
14357
14358
  if (err) {
14358
14359
  self.destroy(err);
14359
14360
  } else if (bytesRead === 0) {
@@ -14400,7 +14401,7 @@ var require_fd_slicer = __commonJS({
14400
14401
  }
14401
14402
  self.context.pend.go(function(cb) {
14402
14403
  if (self.destroyed) return cb();
14403
- fs38.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err2, bytes) {
14404
+ fs39.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err2, bytes) {
14404
14405
  if (err2) {
14405
14406
  self.destroy();
14406
14407
  cb();
@@ -14827,7 +14828,7 @@ var require_buffer_crc32 = __commonJS({
14827
14828
  // node_modules/yauzl/index.js
14828
14829
  var require_yauzl = __commonJS({
14829
14830
  "node_modules/yauzl/index.js"(exports) {
14830
- var fs38 = __require("fs");
14831
+ var fs39 = __require("fs");
14831
14832
  var zlib = __require("zlib");
14832
14833
  var fd_slicer = require_fd_slicer();
14833
14834
  var crc32 = require_buffer_crc32();
@@ -14845,7 +14846,7 @@ var require_yauzl = __commonJS({
14845
14846
  exports.ZipFile = ZipFile;
14846
14847
  exports.Entry = Entry;
14847
14848
  exports.RandomAccessReader = RandomAccessReader;
14848
- function open(path37, options, callback) {
14849
+ function open(path38, options, callback) {
14849
14850
  if (typeof options === "function") {
14850
14851
  callback = options;
14851
14852
  options = null;
@@ -14857,10 +14858,10 @@ var require_yauzl = __commonJS({
14857
14858
  if (options.validateEntrySizes == null) options.validateEntrySizes = true;
14858
14859
  if (options.strictFileNames == null) options.strictFileNames = false;
14859
14860
  if (callback == null) callback = defaultCallback;
14860
- fs38.open(path37, "r", function(err, fd) {
14861
+ fs39.open(path38, "r", function(err, fd) {
14861
14862
  if (err) return callback(err);
14862
14863
  fromFd(fd, options, function(err2, zipfile) {
14863
- if (err2) fs38.close(fd, defaultCallback);
14864
+ if (err2) fs39.close(fd, defaultCallback);
14864
14865
  callback(err2, zipfile);
14865
14866
  });
14866
14867
  });
@@ -14877,7 +14878,7 @@ var require_yauzl = __commonJS({
14877
14878
  if (options.validateEntrySizes == null) options.validateEntrySizes = true;
14878
14879
  if (options.strictFileNames == null) options.strictFileNames = false;
14879
14880
  if (callback == null) callback = defaultCallback;
14880
- fs38.fstat(fd, function(err, stats) {
14881
+ fs39.fstat(fd, function(err, stats) {
14881
14882
  if (err) return callback(err);
14882
14883
  var reader = fd_slicer.createFromFd(fd, { autoClose: true });
14883
14884
  fromRandomAccessReader(reader, stats.size, options, callback);
@@ -15457,9 +15458,9 @@ var require_yauzl = __commonJS({
15457
15458
  var require_extract_zip = __commonJS({
15458
15459
  "node_modules/extract-zip/index.js"(exports, module) {
15459
15460
  var debug = require_src()("extract-zip");
15460
- var { createWriteStream: createWriteStream5, promises: fs38 } = __require("fs");
15461
+ var { createWriteStream: createWriteStream5, promises: fs39 } = __require("fs");
15461
15462
  var getStream = require_get_stream();
15462
- var path37 = __require("path");
15463
+ var path38 = __require("path");
15463
15464
  var { promisify: promisify5 } = __require("util");
15464
15465
  var stream = __require("stream");
15465
15466
  var yauzl = require_yauzl();
@@ -15474,7 +15475,7 @@ var require_extract_zip = __commonJS({
15474
15475
  debug("opening", this.zipPath, "with opts", this.opts);
15475
15476
  this.zipfile = await openZip(this.zipPath, { lazyEntries: true });
15476
15477
  this.canceled = false;
15477
- return new Promise((resolve8, reject) => {
15478
+ return new Promise((resolve9, reject) => {
15478
15479
  this.zipfile.on("error", (err) => {
15479
15480
  this.canceled = true;
15480
15481
  reject(err);
@@ -15483,7 +15484,7 @@ var require_extract_zip = __commonJS({
15483
15484
  this.zipfile.on("close", () => {
15484
15485
  if (!this.canceled) {
15485
15486
  debug("zip extraction complete");
15486
- resolve8();
15487
+ resolve9();
15487
15488
  }
15488
15489
  });
15489
15490
  this.zipfile.on("entry", async (entry) => {
@@ -15496,12 +15497,12 @@ var require_extract_zip = __commonJS({
15496
15497
  this.zipfile.readEntry();
15497
15498
  return;
15498
15499
  }
15499
- const destDir = path37.dirname(path37.join(this.opts.dir, entry.fileName));
15500
+ const destDir = path38.dirname(path38.join(this.opts.dir, entry.fileName));
15500
15501
  try {
15501
- await fs38.mkdir(destDir, { recursive: true });
15502
- const canonicalDestDir = await fs38.realpath(destDir);
15503
- const relativeDestDir = path37.relative(this.opts.dir, canonicalDestDir);
15504
- if (relativeDestDir.split(path37.sep).includes("..")) {
15502
+ await fs39.mkdir(destDir, { recursive: true });
15503
+ const canonicalDestDir = await fs39.realpath(destDir);
15504
+ const relativeDestDir = path38.relative(this.opts.dir, canonicalDestDir);
15505
+ if (relativeDestDir.split(path38.sep).includes("..")) {
15505
15506
  throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
15506
15507
  }
15507
15508
  await this.extractEntry(entry);
@@ -15523,7 +15524,7 @@ var require_extract_zip = __commonJS({
15523
15524
  if (this.opts.onEntry) {
15524
15525
  this.opts.onEntry(entry, this.zipfile);
15525
15526
  }
15526
- const dest = path37.join(this.opts.dir, entry.fileName);
15527
+ const dest = path38.join(this.opts.dir, entry.fileName);
15527
15528
  const mode = entry.externalFileAttributes >> 16 & 65535;
15528
15529
  const IFMT = 61440;
15529
15530
  const IFDIR = 16384;
@@ -15537,20 +15538,20 @@ var require_extract_zip = __commonJS({
15537
15538
  if (!isDir) isDir = madeBy === 0 && entry.externalFileAttributes === 16;
15538
15539
  debug("extracting entry", { filename: entry.fileName, isDir, isSymlink: symlink2 });
15539
15540
  const procMode = this.getExtractedMode(mode, isDir) & 511;
15540
- const destDir = isDir ? dest : path37.dirname(dest);
15541
+ const destDir = isDir ? dest : path38.dirname(dest);
15541
15542
  const mkdirOptions = { recursive: true };
15542
15543
  if (isDir) {
15543
15544
  mkdirOptions.mode = procMode;
15544
15545
  }
15545
15546
  debug("mkdir", { dir: destDir, ...mkdirOptions });
15546
- await fs38.mkdir(destDir, mkdirOptions);
15547
+ await fs39.mkdir(destDir, mkdirOptions);
15547
15548
  if (isDir) return;
15548
15549
  debug("opening read stream", dest);
15549
15550
  const readStream = await promisify5(this.zipfile.openReadStream.bind(this.zipfile))(entry);
15550
15551
  if (symlink2) {
15551
15552
  const link2 = await getStream(readStream);
15552
15553
  debug("creating symlink", link2, dest);
15553
- await fs38.symlink(link2, dest);
15554
+ await fs39.symlink(link2, dest);
15554
15555
  } else {
15555
15556
  await pipeline2(readStream, createWriteStream5(dest, { mode: procMode }));
15556
15557
  }
@@ -15579,11 +15580,11 @@ var require_extract_zip = __commonJS({
15579
15580
  };
15580
15581
  module.exports = async function(zipPath, opts) {
15581
15582
  debug("creating target directory", opts.dir);
15582
- if (!path37.isAbsolute(opts.dir)) {
15583
+ if (!path38.isAbsolute(opts.dir)) {
15583
15584
  throw new Error("Target directory is expected to be absolute");
15584
15585
  }
15585
- await fs38.mkdir(opts.dir, { recursive: true });
15586
- opts.dir = await fs38.realpath(opts.dir);
15586
+ await fs39.mkdir(opts.dir, { recursive: true });
15587
+ opts.dir = await fs39.realpath(opts.dir);
15587
15588
  return new Extractor(zipPath, opts).extract();
15588
15589
  };
15589
15590
  }
@@ -17040,7 +17041,7 @@ var require_strip_final_newline = __commonJS({
17040
17041
  var require_npm_run_path = __commonJS({
17041
17042
  "node_modules/run-jxa/node_modules/npm-run-path/index.js"(exports, module) {
17042
17043
  "use strict";
17043
- var path37 = __require("path");
17044
+ var path38 = __require("path");
17044
17045
  var pathKey = require_path_key();
17045
17046
  var npmRunPath = (options) => {
17046
17047
  options = {
@@ -17050,16 +17051,16 @@ var require_npm_run_path = __commonJS({
17050
17051
  ...options
17051
17052
  };
17052
17053
  let previous;
17053
- let cwdPath = path37.resolve(options.cwd);
17054
+ let cwdPath = path38.resolve(options.cwd);
17054
17055
  const result = [];
17055
17056
  while (previous !== cwdPath) {
17056
- result.push(path37.join(cwdPath, "node_modules/.bin"));
17057
+ result.push(path38.join(cwdPath, "node_modules/.bin"));
17057
17058
  previous = cwdPath;
17058
- cwdPath = path37.resolve(cwdPath, "..");
17059
+ cwdPath = path38.resolve(cwdPath, "..");
17059
17060
  }
17060
- const execPathDir = path37.resolve(options.cwd, options.execPath, "..");
17061
+ const execPathDir = path38.resolve(options.cwd, options.execPath, "..");
17061
17062
  result.push(execPathDir);
17062
- return result.concat(options.path).join(path37.delimiter);
17063
+ return result.concat(options.path).join(path38.delimiter);
17063
17064
  };
17064
17065
  module.exports = npmRunPath;
17065
17066
  module.exports.default = npmRunPath;
@@ -17069,9 +17070,9 @@ var require_npm_run_path = __commonJS({
17069
17070
  ...options
17070
17071
  };
17071
17072
  const env3 = { ...options.env };
17072
- const path38 = pathKey({ env: env3 });
17073
- options.path = env3[path38];
17074
- env3[path38] = module.exports(options);
17073
+ const path39 = pathKey({ env: env3 });
17074
+ options.path = env3[path39];
17075
+ env3[path39] = module.exports(options);
17075
17076
  return env3;
17076
17077
  };
17077
17078
  }
@@ -17794,7 +17795,7 @@ var require_signal_exit3 = __commonJS({
17794
17795
  var require_kill = __commonJS({
17795
17796
  "node_modules/run-jxa/node_modules/execa/lib/kill.js"(exports, module) {
17796
17797
  "use strict";
17797
- var os8 = __require("os");
17798
+ var os9 = __require("os");
17798
17799
  var onExit = require_signal_exit3();
17799
17800
  var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
17800
17801
  var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
@@ -17818,7 +17819,7 @@ var require_kill = __commonJS({
17818
17819
  return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
17819
17820
  };
17820
17821
  var isSigterm = (signal) => {
17821
- return signal === os8.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
17822
+ return signal === os9.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
17822
17823
  };
17823
17824
  var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
17824
17825
  if (forceKillAfterTimeout === true) {
@@ -17844,7 +17845,7 @@ var require_kill = __commonJS({
17844
17845
  return spawnedPromise;
17845
17846
  }
17846
17847
  let timeoutId;
17847
- const timeoutPromise = new Promise((resolve8, reject) => {
17848
+ const timeoutPromise = new Promise((resolve9, reject) => {
17848
17849
  timeoutId = setTimeout(() => {
17849
17850
  timeoutKill(spawned, killSignal, reject);
17850
17851
  }, timeout);
@@ -17950,7 +17951,7 @@ var require_get_stream2 = __commonJS({
17950
17951
  };
17951
17952
  const { maxBuffer } = options;
17952
17953
  const stream2 = bufferStream(options);
17953
- await new Promise((resolve8, reject) => {
17954
+ await new Promise((resolve9, reject) => {
17954
17955
  const rejectPromise = (error) => {
17955
17956
  if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
17956
17957
  error.bufferedData = stream2.getBufferedValue();
@@ -17960,7 +17961,7 @@ var require_get_stream2 = __commonJS({
17960
17961
  (async () => {
17961
17962
  try {
17962
17963
  await streamPipelinePromisified(inputStream, stream2);
17963
- resolve8();
17964
+ resolve9();
17964
17965
  } catch (error) {
17965
17966
  rejectPromise(error);
17966
17967
  }
@@ -18117,9 +18118,9 @@ var require_promise = __commonJS({
18117
18118
  return spawned;
18118
18119
  };
18119
18120
  var getSpawnedPromise = (spawned) => {
18120
- return new Promise((resolve8, reject) => {
18121
+ return new Promise((resolve9, reject) => {
18121
18122
  spawned.on("exit", (exitCode, signal) => {
18122
- resolve8({ exitCode, signal });
18123
+ resolve9({ exitCode, signal });
18123
18124
  });
18124
18125
  spawned.on("error", (error) => {
18125
18126
  reject(error);
@@ -18187,7 +18188,7 @@ var require_command = __commonJS({
18187
18188
  var require_execa = __commonJS({
18188
18189
  "node_modules/run-jxa/node_modules/execa/index.js"(exports, module) {
18189
18190
  "use strict";
18190
- var path37 = __require("path");
18191
+ var path38 = __require("path");
18191
18192
  var childProcess3 = __require("child_process");
18192
18193
  var crossSpawn = require_cross_spawn();
18193
18194
  var stripFinalNewline = require_strip_final_newline();
@@ -18229,7 +18230,7 @@ var require_execa = __commonJS({
18229
18230
  };
18230
18231
  options.env = getEnv(options);
18231
18232
  options.stdio = normalizeStdio(options);
18232
- if (process.platform === "win32" && path37.basename(file, ".exe") === "cmd") {
18233
+ if (process.platform === "win32" && path38.basename(file, ".exe") === "cmd") {
18233
18234
  args.unshift("/q");
18234
18235
  }
18235
18236
  return { file, args, options, parsed };
@@ -25586,13 +25587,13 @@ var setTextNodeValue = (node, text) => {
25586
25587
  markNodeAsDirty(node);
25587
25588
  };
25588
25589
  var getPathToRoot = (node) => {
25589
- const path37 = [];
25590
+ const path38 = [];
25590
25591
  let current = node;
25591
25592
  while (current) {
25592
- path37.unshift(current);
25593
+ path38.unshift(current);
25593
25594
  current = current.parentNode;
25594
25595
  }
25595
- return path37;
25596
+ return path38;
25596
25597
  };
25597
25598
  var isNodeSelectable = (node) => {
25598
25599
  let current = node;
@@ -30070,8 +30071,8 @@ function Text({ color, backgroundColor, dimColor = false, bold = false, italic =
30070
30071
  }
30071
30072
 
30072
30073
  // node_modules/ink/build/components/ErrorOverview.js
30073
- var cleanupPath = (path37) => {
30074
- return path37?.replace(`file://${cwd()}/`, "");
30074
+ var cleanupPath = (path38) => {
30075
+ return path38?.replace(`file://${cwd()}/`, "");
30075
30076
  };
30076
30077
  var stackUtils = new import_stack_utils.default({
30077
30078
  cwd: cwd(),
@@ -31267,12 +31268,12 @@ var TerminalWriter = class {
31267
31268
  if (chunk) {
31268
31269
  this.synchronizedWrite(chunk);
31269
31270
  }
31270
- await new Promise((resolve8) => {
31271
+ await new Promise((resolve9) => {
31271
31272
  let finished = false;
31272
31273
  const timer = setTimeout(() => {
31273
31274
  finished = true;
31274
31275
  this.cancelSlowFlush = void 0;
31275
- resolve8();
31276
+ resolve9();
31276
31277
  }, 50);
31277
31278
  this.cancelSlowFlush = () => {
31278
31279
  if (!finished) {
@@ -31283,7 +31284,7 @@ var TerminalWriter = class {
31283
31284
  this.outputBuffer = [];
31284
31285
  }
31285
31286
  this.cancelSlowFlush = void 0;
31286
- resolve8();
31287
+ resolve9();
31287
31288
  }
31288
31289
  };
31289
31290
  });
@@ -31674,8 +31675,8 @@ var AnimationController = class {
31674
31675
  if (!this.isRunning) {
31675
31676
  return;
31676
31677
  }
31677
- return new Promise((resolve8) => {
31678
- this.idleResolvers.push(resolve8);
31678
+ return new Promise((resolve9) => {
31679
+ this.idleResolvers.push(resolve9);
31679
31680
  });
31680
31681
  }
31681
31682
  /**
@@ -31715,8 +31716,8 @@ var AnimationController = class {
31715
31716
  clearInterval(this.intervalId);
31716
31717
  this.intervalId = void 0;
31717
31718
  }
31718
- for (const resolve8 of this.idleResolvers) {
31719
- resolve8();
31719
+ for (const resolve9 of this.idleResolvers) {
31720
+ resolve9();
31720
31721
  }
31721
31722
  this.idleResolvers = [];
31722
31723
  }
@@ -33221,11 +33222,11 @@ var TerminalBuffer = class {
33221
33222
  if (!this.worker?.connected) {
33222
33223
  return 0;
33223
33224
  }
33224
- return new Promise((resolve8) => {
33225
+ return new Promise((resolve9) => {
33225
33226
  const handler2 = (message) => {
33226
33227
  if (message.type === "linesUpdated") {
33227
33228
  this.worker?.off("message", handler2);
33228
- resolve8(message.count);
33229
+ resolve9(message.count);
33229
33230
  }
33230
33231
  };
33231
33232
  this.worker?.on("message", handler2);
@@ -33234,7 +33235,7 @@ var TerminalBuffer = class {
33234
33235
  } catch (error) {
33235
33236
  this.worker?.off("message", handler2);
33236
33237
  console.error("Failed to send getLinesUpdated message to worker:", error);
33237
- resolve8(0);
33238
+ resolve9(0);
33238
33239
  }
33239
33240
  });
33240
33241
  }
@@ -33746,8 +33747,8 @@ var Ink = class {
33746
33747
  }
33747
33748
  }
33748
33749
  async waitUntilExit() {
33749
- this.exitPromise ||= new Promise((resolve8, reject) => {
33750
- this.resolveExitPromise = resolve8;
33750
+ this.exitPromise ||= new Promise((resolve9, reject) => {
33751
+ this.resolveExitPromise = resolve9;
33751
33752
  this.rejectExitPromise = reject;
33752
33753
  });
33753
33754
  return this.exitPromise;
@@ -34546,7 +34547,7 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
34546
34547
  process.on("exit", cleanupTerminalOnExit);
34547
34548
  process.on("SIGTERM", cleanupTerminalOnExit);
34548
34549
  process.on("SIGINT", cleanupTerminalOnExit);
34549
- return new Promise((resolve8) => {
34550
+ return new Promise((resolve9) => {
34550
34551
  const originalRawMode = process.stdin.isRaw;
34551
34552
  if (!originalRawMode) {
34552
34553
  process.stdin.setRawMode(true);
@@ -34567,7 +34568,7 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
34567
34568
  process.stdin.setRawMode(false);
34568
34569
  }
34569
34570
  this.detectionComplete = true;
34570
- resolve8();
34571
+ resolve9();
34571
34572
  };
34572
34573
  timeoutId = setTimeout(cleanup, 1e3);
34573
34574
  const onData = (data) => {
@@ -38960,7 +38961,6 @@ var ThemeManager = class {
38960
38961
  try {
38961
38962
  const theme2 = createCustomTheme(themeWithDefaults);
38962
38963
  this.extensionThemes.set(namespacedName, theme2);
38963
- debugLogger.log(`Registered theme: ${namespacedName}`);
38964
38964
  } catch (error) {
38965
38965
  debugLogger.warn(
38966
38966
  `Failed to load custom theme "${namespacedName}":`,
@@ -38986,7 +38986,6 @@ var ThemeManager = class {
38986
38986
  for (const theme2 of customThemes) {
38987
38987
  const namespacedName = `${theme2.name} (${extensionName})`;
38988
38988
  this.extensionThemes.delete(namespacedName);
38989
- debugLogger.log(`Unregistered theme: ${namespacedName}`);
38990
38989
  }
38991
38990
  }
38992
38991
  /**
@@ -40265,25 +40264,25 @@ async function promptForConsentNonInteractive(prompt, defaultValue = true) {
40265
40264
  input: process.stdin,
40266
40265
  output: process.stdout
40267
40266
  });
40268
- return new Promise((resolve8) => {
40267
+ return new Promise((resolve9) => {
40269
40268
  rl.question(prompt, (answer) => {
40270
40269
  rl.close();
40271
40270
  const trimmedAnswer = answer.trim().toLowerCase();
40272
40271
  if (trimmedAnswer === "") {
40273
- resolve8(defaultValue);
40272
+ resolve9(defaultValue);
40274
40273
  } else {
40275
- resolve8(["y", "yes"].includes(trimmedAnswer));
40274
+ resolve9(["y", "yes"].includes(trimmedAnswer));
40276
40275
  }
40277
40276
  });
40278
40277
  });
40279
40278
  }
40280
40279
  async function promptForConsentInteractive(prompt, addExtensionUpdateConfirmationRequest, clearConfirmationRequest) {
40281
- return new Promise((resolve8) => {
40280
+ return new Promise((resolve9) => {
40282
40281
  addExtensionUpdateConfirmationRequest({
40283
40282
  prompt,
40284
40283
  onConfirm: (resolvedConfirmed) => {
40285
40284
  clearConfirmationRequest?.();
40286
- setImmediate(() => resolve8(resolvedConfirmed));
40285
+ setImmediate(() => resolve9(resolvedConfirmed));
40287
40286
  }
40288
40287
  });
40289
40288
  });
@@ -40804,8 +40803,8 @@ var Override = class _Override {
40804
40803
  output() {
40805
40804
  return `${this.isDisable ? "!" : ""}${this.baseRule}${this.includeSubdirs ? "*" : ""}`;
40806
40805
  }
40807
- matchesPath(path37) {
40808
- return this.asRegex().test(path37);
40806
+ matchesPath(path38) {
40807
+ return this.asRegex().test(path38);
40809
40808
  }
40810
40809
  };
40811
40810
  var ensureLeadingAndTrailingSlash = function(dirPath) {
@@ -43946,7 +43945,7 @@ async function fetchJson(url, redirectCount = 0) {
43946
43945
  if (token) {
43947
43946
  headers.Authorization = `token ${token}`;
43948
43947
  }
43949
- return new Promise((resolve8, reject) => {
43948
+ return new Promise((resolve9, reject) => {
43950
43949
  https.get(url, { headers }, (res) => {
43951
43950
  if (res.statusCode === 302 || res.statusCode === 301) {
43952
43951
  if (redirectCount >= 10) {
@@ -43959,7 +43958,7 @@ async function fetchJson(url, redirectCount = 0) {
43959
43958
  fetchJson(
43960
43959
  new URL(res.headers.location, url).toString(),
43961
43960
  redirectCount + 1
43962
- ).then(resolve8).catch(reject);
43961
+ ).then(resolve9).catch(reject);
43963
43962
  return;
43964
43963
  }
43965
43964
  if (res.statusCode !== 200) {
@@ -43971,7 +43970,7 @@ async function fetchJson(url, redirectCount = 0) {
43971
43970
  res.on("data", (chunk) => chunks.push(chunk));
43972
43971
  res.on("end", () => {
43973
43972
  const data = Buffer.concat(chunks).toString();
43974
- resolve8(JSON.parse(data));
43973
+ resolve9(JSON.parse(data));
43975
43974
  });
43976
43975
  }).on("error", reject);
43977
43976
  });
@@ -44331,7 +44330,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44331
44330
  if (token) {
44332
44331
  headers["Authorization"] = `token ${token}`;
44333
44332
  }
44334
- return new Promise((resolve8, reject) => {
44333
+ return new Promise((resolve9, reject) => {
44335
44334
  https2.get(url, { headers }, (res) => {
44336
44335
  if (res.statusCode === 302 || res.statusCode === 301) {
44337
44336
  if (redirectCount >= 10) {
@@ -44342,7 +44341,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44342
44341
  new Error("Redirect response missing Location header")
44343
44342
  );
44344
44343
  }
44345
- downloadFile(res.headers.location, dest, options, redirectCount + 1).then(resolve8).catch(reject);
44344
+ downloadFile(res.headers.location, dest, options, redirectCount + 1).then(resolve9).catch(reject);
44346
44345
  return;
44347
44346
  }
44348
44347
  if (res.statusCode !== 200) {
@@ -44352,7 +44351,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44352
44351
  }
44353
44352
  const file = fs15.createWriteStream(dest);
44354
44353
  res.pipe(file);
44355
- file.on("finish", () => file.close(resolve8));
44354
+ file.on("finish", () => file.close(resolve9));
44356
44355
  }).on("error", reject);
44357
44356
  });
44358
44357
  }
@@ -45511,7 +45510,7 @@ function validateName(name) {
45511
45510
  }
45512
45511
  }
45513
45512
  async function inferInstallMetadata(source2, args = {}) {
45514
- if (source2.startsWith("http://") || source2.startsWith("https://") || source2.startsWith("git@") || source2.startsWith("sso://") || source2.startsWith("github:") || source2.startsWith("gitlab:")) {
45513
+ if (source2.startsWith("http://") || source2.startsWith("https://") || source2.startsWith("git@") || source2.startsWith("sso://") || source2.startsWith("github:") || source2.startsWith("gitlab:") || source2.startsWith("ssh://")) {
45515
45514
  return {
45516
45515
  source: source2,
45517
45516
  type: "git",
@@ -45833,9 +45832,9 @@ function isSettingsValue(value) {
45833
45832
  const type = typeof value;
45834
45833
  return type === "string" || type === "number" || type === "boolean" || type === "object";
45835
45834
  }
45836
- function getNestedValue(obj, path37) {
45835
+ function getNestedValue(obj, path38) {
45837
45836
  let current = obj;
45838
- for (const key of path37) {
45837
+ for (const key of path38) {
45839
45838
  if (!isRecord(current) || !(key in current)) {
45840
45839
  return void 0;
45841
45840
  }
@@ -45848,8 +45847,8 @@ function getEffectiveValue(key, settings) {
45848
45847
  if (!definition) {
45849
45848
  return void 0;
45850
45849
  }
45851
- const path37 = key.split(".");
45852
- const value = getNestedValue(settings, path37);
45850
+ const path38 = key.split(".");
45851
+ const value = getNestedValue(settings, path38);
45853
45852
  if (value !== void 0 && isSettingsValue(value)) {
45854
45853
  return value;
45855
45854
  }
@@ -45859,8 +45858,8 @@ function getDialogSettingKeys() {
45859
45858
  return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
45860
45859
  }
45861
45860
  function isInSettingsScope(key, scopeSettings) {
45862
- const path37 = key.split(".");
45863
- const value = getNestedValue(scopeSettings, path37);
45861
+ const path38 = key.split(".");
45862
+ const value = getNestedValue(scopeSettings, path38);
45864
45863
  return value !== void 0;
45865
45864
  }
45866
45865
  function getDisplayValue(key, scopeSettings, _mergedSettings) {
@@ -46925,7 +46924,7 @@ async function writeClipboardImages(filePaths) {
46925
46924
  if (process22.platform !== "darwin") {
46926
46925
  return;
46927
46926
  }
46928
- const paths = filePaths.map((path37) => path37 instanceof URL ? fileURLToPath2(path37) : path37);
46927
+ const paths = filePaths.map((path38) => path38 instanceof URL ? fileURLToPath2(path38) : path38);
46929
46928
  await runJxa((...paths2) => {
46930
46929
  ObjC.import("AppKit");
46931
46930
  ObjC.import("Foundation");
@@ -47428,7 +47427,7 @@ var OSC52_FOOTER = BEL3;
47428
47427
  var MAX_OSC52_BODY_B64_BYTES = MAX_OSC52_SEQUENCE_BYTES - Buffer.byteLength(OSC52_HEADER) - Buffer.byteLength(OSC52_FOOTER);
47429
47428
  var MAX_OSC52_DATA_BYTES = Math.floor(MAX_OSC52_BODY_B64_BYTES / 4) * 3;
47430
47429
  var SCREEN_DCS_CHUNK_SIZE = 240;
47431
- var pickTty = () => new Promise((resolve8) => {
47430
+ var pickTty = () => new Promise((resolve9) => {
47432
47431
  if (process.platform !== "win32") {
47433
47432
  try {
47434
47433
  const devTty = fs22.createWriteStream("/dev/tty");
@@ -47436,25 +47435,25 @@ var pickTty = () => new Promise((resolve8) => {
47436
47435
  devTty.removeAllListeners("open");
47437
47436
  devTty.removeAllListeners("error");
47438
47437
  devTty.destroy();
47439
- resolve8(getStdioTty());
47438
+ resolve9(getStdioTty());
47440
47439
  }, 100);
47441
47440
  devTty.once("open", () => {
47442
47441
  clearTimeout(timeout);
47443
47442
  devTty.removeAllListeners("error");
47444
47443
  devTty.on("error", () => {
47445
47444
  });
47446
- resolve8({ stream: devTty, closeAfter: true });
47445
+ resolve9({ stream: devTty, closeAfter: true });
47447
47446
  });
47448
47447
  devTty.once("error", () => {
47449
47448
  clearTimeout(timeout);
47450
47449
  devTty.removeAllListeners("open");
47451
- resolve8(getStdioTty());
47450
+ resolve9(getStdioTty());
47452
47451
  });
47453
47452
  return;
47454
47453
  } catch {
47455
47454
  }
47456
47455
  }
47457
- resolve8(getStdioTty());
47456
+ resolve9(getStdioTty());
47458
47457
  });
47459
47458
  var getStdioTty = () => {
47460
47459
  if (process.platform === "win32") {
@@ -47508,12 +47507,12 @@ var wrapForScreen = (seq) => {
47508
47507
  }
47509
47508
  return out;
47510
47509
  };
47511
- var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47510
+ var writeAll = (stream, data) => new Promise((resolve9, reject) => {
47512
47511
  const fd = stream.fd;
47513
47512
  if (process.platform === "win32" && typeof fd === "number" && (stream === process.stdout || stream === process.stderr)) {
47514
47513
  try {
47515
47514
  fs22.writeSync(fd, data);
47516
- resolve8();
47515
+ resolve9();
47517
47516
  return;
47518
47517
  } catch (e) {
47519
47518
  debugLogger.warn(
@@ -47528,7 +47527,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47528
47527
  };
47529
47528
  const onDrain = () => {
47530
47529
  cleanup();
47531
- resolve8();
47530
+ resolve9();
47532
47531
  };
47533
47532
  const cleanup = () => {
47534
47533
  stream.off("error", onError);
@@ -47537,7 +47536,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47537
47536
  stream.once("error", onError);
47538
47537
  if (stream.write(data)) {
47539
47538
  cleanup();
47540
- resolve8();
47539
+ resolve9();
47541
47540
  } else {
47542
47541
  stream.once("drain", onDrain);
47543
47542
  }
@@ -47667,14 +47666,14 @@ function getUserLinuxClipboardTool() {
47667
47666
  }
47668
47667
  }
47669
47668
  async function saveFromCommand(command, args, destination) {
47670
- return new Promise((resolve8) => {
47669
+ return new Promise((resolve9) => {
47671
47670
  const child = spawn(command, args);
47672
47671
  const fileStream = createWriteStream2(destination);
47673
47672
  let resolved = false;
47674
47673
  const safeResolve = (value) => {
47675
47674
  if (!resolved) {
47676
47675
  resolved = true;
47677
- resolve8(value);
47676
+ resolve9(value);
47678
47677
  }
47679
47678
  };
47680
47679
  child.stdout.pipe(fileStream);
@@ -49532,7 +49531,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49532
49531
  throw err;
49533
49532
  }
49534
49533
  } else {
49535
- await new Promise((resolve8, reject) => {
49534
+ await new Promise((resolve9, reject) => {
49536
49535
  const child = spawn2(executable, [...initialArgs, ...args], {
49537
49536
  stdio: "inherit",
49538
49537
  shell: process.platform === "win32"
@@ -49557,7 +49556,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49557
49556
  );
49558
49557
  reject(err);
49559
49558
  } else {
49560
- resolve8();
49559
+ resolve9();
49561
49560
  }
49562
49561
  });
49563
49562
  });
@@ -53935,14 +53934,17 @@ var FileCommandLoader = class {
53935
53934
  getCommandDirectories() {
53936
53935
  const dirs = [];
53937
53936
  const storage = this.config?.storage ?? new Storage(this.projectRoot);
53937
+ const userCommandsDir = Storage.getUserCommandsDir();
53938
53938
  dirs.push({
53939
- path: Storage.getUserCommandsDir(),
53939
+ path: userCommandsDir,
53940
53940
  kind: "user-file" /* USER_FILE */
53941
53941
  });
53942
- dirs.push({
53943
- path: storage.getProjectCommandsDir(),
53944
- kind: "workspace-file" /* WORKSPACE_FILE */
53945
- });
53942
+ if (!storage.isWorkspaceHomeDir()) {
53943
+ dirs.push({
53944
+ path: storage.getProjectCommandsDir(),
53945
+ kind: "workspace-file" /* WORKSPACE_FILE */
53946
+ });
53947
+ }
53946
53948
  if (this.config) {
53947
53949
  const activeExtensions = this.config.getExtensions().filter((ext) => ext.isActive).sort((a, b2) => a.name.localeCompare(b2.name));
53948
53950
  const extensionCommandDirs = activeExtensions.map((ext) => ({
@@ -55947,10 +55949,10 @@ function enableFeature(settings, featureName, strategy) {
55947
55949
  };
55948
55950
  }
55949
55951
  const modifiedScopes = [];
55950
- for (const { scope, path: path37 } of foundInDisabledScopes) {
55952
+ for (const { scope, path: path38 } of foundInDisabledScopes) {
55951
55953
  if (isLoadableSettingScope(scope)) {
55952
55954
  strategy.enable(settings, scope, featureName);
55953
- modifiedScopes.push({ scope, path: path37 });
55955
+ modifiedScopes.push({ scope, path: path38 });
55954
55956
  }
55955
55957
  }
55956
55958
  return {
@@ -56441,7 +56443,7 @@ var authCommand = {
56441
56443
  import process28 from "node:process";
56442
56444
 
56443
56445
  // packages/cli/src/generated/git-commit.ts
56444
- var GIT_COMMIT_INFO = "246f98459";
56446
+ var GIT_COMMIT_INFO = "022e8baef";
56445
56447
 
56446
56448
  // packages/cli/src/ui/utils/historyExportUtils.ts
56447
56449
  import * as fsPromises from "node:fs/promises";
@@ -57106,7 +57108,7 @@ var clearCommand = {
57106
57108
  if (hookSystem) {
57107
57109
  result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
57108
57110
  }
57109
- await new Promise((resolve8) => setImmediate(resolve8));
57111
+ await new Promise((resolve9) => setImmediate(resolve9));
57110
57112
  if (config) {
57111
57113
  await flushTelemetry(config);
57112
57114
  }
@@ -57380,10 +57382,85 @@ ${docsUrl}`
57380
57382
  }
57381
57383
  };
57382
57384
 
57385
+ // packages/cli/src/ui/commands/exportSessionCommand.ts
57386
+ import * as fs30 from "node:fs/promises";
57387
+ import * as path27 from "node:path";
57388
+ var exportSessionCommand = {
57389
+ name: "export-session",
57390
+ description: "Export the current session to a JSON file",
57391
+ kind: "built-in" /* BUILT_IN */,
57392
+ autoExecute: true,
57393
+ action: async (context) => {
57394
+ const { ui: ui2 } = context;
57395
+ const args = context.invocation?.args.trim();
57396
+ if (!args) {
57397
+ return {
57398
+ type: "message",
57399
+ messageType: "error",
57400
+ content: "Please provide a file path to export the session to. Example: /export-session ./my-session.json"
57401
+ };
57402
+ }
57403
+ const sessionId = context.services.agentContext?.config.getSessionId();
57404
+ if (!sessionId) {
57405
+ return {
57406
+ type: "message",
57407
+ messageType: "error",
57408
+ content: "No active session found to export."
57409
+ };
57410
+ }
57411
+ if (ui2.pendingItem) {
57412
+ ui2.addItem(
57413
+ {
57414
+ type: "error" /* ERROR */,
57415
+ text: "Operation already in progress, please wait."
57416
+ },
57417
+ Date.now()
57418
+ );
57419
+ return;
57420
+ }
57421
+ const pendingMessage = {
57422
+ type: "export_session" /* EXPORT_SESSION */,
57423
+ exportSession: {
57424
+ isPending: true
57425
+ }
57426
+ };
57427
+ try {
57428
+ ui2.setPendingItem(pendingMessage);
57429
+ const storage = context.services.agentContext.config.storage;
57430
+ const sessionSelector = new SessionSelector(storage);
57431
+ const { sessionData } = await sessionSelector.resolveSession(sessionId);
57432
+ const targetPath = path27.resolve(process.cwd(), args);
57433
+ await fs30.writeFile(
57434
+ targetPath,
57435
+ JSON.stringify(sessionData, null, 2),
57436
+ "utf-8"
57437
+ );
57438
+ ui2.addItem(
57439
+ {
57440
+ type: "export_session" /* EXPORT_SESSION */,
57441
+ exportSession: {
57442
+ isPending: false,
57443
+ targetPath
57444
+ }
57445
+ },
57446
+ Date.now()
57447
+ );
57448
+ } catch (error) {
57449
+ return {
57450
+ type: "message",
57451
+ messageType: "error",
57452
+ content: `Failed to export session: ${error instanceof Error ? error.message : "Unknown error"}`
57453
+ };
57454
+ } finally {
57455
+ ui2.setPendingItem(null);
57456
+ }
57457
+ }
57458
+ };
57459
+
57383
57460
  // packages/cli/src/ui/commands/directoryCommand.tsx
57384
57461
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
57385
- import * as path27 from "node:path";
57386
- import * as fs30 from "node:fs";
57462
+ import * as path28 from "node:path";
57463
+ import * as fs31 from "node:fs";
57387
57464
  async function finishAddingDirectories(config, addItem, added, errors) {
57388
57465
  if (!config) {
57389
57466
  addItem({
@@ -57451,15 +57528,15 @@ var directoryCommand = {
57451
57528
  if (context.services.agentContext?.config) {
57452
57529
  const workspaceContext = context.services.agentContext.config.getWorkspaceContext();
57453
57530
  const existingDirs = new Set(
57454
- workspaceContext.getDirectories().map((dir) => path27.resolve(dir))
57531
+ workspaceContext.getDirectories().map((dir) => path28.resolve(dir))
57455
57532
  );
57456
57533
  filteredSuggestions = suggestions.filter((s3) => {
57457
57534
  const expanded = expandHomeDir(s3);
57458
- const absolute = path27.resolve(expanded);
57535
+ const absolute = path28.resolve(expanded);
57459
57536
  if (existingDirs.has(absolute)) {
57460
57537
  return false;
57461
57538
  }
57462
- if (absolute.endsWith(path27.sep) && existingDirs.has(absolute.slice(0, -1))) {
57539
+ if (absolute.endsWith(path28.sep) && existingDirs.has(absolute.slice(0, -1))) {
57463
57540
  return false;
57464
57541
  }
57465
57542
  return true;
@@ -57509,11 +57586,11 @@ var directoryCommand = {
57509
57586
  const trimmedPath = pathToAdd.trim();
57510
57587
  const expandedPath = expandHomeDir(trimmedPath);
57511
57588
  try {
57512
- const absolutePath = path27.resolve(
57589
+ const absolutePath = path28.resolve(
57513
57590
  workspaceContext.targetDir,
57514
57591
  expandedPath
57515
57592
  );
57516
- const resolvedPath = fs30.realpathSync(absolutePath);
57593
+ const resolvedPath = fs31.realpathSync(absolutePath);
57517
57594
  if (currentWorkspaceDirs.includes(resolvedPath)) {
57518
57595
  alreadyAdded.push(trimmedPath);
57519
57596
  continue;
@@ -57539,7 +57616,7 @@ var directoryCommand = {
57539
57616
  const dirsToConfirm = [];
57540
57617
  const trustedDirs = [];
57541
57618
  for (const pathToAdd of pathsToProcess) {
57542
- const expandedPath = path27.resolve(expandHomeDir(pathToAdd.trim()));
57619
+ const expandedPath = path28.resolve(expandHomeDir(pathToAdd.trim()));
57543
57620
  const isTrusted = trustedFolders.isPathTrusted(expandedPath);
57544
57621
  if (isTrusted === true) {
57545
57622
  trustedDirs.push(pathToAdd.trim());
@@ -57760,14 +57837,14 @@ var ConfigExtensionDialog = ({
57760
57837
  [loggerAdapter]
57761
57838
  );
57762
57839
  const requestSetting = (0, import_react62.useCallback)(
57763
- async (setting) => new Promise((resolve8) => {
57840
+ async (setting) => new Promise((resolve9) => {
57764
57841
  if (!mounted.current) return;
57765
57842
  settingBuffer.setText("");
57766
57843
  setState({
57767
57844
  type: "ASK_SETTING",
57768
57845
  setting,
57769
57846
  resolve: (val) => {
57770
- resolve8(val);
57847
+ resolve9(val);
57771
57848
  setState({ type: "BUSY", message: "Updating..." });
57772
57849
  }
57773
57850
  });
@@ -57775,13 +57852,13 @@ var ConfigExtensionDialog = ({
57775
57852
  [settingBuffer]
57776
57853
  );
57777
57854
  const requestConfirmation = (0, import_react62.useCallback)(
57778
- async (message) => new Promise((resolve8) => {
57855
+ async (message) => new Promise((resolve9) => {
57779
57856
  if (!mounted.current) return;
57780
57857
  setState({
57781
57858
  type: "ASK_CONFIRMATION",
57782
57859
  message,
57783
57860
  resolve: (val) => {
57784
- resolve8(val);
57861
+ resolve9(val);
57785
57862
  setState({ type: "BUSY", message: "Processing..." });
57786
57863
  }
57787
57864
  });
@@ -58118,7 +58195,7 @@ function SearchableList({
58118
58195
  var import_react64 = __toESM(require_react(), 1);
58119
58196
 
58120
58197
  // packages/cli/src/config/extensionRegistryClient.ts
58121
- import * as fs31 from "node:fs/promises";
58198
+ import * as fs32 from "node:fs/promises";
58122
58199
  var ExtensionRegistryClient = class _ExtensionRegistryClient {
58123
58200
  static DEFAULT_REGISTRY_URL = "https://geminicli.com/extensions.json";
58124
58201
  static FETCH_TIMEOUT_MS = 1e4;
@@ -58196,7 +58273,7 @@ var ExtensionRegistryClient = class _ExtensionRegistryClient {
58196
58273
  return await response.json();
58197
58274
  } else {
58198
58275
  const filePath = resolveToRealPath(uri);
58199
- const content = await fs31.readFile(filePath, "utf-8");
58276
+ const content = await fs32.readFile(filePath, "utf-8");
58200
58277
  return JSON.parse(content);
58201
58278
  }
58202
58279
  } catch (error) {
@@ -58367,8 +58444,8 @@ function ExtensionDetails({
58367
58444
  if (keyMatchers["basic.confirm" /* RETURN */](key) && !isInstalled && !isInstalling) {
58368
58445
  setIsInstalling(true);
58369
58446
  void onInstall(
58370
- (prompt) => new Promise((resolve8) => {
58371
- setConsentRequest({ prompt, resolve: resolve8 });
58447
+ (prompt) => new Promise((resolve9) => {
58448
+ setConsentRequest({ prompt, resolve: resolve9 });
58372
58449
  })
58373
58450
  );
58374
58451
  return true;
@@ -58376,8 +58453,8 @@ function ExtensionDetails({
58376
58453
  if (keyMatchers["extension.link" /* LINK_EXTENSION */](key) && isLinkable && !isInstalled && !isInstalling) {
58377
58454
  setIsInstalling(true);
58378
58455
  void onLink(
58379
- (prompt) => new Promise((resolve8) => {
58380
- setConsentRequest({ prompt, resolve: resolve8 });
58456
+ (prompt) => new Promise((resolve9) => {
58457
+ setConsentRequest({ prompt, resolve: resolve9 });
58381
58458
  })
58382
58459
  );
58383
58460
  return true;
@@ -58781,7 +58858,7 @@ function updateAction(context, args) {
58781
58858
  }
58782
58859
  let resolveUpdateComplete;
58783
58860
  const updateComplete = new Promise(
58784
- (resolve8) => resolveUpdateComplete = resolve8
58861
+ (resolve9) => resolveUpdateComplete = resolve9
58785
58862
  );
58786
58863
  const extensions = context.services.agentContext?.config ? listExtensions(context.services.agentContext.config) : [];
58787
58864
  if (showMessageIfNoExtensions(context, extensions)) {
@@ -59490,6 +59567,7 @@ var ConsoleSummaryDisplay = ({
59490
59567
 
59491
59568
  // packages/cli/src/ui/components/Footer.tsx
59492
59569
  import process33 from "node:process";
59570
+ import os7 from "node:os";
59493
59571
 
59494
59572
  // packages/cli/src/ui/components/MemoryUsageDisplay.tsx
59495
59573
  var import_react69 = __toESM(require_react(), 1);
@@ -59660,6 +59738,11 @@ var ALL_ITEMS = [
59660
59738
  header: "session",
59661
59739
  description: "Unique identifier for the current session"
59662
59740
  },
59741
+ {
59742
+ id: "hostname",
59743
+ header: "machine",
59744
+ description: "Current machine hostname"
59745
+ },
59663
59746
  {
59664
59747
  id: "auth",
59665
59748
  header: "/auth",
@@ -59685,6 +59768,7 @@ var DEFAULT_ORDER = [
59685
59768
  "quota",
59686
59769
  "memory-usage",
59687
59770
  "session-id",
59771
+ "hostname",
59688
59772
  "auth",
59689
59773
  "code-changes",
59690
59774
  "token-count"
@@ -59733,6 +59817,7 @@ function resolveFooterState(settings) {
59733
59817
 
59734
59818
  // packages/cli/src/ui/components/Footer.tsx
59735
59819
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
59820
+ var HOSTNAME = os7.hostname();
59736
59821
  var CwdIndicator = ({
59737
59822
  targetDir,
59738
59823
  maxWidth,
@@ -60008,6 +60093,15 @@ var Footer = () => {
60008
60093
  );
60009
60094
  break;
60010
60095
  }
60096
+ case "hostname": {
60097
+ addCol(
60098
+ id,
60099
+ header,
60100
+ () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: itemColor, children: HOSTNAME }),
60101
+ HOSTNAME.length
60102
+ );
60103
+ break;
60104
+ }
60011
60105
  case "auth": {
60012
60106
  if (!settings.merged.ui.showUserIdentity) break;
60013
60107
  if (!authType) break;
@@ -60285,6 +60379,7 @@ var FooterConfigDialog = ({
60285
60379
  quota: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("quota", itemColor), children: "42% used" }),
60286
60380
  "memory-usage": /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("memory-usage", itemColor), children: "260 MB" }),
60287
60381
  "session-id": /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("session-id", itemColor), children: "769992f9" }),
60382
+ hostname: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("hostname", itemColor), children: "dev-machine" }),
60288
60383
  "code-changes": /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { flexDirection: "row", children: [
60289
60384
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes", theme.status.success), children: "+12" }),
60290
60385
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes"), children: " " }),
@@ -60454,7 +60549,7 @@ var import_react74 = __toESM(require_react(), 1);
60454
60549
  var import_react72 = __toESM(require_react(), 1);
60455
60550
 
60456
60551
  // packages/cli/src/ui/utils/rewindFileOps.ts
60457
- import fs32 from "node:fs/promises";
60552
+ import fs33 from "node:fs/promises";
60458
60553
  function calculateTurnStats(conversation, userMessage) {
60459
60554
  const msgIndex = conversation.messages.indexOf(userMessage);
60460
60555
  if (msgIndex === -1) return null;
@@ -60541,7 +60636,7 @@ async function revertFileChanges(conversation, targetMessageId) {
60541
60636
  try {
60542
60637
  let currentContent = null;
60543
60638
  try {
60544
- currentContent = await fs32.readFile(filePath, "utf8");
60639
+ currentContent = await fs33.readFile(filePath, "utf8");
60545
60640
  } catch (e) {
60546
60641
  const error = e;
60547
60642
  if ("code" in error && error.code === "ENOENT") {
@@ -60559,9 +60654,9 @@ async function revertFileChanges(conversation, targetMessageId) {
60559
60654
  }
60560
60655
  if (currentContent === newContent) {
60561
60656
  if (!isNewFile2) {
60562
- await fs32.writeFile(filePath, originalContent ?? "");
60657
+ await fs33.writeFile(filePath, originalContent ?? "");
60563
60658
  } else {
60564
- await fs32.unlink(filePath);
60659
+ await fs33.unlink(filePath);
60565
60660
  }
60566
60661
  } else if (currentContent !== null) {
60567
60662
  const originalText = originalContent ?? "";
@@ -60573,9 +60668,9 @@ async function revertFileChanges(conversation, targetMessageId) {
60573
60668
  const patchedContent = applyPatch(currentContent, undoPatch);
60574
60669
  if (typeof patchedContent === "string") {
60575
60670
  if (patchedContent === "" && isNewFile2) {
60576
- await fs32.unlink(filePath);
60671
+ await fs33.unlink(filePath);
60577
60672
  } else {
60578
- await fs32.writeFile(filePath, patchedContent);
60673
+ await fs33.writeFile(filePath, patchedContent);
60579
60674
  }
60580
60675
  } else {
60581
60676
  coreEvents.emitFeedback(
@@ -61211,14 +61306,14 @@ function enableHook(settings, hookName) {
61211
61306
  }
61212
61307
  const modifiedScopes = [];
61213
61308
  try {
61214
- for (const { scope, path: path37 } of foundInDisabledScopes) {
61309
+ for (const { scope, path: path38 } of foundInDisabledScopes) {
61215
61310
  if (isLoadableSettingScope(scope)) {
61216
61311
  const currentScopeDisabled = settings.forScope(scope).settings.hooksConfig?.disabled ?? [];
61217
61312
  const newDisabled = currentScopeDisabled.filter(
61218
61313
  (name) => name !== hookName
61219
61314
  );
61220
61315
  settings.setValue(scope, "hooksConfig.disabled", newDisabled);
61221
- modifiedScopes.push({ scope, path: path37 });
61316
+ modifiedScopes.push({ scope, path: path38 });
61222
61317
  }
61223
61318
  }
61224
61319
  } catch (error) {
@@ -61513,7 +61608,7 @@ async function enableAction3(context, args) {
61513
61608
  }
61514
61609
  const feedback = renderHookActionFeedback(
61515
61610
  result,
61516
- (label, path37) => `${label} (${path37})`
61611
+ (label, path38) => `${label} (${path38})`
61517
61612
  );
61518
61613
  return {
61519
61614
  type: "message",
@@ -61555,7 +61650,7 @@ async function disableAction3(context, args) {
61555
61650
  }
61556
61651
  const feedback = renderHookActionFeedback(
61557
61652
  result,
61558
- (label, path37) => `${label} (${path37})`
61653
+ (label, path38) => `${label} (${path38})`
61559
61654
  );
61560
61655
  return {
61561
61656
  type: "message",
@@ -61754,7 +61849,7 @@ var hooksCommand = {
61754
61849
  };
61755
61850
 
61756
61851
  // packages/cli/src/ui/commands/ideCommand.ts
61757
- import path28 from "node:path";
61852
+ import path29 from "node:path";
61758
61853
  function getIdeStatusMessage(ideClient) {
61759
61854
  const connection = ideClient.getConnectionStatus();
61760
61855
  switch (connection.status) {
@@ -61783,13 +61878,13 @@ function getIdeStatusMessage(ideClient) {
61783
61878
  function formatFileList(openFiles) {
61784
61879
  const basenameCounts = /* @__PURE__ */ new Map();
61785
61880
  for (const file of openFiles) {
61786
- const basename6 = path28.basename(file.path);
61881
+ const basename6 = path29.basename(file.path);
61787
61882
  basenameCounts.set(basename6, (basenameCounts.get(basename6) || 0) + 1);
61788
61883
  }
61789
61884
  const fileList = openFiles.map((file) => {
61790
- const basename6 = path28.basename(file.path);
61885
+ const basename6 = path29.basename(file.path);
61791
61886
  const isDuplicate = (basenameCounts.get(basename6) || 0) > 1;
61792
- const parentDir = path28.basename(path28.dirname(file.path));
61887
+ const parentDir = path29.basename(path29.dirname(file.path));
61793
61888
  const displayName = isDuplicate ? `${basename6} (/${parentDir})` : basename6;
61794
61889
  return ` - ${displayName}${file.isActive ? " (active)" : ""}`;
61795
61890
  }).join("\n");
@@ -61929,7 +62024,7 @@ var ideCommand = async () => {
61929
62024
  if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
61930
62025
  break;
61931
62026
  }
61932
- await new Promise((resolve8) => setTimeout(resolve8, 500));
62027
+ await new Promise((resolve9) => setTimeout(resolve9, 500));
61933
62028
  }
61934
62029
  const { messageType, content } = getIdeStatusMessage(ideClient);
61935
62030
  if (messageType === "error") {
@@ -62017,8 +62112,8 @@ var ideCommand = async () => {
62017
62112
  };
62018
62113
 
62019
62114
  // packages/cli/src/ui/commands/initCommand.ts
62020
- import * as fs33 from "node:fs";
62021
- import * as path29 from "node:path";
62115
+ import * as fs34 from "node:fs";
62116
+ import * as path30 from "node:path";
62022
62117
  var initCommand = {
62023
62118
  name: "init",
62024
62119
  description: "Analyzes the project and creates a tailored GEMINI.md file",
@@ -62033,10 +62128,10 @@ var initCommand = {
62033
62128
  };
62034
62129
  }
62035
62130
  const targetDir = context.services.agentContext.config.getTargetDir();
62036
- const geminiMdPath = path29.join(targetDir, "GEMINI.md");
62037
- const result = performInit(fs33.existsSync(geminiMdPath));
62131
+ const geminiMdPath = path30.join(targetDir, "GEMINI.md");
62132
+ const result = performInit(fs34.existsSync(geminiMdPath));
62038
62133
  if (result.type === "submit_prompt") {
62039
- fs33.writeFileSync(geminiMdPath, "", "utf8");
62134
+ fs34.writeFileSync(geminiMdPath, "", "utf8");
62040
62135
  context.ui.addItem(
62041
62136
  {
62042
62137
  type: "info",
@@ -62109,7 +62204,7 @@ Use /mcp auth <server-name> to authenticate.`
62109
62204
  type: "info",
62110
62205
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
62111
62206
  });
62112
- const { MCPOAuthProvider } = await import("./core-RZFMBCSX.js");
62207
+ const { MCPOAuthProvider } = await import("./core-T2TBFAYG.js");
62113
62208
  let oauthConfig = server.oauth;
62114
62209
  if (!oauthConfig) {
62115
62210
  oauthConfig = { enabled: false };
@@ -62477,7 +62572,7 @@ var import_react81 = __toESM(require_react(), 1);
62477
62572
 
62478
62573
  // packages/cli/src/ui/components/InboxDialog.tsx
62479
62574
  var import_react80 = __toESM(require_react(), 1);
62480
- import * as path31 from "node:path";
62575
+ import * as path32 from "node:path";
62481
62576
 
62482
62577
  // packages/cli/src/ui/components/messages/DiffRenderer.tsx
62483
62578
  var import_react79 = __toESM(require_react(), 1);
@@ -76275,10 +76370,10 @@ function colorizeCode({
76275
76370
  }
76276
76371
 
76277
76372
  // packages/cli/src/ui/utils/fileUtils.ts
76278
- import * as path30 from "node:path";
76373
+ import * as path31 from "node:path";
76279
76374
  function getFileExtension(filename) {
76280
76375
  if (!filename) return null;
76281
- const ext = path30.extname(filename);
76376
+ const ext = path31.extname(filename);
76282
76377
  return ext ? ext.slice(1) : null;
76283
76378
  }
76284
76379
 
@@ -76641,11 +76736,11 @@ var MEMORY_PATCH_ACTION_CHOICES = [
76641
76736
  }
76642
76737
  ];
76643
76738
  function normalizePathForUi(filePath) {
76644
- return path31.posix.normalize(filePath.replaceAll("\\", "/"));
76739
+ return path32.posix.normalize(filePath.replaceAll("\\", "/"));
76645
76740
  }
76646
76741
  function getPathBasename(filePath) {
76647
76742
  const normalizedPath = normalizePathForUi(filePath);
76648
- const basename6 = path31.posix.basename(normalizedPath);
76743
+ const basename6 = path32.posix.basename(normalizedPath);
76649
76744
  return basename6 === "." ? filePath : basename6;
76650
76745
  }
76651
76746
  function formatMemoryPatchSummary(patch) {
@@ -77602,97 +77697,62 @@ var InboxDialog = ({
77602
77697
  };
77603
77698
 
77604
77699
  // packages/cli/src/ui/commands/memoryCommand.ts
77605
- var memoryCommand = {
77606
- name: "memory",
77607
- description: "Commands for interacting with memory",
77700
+ var showSubCommand = {
77701
+ name: "show",
77702
+ description: "Show the current memory contents",
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 = showMemory(config);
77709
+ context.ui.addItem(
77710
+ {
77711
+ type: "info" /* INFO */,
77712
+ text: result.content
77713
+ },
77714
+ Date.now()
77715
+ );
77716
+ }
77717
+ };
77718
+ var addSubCommand = {
77719
+ name: "add",
77720
+ description: "Add content to the memory",
77608
77721
  kind: "built-in" /* BUILT_IN */,
77609
77722
  autoExecute: false,
77610
- subCommands: [
77611
- {
77612
- name: "show",
77613
- description: "Show the current memory contents",
77614
- kind: "built-in" /* BUILT_IN */,
77615
- autoExecute: true,
77616
- action: async (context) => {
77617
- const config = context.services.agentContext?.config;
77618
- if (!config) return;
77619
- const result = showMemory(config);
77620
- context.ui.addItem(
77621
- {
77622
- type: "info" /* INFO */,
77623
- text: result.content
77624
- },
77625
- Date.now()
77626
- );
77627
- }
77628
- },
77629
- {
77630
- name: "add",
77631
- description: "Add content to the memory",
77632
- kind: "built-in" /* BUILT_IN */,
77633
- autoExecute: false,
77634
- action: (context, args) => {
77635
- const result = addMemory(args);
77636
- if (result.type === "message") {
77637
- return result;
77638
- }
77639
- context.ui.addItem(
77640
- {
77641
- type: "info" /* INFO */,
77642
- text: `Attempting to save to memory: "${args.trim()}"`
77643
- },
77644
- Date.now()
77645
- );
77646
- return result;
77647
- }
77648
- },
77649
- {
77650
- name: "reload",
77651
- altNames: ["refresh"],
77652
- description: "Reload the memory from the source",
77653
- kind: "built-in" /* BUILT_IN */,
77654
- autoExecute: true,
77655
- action: async (context) => {
77656
- context.ui.addItem(
77657
- {
77658
- type: "info" /* INFO */,
77659
- text: "Reloading memory from source files..."
77660
- },
77661
- Date.now()
77662
- );
77663
- try {
77664
- const config = context.services.agentContext?.config;
77665
- if (config) {
77666
- const result = await refreshMemory(config);
77667
- context.ui.addItem(
77668
- {
77669
- type: "info" /* INFO */,
77670
- text: result.content
77671
- },
77672
- Date.now()
77673
- );
77674
- }
77675
- } catch (error) {
77676
- context.ui.addItem(
77677
- {
77678
- type: "error" /* ERROR */,
77679
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
77680
- text: `Error reloading memory: ${error.message}`
77681
- },
77682
- Date.now()
77683
- );
77684
- }
77685
- }
77686
- },
77687
- {
77688
- name: "list",
77689
- description: "Lists the paths of the GEMINI.md files in use",
77690
- kind: "built-in" /* BUILT_IN */,
77691
- autoExecute: true,
77692
- action: async (context) => {
77693
- const config = context.services.agentContext?.config;
77694
- if (!config) return;
77695
- const result = listMemoryFiles(config);
77723
+ action: (context, args) => {
77724
+ const result = addMemory(args);
77725
+ if (result.type === "message") {
77726
+ return result;
77727
+ }
77728
+ context.ui.addItem(
77729
+ {
77730
+ type: "info" /* INFO */,
77731
+ text: `Attempting to save to memory: "${args.trim()}"`
77732
+ },
77733
+ Date.now()
77734
+ );
77735
+ return result;
77736
+ }
77737
+ };
77738
+ var reloadSubCommand = {
77739
+ name: "reload",
77740
+ altNames: ["refresh"],
77741
+ description: "Reload the memory from the source",
77742
+ kind: "built-in" /* BUILT_IN */,
77743
+ autoExecute: true,
77744
+ action: async (context) => {
77745
+ context.ui.addItem(
77746
+ {
77747
+ type: "info" /* INFO */,
77748
+ text: "Reloading memory from source files..."
77749
+ },
77750
+ Date.now()
77751
+ );
77752
+ try {
77753
+ const config = context.services.agentContext?.config;
77754
+ if (config) {
77755
+ const result = await refreshMemory(config);
77696
77756
  context.ui.addItem(
77697
77757
  {
77698
77758
  type: "info" /* INFO */,
@@ -77701,45 +77761,89 @@ var memoryCommand = {
77701
77761
  Date.now()
77702
77762
  );
77703
77763
  }
77704
- },
77705
- {
77706
- name: "inbox",
77707
- description: "Review skills extracted from past sessions and move them to global or project skills",
77708
- kind: "built-in" /* BUILT_IN */,
77709
- autoExecute: true,
77710
- action: (context) => {
77711
- const config = context.services.agentContext?.config;
77712
- if (!config) {
77713
- return {
77714
- type: "message",
77715
- messageType: "error",
77716
- content: "Config not loaded."
77717
- };
77718
- }
77719
- if (!config.isAutoMemoryEnabled()) {
77720
- return {
77721
- type: "message",
77722
- messageType: "info",
77723
- content: "The memory inbox requires Auto Memory. Enable it with: experimental.autoMemory = true in settings."
77724
- };
77725
- }
77726
- return {
77727
- type: "custom_dialog",
77728
- component: import_react81.default.createElement(InboxDialog, {
77729
- config,
77730
- onClose: () => context.ui.removeComponent(),
77731
- onReloadSkills: async () => {
77732
- await config.reloadSkills();
77733
- context.ui.reloadCommands();
77734
- },
77735
- onReloadMemory: async () => {
77736
- await refreshMemory(config);
77737
- }
77738
- })
77739
- };
77740
- }
77764
+ } catch (error) {
77765
+ context.ui.addItem(
77766
+ {
77767
+ type: "error" /* ERROR */,
77768
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
77769
+ text: `Error reloading memory: ${error.message}`
77770
+ },
77771
+ Date.now()
77772
+ );
77741
77773
  }
77742
- ]
77774
+ }
77775
+ };
77776
+ var listSubCommand = {
77777
+ name: "list",
77778
+ description: "Lists the paths of the GEMINI.md files in use",
77779
+ kind: "built-in" /* BUILT_IN */,
77780
+ autoExecute: true,
77781
+ action: async (context) => {
77782
+ const config = context.services.agentContext?.config;
77783
+ if (!config) return;
77784
+ const result = listMemoryFiles(config);
77785
+ context.ui.addItem(
77786
+ {
77787
+ type: "info" /* INFO */,
77788
+ text: result.content
77789
+ },
77790
+ Date.now()
77791
+ );
77792
+ }
77793
+ };
77794
+ var inboxSubCommand = {
77795
+ name: "inbox",
77796
+ description: "Review skills extracted from past sessions and move them to global or project skills",
77797
+ kind: "built-in" /* BUILT_IN */,
77798
+ autoExecute: true,
77799
+ action: (context) => {
77800
+ const config = context.services.agentContext?.config;
77801
+ if (!config) {
77802
+ return {
77803
+ type: "message",
77804
+ messageType: "error",
77805
+ content: "Config not loaded."
77806
+ };
77807
+ }
77808
+ if (!config.isAutoMemoryEnabled()) {
77809
+ return {
77810
+ type: "message",
77811
+ messageType: "info",
77812
+ content: "The memory inbox requires Auto Memory. Enable it with: experimental.autoMemory = true in settings."
77813
+ };
77814
+ }
77815
+ return {
77816
+ type: "custom_dialog",
77817
+ component: import_react81.default.createElement(InboxDialog, {
77818
+ config,
77819
+ onClose: () => context.ui.removeComponent(),
77820
+ onReloadSkills: async () => {
77821
+ await config.reloadSkills();
77822
+ context.ui.reloadCommands();
77823
+ },
77824
+ onReloadMemory: async () => {
77825
+ await refreshMemory(config);
77826
+ }
77827
+ })
77828
+ };
77829
+ }
77830
+ };
77831
+ var memoryCommand = (config) => {
77832
+ const isMemoryV2 = config?.isMemoryV2Enabled() ?? false;
77833
+ const subCommands = [
77834
+ showSubCommand,
77835
+ ...isMemoryV2 ? [] : [addSubCommand],
77836
+ reloadSubCommand,
77837
+ listSubCommand,
77838
+ inboxSubCommand
77839
+ ];
77840
+ return {
77841
+ name: "memory",
77842
+ description: "Commands for interacting with memory",
77843
+ kind: "built-in" /* BUILT_IN */,
77844
+ autoExecute: false,
77845
+ subCommands
77846
+ };
77743
77847
  };
77744
77848
 
77745
77849
  // packages/cli/src/ui/commands/modelCommand.ts
@@ -79273,8 +79377,8 @@ var oncallCommand = {
79273
79377
 
79274
79378
  // packages/cli/src/ui/commands/permissionsCommand.ts
79275
79379
  import * as process34 from "node:process";
79276
- import * as path32 from "node:path";
79277
- import * as fs34 from "node:fs";
79380
+ import * as path33 from "node:path";
79381
+ import * as fs35 from "node:fs";
79278
79382
  var permissionsCommand = {
79279
79383
  name: "permissions",
79280
79384
  description: "Manage folder trust settings and other permissions",
@@ -79292,10 +79396,10 @@ var permissionsCommand = {
79292
79396
  if (!dirPath) {
79293
79397
  targetDirectory = process34.cwd();
79294
79398
  } else {
79295
- targetDirectory = path32.resolve(expandHomeDir(dirPath));
79399
+ targetDirectory = path33.resolve(expandHomeDir(dirPath));
79296
79400
  }
79297
79401
  try {
79298
- if (!fs34.statSync(targetDirectory).isDirectory()) {
79402
+ if (!fs35.statSync(targetDirectory).isDirectory()) {
79299
79403
  return {
79300
79404
  type: "message",
79301
79405
  messageType: "error",
@@ -79339,7 +79443,7 @@ var permissionsCommand = {
79339
79443
  };
79340
79444
 
79341
79445
  // packages/cli/src/ui/commands/planCommand.ts
79342
- import * as path33 from "node:path";
79446
+ import * as path34 from "node:path";
79343
79447
  async function copyAction(context) {
79344
79448
  const config = context.services.agentContext?.config;
79345
79449
  if (!config) {
@@ -79356,7 +79460,7 @@ async function copyAction(context) {
79356
79460
  await copyToClipboard(content);
79357
79461
  coreEvents.emitFeedback(
79358
79462
  "info",
79359
- `Plan copied to clipboard (${path33.basename(planPath)}).`
79463
+ `Plan copied to clipboard (${path34.basename(planPath)}).`
79360
79464
  );
79361
79465
  } catch (error) {
79362
79466
  coreEvents.emitFeedback("error", `Failed to copy plan: ${error}`, error);
@@ -79394,7 +79498,7 @@ var planCommand = {
79394
79498
  config.storage.getPlansDir(),
79395
79499
  config.getFileSystemService()
79396
79500
  );
79397
- const fileName = path33.basename(approvedPlanPath);
79501
+ const fileName = path34.basename(approvedPlanPath);
79398
79502
  coreEvents.emitFeedback("info", `Approved Plan: ${fileName}`);
79399
79503
  context.ui.addItem({
79400
79504
  type: "gemini" /* GEMINI */,
@@ -79579,8 +79683,8 @@ var quitCommand = {
79579
79683
  };
79580
79684
 
79581
79685
  // packages/cli/src/ui/commands/restoreCommand.ts
79582
- import * as fs35 from "node:fs/promises";
79583
- import path34 from "node:path";
79686
+ import * as fs36 from "node:fs/promises";
79687
+ import path35 from "node:path";
79584
79688
  var HistoryItemSchema = external_exports.object({
79585
79689
  type: external_exports.string(),
79586
79690
  id: external_exports.number()
@@ -79599,8 +79703,8 @@ async function restoreAction(context, args) {
79599
79703
  };
79600
79704
  }
79601
79705
  try {
79602
- await fs35.mkdir(checkpointDir, { recursive: true });
79603
- const files = await fs35.readdir(checkpointDir);
79706
+ await fs36.mkdir(checkpointDir, { recursive: true });
79707
+ const files = await fs36.readdir(checkpointDir);
79604
79708
  const jsonFiles = files.filter((file) => file.endsWith(".json"));
79605
79709
  if (!args) {
79606
79710
  if (jsonFiles.length === 0) {
@@ -79627,8 +79731,8 @@ ${fileList}`
79627
79731
  content: `File not found: ${selectedFile}`
79628
79732
  };
79629
79733
  }
79630
- const filePath = path34.join(checkpointDir, selectedFile);
79631
- const data = await fs35.readFile(filePath, "utf-8");
79734
+ const filePath = path35.join(checkpointDir, selectedFile);
79735
+ const data = await fs36.readFile(filePath, "utf-8");
79632
79736
  const parseResult = ToolCallDataSchema.safeParse(JSON.parse(data));
79633
79737
  if (!parseResult.success) {
79634
79738
  return {
@@ -79676,7 +79780,7 @@ async function completion(context, _partialArg) {
79676
79780
  return [];
79677
79781
  }
79678
79782
  try {
79679
- const files = await fs35.readdir(checkpointDir);
79783
+ const files = await fs36.readdir(checkpointDir);
79680
79784
  const jsonFiles = files.filter((file) => file.endsWith(".json"));
79681
79785
  return getTruncatedCheckpointNames(jsonFiles);
79682
79786
  } catch {
@@ -79852,7 +79956,7 @@ async function listTools(context, showDescriptions) {
79852
79956
  };
79853
79957
  context.ui.addItem(toolsListItem);
79854
79958
  }
79855
- var listSubCommand = {
79959
+ var listSubCommand2 = {
79856
79960
  name: "list",
79857
79961
  description: "List available Gemini CLI tools.",
79858
79962
  kind: "built-in" /* BUILT_IN */,
@@ -79872,7 +79976,7 @@ var toolsCommand = {
79872
79976
  description: "List available Gemini CLI tools. Use /tools desc to include descriptions.",
79873
79977
  kind: "built-in" /* BUILT_IN */,
79874
79978
  autoExecute: false,
79875
- subCommands: [listSubCommand, descSubCommand],
79979
+ subCommands: [listSubCommand2, descSubCommand],
79876
79980
  action: async (context, args) => {
79877
79981
  const subCommand = args?.trim();
79878
79982
  const useShowDescriptions = subCommand === "desc" || subCommand === "descriptions";
@@ -79929,9 +80033,9 @@ function disableSkill(settings, skillName, scope) {
79929
80033
 
79930
80034
  // packages/cli/src/utils/skillUtils.ts
79931
80035
  var import_extract_zip2 = __toESM(require_extract_zip(), 1);
79932
- import * as fs36 from "node:fs/promises";
79933
- import * as path35 from "node:path";
79934
- import * as os7 from "node:os";
80036
+ import * as fs37 from "node:fs/promises";
80037
+ import * as path36 from "node:path";
80038
+ import * as os8 from "node:os";
79935
80039
  function renderSkillActionFeedback(result, formatScope) {
79936
80040
  const { skillName, action, status, error } = result;
79937
80041
  if (status === "error") {
@@ -79970,8 +80074,8 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
79970
80074
  const isSkillFile = source2.toLowerCase().endsWith(".skill");
79971
80075
  try {
79972
80076
  if (isGitUrl) {
79973
- tempDirToClean = await fs36.mkdtemp(
79974
- path35.join(os7.tmpdir(), "gemini-skill-")
80077
+ tempDirToClean = await fs37.mkdtemp(
80078
+ path36.join(os8.tmpdir(), "gemini-skill-")
79975
80079
  );
79976
80080
  sourcePath = tempDirToClean;
79977
80081
  onLog(`Cloning skill from ${source2}...`);
@@ -79983,18 +80087,18 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
79983
80087
  tempDirToClean
79984
80088
  );
79985
80089
  } else if (isSkillFile) {
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(`Extracting skill from ${source2}...`);
79991
- await (0, import_extract_zip2.default)(path35.resolve(source2), { dir: tempDirToClean });
80095
+ await (0, import_extract_zip2.default)(path36.resolve(source2), { dir: tempDirToClean });
79992
80096
  }
79993
80097
  if (subpath) {
79994
- sourcePath = path35.join(sourcePath, subpath);
80098
+ sourcePath = path36.join(sourcePath, subpath);
79995
80099
  }
79996
- sourcePath = path35.resolve(sourcePath);
79997
- if (tempDirToClean && !sourcePath.startsWith(path35.resolve(tempDirToClean))) {
80100
+ sourcePath = path36.resolve(sourcePath);
80101
+ if (tempDirToClean && !sourcePath.startsWith(path36.resolve(tempDirToClean))) {
79998
80102
  throw new Error("Invalid path: Directory traversal not allowed.");
79999
80103
  }
80000
80104
  onLog(`Searching for skills in ${sourcePath}...`);
@@ -80010,29 +80114,29 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
80010
80114
  if (!await requestConsent(skills, targetDir)) {
80011
80115
  throw new Error("Skill installation cancelled by user.");
80012
80116
  }
80013
- await fs36.mkdir(targetDir, { recursive: true });
80117
+ await fs37.mkdir(targetDir, { recursive: true });
80014
80118
  const installedSkills = [];
80015
80119
  for (const skill of skills) {
80016
80120
  const skillName = skill.name;
80017
- const skillDir = path35.dirname(skill.location);
80018
- const destPath = path35.join(targetDir, skillName);
80019
- const exists = await fs36.stat(destPath).catch(() => null);
80121
+ const skillDir = path36.dirname(skill.location);
80122
+ const destPath = path36.join(targetDir, skillName);
80123
+ const exists = await fs37.stat(destPath).catch(() => null);
80020
80124
  if (exists) {
80021
80125
  onLog(`Skill "${skillName}" already exists. Overwriting...`);
80022
- await fs36.rm(destPath, { recursive: true, force: true });
80126
+ await fs37.rm(destPath, { recursive: true, force: true });
80023
80127
  }
80024
- await fs36.cp(skillDir, destPath, { recursive: true });
80128
+ await fs37.cp(skillDir, destPath, { recursive: true });
80025
80129
  installedSkills.push({ name: skillName, location: destPath });
80026
80130
  }
80027
80131
  return installedSkills;
80028
80132
  } finally {
80029
80133
  if (tempDirToClean) {
80030
- await fs36.rm(tempDirToClean, { recursive: true, force: true });
80134
+ await fs37.rm(tempDirToClean, { recursive: true, force: true });
80031
80135
  }
80032
80136
  }
80033
80137
  }
80034
80138
  async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.resolve(true)) {
80035
- const sourcePath = path35.resolve(source2);
80139
+ const sourcePath = path36.resolve(source2);
80036
80140
  onLog(`Searching for skills in ${sourcePath}...`);
80037
80141
  const skills = await loadSkillsFromDir(sourcePath);
80038
80142
  if (skills.length === 0) {
@@ -80057,20 +80161,20 @@ async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.r
80057
80161
  if (!await requestConsent(skills, targetDir)) {
80058
80162
  throw new Error("Skill linking cancelled by user.");
80059
80163
  }
80060
- await fs36.mkdir(targetDir, { recursive: true });
80164
+ await fs37.mkdir(targetDir, { recursive: true });
80061
80165
  const linkedSkills = [];
80062
80166
  for (const skill of skills) {
80063
80167
  const skillName = skill.name;
80064
- const skillSourceDir = path35.dirname(skill.location);
80065
- const destPath = path35.join(targetDir, skillName);
80066
- const exists = await fs36.lstat(destPath).catch(() => null);
80168
+ const skillSourceDir = path36.dirname(skill.location);
80169
+ const destPath = path36.join(targetDir, skillName);
80170
+ const exists = await fs37.lstat(destPath).catch(() => null);
80067
80171
  if (exists) {
80068
80172
  onLog(
80069
80173
  `Skill "${skillName}" already exists at destination. Overwriting...`
80070
80174
  );
80071
- await fs36.rm(destPath, { recursive: true, force: true });
80175
+ await fs37.rm(destPath, { recursive: true, force: true });
80072
80176
  }
80073
- await fs36.symlink(
80177
+ await fs37.symlink(
80074
80178
  skillSourceDir,
80075
80179
  destPath,
80076
80180
  process.platform === "win32" ? "junction" : "dir"
@@ -80086,19 +80190,19 @@ async function uninstallSkill(name, scope) {
80086
80190
  const discoveredSkills = await loadSkillsFromDir(targetDir);
80087
80191
  const skillToUninstall = discoveredSkills.find((s3) => s3.name === name);
80088
80192
  if (!skillToUninstall) {
80089
- const skillPath = path35.resolve(targetDir, name);
80090
- if (!skillPath.startsWith(path35.resolve(targetDir))) {
80193
+ const skillPath = path36.resolve(targetDir, name);
80194
+ if (!skillPath.startsWith(path36.resolve(targetDir))) {
80091
80195
  return null;
80092
80196
  }
80093
- const exists = await fs36.lstat(skillPath).catch(() => null);
80197
+ const exists = await fs37.lstat(skillPath).catch(() => null);
80094
80198
  if (!exists) {
80095
80199
  return null;
80096
80200
  }
80097
- await fs36.rm(skillPath, { recursive: true, force: true });
80201
+ await fs37.rm(skillPath, { recursive: true, force: true });
80098
80202
  return { location: skillPath };
80099
80203
  }
80100
- const skillDir = path35.dirname(skillToUninstall.location);
80101
- await fs36.rm(skillDir, { recursive: true, force: true });
80204
+ const skillDir = path36.dirname(skillToUninstall.location);
80205
+ await fs37.rm(skillDir, { recursive: true, force: true });
80102
80206
  return { location: skillDir };
80103
80207
  }
80104
80208
 
@@ -80228,7 +80332,7 @@ async function disableAction4(context, args) {
80228
80332
  const result = disableSkill(context.services.settings, skillName, scope);
80229
80333
  let feedback = renderSkillActionFeedback(
80230
80334
  result,
80231
- (label, path37) => `${label} (${path37})`
80335
+ (label, path38) => `${label} (${path38})`
80232
80336
  );
80233
80337
  if (result.status === "success" || result.status === "no-op") {
80234
80338
  feedback += ' You can run "/skills reload" to refresh your current instance.';
@@ -80264,7 +80368,7 @@ async function enableAction4(context, args) {
80264
80368
  const result = enableSkill(context.services.settings, skillName);
80265
80369
  let feedback = renderSkillActionFeedback(
80266
80370
  result,
80267
- (label, path37) => `${label} (${path37})`
80371
+ (label, path38) => `${label} (${path38})`
80268
80372
  );
80269
80373
  if (result.status === "success" || result.status === "no-op") {
80270
80374
  feedback += ' You can run "/skills reload" to refresh your current instance.';
@@ -80302,7 +80406,7 @@ async function reloadAction2(context) {
80302
80406
  const minVisibleDuration = 500;
80303
80407
  if (elapsed < minVisibleDuration) {
80304
80408
  await new Promise(
80305
- (resolve8) => setTimeout(resolve8, minVisibleDuration - elapsed)
80409
+ (resolve9) => setTimeout(resolve9, minVisibleDuration - elapsed)
80306
80410
  );
80307
80411
  }
80308
80412
  context.ui.setPendingItem(null);
@@ -80455,8 +80559,8 @@ var vimCommand = {
80455
80559
 
80456
80560
  // packages/cli/src/ui/commands/setupGithubCommand.ts
80457
80561
  var import_undici2 = __toESM(require_undici(), 1);
80458
- import path36 from "node:path";
80459
- import * as fs37 from "node:fs";
80562
+ import path37 from "node:path";
80563
+ import * as fs38 from "node:fs";
80460
80564
  import { Writable } from "node:stream";
80461
80565
 
80462
80566
  // packages/cli/src/utils/gitUtils.ts
@@ -80583,25 +80687,25 @@ function getOpenUrlsCommands(readmeUrl) {
80583
80687
  }
80584
80688
  async function updateGitignore(gitRepoRoot) {
80585
80689
  const gitignoreEntries = [".gemini/", "gha-creds-*.json"];
80586
- const gitignorePath = path36.join(gitRepoRoot, ".gitignore");
80690
+ const gitignorePath = path37.join(gitRepoRoot, ".gitignore");
80587
80691
  try {
80588
80692
  let existingContent = "";
80589
80693
  let fileExists2 = true;
80590
80694
  try {
80591
- existingContent = await fs37.promises.readFile(gitignorePath, "utf8");
80695
+ existingContent = await fs38.promises.readFile(gitignorePath, "utf8");
80592
80696
  } catch {
80593
80697
  fileExists2 = false;
80594
80698
  }
80595
80699
  if (!fileExists2) {
80596
80700
  const contentToWrite = gitignoreEntries.join("\n") + "\n";
80597
- await fs37.promises.writeFile(gitignorePath, contentToWrite);
80701
+ await fs38.promises.writeFile(gitignorePath, contentToWrite);
80598
80702
  } else {
80599
80703
  const missingEntries = gitignoreEntries.filter(
80600
80704
  (entry) => !existingContent.split(/\r?\n/).some((line) => line.split("#")[0].trim() === entry)
80601
80705
  );
80602
80706
  if (missingEntries.length > 0) {
80603
80707
  const contentToAdd = "\n" + missingEntries.join("\n") + "\n";
80604
- await fs37.promises.appendFile(gitignorePath, contentToAdd);
80708
+ await fs38.promises.appendFile(gitignorePath, contentToAdd);
80605
80709
  }
80606
80710
  }
80607
80711
  } catch (error) {
@@ -80639,11 +80743,11 @@ async function downloadFiles({
80639
80743
  `Empty body while downloading ${endpoint}: ${response.status} - ${response.statusText}`
80640
80744
  );
80641
80745
  }
80642
- const destination = path36.resolve(
80746
+ const destination = path37.resolve(
80643
80747
  targetDir,
80644
- path36.basename(fileBasename)
80748
+ path37.basename(fileBasename)
80645
80749
  );
80646
- const fileStream = fs37.createWriteStream(destination, {
80750
+ const fileStream = fs38.createWriteStream(destination, {
80647
80751
  mode: 420,
80648
80752
  // -rw-r--r--, user(rw), group(r), other(r)
80649
80753
  flags: "w",
@@ -80660,7 +80764,7 @@ async function downloadFiles({
80660
80764
  }
80661
80765
  async function createDirectory(dirPath) {
80662
80766
  try {
80663
- await fs37.promises.mkdir(dirPath, { recursive: true });
80767
+ await fs38.promises.mkdir(dirPath, { recursive: true });
80664
80768
  } catch (error) {
80665
80769
  debugLogger.debug(`Failed to create ${dirPath} directory:`, error);
80666
80770
  throw new Error(
@@ -80714,9 +80818,9 @@ var setupGithubCommand = {
80714
80818
  const proxy = context?.services?.agentContext?.config.getProxy();
80715
80819
  const releaseTag = await getLatestGitHubRelease(proxy);
80716
80820
  const readmeUrl = `https://github.com/google-github-actions/run-gemini-cli/blob/${releaseTag}/README.md#quick-start`;
80717
- const workflowsDir = path36.join(gitRepoRoot, ".github", "workflows");
80821
+ const workflowsDir = path37.join(gitRepoRoot, ".github", "workflows");
80718
80822
  await createDirectory(workflowsDir);
80719
- const commandsDir = path36.join(gitRepoRoot, ".github", "commands");
80823
+ const commandsDir = path37.join(gitRepoRoot, ".github", "commands");
80720
80824
  await createDirectory(commandsDir);
80721
80825
  await downloadSetupFiles({
80722
80826
  configs: [
@@ -80936,6 +81040,7 @@ var BuiltinCommandLoader = class {
80936
81040
  copyCommand,
80937
81041
  corgiCommand,
80938
81042
  docsCommand,
81043
+ exportSessionCommand,
80939
81044
  directoryCommand,
80940
81045
  editorCommand,
80941
81046
  ...this.config?.getExtensionsEnabled() === false ? [
@@ -80977,7 +81082,7 @@ var BuiltinCommandLoader = class {
80977
81082
  })
80978
81083
  }
80979
81084
  ] : [mcpCommand],
80980
- memoryCommand,
81085
+ memoryCommand(this.config),
80981
81086
  modelCommand,
80982
81087
  ...this.config?.getFolderTrust() ? [permissionsCommand] : [],
80983
81088
  ...this.config?.isPlanEnabled() ? [planCommand] : [],