@google/gemini-cli 0.42.0-preview.2 → 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-FIIOJPLW.js → chunk-43AGRA7S.js} +3 -3
  2. package/bundle/{chunk-M6ZQAQKH.js → chunk-46T44JOY.js} +1 -1
  3. package/bundle/{chunk-OFOKTVUH.js → chunk-4TLQKGTR.js} +1 -1
  4. package/bundle/{chunk-4NXNVHPO.js → chunk-6XOSIMPZ.js} +8 -9
  5. package/bundle/{chunk-AAU5XCLJ.js → chunk-HQXINMBL.js} +2 -2
  6. package/bundle/{chunk-QM234EIA.js → chunk-JENIU3E3.js} +1 -1
  7. package/bundle/{chunk-R7BHIYZD.js → chunk-LBQFRHYD.js} +1 -1
  8. package/bundle/{chunk-WLPWIJ3Y.js → chunk-LFGJVOVZ.js} +486 -381
  9. package/bundle/{chunk-DEKZKOVU.js → chunk-MRHFLHPJ.js} +2 -2
  10. package/bundle/{chunk-ODIOD5TJ.js → chunk-MXKXLNQD.js} +3 -3
  11. package/bundle/{chunk-ECNYAST2.js → chunk-N6QYTC2T.js} +5417 -5376
  12. package/bundle/{chunk-WOGMVEEF.js → chunk-NBRZ4A3S.js} +2170 -791
  13. package/bundle/{chunk-Q24MYLMP.js → chunk-P4UQCQUB.js} +3 -3
  14. package/bundle/{chunk-S3WIE72K.js → chunk-PGJUNQPO.js} +34 -16
  15. package/bundle/{chunk-THNM4JU6.js → chunk-PSWUV2OO.js} +3 -3
  16. package/bundle/{chunk-6QBZKEWW.js → chunk-PYLHDAUK.js} +3 -3
  17. package/bundle/{chunk-2KRAWFEQ.js → chunk-Q23X5R4A.js} +486 -381
  18. package/bundle/{chunk-SJ6AOVZF.js → chunk-QYUN3J2L.js} +533 -441
  19. package/bundle/{chunk-77HSANAH.js → chunk-SAISHGWW.js} +1907 -716
  20. package/bundle/{chunk-I6IY72IP.js → chunk-SYD5SJFT.js} +38 -23
  21. package/bundle/{chunk-JW36FWGZ.js → chunk-T3SUXLQQ.js} +2 -2
  22. package/bundle/{chunk-BLNG7CSO.js → chunk-UIG2IVPJ.js} +34 -16
  23. package/bundle/{chunk-JEW7ZIWE.js → chunk-UJ26GAE5.js} +5326 -5290
  24. package/bundle/{chunk-E54WEGH3.js → chunk-UNAVBUTP.js} +14729 -7452
  25. package/bundle/{chunk-LYMYMKWM.js → chunk-WQOLTO3C.js} +1 -1
  26. package/bundle/{chunk-WFKT4UTI.js → chunk-X26T73X6.js} +3 -3
  27. package/bundle/{cleanup-5FPOUEHR.js → cleanup-EIZJH2E3.js} +3 -3
  28. package/bundle/{cleanup-G7DNOS4V.js → cleanup-MI76P55B.js} +3 -3
  29. package/bundle/{cleanup-GZM5KIZA.js → cleanup-NZBQYB7U.js} +3 -3
  30. package/bundle/{core-IYSSLWMM.js → core-ERSGIOMQ.js} +30 -2
  31. package/bundle/{dist-D7FZVGG3.js → core-T2TBFAYG.js} +30 -2
  32. package/bundle/{devtoolsService-UADEEKOH.js → devtoolsService-7KZDSYEF.js} +3 -3
  33. package/bundle/{devtoolsService-3XOQOECV.js → devtoolsService-FYTOIC37.js} +3 -3
  34. package/bundle/{devtoolsService-7ZN7CSSO.js → devtoolsService-LV5NJ2BT.js} +4 -5
  35. package/bundle/{dist-GF2RNVWZ.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-IRKIMLB4.js → gemini-IVKBXHDT.js} +160 -60
  46. package/bundle/{gemini-MWN2MSYV.js → gemini-JKWQQTKP.js} +160 -60
  47. package/bundle/{gemini-IMX43TZ4.js → gemini-Z77GAAR6.js} +331 -245
  48. package/bundle/gemini.js +8 -8
  49. package/bundle/{interactiveCli-SAMKYHUU.js → interactiveCli-36WZS6KT.js} +1704 -1457
  50. package/bundle/{interactiveCli-752P4PTI.js → interactiveCli-BQ36B66Z.js} +1703 -1457
  51. package/bundle/{interactiveCli-VX6GBWOV.js → interactiveCli-SME5QTEN.js} +1967 -1739
  52. package/bundle/{liteRtServerManager-CDLVKT7N.js → liteRtServerManager-2QD4R3A3.js} +5 -5
  53. package/bundle/{liteRtServerManager-FPYU5KEK.js → liteRtServerManager-ISYDOBNC.js} +5 -5
  54. package/bundle/{liteRtServerManager-OWPZ35U6.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-446FDCUW.js → oauth2-provider-DOSIH6VE.js} +2 -2
  59. package/bundle/{oauth2-provider-RQNNLGWV.js → oauth2-provider-TZF6EZRX.js} +2 -2
  60. package/bundle/{oauth2-provider-6W4IY3LC.js → oauth2-provider-VFOABWBW.js} +73 -39
  61. package/bundle/{start-6U3XBAVH.js → start-3GPIRK3E.js} +7 -7
  62. package/bundle/{start-KUNHDGRA.js → start-6NONW677.js} +7 -7
  63. package/bundle/{start-TTLMBKNX.js → start-M6MUPEJS.js} +7 -7
  64. package/package.json +1 -1
  65. package/bundle/chunk-76KOJPMV.js +0 -391
  66. package/bundle/chunk-LHVIO4J4.js +0 -81544
  67. package/bundle/chunk-OP6THN3K.js +0 -118
  68. package/bundle/chunk-RO2XVFEU.js +0 -512
  69. package/bundle/chunk-WRDVEMWE.js +0 -1571
  70. package/bundle/chunk-YDC4M26X.js +0 -156
  71. package/bundle/chunk-ZDP2ZWKG.js +0 -17230
  72. package/bundle/chunk-ZFOGBX2H.js +0 -356008
  73. package/bundle/cleanup-J6AUEKWI.js +0 -33
  74. package/bundle/devtoolsService-KTUMQHXG.js +0 -857
  75. package/bundle/dist-HBMVDPXB.js +0 -2096
  76. package/bundle/gemini-SYFUC6XO.js +0 -16256
  77. package/bundle/interactiveCli-37SKHAKX.js +0 -34505
  78. package/bundle/liteRtServerManager-OWTQEYE6.js +0 -66
  79. package/bundle/oauth2-provider-TITPL3DN.js +0 -237
  80. package/bundle/start-TZXEJLTH.js +0 -19
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  exitCli,
8
8
  require_source
9
- } from "./chunk-WRDVEMWE.js";
9
+ } from "./chunk-LBQFRHYD.js";
10
10
  import {
11
11
  DEFAULT_BACKGROUND_OPACITY,
12
12
  DEFAULT_BORDER_OPACITY,
@@ -19,6 +19,7 @@ import {
19
19
  GEMMA_MODEL_NAME,
20
20
  LRU_BUFFER_PERF_CACHE_LIMIT,
21
21
  MIN_TERMINAL_WIDTH_FOR_FULL_LABEL,
22
+ SessionSelector,
22
23
  Theme,
23
24
  convertSessionToHistoryFormats,
24
25
  cpIndexToOffset,
@@ -57,19 +58,17 @@ import {
57
58
  stripUnsafeCharacters,
58
59
  toCodePoints,
59
60
  validateCustomTheme
60
- } from "./chunk-BLNG7CSO.js";
61
+ } from "./chunk-SYD5SJFT.js";
61
62
  import {
62
63
  isDevelopment
63
- } from "./chunk-ODIOD5TJ.js";
64
+ } from "./chunk-43AGRA7S.js";
64
65
  import {
65
66
  emptyIcon,
66
67
  require_react
67
- } from "./chunk-LYMYMKWM.js";
68
+ } from "./chunk-46T44JOY.js";
68
69
  import {
69
70
  AsyncFzf,
70
- AuthType,
71
71
  Config,
72
- CoreToolCallStatus,
73
72
  ExtensionDisableEvent,
74
73
  ExtensionEnableEvent,
75
74
  ExtensionInstallEvent,
@@ -78,27 +77,17 @@ import {
78
77
  ExtensionUninstallEvent,
79
78
  ExtensionUpdateEvent,
80
79
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
81
- HookType,
82
- IDEConnectionStatus,
83
80
  INITIAL_HISTORY_LENGTH,
84
81
  IdeClient,
85
82
  IdeConnectionEvent,
86
- IdeConnectionType,
87
- IntegrityDataStatus,
88
83
  KeychainTokenStorage,
89
- LlmRole,
90
- MCPDiscoveryState,
91
84
  MCPOAuthTokenStorage,
92
- MCPServerStatus,
93
85
  ModelSlashCommandEvent,
94
86
  ProjectIdRequiredError,
95
87
  ReadManyFilesTool,
96
88
  RewindEvent,
97
- SessionEndReason,
98
- SessionStartSource,
99
89
  ShellExecutionService,
100
90
  StartSessionEvent,
101
- TrustLevel,
102
91
  UPGRADE_URL_PAGE,
103
92
  UserAccountManager,
104
93
  ValidationRequiredError,
@@ -212,13 +201,12 @@ import {
212
201
  stripAnsi,
213
202
  tokenLimit,
214
203
  uiTelemetryService
215
- } from "./chunk-E54WEGH3.js";
204
+ } from "./chunk-UNAVBUTP.js";
216
205
  import {
217
206
  ApprovalMode,
218
207
  CoreEvent,
219
208
  DiscoveredMCPTool,
220
209
  GEMINI_DIR,
221
- PolicyDecision,
222
210
  REFERENCE_CONTENT_END,
223
211
  REFERENCE_CONTENT_START,
224
212
  Storage,
@@ -239,7 +227,7 @@ import {
239
227
  shortenPath,
240
228
  tildeifyPath,
241
229
  unescapePath
242
- } from "./chunk-JEW7ZIWE.js";
230
+ } from "./chunk-N6QYTC2T.js";
243
231
  import {
244
232
  require_src
245
233
  } from "./chunk-RJTRUG2J.js";
@@ -1742,8 +1730,8 @@ var require_react_reconciler_production = __commonJS({
1742
1730
  currentEntangledActionThenable = {
1743
1731
  status: "pending",
1744
1732
  value: void 0,
1745
- then: function(resolve8) {
1746
- entangledListeners.push(resolve8);
1733
+ then: function(resolve9) {
1734
+ entangledListeners.push(resolve9);
1747
1735
  }
1748
1736
  };
1749
1737
  }
@@ -1766,8 +1754,8 @@ var require_react_reconciler_production = __commonJS({
1766
1754
  status: "pending",
1767
1755
  value: null,
1768
1756
  reason: null,
1769
- then: function(resolve8) {
1770
- listeners.push(resolve8);
1757
+ then: function(resolve9) {
1758
+ listeners.push(resolve9);
1771
1759
  }
1772
1760
  };
1773
1761
  thenable.then(
@@ -9761,7 +9749,7 @@ var require_prompt = __commonJS({
9761
9749
  var require_text = __commonJS({
9762
9750
  "node_modules/prompts/dist/elements/text.js"(exports, module) {
9763
9751
  "use strict";
9764
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
9752
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
9765
9753
  try {
9766
9754
  var info = gen[key](arg);
9767
9755
  var value = info.value;
@@ -9770,7 +9758,7 @@ var require_text = __commonJS({
9770
9758
  return;
9771
9759
  }
9772
9760
  if (info.done) {
9773
- resolve8(value);
9761
+ resolve9(value);
9774
9762
  } else {
9775
9763
  Promise.resolve(value).then(_next, _throw);
9776
9764
  }
@@ -9778,13 +9766,13 @@ var require_text = __commonJS({
9778
9766
  function _asyncToGenerator(fn2) {
9779
9767
  return function() {
9780
9768
  var self = this, args = arguments;
9781
- return new Promise(function(resolve8, reject) {
9769
+ return new Promise(function(resolve9, reject) {
9782
9770
  var gen = fn2.apply(self, args);
9783
9771
  function _next(value) {
9784
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
9772
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
9785
9773
  }
9786
9774
  function _throw(err) {
9787
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
9775
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
9788
9776
  }
9789
9777
  _next(void 0);
9790
9778
  });
@@ -10500,7 +10488,7 @@ var require_dateparts = __commonJS({
10500
10488
  var require_date = __commonJS({
10501
10489
  "node_modules/prompts/dist/elements/date.js"(exports, module) {
10502
10490
  "use strict";
10503
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
10491
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
10504
10492
  try {
10505
10493
  var info = gen[key](arg);
10506
10494
  var value = info.value;
@@ -10509,7 +10497,7 @@ var require_date = __commonJS({
10509
10497
  return;
10510
10498
  }
10511
10499
  if (info.done) {
10512
- resolve8(value);
10500
+ resolve9(value);
10513
10501
  } else {
10514
10502
  Promise.resolve(value).then(_next, _throw);
10515
10503
  }
@@ -10517,13 +10505,13 @@ var require_date = __commonJS({
10517
10505
  function _asyncToGenerator(fn2) {
10518
10506
  return function() {
10519
10507
  var self = this, args = arguments;
10520
- return new Promise(function(resolve8, reject) {
10508
+ return new Promise(function(resolve9, reject) {
10521
10509
  var gen = fn2.apply(self, args);
10522
10510
  function _next(value) {
10523
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
10511
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
10524
10512
  }
10525
10513
  function _throw(err) {
10526
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
10514
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
10527
10515
  }
10528
10516
  _next(void 0);
10529
10517
  });
@@ -10726,7 +10714,7 @@ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
10726
10714
  var require_number = __commonJS({
10727
10715
  "node_modules/prompts/dist/elements/number.js"(exports, module) {
10728
10716
  "use strict";
10729
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
10717
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
10730
10718
  try {
10731
10719
  var info = gen[key](arg);
10732
10720
  var value = info.value;
@@ -10735,7 +10723,7 @@ var require_number = __commonJS({
10735
10723
  return;
10736
10724
  }
10737
10725
  if (info.done) {
10738
- resolve8(value);
10726
+ resolve9(value);
10739
10727
  } else {
10740
10728
  Promise.resolve(value).then(_next, _throw);
10741
10729
  }
@@ -10743,13 +10731,13 @@ var require_number = __commonJS({
10743
10731
  function _asyncToGenerator(fn2) {
10744
10732
  return function() {
10745
10733
  var self = this, args = arguments;
10746
- return new Promise(function(resolve8, reject) {
10734
+ return new Promise(function(resolve9, reject) {
10747
10735
  var gen = fn2.apply(self, args);
10748
10736
  function _next(value) {
10749
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
10737
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
10750
10738
  }
10751
10739
  function _throw(err) {
10752
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
10740
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
10753
10741
  }
10754
10742
  _next(void 0);
10755
10743
  });
@@ -11172,7 +11160,7 @@ Instructions:
11172
11160
  var require_autocomplete = __commonJS({
11173
11161
  "node_modules/prompts/dist/elements/autocomplete.js"(exports, module) {
11174
11162
  "use strict";
11175
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
11163
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
11176
11164
  try {
11177
11165
  var info = gen[key](arg);
11178
11166
  var value = info.value;
@@ -11181,7 +11169,7 @@ var require_autocomplete = __commonJS({
11181
11169
  return;
11182
11170
  }
11183
11171
  if (info.done) {
11184
- resolve8(value);
11172
+ resolve9(value);
11185
11173
  } else {
11186
11174
  Promise.resolve(value).then(_next, _throw);
11187
11175
  }
@@ -11189,13 +11177,13 @@ var require_autocomplete = __commonJS({
11189
11177
  function _asyncToGenerator(fn2) {
11190
11178
  return function() {
11191
11179
  var self = this, args = arguments;
11192
- return new Promise(function(resolve8, reject) {
11180
+ return new Promise(function(resolve9, reject) {
11193
11181
  var gen = fn2.apply(self, args);
11194
11182
  function _next(value) {
11195
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
11183
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
11196
11184
  }
11197
11185
  function _throw(err) {
11198
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
11186
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
11199
11187
  }
11200
11188
  _next(void 0);
11201
11189
  });
@@ -11826,7 +11814,7 @@ var require_dist = __commonJS({
11826
11814
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
11827
11815
  return arr2;
11828
11816
  }
11829
- function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key, arg) {
11817
+ function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
11830
11818
  try {
11831
11819
  var info = gen[key](arg);
11832
11820
  var value = info.value;
@@ -11835,7 +11823,7 @@ var require_dist = __commonJS({
11835
11823
  return;
11836
11824
  }
11837
11825
  if (info.done) {
11838
- resolve8(value);
11826
+ resolve9(value);
11839
11827
  } else {
11840
11828
  Promise.resolve(value).then(_next, _throw);
11841
11829
  }
@@ -11843,13 +11831,13 @@ var require_dist = __commonJS({
11843
11831
  function _asyncToGenerator(fn2) {
11844
11832
  return function() {
11845
11833
  var self = this, args = arguments;
11846
- return new Promise(function(resolve8, reject) {
11834
+ return new Promise(function(resolve9, reject) {
11847
11835
  var gen = fn2.apply(self, args);
11848
11836
  function _next(value) {
11849
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
11837
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
11850
11838
  }
11851
11839
  function _throw(err) {
11852
- asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
11840
+ asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
11853
11841
  }
11854
11842
  _next(void 0);
11855
11843
  });
@@ -14186,7 +14174,7 @@ var require_get_stream = __commonJS({
14186
14174
  };
14187
14175
  const { maxBuffer } = options;
14188
14176
  let stream;
14189
- await new Promise((resolve8, reject) => {
14177
+ await new Promise((resolve9, reject) => {
14190
14178
  const rejectPromise = (error) => {
14191
14179
  if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
14192
14180
  error.bufferedData = stream.getBufferedValue();
@@ -14198,7 +14186,7 @@ var require_get_stream = __commonJS({
14198
14186
  rejectPromise(error);
14199
14187
  return;
14200
14188
  }
14201
- resolve8();
14189
+ resolve9();
14202
14190
  });
14203
14191
  stream.on("data", () => {
14204
14192
  if (stream.getBufferedLength() > maxBuffer) {
@@ -14274,7 +14262,7 @@ var require_pend = __commonJS({
14274
14262
  // node_modules/fd-slicer/index.js
14275
14263
  var require_fd_slicer = __commonJS({
14276
14264
  "node_modules/fd-slicer/index.js"(exports) {
14277
- var fs38 = __require("fs");
14265
+ var fs39 = __require("fs");
14278
14266
  var util2 = __require("util");
14279
14267
  var stream = __require("stream");
14280
14268
  var Readable = stream.Readable;
@@ -14299,7 +14287,7 @@ var require_fd_slicer = __commonJS({
14299
14287
  FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
14300
14288
  var self = this;
14301
14289
  self.pend.go(function(cb) {
14302
- 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) {
14303
14291
  cb();
14304
14292
  callback(err, bytesRead, buffer2);
14305
14293
  });
@@ -14308,7 +14296,7 @@ var require_fd_slicer = __commonJS({
14308
14296
  FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
14309
14297
  var self = this;
14310
14298
  self.pend.go(function(cb) {
14311
- 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) {
14312
14300
  cb();
14313
14301
  callback(err, written, buffer2);
14314
14302
  });
@@ -14329,7 +14317,7 @@ var require_fd_slicer = __commonJS({
14329
14317
  if (self.refCount > 0) return;
14330
14318
  if (self.refCount < 0) throw new Error("invalid unref");
14331
14319
  if (self.autoClose) {
14332
- fs38.close(self.fd, onCloseDone);
14320
+ fs39.close(self.fd, onCloseDone);
14333
14321
  }
14334
14322
  function onCloseDone(err) {
14335
14323
  if (err) {
@@ -14366,7 +14354,7 @@ var require_fd_slicer = __commonJS({
14366
14354
  self.context.pend.go(function(cb) {
14367
14355
  if (self.destroyed) return cb();
14368
14356
  var buffer = new Buffer(toRead);
14369
- 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) {
14370
14358
  if (err) {
14371
14359
  self.destroy(err);
14372
14360
  } else if (bytesRead === 0) {
@@ -14413,7 +14401,7 @@ var require_fd_slicer = __commonJS({
14413
14401
  }
14414
14402
  self.context.pend.go(function(cb) {
14415
14403
  if (self.destroyed) return cb();
14416
- 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) {
14417
14405
  if (err2) {
14418
14406
  self.destroy();
14419
14407
  cb();
@@ -14840,7 +14828,7 @@ var require_buffer_crc32 = __commonJS({
14840
14828
  // node_modules/yauzl/index.js
14841
14829
  var require_yauzl = __commonJS({
14842
14830
  "node_modules/yauzl/index.js"(exports) {
14843
- var fs38 = __require("fs");
14831
+ var fs39 = __require("fs");
14844
14832
  var zlib = __require("zlib");
14845
14833
  var fd_slicer = require_fd_slicer();
14846
14834
  var crc32 = require_buffer_crc32();
@@ -14858,7 +14846,7 @@ var require_yauzl = __commonJS({
14858
14846
  exports.ZipFile = ZipFile;
14859
14847
  exports.Entry = Entry;
14860
14848
  exports.RandomAccessReader = RandomAccessReader;
14861
- function open(path37, options, callback) {
14849
+ function open(path38, options, callback) {
14862
14850
  if (typeof options === "function") {
14863
14851
  callback = options;
14864
14852
  options = null;
@@ -14870,10 +14858,10 @@ var require_yauzl = __commonJS({
14870
14858
  if (options.validateEntrySizes == null) options.validateEntrySizes = true;
14871
14859
  if (options.strictFileNames == null) options.strictFileNames = false;
14872
14860
  if (callback == null) callback = defaultCallback;
14873
- fs38.open(path37, "r", function(err, fd) {
14861
+ fs39.open(path38, "r", function(err, fd) {
14874
14862
  if (err) return callback(err);
14875
14863
  fromFd(fd, options, function(err2, zipfile) {
14876
- if (err2) fs38.close(fd, defaultCallback);
14864
+ if (err2) fs39.close(fd, defaultCallback);
14877
14865
  callback(err2, zipfile);
14878
14866
  });
14879
14867
  });
@@ -14890,7 +14878,7 @@ var require_yauzl = __commonJS({
14890
14878
  if (options.validateEntrySizes == null) options.validateEntrySizes = true;
14891
14879
  if (options.strictFileNames == null) options.strictFileNames = false;
14892
14880
  if (callback == null) callback = defaultCallback;
14893
- fs38.fstat(fd, function(err, stats) {
14881
+ fs39.fstat(fd, function(err, stats) {
14894
14882
  if (err) return callback(err);
14895
14883
  var reader = fd_slicer.createFromFd(fd, { autoClose: true });
14896
14884
  fromRandomAccessReader(reader, stats.size, options, callback);
@@ -15470,9 +15458,9 @@ var require_yauzl = __commonJS({
15470
15458
  var require_extract_zip = __commonJS({
15471
15459
  "node_modules/extract-zip/index.js"(exports, module) {
15472
15460
  var debug = require_src()("extract-zip");
15473
- var { createWriteStream: createWriteStream5, promises: fs38 } = __require("fs");
15461
+ var { createWriteStream: createWriteStream5, promises: fs39 } = __require("fs");
15474
15462
  var getStream = require_get_stream();
15475
- var path37 = __require("path");
15463
+ var path38 = __require("path");
15476
15464
  var { promisify: promisify5 } = __require("util");
15477
15465
  var stream = __require("stream");
15478
15466
  var yauzl = require_yauzl();
@@ -15487,7 +15475,7 @@ var require_extract_zip = __commonJS({
15487
15475
  debug("opening", this.zipPath, "with opts", this.opts);
15488
15476
  this.zipfile = await openZip(this.zipPath, { lazyEntries: true });
15489
15477
  this.canceled = false;
15490
- return new Promise((resolve8, reject) => {
15478
+ return new Promise((resolve9, reject) => {
15491
15479
  this.zipfile.on("error", (err) => {
15492
15480
  this.canceled = true;
15493
15481
  reject(err);
@@ -15496,7 +15484,7 @@ var require_extract_zip = __commonJS({
15496
15484
  this.zipfile.on("close", () => {
15497
15485
  if (!this.canceled) {
15498
15486
  debug("zip extraction complete");
15499
- resolve8();
15487
+ resolve9();
15500
15488
  }
15501
15489
  });
15502
15490
  this.zipfile.on("entry", async (entry) => {
@@ -15509,12 +15497,12 @@ var require_extract_zip = __commonJS({
15509
15497
  this.zipfile.readEntry();
15510
15498
  return;
15511
15499
  }
15512
- const destDir = path37.dirname(path37.join(this.opts.dir, entry.fileName));
15500
+ const destDir = path38.dirname(path38.join(this.opts.dir, entry.fileName));
15513
15501
  try {
15514
- await fs38.mkdir(destDir, { recursive: true });
15515
- const canonicalDestDir = await fs38.realpath(destDir);
15516
- const relativeDestDir = path37.relative(this.opts.dir, canonicalDestDir);
15517
- if (relativeDestDir.split(path37.sep).includes("..")) {
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("..")) {
15518
15506
  throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
15519
15507
  }
15520
15508
  await this.extractEntry(entry);
@@ -15536,7 +15524,7 @@ var require_extract_zip = __commonJS({
15536
15524
  if (this.opts.onEntry) {
15537
15525
  this.opts.onEntry(entry, this.zipfile);
15538
15526
  }
15539
- const dest = path37.join(this.opts.dir, entry.fileName);
15527
+ const dest = path38.join(this.opts.dir, entry.fileName);
15540
15528
  const mode = entry.externalFileAttributes >> 16 & 65535;
15541
15529
  const IFMT = 61440;
15542
15530
  const IFDIR = 16384;
@@ -15550,20 +15538,20 @@ var require_extract_zip = __commonJS({
15550
15538
  if (!isDir) isDir = madeBy === 0 && entry.externalFileAttributes === 16;
15551
15539
  debug("extracting entry", { filename: entry.fileName, isDir, isSymlink: symlink2 });
15552
15540
  const procMode = this.getExtractedMode(mode, isDir) & 511;
15553
- const destDir = isDir ? dest : path37.dirname(dest);
15541
+ const destDir = isDir ? dest : path38.dirname(dest);
15554
15542
  const mkdirOptions = { recursive: true };
15555
15543
  if (isDir) {
15556
15544
  mkdirOptions.mode = procMode;
15557
15545
  }
15558
15546
  debug("mkdir", { dir: destDir, ...mkdirOptions });
15559
- await fs38.mkdir(destDir, mkdirOptions);
15547
+ await fs39.mkdir(destDir, mkdirOptions);
15560
15548
  if (isDir) return;
15561
15549
  debug("opening read stream", dest);
15562
15550
  const readStream = await promisify5(this.zipfile.openReadStream.bind(this.zipfile))(entry);
15563
15551
  if (symlink2) {
15564
15552
  const link2 = await getStream(readStream);
15565
15553
  debug("creating symlink", link2, dest);
15566
- await fs38.symlink(link2, dest);
15554
+ await fs39.symlink(link2, dest);
15567
15555
  } else {
15568
15556
  await pipeline2(readStream, createWriteStream5(dest, { mode: procMode }));
15569
15557
  }
@@ -15592,11 +15580,11 @@ var require_extract_zip = __commonJS({
15592
15580
  };
15593
15581
  module.exports = async function(zipPath, opts) {
15594
15582
  debug("creating target directory", opts.dir);
15595
- if (!path37.isAbsolute(opts.dir)) {
15583
+ if (!path38.isAbsolute(opts.dir)) {
15596
15584
  throw new Error("Target directory is expected to be absolute");
15597
15585
  }
15598
- await fs38.mkdir(opts.dir, { recursive: true });
15599
- opts.dir = await fs38.realpath(opts.dir);
15586
+ await fs39.mkdir(opts.dir, { recursive: true });
15587
+ opts.dir = await fs39.realpath(opts.dir);
15600
15588
  return new Extractor(zipPath, opts).extract();
15601
15589
  };
15602
15590
  }
@@ -17053,7 +17041,7 @@ var require_strip_final_newline = __commonJS({
17053
17041
  var require_npm_run_path = __commonJS({
17054
17042
  "node_modules/run-jxa/node_modules/npm-run-path/index.js"(exports, module) {
17055
17043
  "use strict";
17056
- var path37 = __require("path");
17044
+ var path38 = __require("path");
17057
17045
  var pathKey = require_path_key();
17058
17046
  var npmRunPath = (options) => {
17059
17047
  options = {
@@ -17063,16 +17051,16 @@ var require_npm_run_path = __commonJS({
17063
17051
  ...options
17064
17052
  };
17065
17053
  let previous;
17066
- let cwdPath = path37.resolve(options.cwd);
17054
+ let cwdPath = path38.resolve(options.cwd);
17067
17055
  const result = [];
17068
17056
  while (previous !== cwdPath) {
17069
- result.push(path37.join(cwdPath, "node_modules/.bin"));
17057
+ result.push(path38.join(cwdPath, "node_modules/.bin"));
17070
17058
  previous = cwdPath;
17071
- cwdPath = path37.resolve(cwdPath, "..");
17059
+ cwdPath = path38.resolve(cwdPath, "..");
17072
17060
  }
17073
- const execPathDir = path37.resolve(options.cwd, options.execPath, "..");
17061
+ const execPathDir = path38.resolve(options.cwd, options.execPath, "..");
17074
17062
  result.push(execPathDir);
17075
- return result.concat(options.path).join(path37.delimiter);
17063
+ return result.concat(options.path).join(path38.delimiter);
17076
17064
  };
17077
17065
  module.exports = npmRunPath;
17078
17066
  module.exports.default = npmRunPath;
@@ -17082,9 +17070,9 @@ var require_npm_run_path = __commonJS({
17082
17070
  ...options
17083
17071
  };
17084
17072
  const env3 = { ...options.env };
17085
- const path38 = pathKey({ env: env3 });
17086
- options.path = env3[path38];
17087
- env3[path38] = module.exports(options);
17073
+ const path39 = pathKey({ env: env3 });
17074
+ options.path = env3[path39];
17075
+ env3[path39] = module.exports(options);
17088
17076
  return env3;
17089
17077
  };
17090
17078
  }
@@ -17807,7 +17795,7 @@ var require_signal_exit3 = __commonJS({
17807
17795
  var require_kill = __commonJS({
17808
17796
  "node_modules/run-jxa/node_modules/execa/lib/kill.js"(exports, module) {
17809
17797
  "use strict";
17810
- var os8 = __require("os");
17798
+ var os9 = __require("os");
17811
17799
  var onExit = require_signal_exit3();
17812
17800
  var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
17813
17801
  var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
@@ -17831,7 +17819,7 @@ var require_kill = __commonJS({
17831
17819
  return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
17832
17820
  };
17833
17821
  var isSigterm = (signal) => {
17834
- 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";
17835
17823
  };
17836
17824
  var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
17837
17825
  if (forceKillAfterTimeout === true) {
@@ -17857,7 +17845,7 @@ var require_kill = __commonJS({
17857
17845
  return spawnedPromise;
17858
17846
  }
17859
17847
  let timeoutId;
17860
- const timeoutPromise = new Promise((resolve8, reject) => {
17848
+ const timeoutPromise = new Promise((resolve9, reject) => {
17861
17849
  timeoutId = setTimeout(() => {
17862
17850
  timeoutKill(spawned, killSignal, reject);
17863
17851
  }, timeout);
@@ -17963,7 +17951,7 @@ var require_get_stream2 = __commonJS({
17963
17951
  };
17964
17952
  const { maxBuffer } = options;
17965
17953
  const stream2 = bufferStream(options);
17966
- await new Promise((resolve8, reject) => {
17954
+ await new Promise((resolve9, reject) => {
17967
17955
  const rejectPromise = (error) => {
17968
17956
  if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
17969
17957
  error.bufferedData = stream2.getBufferedValue();
@@ -17973,7 +17961,7 @@ var require_get_stream2 = __commonJS({
17973
17961
  (async () => {
17974
17962
  try {
17975
17963
  await streamPipelinePromisified(inputStream, stream2);
17976
- resolve8();
17964
+ resolve9();
17977
17965
  } catch (error) {
17978
17966
  rejectPromise(error);
17979
17967
  }
@@ -18130,9 +18118,9 @@ var require_promise = __commonJS({
18130
18118
  return spawned;
18131
18119
  };
18132
18120
  var getSpawnedPromise = (spawned) => {
18133
- return new Promise((resolve8, reject) => {
18121
+ return new Promise((resolve9, reject) => {
18134
18122
  spawned.on("exit", (exitCode, signal) => {
18135
- resolve8({ exitCode, signal });
18123
+ resolve9({ exitCode, signal });
18136
18124
  });
18137
18125
  spawned.on("error", (error) => {
18138
18126
  reject(error);
@@ -18200,7 +18188,7 @@ var require_command = __commonJS({
18200
18188
  var require_execa = __commonJS({
18201
18189
  "node_modules/run-jxa/node_modules/execa/index.js"(exports, module) {
18202
18190
  "use strict";
18203
- var path37 = __require("path");
18191
+ var path38 = __require("path");
18204
18192
  var childProcess3 = __require("child_process");
18205
18193
  var crossSpawn = require_cross_spawn();
18206
18194
  var stripFinalNewline = require_strip_final_newline();
@@ -18242,7 +18230,7 @@ var require_execa = __commonJS({
18242
18230
  };
18243
18231
  options.env = getEnv(options);
18244
18232
  options.stdio = normalizeStdio(options);
18245
- if (process.platform === "win32" && path37.basename(file, ".exe") === "cmd") {
18233
+ if (process.platform === "win32" && path38.basename(file, ".exe") === "cmd") {
18246
18234
  args.unshift("/q");
18247
18235
  }
18248
18236
  return { file, args, options, parsed };
@@ -25599,13 +25587,13 @@ var setTextNodeValue = (node, text) => {
25599
25587
  markNodeAsDirty(node);
25600
25588
  };
25601
25589
  var getPathToRoot = (node) => {
25602
- const path37 = [];
25590
+ const path38 = [];
25603
25591
  let current = node;
25604
25592
  while (current) {
25605
- path37.unshift(current);
25593
+ path38.unshift(current);
25606
25594
  current = current.parentNode;
25607
25595
  }
25608
- return path37;
25596
+ return path38;
25609
25597
  };
25610
25598
  var isNodeSelectable = (node) => {
25611
25599
  let current = node;
@@ -30083,8 +30071,8 @@ function Text({ color, backgroundColor, dimColor = false, bold = false, italic =
30083
30071
  }
30084
30072
 
30085
30073
  // node_modules/ink/build/components/ErrorOverview.js
30086
- var cleanupPath = (path37) => {
30087
- return path37?.replace(`file://${cwd()}/`, "");
30074
+ var cleanupPath = (path38) => {
30075
+ return path38?.replace(`file://${cwd()}/`, "");
30088
30076
  };
30089
30077
  var stackUtils = new import_stack_utils.default({
30090
30078
  cwd: cwd(),
@@ -31280,12 +31268,12 @@ var TerminalWriter = class {
31280
31268
  if (chunk) {
31281
31269
  this.synchronizedWrite(chunk);
31282
31270
  }
31283
- await new Promise((resolve8) => {
31271
+ await new Promise((resolve9) => {
31284
31272
  let finished = false;
31285
31273
  const timer = setTimeout(() => {
31286
31274
  finished = true;
31287
31275
  this.cancelSlowFlush = void 0;
31288
- resolve8();
31276
+ resolve9();
31289
31277
  }, 50);
31290
31278
  this.cancelSlowFlush = () => {
31291
31279
  if (!finished) {
@@ -31296,7 +31284,7 @@ var TerminalWriter = class {
31296
31284
  this.outputBuffer = [];
31297
31285
  }
31298
31286
  this.cancelSlowFlush = void 0;
31299
- resolve8();
31287
+ resolve9();
31300
31288
  }
31301
31289
  };
31302
31290
  });
@@ -31687,8 +31675,8 @@ var AnimationController = class {
31687
31675
  if (!this.isRunning) {
31688
31676
  return;
31689
31677
  }
31690
- return new Promise((resolve8) => {
31691
- this.idleResolvers.push(resolve8);
31678
+ return new Promise((resolve9) => {
31679
+ this.idleResolvers.push(resolve9);
31692
31680
  });
31693
31681
  }
31694
31682
  /**
@@ -31728,8 +31716,8 @@ var AnimationController = class {
31728
31716
  clearInterval(this.intervalId);
31729
31717
  this.intervalId = void 0;
31730
31718
  }
31731
- for (const resolve8 of this.idleResolvers) {
31732
- resolve8();
31719
+ for (const resolve9 of this.idleResolvers) {
31720
+ resolve9();
31733
31721
  }
31734
31722
  this.idleResolvers = [];
31735
31723
  }
@@ -33234,11 +33222,11 @@ var TerminalBuffer = class {
33234
33222
  if (!this.worker?.connected) {
33235
33223
  return 0;
33236
33224
  }
33237
- return new Promise((resolve8) => {
33225
+ return new Promise((resolve9) => {
33238
33226
  const handler2 = (message) => {
33239
33227
  if (message.type === "linesUpdated") {
33240
33228
  this.worker?.off("message", handler2);
33241
- resolve8(message.count);
33229
+ resolve9(message.count);
33242
33230
  }
33243
33231
  };
33244
33232
  this.worker?.on("message", handler2);
@@ -33247,7 +33235,7 @@ var TerminalBuffer = class {
33247
33235
  } catch (error) {
33248
33236
  this.worker?.off("message", handler2);
33249
33237
  console.error("Failed to send getLinesUpdated message to worker:", error);
33250
- resolve8(0);
33238
+ resolve9(0);
33251
33239
  }
33252
33240
  });
33253
33241
  }
@@ -33759,8 +33747,8 @@ var Ink = class {
33759
33747
  }
33760
33748
  }
33761
33749
  async waitUntilExit() {
33762
- this.exitPromise ||= new Promise((resolve8, reject) => {
33763
- this.resolveExitPromise = resolve8;
33750
+ this.exitPromise ||= new Promise((resolve9, reject) => {
33751
+ this.resolveExitPromise = resolve9;
33764
33752
  this.rejectExitPromise = reject;
33765
33753
  });
33766
33754
  return this.exitPromise;
@@ -34559,7 +34547,7 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
34559
34547
  process.on("exit", cleanupTerminalOnExit);
34560
34548
  process.on("SIGTERM", cleanupTerminalOnExit);
34561
34549
  process.on("SIGINT", cleanupTerminalOnExit);
34562
- return new Promise((resolve8) => {
34550
+ return new Promise((resolve9) => {
34563
34551
  const originalRawMode = process.stdin.isRaw;
34564
34552
  if (!originalRawMode) {
34565
34553
  process.stdin.setRawMode(true);
@@ -34580,7 +34568,7 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
34580
34568
  process.stdin.setRawMode(false);
34581
34569
  }
34582
34570
  this.detectionComplete = true;
34583
- resolve8();
34571
+ resolve9();
34584
34572
  };
34585
34573
  timeoutId = setTimeout(cleanup, 1e3);
34586
34574
  const onData = (data) => {
@@ -38973,7 +38961,6 @@ var ThemeManager = class {
38973
38961
  try {
38974
38962
  const theme2 = createCustomTheme(themeWithDefaults);
38975
38963
  this.extensionThemes.set(namespacedName, theme2);
38976
- debugLogger.log(`Registered theme: ${namespacedName}`);
38977
38964
  } catch (error) {
38978
38965
  debugLogger.warn(
38979
38966
  `Failed to load custom theme "${namespacedName}":`,
@@ -38999,7 +38986,6 @@ var ThemeManager = class {
38999
38986
  for (const theme2 of customThemes) {
39000
38987
  const namespacedName = `${theme2.name} (${extensionName})`;
39001
38988
  this.extensionThemes.delete(namespacedName);
39002
- debugLogger.log(`Unregistered theme: ${namespacedName}`);
39003
38989
  }
39004
38990
  }
39005
38991
  /**
@@ -39458,7 +39444,7 @@ var import_react34 = __toESM(require_react(), 1);
39458
39444
  function useIdeTrustListener() {
39459
39445
  const settings = useSettings();
39460
39446
  const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
39461
- IDEConnectionStatus.Disconnected
39447
+ "disconnected" /* Disconnected */
39462
39448
  );
39463
39449
  const previousTrust = (0, import_react34.useRef)(void 0);
39464
39450
  const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
@@ -39488,7 +39474,7 @@ function useIdeTrustListener() {
39488
39474
  };
39489
39475
  }, []);
39490
39476
  const getSnapshot = () => {
39491
- if (connectionStatus !== IDEConnectionStatus.Connected) {
39477
+ if (connectionStatus !== "connected" /* Connected */) {
39492
39478
  return void 0;
39493
39479
  }
39494
39480
  return ideContextStore.get()?.workspaceState?.isTrusted;
@@ -40193,7 +40179,7 @@ async function initializeApp(config, settings) {
40193
40179
  await ideClient.connect();
40194
40180
  logIdeConnection(
40195
40181
  config,
40196
- new IdeConnectionEvent(IdeConnectionType.START)
40182
+ new IdeConnectionEvent("start" /* START */)
40197
40183
  );
40198
40184
  }).catch((e) => {
40199
40185
  debugLogger.error("Failed to initialize IDE client:", e);
@@ -40211,16 +40197,16 @@ async function initializeApp(config, settings) {
40211
40197
  // packages/cli/src/config/auth.ts
40212
40198
  function validateAuthMethod(authMethod) {
40213
40199
  loadEnvironment(loadSettings().merged, process.cwd());
40214
- if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
40200
+ if (authMethod === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authMethod === "compute-default-credentials" /* COMPUTE_ADC */) {
40215
40201
  return null;
40216
40202
  }
40217
- if (authMethod === AuthType.USE_GEMINI) {
40203
+ if (authMethod === "gemini-api-key" /* USE_GEMINI */) {
40218
40204
  if (!process.env["GEMINI_API_KEY"]) {
40219
40205
  return "When using Gemini API, you must specify the GEMINI_API_KEY environment variable.\nUpdate your environment and try again (no reload needed if using .env)!";
40220
40206
  }
40221
40207
  return null;
40222
40208
  }
40223
- if (authMethod === AuthType.USE_VERTEX_AI) {
40209
+ if (authMethod === "vertex-ai" /* USE_VERTEX_AI */) {
40224
40210
  const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
40225
40211
  const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
40226
40212
  if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
@@ -40278,25 +40264,25 @@ async function promptForConsentNonInteractive(prompt, defaultValue = true) {
40278
40264
  input: process.stdin,
40279
40265
  output: process.stdout
40280
40266
  });
40281
- return new Promise((resolve8) => {
40267
+ return new Promise((resolve9) => {
40282
40268
  rl.question(prompt, (answer) => {
40283
40269
  rl.close();
40284
40270
  const trimmedAnswer = answer.trim().toLowerCase();
40285
40271
  if (trimmedAnswer === "") {
40286
- resolve8(defaultValue);
40272
+ resolve9(defaultValue);
40287
40273
  } else {
40288
- resolve8(["y", "yes"].includes(trimmedAnswer));
40274
+ resolve9(["y", "yes"].includes(trimmedAnswer));
40289
40275
  }
40290
40276
  });
40291
40277
  });
40292
40278
  }
40293
40279
  async function promptForConsentInteractive(prompt, addExtensionUpdateConfirmationRequest, clearConfirmationRequest) {
40294
- return new Promise((resolve8) => {
40280
+ return new Promise((resolve9) => {
40295
40281
  addExtensionUpdateConfirmationRequest({
40296
40282
  prompt,
40297
40283
  onConfirm: (resolvedConfirmed) => {
40298
40284
  clearConfirmationRequest?.();
40299
- setImmediate(() => resolve8(resolvedConfirmed));
40285
+ setImmediate(() => resolve9(resolvedConfirmed));
40300
40286
  }
40301
40287
  });
40302
40288
  });
@@ -40817,8 +40803,8 @@ var Override = class _Override {
40817
40803
  output() {
40818
40804
  return `${this.isDisable ? "!" : ""}${this.baseRule}${this.includeSubdirs ? "*" : ""}`;
40819
40805
  }
40820
- matchesPath(path37) {
40821
- return this.asRegex().test(path37);
40806
+ matchesPath(path38) {
40807
+ return this.asRegex().test(path38);
40822
40808
  }
40823
40809
  };
40824
40810
  var ensureLeadingAndTrailingSlash = function(dirPath) {
@@ -43959,7 +43945,7 @@ async function fetchJson(url, redirectCount = 0) {
43959
43945
  if (token) {
43960
43946
  headers.Authorization = `token ${token}`;
43961
43947
  }
43962
- return new Promise((resolve8, reject) => {
43948
+ return new Promise((resolve9, reject) => {
43963
43949
  https.get(url, { headers }, (res) => {
43964
43950
  if (res.statusCode === 302 || res.statusCode === 301) {
43965
43951
  if (redirectCount >= 10) {
@@ -43972,7 +43958,7 @@ async function fetchJson(url, redirectCount = 0) {
43972
43958
  fetchJson(
43973
43959
  new URL(res.headers.location, url).toString(),
43974
43960
  redirectCount + 1
43975
- ).then(resolve8).catch(reject);
43961
+ ).then(resolve9).catch(reject);
43976
43962
  return;
43977
43963
  }
43978
43964
  if (res.statusCode !== 200) {
@@ -43984,7 +43970,7 @@ async function fetchJson(url, redirectCount = 0) {
43984
43970
  res.on("data", (chunk) => chunks.push(chunk));
43985
43971
  res.on("end", () => {
43986
43972
  const data = Buffer.concat(chunks).toString();
43987
- resolve8(JSON.parse(data));
43973
+ resolve9(JSON.parse(data));
43988
43974
  });
43989
43975
  }).on("error", reject);
43990
43976
  });
@@ -44344,7 +44330,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44344
44330
  if (token) {
44345
44331
  headers["Authorization"] = `token ${token}`;
44346
44332
  }
44347
- return new Promise((resolve8, reject) => {
44333
+ return new Promise((resolve9, reject) => {
44348
44334
  https2.get(url, { headers }, (res) => {
44349
44335
  if (res.statusCode === 302 || res.statusCode === 301) {
44350
44336
  if (redirectCount >= 10) {
@@ -44355,7 +44341,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44355
44341
  new Error("Redirect response missing Location header")
44356
44342
  );
44357
44343
  }
44358
- 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);
44359
44345
  return;
44360
44346
  }
44361
44347
  if (res.statusCode !== 200) {
@@ -44365,7 +44351,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
44365
44351
  }
44366
44352
  const file = fs15.createWriteStream(dest);
44367
44353
  res.pipe(file);
44368
- file.on("finish", () => file.close(resolve8));
44354
+ file.on("finish", () => file.close(resolve9));
44369
44355
  }).on("error", reject);
44370
44356
  });
44371
44357
  }
@@ -44640,7 +44626,7 @@ var ExtensionManager = class extends ExtensionLoader {
44640
44626
  const trustedFolders = loadTrustedFolders();
44641
44627
  await trustedFolders.setValue(
44642
44628
  this.workspaceDir,
44643
- TrustLevel.TRUST_FOLDER
44629
+ "TRUST_FOLDER" /* TRUST_FOLDER */
44644
44630
  );
44645
44631
  } else {
44646
44632
  throw new Error(
@@ -44826,7 +44812,7 @@ Would you like to attempt to install via "git clone" instead?`
44826
44812
  newExtensionConfig.version,
44827
44813
  previousExtensionConfig.version,
44828
44814
  installMetadata.type,
44829
- CoreToolCallStatus.Success
44815
+ "success" /* Success */
44830
44816
  )
44831
44817
  );
44832
44818
  if (newExtensionName !== previousName) {
@@ -44849,7 +44835,7 @@ Would you like to attempt to install via "git clone" instead?`
44849
44835
  getExtensionId(newExtensionConfig, installMetadata),
44850
44836
  newExtensionConfig.version,
44851
44837
  installMetadata.type,
44852
- CoreToolCallStatus.Success
44838
+ "success" /* Success */
44853
44839
  )
44854
44840
  );
44855
44841
  await this.enableExtension(
@@ -44882,7 +44868,7 @@ Would you like to attempt to install via "git clone" instead?`
44882
44868
  newExtensionConfig?.version ?? "",
44883
44869
  previousExtensionConfig.version,
44884
44870
  installMetadata.type,
44885
- CoreToolCallStatus.Error
44871
+ "error" /* Error */
44886
44872
  )
44887
44873
  );
44888
44874
  } else {
@@ -44894,7 +44880,7 @@ Would you like to attempt to install via "git clone" instead?`
44894
44880
  extensionId ?? "",
44895
44881
  newExtensionConfig?.version ?? "",
44896
44882
  installMetadata.type,
44897
- CoreToolCallStatus.Error
44883
+ "error" /* Error */
44898
44884
  )
44899
44885
  );
44900
44886
  }
@@ -44925,7 +44911,7 @@ Would you like to attempt to install via "git clone" instead?`
44925
44911
  extension.name,
44926
44912
  hashValue(extension.name),
44927
44913
  extension.id,
44928
- CoreToolCallStatus.Success
44914
+ "success" /* Success */
44929
44915
  )
44930
44916
  );
44931
44917
  }
@@ -45195,7 +45181,7 @@ Would you like to attempt to install via "git clone" instead?`
45195
45181
  if (eventHooks) {
45196
45182
  for (const definition of eventHooks) {
45197
45183
  for (const hook of definition.hooks) {
45198
- if (hook.type === HookType.Command) {
45184
+ if (hook.type === "command" /* Command */) {
45199
45185
  hook.env = { ...hook.env, ...hookEnv };
45200
45186
  }
45201
45187
  }
@@ -45524,7 +45510,7 @@ function validateName(name) {
45524
45510
  }
45525
45511
  }
45526
45512
  async function inferInstallMetadata(source2, args = {}) {
45527
- if (source2.startsWith("http://") || source2.startsWith("https://") || source2.startsWith("git@") || source2.startsWith("sso://") || source2.startsWith("github:") || source2.startsWith("gitlab:")) {
45513
+ if (source2.startsWith("http://") || source2.startsWith("https://") || source2.startsWith("git@") || source2.startsWith("sso://") || source2.startsWith("github:") || source2.startsWith("gitlab:") || source2.startsWith("ssh://")) {
45528
45514
  return {
45529
45515
  source: source2,
45530
45516
  type: "git",
@@ -45846,9 +45832,9 @@ function isSettingsValue(value) {
45846
45832
  const type = typeof value;
45847
45833
  return type === "string" || type === "number" || type === "boolean" || type === "object";
45848
45834
  }
45849
- function getNestedValue(obj, path37) {
45835
+ function getNestedValue(obj, path38) {
45850
45836
  let current = obj;
45851
- for (const key of path37) {
45837
+ for (const key of path38) {
45852
45838
  if (!isRecord(current) || !(key in current)) {
45853
45839
  return void 0;
45854
45840
  }
@@ -45861,8 +45847,8 @@ function getEffectiveValue(key, settings) {
45861
45847
  if (!definition) {
45862
45848
  return void 0;
45863
45849
  }
45864
- const path37 = key.split(".");
45865
- const value = getNestedValue(settings, path37);
45850
+ const path38 = key.split(".");
45851
+ const value = getNestedValue(settings, path38);
45866
45852
  if (value !== void 0 && isSettingsValue(value)) {
45867
45853
  return value;
45868
45854
  }
@@ -45872,8 +45858,8 @@ function getDialogSettingKeys() {
45872
45858
  return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
45873
45859
  }
45874
45860
  function isInSettingsScope(key, scopeSettings) {
45875
- const path37 = key.split(".");
45876
- const value = getNestedValue(scopeSettings, path37);
45861
+ const path38 = key.split(".");
45862
+ const value = getNestedValue(scopeSettings, path38);
45877
45863
  return value !== void 0;
45878
45864
  }
45879
45865
  function getDisplayValue(key, scopeSettings, _mergedSettings) {
@@ -46227,7 +46213,7 @@ async function readMcpResources(resourceParts, config, signal) {
46227
46213
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
46228
46214
  name: `resources/read (${resource.serverName})`,
46229
46215
  description: resource.uri,
46230
- status: CoreToolCallStatus.Success,
46216
+ status: "success" /* Success */,
46231
46217
  isClientInitiated: true,
46232
46218
  resultDisplay: `Successfully read resource ${resource.uri}`,
46233
46219
  confirmationDetails: void 0
@@ -46242,7 +46228,7 @@ async function readMcpResources(resourceParts, config, signal) {
46242
46228
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
46243
46229
  name: `resources/read (${resource.serverName})`,
46244
46230
  description: resource.uri,
46245
- status: CoreToolCallStatus.Error,
46231
+ status: "error" /* Error */,
46246
46232
  isClientInitiated: true,
46247
46233
  resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
46248
46234
  confirmationDetails: void 0
@@ -46267,7 +46253,7 @@ Content from @${result.uri}:
46267
46253
  }
46268
46254
  if (hasError) {
46269
46255
  const firstError = displays.find(
46270
- (d) => d.status === CoreToolCallStatus.Error
46256
+ (d) => d.status === "error" /* Error */
46271
46257
  );
46272
46258
  return {
46273
46259
  parts: [],
@@ -46303,7 +46289,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
46303
46289
  callId: `client-read-${userMessageTimestamp}`,
46304
46290
  name: readManyFilesTool.displayName,
46305
46291
  description: invocation.getDescription(),
46306
- status: CoreToolCallStatus.Success,
46292
+ status: "success" /* Success */,
46307
46293
  isClientInitiated: true,
46308
46294
  resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
46309
46295
  confirmationDetails: void 0
@@ -46350,7 +46336,7 @@ Content from @${displayPath}:
46350
46336
  callId: `client-read-${userMessageTimestamp}`,
46351
46337
  name: readManyFilesTool.displayName,
46352
46338
  description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
46353
- status: CoreToolCallStatus.Error,
46339
+ status: "error" /* Error */,
46354
46340
  isClientInitiated: true,
46355
46341
  resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
46356
46342
  confirmationDetails: void 0
@@ -46938,7 +46924,7 @@ async function writeClipboardImages(filePaths) {
46938
46924
  if (process22.platform !== "darwin") {
46939
46925
  return;
46940
46926
  }
46941
- const paths = filePaths.map((path37) => path37 instanceof URL ? fileURLToPath2(path37) : path37);
46927
+ const paths = filePaths.map((path38) => path38 instanceof URL ? fileURLToPath2(path38) : path38);
46942
46928
  await runJxa((...paths2) => {
46943
46929
  ObjC.import("AppKit");
46944
46930
  ObjC.import("Foundation");
@@ -47441,7 +47427,7 @@ var OSC52_FOOTER = BEL3;
47441
47427
  var MAX_OSC52_BODY_B64_BYTES = MAX_OSC52_SEQUENCE_BYTES - Buffer.byteLength(OSC52_HEADER) - Buffer.byteLength(OSC52_FOOTER);
47442
47428
  var MAX_OSC52_DATA_BYTES = Math.floor(MAX_OSC52_BODY_B64_BYTES / 4) * 3;
47443
47429
  var SCREEN_DCS_CHUNK_SIZE = 240;
47444
- var pickTty = () => new Promise((resolve8) => {
47430
+ var pickTty = () => new Promise((resolve9) => {
47445
47431
  if (process.platform !== "win32") {
47446
47432
  try {
47447
47433
  const devTty = fs22.createWriteStream("/dev/tty");
@@ -47449,25 +47435,25 @@ var pickTty = () => new Promise((resolve8) => {
47449
47435
  devTty.removeAllListeners("open");
47450
47436
  devTty.removeAllListeners("error");
47451
47437
  devTty.destroy();
47452
- resolve8(getStdioTty());
47438
+ resolve9(getStdioTty());
47453
47439
  }, 100);
47454
47440
  devTty.once("open", () => {
47455
47441
  clearTimeout(timeout);
47456
47442
  devTty.removeAllListeners("error");
47457
47443
  devTty.on("error", () => {
47458
47444
  });
47459
- resolve8({ stream: devTty, closeAfter: true });
47445
+ resolve9({ stream: devTty, closeAfter: true });
47460
47446
  });
47461
47447
  devTty.once("error", () => {
47462
47448
  clearTimeout(timeout);
47463
47449
  devTty.removeAllListeners("open");
47464
- resolve8(getStdioTty());
47450
+ resolve9(getStdioTty());
47465
47451
  });
47466
47452
  return;
47467
47453
  } catch {
47468
47454
  }
47469
47455
  }
47470
- resolve8(getStdioTty());
47456
+ resolve9(getStdioTty());
47471
47457
  });
47472
47458
  var getStdioTty = () => {
47473
47459
  if (process.platform === "win32") {
@@ -47521,12 +47507,12 @@ var wrapForScreen = (seq) => {
47521
47507
  }
47522
47508
  return out;
47523
47509
  };
47524
- var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47510
+ var writeAll = (stream, data) => new Promise((resolve9, reject) => {
47525
47511
  const fd = stream.fd;
47526
47512
  if (process.platform === "win32" && typeof fd === "number" && (stream === process.stdout || stream === process.stderr)) {
47527
47513
  try {
47528
47514
  fs22.writeSync(fd, data);
47529
- resolve8();
47515
+ resolve9();
47530
47516
  return;
47531
47517
  } catch (e) {
47532
47518
  debugLogger.warn(
@@ -47541,7 +47527,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47541
47527
  };
47542
47528
  const onDrain = () => {
47543
47529
  cleanup();
47544
- resolve8();
47530
+ resolve9();
47545
47531
  };
47546
47532
  const cleanup = () => {
47547
47533
  stream.off("error", onError);
@@ -47550,7 +47536,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
47550
47536
  stream.once("error", onError);
47551
47537
  if (stream.write(data)) {
47552
47538
  cleanup();
47553
- resolve8();
47539
+ resolve9();
47554
47540
  } else {
47555
47541
  stream.once("drain", onDrain);
47556
47542
  }
@@ -47680,14 +47666,14 @@ function getUserLinuxClipboardTool() {
47680
47666
  }
47681
47667
  }
47682
47668
  async function saveFromCommand(command, args, destination) {
47683
- return new Promise((resolve8) => {
47669
+ return new Promise((resolve9) => {
47684
47670
  const child = spawn(command, args);
47685
47671
  const fileStream = createWriteStream2(destination);
47686
47672
  let resolved = false;
47687
47673
  const safeResolve = (value) => {
47688
47674
  if (!resolved) {
47689
47675
  resolved = true;
47690
- resolve8(value);
47676
+ resolve9(value);
47691
47677
  }
47692
47678
  };
47693
47679
  child.stdout.pipe(fileStream);
@@ -49545,7 +49531,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49545
49531
  throw err;
49546
49532
  }
49547
49533
  } else {
49548
- await new Promise((resolve8, reject) => {
49534
+ await new Promise((resolve9, reject) => {
49549
49535
  const child = spawn2(executable, [...initialArgs, ...args], {
49550
49536
  stdio: "inherit",
49551
49537
  shell: process.platform === "win32"
@@ -49570,7 +49556,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49570
49556
  );
49571
49557
  reject(err);
49572
49558
  } else {
49573
- resolve8();
49559
+ resolve9();
49574
49560
  }
49575
49561
  });
49576
49562
  });
@@ -49579,7 +49565,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49579
49565
  if (wasRaw) {
49580
49566
  setRawMode?.(true);
49581
49567
  }
49582
- coreEvents.emit(CoreEvent.ExternalEditorClosed);
49568
+ coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
49583
49569
  }
49584
49570
  }
49585
49571
 
@@ -52269,7 +52255,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
52269
52255
  extension.name,
52270
52256
  installMetadata
52271
52257
  );
52272
- if (status === IntegrityDataStatus.INVALID) {
52258
+ if (status === "invalid" /* INVALID */) {
52273
52259
  throw new Error("Extension integrity cannot be verified");
52274
52260
  }
52275
52261
  } catch (e) {
@@ -53687,11 +53673,11 @@ var ShellProcessor = class {
53687
53673
  },
53688
53674
  void 0
53689
53675
  );
53690
- if (decision === PolicyDecision.DENY) {
53676
+ if (decision === "deny" /* DENY */) {
53691
53677
  throw new Error(
53692
53678
  `${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
53693
53679
  );
53694
- } else if (decision === PolicyDecision.ASK_USER) {
53680
+ } else if (decision === "ask_user" /* ASK_USER */) {
53695
53681
  commandsToConfirm.add(command);
53696
53682
  }
53697
53683
  }
@@ -53948,14 +53934,17 @@ var FileCommandLoader = class {
53948
53934
  getCommandDirectories() {
53949
53935
  const dirs = [];
53950
53936
  const storage = this.config?.storage ?? new Storage(this.projectRoot);
53937
+ const userCommandsDir = Storage.getUserCommandsDir();
53951
53938
  dirs.push({
53952
- path: Storage.getUserCommandsDir(),
53939
+ path: userCommandsDir,
53953
53940
  kind: "user-file" /* USER_FILE */
53954
53941
  });
53955
- dirs.push({
53956
- path: storage.getProjectCommandsDir(),
53957
- kind: "workspace-file" /* WORKSPACE_FILE */
53958
- });
53942
+ if (!storage.isWorkspaceHomeDir()) {
53943
+ dirs.push({
53944
+ path: storage.getProjectCommandsDir(),
53945
+ kind: "workspace-file" /* WORKSPACE_FILE */
53946
+ });
53947
+ }
53959
53948
  if (this.config) {
53960
53949
  const activeExtensions = this.config.getExtensions().filter((ext) => ext.isActive).sort((a, b2) => a.name.localeCompare(b2.name));
53961
53950
  const extensionCommandDirs = activeExtensions.map((ext) => ({
@@ -54806,7 +54795,7 @@ var MultiFolderTrustDialog = ({
54806
54795
  if (choice === 1 /* YES_AND_REMEMBER */) {
54807
54796
  await trustedFolders.setValue(
54808
54797
  expandedPath,
54809
- TrustLevel.TRUST_FOLDER
54798
+ "TRUST_FOLDER" /* TRUST_FOLDER */
54810
54799
  );
54811
54800
  }
54812
54801
  workspaceContext.addDirectory(expandedPath);
@@ -55960,10 +55949,10 @@ function enableFeature(settings, featureName, strategy) {
55960
55949
  };
55961
55950
  }
55962
55951
  const modifiedScopes = [];
55963
- for (const { scope, path: path37 } of foundInDisabledScopes) {
55952
+ for (const { scope, path: path38 } of foundInDisabledScopes) {
55964
55953
  if (isLoadableSettingScope(scope)) {
55965
55954
  strategy.enable(settings, scope, featureName);
55966
- modifiedScopes.push({ scope, path: path37 });
55955
+ modifiedScopes.push({ scope, path: path38 });
55967
55956
  }
55968
55957
  }
55969
55958
  return {
@@ -56454,7 +56443,7 @@ var authCommand = {
56454
56443
  import process28 from "node:process";
56455
56444
 
56456
56445
  // packages/cli/src/generated/git-commit.ts
56457
- var GIT_COMMIT_INFO = "8db727552";
56446
+ var GIT_COMMIT_INFO = "022e8baef";
56458
56447
 
56459
56448
  // packages/cli/src/ui/utils/historyExportUtils.ts
56460
56449
  import * as fsPromises from "node:fs/promises";
@@ -57100,7 +57089,7 @@ var clearCommand = {
57100
57089
  const config = context.services.agentContext?.config;
57101
57090
  const hookSystem = config?.getHookSystem();
57102
57091
  if (hookSystem) {
57103
- await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
57092
+ await hookSystem.fireSessionEndEvent("clear" /* Clear */);
57104
57093
  }
57105
57094
  config?.injectionService.clear();
57106
57095
  let newSessionId;
@@ -57117,9 +57106,9 @@ var clearCommand = {
57117
57106
  }
57118
57107
  let result;
57119
57108
  if (hookSystem) {
57120
- result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
57109
+ result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
57121
57110
  }
57122
- await new Promise((resolve8) => setImmediate(resolve8));
57111
+ await new Promise((resolve9) => setImmediate(resolve9));
57123
57112
  if (config) {
57124
57113
  await flushTelemetry(config);
57125
57114
  }
@@ -57393,10 +57382,85 @@ ${docsUrl}`
57393
57382
  }
57394
57383
  };
57395
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
+
57396
57460
  // packages/cli/src/ui/commands/directoryCommand.tsx
57397
57461
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
57398
- import * as path27 from "node:path";
57399
- import * as fs30 from "node:fs";
57462
+ import * as path28 from "node:path";
57463
+ import * as fs31 from "node:fs";
57400
57464
  async function finishAddingDirectories(config, addItem, added, errors) {
57401
57465
  if (!config) {
57402
57466
  addItem({
@@ -57464,15 +57528,15 @@ var directoryCommand = {
57464
57528
  if (context.services.agentContext?.config) {
57465
57529
  const workspaceContext = context.services.agentContext.config.getWorkspaceContext();
57466
57530
  const existingDirs = new Set(
57467
- workspaceContext.getDirectories().map((dir) => path27.resolve(dir))
57531
+ workspaceContext.getDirectories().map((dir) => path28.resolve(dir))
57468
57532
  );
57469
57533
  filteredSuggestions = suggestions.filter((s3) => {
57470
57534
  const expanded = expandHomeDir(s3);
57471
- const absolute = path27.resolve(expanded);
57535
+ const absolute = path28.resolve(expanded);
57472
57536
  if (existingDirs.has(absolute)) {
57473
57537
  return false;
57474
57538
  }
57475
- if (absolute.endsWith(path27.sep) && existingDirs.has(absolute.slice(0, -1))) {
57539
+ if (absolute.endsWith(path28.sep) && existingDirs.has(absolute.slice(0, -1))) {
57476
57540
  return false;
57477
57541
  }
57478
57542
  return true;
@@ -57522,11 +57586,11 @@ var directoryCommand = {
57522
57586
  const trimmedPath = pathToAdd.trim();
57523
57587
  const expandedPath = expandHomeDir(trimmedPath);
57524
57588
  try {
57525
- const absolutePath = path27.resolve(
57589
+ const absolutePath = path28.resolve(
57526
57590
  workspaceContext.targetDir,
57527
57591
  expandedPath
57528
57592
  );
57529
- const resolvedPath = fs30.realpathSync(absolutePath);
57593
+ const resolvedPath = fs31.realpathSync(absolutePath);
57530
57594
  if (currentWorkspaceDirs.includes(resolvedPath)) {
57531
57595
  alreadyAdded.push(trimmedPath);
57532
57596
  continue;
@@ -57552,7 +57616,7 @@ var directoryCommand = {
57552
57616
  const dirsToConfirm = [];
57553
57617
  const trustedDirs = [];
57554
57618
  for (const pathToAdd of pathsToProcess) {
57555
- const expandedPath = path27.resolve(expandHomeDir(pathToAdd.trim()));
57619
+ const expandedPath = path28.resolve(expandHomeDir(pathToAdd.trim()));
57556
57620
  const isTrusted = trustedFolders.isPathTrusted(expandedPath);
57557
57621
  if (isTrusted === true) {
57558
57622
  trustedDirs.push(pathToAdd.trim());
@@ -57773,14 +57837,14 @@ var ConfigExtensionDialog = ({
57773
57837
  [loggerAdapter]
57774
57838
  );
57775
57839
  const requestSetting = (0, import_react62.useCallback)(
57776
- async (setting) => new Promise((resolve8) => {
57840
+ async (setting) => new Promise((resolve9) => {
57777
57841
  if (!mounted.current) return;
57778
57842
  settingBuffer.setText("");
57779
57843
  setState({
57780
57844
  type: "ASK_SETTING",
57781
57845
  setting,
57782
57846
  resolve: (val) => {
57783
- resolve8(val);
57847
+ resolve9(val);
57784
57848
  setState({ type: "BUSY", message: "Updating..." });
57785
57849
  }
57786
57850
  });
@@ -57788,13 +57852,13 @@ var ConfigExtensionDialog = ({
57788
57852
  [settingBuffer]
57789
57853
  );
57790
57854
  const requestConfirmation = (0, import_react62.useCallback)(
57791
- async (message) => new Promise((resolve8) => {
57855
+ async (message) => new Promise((resolve9) => {
57792
57856
  if (!mounted.current) return;
57793
57857
  setState({
57794
57858
  type: "ASK_CONFIRMATION",
57795
57859
  message,
57796
57860
  resolve: (val) => {
57797
- resolve8(val);
57861
+ resolve9(val);
57798
57862
  setState({ type: "BUSY", message: "Processing..." });
57799
57863
  }
57800
57864
  });
@@ -58131,7 +58195,7 @@ function SearchableList({
58131
58195
  var import_react64 = __toESM(require_react(), 1);
58132
58196
 
58133
58197
  // packages/cli/src/config/extensionRegistryClient.ts
58134
- import * as fs31 from "node:fs/promises";
58198
+ import * as fs32 from "node:fs/promises";
58135
58199
  var ExtensionRegistryClient = class _ExtensionRegistryClient {
58136
58200
  static DEFAULT_REGISTRY_URL = "https://geminicli.com/extensions.json";
58137
58201
  static FETCH_TIMEOUT_MS = 1e4;
@@ -58209,7 +58273,7 @@ var ExtensionRegistryClient = class _ExtensionRegistryClient {
58209
58273
  return await response.json();
58210
58274
  } else {
58211
58275
  const filePath = resolveToRealPath(uri);
58212
- const content = await fs31.readFile(filePath, "utf-8");
58276
+ const content = await fs32.readFile(filePath, "utf-8");
58213
58277
  return JSON.parse(content);
58214
58278
  }
58215
58279
  } catch (error) {
@@ -58380,8 +58444,8 @@ function ExtensionDetails({
58380
58444
  if (keyMatchers["basic.confirm" /* RETURN */](key) && !isInstalled && !isInstalling) {
58381
58445
  setIsInstalling(true);
58382
58446
  void onInstall(
58383
- (prompt) => new Promise((resolve8) => {
58384
- setConsentRequest({ prompt, resolve: resolve8 });
58447
+ (prompt) => new Promise((resolve9) => {
58448
+ setConsentRequest({ prompt, resolve: resolve9 });
58385
58449
  })
58386
58450
  );
58387
58451
  return true;
@@ -58389,8 +58453,8 @@ function ExtensionDetails({
58389
58453
  if (keyMatchers["extension.link" /* LINK_EXTENSION */](key) && isLinkable && !isInstalled && !isInstalling) {
58390
58454
  setIsInstalling(true);
58391
58455
  void onLink(
58392
- (prompt) => new Promise((resolve8) => {
58393
- setConsentRequest({ prompt, resolve: resolve8 });
58456
+ (prompt) => new Promise((resolve9) => {
58457
+ setConsentRequest({ prompt, resolve: resolve9 });
58394
58458
  })
58395
58459
  );
58396
58460
  return true;
@@ -58794,7 +58858,7 @@ function updateAction(context, args) {
58794
58858
  }
58795
58859
  let resolveUpdateComplete;
58796
58860
  const updateComplete = new Promise(
58797
- (resolve8) => resolveUpdateComplete = resolve8
58861
+ (resolve9) => resolveUpdateComplete = resolve9
58798
58862
  );
58799
58863
  const extensions = context.services.agentContext?.config ? listExtensions(context.services.agentContext.config) : [];
58800
58864
  if (showMessageIfNoExtensions(context, extensions)) {
@@ -59503,6 +59567,7 @@ var ConsoleSummaryDisplay = ({
59503
59567
 
59504
59568
  // packages/cli/src/ui/components/Footer.tsx
59505
59569
  import process33 from "node:process";
59570
+ import os7 from "node:os";
59506
59571
 
59507
59572
  // packages/cli/src/ui/components/MemoryUsageDisplay.tsx
59508
59573
  var import_react69 = __toESM(require_react(), 1);
@@ -59673,6 +59738,11 @@ var ALL_ITEMS = [
59673
59738
  header: "session",
59674
59739
  description: "Unique identifier for the current session"
59675
59740
  },
59741
+ {
59742
+ id: "hostname",
59743
+ header: "machine",
59744
+ description: "Current machine hostname"
59745
+ },
59676
59746
  {
59677
59747
  id: "auth",
59678
59748
  header: "/auth",
@@ -59698,6 +59768,7 @@ var DEFAULT_ORDER = [
59698
59768
  "quota",
59699
59769
  "memory-usage",
59700
59770
  "session-id",
59771
+ "hostname",
59701
59772
  "auth",
59702
59773
  "code-changes",
59703
59774
  "token-count"
@@ -59746,6 +59817,7 @@ function resolveFooterState(settings) {
59746
59817
 
59747
59818
  // packages/cli/src/ui/components/Footer.tsx
59748
59819
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
59820
+ var HOSTNAME = os7.hostname();
59749
59821
  var CwdIndicator = ({
59750
59822
  targetDir,
59751
59823
  maxWidth,
@@ -60021,10 +60093,19 @@ var Footer = () => {
60021
60093
  );
60022
60094
  break;
60023
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
+ }
60024
60105
  case "auth": {
60025
60106
  if (!settings.merged.ui.showUserIdentity) break;
60026
60107
  if (!authType) break;
60027
- const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
60108
+ const displayStr = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? email ?? "google" : authType;
60028
60109
  addCol(
60029
60110
  id,
60030
60111
  header,
@@ -60298,6 +60379,7 @@ var FooterConfigDialog = ({
60298
60379
  quota: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("quota", itemColor), children: "42% used" }),
60299
60380
  "memory-usage": /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("memory-usage", itemColor), children: "260 MB" }),
60300
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" }),
60301
60383
  "code-changes": /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { flexDirection: "row", children: [
60302
60384
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes", theme.status.success), children: "+12" }),
60303
60385
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes"), children: " " }),
@@ -60467,7 +60549,7 @@ var import_react74 = __toESM(require_react(), 1);
60467
60549
  var import_react72 = __toESM(require_react(), 1);
60468
60550
 
60469
60551
  // packages/cli/src/ui/utils/rewindFileOps.ts
60470
- import fs32 from "node:fs/promises";
60552
+ import fs33 from "node:fs/promises";
60471
60553
  function calculateTurnStats(conversation, userMessage) {
60472
60554
  const msgIndex = conversation.messages.indexOf(userMessage);
60473
60555
  if (msgIndex === -1) return null;
@@ -60554,7 +60636,7 @@ async function revertFileChanges(conversation, targetMessageId) {
60554
60636
  try {
60555
60637
  let currentContent = null;
60556
60638
  try {
60557
- currentContent = await fs32.readFile(filePath, "utf8");
60639
+ currentContent = await fs33.readFile(filePath, "utf8");
60558
60640
  } catch (e) {
60559
60641
  const error = e;
60560
60642
  if ("code" in error && error.code === "ENOENT") {
@@ -60572,9 +60654,9 @@ async function revertFileChanges(conversation, targetMessageId) {
60572
60654
  }
60573
60655
  if (currentContent === newContent) {
60574
60656
  if (!isNewFile2) {
60575
- await fs32.writeFile(filePath, originalContent ?? "");
60657
+ await fs33.writeFile(filePath, originalContent ?? "");
60576
60658
  } else {
60577
- await fs32.unlink(filePath);
60659
+ await fs33.unlink(filePath);
60578
60660
  }
60579
60661
  } else if (currentContent !== null) {
60580
60662
  const originalText = originalContent ?? "";
@@ -60586,9 +60668,9 @@ async function revertFileChanges(conversation, targetMessageId) {
60586
60668
  const patchedContent = applyPatch(currentContent, undoPatch);
60587
60669
  if (typeof patchedContent === "string") {
60588
60670
  if (patchedContent === "" && isNewFile2) {
60589
- await fs32.unlink(filePath);
60671
+ await fs33.unlink(filePath);
60590
60672
  } else {
60591
- await fs32.writeFile(filePath, patchedContent);
60673
+ await fs33.writeFile(filePath, patchedContent);
60592
60674
  }
60593
60675
  } else {
60594
60676
  coreEvents.emitFeedback(
@@ -61224,14 +61306,14 @@ function enableHook(settings, hookName) {
61224
61306
  }
61225
61307
  const modifiedScopes = [];
61226
61308
  try {
61227
- for (const { scope, path: path37 } of foundInDisabledScopes) {
61309
+ for (const { scope, path: path38 } of foundInDisabledScopes) {
61228
61310
  if (isLoadableSettingScope(scope)) {
61229
61311
  const currentScopeDisabled = settings.forScope(scope).settings.hooksConfig?.disabled ?? [];
61230
61312
  const newDisabled = currentScopeDisabled.filter(
61231
61313
  (name) => name !== hookName
61232
61314
  );
61233
61315
  settings.setValue(scope, "hooksConfig.disabled", newDisabled);
61234
- modifiedScopes.push({ scope, path: path37 });
61316
+ modifiedScopes.push({ scope, path: path38 });
61235
61317
  }
61236
61318
  }
61237
61319
  } catch (error) {
@@ -61526,7 +61608,7 @@ async function enableAction3(context, args) {
61526
61608
  }
61527
61609
  const feedback = renderHookActionFeedback(
61528
61610
  result,
61529
- (label, path37) => `${label} (${path37})`
61611
+ (label, path38) => `${label} (${path38})`
61530
61612
  );
61531
61613
  return {
61532
61614
  type: "message",
@@ -61568,7 +61650,7 @@ async function disableAction3(context, args) {
61568
61650
  }
61569
61651
  const feedback = renderHookActionFeedback(
61570
61652
  result,
61571
- (label, path37) => `${label} (${path37})`
61653
+ (label, path38) => `${label} (${path38})`
61572
61654
  );
61573
61655
  return {
61574
61656
  type: "message",
@@ -61767,16 +61849,16 @@ var hooksCommand = {
61767
61849
  };
61768
61850
 
61769
61851
  // packages/cli/src/ui/commands/ideCommand.ts
61770
- import path28 from "node:path";
61852
+ import path29 from "node:path";
61771
61853
  function getIdeStatusMessage(ideClient) {
61772
61854
  const connection = ideClient.getConnectionStatus();
61773
61855
  switch (connection.status) {
61774
- case IDEConnectionStatus.Connected:
61856
+ case "connected" /* Connected */:
61775
61857
  return {
61776
61858
  messageType: "info",
61777
61859
  content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
61778
61860
  };
61779
- case IDEConnectionStatus.Connecting:
61861
+ case "connecting" /* Connecting */:
61780
61862
  return {
61781
61863
  messageType: "info",
61782
61864
  content: `\u{1F7E1} Connecting...`
@@ -61796,13 +61878,13 @@ function getIdeStatusMessage(ideClient) {
61796
61878
  function formatFileList(openFiles) {
61797
61879
  const basenameCounts = /* @__PURE__ */ new Map();
61798
61880
  for (const file of openFiles) {
61799
- const basename6 = path28.basename(file.path);
61881
+ const basename6 = path29.basename(file.path);
61800
61882
  basenameCounts.set(basename6, (basenameCounts.get(basename6) || 0) + 1);
61801
61883
  }
61802
61884
  const fileList = openFiles.map((file) => {
61803
- const basename6 = path28.basename(file.path);
61885
+ const basename6 = path29.basename(file.path);
61804
61886
  const isDuplicate = (basenameCounts.get(basename6) || 0) > 1;
61805
- const parentDir = path28.basename(path28.dirname(file.path));
61887
+ const parentDir = path29.basename(path29.dirname(file.path));
61806
61888
  const displayName = isDuplicate ? `${basename6} (/${parentDir})` : basename6;
61807
61889
  return ` - ${displayName}${file.isActive ? " (active)" : ""}`;
61808
61890
  }).join("\n");
@@ -61817,7 +61899,7 @@ ${infoMessage}`;
61817
61899
  async function getIdeStatusMessageWithFiles(ideClient) {
61818
61900
  const connection = ideClient.getConnectionStatus();
61819
61901
  switch (connection.status) {
61820
- case IDEConnectionStatus.Connected: {
61902
+ case "connected" /* Connected */: {
61821
61903
  let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
61822
61904
  const context = ideContextStore.get();
61823
61905
  const openFiles = context?.workspaceState?.openFiles;
@@ -61829,7 +61911,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
61829
61911
  content
61830
61912
  };
61831
61913
  }
61832
- case IDEConnectionStatus.Connecting:
61914
+ case "connecting" /* Connecting */:
61833
61915
  return {
61834
61916
  messageType: "info",
61835
61917
  content: `\u{1F7E1} Connecting...`
@@ -61851,7 +61933,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
61851
61933
  const ideClient = await IdeClient.getInstance();
61852
61934
  if (value) {
61853
61935
  await ideClient.connect(options);
61854
- logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
61936
+ logIdeConnection(config, new IdeConnectionEvent("session" /* SESSION */));
61855
61937
  } else {
61856
61938
  await ideClient.disconnect();
61857
61939
  }
@@ -61939,10 +62021,10 @@ var ideCommand = async () => {
61939
62021
  logToConsole: false
61940
62022
  }
61941
62023
  );
61942
- if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
62024
+ if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
61943
62025
  break;
61944
62026
  }
61945
- await new Promise((resolve8) => setTimeout(resolve8, 500));
62027
+ await new Promise((resolve9) => setTimeout(resolve9, 500));
61946
62028
  }
61947
62029
  const { messageType, content } = getIdeStatusMessage(ideClient);
61948
62030
  if (messageType === "error") {
@@ -62016,7 +62098,7 @@ var ideCommand = async () => {
62016
62098
  }
62017
62099
  };
62018
62100
  const { status } = ideClient.getConnectionStatus();
62019
- const isConnected = status === IDEConnectionStatus.Connected;
62101
+ const isConnected = status === "connected" /* Connected */;
62020
62102
  if (isConnected) {
62021
62103
  ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
62022
62104
  } else {
@@ -62030,8 +62112,8 @@ var ideCommand = async () => {
62030
62112
  };
62031
62113
 
62032
62114
  // packages/cli/src/ui/commands/initCommand.ts
62033
- import * as fs33 from "node:fs";
62034
- import * as path29 from "node:path";
62115
+ import * as fs34 from "node:fs";
62116
+ import * as path30 from "node:path";
62035
62117
  var initCommand = {
62036
62118
  name: "init",
62037
62119
  description: "Analyzes the project and creates a tailored GEMINI.md file",
@@ -62046,10 +62128,10 @@ var initCommand = {
62046
62128
  };
62047
62129
  }
62048
62130
  const targetDir = context.services.agentContext.config.getTargetDir();
62049
- const geminiMdPath = path29.join(targetDir, "GEMINI.md");
62050
- const result = performInit(fs33.existsSync(geminiMdPath));
62131
+ const geminiMdPath = path30.join(targetDir, "GEMINI.md");
62132
+ const result = performInit(fs34.existsSync(geminiMdPath));
62051
62133
  if (result.type === "submit_prompt") {
62052
- fs33.writeFileSync(geminiMdPath, "", "utf8");
62134
+ fs34.writeFileSync(geminiMdPath, "", "utf8");
62053
62135
  context.ui.addItem(
62054
62136
  {
62055
62137
  type: "info",
@@ -62116,13 +62198,13 @@ Use /mcp auth <server-name> to authenticate.`
62116
62198
  const displayListener = (message) => {
62117
62199
  context.ui.addItem({ type: "info", text: message });
62118
62200
  };
62119
- coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
62201
+ coreEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
62120
62202
  try {
62121
62203
  context.ui.addItem({
62122
62204
  type: "info",
62123
62205
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
62124
62206
  });
62125
- const { MCPOAuthProvider } = await import("./dist-D7FZVGG3.js");
62207
+ const { MCPOAuthProvider } = await import("./core-ERSGIOMQ.js");
62126
62208
  let oauthConfig = server.oauth;
62127
62209
  if (!oauthConfig) {
62128
62210
  oauthConfig = { enabled: false };
@@ -62159,7 +62241,7 @@ Use /mcp auth <server-name> to authenticate.`
62159
62241
  content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
62160
62242
  };
62161
62243
  } finally {
62162
- coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
62244
+ coreEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
62163
62245
  }
62164
62246
  },
62165
62247
  completion: async (context, partialArg) => {
@@ -62205,10 +62287,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
62205
62287
  }
62206
62288
  const serverNames = Object.keys(mcpServers);
62207
62289
  const connectingServers = serverNames.filter(
62208
- (name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
62290
+ (name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
62209
62291
  );
62210
62292
  const discoveryState = getMCPDiscoveryState();
62211
- const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
62293
+ const discoveryInProgress = discoveryState === "in_progress" /* IN_PROGRESS */ || connectingServers.length > 0;
62212
62294
  const allTools = toolRegistry.getAllTools();
62213
62295
  const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
62214
62296
  const promptRegistry = config.getPromptRegistry();
@@ -62490,7 +62572,7 @@ var import_react81 = __toESM(require_react(), 1);
62490
62572
 
62491
62573
  // packages/cli/src/ui/components/InboxDialog.tsx
62492
62574
  var import_react80 = __toESM(require_react(), 1);
62493
- import * as path31 from "node:path";
62575
+ import * as path32 from "node:path";
62494
62576
 
62495
62577
  // packages/cli/src/ui/components/messages/DiffRenderer.tsx
62496
62578
  var import_react79 = __toESM(require_react(), 1);
@@ -76288,10 +76370,10 @@ function colorizeCode({
76288
76370
  }
76289
76371
 
76290
76372
  // packages/cli/src/ui/utils/fileUtils.ts
76291
- import * as path30 from "node:path";
76373
+ import * as path31 from "node:path";
76292
76374
  function getFileExtension(filename) {
76293
76375
  if (!filename) return null;
76294
- const ext = path30.extname(filename);
76376
+ const ext = path31.extname(filename);
76295
76377
  return ext ? ext.slice(1) : null;
76296
76378
  }
76297
76379
 
@@ -76654,11 +76736,11 @@ var MEMORY_PATCH_ACTION_CHOICES = [
76654
76736
  }
76655
76737
  ];
76656
76738
  function normalizePathForUi(filePath) {
76657
- return path31.posix.normalize(filePath.replaceAll("\\", "/"));
76739
+ return path32.posix.normalize(filePath.replaceAll("\\", "/"));
76658
76740
  }
76659
76741
  function getPathBasename(filePath) {
76660
76742
  const normalizedPath = normalizePathForUi(filePath);
76661
- const basename6 = path31.posix.basename(normalizedPath);
76743
+ const basename6 = path32.posix.basename(normalizedPath);
76662
76744
  return basename6 === "." ? filePath : basename6;
76663
76745
  }
76664
76746
  function formatMemoryPatchSummary(patch) {
@@ -77615,97 +77697,62 @@ var InboxDialog = ({
77615
77697
  };
77616
77698
 
77617
77699
  // packages/cli/src/ui/commands/memoryCommand.ts
77618
- var memoryCommand = {
77619
- name: "memory",
77620
- 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",
77621
77721
  kind: "built-in" /* BUILT_IN */,
77622
77722
  autoExecute: false,
77623
- subCommands: [
77624
- {
77625
- name: "show",
77626
- description: "Show the current memory contents",
77627
- kind: "built-in" /* BUILT_IN */,
77628
- autoExecute: true,
77629
- action: async (context) => {
77630
- const config = context.services.agentContext?.config;
77631
- if (!config) return;
77632
- const result = showMemory(config);
77633
- context.ui.addItem(
77634
- {
77635
- type: "info" /* INFO */,
77636
- text: result.content
77637
- },
77638
- Date.now()
77639
- );
77640
- }
77641
- },
77642
- {
77643
- name: "add",
77644
- description: "Add content to the memory",
77645
- kind: "built-in" /* BUILT_IN */,
77646
- autoExecute: false,
77647
- action: (context, args) => {
77648
- const result = addMemory(args);
77649
- if (result.type === "message") {
77650
- return result;
77651
- }
77652
- context.ui.addItem(
77653
- {
77654
- type: "info" /* INFO */,
77655
- text: `Attempting to save to memory: "${args.trim()}"`
77656
- },
77657
- Date.now()
77658
- );
77659
- return result;
77660
- }
77661
- },
77662
- {
77663
- name: "reload",
77664
- altNames: ["refresh"],
77665
- description: "Reload the memory from the source",
77666
- kind: "built-in" /* BUILT_IN */,
77667
- autoExecute: true,
77668
- action: async (context) => {
77669
- context.ui.addItem(
77670
- {
77671
- type: "info" /* INFO */,
77672
- text: "Reloading memory from source files..."
77673
- },
77674
- Date.now()
77675
- );
77676
- try {
77677
- const config = context.services.agentContext?.config;
77678
- if (config) {
77679
- const result = await refreshMemory(config);
77680
- context.ui.addItem(
77681
- {
77682
- type: "info" /* INFO */,
77683
- text: result.content
77684
- },
77685
- Date.now()
77686
- );
77687
- }
77688
- } catch (error) {
77689
- context.ui.addItem(
77690
- {
77691
- type: "error" /* ERROR */,
77692
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
77693
- text: `Error reloading memory: ${error.message}`
77694
- },
77695
- Date.now()
77696
- );
77697
- }
77698
- }
77699
- },
77700
- {
77701
- name: "list",
77702
- description: "Lists the paths of the GEMINI.md files in use",
77703
- kind: "built-in" /* BUILT_IN */,
77704
- autoExecute: true,
77705
- action: async (context) => {
77706
- const config = context.services.agentContext?.config;
77707
- if (!config) return;
77708
- const result = listMemoryFiles(config);
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);
77709
77756
  context.ui.addItem(
77710
77757
  {
77711
77758
  type: "info" /* INFO */,
@@ -77714,45 +77761,89 @@ var memoryCommand = {
77714
77761
  Date.now()
77715
77762
  );
77716
77763
  }
77717
- },
77718
- {
77719
- name: "inbox",
77720
- description: "Review skills extracted from past sessions and move them to global or project skills",
77721
- kind: "built-in" /* BUILT_IN */,
77722
- autoExecute: true,
77723
- action: (context) => {
77724
- const config = context.services.agentContext?.config;
77725
- if (!config) {
77726
- return {
77727
- type: "message",
77728
- messageType: "error",
77729
- content: "Config not loaded."
77730
- };
77731
- }
77732
- if (!config.isAutoMemoryEnabled()) {
77733
- return {
77734
- type: "message",
77735
- messageType: "info",
77736
- content: "The memory inbox requires Auto Memory. Enable it with: experimental.autoMemory = true in settings."
77737
- };
77738
- }
77739
- return {
77740
- type: "custom_dialog",
77741
- component: import_react81.default.createElement(InboxDialog, {
77742
- config,
77743
- onClose: () => context.ui.removeComponent(),
77744
- onReloadSkills: async () => {
77745
- await config.reloadSkills();
77746
- context.ui.reloadCommands();
77747
- },
77748
- onReloadMemory: async () => {
77749
- await refreshMemory(config);
77750
- }
77751
- })
77752
- };
77753
- }
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
+ );
77754
77773
  }
77755
- ]
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
+ };
77756
77847
  };
77757
77848
 
77758
77849
  // packages/cli/src/ui/commands/modelCommand.ts
@@ -77979,7 +78070,7 @@ Return a JSON object with:
77979
78070
  },
77980
78071
  abortSignal: new AbortController().signal,
77981
78072
  promptId: "triage-duplicates",
77982
- role: LlmRole.UTILITY_TOOL
78073
+ role: "utility_tool" /* UTILITY_TOOL */
77983
78074
  });
77984
78075
  const rec = response;
77985
78076
  let canonical;
@@ -78813,7 +78904,7 @@ Return a JSON object with:
78813
78904
  },
78814
78905
  abortSignal: abortControllerRef.current.signal,
78815
78906
  promptId: "triage-issues",
78816
- role: LlmRole.UTILITY_TOOL
78907
+ role: "utility_tool" /* UTILITY_TOOL */
78817
78908
  });
78818
78909
  return response;
78819
78910
  },
@@ -79286,8 +79377,8 @@ var oncallCommand = {
79286
79377
 
79287
79378
  // packages/cli/src/ui/commands/permissionsCommand.ts
79288
79379
  import * as process34 from "node:process";
79289
- import * as path32 from "node:path";
79290
- import * as fs34 from "node:fs";
79380
+ import * as path33 from "node:path";
79381
+ import * as fs35 from "node:fs";
79291
79382
  var permissionsCommand = {
79292
79383
  name: "permissions",
79293
79384
  description: "Manage folder trust settings and other permissions",
@@ -79305,10 +79396,10 @@ var permissionsCommand = {
79305
79396
  if (!dirPath) {
79306
79397
  targetDirectory = process34.cwd();
79307
79398
  } else {
79308
- targetDirectory = path32.resolve(expandHomeDir(dirPath));
79399
+ targetDirectory = path33.resolve(expandHomeDir(dirPath));
79309
79400
  }
79310
79401
  try {
79311
- if (!fs34.statSync(targetDirectory).isDirectory()) {
79402
+ if (!fs35.statSync(targetDirectory).isDirectory()) {
79312
79403
  return {
79313
79404
  type: "message",
79314
79405
  messageType: "error",
@@ -79352,7 +79443,7 @@ var permissionsCommand = {
79352
79443
  };
79353
79444
 
79354
79445
  // packages/cli/src/ui/commands/planCommand.ts
79355
- import * as path33 from "node:path";
79446
+ import * as path34 from "node:path";
79356
79447
  async function copyAction(context) {
79357
79448
  const config = context.services.agentContext?.config;
79358
79449
  if (!config) {
@@ -79369,7 +79460,7 @@ async function copyAction(context) {
79369
79460
  await copyToClipboard(content);
79370
79461
  coreEvents.emitFeedback(
79371
79462
  "info",
79372
- `Plan copied to clipboard (${path33.basename(planPath)}).`
79463
+ `Plan copied to clipboard (${path34.basename(planPath)}).`
79373
79464
  );
79374
79465
  } catch (error) {
79375
79466
  coreEvents.emitFeedback("error", `Failed to copy plan: ${error}`, error);
@@ -79387,8 +79478,8 @@ var planCommand = {
79387
79478
  return;
79388
79479
  }
79389
79480
  const previousApprovalMode = config.getApprovalMode();
79390
- config.setApprovalMode(ApprovalMode.PLAN);
79391
- if (previousApprovalMode !== ApprovalMode.PLAN) {
79481
+ config.setApprovalMode("plan" /* PLAN */);
79482
+ if (previousApprovalMode !== "plan" /* PLAN */) {
79392
79483
  coreEvents.emitFeedback("info", "Switched to Plan Mode.");
79393
79484
  }
79394
79485
  if (context.invocation?.args) {
@@ -79407,7 +79498,7 @@ var planCommand = {
79407
79498
  config.storage.getPlansDir(),
79408
79499
  config.getFileSystemService()
79409
79500
  );
79410
- const fileName = path33.basename(approvedPlanPath);
79501
+ const fileName = path34.basename(approvedPlanPath);
79411
79502
  coreEvents.emitFeedback("info", `Approved Plan: ${fileName}`);
79412
79503
  context.ui.addItem({
79413
79504
  type: "gemini" /* GEMINI */,
@@ -79447,10 +79538,10 @@ var categorizeRulesByMode = (rules) => {
79447
79538
  rules.forEach((rule) => {
79448
79539
  const modes = rule.modes?.length ? rule.modes : ALL_MODES;
79449
79540
  const modeSet = new Set(modes);
79450
- if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
79451
- if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
79452
- if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
79453
- if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
79541
+ if (modeSet.has("default" /* DEFAULT */)) result.normal.push(rule);
79542
+ if (modeSet.has("autoEdit" /* AUTO_EDIT */)) result.autoEdit.push(rule);
79543
+ if (modeSet.has("yolo" /* YOLO */)) result.yolo.push(rule);
79544
+ if (modeSet.has("plan" /* PLAN */)) result.plan.push(rule);
79454
79545
  });
79455
79546
  return result;
79456
79547
  };
@@ -79592,8 +79683,8 @@ var quitCommand = {
79592
79683
  };
79593
79684
 
79594
79685
  // packages/cli/src/ui/commands/restoreCommand.ts
79595
- import * as fs35 from "node:fs/promises";
79596
- import path34 from "node:path";
79686
+ import * as fs36 from "node:fs/promises";
79687
+ import path35 from "node:path";
79597
79688
  var HistoryItemSchema = external_exports.object({
79598
79689
  type: external_exports.string(),
79599
79690
  id: external_exports.number()
@@ -79612,8 +79703,8 @@ async function restoreAction(context, args) {
79612
79703
  };
79613
79704
  }
79614
79705
  try {
79615
- await fs35.mkdir(checkpointDir, { recursive: true });
79616
- const files = await fs35.readdir(checkpointDir);
79706
+ await fs36.mkdir(checkpointDir, { recursive: true });
79707
+ const files = await fs36.readdir(checkpointDir);
79617
79708
  const jsonFiles = files.filter((file) => file.endsWith(".json"));
79618
79709
  if (!args) {
79619
79710
  if (jsonFiles.length === 0) {
@@ -79640,8 +79731,8 @@ ${fileList}`
79640
79731
  content: `File not found: ${selectedFile}`
79641
79732
  };
79642
79733
  }
79643
- const filePath = path34.join(checkpointDir, selectedFile);
79644
- const data = await fs35.readFile(filePath, "utf-8");
79734
+ const filePath = path35.join(checkpointDir, selectedFile);
79735
+ const data = await fs36.readFile(filePath, "utf-8");
79645
79736
  const parseResult = ToolCallDataSchema.safeParse(JSON.parse(data));
79646
79737
  if (!parseResult.success) {
79647
79738
  return {
@@ -79689,7 +79780,7 @@ async function completion(context, _partialArg) {
79689
79780
  return [];
79690
79781
  }
79691
79782
  try {
79692
- const files = await fs35.readdir(checkpointDir);
79783
+ const files = await fs36.readdir(checkpointDir);
79693
79784
  const jsonFiles = files.filter((file) => file.endsWith(".json"));
79694
79785
  return getTruncatedCheckpointNames(jsonFiles);
79695
79786
  } catch {
@@ -79865,7 +79956,7 @@ async function listTools(context, showDescriptions) {
79865
79956
  };
79866
79957
  context.ui.addItem(toolsListItem);
79867
79958
  }
79868
- var listSubCommand = {
79959
+ var listSubCommand2 = {
79869
79960
  name: "list",
79870
79961
  description: "List available Gemini CLI tools.",
79871
79962
  kind: "built-in" /* BUILT_IN */,
@@ -79885,7 +79976,7 @@ var toolsCommand = {
79885
79976
  description: "List available Gemini CLI tools. Use /tools desc to include descriptions.",
79886
79977
  kind: "built-in" /* BUILT_IN */,
79887
79978
  autoExecute: false,
79888
- subCommands: [listSubCommand, descSubCommand],
79979
+ subCommands: [listSubCommand2, descSubCommand],
79889
79980
  action: async (context, args) => {
79890
79981
  const subCommand = args?.trim();
79891
79982
  const useShowDescriptions = subCommand === "desc" || subCommand === "descriptions";
@@ -79942,9 +80033,9 @@ function disableSkill(settings, skillName, scope) {
79942
80033
 
79943
80034
  // packages/cli/src/utils/skillUtils.ts
79944
80035
  var import_extract_zip2 = __toESM(require_extract_zip(), 1);
79945
- import * as fs36 from "node:fs/promises";
79946
- import * as path35 from "node:path";
79947
- import * as os7 from "node:os";
80036
+ import * as fs37 from "node:fs/promises";
80037
+ import * as path36 from "node:path";
80038
+ import * as os8 from "node:os";
79948
80039
  function renderSkillActionFeedback(result, formatScope) {
79949
80040
  const { skillName, action, status, error } = result;
79950
80041
  if (status === "error") {
@@ -79983,8 +80074,8 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
79983
80074
  const isSkillFile = source2.toLowerCase().endsWith(".skill");
79984
80075
  try {
79985
80076
  if (isGitUrl) {
79986
- tempDirToClean = await fs36.mkdtemp(
79987
- path35.join(os7.tmpdir(), "gemini-skill-")
80077
+ tempDirToClean = await fs37.mkdtemp(
80078
+ path36.join(os8.tmpdir(), "gemini-skill-")
79988
80079
  );
79989
80080
  sourcePath = tempDirToClean;
79990
80081
  onLog(`Cloning skill from ${source2}...`);
@@ -79996,18 +80087,18 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
79996
80087
  tempDirToClean
79997
80088
  );
79998
80089
  } else if (isSkillFile) {
79999
- tempDirToClean = await fs36.mkdtemp(
80000
- path35.join(os7.tmpdir(), "gemini-skill-")
80090
+ tempDirToClean = await fs37.mkdtemp(
80091
+ path36.join(os8.tmpdir(), "gemini-skill-")
80001
80092
  );
80002
80093
  sourcePath = tempDirToClean;
80003
80094
  onLog(`Extracting skill from ${source2}...`);
80004
- await (0, import_extract_zip2.default)(path35.resolve(source2), { dir: tempDirToClean });
80095
+ await (0, import_extract_zip2.default)(path36.resolve(source2), { dir: tempDirToClean });
80005
80096
  }
80006
80097
  if (subpath) {
80007
- sourcePath = path35.join(sourcePath, subpath);
80098
+ sourcePath = path36.join(sourcePath, subpath);
80008
80099
  }
80009
- sourcePath = path35.resolve(sourcePath);
80010
- if (tempDirToClean && !sourcePath.startsWith(path35.resolve(tempDirToClean))) {
80100
+ sourcePath = path36.resolve(sourcePath);
80101
+ if (tempDirToClean && !sourcePath.startsWith(path36.resolve(tempDirToClean))) {
80011
80102
  throw new Error("Invalid path: Directory traversal not allowed.");
80012
80103
  }
80013
80104
  onLog(`Searching for skills in ${sourcePath}...`);
@@ -80023,29 +80114,29 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
80023
80114
  if (!await requestConsent(skills, targetDir)) {
80024
80115
  throw new Error("Skill installation cancelled by user.");
80025
80116
  }
80026
- await fs36.mkdir(targetDir, { recursive: true });
80117
+ await fs37.mkdir(targetDir, { recursive: true });
80027
80118
  const installedSkills = [];
80028
80119
  for (const skill of skills) {
80029
80120
  const skillName = skill.name;
80030
- const skillDir = path35.dirname(skill.location);
80031
- const destPath = path35.join(targetDir, skillName);
80032
- const exists = await fs36.stat(destPath).catch(() => null);
80121
+ const skillDir = path36.dirname(skill.location);
80122
+ const destPath = path36.join(targetDir, skillName);
80123
+ const exists = await fs37.stat(destPath).catch(() => null);
80033
80124
  if (exists) {
80034
80125
  onLog(`Skill "${skillName}" already exists. Overwriting...`);
80035
- await fs36.rm(destPath, { recursive: true, force: true });
80126
+ await fs37.rm(destPath, { recursive: true, force: true });
80036
80127
  }
80037
- await fs36.cp(skillDir, destPath, { recursive: true });
80128
+ await fs37.cp(skillDir, destPath, { recursive: true });
80038
80129
  installedSkills.push({ name: skillName, location: destPath });
80039
80130
  }
80040
80131
  return installedSkills;
80041
80132
  } finally {
80042
80133
  if (tempDirToClean) {
80043
- await fs36.rm(tempDirToClean, { recursive: true, force: true });
80134
+ await fs37.rm(tempDirToClean, { recursive: true, force: true });
80044
80135
  }
80045
80136
  }
80046
80137
  }
80047
80138
  async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.resolve(true)) {
80048
- const sourcePath = path35.resolve(source2);
80139
+ const sourcePath = path36.resolve(source2);
80049
80140
  onLog(`Searching for skills in ${sourcePath}...`);
80050
80141
  const skills = await loadSkillsFromDir(sourcePath);
80051
80142
  if (skills.length === 0) {
@@ -80070,20 +80161,20 @@ async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.r
80070
80161
  if (!await requestConsent(skills, targetDir)) {
80071
80162
  throw new Error("Skill linking cancelled by user.");
80072
80163
  }
80073
- await fs36.mkdir(targetDir, { recursive: true });
80164
+ await fs37.mkdir(targetDir, { recursive: true });
80074
80165
  const linkedSkills = [];
80075
80166
  for (const skill of skills) {
80076
80167
  const skillName = skill.name;
80077
- const skillSourceDir = path35.dirname(skill.location);
80078
- const destPath = path35.join(targetDir, skillName);
80079
- const exists = await fs36.lstat(destPath).catch(() => null);
80168
+ const skillSourceDir = path36.dirname(skill.location);
80169
+ const destPath = path36.join(targetDir, skillName);
80170
+ const exists = await fs37.lstat(destPath).catch(() => null);
80080
80171
  if (exists) {
80081
80172
  onLog(
80082
80173
  `Skill "${skillName}" already exists at destination. Overwriting...`
80083
80174
  );
80084
- await fs36.rm(destPath, { recursive: true, force: true });
80175
+ await fs37.rm(destPath, { recursive: true, force: true });
80085
80176
  }
80086
- await fs36.symlink(
80177
+ await fs37.symlink(
80087
80178
  skillSourceDir,
80088
80179
  destPath,
80089
80180
  process.platform === "win32" ? "junction" : "dir"
@@ -80099,19 +80190,19 @@ async function uninstallSkill(name, scope) {
80099
80190
  const discoveredSkills = await loadSkillsFromDir(targetDir);
80100
80191
  const skillToUninstall = discoveredSkills.find((s3) => s3.name === name);
80101
80192
  if (!skillToUninstall) {
80102
- const skillPath = path35.resolve(targetDir, name);
80103
- if (!skillPath.startsWith(path35.resolve(targetDir))) {
80193
+ const skillPath = path36.resolve(targetDir, name);
80194
+ if (!skillPath.startsWith(path36.resolve(targetDir))) {
80104
80195
  return null;
80105
80196
  }
80106
- const exists = await fs36.lstat(skillPath).catch(() => null);
80197
+ const exists = await fs37.lstat(skillPath).catch(() => null);
80107
80198
  if (!exists) {
80108
80199
  return null;
80109
80200
  }
80110
- await fs36.rm(skillPath, { recursive: true, force: true });
80201
+ await fs37.rm(skillPath, { recursive: true, force: true });
80111
80202
  return { location: skillPath };
80112
80203
  }
80113
- const skillDir = path35.dirname(skillToUninstall.location);
80114
- await fs36.rm(skillDir, { recursive: true, force: true });
80204
+ const skillDir = path36.dirname(skillToUninstall.location);
80205
+ await fs37.rm(skillDir, { recursive: true, force: true });
80115
80206
  return { location: skillDir };
80116
80207
  }
80117
80208
 
@@ -80241,7 +80332,7 @@ async function disableAction4(context, args) {
80241
80332
  const result = disableSkill(context.services.settings, skillName, scope);
80242
80333
  let feedback = renderSkillActionFeedback(
80243
80334
  result,
80244
- (label, path37) => `${label} (${path37})`
80335
+ (label, path38) => `${label} (${path38})`
80245
80336
  );
80246
80337
  if (result.status === "success" || result.status === "no-op") {
80247
80338
  feedback += ' You can run "/skills reload" to refresh your current instance.';
@@ -80277,7 +80368,7 @@ async function enableAction4(context, args) {
80277
80368
  const result = enableSkill(context.services.settings, skillName);
80278
80369
  let feedback = renderSkillActionFeedback(
80279
80370
  result,
80280
- (label, path37) => `${label} (${path37})`
80371
+ (label, path38) => `${label} (${path38})`
80281
80372
  );
80282
80373
  if (result.status === "success" || result.status === "no-op") {
80283
80374
  feedback += ' You can run "/skills reload" to refresh your current instance.';
@@ -80315,7 +80406,7 @@ async function reloadAction2(context) {
80315
80406
  const minVisibleDuration = 500;
80316
80407
  if (elapsed < minVisibleDuration) {
80317
80408
  await new Promise(
80318
- (resolve8) => setTimeout(resolve8, minVisibleDuration - elapsed)
80409
+ (resolve9) => setTimeout(resolve9, minVisibleDuration - elapsed)
80319
80410
  );
80320
80411
  }
80321
80412
  context.ui.setPendingItem(null);
@@ -80468,8 +80559,8 @@ var vimCommand = {
80468
80559
 
80469
80560
  // packages/cli/src/ui/commands/setupGithubCommand.ts
80470
80561
  var import_undici2 = __toESM(require_undici(), 1);
80471
- import path36 from "node:path";
80472
- import * as fs37 from "node:fs";
80562
+ import path37 from "node:path";
80563
+ import * as fs38 from "node:fs";
80473
80564
  import { Writable } from "node:stream";
80474
80565
 
80475
80566
  // packages/cli/src/utils/gitUtils.ts
@@ -80596,25 +80687,25 @@ function getOpenUrlsCommands(readmeUrl) {
80596
80687
  }
80597
80688
  async function updateGitignore(gitRepoRoot) {
80598
80689
  const gitignoreEntries = [".gemini/", "gha-creds-*.json"];
80599
- const gitignorePath = path36.join(gitRepoRoot, ".gitignore");
80690
+ const gitignorePath = path37.join(gitRepoRoot, ".gitignore");
80600
80691
  try {
80601
80692
  let existingContent = "";
80602
80693
  let fileExists2 = true;
80603
80694
  try {
80604
- existingContent = await fs37.promises.readFile(gitignorePath, "utf8");
80695
+ existingContent = await fs38.promises.readFile(gitignorePath, "utf8");
80605
80696
  } catch {
80606
80697
  fileExists2 = false;
80607
80698
  }
80608
80699
  if (!fileExists2) {
80609
80700
  const contentToWrite = gitignoreEntries.join("\n") + "\n";
80610
- await fs37.promises.writeFile(gitignorePath, contentToWrite);
80701
+ await fs38.promises.writeFile(gitignorePath, contentToWrite);
80611
80702
  } else {
80612
80703
  const missingEntries = gitignoreEntries.filter(
80613
80704
  (entry) => !existingContent.split(/\r?\n/).some((line) => line.split("#")[0].trim() === entry)
80614
80705
  );
80615
80706
  if (missingEntries.length > 0) {
80616
80707
  const contentToAdd = "\n" + missingEntries.join("\n") + "\n";
80617
- await fs37.promises.appendFile(gitignorePath, contentToAdd);
80708
+ await fs38.promises.appendFile(gitignorePath, contentToAdd);
80618
80709
  }
80619
80710
  }
80620
80711
  } catch (error) {
@@ -80652,11 +80743,11 @@ async function downloadFiles({
80652
80743
  `Empty body while downloading ${endpoint}: ${response.status} - ${response.statusText}`
80653
80744
  );
80654
80745
  }
80655
- const destination = path36.resolve(
80746
+ const destination = path37.resolve(
80656
80747
  targetDir,
80657
- path36.basename(fileBasename)
80748
+ path37.basename(fileBasename)
80658
80749
  );
80659
- const fileStream = fs37.createWriteStream(destination, {
80750
+ const fileStream = fs38.createWriteStream(destination, {
80660
80751
  mode: 420,
80661
80752
  // -rw-r--r--, user(rw), group(r), other(r)
80662
80753
  flags: "w",
@@ -80673,7 +80764,7 @@ async function downloadFiles({
80673
80764
  }
80674
80765
  async function createDirectory(dirPath) {
80675
80766
  try {
80676
- await fs37.promises.mkdir(dirPath, { recursive: true });
80767
+ await fs38.promises.mkdir(dirPath, { recursive: true });
80677
80768
  } catch (error) {
80678
80769
  debugLogger.debug(`Failed to create ${dirPath} directory:`, error);
80679
80770
  throw new Error(
@@ -80727,9 +80818,9 @@ var setupGithubCommand = {
80727
80818
  const proxy = context?.services?.agentContext?.config.getProxy();
80728
80819
  const releaseTag = await getLatestGitHubRelease(proxy);
80729
80820
  const readmeUrl = `https://github.com/google-github-actions/run-gemini-cli/blob/${releaseTag}/README.md#quick-start`;
80730
- const workflowsDir = path36.join(gitRepoRoot, ".github", "workflows");
80821
+ const workflowsDir = path37.join(gitRepoRoot, ".github", "workflows");
80731
80822
  await createDirectory(workflowsDir);
80732
- const commandsDir = path36.join(gitRepoRoot, ".github", "commands");
80823
+ const commandsDir = path37.join(gitRepoRoot, ".github", "commands");
80733
80824
  await createDirectory(commandsDir);
80734
80825
  await downloadSetupFiles({
80735
80826
  configs: [
@@ -80802,7 +80893,7 @@ var upgradeCommand = {
80802
80893
  action: async (context) => {
80803
80894
  const config = context.services.agentContext?.config;
80804
80895
  const authType = config?.getContentGeneratorConfig()?.authType;
80805
- if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
80896
+ if (authType !== "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
80806
80897
  return {
80807
80898
  type: "message",
80808
80899
  messageType: "error",
@@ -80949,6 +81040,7 @@ var BuiltinCommandLoader = class {
80949
81040
  copyCommand,
80950
81041
  corgiCommand,
80951
81042
  docsCommand,
81043
+ exportSessionCommand,
80952
81044
  directoryCommand,
80953
81045
  editorCommand,
80954
81046
  ...this.config?.getExtensionsEnabled() === false ? [
@@ -80990,7 +81082,7 @@ var BuiltinCommandLoader = class {
80990
81082
  })
80991
81083
  }
80992
81084
  ] : [mcpCommand],
80993
- memoryCommand,
81085
+ memoryCommand(this.config),
80994
81086
  modelCommand,
80995
81087
  ...this.config?.getFolderTrust() ? [permissionsCommand] : [],
80996
81088
  ...this.config?.isPlanEnabled() ? [planCommand] : [],
@@ -81030,7 +81122,7 @@ var BuiltinCommandLoader = class {
81030
81122
  setupGithubCommand,
81031
81123
  terminalSetupCommand,
81032
81124
  ...this.config?.isVoiceModeEnabled() ? [voiceCommand] : [],
81033
- ...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
81125
+ ...this.config?.getContentGeneratorConfig()?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? [upgradeCommand] : []
81034
81126
  ];
81035
81127
  handle?.end();
81036
81128
  return allDefinitions.filter((cmd) => cmd !== null);