latentcode 0.1.0-alpha.11 → 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 +787 -693
- 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";
|
|
@@ -34892,8 +34892,9 @@ function saveConfig(data) {
|
|
|
34892
34892
|
}
|
|
34893
34893
|
return next;
|
|
34894
34894
|
}
|
|
34895
|
+
var serverOverride = "";
|
|
34895
34896
|
function resolveServer(cfg = loadConfig()) {
|
|
34896
|
-
return (process.env.LATENTCODE_ADS_SERVER || cfg.server || process.env.ADS_SERVER || DEFAULT_SERVER).replace(/\/+$/, "");
|
|
34897
|
+
return (process.env.LATENTCODE_ADS_SERVER || serverOverride || cfg.server || process.env.ADS_SERVER || DEFAULT_SERVER).replace(/\/+$/, "");
|
|
34897
34898
|
}
|
|
34898
34899
|
function resolveWallet(cfg = loadConfig()) {
|
|
34899
34900
|
const w = cfg.wallet || process.env.ADS_WALLET || "";
|
|
@@ -35359,6 +35360,7 @@ var AdController = class {
|
|
|
35359
35360
|
rotateMs: opts.rotateMs ?? ROTATE_MS,
|
|
35360
35361
|
holdMs: opts.holdMs ?? HOLD_MS,
|
|
35361
35362
|
activeMs: opts.activeMs ?? ACTIVE_MS,
|
|
35363
|
+
visible: opts.visible ?? (() => true),
|
|
35362
35364
|
classify: opts.classify ?? ((p, cwd2) => classifyPrompt(p, cwd2))
|
|
35363
35365
|
};
|
|
35364
35366
|
opts.focus.onChange(() => this.emit());
|
|
@@ -35423,7 +35425,7 @@ var AdController = class {
|
|
|
35423
35425
|
this.emit();
|
|
35424
35426
|
}
|
|
35425
35427
|
attentive(now) {
|
|
35426
|
-
return this.o.focus.focused && (this.working || now - this.lastActivity < this.o.activeMs);
|
|
35428
|
+
return this.o.visible() && this.o.focus.focused && (this.working || now - this.lastActivity < this.o.activeMs);
|
|
35427
35429
|
}
|
|
35428
35430
|
/** An un-billed ad that may still be shown and billed. */
|
|
35429
35431
|
holding() {
|
|
@@ -35779,19 +35781,26 @@ function credits(balanceUsd, bonus) {
|
|
|
35779
35781
|
|
|
35780
35782
|
// src/ui/theme.ts
|
|
35781
35783
|
var C = {
|
|
35782
|
-
|
|
35783
|
-
|
|
35784
|
-
|
|
35785
|
-
|
|
35786
|
-
|
|
35787
|
-
|
|
35788
|
-
|
|
35789
|
-
|
|
35790
|
-
|
|
35791
|
-
|
|
35792
|
-
|
|
35793
|
-
|
|
35794
|
-
|
|
35784
|
+
/** Structure: frames, spinner, headings, LATENT in the wordmark (dashboard --accent). */
|
|
35785
|
+
accent: "#63A9FF",
|
|
35786
|
+
/** Ember accent: CODE in the wordmark, CTAs, the selected row (--ember-500). */
|
|
35787
|
+
accent2: "#FF8A3D",
|
|
35788
|
+
text: "#E2EDFF",
|
|
35789
|
+
muted: "#A3B5D3",
|
|
35790
|
+
faint: "#6E82A6",
|
|
35791
|
+
border: "#2C4673",
|
|
35792
|
+
/** --live */
|
|
35793
|
+
ok: "#4EE59A",
|
|
35794
|
+
/** --warn */
|
|
35795
|
+
warn: "#FFC56B",
|
|
35796
|
+
/** --danger */
|
|
35797
|
+
err: "#FF7A85",
|
|
35798
|
+
/** Money coming in and progress are ember (--ember-300). */
|
|
35799
|
+
earn: "#FFB270",
|
|
35800
|
+
add: "#4EE59A",
|
|
35801
|
+
del: "#FF7A85",
|
|
35802
|
+
/** --glow */
|
|
35803
|
+
code: "#8CC4FF"
|
|
35795
35804
|
};
|
|
35796
35805
|
var G = {
|
|
35797
35806
|
prompt: "\u276F",
|
|
@@ -36083,7 +36092,7 @@ async function boot(args, focus, report) {
|
|
|
36083
36092
|
enabled: () => loadConfig().sync !== false,
|
|
36084
36093
|
lastHash: fileHashStore(),
|
|
36085
36094
|
collect: async () => buildSyncState({
|
|
36086
|
-
appVersion: true ? "0.1.0-alpha.
|
|
36095
|
+
appVersion: true ? "0.1.0-alpha.13" : "",
|
|
36087
36096
|
engineVersion,
|
|
36088
36097
|
model: await engine.defaultModel().then((m) => m ? `${m.providerID}/${m.id}` : session.key),
|
|
36089
36098
|
catalog: await engine.catalog(),
|
|
@@ -36111,7 +36120,7 @@ function firstLine(e) {
|
|
|
36111
36120
|
}
|
|
36112
36121
|
|
|
36113
36122
|
// src/ui/App.tsx
|
|
36114
|
-
var
|
|
36123
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
36115
36124
|
import { homedir as homedir4 } from "node:os";
|
|
36116
36125
|
|
|
36117
36126
|
// src/util/open.ts
|
|
@@ -36127,6 +36136,38 @@ function openUrl(url) {
|
|
|
36127
36136
|
}
|
|
36128
36137
|
}
|
|
36129
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
|
+
|
|
36130
36171
|
// src/engine/session.ts
|
|
36131
36172
|
function initialState(sessionID, model = "") {
|
|
36132
36173
|
return {
|
|
@@ -36345,18 +36386,11 @@ function reduce(state, ev, now = Date.now()) {
|
|
|
36345
36386
|
}
|
|
36346
36387
|
}
|
|
36347
36388
|
|
|
36348
|
-
// src/
|
|
36349
|
-
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
36350
|
-
var fmtTok = (n) => n >= 1e3 ? `${(n / 1e3).toFixed(1)}k` : String(n);
|
|
36351
|
-
var fmtUsd2 = (n) => `$${n.toFixed(n !== 0 && Math.abs(n) < 0.01 ? 4 : 2)}`;
|
|
36352
|
-
var fmtCredits = (n) => `${n.toFixed(n !== 0 && Math.abs(n) < 0.01 ? 4 : 3)} cr`;
|
|
36353
|
-
function Rule({ width }) {
|
|
36354
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: C.border, children: "\u2500".repeat(Math.max(0, width)) });
|
|
36355
|
-
}
|
|
36389
|
+
// src/ads/verdict.ts
|
|
36356
36390
|
function verdictLabel(v) {
|
|
36357
36391
|
switch (v) {
|
|
36358
36392
|
case "tracked":
|
|
36359
|
-
return { text:
|
|
36393
|
+
return { text: "\u2713 view counted", tone: "ok" };
|
|
36360
36394
|
case "unearned":
|
|
36361
36395
|
return { text: "view not paid on this device", tone: "warn" };
|
|
36362
36396
|
case "skipped":
|
|
@@ -36367,6 +36401,15 @@ function verdictLabel(v) {
|
|
|
36367
36401
|
return { text: "counting view\u2026", tone: "faint" };
|
|
36368
36402
|
}
|
|
36369
36403
|
}
|
|
36404
|
+
|
|
36405
|
+
// src/ui/StatusPanel.tsx
|
|
36406
|
+
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
36407
|
+
var fmtTok = (n) => n >= 1e3 ? `${(n / 1e3).toFixed(1)}k` : String(n);
|
|
36408
|
+
var fmtUsd2 = (n) => `$${n.toFixed(n !== 0 && Math.abs(n) < 0.01 ? 4 : 2)}`;
|
|
36409
|
+
var fmtCredits = (n) => `${n.toFixed(n !== 0 && Math.abs(n) < 0.01 ? 4 : 3)} cr`;
|
|
36410
|
+
function Rule({ width }) {
|
|
36411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: C.border, children: "\u2500".repeat(Math.max(0, width)) });
|
|
36412
|
+
}
|
|
36370
36413
|
function Progress({ ms, of, billed, verdict }) {
|
|
36371
36414
|
if (billed) {
|
|
36372
36415
|
const l = verdictLabel(verdict);
|
|
@@ -36454,10 +36497,10 @@ function StatusPanel(p) {
|
|
|
36454
36497
|
const ctaLen = cta ? cta.length + 8 : 0;
|
|
36455
36498
|
const brand = ad.title || ad.body;
|
|
36456
36499
|
const rest = ad.title && ad.body ? ` \u2014 ${ad.body}` : "";
|
|
36457
|
-
const
|
|
36500
|
+
const copyText2 = clip(brand + rest, Math.max(10, inner - 4 - ctaLen));
|
|
36458
36501
|
const copy = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
|
|
36459
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { bold: true, underline: !!ad.link && p.osc8Links, children:
|
|
36460
|
-
/* @__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) })
|
|
36461
36504
|
] });
|
|
36462
36505
|
body = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
36463
36506
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { justifyContent: "space-between", children: [
|
|
@@ -36502,39 +36545,8 @@ function StatusPanel(p) {
|
|
|
36502
36545
|
] });
|
|
36503
36546
|
}
|
|
36504
36547
|
|
|
36505
|
-
// src/
|
|
36506
|
-
var
|
|
36507
|
-
var OVERFLOW_FALLBACKS = ["claude-sonnet-5-5", "claude-opus-5-5", "z-ai-glm-5-3", "qwen3-coder-480b-a35b-instruct-turbo"];
|
|
36508
|
-
var compact = (s2) => s2.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
36509
|
-
function bareId(key) {
|
|
36510
|
-
const i = key.indexOf("/");
|
|
36511
|
-
return i >= 0 ? key.slice(i + 1) : key;
|
|
36512
|
-
}
|
|
36513
|
-
function overflowTarget(failedKey, catalog) {
|
|
36514
|
-
const latent = catalog.models.filter((m) => m.providerID === LATENT_ID);
|
|
36515
|
-
if (!latent.length) return null;
|
|
36516
|
-
const failed = catalog.models.find((m) => m.key === failedKey);
|
|
36517
|
-
const wants = [compact(bareId(bareId(failedKey))), failed ? compact(failed.name) : ""].filter((w) => w.length >= 3);
|
|
36518
|
-
for (const w of wants) {
|
|
36519
|
-
const exact = latent.find((m) => compact(m.id) === w || compact(m.name) === w);
|
|
36520
|
-
if (exact) return exact;
|
|
36521
|
-
}
|
|
36522
|
-
for (const w of wants) {
|
|
36523
|
-
const near = latent.filter((m) => compact(m.id).includes(w) || compact(m.name).includes(w)).sort((a2, b) => a2.id.length - b.id.length);
|
|
36524
|
-
if (near[0]) return near[0];
|
|
36525
|
-
}
|
|
36526
|
-
for (const id of OVERFLOW_FALLBACKS) {
|
|
36527
|
-
const m = latent.find((x) => x.id === id);
|
|
36528
|
-
if (m) return m;
|
|
36529
|
-
}
|
|
36530
|
-
return latent[0];
|
|
36531
|
-
}
|
|
36532
|
-
function overflowOffer(model, verdict, catalog, balance, offered) {
|
|
36533
|
-
if (verdict.status !== "rate-limited" || !model || model.startsWith(`${LATENT_ID}/`)) return null;
|
|
36534
|
-
if (balance === null || balance < OVERFLOW_MIN_CREDITS || offered.has(model)) return null;
|
|
36535
|
-
const to = overflowTarget(model, catalog);
|
|
36536
|
-
return to ? { from: model, to, credits: balance } : null;
|
|
36537
|
-
}
|
|
36548
|
+
// src/ui/AdCard.tsx
|
|
36549
|
+
var import_react23 = __toESM(require_react(), 1);
|
|
36538
36550
|
|
|
36539
36551
|
// src/ui/components.tsx
|
|
36540
36552
|
var import_react22 = __toESM(require_react(), 1);
|
|
@@ -36935,6 +36947,88 @@ function padStart(s2, n) {
|
|
|
36935
36947
|
return s2.length > n ? s2.slice(0, n) : s2.padStart(n);
|
|
36936
36948
|
}
|
|
36937
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
|
+
|
|
36938
37032
|
// src/ui/commands.ts
|
|
36939
37033
|
var COMMANDS = [
|
|
36940
37034
|
{ name: "model", args: "[name]", desc: "Switch model \u2014 search, filter by provider, set effort", group: "Models", aliases: ["models"] },
|
|
@@ -36969,7 +37063,7 @@ function parseCommandLine(line) {
|
|
|
36969
37063
|
}
|
|
36970
37064
|
|
|
36971
37065
|
// src/ui/Transcript.tsx
|
|
36972
|
-
var
|
|
37066
|
+
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
|
36973
37067
|
function lastLines(text, n) {
|
|
36974
37068
|
const lines = text.trimEnd().split("\n");
|
|
36975
37069
|
return lines.length <= n ? lines.join("\n") : lines.slice(-n).join("\n");
|
|
@@ -37024,55 +37118,55 @@ function ToolView({ item, cwd: cwd2, width }) {
|
|
|
37024
37118
|
const diff2 = item.diff ? parseDiff(item.diff) : null;
|
|
37025
37119
|
const showOutput = item.output && (failed || !QUIET.has(item.name)) && !diff2;
|
|
37026
37120
|
const out = showOutput ? firstLines(item.output, failed ? 8 : 6) : null;
|
|
37027
|
-
return /* @__PURE__ */ (0,
|
|
37028
|
-
/* @__PURE__ */ (0,
|
|
37029
|
-
running ? /* @__PURE__ */ (0,
|
|
37030
|
-
/* @__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: [
|
|
37031
37125
|
" ",
|
|
37032
37126
|
t.verb
|
|
37033
37127
|
] }),
|
|
37034
|
-
/* @__PURE__ */ (0,
|
|
37128
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
|
|
37035
37129
|
" ",
|
|
37036
37130
|
clip(t.target, Math.max(20, width - t.verb.length - 24))
|
|
37037
37131
|
] }),
|
|
37038
|
-
t.extra ? /* @__PURE__ */ (0,
|
|
37132
|
+
t.extra ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.faint, children: [
|
|
37039
37133
|
" ",
|
|
37040
37134
|
t.extra
|
|
37041
37135
|
] }) : null,
|
|
37042
|
-
item.additions || item.deletions ? /* @__PURE__ */ (0,
|
|
37043
|
-
/* @__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: [
|
|
37044
37138
|
" +",
|
|
37045
37139
|
item.additions ?? 0
|
|
37046
37140
|
] }),
|
|
37047
|
-
/* @__PURE__ */ (0,
|
|
37141
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.del, children: [
|
|
37048
37142
|
" \u2212",
|
|
37049
37143
|
item.deletions ?? 0
|
|
37050
37144
|
] })
|
|
37051
37145
|
] }) : null,
|
|
37052
|
-
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: [
|
|
37053
37147
|
" \xB7 ",
|
|
37054
37148
|
fmtDuration(item.ms)
|
|
37055
37149
|
] }) : null
|
|
37056
37150
|
] }),
|
|
37057
|
-
diff2 && diff2.lines.length ? /* @__PURE__ */ (0,
|
|
37058
|
-
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: [
|
|
37059
37153
|
l.t === "add" ? "+ " : l.t === "del" ? "\u2212 " : l.t === "hunk" ? "" : " ",
|
|
37060
37154
|
l.t === "hunk" ? "\u22EF" : l.text
|
|
37061
37155
|
] }, i)),
|
|
37062
|
-
diff2.more ? /* @__PURE__ */ (0,
|
|
37156
|
+
diff2.more ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: C.faint, children: [
|
|
37063
37157
|
"\u2026 ",
|
|
37064
37158
|
diff2.more,
|
|
37065
37159
|
" more lines"
|
|
37066
37160
|
] }) : null
|
|
37067
37161
|
] }) : null,
|
|
37068
|
-
out ? /* @__PURE__ */ (0,
|
|
37069
|
-
/* @__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: [
|
|
37070
37164
|
G.elbow,
|
|
37071
37165
|
" "
|
|
37072
37166
|
] }) }),
|
|
37073
|
-
/* @__PURE__ */ (0,
|
|
37074
|
-
/* @__PURE__ */ (0,
|
|
37075
|
-
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: [
|
|
37076
37170
|
"\u2026 ",
|
|
37077
37171
|
out.more,
|
|
37078
37172
|
" more lines"
|
|
@@ -37086,25 +37180,25 @@ var NOTICE_MARK = { info: G.bullet, ok: G.ok, warn: G.warn, error: G.no };
|
|
|
37086
37180
|
function ItemView({ item, live, cwd: cwd2, width, maxLines }) {
|
|
37087
37181
|
switch (item.kind) {
|
|
37088
37182
|
case "user":
|
|
37089
|
-
return /* @__PURE__ */ (0,
|
|
37090
|
-
/* @__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: [
|
|
37091
37185
|
G.prompt,
|
|
37092
37186
|
" "
|
|
37093
37187
|
] }) }),
|
|
37094
|
-
/* @__PURE__ */ (0,
|
|
37188
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, children: item.text })
|
|
37095
37189
|
] });
|
|
37096
37190
|
case "reasoning": {
|
|
37097
37191
|
const text = item.text.trim();
|
|
37098
37192
|
if (!text) return null;
|
|
37099
37193
|
const shown = live ? lastLines(text, 4) : firstLines(text, 2);
|
|
37100
|
-
return /* @__PURE__ */ (0,
|
|
37101
|
-
/* @__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: [
|
|
37102
37196
|
G.thin,
|
|
37103
37197
|
" "
|
|
37104
37198
|
] }) }),
|
|
37105
|
-
/* @__PURE__ */ (0,
|
|
37106
|
-
/* @__PURE__ */ (0,
|
|
37107
|
-
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: [
|
|
37108
37202
|
"\u2026 thought for ",
|
|
37109
37203
|
shown.more,
|
|
37110
37204
|
" more lines"
|
|
@@ -37113,25 +37207,25 @@ function ItemView({ item, live, cwd: cwd2, width, maxLines }) {
|
|
|
37113
37207
|
] });
|
|
37114
37208
|
}
|
|
37115
37209
|
case "text":
|
|
37116
|
-
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 }) });
|
|
37117
37211
|
case "tool":
|
|
37118
|
-
return /* @__PURE__ */ (0,
|
|
37212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ToolView, { item, cwd: cwd2, width });
|
|
37119
37213
|
case "error":
|
|
37120
|
-
return /* @__PURE__ */ (0,
|
|
37121
|
-
/* @__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: [
|
|
37122
37216
|
G.no,
|
|
37123
37217
|
" "
|
|
37124
37218
|
] }) }),
|
|
37125
|
-
/* @__PURE__ */ (0,
|
|
37219
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: C.err, wrap: "wrap", children: item.text })
|
|
37126
37220
|
] });
|
|
37127
37221
|
case "notice": {
|
|
37128
37222
|
const tone = item.tone ?? "info";
|
|
37129
|
-
return /* @__PURE__ */ (0,
|
|
37130
|
-
/* @__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: [
|
|
37131
37225
|
NOTICE_MARK[tone],
|
|
37132
37226
|
" "
|
|
37133
37227
|
] }) }),
|
|
37134
|
-
/* @__PURE__ */ (0,
|
|
37228
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: tone === "info" ? C.muted : NOTICE_COLOR[tone], wrap: "wrap", children: item.text })
|
|
37135
37229
|
] });
|
|
37136
37230
|
}
|
|
37137
37231
|
}
|
|
@@ -37145,19 +37239,19 @@ function PermissionPrompt({ perm, selected, cwd: cwd2, width }) {
|
|
|
37145
37239
|
const options = ["Allow once", "Always allow", "Reject"];
|
|
37146
37240
|
const keys = ["y", "a", "n"];
|
|
37147
37241
|
const what = perm.resources.map((r) => relPath(r, cwd2)).join(", ") || perm.message || "";
|
|
37148
|
-
return /* @__PURE__ */ (0,
|
|
37149
|
-
/* @__PURE__ */ (0,
|
|
37150
|
-
/* @__PURE__ */ (0,
|
|
37151
|
-
/* @__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 })
|
|
37152
37246
|
] }),
|
|
37153
|
-
/* @__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: [
|
|
37154
37248
|
perm.action === "shell" ? "$ " : "",
|
|
37155
37249
|
clip(what, 600)
|
|
37156
37250
|
] }) }),
|
|
37157
|
-
/* @__PURE__ */ (0,
|
|
37251
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: options.map((o, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
|
|
37158
37252
|
i ? " " : "",
|
|
37159
|
-
/* @__PURE__ */ (0,
|
|
37160
|
-
/* @__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: [
|
|
37161
37255
|
" ",
|
|
37162
37256
|
keys[i]
|
|
37163
37257
|
] })
|
|
@@ -37166,32 +37260,32 @@ function PermissionPrompt({ perm, selected, cwd: cwd2, width }) {
|
|
|
37166
37260
|
}
|
|
37167
37261
|
|
|
37168
37262
|
// src/ui/panels/ModelPicker.tsx
|
|
37169
|
-
var
|
|
37170
|
-
var
|
|
37263
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
37264
|
+
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
37171
37265
|
function Mark({ status: status2, testing }) {
|
|
37172
|
-
if (testing) return /* @__PURE__ */ (0,
|
|
37266
|
+
if (testing) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Spinner, {});
|
|
37173
37267
|
switch (status2) {
|
|
37174
37268
|
case "ok":
|
|
37175
|
-
return /* @__PURE__ */ (0,
|
|
37269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.ok, children: G.ok });
|
|
37176
37270
|
case "unsupported":
|
|
37177
|
-
return /* @__PURE__ */ (0,
|
|
37271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.err, children: G.no });
|
|
37178
37272
|
case "rate-limited":
|
|
37179
|
-
return /* @__PURE__ */ (0,
|
|
37273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.warn, children: G.wait });
|
|
37180
37274
|
case "auth":
|
|
37181
|
-
return /* @__PURE__ */ (0,
|
|
37275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.warn, children: G.key });
|
|
37182
37276
|
case "error":
|
|
37183
|
-
return /* @__PURE__ */ (0,
|
|
37277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.err, children: G.warn });
|
|
37184
37278
|
default:
|
|
37185
|
-
return /* @__PURE__ */ (0,
|
|
37279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: C.faint, children: "\xB7" });
|
|
37186
37280
|
}
|
|
37187
37281
|
}
|
|
37188
37282
|
function ModelPicker(p) {
|
|
37189
|
-
const tabs = (0,
|
|
37190
|
-
const [tab2, setTab] = (0,
|
|
37191
|
-
const [sel, setSel] = (0,
|
|
37192
|
-
const [variantIdx, setVariantIdx] = (0,
|
|
37193
|
-
const [testing, setTesting] = (0,
|
|
37194
|
-
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);
|
|
37195
37289
|
const field = useLineField({
|
|
37196
37290
|
initial: p.query,
|
|
37197
37291
|
onChange: () => {
|
|
@@ -37244,7 +37338,7 @@ function ModelPicker(p) {
|
|
|
37244
37338
|
}
|
|
37245
37339
|
});
|
|
37246
37340
|
const provider = tabs[tab2];
|
|
37247
|
-
const rows = (0,
|
|
37341
|
+
const rows = (0, import_react24.useMemo)(
|
|
37248
37342
|
() => pickerRows(p.catalog, field.text, { provider, status: p.status, current: p.current }),
|
|
37249
37343
|
// `testing` changes when a verdict lands, which reorders the list.
|
|
37250
37344
|
[p.catalog, field.text, provider, p.current, testing]
|
|
@@ -37271,14 +37365,14 @@ function ModelPicker(p) {
|
|
|
37271
37365
|
const wId = Math.max(0, rest - wName);
|
|
37272
37366
|
const kindOf = (id) => p.catalog.providers.find((x) => x.id === id)?.kind ?? "unknown";
|
|
37273
37367
|
const verified = p.catalog.models.filter((m) => p.status(m.key) === "ok").length;
|
|
37274
|
-
return /* @__PURE__ */ (0,
|
|
37368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
37275
37369
|
Panel,
|
|
37276
37370
|
{
|
|
37277
37371
|
title: "Models",
|
|
37278
37372
|
right: `${p.catalog.models.length} models \xB7 ${verified} verified with your account`,
|
|
37279
37373
|
width: p.width,
|
|
37280
37374
|
color: C.accent,
|
|
37281
|
-
footer: /* @__PURE__ */ (0,
|
|
37375
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
37282
37376
|
Hints,
|
|
37283
37377
|
{
|
|
37284
37378
|
items: [
|
|
@@ -37292,36 +37386,36 @@ function ModelPicker(p) {
|
|
|
37292
37386
|
}
|
|
37293
37387
|
),
|
|
37294
37388
|
children: [
|
|
37295
|
-
/* @__PURE__ */ (0,
|
|
37296
|
-
/* @__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: [
|
|
37297
37391
|
G.search,
|
|
37298
37392
|
" "
|
|
37299
37393
|
] }),
|
|
37300
|
-
/* @__PURE__ */ (0,
|
|
37394
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FieldText, { state: field.state, placeholder: "type to search \u2014 name, id or provider" })
|
|
37301
37395
|
] }),
|
|
37302
|
-
/* @__PURE__ */ (0,
|
|
37396
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginTop: 1, flexWrap: "wrap", children: tabs.map((id, i) => {
|
|
37303
37397
|
const prov = p.catalog.providers.find((x) => x.id === id);
|
|
37304
37398
|
const text = prov ? `${prov.name} ${prov.models}` : `All ${p.catalog.models.length}`;
|
|
37305
|
-
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");
|
|
37306
37400
|
}) }),
|
|
37307
|
-
/* @__PURE__ */ (0,
|
|
37308
|
-
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: [
|
|
37309
37403
|
" ",
|
|
37310
37404
|
G.up,
|
|
37311
37405
|
" ",
|
|
37312
37406
|
above,
|
|
37313
37407
|
" more"
|
|
37314
37408
|
] }) : null,
|
|
37315
|
-
shown.length === 0 ? /* @__PURE__ */ (0,
|
|
37409
|
+
shown.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: C.muted, children: [
|
|
37316
37410
|
" No model matches \u201C",
|
|
37317
37411
|
field.text,
|
|
37318
37412
|
"\u201D."
|
|
37319
37413
|
] }) : null,
|
|
37320
37414
|
shown.map((r, i) => {
|
|
37321
37415
|
if (r.t === "head") {
|
|
37322
|
-
return /* @__PURE__ */ (0,
|
|
37323
|
-
/* @__PURE__ */ (0,
|
|
37324
|
-
/* @__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: [
|
|
37325
37419
|
" ",
|
|
37326
37420
|
r.hint
|
|
37327
37421
|
] })
|
|
@@ -37332,33 +37426,33 @@ function ModelPicker(p) {
|
|
|
37332
37426
|
const st = p.status(m.key);
|
|
37333
37427
|
const dead = st === "unsupported";
|
|
37334
37428
|
const note = m.key === p.current ? "current" : st === "unsupported" ? "not on your plan" : st !== "unknown" && st !== "ok" ? label(st) : "";
|
|
37335
|
-
return /* @__PURE__ */ (0,
|
|
37336
|
-
/* @__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: [
|
|
37337
37431
|
on2 ? G.prompt : " ",
|
|
37338
37432
|
" "
|
|
37339
37433
|
] }),
|
|
37340
|
-
/* @__PURE__ */ (0,
|
|
37341
|
-
/* @__PURE__ */ (0,
|
|
37342
|
-
/* @__PURE__ */ (0,
|
|
37343
|
-
/* @__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: [
|
|
37344
37438
|
" ",
|
|
37345
37439
|
pad(field.text || !provider ? m.key : m.id, wId)
|
|
37346
37440
|
] }),
|
|
37347
|
-
/* @__PURE__ */ (0,
|
|
37441
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: C.muted, children: [
|
|
37348
37442
|
" ",
|
|
37349
37443
|
padStart(fmtContext(m.context), wCtx)
|
|
37350
37444
|
] }),
|
|
37351
|
-
/* @__PURE__ */ (0,
|
|
37445
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: m.costIn === 0 && m.costOut === 0 ? C.ok : C.muted, children: [
|
|
37352
37446
|
" ",
|
|
37353
37447
|
padStart(fmtPrice(m, kindOf(m.providerID)), wPrice)
|
|
37354
37448
|
] }),
|
|
37355
|
-
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: [
|
|
37356
37450
|
" ",
|
|
37357
37451
|
note
|
|
37358
37452
|
] }) : null
|
|
37359
37453
|
] }, m.key);
|
|
37360
37454
|
}),
|
|
37361
|
-
below ? /* @__PURE__ */ (0,
|
|
37455
|
+
below ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: C.faint, children: [
|
|
37362
37456
|
" ",
|
|
37363
37457
|
G.down,
|
|
37364
37458
|
" ",
|
|
@@ -37366,13 +37460,13 @@ function ModelPicker(p) {
|
|
|
37366
37460
|
" more"
|
|
37367
37461
|
] }) : null
|
|
37368
37462
|
] }),
|
|
37369
|
-
chosen ? /* @__PURE__ */ (0,
|
|
37370
|
-
/* @__PURE__ */ (0,
|
|
37371
|
-
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: [
|
|
37372
37466
|
i === effortAt ? `\u2039 ${e} \u203A` : e,
|
|
37373
37467
|
i < efforts.length - 1 ? " " : ""
|
|
37374
|
-
] }, e)) : /* @__PURE__ */ (0,
|
|
37375
|
-
/* @__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)" })
|
|
37376
37470
|
] }) }) : null
|
|
37377
37471
|
]
|
|
37378
37472
|
}
|
|
@@ -37380,8 +37474,8 @@ function ModelPicker(p) {
|
|
|
37380
37474
|
}
|
|
37381
37475
|
|
|
37382
37476
|
// src/ui/panels/ProviderPanel.tsx
|
|
37383
|
-
var
|
|
37384
|
-
var
|
|
37477
|
+
var import_react25 = __toESM(require_react(), 1);
|
|
37478
|
+
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
|
|
37385
37479
|
var usable = (i) => i.methods.filter((m) => m.type === "key" || m.type === "oauth" || m.type === "external");
|
|
37386
37480
|
var needsForm = (m) => "form" in m && Array.isArray(m.form) && m.form.some((f) => !f.hidden && f.required);
|
|
37387
37481
|
var methodLabel = (m) => m.type === "key" ? m.label || "API key" : m.label;
|
|
@@ -37391,10 +37485,10 @@ function errText(e) {
|
|
|
37391
37485
|
return m ? m[1] : s2;
|
|
37392
37486
|
}
|
|
37393
37487
|
function ProviderPanel(p) {
|
|
37394
|
-
const [view, setView] = (0,
|
|
37395
|
-
const [integrations, setIntegrations] = (0,
|
|
37396
|
-
const [error, setError] = (0,
|
|
37397
|
-
(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)(() => {
|
|
37398
37492
|
let live = true;
|
|
37399
37493
|
p.engine.integrations().then((list2) => live && setIntegrations(list2)).catch((e) => live && setError(errText(e)));
|
|
37400
37494
|
return () => {
|
|
@@ -37436,7 +37530,7 @@ function ProviderPanel(p) {
|
|
|
37436
37530
|
const common = { width: p.width, color: C.accent };
|
|
37437
37531
|
switch (view.v) {
|
|
37438
37532
|
case "list":
|
|
37439
|
-
return /* @__PURE__ */ (0,
|
|
37533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37440
37534
|
ProviderList,
|
|
37441
37535
|
{
|
|
37442
37536
|
...p,
|
|
@@ -37445,7 +37539,7 @@ function ProviderPanel(p) {
|
|
|
37445
37539
|
}
|
|
37446
37540
|
);
|
|
37447
37541
|
case "pick":
|
|
37448
|
-
return /* @__PURE__ */ (0,
|
|
37542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37449
37543
|
IntegrationPicker,
|
|
37450
37544
|
{
|
|
37451
37545
|
...common,
|
|
@@ -37460,13 +37554,13 @@ function ProviderPanel(p) {
|
|
|
37460
37554
|
}
|
|
37461
37555
|
);
|
|
37462
37556
|
case "connecting":
|
|
37463
|
-
return /* @__PURE__ */ (0,
|
|
37464
|
-
/* @__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, {}),
|
|
37465
37559
|
" ",
|
|
37466
|
-
/* @__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" })
|
|
37467
37561
|
] }) }) });
|
|
37468
37562
|
case "custom":
|
|
37469
|
-
return /* @__PURE__ */ (0,
|
|
37563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37470
37564
|
CustomProviderForm,
|
|
37471
37565
|
{
|
|
37472
37566
|
...common,
|
|
@@ -37477,7 +37571,7 @@ function ProviderPanel(p) {
|
|
|
37477
37571
|
}
|
|
37478
37572
|
);
|
|
37479
37573
|
case "method":
|
|
37480
|
-
return /* @__PURE__ */ (0,
|
|
37574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37481
37575
|
MethodPicker,
|
|
37482
37576
|
{
|
|
37483
37577
|
...common,
|
|
@@ -37488,7 +37582,7 @@ function ProviderPanel(p) {
|
|
|
37488
37582
|
}
|
|
37489
37583
|
);
|
|
37490
37584
|
case "key":
|
|
37491
|
-
return /* @__PURE__ */ (0,
|
|
37585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37492
37586
|
KeyEntry,
|
|
37493
37587
|
{
|
|
37494
37588
|
...common,
|
|
@@ -37499,7 +37593,7 @@ function ProviderPanel(p) {
|
|
|
37499
37593
|
}
|
|
37500
37594
|
);
|
|
37501
37595
|
case "oauth":
|
|
37502
|
-
return /* @__PURE__ */ (0,
|
|
37596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37503
37597
|
OAuthFlow,
|
|
37504
37598
|
{
|
|
37505
37599
|
...common,
|
|
@@ -37511,11 +37605,11 @@ function ProviderPanel(p) {
|
|
|
37511
37605
|
}
|
|
37512
37606
|
);
|
|
37513
37607
|
case "done":
|
|
37514
|
-
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("") });
|
|
37515
37609
|
}
|
|
37516
37610
|
}
|
|
37517
37611
|
function ProviderList(p) {
|
|
37518
|
-
const [sel, setSel] = (0,
|
|
37612
|
+
const [sel, setSel] = (0, import_react25.useState)(0);
|
|
37519
37613
|
const items = p.catalog.providers;
|
|
37520
37614
|
const count = items.length + 1;
|
|
37521
37615
|
use_input_default((ch, key) => {
|
|
@@ -37532,39 +37626,39 @@ function ProviderList(p) {
|
|
|
37532
37626
|
const inner = p.width - 4;
|
|
37533
37627
|
const wName = Math.min(24, Math.max(12, ...items.map((x) => x.name.length)) + 1);
|
|
37534
37628
|
const wVia = Math.min(26, Math.max(10, ...items.map((x) => x.via.length)) + 1);
|
|
37535
|
-
return /* @__PURE__ */ (0,
|
|
37629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
37536
37630
|
Panel,
|
|
37537
37631
|
{
|
|
37538
37632
|
title: "Providers",
|
|
37539
37633
|
right: `${items.length} connected \xB7 ${p.catalog.models.length} models`,
|
|
37540
37634
|
width: p.width,
|
|
37541
37635
|
color: C.accent,
|
|
37542
|
-
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"]] }),
|
|
37543
37637
|
children: [
|
|
37544
|
-
/* @__PURE__ */ (0,
|
|
37638
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
37545
37639
|
items.map((prov, i) => {
|
|
37546
37640
|
const ok = p.catalog.models.filter((m) => m.providerID === prov.id && p.status(m.key) === "ok").length;
|
|
37547
37641
|
const dot = prov.kind === "builtin" ? C.faint : C.ok;
|
|
37548
|
-
return /* @__PURE__ */ (0,
|
|
37549
|
-
/* @__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: [
|
|
37550
37644
|
i === sel ? G.prompt : " ",
|
|
37551
37645
|
" "
|
|
37552
37646
|
] }),
|
|
37553
|
-
/* @__PURE__ */ (0,
|
|
37647
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: dot, children: [
|
|
37554
37648
|
G.dot,
|
|
37555
37649
|
" "
|
|
37556
37650
|
] }),
|
|
37557
|
-
/* @__PURE__ */ (0,
|
|
37558
|
-
/* @__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: [
|
|
37559
37653
|
" ",
|
|
37560
37654
|
pad(prov.via, wVia)
|
|
37561
37655
|
] }),
|
|
37562
|
-
/* @__PURE__ */ (0,
|
|
37656
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.muted, children: [
|
|
37563
37657
|
" ",
|
|
37564
37658
|
String(prov.models).padStart(3),
|
|
37565
37659
|
" models"
|
|
37566
37660
|
] }),
|
|
37567
|
-
ok ? /* @__PURE__ */ (0,
|
|
37661
|
+
ok ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.ok, children: [
|
|
37568
37662
|
" ",
|
|
37569
37663
|
G.ok,
|
|
37570
37664
|
" ",
|
|
@@ -37573,23 +37667,23 @@ function ProviderList(p) {
|
|
|
37573
37667
|
] }) : null
|
|
37574
37668
|
] }, prov.id);
|
|
37575
37669
|
}),
|
|
37576
|
-
/* @__PURE__ */ (0,
|
|
37577
|
-
/* @__PURE__ */ (0,
|
|
37670
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
|
|
37671
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.accent, children: [
|
|
37578
37672
|
sel === items.length ? G.prompt : " ",
|
|
37579
37673
|
" "
|
|
37580
37674
|
] }),
|
|
37581
|
-
/* @__PURE__ */ (0,
|
|
37675
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.accent2, bold: sel === items.length, children: "+ Connect a provider\u2026" })
|
|
37582
37676
|
] })
|
|
37583
37677
|
] }),
|
|
37584
|
-
/* @__PURE__ */ (0,
|
|
37585
|
-
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
|
|
37586
37680
|
]
|
|
37587
37681
|
}
|
|
37588
37682
|
);
|
|
37589
37683
|
}
|
|
37590
37684
|
var clipTo = (s2, n) => s2.length > n ? s2.slice(0, n - 1) + "\u2026" : s2;
|
|
37591
37685
|
function IntegrationPicker(p) {
|
|
37592
|
-
const [sel, setSel] = (0,
|
|
37686
|
+
const [sel, setSel] = (0, import_react25.useState)(0);
|
|
37593
37687
|
const field = useLineField({
|
|
37594
37688
|
initial: p.query,
|
|
37595
37689
|
onChange: () => setSel(0),
|
|
@@ -37610,38 +37704,38 @@ function IntegrationPicker(p) {
|
|
|
37610
37704
|
return false;
|
|
37611
37705
|
}
|
|
37612
37706
|
});
|
|
37613
|
-
const list2 = (0,
|
|
37707
|
+
const list2 = (0, import_react25.useMemo)(() => searchIntegrations(p.integrations ?? [], field.text), [p.integrations, field.text]);
|
|
37614
37708
|
const selected = Math.min(sel, list2.length);
|
|
37615
37709
|
const visible = Math.max(5, Math.min(11, p.rows - 15));
|
|
37616
37710
|
const win = windowAround(list2.length, Math.min(selected, Math.max(0, list2.length - 1)), visible);
|
|
37617
|
-
return /* @__PURE__ */ (0,
|
|
37711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
37618
37712
|
Panel,
|
|
37619
37713
|
{
|
|
37620
37714
|
title: "Connect a provider",
|
|
37621
37715
|
right: p.integrations ? `${list2.length} available` : "",
|
|
37622
37716
|
width: p.width,
|
|
37623
37717
|
color: p.color,
|
|
37624
|
-
footer: /* @__PURE__ */ (0,
|
|
37718
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hints, { items: [["\u2191\u2193", "move"], ["enter", "choose"], ["esc", field.text ? "clear" : "back"]] }),
|
|
37625
37719
|
children: [
|
|
37626
|
-
/* @__PURE__ */ (0,
|
|
37627
|
-
/* @__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: [
|
|
37628
37722
|
G.search,
|
|
37629
37723
|
" "
|
|
37630
37724
|
] }),
|
|
37631
|
-
/* @__PURE__ */ (0,
|
|
37725
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldText, { state: field.state, placeholder: "search \u2014 Anthropic, OpenRouter, Google\u2026" })
|
|
37632
37726
|
] }),
|
|
37633
|
-
/* @__PURE__ */ (0,
|
|
37634
|
-
!p.integrations && !p.error ? /* @__PURE__ */ (0,
|
|
37635
|
-
/* @__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, {}),
|
|
37636
37730
|
" ",
|
|
37637
|
-
/* @__PURE__ */ (0,
|
|
37731
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: "Loading providers\u2026" })
|
|
37638
37732
|
] }) : null,
|
|
37639
|
-
p.integrations && !list2.length ? /* @__PURE__ */ (0,
|
|
37733
|
+
p.integrations && !list2.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.muted, children: [
|
|
37640
37734
|
" Nothing matches \u201C",
|
|
37641
37735
|
field.text,
|
|
37642
37736
|
"\u201D."
|
|
37643
37737
|
] }) : null,
|
|
37644
|
-
win.start > 0 ? /* @__PURE__ */ (0,
|
|
37738
|
+
win.start > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.faint, children: [
|
|
37645
37739
|
" ",
|
|
37646
37740
|
G.up,
|
|
37647
37741
|
" ",
|
|
@@ -37652,47 +37746,47 @@ function IntegrationPicker(p) {
|
|
|
37652
37746
|
const on2 = win.start + i === selected;
|
|
37653
37747
|
const labels = usable(it).map((m) => m.type === "key" ? "API key" : m.label);
|
|
37654
37748
|
const methods = labels.slice(0, 2).join(" \xB7 ") + (labels.length > 2 ? ` +${labels.length - 2}` : "");
|
|
37655
|
-
return /* @__PURE__ */ (0,
|
|
37656
|
-
/* @__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: [
|
|
37657
37751
|
on2 ? G.prompt : " ",
|
|
37658
37752
|
" "
|
|
37659
37753
|
] }),
|
|
37660
|
-
/* @__PURE__ */ (0,
|
|
37661
|
-
/* @__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: [
|
|
37662
37756
|
" ",
|
|
37663
37757
|
methods
|
|
37664
37758
|
] }),
|
|
37665
|
-
p.connected.has(it.id) ? /* @__PURE__ */ (0,
|
|
37759
|
+
p.connected.has(it.id) ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.ok, children: [
|
|
37666
37760
|
" ",
|
|
37667
37761
|
G.ok,
|
|
37668
37762
|
" connected"
|
|
37669
37763
|
] }) : null
|
|
37670
37764
|
] }, it.id);
|
|
37671
37765
|
}),
|
|
37672
|
-
win.end < list2.length ? /* @__PURE__ */ (0,
|
|
37766
|
+
win.end < list2.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: C.faint, children: [
|
|
37673
37767
|
" ",
|
|
37674
37768
|
G.down,
|
|
37675
37769
|
" ",
|
|
37676
37770
|
list2.length - win.end,
|
|
37677
37771
|
" more"
|
|
37678
37772
|
] }) : null,
|
|
37679
|
-
p.integrations ? /* @__PURE__ */ (0,
|
|
37680
|
-
/* @__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: [
|
|
37681
37775
|
selected === list2.length ? G.prompt : " ",
|
|
37682
37776
|
" "
|
|
37683
37777
|
] }),
|
|
37684
|
-
/* @__PURE__ */ (0,
|
|
37685
|
-
/* @__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" })
|
|
37686
37780
|
] }) : null
|
|
37687
37781
|
] }),
|
|
37688
|
-
p.error ? /* @__PURE__ */ (0,
|
|
37782
|
+
p.error ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.err, children: p.error }) : null
|
|
37689
37783
|
]
|
|
37690
37784
|
}
|
|
37691
37785
|
);
|
|
37692
37786
|
}
|
|
37693
37787
|
function MethodPicker(p) {
|
|
37694
37788
|
const methods = usable(p.integration);
|
|
37695
|
-
const [sel, setSel] = (0,
|
|
37789
|
+
const [sel, setSel] = (0, import_react25.useState)(0);
|
|
37696
37790
|
use_input_default((_ch, key) => {
|
|
37697
37791
|
if (key.escape) return p.onBack();
|
|
37698
37792
|
if (key.upArrow) return setSel((s2) => (s2 + methods.length - 1) % methods.length);
|
|
@@ -37701,38 +37795,38 @@ function MethodPicker(p) {
|
|
|
37701
37795
|
});
|
|
37702
37796
|
const wLabel = Math.min(40, Math.max(...methods.map((m) => methodLabel(m).length)) + 2);
|
|
37703
37797
|
const env3 = p.integration.methods.find((m) => m.type === "env");
|
|
37704
|
-
return /* @__PURE__ */ (0,
|
|
37798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
37705
37799
|
Panel,
|
|
37706
37800
|
{
|
|
37707
37801
|
title: `Connect ${p.integration.name}`,
|
|
37708
37802
|
width: p.width,
|
|
37709
37803
|
color: p.color,
|
|
37710
|
-
footer: /* @__PURE__ */ (0,
|
|
37804
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hints, { items: [["\u2191\u2193", "move"], ["enter", "continue"], ["esc", "back"]] }),
|
|
37711
37805
|
children: [
|
|
37712
|
-
/* @__PURE__ */ (0,
|
|
37713
|
-
/* @__PURE__ */ (0,
|
|
37714
|
-
methods.map((m, i) => /* @__PURE__ */ (0,
|
|
37715
|
-
/* @__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: [
|
|
37716
37810
|
i === sel ? G.prompt : " ",
|
|
37717
37811
|
" "
|
|
37718
37812
|
] }),
|
|
37719
|
-
/* @__PURE__ */ (0,
|
|
37720
|
-
/* @__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" })
|
|
37721
37815
|
] }, m.type + ("id" in m ? m.id : "")))
|
|
37722
37816
|
] }),
|
|
37723
|
-
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: [
|
|
37724
37818
|
"Or set ",
|
|
37725
37819
|
env3.names[0],
|
|
37726
37820
|
" in your shell before starting LatentCode."
|
|
37727
37821
|
] }) }) : null,
|
|
37728
|
-
p.error ? /* @__PURE__ */ (0,
|
|
37822
|
+
p.error ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.err, children: p.error }) : null
|
|
37729
37823
|
]
|
|
37730
37824
|
}
|
|
37731
37825
|
);
|
|
37732
37826
|
}
|
|
37733
37827
|
function KeyEntry(p) {
|
|
37734
|
-
const [busy, setBusy] = (0,
|
|
37735
|
-
const [error, setError] = (0,
|
|
37828
|
+
const [busy, setBusy] = (0, import_react25.useState)(false);
|
|
37829
|
+
const [error, setError] = (0, import_react25.useState)("");
|
|
37736
37830
|
const field = useLineField({
|
|
37737
37831
|
active: !busy,
|
|
37738
37832
|
onChange: () => setError(""),
|
|
@@ -37751,44 +37845,44 @@ function KeyEntry(p) {
|
|
|
37751
37845
|
return false;
|
|
37752
37846
|
}
|
|
37753
37847
|
});
|
|
37754
|
-
return /* @__PURE__ */ (0,
|
|
37848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37755
37849
|
Panel,
|
|
37756
37850
|
{
|
|
37757
37851
|
title: `Connect ${p.integration.name}`,
|
|
37758
37852
|
right: "API key",
|
|
37759
37853
|
width: p.width,
|
|
37760
37854
|
color: p.color,
|
|
37761
|
-
footer: /* @__PURE__ */ (0,
|
|
37762
|
-
children: /* @__PURE__ */ (0,
|
|
37763
|
-
/* @__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: [
|
|
37764
37858
|
"Paste your ",
|
|
37765
37859
|
p.integration.name,
|
|
37766
37860
|
" API key."
|
|
37767
37861
|
] }),
|
|
37768
|
-
/* @__PURE__ */ (0,
|
|
37769
|
-
/* @__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: [
|
|
37770
37864
|
G.key,
|
|
37771
37865
|
" "
|
|
37772
37866
|
] }),
|
|
37773
|
-
/* @__PURE__ */ (0,
|
|
37867
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldText, { state: field.state, mask: true, placeholder: "paste the key here" })
|
|
37774
37868
|
] }),
|
|
37775
|
-
/* @__PURE__ */ (0,
|
|
37776
|
-
/* @__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, {}),
|
|
37777
37871
|
" ",
|
|
37778
|
-
/* @__PURE__ */ (0,
|
|
37779
|
-
] }) : /* @__PURE__ */ (0,
|
|
37780
|
-
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
|
|
37781
37875
|
] })
|
|
37782
37876
|
}
|
|
37783
37877
|
);
|
|
37784
37878
|
}
|
|
37785
37879
|
function OAuthFlow(p) {
|
|
37786
|
-
const [attempt, setAttempt] = (0,
|
|
37787
|
-
const [error, setError] = (0,
|
|
37788
|
-
const [busy, setBusy] = (0,
|
|
37789
|
-
const attemptRef = (0,
|
|
37790
|
-
const finished = (0,
|
|
37791
|
-
(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)(() => {
|
|
37792
37886
|
let live = true;
|
|
37793
37887
|
const answer = {};
|
|
37794
37888
|
for (const f of p.method.form ?? []) if (f.default !== void 0) answer[f.key] = f.default;
|
|
@@ -37804,7 +37898,7 @@ function OAuthFlow(p) {
|
|
|
37804
37898
|
if (a2 && !finished.current) void p.engine.cancelOAuth(p.integration.id, a2.attemptID);
|
|
37805
37899
|
};
|
|
37806
37900
|
}, []);
|
|
37807
|
-
(0,
|
|
37901
|
+
(0, import_react25.useEffect)(() => {
|
|
37808
37902
|
if (!attempt || attempt.mode !== "auto") return;
|
|
37809
37903
|
const t = setInterval(() => {
|
|
37810
37904
|
p.engine.oauthStatus(p.integration.id, attempt.attemptID).then((s2) => {
|
|
@@ -37844,50 +37938,50 @@ function OAuthFlow(p) {
|
|
|
37844
37938
|
return false;
|
|
37845
37939
|
}
|
|
37846
37940
|
});
|
|
37847
|
-
return /* @__PURE__ */ (0,
|
|
37941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37848
37942
|
Panel,
|
|
37849
37943
|
{
|
|
37850
37944
|
title: `Connect ${p.integration.name}`,
|
|
37851
37945
|
right: p.method.label,
|
|
37852
37946
|
width: p.width,
|
|
37853
37947
|
color: p.color,
|
|
37854
|
-
footer: /* @__PURE__ */ (0,
|
|
37855
|
-
children: /* @__PURE__ */ (0,
|
|
37856
|
-
!attempt && !error ? /* @__PURE__ */ (0,
|
|
37857
|
-
/* @__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, {}),
|
|
37858
37952
|
" ",
|
|
37859
|
-
/* @__PURE__ */ (0,
|
|
37953
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: "Starting sign-in\u2026" })
|
|
37860
37954
|
] }) : null,
|
|
37861
|
-
attempt ? /* @__PURE__ */ (0,
|
|
37862
|
-
/* @__PURE__ */ (0,
|
|
37863
|
-
/* @__PURE__ */ (0,
|
|
37864
|
-
attempt.instructions ? /* @__PURE__ */ (0,
|
|
37865
|
-
/* @__PURE__ */ (0,
|
|
37866
|
-
/* @__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: [
|
|
37867
37961
|
G.key,
|
|
37868
37962
|
" "
|
|
37869
37963
|
] }),
|
|
37870
|
-
/* @__PURE__ */ (0,
|
|
37871
|
-
] }) : error ? null : /* @__PURE__ */ (0,
|
|
37872
|
-
/* @__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, {}),
|
|
37873
37967
|
" ",
|
|
37874
|
-
/* @__PURE__ */ (0,
|
|
37968
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.muted, children: "Waiting for you to finish in the browser\u2026" })
|
|
37875
37969
|
] }) })
|
|
37876
37970
|
] }) : null,
|
|
37877
|
-
error ? /* @__PURE__ */ (0,
|
|
37971
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: C.err, children: error }) : null
|
|
37878
37972
|
] })
|
|
37879
37973
|
}
|
|
37880
37974
|
);
|
|
37881
37975
|
}
|
|
37882
37976
|
var KINDS = ["openai", "anthropic"];
|
|
37883
37977
|
function CustomProviderForm(p) {
|
|
37884
|
-
const [step, setStep] = (0,
|
|
37885
|
-
const [name, setName] = (0,
|
|
37886
|
-
const [kind, setKind] = (0,
|
|
37887
|
-
const [url, setUrl] = (0,
|
|
37888
|
-
const [key, setKey] = (0,
|
|
37889
|
-
const [busy, setBusy] = (0,
|
|
37890
|
-
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)("");
|
|
37891
37985
|
const order = ["name", "kind", "url", "key", "models"];
|
|
37892
37986
|
const back = () => {
|
|
37893
37987
|
setError("");
|
|
@@ -37970,13 +38064,13 @@ function CustomProviderForm(p) {
|
|
|
37970
38064
|
},
|
|
37971
38065
|
{ isActive: !busy && step === "kind" }
|
|
37972
38066
|
);
|
|
37973
|
-
const done = (label2, value) => /* @__PURE__ */ (0,
|
|
37974
|
-
/* @__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: [
|
|
37975
38069
|
G.ok,
|
|
37976
38070
|
" "
|
|
37977
38071
|
] }),
|
|
37978
|
-
/* @__PURE__ */ (0,
|
|
37979
|
-
/* @__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 })
|
|
37980
38074
|
] });
|
|
37981
38075
|
const at = order.indexOf(step);
|
|
37982
38076
|
const prompt = {
|
|
@@ -37993,51 +38087,51 @@ function CustomProviderForm(p) {
|
|
|
37993
38087
|
placeholder: "e.g. gpt-4.1, claude-sonnet-4"
|
|
37994
38088
|
}
|
|
37995
38089
|
};
|
|
37996
|
-
return /* @__PURE__ */ (0,
|
|
38090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
37997
38091
|
Panel,
|
|
37998
38092
|
{
|
|
37999
38093
|
title: "Custom provider",
|
|
38000
38094
|
right: `step ${at + 1} of ${order.length}`,
|
|
38001
38095
|
width: p.width,
|
|
38002
38096
|
color: p.color,
|
|
38003
|
-
footer: /* @__PURE__ */ (0,
|
|
38097
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
38004
38098
|
Hints,
|
|
38005
38099
|
{
|
|
38006
38100
|
items: step === "kind" ? [["\u2191\u2193", "choose"], ["enter", "continue"], ["esc", "back"]] : [["enter", step === "models" ? "save" : "continue"], ["esc", "back"]]
|
|
38007
38101
|
}
|
|
38008
38102
|
),
|
|
38009
|
-
children: /* @__PURE__ */ (0,
|
|
38103
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
38010
38104
|
at > 0 ? done("Name", name) : null,
|
|
38011
38105
|
at > 1 ? done("Type", KIND_LABEL[kind]) : null,
|
|
38012
38106
|
at > 2 ? done("Base URL", url) : null,
|
|
38013
38107
|
at > 3 ? done("API key", key ? "\u2022".repeat(Math.min(key.length, 12)) : "none") : null,
|
|
38014
|
-
/* @__PURE__ */ (0,
|
|
38015
|
-
/* @__PURE__ */ (0,
|
|
38016
|
-
KINDS.map((k) => /* @__PURE__ */ (0,
|
|
38017
|
-
/* @__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: [
|
|
38018
38112
|
k === kind ? G.prompt : " ",
|
|
38019
38113
|
" "
|
|
38020
38114
|
] }),
|
|
38021
|
-
/* @__PURE__ */ (0,
|
|
38022
|
-
/* @__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" })
|
|
38023
38117
|
] }, k))
|
|
38024
|
-
] }) : /* @__PURE__ */ (0,
|
|
38025
|
-
/* @__PURE__ */ (0,
|
|
38026
|
-
/* @__PURE__ */ (0,
|
|
38027
|
-
/* @__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: [
|
|
38028
38122
|
step === "key" ? G.key : G.prompt,
|
|
38029
38123
|
" "
|
|
38030
38124
|
] }),
|
|
38031
|
-
/* @__PURE__ */ (0,
|
|
38032
|
-
/* @__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 })
|
|
38033
38127
|
] })
|
|
38034
38128
|
] }) }),
|
|
38035
|
-
/* @__PURE__ */ (0,
|
|
38036
|
-
/* @__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, {}),
|
|
38037
38131
|
" ",
|
|
38038
|
-
/* @__PURE__ */ (0,
|
|
38039
|
-
] }) : /* @__PURE__ */ (0,
|
|
38040
|
-
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
|
|
38041
38135
|
] })
|
|
38042
38136
|
}
|
|
38043
38137
|
);
|
|
@@ -38047,30 +38141,30 @@ function Done(p) {
|
|
|
38047
38141
|
if (key.return) return p.onModels();
|
|
38048
38142
|
if (key.escape) p.onClose();
|
|
38049
38143
|
});
|
|
38050
|
-
return /* @__PURE__ */ (0,
|
|
38144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
38051
38145
|
Panel,
|
|
38052
38146
|
{
|
|
38053
38147
|
title: "Connected",
|
|
38054
38148
|
width: p.width,
|
|
38055
38149
|
color: C.ok,
|
|
38056
|
-
footer: /* @__PURE__ */ (0,
|
|
38150
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hints, { items: [["enter", "pick a model"], ["esc", "close"]] }),
|
|
38057
38151
|
children: [
|
|
38058
|
-
/* @__PURE__ */ (0,
|
|
38059
|
-
/* @__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: [
|
|
38060
38154
|
G.ok,
|
|
38061
38155
|
" "
|
|
38062
38156
|
] }),
|
|
38063
|
-
/* @__PURE__ */ (0,
|
|
38064
|
-
/* @__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." })
|
|
38065
38159
|
] }) }),
|
|
38066
|
-
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
|
|
38067
38161
|
]
|
|
38068
38162
|
}
|
|
38069
38163
|
);
|
|
38070
38164
|
}
|
|
38071
38165
|
|
|
38072
38166
|
// src/ui/panels/WalletPanel.tsx
|
|
38073
|
-
var
|
|
38167
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
38074
38168
|
|
|
38075
38169
|
// src/account/privy.ts
|
|
38076
38170
|
function trimServer(server) {
|
|
@@ -38266,7 +38360,7 @@ You can still connect an address you control: latentcode login --wallet 0x\u2026
|
|
|
38266
38360
|
}
|
|
38267
38361
|
|
|
38268
38362
|
// src/ui/panels/WalletPanel.tsx
|
|
38269
|
-
var
|
|
38363
|
+
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
38270
38364
|
var deps = (server, extra) => ({
|
|
38271
38365
|
server,
|
|
38272
38366
|
log: () => {
|
|
@@ -38278,20 +38372,20 @@ var deps = (server, extra) => ({
|
|
|
38278
38372
|
...extra
|
|
38279
38373
|
});
|
|
38280
38374
|
function WalletPanel(p) {
|
|
38281
|
-
const [view, setView] = (0,
|
|
38375
|
+
const [view, setView] = (0, import_react26.useState)({ v: "menu" });
|
|
38282
38376
|
const done = (wallet) => {
|
|
38283
38377
|
p.onWallet(wallet);
|
|
38284
38378
|
setView({ v: "done", wallet });
|
|
38285
38379
|
};
|
|
38286
38380
|
switch (view.v) {
|
|
38287
38381
|
case "menu":
|
|
38288
|
-
return /* @__PURE__ */ (0,
|
|
38382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Menu, { ...p, onPick: (v) => setView({ v }) });
|
|
38289
38383
|
case "link":
|
|
38290
|
-
return /* @__PURE__ */ (0,
|
|
38384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AuthLink, { ...p, onDone: done, onBack: () => setView({ v: "menu" }) });
|
|
38291
38385
|
case "address":
|
|
38292
|
-
return /* @__PURE__ */ (0,
|
|
38386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Address, { ...p, onDone: done, onBack: () => setView({ v: "menu" }) });
|
|
38293
38387
|
case "done":
|
|
38294
|
-
return /* @__PURE__ */ (0,
|
|
38388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Done2, { width: p.width, wallet: view.wallet, onClose: p.onClose });
|
|
38295
38389
|
}
|
|
38296
38390
|
}
|
|
38297
38391
|
function Menu(p) {
|
|
@@ -38299,39 +38393,39 @@ function Menu(p) {
|
|
|
38299
38393
|
{ id: "link", label: "Sign in with your browser", hint: "creates or finds your Latent wallet" },
|
|
38300
38394
|
{ id: "address", label: "Use a wallet address", hint: "an address you already control" }
|
|
38301
38395
|
];
|
|
38302
|
-
const [sel, setSel] = (0,
|
|
38396
|
+
const [sel, setSel] = (0, import_react26.useState)(0);
|
|
38303
38397
|
use_input_default((_ch, key) => {
|
|
38304
38398
|
if (key.escape) return p.onClose();
|
|
38305
38399
|
if (key.upArrow || key.downArrow || key.tab) return setSel((s2) => (s2 + 1) % options.length);
|
|
38306
38400
|
if (key.return) p.onPick(options[sel].id);
|
|
38307
38401
|
});
|
|
38308
|
-
return /* @__PURE__ */ (0,
|
|
38402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
38309
38403
|
Panel,
|
|
38310
38404
|
{
|
|
38311
38405
|
title: "Wallet",
|
|
38312
38406
|
right: p.wallet ? `connected \xB7 ${shortWallet(p.wallet)}` : "not connected",
|
|
38313
38407
|
width: p.width,
|
|
38314
38408
|
color: C.earn,
|
|
38315
|
-
footer: /* @__PURE__ */ (0,
|
|
38316
|
-
children: /* @__PURE__ */ (0,
|
|
38317
|
-
/* @__PURE__ */ (0,
|
|
38318
|
-
/* @__PURE__ */ (0,
|
|
38319
|
-
/* @__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: [
|
|
38320
38414
|
i === sel ? G.prompt : " ",
|
|
38321
38415
|
" "
|
|
38322
38416
|
] }),
|
|
38323
|
-
/* @__PURE__ */ (0,
|
|
38324
|
-
/* @__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 })
|
|
38325
38419
|
] }, o.id)) })
|
|
38326
38420
|
] })
|
|
38327
38421
|
}
|
|
38328
38422
|
);
|
|
38329
38423
|
}
|
|
38330
38424
|
function AuthLink(p) {
|
|
38331
|
-
const [link2, setLink] = (0,
|
|
38332
|
-
const [error, setError] = (0,
|
|
38333
|
-
const cancelled = (0,
|
|
38334
|
-
(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)(() => {
|
|
38335
38429
|
cancelled.current = false;
|
|
38336
38430
|
loginWithAuthLink(
|
|
38337
38431
|
deps(p.server, {
|
|
@@ -38350,40 +38444,40 @@ function AuthLink(p) {
|
|
|
38350
38444
|
if (key.escape) p.onBack();
|
|
38351
38445
|
if (key.return && link2) openUrl(link2.url);
|
|
38352
38446
|
});
|
|
38353
|
-
return /* @__PURE__ */ (0,
|
|
38447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
38354
38448
|
Panel,
|
|
38355
38449
|
{
|
|
38356
38450
|
title: "Sign in",
|
|
38357
38451
|
right: "Latent wallet",
|
|
38358
38452
|
width: p.width,
|
|
38359
38453
|
color: C.earn,
|
|
38360
|
-
footer: /* @__PURE__ */ (0,
|
|
38361
|
-
children: /* @__PURE__ */ (0,
|
|
38362
|
-
!link2 && !error ? /* @__PURE__ */ (0,
|
|
38363
|
-
/* @__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 }),
|
|
38364
38458
|
" ",
|
|
38365
|
-
/* @__PURE__ */ (0,
|
|
38459
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.muted, children: "Preparing your sign-in link\u2026" })
|
|
38366
38460
|
] }) : null,
|
|
38367
|
-
link2 ? /* @__PURE__ */ (0,
|
|
38368
|
-
/* @__PURE__ */ (0,
|
|
38369
|
-
/* @__PURE__ */ (0,
|
|
38370
|
-
/* @__PURE__ */ (0,
|
|
38371
|
-
/* @__PURE__ */ (0,
|
|
38372
|
-
/* @__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 })
|
|
38373
38467
|
] }) }),
|
|
38374
|
-
error ? null : /* @__PURE__ */ (0,
|
|
38375
|
-
/* @__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 }),
|
|
38376
38470
|
" ",
|
|
38377
|
-
/* @__PURE__ */ (0,
|
|
38471
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.muted, children: "Waiting for you to finish in the browser\u2026" })
|
|
38378
38472
|
] }) })
|
|
38379
38473
|
] }) : null,
|
|
38380
|
-
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
|
|
38381
38475
|
] })
|
|
38382
38476
|
}
|
|
38383
38477
|
);
|
|
38384
38478
|
}
|
|
38385
38479
|
function Address(p) {
|
|
38386
|
-
const [error, setError] = (0,
|
|
38480
|
+
const [error, setError] = (0, import_react26.useState)("");
|
|
38387
38481
|
const field = useLineField({
|
|
38388
38482
|
onChange: () => setError(""),
|
|
38389
38483
|
onKey: (_ch, key) => {
|
|
@@ -38400,23 +38494,23 @@ function Address(p) {
|
|
|
38400
38494
|
return false;
|
|
38401
38495
|
}
|
|
38402
38496
|
});
|
|
38403
|
-
return /* @__PURE__ */ (0,
|
|
38497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
38404
38498
|
Panel,
|
|
38405
38499
|
{
|
|
38406
38500
|
title: "Wallet address",
|
|
38407
38501
|
width: p.width,
|
|
38408
38502
|
color: C.earn,
|
|
38409
|
-
footer: /* @__PURE__ */ (0,
|
|
38410
|
-
children: /* @__PURE__ */ (0,
|
|
38411
|
-
/* @__PURE__ */ (0,
|
|
38412
|
-
/* @__PURE__ */ (0,
|
|
38413
|
-
/* @__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: [
|
|
38414
38508
|
G.earn,
|
|
38415
38509
|
" "
|
|
38416
38510
|
] }),
|
|
38417
|
-
/* @__PURE__ */ (0,
|
|
38511
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FieldText, { state: field.state, placeholder: "0x\u2026" })
|
|
38418
38512
|
] }),
|
|
38419
|
-
error ? /* @__PURE__ */ (0,
|
|
38513
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.err, children: error }) : null
|
|
38420
38514
|
] })
|
|
38421
38515
|
}
|
|
38422
38516
|
);
|
|
@@ -38425,73 +38519,73 @@ function Done2(p) {
|
|
|
38425
38519
|
use_input_default((_ch, key) => {
|
|
38426
38520
|
if (key.return || key.escape) p.onClose();
|
|
38427
38521
|
});
|
|
38428
|
-
return /* @__PURE__ */ (0,
|
|
38429
|
-
/* @__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: [
|
|
38430
38524
|
G.ok,
|
|
38431
38525
|
" "
|
|
38432
38526
|
] }),
|
|
38433
|
-
/* @__PURE__ */ (0,
|
|
38434
|
-
/* @__PURE__ */ (0,
|
|
38435
|
-
/* @__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." })
|
|
38436
38530
|
] }) }) });
|
|
38437
38531
|
}
|
|
38438
38532
|
|
|
38439
38533
|
// src/ui/panels/OverflowPanel.tsx
|
|
38440
|
-
var
|
|
38534
|
+
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
|
|
38441
38535
|
function OverflowPanel(p) {
|
|
38442
38536
|
use_input_default((ch, key) => {
|
|
38443
38537
|
if (key.return) p.onContinue();
|
|
38444
38538
|
else if (ch === "s") p.onSwitch();
|
|
38445
38539
|
else if (key.escape || ch === "n") p.onClose();
|
|
38446
38540
|
});
|
|
38447
|
-
return /* @__PURE__ */ (0,
|
|
38541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
38448
38542
|
Panel,
|
|
38449
38543
|
{
|
|
38450
38544
|
title: "Limit reached",
|
|
38451
38545
|
right: `${p.credits.toFixed(2)} credits`,
|
|
38452
38546
|
width: p.width,
|
|
38453
38547
|
color: C.earn,
|
|
38454
|
-
footer: /* @__PURE__ */ (0,
|
|
38455
|
-
children: /* @__PURE__ */ (0,
|
|
38456
|
-
/* @__PURE__ */ (0,
|
|
38457
|
-
/* @__PURE__ */ (0,
|
|
38458
|
-
/* @__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." })
|
|
38459
38553
|
] }),
|
|
38460
|
-
/* @__PURE__ */ (0,
|
|
38554
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Text, { wrap: "wrap", children: [
|
|
38461
38555
|
"Continue on ",
|
|
38462
|
-
/* @__PURE__ */ (0,
|
|
38463
|
-
/* @__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: [
|
|
38464
38558
|
" via Venice, paid from the ",
|
|
38465
38559
|
p.credits.toFixed(2),
|
|
38466
38560
|
" credits you earned"
|
|
38467
38561
|
] }),
|
|
38468
|
-
p.price ? /* @__PURE__ */ (0,
|
|
38562
|
+
p.price ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Text, { color: C.faint, children: [
|
|
38469
38563
|
" (",
|
|
38470
38564
|
p.price,
|
|
38471
38565
|
" per 1M tokens)"
|
|
38472
38566
|
] }) : null,
|
|
38473
|
-
/* @__PURE__ */ (0,
|
|
38567
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { color: C.muted, children: "?" })
|
|
38474
38568
|
] }),
|
|
38475
|
-
/* @__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." })
|
|
38476
38570
|
] })
|
|
38477
38571
|
}
|
|
38478
38572
|
);
|
|
38479
38573
|
}
|
|
38480
38574
|
|
|
38481
38575
|
// src/ui/panels/McpPanel.tsx
|
|
38482
|
-
var
|
|
38483
|
-
var
|
|
38576
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
38577
|
+
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
|
|
38484
38578
|
var DOT = { connected: C.ok, pending: C.warn, needs_auth: C.warn, failed: C.err, disabled: C.faint };
|
|
38485
38579
|
function errText2(e) {
|
|
38486
38580
|
return (e instanceof Error ? e.message : String(e)).split("\n")[0] ?? "";
|
|
38487
38581
|
}
|
|
38488
38582
|
function McpPanel(p) {
|
|
38489
|
-
const [view, setView] = (0,
|
|
38583
|
+
const [view, setView] = (0, import_react27.useState)(p.add !== void 0 ? { v: "add", initial: p.add } : { v: "list" });
|
|
38490
38584
|
switch (view.v) {
|
|
38491
38585
|
case "list":
|
|
38492
|
-
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 }) });
|
|
38493
38587
|
case "add":
|
|
38494
|
-
return /* @__PURE__ */ (0,
|
|
38588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
38495
38589
|
AddForm,
|
|
38496
38590
|
{
|
|
38497
38591
|
...p,
|
|
@@ -38504,7 +38598,7 @@ function McpPanel(p) {
|
|
|
38504
38598
|
}
|
|
38505
38599
|
);
|
|
38506
38600
|
case "auth":
|
|
38507
|
-
return /* @__PURE__ */ (0,
|
|
38601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
38508
38602
|
OAuthFlow,
|
|
38509
38603
|
{
|
|
38510
38604
|
width: p.width,
|
|
@@ -38524,14 +38618,14 @@ function McpPanel(p) {
|
|
|
38524
38618
|
}
|
|
38525
38619
|
}
|
|
38526
38620
|
function List(p) {
|
|
38527
|
-
const [list2, setList] = (0,
|
|
38528
|
-
const [sel, setSel] = (0,
|
|
38529
|
-
const [busy, setBusy] = (0,
|
|
38530
|
-
const [note, setNote] = (0,
|
|
38531
|
-
const [confirm, setConfirm] = (0,
|
|
38532
|
-
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);
|
|
38533
38627
|
const refresh = () => p.engine.mcpList().then((l) => live.current && setList(l)).catch((e) => live.current && (setList([]), setNote(errText2(e))));
|
|
38534
|
-
(0,
|
|
38628
|
+
(0, import_react27.useEffect)(() => {
|
|
38535
38629
|
live.current = true;
|
|
38536
38630
|
void refresh();
|
|
38537
38631
|
const t = setInterval(() => void refresh(), 2e3);
|
|
@@ -38603,14 +38697,14 @@ function List(p) {
|
|
|
38603
38697
|
const height = Math.max(3, Math.min(items.length, p.rows - 14));
|
|
38604
38698
|
const win = windowAround(items.length, sel, height);
|
|
38605
38699
|
const nameW = Math.min(24, Math.max(8, ...items.map((s2) => s2.name.length)) + 2);
|
|
38606
|
-
return /* @__PURE__ */ (0,
|
|
38700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
38607
38701
|
Panel,
|
|
38608
38702
|
{
|
|
38609
38703
|
title: "MCP servers",
|
|
38610
38704
|
right: list2 ? `${sum.connected}/${sum.total} connected` : "",
|
|
38611
38705
|
width: p.width,
|
|
38612
38706
|
color: C.accent2,
|
|
38613
|
-
footer: /* @__PURE__ */ (0,
|
|
38707
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
38614
38708
|
Hints,
|
|
38615
38709
|
{
|
|
38616
38710
|
items: [
|
|
@@ -38623,54 +38717,54 @@ function List(p) {
|
|
|
38623
38717
|
]
|
|
38624
38718
|
}
|
|
38625
38719
|
),
|
|
38626
|
-
children: /* @__PURE__ */ (0,
|
|
38627
|
-
/* @__PURE__ */ (0,
|
|
38628
|
-
/* @__PURE__ */ (0,
|
|
38629
|
-
/* @__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, {}),
|
|
38630
38724
|
" ",
|
|
38631
|
-
/* @__PURE__ */ (0,
|
|
38632
|
-
] }) : 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: [
|
|
38633
38727
|
"No MCP servers yet. Press ",
|
|
38634
|
-
/* @__PURE__ */ (0,
|
|
38728
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { bold: true, children: "a" }),
|
|
38635
38729
|
" to add one, e.g.",
|
|
38636
38730
|
" ",
|
|
38637
|
-
/* @__PURE__ */ (0,
|
|
38731
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.code, children: "context7 https://mcp.context7.com/mcp" })
|
|
38638
38732
|
] }) : items.slice(win.start, win.end).map((s2, i) => {
|
|
38639
38733
|
const idx = win.start + i;
|
|
38640
38734
|
const on2 = idx === sel;
|
|
38641
|
-
return /* @__PURE__ */ (0,
|
|
38642
|
-
/* @__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: [
|
|
38643
38737
|
on2 ? G.prompt : " ",
|
|
38644
38738
|
" "
|
|
38645
38739
|
] }),
|
|
38646
|
-
/* @__PURE__ */ (0,
|
|
38740
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: DOT[s2.status] ?? C.muted, children: [
|
|
38647
38741
|
G.dot,
|
|
38648
38742
|
" "
|
|
38649
38743
|
] }),
|
|
38650
|
-
/* @__PURE__ */ (0,
|
|
38651
|
-
/* @__PURE__ */ (0,
|
|
38652
|
-
/* @__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 ?? "" })
|
|
38653
38747
|
] }, s2.name);
|
|
38654
38748
|
}) }),
|
|
38655
|
-
cur?.error ? /* @__PURE__ */ (0,
|
|
38656
|
-
busy ? /* @__PURE__ */ (0,
|
|
38657
|
-
/* @__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, {}),
|
|
38658
38752
|
" ",
|
|
38659
|
-
/* @__PURE__ */ (0,
|
|
38753
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.muted, children: busy })
|
|
38660
38754
|
] }) }) : null,
|
|
38661
|
-
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: [
|
|
38662
38756
|
"Press x again to remove ",
|
|
38663
38757
|
confirm,
|
|
38664
38758
|
" from your config (OpenCode loses it too)."
|
|
38665
38759
|
] }) }) : null,
|
|
38666
|
-
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
|
|
38667
38761
|
] })
|
|
38668
38762
|
}
|
|
38669
38763
|
);
|
|
38670
38764
|
}
|
|
38671
38765
|
function AddForm(p) {
|
|
38672
|
-
const [error, setError] = (0,
|
|
38673
|
-
const [busy, setBusy] = (0,
|
|
38766
|
+
const [error, setError] = (0, import_react27.useState)("");
|
|
38767
|
+
const [busy, setBusy] = (0, import_react27.useState)("");
|
|
38674
38768
|
async function add(line) {
|
|
38675
38769
|
const spec = parseMcpAdd(line);
|
|
38676
38770
|
setBusy(`Adding ${spec.name}\u2026`);
|
|
@@ -38700,39 +38794,39 @@ function AddForm(p) {
|
|
|
38700
38794
|
return false;
|
|
38701
38795
|
}
|
|
38702
38796
|
});
|
|
38703
|
-
return /* @__PURE__ */ (0,
|
|
38797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
38704
38798
|
Panel,
|
|
38705
38799
|
{
|
|
38706
38800
|
title: "Add an MCP server",
|
|
38707
38801
|
right: "saved to your OpenCode config",
|
|
38708
38802
|
width: p.width,
|
|
38709
38803
|
color: C.accent2,
|
|
38710
|
-
footer: /* @__PURE__ */ (0,
|
|
38711
|
-
children: /* @__PURE__ */ (0,
|
|
38712
|
-
/* @__PURE__ */ (0,
|
|
38713
|
-
/* @__PURE__ */ (0,
|
|
38714
|
-
/* @__PURE__ */ (0,
|
|
38715
|
-
/* @__PURE__ */ (0,
|
|
38716
|
-
/* @__PURE__ */ (0,
|
|
38717
|
-
/* @__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: [
|
|
38718
38812
|
G.prompt,
|
|
38719
38813
|
" "
|
|
38720
38814
|
] }),
|
|
38721
|
-
/* @__PURE__ */ (0,
|
|
38815
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FieldText, { state: field.state, placeholder: "name url | command\u2026" })
|
|
38722
38816
|
] }),
|
|
38723
|
-
busy ? /* @__PURE__ */ (0,
|
|
38724
|
-
/* @__PURE__ */ (0,
|
|
38817
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { children: [
|
|
38818
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Spinner, {}),
|
|
38725
38819
|
" ",
|
|
38726
|
-
/* @__PURE__ */ (0,
|
|
38820
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.muted, children: busy })
|
|
38727
38821
|
] }) : null,
|
|
38728
|
-
error ? /* @__PURE__ */ (0,
|
|
38822
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: C.err, wrap: "wrap", children: error }) : null
|
|
38729
38823
|
] })
|
|
38730
38824
|
}
|
|
38731
38825
|
);
|
|
38732
38826
|
}
|
|
38733
38827
|
|
|
38734
38828
|
// src/ui/App.tsx
|
|
38735
|
-
var
|
|
38829
|
+
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
38736
38830
|
var DASHBOARD = "latentprotocol.xyz/app";
|
|
38737
38831
|
var MODE = { keep: "keep and spend (bonus)", auto_sell: "sell automatically for USDC", auto_list: "list at my price" };
|
|
38738
38832
|
var notice = (text, tone = "info") => ({
|
|
@@ -38766,42 +38860,42 @@ function activityLabel(s2) {
|
|
|
38766
38860
|
function StepMark({ status: status2 }) {
|
|
38767
38861
|
switch (status2) {
|
|
38768
38862
|
case "run":
|
|
38769
|
-
return /* @__PURE__ */ (0,
|
|
38863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Spinner, {});
|
|
38770
38864
|
case "ok":
|
|
38771
|
-
return /* @__PURE__ */ (0,
|
|
38865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.ok, children: G.ok });
|
|
38772
38866
|
case "warn":
|
|
38773
|
-
return /* @__PURE__ */ (0,
|
|
38867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.warn, children: G.ring });
|
|
38774
38868
|
case "fail":
|
|
38775
|
-
return /* @__PURE__ */ (0,
|
|
38869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.err, children: G.no });
|
|
38776
38870
|
default:
|
|
38777
|
-
return /* @__PURE__ */ (0,
|
|
38871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: C.faint, children: "\xB7" });
|
|
38778
38872
|
}
|
|
38779
38873
|
}
|
|
38780
38874
|
function BootCard(p) {
|
|
38781
38875
|
const wLabel = 10;
|
|
38782
38876
|
const inner = p.width - 4;
|
|
38783
|
-
return /* @__PURE__ */ (0,
|
|
38784
|
-
/* @__PURE__ */ (0,
|
|
38785
|
-
/* @__PURE__ */ (0,
|
|
38786
|
-
/* @__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 })
|
|
38787
38881
|
] }),
|
|
38788
|
-
/* @__PURE__ */ (0,
|
|
38789
|
-
p.steps.map((st) => /* @__PURE__ */ (0,
|
|
38790
|
-
/* @__PURE__ */ (0,
|
|
38791
|
-
/* @__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: [
|
|
38792
38886
|
" ",
|
|
38793
38887
|
pad(st.label, wLabel)
|
|
38794
38888
|
] }),
|
|
38795
|
-
/* @__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) })
|
|
38796
38890
|
] }, st.id)),
|
|
38797
|
-
/* @__PURE__ */ (0,
|
|
38798
|
-
/* @__PURE__ */ (0,
|
|
38799
|
-
/* @__PURE__ */ (0,
|
|
38800
|
-
/* @__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) })
|
|
38801
38895
|
] })
|
|
38802
38896
|
] }),
|
|
38803
|
-
p.error ? /* @__PURE__ */ (0,
|
|
38804
|
-
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)(
|
|
38805
38899
|
Hints,
|
|
38806
38900
|
{
|
|
38807
38901
|
items: [
|
|
@@ -38827,29 +38921,29 @@ function HelpPanel({ width, commands, onClose }) {
|
|
|
38827
38921
|
["ctrl+a / ctrl+e", "start / end of line"],
|
|
38828
38922
|
["alt+\u2190 / alt+\u2192", "jump a word"],
|
|
38829
38923
|
["ctrl+w / ctrl+u", "delete word / line"],
|
|
38830
|
-
["ctrl+o", "
|
|
38924
|
+
["ctrl+o", "show the sponsored card"],
|
|
38831
38925
|
["ctrl+c", "clear the line, twice to quit"]
|
|
38832
38926
|
];
|
|
38833
|
-
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: [
|
|
38834
38928
|
groups.map((g) => {
|
|
38835
38929
|
const list2 = commands.filter((c) => c.group === g);
|
|
38836
38930
|
if (!list2.length) return null;
|
|
38837
|
-
return /* @__PURE__ */ (0,
|
|
38838
|
-
/* @__PURE__ */ (0,
|
|
38839
|
-
list2.map((c) => /* @__PURE__ */ (0,
|
|
38840
|
-
/* @__PURE__ */ (0,
|
|
38841
|
-
/* @__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 })
|
|
38842
38936
|
] }, c.name))
|
|
38843
38937
|
] }, g);
|
|
38844
38938
|
}),
|
|
38845
|
-
/* @__PURE__ */ (0,
|
|
38846
|
-
/* @__PURE__ */ (0,
|
|
38847
|
-
keys.map(([k, d]) => /* @__PURE__ */ (0,
|
|
38848
|
-
/* @__PURE__ */ (0,
|
|
38849
|
-
/* @__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 })
|
|
38850
38944
|
] }, k))
|
|
38851
38945
|
] }),
|
|
38852
|
-
/* @__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.` }) })
|
|
38853
38947
|
] });
|
|
38854
38948
|
}
|
|
38855
38949
|
var LINKS_OSC8 = linkShape() === "osc8";
|
|
@@ -38858,17 +38952,17 @@ function App2(props) {
|
|
|
38858
38952
|
const { exit } = use_app_default();
|
|
38859
38953
|
const { cols, rows } = useTermSize();
|
|
38860
38954
|
const width = Math.max(40, Math.min(cols, 110));
|
|
38861
|
-
const [sessionID, setSessionID] = (0,
|
|
38862
|
-
const [state, dispatch] = (0,
|
|
38955
|
+
const [sessionID, setSessionID] = (0, import_react28.useState)(props.sessionID);
|
|
38956
|
+
const [state, dispatch] = (0, import_react28.useReducer)(
|
|
38863
38957
|
(s2, ev) => ev.type === "reset" ? { ...initialState(ev.sessionID, s2.model), variant: s2.variant } : reduce(s2, ev),
|
|
38864
38958
|
{ ...initialState(props.sessionID, props.model), variant: props.variant }
|
|
38865
38959
|
);
|
|
38866
|
-
const [catalog, setCatalog] = (0,
|
|
38867
|
-
const [wallet, setWallet] = (0,
|
|
38868
|
-
const [overlay, setOverlay] = (0,
|
|
38869
|
-
const [, tick] = (0,
|
|
38870
|
-
const [editor, setEditorState] = (0,
|
|
38871
|
-
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);
|
|
38872
38966
|
const setEditor = (next) => {
|
|
38873
38967
|
if (next.text !== editorRef.current.text) {
|
|
38874
38968
|
setPaletteAt(0);
|
|
@@ -38877,24 +38971,24 @@ function App2(props) {
|
|
|
38877
38971
|
editorRef.current = next;
|
|
38878
38972
|
setEditorState(next);
|
|
38879
38973
|
};
|
|
38880
|
-
const [paletteAt, setPaletteAt] = (0,
|
|
38881
|
-
const [paletteHidden, setPaletteHidden] = (0,
|
|
38882
|
-
const [permAt, setPermAt] = (0,
|
|
38883
|
-
const [quitArmed, setQuitArmed] = (0,
|
|
38884
|
-
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);
|
|
38885
38979
|
const quit = () => {
|
|
38886
38980
|
setLeaving(true);
|
|
38887
38981
|
setTimeout(() => exit(), 20);
|
|
38888
38982
|
};
|
|
38889
|
-
const lastPrompt = (0,
|
|
38890
|
-
const currentModel = (0,
|
|
38983
|
+
const lastPrompt = (0, import_react28.useRef)("");
|
|
38984
|
+
const currentModel = (0, import_react28.useRef)(props.model);
|
|
38891
38985
|
currentModel.current = state.model;
|
|
38892
38986
|
const store = props.models;
|
|
38893
|
-
const ad = (0,
|
|
38987
|
+
const ad = (0, import_react28.useSyncExternalStore)(
|
|
38894
38988
|
(fn) => controller.subscribe(fn),
|
|
38895
38989
|
() => controller.snapshot()
|
|
38896
38990
|
);
|
|
38897
|
-
const allCommands = (0,
|
|
38991
|
+
const allCommands = (0, import_react28.useMemo)(
|
|
38898
38992
|
() => [
|
|
38899
38993
|
...COMMANDS,
|
|
38900
38994
|
...props.commands.filter((c) => !findCommand(c.name)).map((c) => ({ name: c.name, args: "[text]", desc: c.description ?? "agent command", group: "Agent" }))
|
|
@@ -38904,8 +38998,8 @@ function App2(props) {
|
|
|
38904
38998
|
const say = (text, tone = "info") => dispatch(notice(text, tone));
|
|
38905
38999
|
const statusOf = (key) => store.get(key)?.status ?? "unknown";
|
|
38906
39000
|
const modelName = (key) => catalog.models.find((m) => m.key === key)?.name ?? key;
|
|
38907
|
-
const [bonus, setBonus] = (0,
|
|
38908
|
-
(0,
|
|
39001
|
+
const [bonus, setBonus] = (0, import_react28.useState)(1);
|
|
39002
|
+
(0, import_react28.useEffect)(() => {
|
|
38909
39003
|
void api.creditQuote().then((q) => q && setBonus(q.bonus));
|
|
38910
39004
|
}, [api]);
|
|
38911
39005
|
props.summary.current = {
|
|
@@ -38915,7 +39009,7 @@ function App2(props) {
|
|
|
38915
39009
|
earned: credits(ad.sessionEarned, bonus),
|
|
38916
39010
|
impressions: ad.impressions
|
|
38917
39011
|
};
|
|
38918
|
-
(0,
|
|
39012
|
+
(0, import_react28.useEffect)(() => {
|
|
38919
39013
|
const ac = new AbortController();
|
|
38920
39014
|
void engine.subscribe((ev) => {
|
|
38921
39015
|
dispatch(ev);
|
|
@@ -38927,11 +39021,11 @@ function App2(props) {
|
|
|
38927
39021
|
if (props.startNotice) say(props.startNotice, "warn");
|
|
38928
39022
|
return () => ac.abort();
|
|
38929
39023
|
}, [engine]);
|
|
38930
|
-
(0,
|
|
39024
|
+
(0, import_react28.useEffect)(() => {
|
|
38931
39025
|
controller.setWorking(state.working, lastPrompt.current);
|
|
38932
39026
|
}, [state.working, controller]);
|
|
38933
39027
|
const lingering = !state.working && !!ad.current;
|
|
38934
|
-
(0,
|
|
39028
|
+
(0, import_react28.useEffect)(() => {
|
|
38935
39029
|
if (!state.working && !lingering) return;
|
|
38936
39030
|
const t = setInterval(
|
|
38937
39031
|
() => {
|
|
@@ -38942,13 +39036,13 @@ function App2(props) {
|
|
|
38942
39036
|
);
|
|
38943
39037
|
return () => clearInterval(t);
|
|
38944
39038
|
}, [state.working, lingering, controller]);
|
|
38945
|
-
const [balance, setBalance] = (0,
|
|
38946
|
-
const catalogRef = (0,
|
|
39039
|
+
const [balance, setBalance] = (0, import_react28.useState)(null);
|
|
39040
|
+
const catalogRef = (0, import_react28.useRef)(catalog);
|
|
38947
39041
|
catalogRef.current = catalog;
|
|
38948
|
-
const balanceRef = (0,
|
|
39042
|
+
const balanceRef = (0, import_react28.useRef)(balance);
|
|
38949
39043
|
balanceRef.current = balance;
|
|
38950
|
-
const offered = (0,
|
|
38951
|
-
(0,
|
|
39044
|
+
const offered = (0, import_react28.useRef)(/* @__PURE__ */ new Set());
|
|
39045
|
+
(0, import_react28.useEffect)(() => {
|
|
38952
39046
|
if (!wallet || state.working) return;
|
|
38953
39047
|
let live2 = true;
|
|
38954
39048
|
void api.creditSummary(wallet).then((c) => live2 && setBalance(c ? c.credits : null));
|
|
@@ -38956,8 +39050,8 @@ function App2(props) {
|
|
|
38956
39050
|
live2 = false;
|
|
38957
39051
|
};
|
|
38958
39052
|
}, [api, wallet, state.working, ad.impressions]);
|
|
38959
|
-
(0,
|
|
38960
|
-
(0,
|
|
39053
|
+
(0, import_react28.useEffect)(() => setPermAt(0), [state.permissions[0]?.id]);
|
|
39054
|
+
(0, import_react28.useEffect)(() => {
|
|
38961
39055
|
if (!quitArmed) return;
|
|
38962
39056
|
const t = setTimeout(() => setQuitArmed(false), 2e3);
|
|
38963
39057
|
return () => clearTimeout(t);
|
|
@@ -39203,8 +39297,7 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39203
39297
|
}
|
|
39204
39298
|
if (quitArmed) setQuitArmed(false);
|
|
39205
39299
|
if (key.ctrl && ch === "o") {
|
|
39206
|
-
|
|
39207
|
-
if (url) openUrl(url);
|
|
39300
|
+
if (ad.status === "ok" && ad.current) setOverlay({ t: "ad", ad: ad.current });
|
|
39208
39301
|
return;
|
|
39209
39302
|
}
|
|
39210
39303
|
if (key.escape) {
|
|
@@ -39234,22 +39327,22 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39234
39327
|
const live = state.items.slice(cut);
|
|
39235
39328
|
const elapsed = state.workingSince ? Math.max(0, Math.floor((Date.now() - state.workingSince) / 1e3)) : 0;
|
|
39236
39329
|
const maxLines = Math.max(6, rows - 14);
|
|
39237
|
-
const header = (0,
|
|
39330
|
+
const header = (0, import_react28.useMemo)(() => ({ id: "header" }), []);
|
|
39238
39331
|
const current = catalog.models.find((m) => m.key === state.model);
|
|
39239
39332
|
const provider = catalog.providers.find((p) => p.id === (current?.providerID ?? parseKey(state.model)?.providerID));
|
|
39240
39333
|
const close = () => setOverlay(null);
|
|
39241
|
-
return /* @__PURE__ */ (0,
|
|
39242
|
-
/* @__PURE__ */ (0,
|
|
39243
|
-
live.map((it) => /* @__PURE__ */ (0,
|
|
39244
|
-
perm ? /* @__PURE__ */ (0,
|
|
39245
|
-
state.working ? /* @__PURE__ */ (0,
|
|
39246
|
-
/* @__PURE__ */ (0,
|
|
39247
|
-
/* @__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: [
|
|
39248
39341
|
" ",
|
|
39249
39342
|
activityLabel(state),
|
|
39250
39343
|
"\u2026"
|
|
39251
39344
|
] }),
|
|
39252
|
-
/* @__PURE__ */ (0,
|
|
39345
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { color: C.faint, children: [
|
|
39253
39346
|
" ",
|
|
39254
39347
|
elapsed,
|
|
39255
39348
|
"s \xB7 ",
|
|
@@ -39261,7 +39354,7 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39261
39354
|
" \xB7 esc to interrupt"
|
|
39262
39355
|
] })
|
|
39263
39356
|
] }) }) : null,
|
|
39264
|
-
overlay?.t === "model" ? /* @__PURE__ */ (0,
|
|
39357
|
+
overlay?.t === "model" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
39265
39358
|
ModelPicker,
|
|
39266
39359
|
{
|
|
39267
39360
|
catalog,
|
|
@@ -39280,7 +39373,7 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39280
39373
|
onClose: close
|
|
39281
39374
|
}
|
|
39282
39375
|
) : null,
|
|
39283
|
-
overlay?.t === "providers" ? /* @__PURE__ */ (0,
|
|
39376
|
+
overlay?.t === "providers" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
39284
39377
|
ProviderPanel,
|
|
39285
39378
|
{
|
|
39286
39379
|
engine,
|
|
@@ -39300,7 +39393,7 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39300
39393
|
onClose: close
|
|
39301
39394
|
}
|
|
39302
39395
|
) : null,
|
|
39303
|
-
overlay?.t === "mcp" ? /* @__PURE__ */ (0,
|
|
39396
|
+
overlay?.t === "mcp" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
39304
39397
|
McpPanel,
|
|
39305
39398
|
{
|
|
39306
39399
|
engine,
|
|
@@ -39314,9 +39407,9 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39314
39407
|
onClose: close
|
|
39315
39408
|
}
|
|
39316
39409
|
) : null,
|
|
39317
|
-
overlay?.t === "wallet" ? /* @__PURE__ */ (0,
|
|
39318
|
-
overlay?.t === "help" ? /* @__PURE__ */ (0,
|
|
39319
|
-
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)(
|
|
39320
39413
|
OverflowPanel,
|
|
39321
39414
|
{
|
|
39322
39415
|
width,
|
|
@@ -39340,8 +39433,9 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39340
39433
|
onClose: close
|
|
39341
39434
|
}
|
|
39342
39435
|
) : null,
|
|
39343
|
-
overlay ===
|
|
39344
|
-
|
|
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)(
|
|
39345
39439
|
Box_default,
|
|
39346
39440
|
{
|
|
39347
39441
|
marginTop: 1,
|
|
@@ -39350,34 +39444,34 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39350
39444
|
paddingX: 1,
|
|
39351
39445
|
width,
|
|
39352
39446
|
children: [
|
|
39353
|
-
/* @__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: [
|
|
39354
39448
|
G.prompt,
|
|
39355
39449
|
" "
|
|
39356
39450
|
] }) }),
|
|
39357
|
-
/* @__PURE__ */ (0,
|
|
39451
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FieldText, { state: editor, placeholder: state.turns ? "reply, or / for commands" : "ask anything, or / for commands" })
|
|
39358
39452
|
]
|
|
39359
39453
|
}
|
|
39360
39454
|
),
|
|
39361
|
-
paletteOpen ? /* @__PURE__ */ (0,
|
|
39362
|
-
matches.slice(0, 8).map((c, i) => /* @__PURE__ */ (0,
|
|
39363
|
-
/* @__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: [
|
|
39364
39458
|
i === paletteSel ? G.prompt : " ",
|
|
39365
39459
|
" "
|
|
39366
39460
|
] }),
|
|
39367
|
-
/* @__PURE__ */ (0,
|
|
39368
|
-
/* @__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 })
|
|
39369
39463
|
] }, c.name)),
|
|
39370
|
-
matches.length > 8 ? /* @__PURE__ */ (0,
|
|
39464
|
+
matches.length > 8 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { color: C.faint, children: [
|
|
39371
39465
|
" ",
|
|
39372
39466
|
G.down,
|
|
39373
39467
|
" ",
|
|
39374
39468
|
matches.length - 8,
|
|
39375
39469
|
" more \u2014 keep typing"
|
|
39376
39470
|
] }) : null,
|
|
39377
|
-
/* @__PURE__ */ (0,
|
|
39471
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Hints, { items: [["\u2191\u2193", "move"], ["tab", "complete"], ["enter", "run"], ["esc", "dismiss"]] })
|
|
39378
39472
|
] }) : null
|
|
39379
39473
|
] }) : null,
|
|
39380
|
-
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)(
|
|
39381
39475
|
StatusPanel,
|
|
39382
39476
|
{
|
|
39383
39477
|
width,
|
|
@@ -39405,14 +39499,14 @@ Spend it here: /login connects the Latent provider (or /key lk_\u2026 with a key
|
|
|
39405
39499
|
}
|
|
39406
39500
|
|
|
39407
39501
|
// src/ui/Root.tsx
|
|
39408
|
-
var
|
|
39502
|
+
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
39409
39503
|
function Root(p) {
|
|
39410
39504
|
const { exit } = use_app_default();
|
|
39411
39505
|
const { cols } = useTermSize();
|
|
39412
|
-
const [steps, setSteps] = (0,
|
|
39413
|
-
const [booted, setBooted] = (0,
|
|
39414
|
-
const [error, setError] = (0,
|
|
39415
|
-
(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)(() => {
|
|
39416
39510
|
boot(p.args, p.focus, (id, patch) => setSteps((list2) => list2.map((s2) => s2.id === id ? { ...s2, ...patch } : s2))).then(setBooted).catch((e) => {
|
|
39417
39511
|
const message = e instanceof Error ? e.message : String(e);
|
|
39418
39512
|
setError(message);
|
|
@@ -39427,7 +39521,7 @@ function Root(p) {
|
|
|
39427
39521
|
{ isActive: !booted }
|
|
39428
39522
|
);
|
|
39429
39523
|
if (!booted) {
|
|
39430
|
-
return /* @__PURE__ */ (0,
|
|
39524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
39431
39525
|
BootCard,
|
|
39432
39526
|
{
|
|
39433
39527
|
steps,
|
|
@@ -39439,7 +39533,7 @@ function Root(p) {
|
|
|
39439
39533
|
}
|
|
39440
39534
|
);
|
|
39441
39535
|
}
|
|
39442
|
-
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 }) });
|
|
39443
39537
|
}
|
|
39444
39538
|
|
|
39445
39539
|
// src/ads/attention.ts
|
|
@@ -39655,7 +39749,7 @@ function row(mark, label2, value, width = 10) {
|
|
|
39655
39749
|
}
|
|
39656
39750
|
|
|
39657
39751
|
// src/mcpCli.ts
|
|
39658
|
-
import { spawnSync as
|
|
39752
|
+
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
39659
39753
|
var HELP = `${a.bold("latentcode mcp")} \u2014 MCP servers (shared with OpenCode)
|
|
39660
39754
|
|
|
39661
39755
|
latentcode mcp list status of every server
|
|
@@ -39720,7 +39814,7 @@ async function mcpCommand(argv, cwd2 = process.cwd()) {
|
|
|
39720
39814
|
case "add": {
|
|
39721
39815
|
const project = rest.includes("--project");
|
|
39722
39816
|
const spec = parseMcpAdd(rest.filter((x) => x !== "--project"));
|
|
39723
|
-
const r =
|
|
39817
|
+
const r = spawnSync3(engineBin(), mcpAddArgv(spec, project ? "project" : "global"), { stdio: "inherit", cwd: cwd2 });
|
|
39724
39818
|
return r.status ?? 1;
|
|
39725
39819
|
}
|
|
39726
39820
|
case "remove":
|
|
@@ -39739,7 +39833,7 @@ async function mcpCommand(argv, cwd2 = process.cwd()) {
|
|
|
39739
39833
|
}
|
|
39740
39834
|
case "auth":
|
|
39741
39835
|
case "logout": {
|
|
39742
|
-
const r =
|
|
39836
|
+
const r = spawnSync3(engineBin(), ["mcp", sub, ...rest, "--standalone"], { stdio: "inherit", cwd: cwd2 });
|
|
39743
39837
|
return r.status ?? 1;
|
|
39744
39838
|
}
|
|
39745
39839
|
case "help":
|
|
@@ -39755,8 +39849,8 @@ ${HELP}`);
|
|
|
39755
39849
|
}
|
|
39756
39850
|
|
|
39757
39851
|
// src/index.tsx
|
|
39758
|
-
var
|
|
39759
|
-
var VERSION = "0.1.0-alpha.
|
|
39852
|
+
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
|
|
39853
|
+
var VERSION = "0.1.0-alpha.13";
|
|
39760
39854
|
var usage = () => `${logo()}
|
|
39761
39855
|
${a.dim(`v${VERSION} \xB7 terminal coding agent. Bring your own model access; earn while it works.`)}
|
|
39762
39856
|
|
|
@@ -39840,7 +39934,7 @@ ${usage()}`);
|
|
|
39840
39934
|
function auth(argv) {
|
|
39841
39935
|
const engine = resolveEngineBin();
|
|
39842
39936
|
if (!engine) throw new EngineError(ENGINE_NOT_FOUND);
|
|
39843
|
-
const r =
|
|
39937
|
+
const r = spawnSync4(engine.path, ["auth", ...argv.length ? argv : ["login"], "--standalone"], { stdio: "inherit" });
|
|
39844
39938
|
process.exit(r.status ?? 1);
|
|
39845
39939
|
}
|
|
39846
39940
|
async function status() {
|
|
@@ -39901,7 +39995,7 @@ async function main() {
|
|
|
39901
39995
|
const summary = { current: { turns: 0, tokens: 0, cost: 0, earned: 0, impressions: 0 } };
|
|
39902
39996
|
let fatal = false;
|
|
39903
39997
|
const app = render_default(
|
|
39904
|
-
/* @__PURE__ */ (0,
|
|
39998
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
39905
39999
|
Root,
|
|
39906
40000
|
{
|
|
39907
40001
|
args: { cwd: cwd2, model: args.model, noAds: args.noAds, auto: args.auto },
|