latentcode 0.1.0-alpha.12 → 0.1.0-alpha.13
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/README.md +2 -2
- package/dist/latentcode.mjs +752 -669
- package/package.json +1 -1
package/dist/latentcode.mjs
CHANGED
|
@@ -48,9 +48,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
48
48
|
mod
|
|
49
49
|
));
|
|
50
50
|
|
|
51
|
-
// node_modules/react/cjs/react.production.min.js
|
|
51
|
+
// ../latentcode/node_modules/react/cjs/react.production.min.js
|
|
52
52
|
var require_react_production_min = __commonJS({
|
|
53
|
-
"node_modules/react/cjs/react.production.min.js"(exports) {
|
|
53
|
+
"../latentcode/node_modules/react/cjs/react.production.min.js"(exports) {
|
|
54
54
|
"use strict";
|
|
55
55
|
var l = /* @__PURE__ */ Symbol.for("react.element");
|
|
56
56
|
var n = /* @__PURE__ */ Symbol.for("react.portal");
|
|
@@ -321,9 +321,9 @@ var require_react_production_min = __commonJS({
|
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
323
|
|
|
324
|
-
// node_modules/react/cjs/react.development.js
|
|
324
|
+
// ../latentcode/node_modules/react/cjs/react.development.js
|
|
325
325
|
var require_react_development = __commonJS({
|
|
326
|
-
"node_modules/react/cjs/react.development.js"(exports, module) {
|
|
326
|
+
"../latentcode/node_modules/react/cjs/react.development.js"(exports, module) {
|
|
327
327
|
"use strict";
|
|
328
328
|
if (process.env.NODE_ENV !== "production") {
|
|
329
329
|
(function() {
|
|
@@ -1380,7 +1380,7 @@ var require_react_development = __commonJS({
|
|
|
1380
1380
|
}
|
|
1381
1381
|
return dispatcher.useContext(Context);
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function useState10(initialState2) {
|
|
1384
1384
|
var dispatcher = resolveDispatcher();
|
|
1385
1385
|
return dispatcher.useState(initialState2);
|
|
1386
1386
|
}
|
|
@@ -2183,7 +2183,7 @@ var require_react_development = __commonJS({
|
|
|
2183
2183
|
exports.useMemo = useMemo6;
|
|
2184
2184
|
exports.useReducer = useReducer2;
|
|
2185
2185
|
exports.useRef = useRef6;
|
|
2186
|
-
exports.useState =
|
|
2186
|
+
exports.useState = useState10;
|
|
2187
2187
|
exports.useSyncExternalStore = useSyncExternalStore2;
|
|
2188
2188
|
exports.useTransition = useTransition;
|
|
2189
2189
|
exports.version = ReactVersion;
|
|
@@ -2195,9 +2195,9 @@ var require_react_development = __commonJS({
|
|
|
2195
2195
|
}
|
|
2196
2196
|
});
|
|
2197
2197
|
|
|
2198
|
-
// node_modules/react/index.js
|
|
2198
|
+
// ../latentcode/node_modules/react/index.js
|
|
2199
2199
|
var require_react = __commonJS({
|
|
2200
|
-
"node_modules/react/index.js"(exports, module) {
|
|
2200
|
+
"../latentcode/node_modules/react/index.js"(exports, module) {
|
|
2201
2201
|
"use strict";
|
|
2202
2202
|
if (process.env.NODE_ENV === "production") {
|
|
2203
2203
|
module.exports = require_react_production_min();
|
|
@@ -2207,9 +2207,9 @@ var require_react = __commonJS({
|
|
|
2207
2207
|
}
|
|
2208
2208
|
});
|
|
2209
2209
|
|
|
2210
|
-
// node_modules/signal-exit/signals.js
|
|
2210
|
+
// ../latentcode/node_modules/signal-exit/signals.js
|
|
2211
2211
|
var require_signals = __commonJS({
|
|
2212
|
-
"node_modules/signal-exit/signals.js"(exports, module) {
|
|
2212
|
+
"../latentcode/node_modules/signal-exit/signals.js"(exports, module) {
|
|
2213
2213
|
module.exports = [
|
|
2214
2214
|
"SIGABRT",
|
|
2215
2215
|
"SIGALRM",
|
|
@@ -2244,9 +2244,9 @@ var require_signals = __commonJS({
|
|
|
2244
2244
|
}
|
|
2245
2245
|
});
|
|
2246
2246
|
|
|
2247
|
-
// node_modules/signal-exit/index.js
|
|
2247
|
+
// ../latentcode/node_modules/signal-exit/index.js
|
|
2248
2248
|
var require_signal_exit = __commonJS({
|
|
2249
|
-
"node_modules/signal-exit/index.js"(exports, module) {
|
|
2249
|
+
"../latentcode/node_modules/signal-exit/index.js"(exports, module) {
|
|
2250
2250
|
var process13 = global.process;
|
|
2251
2251
|
var processOk = function(process14) {
|
|
2252
2252
|
return process14 && typeof process14 === "object" && typeof process14.removeListener === "function" && typeof process14.emit === "function" && typeof process14.reallyExit === "function" && typeof process14.listeners === "function" && typeof process14.kill === "function" && typeof process14.pid === "number" && typeof process14.on === "function";
|
|
@@ -2403,9 +2403,9 @@ var require_signal_exit = __commonJS({
|
|
|
2403
2403
|
}
|
|
2404
2404
|
});
|
|
2405
2405
|
|
|
2406
|
-
// node_modules/scheduler/cjs/scheduler.production.min.js
|
|
2406
|
+
// ../latentcode/node_modules/scheduler/cjs/scheduler.production.min.js
|
|
2407
2407
|
var require_scheduler_production_min = __commonJS({
|
|
2408
|
-
"node_modules/scheduler/cjs/scheduler.production.min.js"(exports) {
|
|
2408
|
+
"../latentcode/node_modules/scheduler/cjs/scheduler.production.min.js"(exports) {
|
|
2409
2409
|
"use strict";
|
|
2410
2410
|
function f(a2, b) {
|
|
2411
2411
|
var c = a2.length;
|
|
@@ -2656,9 +2656,9 @@ var require_scheduler_production_min = __commonJS({
|
|
|
2656
2656
|
}
|
|
2657
2657
|
});
|
|
2658
2658
|
|
|
2659
|
-
// node_modules/scheduler/cjs/scheduler.development.js
|
|
2659
|
+
// ../latentcode/node_modules/scheduler/cjs/scheduler.development.js
|
|
2660
2660
|
var require_scheduler_development = __commonJS({
|
|
2661
|
-
"node_modules/scheduler/cjs/scheduler.development.js"(exports) {
|
|
2661
|
+
"../latentcode/node_modules/scheduler/cjs/scheduler.development.js"(exports) {
|
|
2662
2662
|
"use strict";
|
|
2663
2663
|
if (process.env.NODE_ENV !== "production") {
|
|
2664
2664
|
(function() {
|
|
@@ -3106,9 +3106,9 @@ var require_scheduler_development = __commonJS({
|
|
|
3106
3106
|
}
|
|
3107
3107
|
});
|
|
3108
3108
|
|
|
3109
|
-
// node_modules/scheduler/index.js
|
|
3109
|
+
// ../latentcode/node_modules/scheduler/index.js
|
|
3110
3110
|
var require_scheduler = __commonJS({
|
|
3111
|
-
"node_modules/scheduler/index.js"(exports, module) {
|
|
3111
|
+
"../latentcode/node_modules/scheduler/index.js"(exports, module) {
|
|
3112
3112
|
"use strict";
|
|
3113
3113
|
if (process.env.NODE_ENV === "production") {
|
|
3114
3114
|
module.exports = require_scheduler_production_min();
|
|
@@ -3118,9 +3118,9 @@ var require_scheduler = __commonJS({
|
|
|
3118
3118
|
}
|
|
3119
3119
|
});
|
|
3120
3120
|
|
|
3121
|
-
// node_modules/react-reconciler/cjs/react-reconciler.production.min.js
|
|
3121
|
+
// ../latentcode/node_modules/react-reconciler/cjs/react-reconciler.production.min.js
|
|
3122
3122
|
var require_react_reconciler_production_min = __commonJS({
|
|
3123
|
-
"node_modules/react-reconciler/cjs/react-reconciler.production.min.js"(exports, module) {
|
|
3123
|
+
"../latentcode/node_modules/react-reconciler/cjs/react-reconciler.production.min.js"(exports, module) {
|
|
3124
3124
|
module.exports = function $$$reconciler($$$hostConfig) {
|
|
3125
3125
|
var exports2 = {};
|
|
3126
3126
|
"use strict";
|
|
@@ -7867,17 +7867,17 @@ var require_react_reconciler_production_min = __commonJS({
|
|
|
7867
7867
|
}
|
|
7868
7868
|
});
|
|
7869
7869
|
|
|
7870
|
-
// node_modules/react-reconciler/cjs/react-reconciler.development.js
|
|
7870
|
+
// ../latentcode/node_modules/react-reconciler/cjs/react-reconciler.development.js
|
|
7871
7871
|
var require_react_reconciler_development = __commonJS({
|
|
7872
|
-
"node_modules/react-reconciler/cjs/react-reconciler.development.js"(exports, module) {
|
|
7872
|
+
"../latentcode/node_modules/react-reconciler/cjs/react-reconciler.development.js"(exports, module) {
|
|
7873
7873
|
"use strict";
|
|
7874
7874
|
if (process.env.NODE_ENV !== "production") {
|
|
7875
7875
|
module.exports = function $$$reconciler($$$hostConfig) {
|
|
7876
7876
|
var exports2 = {};
|
|
7877
7877
|
"use strict";
|
|
7878
|
-
var
|
|
7878
|
+
var React18 = require_react();
|
|
7879
7879
|
var Scheduler = require_scheduler();
|
|
7880
|
-
var ReactSharedInternals =
|
|
7880
|
+
var ReactSharedInternals = React18.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
7881
7881
|
var suppressWarning = false;
|
|
7882
7882
|
function setSuppressWarning(newSuppressWarning) {
|
|
7883
7883
|
{
|
|
@@ -22995,9 +22995,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
22995
22995
|
}
|
|
22996
22996
|
});
|
|
22997
22997
|
|
|
22998
|
-
// node_modules/react-reconciler/index.js
|
|
22998
|
+
// ../latentcode/node_modules/react-reconciler/index.js
|
|
22999
22999
|
var require_react_reconciler = __commonJS({
|
|
23000
|
-
"node_modules/react-reconciler/index.js"(exports, module) {
|
|
23000
|
+
"../latentcode/node_modules/react-reconciler/index.js"(exports, module) {
|
|
23001
23001
|
"use strict";
|
|
23002
23002
|
if (process.env.NODE_ENV === "production") {
|
|
23003
23003
|
module.exports = require_react_reconciler_production_min();
|
|
@@ -23007,9 +23007,9 @@ var require_react_reconciler = __commonJS({
|
|
|
23007
23007
|
}
|
|
23008
23008
|
});
|
|
23009
23009
|
|
|
23010
|
-
// node_modules/react-reconciler/cjs/react-reconciler-constants.production.min.js
|
|
23010
|
+
// ../latentcode/node_modules/react-reconciler/cjs/react-reconciler-constants.production.min.js
|
|
23011
23011
|
var require_react_reconciler_constants_production_min = __commonJS({
|
|
23012
|
-
"node_modules/react-reconciler/cjs/react-reconciler-constants.production.min.js"(exports) {
|
|
23012
|
+
"../latentcode/node_modules/react-reconciler/cjs/react-reconciler-constants.production.min.js"(exports) {
|
|
23013
23013
|
"use strict";
|
|
23014
23014
|
exports.ConcurrentRoot = 1;
|
|
23015
23015
|
exports.ContinuousEventPriority = 4;
|
|
@@ -23020,9 +23020,9 @@ var require_react_reconciler_constants_production_min = __commonJS({
|
|
|
23020
23020
|
}
|
|
23021
23021
|
});
|
|
23022
23022
|
|
|
23023
|
-
// node_modules/react-reconciler/cjs/react-reconciler-constants.development.js
|
|
23023
|
+
// ../latentcode/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js
|
|
23024
23024
|
var require_react_reconciler_constants_development = __commonJS({
|
|
23025
|
-
"node_modules/react-reconciler/cjs/react-reconciler-constants.development.js"(exports) {
|
|
23025
|
+
"../latentcode/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js"(exports) {
|
|
23026
23026
|
"use strict";
|
|
23027
23027
|
if (process.env.NODE_ENV !== "production") {
|
|
23028
23028
|
(function() {
|
|
@@ -23060,9 +23060,9 @@ var require_react_reconciler_constants_development = __commonJS({
|
|
|
23060
23060
|
}
|
|
23061
23061
|
});
|
|
23062
23062
|
|
|
23063
|
-
// node_modules/react-reconciler/constants.js
|
|
23063
|
+
// ../latentcode/node_modules/react-reconciler/constants.js
|
|
23064
23064
|
var require_constants = __commonJS({
|
|
23065
|
-
"node_modules/react-reconciler/constants.js"(exports, module) {
|
|
23065
|
+
"../latentcode/node_modules/react-reconciler/constants.js"(exports, module) {
|
|
23066
23066
|
"use strict";
|
|
23067
23067
|
if (process.env.NODE_ENV === "production") {
|
|
23068
23068
|
module.exports = require_react_reconciler_constants_production_min();
|
|
@@ -23072,18 +23072,18 @@ var require_constants = __commonJS({
|
|
|
23072
23072
|
}
|
|
23073
23073
|
});
|
|
23074
23074
|
|
|
23075
|
-
// node_modules/emoji-regex/index.js
|
|
23075
|
+
// ../latentcode/node_modules/emoji-regex/index.js
|
|
23076
23076
|
var require_emoji_regex = __commonJS({
|
|
23077
|
-
"node_modules/emoji-regex/index.js"(exports, module) {
|
|
23077
|
+
"../latentcode/node_modules/emoji-regex/index.js"(exports, module) {
|
|
23078
23078
|
module.exports = () => {
|
|
23079
23079
|
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
23080
23080
|
};
|
|
23081
23081
|
}
|
|
23082
23082
|
});
|
|
23083
23083
|
|
|
23084
|
-
// node_modules/ws/lib/constants.js
|
|
23084
|
+
// ../latentcode/node_modules/ws/lib/constants.js
|
|
23085
23085
|
var require_constants2 = __commonJS({
|
|
23086
|
-
"node_modules/ws/lib/constants.js"(exports, module) {
|
|
23086
|
+
"../latentcode/node_modules/ws/lib/constants.js"(exports, module) {
|
|
23087
23087
|
"use strict";
|
|
23088
23088
|
var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
|
|
23089
23089
|
var hasBlob = typeof Blob !== "undefined";
|
|
@@ -23104,9 +23104,9 @@ var require_constants2 = __commonJS({
|
|
|
23104
23104
|
}
|
|
23105
23105
|
});
|
|
23106
23106
|
|
|
23107
|
-
// node_modules/ws/lib/buffer-util.js
|
|
23107
|
+
// ../latentcode/node_modules/ws/lib/buffer-util.js
|
|
23108
23108
|
var require_buffer_util = __commonJS({
|
|
23109
|
-
"node_modules/ws/lib/buffer-util.js"(exports, module) {
|
|
23109
|
+
"../latentcode/node_modules/ws/lib/buffer-util.js"(exports, module) {
|
|
23110
23110
|
"use strict";
|
|
23111
23111
|
var { websocketMask, websocketUnmask } = __require("http");
|
|
23112
23112
|
var { EMPTY_BUFFER } = require_constants2();
|
|
@@ -23189,9 +23189,9 @@ var require_buffer_util = __commonJS({
|
|
|
23189
23189
|
}
|
|
23190
23190
|
});
|
|
23191
23191
|
|
|
23192
|
-
// node_modules/ws/lib/limiter.js
|
|
23192
|
+
// ../latentcode/node_modules/ws/lib/limiter.js
|
|
23193
23193
|
var require_limiter = __commonJS({
|
|
23194
|
-
"node_modules/ws/lib/limiter.js"(exports, module) {
|
|
23194
|
+
"../latentcode/node_modules/ws/lib/limiter.js"(exports, module) {
|
|
23195
23195
|
"use strict";
|
|
23196
23196
|
var kDone = /* @__PURE__ */ Symbol("kDone");
|
|
23197
23197
|
var kRun = /* @__PURE__ */ Symbol("kRun");
|
|
@@ -23239,9 +23239,9 @@ var require_limiter = __commonJS({
|
|
|
23239
23239
|
}
|
|
23240
23240
|
});
|
|
23241
23241
|
|
|
23242
|
-
// node_modules/ws/lib/permessage-deflate.js
|
|
23242
|
+
// ../latentcode/node_modules/ws/lib/permessage-deflate.js
|
|
23243
23243
|
var require_permessage_deflate = __commonJS({
|
|
23244
|
-
"node_modules/ws/lib/permessage-deflate.js"(exports, module) {
|
|
23244
|
+
"../latentcode/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
|
|
23245
23245
|
"use strict";
|
|
23246
23246
|
var zlib = __require("zlib");
|
|
23247
23247
|
var bufferUtil = require_buffer_util();
|
|
@@ -23622,9 +23622,9 @@ var require_permessage_deflate = __commonJS({
|
|
|
23622
23622
|
}
|
|
23623
23623
|
});
|
|
23624
23624
|
|
|
23625
|
-
// node_modules/ws/lib/validation.js
|
|
23625
|
+
// ../latentcode/node_modules/ws/lib/validation.js
|
|
23626
23626
|
var require_validation = __commonJS({
|
|
23627
|
-
"node_modules/ws/lib/validation.js"(exports, module) {
|
|
23627
|
+
"../latentcode/node_modules/ws/lib/validation.js"(exports, module) {
|
|
23628
23628
|
"use strict";
|
|
23629
23629
|
var { isUtf8 } = __require("buffer");
|
|
23630
23630
|
var { hasBlob } = require_constants2();
|
|
@@ -23823,9 +23823,9 @@ var require_validation = __commonJS({
|
|
|
23823
23823
|
}
|
|
23824
23824
|
});
|
|
23825
23825
|
|
|
23826
|
-
// node_modules/ws/lib/receiver.js
|
|
23826
|
+
// ../latentcode/node_modules/ws/lib/receiver.js
|
|
23827
23827
|
var require_receiver = __commonJS({
|
|
23828
|
-
"node_modules/ws/lib/receiver.js"(exports, module) {
|
|
23828
|
+
"../latentcode/node_modules/ws/lib/receiver.js"(exports, module) {
|
|
23829
23829
|
"use strict";
|
|
23830
23830
|
var { Writable } = __require("stream");
|
|
23831
23831
|
var PerMessageDeflate2 = require_permessage_deflate();
|
|
@@ -24446,9 +24446,9 @@ var require_receiver = __commonJS({
|
|
|
24446
24446
|
}
|
|
24447
24447
|
});
|
|
24448
24448
|
|
|
24449
|
-
// node_modules/ws/lib/sender.js
|
|
24449
|
+
// ../latentcode/node_modules/ws/lib/sender.js
|
|
24450
24450
|
var require_sender = __commonJS({
|
|
24451
|
-
"node_modules/ws/lib/sender.js"(exports, module) {
|
|
24451
|
+
"../latentcode/node_modules/ws/lib/sender.js"(exports, module) {
|
|
24452
24452
|
"use strict";
|
|
24453
24453
|
var { Duplex } = __require("stream");
|
|
24454
24454
|
var { randomFillSync } = __require("crypto");
|
|
@@ -24942,9 +24942,9 @@ var require_sender = __commonJS({
|
|
|
24942
24942
|
}
|
|
24943
24943
|
});
|
|
24944
24944
|
|
|
24945
|
-
// node_modules/ws/lib/event-target.js
|
|
24945
|
+
// ../latentcode/node_modules/ws/lib/event-target.js
|
|
24946
24946
|
var require_event_target = __commonJS({
|
|
24947
|
-
"node_modules/ws/lib/event-target.js"(exports, module) {
|
|
24947
|
+
"../latentcode/node_modules/ws/lib/event-target.js"(exports, module) {
|
|
24948
24948
|
"use strict";
|
|
24949
24949
|
var { kForOnEventAttribute, kListener } = require_constants2();
|
|
24950
24950
|
var kCode = /* @__PURE__ */ Symbol("kCode");
|
|
@@ -25171,9 +25171,9 @@ var require_event_target = __commonJS({
|
|
|
25171
25171
|
}
|
|
25172
25172
|
});
|
|
25173
25173
|
|
|
25174
|
-
// node_modules/ws/lib/extension.js
|
|
25174
|
+
// ../latentcode/node_modules/ws/lib/extension.js
|
|
25175
25175
|
var require_extension = __commonJS({
|
|
25176
|
-
"node_modules/ws/lib/extension.js"(exports, module) {
|
|
25176
|
+
"../latentcode/node_modules/ws/lib/extension.js"(exports, module) {
|
|
25177
25177
|
"use strict";
|
|
25178
25178
|
var { tokenChars } = require_validation();
|
|
25179
25179
|
function push(dest, name, elem) {
|
|
@@ -25324,9 +25324,9 @@ var require_extension = __commonJS({
|
|
|
25324
25324
|
}
|
|
25325
25325
|
});
|
|
25326
25326
|
|
|
25327
|
-
// node_modules/ws/lib/websocket.js
|
|
25327
|
+
// ../latentcode/node_modules/ws/lib/websocket.js
|
|
25328
25328
|
var require_websocket = __commonJS({
|
|
25329
|
-
"node_modules/ws/lib/websocket.js"(exports, module) {
|
|
25329
|
+
"../latentcode/node_modules/ws/lib/websocket.js"(exports, module) {
|
|
25330
25330
|
"use strict";
|
|
25331
25331
|
var EventEmitter3 = __require("events");
|
|
25332
25332
|
var https = __require("https");
|
|
@@ -26238,9 +26238,9 @@ var require_websocket = __commonJS({
|
|
|
26238
26238
|
}
|
|
26239
26239
|
});
|
|
26240
26240
|
|
|
26241
|
-
// node_modules/ws/lib/stream.js
|
|
26241
|
+
// ../latentcode/node_modules/ws/lib/stream.js
|
|
26242
26242
|
var require_stream = __commonJS({
|
|
26243
|
-
"node_modules/ws/lib/stream.js"(exports, module) {
|
|
26243
|
+
"../latentcode/node_modules/ws/lib/stream.js"(exports, module) {
|
|
26244
26244
|
"use strict";
|
|
26245
26245
|
var WebSocket2 = require_websocket();
|
|
26246
26246
|
var { Duplex } = __require("stream");
|
|
@@ -26336,9 +26336,9 @@ var require_stream = __commonJS({
|
|
|
26336
26336
|
}
|
|
26337
26337
|
});
|
|
26338
26338
|
|
|
26339
|
-
// node_modules/ws/lib/subprotocol.js
|
|
26339
|
+
// ../latentcode/node_modules/ws/lib/subprotocol.js
|
|
26340
26340
|
var require_subprotocol = __commonJS({
|
|
26341
|
-
"node_modules/ws/lib/subprotocol.js"(exports, module) {
|
|
26341
|
+
"../latentcode/node_modules/ws/lib/subprotocol.js"(exports, module) {
|
|
26342
26342
|
"use strict";
|
|
26343
26343
|
var { tokenChars } = require_validation();
|
|
26344
26344
|
function parse(header) {
|
|
@@ -26381,9 +26381,9 @@ var require_subprotocol = __commonJS({
|
|
|
26381
26381
|
}
|
|
26382
26382
|
});
|
|
26383
26383
|
|
|
26384
|
-
// node_modules/ws/lib/websocket-server.js
|
|
26384
|
+
// ../latentcode/node_modules/ws/lib/websocket-server.js
|
|
26385
26385
|
var require_websocket_server = __commonJS({
|
|
26386
|
-
"node_modules/ws/lib/websocket-server.js"(exports, module) {
|
|
26386
|
+
"../latentcode/node_modules/ws/lib/websocket-server.js"(exports, module) {
|
|
26387
26387
|
"use strict";
|
|
26388
26388
|
var EventEmitter3 = __require("events");
|
|
26389
26389
|
var http = __require("http");
|
|
@@ -26782,10 +26782,10 @@ var require_websocket_server = __commonJS({
|
|
|
26782
26782
|
}
|
|
26783
26783
|
});
|
|
26784
26784
|
|
|
26785
|
-
// node_modules/ws/wrapper.mjs
|
|
26785
|
+
// ../latentcode/node_modules/ws/wrapper.mjs
|
|
26786
26786
|
var import_stream, import_extension, import_permessage_deflate, import_receiver, import_sender, import_subprotocol, import_websocket, import_websocket_server, wrapper_default;
|
|
26787
26787
|
var init_wrapper = __esm({
|
|
26788
|
-
"node_modules/ws/wrapper.mjs"() {
|
|
26788
|
+
"../latentcode/node_modules/ws/wrapper.mjs"() {
|
|
26789
26789
|
import_stream = __toESM(require_stream(), 1);
|
|
26790
26790
|
import_extension = __toESM(require_extension(), 1);
|
|
26791
26791
|
import_permessage_deflate = __toESM(require_permessage_deflate(), 1);
|
|
@@ -26798,10 +26798,10 @@ var init_wrapper = __esm({
|
|
|
26798
26798
|
}
|
|
26799
26799
|
});
|
|
26800
26800
|
|
|
26801
|
-
// node_modules/ink/build/devtools-window-polyfill.js
|
|
26801
|
+
// ../latentcode/node_modules/ink/build/devtools-window-polyfill.js
|
|
26802
26802
|
var customGlobal;
|
|
26803
26803
|
var init_devtools_window_polyfill = __esm({
|
|
26804
|
-
"node_modules/ink/build/devtools-window-polyfill.js"() {
|
|
26804
|
+
"../latentcode/node_modules/ink/build/devtools-window-polyfill.js"() {
|
|
26805
26805
|
init_wrapper();
|
|
26806
26806
|
customGlobal = global;
|
|
26807
26807
|
customGlobal.WebSocket ||= wrapper_default;
|
|
@@ -26872,19 +26872,19 @@ var init_stub_devtools = __esm({
|
|
|
26872
26872
|
}
|
|
26873
26873
|
});
|
|
26874
26874
|
|
|
26875
|
-
// node_modules/ink/build/devtools.js
|
|
26875
|
+
// ../latentcode/node_modules/ink/build/devtools.js
|
|
26876
26876
|
var devtools_exports = {};
|
|
26877
26877
|
var init_devtools = __esm({
|
|
26878
|
-
"node_modules/ink/build/devtools.js"() {
|
|
26878
|
+
"../latentcode/node_modules/ink/build/devtools.js"() {
|
|
26879
26879
|
init_devtools_window_polyfill();
|
|
26880
26880
|
init_stub_devtools();
|
|
26881
26881
|
stub_devtools_default.connectToDevTools();
|
|
26882
26882
|
}
|
|
26883
26883
|
});
|
|
26884
26884
|
|
|
26885
|
-
// node_modules/cli-boxes/boxes.json
|
|
26885
|
+
// ../latentcode/node_modules/cli-boxes/boxes.json
|
|
26886
26886
|
var require_boxes = __commonJS({
|
|
26887
|
-
"node_modules/cli-boxes/boxes.json"(exports, module) {
|
|
26887
|
+
"../latentcode/node_modules/cli-boxes/boxes.json"(exports, module) {
|
|
26888
26888
|
module.exports = {
|
|
26889
26889
|
single: {
|
|
26890
26890
|
topLeft: "\u250C",
|
|
@@ -26970,9 +26970,9 @@ var require_boxes = __commonJS({
|
|
|
26970
26970
|
}
|
|
26971
26971
|
});
|
|
26972
26972
|
|
|
26973
|
-
// node_modules/cli-boxes/index.js
|
|
26973
|
+
// ../latentcode/node_modules/cli-boxes/index.js
|
|
26974
26974
|
var require_cli_boxes = __commonJS({
|
|
26975
|
-
"node_modules/cli-boxes/index.js"(exports, module) {
|
|
26975
|
+
"../latentcode/node_modules/cli-boxes/index.js"(exports, module) {
|
|
26976
26976
|
"use strict";
|
|
26977
26977
|
var cliBoxes2 = require_boxes();
|
|
26978
26978
|
module.exports = cliBoxes2;
|
|
@@ -26980,9 +26980,9 @@ var require_cli_boxes = __commonJS({
|
|
|
26980
26980
|
}
|
|
26981
26981
|
});
|
|
26982
26982
|
|
|
26983
|
-
// node_modules/mimic-fn/index.js
|
|
26983
|
+
// ../latentcode/node_modules/mimic-fn/index.js
|
|
26984
26984
|
var require_mimic_fn = __commonJS({
|
|
26985
|
-
"node_modules/mimic-fn/index.js"(exports, module) {
|
|
26985
|
+
"../latentcode/node_modules/mimic-fn/index.js"(exports, module) {
|
|
26986
26986
|
"use strict";
|
|
26987
26987
|
var mimicFn = (to, from) => {
|
|
26988
26988
|
for (const prop of Reflect.ownKeys(from)) {
|
|
@@ -26995,9 +26995,9 @@ var require_mimic_fn = __commonJS({
|
|
|
26995
26995
|
}
|
|
26996
26996
|
});
|
|
26997
26997
|
|
|
26998
|
-
// node_modules/onetime/index.js
|
|
26998
|
+
// ../latentcode/node_modules/onetime/index.js
|
|
26999
26999
|
var require_onetime = __commonJS({
|
|
27000
|
-
"node_modules/onetime/index.js"(exports, module) {
|
|
27000
|
+
"../latentcode/node_modules/onetime/index.js"(exports, module) {
|
|
27001
27001
|
"use strict";
|
|
27002
27002
|
var mimicFn = require_mimic_fn();
|
|
27003
27003
|
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
@@ -27033,9 +27033,9 @@ var require_onetime = __commonJS({
|
|
|
27033
27033
|
}
|
|
27034
27034
|
});
|
|
27035
27035
|
|
|
27036
|
-
// node_modules/escape-string-regexp/index.js
|
|
27036
|
+
// ../latentcode/node_modules/escape-string-regexp/index.js
|
|
27037
27037
|
var require_escape_string_regexp = __commonJS({
|
|
27038
|
-
"node_modules/escape-string-regexp/index.js"(exports, module) {
|
|
27038
|
+
"../latentcode/node_modules/escape-string-regexp/index.js"(exports, module) {
|
|
27039
27039
|
"use strict";
|
|
27040
27040
|
var matchOperatorsRegex = /[|\\{}()[\]^$+*?.-]/g;
|
|
27041
27041
|
module.exports = (string) => {
|
|
@@ -27047,9 +27047,9 @@ var require_escape_string_regexp = __commonJS({
|
|
|
27047
27047
|
}
|
|
27048
27048
|
});
|
|
27049
27049
|
|
|
27050
|
-
// node_modules/stack-utils/index.js
|
|
27050
|
+
// ../latentcode/node_modules/stack-utils/index.js
|
|
27051
27051
|
var require_stack_utils = __commonJS({
|
|
27052
|
-
"node_modules/stack-utils/index.js"(exports, module) {
|
|
27052
|
+
"../latentcode/node_modules/stack-utils/index.js"(exports, module) {
|
|
27053
27053
|
"use strict";
|
|
27054
27054
|
var escapeStringRegexp = require_escape_string_regexp();
|
|
27055
27055
|
var cwd2 = typeof process === "object" && process && typeof process.cwd === "function" ? process.cwd() : ".";
|
|
@@ -27300,9 +27300,9 @@ var require_stack_utils = __commonJS({
|
|
|
27300
27300
|
}
|
|
27301
27301
|
});
|
|
27302
27302
|
|
|
27303
|
-
// node_modules/react/cjs/react-jsx-runtime.production.min.js
|
|
27303
|
+
// ../latentcode/node_modules/react/cjs/react-jsx-runtime.production.min.js
|
|
27304
27304
|
var require_react_jsx_runtime_production_min = __commonJS({
|
|
27305
|
-
"node_modules/react/cjs/react-jsx-runtime.production.min.js"(exports) {
|
|
27305
|
+
"../latentcode/node_modules/react/cjs/react-jsx-runtime.production.min.js"(exports) {
|
|
27306
27306
|
"use strict";
|
|
27307
27307
|
var f = require_react();
|
|
27308
27308
|
var k = /* @__PURE__ */ Symbol.for("react.element");
|
|
@@ -27325,14 +27325,14 @@ var require_react_jsx_runtime_production_min = __commonJS({
|
|
|
27325
27325
|
}
|
|
27326
27326
|
});
|
|
27327
27327
|
|
|
27328
|
-
// node_modules/react/cjs/react-jsx-runtime.development.js
|
|
27328
|
+
// ../latentcode/node_modules/react/cjs/react-jsx-runtime.development.js
|
|
27329
27329
|
var require_react_jsx_runtime_development = __commonJS({
|
|
27330
|
-
"node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
|
|
27330
|
+
"../latentcode/node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
|
|
27331
27331
|
"use strict";
|
|
27332
27332
|
if (process.env.NODE_ENV !== "production") {
|
|
27333
27333
|
(function() {
|
|
27334
27334
|
"use strict";
|
|
27335
|
-
var
|
|
27335
|
+
var React18 = require_react();
|
|
27336
27336
|
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
|
|
27337
27337
|
var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
|
|
27338
27338
|
var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
@@ -27358,7 +27358,7 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
27358
27358
|
}
|
|
27359
27359
|
return null;
|
|
27360
27360
|
}
|
|
27361
|
-
var ReactSharedInternals =
|
|
27361
|
+
var ReactSharedInternals = React18.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
27362
27362
|
function error(format) {
|
|
27363
27363
|
{
|
|
27364
27364
|
{
|
|
@@ -28208,19 +28208,19 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
28208
28208
|
return jsxWithValidation(type, props, key, false);
|
|
28209
28209
|
}
|
|
28210
28210
|
}
|
|
28211
|
-
var
|
|
28212
|
-
var
|
|
28211
|
+
var jsx13 = jsxWithValidationDynamic;
|
|
28212
|
+
var jsxs11 = jsxWithValidationStatic;
|
|
28213
28213
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
28214
|
-
exports.jsx =
|
|
28215
|
-
exports.jsxs =
|
|
28214
|
+
exports.jsx = jsx13;
|
|
28215
|
+
exports.jsxs = jsxs11;
|
|
28216
28216
|
})();
|
|
28217
28217
|
}
|
|
28218
28218
|
}
|
|
28219
28219
|
});
|
|
28220
28220
|
|
|
28221
|
-
// node_modules/react/jsx-runtime.js
|
|
28221
|
+
// ../latentcode/node_modules/react/jsx-runtime.js
|
|
28222
28222
|
var require_jsx_runtime = __commonJS({
|
|
28223
|
-
"node_modules/react/jsx-runtime.js"(exports, module) {
|
|
28223
|
+
"../latentcode/node_modules/react/jsx-runtime.js"(exports, module) {
|
|
28224
28224
|
"use strict";
|
|
28225
28225
|
if (process.env.NODE_ENV === "production") {
|
|
28226
28226
|
module.exports = require_react_jsx_runtime_production_min();
|
|
@@ -28230,15 +28230,15 @@ var require_jsx_runtime = __commonJS({
|
|
|
28230
28230
|
}
|
|
28231
28231
|
});
|
|
28232
28232
|
|
|
28233
|
-
// node_modules/ink/build/render.js
|
|
28233
|
+
// ../latentcode/node_modules/ink/build/render.js
|
|
28234
28234
|
import { Stream } from "node:stream";
|
|
28235
28235
|
import process12 from "node:process";
|
|
28236
28236
|
|
|
28237
|
-
// node_modules/ink/build/ink.js
|
|
28237
|
+
// ../latentcode/node_modules/ink/build/ink.js
|
|
28238
28238
|
var import_react10 = __toESM(require_react(), 1);
|
|
28239
28239
|
import process11 from "node:process";
|
|
28240
28240
|
|
|
28241
|
-
// node_modules/es-toolkit/dist/function/debounce.mjs
|
|
28241
|
+
// ../latentcode/node_modules/es-toolkit/dist/function/debounce.mjs
|
|
28242
28242
|
function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
28243
28243
|
let pendingThis = void 0;
|
|
28244
28244
|
let pendingArgs = null;
|
|
@@ -28292,7 +28292,7 @@ function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
|
28292
28292
|
return debounced;
|
|
28293
28293
|
}
|
|
28294
28294
|
|
|
28295
|
-
// node_modules/es-toolkit/dist/compat/function/debounce.mjs
|
|
28295
|
+
// ../latentcode/node_modules/es-toolkit/dist/compat/function/debounce.mjs
|
|
28296
28296
|
function debounce2(func, debounceMs = 0, options = {}) {
|
|
28297
28297
|
if (typeof options !== "object") options = {};
|
|
28298
28298
|
const { leading = false, trailing = true, maxWait } = options;
|
|
@@ -28328,7 +28328,7 @@ function debounce2(func, debounceMs = 0, options = {}) {
|
|
|
28328
28328
|
return debounced;
|
|
28329
28329
|
}
|
|
28330
28330
|
|
|
28331
|
-
// node_modules/es-toolkit/dist/compat/function/throttle.mjs
|
|
28331
|
+
// ../latentcode/node_modules/es-toolkit/dist/compat/function/throttle.mjs
|
|
28332
28332
|
function throttle(func, throttleMs = 0, options = {}) {
|
|
28333
28333
|
const { leading = true, trailing = true } = options;
|
|
28334
28334
|
return debounce2(func, throttleMs, {
|
|
@@ -28338,7 +28338,7 @@ function throttle(func, throttleMs = 0, options = {}) {
|
|
|
28338
28338
|
});
|
|
28339
28339
|
}
|
|
28340
28340
|
|
|
28341
|
-
// node_modules/ansi-escapes/base.js
|
|
28341
|
+
// ../latentcode/node_modules/ansi-escapes/base.js
|
|
28342
28342
|
var base_exports = {};
|
|
28343
28343
|
__export(base_exports, {
|
|
28344
28344
|
ConEmu: () => ConEmu,
|
|
@@ -28382,7 +28382,7 @@ __export(base_exports, {
|
|
|
28382
28382
|
import process2 from "node:process";
|
|
28383
28383
|
import os from "node:os";
|
|
28384
28384
|
|
|
28385
|
-
// node_modules/environment/index.js
|
|
28385
|
+
// ../latentcode/node_modules/environment/index.js
|
|
28386
28386
|
var isBrowser = globalThis.window?.document !== void 0;
|
|
28387
28387
|
var isNode = globalThis.process?.versions?.node !== void 0;
|
|
28388
28388
|
var isBun = globalThis.process?.versions?.bun !== void 0;
|
|
@@ -28400,7 +28400,7 @@ var isLinux = platform === "Linux" || globalThis.navigator?.platform?.startsWith
|
|
|
28400
28400
|
var isIos = platform === "iOS" || globalThis.navigator?.platform === "MacIntel" && globalThis.navigator?.maxTouchPoints > 1 || /iPad|iPhone|iPod/.test(globalThis.navigator?.platform);
|
|
28401
28401
|
var isAndroid = platform === "Android" || globalThis.navigator?.platform === "Android" || globalThis.navigator?.userAgent?.includes(" Android ") === true || globalThis.process?.platform === "android";
|
|
28402
28402
|
|
|
28403
|
-
// node_modules/ansi-escapes/base.js
|
|
28403
|
+
// ../latentcode/node_modules/ansi-escapes/base.js
|
|
28404
28404
|
var ESC = "\x1B[";
|
|
28405
28405
|
var OSC = "\x1B]";
|
|
28406
28406
|
var BEL = "\x07";
|
|
@@ -28540,12 +28540,12 @@ var ConEmu = {
|
|
|
28540
28540
|
};
|
|
28541
28541
|
var setCwd = (cwd2 = cwdFunction()) => iTerm.setCwd(cwd2) + ConEmu.setCwd(cwd2);
|
|
28542
28542
|
|
|
28543
|
-
// node_modules/is-in-ci/index.js
|
|
28543
|
+
// ../latentcode/node_modules/is-in-ci/index.js
|
|
28544
28544
|
import { env } from "node:process";
|
|
28545
28545
|
var isInCi = env.CI !== "0" && env.CI !== "false" && ("CI" in env || "CONTINUOUS_INTEGRATION" in env || Object.keys(env).some((key) => key.startsWith("CI_")));
|
|
28546
28546
|
var is_in_ci_default = isInCi;
|
|
28547
28547
|
|
|
28548
|
-
// node_modules/auto-bind/index.js
|
|
28548
|
+
// ../latentcode/node_modules/auto-bind/index.js
|
|
28549
28549
|
var getAllProperties = (object) => {
|
|
28550
28550
|
const properties = /* @__PURE__ */ new Set();
|
|
28551
28551
|
do {
|
|
@@ -28578,10 +28578,10 @@ function autoBind(self, { include, exclude } = {}) {
|
|
|
28578
28578
|
return self;
|
|
28579
28579
|
}
|
|
28580
28580
|
|
|
28581
|
-
// node_modules/ink/build/ink.js
|
|
28581
|
+
// ../latentcode/node_modules/ink/build/ink.js
|
|
28582
28582
|
var import_signal_exit2 = __toESM(require_signal_exit(), 1);
|
|
28583
28583
|
|
|
28584
|
-
// node_modules/patch-console/dist/index.js
|
|
28584
|
+
// ../latentcode/node_modules/patch-console/dist/index.js
|
|
28585
28585
|
import { PassThrough } from "node:stream";
|
|
28586
28586
|
var consoleMethods = [
|
|
28587
28587
|
"assert",
|
|
@@ -28627,7 +28627,7 @@ var patchConsole = (callback) => {
|
|
|
28627
28627
|
};
|
|
28628
28628
|
var dist_default = patchConsole;
|
|
28629
28629
|
|
|
28630
|
-
// node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js
|
|
28630
|
+
// ../latentcode/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js
|
|
28631
28631
|
var loadYoga = (() => {
|
|
28632
28632
|
var _scriptDir = import.meta.url;
|
|
28633
28633
|
return (function(loadYoga2) {
|
|
@@ -29858,7 +29858,7 @@ var loadYoga = (() => {
|
|
|
29858
29858
|
})();
|
|
29859
29859
|
var yoga_wasm_base64_esm_default = loadYoga;
|
|
29860
29860
|
|
|
29861
|
-
// node_modules/yoga-layout/dist/src/generated/YGEnums.js
|
|
29861
|
+
// ../latentcode/node_modules/yoga-layout/dist/src/generated/YGEnums.js
|
|
29862
29862
|
var Align = /* @__PURE__ */ (function(Align2) {
|
|
29863
29863
|
Align2[Align2["Auto"] = 0] = "Auto";
|
|
29864
29864
|
Align2[Align2["FlexStart"] = 1] = "FlexStart";
|
|
@@ -30061,7 +30061,7 @@ var constants = {
|
|
|
30061
30061
|
};
|
|
30062
30062
|
var YGEnums_default = constants;
|
|
30063
30063
|
|
|
30064
|
-
// node_modules/yoga-layout/dist/src/wrapAssembly.js
|
|
30064
|
+
// ../latentcode/node_modules/yoga-layout/dist/src/wrapAssembly.js
|
|
30065
30065
|
function wrapAssembly(lib) {
|
|
30066
30066
|
function patch(prototype, name, fn) {
|
|
30067
30067
|
const original = prototype[name];
|
|
@@ -30162,16 +30162,16 @@ function wrapAssembly(lib) {
|
|
|
30162
30162
|
};
|
|
30163
30163
|
}
|
|
30164
30164
|
|
|
30165
|
-
// node_modules/yoga-layout/dist/src/index.js
|
|
30165
|
+
// ../latentcode/node_modules/yoga-layout/dist/src/index.js
|
|
30166
30166
|
var Yoga = wrapAssembly(await yoga_wasm_base64_esm_default());
|
|
30167
30167
|
var src_default = Yoga;
|
|
30168
30168
|
|
|
30169
|
-
// node_modules/ink/build/reconciler.js
|
|
30169
|
+
// ../latentcode/node_modules/ink/build/reconciler.js
|
|
30170
30170
|
var import_react_reconciler = __toESM(require_react_reconciler(), 1);
|
|
30171
30171
|
var import_constants = __toESM(require_constants(), 1);
|
|
30172
30172
|
import process3 from "node:process";
|
|
30173
30173
|
|
|
30174
|
-
// node_modules/ansi-regex/index.js
|
|
30174
|
+
// ../latentcode/node_modules/ansi-regex/index.js
|
|
30175
30175
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
30176
30176
|
const ST = String.raw`(?:\u0007|\u001B\u005C|\u009C)`;
|
|
30177
30177
|
const osc = String.raw`(?:(?:\u001B\]|\u009D)[^\u0007\u001B\u009C\u009D]*${ST})`;
|
|
@@ -30181,7 +30181,7 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
30181
30181
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
30182
30182
|
}
|
|
30183
30183
|
|
|
30184
|
-
// node_modules/strip-ansi/index.js
|
|
30184
|
+
// ../latentcode/node_modules/strip-ansi/index.js
|
|
30185
30185
|
var regex = ansiRegex();
|
|
30186
30186
|
function stripAnsi(string) {
|
|
30187
30187
|
if (typeof string !== "string") {
|
|
@@ -30193,7 +30193,7 @@ function stripAnsi(string) {
|
|
|
30193
30193
|
return string.replace(regex, "");
|
|
30194
30194
|
}
|
|
30195
30195
|
|
|
30196
|
-
// node_modules/get-east-asian-width/lookup-data.js
|
|
30196
|
+
// ../latentcode/node_modules/get-east-asian-width/lookup-data.js
|
|
30197
30197
|
var ambiguousMinimalCodePoint = 161;
|
|
30198
30198
|
var ambiguousMaximumCodePoint = 1114109;
|
|
30199
30199
|
var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
@@ -30204,7 +30204,7 @@ var wideMinimalCodePoint = 4352;
|
|
|
30204
30204
|
var wideMaximumCodePoint = 262141;
|
|
30205
30205
|
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101594, 101631, 101664, 101760, 101874, 101888, 102801, 102816, 102866, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110888, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110952, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127406, 127406, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128729, 128732, 128735, 128747, 128748, 128756, 128764, 128986, 128986, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129734, 129736, 129736, 129740, 129757, 129759, 129771, 129775, 129786, 131072, 196605, 196608, 262141];
|
|
30206
30206
|
|
|
30207
|
-
// node_modules/get-east-asian-width/utilities.js
|
|
30207
|
+
// ../latentcode/node_modules/get-east-asian-width/utilities.js
|
|
30208
30208
|
var isInRange = (ranges, codePoint) => {
|
|
30209
30209
|
let low = 0;
|
|
30210
30210
|
let high = Math.floor(ranges.length / 2) - 1;
|
|
@@ -30222,7 +30222,7 @@ var isInRange = (ranges, codePoint) => {
|
|
|
30222
30222
|
return false;
|
|
30223
30223
|
};
|
|
30224
30224
|
|
|
30225
|
-
// node_modules/get-east-asian-width/lookup.js
|
|
30225
|
+
// ../latentcode/node_modules/get-east-asian-width/lookup.js
|
|
30226
30226
|
var commonCjkCodePoint = 19968;
|
|
30227
30227
|
var [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
|
|
30228
30228
|
function findWideFastPathRange(ranges) {
|
|
@@ -30263,7 +30263,7 @@ var isWide = (codePoint) => {
|
|
|
30263
30263
|
return isInRange(wideRanges, codePoint);
|
|
30264
30264
|
};
|
|
30265
30265
|
|
|
30266
|
-
// node_modules/get-east-asian-width/index.js
|
|
30266
|
+
// ../latentcode/node_modules/get-east-asian-width/index.js
|
|
30267
30267
|
function validate(codePoint) {
|
|
30268
30268
|
if (!Number.isSafeInteger(codePoint)) {
|
|
30269
30269
|
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
@@ -30277,7 +30277,7 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
|
30277
30277
|
return 1;
|
|
30278
30278
|
}
|
|
30279
30279
|
|
|
30280
|
-
// node_modules/string-width/index.js
|
|
30280
|
+
// ../latentcode/node_modules/string-width/index.js
|
|
30281
30281
|
var import_emoji_regex = __toESM(require_emoji_regex(), 1);
|
|
30282
30282
|
var segmenter = new Intl.Segmenter();
|
|
30283
30283
|
var defaultIgnorableCodePointRegex = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
|
|
@@ -30326,7 +30326,7 @@ function stringWidth(string, options = {}) {
|
|
|
30326
30326
|
return width;
|
|
30327
30327
|
}
|
|
30328
30328
|
|
|
30329
|
-
// node_modules/widest-line/index.js
|
|
30329
|
+
// ../latentcode/node_modules/widest-line/index.js
|
|
30330
30330
|
function widestLine(string) {
|
|
30331
30331
|
let lineWidth = 0;
|
|
30332
30332
|
for (const line of string.split("\n")) {
|
|
@@ -30335,7 +30335,7 @@ function widestLine(string) {
|
|
|
30335
30335
|
return lineWidth;
|
|
30336
30336
|
}
|
|
30337
30337
|
|
|
30338
|
-
// node_modules/ink/build/measure-text.js
|
|
30338
|
+
// ../latentcode/node_modules/ink/build/measure-text.js
|
|
30339
30339
|
var cache = {};
|
|
30340
30340
|
var measureText = (text) => {
|
|
30341
30341
|
if (text.length === 0) {
|
|
@@ -30355,7 +30355,7 @@ var measureText = (text) => {
|
|
|
30355
30355
|
};
|
|
30356
30356
|
var measure_text_default = measureText;
|
|
30357
30357
|
|
|
30358
|
-
// node_modules/ansi-styles/index.js
|
|
30358
|
+
// ../latentcode/node_modules/ansi-styles/index.js
|
|
30359
30359
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
30360
30360
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
30361
30361
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -30541,7 +30541,7 @@ function assembleStyles() {
|
|
|
30541
30541
|
var ansiStyles = assembleStyles();
|
|
30542
30542
|
var ansi_styles_default = ansiStyles;
|
|
30543
30543
|
|
|
30544
|
-
// node_modules/wrap-ansi/index.js
|
|
30544
|
+
// ../latentcode/node_modules/wrap-ansi/index.js
|
|
30545
30545
|
var ESCAPES = /* @__PURE__ */ new Set([
|
|
30546
30546
|
"\x1B",
|
|
30547
30547
|
"\x9B"
|
|
@@ -30696,7 +30696,7 @@ function wrapAnsi(string, columns, options) {
|
|
|
30696
30696
|
return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
|
|
30697
30697
|
}
|
|
30698
30698
|
|
|
30699
|
-
// node_modules/is-fullwidth-code-point/index.js
|
|
30699
|
+
// ../latentcode/node_modules/is-fullwidth-code-point/index.js
|
|
30700
30700
|
function isFullwidthCodePoint(codePoint) {
|
|
30701
30701
|
if (!Number.isInteger(codePoint)) {
|
|
30702
30702
|
return false;
|
|
@@ -30719,7 +30719,7 @@ function isFullwidthCodePoint(codePoint) {
|
|
|
30719
30719
|
131072 <= codePoint && codePoint <= 262141);
|
|
30720
30720
|
}
|
|
30721
30721
|
|
|
30722
|
-
// node_modules/cli-truncate/node_modules/slice-ansi/index.js
|
|
30722
|
+
// ../latentcode/node_modules/cli-truncate/node_modules/slice-ansi/index.js
|
|
30723
30723
|
var astralRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/;
|
|
30724
30724
|
var ESCAPES2 = [
|
|
30725
30725
|
"\x1B",
|
|
@@ -30802,7 +30802,7 @@ function sliceAnsi(string, begin, end2) {
|
|
|
30802
30802
|
return output;
|
|
30803
30803
|
}
|
|
30804
30804
|
|
|
30805
|
-
// node_modules/cli-truncate/index.js
|
|
30805
|
+
// ../latentcode/node_modules/cli-truncate/index.js
|
|
30806
30806
|
function getIndexOfNearestSpace(string, wantedIndex, shouldSearchRight) {
|
|
30807
30807
|
if (string.charAt(wantedIndex) === " ") {
|
|
30808
30808
|
return wantedIndex;
|
|
@@ -30874,7 +30874,7 @@ function cliTruncate(text, columns, options = {}) {
|
|
|
30874
30874
|
throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
|
|
30875
30875
|
}
|
|
30876
30876
|
|
|
30877
|
-
// node_modules/ink/build/wrap-text.js
|
|
30877
|
+
// ../latentcode/node_modules/ink/build/wrap-text.js
|
|
30878
30878
|
var cache2 = {};
|
|
30879
30879
|
var wrapText = (text, maxWidth, wrapType) => {
|
|
30880
30880
|
const cacheKey = text + String(maxWidth) + String(wrapType);
|
|
@@ -30904,7 +30904,7 @@ var wrapText = (text, maxWidth, wrapType) => {
|
|
|
30904
30904
|
};
|
|
30905
30905
|
var wrap_text_default = wrapText;
|
|
30906
30906
|
|
|
30907
|
-
// node_modules/ink/build/squash-text-nodes.js
|
|
30907
|
+
// ../latentcode/node_modules/ink/build/squash-text-nodes.js
|
|
30908
30908
|
var squashTextNodes = (node) => {
|
|
30909
30909
|
let text = "";
|
|
30910
30910
|
for (let index = 0; index < node.childNodes.length; index++) {
|
|
@@ -30929,7 +30929,7 @@ var squashTextNodes = (node) => {
|
|
|
30929
30929
|
};
|
|
30930
30930
|
var squash_text_nodes_default = squashTextNodes;
|
|
30931
30931
|
|
|
30932
|
-
// node_modules/ink/build/dom.js
|
|
30932
|
+
// ../latentcode/node_modules/ink/build/dom.js
|
|
30933
30933
|
var createNode = (nodeName) => {
|
|
30934
30934
|
const node = {
|
|
30935
30935
|
nodeName,
|
|
@@ -31039,7 +31039,7 @@ var setTextNodeValue = (node, text) => {
|
|
|
31039
31039
|
markNodeAsDirty(node);
|
|
31040
31040
|
};
|
|
31041
31041
|
|
|
31042
|
-
// node_modules/ink/build/styles.js
|
|
31042
|
+
// ../latentcode/node_modules/ink/build/styles.js
|
|
31043
31043
|
var applyPositionStyles = (node, style) => {
|
|
31044
31044
|
if ("position" in style) {
|
|
31045
31045
|
node.setPositionType(style.position === "absolute" ? src_default.POSITION_TYPE_ABSOLUTE : src_default.POSITION_TYPE_RELATIVE);
|
|
@@ -31260,7 +31260,7 @@ var styles2 = (node, style = {}) => {
|
|
|
31260
31260
|
};
|
|
31261
31261
|
var styles_default = styles2;
|
|
31262
31262
|
|
|
31263
|
-
// node_modules/ink/build/reconciler.js
|
|
31263
|
+
// ../latentcode/node_modules/ink/build/reconciler.js
|
|
31264
31264
|
if (process3.env["DEV"] === "true") {
|
|
31265
31265
|
try {
|
|
31266
31266
|
await Promise.resolve().then(() => (init_devtools(), devtools_exports));
|
|
@@ -31466,7 +31466,7 @@ var reconciler_default = (0, import_react_reconciler.default)({
|
|
|
31466
31466
|
}
|
|
31467
31467
|
});
|
|
31468
31468
|
|
|
31469
|
-
// node_modules/indent-string/index.js
|
|
31469
|
+
// ../latentcode/node_modules/indent-string/index.js
|
|
31470
31470
|
function indentString(string, count = 1, options = {}) {
|
|
31471
31471
|
const {
|
|
31472
31472
|
indent = " ",
|
|
@@ -31499,16 +31499,16 @@ function indentString(string, count = 1, options = {}) {
|
|
|
31499
31499
|
return string.replace(regex2, indent.repeat(count));
|
|
31500
31500
|
}
|
|
31501
31501
|
|
|
31502
|
-
// node_modules/ink/build/get-max-width.js
|
|
31502
|
+
// ../latentcode/node_modules/ink/build/get-max-width.js
|
|
31503
31503
|
var getMaxWidth = (yogaNode) => {
|
|
31504
31504
|
return yogaNode.getComputedWidth() - yogaNode.getComputedPadding(src_default.EDGE_LEFT) - yogaNode.getComputedPadding(src_default.EDGE_RIGHT) - yogaNode.getComputedBorder(src_default.EDGE_LEFT) - yogaNode.getComputedBorder(src_default.EDGE_RIGHT);
|
|
31505
31505
|
};
|
|
31506
31506
|
var get_max_width_default = getMaxWidth;
|
|
31507
31507
|
|
|
31508
|
-
// node_modules/ink/build/render-border.js
|
|
31508
|
+
// ../latentcode/node_modules/ink/build/render-border.js
|
|
31509
31509
|
var import_cli_boxes = __toESM(require_cli_boxes(), 1);
|
|
31510
31510
|
|
|
31511
|
-
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
31511
|
+
// ../latentcode/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
31512
31512
|
var ANSI_BACKGROUND_OFFSET2 = 10;
|
|
31513
31513
|
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
31514
31514
|
var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -31694,7 +31694,7 @@ function assembleStyles2() {
|
|
|
31694
31694
|
var ansiStyles2 = assembleStyles2();
|
|
31695
31695
|
var ansi_styles_default2 = ansiStyles2;
|
|
31696
31696
|
|
|
31697
|
-
// node_modules/chalk/source/vendor/supports-color/index.js
|
|
31697
|
+
// ../latentcode/node_modules/chalk/source/vendor/supports-color/index.js
|
|
31698
31698
|
import process4 from "node:process";
|
|
31699
31699
|
import os2 from "node:os";
|
|
31700
31700
|
import tty from "node:tty";
|
|
@@ -31826,7 +31826,7 @@ var supportsColor = {
|
|
|
31826
31826
|
};
|
|
31827
31827
|
var supports_color_default = supportsColor;
|
|
31828
31828
|
|
|
31829
|
-
// node_modules/chalk/source/utilities.js
|
|
31829
|
+
// ../latentcode/node_modules/chalk/source/utilities.js
|
|
31830
31830
|
function stringReplaceAll(string, substring, replacer) {
|
|
31831
31831
|
let index = string.indexOf(substring);
|
|
31832
31832
|
if (index === -1) {
|
|
@@ -31856,7 +31856,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
31856
31856
|
return returnValue;
|
|
31857
31857
|
}
|
|
31858
31858
|
|
|
31859
|
-
// node_modules/chalk/source/index.js
|
|
31859
|
+
// ../latentcode/node_modules/chalk/source/index.js
|
|
31860
31860
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
31861
31861
|
var GENERATOR = /* @__PURE__ */ Symbol("GENERATOR");
|
|
31862
31862
|
var STYLER = /* @__PURE__ */ Symbol("STYLER");
|
|
@@ -32003,7 +32003,7 @@ var chalk = createChalk();
|
|
|
32003
32003
|
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
32004
32004
|
var source_default = chalk;
|
|
32005
32005
|
|
|
32006
|
-
// node_modules/ink/build/colorize.js
|
|
32006
|
+
// ../latentcode/node_modules/ink/build/colorize.js
|
|
32007
32007
|
var rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/;
|
|
32008
32008
|
var ansiRegex2 = /^ansi256\(\s?(\d+)\s?\)$/;
|
|
32009
32009
|
var isNamedColor = (color) => {
|
|
@@ -32045,7 +32045,7 @@ var colorize = (str2, color, type) => {
|
|
|
32045
32045
|
};
|
|
32046
32046
|
var colorize_default = colorize;
|
|
32047
32047
|
|
|
32048
|
-
// node_modules/ink/build/render-border.js
|
|
32048
|
+
// ../latentcode/node_modules/ink/build/render-border.js
|
|
32049
32049
|
var renderBorder = (x, y, node, output) => {
|
|
32050
32050
|
if (node.style.borderStyle) {
|
|
32051
32051
|
const width = node.yogaNode.getComputedWidth();
|
|
@@ -32106,7 +32106,7 @@ var renderBorder = (x, y, node, output) => {
|
|
|
32106
32106
|
};
|
|
32107
32107
|
var render_border_default = renderBorder;
|
|
32108
32108
|
|
|
32109
|
-
// node_modules/ink/build/render-node-to-output.js
|
|
32109
|
+
// ../latentcode/node_modules/ink/build/render-node-to-output.js
|
|
32110
32110
|
var applyPaddingToText = (node, text) => {
|
|
32111
32111
|
const yogaNode = node.childNodes[0]?.yogaNode;
|
|
32112
32112
|
if (yogaNode) {
|
|
@@ -32177,7 +32177,7 @@ var renderNodeToOutput = (node, output, options) => {
|
|
|
32177
32177
|
};
|
|
32178
32178
|
var render_node_to_output_default = renderNodeToOutput;
|
|
32179
32179
|
|
|
32180
|
-
// node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js
|
|
32180
|
+
// ../latentcode/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js
|
|
32181
32181
|
function isFullwidthCodePoint2(codePoint) {
|
|
32182
32182
|
if (!Number.isInteger(codePoint)) {
|
|
32183
32183
|
return false;
|
|
@@ -32185,7 +32185,7 @@ function isFullwidthCodePoint2(codePoint) {
|
|
|
32185
32185
|
return isFullwidth(codePoint) || isWide(codePoint);
|
|
32186
32186
|
}
|
|
32187
32187
|
|
|
32188
|
-
// node_modules/slice-ansi/index.js
|
|
32188
|
+
// ../latentcode/node_modules/slice-ansi/index.js
|
|
32189
32189
|
var ESCAPES3 = /* @__PURE__ */ new Set([27, 155]);
|
|
32190
32190
|
var CODE_POINT_0 = "0".codePointAt(0);
|
|
32191
32191
|
var CODE_POINT_9 = "9".codePointAt(0);
|
|
@@ -32316,7 +32316,7 @@ function sliceAnsi2(string, start, end2) {
|
|
|
32316
32316
|
return returnValue;
|
|
32317
32317
|
}
|
|
32318
32318
|
|
|
32319
|
-
// node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js
|
|
32319
|
+
// ../latentcode/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js
|
|
32320
32320
|
var ESCAPES4 = /* @__PURE__ */ new Set([27, 155]);
|
|
32321
32321
|
var endCodesSet2 = /* @__PURE__ */ new Set();
|
|
32322
32322
|
var endCodesMap2 = /* @__PURE__ */ new Map();
|
|
@@ -32351,7 +32351,7 @@ function ansiCodesToString(codes) {
|
|
|
32351
32351
|
return codes.map((code) => code.code).join("");
|
|
32352
32352
|
}
|
|
32353
32353
|
|
|
32354
|
-
// node_modules/@alcalzone/ansi-tokenize/build/reduce.js
|
|
32354
|
+
// ../latentcode/node_modules/@alcalzone/ansi-tokenize/build/reduce.js
|
|
32355
32355
|
function reduceAnsiCodes2(codes) {
|
|
32356
32356
|
return reduceAnsiCodesIncremental([], codes);
|
|
32357
32357
|
}
|
|
@@ -32370,7 +32370,7 @@ function reduceAnsiCodesIncremental(codes, newCodes) {
|
|
|
32370
32370
|
return ret;
|
|
32371
32371
|
}
|
|
32372
32372
|
|
|
32373
|
-
// node_modules/@alcalzone/ansi-tokenize/build/undo.js
|
|
32373
|
+
// ../latentcode/node_modules/@alcalzone/ansi-tokenize/build/undo.js
|
|
32374
32374
|
function undoAnsiCodes2(codes) {
|
|
32375
32375
|
return reduceAnsiCodes2(codes).reverse().map((code) => ({
|
|
32376
32376
|
...code,
|
|
@@ -32378,7 +32378,7 @@ function undoAnsiCodes2(codes) {
|
|
|
32378
32378
|
}));
|
|
32379
32379
|
}
|
|
32380
32380
|
|
|
32381
|
-
// node_modules/@alcalzone/ansi-tokenize/build/diff.js
|
|
32381
|
+
// ../latentcode/node_modules/@alcalzone/ansi-tokenize/build/diff.js
|
|
32382
32382
|
function diffAnsiCodes(from, to) {
|
|
32383
32383
|
const endCodesInTo = new Set(to.map((code) => code.endCode));
|
|
32384
32384
|
const startCodesInFrom = new Set(from.map((code) => code.code));
|
|
@@ -32391,7 +32391,7 @@ function diffAnsiCodes(from, to) {
|
|
|
32391
32391
|
];
|
|
32392
32392
|
}
|
|
32393
32393
|
|
|
32394
|
-
// node_modules/@alcalzone/ansi-tokenize/build/styledChars.js
|
|
32394
|
+
// ../latentcode/node_modules/@alcalzone/ansi-tokenize/build/styledChars.js
|
|
32395
32395
|
function styledCharsFromTokens(tokens) {
|
|
32396
32396
|
let codes = [];
|
|
32397
32397
|
const ret = [];
|
|
@@ -32424,7 +32424,7 @@ function styledCharsToString(chars) {
|
|
|
32424
32424
|
return ret;
|
|
32425
32425
|
}
|
|
32426
32426
|
|
|
32427
|
-
// node_modules/@alcalzone/ansi-tokenize/build/tokenize.js
|
|
32427
|
+
// ../latentcode/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js
|
|
32428
32428
|
function findNumberIndex2(str2) {
|
|
32429
32429
|
for (let index = 0; index < str2.length; index++) {
|
|
32430
32430
|
const charCode = str2.charCodeAt(index);
|
|
@@ -32491,7 +32491,7 @@ function tokenize2(str2, endChar = Number.POSITIVE_INFINITY) {
|
|
|
32491
32491
|
return ret;
|
|
32492
32492
|
}
|
|
32493
32493
|
|
|
32494
|
-
// node_modules/ink/build/output.js
|
|
32494
|
+
// ../latentcode/node_modules/ink/build/output.js
|
|
32495
32495
|
var Output = class {
|
|
32496
32496
|
width;
|
|
32497
32497
|
height;
|
|
@@ -32627,7 +32627,7 @@ var Output = class {
|
|
|
32627
32627
|
}
|
|
32628
32628
|
};
|
|
32629
32629
|
|
|
32630
|
-
// node_modules/ink/build/renderer.js
|
|
32630
|
+
// ../latentcode/node_modules/ink/build/renderer.js
|
|
32631
32631
|
var renderer = (node) => {
|
|
32632
32632
|
if (node.yogaNode) {
|
|
32633
32633
|
const output = new Output({
|
|
@@ -32663,10 +32663,10 @@ var renderer = (node) => {
|
|
|
32663
32663
|
};
|
|
32664
32664
|
var renderer_default = renderer;
|
|
32665
32665
|
|
|
32666
|
-
// node_modules/cli-cursor/index.js
|
|
32666
|
+
// ../latentcode/node_modules/cli-cursor/index.js
|
|
32667
32667
|
import process6 from "node:process";
|
|
32668
32668
|
|
|
32669
|
-
// node_modules/restore-cursor/index.js
|
|
32669
|
+
// ../latentcode/node_modules/restore-cursor/index.js
|
|
32670
32670
|
var import_onetime = __toESM(require_onetime(), 1);
|
|
32671
32671
|
var import_signal_exit = __toESM(require_signal_exit(), 1);
|
|
32672
32672
|
import process5 from "node:process";
|
|
@@ -32677,7 +32677,7 @@ var restoreCursor = (0, import_onetime.default)(() => {
|
|
|
32677
32677
|
});
|
|
32678
32678
|
var restore_cursor_default = restoreCursor;
|
|
32679
32679
|
|
|
32680
|
-
// node_modules/cli-cursor/index.js
|
|
32680
|
+
// ../latentcode/node_modules/cli-cursor/index.js
|
|
32681
32681
|
var isHidden = false;
|
|
32682
32682
|
var cliCursor = {};
|
|
32683
32683
|
cliCursor.show = (writableStream = process6.stderr) => {
|
|
@@ -32707,7 +32707,7 @@ cliCursor.toggle = (force, writableStream) => {
|
|
|
32707
32707
|
};
|
|
32708
32708
|
var cli_cursor_default = cliCursor;
|
|
32709
32709
|
|
|
32710
|
-
// node_modules/ink/build/log-update.js
|
|
32710
|
+
// ../latentcode/node_modules/ink/build/log-update.js
|
|
32711
32711
|
var create = (stream, { showCursor = false } = {}) => {
|
|
32712
32712
|
let previousLineCount = 0;
|
|
32713
32713
|
let previousOutput = "";
|
|
@@ -32743,16 +32743,16 @@ var create = (stream, { showCursor = false } = {}) => {
|
|
|
32743
32743
|
var logUpdate = { create };
|
|
32744
32744
|
var log_update_default = logUpdate;
|
|
32745
32745
|
|
|
32746
|
-
// node_modules/ink/build/instances.js
|
|
32746
|
+
// ../latentcode/node_modules/ink/build/instances.js
|
|
32747
32747
|
var instances = /* @__PURE__ */ new WeakMap();
|
|
32748
32748
|
var instances_default = instances;
|
|
32749
32749
|
|
|
32750
|
-
// node_modules/ink/build/components/App.js
|
|
32750
|
+
// ../latentcode/node_modules/ink/build/components/App.js
|
|
32751
32751
|
var import_react9 = __toESM(require_react(), 1);
|
|
32752
32752
|
import { EventEmitter as EventEmitter2 } from "node:events";
|
|
32753
32753
|
import process10 from "node:process";
|
|
32754
32754
|
|
|
32755
|
-
// node_modules/ink/build/components/AppContext.js
|
|
32755
|
+
// ../latentcode/node_modules/ink/build/components/AppContext.js
|
|
32756
32756
|
var import_react = __toESM(require_react(), 1);
|
|
32757
32757
|
var AppContext = (0, import_react.createContext)({
|
|
32758
32758
|
exit() {
|
|
@@ -32761,7 +32761,7 @@ var AppContext = (0, import_react.createContext)({
|
|
|
32761
32761
|
AppContext.displayName = "InternalAppContext";
|
|
32762
32762
|
var AppContext_default = AppContext;
|
|
32763
32763
|
|
|
32764
|
-
// node_modules/ink/build/components/StdinContext.js
|
|
32764
|
+
// ../latentcode/node_modules/ink/build/components/StdinContext.js
|
|
32765
32765
|
var import_react2 = __toESM(require_react(), 1);
|
|
32766
32766
|
import { EventEmitter } from "node:events";
|
|
32767
32767
|
import process7 from "node:process";
|
|
@@ -32778,7 +32778,7 @@ var StdinContext = (0, import_react2.createContext)({
|
|
|
32778
32778
|
StdinContext.displayName = "InternalStdinContext";
|
|
32779
32779
|
var StdinContext_default = StdinContext;
|
|
32780
32780
|
|
|
32781
|
-
// node_modules/ink/build/components/StdoutContext.js
|
|
32781
|
+
// ../latentcode/node_modules/ink/build/components/StdoutContext.js
|
|
32782
32782
|
var import_react3 = __toESM(require_react(), 1);
|
|
32783
32783
|
import process8 from "node:process";
|
|
32784
32784
|
var StdoutContext = (0, import_react3.createContext)({
|
|
@@ -32789,7 +32789,7 @@ var StdoutContext = (0, import_react3.createContext)({
|
|
|
32789
32789
|
StdoutContext.displayName = "InternalStdoutContext";
|
|
32790
32790
|
var StdoutContext_default = StdoutContext;
|
|
32791
32791
|
|
|
32792
|
-
// node_modules/ink/build/components/StderrContext.js
|
|
32792
|
+
// ../latentcode/node_modules/ink/build/components/StderrContext.js
|
|
32793
32793
|
var import_react4 = __toESM(require_react(), 1);
|
|
32794
32794
|
import process9 from "node:process";
|
|
32795
32795
|
var StderrContext = (0, import_react4.createContext)({
|
|
@@ -32800,7 +32800,7 @@ var StderrContext = (0, import_react4.createContext)({
|
|
|
32800
32800
|
StderrContext.displayName = "InternalStderrContext";
|
|
32801
32801
|
var StderrContext_default = StderrContext;
|
|
32802
32802
|
|
|
32803
|
-
// node_modules/ink/build/components/FocusContext.js
|
|
32803
|
+
// ../latentcode/node_modules/ink/build/components/FocusContext.js
|
|
32804
32804
|
var import_react5 = __toESM(require_react(), 1);
|
|
32805
32805
|
var FocusContext = (0, import_react5.createContext)({
|
|
32806
32806
|
activeId: void 0,
|
|
@@ -32826,19 +32826,19 @@ var FocusContext = (0, import_react5.createContext)({
|
|
|
32826
32826
|
FocusContext.displayName = "InternalFocusContext";
|
|
32827
32827
|
var FocusContext_default = FocusContext;
|
|
32828
32828
|
|
|
32829
|
-
// node_modules/ink/build/components/ErrorOverview.js
|
|
32829
|
+
// ../latentcode/node_modules/ink/build/components/ErrorOverview.js
|
|
32830
32830
|
var import_react8 = __toESM(require_react(), 1);
|
|
32831
32831
|
var import_stack_utils = __toESM(require_stack_utils(), 1);
|
|
32832
32832
|
import * as fs from "node:fs";
|
|
32833
32833
|
import { cwd } from "node:process";
|
|
32834
32834
|
|
|
32835
|
-
// node_modules/convert-to-spaces/dist/index.js
|
|
32835
|
+
// ../latentcode/node_modules/convert-to-spaces/dist/index.js
|
|
32836
32836
|
var convertToSpaces = (input, spaces = 2) => {
|
|
32837
32837
|
return input.replace(/^\t+/gm, ($1) => " ".repeat($1.length * spaces));
|
|
32838
32838
|
};
|
|
32839
32839
|
var dist_default2 = convertToSpaces;
|
|
32840
32840
|
|
|
32841
|
-
// node_modules/code-excerpt/dist/index.js
|
|
32841
|
+
// ../latentcode/node_modules/code-excerpt/dist/index.js
|
|
32842
32842
|
var generateLineNumbers = (line, around) => {
|
|
32843
32843
|
const lineNumbers = [];
|
|
32844
32844
|
const min = line - around;
|
|
@@ -32864,7 +32864,7 @@ var codeExcerpt = (source, line, options = {}) => {
|
|
|
32864
32864
|
};
|
|
32865
32865
|
var dist_default3 = codeExcerpt;
|
|
32866
32866
|
|
|
32867
|
-
// node_modules/ink/build/components/Box.js
|
|
32867
|
+
// ../latentcode/node_modules/ink/build/components/Box.js
|
|
32868
32868
|
var import_react6 = __toESM(require_react(), 1);
|
|
32869
32869
|
var Box = (0, import_react6.forwardRef)(({ children, ...style }, ref) => {
|
|
32870
32870
|
return import_react6.default.createElement("ink-box", { ref, style: {
|
|
@@ -32882,7 +32882,7 @@ Box.defaultProps = {
|
|
|
32882
32882
|
};
|
|
32883
32883
|
var Box_default = Box;
|
|
32884
32884
|
|
|
32885
|
-
// node_modules/ink/build/components/Text.js
|
|
32885
|
+
// ../latentcode/node_modules/ink/build/components/Text.js
|
|
32886
32886
|
var import_react7 = __toESM(require_react(), 1);
|
|
32887
32887
|
function Text({ color, backgroundColor, dimColor = false, bold = false, italic = false, underline = false, strikethrough = false, inverse = false, wrap: wrap2 = "wrap", children }) {
|
|
32888
32888
|
if (children === void 0 || children === null) {
|
|
@@ -32918,7 +32918,7 @@ function Text({ color, backgroundColor, dimColor = false, bold = false, italic =
|
|
|
32918
32918
|
return import_react7.default.createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: "row", textWrap: wrap2 }, internal_transform: transform }, children);
|
|
32919
32919
|
}
|
|
32920
32920
|
|
|
32921
|
-
// node_modules/ink/build/components/ErrorOverview.js
|
|
32921
|
+
// ../latentcode/node_modules/ink/build/components/ErrorOverview.js
|
|
32922
32922
|
var cleanupPath = (path) => {
|
|
32923
32923
|
return path?.replace(`file://${cwd()}/`, "");
|
|
32924
32924
|
};
|
|
@@ -33021,7 +33021,7 @@ function ErrorOverview({ error }) {
|
|
|
33021
33021
|
);
|
|
33022
33022
|
}
|
|
33023
33023
|
|
|
33024
|
-
// node_modules/ink/build/components/App.js
|
|
33024
|
+
// ../latentcode/node_modules/ink/build/components/App.js
|
|
33025
33025
|
var tab = " ";
|
|
33026
33026
|
var shiftTab = "\x1B[Z";
|
|
33027
33027
|
var escape = "\x1B";
|
|
@@ -33294,7 +33294,7 @@ var App = class extends import_react9.PureComponent {
|
|
|
33294
33294
|
};
|
|
33295
33295
|
};
|
|
33296
33296
|
|
|
33297
|
-
// node_modules/ink/build/ink.js
|
|
33297
|
+
// ../latentcode/node_modules/ink/build/ink.js
|
|
33298
33298
|
var noop = () => {
|
|
33299
33299
|
};
|
|
33300
33300
|
var Ink = class {
|
|
@@ -33510,7 +33510,7 @@ var Ink = class {
|
|
|
33510
33510
|
}
|
|
33511
33511
|
};
|
|
33512
33512
|
|
|
33513
|
-
// node_modules/ink/build/render.js
|
|
33513
|
+
// ../latentcode/node_modules/ink/build/render.js
|
|
33514
33514
|
var render = (node, options) => {
|
|
33515
33515
|
const inkOptions = {
|
|
33516
33516
|
stdout: process12.stdout,
|
|
@@ -33552,7 +33552,7 @@ var getInstance = (stdout, createInstance) => {
|
|
|
33552
33552
|
return instance;
|
|
33553
33553
|
};
|
|
33554
33554
|
|
|
33555
|
-
// node_modules/ink/build/components/Static.js
|
|
33555
|
+
// ../latentcode/node_modules/ink/build/components/Static.js
|
|
33556
33556
|
var import_react11 = __toESM(require_react(), 1);
|
|
33557
33557
|
function Static(props) {
|
|
33558
33558
|
const { items, children: render2, style: customStyle } = props;
|
|
@@ -33574,7 +33574,7 @@ function Static(props) {
|
|
|
33574
33574
|
return import_react11.default.createElement("ink-box", { internal_static: true, style }, children);
|
|
33575
33575
|
}
|
|
33576
33576
|
|
|
33577
|
-
// node_modules/ink/build/components/Transform.js
|
|
33577
|
+
// ../latentcode/node_modules/ink/build/components/Transform.js
|
|
33578
33578
|
var import_react12 = __toESM(require_react(), 1);
|
|
33579
33579
|
function Transform({ children, transform }) {
|
|
33580
33580
|
if (children === void 0 || children === null) {
|
|
@@ -33583,16 +33583,16 @@ function Transform({ children, transform }) {
|
|
|
33583
33583
|
return import_react12.default.createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: "row" }, internal_transform: transform }, children);
|
|
33584
33584
|
}
|
|
33585
33585
|
|
|
33586
|
-
// node_modules/ink/build/components/Newline.js
|
|
33586
|
+
// ../latentcode/node_modules/ink/build/components/Newline.js
|
|
33587
33587
|
var import_react13 = __toESM(require_react(), 1);
|
|
33588
33588
|
|
|
33589
|
-
// node_modules/ink/build/components/Spacer.js
|
|
33589
|
+
// ../latentcode/node_modules/ink/build/components/Spacer.js
|
|
33590
33590
|
var import_react14 = __toESM(require_react(), 1);
|
|
33591
33591
|
|
|
33592
|
-
// node_modules/ink/build/hooks/use-input.js
|
|
33592
|
+
// ../latentcode/node_modules/ink/build/hooks/use-input.js
|
|
33593
33593
|
var import_react16 = __toESM(require_react(), 1);
|
|
33594
33594
|
|
|
33595
|
-
// node_modules/ink/build/parse-keypress.js
|
|
33595
|
+
// ../latentcode/node_modules/ink/build/parse-keypress.js
|
|
33596
33596
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
33597
33597
|
var metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/;
|
|
33598
33598
|
var fnKeyRe = /^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/;
|
|
@@ -33784,12 +33784,12 @@ var parseKeypress = (s2 = "") => {
|
|
|
33784
33784
|
};
|
|
33785
33785
|
var parse_keypress_default = parseKeypress;
|
|
33786
33786
|
|
|
33787
|
-
// node_modules/ink/build/hooks/use-stdin.js
|
|
33787
|
+
// ../latentcode/node_modules/ink/build/hooks/use-stdin.js
|
|
33788
33788
|
var import_react15 = __toESM(require_react(), 1);
|
|
33789
33789
|
var useStdin = () => (0, import_react15.useContext)(StdinContext_default);
|
|
33790
33790
|
var use_stdin_default = useStdin;
|
|
33791
33791
|
|
|
33792
|
-
// node_modules/ink/build/hooks/use-input.js
|
|
33792
|
+
// ../latentcode/node_modules/ink/build/hooks/use-input.js
|
|
33793
33793
|
var useInput = (inputHandler, options = {}) => {
|
|
33794
33794
|
const { stdin, setRawMode, internal_exitOnCtrlC, internal_eventEmitter } = use_stdin_default();
|
|
33795
33795
|
(0, import_react16.useEffect)(() => {
|
|
@@ -33851,23 +33851,23 @@ var useInput = (inputHandler, options = {}) => {
|
|
|
33851
33851
|
};
|
|
33852
33852
|
var use_input_default = useInput;
|
|
33853
33853
|
|
|
33854
|
-
// node_modules/ink/build/hooks/use-app.js
|
|
33854
|
+
// ../latentcode/node_modules/ink/build/hooks/use-app.js
|
|
33855
33855
|
var import_react17 = __toESM(require_react(), 1);
|
|
33856
33856
|
var useApp = () => (0, import_react17.useContext)(AppContext_default);
|
|
33857
33857
|
var use_app_default = useApp;
|
|
33858
33858
|
|
|
33859
|
-
// node_modules/ink/build/hooks/use-stdout.js
|
|
33859
|
+
// ../latentcode/node_modules/ink/build/hooks/use-stdout.js
|
|
33860
33860
|
var import_react18 = __toESM(require_react(), 1);
|
|
33861
33861
|
var useStdout = () => (0, import_react18.useContext)(StdoutContext_default);
|
|
33862
33862
|
var use_stdout_default = useStdout;
|
|
33863
33863
|
|
|
33864
|
-
// node_modules/ink/build/hooks/use-stderr.js
|
|
33864
|
+
// ../latentcode/node_modules/ink/build/hooks/use-stderr.js
|
|
33865
33865
|
var import_react19 = __toESM(require_react(), 1);
|
|
33866
33866
|
|
|
33867
|
-
// node_modules/ink/build/hooks/use-focus.js
|
|
33867
|
+
// ../latentcode/node_modules/ink/build/hooks/use-focus.js
|
|
33868
33868
|
var import_react20 = __toESM(require_react(), 1);
|
|
33869
33869
|
|
|
33870
|
-
// node_modules/ink/build/hooks/use-focus-manager.js
|
|
33870
|
+
// ../latentcode/node_modules/ink/build/hooks/use-focus-manager.js
|
|
33871
33871
|
var import_react21 = __toESM(require_react(), 1);
|
|
33872
33872
|
|
|
33873
33873
|
// src/index.tsx
|
|
@@ -34846,10 +34846,10 @@ ${seen.slice(-800)}`));
|
|
|
34846
34846
|
};
|
|
34847
34847
|
|
|
34848
34848
|
// src/index.tsx
|
|
34849
|
-
import { spawnSync as
|
|
34849
|
+
import { spawnSync as spawnSync4 } from "node:child_process";
|
|
34850
34850
|
|
|
34851
34851
|
// src/ui/Root.tsx
|
|
34852
|
-
var
|
|
34852
|
+
var import_react29 = __toESM(require_react(), 1);
|
|
34853
34853
|
|
|
34854
34854
|
// src/engine/models.ts
|
|
34855
34855
|
import { mkdirSync as mkdirSync3, readFileSync as readFileSync6, writeFileSync as writeFileSync4 } from "node:fs";
|
|
@@ -36092,7 +36092,7 @@ async function boot(args, focus, report) {
|
|
|
36092
36092
|
enabled: () => loadConfig().sync !== false,
|
|
36093
36093
|
lastHash: fileHashStore(),
|
|
36094
36094
|
collect: async () => buildSyncState({
|
|
36095
|
-
appVersion: true ? "0.1.0-alpha.
|
|
36095
|
+
appVersion: true ? "0.1.0-alpha.13" : "",
|
|
36096
36096
|
engineVersion,
|
|
36097
36097
|
model: await engine.defaultModel().then((m) => m ? `${m.providerID}/${m.id}` : session.key),
|
|
36098
36098
|
catalog: await engine.catalog(),
|
|
@@ -36120,7 +36120,7 @@ function firstLine(e) {
|
|
|
36120
36120
|
}
|
|
36121
36121
|
|
|
36122
36122
|
// src/ui/App.tsx
|
|
36123
|
-
var
|
|
36123
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
36124
36124
|
import { homedir as homedir4 } from "node:os";
|
|
36125
36125
|
|
|
36126
36126
|
// src/util/open.ts
|
|
@@ -36136,6 +36136,38 @@ function openUrl(url) {
|
|
|
36136
36136
|
}
|
|
36137
36137
|
}
|
|
36138
36138
|
|
|
36139
|
+
// src/util/clipboard.ts
|
|
36140
|
+
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
36141
|
+
function clipboardCommands(platform2 = process.platform, env3 = process.env) {
|
|
36142
|
+
if (platform2 === "darwin") return [["pbcopy"]];
|
|
36143
|
+
if (platform2 === "win32") return [["clip"]];
|
|
36144
|
+
const list2 = [];
|
|
36145
|
+
if (env3.WAYLAND_DISPLAY) list2.push(["wl-copy"]);
|
|
36146
|
+
list2.push(["xclip", "-selection", "clipboard"], ["xsel", "--clipboard", "--input"]);
|
|
36147
|
+
return list2;
|
|
36148
|
+
}
|
|
36149
|
+
function osc52(text) {
|
|
36150
|
+
return `\x1B]52;c;${Buffer.from(text, "utf8").toString("base64")}\x07`;
|
|
36151
|
+
}
|
|
36152
|
+
function copyText(text, write = (s2) => process.stdout.write(s2), platform2 = process.platform, env3 = process.env) {
|
|
36153
|
+
const remote = !!(env3.SSH_TTY || env3.SSH_CONNECTION);
|
|
36154
|
+
if (!remote) {
|
|
36155
|
+
for (const [cmd, ...args] of clipboardCommands(platform2, env3)) {
|
|
36156
|
+
try {
|
|
36157
|
+
const r = spawnSync2(cmd, args, { input: text, stdio: ["pipe", "ignore", "ignore"], timeout: 2e3 });
|
|
36158
|
+
if (!r.error && r.status === 0) return "copied";
|
|
36159
|
+
} catch {
|
|
36160
|
+
}
|
|
36161
|
+
}
|
|
36162
|
+
}
|
|
36163
|
+
try {
|
|
36164
|
+
write(osc52(text));
|
|
36165
|
+
return "osc52";
|
|
36166
|
+
} catch {
|
|
36167
|
+
return "failed";
|
|
36168
|
+
}
|
|
36169
|
+
}
|
|
36170
|
+
|
|
36139
36171
|
// src/engine/session.ts
|
|
36140
36172
|
function initialState(sessionID, model = "") {
|
|
36141
36173
|
return {
|
|
@@ -36465,10 +36497,10 @@ function StatusPanel(p) {
|
|
|
36465
36497
|
const ctaLen = cta ? cta.length + 8 : 0;
|
|
36466
36498
|
const brand = ad.title || ad.body;
|
|
36467
36499
|
const rest = ad.title && ad.body ? ` \u2014 ${ad.body}` : "";
|
|
36468
|
-
const
|
|
36500
|
+
const copyText2 = clip(brand + rest, Math.max(10, inner - 4 - ctaLen));
|
|
36469
36501
|
const copy = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
|
|
36470
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { bold: true, underline: !!ad.link && p.osc8Links, children:
|
|
36471
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: C.muted, children:
|
|
36502
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { bold: true, underline: !!ad.link && p.osc8Links, children: copyText2.slice(0, brand.length) }),
|
|
36503
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: C.muted, children: copyText2.slice(brand.length) })
|
|
36472
36504
|
] });
|
|
36473
36505
|
body = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
36474
36506
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { justifyContent: "space-between", children: [
|
|
@@ -36513,39 +36545,8 @@ function StatusPanel(p) {
|
|
|
36513
36545
|
] });
|
|
36514
36546
|
}
|
|
36515
36547
|
|
|
36516
|
-
// src/
|
|
36517
|
-
var
|
|
36518
|
-
var OVERFLOW_FALLBACKS = ["claude-sonnet-5-5", "claude-opus-5-5", "z-ai-glm-5-3", "qwen3-coder-480b-a35b-instruct-turbo"];
|
|
36519
|
-
var compact = (s2) => s2.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
36520
|
-
function bareId(key) {
|
|
36521
|
-
const i = key.indexOf("/");
|
|
36522
|
-
return i >= 0 ? key.slice(i + 1) : key;
|
|
36523
|
-
}
|
|
36524
|
-
function overflowTarget(failedKey, catalog) {
|
|
36525
|
-
const latent = catalog.models.filter((m) => m.providerID === LATENT_ID);
|
|
36526
|
-
if (!latent.length) return null;
|
|
36527
|
-
const failed = catalog.models.find((m) => m.key === failedKey);
|
|
36528
|
-
const wants = [compact(bareId(bareId(failedKey))), failed ? compact(failed.name) : ""].filter((w) => w.length >= 3);
|
|
36529
|
-
for (const w of wants) {
|
|
36530
|
-
const exact = latent.find((m) => compact(m.id) === w || compact(m.name) === w);
|
|
36531
|
-
if (exact) return exact;
|
|
36532
|
-
}
|
|
36533
|
-
for (const w of wants) {
|
|
36534
|
-
const near = latent.filter((m) => compact(m.id).includes(w) || compact(m.name).includes(w)).sort((a2, b) => a2.id.length - b.id.length);
|
|
36535
|
-
if (near[0]) return near[0];
|
|
36536
|
-
}
|
|
36537
|
-
for (const id of OVERFLOW_FALLBACKS) {
|
|
36538
|
-
const m = latent.find((x) => x.id === id);
|
|
36539
|
-
if (m) return m;
|
|
36540
|
-
}
|
|
36541
|
-
return latent[0];
|
|
36542
|
-
}
|
|
36543
|
-
function overflowOffer(model, verdict, catalog, balance, offered) {
|
|
36544
|
-
if (verdict.status !== "rate-limited" || !model || model.startsWith(`${LATENT_ID}/`)) return null;
|
|
36545
|
-
if (balance === null || balance < OVERFLOW_MIN_CREDITS || offered.has(model)) return null;
|
|
36546
|
-
const to = overflowTarget(model, catalog);
|
|
36547
|
-
return to ? { from: model, to, credits: balance } : null;
|
|
36548
|
-
}
|
|
36548
|
+
// src/ui/AdCard.tsx
|
|
36549
|
+
var import_react23 = __toESM(require_react(), 1);
|
|
36549
36550
|
|
|
36550
36551
|
// src/ui/components.tsx
|
|
36551
36552
|
var import_react22 = __toESM(require_react(), 1);
|
|
@@ -36946,6 +36947,88 @@ function padStart(s2, n) {
|
|
|
36946
36947
|
return s2.length > n ? s2.slice(0, n) : s2.padStart(n);
|
|
36947
36948
|
}
|
|
36948
36949
|
|
|
36950
|
+
// src/ui/AdCard.tsx
|
|
36951
|
+
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
36952
|
+
function AdCard({ ad, width, osc8Links, onOpen, onCopy, onClose }) {
|
|
36953
|
+
const [copied, setCopied] = (0, import_react23.useState)(null);
|
|
36954
|
+
const link2 = ad.link;
|
|
36955
|
+
use_input_default((ch, key) => {
|
|
36956
|
+
if (key.escape || key.ctrl && (ch === "o" || ch === "c")) return onClose();
|
|
36957
|
+
if (!link2) return;
|
|
36958
|
+
if (key.return || ch === "o") {
|
|
36959
|
+
onOpen(link2);
|
|
36960
|
+
return onClose();
|
|
36961
|
+
}
|
|
36962
|
+
if (ch === "c") setCopied(onCopy(link2));
|
|
36963
|
+
});
|
|
36964
|
+
const badge = adBadge(ad.title || ad.body);
|
|
36965
|
+
const brand = ad.title || ad.body;
|
|
36966
|
+
const body = ad.title ? ad.body : "";
|
|
36967
|
+
const site = ad.shownUrl.split(/[?#]/)[0].replace(/\/$/, "");
|
|
36968
|
+
const siteText = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: C.accent2, underline: !!link2 && osc8Links, children: site });
|
|
36969
|
+
const hints = link2 ? [
|
|
36970
|
+
["enter", `${ad.ctaText || "Open"} ${G.arrow}`],
|
|
36971
|
+
["c", "copy link"],
|
|
36972
|
+
["esc", "close"]
|
|
36973
|
+
] : [["esc", "close"]];
|
|
36974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: C.earn, paddingX: 1, marginTop: 1, width, children: [
|
|
36975
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { justifyContent: "space-between", children: [
|
|
36976
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: C.faint, bold: true, children: "SPONSORED" }),
|
|
36977
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: C.faint, children: "Latent Ads" })
|
|
36978
|
+
] }),
|
|
36979
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { marginTop: 1, children: [
|
|
36980
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { flexShrink: 0, children: [
|
|
36981
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { backgroundColor: badge.color, color: "#111827", bold: true, children: ` ${badge.letter} ` }),
|
|
36982
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { children: " " })
|
|
36983
|
+
] }),
|
|
36984
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
36985
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { bold: true, color: C.text, wrap: "wrap", children: brand }),
|
|
36986
|
+
body ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: C.muted, wrap: "wrap", children: body }) : null,
|
|
36987
|
+
site ? osc8Links && link2 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Transform, { transform: (o) => osc8(o, link2), children: siteText }) : siteText : null
|
|
36988
|
+
] })
|
|
36989
|
+
] }),
|
|
36990
|
+
copied === "failed" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Text, { color: C.warn, wrap: "wrap", children: [
|
|
36991
|
+
"Could not copy \xB7 ",
|
|
36992
|
+
link2
|
|
36993
|
+
] }) : copied ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: C.ok, children: "\u2713 link copied" }) : null,
|
|
36994
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Hints, { items: hints }) })
|
|
36995
|
+
] });
|
|
36996
|
+
}
|
|
36997
|
+
|
|
36998
|
+
// src/engine/overflow.ts
|
|
36999
|
+
var OVERFLOW_MIN_CREDITS = 0.5;
|
|
37000
|
+
var OVERFLOW_FALLBACKS = ["claude-sonnet-5-5", "claude-opus-5-5", "z-ai-glm-5-3", "qwen3-coder-480b-a35b-instruct-turbo"];
|
|
37001
|
+
var compact = (s2) => s2.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
37002
|
+
function bareId(key) {
|
|
37003
|
+
const i = key.indexOf("/");
|
|
37004
|
+
return i >= 0 ? key.slice(i + 1) : key;
|
|
37005
|
+
}
|
|
37006
|
+
function overflowTarget(failedKey, catalog) {
|
|
37007
|
+
const latent = catalog.models.filter((m) => m.providerID === LATENT_ID);
|
|
37008
|
+
if (!latent.length) return null;
|
|
37009
|
+
const failed = catalog.models.find((m) => m.key === failedKey);
|
|
37010
|
+
const wants = [compact(bareId(bareId(failedKey))), failed ? compact(failed.name) : ""].filter((w) => w.length >= 3);
|
|
37011
|
+
for (const w of wants) {
|
|
37012
|
+
const exact = latent.find((m) => compact(m.id) === w || compact(m.name) === w);
|
|
37013
|
+
if (exact) return exact;
|
|
37014
|
+
}
|
|
37015
|
+
for (const w of wants) {
|
|
37016
|
+
const near = latent.filter((m) => compact(m.id).includes(w) || compact(m.name).includes(w)).sort((a2, b) => a2.id.length - b.id.length);
|
|
37017
|
+
if (near[0]) return near[0];
|
|
37018
|
+
}
|
|
37019
|
+
for (const id of OVERFLOW_FALLBACKS) {
|
|
37020
|
+
const m = latent.find((x) => x.id === id);
|
|
37021
|
+
if (m) return m;
|
|
37022
|
+
}
|
|
37023
|
+
return latent[0];
|
|
37024
|
+
}
|
|
37025
|
+
function overflowOffer(model, verdict, catalog, balance, offered) {
|
|
37026
|
+
if (verdict.status !== "rate-limited" || !model || model.startsWith(`${LATENT_ID}/`)) return null;
|
|
37027
|
+
if (balance === null || balance < OVERFLOW_MIN_CREDITS || offered.has(model)) return null;
|
|
37028
|
+
const to = overflowTarget(model, catalog);
|
|
37029
|
+
return to ? { from: model, to, credits: balance } : null;
|
|
37030
|
+
}
|
|
37031
|
+
|
|
36949
37032
|
// src/ui/commands.ts
|
|
36950
37033
|
var COMMANDS = [
|
|
36951
37034
|
{ name: "model", args: "[name]", desc: "Switch model \u2014 search, filter by provider, set effort", group: "Models", aliases: ["models"] },
|
|
@@ -36980,7 +37063,7 @@ function parseCommandLine(line) {
|
|
|
36980
37063
|
}
|
|
36981
37064
|
|
|
36982
37065
|
// src/ui/Transcript.tsx
|
|
36983
|
-
var
|
|
37066
|
+
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
|
36984
37067
|
function lastLines(text, n) {
|
|
36985
37068
|
const lines = text.trimEnd().split("\n");
|
|
36986
37069
|
return lines.length <= n ? lines.join("\n") : lines.slice(-n).join("\n");
|
|
@@ -37035,55 +37118,55 @@ function ToolView({ item, cwd: cwd2, width }) {
|
|
|
37035
37118
|
const diff2 = item.diff ? parseDiff(item.diff) : null;
|
|
37036
37119
|
const showOutput = item.output && (failed || !QUIET.has(item.name)) && !diff2;
|
|
37037
37120
|
const out = showOutput ? firstLines(item.output, failed ? 8 : 6) : null;
|
|
37038
|
-
return /* @__PURE__ */ (0,
|
|
37039
|
-
/* @__PURE__ */ (0,
|
|
37040
|
-
running ? /* @__PURE__ */ (0,
|
|
37041
|
-
/* @__PURE__ */ (0,
|
|
37121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", width, children: [
|
|
37122
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
37123
|
+
running ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Spinner, { color: C.warn }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: failed ? C.err : C.ok, children: G.dot }),
|
|
37124
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { bold: true, color: t.verb === "$" ? C.accent2 : void 0, children: [
|
|
37042
37125
|
" ",
|
|
37043
37126
|
t.verb
|
|
37044
37127
|
] }),
|
|
37045
|
-
/* @__PURE__ */ (0,
|
|
37128
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
|
|
37046
37129
|
" ",
|
|
37047
37130
|
clip(t.target, Math.max(20, width - t.verb.length - 24))
|
|
37048
37131
|
] }),
|
|
37049
|
-
t.extra ? /* @__PURE__ */ (0,
|
|
37132
|
+
t.extra ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.faint, children: [
|
|
37050
37133
|
" ",
|
|
37051
37134
|
t.extra
|
|
37052
37135
|
] }) : null,
|
|
37053
|
-
item.additions || item.deletions ? /* @__PURE__ */ (0,
|
|
37054
|
-
/* @__PURE__ */ (0,
|
|
37136
|
+
item.additions || item.deletions ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
|
|
37137
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.add, children: [
|
|
37055
37138
|
" +",
|
|
37056
37139
|
item.additions ?? 0
|
|
37057
37140
|
] }),
|
|
37058
|
-
/* @__PURE__ */ (0,
|
|
37141
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.del, children: [
|
|
37059
37142
|
" \u2212",
|
|
37060
37143
|
item.deletions ?? 0
|
|
37061
37144
|
] })
|
|
37062
37145
|
] }) : null,
|
|
37063
|
-
item.ms !== void 0 && item.ms >= 1e3 ? /* @__PURE__ */ (0,
|
|
37146
|
+
item.ms !== void 0 && item.ms >= 1e3 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.faint, children: [
|
|
37064
37147
|
" \xB7 ",
|
|
37065
37148
|
fmtDuration(item.ms)
|
|
37066
37149
|
] }) : null
|
|
37067
37150
|
] }),
|
|
37068
|
-
diff2 && diff2.lines.length ? /* @__PURE__ */ (0,
|
|
37069
|
-
diff2.lines.map((l, i) => /* @__PURE__ */ (0,
|
|
37151
|
+
diff2 && diff2.lines.length ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [
|
|
37152
|
+
diff2.lines.map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { wrap: "truncate-end", color: l.t === "add" ? C.add : l.t === "del" ? C.del : C.faint, children: [
|
|
37070
37153
|
l.t === "add" ? "+ " : l.t === "del" ? "\u2212 " : l.t === "hunk" ? "" : " ",
|
|
37071
37154
|
l.t === "hunk" ? "\u22EF" : l.text
|
|
37072
37155
|
] }, i)),
|
|
37073
|
-
diff2.more ? /* @__PURE__ */ (0,
|
|
37156
|
+
diff2.more ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.faint, children: [
|
|
37074
37157
|
"\u2026 ",
|
|
37075
37158
|
diff2.more,
|
|
37076
37159
|
" more lines"
|
|
37077
37160
|
] }) : null
|
|
37078
37161
|
] }) : null,
|
|
37079
|
-
out ? /* @__PURE__ */ (0,
|
|
37080
|
-
/* @__PURE__ */ (0,
|
|
37162
|
+
out ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { marginLeft: 2, children: [
|
|
37163
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.faint, children: [
|
|
37081
37164
|
G.elbow,
|
|
37082
37165
|
" "
|
|
37083
37166
|
] }) }),
|
|
37084
|
-
/* @__PURE__ */ (0,
|
|
37085
|
-
/* @__PURE__ */ (0,
|
|
37086
|
-
out.more ? /* @__PURE__ */ (0,
|
|
37167
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
37168
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: failed ? C.err : C.muted, children: out.text }),
|
|
37169
|
+
out.more ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.faint, children: [
|
|
37087
37170
|
"\u2026 ",
|
|
37088
37171
|
out.more,
|
|
37089
37172
|
" more lines"
|
|
@@ -37097,25 +37180,25 @@ var NOTICE_MARK = { info: G.bullet, ok: G.ok, warn: G.warn, error: G.no };
|
|
|
37097
37180
|
function ItemView({ item, live, cwd: cwd2, width, maxLines }) {
|
|
37098
37181
|
switch (item.kind) {
|
|
37099
37182
|
case "user":
|
|
37100
|
-
return /* @__PURE__ */ (0,
|
|
37101
|
-
/* @__PURE__ */ (0,
|
|
37183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { marginTop: 1, width, children: [
|
|
37184
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.accent, bold: true, children: [
|
|
37102
37185
|
G.prompt,
|
|
37103
37186
|
" "
|
|
37104
37187
|
] }) }),
|
|
37105
|
-
/* @__PURE__ */ (0,
|
|
37188
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, children: item.text })
|
|
37106
37189
|
] });
|
|
37107
37190
|
case "reasoning": {
|
|
37108
37191
|
const text = item.text.trim();
|
|
37109
37192
|
if (!text) return null;
|
|
37110
37193
|
const shown = live ? lastLines(text, 4) : firstLines(text, 2);
|
|
37111
|
-
return /* @__PURE__ */ (0,
|
|
37112
|
-
/* @__PURE__ */ (0,
|
|
37194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { marginTop: 1, width, children: [
|
|
37195
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.faint, children: [
|
|
37113
37196
|
G.thin,
|
|
37114
37197
|
" "
|
|
37115
37198
|
] }) }),
|
|
37116
|
-
/* @__PURE__ */ (0,
|
|
37117
|
-
/* @__PURE__ */ (0,
|
|
37118
|
-
typeof shown !== "string" && shown.more ? /* @__PURE__ */ (0,
|
|
37199
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
37200
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: C.faint, italic: true, children: typeof shown === "string" ? shown : shown.text }),
|
|
37201
|
+
typeof shown !== "string" && shown.more ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.faint, children: [
|
|
37119
37202
|
"\u2026 thought for ",
|
|
37120
37203
|
shown.more,
|
|
37121
37204
|
" more lines"
|
|
@@ -37124,25 +37207,25 @@ function ItemView({ item, live, cwd: cwd2, width, maxLines }) {
|
|
|
37124
37207
|
] });
|
|
37125
37208
|
}
|
|
37126
37209
|
case "text":
|
|
37127
|
-
return /* @__PURE__ */ (0,
|
|
37210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { marginTop: 1, width, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Markdown, { text: live ? lastLines(item.text, maxLines) : item.text }) });
|
|
37128
37211
|
case "tool":
|
|
37129
|
-
return /* @__PURE__ */ (0,
|
|
37212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ToolView, { item, cwd: cwd2, width });
|
|
37130
37213
|
case "error":
|
|
37131
|
-
return /* @__PURE__ */ (0,
|
|
37132
|
-
/* @__PURE__ */ (0,
|
|
37214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { marginTop: 1, width, children: [
|
|
37215
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.err, children: [
|
|
37133
37216
|
G.no,
|
|
37134
37217
|
" "
|
|
37135
37218
|
] }) }),
|
|
37136
|
-
/* @__PURE__ */ (0,
|
|
37219
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: C.err, wrap: "wrap", children: item.text })
|
|
37137
37220
|
] });
|
|
37138
37221
|
case "notice": {
|
|
37139
37222
|
const tone = item.tone ?? "info";
|
|
37140
|
-
return /* @__PURE__ */ (0,
|
|
37141
|
-
/* @__PURE__ */ (0,
|
|
37223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { marginTop: 1, width, children: [
|
|
37224
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: NOTICE_COLOR[tone], children: [
|
|
37142
37225
|
NOTICE_MARK[tone],
|
|
37143
37226
|
" "
|
|
37144
37227
|
] }) }),
|
|
37145
|
-
/* @__PURE__ */ (0,
|
|
37228
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: tone === "info" ? C.muted : NOTICE_COLOR[tone], wrap: "wrap", children: item.text })
|
|
37146
37229
|
] });
|
|
37147
37230
|
}
|
|
37148
37231
|
}
|
|
@@ -37156,19 +37239,19 @@ function PermissionPrompt({ perm, selected, cwd: cwd2, width }) {
|
|
|
37156
37239
|
const options = ["Allow once", "Always allow", "Reject"];
|
|
37157
37240
|
const keys = ["y", "a", "n"];
|
|
37158
37241
|
const what = perm.resources.map((r) => relPath(r, cwd2)).join(", ") || perm.message || "";
|
|
37159
|
-
return /* @__PURE__ */ (0,
|
|
37160
|
-
/* @__PURE__ */ (0,
|
|
37161
|
-
/* @__PURE__ */ (0,
|
|
37162
|
-
/* @__PURE__ */ (0,
|
|
37242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { marginTop: 1, borderStyle: "round", borderColor: C.warn, paddingX: 1, flexDirection: "column", width, children: [
|
|
37243
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { justifyContent: "space-between", children: [
|
|
37244
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, color: C.warn, children: PERMISSION_TITLE[perm.action] ?? `Allow ${perm.action}?` }),
|
|
37245
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: C.faint, children: perm.action })
|
|
37163
37246
|
] }),
|
|
37164
|
-
/* @__PURE__ */ (0,
|
|
37247
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { marginY: 1, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: perm.action === "shell" ? C.accent2 : void 0, wrap: "wrap", children: [
|
|
37165
37248
|
perm.action === "shell" ? "$ " : "",
|
|
37166
37249
|
clip(what, 600)
|
|
37167
37250
|
] }) }),
|
|
37168
|
-
/* @__PURE__ */ (0,
|
|
37251
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: options.map((o, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
|
|
37169
37252
|
i ? " " : "",
|
|
37170
|
-
/* @__PURE__ */ (0,
|
|
37171
|
-
/* @__PURE__ */ (0,
|
|
37253
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: i === selected ? i === 2 ? C.err : C.ok : C.muted, bold: i === selected, inverse: i === selected, children: ` ${o} ` }),
|
|
37254
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.faint, children: [
|
|
37172
37255
|
" ",
|
|
37173
37256
|
keys[i]
|
|
37174
37257
|
] })
|
|
@@ -37177,32 +37260,32 @@ function PermissionPrompt({ perm, selected, cwd: cwd2, width }) {
|
|
|
37177
37260
|
}
|
|
37178
37261
|
|
|
37179
37262
|
// src/ui/panels/ModelPicker.tsx
|
|
37180
|
-
var
|
|
37181
|
-
var
|
|
37263
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
37264
|
+
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
37182
37265
|
function Mark({ status: status2, testing }) {
|
|
37183
|
-
if (testing) return /* @__PURE__ */ (0,
|
|
37266
|
+
if (testing) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Spinner, {});
|
|
37184
37267
|
switch (status2) {
|
|
37185
37268
|
case "ok":
|
|
37186
|
-
return /* @__PURE__ */ (0,
|
|
37269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.ok, children: G.ok });
|
|
37187
37270
|
case "unsupported":
|
|
37188
|
-
return /* @__PURE__ */ (0,
|
|
37271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.err, children: G.no });
|
|
37189
37272
|
case "rate-limited":
|
|
37190
|
-
return /* @__PURE__ */ (0,
|
|
37273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.warn, children: G.wait });
|
|
37191
37274
|
case "auth":
|
|
37192
|
-
return /* @__PURE__ */ (0,
|
|
37275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.warn, children: G.key });
|
|
37193
37276
|
case "error":
|
|
37194
|
-
return /* @__PURE__ */ (0,
|
|
37277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.err, children: G.warn });
|
|
37195
37278
|
default:
|
|
37196
|
-
return /* @__PURE__ */ (0,
|
|
37279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.faint, children: "\xB7" });
|
|
37197
37280
|
}
|
|
37198
37281
|
}
|
|
37199
37282
|
function ModelPicker(p) {
|
|
37200
|
-
const tabs = (0,
|
|
37201
|
-
const [tab2, setTab] = (0,
|
|
37202
|
-
const [sel, setSel] = (0,
|
|
37203
|
-
const [variantIdx, setVariantIdx] = (0,
|
|
37204
|
-
const [testing, setTesting] = (0,
|
|
37205
|
-
const [, bump] = (0,
|
|
37283
|
+
const tabs = (0, import_react24.useMemo)(() => [void 0, ...p.catalog.providers.map((x) => x.id)], [p.catalog]);
|
|
37284
|
+
const [tab2, setTab] = (0, import_react24.useState)(() => Math.max(0, tabs.indexOf(p.provider)));
|
|
37285
|
+
const [sel, setSel] = (0, import_react24.useState)(0);
|
|
37286
|
+
const [variantIdx, setVariantIdx] = (0, import_react24.useState)(null);
|
|
37287
|
+
const [testing, setTesting] = (0, import_react24.useState)(/* @__PURE__ */ new Set());
|
|
37288
|
+
const [, bump] = (0, import_react24.useState)(0);
|
|
37206
37289
|
const field = useLineField({
|
|
37207
37290
|
initial: p.query,
|
|
37208
37291
|
onChange: () => {
|
|
@@ -37255,7 +37338,7 @@ function ModelPicker(p) {
|
|
|
37255
37338
|
}
|
|
37256
37339
|
});
|
|
37257
37340
|
const provider = tabs[tab2];
|
|
37258
|
-
const rows = (0,
|
|
37341
|
+
const rows = (0, import_react24.useMemo)(
|
|
37259
37342
|
() => pickerRows(p.catalog, field.text, { provider, status: p.status, current: p.current }),
|
|
37260
37343
|
// `testing` changes when a verdict lands, which reorders the list.
|
|
37261
37344
|
[p.catalog, field.text, provider, p.current, testing]
|
|
@@ -37282,14 +37365,14 @@ function ModelPicker(p) {
|
|
|
37282
37365
|
const wId = Math.max(0, rest - wName);
|
|
37283
37366
|
const kindOf = (id) => p.catalog.providers.find((x) => x.id === id)?.kind ?? "unknown";
|
|
37284
37367
|
const verified = p.catalog.models.filter((m) => p.status(m.key) === "ok").length;
|
|
37285
|
-
return /* @__PURE__ */ (0,
|
|
37368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
37286
37369
|
Panel,
|
|
37287
37370
|
{
|
|
37288
37371
|
title: "Models",
|
|
37289
37372
|
right: `${p.catalog.models.length} models \xB7 ${verified} verified with your account`,
|
|
37290
37373
|
width: p.width,
|
|
37291
37374
|
color: C.accent,
|
|
37292
|
-
footer: /* @__PURE__ */ (0,
|
|
37375
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
37293
37376
|
Hints,
|
|
37294
37377
|
{
|
|
37295
37378
|
items: [
|
|
@@ -37303,36 +37386,36 @@ function ModelPicker(p) {
|
|
|
37303
37386
|
}
|
|
37304
37387
|
),
|
|
37305
37388
|
children: [
|
|
37306
|
-
/* @__PURE__ */ (0,
|
|
37307
|
-
/* @__PURE__ */ (0,
|
|
37389
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { marginTop: 1, children: [
|
|
37390
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: C.accent, children: [
|
|
37308
37391
|
G.search,
|
|
37309
37392
|
" "
|
|
37310
37393
|
] }),
|
|
37311
|
-
/* @__PURE__ */ (0,
|
|
37394
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FieldText, { state: field.state, placeholder: "type to search \u2014 name, id or provider" })
|
|
37312
37395
|
] }),
|
|
37313
|
-
/* @__PURE__ */ (0,
|
|
37396
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginTop: 1, flexWrap: "wrap", children: tabs.map((id, i) => {
|
|
37314
37397
|
const prov = p.catalog.providers.find((x) => x.id === id);
|
|
37315
37398
|
const text = prov ? `${prov.name} ${prov.models}` : `All ${p.catalog.models.length}`;
|
|
37316
|
-
return /* @__PURE__ */ (0,
|
|
37399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginRight: 2, children: i === tab2 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: C.accent, underline: true, children: text }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.muted, children: text }) }, id ?? "all");
|
|
37317
37400
|
}) }),
|
|
37318
|
-
/* @__PURE__ */ (0,
|
|
37319
|
-
above ? /* @__PURE__ */ (0,
|
|
37401
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
37402
|
+
above ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: C.faint, children: [
|
|
37320
37403
|
" ",
|
|
37321
37404
|
G.up,
|
|
37322
37405
|
" ",
|
|
37323
37406
|
above,
|
|
37324
37407
|
" more"
|
|
37325
37408
|
] }) : null,
|
|
37326
|
-
shown.length === 0 ? /* @__PURE__ */ (0,
|
|
37409
|
+
shown.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: C.muted, children: [
|
|
37327
37410
|
" No model matches \u201C",
|
|
37328
37411
|
field.text,
|
|
37329
37412
|
"\u201D."
|
|
37330
37413
|
] }) : null,
|
|
37331
37414
|
shown.map((r, i) => {
|
|
37332
37415
|
if (r.t === "head") {
|
|
37333
|
-
return /* @__PURE__ */ (0,
|
|
37334
|
-
/* @__PURE__ */ (0,
|
|
37335
|
-
/* @__PURE__ */ (0,
|
|
37416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
37417
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: C.muted, children: r.label }),
|
|
37418
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: C.faint, children: [
|
|
37336
37419
|
" ",
|
|
37337
37420
|
r.hint
|
|
37338
37421
|
] })
|
|
@@ -37343,33 +37426,33 @@ function ModelPicker(p) {
|
|
|
37343
37426
|
const st = p.status(m.key);
|
|
37344
37427
|
const dead = st === "unsupported";
|
|
37345
37428
|
const note = m.key === p.current ? "current" : st === "unsupported" ? "not on your plan" : st !== "unknown" && st !== "ok" ? label(st) : "";
|
|
37346
|
-
return /* @__PURE__ */ (0,
|
|
37347
|
-
/* @__PURE__ */ (0,
|
|
37429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
37430
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: C.accent, children: [
|
|
37348
37431
|
on2 ? G.prompt : " ",
|
|
37349
37432
|
" "
|
|
37350
37433
|
] }),
|
|
37351
|
-
/* @__PURE__ */ (0,
|
|
37352
|
-
/* @__PURE__ */ (0,
|
|
37353
|
-
/* @__PURE__ */ (0,
|
|
37354
|
-
/* @__PURE__ */ (0,
|
|
37434
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Mark, { status: st, testing: testing.has(m.key) }),
|
|
37435
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: " " }),
|
|
37436
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: on2, color: dead ? C.faint : on2 ? C.text : void 0, children: pad(m.name, wName) }),
|
|
37437
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: C.faint, children: [
|
|
37355
37438
|
" ",
|
|
37356
37439
|
pad(field.text || !provider ? m.key : m.id, wId)
|
|
37357
37440
|
] }),
|
|
37358
|
-
/* @__PURE__ */ (0,
|
|
37441
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: C.muted, children: [
|
|
37359
37442
|
" ",
|
|
37360
37443
|
padStart(fmtContext(m.context), wCtx)
|
|
37361
37444
|
] }),
|
|
37362
|
-
/* @__PURE__ */ (0,
|
|
37445
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: m.costIn === 0 && m.costOut === 0 ? C.ok : C.muted, children: [
|
|
37363
37446
|
" ",
|
|
37364
37447
|
padStart(fmtPrice(m, kindOf(m.providerID)), wPrice)
|
|
37365
37448
|
] }),
|
|
37366
|
-
note ? /* @__PURE__ */ (0,
|
|
37449
|
+
note ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: m.key === p.current ? C.accent2 : dead ? C.faint : C.warn, children: [
|
|
37367
37450
|
" ",
|
|
37368
37451
|
note
|
|
37369
37452
|
] }) : null
|
|
37370
37453
|
] }, m.key);
|
|
37371
37454
|
}),
|
|
37372
|
-
below ? /* @__PURE__ */ (0,
|
|
37455
|
+
below ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: C.faint, children: [
|
|
37373
37456
|
" ",
|
|
37374
37457
|
G.down,
|
|
37375
37458
|
" ",
|
|
@@ -37377,13 +37460,13 @@ function ModelPicker(p) {
|
|
|
37377
37460
|
" more"
|
|
37378
37461
|
] }) : null
|
|
37379
37462
|
] }),
|
|
37380
|
-
chosen ? /* @__PURE__ */ (0,
|
|
37381
|
-
/* @__PURE__ */ (0,
|
|
37382
|
-
efforts.length > 1 ? efforts.map((e, i) => /* @__PURE__ */ (0,
|
|
37463
|
+
chosen ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
37464
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.faint, children: "effort " }),
|
|
37465
|
+
efforts.length > 1 ? efforts.map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: i === effortAt ? C.accent2 : C.faint, bold: i === effortAt, children: [
|
|
37383
37466
|
i === effortAt ? `\u2039 ${e} \u203A` : e,
|
|
37384
37467
|
i < efforts.length - 1 ? " " : ""
|
|
37385
|
-
] }, e)) : /* @__PURE__ */ (0,
|
|
37386
|
-
/* @__PURE__ */ (0,
|
|
37468
|
+
] }, e)) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.faint, children: "fixed for this model" }),
|
|
37469
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.faint, children: " ctx \xB7 in/out per 1M tokens ($, or cr = Latent credits)" })
|
|
37387
37470
|
] }) }) : null
|
|
37388
37471
|
]
|
|
37389
37472
|
}
|
|
@@ -37391,8 +37474,8 @@ function ModelPicker(p) {
|
|
|
37391
37474
|
}
|
|
37392
37475
|
|
|
37393
37476
|
// src/ui/panels/ProviderPanel.tsx
|
|
37394
|
-
var
|
|
37395
|
-
var
|
|
37477
|
+
var import_react25 = __toESM(require_react(), 1);
|
|
37478
|
+
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
|
|
37396
37479
|
var usable = (i) => i.methods.filter((m) => m.type === "key" || m.type === "oauth" || m.type === "external");
|
|
37397
37480
|
var needsForm = (m) => "form" in m && Array.isArray(m.form) && m.form.some((f) => !f.hidden && f.required);
|
|
37398
37481
|
var methodLabel = (m) => m.type === "key" ? m.label || "API key" : m.label;
|
|
@@ -37402,10 +37485,10 @@ function errText(e) {
|
|
|
37402
37485
|
return m ? m[1] : s2;
|
|
37403
37486
|
}
|
|
37404
37487
|
function ProviderPanel(p) {
|
|
37405
|
-
const [view, setView] = (0,
|
|
37406
|
-
const [integrations, setIntegrations] = (0,
|
|
37407
|
-
const [error, setError] = (0,
|
|
37408
|
-
(0,
|
|
37488
|
+
const [view, setView] = (0, import_react25.useState)(p.connect ? { v: "pick" } : { v: "list" });
|
|
37489
|
+
const [integrations, setIntegrations] = (0, import_react25.useState)(null);
|
|
37490
|
+
const [error, setError] = (0, import_react25.useState)("");
|
|
37491
|
+
(0, import_react25.useEffect)(() => {
|
|
37409
37492
|
let live = true;
|
|
37410
37493
|
p.engine.integrations().then((list2) => live && setIntegrations(list2)).catch((e) => live && setError(errText(e)));
|
|
37411
37494
|
return () => {
|
|
@@ -37447,7 +37530,7 @@ function ProviderPanel(p) {
|
|
|
37447
37530
|
const common = { width: p.width, color: C.accent };
|
|
37448
37531
|
switch (view.v) {
|
|
37449
37532
|
case "list":
|
|
37450
|
-
return /* @__PURE__ */ (0,
|
|
37533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37451
37534
|
ProviderList,
|
|
37452
37535
|
{
|
|
37453
37536
|
...p,
|
|
@@ -37456,7 +37539,7 @@ function ProviderPanel(p) {
|
|
|
37456
37539
|
}
|
|
37457
37540
|
);
|
|
37458
37541
|
case "pick":
|
|
37459
|
-
return /* @__PURE__ */ (0,
|
|
37542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37460
37543
|
IntegrationPicker,
|
|
37461
37544
|
{
|
|
37462
37545
|
...common,
|
|
@@ -37471,13 +37554,13 @@ function ProviderPanel(p) {
|
|
|
37471
37554
|
}
|
|
37472
37555
|
);
|
|
37473
37556
|
case "connecting":
|
|
37474
|
-
return /* @__PURE__ */ (0,
|
|
37475
|
-
/* @__PURE__ */ (0,
|
|
37557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Panel, { title: `Connect ${view.integration.name}`, width: p.width, color: C.accent, footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hints, { items: [["", "this can take a few seconds"]] }), children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
37558
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Spinner, {}),
|
|
37476
37559
|
" ",
|
|
37477
|
-
/* @__PURE__ */ (0,
|
|
37560
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: "Checking the login on this machine and loading its models\u2026" })
|
|
37478
37561
|
] }) }) });
|
|
37479
37562
|
case "custom":
|
|
37480
|
-
return /* @__PURE__ */ (0,
|
|
37563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37481
37564
|
CustomProviderForm,
|
|
37482
37565
|
{
|
|
37483
37566
|
...common,
|
|
@@ -37488,7 +37571,7 @@ function ProviderPanel(p) {
|
|
|
37488
37571
|
}
|
|
37489
37572
|
);
|
|
37490
37573
|
case "method":
|
|
37491
|
-
return /* @__PURE__ */ (0,
|
|
37574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37492
37575
|
MethodPicker,
|
|
37493
37576
|
{
|
|
37494
37577
|
...common,
|
|
@@ -37499,7 +37582,7 @@ function ProviderPanel(p) {
|
|
|
37499
37582
|
}
|
|
37500
37583
|
);
|
|
37501
37584
|
case "key":
|
|
37502
|
-
return /* @__PURE__ */ (0,
|
|
37585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37503
37586
|
KeyEntry,
|
|
37504
37587
|
{
|
|
37505
37588
|
...common,
|
|
@@ -37510,7 +37593,7 @@ function ProviderPanel(p) {
|
|
|
37510
37593
|
}
|
|
37511
37594
|
);
|
|
37512
37595
|
case "oauth":
|
|
37513
|
-
return /* @__PURE__ */ (0,
|
|
37596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37514
37597
|
OAuthFlow,
|
|
37515
37598
|
{
|
|
37516
37599
|
...common,
|
|
@@ -37522,11 +37605,11 @@ function ProviderPanel(p) {
|
|
|
37522
37605
|
}
|
|
37523
37606
|
);
|
|
37524
37607
|
case "done":
|
|
37525
|
-
return /* @__PURE__ */ (0,
|
|
37608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Done, { ...common, name: view.name, models: view.models, note: view.note, onClose: p.onClose, onModels: () => p.onBrowse("") });
|
|
37526
37609
|
}
|
|
37527
37610
|
}
|
|
37528
37611
|
function ProviderList(p) {
|
|
37529
|
-
const [sel, setSel] = (0,
|
|
37612
|
+
const [sel, setSel] = (0, import_react25.useState)(0);
|
|
37530
37613
|
const items = p.catalog.providers;
|
|
37531
37614
|
const count = items.length + 1;
|
|
37532
37615
|
use_input_default((ch, key) => {
|
|
@@ -37543,39 +37626,39 @@ function ProviderList(p) {
|
|
|
37543
37626
|
const inner = p.width - 4;
|
|
37544
37627
|
const wName = Math.min(24, Math.max(12, ...items.map((x) => x.name.length)) + 1);
|
|
37545
37628
|
const wVia = Math.min(26, Math.max(10, ...items.map((x) => x.via.length)) + 1);
|
|
37546
|
-
return /* @__PURE__ */ (0,
|
|
37629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
37547
37630
|
Panel,
|
|
37548
37631
|
{
|
|
37549
37632
|
title: "Providers",
|
|
37550
37633
|
right: `${items.length} connected \xB7 ${p.catalog.models.length} models`,
|
|
37551
37634
|
width: p.width,
|
|
37552
37635
|
color: C.accent,
|
|
37553
|
-
footer: /* @__PURE__ */ (0,
|
|
37636
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hints, { items: [["\u2191\u2193", "move"], ["enter", "browse models"], ["c", "connect a provider"], ["esc", "close"]] }),
|
|
37554
37637
|
children: [
|
|
37555
|
-
/* @__PURE__ */ (0,
|
|
37638
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
37556
37639
|
items.map((prov, i) => {
|
|
37557
37640
|
const ok = p.catalog.models.filter((m) => m.providerID === prov.id && p.status(m.key) === "ok").length;
|
|
37558
37641
|
const dot = prov.kind === "builtin" ? C.faint : C.ok;
|
|
37559
|
-
return /* @__PURE__ */ (0,
|
|
37560
|
-
/* @__PURE__ */ (0,
|
|
37642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
37643
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.accent, children: [
|
|
37561
37644
|
i === sel ? G.prompt : " ",
|
|
37562
37645
|
" "
|
|
37563
37646
|
] }),
|
|
37564
|
-
/* @__PURE__ */ (0,
|
|
37647
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: dot, children: [
|
|
37565
37648
|
G.dot,
|
|
37566
37649
|
" "
|
|
37567
37650
|
] }),
|
|
37568
|
-
/* @__PURE__ */ (0,
|
|
37569
|
-
/* @__PURE__ */ (0,
|
|
37651
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: i === sel, children: pad(prov.name, wName) }),
|
|
37652
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.muted, children: [
|
|
37570
37653
|
" ",
|
|
37571
37654
|
pad(prov.via, wVia)
|
|
37572
37655
|
] }),
|
|
37573
|
-
/* @__PURE__ */ (0,
|
|
37656
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.muted, children: [
|
|
37574
37657
|
" ",
|
|
37575
37658
|
String(prov.models).padStart(3),
|
|
37576
37659
|
" models"
|
|
37577
37660
|
] }),
|
|
37578
|
-
ok ? /* @__PURE__ */ (0,
|
|
37661
|
+
ok ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.ok, children: [
|
|
37579
37662
|
" ",
|
|
37580
37663
|
G.ok,
|
|
37581
37664
|
" ",
|
|
@@ -37584,23 +37667,23 @@ function ProviderList(p) {
|
|
|
37584
37667
|
] }) : null
|
|
37585
37668
|
] }, prov.id);
|
|
37586
37669
|
}),
|
|
37587
|
-
/* @__PURE__ */ (0,
|
|
37588
|
-
/* @__PURE__ */ (0,
|
|
37670
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
37671
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.accent, children: [
|
|
37589
37672
|
sel === items.length ? G.prompt : " ",
|
|
37590
37673
|
" "
|
|
37591
37674
|
] }),
|
|
37592
|
-
/* @__PURE__ */ (0,
|
|
37675
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.accent2, bold: sel === items.length, children: "+ Connect a provider\u2026" })
|
|
37593
37676
|
] })
|
|
37594
37677
|
] }),
|
|
37595
|
-
/* @__PURE__ */ (0,
|
|
37596
|
-
p.error ? /* @__PURE__ */ (0,
|
|
37678
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.faint, wrap: "wrap", children: clipTo("Bring your own access: an API key, or a subscription where the provider allows third-party clients. Credentials stay in the local engine.", inner * 2) }) }),
|
|
37679
|
+
p.error ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.err, children: p.error }) : null
|
|
37597
37680
|
]
|
|
37598
37681
|
}
|
|
37599
37682
|
);
|
|
37600
37683
|
}
|
|
37601
37684
|
var clipTo = (s2, n) => s2.length > n ? s2.slice(0, n - 1) + "\u2026" : s2;
|
|
37602
37685
|
function IntegrationPicker(p) {
|
|
37603
|
-
const [sel, setSel] = (0,
|
|
37686
|
+
const [sel, setSel] = (0, import_react25.useState)(0);
|
|
37604
37687
|
const field = useLineField({
|
|
37605
37688
|
initial: p.query,
|
|
37606
37689
|
onChange: () => setSel(0),
|
|
@@ -37621,38 +37704,38 @@ function IntegrationPicker(p) {
|
|
|
37621
37704
|
return false;
|
|
37622
37705
|
}
|
|
37623
37706
|
});
|
|
37624
|
-
const list2 = (0,
|
|
37707
|
+
const list2 = (0, import_react25.useMemo)(() => searchIntegrations(p.integrations ?? [], field.text), [p.integrations, field.text]);
|
|
37625
37708
|
const selected = Math.min(sel, list2.length);
|
|
37626
37709
|
const visible = Math.max(5, Math.min(11, p.rows - 15));
|
|
37627
37710
|
const win = windowAround(list2.length, Math.min(selected, Math.max(0, list2.length - 1)), visible);
|
|
37628
|
-
return /* @__PURE__ */ (0,
|
|
37711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
37629
37712
|
Panel,
|
|
37630
37713
|
{
|
|
37631
37714
|
title: "Connect a provider",
|
|
37632
37715
|
right: p.integrations ? `${list2.length} available` : "",
|
|
37633
37716
|
width: p.width,
|
|
37634
37717
|
color: p.color,
|
|
37635
|
-
footer: /* @__PURE__ */ (0,
|
|
37718
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hints, { items: [["\u2191\u2193", "move"], ["enter", "choose"], ["esc", field.text ? "clear" : "back"]] }),
|
|
37636
37719
|
children: [
|
|
37637
|
-
/* @__PURE__ */ (0,
|
|
37638
|
-
/* @__PURE__ */ (0,
|
|
37720
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { marginTop: 1, children: [
|
|
37721
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.accent, children: [
|
|
37639
37722
|
G.search,
|
|
37640
37723
|
" "
|
|
37641
37724
|
] }),
|
|
37642
|
-
/* @__PURE__ */ (0,
|
|
37725
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldText, { state: field.state, placeholder: "search \u2014 Anthropic, OpenRouter, Google\u2026" })
|
|
37643
37726
|
] }),
|
|
37644
|
-
/* @__PURE__ */ (0,
|
|
37645
|
-
!p.integrations && !p.error ? /* @__PURE__ */ (0,
|
|
37646
|
-
/* @__PURE__ */ (0,
|
|
37727
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
37728
|
+
!p.integrations && !p.error ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
37729
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Spinner, {}),
|
|
37647
37730
|
" ",
|
|
37648
|
-
/* @__PURE__ */ (0,
|
|
37731
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: "Loading providers\u2026" })
|
|
37649
37732
|
] }) : null,
|
|
37650
|
-
p.integrations && !list2.length ? /* @__PURE__ */ (0,
|
|
37733
|
+
p.integrations && !list2.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.muted, children: [
|
|
37651
37734
|
" Nothing matches \u201C",
|
|
37652
37735
|
field.text,
|
|
37653
37736
|
"\u201D."
|
|
37654
37737
|
] }) : null,
|
|
37655
|
-
win.start > 0 ? /* @__PURE__ */ (0,
|
|
37738
|
+
win.start > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.faint, children: [
|
|
37656
37739
|
" ",
|
|
37657
37740
|
G.up,
|
|
37658
37741
|
" ",
|
|
@@ -37663,47 +37746,47 @@ function IntegrationPicker(p) {
|
|
|
37663
37746
|
const on2 = win.start + i === selected;
|
|
37664
37747
|
const labels = usable(it).map((m) => m.type === "key" ? "API key" : m.label);
|
|
37665
37748
|
const methods = labels.slice(0, 2).join(" \xB7 ") + (labels.length > 2 ? ` +${labels.length - 2}` : "");
|
|
37666
|
-
return /* @__PURE__ */ (0,
|
|
37667
|
-
/* @__PURE__ */ (0,
|
|
37749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
37750
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.accent, children: [
|
|
37668
37751
|
on2 ? G.prompt : " ",
|
|
37669
37752
|
" "
|
|
37670
37753
|
] }),
|
|
37671
|
-
/* @__PURE__ */ (0,
|
|
37672
|
-
/* @__PURE__ */ (0,
|
|
37754
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: on2, children: pad(it.name, 26) }),
|
|
37755
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.muted, children: [
|
|
37673
37756
|
" ",
|
|
37674
37757
|
methods
|
|
37675
37758
|
] }),
|
|
37676
|
-
p.connected.has(it.id) ? /* @__PURE__ */ (0,
|
|
37759
|
+
p.connected.has(it.id) ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.ok, children: [
|
|
37677
37760
|
" ",
|
|
37678
37761
|
G.ok,
|
|
37679
37762
|
" connected"
|
|
37680
37763
|
] }) : null
|
|
37681
37764
|
] }, it.id);
|
|
37682
37765
|
}),
|
|
37683
|
-
win.end < list2.length ? /* @__PURE__ */ (0,
|
|
37766
|
+
win.end < list2.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.faint, children: [
|
|
37684
37767
|
" ",
|
|
37685
37768
|
G.down,
|
|
37686
37769
|
" ",
|
|
37687
37770
|
list2.length - win.end,
|
|
37688
37771
|
" more"
|
|
37689
37772
|
] }) : null,
|
|
37690
|
-
p.integrations ? /* @__PURE__ */ (0,
|
|
37691
|
-
/* @__PURE__ */ (0,
|
|
37773
|
+
p.integrations ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
37774
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.accent, children: [
|
|
37692
37775
|
selected === list2.length ? G.prompt : " ",
|
|
37693
37776
|
" "
|
|
37694
37777
|
] }),
|
|
37695
|
-
/* @__PURE__ */ (0,
|
|
37696
|
-
/* @__PURE__ */ (0,
|
|
37778
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.accent2, bold: selected === list2.length, children: pad("+ Custom provider\u2026", 26) }),
|
|
37779
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: " any OpenAI- or Anthropic-compatible endpoint" })
|
|
37697
37780
|
] }) : null
|
|
37698
37781
|
] }),
|
|
37699
|
-
p.error ? /* @__PURE__ */ (0,
|
|
37782
|
+
p.error ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.err, children: p.error }) : null
|
|
37700
37783
|
]
|
|
37701
37784
|
}
|
|
37702
37785
|
);
|
|
37703
37786
|
}
|
|
37704
37787
|
function MethodPicker(p) {
|
|
37705
37788
|
const methods = usable(p.integration);
|
|
37706
|
-
const [sel, setSel] = (0,
|
|
37789
|
+
const [sel, setSel] = (0, import_react25.useState)(0);
|
|
37707
37790
|
use_input_default((_ch, key) => {
|
|
37708
37791
|
if (key.escape) return p.onBack();
|
|
37709
37792
|
if (key.upArrow) return setSel((s2) => (s2 + methods.length - 1) % methods.length);
|
|
@@ -37712,38 +37795,38 @@ function MethodPicker(p) {
|
|
|
37712
37795
|
});
|
|
37713
37796
|
const wLabel = Math.min(40, Math.max(...methods.map((m) => methodLabel(m).length)) + 2);
|
|
37714
37797
|
const env3 = p.integration.methods.find((m) => m.type === "env");
|
|
37715
|
-
return /* @__PURE__ */ (0,
|
|
37798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
37716
37799
|
Panel,
|
|
37717
37800
|
{
|
|
37718
37801
|
title: `Connect ${p.integration.name}`,
|
|
37719
37802
|
width: p.width,
|
|
37720
37803
|
color: p.color,
|
|
37721
|
-
footer: /* @__PURE__ */ (0,
|
|
37804
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hints, { items: [["\u2191\u2193", "move"], ["enter", "continue"], ["esc", "back"]] }),
|
|
37722
37805
|
children: [
|
|
37723
|
-
/* @__PURE__ */ (0,
|
|
37724
|
-
/* @__PURE__ */ (0,
|
|
37725
|
-
methods.map((m, i) => /* @__PURE__ */ (0,
|
|
37726
|
-
/* @__PURE__ */ (0,
|
|
37806
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
37807
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: "How do you want to connect?" }),
|
|
37808
|
+
methods.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
37809
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.accent, children: [
|
|
37727
37810
|
i === sel ? G.prompt : " ",
|
|
37728
37811
|
" "
|
|
37729
37812
|
] }),
|
|
37730
|
-
/* @__PURE__ */ (0,
|
|
37731
|
-
/* @__PURE__ */ (0,
|
|
37813
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: i === sel, children: pad(methodLabel(m), wLabel) }),
|
|
37814
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.faint, children: m.type === "oauth" ? "opens your browser" : m.type === "external" ? "uses the login on this machine" : "paste a key" })
|
|
37732
37815
|
] }, m.type + ("id" in m ? m.id : "")))
|
|
37733
37816
|
] }),
|
|
37734
|
-
env3 ? /* @__PURE__ */ (0,
|
|
37817
|
+
env3 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.faint, children: [
|
|
37735
37818
|
"Or set ",
|
|
37736
37819
|
env3.names[0],
|
|
37737
37820
|
" in your shell before starting LatentCode."
|
|
37738
37821
|
] }) }) : null,
|
|
37739
|
-
p.error ? /* @__PURE__ */ (0,
|
|
37822
|
+
p.error ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.err, children: p.error }) : null
|
|
37740
37823
|
]
|
|
37741
37824
|
}
|
|
37742
37825
|
);
|
|
37743
37826
|
}
|
|
37744
37827
|
function KeyEntry(p) {
|
|
37745
|
-
const [busy, setBusy] = (0,
|
|
37746
|
-
const [error, setError] = (0,
|
|
37828
|
+
const [busy, setBusy] = (0, import_react25.useState)(false);
|
|
37829
|
+
const [error, setError] = (0, import_react25.useState)("");
|
|
37747
37830
|
const field = useLineField({
|
|
37748
37831
|
active: !busy,
|
|
37749
37832
|
onChange: () => setError(""),
|
|
@@ -37762,44 +37845,44 @@ function KeyEntry(p) {
|
|
|
37762
37845
|
return false;
|
|
37763
37846
|
}
|
|
37764
37847
|
});
|
|
37765
|
-
return /* @__PURE__ */ (0,
|
|
37848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37766
37849
|
Panel,
|
|
37767
37850
|
{
|
|
37768
37851
|
title: `Connect ${p.integration.name}`,
|
|
37769
37852
|
right: "API key",
|
|
37770
37853
|
width: p.width,
|
|
37771
37854
|
color: p.color,
|
|
37772
|
-
footer: /* @__PURE__ */ (0,
|
|
37773
|
-
children: /* @__PURE__ */ (0,
|
|
37774
|
-
/* @__PURE__ */ (0,
|
|
37855
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hints, { items: [["enter", "save"], ["esc", "back"]] }),
|
|
37856
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
37857
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.muted, children: [
|
|
37775
37858
|
"Paste your ",
|
|
37776
37859
|
p.integration.name,
|
|
37777
37860
|
" API key."
|
|
37778
37861
|
] }),
|
|
37779
|
-
/* @__PURE__ */ (0,
|
|
37780
|
-
/* @__PURE__ */ (0,
|
|
37862
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { marginTop: 1, children: [
|
|
37863
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.accent, children: [
|
|
37781
37864
|
G.key,
|
|
37782
37865
|
" "
|
|
37783
37866
|
] }),
|
|
37784
|
-
/* @__PURE__ */ (0,
|
|
37867
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldText, { state: field.state, mask: true, placeholder: "paste the key here" })
|
|
37785
37868
|
] }),
|
|
37786
|
-
/* @__PURE__ */ (0,
|
|
37787
|
-
/* @__PURE__ */ (0,
|
|
37869
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginTop: 1, children: busy ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
37870
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Spinner, {}),
|
|
37788
37871
|
" ",
|
|
37789
|
-
/* @__PURE__ */ (0,
|
|
37790
|
-
] }) : /* @__PURE__ */ (0,
|
|
37791
|
-
error ? /* @__PURE__ */ (0,
|
|
37872
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: "Saving\u2026" })
|
|
37873
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.faint, children: "Stored by the local engine on this machine. Never sent to Latent." }) }),
|
|
37874
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.err, children: error }) : null
|
|
37792
37875
|
] })
|
|
37793
37876
|
}
|
|
37794
37877
|
);
|
|
37795
37878
|
}
|
|
37796
37879
|
function OAuthFlow(p) {
|
|
37797
|
-
const [attempt, setAttempt] = (0,
|
|
37798
|
-
const [error, setError] = (0,
|
|
37799
|
-
const [busy, setBusy] = (0,
|
|
37800
|
-
const attemptRef = (0,
|
|
37801
|
-
const finished = (0,
|
|
37802
|
-
(0,
|
|
37880
|
+
const [attempt, setAttempt] = (0, import_react25.useState)(null);
|
|
37881
|
+
const [error, setError] = (0, import_react25.useState)("");
|
|
37882
|
+
const [busy, setBusy] = (0, import_react25.useState)(false);
|
|
37883
|
+
const attemptRef = (0, import_react25.useRef)(null);
|
|
37884
|
+
const finished = (0, import_react25.useRef)(false);
|
|
37885
|
+
(0, import_react25.useEffect)(() => {
|
|
37803
37886
|
let live = true;
|
|
37804
37887
|
const answer = {};
|
|
37805
37888
|
for (const f of p.method.form ?? []) if (f.default !== void 0) answer[f.key] = f.default;
|
|
@@ -37815,7 +37898,7 @@ function OAuthFlow(p) {
|
|
|
37815
37898
|
if (a2 && !finished.current) void p.engine.cancelOAuth(p.integration.id, a2.attemptID);
|
|
37816
37899
|
};
|
|
37817
37900
|
}, []);
|
|
37818
|
-
(0,
|
|
37901
|
+
(0, import_react25.useEffect)(() => {
|
|
37819
37902
|
if (!attempt || attempt.mode !== "auto") return;
|
|
37820
37903
|
const t = setInterval(() => {
|
|
37821
37904
|
p.engine.oauthStatus(p.integration.id, attempt.attemptID).then((s2) => {
|
|
@@ -37855,50 +37938,50 @@ function OAuthFlow(p) {
|
|
|
37855
37938
|
return false;
|
|
37856
37939
|
}
|
|
37857
37940
|
});
|
|
37858
|
-
return /* @__PURE__ */ (0,
|
|
37941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37859
37942
|
Panel,
|
|
37860
37943
|
{
|
|
37861
37944
|
title: `Connect ${p.integration.name}`,
|
|
37862
37945
|
right: p.method.label,
|
|
37863
37946
|
width: p.width,
|
|
37864
37947
|
color: p.color,
|
|
37865
|
-
footer: /* @__PURE__ */ (0,
|
|
37866
|
-
children: /* @__PURE__ */ (0,
|
|
37867
|
-
!attempt && !error ? /* @__PURE__ */ (0,
|
|
37868
|
-
/* @__PURE__ */ (0,
|
|
37948
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hints, { items: codeMode ? [["enter", "submit code"], ["esc", "cancel"]] : [["esc", "cancel"]] }),
|
|
37949
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
37950
|
+
!attempt && !error ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
37951
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Spinner, {}),
|
|
37869
37952
|
" ",
|
|
37870
|
-
/* @__PURE__ */ (0,
|
|
37953
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: "Starting sign-in\u2026" })
|
|
37871
37954
|
] }) : null,
|
|
37872
|
-
attempt ? /* @__PURE__ */ (0,
|
|
37873
|
-
/* @__PURE__ */ (0,
|
|
37874
|
-
/* @__PURE__ */ (0,
|
|
37875
|
-
attempt.instructions ? /* @__PURE__ */ (0,
|
|
37876
|
-
/* @__PURE__ */ (0,
|
|
37877
|
-
/* @__PURE__ */ (0,
|
|
37955
|
+
attempt ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
37956
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: "Your browser should open. If it does not, open this link:" }),
|
|
37957
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.accent2, wrap: "wrap", children: attempt.url }),
|
|
37958
|
+
attempt.instructions ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, children: attempt.instructions }) }) : null,
|
|
37959
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginTop: 1, children: codeMode ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
37960
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.accent, children: [
|
|
37878
37961
|
G.key,
|
|
37879
37962
|
" "
|
|
37880
37963
|
] }),
|
|
37881
|
-
/* @__PURE__ */ (0,
|
|
37882
|
-
] }) : error ? null : /* @__PURE__ */ (0,
|
|
37883
|
-
/* @__PURE__ */ (0,
|
|
37964
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldText, { state: field.state, placeholder: "paste the code from the browser" })
|
|
37965
|
+
] }) : error ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
37966
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Spinner, {}),
|
|
37884
37967
|
" ",
|
|
37885
|
-
/* @__PURE__ */ (0,
|
|
37968
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: "Waiting for you to finish in the browser\u2026" })
|
|
37886
37969
|
] }) })
|
|
37887
37970
|
] }) : null,
|
|
37888
|
-
error ? /* @__PURE__ */ (0,
|
|
37971
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.err, children: error }) : null
|
|
37889
37972
|
] })
|
|
37890
37973
|
}
|
|
37891
37974
|
);
|
|
37892
37975
|
}
|
|
37893
37976
|
var KINDS = ["openai", "anthropic"];
|
|
37894
37977
|
function CustomProviderForm(p) {
|
|
37895
|
-
const [step, setStep] = (0,
|
|
37896
|
-
const [name, setName] = (0,
|
|
37897
|
-
const [kind, setKind] = (0,
|
|
37898
|
-
const [url, setUrl] = (0,
|
|
37899
|
-
const [key, setKey] = (0,
|
|
37900
|
-
const [busy, setBusy] = (0,
|
|
37901
|
-
const [error, setError] = (0,
|
|
37978
|
+
const [step, setStep] = (0, import_react25.useState)("name");
|
|
37979
|
+
const [name, setName] = (0, import_react25.useState)("");
|
|
37980
|
+
const [kind, setKind] = (0, import_react25.useState)("openai");
|
|
37981
|
+
const [url, setUrl] = (0, import_react25.useState)("");
|
|
37982
|
+
const [key, setKey] = (0, import_react25.useState)("");
|
|
37983
|
+
const [busy, setBusy] = (0, import_react25.useState)("");
|
|
37984
|
+
const [error, setError] = (0, import_react25.useState)("");
|
|
37902
37985
|
const order = ["name", "kind", "url", "key", "models"];
|
|
37903
37986
|
const back = () => {
|
|
37904
37987
|
setError("");
|
|
@@ -37981,13 +38064,13 @@ function CustomProviderForm(p) {
|
|
|
37981
38064
|
},
|
|
37982
38065
|
{ isActive: !busy && step === "kind" }
|
|
37983
38066
|
);
|
|
37984
|
-
const done = (label2, value) => /* @__PURE__ */ (0,
|
|
37985
|
-
/* @__PURE__ */ (0,
|
|
38067
|
+
const done = (label2, value) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
38068
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.ok, children: [
|
|
37986
38069
|
G.ok,
|
|
37987
38070
|
" "
|
|
37988
38071
|
] }),
|
|
37989
|
-
/* @__PURE__ */ (0,
|
|
37990
|
-
/* @__PURE__ */ (0,
|
|
38072
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: pad(label2, 10) }),
|
|
38073
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { children: value })
|
|
37991
38074
|
] });
|
|
37992
38075
|
const at = order.indexOf(step);
|
|
37993
38076
|
const prompt = {
|
|
@@ -38004,51 +38087,51 @@ function CustomProviderForm(p) {
|
|
|
38004
38087
|
placeholder: "e.g. gpt-4.1, claude-sonnet-4"
|
|
38005
38088
|
}
|
|
38006
38089
|
};
|
|
38007
|
-
return /* @__PURE__ */ (0,
|
|
38090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
38008
38091
|
Panel,
|
|
38009
38092
|
{
|
|
38010
38093
|
title: "Custom provider",
|
|
38011
38094
|
right: `step ${at + 1} of ${order.length}`,
|
|
38012
38095
|
width: p.width,
|
|
38013
38096
|
color: p.color,
|
|
38014
|
-
footer: /* @__PURE__ */ (0,
|
|
38097
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
38015
38098
|
Hints,
|
|
38016
38099
|
{
|
|
38017
38100
|
items: step === "kind" ? [["\u2191\u2193", "choose"], ["enter", "continue"], ["esc", "back"]] : [["enter", step === "models" ? "save" : "continue"], ["esc", "back"]]
|
|
38018
38101
|
}
|
|
38019
38102
|
),
|
|
38020
|
-
children: /* @__PURE__ */ (0,
|
|
38103
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
38021
38104
|
at > 0 ? done("Name", name) : null,
|
|
38022
38105
|
at > 1 ? done("Type", KIND_LABEL[kind]) : null,
|
|
38023
38106
|
at > 2 ? done("Base URL", url) : null,
|
|
38024
38107
|
at > 3 ? done("API key", key ? "\u2022".repeat(Math.min(key.length, 12)) : "none") : null,
|
|
38025
|
-
/* @__PURE__ */ (0,
|
|
38026
|
-
/* @__PURE__ */ (0,
|
|
38027
|
-
KINDS.map((k) => /* @__PURE__ */ (0,
|
|
38028
|
-
/* @__PURE__ */ (0,
|
|
38108
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginTop: at > 0 ? 1 : 0, flexDirection: "column", children: step === "kind" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
38109
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: "Which API does the endpoint speak?" }),
|
|
38110
|
+
KINDS.map((k) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
38111
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.accent, children: [
|
|
38029
38112
|
k === kind ? G.prompt : " ",
|
|
38030
38113
|
" "
|
|
38031
38114
|
] }),
|
|
38032
|
-
/* @__PURE__ */ (0,
|
|
38033
|
-
/* @__PURE__ */ (0,
|
|
38115
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: k === kind, children: pad(KIND_LABEL[k], 24) }),
|
|
38116
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.faint, children: k === "openai" ? "/chat/completions \u2014 most gateways, vLLM, Ollama" : "/messages \u2014 Anthropic-style proxies" })
|
|
38034
38117
|
] }, k))
|
|
38035
|
-
] }) : /* @__PURE__ */ (0,
|
|
38036
|
-
/* @__PURE__ */ (0,
|
|
38037
|
-
/* @__PURE__ */ (0,
|
|
38038
|
-
/* @__PURE__ */ (0,
|
|
38118
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
38119
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: prompt[step].hint }),
|
|
38120
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { marginTop: 1, children: [
|
|
38121
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.accent, children: [
|
|
38039
38122
|
step === "key" ? G.key : G.prompt,
|
|
38040
38123
|
" "
|
|
38041
38124
|
] }),
|
|
38042
|
-
/* @__PURE__ */ (0,
|
|
38043
|
-
/* @__PURE__ */ (0,
|
|
38125
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, children: pad(prompt[step].label, 10) }),
|
|
38126
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldText, { state: field.state, mask: step === "key", placeholder: prompt[step].placeholder })
|
|
38044
38127
|
] })
|
|
38045
38128
|
] }) }),
|
|
38046
|
-
/* @__PURE__ */ (0,
|
|
38047
|
-
/* @__PURE__ */ (0,
|
|
38129
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginTop: 1, children: busy ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
38130
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Spinner, {}),
|
|
38048
38131
|
" ",
|
|
38049
|
-
/* @__PURE__ */ (0,
|
|
38050
|
-
] }) : /* @__PURE__ */ (0,
|
|
38051
|
-
error ? /* @__PURE__ */ (0,
|
|
38132
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: busy })
|
|
38133
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.faint, children: "The endpoint goes into the engine config; the key into the engine's credential store. Never sent to Latent." }) }),
|
|
38134
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.err, wrap: "wrap", children: error }) : null
|
|
38052
38135
|
] })
|
|
38053
38136
|
}
|
|
38054
38137
|
);
|
|
@@ -38058,30 +38141,30 @@ function Done(p) {
|
|
|
38058
38141
|
if (key.return) return p.onModels();
|
|
38059
38142
|
if (key.escape) p.onClose();
|
|
38060
38143
|
});
|
|
38061
|
-
return /* @__PURE__ */ (0,
|
|
38144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
38062
38145
|
Panel,
|
|
38063
38146
|
{
|
|
38064
38147
|
title: "Connected",
|
|
38065
38148
|
width: p.width,
|
|
38066
38149
|
color: C.ok,
|
|
38067
|
-
footer: /* @__PURE__ */ (0,
|
|
38150
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hints, { items: [["enter", "pick a model"], ["esc", "close"]] }),
|
|
38068
38151
|
children: [
|
|
38069
|
-
/* @__PURE__ */ (0,
|
|
38070
|
-
/* @__PURE__ */ (0,
|
|
38152
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
38153
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.ok, children: [
|
|
38071
38154
|
G.ok,
|
|
38072
38155
|
" "
|
|
38073
38156
|
] }),
|
|
38074
|
-
/* @__PURE__ */ (0,
|
|
38075
|
-
/* @__PURE__ */ (0,
|
|
38157
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, children: p.name }),
|
|
38158
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: p.models ? ` is connected \u2014 ${p.models} models available.` : " is connected. Its models will appear after a moment." })
|
|
38076
38159
|
] }) }),
|
|
38077
|
-
p.note ? /* @__PURE__ */ (0,
|
|
38160
|
+
p.note ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.faint, wrap: "wrap", children: p.note }) }) : null
|
|
38078
38161
|
]
|
|
38079
38162
|
}
|
|
38080
38163
|
);
|
|
38081
38164
|
}
|
|
38082
38165
|
|
|
38083
38166
|
// src/ui/panels/WalletPanel.tsx
|
|
38084
|
-
var
|
|
38167
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
38085
38168
|
|
|
38086
38169
|
// src/account/privy.ts
|
|
38087
38170
|
function trimServer(server) {
|
|
@@ -38277,7 +38360,7 @@ You can still connect an address you control: latentcode login --wallet 0x\u2026
|
|
|
38277
38360
|
}
|
|
38278
38361
|
|
|
38279
38362
|
// src/ui/panels/WalletPanel.tsx
|
|
38280
|
-
var
|
|
38363
|
+
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
38281
38364
|
var deps = (server, extra) => ({
|
|
38282
38365
|
server,
|
|
38283
38366
|
log: () => {
|
|
@@ -38289,20 +38372,20 @@ var deps = (server, extra) => ({
|
|
|
38289
38372
|
...extra
|
|
38290
38373
|
});
|
|
38291
38374
|
function WalletPanel(p) {
|
|
38292
|
-
const [view, setView] = (0,
|
|
38375
|
+
const [view, setView] = (0, import_react26.useState)({ v: "menu" });
|
|
38293
38376
|
const done = (wallet) => {
|
|
38294
38377
|
p.onWallet(wallet);
|
|
38295
38378
|
setView({ v: "done", wallet });
|
|
38296
38379
|
};
|
|
38297
38380
|
switch (view.v) {
|
|
38298
38381
|
case "menu":
|
|
38299
|
-
return /* @__PURE__ */ (0,
|
|
38382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Menu, { ...p, onPick: (v) => setView({ v }) });
|
|
38300
38383
|
case "link":
|
|
38301
|
-
return /* @__PURE__ */ (0,
|
|
38384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AuthLink, { ...p, onDone: done, onBack: () => setView({ v: "menu" }) });
|
|
38302
38385
|
case "address":
|
|
38303
|
-
return /* @__PURE__ */ (0,
|
|
38386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Address, { ...p, onDone: done, onBack: () => setView({ v: "menu" }) });
|
|
38304
38387
|
case "done":
|
|
38305
|
-
return /* @__PURE__ */ (0,
|
|
38388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Done2, { width: p.width, wallet: view.wallet, onClose: p.onClose });
|
|
38306
38389
|
}
|
|
38307
38390
|
}
|
|
38308
38391
|
function Menu(p) {
|
|
@@ -38310,39 +38393,39 @@ function Menu(p) {
|
|
|
38310
38393
|
{ id: "link", label: "Sign in with your browser", hint: "creates or finds your Latent wallet" },
|
|
38311
38394
|
{ id: "address", label: "Use a wallet address", hint: "an address you already control" }
|
|
38312
38395
|
];
|
|
38313
|
-
const [sel, setSel] = (0,
|
|
38396
|
+
const [sel, setSel] = (0, import_react26.useState)(0);
|
|
38314
38397
|
use_input_default((_ch, key) => {
|
|
38315
38398
|
if (key.escape) return p.onClose();
|
|
38316
38399
|
if (key.upArrow || key.downArrow || key.tab) return setSel((s2) => (s2 + 1) % options.length);
|
|
38317
38400
|
if (key.return) p.onPick(options[sel].id);
|
|
38318
38401
|
});
|
|
38319
|
-
return /* @__PURE__ */ (0,
|
|
38402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
38320
38403
|
Panel,
|
|
38321
38404
|
{
|
|
38322
38405
|
title: "Wallet",
|
|
38323
38406
|
right: p.wallet ? `connected \xB7 ${shortWallet(p.wallet)}` : "not connected",
|
|
38324
38407
|
width: p.width,
|
|
38325
38408
|
color: C.earn,
|
|
38326
|
-
footer: /* @__PURE__ */ (0,
|
|
38327
|
-
children: /* @__PURE__ */ (0,
|
|
38328
|
-
/* @__PURE__ */ (0,
|
|
38329
|
-
/* @__PURE__ */ (0,
|
|
38330
|
-
/* @__PURE__ */ (0,
|
|
38409
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hints, { items: [["\u2191\u2193", "move"], ["enter", "continue"], ["esc", "close"]] }),
|
|
38410
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
38411
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.muted, wrap: "wrap", children: p.wallet ? "Earn mode pays into this wallet. Connect a different one:" : "Earn mode pays you in Latent Credit while the agent works \u2014 model usage, or USDG when you sell. Connect the wallet it should pay into:" }),
|
|
38412
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: options.map((o, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { children: [
|
|
38413
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { color: C.earn, children: [
|
|
38331
38414
|
i === sel ? G.prompt : " ",
|
|
38332
38415
|
" "
|
|
38333
38416
|
] }),
|
|
38334
|
-
/* @__PURE__ */ (0,
|
|
38335
|
-
/* @__PURE__ */ (0,
|
|
38417
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { bold: i === sel, children: o.label.padEnd(27) }),
|
|
38418
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.faint, children: o.hint })
|
|
38336
38419
|
] }, o.id)) })
|
|
38337
38420
|
] })
|
|
38338
38421
|
}
|
|
38339
38422
|
);
|
|
38340
38423
|
}
|
|
38341
38424
|
function AuthLink(p) {
|
|
38342
|
-
const [link2, setLink] = (0,
|
|
38343
|
-
const [error, setError] = (0,
|
|
38344
|
-
const cancelled = (0,
|
|
38345
|
-
(0,
|
|
38425
|
+
const [link2, setLink] = (0, import_react26.useState)(null);
|
|
38426
|
+
const [error, setError] = (0, import_react26.useState)("");
|
|
38427
|
+
const cancelled = (0, import_react26.useRef)(false);
|
|
38428
|
+
(0, import_react26.useEffect)(() => {
|
|
38346
38429
|
cancelled.current = false;
|
|
38347
38430
|
loginWithAuthLink(
|
|
38348
38431
|
deps(p.server, {
|
|
@@ -38361,40 +38444,40 @@ function AuthLink(p) {
|
|
|
38361
38444
|
if (key.escape) p.onBack();
|
|
38362
38445
|
if (key.return && link2) openUrl(link2.url);
|
|
38363
38446
|
});
|
|
38364
|
-
return /* @__PURE__ */ (0,
|
|
38447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
38365
38448
|
Panel,
|
|
38366
38449
|
{
|
|
38367
38450
|
title: "Sign in",
|
|
38368
38451
|
right: "Latent wallet",
|
|
38369
38452
|
width: p.width,
|
|
38370
38453
|
color: C.earn,
|
|
38371
|
-
footer: /* @__PURE__ */ (0,
|
|
38372
|
-
children: /* @__PURE__ */ (0,
|
|
38373
|
-
!link2 && !error ? /* @__PURE__ */ (0,
|
|
38374
|
-
/* @__PURE__ */ (0,
|
|
38454
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hints, { items: [["enter", "open the link again"], ["esc", "cancel"]] }),
|
|
38455
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
38456
|
+
!link2 && !error ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { children: [
|
|
38457
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Spinner, { color: C.earn }),
|
|
38375
38458
|
" ",
|
|
38376
|
-
/* @__PURE__ */ (0,
|
|
38459
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.muted, children: "Preparing your sign-in link\u2026" })
|
|
38377
38460
|
] }) : null,
|
|
38378
|
-
link2 ? /* @__PURE__ */ (0,
|
|
38379
|
-
/* @__PURE__ */ (0,
|
|
38380
|
-
/* @__PURE__ */ (0,
|
|
38381
|
-
/* @__PURE__ */ (0,
|
|
38382
|
-
/* @__PURE__ */ (0,
|
|
38383
|
-
/* @__PURE__ */ (0,
|
|
38461
|
+
link2 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
38462
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.muted, children: "Your browser should open. If it does not, open:" }),
|
|
38463
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.accent2, wrap: "wrap", children: link2.url }),
|
|
38464
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { children: [
|
|
38465
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.muted, children: "Code " }),
|
|
38466
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { bold: true, color: C.earn, children: link2.code })
|
|
38384
38467
|
] }) }),
|
|
38385
|
-
error ? null : /* @__PURE__ */ (0,
|
|
38386
|
-
/* @__PURE__ */ (0,
|
|
38468
|
+
error ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { children: [
|
|
38469
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Spinner, { color: C.earn }),
|
|
38387
38470
|
" ",
|
|
38388
|
-
/* @__PURE__ */ (0,
|
|
38471
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.muted, children: "Waiting for you to finish in the browser\u2026" })
|
|
38389
38472
|
] }) })
|
|
38390
38473
|
] }) : null,
|
|
38391
|
-
error ? /* @__PURE__ */ (0,
|
|
38474
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.err, wrap: "wrap", children: error }) }) : null
|
|
38392
38475
|
] })
|
|
38393
38476
|
}
|
|
38394
38477
|
);
|
|
38395
38478
|
}
|
|
38396
38479
|
function Address(p) {
|
|
38397
|
-
const [error, setError] = (0,
|
|
38480
|
+
const [error, setError] = (0, import_react26.useState)("");
|
|
38398
38481
|
const field = useLineField({
|
|
38399
38482
|
onChange: () => setError(""),
|
|
38400
38483
|
onKey: (_ch, key) => {
|
|
@@ -38411,23 +38494,23 @@ function Address(p) {
|
|
|
38411
38494
|
return false;
|
|
38412
38495
|
}
|
|
38413
38496
|
});
|
|
38414
|
-
return /* @__PURE__ */ (0,
|
|
38497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
38415
38498
|
Panel,
|
|
38416
38499
|
{
|
|
38417
38500
|
title: "Wallet address",
|
|
38418
38501
|
width: p.width,
|
|
38419
38502
|
color: C.earn,
|
|
38420
|
-
footer: /* @__PURE__ */ (0,
|
|
38421
|
-
children: /* @__PURE__ */ (0,
|
|
38422
|
-
/* @__PURE__ */ (0,
|
|
38423
|
-
/* @__PURE__ */ (0,
|
|
38424
|
-
/* @__PURE__ */ (0,
|
|
38503
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hints, { items: [["enter", "save"], ["esc", "back"]] }),
|
|
38504
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
38505
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.muted, children: "Credit is earned on this address; sales pay USDG here. Use one you control." }),
|
|
38506
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { marginTop: 1, children: [
|
|
38507
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { color: C.earn, children: [
|
|
38425
38508
|
G.earn,
|
|
38426
38509
|
" "
|
|
38427
38510
|
] }),
|
|
38428
|
-
/* @__PURE__ */ (0,
|
|
38511
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FieldText, { state: field.state, placeholder: "0x\u2026" })
|
|
38429
38512
|
] }),
|
|
38430
|
-
error ? /* @__PURE__ */ (0,
|
|
38513
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.err, children: error }) : null
|
|
38431
38514
|
] })
|
|
38432
38515
|
}
|
|
38433
38516
|
);
|
|
@@ -38436,73 +38519,73 @@ function Done2(p) {
|
|
|
38436
38519
|
use_input_default((_ch, key) => {
|
|
38437
38520
|
if (key.return || key.escape) p.onClose();
|
|
38438
38521
|
});
|
|
38439
|
-
return /* @__PURE__ */ (0,
|
|
38440
|
-
/* @__PURE__ */ (0,
|
|
38522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Panel, { title: "Wallet connected", width: p.width, color: C.ok, footer: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hints, { items: [["enter", "continue"]] }), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { children: [
|
|
38523
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { color: C.ok, children: [
|
|
38441
38524
|
G.ok,
|
|
38442
38525
|
" "
|
|
38443
38526
|
] }),
|
|
38444
|
-
/* @__PURE__ */ (0,
|
|
38445
|
-
/* @__PURE__ */ (0,
|
|
38446
|
-
/* @__PURE__ */ (0,
|
|
38527
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { children: "Earn mode pays into " }),
|
|
38528
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { bold: true, children: shortWallet(p.wallet) }),
|
|
38529
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.muted, children: ". You earn while the agent works." })
|
|
38447
38530
|
] }) }) });
|
|
38448
38531
|
}
|
|
38449
38532
|
|
|
38450
38533
|
// src/ui/panels/OverflowPanel.tsx
|
|
38451
|
-
var
|
|
38534
|
+
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
|
|
38452
38535
|
function OverflowPanel(p) {
|
|
38453
38536
|
use_input_default((ch, key) => {
|
|
38454
38537
|
if (key.return) p.onContinue();
|
|
38455
38538
|
else if (ch === "s") p.onSwitch();
|
|
38456
38539
|
else if (key.escape || ch === "n") p.onClose();
|
|
38457
38540
|
});
|
|
38458
|
-
return /* @__PURE__ */ (0,
|
|
38541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
38459
38542
|
Panel,
|
|
38460
38543
|
{
|
|
38461
38544
|
title: "Limit reached",
|
|
38462
38545
|
right: `${p.credits.toFixed(2)} credits`,
|
|
38463
38546
|
width: p.width,
|
|
38464
38547
|
color: C.earn,
|
|
38465
|
-
footer: /* @__PURE__ */ (0,
|
|
38466
|
-
children: /* @__PURE__ */ (0,
|
|
38467
|
-
/* @__PURE__ */ (0,
|
|
38468
|
-
/* @__PURE__ */ (0,
|
|
38469
|
-
/* @__PURE__ */ (0,
|
|
38548
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Hints, { items: [["enter", "switch & continue"], ["s", "switch only"], ["esc", "stay"]] }),
|
|
38549
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
38550
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Text, { wrap: "wrap", children: [
|
|
38551
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { bold: true, children: p.fromName }),
|
|
38552
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { color: C.muted, children: " hit its usage limit." })
|
|
38470
38553
|
] }),
|
|
38471
|
-
/* @__PURE__ */ (0,
|
|
38554
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Text, { wrap: "wrap", children: [
|
|
38472
38555
|
"Continue on ",
|
|
38473
|
-
/* @__PURE__ */ (0,
|
|
38474
|
-
/* @__PURE__ */ (0,
|
|
38556
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { bold: true, color: C.earn, children: p.toName }),
|
|
38557
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Text, { color: C.muted, children: [
|
|
38475
38558
|
" via Venice, paid from the ",
|
|
38476
38559
|
p.credits.toFixed(2),
|
|
38477
38560
|
" credits you earned"
|
|
38478
38561
|
] }),
|
|
38479
|
-
p.price ? /* @__PURE__ */ (0,
|
|
38562
|
+
p.price ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Text, { color: C.faint, children: [
|
|
38480
38563
|
" (",
|
|
38481
38564
|
p.price,
|
|
38482
38565
|
" per 1M tokens)"
|
|
38483
38566
|
] }) : null,
|
|
38484
|
-
/* @__PURE__ */ (0,
|
|
38567
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { color: C.muted, children: "?" })
|
|
38485
38568
|
] }),
|
|
38486
|
-
/* @__PURE__ */ (0,
|
|
38569
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { color: C.faint, wrap: "wrap", children: "Your own plan stays connected; /model switches back any time." })
|
|
38487
38570
|
] })
|
|
38488
38571
|
}
|
|
38489
38572
|
);
|
|
38490
38573
|
}
|
|
38491
38574
|
|
|
38492
38575
|
// src/ui/panels/McpPanel.tsx
|
|
38493
|
-
var
|
|
38494
|
-
var
|
|
38576
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
38577
|
+
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
|
|
38495
38578
|
var DOT = { connected: C.ok, pending: C.warn, needs_auth: C.warn, failed: C.err, disabled: C.faint };
|
|
38496
38579
|
function errText2(e) {
|
|
38497
38580
|
return (e instanceof Error ? e.message : String(e)).split("\n")[0] ?? "";
|
|
38498
38581
|
}
|
|
38499
38582
|
function McpPanel(p) {
|
|
38500
|
-
const [view, setView] = (0,
|
|
38583
|
+
const [view, setView] = (0, import_react27.useState)(p.add !== void 0 ? { v: "add", initial: p.add } : { v: "list" });
|
|
38501
38584
|
switch (view.v) {
|
|
38502
38585
|
case "list":
|
|
38503
|
-
return /* @__PURE__ */ (0,
|
|
38586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(List, { ...p, onAdd: () => setView({ v: "add" }), onAuth: (integration, method, name) => setView({ v: "auth", integration, method, name }) });
|
|
38504
38587
|
case "add":
|
|
38505
|
-
return /* @__PURE__ */ (0,
|
|
38588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
38506
38589
|
AddForm,
|
|
38507
38590
|
{
|
|
38508
38591
|
...p,
|
|
@@ -38515,7 +38598,7 @@ function McpPanel(p) {
|
|
|
38515
38598
|
}
|
|
38516
38599
|
);
|
|
38517
38600
|
case "auth":
|
|
38518
|
-
return /* @__PURE__ */ (0,
|
|
38601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
38519
38602
|
OAuthFlow,
|
|
38520
38603
|
{
|
|
38521
38604
|
width: p.width,
|
|
@@ -38535,14 +38618,14 @@ function McpPanel(p) {
|
|
|
38535
38618
|
}
|
|
38536
38619
|
}
|
|
38537
38620
|
function List(p) {
|
|
38538
|
-
const [list2, setList] = (0,
|
|
38539
|
-
const [sel, setSel] = (0,
|
|
38540
|
-
const [busy, setBusy] = (0,
|
|
38541
|
-
const [note, setNote] = (0,
|
|
38542
|
-
const [confirm, setConfirm] = (0,
|
|
38543
|
-
const live = (0,
|
|
38621
|
+
const [list2, setList] = (0, import_react27.useState)(null);
|
|
38622
|
+
const [sel, setSel] = (0, import_react27.useState)(0);
|
|
38623
|
+
const [busy, setBusy] = (0, import_react27.useState)("");
|
|
38624
|
+
const [note, setNote] = (0, import_react27.useState)("");
|
|
38625
|
+
const [confirm, setConfirm] = (0, import_react27.useState)("");
|
|
38626
|
+
const live = (0, import_react27.useRef)(true);
|
|
38544
38627
|
const refresh = () => p.engine.mcpList().then((l) => live.current && setList(l)).catch((e) => live.current && (setList([]), setNote(errText2(e))));
|
|
38545
|
-
(0,
|
|
38628
|
+
(0, import_react27.useEffect)(() => {
|
|
38546
38629
|
live.current = true;
|
|
38547
38630
|
void refresh();
|
|
38548
38631
|
const t = setInterval(() => void refresh(), 2e3);
|
|
@@ -38614,14 +38697,14 @@ function List(p) {
|
|
|
38614
38697
|
const height = Math.max(3, Math.min(items.length, p.rows - 14));
|
|
38615
38698
|
const win = windowAround(items.length, sel, height);
|
|
38616
38699
|
const nameW = Math.min(24, Math.max(8, ...items.map((s2) => s2.name.length)) + 2);
|
|
38617
|
-
return /* @__PURE__ */ (0,
|
|
38700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
38618
38701
|
Panel,
|
|
38619
38702
|
{
|
|
38620
38703
|
title: "MCP servers",
|
|
38621
38704
|
right: list2 ? `${sum.connected}/${sum.total} connected` : "",
|
|
38622
38705
|
width: p.width,
|
|
38623
38706
|
color: C.accent2,
|
|
38624
|
-
footer: /* @__PURE__ */ (0,
|
|
38707
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
38625
38708
|
Hints,
|
|
38626
38709
|
{
|
|
38627
38710
|
items: [
|
|
@@ -38634,54 +38717,54 @@ function List(p) {
|
|
|
38634
38717
|
]
|
|
38635
38718
|
}
|
|
38636
38719
|
),
|
|
38637
|
-
children: /* @__PURE__ */ (0,
|
|
38638
|
-
/* @__PURE__ */ (0,
|
|
38639
|
-
/* @__PURE__ */ (0,
|
|
38640
|
-
/* @__PURE__ */ (0,
|
|
38720
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
38721
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.muted, wrap: "wrap", children: "Shared with OpenCode: servers in your OpenCode config (global or this project) run here too, and the ones you add here show up in OpenCode." }),
|
|
38722
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: list2 === null ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { children: [
|
|
38723
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Spinner, {}),
|
|
38641
38724
|
" ",
|
|
38642
|
-
/* @__PURE__ */ (0,
|
|
38643
|
-
] }) : items.length === 0 ? /* @__PURE__ */ (0,
|
|
38725
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.muted, children: "Reading MCP servers\u2026" })
|
|
38726
|
+
] }) : items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: C.muted, children: [
|
|
38644
38727
|
"No MCP servers yet. Press ",
|
|
38645
|
-
/* @__PURE__ */ (0,
|
|
38728
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { bold: true, children: "a" }),
|
|
38646
38729
|
" to add one, e.g.",
|
|
38647
38730
|
" ",
|
|
38648
|
-
/* @__PURE__ */ (0,
|
|
38731
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.code, children: "context7 https://mcp.context7.com/mcp" })
|
|
38649
38732
|
] }) : items.slice(win.start, win.end).map((s2, i) => {
|
|
38650
38733
|
const idx = win.start + i;
|
|
38651
38734
|
const on2 = idx === sel;
|
|
38652
|
-
return /* @__PURE__ */ (0,
|
|
38653
|
-
/* @__PURE__ */ (0,
|
|
38735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
38736
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: C.accent2, children: [
|
|
38654
38737
|
on2 ? G.prompt : " ",
|
|
38655
38738
|
" "
|
|
38656
38739
|
] }),
|
|
38657
|
-
/* @__PURE__ */ (0,
|
|
38740
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: DOT[s2.status] ?? C.muted, children: [
|
|
38658
38741
|
G.dot,
|
|
38659
38742
|
" "
|
|
38660
38743
|
] }),
|
|
38661
|
-
/* @__PURE__ */ (0,
|
|
38662
|
-
/* @__PURE__ */ (0,
|
|
38663
|
-
/* @__PURE__ */ (0,
|
|
38744
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { bold: on2, children: pad(s2.name, nameW) }),
|
|
38745
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: DOT[s2.status] ?? C.muted, children: pad(statusLabel(s2.status), 15) }),
|
|
38746
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.faint, children: s2.title ?? "" })
|
|
38664
38747
|
] }, s2.name);
|
|
38665
38748
|
}) }),
|
|
38666
|
-
cur?.error ? /* @__PURE__ */ (0,
|
|
38667
|
-
busy ? /* @__PURE__ */ (0,
|
|
38668
|
-
/* @__PURE__ */ (0,
|
|
38749
|
+
cur?.error ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: cur.status === "needs_auth" ? C.warn : C.err, wrap: "wrap", children: cur.error }) }) : null,
|
|
38750
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { children: [
|
|
38751
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Spinner, {}),
|
|
38669
38752
|
" ",
|
|
38670
|
-
/* @__PURE__ */ (0,
|
|
38753
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.muted, children: busy })
|
|
38671
38754
|
] }) }) : null,
|
|
38672
|
-
confirm ? /* @__PURE__ */ (0,
|
|
38755
|
+
confirm ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: C.warn, children: [
|
|
38673
38756
|
"Press x again to remove ",
|
|
38674
38757
|
confirm,
|
|
38675
38758
|
" from your config (OpenCode loses it too)."
|
|
38676
38759
|
] }) }) : null,
|
|
38677
|
-
note && !busy ? /* @__PURE__ */ (0,
|
|
38760
|
+
note && !busy ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.muted, wrap: "wrap", children: note }) }) : null
|
|
38678
38761
|
] })
|
|
38679
38762
|
}
|
|
38680
38763
|
);
|
|
38681
38764
|
}
|
|
38682
38765
|
function AddForm(p) {
|
|
38683
|
-
const [error, setError] = (0,
|
|
38684
|
-
const [busy, setBusy] = (0,
|
|
38766
|
+
const [error, setError] = (0, import_react27.useState)("");
|
|
38767
|
+
const [busy, setBusy] = (0, import_react27.useState)("");
|
|
38685
38768
|
async function add(line) {
|
|
38686
38769
|
const spec = parseMcpAdd(line);
|
|
38687
38770
|
setBusy(`Adding ${spec.name}\u2026`);
|
|
@@ -38711,39 +38794,39 @@ function AddForm(p) {
|
|
|
38711
38794
|
return false;
|
|
38712
38795
|
}
|
|
38713
38796
|
});
|
|
38714
|
-
return /* @__PURE__ */ (0,
|
|
38797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
38715
38798
|
Panel,
|
|
38716
38799
|
{
|
|
38717
38800
|
title: "Add an MCP server",
|
|
38718
38801
|
right: "saved to your OpenCode config",
|
|
38719
38802
|
width: p.width,
|
|
38720
38803
|
color: C.accent2,
|
|
38721
|
-
footer: /* @__PURE__ */ (0,
|
|
38722
|
-
children: /* @__PURE__ */ (0,
|
|
38723
|
-
/* @__PURE__ */ (0,
|
|
38724
|
-
/* @__PURE__ */ (0,
|
|
38725
|
-
/* @__PURE__ */ (0,
|
|
38726
|
-
/* @__PURE__ */ (0,
|
|
38727
|
-
/* @__PURE__ */ (0,
|
|
38728
|
-
/* @__PURE__ */ (0,
|
|
38804
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Hints, { items: [["enter", "add"], ["esc", "back"]] }),
|
|
38805
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
38806
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.muted, children: "A name, then a URL (remote) or the command that starts it (local):" }),
|
|
38807
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.faint, children: " context7 https://mcp.context7.com/mcp" }),
|
|
38808
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.faint, children: ' github https://api.githubcopilot.com/mcp/ --header Authorization="Bearer \u2026"' }),
|
|
38809
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.faint, children: " playwright npx -y @playwright/mcp@latest" }),
|
|
38810
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { marginTop: 1, children: [
|
|
38811
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: C.accent2, children: [
|
|
38729
38812
|
G.prompt,
|
|
38730
38813
|
" "
|
|
38731
38814
|
] }),
|
|
38732
|
-
/* @__PURE__ */ (0,
|
|
38815
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FieldText, { state: field.state, placeholder: "name url | command\u2026" })
|
|
38733
38816
|
] }),
|
|
38734
|
-
busy ? /* @__PURE__ */ (0,
|
|
38735
|
-
/* @__PURE__ */ (0,
|
|
38817
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { children: [
|
|
38818
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Spinner, {}),
|
|
38736
38819
|
" ",
|
|
38737
|
-
/* @__PURE__ */ (0,
|
|
38820
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.muted, children: busy })
|
|
38738
38821
|
] }) : null,
|
|
38739
|
-
error ? /* @__PURE__ */ (0,
|
|
38822
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.err, wrap: "wrap", children: error }) : null
|
|
38740
38823
|
] })
|
|
38741
38824
|
}
|
|
38742
38825
|
);
|
|
38743
38826
|
}
|
|
38744
38827
|
|
|
38745
38828
|
// src/ui/App.tsx
|
|
38746
|
-
var
|
|
38829
|
+
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
38747
38830
|
var DASHBOARD = "latentprotocol.xyz/app";
|
|
38748
38831
|
var MODE = { keep: "keep and spend (bonus)", auto_sell: "sell automatically for USDC", auto_list: "list at my price" };
|
|
38749
38832
|
var notice = (text, tone = "info") => ({
|
|
@@ -38777,42 +38860,42 @@ function activityLabel(s2) {
|
|
|
38777
38860
|
function StepMark({ status: status2 }) {
|
|
38778
38861
|
switch (status2) {
|
|
38779
38862
|
case "run":
|
|
38780
|
-
return /* @__PURE__ */ (0,
|
|
38863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Spinner, {});
|
|
38781
38864
|
case "ok":
|
|
38782
|
-
return /* @__PURE__ */ (0,
|
|
38865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.ok, children: G.ok });
|
|
38783
38866
|
case "warn":
|
|
38784
|
-
return /* @__PURE__ */ (0,
|
|
38867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.warn, children: G.ring });
|
|
38785
38868
|
case "fail":
|
|
38786
|
-
return /* @__PURE__ */ (0,
|
|
38869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.err, children: G.no });
|
|
38787
38870
|
default:
|
|
38788
|
-
return /* @__PURE__ */ (0,
|
|
38871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.faint, children: "\xB7" });
|
|
38789
38872
|
}
|
|
38790
38873
|
}
|
|
38791
38874
|
function BootCard(p) {
|
|
38792
38875
|
const wLabel = 10;
|
|
38793
38876
|
const inner = p.width - 4;
|
|
38794
|
-
return /* @__PURE__ */ (0,
|
|
38795
|
-
/* @__PURE__ */ (0,
|
|
38796
|
-
/* @__PURE__ */ (0,
|
|
38797
|
-
/* @__PURE__ */ (0,
|
|
38877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
38878
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { marginTop: 1, marginLeft: 1, flexDirection: "column", children: [
|
|
38879
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Logo, { version: p.version }),
|
|
38880
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.muted, children: TAGLINE })
|
|
38798
38881
|
] }),
|
|
38799
|
-
/* @__PURE__ */ (0,
|
|
38800
|
-
p.steps.map((st) => /* @__PURE__ */ (0,
|
|
38801
|
-
/* @__PURE__ */ (0,
|
|
38802
|
-
/* @__PURE__ */ (0,
|
|
38882
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", borderStyle: "round", borderColor: p.error ? C.err : C.border, paddingX: 1, width: p.width, children: [
|
|
38883
|
+
p.steps.map((st) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
38884
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(StepMark, { status: st.status }),
|
|
38885
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { bold: st.status === "run", color: st.status === "pending" ? C.faint : void 0, children: [
|
|
38803
38886
|
" ",
|
|
38804
38887
|
pad(st.label, wLabel)
|
|
38805
38888
|
] }),
|
|
38806
|
-
/* @__PURE__ */ (0,
|
|
38889
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: st.status === "fail" ? C.err : st.status === "warn" ? C.warn : C.muted, children: st.status === "run" && !st.detail ? "starting\u2026" : clip(st.detail, inner - wLabel - 4) })
|
|
38807
38890
|
] }, st.id)),
|
|
38808
|
-
/* @__PURE__ */ (0,
|
|
38809
|
-
/* @__PURE__ */ (0,
|
|
38810
|
-
/* @__PURE__ */ (0,
|
|
38811
|
-
/* @__PURE__ */ (0,
|
|
38891
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
38892
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.faint, children: "\xB7 " }),
|
|
38893
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.faint, children: pad("Project", wLabel) }),
|
|
38894
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.muted, children: shortPath(p.cwd, homedir4(), inner - wLabel - 4) })
|
|
38812
38895
|
] })
|
|
38813
38896
|
] }),
|
|
38814
|
-
p.error ? /* @__PURE__ */ (0,
|
|
38815
|
-
p.ready ? /* @__PURE__ */ (0,
|
|
38897
|
+
p.error ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { marginLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.err, wrap: "wrap", children: p.error }) }) : null,
|
|
38898
|
+
p.ready ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
38816
38899
|
Hints,
|
|
38817
38900
|
{
|
|
38818
38901
|
items: [
|
|
@@ -38838,29 +38921,29 @@ function HelpPanel({ width, commands, onClose }) {
|
|
|
38838
38921
|
["ctrl+a / ctrl+e", "start / end of line"],
|
|
38839
38922
|
["alt+\u2190 / alt+\u2192", "jump a word"],
|
|
38840
38923
|
["ctrl+w / ctrl+u", "delete word / line"],
|
|
38841
|
-
["ctrl+o", "
|
|
38924
|
+
["ctrl+o", "show the sponsored card"],
|
|
38842
38925
|
["ctrl+c", "clear the line, twice to quit"]
|
|
38843
38926
|
];
|
|
38844
|
-
return /* @__PURE__ */ (0,
|
|
38927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Panel, { title: "Help", width, color: C.accent, footer: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Hints, { items: [["esc", "close"]] }), children: [
|
|
38845
38928
|
groups.map((g) => {
|
|
38846
38929
|
const list2 = commands.filter((c) => c.group === g);
|
|
38847
38930
|
if (!list2.length) return null;
|
|
38848
|
-
return /* @__PURE__ */ (0,
|
|
38849
|
-
/* @__PURE__ */ (0,
|
|
38850
|
-
list2.map((c) => /* @__PURE__ */ (0,
|
|
38851
|
-
/* @__PURE__ */ (0,
|
|
38852
|
-
/* @__PURE__ */ (0,
|
|
38931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
38932
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { bold: true, color: C.muted, children: g }),
|
|
38933
|
+
list2.map((c) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
38934
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.accent2, children: pad(`/${c.name}${c.args ? " " + c.args : ""}`, 22) }),
|
|
38935
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.muted, children: c.desc })
|
|
38853
38936
|
] }, c.name))
|
|
38854
38937
|
] }, g);
|
|
38855
38938
|
}),
|
|
38856
|
-
/* @__PURE__ */ (0,
|
|
38857
|
-
/* @__PURE__ */ (0,
|
|
38858
|
-
keys.map(([k, d]) => /* @__PURE__ */ (0,
|
|
38859
|
-
/* @__PURE__ */ (0,
|
|
38860
|
-
/* @__PURE__ */ (0,
|
|
38939
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
38940
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { bold: true, color: C.muted, children: "Keys" }),
|
|
38941
|
+
keys.map(([k, d]) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { children: [
|
|
38942
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.accent2, children: pad(k, 22) }),
|
|
38943
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.muted, children: d })
|
|
38861
38944
|
] }, k))
|
|
38862
38945
|
] }),
|
|
38863
|
-
/* @__PURE__ */ (0,
|
|
38946
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.faint, wrap: "wrap", children: `Privacy: ads never enter the model's context or its answers. The only thing sent to the ad server is a coarse category (for example "backend"), worked out on this machine.` }) })
|
|
38864
38947
|
] });
|
|
38865
38948
|
}
|
|
38866
38949
|
var LINKS_OSC8 = linkShape() === "osc8";
|
|
@@ -38869,17 +38952,17 @@ function App2(props) {
|
|
|
38869
38952
|
const { exit } = use_app_default();
|
|
38870
38953
|
const { cols, rows } = useTermSize();
|
|
38871
38954
|
const width = Math.max(40, Math.min(cols, 110));
|
|
38872
|
-
const [sessionID, setSessionID] = (0,
|
|
38873
|
-
const [state, dispatch] = (0,
|
|
38955
|
+
const [sessionID, setSessionID] = (0, import_react28.useState)(props.sessionID);
|
|
38956
|
+
const [state, dispatch] = (0, import_react28.useReducer)(
|
|
38874
38957
|
(s2, ev) => ev.type === "reset" ? { ...initialState(ev.sessionID, s2.model), variant: s2.variant } : reduce(s2, ev),
|
|
38875
38958
|
{ ...initialState(props.sessionID, props.model), variant: props.variant }
|
|
38876
38959
|
);
|
|
38877
|
-
const [catalog, setCatalog] = (0,
|
|
38878
|
-
const [wallet, setWallet] = (0,
|
|
38879
|
-
const [overlay, setOverlay] = (0,
|
|
38880
|
-
const [, tick] = (0,
|
|
38881
|
-
const [editor, setEditorState] = (0,
|
|
38882
|
-
const editorRef = (0,
|
|
38960
|
+
const [catalog, setCatalog] = (0, import_react28.useState)(props.catalog);
|
|
38961
|
+
const [wallet, setWallet] = (0, import_react28.useState)(props.wallet);
|
|
38962
|
+
const [overlay, setOverlay] = (0, import_react28.useState)(null);
|
|
38963
|
+
const [, tick] = (0, import_react28.useState)(0);
|
|
38964
|
+
const [editor, setEditorState] = (0, import_react28.useState)(() => emptyEditor());
|
|
38965
|
+
const editorRef = (0, import_react28.useRef)(editor);
|
|
38883
38966
|
const setEditor = (next) => {
|
|
38884
38967
|
if (next.text !== editorRef.current.text) {
|
|
38885
38968
|
setPaletteAt(0);
|
|
@@ -38888,24 +38971,24 @@ function App2(props) {
|
|
|
38888
38971
|
editorRef.current = next;
|
|
38889
38972
|
setEditorState(next);
|
|
38890
38973
|
};
|
|
38891
|
-
const [paletteAt, setPaletteAt] = (0,
|
|
38892
|
-
const [paletteHidden, setPaletteHidden] = (0,
|
|
38893
|
-
const [permAt, setPermAt] = (0,
|
|
38894
|
-
const [quitArmed, setQuitArmed] = (0,
|
|
38895
|
-
const [leaving, setLeaving] = (0,
|
|
38974
|
+
const [paletteAt, setPaletteAt] = (0, import_react28.useState)(0);
|
|
38975
|
+
const [paletteHidden, setPaletteHidden] = (0, import_react28.useState)(false);
|
|
38976
|
+
const [permAt, setPermAt] = (0, import_react28.useState)(0);
|
|
38977
|
+
const [quitArmed, setQuitArmed] = (0, import_react28.useState)(false);
|
|
38978
|
+
const [leaving, setLeaving] = (0, import_react28.useState)(false);
|
|
38896
38979
|
const quit = () => {
|
|
38897
38980
|
setLeaving(true);
|
|
38898
38981
|
setTimeout(() => exit(), 20);
|
|
38899
38982
|
};
|
|
38900
|
-
const lastPrompt = (0,
|
|
38901
|
-
const currentModel = (0,
|
|
38983
|
+
const lastPrompt = (0, import_react28.useRef)("");
|
|
38984
|
+
const currentModel = (0, import_react28.useRef)(props.model);
|
|
38902
38985
|
currentModel.current = state.model;
|
|
38903
38986
|
const store = props.models;
|
|
38904
|
-
const ad = (0,
|
|
38987
|
+
const ad = (0, import_react28.useSyncExternalStore)(
|
|
38905
38988
|
(fn) => controller.subscribe(fn),
|
|
38906
38989
|
() => controller.snapshot()
|
|
38907
38990
|
);
|
|
38908
|
-
const allCommands = (0,
|
|
38991
|
+
const allCommands = (0, import_react28.useMemo)(
|
|
38909
38992
|
() => [
|
|
38910
38993
|
...COMMANDS,
|
|
38911
38994
|
...props.commands.filter((c) => !findCommand(c.name)).map((c) => ({ name: c.name, args: "[text]", desc: c.description ?? "agent command", group: "Agent" }))
|
|
@@ -38915,8 +38998,8 @@ function App2(props) {
|
|
|
38915
38998
|
const say = (text, tone = "info") => dispatch(notice(text, tone));
|
|
38916
38999
|
const statusOf = (key) => store.get(key)?.status ?? "unknown";
|
|
38917
39000
|
const modelName = (key) => catalog.models.find((m) => m.key === key)?.name ?? key;
|
|
38918
|
-
const [bonus, setBonus] = (0,
|
|
38919
|
-
(0,
|
|
39001
|
+
const [bonus, setBonus] = (0, import_react28.useState)(1);
|
|
39002
|
+
(0, import_react28.useEffect)(() => {
|
|
38920
39003
|
void api.creditQuote().then((q) => q && setBonus(q.bonus));
|
|
38921
39004
|
}, [api]);
|
|
38922
39005
|
props.summary.current = {
|
|
@@ -38926,7 +39009,7 @@ function App2(props) {
|
|
|
38926
39009
|
earned: credits(ad.sessionEarned, bonus),
|
|
38927
39010
|
impressions: ad.impressions
|
|
38928
39011
|
};
|
|
38929
|
-
(0,
|
|
39012
|
+
(0, import_react28.useEffect)(() => {
|
|
38930
39013
|
const ac = new AbortController();
|
|
38931
39014
|
void engine.subscribe((ev) => {
|
|
38932
39015
|
dispatch(ev);
|
|
@@ -38938,11 +39021,11 @@ function App2(props) {
|
|
|
38938
39021
|
if (props.startNotice) say(props.startNotice, "warn");
|
|
38939
39022
|
return () => ac.abort();
|
|
38940
39023
|
}, [engine]);
|
|
38941
|
-
(0,
|
|
39024
|
+
(0, import_react28.useEffect)(() => {
|
|
38942
39025
|
controller.setWorking(state.working, lastPrompt.current);
|
|
38943
39026
|
}, [state.working, controller]);
|
|
38944
39027
|
const lingering = !state.working && !!ad.current;
|
|
38945
|
-
(0,
|
|
39028
|
+
(0, import_react28.useEffect)(() => {
|
|
38946
39029
|
if (!state.working && !lingering) return;
|
|
38947
39030
|
const t = setInterval(
|
|
38948
39031
|
() => {
|
|
@@ -38953,13 +39036,13 @@ function App2(props) {
|
|
|
38953
39036
|
);
|
|
38954
39037
|
return () => clearInterval(t);
|
|
38955
39038
|
}, [state.working, lingering, controller]);
|
|
38956
|
-
const [balance, setBalance] = (0,
|
|
38957
|
-
const catalogRef = (0,
|
|
39039
|
+
const [balance, setBalance] = (0, import_react28.useState)(null);
|
|
39040
|
+
const catalogRef = (0, import_react28.useRef)(catalog);
|
|
38958
39041
|
catalogRef.current = catalog;
|
|
38959
|
-
const balanceRef = (0,
|
|
39042
|
+
const balanceRef = (0, import_react28.useRef)(balance);
|
|
38960
39043
|
balanceRef.current = balance;
|
|
38961
|
-
const offered = (0,
|
|
38962
|
-
(0,
|
|
39044
|
+
const offered = (0, import_react28.useRef)(/* @__PURE__ */ new Set());
|
|
39045
|
+
(0, import_react28.useEffect)(() => {
|
|
38963
39046
|
if (!wallet || state.working) return;
|
|
38964
39047
|
let live2 = true;
|
|
38965
39048
|
void api.creditSummary(wallet).then((c) => live2 && setBalance(c ? c.credits : null));
|
|
@@ -38967,8 +39050,8 @@ function App2(props) {
|
|
|
38967
39050
|
live2 = false;
|
|
38968
39051
|
};
|
|
38969
39052
|
}, [api, wallet, state.working, ad.impressions]);
|
|
38970
|
-
(0,
|
|
38971
|
-
(0,
|
|
39053
|
+
(0, import_react28.useEffect)(() => setPermAt(0), [state.permissions[0]?.id]);
|
|
39054
|
+
(0, import_react28.useEffect)(() => {
|
|
38972
39055
|
if (!quitArmed) return;
|
|
38973
39056
|
const t = setTimeout(() => setQuitArmed(false), 2e3);
|
|
38974
39057
|
return () => clearTimeout(t);
|
|
@@ -39214,8 +39297,7 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39214
39297
|
}
|
|
39215
39298
|
if (quitArmed) setQuitArmed(false);
|
|
39216
39299
|
if (key.ctrl && ch === "o") {
|
|
39217
|
-
|
|
39218
|
-
if (url) openUrl(url);
|
|
39300
|
+
if (ad.status === "ok" && ad.current) setOverlay({ t: "ad", ad: ad.current });
|
|
39219
39301
|
return;
|
|
39220
39302
|
}
|
|
39221
39303
|
if (key.escape) {
|
|
@@ -39245,22 +39327,22 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39245
39327
|
const live = state.items.slice(cut);
|
|
39246
39328
|
const elapsed = state.workingSince ? Math.max(0, Math.floor((Date.now() - state.workingSince) / 1e3)) : 0;
|
|
39247
39329
|
const maxLines = Math.max(6, rows - 14);
|
|
39248
|
-
const header = (0,
|
|
39330
|
+
const header = (0, import_react28.useMemo)(() => ({ id: "header" }), []);
|
|
39249
39331
|
const current = catalog.models.find((m) => m.key === state.model);
|
|
39250
39332
|
const provider = catalog.providers.find((p) => p.id === (current?.providerID ?? parseKey(state.model)?.providerID));
|
|
39251
39333
|
const close = () => setOverlay(null);
|
|
39252
|
-
return /* @__PURE__ */ (0,
|
|
39253
|
-
/* @__PURE__ */ (0,
|
|
39254
|
-
live.map((it) => /* @__PURE__ */ (0,
|
|
39255
|
-
perm ? /* @__PURE__ */ (0,
|
|
39256
|
-
state.working ? /* @__PURE__ */ (0,
|
|
39257
|
-
/* @__PURE__ */ (0,
|
|
39258
|
-
/* @__PURE__ */ (0,
|
|
39334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
39335
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Static, { items: [header, ...done.map((it) => ({ id: it.id, it }))], children: (entry) => "it" in entry ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ItemView, { item: entry.it, live: false, cwd: cwd2, width, maxLines }, entry.id) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(BootCard, { steps: props.bootSteps, version, cwd: cwd2, width, ready: true }, entry.id) }),
|
|
39336
|
+
live.map((it) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ItemView, { item: it, live: true, cwd: cwd2, width, maxLines }, it.id)),
|
|
39337
|
+
perm ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PermissionPrompt, { perm, selected: permAt, cwd: cwd2, width }) : null,
|
|
39338
|
+
state.working ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { marginTop: 1, flexDirection: "column", width, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
39339
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Spinner, {}),
|
|
39340
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { children: [
|
|
39259
39341
|
" ",
|
|
39260
39342
|
activityLabel(state),
|
|
39261
39343
|
"\u2026"
|
|
39262
39344
|
] }),
|
|
39263
|
-
/* @__PURE__ */ (0,
|
|
39345
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { color: C.faint, children: [
|
|
39264
39346
|
" ",
|
|
39265
39347
|
elapsed,
|
|
39266
39348
|
"s \xB7 ",
|
|
@@ -39272,7 +39354,7 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39272
39354
|
" \xB7 esc to interrupt"
|
|
39273
39355
|
] })
|
|
39274
39356
|
] }) }) : null,
|
|
39275
|
-
overlay?.t === "model" ? /* @__PURE__ */ (0,
|
|
39357
|
+
overlay?.t === "model" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
39276
39358
|
ModelPicker,
|
|
39277
39359
|
{
|
|
39278
39360
|
catalog,
|
|
@@ -39291,7 +39373,7 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39291
39373
|
onClose: close
|
|
39292
39374
|
}
|
|
39293
39375
|
) : null,
|
|
39294
|
-
overlay?.t === "providers" ? /* @__PURE__ */ (0,
|
|
39376
|
+
overlay?.t === "providers" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
39295
39377
|
ProviderPanel,
|
|
39296
39378
|
{
|
|
39297
39379
|
engine,
|
|
@@ -39311,7 +39393,7 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39311
39393
|
onClose: close
|
|
39312
39394
|
}
|
|
39313
39395
|
) : null,
|
|
39314
|
-
overlay?.t === "mcp" ? /* @__PURE__ */ (0,
|
|
39396
|
+
overlay?.t === "mcp" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
39315
39397
|
McpPanel,
|
|
39316
39398
|
{
|
|
39317
39399
|
engine,
|
|
@@ -39325,9 +39407,9 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39325
39407
|
onClose: close
|
|
39326
39408
|
}
|
|
39327
39409
|
) : null,
|
|
39328
|
-
overlay?.t === "wallet" ? /* @__PURE__ */ (0,
|
|
39329
|
-
overlay?.t === "help" ? /* @__PURE__ */ (0,
|
|
39330
|
-
overlay?.t === "overflow" ? /* @__PURE__ */ (0,
|
|
39410
|
+
overlay?.t === "wallet" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(WalletPanel, { server: props.server, wallet, width, onWallet: changeWallet, onClose: close }) : null,
|
|
39411
|
+
overlay?.t === "help" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(HelpPanel, { width, commands: allCommands, onClose: close }) : null,
|
|
39412
|
+
overlay?.t === "overflow" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
39331
39413
|
OverflowPanel,
|
|
39332
39414
|
{
|
|
39333
39415
|
width,
|
|
@@ -39351,8 +39433,9 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39351
39433
|
onClose: close
|
|
39352
39434
|
}
|
|
39353
39435
|
) : null,
|
|
39354
|
-
overlay ===
|
|
39355
|
-
|
|
39436
|
+
overlay?.t === "ad" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AdCard, { ad: overlay.ad, width, osc8Links: LINKS_OSC8, onOpen: openUrl, onCopy: (l) => copyText(l), onClose: close }) : null,
|
|
39437
|
+
overlay === null && !perm && !leaving ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
39438
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
39356
39439
|
Box_default,
|
|
39357
39440
|
{
|
|
39358
39441
|
marginTop: 1,
|
|
@@ -39361,34 +39444,34 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39361
39444
|
paddingX: 1,
|
|
39362
39445
|
width,
|
|
39363
39446
|
children: [
|
|
39364
|
-
/* @__PURE__ */ (0,
|
|
39447
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { color: C.accent, bold: true, children: [
|
|
39365
39448
|
G.prompt,
|
|
39366
39449
|
" "
|
|
39367
39450
|
] }) }),
|
|
39368
|
-
/* @__PURE__ */ (0,
|
|
39451
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FieldText, { state: editor, placeholder: state.turns ? "reply, or / for commands" : "ask anything, or / for commands" })
|
|
39369
39452
|
]
|
|
39370
39453
|
}
|
|
39371
39454
|
),
|
|
39372
|
-
paletteOpen ? /* @__PURE__ */ (0,
|
|
39373
|
-
matches.slice(0, 8).map((c, i) => /* @__PURE__ */ (0,
|
|
39374
|
-
/* @__PURE__ */ (0,
|
|
39455
|
+
paletteOpen ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { flexDirection: "column", paddingX: 2, width, children: [
|
|
39456
|
+
matches.slice(0, 8).map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { wrap: "truncate-end", children: [
|
|
39457
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { color: C.accent, children: [
|
|
39375
39458
|
i === paletteSel ? G.prompt : " ",
|
|
39376
39459
|
" "
|
|
39377
39460
|
] }),
|
|
39378
|
-
/* @__PURE__ */ (0,
|
|
39379
|
-
/* @__PURE__ */ (0,
|
|
39461
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { bold: i === paletteSel, color: i === paletteSel ? C.accent2 : C.text, children: pad(`/${c.name}${c.args ? " " + c.args : ""}`, 20) }),
|
|
39462
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.muted, children: c.desc })
|
|
39380
39463
|
] }, c.name)),
|
|
39381
|
-
matches.length > 8 ? /* @__PURE__ */ (0,
|
|
39464
|
+
matches.length > 8 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { color: C.faint, children: [
|
|
39382
39465
|
" ",
|
|
39383
39466
|
G.down,
|
|
39384
39467
|
" ",
|
|
39385
39468
|
matches.length - 8,
|
|
39386
39469
|
" more \u2014 keep typing"
|
|
39387
39470
|
] }) : null,
|
|
39388
|
-
/* @__PURE__ */ (0,
|
|
39471
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Hints, { items: [["\u2191\u2193", "move"], ["tab", "complete"], ["enter", "run"], ["esc", "dismiss"]] })
|
|
39389
39472
|
] }) : null
|
|
39390
39473
|
] }) : null,
|
|
39391
|
-
paletteOpen || leaving ? null : quitArmed ? /* @__PURE__ */ (0,
|
|
39474
|
+
paletteOpen || leaving ? null : quitArmed ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { paddingX: 1, width, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.warn, children: "Press ctrl+c again to quit" }) }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
39392
39475
|
StatusPanel,
|
|
39393
39476
|
{
|
|
39394
39477
|
width,
|
|
@@ -39416,14 +39499,14 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39416
39499
|
}
|
|
39417
39500
|
|
|
39418
39501
|
// src/ui/Root.tsx
|
|
39419
|
-
var
|
|
39502
|
+
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
39420
39503
|
function Root(p) {
|
|
39421
39504
|
const { exit } = use_app_default();
|
|
39422
39505
|
const { cols } = useTermSize();
|
|
39423
|
-
const [steps, setSteps] = (0,
|
|
39424
|
-
const [booted, setBooted] = (0,
|
|
39425
|
-
const [error, setError] = (0,
|
|
39426
|
-
(0,
|
|
39506
|
+
const [steps, setSteps] = (0, import_react29.useState)(BOOT_STEPS);
|
|
39507
|
+
const [booted, setBooted] = (0, import_react29.useState)(null);
|
|
39508
|
+
const [error, setError] = (0, import_react29.useState)("");
|
|
39509
|
+
(0, import_react29.useEffect)(() => {
|
|
39427
39510
|
boot(p.args, p.focus, (id, patch) => setSteps((list2) => list2.map((s2) => s2.id === id ? { ...s2, ...patch } : s2))).then(setBooted).catch((e) => {
|
|
39428
39511
|
const message = e instanceof Error ? e.message : String(e);
|
|
39429
39512
|
setError(message);
|
|
@@ -39438,7 +39521,7 @@ function Root(p) {
|
|
|
39438
39521
|
{ isActive: !booted }
|
|
39439
39522
|
);
|
|
39440
39523
|
if (!booted) {
|
|
39441
|
-
return /* @__PURE__ */ (0,
|
|
39524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
39442
39525
|
BootCard,
|
|
39443
39526
|
{
|
|
39444
39527
|
steps,
|
|
@@ -39450,7 +39533,7 @@ function Root(p) {
|
|
|
39450
39533
|
}
|
|
39451
39534
|
);
|
|
39452
39535
|
}
|
|
39453
|
-
return /* @__PURE__ */ (0,
|
|
39536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PasteContext.Provider, { value: p.paste, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(App2, { ...booted, version: p.version, bootSteps: steps, summary: p.summary }) });
|
|
39454
39537
|
}
|
|
39455
39538
|
|
|
39456
39539
|
// src/ads/attention.ts
|
|
@@ -39666,7 +39749,7 @@ function row(mark, label2, value, width = 10) {
|
|
|
39666
39749
|
}
|
|
39667
39750
|
|
|
39668
39751
|
// src/mcpCli.ts
|
|
39669
|
-
import { spawnSync as
|
|
39752
|
+
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
39670
39753
|
var HELP = `${a.bold("latentcode mcp")} \u2014 MCP servers (shared with OpenCode)
|
|
39671
39754
|
|
|
39672
39755
|
latentcode mcp list status of every server
|
|
@@ -39731,7 +39814,7 @@ async function mcpCommand(argv, cwd2 = process.cwd()) {
|
|
|
39731
39814
|
case "add": {
|
|
39732
39815
|
const project = rest.includes("--project");
|
|
39733
39816
|
const spec = parseMcpAdd(rest.filter((x) => x !== "--project"));
|
|
39734
|
-
const r =
|
|
39817
|
+
const r = spawnSync3(engineBin(), mcpAddArgv(spec, project ? "project" : "global"), { stdio: "inherit", cwd: cwd2 });
|
|
39735
39818
|
return r.status ?? 1;
|
|
39736
39819
|
}
|
|
39737
39820
|
case "remove":
|
|
@@ -39750,7 +39833,7 @@ async function mcpCommand(argv, cwd2 = process.cwd()) {
|
|
|
39750
39833
|
}
|
|
39751
39834
|
case "auth":
|
|
39752
39835
|
case "logout": {
|
|
39753
|
-
const r =
|
|
39836
|
+
const r = spawnSync3(engineBin(), ["mcp", sub, ...rest, "--standalone"], { stdio: "inherit", cwd: cwd2 });
|
|
39754
39837
|
return r.status ?? 1;
|
|
39755
39838
|
}
|
|
39756
39839
|
case "help":
|
|
@@ -39766,8 +39849,8 @@ ${HELP}`);
|
|
|
39766
39849
|
}
|
|
39767
39850
|
|
|
39768
39851
|
// src/index.tsx
|
|
39769
|
-
var
|
|
39770
|
-
var VERSION = "0.1.0-alpha.
|
|
39852
|
+
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
|
|
39853
|
+
var VERSION = "0.1.0-alpha.13";
|
|
39771
39854
|
var usage = () => `${logo()}
|
|
39772
39855
|
${a.dim(`v${VERSION} \xB7 terminal coding agent. Bring your own model access; earn while it works.`)}
|
|
39773
39856
|
|
|
@@ -39851,7 +39934,7 @@ ${usage()}`);
|
|
|
39851
39934
|
function auth(argv) {
|
|
39852
39935
|
const engine = resolveEngineBin();
|
|
39853
39936
|
if (!engine) throw new EngineError(ENGINE_NOT_FOUND);
|
|
39854
|
-
const r =
|
|
39937
|
+
const r = spawnSync4(engine.path, ["auth", ...argv.length ? argv : ["login"], "--standalone"], { stdio: "inherit" });
|
|
39855
39938
|
process.exit(r.status ?? 1);
|
|
39856
39939
|
}
|
|
39857
39940
|
async function status() {
|
|
@@ -39912,7 +39995,7 @@ async function main() {
|
|
|
39912
39995
|
const summary = { current: { turns: 0, tokens: 0, cost: 0, earned: 0, impressions: 0 } };
|
|
39913
39996
|
let fatal = false;
|
|
39914
39997
|
const app = render_default(
|
|
39915
|
-
/* @__PURE__ */ (0,
|
|
39998
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
39916
39999
|
Root,
|
|
39917
40000
|
{
|
|
39918
40001
|
args: { cwd: cwd2, model: args.model, noAds: args.noAds, auto: args.auto },
|