@google/gemini-cli 0.42.0 → 0.43.0-preview.1
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.
- package/bundle/{chunk-3IS7GD6D.js → chunk-3BNJIKEP.js} +3 -3
- package/bundle/{chunk-EDKX67D6.js → chunk-4G3X2H3F.js} +34 -16
- package/bundle/{chunk-FCAODPNO.js → chunk-4SLX6GS6.js} +486 -381
- package/bundle/{chunk-COKAF5GM.js → chunk-4ZT3EIBI.js} +2 -2
- package/bundle/{chunk-NTOPH4WG.js → chunk-6YMGRLOQ.js} +2 -2
- package/bundle/{chunk-QOZSZYL7.js → chunk-CKPZGEE3.js} +3 -3
- package/bundle/{chunk-G2VTSEZ6.js → chunk-CZPVSLJF.js} +1 -1
- package/bundle/{chunk-PUDLNWHE.js → chunk-DJCG6GWZ.js} +3 -3
- package/bundle/{chunk-I7AME6VC.js → chunk-ERQUIEOO.js} +9 -8
- package/bundle/{chunk-XUMRUXOT.js → chunk-EWAAFVBK.js} +41 -20
- package/bundle/{chunk-LATVEETM.js → chunk-F7PEGIBA.js} +2 -2
- package/bundle/{chunk-KVEAHIIV.js → chunk-ICOPZSVB.js} +3 -3
- package/bundle/{chunk-BCYBA52D.js → chunk-IF5BAOVJ.js} +34 -16
- package/bundle/chunk-KILFUY3Y.js +512 -0
- package/bundle/{chunk-CYEIWMZJ.js → chunk-L4LBKMR6.js} +1 -1
- package/bundle/{chunk-4SLGT6YD.js → chunk-LTFEPQ67.js} +1 -1
- package/bundle/{chunk-7C6GGDK6.js → chunk-LTSFEC7U.js} +3 -3
- package/bundle/{chunk-7VVHSNDQ.js → chunk-MRVZNBXY.js} +1907 -716
- package/bundle/{chunk-COQP2M4D.js → chunk-N3MLU4IQ.js} +546 -428
- package/bundle/{chunk-ECNYAST2.js → chunk-N6QYTC2T.js} +5417 -5376
- package/bundle/{chunk-DN4XSYRG.js → chunk-NDSJWRFE.js} +8640 -13347
- package/bundle/{chunk-DMWX7UP6.js → chunk-NG2WIKH5.js} +2170 -791
- package/bundle/chunk-PLEERNRJ.js +156 -0
- package/bundle/{chunk-ZNMQA242.js → chunk-QAQT56LH.js} +3 -3
- package/bundle/{chunk-WIXUKOZA.js → chunk-S36EONMM.js} +1 -1
- package/bundle/chunk-UB4AWMZC.js +391 -0
- package/bundle/{chunk-CHERUG6W.js → chunk-UBCHSKF2.js} +486 -381
- package/bundle/{chunk-JEW7ZIWE.js → chunk-UJ26GAE5.js} +5326 -5290
- package/bundle/chunk-ULCEBJMK.js +17248 -0
- package/bundle/chunk-UUHMEKLA.js +357199 -0
- package/bundle/chunk-UW3H4T6A.js +1571 -0
- package/bundle/{chunk-GA527JB7.js → chunk-VSTO23O2.js} +1 -1
- package/bundle/chunk-XKIM3BNI.js +118 -0
- package/bundle/chunk-YIHNW7CC.js +81649 -0
- package/bundle/{cleanup-3RILFNVM.js → cleanup-BMLCC7SO.js} +3 -3
- package/bundle/{cleanup-SVRKYBR6.js → cleanup-LMJA4J5S.js} +3 -3
- package/bundle/{cleanup-XFVHHDVO.js → cleanup-M7RSLDBR.js} +3 -3
- package/bundle/cleanup-NMUMRIEF.js +33 -0
- package/bundle/{core-FRVSDP2C.js → core-WXTAU5UX.js} +30 -2
- package/bundle/{devtoolsService-RUEO5PGP.js → devtoolsService-2L5U47ZQ.js} +3 -3
- package/bundle/{devtoolsService-VM2WTHBX.js → devtoolsService-6THA6GNX.js} +3 -3
- package/bundle/{devtoolsService-TRDGMQLJ.js → devtoolsService-J2AC6YXM.js} +5 -4
- package/bundle/devtoolsService-SRWIME2Q.js +857 -0
- package/bundle/{dist-6BN2CJPN.js → dist-DIIMIT2U.js} +30 -2
- package/bundle/{core-B5S6HZJT.js → dist-MXL7ZG46.js} +30 -2
- package/bundle/dist-POIHCQVM.js +2124 -0
- package/bundle/docs/changelogs/index.md +14 -0
- package/bundle/docs/changelogs/latest.md +108 -166
- package/bundle/docs/changelogs/preview.md +227 -103
- package/bundle/docs/cli/auto-memory.md +60 -38
- package/bundle/docs/cli/settings.md +1 -1
- package/bundle/docs/cli/tutorials/memory-management.md +1 -1
- package/bundle/docs/extensions/releasing.md +58 -24
- package/bundle/docs/reference/configuration.md +14 -1
- package/bundle/docs/reference/keyboard-shortcuts.md +23 -0
- package/bundle/{gemini-GHUELHBF.js → gemini-D32FDZXN.js} +160 -60
- package/bundle/{gemini-QSTQ2DBG.js → gemini-DLZ2R4X7.js} +160 -60
- package/bundle/{gemini-NQPVX5JC.js → gemini-HYQU2RK2.js} +345 -231
- package/bundle/gemini-JJG7ZGWB.js +16356 -0
- package/bundle/gemini.js +8 -8
- package/bundle/{interactiveCli-AG2YWL2O.js → interactiveCli-DHMPW4RS.js} +1704 -1457
- package/bundle/{interactiveCli-MZFG35NB.js → interactiveCli-K7ETWJMN.js} +1986 -1721
- package/bundle/{interactiveCli-453M2IVE.js → interactiveCli-NR7OUF3G.js} +1703 -1457
- package/bundle/interactiveCli-X4AUP7T7.js +34752 -0
- package/bundle/{liteRtServerManager-G4Q7OVBX.js → liteRtServerManager-L7C3D5RL.js} +5 -5
- package/bundle/{liteRtServerManager-S7WL25VD.js → liteRtServerManager-PKRLUK2P.js} +5 -5
- package/bundle/{liteRtServerManager-BXQ6VVWP.js → liteRtServerManager-TEBDIGEN.js} +5 -5
- package/bundle/liteRtServerManager-UPCAT7Z2.js +66 -0
- package/bundle/{memoryDiscovery-KSYZVCWF.js → memoryDiscovery-LLSKN6HL.js} +1 -1
- package/bundle/{memoryDiscovery-FB7MMKTA.js → memoryDiscovery-SJ7P6RCN.js} +1 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-H7G6RSFW.js → oauth2-provider-52IJKUJI.js} +2 -2
- package/bundle/{oauth2-provider-VR4DL6AL.js → oauth2-provider-OPOTTZ5C.js} +2 -2
- package/bundle/{oauth2-provider-5UF5WEE2.js → oauth2-provider-TOAKXOL7.js} +39 -73
- package/bundle/oauth2-provider-WN4YIDA4.js +237 -0
- package/bundle/{start-CQBSKFYB.js → start-6KIIUSAH.js} +7 -7
- package/bundle/{start-NIMXQJYB.js → start-7ZNSGJD6.js} +7 -7
- package/bundle/{start-2SKRN43X.js → start-EPIILWLN.js} +7 -7
- package/bundle/start-TMFPUYEL.js +19 -0
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
exitCli,
|
|
8
8
|
require_source
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LTFEPQ67.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,17 +58,19 @@ import {
|
|
|
57
58
|
stripUnsafeCharacters,
|
|
58
59
|
toCodePoints,
|
|
59
60
|
validateCustomTheme
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-EWAAFVBK.js";
|
|
61
62
|
import {
|
|
62
63
|
isDevelopment
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-QAQT56LH.js";
|
|
64
65
|
import {
|
|
65
66
|
emptyIcon,
|
|
66
67
|
require_react
|
|
67
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-CZPVSLJF.js";
|
|
68
69
|
import {
|
|
69
70
|
AsyncFzf,
|
|
71
|
+
AuthType,
|
|
70
72
|
Config,
|
|
73
|
+
CoreToolCallStatus,
|
|
71
74
|
ExtensionDisableEvent,
|
|
72
75
|
ExtensionEnableEvent,
|
|
73
76
|
ExtensionInstallEvent,
|
|
@@ -76,17 +79,27 @@ import {
|
|
|
76
79
|
ExtensionUninstallEvent,
|
|
77
80
|
ExtensionUpdateEvent,
|
|
78
81
|
GEMINI_CLI_COMPANION_EXTENSION_NAME,
|
|
82
|
+
HookType,
|
|
83
|
+
IDEConnectionStatus,
|
|
79
84
|
INITIAL_HISTORY_LENGTH,
|
|
80
85
|
IdeClient,
|
|
81
86
|
IdeConnectionEvent,
|
|
87
|
+
IdeConnectionType,
|
|
88
|
+
IntegrityDataStatus,
|
|
82
89
|
KeychainTokenStorage,
|
|
90
|
+
LlmRole,
|
|
91
|
+
MCPDiscoveryState,
|
|
83
92
|
MCPOAuthTokenStorage,
|
|
93
|
+
MCPServerStatus,
|
|
84
94
|
ModelSlashCommandEvent,
|
|
85
95
|
ProjectIdRequiredError,
|
|
86
96
|
ReadManyFilesTool,
|
|
87
97
|
RewindEvent,
|
|
98
|
+
SessionEndReason,
|
|
99
|
+
SessionStartSource,
|
|
88
100
|
ShellExecutionService,
|
|
89
101
|
StartSessionEvent,
|
|
102
|
+
TrustLevel,
|
|
90
103
|
UPGRADE_URL_PAGE,
|
|
91
104
|
UserAccountManager,
|
|
92
105
|
ValidationRequiredError,
|
|
@@ -200,12 +213,13 @@ import {
|
|
|
200
213
|
stripAnsi,
|
|
201
214
|
tokenLimit,
|
|
202
215
|
uiTelemetryService
|
|
203
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-NDSJWRFE.js";
|
|
204
217
|
import {
|
|
205
218
|
ApprovalMode,
|
|
206
219
|
CoreEvent,
|
|
207
220
|
DiscoveredMCPTool,
|
|
208
221
|
GEMINI_DIR,
|
|
222
|
+
PolicyDecision,
|
|
209
223
|
REFERENCE_CONTENT_END,
|
|
210
224
|
REFERENCE_CONTENT_START,
|
|
211
225
|
Storage,
|
|
@@ -226,7 +240,7 @@ import {
|
|
|
226
240
|
shortenPath,
|
|
227
241
|
tildeifyPath,
|
|
228
242
|
unescapePath
|
|
229
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-UJ26GAE5.js";
|
|
230
244
|
import {
|
|
231
245
|
require_src
|
|
232
246
|
} from "./chunk-RJTRUG2J.js";
|
|
@@ -1729,8 +1743,8 @@ var require_react_reconciler_production = __commonJS({
|
|
|
1729
1743
|
currentEntangledActionThenable = {
|
|
1730
1744
|
status: "pending",
|
|
1731
1745
|
value: void 0,
|
|
1732
|
-
then: function(
|
|
1733
|
-
entangledListeners.push(
|
|
1746
|
+
then: function(resolve9) {
|
|
1747
|
+
entangledListeners.push(resolve9);
|
|
1734
1748
|
}
|
|
1735
1749
|
};
|
|
1736
1750
|
}
|
|
@@ -1753,8 +1767,8 @@ var require_react_reconciler_production = __commonJS({
|
|
|
1753
1767
|
status: "pending",
|
|
1754
1768
|
value: null,
|
|
1755
1769
|
reason: null,
|
|
1756
|
-
then: function(
|
|
1757
|
-
listeners.push(
|
|
1770
|
+
then: function(resolve9) {
|
|
1771
|
+
listeners.push(resolve9);
|
|
1758
1772
|
}
|
|
1759
1773
|
};
|
|
1760
1774
|
thenable.then(
|
|
@@ -9748,7 +9762,7 @@ var require_prompt = __commonJS({
|
|
|
9748
9762
|
var require_text = __commonJS({
|
|
9749
9763
|
"node_modules/prompts/dist/elements/text.js"(exports, module) {
|
|
9750
9764
|
"use strict";
|
|
9751
|
-
function asyncGeneratorStep(gen,
|
|
9765
|
+
function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
|
|
9752
9766
|
try {
|
|
9753
9767
|
var info = gen[key](arg);
|
|
9754
9768
|
var value = info.value;
|
|
@@ -9757,7 +9771,7 @@ var require_text = __commonJS({
|
|
|
9757
9771
|
return;
|
|
9758
9772
|
}
|
|
9759
9773
|
if (info.done) {
|
|
9760
|
-
|
|
9774
|
+
resolve9(value);
|
|
9761
9775
|
} else {
|
|
9762
9776
|
Promise.resolve(value).then(_next, _throw);
|
|
9763
9777
|
}
|
|
@@ -9765,13 +9779,13 @@ var require_text = __commonJS({
|
|
|
9765
9779
|
function _asyncToGenerator(fn2) {
|
|
9766
9780
|
return function() {
|
|
9767
9781
|
var self = this, args = arguments;
|
|
9768
|
-
return new Promise(function(
|
|
9782
|
+
return new Promise(function(resolve9, reject) {
|
|
9769
9783
|
var gen = fn2.apply(self, args);
|
|
9770
9784
|
function _next(value) {
|
|
9771
|
-
asyncGeneratorStep(gen,
|
|
9785
|
+
asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
|
|
9772
9786
|
}
|
|
9773
9787
|
function _throw(err) {
|
|
9774
|
-
asyncGeneratorStep(gen,
|
|
9788
|
+
asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
|
|
9775
9789
|
}
|
|
9776
9790
|
_next(void 0);
|
|
9777
9791
|
});
|
|
@@ -10487,7 +10501,7 @@ var require_dateparts = __commonJS({
|
|
|
10487
10501
|
var require_date = __commonJS({
|
|
10488
10502
|
"node_modules/prompts/dist/elements/date.js"(exports, module) {
|
|
10489
10503
|
"use strict";
|
|
10490
|
-
function asyncGeneratorStep(gen,
|
|
10504
|
+
function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
|
|
10491
10505
|
try {
|
|
10492
10506
|
var info = gen[key](arg);
|
|
10493
10507
|
var value = info.value;
|
|
@@ -10496,7 +10510,7 @@ var require_date = __commonJS({
|
|
|
10496
10510
|
return;
|
|
10497
10511
|
}
|
|
10498
10512
|
if (info.done) {
|
|
10499
|
-
|
|
10513
|
+
resolve9(value);
|
|
10500
10514
|
} else {
|
|
10501
10515
|
Promise.resolve(value).then(_next, _throw);
|
|
10502
10516
|
}
|
|
@@ -10504,13 +10518,13 @@ var require_date = __commonJS({
|
|
|
10504
10518
|
function _asyncToGenerator(fn2) {
|
|
10505
10519
|
return function() {
|
|
10506
10520
|
var self = this, args = arguments;
|
|
10507
|
-
return new Promise(function(
|
|
10521
|
+
return new Promise(function(resolve9, reject) {
|
|
10508
10522
|
var gen = fn2.apply(self, args);
|
|
10509
10523
|
function _next(value) {
|
|
10510
|
-
asyncGeneratorStep(gen,
|
|
10524
|
+
asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
|
|
10511
10525
|
}
|
|
10512
10526
|
function _throw(err) {
|
|
10513
|
-
asyncGeneratorStep(gen,
|
|
10527
|
+
asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
|
|
10514
10528
|
}
|
|
10515
10529
|
_next(void 0);
|
|
10516
10530
|
});
|
|
@@ -10713,7 +10727,7 @@ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
|
10713
10727
|
var require_number = __commonJS({
|
|
10714
10728
|
"node_modules/prompts/dist/elements/number.js"(exports, module) {
|
|
10715
10729
|
"use strict";
|
|
10716
|
-
function asyncGeneratorStep(gen,
|
|
10730
|
+
function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
|
|
10717
10731
|
try {
|
|
10718
10732
|
var info = gen[key](arg);
|
|
10719
10733
|
var value = info.value;
|
|
@@ -10722,7 +10736,7 @@ var require_number = __commonJS({
|
|
|
10722
10736
|
return;
|
|
10723
10737
|
}
|
|
10724
10738
|
if (info.done) {
|
|
10725
|
-
|
|
10739
|
+
resolve9(value);
|
|
10726
10740
|
} else {
|
|
10727
10741
|
Promise.resolve(value).then(_next, _throw);
|
|
10728
10742
|
}
|
|
@@ -10730,13 +10744,13 @@ var require_number = __commonJS({
|
|
|
10730
10744
|
function _asyncToGenerator(fn2) {
|
|
10731
10745
|
return function() {
|
|
10732
10746
|
var self = this, args = arguments;
|
|
10733
|
-
return new Promise(function(
|
|
10747
|
+
return new Promise(function(resolve9, reject) {
|
|
10734
10748
|
var gen = fn2.apply(self, args);
|
|
10735
10749
|
function _next(value) {
|
|
10736
|
-
asyncGeneratorStep(gen,
|
|
10750
|
+
asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
|
|
10737
10751
|
}
|
|
10738
10752
|
function _throw(err) {
|
|
10739
|
-
asyncGeneratorStep(gen,
|
|
10753
|
+
asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
|
|
10740
10754
|
}
|
|
10741
10755
|
_next(void 0);
|
|
10742
10756
|
});
|
|
@@ -11159,7 +11173,7 @@ Instructions:
|
|
|
11159
11173
|
var require_autocomplete = __commonJS({
|
|
11160
11174
|
"node_modules/prompts/dist/elements/autocomplete.js"(exports, module) {
|
|
11161
11175
|
"use strict";
|
|
11162
|
-
function asyncGeneratorStep(gen,
|
|
11176
|
+
function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
|
|
11163
11177
|
try {
|
|
11164
11178
|
var info = gen[key](arg);
|
|
11165
11179
|
var value = info.value;
|
|
@@ -11168,7 +11182,7 @@ var require_autocomplete = __commonJS({
|
|
|
11168
11182
|
return;
|
|
11169
11183
|
}
|
|
11170
11184
|
if (info.done) {
|
|
11171
|
-
|
|
11185
|
+
resolve9(value);
|
|
11172
11186
|
} else {
|
|
11173
11187
|
Promise.resolve(value).then(_next, _throw);
|
|
11174
11188
|
}
|
|
@@ -11176,13 +11190,13 @@ var require_autocomplete = __commonJS({
|
|
|
11176
11190
|
function _asyncToGenerator(fn2) {
|
|
11177
11191
|
return function() {
|
|
11178
11192
|
var self = this, args = arguments;
|
|
11179
|
-
return new Promise(function(
|
|
11193
|
+
return new Promise(function(resolve9, reject) {
|
|
11180
11194
|
var gen = fn2.apply(self, args);
|
|
11181
11195
|
function _next(value) {
|
|
11182
|
-
asyncGeneratorStep(gen,
|
|
11196
|
+
asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
|
|
11183
11197
|
}
|
|
11184
11198
|
function _throw(err) {
|
|
11185
|
-
asyncGeneratorStep(gen,
|
|
11199
|
+
asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
|
|
11186
11200
|
}
|
|
11187
11201
|
_next(void 0);
|
|
11188
11202
|
});
|
|
@@ -11813,7 +11827,7 @@ var require_dist = __commonJS({
|
|
|
11813
11827
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
11814
11828
|
return arr2;
|
|
11815
11829
|
}
|
|
11816
|
-
function asyncGeneratorStep(gen,
|
|
11830
|
+
function asyncGeneratorStep(gen, resolve9, reject, _next, _throw, key, arg) {
|
|
11817
11831
|
try {
|
|
11818
11832
|
var info = gen[key](arg);
|
|
11819
11833
|
var value = info.value;
|
|
@@ -11822,7 +11836,7 @@ var require_dist = __commonJS({
|
|
|
11822
11836
|
return;
|
|
11823
11837
|
}
|
|
11824
11838
|
if (info.done) {
|
|
11825
|
-
|
|
11839
|
+
resolve9(value);
|
|
11826
11840
|
} else {
|
|
11827
11841
|
Promise.resolve(value).then(_next, _throw);
|
|
11828
11842
|
}
|
|
@@ -11830,13 +11844,13 @@ var require_dist = __commonJS({
|
|
|
11830
11844
|
function _asyncToGenerator(fn2) {
|
|
11831
11845
|
return function() {
|
|
11832
11846
|
var self = this, args = arguments;
|
|
11833
|
-
return new Promise(function(
|
|
11847
|
+
return new Promise(function(resolve9, reject) {
|
|
11834
11848
|
var gen = fn2.apply(self, args);
|
|
11835
11849
|
function _next(value) {
|
|
11836
|
-
asyncGeneratorStep(gen,
|
|
11850
|
+
asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "next", value);
|
|
11837
11851
|
}
|
|
11838
11852
|
function _throw(err) {
|
|
11839
|
-
asyncGeneratorStep(gen,
|
|
11853
|
+
asyncGeneratorStep(gen, resolve9, reject, _next, _throw, "throw", err);
|
|
11840
11854
|
}
|
|
11841
11855
|
_next(void 0);
|
|
11842
11856
|
});
|
|
@@ -14173,7 +14187,7 @@ var require_get_stream = __commonJS({
|
|
|
14173
14187
|
};
|
|
14174
14188
|
const { maxBuffer } = options;
|
|
14175
14189
|
let stream;
|
|
14176
|
-
await new Promise((
|
|
14190
|
+
await new Promise((resolve9, reject) => {
|
|
14177
14191
|
const rejectPromise = (error) => {
|
|
14178
14192
|
if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
14179
14193
|
error.bufferedData = stream.getBufferedValue();
|
|
@@ -14185,7 +14199,7 @@ var require_get_stream = __commonJS({
|
|
|
14185
14199
|
rejectPromise(error);
|
|
14186
14200
|
return;
|
|
14187
14201
|
}
|
|
14188
|
-
|
|
14202
|
+
resolve9();
|
|
14189
14203
|
});
|
|
14190
14204
|
stream.on("data", () => {
|
|
14191
14205
|
if (stream.getBufferedLength() > maxBuffer) {
|
|
@@ -14261,7 +14275,7 @@ var require_pend = __commonJS({
|
|
|
14261
14275
|
// node_modules/fd-slicer/index.js
|
|
14262
14276
|
var require_fd_slicer = __commonJS({
|
|
14263
14277
|
"node_modules/fd-slicer/index.js"(exports) {
|
|
14264
|
-
var
|
|
14278
|
+
var fs39 = __require("fs");
|
|
14265
14279
|
var util2 = __require("util");
|
|
14266
14280
|
var stream = __require("stream");
|
|
14267
14281
|
var Readable = stream.Readable;
|
|
@@ -14286,7 +14300,7 @@ var require_fd_slicer = __commonJS({
|
|
|
14286
14300
|
FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
|
|
14287
14301
|
var self = this;
|
|
14288
14302
|
self.pend.go(function(cb) {
|
|
14289
|
-
|
|
14303
|
+
fs39.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
|
|
14290
14304
|
cb();
|
|
14291
14305
|
callback(err, bytesRead, buffer2);
|
|
14292
14306
|
});
|
|
@@ -14295,7 +14309,7 @@ var require_fd_slicer = __commonJS({
|
|
|
14295
14309
|
FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
|
|
14296
14310
|
var self = this;
|
|
14297
14311
|
self.pend.go(function(cb) {
|
|
14298
|
-
|
|
14312
|
+
fs39.write(self.fd, buffer, offset, length, position, function(err, written, buffer2) {
|
|
14299
14313
|
cb();
|
|
14300
14314
|
callback(err, written, buffer2);
|
|
14301
14315
|
});
|
|
@@ -14316,7 +14330,7 @@ var require_fd_slicer = __commonJS({
|
|
|
14316
14330
|
if (self.refCount > 0) return;
|
|
14317
14331
|
if (self.refCount < 0) throw new Error("invalid unref");
|
|
14318
14332
|
if (self.autoClose) {
|
|
14319
|
-
|
|
14333
|
+
fs39.close(self.fd, onCloseDone);
|
|
14320
14334
|
}
|
|
14321
14335
|
function onCloseDone(err) {
|
|
14322
14336
|
if (err) {
|
|
@@ -14353,7 +14367,7 @@ var require_fd_slicer = __commonJS({
|
|
|
14353
14367
|
self.context.pend.go(function(cb) {
|
|
14354
14368
|
if (self.destroyed) return cb();
|
|
14355
14369
|
var buffer = new Buffer(toRead);
|
|
14356
|
-
|
|
14370
|
+
fs39.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
|
|
14357
14371
|
if (err) {
|
|
14358
14372
|
self.destroy(err);
|
|
14359
14373
|
} else if (bytesRead === 0) {
|
|
@@ -14400,7 +14414,7 @@ var require_fd_slicer = __commonJS({
|
|
|
14400
14414
|
}
|
|
14401
14415
|
self.context.pend.go(function(cb) {
|
|
14402
14416
|
if (self.destroyed) return cb();
|
|
14403
|
-
|
|
14417
|
+
fs39.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err2, bytes) {
|
|
14404
14418
|
if (err2) {
|
|
14405
14419
|
self.destroy();
|
|
14406
14420
|
cb();
|
|
@@ -14827,7 +14841,7 @@ var require_buffer_crc32 = __commonJS({
|
|
|
14827
14841
|
// node_modules/yauzl/index.js
|
|
14828
14842
|
var require_yauzl = __commonJS({
|
|
14829
14843
|
"node_modules/yauzl/index.js"(exports) {
|
|
14830
|
-
var
|
|
14844
|
+
var fs39 = __require("fs");
|
|
14831
14845
|
var zlib = __require("zlib");
|
|
14832
14846
|
var fd_slicer = require_fd_slicer();
|
|
14833
14847
|
var crc32 = require_buffer_crc32();
|
|
@@ -14845,7 +14859,7 @@ var require_yauzl = __commonJS({
|
|
|
14845
14859
|
exports.ZipFile = ZipFile;
|
|
14846
14860
|
exports.Entry = Entry;
|
|
14847
14861
|
exports.RandomAccessReader = RandomAccessReader;
|
|
14848
|
-
function open(
|
|
14862
|
+
function open(path38, options, callback) {
|
|
14849
14863
|
if (typeof options === "function") {
|
|
14850
14864
|
callback = options;
|
|
14851
14865
|
options = null;
|
|
@@ -14857,10 +14871,10 @@ var require_yauzl = __commonJS({
|
|
|
14857
14871
|
if (options.validateEntrySizes == null) options.validateEntrySizes = true;
|
|
14858
14872
|
if (options.strictFileNames == null) options.strictFileNames = false;
|
|
14859
14873
|
if (callback == null) callback = defaultCallback;
|
|
14860
|
-
|
|
14874
|
+
fs39.open(path38, "r", function(err, fd) {
|
|
14861
14875
|
if (err) return callback(err);
|
|
14862
14876
|
fromFd(fd, options, function(err2, zipfile) {
|
|
14863
|
-
if (err2)
|
|
14877
|
+
if (err2) fs39.close(fd, defaultCallback);
|
|
14864
14878
|
callback(err2, zipfile);
|
|
14865
14879
|
});
|
|
14866
14880
|
});
|
|
@@ -14877,7 +14891,7 @@ var require_yauzl = __commonJS({
|
|
|
14877
14891
|
if (options.validateEntrySizes == null) options.validateEntrySizes = true;
|
|
14878
14892
|
if (options.strictFileNames == null) options.strictFileNames = false;
|
|
14879
14893
|
if (callback == null) callback = defaultCallback;
|
|
14880
|
-
|
|
14894
|
+
fs39.fstat(fd, function(err, stats) {
|
|
14881
14895
|
if (err) return callback(err);
|
|
14882
14896
|
var reader = fd_slicer.createFromFd(fd, { autoClose: true });
|
|
14883
14897
|
fromRandomAccessReader(reader, stats.size, options, callback);
|
|
@@ -15457,9 +15471,9 @@ var require_yauzl = __commonJS({
|
|
|
15457
15471
|
var require_extract_zip = __commonJS({
|
|
15458
15472
|
"node_modules/extract-zip/index.js"(exports, module) {
|
|
15459
15473
|
var debug = require_src()("extract-zip");
|
|
15460
|
-
var { createWriteStream: createWriteStream5, promises:
|
|
15474
|
+
var { createWriteStream: createWriteStream5, promises: fs39 } = __require("fs");
|
|
15461
15475
|
var getStream = require_get_stream();
|
|
15462
|
-
var
|
|
15476
|
+
var path38 = __require("path");
|
|
15463
15477
|
var { promisify: promisify5 } = __require("util");
|
|
15464
15478
|
var stream = __require("stream");
|
|
15465
15479
|
var yauzl = require_yauzl();
|
|
@@ -15474,7 +15488,7 @@ var require_extract_zip = __commonJS({
|
|
|
15474
15488
|
debug("opening", this.zipPath, "with opts", this.opts);
|
|
15475
15489
|
this.zipfile = await openZip(this.zipPath, { lazyEntries: true });
|
|
15476
15490
|
this.canceled = false;
|
|
15477
|
-
return new Promise((
|
|
15491
|
+
return new Promise((resolve9, reject) => {
|
|
15478
15492
|
this.zipfile.on("error", (err) => {
|
|
15479
15493
|
this.canceled = true;
|
|
15480
15494
|
reject(err);
|
|
@@ -15483,7 +15497,7 @@ var require_extract_zip = __commonJS({
|
|
|
15483
15497
|
this.zipfile.on("close", () => {
|
|
15484
15498
|
if (!this.canceled) {
|
|
15485
15499
|
debug("zip extraction complete");
|
|
15486
|
-
|
|
15500
|
+
resolve9();
|
|
15487
15501
|
}
|
|
15488
15502
|
});
|
|
15489
15503
|
this.zipfile.on("entry", async (entry) => {
|
|
@@ -15496,12 +15510,12 @@ var require_extract_zip = __commonJS({
|
|
|
15496
15510
|
this.zipfile.readEntry();
|
|
15497
15511
|
return;
|
|
15498
15512
|
}
|
|
15499
|
-
const destDir =
|
|
15513
|
+
const destDir = path38.dirname(path38.join(this.opts.dir, entry.fileName));
|
|
15500
15514
|
try {
|
|
15501
|
-
await
|
|
15502
|
-
const canonicalDestDir = await
|
|
15503
|
-
const relativeDestDir =
|
|
15504
|
-
if (relativeDestDir.split(
|
|
15515
|
+
await fs39.mkdir(destDir, { recursive: true });
|
|
15516
|
+
const canonicalDestDir = await fs39.realpath(destDir);
|
|
15517
|
+
const relativeDestDir = path38.relative(this.opts.dir, canonicalDestDir);
|
|
15518
|
+
if (relativeDestDir.split(path38.sep).includes("..")) {
|
|
15505
15519
|
throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
|
|
15506
15520
|
}
|
|
15507
15521
|
await this.extractEntry(entry);
|
|
@@ -15523,7 +15537,7 @@ var require_extract_zip = __commonJS({
|
|
|
15523
15537
|
if (this.opts.onEntry) {
|
|
15524
15538
|
this.opts.onEntry(entry, this.zipfile);
|
|
15525
15539
|
}
|
|
15526
|
-
const dest =
|
|
15540
|
+
const dest = path38.join(this.opts.dir, entry.fileName);
|
|
15527
15541
|
const mode = entry.externalFileAttributes >> 16 & 65535;
|
|
15528
15542
|
const IFMT = 61440;
|
|
15529
15543
|
const IFDIR = 16384;
|
|
@@ -15537,20 +15551,20 @@ var require_extract_zip = __commonJS({
|
|
|
15537
15551
|
if (!isDir) isDir = madeBy === 0 && entry.externalFileAttributes === 16;
|
|
15538
15552
|
debug("extracting entry", { filename: entry.fileName, isDir, isSymlink: symlink2 });
|
|
15539
15553
|
const procMode = this.getExtractedMode(mode, isDir) & 511;
|
|
15540
|
-
const destDir = isDir ? dest :
|
|
15554
|
+
const destDir = isDir ? dest : path38.dirname(dest);
|
|
15541
15555
|
const mkdirOptions = { recursive: true };
|
|
15542
15556
|
if (isDir) {
|
|
15543
15557
|
mkdirOptions.mode = procMode;
|
|
15544
15558
|
}
|
|
15545
15559
|
debug("mkdir", { dir: destDir, ...mkdirOptions });
|
|
15546
|
-
await
|
|
15560
|
+
await fs39.mkdir(destDir, mkdirOptions);
|
|
15547
15561
|
if (isDir) return;
|
|
15548
15562
|
debug("opening read stream", dest);
|
|
15549
15563
|
const readStream = await promisify5(this.zipfile.openReadStream.bind(this.zipfile))(entry);
|
|
15550
15564
|
if (symlink2) {
|
|
15551
15565
|
const link2 = await getStream(readStream);
|
|
15552
15566
|
debug("creating symlink", link2, dest);
|
|
15553
|
-
await
|
|
15567
|
+
await fs39.symlink(link2, dest);
|
|
15554
15568
|
} else {
|
|
15555
15569
|
await pipeline2(readStream, createWriteStream5(dest, { mode: procMode }));
|
|
15556
15570
|
}
|
|
@@ -15579,11 +15593,11 @@ var require_extract_zip = __commonJS({
|
|
|
15579
15593
|
};
|
|
15580
15594
|
module.exports = async function(zipPath, opts) {
|
|
15581
15595
|
debug("creating target directory", opts.dir);
|
|
15582
|
-
if (!
|
|
15596
|
+
if (!path38.isAbsolute(opts.dir)) {
|
|
15583
15597
|
throw new Error("Target directory is expected to be absolute");
|
|
15584
15598
|
}
|
|
15585
|
-
await
|
|
15586
|
-
opts.dir = await
|
|
15599
|
+
await fs39.mkdir(opts.dir, { recursive: true });
|
|
15600
|
+
opts.dir = await fs39.realpath(opts.dir);
|
|
15587
15601
|
return new Extractor(zipPath, opts).extract();
|
|
15588
15602
|
};
|
|
15589
15603
|
}
|
|
@@ -17040,7 +17054,7 @@ var require_strip_final_newline = __commonJS({
|
|
|
17040
17054
|
var require_npm_run_path = __commonJS({
|
|
17041
17055
|
"node_modules/run-jxa/node_modules/npm-run-path/index.js"(exports, module) {
|
|
17042
17056
|
"use strict";
|
|
17043
|
-
var
|
|
17057
|
+
var path38 = __require("path");
|
|
17044
17058
|
var pathKey = require_path_key();
|
|
17045
17059
|
var npmRunPath = (options) => {
|
|
17046
17060
|
options = {
|
|
@@ -17050,16 +17064,16 @@ var require_npm_run_path = __commonJS({
|
|
|
17050
17064
|
...options
|
|
17051
17065
|
};
|
|
17052
17066
|
let previous;
|
|
17053
|
-
let cwdPath =
|
|
17067
|
+
let cwdPath = path38.resolve(options.cwd);
|
|
17054
17068
|
const result = [];
|
|
17055
17069
|
while (previous !== cwdPath) {
|
|
17056
|
-
result.push(
|
|
17070
|
+
result.push(path38.join(cwdPath, "node_modules/.bin"));
|
|
17057
17071
|
previous = cwdPath;
|
|
17058
|
-
cwdPath =
|
|
17072
|
+
cwdPath = path38.resolve(cwdPath, "..");
|
|
17059
17073
|
}
|
|
17060
|
-
const execPathDir =
|
|
17074
|
+
const execPathDir = path38.resolve(options.cwd, options.execPath, "..");
|
|
17061
17075
|
result.push(execPathDir);
|
|
17062
|
-
return result.concat(options.path).join(
|
|
17076
|
+
return result.concat(options.path).join(path38.delimiter);
|
|
17063
17077
|
};
|
|
17064
17078
|
module.exports = npmRunPath;
|
|
17065
17079
|
module.exports.default = npmRunPath;
|
|
@@ -17069,9 +17083,9 @@ var require_npm_run_path = __commonJS({
|
|
|
17069
17083
|
...options
|
|
17070
17084
|
};
|
|
17071
17085
|
const env3 = { ...options.env };
|
|
17072
|
-
const
|
|
17073
|
-
options.path = env3[
|
|
17074
|
-
env3[
|
|
17086
|
+
const path39 = pathKey({ env: env3 });
|
|
17087
|
+
options.path = env3[path39];
|
|
17088
|
+
env3[path39] = module.exports(options);
|
|
17075
17089
|
return env3;
|
|
17076
17090
|
};
|
|
17077
17091
|
}
|
|
@@ -17794,7 +17808,7 @@ var require_signal_exit3 = __commonJS({
|
|
|
17794
17808
|
var require_kill = __commonJS({
|
|
17795
17809
|
"node_modules/run-jxa/node_modules/execa/lib/kill.js"(exports, module) {
|
|
17796
17810
|
"use strict";
|
|
17797
|
-
var
|
|
17811
|
+
var os9 = __require("os");
|
|
17798
17812
|
var onExit = require_signal_exit3();
|
|
17799
17813
|
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
|
|
17800
17814
|
var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
@@ -17818,7 +17832,7 @@ var require_kill = __commonJS({
|
|
|
17818
17832
|
return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
|
|
17819
17833
|
};
|
|
17820
17834
|
var isSigterm = (signal) => {
|
|
17821
|
-
return signal ===
|
|
17835
|
+
return signal === os9.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
|
|
17822
17836
|
};
|
|
17823
17837
|
var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
|
|
17824
17838
|
if (forceKillAfterTimeout === true) {
|
|
@@ -17844,7 +17858,7 @@ var require_kill = __commonJS({
|
|
|
17844
17858
|
return spawnedPromise;
|
|
17845
17859
|
}
|
|
17846
17860
|
let timeoutId;
|
|
17847
|
-
const timeoutPromise = new Promise((
|
|
17861
|
+
const timeoutPromise = new Promise((resolve9, reject) => {
|
|
17848
17862
|
timeoutId = setTimeout(() => {
|
|
17849
17863
|
timeoutKill(spawned, killSignal, reject);
|
|
17850
17864
|
}, timeout);
|
|
@@ -17950,7 +17964,7 @@ var require_get_stream2 = __commonJS({
|
|
|
17950
17964
|
};
|
|
17951
17965
|
const { maxBuffer } = options;
|
|
17952
17966
|
const stream2 = bufferStream(options);
|
|
17953
|
-
await new Promise((
|
|
17967
|
+
await new Promise((resolve9, reject) => {
|
|
17954
17968
|
const rejectPromise = (error) => {
|
|
17955
17969
|
if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
17956
17970
|
error.bufferedData = stream2.getBufferedValue();
|
|
@@ -17960,7 +17974,7 @@ var require_get_stream2 = __commonJS({
|
|
|
17960
17974
|
(async () => {
|
|
17961
17975
|
try {
|
|
17962
17976
|
await streamPipelinePromisified(inputStream, stream2);
|
|
17963
|
-
|
|
17977
|
+
resolve9();
|
|
17964
17978
|
} catch (error) {
|
|
17965
17979
|
rejectPromise(error);
|
|
17966
17980
|
}
|
|
@@ -18117,9 +18131,9 @@ var require_promise = __commonJS({
|
|
|
18117
18131
|
return spawned;
|
|
18118
18132
|
};
|
|
18119
18133
|
var getSpawnedPromise = (spawned) => {
|
|
18120
|
-
return new Promise((
|
|
18134
|
+
return new Promise((resolve9, reject) => {
|
|
18121
18135
|
spawned.on("exit", (exitCode, signal) => {
|
|
18122
|
-
|
|
18136
|
+
resolve9({ exitCode, signal });
|
|
18123
18137
|
});
|
|
18124
18138
|
spawned.on("error", (error) => {
|
|
18125
18139
|
reject(error);
|
|
@@ -18187,7 +18201,7 @@ var require_command = __commonJS({
|
|
|
18187
18201
|
var require_execa = __commonJS({
|
|
18188
18202
|
"node_modules/run-jxa/node_modules/execa/index.js"(exports, module) {
|
|
18189
18203
|
"use strict";
|
|
18190
|
-
var
|
|
18204
|
+
var path38 = __require("path");
|
|
18191
18205
|
var childProcess3 = __require("child_process");
|
|
18192
18206
|
var crossSpawn = require_cross_spawn();
|
|
18193
18207
|
var stripFinalNewline = require_strip_final_newline();
|
|
@@ -18229,7 +18243,7 @@ var require_execa = __commonJS({
|
|
|
18229
18243
|
};
|
|
18230
18244
|
options.env = getEnv(options);
|
|
18231
18245
|
options.stdio = normalizeStdio(options);
|
|
18232
|
-
if (process.platform === "win32" &&
|
|
18246
|
+
if (process.platform === "win32" && path38.basename(file, ".exe") === "cmd") {
|
|
18233
18247
|
args.unshift("/q");
|
|
18234
18248
|
}
|
|
18235
18249
|
return { file, args, options, parsed };
|
|
@@ -25586,13 +25600,13 @@ var setTextNodeValue = (node, text) => {
|
|
|
25586
25600
|
markNodeAsDirty(node);
|
|
25587
25601
|
};
|
|
25588
25602
|
var getPathToRoot = (node) => {
|
|
25589
|
-
const
|
|
25603
|
+
const path38 = [];
|
|
25590
25604
|
let current = node;
|
|
25591
25605
|
while (current) {
|
|
25592
|
-
|
|
25606
|
+
path38.unshift(current);
|
|
25593
25607
|
current = current.parentNode;
|
|
25594
25608
|
}
|
|
25595
|
-
return
|
|
25609
|
+
return path38;
|
|
25596
25610
|
};
|
|
25597
25611
|
var isNodeSelectable = (node) => {
|
|
25598
25612
|
let current = node;
|
|
@@ -30070,8 +30084,8 @@ function Text({ color, backgroundColor, dimColor = false, bold = false, italic =
|
|
|
30070
30084
|
}
|
|
30071
30085
|
|
|
30072
30086
|
// node_modules/ink/build/components/ErrorOverview.js
|
|
30073
|
-
var cleanupPath = (
|
|
30074
|
-
return
|
|
30087
|
+
var cleanupPath = (path38) => {
|
|
30088
|
+
return path38?.replace(`file://${cwd()}/`, "");
|
|
30075
30089
|
};
|
|
30076
30090
|
var stackUtils = new import_stack_utils.default({
|
|
30077
30091
|
cwd: cwd(),
|
|
@@ -31267,12 +31281,12 @@ var TerminalWriter = class {
|
|
|
31267
31281
|
if (chunk) {
|
|
31268
31282
|
this.synchronizedWrite(chunk);
|
|
31269
31283
|
}
|
|
31270
|
-
await new Promise((
|
|
31284
|
+
await new Promise((resolve9) => {
|
|
31271
31285
|
let finished = false;
|
|
31272
31286
|
const timer = setTimeout(() => {
|
|
31273
31287
|
finished = true;
|
|
31274
31288
|
this.cancelSlowFlush = void 0;
|
|
31275
|
-
|
|
31289
|
+
resolve9();
|
|
31276
31290
|
}, 50);
|
|
31277
31291
|
this.cancelSlowFlush = () => {
|
|
31278
31292
|
if (!finished) {
|
|
@@ -31283,7 +31297,7 @@ var TerminalWriter = class {
|
|
|
31283
31297
|
this.outputBuffer = [];
|
|
31284
31298
|
}
|
|
31285
31299
|
this.cancelSlowFlush = void 0;
|
|
31286
|
-
|
|
31300
|
+
resolve9();
|
|
31287
31301
|
}
|
|
31288
31302
|
};
|
|
31289
31303
|
});
|
|
@@ -31674,8 +31688,8 @@ var AnimationController = class {
|
|
|
31674
31688
|
if (!this.isRunning) {
|
|
31675
31689
|
return;
|
|
31676
31690
|
}
|
|
31677
|
-
return new Promise((
|
|
31678
|
-
this.idleResolvers.push(
|
|
31691
|
+
return new Promise((resolve9) => {
|
|
31692
|
+
this.idleResolvers.push(resolve9);
|
|
31679
31693
|
});
|
|
31680
31694
|
}
|
|
31681
31695
|
/**
|
|
@@ -31715,8 +31729,8 @@ var AnimationController = class {
|
|
|
31715
31729
|
clearInterval(this.intervalId);
|
|
31716
31730
|
this.intervalId = void 0;
|
|
31717
31731
|
}
|
|
31718
|
-
for (const
|
|
31719
|
-
|
|
31732
|
+
for (const resolve9 of this.idleResolvers) {
|
|
31733
|
+
resolve9();
|
|
31720
31734
|
}
|
|
31721
31735
|
this.idleResolvers = [];
|
|
31722
31736
|
}
|
|
@@ -33221,11 +33235,11 @@ var TerminalBuffer = class {
|
|
|
33221
33235
|
if (!this.worker?.connected) {
|
|
33222
33236
|
return 0;
|
|
33223
33237
|
}
|
|
33224
|
-
return new Promise((
|
|
33238
|
+
return new Promise((resolve9) => {
|
|
33225
33239
|
const handler2 = (message) => {
|
|
33226
33240
|
if (message.type === "linesUpdated") {
|
|
33227
33241
|
this.worker?.off("message", handler2);
|
|
33228
|
-
|
|
33242
|
+
resolve9(message.count);
|
|
33229
33243
|
}
|
|
33230
33244
|
};
|
|
33231
33245
|
this.worker?.on("message", handler2);
|
|
@@ -33234,7 +33248,7 @@ var TerminalBuffer = class {
|
|
|
33234
33248
|
} catch (error) {
|
|
33235
33249
|
this.worker?.off("message", handler2);
|
|
33236
33250
|
console.error("Failed to send getLinesUpdated message to worker:", error);
|
|
33237
|
-
|
|
33251
|
+
resolve9(0);
|
|
33238
33252
|
}
|
|
33239
33253
|
});
|
|
33240
33254
|
}
|
|
@@ -33746,8 +33760,8 @@ var Ink = class {
|
|
|
33746
33760
|
}
|
|
33747
33761
|
}
|
|
33748
33762
|
async waitUntilExit() {
|
|
33749
|
-
this.exitPromise ||= new Promise((
|
|
33750
|
-
this.resolveExitPromise =
|
|
33763
|
+
this.exitPromise ||= new Promise((resolve9, reject) => {
|
|
33764
|
+
this.resolveExitPromise = resolve9;
|
|
33751
33765
|
this.rejectExitPromise = reject;
|
|
33752
33766
|
});
|
|
33753
33767
|
return this.exitPromise;
|
|
@@ -34546,7 +34560,7 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
|
|
|
34546
34560
|
process.on("exit", cleanupTerminalOnExit);
|
|
34547
34561
|
process.on("SIGTERM", cleanupTerminalOnExit);
|
|
34548
34562
|
process.on("SIGINT", cleanupTerminalOnExit);
|
|
34549
|
-
return new Promise((
|
|
34563
|
+
return new Promise((resolve9) => {
|
|
34550
34564
|
const originalRawMode = process.stdin.isRaw;
|
|
34551
34565
|
if (!originalRawMode) {
|
|
34552
34566
|
process.stdin.setRawMode(true);
|
|
@@ -34567,7 +34581,7 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
|
|
|
34567
34581
|
process.stdin.setRawMode(false);
|
|
34568
34582
|
}
|
|
34569
34583
|
this.detectionComplete = true;
|
|
34570
|
-
|
|
34584
|
+
resolve9();
|
|
34571
34585
|
};
|
|
34572
34586
|
timeoutId = setTimeout(cleanup, 1e3);
|
|
34573
34587
|
const onData = (data) => {
|
|
@@ -38960,7 +38974,6 @@ var ThemeManager = class {
|
|
|
38960
38974
|
try {
|
|
38961
38975
|
const theme2 = createCustomTheme(themeWithDefaults);
|
|
38962
38976
|
this.extensionThemes.set(namespacedName, theme2);
|
|
38963
|
-
debugLogger.log(`Registered theme: ${namespacedName}`);
|
|
38964
38977
|
} catch (error) {
|
|
38965
38978
|
debugLogger.warn(
|
|
38966
38979
|
`Failed to load custom theme "${namespacedName}":`,
|
|
@@ -38986,7 +38999,6 @@ var ThemeManager = class {
|
|
|
38986
38999
|
for (const theme2 of customThemes) {
|
|
38987
39000
|
const namespacedName = `${theme2.name} (${extensionName})`;
|
|
38988
39001
|
this.extensionThemes.delete(namespacedName);
|
|
38989
|
-
debugLogger.log(`Unregistered theme: ${namespacedName}`);
|
|
38990
39002
|
}
|
|
38991
39003
|
}
|
|
38992
39004
|
/**
|
|
@@ -39445,7 +39457,7 @@ var import_react34 = __toESM(require_react(), 1);
|
|
|
39445
39457
|
function useIdeTrustListener() {
|
|
39446
39458
|
const settings = useSettings();
|
|
39447
39459
|
const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
|
|
39448
|
-
|
|
39460
|
+
IDEConnectionStatus.Disconnected
|
|
39449
39461
|
);
|
|
39450
39462
|
const previousTrust = (0, import_react34.useRef)(void 0);
|
|
39451
39463
|
const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
|
|
@@ -39475,7 +39487,7 @@ function useIdeTrustListener() {
|
|
|
39475
39487
|
};
|
|
39476
39488
|
}, []);
|
|
39477
39489
|
const getSnapshot = () => {
|
|
39478
|
-
if (connectionStatus !==
|
|
39490
|
+
if (connectionStatus !== IDEConnectionStatus.Connected) {
|
|
39479
39491
|
return void 0;
|
|
39480
39492
|
}
|
|
39481
39493
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
@@ -40180,7 +40192,7 @@ async function initializeApp(config, settings) {
|
|
|
40180
40192
|
await ideClient.connect();
|
|
40181
40193
|
logIdeConnection(
|
|
40182
40194
|
config,
|
|
40183
|
-
new IdeConnectionEvent(
|
|
40195
|
+
new IdeConnectionEvent(IdeConnectionType.START)
|
|
40184
40196
|
);
|
|
40185
40197
|
}).catch((e) => {
|
|
40186
40198
|
debugLogger.error("Failed to initialize IDE client:", e);
|
|
@@ -40198,16 +40210,16 @@ async function initializeApp(config, settings) {
|
|
|
40198
40210
|
// packages/cli/src/config/auth.ts
|
|
40199
40211
|
function validateAuthMethod(authMethod) {
|
|
40200
40212
|
loadEnvironment(loadSettings().merged, process.cwd());
|
|
40201
|
-
if (authMethod ===
|
|
40213
|
+
if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
|
|
40202
40214
|
return null;
|
|
40203
40215
|
}
|
|
40204
|
-
if (authMethod ===
|
|
40216
|
+
if (authMethod === AuthType.USE_GEMINI) {
|
|
40205
40217
|
if (!process.env["GEMINI_API_KEY"]) {
|
|
40206
40218
|
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)!";
|
|
40207
40219
|
}
|
|
40208
40220
|
return null;
|
|
40209
40221
|
}
|
|
40210
|
-
if (authMethod ===
|
|
40222
|
+
if (authMethod === AuthType.USE_VERTEX_AI) {
|
|
40211
40223
|
const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
|
|
40212
40224
|
const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
|
|
40213
40225
|
if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
|
|
@@ -40265,25 +40277,25 @@ async function promptForConsentNonInteractive(prompt, defaultValue = true) {
|
|
|
40265
40277
|
input: process.stdin,
|
|
40266
40278
|
output: process.stdout
|
|
40267
40279
|
});
|
|
40268
|
-
return new Promise((
|
|
40280
|
+
return new Promise((resolve9) => {
|
|
40269
40281
|
rl.question(prompt, (answer) => {
|
|
40270
40282
|
rl.close();
|
|
40271
40283
|
const trimmedAnswer = answer.trim().toLowerCase();
|
|
40272
40284
|
if (trimmedAnswer === "") {
|
|
40273
|
-
|
|
40285
|
+
resolve9(defaultValue);
|
|
40274
40286
|
} else {
|
|
40275
|
-
|
|
40287
|
+
resolve9(["y", "yes"].includes(trimmedAnswer));
|
|
40276
40288
|
}
|
|
40277
40289
|
});
|
|
40278
40290
|
});
|
|
40279
40291
|
}
|
|
40280
40292
|
async function promptForConsentInteractive(prompt, addExtensionUpdateConfirmationRequest, clearConfirmationRequest) {
|
|
40281
|
-
return new Promise((
|
|
40293
|
+
return new Promise((resolve9) => {
|
|
40282
40294
|
addExtensionUpdateConfirmationRequest({
|
|
40283
40295
|
prompt,
|
|
40284
40296
|
onConfirm: (resolvedConfirmed) => {
|
|
40285
40297
|
clearConfirmationRequest?.();
|
|
40286
|
-
setImmediate(() =>
|
|
40298
|
+
setImmediate(() => resolve9(resolvedConfirmed));
|
|
40287
40299
|
}
|
|
40288
40300
|
});
|
|
40289
40301
|
});
|
|
@@ -40804,8 +40816,8 @@ var Override = class _Override {
|
|
|
40804
40816
|
output() {
|
|
40805
40817
|
return `${this.isDisable ? "!" : ""}${this.baseRule}${this.includeSubdirs ? "*" : ""}`;
|
|
40806
40818
|
}
|
|
40807
|
-
matchesPath(
|
|
40808
|
-
return this.asRegex().test(
|
|
40819
|
+
matchesPath(path38) {
|
|
40820
|
+
return this.asRegex().test(path38);
|
|
40809
40821
|
}
|
|
40810
40822
|
};
|
|
40811
40823
|
var ensureLeadingAndTrailingSlash = function(dirPath) {
|
|
@@ -43946,7 +43958,7 @@ async function fetchJson(url, redirectCount = 0) {
|
|
|
43946
43958
|
if (token) {
|
|
43947
43959
|
headers.Authorization = `token ${token}`;
|
|
43948
43960
|
}
|
|
43949
|
-
return new Promise((
|
|
43961
|
+
return new Promise((resolve9, reject) => {
|
|
43950
43962
|
https.get(url, { headers }, (res) => {
|
|
43951
43963
|
if (res.statusCode === 302 || res.statusCode === 301) {
|
|
43952
43964
|
if (redirectCount >= 10) {
|
|
@@ -43959,7 +43971,7 @@ async function fetchJson(url, redirectCount = 0) {
|
|
|
43959
43971
|
fetchJson(
|
|
43960
43972
|
new URL(res.headers.location, url).toString(),
|
|
43961
43973
|
redirectCount + 1
|
|
43962
|
-
).then(
|
|
43974
|
+
).then(resolve9).catch(reject);
|
|
43963
43975
|
return;
|
|
43964
43976
|
}
|
|
43965
43977
|
if (res.statusCode !== 200) {
|
|
@@ -43971,7 +43983,7 @@ async function fetchJson(url, redirectCount = 0) {
|
|
|
43971
43983
|
res.on("data", (chunk) => chunks.push(chunk));
|
|
43972
43984
|
res.on("end", () => {
|
|
43973
43985
|
const data = Buffer.concat(chunks).toString();
|
|
43974
|
-
|
|
43986
|
+
resolve9(JSON.parse(data));
|
|
43975
43987
|
});
|
|
43976
43988
|
}).on("error", reject);
|
|
43977
43989
|
});
|
|
@@ -44331,7 +44343,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
|
|
|
44331
44343
|
if (token) {
|
|
44332
44344
|
headers["Authorization"] = `token ${token}`;
|
|
44333
44345
|
}
|
|
44334
|
-
return new Promise((
|
|
44346
|
+
return new Promise((resolve9, reject) => {
|
|
44335
44347
|
https2.get(url, { headers }, (res) => {
|
|
44336
44348
|
if (res.statusCode === 302 || res.statusCode === 301) {
|
|
44337
44349
|
if (redirectCount >= 10) {
|
|
@@ -44342,7 +44354,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
|
|
|
44342
44354
|
new Error("Redirect response missing Location header")
|
|
44343
44355
|
);
|
|
44344
44356
|
}
|
|
44345
|
-
downloadFile(res.headers.location, dest, options, redirectCount + 1).then(
|
|
44357
|
+
downloadFile(res.headers.location, dest, options, redirectCount + 1).then(resolve9).catch(reject);
|
|
44346
44358
|
return;
|
|
44347
44359
|
}
|
|
44348
44360
|
if (res.statusCode !== 200) {
|
|
@@ -44352,7 +44364,7 @@ async function downloadFile(url, dest, options, redirectCount = 0) {
|
|
|
44352
44364
|
}
|
|
44353
44365
|
const file = fs15.createWriteStream(dest);
|
|
44354
44366
|
res.pipe(file);
|
|
44355
|
-
file.on("finish", () => file.close(
|
|
44367
|
+
file.on("finish", () => file.close(resolve9));
|
|
44356
44368
|
}).on("error", reject);
|
|
44357
44369
|
});
|
|
44358
44370
|
}
|
|
@@ -44627,7 +44639,7 @@ var ExtensionManager = class extends ExtensionLoader {
|
|
|
44627
44639
|
const trustedFolders = loadTrustedFolders();
|
|
44628
44640
|
await trustedFolders.setValue(
|
|
44629
44641
|
this.workspaceDir,
|
|
44630
|
-
|
|
44642
|
+
TrustLevel.TRUST_FOLDER
|
|
44631
44643
|
);
|
|
44632
44644
|
} else {
|
|
44633
44645
|
throw new Error(
|
|
@@ -44813,7 +44825,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44813
44825
|
newExtensionConfig.version,
|
|
44814
44826
|
previousExtensionConfig.version,
|
|
44815
44827
|
installMetadata.type,
|
|
44816
|
-
|
|
44828
|
+
CoreToolCallStatus.Success
|
|
44817
44829
|
)
|
|
44818
44830
|
);
|
|
44819
44831
|
if (newExtensionName !== previousName) {
|
|
@@ -44836,7 +44848,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44836
44848
|
getExtensionId(newExtensionConfig, installMetadata),
|
|
44837
44849
|
newExtensionConfig.version,
|
|
44838
44850
|
installMetadata.type,
|
|
44839
|
-
|
|
44851
|
+
CoreToolCallStatus.Success
|
|
44840
44852
|
)
|
|
44841
44853
|
);
|
|
44842
44854
|
await this.enableExtension(
|
|
@@ -44869,7 +44881,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44869
44881
|
newExtensionConfig?.version ?? "",
|
|
44870
44882
|
previousExtensionConfig.version,
|
|
44871
44883
|
installMetadata.type,
|
|
44872
|
-
|
|
44884
|
+
CoreToolCallStatus.Error
|
|
44873
44885
|
)
|
|
44874
44886
|
);
|
|
44875
44887
|
} else {
|
|
@@ -44881,7 +44893,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44881
44893
|
extensionId ?? "",
|
|
44882
44894
|
newExtensionConfig?.version ?? "",
|
|
44883
44895
|
installMetadata.type,
|
|
44884
|
-
|
|
44896
|
+
CoreToolCallStatus.Error
|
|
44885
44897
|
)
|
|
44886
44898
|
);
|
|
44887
44899
|
}
|
|
@@ -44912,7 +44924,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44912
44924
|
extension.name,
|
|
44913
44925
|
hashValue(extension.name),
|
|
44914
44926
|
extension.id,
|
|
44915
|
-
|
|
44927
|
+
CoreToolCallStatus.Success
|
|
44916
44928
|
)
|
|
44917
44929
|
);
|
|
44918
44930
|
}
|
|
@@ -45182,7 +45194,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
45182
45194
|
if (eventHooks) {
|
|
45183
45195
|
for (const definition of eventHooks) {
|
|
45184
45196
|
for (const hook of definition.hooks) {
|
|
45185
|
-
if (hook.type ===
|
|
45197
|
+
if (hook.type === HookType.Command) {
|
|
45186
45198
|
hook.env = { ...hook.env, ...hookEnv };
|
|
45187
45199
|
}
|
|
45188
45200
|
}
|
|
@@ -45511,7 +45523,7 @@ function validateName(name) {
|
|
|
45511
45523
|
}
|
|
45512
45524
|
}
|
|
45513
45525
|
async function inferInstallMetadata(source2, args = {}) {
|
|
45514
|
-
if (source2.startsWith("http://") || source2.startsWith("https://") || source2.startsWith("git@") || source2.startsWith("sso://") || source2.startsWith("github:") || source2.startsWith("gitlab:")) {
|
|
45526
|
+
if (source2.startsWith("http://") || source2.startsWith("https://") || source2.startsWith("git@") || source2.startsWith("sso://") || source2.startsWith("github:") || source2.startsWith("gitlab:") || source2.startsWith("ssh://")) {
|
|
45515
45527
|
return {
|
|
45516
45528
|
source: source2,
|
|
45517
45529
|
type: "git",
|
|
@@ -45833,9 +45845,9 @@ function isSettingsValue(value) {
|
|
|
45833
45845
|
const type = typeof value;
|
|
45834
45846
|
return type === "string" || type === "number" || type === "boolean" || type === "object";
|
|
45835
45847
|
}
|
|
45836
|
-
function getNestedValue(obj,
|
|
45848
|
+
function getNestedValue(obj, path38) {
|
|
45837
45849
|
let current = obj;
|
|
45838
|
-
for (const key of
|
|
45850
|
+
for (const key of path38) {
|
|
45839
45851
|
if (!isRecord(current) || !(key in current)) {
|
|
45840
45852
|
return void 0;
|
|
45841
45853
|
}
|
|
@@ -45848,8 +45860,8 @@ function getEffectiveValue(key, settings) {
|
|
|
45848
45860
|
if (!definition) {
|
|
45849
45861
|
return void 0;
|
|
45850
45862
|
}
|
|
45851
|
-
const
|
|
45852
|
-
const value = getNestedValue(settings,
|
|
45863
|
+
const path38 = key.split(".");
|
|
45864
|
+
const value = getNestedValue(settings, path38);
|
|
45853
45865
|
if (value !== void 0 && isSettingsValue(value)) {
|
|
45854
45866
|
return value;
|
|
45855
45867
|
}
|
|
@@ -45859,8 +45871,8 @@ function getDialogSettingKeys() {
|
|
|
45859
45871
|
return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
|
|
45860
45872
|
}
|
|
45861
45873
|
function isInSettingsScope(key, scopeSettings) {
|
|
45862
|
-
const
|
|
45863
|
-
const value = getNestedValue(scopeSettings,
|
|
45874
|
+
const path38 = key.split(".");
|
|
45875
|
+
const value = getNestedValue(scopeSettings, path38);
|
|
45864
45876
|
return value !== void 0;
|
|
45865
45877
|
}
|
|
45866
45878
|
function getDisplayValue(key, scopeSettings, _mergedSettings) {
|
|
@@ -46214,7 +46226,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
46214
46226
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
46215
46227
|
name: `resources/read (${resource.serverName})`,
|
|
46216
46228
|
description: resource.uri,
|
|
46217
|
-
status:
|
|
46229
|
+
status: CoreToolCallStatus.Success,
|
|
46218
46230
|
isClientInitiated: true,
|
|
46219
46231
|
resultDisplay: `Successfully read resource ${resource.uri}`,
|
|
46220
46232
|
confirmationDetails: void 0
|
|
@@ -46229,7 +46241,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
46229
46241
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
46230
46242
|
name: `resources/read (${resource.serverName})`,
|
|
46231
46243
|
description: resource.uri,
|
|
46232
|
-
status:
|
|
46244
|
+
status: CoreToolCallStatus.Error,
|
|
46233
46245
|
isClientInitiated: true,
|
|
46234
46246
|
resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
|
|
46235
46247
|
confirmationDetails: void 0
|
|
@@ -46254,7 +46266,7 @@ Content from @${result.uri}:
|
|
|
46254
46266
|
}
|
|
46255
46267
|
if (hasError) {
|
|
46256
46268
|
const firstError = displays.find(
|
|
46257
|
-
(d) => d.status ===
|
|
46269
|
+
(d) => d.status === CoreToolCallStatus.Error
|
|
46258
46270
|
);
|
|
46259
46271
|
return {
|
|
46260
46272
|
parts: [],
|
|
@@ -46290,7 +46302,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
|
|
|
46290
46302
|
callId: `client-read-${userMessageTimestamp}`,
|
|
46291
46303
|
name: readManyFilesTool.displayName,
|
|
46292
46304
|
description: invocation.getDescription(),
|
|
46293
|
-
status:
|
|
46305
|
+
status: CoreToolCallStatus.Success,
|
|
46294
46306
|
isClientInitiated: true,
|
|
46295
46307
|
resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
|
|
46296
46308
|
confirmationDetails: void 0
|
|
@@ -46337,7 +46349,7 @@ Content from @${displayPath}:
|
|
|
46337
46349
|
callId: `client-read-${userMessageTimestamp}`,
|
|
46338
46350
|
name: readManyFilesTool.displayName,
|
|
46339
46351
|
description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
|
|
46340
|
-
status:
|
|
46352
|
+
status: CoreToolCallStatus.Error,
|
|
46341
46353
|
isClientInitiated: true,
|
|
46342
46354
|
resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
|
|
46343
46355
|
confirmationDetails: void 0
|
|
@@ -46925,7 +46937,7 @@ async function writeClipboardImages(filePaths) {
|
|
|
46925
46937
|
if (process22.platform !== "darwin") {
|
|
46926
46938
|
return;
|
|
46927
46939
|
}
|
|
46928
|
-
const paths = filePaths.map((
|
|
46940
|
+
const paths = filePaths.map((path38) => path38 instanceof URL ? fileURLToPath2(path38) : path38);
|
|
46929
46941
|
await runJxa((...paths2) => {
|
|
46930
46942
|
ObjC.import("AppKit");
|
|
46931
46943
|
ObjC.import("Foundation");
|
|
@@ -47428,7 +47440,7 @@ var OSC52_FOOTER = BEL3;
|
|
|
47428
47440
|
var MAX_OSC52_BODY_B64_BYTES = MAX_OSC52_SEQUENCE_BYTES - Buffer.byteLength(OSC52_HEADER) - Buffer.byteLength(OSC52_FOOTER);
|
|
47429
47441
|
var MAX_OSC52_DATA_BYTES = Math.floor(MAX_OSC52_BODY_B64_BYTES / 4) * 3;
|
|
47430
47442
|
var SCREEN_DCS_CHUNK_SIZE = 240;
|
|
47431
|
-
var pickTty = () => new Promise((
|
|
47443
|
+
var pickTty = () => new Promise((resolve9) => {
|
|
47432
47444
|
if (process.platform !== "win32") {
|
|
47433
47445
|
try {
|
|
47434
47446
|
const devTty = fs22.createWriteStream("/dev/tty");
|
|
@@ -47436,25 +47448,25 @@ var pickTty = () => new Promise((resolve8) => {
|
|
|
47436
47448
|
devTty.removeAllListeners("open");
|
|
47437
47449
|
devTty.removeAllListeners("error");
|
|
47438
47450
|
devTty.destroy();
|
|
47439
|
-
|
|
47451
|
+
resolve9(getStdioTty());
|
|
47440
47452
|
}, 100);
|
|
47441
47453
|
devTty.once("open", () => {
|
|
47442
47454
|
clearTimeout(timeout);
|
|
47443
47455
|
devTty.removeAllListeners("error");
|
|
47444
47456
|
devTty.on("error", () => {
|
|
47445
47457
|
});
|
|
47446
|
-
|
|
47458
|
+
resolve9({ stream: devTty, closeAfter: true });
|
|
47447
47459
|
});
|
|
47448
47460
|
devTty.once("error", () => {
|
|
47449
47461
|
clearTimeout(timeout);
|
|
47450
47462
|
devTty.removeAllListeners("open");
|
|
47451
|
-
|
|
47463
|
+
resolve9(getStdioTty());
|
|
47452
47464
|
});
|
|
47453
47465
|
return;
|
|
47454
47466
|
} catch {
|
|
47455
47467
|
}
|
|
47456
47468
|
}
|
|
47457
|
-
|
|
47469
|
+
resolve9(getStdioTty());
|
|
47458
47470
|
});
|
|
47459
47471
|
var getStdioTty = () => {
|
|
47460
47472
|
if (process.platform === "win32") {
|
|
@@ -47508,12 +47520,12 @@ var wrapForScreen = (seq) => {
|
|
|
47508
47520
|
}
|
|
47509
47521
|
return out;
|
|
47510
47522
|
};
|
|
47511
|
-
var writeAll = (stream, data) => new Promise((
|
|
47523
|
+
var writeAll = (stream, data) => new Promise((resolve9, reject) => {
|
|
47512
47524
|
const fd = stream.fd;
|
|
47513
47525
|
if (process.platform === "win32" && typeof fd === "number" && (stream === process.stdout || stream === process.stderr)) {
|
|
47514
47526
|
try {
|
|
47515
47527
|
fs22.writeSync(fd, data);
|
|
47516
|
-
|
|
47528
|
+
resolve9();
|
|
47517
47529
|
return;
|
|
47518
47530
|
} catch (e) {
|
|
47519
47531
|
debugLogger.warn(
|
|
@@ -47528,7 +47540,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
|
|
|
47528
47540
|
};
|
|
47529
47541
|
const onDrain = () => {
|
|
47530
47542
|
cleanup();
|
|
47531
|
-
|
|
47543
|
+
resolve9();
|
|
47532
47544
|
};
|
|
47533
47545
|
const cleanup = () => {
|
|
47534
47546
|
stream.off("error", onError);
|
|
@@ -47537,7 +47549,7 @@ var writeAll = (stream, data) => new Promise((resolve8, reject) => {
|
|
|
47537
47549
|
stream.once("error", onError);
|
|
47538
47550
|
if (stream.write(data)) {
|
|
47539
47551
|
cleanup();
|
|
47540
|
-
|
|
47552
|
+
resolve9();
|
|
47541
47553
|
} else {
|
|
47542
47554
|
stream.once("drain", onDrain);
|
|
47543
47555
|
}
|
|
@@ -47667,14 +47679,14 @@ function getUserLinuxClipboardTool() {
|
|
|
47667
47679
|
}
|
|
47668
47680
|
}
|
|
47669
47681
|
async function saveFromCommand(command, args, destination) {
|
|
47670
|
-
return new Promise((
|
|
47682
|
+
return new Promise((resolve9) => {
|
|
47671
47683
|
const child = spawn(command, args);
|
|
47672
47684
|
const fileStream = createWriteStream2(destination);
|
|
47673
47685
|
let resolved = false;
|
|
47674
47686
|
const safeResolve = (value) => {
|
|
47675
47687
|
if (!resolved) {
|
|
47676
47688
|
resolved = true;
|
|
47677
|
-
|
|
47689
|
+
resolve9(value);
|
|
47678
47690
|
}
|
|
47679
47691
|
};
|
|
47680
47692
|
child.stdout.pipe(fileStream);
|
|
@@ -49532,7 +49544,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
|
|
|
49532
49544
|
throw err;
|
|
49533
49545
|
}
|
|
49534
49546
|
} else {
|
|
49535
|
-
await new Promise((
|
|
49547
|
+
await new Promise((resolve9, reject) => {
|
|
49536
49548
|
const child = spawn2(executable, [...initialArgs, ...args], {
|
|
49537
49549
|
stdio: "inherit",
|
|
49538
49550
|
shell: process.platform === "win32"
|
|
@@ -49557,7 +49569,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
|
|
|
49557
49569
|
);
|
|
49558
49570
|
reject(err);
|
|
49559
49571
|
} else {
|
|
49560
|
-
|
|
49572
|
+
resolve9();
|
|
49561
49573
|
}
|
|
49562
49574
|
});
|
|
49563
49575
|
});
|
|
@@ -49566,7 +49578,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
|
|
|
49566
49578
|
if (wasRaw) {
|
|
49567
49579
|
setRawMode?.(true);
|
|
49568
49580
|
}
|
|
49569
|
-
coreEvents.emit(
|
|
49581
|
+
coreEvents.emit(CoreEvent.ExternalEditorClosed);
|
|
49570
49582
|
}
|
|
49571
49583
|
}
|
|
49572
49584
|
|
|
@@ -52256,7 +52268,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
|
|
|
52256
52268
|
extension.name,
|
|
52257
52269
|
installMetadata
|
|
52258
52270
|
);
|
|
52259
|
-
if (status ===
|
|
52271
|
+
if (status === IntegrityDataStatus.INVALID) {
|
|
52260
52272
|
throw new Error("Extension integrity cannot be verified");
|
|
52261
52273
|
}
|
|
52262
52274
|
} catch (e) {
|
|
@@ -53674,11 +53686,11 @@ var ShellProcessor = class {
|
|
|
53674
53686
|
},
|
|
53675
53687
|
void 0
|
|
53676
53688
|
);
|
|
53677
|
-
if (decision ===
|
|
53689
|
+
if (decision === PolicyDecision.DENY) {
|
|
53678
53690
|
throw new Error(
|
|
53679
53691
|
`${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
|
|
53680
53692
|
);
|
|
53681
|
-
} else if (decision ===
|
|
53693
|
+
} else if (decision === PolicyDecision.ASK_USER) {
|
|
53682
53694
|
commandsToConfirm.add(command);
|
|
53683
53695
|
}
|
|
53684
53696
|
}
|
|
@@ -53935,14 +53947,17 @@ var FileCommandLoader = class {
|
|
|
53935
53947
|
getCommandDirectories() {
|
|
53936
53948
|
const dirs = [];
|
|
53937
53949
|
const storage = this.config?.storage ?? new Storage(this.projectRoot);
|
|
53950
|
+
const userCommandsDir = Storage.getUserCommandsDir();
|
|
53938
53951
|
dirs.push({
|
|
53939
|
-
path:
|
|
53952
|
+
path: userCommandsDir,
|
|
53940
53953
|
kind: "user-file" /* USER_FILE */
|
|
53941
53954
|
});
|
|
53942
|
-
|
|
53943
|
-
|
|
53944
|
-
|
|
53945
|
-
|
|
53955
|
+
if (!storage.isWorkspaceHomeDir()) {
|
|
53956
|
+
dirs.push({
|
|
53957
|
+
path: storage.getProjectCommandsDir(),
|
|
53958
|
+
kind: "workspace-file" /* WORKSPACE_FILE */
|
|
53959
|
+
});
|
|
53960
|
+
}
|
|
53946
53961
|
if (this.config) {
|
|
53947
53962
|
const activeExtensions = this.config.getExtensions().filter((ext) => ext.isActive).sort((a, b2) => a.name.localeCompare(b2.name));
|
|
53948
53963
|
const extensionCommandDirs = activeExtensions.map((ext) => ({
|
|
@@ -54793,7 +54808,7 @@ var MultiFolderTrustDialog = ({
|
|
|
54793
54808
|
if (choice === 1 /* YES_AND_REMEMBER */) {
|
|
54794
54809
|
await trustedFolders.setValue(
|
|
54795
54810
|
expandedPath,
|
|
54796
|
-
|
|
54811
|
+
TrustLevel.TRUST_FOLDER
|
|
54797
54812
|
);
|
|
54798
54813
|
}
|
|
54799
54814
|
workspaceContext.addDirectory(expandedPath);
|
|
@@ -55947,10 +55962,10 @@ function enableFeature(settings, featureName, strategy) {
|
|
|
55947
55962
|
};
|
|
55948
55963
|
}
|
|
55949
55964
|
const modifiedScopes = [];
|
|
55950
|
-
for (const { scope, path:
|
|
55965
|
+
for (const { scope, path: path38 } of foundInDisabledScopes) {
|
|
55951
55966
|
if (isLoadableSettingScope(scope)) {
|
|
55952
55967
|
strategy.enable(settings, scope, featureName);
|
|
55953
|
-
modifiedScopes.push({ scope, path:
|
|
55968
|
+
modifiedScopes.push({ scope, path: path38 });
|
|
55954
55969
|
}
|
|
55955
55970
|
}
|
|
55956
55971
|
return {
|
|
@@ -56441,7 +56456,7 @@ var authCommand = {
|
|
|
56441
56456
|
import process28 from "node:process";
|
|
56442
56457
|
|
|
56443
56458
|
// packages/cli/src/generated/git-commit.ts
|
|
56444
|
-
var GIT_COMMIT_INFO = "
|
|
56459
|
+
var GIT_COMMIT_INFO = "31ea2a85b";
|
|
56445
56460
|
|
|
56446
56461
|
// packages/cli/src/ui/utils/historyExportUtils.ts
|
|
56447
56462
|
import * as fsPromises from "node:fs/promises";
|
|
@@ -57087,7 +57102,7 @@ var clearCommand = {
|
|
|
57087
57102
|
const config = context.services.agentContext?.config;
|
|
57088
57103
|
const hookSystem = config?.getHookSystem();
|
|
57089
57104
|
if (hookSystem) {
|
|
57090
|
-
await hookSystem.fireSessionEndEvent(
|
|
57105
|
+
await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
|
|
57091
57106
|
}
|
|
57092
57107
|
config?.injectionService.clear();
|
|
57093
57108
|
let newSessionId;
|
|
@@ -57104,9 +57119,9 @@ var clearCommand = {
|
|
|
57104
57119
|
}
|
|
57105
57120
|
let result;
|
|
57106
57121
|
if (hookSystem) {
|
|
57107
|
-
result = await hookSystem.fireSessionStartEvent(
|
|
57122
|
+
result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
|
|
57108
57123
|
}
|
|
57109
|
-
await new Promise((
|
|
57124
|
+
await new Promise((resolve9) => setImmediate(resolve9));
|
|
57110
57125
|
if (config) {
|
|
57111
57126
|
await flushTelemetry(config);
|
|
57112
57127
|
}
|
|
@@ -57380,10 +57395,85 @@ ${docsUrl}`
|
|
|
57380
57395
|
}
|
|
57381
57396
|
};
|
|
57382
57397
|
|
|
57398
|
+
// packages/cli/src/ui/commands/exportSessionCommand.ts
|
|
57399
|
+
import * as fs30 from "node:fs/promises";
|
|
57400
|
+
import * as path27 from "node:path";
|
|
57401
|
+
var exportSessionCommand = {
|
|
57402
|
+
name: "export-session",
|
|
57403
|
+
description: "Export the current session to a JSON file",
|
|
57404
|
+
kind: "built-in" /* BUILT_IN */,
|
|
57405
|
+
autoExecute: true,
|
|
57406
|
+
action: async (context) => {
|
|
57407
|
+
const { ui: ui2 } = context;
|
|
57408
|
+
const args = context.invocation?.args.trim();
|
|
57409
|
+
if (!args) {
|
|
57410
|
+
return {
|
|
57411
|
+
type: "message",
|
|
57412
|
+
messageType: "error",
|
|
57413
|
+
content: "Please provide a file path to export the session to. Example: /export-session ./my-session.json"
|
|
57414
|
+
};
|
|
57415
|
+
}
|
|
57416
|
+
const sessionId = context.services.agentContext?.config.getSessionId();
|
|
57417
|
+
if (!sessionId) {
|
|
57418
|
+
return {
|
|
57419
|
+
type: "message",
|
|
57420
|
+
messageType: "error",
|
|
57421
|
+
content: "No active session found to export."
|
|
57422
|
+
};
|
|
57423
|
+
}
|
|
57424
|
+
if (ui2.pendingItem) {
|
|
57425
|
+
ui2.addItem(
|
|
57426
|
+
{
|
|
57427
|
+
type: "error" /* ERROR */,
|
|
57428
|
+
text: "Operation already in progress, please wait."
|
|
57429
|
+
},
|
|
57430
|
+
Date.now()
|
|
57431
|
+
);
|
|
57432
|
+
return;
|
|
57433
|
+
}
|
|
57434
|
+
const pendingMessage = {
|
|
57435
|
+
type: "export_session" /* EXPORT_SESSION */,
|
|
57436
|
+
exportSession: {
|
|
57437
|
+
isPending: true
|
|
57438
|
+
}
|
|
57439
|
+
};
|
|
57440
|
+
try {
|
|
57441
|
+
ui2.setPendingItem(pendingMessage);
|
|
57442
|
+
const storage = context.services.agentContext.config.storage;
|
|
57443
|
+
const sessionSelector = new SessionSelector(storage);
|
|
57444
|
+
const { sessionData } = await sessionSelector.resolveSession(sessionId);
|
|
57445
|
+
const targetPath = path27.resolve(process.cwd(), args);
|
|
57446
|
+
await fs30.writeFile(
|
|
57447
|
+
targetPath,
|
|
57448
|
+
JSON.stringify(sessionData, null, 2),
|
|
57449
|
+
"utf-8"
|
|
57450
|
+
);
|
|
57451
|
+
ui2.addItem(
|
|
57452
|
+
{
|
|
57453
|
+
type: "export_session" /* EXPORT_SESSION */,
|
|
57454
|
+
exportSession: {
|
|
57455
|
+
isPending: false,
|
|
57456
|
+
targetPath
|
|
57457
|
+
}
|
|
57458
|
+
},
|
|
57459
|
+
Date.now()
|
|
57460
|
+
);
|
|
57461
|
+
} catch (error) {
|
|
57462
|
+
return {
|
|
57463
|
+
type: "message",
|
|
57464
|
+
messageType: "error",
|
|
57465
|
+
content: `Failed to export session: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
57466
|
+
};
|
|
57467
|
+
} finally {
|
|
57468
|
+
ui2.setPendingItem(null);
|
|
57469
|
+
}
|
|
57470
|
+
}
|
|
57471
|
+
};
|
|
57472
|
+
|
|
57383
57473
|
// packages/cli/src/ui/commands/directoryCommand.tsx
|
|
57384
57474
|
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
|
|
57385
|
-
import * as
|
|
57386
|
-
import * as
|
|
57475
|
+
import * as path28 from "node:path";
|
|
57476
|
+
import * as fs31 from "node:fs";
|
|
57387
57477
|
async function finishAddingDirectories(config, addItem, added, errors) {
|
|
57388
57478
|
if (!config) {
|
|
57389
57479
|
addItem({
|
|
@@ -57451,15 +57541,15 @@ var directoryCommand = {
|
|
|
57451
57541
|
if (context.services.agentContext?.config) {
|
|
57452
57542
|
const workspaceContext = context.services.agentContext.config.getWorkspaceContext();
|
|
57453
57543
|
const existingDirs = new Set(
|
|
57454
|
-
workspaceContext.getDirectories().map((dir) =>
|
|
57544
|
+
workspaceContext.getDirectories().map((dir) => path28.resolve(dir))
|
|
57455
57545
|
);
|
|
57456
57546
|
filteredSuggestions = suggestions.filter((s3) => {
|
|
57457
57547
|
const expanded = expandHomeDir(s3);
|
|
57458
|
-
const absolute =
|
|
57548
|
+
const absolute = path28.resolve(expanded);
|
|
57459
57549
|
if (existingDirs.has(absolute)) {
|
|
57460
57550
|
return false;
|
|
57461
57551
|
}
|
|
57462
|
-
if (absolute.endsWith(
|
|
57552
|
+
if (absolute.endsWith(path28.sep) && existingDirs.has(absolute.slice(0, -1))) {
|
|
57463
57553
|
return false;
|
|
57464
57554
|
}
|
|
57465
57555
|
return true;
|
|
@@ -57509,11 +57599,11 @@ var directoryCommand = {
|
|
|
57509
57599
|
const trimmedPath = pathToAdd.trim();
|
|
57510
57600
|
const expandedPath = expandHomeDir(trimmedPath);
|
|
57511
57601
|
try {
|
|
57512
|
-
const absolutePath =
|
|
57602
|
+
const absolutePath = path28.resolve(
|
|
57513
57603
|
workspaceContext.targetDir,
|
|
57514
57604
|
expandedPath
|
|
57515
57605
|
);
|
|
57516
|
-
const resolvedPath =
|
|
57606
|
+
const resolvedPath = fs31.realpathSync(absolutePath);
|
|
57517
57607
|
if (currentWorkspaceDirs.includes(resolvedPath)) {
|
|
57518
57608
|
alreadyAdded.push(trimmedPath);
|
|
57519
57609
|
continue;
|
|
@@ -57539,7 +57629,7 @@ var directoryCommand = {
|
|
|
57539
57629
|
const dirsToConfirm = [];
|
|
57540
57630
|
const trustedDirs = [];
|
|
57541
57631
|
for (const pathToAdd of pathsToProcess) {
|
|
57542
|
-
const expandedPath =
|
|
57632
|
+
const expandedPath = path28.resolve(expandHomeDir(pathToAdd.trim()));
|
|
57543
57633
|
const isTrusted = trustedFolders.isPathTrusted(expandedPath);
|
|
57544
57634
|
if (isTrusted === true) {
|
|
57545
57635
|
trustedDirs.push(pathToAdd.trim());
|
|
@@ -57760,14 +57850,14 @@ var ConfigExtensionDialog = ({
|
|
|
57760
57850
|
[loggerAdapter]
|
|
57761
57851
|
);
|
|
57762
57852
|
const requestSetting = (0, import_react62.useCallback)(
|
|
57763
|
-
async (setting) => new Promise((
|
|
57853
|
+
async (setting) => new Promise((resolve9) => {
|
|
57764
57854
|
if (!mounted.current) return;
|
|
57765
57855
|
settingBuffer.setText("");
|
|
57766
57856
|
setState({
|
|
57767
57857
|
type: "ASK_SETTING",
|
|
57768
57858
|
setting,
|
|
57769
57859
|
resolve: (val) => {
|
|
57770
|
-
|
|
57860
|
+
resolve9(val);
|
|
57771
57861
|
setState({ type: "BUSY", message: "Updating..." });
|
|
57772
57862
|
}
|
|
57773
57863
|
});
|
|
@@ -57775,13 +57865,13 @@ var ConfigExtensionDialog = ({
|
|
|
57775
57865
|
[settingBuffer]
|
|
57776
57866
|
);
|
|
57777
57867
|
const requestConfirmation = (0, import_react62.useCallback)(
|
|
57778
|
-
async (message) => new Promise((
|
|
57868
|
+
async (message) => new Promise((resolve9) => {
|
|
57779
57869
|
if (!mounted.current) return;
|
|
57780
57870
|
setState({
|
|
57781
57871
|
type: "ASK_CONFIRMATION",
|
|
57782
57872
|
message,
|
|
57783
57873
|
resolve: (val) => {
|
|
57784
|
-
|
|
57874
|
+
resolve9(val);
|
|
57785
57875
|
setState({ type: "BUSY", message: "Processing..." });
|
|
57786
57876
|
}
|
|
57787
57877
|
});
|
|
@@ -58118,7 +58208,7 @@ function SearchableList({
|
|
|
58118
58208
|
var import_react64 = __toESM(require_react(), 1);
|
|
58119
58209
|
|
|
58120
58210
|
// packages/cli/src/config/extensionRegistryClient.ts
|
|
58121
|
-
import * as
|
|
58211
|
+
import * as fs32 from "node:fs/promises";
|
|
58122
58212
|
var ExtensionRegistryClient = class _ExtensionRegistryClient {
|
|
58123
58213
|
static DEFAULT_REGISTRY_URL = "https://geminicli.com/extensions.json";
|
|
58124
58214
|
static FETCH_TIMEOUT_MS = 1e4;
|
|
@@ -58196,7 +58286,7 @@ var ExtensionRegistryClient = class _ExtensionRegistryClient {
|
|
|
58196
58286
|
return await response.json();
|
|
58197
58287
|
} else {
|
|
58198
58288
|
const filePath = resolveToRealPath(uri);
|
|
58199
|
-
const content = await
|
|
58289
|
+
const content = await fs32.readFile(filePath, "utf-8");
|
|
58200
58290
|
return JSON.parse(content);
|
|
58201
58291
|
}
|
|
58202
58292
|
} catch (error) {
|
|
@@ -58367,8 +58457,8 @@ function ExtensionDetails({
|
|
|
58367
58457
|
if (keyMatchers["basic.confirm" /* RETURN */](key) && !isInstalled && !isInstalling) {
|
|
58368
58458
|
setIsInstalling(true);
|
|
58369
58459
|
void onInstall(
|
|
58370
|
-
(prompt) => new Promise((
|
|
58371
|
-
setConsentRequest({ prompt, resolve:
|
|
58460
|
+
(prompt) => new Promise((resolve9) => {
|
|
58461
|
+
setConsentRequest({ prompt, resolve: resolve9 });
|
|
58372
58462
|
})
|
|
58373
58463
|
);
|
|
58374
58464
|
return true;
|
|
@@ -58376,8 +58466,8 @@ function ExtensionDetails({
|
|
|
58376
58466
|
if (keyMatchers["extension.link" /* LINK_EXTENSION */](key) && isLinkable && !isInstalled && !isInstalling) {
|
|
58377
58467
|
setIsInstalling(true);
|
|
58378
58468
|
void onLink(
|
|
58379
|
-
(prompt) => new Promise((
|
|
58380
|
-
setConsentRequest({ prompt, resolve:
|
|
58469
|
+
(prompt) => new Promise((resolve9) => {
|
|
58470
|
+
setConsentRequest({ prompt, resolve: resolve9 });
|
|
58381
58471
|
})
|
|
58382
58472
|
);
|
|
58383
58473
|
return true;
|
|
@@ -58781,7 +58871,7 @@ function updateAction(context, args) {
|
|
|
58781
58871
|
}
|
|
58782
58872
|
let resolveUpdateComplete;
|
|
58783
58873
|
const updateComplete = new Promise(
|
|
58784
|
-
(
|
|
58874
|
+
(resolve9) => resolveUpdateComplete = resolve9
|
|
58785
58875
|
);
|
|
58786
58876
|
const extensions = context.services.agentContext?.config ? listExtensions(context.services.agentContext.config) : [];
|
|
58787
58877
|
if (showMessageIfNoExtensions(context, extensions)) {
|
|
@@ -59490,6 +59580,7 @@ var ConsoleSummaryDisplay = ({
|
|
|
59490
59580
|
|
|
59491
59581
|
// packages/cli/src/ui/components/Footer.tsx
|
|
59492
59582
|
import process33 from "node:process";
|
|
59583
|
+
import os7 from "node:os";
|
|
59493
59584
|
|
|
59494
59585
|
// packages/cli/src/ui/components/MemoryUsageDisplay.tsx
|
|
59495
59586
|
var import_react69 = __toESM(require_react(), 1);
|
|
@@ -59660,6 +59751,11 @@ var ALL_ITEMS = [
|
|
|
59660
59751
|
header: "session",
|
|
59661
59752
|
description: "Unique identifier for the current session"
|
|
59662
59753
|
},
|
|
59754
|
+
{
|
|
59755
|
+
id: "hostname",
|
|
59756
|
+
header: "machine",
|
|
59757
|
+
description: "Current machine hostname"
|
|
59758
|
+
},
|
|
59663
59759
|
{
|
|
59664
59760
|
id: "auth",
|
|
59665
59761
|
header: "/auth",
|
|
@@ -59685,6 +59781,7 @@ var DEFAULT_ORDER = [
|
|
|
59685
59781
|
"quota",
|
|
59686
59782
|
"memory-usage",
|
|
59687
59783
|
"session-id",
|
|
59784
|
+
"hostname",
|
|
59688
59785
|
"auth",
|
|
59689
59786
|
"code-changes",
|
|
59690
59787
|
"token-count"
|
|
@@ -59733,6 +59830,7 @@ function resolveFooterState(settings) {
|
|
|
59733
59830
|
|
|
59734
59831
|
// packages/cli/src/ui/components/Footer.tsx
|
|
59735
59832
|
var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
|
|
59833
|
+
var HOSTNAME = os7.hostname();
|
|
59736
59834
|
var CwdIndicator = ({
|
|
59737
59835
|
targetDir,
|
|
59738
59836
|
maxWidth,
|
|
@@ -60008,10 +60106,19 @@ var Footer = () => {
|
|
|
60008
60106
|
);
|
|
60009
60107
|
break;
|
|
60010
60108
|
}
|
|
60109
|
+
case "hostname": {
|
|
60110
|
+
addCol(
|
|
60111
|
+
id,
|
|
60112
|
+
header,
|
|
60113
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: itemColor, children: HOSTNAME }),
|
|
60114
|
+
HOSTNAME.length
|
|
60115
|
+
);
|
|
60116
|
+
break;
|
|
60117
|
+
}
|
|
60011
60118
|
case "auth": {
|
|
60012
60119
|
if (!settings.merged.ui.showUserIdentity) break;
|
|
60013
60120
|
if (!authType) break;
|
|
60014
|
-
const displayStr = authType ===
|
|
60121
|
+
const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
|
|
60015
60122
|
addCol(
|
|
60016
60123
|
id,
|
|
60017
60124
|
header,
|
|
@@ -60285,6 +60392,7 @@ var FooterConfigDialog = ({
|
|
|
60285
60392
|
quota: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("quota", itemColor), children: "42% used" }),
|
|
60286
60393
|
"memory-usage": /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("memory-usage", itemColor), children: "260 MB" }),
|
|
60287
60394
|
"session-id": /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("session-id", itemColor), children: "769992f9" }),
|
|
60395
|
+
hostname: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("hostname", itemColor), children: "dev-machine" }),
|
|
60288
60396
|
"code-changes": /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
60289
60397
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes", theme.status.success), children: "+12" }),
|
|
60290
60398
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: getColor("code-changes"), children: " " }),
|
|
@@ -60454,7 +60562,7 @@ var import_react74 = __toESM(require_react(), 1);
|
|
|
60454
60562
|
var import_react72 = __toESM(require_react(), 1);
|
|
60455
60563
|
|
|
60456
60564
|
// packages/cli/src/ui/utils/rewindFileOps.ts
|
|
60457
|
-
import
|
|
60565
|
+
import fs33 from "node:fs/promises";
|
|
60458
60566
|
function calculateTurnStats(conversation, userMessage) {
|
|
60459
60567
|
const msgIndex = conversation.messages.indexOf(userMessage);
|
|
60460
60568
|
if (msgIndex === -1) return null;
|
|
@@ -60541,7 +60649,7 @@ async function revertFileChanges(conversation, targetMessageId) {
|
|
|
60541
60649
|
try {
|
|
60542
60650
|
let currentContent = null;
|
|
60543
60651
|
try {
|
|
60544
|
-
currentContent = await
|
|
60652
|
+
currentContent = await fs33.readFile(filePath, "utf8");
|
|
60545
60653
|
} catch (e) {
|
|
60546
60654
|
const error = e;
|
|
60547
60655
|
if ("code" in error && error.code === "ENOENT") {
|
|
@@ -60559,9 +60667,9 @@ async function revertFileChanges(conversation, targetMessageId) {
|
|
|
60559
60667
|
}
|
|
60560
60668
|
if (currentContent === newContent) {
|
|
60561
60669
|
if (!isNewFile2) {
|
|
60562
|
-
await
|
|
60670
|
+
await fs33.writeFile(filePath, originalContent ?? "");
|
|
60563
60671
|
} else {
|
|
60564
|
-
await
|
|
60672
|
+
await fs33.unlink(filePath);
|
|
60565
60673
|
}
|
|
60566
60674
|
} else if (currentContent !== null) {
|
|
60567
60675
|
const originalText = originalContent ?? "";
|
|
@@ -60573,9 +60681,9 @@ async function revertFileChanges(conversation, targetMessageId) {
|
|
|
60573
60681
|
const patchedContent = applyPatch(currentContent, undoPatch);
|
|
60574
60682
|
if (typeof patchedContent === "string") {
|
|
60575
60683
|
if (patchedContent === "" && isNewFile2) {
|
|
60576
|
-
await
|
|
60684
|
+
await fs33.unlink(filePath);
|
|
60577
60685
|
} else {
|
|
60578
|
-
await
|
|
60686
|
+
await fs33.writeFile(filePath, patchedContent);
|
|
60579
60687
|
}
|
|
60580
60688
|
} else {
|
|
60581
60689
|
coreEvents.emitFeedback(
|
|
@@ -61211,14 +61319,14 @@ function enableHook(settings, hookName) {
|
|
|
61211
61319
|
}
|
|
61212
61320
|
const modifiedScopes = [];
|
|
61213
61321
|
try {
|
|
61214
|
-
for (const { scope, path:
|
|
61322
|
+
for (const { scope, path: path38 } of foundInDisabledScopes) {
|
|
61215
61323
|
if (isLoadableSettingScope(scope)) {
|
|
61216
61324
|
const currentScopeDisabled = settings.forScope(scope).settings.hooksConfig?.disabled ?? [];
|
|
61217
61325
|
const newDisabled = currentScopeDisabled.filter(
|
|
61218
61326
|
(name) => name !== hookName
|
|
61219
61327
|
);
|
|
61220
61328
|
settings.setValue(scope, "hooksConfig.disabled", newDisabled);
|
|
61221
|
-
modifiedScopes.push({ scope, path:
|
|
61329
|
+
modifiedScopes.push({ scope, path: path38 });
|
|
61222
61330
|
}
|
|
61223
61331
|
}
|
|
61224
61332
|
} catch (error) {
|
|
@@ -61513,7 +61621,7 @@ async function enableAction3(context, args) {
|
|
|
61513
61621
|
}
|
|
61514
61622
|
const feedback = renderHookActionFeedback(
|
|
61515
61623
|
result,
|
|
61516
|
-
(label,
|
|
61624
|
+
(label, path38) => `${label} (${path38})`
|
|
61517
61625
|
);
|
|
61518
61626
|
return {
|
|
61519
61627
|
type: "message",
|
|
@@ -61555,7 +61663,7 @@ async function disableAction3(context, args) {
|
|
|
61555
61663
|
}
|
|
61556
61664
|
const feedback = renderHookActionFeedback(
|
|
61557
61665
|
result,
|
|
61558
|
-
(label,
|
|
61666
|
+
(label, path38) => `${label} (${path38})`
|
|
61559
61667
|
);
|
|
61560
61668
|
return {
|
|
61561
61669
|
type: "message",
|
|
@@ -61754,16 +61862,16 @@ var hooksCommand = {
|
|
|
61754
61862
|
};
|
|
61755
61863
|
|
|
61756
61864
|
// packages/cli/src/ui/commands/ideCommand.ts
|
|
61757
|
-
import
|
|
61865
|
+
import path29 from "node:path";
|
|
61758
61866
|
function getIdeStatusMessage(ideClient) {
|
|
61759
61867
|
const connection = ideClient.getConnectionStatus();
|
|
61760
61868
|
switch (connection.status) {
|
|
61761
|
-
case
|
|
61869
|
+
case IDEConnectionStatus.Connected:
|
|
61762
61870
|
return {
|
|
61763
61871
|
messageType: "info",
|
|
61764
61872
|
content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
|
|
61765
61873
|
};
|
|
61766
|
-
case
|
|
61874
|
+
case IDEConnectionStatus.Connecting:
|
|
61767
61875
|
return {
|
|
61768
61876
|
messageType: "info",
|
|
61769
61877
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -61783,13 +61891,13 @@ function getIdeStatusMessage(ideClient) {
|
|
|
61783
61891
|
function formatFileList(openFiles) {
|
|
61784
61892
|
const basenameCounts = /* @__PURE__ */ new Map();
|
|
61785
61893
|
for (const file of openFiles) {
|
|
61786
|
-
const basename6 =
|
|
61894
|
+
const basename6 = path29.basename(file.path);
|
|
61787
61895
|
basenameCounts.set(basename6, (basenameCounts.get(basename6) || 0) + 1);
|
|
61788
61896
|
}
|
|
61789
61897
|
const fileList = openFiles.map((file) => {
|
|
61790
|
-
const basename6 =
|
|
61898
|
+
const basename6 = path29.basename(file.path);
|
|
61791
61899
|
const isDuplicate = (basenameCounts.get(basename6) || 0) > 1;
|
|
61792
|
-
const parentDir =
|
|
61900
|
+
const parentDir = path29.basename(path29.dirname(file.path));
|
|
61793
61901
|
const displayName = isDuplicate ? `${basename6} (/${parentDir})` : basename6;
|
|
61794
61902
|
return ` - ${displayName}${file.isActive ? " (active)" : ""}`;
|
|
61795
61903
|
}).join("\n");
|
|
@@ -61804,7 +61912,7 @@ ${infoMessage}`;
|
|
|
61804
61912
|
async function getIdeStatusMessageWithFiles(ideClient) {
|
|
61805
61913
|
const connection = ideClient.getConnectionStatus();
|
|
61806
61914
|
switch (connection.status) {
|
|
61807
|
-
case
|
|
61915
|
+
case IDEConnectionStatus.Connected: {
|
|
61808
61916
|
let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
|
|
61809
61917
|
const context = ideContextStore.get();
|
|
61810
61918
|
const openFiles = context?.workspaceState?.openFiles;
|
|
@@ -61816,7 +61924,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
|
|
|
61816
61924
|
content
|
|
61817
61925
|
};
|
|
61818
61926
|
}
|
|
61819
|
-
case
|
|
61927
|
+
case IDEConnectionStatus.Connecting:
|
|
61820
61928
|
return {
|
|
61821
61929
|
messageType: "info",
|
|
61822
61930
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -61838,7 +61946,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
|
|
|
61838
61946
|
const ideClient = await IdeClient.getInstance();
|
|
61839
61947
|
if (value) {
|
|
61840
61948
|
await ideClient.connect(options);
|
|
61841
|
-
logIdeConnection(config, new IdeConnectionEvent(
|
|
61949
|
+
logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
|
|
61842
61950
|
} else {
|
|
61843
61951
|
await ideClient.disconnect();
|
|
61844
61952
|
}
|
|
@@ -61926,10 +62034,10 @@ var ideCommand = async () => {
|
|
|
61926
62034
|
logToConsole: false
|
|
61927
62035
|
}
|
|
61928
62036
|
);
|
|
61929
|
-
if (ideClient.getConnectionStatus().status ===
|
|
62037
|
+
if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
|
|
61930
62038
|
break;
|
|
61931
62039
|
}
|
|
61932
|
-
await new Promise((
|
|
62040
|
+
await new Promise((resolve9) => setTimeout(resolve9, 500));
|
|
61933
62041
|
}
|
|
61934
62042
|
const { messageType, content } = getIdeStatusMessage(ideClient);
|
|
61935
62043
|
if (messageType === "error") {
|
|
@@ -62003,7 +62111,7 @@ var ideCommand = async () => {
|
|
|
62003
62111
|
}
|
|
62004
62112
|
};
|
|
62005
62113
|
const { status } = ideClient.getConnectionStatus();
|
|
62006
|
-
const isConnected = status ===
|
|
62114
|
+
const isConnected = status === IDEConnectionStatus.Connected;
|
|
62007
62115
|
if (isConnected) {
|
|
62008
62116
|
ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
|
|
62009
62117
|
} else {
|
|
@@ -62017,8 +62125,8 @@ var ideCommand = async () => {
|
|
|
62017
62125
|
};
|
|
62018
62126
|
|
|
62019
62127
|
// packages/cli/src/ui/commands/initCommand.ts
|
|
62020
|
-
import * as
|
|
62021
|
-
import * as
|
|
62128
|
+
import * as fs34 from "node:fs";
|
|
62129
|
+
import * as path30 from "node:path";
|
|
62022
62130
|
var initCommand = {
|
|
62023
62131
|
name: "init",
|
|
62024
62132
|
description: "Analyzes the project and creates a tailored GEMINI.md file",
|
|
@@ -62033,10 +62141,10 @@ var initCommand = {
|
|
|
62033
62141
|
};
|
|
62034
62142
|
}
|
|
62035
62143
|
const targetDir = context.services.agentContext.config.getTargetDir();
|
|
62036
|
-
const geminiMdPath =
|
|
62037
|
-
const result = performInit(
|
|
62144
|
+
const geminiMdPath = path30.join(targetDir, "GEMINI.md");
|
|
62145
|
+
const result = performInit(fs34.existsSync(geminiMdPath));
|
|
62038
62146
|
if (result.type === "submit_prompt") {
|
|
62039
|
-
|
|
62147
|
+
fs34.writeFileSync(geminiMdPath, "", "utf8");
|
|
62040
62148
|
context.ui.addItem(
|
|
62041
62149
|
{
|
|
62042
62150
|
type: "info",
|
|
@@ -62103,13 +62211,13 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
62103
62211
|
const displayListener = (message) => {
|
|
62104
62212
|
context.ui.addItem({ type: "info", text: message });
|
|
62105
62213
|
};
|
|
62106
|
-
coreEvents.on(
|
|
62214
|
+
coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
|
|
62107
62215
|
try {
|
|
62108
62216
|
context.ui.addItem({
|
|
62109
62217
|
type: "info",
|
|
62110
62218
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
62111
62219
|
});
|
|
62112
|
-
const { MCPOAuthProvider } = await import("./
|
|
62220
|
+
const { MCPOAuthProvider } = await import("./dist-POIHCQVM.js");
|
|
62113
62221
|
let oauthConfig = server.oauth;
|
|
62114
62222
|
if (!oauthConfig) {
|
|
62115
62223
|
oauthConfig = { enabled: false };
|
|
@@ -62146,7 +62254,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
62146
62254
|
content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
|
|
62147
62255
|
};
|
|
62148
62256
|
} finally {
|
|
62149
|
-
coreEvents.removeListener(
|
|
62257
|
+
coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
|
|
62150
62258
|
}
|
|
62151
62259
|
},
|
|
62152
62260
|
completion: async (context, partialArg) => {
|
|
@@ -62192,10 +62300,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
|
|
|
62192
62300
|
}
|
|
62193
62301
|
const serverNames = Object.keys(mcpServers);
|
|
62194
62302
|
const connectingServers = serverNames.filter(
|
|
62195
|
-
(name) => getMCPServerStatus(name) ===
|
|
62303
|
+
(name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
|
|
62196
62304
|
);
|
|
62197
62305
|
const discoveryState = getMCPDiscoveryState();
|
|
62198
|
-
const discoveryInProgress = discoveryState ===
|
|
62306
|
+
const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
|
|
62199
62307
|
const allTools = toolRegistry.getAllTools();
|
|
62200
62308
|
const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
|
|
62201
62309
|
const promptRegistry = config.getPromptRegistry();
|
|
@@ -62477,7 +62585,7 @@ var import_react81 = __toESM(require_react(), 1);
|
|
|
62477
62585
|
|
|
62478
62586
|
// packages/cli/src/ui/components/InboxDialog.tsx
|
|
62479
62587
|
var import_react80 = __toESM(require_react(), 1);
|
|
62480
|
-
import * as
|
|
62588
|
+
import * as path32 from "node:path";
|
|
62481
62589
|
|
|
62482
62590
|
// packages/cli/src/ui/components/messages/DiffRenderer.tsx
|
|
62483
62591
|
var import_react79 = __toESM(require_react(), 1);
|
|
@@ -76275,10 +76383,10 @@ function colorizeCode({
|
|
|
76275
76383
|
}
|
|
76276
76384
|
|
|
76277
76385
|
// packages/cli/src/ui/utils/fileUtils.ts
|
|
76278
|
-
import * as
|
|
76386
|
+
import * as path31 from "node:path";
|
|
76279
76387
|
function getFileExtension(filename) {
|
|
76280
76388
|
if (!filename) return null;
|
|
76281
|
-
const ext =
|
|
76389
|
+
const ext = path31.extname(filename);
|
|
76282
76390
|
return ext ? ext.slice(1) : null;
|
|
76283
76391
|
}
|
|
76284
76392
|
|
|
@@ -76641,11 +76749,11 @@ var MEMORY_PATCH_ACTION_CHOICES = [
|
|
|
76641
76749
|
}
|
|
76642
76750
|
];
|
|
76643
76751
|
function normalizePathForUi(filePath) {
|
|
76644
|
-
return
|
|
76752
|
+
return path32.posix.normalize(filePath.replaceAll("\\", "/"));
|
|
76645
76753
|
}
|
|
76646
76754
|
function getPathBasename(filePath) {
|
|
76647
76755
|
const normalizedPath = normalizePathForUi(filePath);
|
|
76648
|
-
const basename6 =
|
|
76756
|
+
const basename6 = path32.posix.basename(normalizedPath);
|
|
76649
76757
|
return basename6 === "." ? filePath : basename6;
|
|
76650
76758
|
}
|
|
76651
76759
|
function formatMemoryPatchSummary(patch) {
|
|
@@ -77602,97 +77710,62 @@ var InboxDialog = ({
|
|
|
77602
77710
|
};
|
|
77603
77711
|
|
|
77604
77712
|
// packages/cli/src/ui/commands/memoryCommand.ts
|
|
77605
|
-
var
|
|
77606
|
-
name: "
|
|
77607
|
-
description: "
|
|
77713
|
+
var showSubCommand = {
|
|
77714
|
+
name: "show",
|
|
77715
|
+
description: "Show the current memory contents",
|
|
77716
|
+
kind: "built-in" /* BUILT_IN */,
|
|
77717
|
+
autoExecute: true,
|
|
77718
|
+
action: async (context) => {
|
|
77719
|
+
const config = context.services.agentContext?.config;
|
|
77720
|
+
if (!config) return;
|
|
77721
|
+
const result = showMemory(config);
|
|
77722
|
+
context.ui.addItem(
|
|
77723
|
+
{
|
|
77724
|
+
type: "info" /* INFO */,
|
|
77725
|
+
text: result.content
|
|
77726
|
+
},
|
|
77727
|
+
Date.now()
|
|
77728
|
+
);
|
|
77729
|
+
}
|
|
77730
|
+
};
|
|
77731
|
+
var addSubCommand = {
|
|
77732
|
+
name: "add",
|
|
77733
|
+
description: "Add content to the memory",
|
|
77608
77734
|
kind: "built-in" /* BUILT_IN */,
|
|
77609
77735
|
autoExecute: false,
|
|
77610
|
-
|
|
77611
|
-
|
|
77612
|
-
|
|
77613
|
-
|
|
77614
|
-
|
|
77615
|
-
|
|
77616
|
-
|
|
77617
|
-
|
|
77618
|
-
|
|
77619
|
-
|
|
77620
|
-
|
|
77621
|
-
|
|
77622
|
-
|
|
77623
|
-
|
|
77624
|
-
|
|
77625
|
-
|
|
77626
|
-
|
|
77627
|
-
|
|
77628
|
-
|
|
77629
|
-
|
|
77630
|
-
|
|
77631
|
-
|
|
77632
|
-
|
|
77633
|
-
|
|
77634
|
-
|
|
77635
|
-
|
|
77636
|
-
|
|
77637
|
-
|
|
77638
|
-
|
|
77639
|
-
|
|
77640
|
-
|
|
77641
|
-
|
|
77642
|
-
|
|
77643
|
-
},
|
|
77644
|
-
Date.now()
|
|
77645
|
-
);
|
|
77646
|
-
return result;
|
|
77647
|
-
}
|
|
77648
|
-
},
|
|
77649
|
-
{
|
|
77650
|
-
name: "reload",
|
|
77651
|
-
altNames: ["refresh"],
|
|
77652
|
-
description: "Reload the memory from the source",
|
|
77653
|
-
kind: "built-in" /* BUILT_IN */,
|
|
77654
|
-
autoExecute: true,
|
|
77655
|
-
action: async (context) => {
|
|
77656
|
-
context.ui.addItem(
|
|
77657
|
-
{
|
|
77658
|
-
type: "info" /* INFO */,
|
|
77659
|
-
text: "Reloading memory from source files..."
|
|
77660
|
-
},
|
|
77661
|
-
Date.now()
|
|
77662
|
-
);
|
|
77663
|
-
try {
|
|
77664
|
-
const config = context.services.agentContext?.config;
|
|
77665
|
-
if (config) {
|
|
77666
|
-
const result = await refreshMemory(config);
|
|
77667
|
-
context.ui.addItem(
|
|
77668
|
-
{
|
|
77669
|
-
type: "info" /* INFO */,
|
|
77670
|
-
text: result.content
|
|
77671
|
-
},
|
|
77672
|
-
Date.now()
|
|
77673
|
-
);
|
|
77674
|
-
}
|
|
77675
|
-
} catch (error) {
|
|
77676
|
-
context.ui.addItem(
|
|
77677
|
-
{
|
|
77678
|
-
type: "error" /* ERROR */,
|
|
77679
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
77680
|
-
text: `Error reloading memory: ${error.message}`
|
|
77681
|
-
},
|
|
77682
|
-
Date.now()
|
|
77683
|
-
);
|
|
77684
|
-
}
|
|
77685
|
-
}
|
|
77686
|
-
},
|
|
77687
|
-
{
|
|
77688
|
-
name: "list",
|
|
77689
|
-
description: "Lists the paths of the GEMINI.md files in use",
|
|
77690
|
-
kind: "built-in" /* BUILT_IN */,
|
|
77691
|
-
autoExecute: true,
|
|
77692
|
-
action: async (context) => {
|
|
77693
|
-
const config = context.services.agentContext?.config;
|
|
77694
|
-
if (!config) return;
|
|
77695
|
-
const result = listMemoryFiles(config);
|
|
77736
|
+
action: (context, args) => {
|
|
77737
|
+
const result = addMemory(args);
|
|
77738
|
+
if (result.type === "message") {
|
|
77739
|
+
return result;
|
|
77740
|
+
}
|
|
77741
|
+
context.ui.addItem(
|
|
77742
|
+
{
|
|
77743
|
+
type: "info" /* INFO */,
|
|
77744
|
+
text: `Attempting to save to memory: "${args.trim()}"`
|
|
77745
|
+
},
|
|
77746
|
+
Date.now()
|
|
77747
|
+
);
|
|
77748
|
+
return result;
|
|
77749
|
+
}
|
|
77750
|
+
};
|
|
77751
|
+
var reloadSubCommand = {
|
|
77752
|
+
name: "reload",
|
|
77753
|
+
altNames: ["refresh"],
|
|
77754
|
+
description: "Reload the memory from the source",
|
|
77755
|
+
kind: "built-in" /* BUILT_IN */,
|
|
77756
|
+
autoExecute: true,
|
|
77757
|
+
action: async (context) => {
|
|
77758
|
+
context.ui.addItem(
|
|
77759
|
+
{
|
|
77760
|
+
type: "info" /* INFO */,
|
|
77761
|
+
text: "Reloading memory from source files..."
|
|
77762
|
+
},
|
|
77763
|
+
Date.now()
|
|
77764
|
+
);
|
|
77765
|
+
try {
|
|
77766
|
+
const config = context.services.agentContext?.config;
|
|
77767
|
+
if (config) {
|
|
77768
|
+
const result = await refreshMemory(config);
|
|
77696
77769
|
context.ui.addItem(
|
|
77697
77770
|
{
|
|
77698
77771
|
type: "info" /* INFO */,
|
|
@@ -77701,45 +77774,89 @@ var memoryCommand = {
|
|
|
77701
77774
|
Date.now()
|
|
77702
77775
|
);
|
|
77703
77776
|
}
|
|
77704
|
-
}
|
|
77705
|
-
|
|
77706
|
-
|
|
77707
|
-
|
|
77708
|
-
|
|
77709
|
-
|
|
77710
|
-
|
|
77711
|
-
|
|
77712
|
-
|
|
77713
|
-
return {
|
|
77714
|
-
type: "message",
|
|
77715
|
-
messageType: "error",
|
|
77716
|
-
content: "Config not loaded."
|
|
77717
|
-
};
|
|
77718
|
-
}
|
|
77719
|
-
if (!config.isAutoMemoryEnabled()) {
|
|
77720
|
-
return {
|
|
77721
|
-
type: "message",
|
|
77722
|
-
messageType: "info",
|
|
77723
|
-
content: "The memory inbox requires Auto Memory. Enable it with: experimental.autoMemory = true in settings."
|
|
77724
|
-
};
|
|
77725
|
-
}
|
|
77726
|
-
return {
|
|
77727
|
-
type: "custom_dialog",
|
|
77728
|
-
component: import_react81.default.createElement(InboxDialog, {
|
|
77729
|
-
config,
|
|
77730
|
-
onClose: () => context.ui.removeComponent(),
|
|
77731
|
-
onReloadSkills: async () => {
|
|
77732
|
-
await config.reloadSkills();
|
|
77733
|
-
context.ui.reloadCommands();
|
|
77734
|
-
},
|
|
77735
|
-
onReloadMemory: async () => {
|
|
77736
|
-
await refreshMemory(config);
|
|
77737
|
-
}
|
|
77738
|
-
})
|
|
77739
|
-
};
|
|
77740
|
-
}
|
|
77777
|
+
} catch (error) {
|
|
77778
|
+
context.ui.addItem(
|
|
77779
|
+
{
|
|
77780
|
+
type: "error" /* ERROR */,
|
|
77781
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
77782
|
+
text: `Error reloading memory: ${error.message}`
|
|
77783
|
+
},
|
|
77784
|
+
Date.now()
|
|
77785
|
+
);
|
|
77741
77786
|
}
|
|
77742
|
-
|
|
77787
|
+
}
|
|
77788
|
+
};
|
|
77789
|
+
var listSubCommand = {
|
|
77790
|
+
name: "list",
|
|
77791
|
+
description: "Lists the paths of the GEMINI.md files in use",
|
|
77792
|
+
kind: "built-in" /* BUILT_IN */,
|
|
77793
|
+
autoExecute: true,
|
|
77794
|
+
action: async (context) => {
|
|
77795
|
+
const config = context.services.agentContext?.config;
|
|
77796
|
+
if (!config) return;
|
|
77797
|
+
const result = listMemoryFiles(config);
|
|
77798
|
+
context.ui.addItem(
|
|
77799
|
+
{
|
|
77800
|
+
type: "info" /* INFO */,
|
|
77801
|
+
text: result.content
|
|
77802
|
+
},
|
|
77803
|
+
Date.now()
|
|
77804
|
+
);
|
|
77805
|
+
}
|
|
77806
|
+
};
|
|
77807
|
+
var inboxSubCommand = {
|
|
77808
|
+
name: "inbox",
|
|
77809
|
+
description: "Review skills extracted from past sessions and move them to global or project skills",
|
|
77810
|
+
kind: "built-in" /* BUILT_IN */,
|
|
77811
|
+
autoExecute: true,
|
|
77812
|
+
action: (context) => {
|
|
77813
|
+
const config = context.services.agentContext?.config;
|
|
77814
|
+
if (!config) {
|
|
77815
|
+
return {
|
|
77816
|
+
type: "message",
|
|
77817
|
+
messageType: "error",
|
|
77818
|
+
content: "Config not loaded."
|
|
77819
|
+
};
|
|
77820
|
+
}
|
|
77821
|
+
if (!config.isAutoMemoryEnabled()) {
|
|
77822
|
+
return {
|
|
77823
|
+
type: "message",
|
|
77824
|
+
messageType: "info",
|
|
77825
|
+
content: "The memory inbox requires Auto Memory. Enable it with: experimental.autoMemory = true in settings."
|
|
77826
|
+
};
|
|
77827
|
+
}
|
|
77828
|
+
return {
|
|
77829
|
+
type: "custom_dialog",
|
|
77830
|
+
component: import_react81.default.createElement(InboxDialog, {
|
|
77831
|
+
config,
|
|
77832
|
+
onClose: () => context.ui.removeComponent(),
|
|
77833
|
+
onReloadSkills: async () => {
|
|
77834
|
+
await config.reloadSkills();
|
|
77835
|
+
context.ui.reloadCommands();
|
|
77836
|
+
},
|
|
77837
|
+
onReloadMemory: async () => {
|
|
77838
|
+
await refreshMemory(config);
|
|
77839
|
+
}
|
|
77840
|
+
})
|
|
77841
|
+
};
|
|
77842
|
+
}
|
|
77843
|
+
};
|
|
77844
|
+
var memoryCommand = (config) => {
|
|
77845
|
+
const isMemoryV2 = config?.isMemoryV2Enabled() ?? false;
|
|
77846
|
+
const subCommands = [
|
|
77847
|
+
showSubCommand,
|
|
77848
|
+
...isMemoryV2 ? [] : [addSubCommand],
|
|
77849
|
+
reloadSubCommand,
|
|
77850
|
+
listSubCommand,
|
|
77851
|
+
inboxSubCommand
|
|
77852
|
+
];
|
|
77853
|
+
return {
|
|
77854
|
+
name: "memory",
|
|
77855
|
+
description: "Commands for interacting with memory",
|
|
77856
|
+
kind: "built-in" /* BUILT_IN */,
|
|
77857
|
+
autoExecute: false,
|
|
77858
|
+
subCommands
|
|
77859
|
+
};
|
|
77743
77860
|
};
|
|
77744
77861
|
|
|
77745
77862
|
// packages/cli/src/ui/commands/modelCommand.ts
|
|
@@ -77966,7 +78083,7 @@ Return a JSON object with:
|
|
|
77966
78083
|
},
|
|
77967
78084
|
abortSignal: new AbortController().signal,
|
|
77968
78085
|
promptId: "triage-duplicates",
|
|
77969
|
-
role:
|
|
78086
|
+
role: LlmRole.UTILITY_TOOL
|
|
77970
78087
|
});
|
|
77971
78088
|
const rec = response;
|
|
77972
78089
|
let canonical;
|
|
@@ -78800,7 +78917,7 @@ Return a JSON object with:
|
|
|
78800
78917
|
},
|
|
78801
78918
|
abortSignal: abortControllerRef.current.signal,
|
|
78802
78919
|
promptId: "triage-issues",
|
|
78803
|
-
role:
|
|
78920
|
+
role: LlmRole.UTILITY_TOOL
|
|
78804
78921
|
});
|
|
78805
78922
|
return response;
|
|
78806
78923
|
},
|
|
@@ -79273,8 +79390,8 @@ var oncallCommand = {
|
|
|
79273
79390
|
|
|
79274
79391
|
// packages/cli/src/ui/commands/permissionsCommand.ts
|
|
79275
79392
|
import * as process34 from "node:process";
|
|
79276
|
-
import * as
|
|
79277
|
-
import * as
|
|
79393
|
+
import * as path33 from "node:path";
|
|
79394
|
+
import * as fs35 from "node:fs";
|
|
79278
79395
|
var permissionsCommand = {
|
|
79279
79396
|
name: "permissions",
|
|
79280
79397
|
description: "Manage folder trust settings and other permissions",
|
|
@@ -79292,10 +79409,10 @@ var permissionsCommand = {
|
|
|
79292
79409
|
if (!dirPath) {
|
|
79293
79410
|
targetDirectory = process34.cwd();
|
|
79294
79411
|
} else {
|
|
79295
|
-
targetDirectory =
|
|
79412
|
+
targetDirectory = path33.resolve(expandHomeDir(dirPath));
|
|
79296
79413
|
}
|
|
79297
79414
|
try {
|
|
79298
|
-
if (!
|
|
79415
|
+
if (!fs35.statSync(targetDirectory).isDirectory()) {
|
|
79299
79416
|
return {
|
|
79300
79417
|
type: "message",
|
|
79301
79418
|
messageType: "error",
|
|
@@ -79339,7 +79456,7 @@ var permissionsCommand = {
|
|
|
79339
79456
|
};
|
|
79340
79457
|
|
|
79341
79458
|
// packages/cli/src/ui/commands/planCommand.ts
|
|
79342
|
-
import * as
|
|
79459
|
+
import * as path34 from "node:path";
|
|
79343
79460
|
async function copyAction(context) {
|
|
79344
79461
|
const config = context.services.agentContext?.config;
|
|
79345
79462
|
if (!config) {
|
|
@@ -79356,7 +79473,7 @@ async function copyAction(context) {
|
|
|
79356
79473
|
await copyToClipboard(content);
|
|
79357
79474
|
coreEvents.emitFeedback(
|
|
79358
79475
|
"info",
|
|
79359
|
-
`Plan copied to clipboard (${
|
|
79476
|
+
`Plan copied to clipboard (${path34.basename(planPath)}).`
|
|
79360
79477
|
);
|
|
79361
79478
|
} catch (error) {
|
|
79362
79479
|
coreEvents.emitFeedback("error", `Failed to copy plan: ${error}`, error);
|
|
@@ -79374,8 +79491,8 @@ var planCommand = {
|
|
|
79374
79491
|
return;
|
|
79375
79492
|
}
|
|
79376
79493
|
const previousApprovalMode = config.getApprovalMode();
|
|
79377
|
-
config.setApprovalMode(
|
|
79378
|
-
if (previousApprovalMode !==
|
|
79494
|
+
config.setApprovalMode(ApprovalMode.PLAN);
|
|
79495
|
+
if (previousApprovalMode !== ApprovalMode.PLAN) {
|
|
79379
79496
|
coreEvents.emitFeedback("info", "Switched to Plan Mode.");
|
|
79380
79497
|
}
|
|
79381
79498
|
if (context.invocation?.args) {
|
|
@@ -79394,7 +79511,7 @@ var planCommand = {
|
|
|
79394
79511
|
config.storage.getPlansDir(),
|
|
79395
79512
|
config.getFileSystemService()
|
|
79396
79513
|
);
|
|
79397
|
-
const fileName =
|
|
79514
|
+
const fileName = path34.basename(approvedPlanPath);
|
|
79398
79515
|
coreEvents.emitFeedback("info", `Approved Plan: ${fileName}`);
|
|
79399
79516
|
context.ui.addItem({
|
|
79400
79517
|
type: "gemini" /* GEMINI */,
|
|
@@ -79434,10 +79551,10 @@ var categorizeRulesByMode = (rules) => {
|
|
|
79434
79551
|
rules.forEach((rule) => {
|
|
79435
79552
|
const modes = rule.modes?.length ? rule.modes : ALL_MODES;
|
|
79436
79553
|
const modeSet = new Set(modes);
|
|
79437
|
-
if (modeSet.has(
|
|
79438
|
-
if (modeSet.has(
|
|
79439
|
-
if (modeSet.has(
|
|
79440
|
-
if (modeSet.has(
|
|
79554
|
+
if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
|
|
79555
|
+
if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
|
|
79556
|
+
if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
|
|
79557
|
+
if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
|
|
79441
79558
|
});
|
|
79442
79559
|
return result;
|
|
79443
79560
|
};
|
|
@@ -79579,8 +79696,8 @@ var quitCommand = {
|
|
|
79579
79696
|
};
|
|
79580
79697
|
|
|
79581
79698
|
// packages/cli/src/ui/commands/restoreCommand.ts
|
|
79582
|
-
import * as
|
|
79583
|
-
import
|
|
79699
|
+
import * as fs36 from "node:fs/promises";
|
|
79700
|
+
import path35 from "node:path";
|
|
79584
79701
|
var HistoryItemSchema = external_exports.object({
|
|
79585
79702
|
type: external_exports.string(),
|
|
79586
79703
|
id: external_exports.number()
|
|
@@ -79599,8 +79716,8 @@ async function restoreAction(context, args) {
|
|
|
79599
79716
|
};
|
|
79600
79717
|
}
|
|
79601
79718
|
try {
|
|
79602
|
-
await
|
|
79603
|
-
const files = await
|
|
79719
|
+
await fs36.mkdir(checkpointDir, { recursive: true });
|
|
79720
|
+
const files = await fs36.readdir(checkpointDir);
|
|
79604
79721
|
const jsonFiles = files.filter((file) => file.endsWith(".json"));
|
|
79605
79722
|
if (!args) {
|
|
79606
79723
|
if (jsonFiles.length === 0) {
|
|
@@ -79627,8 +79744,8 @@ ${fileList}`
|
|
|
79627
79744
|
content: `File not found: ${selectedFile}`
|
|
79628
79745
|
};
|
|
79629
79746
|
}
|
|
79630
|
-
const filePath =
|
|
79631
|
-
const data = await
|
|
79747
|
+
const filePath = path35.join(checkpointDir, selectedFile);
|
|
79748
|
+
const data = await fs36.readFile(filePath, "utf-8");
|
|
79632
79749
|
const parseResult = ToolCallDataSchema.safeParse(JSON.parse(data));
|
|
79633
79750
|
if (!parseResult.success) {
|
|
79634
79751
|
return {
|
|
@@ -79676,7 +79793,7 @@ async function completion(context, _partialArg) {
|
|
|
79676
79793
|
return [];
|
|
79677
79794
|
}
|
|
79678
79795
|
try {
|
|
79679
|
-
const files = await
|
|
79796
|
+
const files = await fs36.readdir(checkpointDir);
|
|
79680
79797
|
const jsonFiles = files.filter((file) => file.endsWith(".json"));
|
|
79681
79798
|
return getTruncatedCheckpointNames(jsonFiles);
|
|
79682
79799
|
} catch {
|
|
@@ -79852,7 +79969,7 @@ async function listTools(context, showDescriptions) {
|
|
|
79852
79969
|
};
|
|
79853
79970
|
context.ui.addItem(toolsListItem);
|
|
79854
79971
|
}
|
|
79855
|
-
var
|
|
79972
|
+
var listSubCommand2 = {
|
|
79856
79973
|
name: "list",
|
|
79857
79974
|
description: "List available Gemini CLI tools.",
|
|
79858
79975
|
kind: "built-in" /* BUILT_IN */,
|
|
@@ -79872,7 +79989,7 @@ var toolsCommand = {
|
|
|
79872
79989
|
description: "List available Gemini CLI tools. Use /tools desc to include descriptions.",
|
|
79873
79990
|
kind: "built-in" /* BUILT_IN */,
|
|
79874
79991
|
autoExecute: false,
|
|
79875
|
-
subCommands: [
|
|
79992
|
+
subCommands: [listSubCommand2, descSubCommand],
|
|
79876
79993
|
action: async (context, args) => {
|
|
79877
79994
|
const subCommand = args?.trim();
|
|
79878
79995
|
const useShowDescriptions = subCommand === "desc" || subCommand === "descriptions";
|
|
@@ -79929,9 +80046,9 @@ function disableSkill(settings, skillName, scope) {
|
|
|
79929
80046
|
|
|
79930
80047
|
// packages/cli/src/utils/skillUtils.ts
|
|
79931
80048
|
var import_extract_zip2 = __toESM(require_extract_zip(), 1);
|
|
79932
|
-
import * as
|
|
79933
|
-
import * as
|
|
79934
|
-
import * as
|
|
80049
|
+
import * as fs37 from "node:fs/promises";
|
|
80050
|
+
import * as path36 from "node:path";
|
|
80051
|
+
import * as os8 from "node:os";
|
|
79935
80052
|
function renderSkillActionFeedback(result, formatScope) {
|
|
79936
80053
|
const { skillName, action, status, error } = result;
|
|
79937
80054
|
if (status === "error") {
|
|
@@ -79970,8 +80087,8 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
|
|
|
79970
80087
|
const isSkillFile = source2.toLowerCase().endsWith(".skill");
|
|
79971
80088
|
try {
|
|
79972
80089
|
if (isGitUrl) {
|
|
79973
|
-
tempDirToClean = await
|
|
79974
|
-
|
|
80090
|
+
tempDirToClean = await fs37.mkdtemp(
|
|
80091
|
+
path36.join(os8.tmpdir(), "gemini-skill-")
|
|
79975
80092
|
);
|
|
79976
80093
|
sourcePath = tempDirToClean;
|
|
79977
80094
|
onLog(`Cloning skill from ${source2}...`);
|
|
@@ -79983,18 +80100,18 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
|
|
|
79983
80100
|
tempDirToClean
|
|
79984
80101
|
);
|
|
79985
80102
|
} else if (isSkillFile) {
|
|
79986
|
-
tempDirToClean = await
|
|
79987
|
-
|
|
80103
|
+
tempDirToClean = await fs37.mkdtemp(
|
|
80104
|
+
path36.join(os8.tmpdir(), "gemini-skill-")
|
|
79988
80105
|
);
|
|
79989
80106
|
sourcePath = tempDirToClean;
|
|
79990
80107
|
onLog(`Extracting skill from ${source2}...`);
|
|
79991
|
-
await (0, import_extract_zip2.default)(
|
|
80108
|
+
await (0, import_extract_zip2.default)(path36.resolve(source2), { dir: tempDirToClean });
|
|
79992
80109
|
}
|
|
79993
80110
|
if (subpath) {
|
|
79994
|
-
sourcePath =
|
|
80111
|
+
sourcePath = path36.join(sourcePath, subpath);
|
|
79995
80112
|
}
|
|
79996
|
-
sourcePath =
|
|
79997
|
-
if (tempDirToClean && !sourcePath.startsWith(
|
|
80113
|
+
sourcePath = path36.resolve(sourcePath);
|
|
80114
|
+
if (tempDirToClean && !sourcePath.startsWith(path36.resolve(tempDirToClean))) {
|
|
79998
80115
|
throw new Error("Invalid path: Directory traversal not allowed.");
|
|
79999
80116
|
}
|
|
80000
80117
|
onLog(`Searching for skills in ${sourcePath}...`);
|
|
@@ -80010,29 +80127,29 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
|
|
|
80010
80127
|
if (!await requestConsent(skills, targetDir)) {
|
|
80011
80128
|
throw new Error("Skill installation cancelled by user.");
|
|
80012
80129
|
}
|
|
80013
|
-
await
|
|
80130
|
+
await fs37.mkdir(targetDir, { recursive: true });
|
|
80014
80131
|
const installedSkills = [];
|
|
80015
80132
|
for (const skill of skills) {
|
|
80016
80133
|
const skillName = skill.name;
|
|
80017
|
-
const skillDir =
|
|
80018
|
-
const destPath =
|
|
80019
|
-
const exists = await
|
|
80134
|
+
const skillDir = path36.dirname(skill.location);
|
|
80135
|
+
const destPath = path36.join(targetDir, skillName);
|
|
80136
|
+
const exists = await fs37.stat(destPath).catch(() => null);
|
|
80020
80137
|
if (exists) {
|
|
80021
80138
|
onLog(`Skill "${skillName}" already exists. Overwriting...`);
|
|
80022
|
-
await
|
|
80139
|
+
await fs37.rm(destPath, { recursive: true, force: true });
|
|
80023
80140
|
}
|
|
80024
|
-
await
|
|
80141
|
+
await fs37.cp(skillDir, destPath, { recursive: true });
|
|
80025
80142
|
installedSkills.push({ name: skillName, location: destPath });
|
|
80026
80143
|
}
|
|
80027
80144
|
return installedSkills;
|
|
80028
80145
|
} finally {
|
|
80029
80146
|
if (tempDirToClean) {
|
|
80030
|
-
await
|
|
80147
|
+
await fs37.rm(tempDirToClean, { recursive: true, force: true });
|
|
80031
80148
|
}
|
|
80032
80149
|
}
|
|
80033
80150
|
}
|
|
80034
80151
|
async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.resolve(true)) {
|
|
80035
|
-
const sourcePath =
|
|
80152
|
+
const sourcePath = path36.resolve(source2);
|
|
80036
80153
|
onLog(`Searching for skills in ${sourcePath}...`);
|
|
80037
80154
|
const skills = await loadSkillsFromDir(sourcePath);
|
|
80038
80155
|
if (skills.length === 0) {
|
|
@@ -80057,20 +80174,20 @@ async function linkSkill(source2, scope, onLog, requestConsent = () => Promise.r
|
|
|
80057
80174
|
if (!await requestConsent(skills, targetDir)) {
|
|
80058
80175
|
throw new Error("Skill linking cancelled by user.");
|
|
80059
80176
|
}
|
|
80060
|
-
await
|
|
80177
|
+
await fs37.mkdir(targetDir, { recursive: true });
|
|
80061
80178
|
const linkedSkills = [];
|
|
80062
80179
|
for (const skill of skills) {
|
|
80063
80180
|
const skillName = skill.name;
|
|
80064
|
-
const skillSourceDir =
|
|
80065
|
-
const destPath =
|
|
80066
|
-
const exists = await
|
|
80181
|
+
const skillSourceDir = path36.dirname(skill.location);
|
|
80182
|
+
const destPath = path36.join(targetDir, skillName);
|
|
80183
|
+
const exists = await fs37.lstat(destPath).catch(() => null);
|
|
80067
80184
|
if (exists) {
|
|
80068
80185
|
onLog(
|
|
80069
80186
|
`Skill "${skillName}" already exists at destination. Overwriting...`
|
|
80070
80187
|
);
|
|
80071
|
-
await
|
|
80188
|
+
await fs37.rm(destPath, { recursive: true, force: true });
|
|
80072
80189
|
}
|
|
80073
|
-
await
|
|
80190
|
+
await fs37.symlink(
|
|
80074
80191
|
skillSourceDir,
|
|
80075
80192
|
destPath,
|
|
80076
80193
|
process.platform === "win32" ? "junction" : "dir"
|
|
@@ -80086,19 +80203,19 @@ async function uninstallSkill(name, scope) {
|
|
|
80086
80203
|
const discoveredSkills = await loadSkillsFromDir(targetDir);
|
|
80087
80204
|
const skillToUninstall = discoveredSkills.find((s3) => s3.name === name);
|
|
80088
80205
|
if (!skillToUninstall) {
|
|
80089
|
-
const skillPath =
|
|
80090
|
-
if (!skillPath.startsWith(
|
|
80206
|
+
const skillPath = path36.resolve(targetDir, name);
|
|
80207
|
+
if (!skillPath.startsWith(path36.resolve(targetDir))) {
|
|
80091
80208
|
return null;
|
|
80092
80209
|
}
|
|
80093
|
-
const exists = await
|
|
80210
|
+
const exists = await fs37.lstat(skillPath).catch(() => null);
|
|
80094
80211
|
if (!exists) {
|
|
80095
80212
|
return null;
|
|
80096
80213
|
}
|
|
80097
|
-
await
|
|
80214
|
+
await fs37.rm(skillPath, { recursive: true, force: true });
|
|
80098
80215
|
return { location: skillPath };
|
|
80099
80216
|
}
|
|
80100
|
-
const skillDir =
|
|
80101
|
-
await
|
|
80217
|
+
const skillDir = path36.dirname(skillToUninstall.location);
|
|
80218
|
+
await fs37.rm(skillDir, { recursive: true, force: true });
|
|
80102
80219
|
return { location: skillDir };
|
|
80103
80220
|
}
|
|
80104
80221
|
|
|
@@ -80228,7 +80345,7 @@ async function disableAction4(context, args) {
|
|
|
80228
80345
|
const result = disableSkill(context.services.settings, skillName, scope);
|
|
80229
80346
|
let feedback = renderSkillActionFeedback(
|
|
80230
80347
|
result,
|
|
80231
|
-
(label,
|
|
80348
|
+
(label, path38) => `${label} (${path38})`
|
|
80232
80349
|
);
|
|
80233
80350
|
if (result.status === "success" || result.status === "no-op") {
|
|
80234
80351
|
feedback += ' You can run "/skills reload" to refresh your current instance.';
|
|
@@ -80264,7 +80381,7 @@ async function enableAction4(context, args) {
|
|
|
80264
80381
|
const result = enableSkill(context.services.settings, skillName);
|
|
80265
80382
|
let feedback = renderSkillActionFeedback(
|
|
80266
80383
|
result,
|
|
80267
|
-
(label,
|
|
80384
|
+
(label, path38) => `${label} (${path38})`
|
|
80268
80385
|
);
|
|
80269
80386
|
if (result.status === "success" || result.status === "no-op") {
|
|
80270
80387
|
feedback += ' You can run "/skills reload" to refresh your current instance.';
|
|
@@ -80302,7 +80419,7 @@ async function reloadAction2(context) {
|
|
|
80302
80419
|
const minVisibleDuration = 500;
|
|
80303
80420
|
if (elapsed < minVisibleDuration) {
|
|
80304
80421
|
await new Promise(
|
|
80305
|
-
(
|
|
80422
|
+
(resolve9) => setTimeout(resolve9, minVisibleDuration - elapsed)
|
|
80306
80423
|
);
|
|
80307
80424
|
}
|
|
80308
80425
|
context.ui.setPendingItem(null);
|
|
@@ -80455,8 +80572,8 @@ var vimCommand = {
|
|
|
80455
80572
|
|
|
80456
80573
|
// packages/cli/src/ui/commands/setupGithubCommand.ts
|
|
80457
80574
|
var import_undici2 = __toESM(require_undici(), 1);
|
|
80458
|
-
import
|
|
80459
|
-
import * as
|
|
80575
|
+
import path37 from "node:path";
|
|
80576
|
+
import * as fs38 from "node:fs";
|
|
80460
80577
|
import { Writable } from "node:stream";
|
|
80461
80578
|
|
|
80462
80579
|
// packages/cli/src/utils/gitUtils.ts
|
|
@@ -80583,25 +80700,25 @@ function getOpenUrlsCommands(readmeUrl) {
|
|
|
80583
80700
|
}
|
|
80584
80701
|
async function updateGitignore(gitRepoRoot) {
|
|
80585
80702
|
const gitignoreEntries = [".gemini/", "gha-creds-*.json"];
|
|
80586
|
-
const gitignorePath =
|
|
80703
|
+
const gitignorePath = path37.join(gitRepoRoot, ".gitignore");
|
|
80587
80704
|
try {
|
|
80588
80705
|
let existingContent = "";
|
|
80589
80706
|
let fileExists2 = true;
|
|
80590
80707
|
try {
|
|
80591
|
-
existingContent = await
|
|
80708
|
+
existingContent = await fs38.promises.readFile(gitignorePath, "utf8");
|
|
80592
80709
|
} catch {
|
|
80593
80710
|
fileExists2 = false;
|
|
80594
80711
|
}
|
|
80595
80712
|
if (!fileExists2) {
|
|
80596
80713
|
const contentToWrite = gitignoreEntries.join("\n") + "\n";
|
|
80597
|
-
await
|
|
80714
|
+
await fs38.promises.writeFile(gitignorePath, contentToWrite);
|
|
80598
80715
|
} else {
|
|
80599
80716
|
const missingEntries = gitignoreEntries.filter(
|
|
80600
80717
|
(entry) => !existingContent.split(/\r?\n/).some((line) => line.split("#")[0].trim() === entry)
|
|
80601
80718
|
);
|
|
80602
80719
|
if (missingEntries.length > 0) {
|
|
80603
80720
|
const contentToAdd = "\n" + missingEntries.join("\n") + "\n";
|
|
80604
|
-
await
|
|
80721
|
+
await fs38.promises.appendFile(gitignorePath, contentToAdd);
|
|
80605
80722
|
}
|
|
80606
80723
|
}
|
|
80607
80724
|
} catch (error) {
|
|
@@ -80639,11 +80756,11 @@ async function downloadFiles({
|
|
|
80639
80756
|
`Empty body while downloading ${endpoint}: ${response.status} - ${response.statusText}`
|
|
80640
80757
|
);
|
|
80641
80758
|
}
|
|
80642
|
-
const destination =
|
|
80759
|
+
const destination = path37.resolve(
|
|
80643
80760
|
targetDir,
|
|
80644
|
-
|
|
80761
|
+
path37.basename(fileBasename)
|
|
80645
80762
|
);
|
|
80646
|
-
const fileStream =
|
|
80763
|
+
const fileStream = fs38.createWriteStream(destination, {
|
|
80647
80764
|
mode: 420,
|
|
80648
80765
|
// -rw-r--r--, user(rw), group(r), other(r)
|
|
80649
80766
|
flags: "w",
|
|
@@ -80660,7 +80777,7 @@ async function downloadFiles({
|
|
|
80660
80777
|
}
|
|
80661
80778
|
async function createDirectory(dirPath) {
|
|
80662
80779
|
try {
|
|
80663
|
-
await
|
|
80780
|
+
await fs38.promises.mkdir(dirPath, { recursive: true });
|
|
80664
80781
|
} catch (error) {
|
|
80665
80782
|
debugLogger.debug(`Failed to create ${dirPath} directory:`, error);
|
|
80666
80783
|
throw new Error(
|
|
@@ -80714,9 +80831,9 @@ var setupGithubCommand = {
|
|
|
80714
80831
|
const proxy = context?.services?.agentContext?.config.getProxy();
|
|
80715
80832
|
const releaseTag = await getLatestGitHubRelease(proxy);
|
|
80716
80833
|
const readmeUrl = `https://github.com/google-github-actions/run-gemini-cli/blob/${releaseTag}/README.md#quick-start`;
|
|
80717
|
-
const workflowsDir =
|
|
80834
|
+
const workflowsDir = path37.join(gitRepoRoot, ".github", "workflows");
|
|
80718
80835
|
await createDirectory(workflowsDir);
|
|
80719
|
-
const commandsDir =
|
|
80836
|
+
const commandsDir = path37.join(gitRepoRoot, ".github", "commands");
|
|
80720
80837
|
await createDirectory(commandsDir);
|
|
80721
80838
|
await downloadSetupFiles({
|
|
80722
80839
|
configs: [
|
|
@@ -80789,7 +80906,7 @@ var upgradeCommand = {
|
|
|
80789
80906
|
action: async (context) => {
|
|
80790
80907
|
const config = context.services.agentContext?.config;
|
|
80791
80908
|
const authType = config?.getContentGeneratorConfig()?.authType;
|
|
80792
|
-
if (authType !==
|
|
80909
|
+
if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
|
|
80793
80910
|
return {
|
|
80794
80911
|
type: "message",
|
|
80795
80912
|
messageType: "error",
|
|
@@ -80936,6 +81053,7 @@ var BuiltinCommandLoader = class {
|
|
|
80936
81053
|
copyCommand,
|
|
80937
81054
|
corgiCommand,
|
|
80938
81055
|
docsCommand,
|
|
81056
|
+
exportSessionCommand,
|
|
80939
81057
|
directoryCommand,
|
|
80940
81058
|
editorCommand,
|
|
80941
81059
|
...this.config?.getExtensionsEnabled() === false ? [
|
|
@@ -80977,7 +81095,7 @@ var BuiltinCommandLoader = class {
|
|
|
80977
81095
|
})
|
|
80978
81096
|
}
|
|
80979
81097
|
] : [mcpCommand],
|
|
80980
|
-
memoryCommand,
|
|
81098
|
+
memoryCommand(this.config),
|
|
80981
81099
|
modelCommand,
|
|
80982
81100
|
...this.config?.getFolderTrust() ? [permissionsCommand] : [],
|
|
80983
81101
|
...this.config?.isPlanEnabled() ? [planCommand] : [],
|
|
@@ -81017,7 +81135,7 @@ var BuiltinCommandLoader = class {
|
|
|
81017
81135
|
setupGithubCommand,
|
|
81018
81136
|
terminalSetupCommand,
|
|
81019
81137
|
...this.config?.isVoiceModeEnabled() ? [voiceCommand] : [],
|
|
81020
|
-
...this.config?.getContentGeneratorConfig()?.authType ===
|
|
81138
|
+
...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
|
|
81021
81139
|
];
|
|
81022
81140
|
handle?.end();
|
|
81023
81141
|
return allDefinitions.filter((cmd) => cmd !== null);
|