@moxxy/cli 0.31.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +604 -445
- package/package.json +2 -2
package/dist/bin.js
CHANGED
|
@@ -18540,8 +18540,8 @@ var init_catalog = __esm({
|
|
|
18540
18540
|
},
|
|
18541
18541
|
{
|
|
18542
18542
|
id: "browser",
|
|
18543
|
-
label: "
|
|
18544
|
-
description: "
|
|
18543
|
+
label: "Web & browser tools",
|
|
18544
|
+
description: "Local web_search fallback, web_fetch, and Playwright browser_session tools.",
|
|
18545
18545
|
packageName: "@moxxy/plugin-browser",
|
|
18546
18546
|
installSpec: "@moxxy/plugin-browser"
|
|
18547
18547
|
},
|
|
@@ -32882,9 +32882,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
32882
32882
|
if (process.env.NODE_ENV !== "production") {
|
|
32883
32883
|
module.exports = function $$$reconciler($$$hostConfig) {
|
|
32884
32884
|
var exports2 = {};
|
|
32885
|
-
var
|
|
32885
|
+
var React58 = require_react();
|
|
32886
32886
|
var Scheduler = require_scheduler();
|
|
32887
|
-
var ReactSharedInternals =
|
|
32887
|
+
var ReactSharedInternals = React58.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
32888
32888
|
var suppressWarning = false;
|
|
32889
32889
|
function setSuppressWarning(newSuppressWarning) {
|
|
32890
32890
|
{
|
|
@@ -52799,7 +52799,7 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
52799
52799
|
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
|
|
52800
52800
|
if (process.env.NODE_ENV !== "production") {
|
|
52801
52801
|
(function() {
|
|
52802
|
-
var
|
|
52802
|
+
var React58 = require_react();
|
|
52803
52803
|
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
|
|
52804
52804
|
var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
|
|
52805
52805
|
var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
@@ -52825,7 +52825,7 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
52825
52825
|
}
|
|
52826
52826
|
return null;
|
|
52827
52827
|
}
|
|
52828
|
-
var ReactSharedInternals =
|
|
52828
|
+
var ReactSharedInternals = React58.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
52829
52829
|
function error2(format) {
|
|
52830
52830
|
{
|
|
52831
52831
|
{
|
|
@@ -54814,10 +54814,30 @@ function formatValue(v3) {
|
|
|
54814
54814
|
return "[\u2026]";
|
|
54815
54815
|
}
|
|
54816
54816
|
}
|
|
54817
|
-
function
|
|
54818
|
-
if (
|
|
54819
|
-
return
|
|
54820
|
-
|
|
54817
|
+
function stringField(input, key) {
|
|
54818
|
+
if (!input || typeof input !== "object")
|
|
54819
|
+
return null;
|
|
54820
|
+
const value = input[key];
|
|
54821
|
+
return typeof value === "string" && value.trim() ? oneLine(value) : null;
|
|
54822
|
+
}
|
|
54823
|
+
function formatToolActivity(name, input, running) {
|
|
54824
|
+
const normalized = name.toLowerCase();
|
|
54825
|
+
if (normalized === "read")
|
|
54826
|
+
return `${running ? "Reading" : "Read"} ${stringField(input, "file_path") ?? "file"}`;
|
|
54827
|
+
if (normalized === "grep") {
|
|
54828
|
+
const pattern = stringField(input, "pattern") ?? "pattern";
|
|
54829
|
+
const cwd2 = stringField(input, "cwd");
|
|
54830
|
+
return `${running ? "Searching for" : "Searched for"} ${pattern}${cwd2 ? ` in ${cwd2}` : ""}`;
|
|
54831
|
+
}
|
|
54832
|
+
if (normalized === "glob")
|
|
54833
|
+
return `${running ? "Listing" : "Listed"} ${stringField(input, "pattern") ?? "files"}`;
|
|
54834
|
+
if (normalized === "bash")
|
|
54835
|
+
return `${running ? "Running" : "Ran"} ${stringField(input, "command") ?? "command"}`;
|
|
54836
|
+
if (normalized.includes("search")) {
|
|
54837
|
+
return `${running ? "Searching for" : "Searched for"} ${stringField(input, "query") ?? summarizeArgs(input)}`;
|
|
54838
|
+
}
|
|
54839
|
+
const summary = summarizeArgs(input);
|
|
54840
|
+
return `${running ? "Running" : "Ran"} ${name}${summary ? ` \xB7 ${summary}` : ""}`;
|
|
54821
54841
|
}
|
|
54822
54842
|
function buildCompactSummary(calls, inFlight) {
|
|
54823
54843
|
if (calls.length === 0)
|
|
@@ -54839,7 +54859,8 @@ function buildCompactSummary(calls, inFlight) {
|
|
|
54839
54859
|
const phrases = [];
|
|
54840
54860
|
let first = true;
|
|
54841
54861
|
for (const g2 of groups.values()) {
|
|
54842
|
-
const
|
|
54862
|
+
const stateVerb = inFlight ? g2.verb : completedCompactVerb(g2.verb);
|
|
54863
|
+
const verb = first ? stateVerb : stateVerb.toLowerCase();
|
|
54843
54864
|
const noun = g2.count === 1 ? g2.one : g2.other;
|
|
54844
54865
|
phrases.push(`${verb} ${g2.count} ${noun}`);
|
|
54845
54866
|
first = false;
|
|
@@ -54847,6 +54868,18 @@ function buildCompactSummary(calls, inFlight) {
|
|
|
54847
54868
|
const joined = phrases.join(", ");
|
|
54848
54869
|
return inFlight ? `${joined}\u2026` : joined;
|
|
54849
54870
|
}
|
|
54871
|
+
function completedCompactVerb(verb) {
|
|
54872
|
+
const known = {
|
|
54873
|
+
Reading: "Read",
|
|
54874
|
+
"Searching for": "Searched for",
|
|
54875
|
+
"Searching the web for": "Searched the web for",
|
|
54876
|
+
Listing: "Listed",
|
|
54877
|
+
Waiting: "Waited",
|
|
54878
|
+
Writing: "Wrote",
|
|
54879
|
+
Editing: "Edited"
|
|
54880
|
+
};
|
|
54881
|
+
return known[verb] ?? verb;
|
|
54882
|
+
}
|
|
54850
54883
|
function compactPreviewLine(call) {
|
|
54851
54884
|
const key = call.compact.previewKey;
|
|
54852
54885
|
if (key) {
|
|
@@ -55110,6 +55143,7 @@ function createFoldState(compactByName = EMPTY_COMPACT_MAP) {
|
|
|
55110
55143
|
compactByName,
|
|
55111
55144
|
callTargets: /* @__PURE__ */ new Map(),
|
|
55112
55145
|
suppressedCallIds: /* @__PURE__ */ new Set(),
|
|
55146
|
+
suppressedSkillScopes: /* @__PURE__ */ new Map(),
|
|
55113
55147
|
pendingLoadSkillCallId: null,
|
|
55114
55148
|
openScope: null,
|
|
55115
55149
|
continuationSkillEvent: null,
|
|
@@ -55137,6 +55171,7 @@ function stepFold(s2, e3) {
|
|
|
55137
55171
|
const closeOpenScope = () => {
|
|
55138
55172
|
closeOpenLive();
|
|
55139
55173
|
if (s2.openScope) {
|
|
55174
|
+
s2.openScope.loading = false;
|
|
55140
55175
|
s2.openScope.closed = true;
|
|
55141
55176
|
s2.openScope = null;
|
|
55142
55177
|
}
|
|
@@ -55175,6 +55210,7 @@ function stepFold(s2, e3) {
|
|
|
55175
55210
|
s2.pendingLoadSkillCallId = null;
|
|
55176
55211
|
s2.continuationSkillEvent = null;
|
|
55177
55212
|
s2.suppressedCallIds.clear();
|
|
55213
|
+
s2.suppressedSkillScopes.clear();
|
|
55178
55214
|
s2.subagentGroup.current = null;
|
|
55179
55215
|
s2.subagents.clear();
|
|
55180
55216
|
s2.collab.current = null;
|
|
@@ -55184,9 +55220,10 @@ function stepFold(s2, e3) {
|
|
|
55184
55220
|
if (e3.type === "skill_invoked") {
|
|
55185
55221
|
closeOpenScope();
|
|
55186
55222
|
s2.continuationSkillEvent = null;
|
|
55187
|
-
|
|
55188
|
-
|
|
55189
|
-
|
|
55223
|
+
const loadCallId = s2.pendingLoadSkillCallId;
|
|
55224
|
+
if (loadCallId) {
|
|
55225
|
+
s2.suppressedCallIds.add(loadCallId);
|
|
55226
|
+
removeBlockByCallId(loadCallId);
|
|
55190
55227
|
s2.pendingLoadSkillCallId = null;
|
|
55191
55228
|
}
|
|
55192
55229
|
s2.subagentGroup.current = null;
|
|
@@ -55195,8 +55232,11 @@ function stepFold(s2, e3) {
|
|
|
55195
55232
|
id: e3.id,
|
|
55196
55233
|
skillEvent: e3,
|
|
55197
55234
|
children: [],
|
|
55235
|
+
loading: loadCallId !== null,
|
|
55198
55236
|
closed: false
|
|
55199
55237
|
};
|
|
55238
|
+
if (loadCallId)
|
|
55239
|
+
s2.suppressedSkillScopes.set(loadCallId, s2.openScope);
|
|
55200
55240
|
s2.root.push(s2.openScope);
|
|
55201
55241
|
return;
|
|
55202
55242
|
}
|
|
@@ -55210,6 +55250,7 @@ function stepFold(s2, e3) {
|
|
|
55210
55250
|
id: `${s2.continuationSkillEvent.id}:cont:${e3.id}`,
|
|
55211
55251
|
skillEvent: s2.continuationSkillEvent,
|
|
55212
55252
|
children: [],
|
|
55253
|
+
loading: false,
|
|
55213
55254
|
closed: false
|
|
55214
55255
|
};
|
|
55215
55256
|
s2.root.push(s2.openScope);
|
|
@@ -55238,8 +55279,13 @@ function stepFold(s2, e3) {
|
|
|
55238
55279
|
return;
|
|
55239
55280
|
}
|
|
55240
55281
|
if (e3.type === "tool_result") {
|
|
55241
|
-
if (s2.suppressedCallIds.has(e3.callId))
|
|
55282
|
+
if (s2.suppressedCallIds.has(e3.callId)) {
|
|
55283
|
+
const scope = s2.suppressedSkillScopes.get(e3.callId);
|
|
55284
|
+
if (scope)
|
|
55285
|
+
scope.loading = false;
|
|
55286
|
+
s2.suppressedSkillScopes.delete(e3.callId);
|
|
55242
55287
|
return;
|
|
55288
|
+
}
|
|
55243
55289
|
const target = s2.callTargets.get(e3.callId);
|
|
55244
55290
|
if (target) {
|
|
55245
55291
|
target.outcome = e3;
|
|
@@ -55247,8 +55293,13 @@ function stepFold(s2, e3) {
|
|
|
55247
55293
|
}
|
|
55248
55294
|
}
|
|
55249
55295
|
if (e3.type === "tool_call_denied") {
|
|
55250
|
-
if (s2.suppressedCallIds.has(e3.callId))
|
|
55296
|
+
if (s2.suppressedCallIds.has(e3.callId)) {
|
|
55297
|
+
const scope = s2.suppressedSkillScopes.get(e3.callId);
|
|
55298
|
+
if (scope)
|
|
55299
|
+
scope.loading = false;
|
|
55300
|
+
s2.suppressedSkillScopes.delete(e3.callId);
|
|
55251
55301
|
return;
|
|
55302
|
+
}
|
|
55252
55303
|
const target = s2.callTargets.get(e3.callId);
|
|
55253
55304
|
if (target) {
|
|
55254
55305
|
target.outcome = { type: "denied", reason: e3.reason };
|
|
@@ -55355,6 +55406,8 @@ function blocksEquivalent(a2, b3) {
|
|
|
55355
55406
|
return true;
|
|
55356
55407
|
}
|
|
55357
55408
|
if (a2.kind === "skill-scope" && b3.kind === "skill-scope") {
|
|
55409
|
+
if (a2.loading !== b3.loading)
|
|
55410
|
+
return false;
|
|
55358
55411
|
if (a2.closed !== b3.closed)
|
|
55359
55412
|
return false;
|
|
55360
55413
|
if (a2.children.length !== b3.children.length)
|
|
@@ -55931,6 +55984,9 @@ var init_AssistantBlock = __esm({
|
|
|
55931
55984
|
});
|
|
55932
55985
|
|
|
55933
55986
|
// ../plugin-cli/dist/components/chat/EventLine.js
|
|
55987
|
+
function formatTriggerOrigin(origin) {
|
|
55988
|
+
return TRIGGER_VERBS[origin.kind];
|
|
55989
|
+
}
|
|
55934
55990
|
function collapseBlankLines(text) {
|
|
55935
55991
|
return text.replace(/\n[ \t]*\n+/g, "\n").replace(/^\s+|\s+$/g, "");
|
|
55936
55992
|
}
|
|
@@ -55957,7 +56013,7 @@ function trimFixed(value) {
|
|
|
55957
56013
|
function plural(count, noun) {
|
|
55958
56014
|
return count === 1 ? noun : `${noun}s`;
|
|
55959
56015
|
}
|
|
55960
|
-
var import_jsx_runtime12, EventLine;
|
|
56016
|
+
var import_jsx_runtime12, EventLine, TRIGGER_VERBS;
|
|
55961
56017
|
var init_EventLine = __esm({
|
|
55962
56018
|
async "../plugin-cli/dist/components/chat/EventLine.js"() {
|
|
55963
56019
|
import_jsx_runtime12 = __toESM(require_jsx_runtime());
|
|
@@ -55969,6 +56025,9 @@ var init_EventLine = __esm({
|
|
|
55969
56025
|
EventLine = ({ event, expandToolOutputs }) => {
|
|
55970
56026
|
switch (event.type) {
|
|
55971
56027
|
case "user_prompt":
|
|
56028
|
+
if (event.origin) {
|
|
56029
|
+
return (0, import_jsx_runtime12.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [(0, import_jsx_runtime12.jsxs)(Box_default, { children: [(0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: `${Glyphs.filled} ${formatTriggerOrigin(event.origin)} \xB7 ` }), (0, import_jsx_runtime12.jsx)(Text, { children: event.origin.name }), !expandToolOutputs ? (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: " \u203A" }) : null] }), expandToolOutputs ? (0, import_jsx_runtime12.jsx)(Box_default, { marginLeft: 2, children: (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: event.text }) }) : null] });
|
|
56030
|
+
}
|
|
55972
56031
|
if (event.source && event.source !== "user") {
|
|
55973
56032
|
return (0, import_jsx_runtime12.jsx)(Box_default, { marginTop: 1, children: (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: `${Glyphs.midDot} ${event.text}` }) });
|
|
55974
56033
|
}
|
|
@@ -56002,6 +56061,12 @@ var init_EventLine = __esm({
|
|
|
56002
56061
|
return null;
|
|
56003
56062
|
}
|
|
56004
56063
|
};
|
|
56064
|
+
TRIGGER_VERBS = {
|
|
56065
|
+
webhook: "Webhook received",
|
|
56066
|
+
schedule: "Schedule fired",
|
|
56067
|
+
workflow: "Workflow ran",
|
|
56068
|
+
checkpoint: "Checkpoint intervened"
|
|
56069
|
+
};
|
|
56005
56070
|
}
|
|
56006
56071
|
});
|
|
56007
56072
|
var import_jsx_runtime13, COLLAPSED_ROWS, ADD_BG, DEL_BG, DiffRowLine, FileDiffView;
|
|
@@ -56056,70 +56121,102 @@ var init_motion = __esm({
|
|
|
56056
56121
|
})();
|
|
56057
56122
|
}
|
|
56058
56123
|
});
|
|
56059
|
-
|
|
56060
|
-
|
|
56061
|
-
|
|
56124
|
+
|
|
56125
|
+
// ../plugin-cli/dist/components/chat/ShimmerText.js
|
|
56126
|
+
function shimmerSlices(text, frame, width = 6) {
|
|
56127
|
+
if (!text)
|
|
56128
|
+
return { before: "", glow: "", after: "" };
|
|
56129
|
+
const safeWidth = Math.max(1, Math.min(width, text.length));
|
|
56130
|
+
const start = frame % (text.length + safeWidth) - safeWidth;
|
|
56131
|
+
const from = Math.max(0, start);
|
|
56132
|
+
const to = Math.min(text.length, start + safeWidth);
|
|
56133
|
+
return {
|
|
56134
|
+
before: text.slice(0, from),
|
|
56135
|
+
glow: to > from ? text.slice(from, to) : "",
|
|
56136
|
+
after: text.slice(Math.max(from, to))
|
|
56137
|
+
};
|
|
56138
|
+
}
|
|
56139
|
+
var import_jsx_runtime14, import_react35, ShimmerText;
|
|
56140
|
+
var init_ShimmerText = __esm({
|
|
56141
|
+
async "../plugin-cli/dist/components/chat/ShimmerText.js"() {
|
|
56062
56142
|
import_jsx_runtime14 = __toESM(require_jsx_runtime());
|
|
56063
56143
|
import_react35 = __toESM(require_react());
|
|
56064
56144
|
await init_build2();
|
|
56065
|
-
init_theme();
|
|
56066
|
-
init_dist7();
|
|
56067
|
-
await init_FileDiffView();
|
|
56068
56145
|
init_motion();
|
|
56069
|
-
|
|
56070
|
-
const [
|
|
56146
|
+
ShimmerText = ({ text, active: active2 }) => {
|
|
56147
|
+
const [frame, setFrame] = (0, import_react35.useState)(0);
|
|
56071
56148
|
(0, import_react35.useEffect)(() => {
|
|
56072
|
-
if (!MOTION_ENABLED)
|
|
56149
|
+
if (!active2 || !MOTION_ENABLED)
|
|
56073
56150
|
return;
|
|
56074
|
-
const
|
|
56075
|
-
return () => clearInterval(
|
|
56076
|
-
}, []);
|
|
56077
|
-
|
|
56078
|
-
|
|
56151
|
+
const timer = setInterval(() => setFrame((value) => value + 1), 90);
|
|
56152
|
+
return () => clearInterval(timer);
|
|
56153
|
+
}, [active2]);
|
|
56154
|
+
if (!active2 || !MOTION_ENABLED)
|
|
56155
|
+
return (0, import_jsx_runtime14.jsx)(Text, { dimColor: true, children: text });
|
|
56156
|
+
const slices = shimmerSlices(text, frame);
|
|
56157
|
+
return (0, import_jsx_runtime14.jsxs)(Text, { children: [(0, import_jsx_runtime14.jsx)(Text, { dimColor: true, children: slices.before }), (0, import_jsx_runtime14.jsx)(Text, { bold: true, children: slices.glow }), (0, import_jsx_runtime14.jsx)(Text, { dimColor: true, children: slices.after })] });
|
|
56158
|
+
};
|
|
56159
|
+
}
|
|
56160
|
+
});
|
|
56161
|
+
function toolGlyph(name) {
|
|
56162
|
+
const normalized = name.toLowerCase();
|
|
56163
|
+
if (normalized === "read" || normalized === "glob")
|
|
56164
|
+
return "\u25B1";
|
|
56165
|
+
if (normalized === "grep" || normalized.includes("search"))
|
|
56166
|
+
return "\u2315";
|
|
56167
|
+
if (normalized === "bash" || normalized.includes("command"))
|
|
56168
|
+
return "\u203A";
|
|
56169
|
+
return "\u25C7";
|
|
56170
|
+
}
|
|
56171
|
+
var import_jsx_runtime15, NAME_DISPLAY_MAX, ToolCallBlock, OutcomeText;
|
|
56172
|
+
var init_ToolCallBlock = __esm({
|
|
56173
|
+
async "../plugin-cli/dist/components/chat/ToolCallBlock.js"() {
|
|
56174
|
+
import_jsx_runtime15 = __toESM(require_jsx_runtime());
|
|
56175
|
+
__toESM(require_react());
|
|
56176
|
+
await init_build2();
|
|
56177
|
+
init_theme();
|
|
56178
|
+
init_dist7();
|
|
56179
|
+
await init_FileDiffView();
|
|
56180
|
+
await init_ShimmerText();
|
|
56079
56181
|
NAME_DISPLAY_MAX = 48;
|
|
56080
|
-
ToolCallBlock = ({ request, outcome, expanded = false }) => {
|
|
56182
|
+
ToolCallBlock = ({ request, outcome, expanded = false, nested = false }) => {
|
|
56081
56183
|
if (isFileDiffResult(outcome)) {
|
|
56082
56184
|
const display = outcome.output.display;
|
|
56083
56185
|
if (isFileDiffDisplay(display)) {
|
|
56084
|
-
return (0,
|
|
56186
|
+
return (0, import_jsx_runtime15.jsx)(FileDiffView, { display, expanded });
|
|
56085
56187
|
}
|
|
56086
56188
|
}
|
|
56087
56189
|
const status = outcome === null ? "pending" : outcome.type === "denied" ? "err" : outcome.ok ? "ok" : "err";
|
|
56088
|
-
const
|
|
56089
|
-
|
|
56090
|
-
const detail = argSummary ? `${nameLabel}, ${argSummary}` : nameLabel;
|
|
56091
|
-
return (0, import_jsx_runtime14.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [(0, import_jsx_runtime14.jsxs)(Box_default, { children: [status === "pending" ? (0, import_jsx_runtime14.jsx)(PendingBullet, {}) : status === "err" ? (
|
|
56092
|
-
// Distinct glyph (✗), not color alone, so a failed call is
|
|
56093
|
-
// distinguishable from a successful one in a no-color / colorblind
|
|
56094
|
-
// terminal — the dots were otherwise an identical filled '●'.
|
|
56095
|
-
(0, import_jsx_runtime14.jsx)(Text, { color: Colors.danger, children: "\u2717 " })
|
|
56096
|
-
) : (0, import_jsx_runtime14.jsxs)(Text, { color: dotColorForTool(request.name), children: [Glyphs.filled, " "] }), (0, import_jsx_runtime14.jsx)(Text, { bold: true, children: "Tool" }), (0, import_jsx_runtime14.jsx)(Text, { dimColor: true, children: ` (${detail})` })] }), outcome ? (0, import_jsx_runtime14.jsxs)(Box_default, { children: [(0, import_jsx_runtime14.jsx)(Text, { dimColor: true, children: " \u2514 " }), (0, import_jsx_runtime14.jsx)(OutcomeText, { outcome })] }) : null] });
|
|
56190
|
+
const detail = truncate3(formatToolActivity(request.name, request.input, status === "pending"), NAME_DISPLAY_MAX + 70);
|
|
56191
|
+
return (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "column", marginTop: nested ? 0 : 1, children: [(0, import_jsx_runtime15.jsxs)(Box_default, { children: [nested ? (0, import_jsx_runtime15.jsx)(Text, { dimColor: true, children: "\u2514 " }) : null, (0, import_jsx_runtime15.jsxs)(Text, { color: status === "err" ? Colors.danger : status === "ok" ? Colors.active : void 0, dimColor: status === "pending", children: [status === "err" ? "\u2717" : status === "ok" ? "\u2713" : toolGlyph(request.name), " "] }), (0, import_jsx_runtime15.jsx)(ShimmerText, { text: detail, active: status === "pending" }), status === "err" ? (0, import_jsx_runtime15.jsx)(Text, { color: Colors.danger, children: " failed" }) : null] }), outcome && (expanded || status === "err") ? (0, import_jsx_runtime15.jsxs)(Box_default, { marginLeft: nested ? 2 : 0, children: [(0, import_jsx_runtime15.jsx)(Text, { dimColor: true, children: nested ? " " : " \u2514 " }), (0, import_jsx_runtime15.jsx)(OutcomeText, { outcome })] }) : null] });
|
|
56097
56192
|
};
|
|
56098
56193
|
OutcomeText = ({ outcome }) => {
|
|
56099
56194
|
if (outcome.type === "denied") {
|
|
56100
|
-
return (0,
|
|
56195
|
+
return (0, import_jsx_runtime15.jsxs)(Text, { color: Colors.danger, children: ["denied: ", outcome.reason] });
|
|
56101
56196
|
}
|
|
56102
56197
|
if (!outcome.ok) {
|
|
56103
|
-
return (0,
|
|
56198
|
+
return (0, import_jsx_runtime15.jsxs)(Text, { color: Colors.danger, children: [outcome.error?.kind ?? "error", ": ", outcome.error?.message] });
|
|
56104
56199
|
}
|
|
56105
56200
|
const preview = oneLine(stringify(outcome.output));
|
|
56106
|
-
return (0,
|
|
56201
|
+
return (0, import_jsx_runtime15.jsx)(Text, { dimColor: true, children: truncate3(preview, 100) });
|
|
56107
56202
|
};
|
|
56108
56203
|
}
|
|
56109
56204
|
});
|
|
56110
56205
|
|
|
56111
56206
|
// ../plugin-cli/dist/components/chat/LiveToolBlock.js
|
|
56112
|
-
var
|
|
56207
|
+
var import_jsx_runtime16, LiveToolBlock;
|
|
56113
56208
|
var init_LiveToolBlock = __esm({
|
|
56114
56209
|
async "../plugin-cli/dist/components/chat/LiveToolBlock.js"() {
|
|
56115
|
-
|
|
56210
|
+
import_jsx_runtime16 = __toESM(require_jsx_runtime());
|
|
56116
56211
|
__toESM(require_react());
|
|
56117
56212
|
await init_build2();
|
|
56118
56213
|
init_theme();
|
|
56119
56214
|
await init_ToolCallBlock();
|
|
56215
|
+
await init_ShimmerText();
|
|
56120
56216
|
init_dist7();
|
|
56121
|
-
LiveToolBlock = ({ block, expanded }) => {
|
|
56122
|
-
const inFlight =
|
|
56217
|
+
LiveToolBlock = ({ block, expanded, nested = false }) => {
|
|
56218
|
+
const inFlight = block.calls.some((call) => call.outcome === null);
|
|
56219
|
+
const showDetails = expanded || inFlight;
|
|
56123
56220
|
const summary = buildCompactSummary(block.calls, inFlight);
|
|
56124
56221
|
const latest = block.calls[block.calls.length - 1];
|
|
56125
56222
|
const errorCount = block.calls.reduce((n2, c2) => {
|
|
@@ -56130,25 +56227,25 @@ var init_LiveToolBlock = __esm({
|
|
|
56130
56227
|
return n2 + 1;
|
|
56131
56228
|
return n2 + (o2.ok ? 0 : 1);
|
|
56132
56229
|
}, 0);
|
|
56133
|
-
return (0,
|
|
56230
|
+
return (0, import_jsx_runtime16.jsxs)(Box_default, { flexDirection: "column", marginTop: nested ? 0 : 1, children: [(0, import_jsx_runtime16.jsxs)(Box_default, { children: [nested ? (0, import_jsx_runtime16.jsx)(Text, { dimColor: true, children: "\u2514 " }) : null, (0, import_jsx_runtime16.jsxs)(Text, { dimColor: true, children: [latest ? toolGlyph(latest.request.name) : Glyphs.pending, " "] }), (0, import_jsx_runtime16.jsx)(ShimmerText, { text: summary, active: inFlight }), !showDetails ? (0, import_jsx_runtime16.jsx)(Text, { dimColor: true, children: " \u203A" }) : null] }), errorCount > 0 && !showDetails ? (0, import_jsx_runtime16.jsx)(Box_default, { marginLeft: 2, children: (0, import_jsx_runtime16.jsxs)(Text, { color: Colors.danger, children: [errorCount, " ", errorCount === 1 ? "call" : "calls", " failed \u2014 press ctrl+o for detail"] }) }) : null, !showDetails && latest ? (0, import_jsx_runtime16.jsxs)(Box_default, { marginLeft: 2, children: [(0, import_jsx_runtime16.jsx)(Text, { dimColor: true, children: "\u2514 " }), (0, import_jsx_runtime16.jsx)(Text, { dimColor: true, children: compactPreviewLine(latest) })] }) : null, showDetails ? (0, import_jsx_runtime16.jsx)(Box_default, { flexDirection: "column", marginLeft: 2, children: block.calls.map((c2) => (0, import_jsx_runtime16.jsx)(ToolCallBlock, { request: c2.request, outcome: c2.outcome, nested: true }, c2.id)) }) : null] });
|
|
56134
56231
|
};
|
|
56135
56232
|
}
|
|
56136
56233
|
});
|
|
56137
56234
|
|
|
56138
56235
|
// ../plugin-cli/dist/components/chat/SubagentScopeView.js
|
|
56139
|
-
var
|
|
56236
|
+
var import_jsx_runtime17, import_react38, SubagentScopeView;
|
|
56140
56237
|
var init_SubagentScopeView = __esm({
|
|
56141
56238
|
async "../plugin-cli/dist/components/chat/SubagentScopeView.js"() {
|
|
56142
|
-
|
|
56143
|
-
|
|
56239
|
+
import_jsx_runtime17 = __toESM(require_jsx_runtime());
|
|
56240
|
+
import_react38 = __toESM(require_react());
|
|
56144
56241
|
await init_build2();
|
|
56145
56242
|
init_theme();
|
|
56146
56243
|
init_dist7();
|
|
56147
56244
|
init_motion();
|
|
56148
56245
|
SubagentScopeView = ({ scope }) => {
|
|
56149
|
-
const [now, setNow] = (0,
|
|
56246
|
+
const [now, setNow] = (0, import_react38.useState)(() => Date.now());
|
|
56150
56247
|
const running = scope.completedAtMs == null && scope.error == null;
|
|
56151
|
-
(0,
|
|
56248
|
+
(0, import_react38.useEffect)(() => {
|
|
56152
56249
|
if (!running || !MOTION_ENABLED)
|
|
56153
56250
|
return;
|
|
56154
56251
|
const t2 = setInterval(() => setNow(Date.now()), 1e3);
|
|
@@ -56159,16 +56256,16 @@ var init_SubagentScopeView = __esm({
|
|
|
56159
56256
|
const toolPart = `${scope.toolCallCount} tool call${scope.toolCallCount === 1 ? "" : "s"}`;
|
|
56160
56257
|
const dotColor = scope.error ? Colors.danger : running ? Colors.busy : DotColors.subagent;
|
|
56161
56258
|
const state = scope.error ? "failed" : running ? "running" : "done";
|
|
56162
|
-
return (0,
|
|
56259
|
+
return (0, import_jsx_runtime17.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [(0, import_jsx_runtime17.jsxs)(Box_default, { children: [(0, import_jsx_runtime17.jsxs)(Text, { color: dotColor, children: [Glyphs.filled, " "] }), (0, import_jsx_runtime17.jsx)(Text, { bold: true, children: `agent ` }), (0, import_jsx_runtime17.jsx)(Text, { children: scope.label }), (0, import_jsx_runtime17.jsx)(Text, { dimColor: true, children: ` ${state} ${elapsed} \xB7 ${toolPart}` })] }), scope.error ? (0, import_jsx_runtime17.jsxs)(Box_default, { marginLeft: 2, children: [(0, import_jsx_runtime17.jsx)(Text, { dimColor: true, children: "\u2514 " }), (0, import_jsx_runtime17.jsx)(Text, { color: Colors.danger, children: truncate3(scope.error, 100) })] }) : scope.finalPreview && !running ? (0, import_jsx_runtime17.jsx)(Box_default, { marginLeft: 2, children: (0, import_jsx_runtime17.jsx)(Text, { dimColor: true, children: `\u2514 ${truncate3(scope.finalPreview, 100)}` }) }) : null] });
|
|
56163
56260
|
};
|
|
56164
56261
|
}
|
|
56165
56262
|
});
|
|
56166
56263
|
|
|
56167
56264
|
// ../plugin-cli/dist/components/chat/SubagentGroupView.js
|
|
56168
|
-
var
|
|
56265
|
+
var import_jsx_runtime18, LABEL_MAX, ERROR_MAX, SubagentGroupView, SubagentRow;
|
|
56169
56266
|
var init_SubagentGroupView = __esm({
|
|
56170
56267
|
async "../plugin-cli/dist/components/chat/SubagentGroupView.js"() {
|
|
56171
|
-
|
|
56268
|
+
import_jsx_runtime18 = __toESM(require_jsx_runtime());
|
|
56172
56269
|
__toESM(require_react());
|
|
56173
56270
|
await init_build2();
|
|
56174
56271
|
init_theme();
|
|
@@ -56188,9 +56285,9 @@ var init_SubagentGroupView = __esm({
|
|
|
56188
56285
|
const failTail = failed > 0 ? ` (${failed} failed)` : "";
|
|
56189
56286
|
const header = `${total} ${typeWord}${noun} ${verb}${failTail}`;
|
|
56190
56287
|
if (!expandToolOutputs) {
|
|
56191
|
-
return (0,
|
|
56288
|
+
return (0, import_jsx_runtime18.jsxs)(Box_default, { marginTop: 1, children: [(0, import_jsx_runtime18.jsxs)(Text, { color: dotColor, children: [Glyphs.filled, " "] }), (0, import_jsx_runtime18.jsx)(Text, { children: header }), (0, import_jsx_runtime18.jsx)(Text, { dimColor: true, children: " (ctrl+o to expand)" })] });
|
|
56192
56289
|
}
|
|
56193
|
-
return (0,
|
|
56290
|
+
return (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [(0, import_jsx_runtime18.jsxs)(Box_default, { children: [(0, import_jsx_runtime18.jsxs)(Text, { color: dotColor, children: [Glyphs.filled, " "] }), (0, import_jsx_runtime18.jsx)(Text, { children: header })] }), (0, import_jsx_runtime18.jsx)(Box_default, { flexDirection: "column", marginLeft: 2, children: agents.map((a2) => (0, import_jsx_runtime18.jsx)(SubagentRow, { agent: a2 }, a2.id)) })] });
|
|
56194
56291
|
};
|
|
56195
56292
|
SubagentRow = ({ agent }) => {
|
|
56196
56293
|
const running = agent.completedAtMs == null && agent.error == null;
|
|
@@ -56198,17 +56295,17 @@ var init_SubagentGroupView = __esm({
|
|
|
56198
56295
|
const toolPart = `${agent.toolCallCount} tool use${agent.toolCallCount === 1 ? "" : "s"}`;
|
|
56199
56296
|
const statusColor = agent.error ? Colors.danger : running ? Colors.busy : DotColors.subagent;
|
|
56200
56297
|
const statusText = agent.error ? truncate3(agent.error, ERROR_MAX) : running ? "running" : "Done";
|
|
56201
|
-
return (0,
|
|
56298
|
+
return (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", children: [(0, import_jsx_runtime18.jsxs)(Box_default, { children: [(0, import_jsx_runtime18.jsx)(Text, { dimColor: true, children: "\u251C " }), (0, import_jsx_runtime18.jsx)(Text, { children: truncate3(agent.label, LABEL_MAX) }), (0, import_jsx_runtime18.jsx)(Text, { dimColor: true, children: ` \xB7 ${toolPart}` }), tokens ? (0, import_jsx_runtime18.jsx)(Text, { dimColor: true, children: ` \xB7 ${tokens} tokens` }) : null] }), (0, import_jsx_runtime18.jsxs)(Box_default, { children: [(0, import_jsx_runtime18.jsx)(Text, { dimColor: true, children: "\u2502 \u2514 " }), (0, import_jsx_runtime18.jsx)(Text, { color: statusColor, children: statusText })] })] });
|
|
56202
56299
|
};
|
|
56203
56300
|
}
|
|
56204
56301
|
});
|
|
56205
56302
|
|
|
56206
56303
|
// ../plugin-cli/dist/components/chat/CollabScopeView.js
|
|
56207
|
-
var
|
|
56304
|
+
var import_jsx_runtime19, import_react40, MAX_AGENTS, MAX_TASKS, MAX_MSGS, CollabScopeView;
|
|
56208
56305
|
var init_CollabScopeView = __esm({
|
|
56209
56306
|
async "../plugin-cli/dist/components/chat/CollabScopeView.js"() {
|
|
56210
|
-
|
|
56211
|
-
|
|
56307
|
+
import_jsx_runtime19 = __toESM(require_jsx_runtime());
|
|
56308
|
+
import_react40 = __toESM(require_react());
|
|
56212
56309
|
await init_build2();
|
|
56213
56310
|
init_theme();
|
|
56214
56311
|
init_dist7();
|
|
@@ -56217,9 +56314,9 @@ var init_CollabScopeView = __esm({
|
|
|
56217
56314
|
MAX_TASKS = 6;
|
|
56218
56315
|
MAX_MSGS = 6;
|
|
56219
56316
|
CollabScopeView = ({ scope }) => {
|
|
56220
|
-
const [now, setNow] = (0,
|
|
56317
|
+
const [now, setNow] = (0, import_react40.useState)(() => Date.now());
|
|
56221
56318
|
const running = scope.completedAtMs == null;
|
|
56222
|
-
(0,
|
|
56319
|
+
(0, import_react40.useEffect)(() => {
|
|
56223
56320
|
if (!running || !MOTION_ENABLED)
|
|
56224
56321
|
return;
|
|
56225
56322
|
const t2 = setInterval(() => setNow(Date.now()), 1e3);
|
|
@@ -56229,51 +56326,71 @@ var init_CollabScopeView = __esm({
|
|
|
56229
56326
|
const done = scope.agents.filter((a2) => a2.status === "done").length;
|
|
56230
56327
|
const state = running ? scope.control?.paused ? "paused" : "running" : scope.conflicts.length > 0 ? "done \xB7 conflicts" : "done";
|
|
56231
56328
|
const headColor = scope.conflicts.length > 0 ? Colors.danger : Colors.busy;
|
|
56232
|
-
return (0,
|
|
56329
|
+
return (0, import_jsx_runtime19.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [(0, import_jsx_runtime19.jsxs)(Box_default, { children: [(0, import_jsx_runtime19.jsxs)(Text, { color: headColor, children: [Glyphs.filled, " "] }), (0, import_jsx_runtime19.jsx)(Text, { bold: true, children: "collab " }), (0, import_jsx_runtime19.jsx)(Text, { children: truncate3(scope.task, 50) }), (0, import_jsx_runtime19.jsx)(Text, { dimColor: true, children: ` ${state} ${elapsed} \xB7 ${done}/${scope.agents.length} done` })] }), scope.fallbackReason ? (0, import_jsx_runtime19.jsx)(Box_default, { marginLeft: 2, children: (0, import_jsx_runtime19.jsx)(Text, { dimColor: true, children: `! ${truncate3(scope.fallbackReason, 90)}` }) }) : null, (0, import_jsx_runtime19.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [scope.agents.slice(0, MAX_AGENTS).map((a2) => {
|
|
56233
56330
|
const glyph = a2.status === "done" ? "\u2713" : a2.status === "working" ? "\u25CF" : a2.status === "crashed" ? "\u2717" : "\u25CB";
|
|
56234
56331
|
const statusProps = a2.status === "working" ? { color: Colors.busy } : a2.status === "crashed" ? { color: Colors.danger } : { dimColor: true };
|
|
56235
|
-
return (0,
|
|
56236
|
-
}), scope.agents.length > MAX_AGENTS ? (0,
|
|
56332
|
+
return (0, import_jsx_runtime19.jsxs)(Box_default, { children: [(0, import_jsx_runtime19.jsxs)(Text, { ...statusProps, children: [glyph, " "] }), (0, import_jsx_runtime19.jsx)(Text, { children: a2.name }), (0, import_jsx_runtime19.jsx)(Text, { dimColor: true, children: ` ${a2.role} \xB7 ${a2.status}` })] }, a2.id);
|
|
56333
|
+
}), scope.agents.length > MAX_AGENTS ? (0, import_jsx_runtime19.jsx)(Text, { dimColor: true, children: ` +${scope.agents.length - MAX_AGENTS} more` }) : null] }), scope.tasks.length > 0 ? (0, import_jsx_runtime19.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [(0, import_jsx_runtime19.jsx)(Text, { dimColor: true, children: `board (${scope.tasks.filter((t2) => t2.status === "done").length}/${scope.tasks.length})` }), scope.tasks.slice(0, MAX_TASKS).map((t2) => (0, import_jsx_runtime19.jsx)(Text, { dimColor: true, children: ` [${t2.status}] ${truncate3(t2.title, 40)}${t2.owner ? ` @${t2.owner}` : ""}` }, t2.id))] }) : null, scope.contracts.length > 0 ? (0, import_jsx_runtime19.jsx)(Box_default, { marginLeft: 2, children: (0, import_jsx_runtime19.jsx)(Text, { dimColor: true, children: `contracts: ${truncate3(scope.contracts.map((c2) => c2.title).join(", "), 80)}` }) }) : null, scope.messages.length > 0 ? (0, import_jsx_runtime19.jsx)(Box_default, { flexDirection: "column", marginLeft: 2, children: scope.messages.slice(-MAX_MSGS).map((m3) => (0, import_jsx_runtime19.jsx)(Text, { dimColor: true, children: ` ${m3.from} \u2192 ${m3.to}: ${truncate3(m3.body, 70)}` }, m3.id)) }) : null] });
|
|
56237
56334
|
};
|
|
56238
56335
|
}
|
|
56239
56336
|
});
|
|
56240
56337
|
|
|
56241
56338
|
// ../plugin-cli/dist/components/chat/BlockLine.js
|
|
56242
|
-
|
|
56339
|
+
function skillActivityPresentation(scope, childToolCount = countToolCalls(scope.children)) {
|
|
56340
|
+
const name = truncate3(scope.skillEvent.name, NAME_DISPLAY_MAX2);
|
|
56341
|
+
const meta = childToolCount > 0 ? `${childToolCount} tool${childToolCount === 1 ? "" : "s"}` : null;
|
|
56342
|
+
if (scope.loading)
|
|
56343
|
+
return { label: `Loading skill ${name}\u2026`, meta, active: true };
|
|
56344
|
+
if (scope.closed)
|
|
56345
|
+
return { label: `Used skill ${name}`, meta, active: false };
|
|
56346
|
+
if (childToolCount > 0)
|
|
56347
|
+
return { label: `Using skill ${name}`, meta, active: false };
|
|
56348
|
+
return { label: `Loaded skill ${name}`, meta: null, active: false };
|
|
56349
|
+
}
|
|
56350
|
+
function hasRunningTool(block) {
|
|
56351
|
+
if (block.kind === "tool-call")
|
|
56352
|
+
return block.outcome === null;
|
|
56353
|
+
if (block.kind === "live-tools")
|
|
56354
|
+
return block.calls.some((call) => call.outcome === null);
|
|
56355
|
+
if (block.kind === "skill-scope")
|
|
56356
|
+
return block.children.some(hasRunningTool);
|
|
56357
|
+
return false;
|
|
56358
|
+
}
|
|
56359
|
+
var import_jsx_runtime20, import_react41, NAME_DISPLAY_MAX2, BlockLine, SkillScopeView;
|
|
56243
56360
|
var init_BlockLine = __esm({
|
|
56244
56361
|
async "../plugin-cli/dist/components/chat/BlockLine.js"() {
|
|
56245
|
-
|
|
56246
|
-
|
|
56362
|
+
import_jsx_runtime20 = __toESM(require_jsx_runtime());
|
|
56363
|
+
import_react41 = __toESM(require_react());
|
|
56247
56364
|
await init_build2();
|
|
56248
|
-
init_theme();
|
|
56249
56365
|
await init_EventLine();
|
|
56250
56366
|
await init_LiveToolBlock();
|
|
56251
56367
|
await init_ToolCallBlock();
|
|
56252
56368
|
await init_SubagentScopeView();
|
|
56253
56369
|
await init_SubagentGroupView();
|
|
56254
56370
|
await init_CollabScopeView();
|
|
56371
|
+
await init_ShimmerText();
|
|
56255
56372
|
init_dist7();
|
|
56256
56373
|
NAME_DISPLAY_MAX2 = 48;
|
|
56257
|
-
BlockLine = (0,
|
|
56258
|
-
function BlockLine2({ block, expandToolOutputs }) {
|
|
56374
|
+
BlockLine = (0, import_react41.memo)(
|
|
56375
|
+
function BlockLine2({ block, expandToolOutputs, renderVersion, nested = false }) {
|
|
56259
56376
|
if (block.kind === "event")
|
|
56260
|
-
return (0,
|
|
56377
|
+
return (0, import_jsx_runtime20.jsx)(EventLine, { event: block.event, expandToolOutputs });
|
|
56261
56378
|
if (block.kind === "tool-call") {
|
|
56262
|
-
return (0,
|
|
56379
|
+
return (0, import_jsx_runtime20.jsx)(ToolCallBlock, { request: block.request, outcome: block.outcome, expanded: expandToolOutputs, nested });
|
|
56263
56380
|
}
|
|
56264
56381
|
if (block.kind === "subagent-group") {
|
|
56265
|
-
return (0,
|
|
56382
|
+
return (0, import_jsx_runtime20.jsx)(SubagentGroupView, { group: block, expandToolOutputs });
|
|
56266
56383
|
}
|
|
56267
56384
|
if (block.kind === "subagent") {
|
|
56268
|
-
return (0,
|
|
56385
|
+
return (0, import_jsx_runtime20.jsx)(SubagentScopeView, { scope: block });
|
|
56269
56386
|
}
|
|
56270
56387
|
if (block.kind === "live-tools") {
|
|
56271
|
-
return (0,
|
|
56388
|
+
return (0, import_jsx_runtime20.jsx)(LiveToolBlock, { block, expanded: expandToolOutputs, nested });
|
|
56272
56389
|
}
|
|
56273
56390
|
if (block.kind === "collab") {
|
|
56274
|
-
return (0,
|
|
56391
|
+
return (0, import_jsx_runtime20.jsx)(CollabScopeView, { scope: block });
|
|
56275
56392
|
}
|
|
56276
|
-
return (0,
|
|
56393
|
+
return (0, import_jsx_runtime20.jsx)(SkillScopeView, { scope: block, expandToolOutputs, renderVersion });
|
|
56277
56394
|
},
|
|
56278
56395
|
// Blocks are mutated in-place by `pairToolEvents` (tool outcome
|
|
56279
56396
|
// arrives, scope closes, subagent counter ticks). Compare the
|
|
@@ -56282,14 +56399,19 @@ var init_BlockLine = __esm({
|
|
|
56282
56399
|
(prev, next) => {
|
|
56283
56400
|
if (prev.expandToolOutputs !== next.expandToolOutputs)
|
|
56284
56401
|
return false;
|
|
56402
|
+
if (prev.nested !== next.nested)
|
|
56403
|
+
return false;
|
|
56404
|
+
if (prev.renderVersion !== next.renderVersion)
|
|
56405
|
+
return false;
|
|
56285
56406
|
return blocksEquivalent(prev.block, next.block);
|
|
56286
56407
|
}
|
|
56287
56408
|
);
|
|
56288
|
-
SkillScopeView = ({ scope, expandToolOutputs }) => {
|
|
56409
|
+
SkillScopeView = ({ scope, expandToolOutputs, renderVersion }) => {
|
|
56289
56410
|
const childToolCount = countToolCalls(scope.children);
|
|
56290
|
-
const
|
|
56291
|
-
const
|
|
56292
|
-
|
|
56411
|
+
const presentation = skillActivityPresentation(scope, childToolCount);
|
|
56412
|
+
const runningTools = scope.children.some(hasRunningTool);
|
|
56413
|
+
const showChildren = !scope.closed || runningTools || expandToolOutputs;
|
|
56414
|
+
return (0, import_jsx_runtime20.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [(0, import_jsx_runtime20.jsxs)(Box_default, { children: [(0, import_jsx_runtime20.jsx)(Text, { dimColor: true, children: "\u2726 " }), (0, import_jsx_runtime20.jsx)(ShimmerText, { text: presentation.label, active: presentation.active }), presentation.meta ? (0, import_jsx_runtime20.jsx)(Text, { dimColor: true, children: ` \xB7 ${presentation.meta}` }) : null, !showChildren && childToolCount > 0 ? (0, import_jsx_runtime20.jsx)(Text, { dimColor: true, children: " \u203A" }) : null] }), showChildren ? (0, import_jsx_runtime20.jsx)(Box_default, { flexDirection: "column", marginLeft: 2, children: scope.children.map((c2) => (0, import_jsx_runtime20.jsx)(BlockLine, { block: c2, expandToolOutputs, renderVersion, nested: true }, c2.id)) }) : null] });
|
|
56293
56415
|
};
|
|
56294
56416
|
}
|
|
56295
56417
|
});
|
|
@@ -56323,36 +56445,36 @@ function lastNonEmptyLineShown(content, innerCols) {
|
|
|
56323
56445
|
function tailForViewport(content) {
|
|
56324
56446
|
return content;
|
|
56325
56447
|
}
|
|
56326
|
-
var
|
|
56448
|
+
var import_jsx_runtime21, import_react42, StreamingPreview;
|
|
56327
56449
|
var init_StreamingPreview = __esm({
|
|
56328
56450
|
async "../plugin-cli/dist/components/chat/StreamingPreview.js"() {
|
|
56329
|
-
|
|
56330
|
-
|
|
56451
|
+
import_jsx_runtime21 = __toESM(require_jsx_runtime());
|
|
56452
|
+
import_react42 = __toESM(require_react());
|
|
56331
56453
|
await init_build2();
|
|
56332
56454
|
init_theme();
|
|
56333
|
-
StreamingPreview = (0,
|
|
56455
|
+
StreamingPreview = (0, import_react42.memo)(function StreamingPreview2({ content, dim }) {
|
|
56334
56456
|
const cols = process.stdout.columns ?? 80;
|
|
56335
56457
|
const innerCols = Math.max(20, cols - 4);
|
|
56336
56458
|
const shown = lastNonEmptyLineShown(content, innerCols);
|
|
56337
|
-
return (0,
|
|
56459
|
+
return (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "row", marginTop: 1, children: [(0, import_jsx_runtime21.jsx)(Box_default, { marginRight: 1, children: (0, import_jsx_runtime21.jsx)(Text, { dimColor: true, children: Glyphs.filled }) }), (0, import_jsx_runtime21.jsx)(Text, { dimColor: dim, children: shown || " " })] });
|
|
56338
56460
|
});
|
|
56339
56461
|
}
|
|
56340
56462
|
});
|
|
56341
56463
|
|
|
56342
56464
|
// ../plugin-cli/dist/components/ChatView.js
|
|
56343
|
-
var
|
|
56465
|
+
var import_jsx_runtime22, import_react43, ChatView;
|
|
56344
56466
|
var init_ChatView = __esm({
|
|
56345
56467
|
async "../plugin-cli/dist/components/ChatView.js"() {
|
|
56346
|
-
|
|
56347
|
-
|
|
56468
|
+
import_jsx_runtime22 = __toESM(require_jsx_runtime());
|
|
56469
|
+
import_react43 = __toESM(require_react());
|
|
56348
56470
|
await init_build2();
|
|
56349
56471
|
await init_BlockLine();
|
|
56350
56472
|
init_dist7();
|
|
56351
56473
|
await init_StreamingPreview();
|
|
56352
56474
|
ChatView = ({ events, streamingDelta, reasoningDelta, expandToolOutputs, compactTools, hideLive }) => {
|
|
56353
|
-
const foldRef = (0,
|
|
56354
|
-
const compactRef = (0,
|
|
56355
|
-
const blocks = (0,
|
|
56475
|
+
const foldRef = (0, import_react43.useRef)(null);
|
|
56476
|
+
const compactRef = (0, import_react43.useRef)(void 0);
|
|
56477
|
+
const blocks = (0, import_react43.useMemo)(() => {
|
|
56356
56478
|
if (typeof IncrementalFold !== "function")
|
|
56357
56479
|
return pairToolEvents(events, compactTools);
|
|
56358
56480
|
if (!foldRef.current || compactRef.current !== compactTools) {
|
|
@@ -56361,8 +56483,8 @@ var init_ChatView = __esm({
|
|
|
56361
56483
|
}
|
|
56362
56484
|
return foldRef.current.syncTo(events).slice();
|
|
56363
56485
|
}, [events, compactTools]);
|
|
56364
|
-
const settledRef = (0,
|
|
56365
|
-
const clearGenerationRef = (0,
|
|
56486
|
+
const settledRef = (0, import_react43.useRef)([]);
|
|
56487
|
+
const clearGenerationRef = (0, import_react43.useRef)(0);
|
|
56366
56488
|
if (blocks.length < settledRef.current.length) {
|
|
56367
56489
|
settledRef.current = [];
|
|
56368
56490
|
clearGenerationRef.current += 1;
|
|
@@ -56382,57 +56504,58 @@ var init_ChatView = __esm({
|
|
|
56382
56504
|
settledRef.current = next;
|
|
56383
56505
|
}
|
|
56384
56506
|
const liveBlocks = blocks.slice(settledRef.current.length);
|
|
56385
|
-
|
|
56507
|
+
const renderVersion = foldRef.current?.version ?? events.length;
|
|
56508
|
+
return (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [(0, import_jsx_runtime22.jsx)(Static, { items: settledRef.current, children: (block) => (0, import_jsx_runtime22.jsx)(BlockLine, { block, expandToolOutputs: !!expandToolOutputs, renderVersion }, block.id) }, clearGenerationRef.current), hideLive ? null : (0, import_jsx_runtime22.jsxs)(Box_default, { flexDirection: "column", children: [liveBlocks.map((b3) => (0, import_jsx_runtime22.jsx)(BlockLine, { block: b3, expandToolOutputs: !!expandToolOutputs, renderVersion }, b3.id)), streamingDelta && streamingDelta.trim() ? (0, import_jsx_runtime22.jsx)(StreamingPreview, { content: tailForViewport(streamingDelta) }) : reasoningDelta && reasoningDelta.trim() ? (
|
|
56386
56509
|
// Dim live-thinking preview, only while there's no assistant text
|
|
56387
56510
|
// yet. Prefix lands on the same single visual row as the content
|
|
56388
56511
|
// tail, preserving StreamingPreview's no-stacking invariant.
|
|
56389
|
-
(0,
|
|
56512
|
+
(0, import_jsx_runtime22.jsx)(StreamingPreview, { content: `thinking \xB7 ${tailForViewport(reasoningDelta)}`, dim: true })
|
|
56390
56513
|
) : null] })] });
|
|
56391
56514
|
};
|
|
56392
56515
|
}
|
|
56393
56516
|
});
|
|
56394
56517
|
|
|
56395
56518
|
// ../plugin-cli/dist/components/Spinner.js
|
|
56396
|
-
var
|
|
56519
|
+
var import_jsx_runtime23, import_react44, FRAMES, Spinner;
|
|
56397
56520
|
var init_Spinner = __esm({
|
|
56398
56521
|
async "../plugin-cli/dist/components/Spinner.js"() {
|
|
56399
|
-
|
|
56400
|
-
|
|
56522
|
+
import_jsx_runtime23 = __toESM(require_jsx_runtime());
|
|
56523
|
+
import_react44 = __toESM(require_react());
|
|
56401
56524
|
await init_build2();
|
|
56402
56525
|
init_motion();
|
|
56403
56526
|
FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
56404
56527
|
Spinner = ({ label: label3, color = "cyan", intervalMs = 80 }) => {
|
|
56405
|
-
const [frame, setFrame] = (0,
|
|
56406
|
-
(0,
|
|
56528
|
+
const [frame, setFrame] = (0, import_react44.useState)(0);
|
|
56529
|
+
(0, import_react44.useEffect)(() => {
|
|
56407
56530
|
if (!MOTION_ENABLED)
|
|
56408
56531
|
return;
|
|
56409
56532
|
const t2 = setInterval(() => setFrame((f3) => (f3 + 1) % FRAMES.length), intervalMs);
|
|
56410
56533
|
return () => clearInterval(t2);
|
|
56411
56534
|
}, [intervalMs]);
|
|
56412
56535
|
const glyph = FRAMES[frame];
|
|
56413
|
-
return (0,
|
|
56536
|
+
return (0, import_jsx_runtime23.jsxs)(Text, { color, children: [glyph, label3 ? ` ${label3}` : ""] });
|
|
56414
56537
|
};
|
|
56415
56538
|
}
|
|
56416
56539
|
});
|
|
56417
56540
|
|
|
56418
56541
|
// ../plugin-cli/dist/components/ModeFooter.js
|
|
56419
|
-
var
|
|
56542
|
+
var import_jsx_runtime24, ModeFooter;
|
|
56420
56543
|
var init_ModeFooter = __esm({
|
|
56421
56544
|
async "../plugin-cli/dist/components/ModeFooter.js"() {
|
|
56422
|
-
|
|
56545
|
+
import_jsx_runtime24 = __toESM(require_jsx_runtime());
|
|
56423
56546
|
__toESM(require_react());
|
|
56424
56547
|
await init_build2();
|
|
56425
56548
|
init_theme();
|
|
56426
|
-
ModeFooter = ({ modeName }) => (0,
|
|
56549
|
+
ModeFooter = ({ modeName }) => (0, import_jsx_runtime24.jsxs)(Box_default, { children: [(0, import_jsx_runtime24.jsx)(Text, { color: Colors.mode, children: "\u25B8\u25B8 " }), (0, import_jsx_runtime24.jsxs)(Text, { color: Colors.mode, bold: true, children: ["mode: ", modeName] }), (0, import_jsx_runtime24.jsx)(Text, { color: Colors.chrome, dimColor: true, children: " (shift+tab to change)" })] });
|
|
56427
56550
|
}
|
|
56428
56551
|
});
|
|
56429
56552
|
|
|
56430
56553
|
// ../plugin-cli/dist/components/StatusLine.js
|
|
56431
|
-
var
|
|
56554
|
+
var import_jsx_runtime25, import_react46, StatusLine, ProviderBadge, ModeBadgePill, BusyMarker, CONTEXT_BAR_WIDTH, ContextMeter;
|
|
56432
56555
|
var init_StatusLine = __esm({
|
|
56433
56556
|
async "../plugin-cli/dist/components/StatusLine.js"() {
|
|
56434
|
-
|
|
56435
|
-
|
|
56557
|
+
import_jsx_runtime25 = __toESM(require_jsx_runtime());
|
|
56558
|
+
import_react46 = __toESM(require_react());
|
|
56436
56559
|
await init_build2();
|
|
56437
56560
|
init_dist7();
|
|
56438
56561
|
init_theme();
|
|
@@ -56444,25 +56567,25 @@ var init_StatusLine = __esm({
|
|
|
56444
56567
|
const showQueue = (queueCount ?? 0) > 0;
|
|
56445
56568
|
const showMcp = !!(mcp && mcp.enabled > 0);
|
|
56446
56569
|
const showCtx = !!(contextWindow && contextWindow > 0);
|
|
56447
|
-
const queuedTail = showQueue ? (0,
|
|
56448
|
-
return (0,
|
|
56570
|
+
const queuedTail = showQueue ? (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [(0, import_jsx_runtime25.jsx)(Text, { dimColor: true, children: " " }), (0, import_jsx_runtime25.jsx)(Text, { dimColor: true, children: `${Glyphs.contextUp} ${queueCount} queued` })] }) : null;
|
|
56571
|
+
return (0, import_jsx_runtime25.jsxs)(Box_default, { justifyContent: "space-between", children: [(0, import_jsx_runtime25.jsx)(Box_default, { children: modeBadge ? (
|
|
56449
56572
|
// Badged (autonomous) mode: the pill is pinned left at all times,
|
|
56450
56573
|
// with the busy marker / idle hint trailing it — so the user always
|
|
56451
56574
|
// sees the mode even mid-run, when a plain footer would be hidden.
|
|
56452
|
-
(0,
|
|
56453
|
-
) : busy2 ? (0,
|
|
56575
|
+
(0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [(0, import_jsx_runtime25.jsx)(ModeBadgePill, { badge: modeBadge }), (0, import_jsx_runtime25.jsx)(Text, { children: " " }), busy2 ? (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [(0, import_jsx_runtime25.jsx)(BusyMarker, { startedAt: busyStartedAt }), queuedTail] }) : (0, import_jsx_runtime25.jsx)(Text, { color: Colors.chrome, dimColor: true, children: "Esc stops \xB7 shift+tab to change" })] })
|
|
56576
|
+
) : busy2 ? (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [(0, import_jsx_runtime25.jsx)(BusyMarker, { startedAt: busyStartedAt }), queuedTail] }) : (0, import_jsx_runtime25.jsx)(ModeFooter, { modeName }) }), (0, import_jsx_runtime25.jsxs)(Box_default, { children: [(0, import_jsx_runtime25.jsx)(ProviderBadge, { name: provider }), (0, import_jsx_runtime25.jsx)(Text, { dimColor: true, children: ` ${model}` }), showMcp ? (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [(0, import_jsx_runtime25.jsx)(Text, { dimColor: true, children: ` ${Glyphs.midDot} ` }), (0, import_jsx_runtime25.jsx)(Text, { dimColor: true, children: "mcp " }), (0, import_jsx_runtime25.jsx)(Text, { children: `${mcp.connected}/${mcp.enabled}` })] }) : null, showCtx ? (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [(0, import_jsx_runtime25.jsx)(Text, { dimColor: true, children: ` ${Glyphs.midDot} ` }), (0, import_jsx_runtime25.jsx)(ContextMeter, { used: contextUsed ?? 0, total: contextWindow })] }) : null, version ? (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [(0, import_jsx_runtime25.jsx)(Text, { dimColor: true, children: ` ${Glyphs.midDot} ` }), updateLatest ? (0, import_jsx_runtime25.jsx)(Text, { color: "yellow", children: `v${version} ${Glyphs.contextUp}${updateLatest}` }) : (0, import_jsx_runtime25.jsx)(Text, { dimColor: true, children: `v${version}` })] }) : null] })] });
|
|
56454
56577
|
};
|
|
56455
|
-
ProviderBadge = ({ name }) => (0,
|
|
56456
|
-
ModeBadgePill = ({ badge }) => (0,
|
|
56578
|
+
ProviderBadge = ({ name }) => (0, import_jsx_runtime25.jsx)(Text, { backgroundColor: Colors.chrome, color: "black", bold: true, children: ` ${name} ` });
|
|
56579
|
+
ModeBadgePill = ({ badge }) => (0, import_jsx_runtime25.jsx)(Text, { backgroundColor: badgeBackground(badge.tone), color: "black", bold: true, children: ` ${badgeMarker(badge.tone)}${badge.label} ` });
|
|
56457
56580
|
BusyMarker = ({ startedAt }) => {
|
|
56458
|
-
const [now, setNow] = (0,
|
|
56459
|
-
(0,
|
|
56581
|
+
const [now, setNow] = (0, import_react46.useState)(() => Date.now());
|
|
56582
|
+
(0, import_react46.useEffect)(() => {
|
|
56460
56583
|
if (!MOTION_ENABLED)
|
|
56461
56584
|
return;
|
|
56462
56585
|
const t2 = setInterval(() => setNow(Date.now()), 1e3);
|
|
56463
56586
|
return () => clearInterval(t2);
|
|
56464
56587
|
}, []);
|
|
56465
|
-
return (0,
|
|
56588
|
+
return (0, import_jsx_runtime25.jsxs)(Box_default, { children: [(0, import_jsx_runtime25.jsx)(Spinner, { color: Colors.busy }), (0, import_jsx_runtime25.jsx)(Text, { color: Colors.busy, children: " Thinking" }), (0, import_jsx_runtime25.jsx)(Text, { dimColor: true, children: ` [${formatElapsed(now - startedAt)}]` })] });
|
|
56466
56589
|
};
|
|
56467
56590
|
CONTEXT_BAR_WIDTH = 10;
|
|
56468
56591
|
ContextMeter = ({ used, total }) => {
|
|
@@ -56470,7 +56593,7 @@ var init_StatusLine = __esm({
|
|
|
56470
56593
|
const color = contextColor(pct2);
|
|
56471
56594
|
const filled = Math.round(pct2 / 100 * CONTEXT_BAR_WIDTH);
|
|
56472
56595
|
const empty = CONTEXT_BAR_WIDTH - filled;
|
|
56473
|
-
return (0,
|
|
56596
|
+
return (0, import_jsx_runtime25.jsxs)(Box_default, { children: [(0, import_jsx_runtime25.jsx)(Text, { ...color ? { color } : {}, children: "\u2588".repeat(filled) }), (0, import_jsx_runtime25.jsx)(Text, { dimColor: true, children: "\u2591".repeat(empty) }), (0, import_jsx_runtime25.jsx)(Text, { ...color ? { color } : { dimColor: true }, children: ` ${pct2}%${contextMarker(pct2)}` })] });
|
|
56474
56597
|
};
|
|
56475
56598
|
}
|
|
56476
56599
|
});
|
|
@@ -56701,8 +56824,8 @@ var init_helpers = __esm({
|
|
|
56701
56824
|
|
|
56702
56825
|
// ../plugin-cli/dist/session/use-mcp-status.js
|
|
56703
56826
|
function useMcpStatus(session) {
|
|
56704
|
-
const [mcpStatus, setMcpStatus] = (0,
|
|
56705
|
-
const probeMcpStatus =
|
|
56827
|
+
const [mcpStatus, setMcpStatus] = (0, import_react47.useState)({ connected: 0, enabled: 0 });
|
|
56828
|
+
const probeMcpStatus = import_react47.default.useCallback(async () => {
|
|
56706
56829
|
const api = session.mcpAdmin;
|
|
56707
56830
|
if (!api?.listServers)
|
|
56708
56831
|
return 0;
|
|
@@ -56718,10 +56841,10 @@ function useMcpStatus(session) {
|
|
|
56718
56841
|
return 0;
|
|
56719
56842
|
}
|
|
56720
56843
|
}, [session]);
|
|
56721
|
-
const refreshMcpStatus =
|
|
56844
|
+
const refreshMcpStatus = import_react47.default.useCallback(async () => {
|
|
56722
56845
|
await probeMcpStatus();
|
|
56723
56846
|
}, [probeMcpStatus]);
|
|
56724
|
-
(0,
|
|
56847
|
+
(0, import_react47.useEffect)(() => {
|
|
56725
56848
|
let timer = null;
|
|
56726
56849
|
let cancelled = false;
|
|
56727
56850
|
void (async () => {
|
|
@@ -56738,10 +56861,10 @@ function useMcpStatus(session) {
|
|
|
56738
56861
|
}, [probeMcpStatus]);
|
|
56739
56862
|
return { mcpStatus, refreshMcpStatus };
|
|
56740
56863
|
}
|
|
56741
|
-
var
|
|
56864
|
+
var import_react47;
|
|
56742
56865
|
var init_use_mcp_status = __esm({
|
|
56743
56866
|
"../plugin-cli/dist/session/use-mcp-status.js"() {
|
|
56744
|
-
|
|
56867
|
+
import_react47 = __toESM(require_react());
|
|
56745
56868
|
}
|
|
56746
56869
|
});
|
|
56747
56870
|
|
|
@@ -56751,14 +56874,14 @@ function seedFromLog(log) {
|
|
|
56751
56874
|
return held.length > MAX_RENDERED_EVENTS ? held.slice(held.length - MAX_RENDERED_EVENTS) : held;
|
|
56752
56875
|
}
|
|
56753
56876
|
function useEventStream(session) {
|
|
56754
|
-
const [events, setEvents] = (0,
|
|
56755
|
-
const [streamingDelta, setStreamingDelta] = (0,
|
|
56756
|
-
const streamingBufferRef = (0,
|
|
56757
|
-
const streamFlushRef = (0,
|
|
56758
|
-
const [reasoningDelta, setReasoningDelta] = (0,
|
|
56759
|
-
const reasoningBufferRef = (0,
|
|
56760
|
-
const reasoningFlushRef = (0,
|
|
56761
|
-
const scheduleStreamFlush =
|
|
56877
|
+
const [events, setEvents] = (0, import_react48.useState)([]);
|
|
56878
|
+
const [streamingDelta, setStreamingDelta] = (0, import_react48.useState)("");
|
|
56879
|
+
const streamingBufferRef = (0, import_react48.useRef)("");
|
|
56880
|
+
const streamFlushRef = (0, import_react48.useRef)(null);
|
|
56881
|
+
const [reasoningDelta, setReasoningDelta] = (0, import_react48.useState)("");
|
|
56882
|
+
const reasoningBufferRef = (0, import_react48.useRef)("");
|
|
56883
|
+
const reasoningFlushRef = (0, import_react48.useRef)(null);
|
|
56884
|
+
const scheduleStreamFlush = import_react48.default.useCallback(() => {
|
|
56762
56885
|
if (streamFlushRef.current)
|
|
56763
56886
|
return;
|
|
56764
56887
|
streamFlushRef.current = setTimeout(() => {
|
|
@@ -56766,7 +56889,7 @@ function useEventStream(session) {
|
|
|
56766
56889
|
setStreamingDelta(streamingBufferRef.current);
|
|
56767
56890
|
}, 33);
|
|
56768
56891
|
}, []);
|
|
56769
|
-
const scheduleReasoningFlush =
|
|
56892
|
+
const scheduleReasoningFlush = import_react48.default.useCallback(() => {
|
|
56770
56893
|
if (reasoningFlushRef.current)
|
|
56771
56894
|
return;
|
|
56772
56895
|
reasoningFlushRef.current = setTimeout(() => {
|
|
@@ -56774,7 +56897,7 @@ function useEventStream(session) {
|
|
|
56774
56897
|
setReasoningDelta(reasoningBufferRef.current);
|
|
56775
56898
|
}, 33);
|
|
56776
56899
|
}, []);
|
|
56777
|
-
const cancelStreamFlush =
|
|
56900
|
+
const cancelStreamFlush = import_react48.default.useCallback(() => {
|
|
56778
56901
|
if (streamFlushRef.current) {
|
|
56779
56902
|
clearTimeout(streamFlushRef.current);
|
|
56780
56903
|
streamFlushRef.current = null;
|
|
@@ -56784,12 +56907,12 @@ function useEventStream(session) {
|
|
|
56784
56907
|
reasoningFlushRef.current = null;
|
|
56785
56908
|
}
|
|
56786
56909
|
}, []);
|
|
56787
|
-
(0,
|
|
56910
|
+
(0, import_react48.useEffect)(() => {
|
|
56788
56911
|
return () => {
|
|
56789
56912
|
cancelStreamFlush();
|
|
56790
56913
|
};
|
|
56791
56914
|
}, [cancelStreamFlush]);
|
|
56792
|
-
(0,
|
|
56915
|
+
(0, import_react48.useEffect)(() => {
|
|
56793
56916
|
setEvents(seedFromLog(session.log));
|
|
56794
56917
|
const unsub = session.log.subscribe((event) => {
|
|
56795
56918
|
if (event.type === "assistant_chunk") {
|
|
@@ -56830,10 +56953,10 @@ function useEventStream(session) {
|
|
|
56830
56953
|
cancelStreamFlush
|
|
56831
56954
|
};
|
|
56832
56955
|
}
|
|
56833
|
-
var
|
|
56956
|
+
var import_react48, MAX_RENDERED_EVENTS;
|
|
56834
56957
|
var init_use_event_stream = __esm({
|
|
56835
56958
|
"../plugin-cli/dist/session/use-event-stream.js"() {
|
|
56836
|
-
|
|
56959
|
+
import_react48 = __toESM(require_react());
|
|
56837
56960
|
MAX_RENDERED_EVENTS = 5e3;
|
|
56838
56961
|
}
|
|
56839
56962
|
});
|
|
@@ -57047,8 +57170,8 @@ var init_clipboard_image = __esm({
|
|
|
57047
57170
|
|
|
57048
57171
|
// ../plugin-cli/dist/session/use-image-attachments.js
|
|
57049
57172
|
function useImageAttachments(onError2) {
|
|
57050
|
-
const imageAttachmentsRef = (0,
|
|
57051
|
-
const nextImageIdRef = (0,
|
|
57173
|
+
const imageAttachmentsRef = (0, import_react49.useRef)(/* @__PURE__ */ new Map());
|
|
57174
|
+
const nextImageIdRef = (0, import_react49.useRef)(1);
|
|
57052
57175
|
const registerImage = (detected) => {
|
|
57053
57176
|
if (!detected)
|
|
57054
57177
|
return "";
|
|
@@ -57100,10 +57223,10 @@ function useImageAttachments(onError2) {
|
|
|
57100
57223
|
};
|
|
57101
57224
|
return { registerImage, handlePasteText, resolveAttachments };
|
|
57102
57225
|
}
|
|
57103
|
-
var
|
|
57226
|
+
var import_react49;
|
|
57104
57227
|
var init_use_image_attachments = __esm({
|
|
57105
57228
|
"../plugin-cli/dist/session/use-image-attachments.js"() {
|
|
57106
|
-
|
|
57229
|
+
import_react49 = __toESM(require_react());
|
|
57107
57230
|
init_image_attachments();
|
|
57108
57231
|
init_clipboard_image();
|
|
57109
57232
|
}
|
|
@@ -57111,18 +57234,18 @@ var init_use_image_attachments = __esm({
|
|
|
57111
57234
|
|
|
57112
57235
|
// ../plugin-cli/dist/session/use-turn-runner.js
|
|
57113
57236
|
function useTurnRunner(opts) {
|
|
57114
|
-
const [busy2, setBusy] = (0,
|
|
57115
|
-
const [busyStartedAt, setBusyStartedAt] = (0,
|
|
57116
|
-
const queueRef = (0,
|
|
57117
|
-
const [queueCount, setQueueCount] = (0,
|
|
57118
|
-
const [priorityMessage, setPriorityMessage] = (0,
|
|
57119
|
-
const priorityRef = (0,
|
|
57237
|
+
const [busy2, setBusy] = (0, import_react50.useState)(false);
|
|
57238
|
+
const [busyStartedAt, setBusyStartedAt] = (0, import_react50.useState)(null);
|
|
57239
|
+
const queueRef = (0, import_react50.useRef)([]);
|
|
57240
|
+
const [queueCount, setQueueCount] = (0, import_react50.useState)(0);
|
|
57241
|
+
const [priorityMessage, setPriorityMessage] = (0, import_react50.useState)(null);
|
|
57242
|
+
const priorityRef = (0, import_react50.useRef)(null);
|
|
57120
57243
|
const setPriority = (value) => {
|
|
57121
57244
|
priorityRef.current = value;
|
|
57122
57245
|
setPriorityMessage(value);
|
|
57123
57246
|
};
|
|
57124
|
-
const busyRef = (0,
|
|
57125
|
-
const turnControllerRef = (0,
|
|
57247
|
+
const busyRef = (0, import_react50.useRef)(false);
|
|
57248
|
+
const turnControllerRef = (0, import_react50.useRef)(null);
|
|
57126
57249
|
const runTurnWith = async (text, attachments) => {
|
|
57127
57250
|
setBusy(true);
|
|
57128
57251
|
busyRef.current = true;
|
|
@@ -57211,10 +57334,10 @@ function useTurnRunner(opts) {
|
|
|
57211
57334
|
setPriority
|
|
57212
57335
|
};
|
|
57213
57336
|
}
|
|
57214
|
-
var
|
|
57337
|
+
var import_react50, MAX_DRAIN_MESSAGES, MAX_DRAIN_CHARS;
|
|
57215
57338
|
var init_use_turn_runner = __esm({
|
|
57216
57339
|
"../plugin-cli/dist/session/use-turn-runner.js"() {
|
|
57217
|
-
|
|
57340
|
+
import_react50 = __toESM(require_react());
|
|
57218
57341
|
MAX_DRAIN_MESSAGES = 50;
|
|
57219
57342
|
MAX_DRAIN_CHARS = 2e5;
|
|
57220
57343
|
}
|
|
@@ -57222,10 +57345,10 @@ var init_use_turn_runner = __esm({
|
|
|
57222
57345
|
|
|
57223
57346
|
// ../plugin-cli/dist/session/use-permission-queue.js
|
|
57224
57347
|
function usePermissionQueue(session, registerInteractiveResolver) {
|
|
57225
|
-
const [pendingPermissions, setPendingPermissions] = (0,
|
|
57226
|
-
const [pendingApproval, setPendingApproval] = (0,
|
|
57227
|
-
const yoloRef = (0,
|
|
57228
|
-
(0,
|
|
57348
|
+
const [pendingPermissions, setPendingPermissions] = (0, import_react51.useState)([]);
|
|
57349
|
+
const [pendingApproval, setPendingApproval] = (0, import_react51.useState)(null);
|
|
57350
|
+
const yoloRef = (0, import_react51.useRef)(false);
|
|
57351
|
+
(0, import_react51.useEffect)(() => {
|
|
57229
57352
|
registerInteractiveResolver(async (call, ctx) => {
|
|
57230
57353
|
if (yoloRef.current) {
|
|
57231
57354
|
return { mode: "allow", reason: "yolo mode" };
|
|
@@ -57253,10 +57376,10 @@ function usePermissionQueue(session, registerInteractiveResolver) {
|
|
|
57253
57376
|
yoloRef
|
|
57254
57377
|
};
|
|
57255
57378
|
}
|
|
57256
|
-
var
|
|
57379
|
+
var import_react51;
|
|
57257
57380
|
var init_use_permission_queue = __esm({
|
|
57258
57381
|
"../plugin-cli/dist/session/use-permission-queue.js"() {
|
|
57259
|
-
|
|
57382
|
+
import_react51 = __toESM(require_react());
|
|
57260
57383
|
}
|
|
57261
57384
|
});
|
|
57262
57385
|
|
|
@@ -57469,19 +57592,19 @@ function useVoiceInput(opts) {
|
|
|
57469
57592
|
const { session, setSystemNotice } = opts;
|
|
57470
57593
|
const startRecording = opts.startRecording ?? startVoiceRecording;
|
|
57471
57594
|
const checkCaptureAvailable = opts.checkCaptureAvailable ?? checkVoiceCaptureAvailable;
|
|
57472
|
-
const phaseRef = (0,
|
|
57473
|
-
const [phase, setPhase] = (0,
|
|
57474
|
-
const setVoicePhase = (0,
|
|
57595
|
+
const phaseRef = (0, import_react52.useRef)("idle");
|
|
57596
|
+
const [phase, setPhase] = (0, import_react52.useState)("idle");
|
|
57597
|
+
const setVoicePhase = (0, import_react52.useCallback)((next) => {
|
|
57475
57598
|
phaseRef.current = next;
|
|
57476
57599
|
setPhase(next);
|
|
57477
57600
|
}, []);
|
|
57478
|
-
const recordingRef = (0,
|
|
57479
|
-
const insertIdRef = (0,
|
|
57480
|
-
const [externalInsert, setExternalInsert] = (0,
|
|
57481
|
-
const [captureReadiness, setCaptureReadiness] = (0,
|
|
57601
|
+
const recordingRef = (0, import_react52.useRef)(null);
|
|
57602
|
+
const insertIdRef = (0, import_react52.useRef)(0);
|
|
57603
|
+
const [externalInsert, setExternalInsert] = (0, import_react52.useState)();
|
|
57604
|
+
const [captureReadiness, setCaptureReadiness] = (0, import_react52.useState)(() => unavailableVoiceCaptureCheck());
|
|
57482
57605
|
const readiness = combineVoiceInputReadiness(checkCodexVoiceInputReady(session), captureReadiness);
|
|
57483
57606
|
const ready = readiness.ready;
|
|
57484
|
-
(0,
|
|
57607
|
+
(0, import_react52.useEffect)(() => {
|
|
57485
57608
|
let cancelled = false;
|
|
57486
57609
|
void (async () => {
|
|
57487
57610
|
try {
|
|
@@ -57497,7 +57620,7 @@ function useVoiceInput(opts) {
|
|
|
57497
57620
|
cancelled = true;
|
|
57498
57621
|
};
|
|
57499
57622
|
}, [checkCaptureAvailable]);
|
|
57500
|
-
(0,
|
|
57623
|
+
(0, import_react52.useEffect)(() => {
|
|
57501
57624
|
return () => {
|
|
57502
57625
|
const recording = recordingRef.current;
|
|
57503
57626
|
recordingRef.current = null;
|
|
@@ -57505,7 +57628,7 @@ function useVoiceInput(opts) {
|
|
|
57505
57628
|
});
|
|
57506
57629
|
};
|
|
57507
57630
|
}, []);
|
|
57508
|
-
const toggleVoiceInput = (0,
|
|
57631
|
+
const toggleVoiceInput = (0, import_react52.useCallback)(() => {
|
|
57509
57632
|
void (async () => {
|
|
57510
57633
|
if (phaseRef.current === "transcribing") {
|
|
57511
57634
|
setSystemNotice("voice: transcription is still running");
|
|
@@ -57629,10 +57752,10 @@ function formatVoiceError(err) {
|
|
|
57629
57752
|
return `voice: ${message}`;
|
|
57630
57753
|
return `voice: ${message || "failed"}`;
|
|
57631
57754
|
}
|
|
57632
|
-
var
|
|
57755
|
+
var import_react52, CODEX_TRANSCRIBER_NAME;
|
|
57633
57756
|
var init_use_voice_input = __esm({
|
|
57634
57757
|
"../plugin-cli/dist/session/use-voice-input.js"() {
|
|
57635
|
-
|
|
57758
|
+
import_react52 = __toESM(require_react());
|
|
57636
57759
|
init_voice_input();
|
|
57637
57760
|
CODEX_TRANSCRIBER_NAME = "openai-codex-transcribe";
|
|
57638
57761
|
}
|
|
@@ -58194,21 +58317,21 @@ ${READ_ALOUD_NO_SYNTH_HINT}`;
|
|
|
58194
58317
|
// ../plugin-cli/dist/session/use-read-aloud.js
|
|
58195
58318
|
function useReadAloud(opts) {
|
|
58196
58319
|
const { session, setSystemNotice } = opts;
|
|
58197
|
-
const ref = (0,
|
|
58320
|
+
const ref = (0, import_react53.useRef)(null);
|
|
58198
58321
|
if (ref.current === null) {
|
|
58199
58322
|
ref.current = createReadAloud({ session, setSystemNotice });
|
|
58200
58323
|
}
|
|
58201
|
-
(0,
|
|
58324
|
+
(0, import_react53.useEffect)(() => {
|
|
58202
58325
|
return () => {
|
|
58203
58326
|
ref.current?.dispose();
|
|
58204
58327
|
};
|
|
58205
58328
|
}, []);
|
|
58206
58329
|
return ref.current;
|
|
58207
58330
|
}
|
|
58208
|
-
var
|
|
58331
|
+
var import_react53;
|
|
58209
58332
|
var init_use_read_aloud = __esm({
|
|
58210
58333
|
"../plugin-cli/dist/session/use-read-aloud.js"() {
|
|
58211
|
-
|
|
58334
|
+
import_react53 = __toESM(require_react());
|
|
58212
58335
|
init_read_aloud();
|
|
58213
58336
|
}
|
|
58214
58337
|
});
|
|
@@ -73597,10 +73720,10 @@ function composeHints({ hints, hasClose, tabsNavigable }) {
|
|
|
73597
73720
|
return null;
|
|
73598
73721
|
return parts.join(" \xB7 ");
|
|
73599
73722
|
}
|
|
73600
|
-
var
|
|
73723
|
+
var import_jsx_runtime26, Modal, ACTIVE_TAB_BG, ACTIVE_TAB_FG, INACTIVE_TAB_FG, HeaderBand;
|
|
73601
73724
|
var init_Modal = __esm({
|
|
73602
73725
|
async "../plugin-cli/dist/components/Modal.js"() {
|
|
73603
|
-
|
|
73726
|
+
import_jsx_runtime26 = __toESM(require_jsx_runtime());
|
|
73604
73727
|
__toESM(require_react());
|
|
73605
73728
|
await init_build2();
|
|
73606
73729
|
init_theme();
|
|
@@ -73624,7 +73747,7 @@ var init_Modal = __esm({
|
|
|
73624
73747
|
}
|
|
73625
73748
|
}, { isActive: !!(onClose || tabsNavigable) });
|
|
73626
73749
|
const composedHints = composeHints({ hints, hasClose: !!onClose, tabsNavigable });
|
|
73627
|
-
return (0,
|
|
73750
|
+
return (0, import_jsx_runtime26.jsx)(Box_default, { width: "100%", marginTop: 1, children: (0, import_jsx_runtime26.jsxs)(Box_default, { flexDirection: "column", width: "100%", borderStyle: Border.style, borderColor: Border.color, borderDimColor: Border.dim, children: [(0, import_jsx_runtime26.jsx)(HeaderBand, { title, tabs, activeTabId }), (0, import_jsx_runtime26.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, children: [subtitle ? (0, import_jsx_runtime26.jsx)(Box_default, { marginTop: 1, children: (0, import_jsx_runtime26.jsx)(Text, { dimColor: true, children: subtitle }) }) : null, (0, import_jsx_runtime26.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children }), composedHints ? (0, import_jsx_runtime26.jsx)(Box_default, { marginTop: 1, children: (0, import_jsx_runtime26.jsx)(Text, { dimColor: true, children: composedHints }) }) : null] })] }) });
|
|
73628
73751
|
};
|
|
73629
73752
|
ACTIVE_TAB_BG = "white";
|
|
73630
73753
|
ACTIVE_TAB_FG = "black";
|
|
@@ -73634,21 +73757,21 @@ var init_Modal = __esm({
|
|
|
73634
73757
|
if (tabs && tabs.length > 0) {
|
|
73635
73758
|
tabs.forEach((tab2, i2) => {
|
|
73636
73759
|
if (i2 > 0)
|
|
73637
|
-
tabNodes.push((0,
|
|
73760
|
+
tabNodes.push((0, import_jsx_runtime26.jsx)(Text, { children: " " }, `gap-${tab2.id}`));
|
|
73638
73761
|
const focused = tab2.id === activeTabId;
|
|
73639
|
-
tabNodes.push(focused ? (0,
|
|
73762
|
+
tabNodes.push(focused ? (0, import_jsx_runtime26.jsx)(Text, { backgroundColor: ACTIVE_TAB_BG, color: ACTIVE_TAB_FG, bold: true, children: ` ${tab2.label} ` }, tab2.id) : (0, import_jsx_runtime26.jsx)(Text, { color: INACTIVE_TAB_FG, children: tab2.label }, tab2.id));
|
|
73640
73763
|
});
|
|
73641
73764
|
}
|
|
73642
|
-
return (0,
|
|
73765
|
+
return (0, import_jsx_runtime26.jsxs)(Box_default, { width: "100%", paddingX: 1, marginTop: 1, children: [(0, import_jsx_runtime26.jsx)(Text, { color: "white", bold: true, children: title }), tabNodes.length > 0 ? (0, import_jsx_runtime26.jsx)(Text, { children: " " }) : null, tabNodes] });
|
|
73643
73766
|
};
|
|
73644
73767
|
}
|
|
73645
73768
|
});
|
|
73646
73769
|
|
|
73647
73770
|
// ../plugin-cli/dist/components/useScrollableList.js
|
|
73648
73771
|
function useScrollableList({ total, windowSize = 15, onClose, onSelect, isActive = true }) {
|
|
73649
|
-
const [cursor, setCursor] = (0,
|
|
73650
|
-
const [offset, setOffset] = (0,
|
|
73651
|
-
(0,
|
|
73772
|
+
const [cursor, setCursor] = (0, import_react55.useState)(0);
|
|
73773
|
+
const [offset, setOffset] = (0, import_react55.useState)(0);
|
|
73774
|
+
(0, import_react55.useEffect)(() => {
|
|
73652
73775
|
if (cursor >= total)
|
|
73653
73776
|
setCursor(Math.max(0, total - 1));
|
|
73654
73777
|
if (offset > Math.max(0, total - windowSize)) {
|
|
@@ -73696,10 +73819,10 @@ function useScrollableList({ total, windowSize = 15, onClose, onSelect, isActive
|
|
|
73696
73819
|
canScrollDown: offset + windowSize < total
|
|
73697
73820
|
};
|
|
73698
73821
|
}
|
|
73699
|
-
var
|
|
73822
|
+
var import_react55;
|
|
73700
73823
|
var init_useScrollableList = __esm({
|
|
73701
73824
|
async "../plugin-cli/dist/components/useScrollableList.js"() {
|
|
73702
|
-
|
|
73825
|
+
import_react55 = __toESM(require_react());
|
|
73703
73826
|
await init_build2();
|
|
73704
73827
|
}
|
|
73705
73828
|
});
|
|
@@ -73743,11 +73866,11 @@ function orderByScope(skills) {
|
|
|
73743
73866
|
}
|
|
73744
73867
|
return out;
|
|
73745
73868
|
}
|
|
73746
|
-
var
|
|
73869
|
+
var import_jsx_runtime27, import_react56, NAME_COL, SCOPE_COL, USED_COL, WINDOW, ORDER, SkillsPanel;
|
|
73747
73870
|
var init_SkillsPanel = __esm({
|
|
73748
73871
|
async "../plugin-cli/dist/components/SkillsPanel.js"() {
|
|
73749
|
-
|
|
73750
|
-
|
|
73872
|
+
import_jsx_runtime27 = __toESM(require_jsx_runtime());
|
|
73873
|
+
import_react56 = __toESM(require_react());
|
|
73751
73874
|
await init_build2();
|
|
73752
73875
|
init_dist7();
|
|
73753
73876
|
await init_Modal();
|
|
@@ -73759,9 +73882,9 @@ var init_SkillsPanel = __esm({
|
|
|
73759
73882
|
ORDER = ["user", "project", "builtin", "plugin"];
|
|
73760
73883
|
SkillsPanel = ({ skills, mcpServers, usage, onClose }) => {
|
|
73761
73884
|
const hasMcp = !!mcpServers && mcpServers.length > 0;
|
|
73762
|
-
const [activeTab, setActiveTab] =
|
|
73763
|
-
const skillRows =
|
|
73764
|
-
const mcpRows =
|
|
73885
|
+
const [activeTab, setActiveTab] = import_react56.default.useState("skills");
|
|
73886
|
+
const skillRows = import_react56.default.useMemo(() => buildSkillRows(skills, usage), [skills, usage]);
|
|
73887
|
+
const mcpRows = import_react56.default.useMemo(() => {
|
|
73765
73888
|
if (!hasMcp)
|
|
73766
73889
|
return [];
|
|
73767
73890
|
return mcpServers.map((srv) => ({
|
|
@@ -73785,11 +73908,11 @@ var init_SkillsPanel = __esm({
|
|
|
73785
73908
|
const slice = rows.slice(scroll.visible.start, scroll.visible.end);
|
|
73786
73909
|
const termWidth = process.stdout.columns ?? 80;
|
|
73787
73910
|
const descWidth = Math.max(20, termWidth - NAME_COL - SCOPE_COL - USED_COL - 12);
|
|
73788
|
-
return (0,
|
|
73911
|
+
return (0, import_jsx_runtime27.jsxs)(Modal, { title: "Skills", subtitle, hints, ...tabs ? { tabs, activeTabId: activeTab, onTabChange: (id) => setActiveTab(id) } : {}, ...onClose ? { onClose } : {}, children: [rows.length === 0 ? (0, import_jsx_runtime27.jsx)(Text, { dimColor: true, children: activeTab === "mcp" ? "(no MCP servers attached)" : "(no skills discovered)" }) : null, scroll.canScrollUp ? (0, import_jsx_runtime27.jsx)(Text, { dimColor: true, children: ` \u2191 ${scroll.offset} more above` }) : null, slice.map((row, i2) => {
|
|
73789
73912
|
const absoluteIndex = scroll.visible.start + i2;
|
|
73790
73913
|
const focused = absoluteIndex === scroll.cursor;
|
|
73791
|
-
return (0,
|
|
73792
|
-
}), scroll.canScrollDown ? (0,
|
|
73914
|
+
return (0, import_jsx_runtime27.jsxs)(Box_default, { children: [(0, import_jsx_runtime27.jsx)(Text, { ...focused ? {} : { dimColor: true }, children: focused ? "\u203A " : " " }), (0, import_jsx_runtime27.jsx)(Box_default, { width: NAME_COL, children: (0, import_jsx_runtime27.jsx)(Text, { bold: true, children: truncate3(row.name, NAME_COL - 2) }) }), (0, import_jsx_runtime27.jsx)(Box_default, { width: SCOPE_COL, children: (0, import_jsx_runtime27.jsx)(Text, { dimColor: true, children: row.scope }) }), (0, import_jsx_runtime27.jsx)(Box_default, { width: descWidth, children: (0, import_jsx_runtime27.jsx)(Text, { dimColor: true, wrap: "truncate", children: oneLine(row.description) }) }), (0, import_jsx_runtime27.jsx)(Box_default, { width: USED_COL, justifyContent: "flex-end", children: row.used ? (0, import_jsx_runtime27.jsx)(Text, { dimColor: true, children: `\xD7${row.used}` }) : null })] }, row.key);
|
|
73915
|
+
}), scroll.canScrollDown ? (0, import_jsx_runtime27.jsx)(Text, { dimColor: true, children: ` \u2193 ${rows.length - scroll.visible.end} more below` }) : null] });
|
|
73793
73916
|
};
|
|
73794
73917
|
}
|
|
73795
73918
|
});
|
|
@@ -73805,11 +73928,11 @@ function matchesTab(tool, tab2) {
|
|
|
73805
73928
|
return action === "prompt";
|
|
73806
73929
|
return action === "deny";
|
|
73807
73930
|
}
|
|
73808
|
-
var
|
|
73931
|
+
var import_jsx_runtime28, import_react57, NAME_COL2, BADGE_COL, WINDOW2, ToolsPanel, ToolRow, PermissionBadge;
|
|
73809
73932
|
var init_ToolsPanel = __esm({
|
|
73810
73933
|
async "../plugin-cli/dist/components/ToolsPanel.js"() {
|
|
73811
|
-
|
|
73812
|
-
|
|
73934
|
+
import_jsx_runtime28 = __toESM(require_jsx_runtime());
|
|
73935
|
+
import_react57 = __toESM(require_react());
|
|
73813
73936
|
await init_build2();
|
|
73814
73937
|
init_dist7();
|
|
73815
73938
|
init_theme();
|
|
@@ -73819,8 +73942,8 @@ var init_ToolsPanel = __esm({
|
|
|
73819
73942
|
BADGE_COL = 9;
|
|
73820
73943
|
WINDOW2 = 15;
|
|
73821
73944
|
ToolsPanel = ({ tools, onClose }) => {
|
|
73822
|
-
const sorted =
|
|
73823
|
-
const counts =
|
|
73945
|
+
const sorted = import_react57.default.useMemo(() => [...tools].sort((a2, b3) => a2.name.localeCompare(b3.name)), [tools]);
|
|
73946
|
+
const counts = import_react57.default.useMemo(() => {
|
|
73824
73947
|
let auto2 = 0;
|
|
73825
73948
|
let prompt = 0;
|
|
73826
73949
|
let deny = 0;
|
|
@@ -73835,8 +73958,8 @@ var init_ToolsPanel = __esm({
|
|
|
73835
73958
|
}
|
|
73836
73959
|
return { auto: auto2, prompt, deny };
|
|
73837
73960
|
}, [sorted]);
|
|
73838
|
-
const [activeTab, setActiveTab] =
|
|
73839
|
-
const filtered =
|
|
73961
|
+
const [activeTab, setActiveTab] = import_react57.default.useState("all");
|
|
73962
|
+
const filtered = import_react57.default.useMemo(() => sorted.filter((t2) => matchesTab(t2, activeTab)), [sorted, activeTab]);
|
|
73840
73963
|
const scroll = useScrollableList({
|
|
73841
73964
|
total: filtered.length,
|
|
73842
73965
|
windowSize: WINDOW2
|
|
@@ -73848,30 +73971,30 @@ var init_ToolsPanel = __esm({
|
|
|
73848
73971
|
{ id: "deny", label: `Deny (${counts.deny})` }
|
|
73849
73972
|
];
|
|
73850
73973
|
if (sorted.length === 0) {
|
|
73851
|
-
return (0,
|
|
73974
|
+
return (0, import_jsx_runtime28.jsx)(Modal, { title: "Tools", subtitle: "none registered", ...onClose ? { onClose } : {}, children: (0, import_jsx_runtime28.jsx)(Text, { dimColor: true, children: "(no tools registered)" }) });
|
|
73852
73975
|
}
|
|
73853
73976
|
const slice = filtered.slice(scroll.visible.start, scroll.visible.end);
|
|
73854
73977
|
const termWidth = process.stdout.columns ?? 80;
|
|
73855
73978
|
const descWidth = Math.max(20, termWidth - NAME_COL2 - BADGE_COL - 12);
|
|
73856
73979
|
const subtitle = filtered.length === 0 ? `0 of ${sorted.length} \xB7 no tools in this filter` : `${scroll.cursor + 1} of ${filtered.length} \xB7 ${filtered.length} shown`;
|
|
73857
73980
|
const hints = "\u2191\u2193 navigate \xB7 PgUp/PgDn fast \xB7 g/G top/bottom";
|
|
73858
|
-
return (0,
|
|
73981
|
+
return (0, import_jsx_runtime28.jsxs)(Modal, { title: "Tools", subtitle, hints, tabs, activeTabId: activeTab, onTabChange: (id) => setActiveTab(id), ...onClose ? { onClose } : {}, children: [filtered.length === 0 ? (0, import_jsx_runtime28.jsx)(Text, { dimColor: true, children: "(no tools match this filter)" }) : null, scroll.canScrollUp ? (0, import_jsx_runtime28.jsx)(Text, { dimColor: true, children: ` \u2191 ${scroll.offset} more above` }) : null, slice.map((t2, i2) => {
|
|
73859
73982
|
const absoluteIndex = scroll.visible.start + i2;
|
|
73860
73983
|
const focused = absoluteIndex === scroll.cursor;
|
|
73861
|
-
return (0,
|
|
73862
|
-
}), scroll.canScrollDown ? (0,
|
|
73984
|
+
return (0, import_jsx_runtime28.jsx)(ToolRow, { tool: t2, focused, descWidth }, t2.name);
|
|
73985
|
+
}), scroll.canScrollDown ? (0, import_jsx_runtime28.jsx)(Text, { dimColor: true, children: ` \u2193 ${filtered.length - scroll.visible.end} more below` }) : null] });
|
|
73863
73986
|
};
|
|
73864
73987
|
ToolRow = ({ tool, focused, descWidth }) => {
|
|
73865
73988
|
const perm = tool.permission?.action ?? "allow";
|
|
73866
73989
|
const desc = oneLine(tool.description ?? "");
|
|
73867
|
-
return (0,
|
|
73990
|
+
return (0, import_jsx_runtime28.jsxs)(Box_default, { children: [(0, import_jsx_runtime28.jsx)(Text, { ...focused ? {} : { dimColor: true }, children: focused ? "\u203A " : " " }), (0, import_jsx_runtime28.jsx)(Box_default, { width: NAME_COL2, children: (0, import_jsx_runtime28.jsx)(Text, { bold: true, children: truncate3(tool.name, NAME_COL2 - 2) }) }), (0, import_jsx_runtime28.jsx)(Box_default, { width: BADGE_COL, children: (0, import_jsx_runtime28.jsx)(PermissionBadge, { action: perm }) }), (0, import_jsx_runtime28.jsx)(Box_default, { width: descWidth, children: (0, import_jsx_runtime28.jsx)(Text, { dimColor: true, wrap: "truncate", children: desc }) })] });
|
|
73868
73991
|
};
|
|
73869
73992
|
PermissionBadge = ({ action }) => {
|
|
73870
73993
|
if (action === "allow")
|
|
73871
|
-
return (0,
|
|
73994
|
+
return (0, import_jsx_runtime28.jsx)(Text, { dimColor: true, children: "[auto] " });
|
|
73872
73995
|
if (action === "deny")
|
|
73873
|
-
return (0,
|
|
73874
|
-
return (0,
|
|
73996
|
+
return (0, import_jsx_runtime28.jsx)(Text, { color: Colors.danger, children: "[deny] " });
|
|
73997
|
+
return (0, import_jsx_runtime28.jsx)(Text, { color: Colors.busy, children: "[prompt]" });
|
|
73875
73998
|
};
|
|
73876
73999
|
}
|
|
73877
74000
|
});
|
|
@@ -73996,11 +74119,11 @@ function oneLine2(s2) {
|
|
|
73996
74119
|
function truncate5(s2, n2) {
|
|
73997
74120
|
return s2.length <= n2 ? s2 : s2.slice(0, n2 - 1) + "\u2026";
|
|
73998
74121
|
}
|
|
73999
|
-
var
|
|
74122
|
+
var import_jsx_runtime29, import_react58, SUBAGENT_PLUGIN_ID3, WINDOW3, AgentsPanel, KindsList, AgentSummary;
|
|
74000
74123
|
var init_AgentsPanel = __esm({
|
|
74001
74124
|
async "../plugin-cli/dist/components/AgentsPanel.js"() {
|
|
74002
|
-
|
|
74003
|
-
|
|
74125
|
+
import_jsx_runtime29 = __toESM(require_jsx_runtime());
|
|
74126
|
+
import_react58 = __toESM(require_react());
|
|
74004
74127
|
await init_build2();
|
|
74005
74128
|
init_dist7();
|
|
74006
74129
|
init_theme();
|
|
@@ -74010,8 +74133,8 @@ var init_AgentsPanel = __esm({
|
|
|
74010
74133
|
SUBAGENT_PLUGIN_ID3 = "@moxxy/subagents";
|
|
74011
74134
|
WINDOW3 = 16;
|
|
74012
74135
|
AgentsPanel = ({ events, availableKinds = [], onClose }) => {
|
|
74013
|
-
const agents =
|
|
74014
|
-
const rows =
|
|
74136
|
+
const agents = import_react58.default.useMemo(() => collectAgents(events), [events]);
|
|
74137
|
+
const rows = import_react58.default.useMemo(() => {
|
|
74015
74138
|
const out = [];
|
|
74016
74139
|
for (const agent of agents) {
|
|
74017
74140
|
for (const row of agent.activity)
|
|
@@ -74020,7 +74143,7 @@ var init_AgentsPanel = __esm({
|
|
|
74020
74143
|
out.sort((a2, b3) => a2.row.atMs - b3.row.atMs);
|
|
74021
74144
|
return out;
|
|
74022
74145
|
}, [agents]);
|
|
74023
|
-
const [activeTab, setActiveTab] =
|
|
74146
|
+
const [activeTab, setActiveTab] = import_react58.default.useState(agents.length > 0 ? "active" : "available");
|
|
74024
74147
|
const scroll = useScrollableList({
|
|
74025
74148
|
total: rows.length,
|
|
74026
74149
|
windowSize: WINDOW3,
|
|
@@ -74031,10 +74154,10 @@ var init_AgentsPanel = __esm({
|
|
|
74031
74154
|
{ id: "available", label: `Available (${availableKinds.length + 1})` }
|
|
74032
74155
|
];
|
|
74033
74156
|
if (activeTab === "available") {
|
|
74034
|
-
return (0,
|
|
74157
|
+
return (0, import_jsx_runtime29.jsx)(Modal, { title: "Agents", subtitle: `${availableKinds.length + 1} kind${availableKinds.length === 0 ? "" : "s"} installed`, tabs, activeTabId: activeTab, onTabChange: (id) => setActiveTab(id), ...onClose ? { onClose } : {}, children: (0, import_jsx_runtime29.jsx)(KindsList, { kinds: availableKinds }) });
|
|
74035
74158
|
}
|
|
74036
74159
|
if (agents.length === 0) {
|
|
74037
|
-
return (0,
|
|
74160
|
+
return (0, import_jsx_runtime29.jsx)(Modal, { title: "Agents", subtitle: "no subagents spawned this session", tabs, activeTabId: activeTab, onTabChange: (id) => setActiveTab(id), ...onClose ? { onClose } : {}, children: (0, import_jsx_runtime29.jsx)(Text, { dimColor: true, children: "(spawn agents via the `dispatch_agent` tool)" }) });
|
|
74038
74161
|
}
|
|
74039
74162
|
const running = agents.filter((a2) => a2.state === "running").length;
|
|
74040
74163
|
const summary = `${agents.length} agent${agents.length === 1 ? "" : "s"}` + (running > 0 ? ` \xB7 ${running} running` : "");
|
|
@@ -74042,25 +74165,25 @@ var init_AgentsPanel = __esm({
|
|
|
74042
74165
|
const hints = "\u2191\u2193 scroll \xB7 PgUp/PgDn fast \xB7 g/G top/bottom";
|
|
74043
74166
|
const slice = rows.slice(scroll.visible.start, scroll.visible.end);
|
|
74044
74167
|
const labelColWidth = Math.min(18, agents.reduce((m3, a2) => Math.max(m3, a2.label.length), 0) + 2);
|
|
74045
|
-
return (0,
|
|
74168
|
+
return (0, import_jsx_runtime29.jsxs)(Modal, { title: "Agents", subtitle, hints, tabs, activeTabId: activeTab, onTabChange: (id) => setActiveTab(id), ...onClose ? { onClose } : {}, children: [(0, import_jsx_runtime29.jsx)(Box_default, { flexDirection: "column", marginBottom: 1, children: agents.map((a2) => (0, import_jsx_runtime29.jsx)(AgentSummary, { agent: a2 }, a2.childSessionId)) }), scroll.canScrollUp ? (0, import_jsx_runtime29.jsx)(Text, { dimColor: true, children: ` \u2191 ${scroll.offset} more above` }) : null, slice.map((entry, i2) => {
|
|
74046
74169
|
const absoluteIndex = scroll.visible.start + i2;
|
|
74047
74170
|
const focused = absoluteIndex === scroll.cursor;
|
|
74048
74171
|
const time = new Date(entry.row.atMs).toISOString().slice(11, 19);
|
|
74049
|
-
return (0,
|
|
74050
|
-
}), scroll.canScrollDown ? (0,
|
|
74172
|
+
return (0, import_jsx_runtime29.jsxs)(Box_default, { children: [(0, import_jsx_runtime29.jsx)(Text, { ...focused ? {} : { dimColor: true }, children: focused ? "\u203A " : " " }), (0, import_jsx_runtime29.jsx)(Box_default, { width: 10, children: (0, import_jsx_runtime29.jsx)(Text, { dimColor: true, children: time }) }), (0, import_jsx_runtime29.jsx)(Box_default, { width: labelColWidth, children: (0, import_jsx_runtime29.jsx)(Text, { dimColor: true, children: truncate5(entry.agent.label, labelColWidth - 1) }) }), (0, import_jsx_runtime29.jsx)(Box_default, { flexGrow: 1, children: (0, import_jsx_runtime29.jsx)(Text, { ...entry.row.color ? { color: entry.row.color } : {}, wrap: "truncate", children: entry.row.text }) })] }, `${entry.agent.childSessionId}:${absoluteIndex}`);
|
|
74173
|
+
}), scroll.canScrollDown ? (0, import_jsx_runtime29.jsx)(Text, { dimColor: true, children: ` \u2193 ${rows.length - scroll.visible.end} more below` }) : null] });
|
|
74051
74174
|
};
|
|
74052
74175
|
KindsList = ({ kinds }) => {
|
|
74053
74176
|
const termWidth = process.stdout.columns ?? 80;
|
|
74054
74177
|
const nameCol = 20;
|
|
74055
74178
|
const descCol = Math.max(20, termWidth - nameCol - 12);
|
|
74056
|
-
return (0,
|
|
74179
|
+
return (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", children: [(0, import_jsx_runtime29.jsxs)(Box_default, { marginLeft: 2, children: [(0, import_jsx_runtime29.jsx)(Box_default, { width: nameCol, children: (0, import_jsx_runtime29.jsx)(Text, { bold: true, children: "default" }) }), (0, import_jsx_runtime29.jsx)(Box_default, { width: descCol, children: (0, import_jsx_runtime29.jsx)(Text, { dimColor: true, wrap: "truncate", children: "generic tool-use loop (built-in fallback)" }) })] }), kinds.map((k3) => (0, import_jsx_runtime29.jsxs)(Box_default, { marginLeft: 2, children: [(0, import_jsx_runtime29.jsx)(Box_default, { width: nameCol, children: (0, import_jsx_runtime29.jsx)(Text, { bold: true, children: truncate5(k3.name, nameCol - 1) }) }), (0, import_jsx_runtime29.jsx)(Box_default, { width: descCol, children: (0, import_jsx_runtime29.jsx)(Text, { dimColor: true, wrap: "truncate", children: k3.description }) })] }, k3.name)), kinds.length === 0 ? (0, import_jsx_runtime29.jsx)(Box_default, { marginLeft: 2, marginTop: 1, children: (0, import_jsx_runtime29.jsx)(Text, { dimColor: true, children: "install an agent plugin to add kinds" }) }) : null] });
|
|
74057
74180
|
};
|
|
74058
74181
|
AgentSummary = ({ agent }) => {
|
|
74059
74182
|
const elapsedMs = (agent.completedAtMs ?? Date.now()) - agent.startedAtMs;
|
|
74060
74183
|
const elapsed = formatElapsed(elapsedMs);
|
|
74061
74184
|
const dot = agent.state === "running" ? Colors.busy : agent.state === "failed" ? Colors.danger : "blue";
|
|
74062
74185
|
const toolCount = agent.activity.filter((r2) => r2.text.startsWith("\u2192 tool ")).length;
|
|
74063
|
-
return (0,
|
|
74186
|
+
return (0, import_jsx_runtime29.jsxs)(Box_default, { children: [(0, import_jsx_runtime29.jsx)(Text, { color: dot, children: "\u25CF " }), (0, import_jsx_runtime29.jsx)(Box_default, { width: 20, children: (0, import_jsx_runtime29.jsx)(Text, { bold: true, children: truncate5(agent.label, 19) }) }), (0, import_jsx_runtime29.jsx)(Text, { dimColor: true, children: `${agent.state} ${elapsed} \xB7 ${toolCount} tool call${toolCount === 1 ? "" : "s"}` })] });
|
|
74064
74187
|
};
|
|
74065
74188
|
}
|
|
74066
74189
|
});
|
|
@@ -74119,11 +74242,11 @@ function sparkline(series, maxCols = 48) {
|
|
|
74119
74242
|
const max = peak(tail, 1);
|
|
74120
74243
|
return tail.map((v3) => SPARKS[Math.min(SPARKS.length - 1, Math.round(v3 / max * (SPARKS.length - 1)))]).join("");
|
|
74121
74244
|
}
|
|
74122
|
-
var
|
|
74245
|
+
var import_jsx_runtime30, import_react59, BAR_WIDTH, LABEL_COL, SPARKS, Bar, CompRow, MetricRow, MODEL_COL, ModelRow, UsagePanel;
|
|
74123
74246
|
var init_UsagePanel = __esm({
|
|
74124
74247
|
async "../plugin-cli/dist/components/UsagePanel.js"() {
|
|
74125
|
-
|
|
74126
|
-
|
|
74248
|
+
import_jsx_runtime30 = __toESM(require_jsx_runtime());
|
|
74249
|
+
import_react59 = __toESM(require_react());
|
|
74127
74250
|
await init_build2();
|
|
74128
74251
|
init_dist();
|
|
74129
74252
|
init_theme();
|
|
@@ -74133,20 +74256,20 @@ var init_UsagePanel = __esm({
|
|
|
74133
74256
|
SPARKS = "\u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2588";
|
|
74134
74257
|
Bar = ({ frac, color, width = BAR_WIDTH }) => {
|
|
74135
74258
|
const filled = Math.round(clamp2(frac) * width);
|
|
74136
|
-
return (0,
|
|
74259
|
+
return (0, import_jsx_runtime30.jsxs)(Text, { children: [(0, import_jsx_runtime30.jsx)(Text, { ...color ? { color } : {}, children: "\u2588".repeat(filled) }), (0, import_jsx_runtime30.jsx)(Text, { dimColor: true, children: "\u2591".repeat(width - filled) })] });
|
|
74137
74260
|
};
|
|
74138
|
-
CompRow = ({ label: label3, frac, value, color }) => (0,
|
|
74139
|
-
MetricRow = ({ label: label3, frac, color, suffix }) => (0,
|
|
74261
|
+
CompRow = ({ label: label3, frac, value, color }) => (0, import_jsx_runtime30.jsxs)(Box_default, { children: [(0, import_jsx_runtime30.jsx)(Box_default, { width: LABEL_COL, children: (0, import_jsx_runtime30.jsx)(Text, { dimColor: true, children: label3 }) }), (0, import_jsx_runtime30.jsx)(Bar, { frac, color }), (0, import_jsx_runtime30.jsx)(Text, { children: ` ${pct(frac).padStart(4)}` }), (0, import_jsx_runtime30.jsx)(Text, { dimColor: true, children: ` ${fmt(value)}` })] });
|
|
74262
|
+
MetricRow = ({ label: label3, frac, color, suffix }) => (0, import_jsx_runtime30.jsxs)(Box_default, { children: [(0, import_jsx_runtime30.jsx)(Box_default, { width: LABEL_COL, children: (0, import_jsx_runtime30.jsx)(Text, { bold: true, children: label3 }) }), (0, import_jsx_runtime30.jsx)(Bar, { frac, color }), (0, import_jsx_runtime30.jsx)(Text, { children: ` ${pct(frac).padStart(4)}` }), suffix ? (0, import_jsx_runtime30.jsx)(Text, { dimColor: true, children: ` ${suffix}` }) : null] });
|
|
74140
74263
|
MODEL_COL = 26;
|
|
74141
74264
|
ModelRow = ({ name, calls, prompt, output, dim }) => {
|
|
74142
74265
|
const label3 = name.length > MODEL_COL - 1 ? `${name.slice(0, MODEL_COL - 2)}\u2026` : name;
|
|
74143
|
-
return (0,
|
|
74266
|
+
return (0, import_jsx_runtime30.jsxs)(Box_default, { children: [(0, import_jsx_runtime30.jsx)(Box_default, { width: MODEL_COL, children: (0, import_jsx_runtime30.jsx)(Text, { dimColor: dim, children: label3 }) }), (0, import_jsx_runtime30.jsx)(Text, { dimColor: true, children: `${String(calls).padStart(4)} calls ${fmt(prompt).padStart(7)} prompt ${fmt(output).padStart(6)} out` })] });
|
|
74144
74267
|
};
|
|
74145
74268
|
UsagePanel = ({ events, contextWindow, contextTokens, onClose }) => {
|
|
74146
|
-
const s2 =
|
|
74147
|
-
const series =
|
|
74148
|
-
const [lifetime, setLifetime] =
|
|
74149
|
-
|
|
74269
|
+
const s2 = import_react59.default.useMemo(() => summarizeSessionTokensFromEvents(events), [events]);
|
|
74270
|
+
const series = import_react59.default.useMemo(() => perCallPrompt(events), [events]);
|
|
74271
|
+
const [lifetime, setLifetime] = import_react59.default.useState(null);
|
|
74272
|
+
import_react59.default.useEffect(() => {
|
|
74150
74273
|
let alive = true;
|
|
74151
74274
|
void loadUsageStats().then((f3) => {
|
|
74152
74275
|
if (alive)
|
|
@@ -74156,19 +74279,19 @@ var init_UsagePanel = __esm({
|
|
|
74156
74279
|
alive = false;
|
|
74157
74280
|
};
|
|
74158
74281
|
}, []);
|
|
74159
|
-
const liveByModel =
|
|
74160
|
-
const lifeRows =
|
|
74282
|
+
const liveByModel = import_react59.default.useMemo(() => summarizeTokensByModel(events), [events]);
|
|
74283
|
+
const lifeRows = import_react59.default.useMemo(() => modelBreakdownRows(lifetime, liveByModel), [lifetime, liveByModel]);
|
|
74161
74284
|
const hasModels = lifeRows.length > 0;
|
|
74162
|
-
const lifeTotal =
|
|
74285
|
+
const lifeTotal = import_react59.default.useMemo(() => lifeRows.reduce((acc, r2) => ({
|
|
74163
74286
|
calls: acc.calls + r2.calls,
|
|
74164
74287
|
prompt: acc.prompt + r2.prompt,
|
|
74165
74288
|
output: acc.output + r2.output
|
|
74166
74289
|
}), { calls: 0, prompt: 0, output: 0 }), [lifeRows]);
|
|
74167
74290
|
const hasSession = s2.calls > 0;
|
|
74168
|
-
const [activeTab, setActiveTab] =
|
|
74291
|
+
const [activeTab, setActiveTab] = import_react59.default.useState(hasSession ? "session" : "lifetime");
|
|
74169
74292
|
if (!hasSession && !hasModels) {
|
|
74170
74293
|
const loading = lifetime === null;
|
|
74171
|
-
return (0,
|
|
74294
|
+
return (0, import_jsx_runtime30.jsx)(Modal, { title: "Usage", subtitle: loading ? "loading\u2026" : "no usage recorded yet", ...onClose ? { onClose } : {}, children: (0, import_jsx_runtime30.jsx)(Text, { dimColor: true, children: loading ? "(reading saved usage\u2026)" : "(no token usage yet \u2014 run a turn, then reopen /usage)" }) });
|
|
74172
74295
|
}
|
|
74173
74296
|
const tabs = hasSession && hasModels ? [
|
|
74174
74297
|
{ id: "session", label: "This session" },
|
|
@@ -74184,7 +74307,7 @@ var init_UsagePanel = __esm({
|
|
|
74184
74307
|
const subtitle = hasSession ? `${s2.calls} calls \xB7 ${fmt(s2.totalPrompt)} prompt \xB7 ${fmt(s2.totalOutput)} output` : "saved across sessions";
|
|
74185
74308
|
const showSession = hasSession && (!tabs || activeTab === "session");
|
|
74186
74309
|
const showLifetime = hasModels && (!tabs || activeTab === "lifetime");
|
|
74187
|
-
return (0,
|
|
74310
|
+
return (0, import_jsx_runtime30.jsxs)(Modal, { title: "Usage", subtitle, ...tabs ? { tabs, activeTabId: activeTab, onTabChange: (id) => setActiveTab(id) } : {}, ...onClose ? { onClose } : {}, children: [showSession ? (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [(0, import_jsx_runtime30.jsx)(Text, { bold: true, children: "Prompt composition" }), (0, import_jsx_runtime30.jsx)(CompRow, { label: "cache read", frac: readFrac, value: s2.totalCacheRead, color: Colors.active }), (0, import_jsx_runtime30.jsx)(CompRow, { label: "fresh input", frac: freshFrac, value: s2.totalInput }), (0, import_jsx_runtime30.jsx)(CompRow, { label: "cache write", frac: writeFrac, value: s2.totalCacheCreation, color: Colors.busy }), (0, import_jsx_runtime30.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [(0, import_jsx_runtime30.jsx)(MetricRow, { label: "Cache hit", frac: s2.cacheHitRate, color: s2.cacheHitRate >= 0.5 ? Colors.active : Colors.busy }), ctxFrac != null ? (0, import_jsx_runtime30.jsx)(MetricRow, { label: "Context fill", frac: ctxFrac, color: ctxColor, suffix: `${fmt(contextTokens ?? 0)} / ${fmt(contextWindow ?? 0)}` }) : null] }), (0, import_jsx_runtime30.jsxs)(Box_default, { marginTop: 1, children: [(0, import_jsx_runtime30.jsx)(Box_default, { width: LABEL_COL, children: (0, import_jsx_runtime30.jsx)(Text, { bold: true, children: "Input cost" }) }), (0, import_jsx_runtime30.jsxs)(Text, { children: [fmt(s2.billedInputEq), " billed-eq"] }), saved > 5e-3 ? (0, import_jsx_runtime30.jsx)(Text, { color: Colors.active, bold: true, children: ` saved ${pct(saved)}` }) : (0, import_jsx_runtime30.jsx)(Text, { dimColor: true, children: " no cache savings yet" })] }), (0, import_jsx_runtime30.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [(0, import_jsx_runtime30.jsxs)(Box_default, { children: [(0, import_jsx_runtime30.jsx)(Text, { bold: true, children: "Per-call prompt " }), (0, import_jsx_runtime30.jsx)(Text, { dimColor: true, children: `peak ${fmt(peak(series))}` })] }), (0, import_jsx_runtime30.jsxs)(Box_default, { children: [(0, import_jsx_runtime30.jsx)(Text, { children: sparkline(series) }), trend ? (0, import_jsx_runtime30.jsx)(Text, { color: trend === "growing" ? Colors.busy : Colors.active, children: trend === "growing" ? " \u2191 growing" : " \u2248 bounded" }) : null] })] }), !s2.cacheEffective ? (0, import_jsx_runtime30.jsx)(Box_default, { marginTop: 1, children: (0, import_jsx_runtime30.jsx)(Text, { color: Colors.danger, children: "\u26A0 cache ineffective \u2014 writing cache but not reading it back (prefix likely unstable)" }) }) : null] }) : null, showLifetime ? (0, import_jsx_runtime30.jsxs)(Box_default, { marginTop: showSession ? 1 : 0, flexDirection: "column", children: [(0, import_jsx_runtime30.jsxs)(Box_default, { children: [(0, import_jsx_runtime30.jsx)(Text, { bold: true, children: "By model " }), (0, import_jsx_runtime30.jsx)(Text, { dimColor: true, children: `(saved + this session \xB7 ${lifeRows.length} model${lifeRows.length === 1 ? "" : "s"})` })] }), lifeRows.slice(0, 8).map((r2) => (0, import_jsx_runtime30.jsx)(ModelRow, { name: r2.name, calls: r2.calls, prompt: r2.prompt, output: r2.output }, r2.name)), lifeRows.length > 1 ? (0, import_jsx_runtime30.jsx)(ModelRow, { name: "total", calls: lifeTotal.calls, prompt: lifeTotal.prompt, output: lifeTotal.output, dim: true }) : null, (0, import_jsx_runtime30.jsx)(Text, { dimColor: true, children: " /usage clear resets saved history" })] }) : null] });
|
|
74188
74311
|
};
|
|
74189
74312
|
}
|
|
74190
74313
|
});
|
|
@@ -74193,11 +74316,11 @@ var init_UsagePanel = __esm({
|
|
|
74193
74316
|
function stepMark(status) {
|
|
74194
74317
|
return status === "completed" ? "\u2713" : status === "skipped" ? "\u2013" : status === "failed" ? "\u2717" : "\xB7";
|
|
74195
74318
|
}
|
|
74196
|
-
var
|
|
74319
|
+
var import_jsx_runtime31, import_react60, NAME_COL3, SCOPE_COL2, TRIG_COL, WINDOW4, WorkflowsPanel;
|
|
74197
74320
|
var init_WorkflowsPanel = __esm({
|
|
74198
74321
|
async "../plugin-cli/dist/components/WorkflowsPanel.js"() {
|
|
74199
|
-
|
|
74200
|
-
|
|
74322
|
+
import_jsx_runtime31 = __toESM(require_jsx_runtime());
|
|
74323
|
+
import_react60 = __toESM(require_react());
|
|
74201
74324
|
await init_build2();
|
|
74202
74325
|
init_dist7();
|
|
74203
74326
|
init_theme();
|
|
@@ -74208,13 +74331,13 @@ var init_WorkflowsPanel = __esm({
|
|
|
74208
74331
|
TRIG_COL = 20;
|
|
74209
74332
|
WINDOW4 = 12;
|
|
74210
74333
|
WorkflowsPanel = ({ view, onClose }) => {
|
|
74211
|
-
const [rows, setRows] =
|
|
74212
|
-
const [loading, setLoading] =
|
|
74213
|
-
const [busy2, setBusy] =
|
|
74214
|
-
const [status, setStatus] =
|
|
74215
|
-
const [pending, setPending] =
|
|
74216
|
-
const [reply, setReply] =
|
|
74217
|
-
const reload =
|
|
74334
|
+
const [rows, setRows] = import_react60.default.useState([]);
|
|
74335
|
+
const [loading, setLoading] = import_react60.default.useState(true);
|
|
74336
|
+
const [busy2, setBusy] = import_react60.default.useState(false);
|
|
74337
|
+
const [status, setStatus] = import_react60.default.useState(null);
|
|
74338
|
+
const [pending, setPending] = import_react60.default.useState(null);
|
|
74339
|
+
const [reply, setReply] = import_react60.default.useState("");
|
|
74340
|
+
const reload = import_react60.default.useCallback(async () => {
|
|
74218
74341
|
if (!view) {
|
|
74219
74342
|
setLoading(false);
|
|
74220
74343
|
return;
|
|
@@ -74228,11 +74351,11 @@ var init_WorkflowsPanel = __esm({
|
|
|
74228
74351
|
setLoading(false);
|
|
74229
74352
|
}
|
|
74230
74353
|
}, [view]);
|
|
74231
|
-
|
|
74354
|
+
import_react60.default.useEffect(() => {
|
|
74232
74355
|
void reload();
|
|
74233
74356
|
}, [reload]);
|
|
74234
74357
|
const active2 = !busy2 && !pending && !!view && rows.length > 0;
|
|
74235
|
-
const run2 =
|
|
74358
|
+
const run2 = import_react60.default.useCallback(async (wf) => {
|
|
74236
74359
|
if (!view || busy2)
|
|
74237
74360
|
return;
|
|
74238
74361
|
if (!wf.enabled) {
|
|
@@ -74263,7 +74386,7 @@ var init_WorkflowsPanel = __esm({
|
|
|
74263
74386
|
void reload();
|
|
74264
74387
|
}
|
|
74265
74388
|
}, [view, busy2, reload]);
|
|
74266
|
-
const submitReply =
|
|
74389
|
+
const submitReply = import_react60.default.useCallback(async (pendingRun, text) => {
|
|
74267
74390
|
if (!view?.resume) {
|
|
74268
74391
|
setStatus("resume not supported by this session");
|
|
74269
74392
|
return;
|
|
@@ -74342,11 +74465,11 @@ var init_WorkflowsPanel = __esm({
|
|
|
74342
74465
|
const slice = rows.slice(scroll.visible.start, scroll.visible.end);
|
|
74343
74466
|
const subtitle = rows.length === 0 ? "none" : `${scroll.cursor + 1} of ${rows.length} \xB7 ${rows.length} workflow${rows.length === 1 ? "" : "s"}`;
|
|
74344
74467
|
const hints = "d enable/disable \xB7 Enter/r run \xB7 \u2191\u2193 navigate \xB7 Esc close";
|
|
74345
|
-
return (0,
|
|
74468
|
+
return (0, import_jsx_runtime31.jsxs)(Modal, { title: "Workflows", subtitle, hints, ...onClose ? { onClose } : {}, children: [!view ? (0, import_jsx_runtime31.jsx)(Text, { dimColor: true, children: "(workflows unavailable in this session)" }) : loading ? (0, import_jsx_runtime31.jsx)(Text, { dimColor: true, children: "loading\u2026" }) : rows.length === 0 ? (0, import_jsx_runtime31.jsx)(Text, { dimColor: true, children: "(no workflows \u2014 ask the agent to \u201Ccreate a workflow that\u2026\u201D, or scaffold one in chat)" }) : null, scroll.canScrollUp ? (0, import_jsx_runtime31.jsx)(Text, { dimColor: true, children: ` \u2191 ${scroll.offset} more above` }) : null, slice.map((wf, i2) => {
|
|
74346
74469
|
const absoluteIndex = scroll.visible.start + i2;
|
|
74347
74470
|
const focused = absoluteIndex === scroll.cursor;
|
|
74348
|
-
return (0,
|
|
74349
|
-
}), scroll.canScrollDown ? (0,
|
|
74471
|
+
return (0, import_jsx_runtime31.jsxs)(Box_default, { children: [(0, import_jsx_runtime31.jsx)(Text, { ...focused ? {} : { dimColor: true }, children: focused ? "\u203A " : " " }), (0, import_jsx_runtime31.jsx)(Text, { color: wf.enabled ? Colors.active : void 0, dimColor: !wf.enabled, children: wf.enabled ? "\u25CF " : "\u25CB " }), (0, import_jsx_runtime31.jsx)(Box_default, { width: NAME_COL3, children: (0, import_jsx_runtime31.jsx)(Text, { bold: focused, children: truncate3(wf.name, NAME_COL3 - 2) }) }), (0, import_jsx_runtime31.jsx)(Box_default, { width: SCOPE_COL2, children: (0, import_jsx_runtime31.jsx)(Text, { dimColor: true, children: wf.scope }) }), (0, import_jsx_runtime31.jsx)(Box_default, { width: TRIG_COL, children: (0, import_jsx_runtime31.jsx)(Text, { dimColor: true, wrap: "truncate", children: wf.triggers }) }), (0, import_jsx_runtime31.jsx)(Box_default, { width: descWidth, children: (0, import_jsx_runtime31.jsx)(Text, { dimColor: true, wrap: "truncate", children: oneLine(wf.description) }) })] }, wf.name);
|
|
74472
|
+
}), scroll.canScrollDown ? (0, import_jsx_runtime31.jsx)(Text, { dimColor: true, children: ` \u2193 ${rows.length - scroll.visible.end} more below` }) : null, pending ? (0, import_jsx_runtime31.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, borderStyle: "round", borderColor: Colors.active, paddingX: 1, children: [(0, import_jsx_runtime31.jsxs)(Text, { color: Colors.active, children: ["\u23F8 Workflow waiting \xB7 ", pending.label] }), pending.prompt ? (0, import_jsx_runtime31.jsx)(Text, { wrap: "wrap", children: oneLine(pending.prompt).slice(0, 280) }) : null, (0, import_jsx_runtime31.jsxs)(Box_default, { marginTop: 1, children: [(0, import_jsx_runtime31.jsx)(Text, { children: "reply \u203A " }), (0, import_jsx_runtime31.jsx)(Text, { children: reply || " " })] }), (0, import_jsx_runtime31.jsx)(Text, { dimColor: true, children: "Enter send \xB7 Esc cancel" })] }) : null, status ? (0, import_jsx_runtime31.jsx)(Box_default, { marginTop: 1, children: (0, import_jsx_runtime31.jsx)(Text, { wrap: "truncate-end", children: status }) }) : null] });
|
|
74350
74473
|
};
|
|
74351
74474
|
}
|
|
74352
74475
|
});
|
|
@@ -74382,11 +74505,11 @@ function formatUptime(startedAt) {
|
|
|
74382
74505
|
function errMsg(err) {
|
|
74383
74506
|
return err instanceof Error ? err.message : String(err);
|
|
74384
74507
|
}
|
|
74385
|
-
var
|
|
74508
|
+
var import_jsx_runtime32, import_react61, WINDOW5, STATUS_POLL_MS, START_TIMEOUT_MS, STOP_GRACE_MS, ACTION_POLL_MS, ChannelsPanel, ConfigForm;
|
|
74386
74509
|
var init_ChannelsPanel = __esm({
|
|
74387
74510
|
async "../plugin-cli/dist/components/ChannelsPanel.js"() {
|
|
74388
|
-
|
|
74389
|
-
|
|
74511
|
+
import_jsx_runtime32 = __toESM(require_jsx_runtime());
|
|
74512
|
+
import_react61 = __toESM(require_react());
|
|
74390
74513
|
await init_build2();
|
|
74391
74514
|
init_theme();
|
|
74392
74515
|
await init_Modal();
|
|
@@ -74397,29 +74520,29 @@ var init_ChannelsPanel = __esm({
|
|
|
74397
74520
|
STOP_GRACE_MS = 4e3;
|
|
74398
74521
|
ACTION_POLL_MS = 350;
|
|
74399
74522
|
ChannelsPanel = ({ channels, vault, onClose }) => {
|
|
74400
|
-
const rows =
|
|
74401
|
-
const [statuses, setStatuses] =
|
|
74402
|
-
const [configured, setConfigured] =
|
|
74403
|
-
const [status, setStatus] =
|
|
74404
|
-
const [busy2, setBusy] =
|
|
74405
|
-
const [editing, setEditing] =
|
|
74406
|
-
const [fieldIdx, setFieldIdx] =
|
|
74407
|
-
const [buffer, setBuffer] =
|
|
74408
|
-
const [savedKeys, setSavedKeys] =
|
|
74409
|
-
const pollRef =
|
|
74523
|
+
const rows = import_react61.default.useMemo(() => channels.filter((c2) => c2.config).sort((a2, b3) => a2.name.localeCompare(b3.name)), [channels]);
|
|
74524
|
+
const [statuses, setStatuses] = import_react61.default.useState({});
|
|
74525
|
+
const [configured, setConfigured] = import_react61.default.useState({});
|
|
74526
|
+
const [status, setStatus] = import_react61.default.useState(null);
|
|
74527
|
+
const [busy2, setBusy] = import_react61.default.useState(false);
|
|
74528
|
+
const [editing, setEditing] = import_react61.default.useState(null);
|
|
74529
|
+
const [fieldIdx, setFieldIdx] = import_react61.default.useState(0);
|
|
74530
|
+
const [buffer, setBuffer] = import_react61.default.useState("");
|
|
74531
|
+
const [savedKeys, setSavedKeys] = import_react61.default.useState({});
|
|
74532
|
+
const pollRef = import_react61.default.useRef(null);
|
|
74410
74533
|
const clearPoll = () => {
|
|
74411
74534
|
if (pollRef.current) {
|
|
74412
74535
|
clearInterval(pollRef.current);
|
|
74413
74536
|
pollRef.current = null;
|
|
74414
74537
|
}
|
|
74415
74538
|
};
|
|
74416
|
-
const refreshStatuses =
|
|
74539
|
+
const refreshStatuses = import_react61.default.useCallback(() => {
|
|
74417
74540
|
const next = {};
|
|
74418
74541
|
for (const c2 of rows)
|
|
74419
74542
|
next[c2.name] = liveChannelStatus(c2.name);
|
|
74420
74543
|
setStatuses(next);
|
|
74421
74544
|
}, [rows]);
|
|
74422
|
-
const refreshConfigured =
|
|
74545
|
+
const refreshConfigured = import_react61.default.useCallback(async () => {
|
|
74423
74546
|
if (!vault) {
|
|
74424
74547
|
setConfigured({});
|
|
74425
74548
|
return;
|
|
@@ -74438,7 +74561,7 @@ var init_ChannelsPanel = __esm({
|
|
|
74438
74561
|
}
|
|
74439
74562
|
setConfigured(next);
|
|
74440
74563
|
}, [rows, vault]);
|
|
74441
|
-
|
|
74564
|
+
import_react61.default.useEffect(() => {
|
|
74442
74565
|
refreshStatuses();
|
|
74443
74566
|
void refreshConfigured();
|
|
74444
74567
|
const t2 = setInterval(refreshStatuses, STATUS_POLL_MS);
|
|
@@ -74447,7 +74570,7 @@ var init_ChannelsPanel = __esm({
|
|
|
74447
74570
|
clearPoll();
|
|
74448
74571
|
};
|
|
74449
74572
|
}, [refreshStatuses, refreshConfigured]);
|
|
74450
|
-
const startChannel2 =
|
|
74573
|
+
const startChannel2 = import_react61.default.useCallback((c2) => {
|
|
74451
74574
|
if (busy2)
|
|
74452
74575
|
return;
|
|
74453
74576
|
if (statuses[c2.name]) {
|
|
@@ -74484,7 +74607,7 @@ var init_ChannelsPanel = __esm({
|
|
|
74484
74607
|
}
|
|
74485
74608
|
}, ACTION_POLL_MS);
|
|
74486
74609
|
}, [busy2, statuses, configured, vault, refreshStatuses]);
|
|
74487
|
-
const stopChannel =
|
|
74610
|
+
const stopChannel = import_react61.default.useCallback((c2) => {
|
|
74488
74611
|
if (busy2)
|
|
74489
74612
|
return;
|
|
74490
74613
|
const before = statuses[c2.name];
|
|
@@ -74518,7 +74641,7 @@ var init_ChannelsPanel = __esm({
|
|
|
74518
74641
|
}
|
|
74519
74642
|
}, ACTION_POLL_MS);
|
|
74520
74643
|
}, [busy2, statuses, refreshStatuses]);
|
|
74521
|
-
const openConfig =
|
|
74644
|
+
const openConfig = import_react61.default.useCallback((c2) => {
|
|
74522
74645
|
if (!vault) {
|
|
74523
74646
|
setStatus(`configuring needs a local vault \u2014 set secrets via the desktop panel or \`moxxy ${c2.name} setup\`.`);
|
|
74524
74647
|
return;
|
|
@@ -74534,7 +74657,7 @@ var init_ChannelsPanel = __esm({
|
|
|
74534
74657
|
setStatus(null);
|
|
74535
74658
|
})();
|
|
74536
74659
|
}, [vault]);
|
|
74537
|
-
const saveField =
|
|
74660
|
+
const saveField = import_react61.default.useCallback((c2, field, value) => {
|
|
74538
74661
|
if (!vault)
|
|
74539
74662
|
return;
|
|
74540
74663
|
const v3 = value.trim();
|
|
@@ -74617,25 +74740,25 @@ var init_ChannelsPanel = __esm({
|
|
|
74617
74740
|
}, { isActive: !!editing && !busy2 });
|
|
74618
74741
|
const modalClose = editing ? void 0 : onClose;
|
|
74619
74742
|
if (editing) {
|
|
74620
|
-
return (0,
|
|
74743
|
+
return (0, import_jsx_runtime32.jsxs)(Modal, { title: `Configure ${editing.name}`, subtitle: vault ? "secrets are stored encrypted in your vault" : void 0, hints: "type value \xB7 Enter save \xB7 \u2191\u2193 field \xB7 Esc back", ...modalClose ? { onClose: modalClose } : {}, children: [(0, import_jsx_runtime32.jsx)(ConfigForm, { def: editing, fieldIdx, buffer, savedKeys }), status ? (0, import_jsx_runtime32.jsx)(Box_default, { marginTop: 1, children: (0, import_jsx_runtime32.jsx)(Text, { wrap: "truncate-end", children: status }) }) : null] });
|
|
74621
74744
|
}
|
|
74622
74745
|
const subtitle = rows.length === 0 ? "none" : `${Math.min(scroll.cursor + 1, rows.length)} of ${rows.length} \xB7 bots on their own runner`;
|
|
74623
74746
|
const slice = rows.slice(scroll.visible.start, scroll.visible.end);
|
|
74624
|
-
return (0,
|
|
74747
|
+
return (0, import_jsx_runtime32.jsxs)(Modal, { title: "Channels", subtitle, hints: "s start \xB7 x stop \xB7 c configure \xB7 \u2191\u2193 navigate", ...modalClose ? { onClose: modalClose } : {}, children: [rows.length === 0 ? (0, import_jsx_runtime32.jsx)(Text, { dimColor: true, children: "(no configurable channels \u2014 the Slack / Telegram plugins aren\u2019t loaded)" }) : null, scroll.canScrollUp ? (0, import_jsx_runtime32.jsx)(Text, { dimColor: true, children: ` \u2191 ${scroll.offset} more above` }) : null, slice.map((c2, i2) => {
|
|
74625
74748
|
const absoluteIndex = scroll.visible.start + i2;
|
|
74626
74749
|
const focused = absoluteIndex === scroll.cursor;
|
|
74627
74750
|
const st4 = statuses[c2.name] ?? null;
|
|
74628
74751
|
const running = !!st4;
|
|
74629
74752
|
const isConfigured = configured[c2.name];
|
|
74630
|
-
return (0,
|
|
74631
|
-
}), scroll.canScrollDown ? (0,
|
|
74753
|
+
return (0, import_jsx_runtime32.jsxs)(Box_default, { flexDirection: "column", children: [(0, import_jsx_runtime32.jsxs)(Box_default, { children: [(0, import_jsx_runtime32.jsx)(Text, { ...focused ? {} : { dimColor: true }, children: focused ? "\u203A " : " " }), (0, import_jsx_runtime32.jsx)(Text, { color: running ? Colors.active : void 0, dimColor: !running, children: running ? "\u25CF " : "\u25CB " }), (0, import_jsx_runtime32.jsx)(Box_default, { width: 12, children: (0, import_jsx_runtime32.jsx)(Text, { bold: focused, children: c2.name }) }), (0, import_jsx_runtime32.jsx)(Text, { dimColor: true, children: statusLabel(st4, isConfigured, vault != null) })] }), running && st4?.requestUrl ? (0, import_jsx_runtime32.jsx)(Box_default, { marginLeft: 6, children: (0, import_jsx_runtime32.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: `Request URL: ${st4.requestUrl}` }) }) : null] }, c2.name);
|
|
74754
|
+
}), scroll.canScrollDown ? (0, import_jsx_runtime32.jsx)(Text, { dimColor: true, children: ` \u2193 ${rows.length - scroll.visible.end} more below` }) : null, status ? (0, import_jsx_runtime32.jsx)(Box_default, { marginTop: 1, children: (0, import_jsx_runtime32.jsx)(Text, { wrap: "truncate-end", children: status }) }) : null] });
|
|
74632
74755
|
};
|
|
74633
74756
|
ConfigForm = ({ def, fieldIdx, buffer, savedKeys }) => {
|
|
74634
74757
|
const fields = def.config?.fields ?? [];
|
|
74635
|
-
return (0,
|
|
74758
|
+
return (0, import_jsx_runtime32.jsx)(Box_default, { flexDirection: "column", children: fields.map((f3, i2) => {
|
|
74636
74759
|
const focused = i2 === fieldIdx;
|
|
74637
74760
|
const isSet = savedKeys[f3.vaultKey];
|
|
74638
|
-
return (0,
|
|
74761
|
+
return (0, import_jsx_runtime32.jsxs)(Box_default, { flexDirection: "column", children: [(0, import_jsx_runtime32.jsxs)(Box_default, { children: [(0, import_jsx_runtime32.jsx)(Text, { ...focused ? {} : { dimColor: true }, children: focused ? "\u203A " : " " }), (0, import_jsx_runtime32.jsx)(Text, { color: isSet ? Colors.active : void 0, dimColor: !isSet, children: isSet ? "\u2713 " : "\u25E6 " }), (0, import_jsx_runtime32.jsx)(Box_default, { width: 18, children: (0, import_jsx_runtime32.jsx)(Text, { bold: focused, children: f3.label }) }), (0, import_jsx_runtime32.jsx)(Text, { dimColor: true, children: isSet ? "set" : f3.required ? "required" : "optional" })] }), focused ? (0, import_jsx_runtime32.jsxs)(Box_default, { marginLeft: 4, children: [(0, import_jsx_runtime32.jsx)(Text, { children: "\u203A " }), (0, import_jsx_runtime32.jsx)(Text, { children: renderBuffer(buffer, f3.secret) })] }) : null, focused && f3.help ? (0, import_jsx_runtime32.jsx)(Box_default, { marginLeft: 4, children: (0, import_jsx_runtime32.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: f3.help }) }) : null] }, f3.vaultKey);
|
|
74639
74762
|
}) });
|
|
74640
74763
|
};
|
|
74641
74764
|
}
|
|
@@ -74661,11 +74784,11 @@ function classifyVoiceNotice(notice) {
|
|
|
74661
74784
|
}
|
|
74662
74785
|
return { label: " \u2717 VOICE ", accent: Colors.danger, textColor: "black", body };
|
|
74663
74786
|
}
|
|
74664
|
-
var
|
|
74787
|
+
var import_jsx_runtime33, import_react62, OverlayOrNotice, SystemNotice;
|
|
74665
74788
|
var init_OverlayOrNotice = __esm({
|
|
74666
74789
|
async "../plugin-cli/dist/session/OverlayOrNotice.js"() {
|
|
74667
|
-
|
|
74668
|
-
|
|
74790
|
+
import_jsx_runtime33 = __toESM(require_jsx_runtime());
|
|
74791
|
+
import_react62 = __toESM(require_react());
|
|
74669
74792
|
await init_build2();
|
|
74670
74793
|
init_dist();
|
|
74671
74794
|
await init_SkillsPanel();
|
|
@@ -74677,8 +74800,8 @@ var init_OverlayOrNotice = __esm({
|
|
|
74677
74800
|
init_theme();
|
|
74678
74801
|
await init_helpers();
|
|
74679
74802
|
OverlayOrNotice = ({ overlay, systemNotice, session, events, contextWindow, contextTokens, getVault, getChannels, onClose }) => {
|
|
74680
|
-
const [skillUsage, setSkillUsage] =
|
|
74681
|
-
|
|
74803
|
+
const [skillUsage, setSkillUsage] = import_react62.default.useState({});
|
|
74804
|
+
import_react62.default.useEffect(() => {
|
|
74682
74805
|
if (overlay?.kind !== "skills")
|
|
74683
74806
|
return;
|
|
74684
74807
|
let cancelled = false;
|
|
@@ -74696,25 +74819,25 @@ var init_OverlayOrNotice = __esm({
|
|
|
74696
74819
|
};
|
|
74697
74820
|
}, [overlay?.kind]);
|
|
74698
74821
|
if (overlay?.kind === "skills") {
|
|
74699
|
-
return (0,
|
|
74822
|
+
return (0, import_jsx_runtime33.jsx)(SkillsPanel, { skills: session.skills.list(), mcpServers: deriveMcpServers(session.tools.list()), usage: skillUsage, onClose });
|
|
74700
74823
|
}
|
|
74701
74824
|
if (overlay?.kind === "tools") {
|
|
74702
|
-
return (0,
|
|
74825
|
+
return (0, import_jsx_runtime33.jsx)(ToolsPanel, { tools: session.tools.list(), onClose });
|
|
74703
74826
|
}
|
|
74704
74827
|
if (overlay?.kind === "workflows") {
|
|
74705
|
-
return (0,
|
|
74828
|
+
return (0, import_jsx_runtime33.jsx)(WorkflowsPanel, { view: session.workflows ?? null, onClose });
|
|
74706
74829
|
}
|
|
74707
74830
|
if (overlay?.kind === "channels") {
|
|
74708
|
-
return (0,
|
|
74831
|
+
return (0, import_jsx_runtime33.jsx)(ChannelsPanel, { channels: getChannels?.() ?? [], vault: getVault?.() ?? null, onClose });
|
|
74709
74832
|
}
|
|
74710
74833
|
if (overlay?.kind === "agents") {
|
|
74711
|
-
return (0,
|
|
74834
|
+
return (0, import_jsx_runtime33.jsx)(AgentsPanel, { events, availableKinds: session.agents.list(), onClose });
|
|
74712
74835
|
}
|
|
74713
74836
|
if (overlay?.kind === "usage") {
|
|
74714
|
-
return (0,
|
|
74837
|
+
return (0, import_jsx_runtime33.jsx)(UsagePanel, { events, contextWindow: contextWindow ?? null, contextTokens: contextTokens ?? null, onClose });
|
|
74715
74838
|
}
|
|
74716
74839
|
if (systemNotice) {
|
|
74717
|
-
return (0,
|
|
74840
|
+
return (0, import_jsx_runtime33.jsx)(SystemNotice, { notice: systemNotice });
|
|
74718
74841
|
}
|
|
74719
74842
|
return null;
|
|
74720
74843
|
};
|
|
@@ -74724,9 +74847,9 @@ var init_OverlayOrNotice = __esm({
|
|
|
74724
74847
|
const lines = voice.body.split("\n");
|
|
74725
74848
|
const [first, ...rest] = lines;
|
|
74726
74849
|
const plain = noColor();
|
|
74727
|
-
return (0,
|
|
74850
|
+
return (0, import_jsx_runtime33.jsxs)(Box_default, { marginTop: 1, marginBottom: 1, flexDirection: "column", children: [(0, import_jsx_runtime33.jsxs)(Box_default, { children: [plain ? (0, import_jsx_runtime33.jsx)(Text, { bold: true, children: `[${voice.label.trim()}]` }) : (0, import_jsx_runtime33.jsx)(Text, { backgroundColor: voice.accent, color: voice.textColor, bold: true, children: voice.label }), (0, import_jsx_runtime33.jsx)(Text, { ...plain ? { bold: true } : { color: voice.accent, bold: true }, children: ` ${first ?? ""}` })] }), rest.map((line, i2) => (0, import_jsx_runtime33.jsxs)(Text, { dimColor: true, children: [" ".repeat(voice.label.length + 1), line] }, i2))] });
|
|
74728
74851
|
}
|
|
74729
|
-
return (0,
|
|
74852
|
+
return (0, import_jsx_runtime33.jsx)(Box_default, { marginTop: 1, marginBottom: 1, flexDirection: "column", children: notice.split("\n").map((line, i2) => (0, import_jsx_runtime33.jsx)(Text, { children: line }, i2)) });
|
|
74730
74853
|
};
|
|
74731
74854
|
}
|
|
74732
74855
|
});
|
|
@@ -74739,10 +74862,10 @@ function previewToolInput(input) {
|
|
|
74739
74862
|
return "[unserializable]";
|
|
74740
74863
|
}
|
|
74741
74864
|
}
|
|
74742
|
-
var
|
|
74865
|
+
var import_jsx_runtime34, PermissionDialog;
|
|
74743
74866
|
var init_PermissionDialog = __esm({
|
|
74744
74867
|
async "../plugin-cli/dist/components/PermissionDialog.js"() {
|
|
74745
|
-
|
|
74868
|
+
import_jsx_runtime34 = __toESM(require_jsx_runtime());
|
|
74746
74869
|
__toESM(require_react());
|
|
74747
74870
|
await init_build2();
|
|
74748
74871
|
init_theme();
|
|
@@ -74761,7 +74884,7 @@ var init_PermissionDialog = __esm({
|
|
|
74761
74884
|
onDecide({ mode: "deny", reason: "user declined" });
|
|
74762
74885
|
});
|
|
74763
74886
|
const title = queueDepth > 0 ? `Tool permission requested (${queueDepth} more queued)` : "Tool permission requested";
|
|
74764
|
-
return (0,
|
|
74887
|
+
return (0, import_jsx_runtime34.jsxs)(Modal, { title, hints: "y allow \xB7 a session \xB7 p always \xB7 n deny", children: [(0, import_jsx_runtime34.jsxs)(Text, { children: ["Tool: ", (0, import_jsx_runtime34.jsx)(Text, { bold: true, children: call.name }), toolDescription ? (0, import_jsx_runtime34.jsxs)(Text, { dimColor: true, children: [" \u2014 ", toolDescription] }) : null] }), (0, import_jsx_runtime34.jsxs)(Text, { dimColor: true, children: ["Input: ", previewToolInput(call.input)] }), (0, import_jsx_runtime34.jsxs)(Text, { children: [(0, import_jsx_runtime34.jsx)(Text, { children: "[y]" }), (0, import_jsx_runtime34.jsx)(Text, { dimColor: true, children: " allow once \xB7 " }), (0, import_jsx_runtime34.jsx)(Text, { children: "[a]" }), (0, import_jsx_runtime34.jsx)(Text, { dimColor: true, children: " allow session \xB7 " }), (0, import_jsx_runtime34.jsx)(Text, { children: "[p]" }), (0, import_jsx_runtime34.jsx)(Text, { dimColor: true, children: " always \xB7 " }), (0, import_jsx_runtime34.jsx)(Text, { color: Colors.danger, children: "[n]" }), (0, import_jsx_runtime34.jsx)(Text, { dimColor: true, children: " deny" })] })] });
|
|
74765
74888
|
};
|
|
74766
74889
|
}
|
|
74767
74890
|
});
|
|
@@ -74810,11 +74933,11 @@ function renderDiffLines(bodyLines) {
|
|
|
74810
74933
|
}
|
|
74811
74934
|
return out;
|
|
74812
74935
|
}
|
|
74813
|
-
var
|
|
74936
|
+
var import_jsx_runtime35, import_react64, MAX_BODY_LINES, ApprovalDialog;
|
|
74814
74937
|
var init_ApprovalDialog = __esm({
|
|
74815
74938
|
async "../plugin-cli/dist/components/ApprovalDialog.js"() {
|
|
74816
|
-
|
|
74817
|
-
|
|
74939
|
+
import_jsx_runtime35 = __toESM(require_jsx_runtime());
|
|
74940
|
+
import_react64 = __toESM(require_react());
|
|
74818
74941
|
await init_build2();
|
|
74819
74942
|
init_theme();
|
|
74820
74943
|
await init_Modal();
|
|
@@ -74828,9 +74951,9 @@ var init_ApprovalDialog = __esm({
|
|
|
74828
74951
|
}
|
|
74829
74952
|
return 0;
|
|
74830
74953
|
})();
|
|
74831
|
-
const [cursor, setCursor] = (0,
|
|
74832
|
-
const [textEntry, setTextEntry] = (0,
|
|
74833
|
-
const [scrollOffset, setScrollOffset] = (0,
|
|
74954
|
+
const [cursor, setCursor] = (0, import_react64.useState)(initialCursor);
|
|
74955
|
+
const [textEntry, setTextEntry] = (0, import_react64.useState)(null);
|
|
74956
|
+
const [scrollOffset, setScrollOffset] = (0, import_react64.useState)(0);
|
|
74834
74957
|
const rawLines = request.body.split("\n");
|
|
74835
74958
|
const diffMode = isDiffBody(request.body);
|
|
74836
74959
|
const rendered = diffMode ? renderDiffLines(rawLines) : rawLines.map((text) => ({ text }));
|
|
@@ -74918,12 +75041,12 @@ var init_ApprovalDialog = __esm({
|
|
|
74918
75041
|
const hiddenAfter = Math.max(0, rendered.length - offset - visible.length);
|
|
74919
75042
|
const baseHints = textEntry ? "Enter submit \xB7 Esc back" : "\u2191\u2193 navigate \xB7 Enter select \xB7 digit jumps \xB7 Esc cancel";
|
|
74920
75043
|
const hints = !textEntry && rendered.length > MAX_BODY_LINES ? `${baseHints} \xB7 j/k scroll` : baseHints;
|
|
74921
|
-
return (0,
|
|
75044
|
+
return (0, import_jsx_runtime35.jsxs)(Modal, { title: request.title, hints, children: [rendered.length > 0 && rendered[0]?.text !== "" ? (0, import_jsx_runtime35.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [hiddenBefore > 0 ? (0, import_jsx_runtime35.jsxs)(Text, { dimColor: true, children: ["\u2191 ", hiddenBefore, " earlier line(s) \u2014 k/PgUp"] }) : null, visible.map((line, i2) => (0, import_jsx_runtime35.jsx)(Text, { ...line.color ? { color: line.color } : {}, ...line.dim ? { dimColor: true } : {}, children: line.text }, i2)), hiddenAfter > 0 ? (0, import_jsx_runtime35.jsxs)(Text, { dimColor: true, children: ["\u2193 ", hiddenAfter, " more line(s) \u2014 j/PgDn"] }) : null] }) : null, textEntry ? (0, import_jsx_runtime35.jsxs)(Box_default, { flexDirection: "column", children: [(0, import_jsx_runtime35.jsx)(Text, { dimColor: true, children: request.options.find((o2) => o2.id === textEntry.optionId)?.textPrompt ?? "Type your message and press Enter (Esc to back out):" }), (0, import_jsx_runtime35.jsxs)(Box_default, { children: [(0, import_jsx_runtime35.jsx)(Text, { children: "\u203A " }), (0, import_jsx_runtime35.jsx)(Text, { children: textEntry.buffer }), (0, import_jsx_runtime35.jsx)(Text, { inverse: true, children: " " })] })] }) : (0, import_jsx_runtime35.jsx)(Box_default, { flexDirection: "column", children: request.options.map((opt, i2) => {
|
|
74922
75045
|
const active2 = i2 === cursor;
|
|
74923
75046
|
const isDanger = !!opt.danger;
|
|
74924
75047
|
const radio = active2 ? "\u25CF" : "\u25CB";
|
|
74925
75048
|
const numLabel = opt.hotkey ?? String(i2 + 1);
|
|
74926
|
-
return (0,
|
|
75049
|
+
return (0, import_jsx_runtime35.jsxs)(Box_default, { children: [(0, import_jsx_runtime35.jsx)(Box_default, { width: 4, children: (0, import_jsx_runtime35.jsx)(Text, { ...active2 ? {} : { dimColor: true }, children: numLabel }) }), (0, import_jsx_runtime35.jsx)(Text, { ...isDanger ? { color: Colors.danger } : active2 ? {} : { dimColor: true }, children: `(${radio}) ` }), (0, import_jsx_runtime35.jsx)(Box_default, { width: 24, children: (0, import_jsx_runtime35.jsx)(Text, { bold: active2, ...isDanger ? { color: Colors.danger } : active2 ? {} : { dimColor: true }, children: opt.label }) }), opt.description ? (0, import_jsx_runtime35.jsx)(Text, { dimColor: true, children: opt.description }) : null] }, opt.id);
|
|
74927
75050
|
}) })] });
|
|
74928
75051
|
};
|
|
74929
75052
|
}
|
|
@@ -75065,20 +75188,20 @@ var init_provider_connect_flow = __esm({
|
|
|
75065
75188
|
});
|
|
75066
75189
|
|
|
75067
75190
|
// ../plugin-cli/dist/components/ProviderConnectDialog.js
|
|
75068
|
-
var
|
|
75191
|
+
var import_jsx_runtime36, import_react65, ProviderConnectDialog;
|
|
75069
75192
|
var init_ProviderConnectDialog = __esm({
|
|
75070
75193
|
async "../plugin-cli/dist/components/ProviderConnectDialog.js"() {
|
|
75071
|
-
|
|
75072
|
-
|
|
75194
|
+
import_jsx_runtime36 = __toESM(require_jsx_runtime());
|
|
75195
|
+
import_react65 = __toESM(require_react());
|
|
75073
75196
|
await init_build2();
|
|
75074
75197
|
init_theme();
|
|
75075
75198
|
await init_Modal();
|
|
75076
75199
|
init_provider_connect_flow();
|
|
75077
75200
|
ProviderConnectDialog = ({ providerId, setup, onSuccess, onCancel }) => {
|
|
75078
|
-
const [phase, setPhase] =
|
|
75079
|
-
const [buffer, setBuffer] =
|
|
75080
|
-
const flowRef =
|
|
75081
|
-
|
|
75201
|
+
const [phase, setPhase] = import_react65.default.useState({ kind: "installing" });
|
|
75202
|
+
const [buffer, setBuffer] = import_react65.default.useState("");
|
|
75203
|
+
const flowRef = import_react65.default.useRef(null);
|
|
75204
|
+
import_react65.default.useEffect(() => {
|
|
75082
75205
|
const flow = createConnectFlow({
|
|
75083
75206
|
setup,
|
|
75084
75207
|
providerId,
|
|
@@ -75126,7 +75249,7 @@ var init_ProviderConnectDialog = __esm({
|
|
|
75126
75249
|
});
|
|
75127
75250
|
const masked = phase.kind === "key-entry" || phase.kind === "oauth" && phase.prompt?.mask === true;
|
|
75128
75251
|
const echo = masked ? "\u2022".repeat(buffer.length) : buffer;
|
|
75129
|
-
return (0,
|
|
75252
|
+
return (0, import_jsx_runtime36.jsxs)(Modal, { title: `connect ${providerId}`, children: [phase.kind === "installing" ? (0, import_jsx_runtime36.jsxs)(Text, { color: Colors.chrome, children: ["installing ", providerId, " \u2014 this can take a minute\u2026"] }) : null, phase.kind === "key-entry" ? (0, import_jsx_runtime36.jsxs)(Box_default, { flexDirection: "column", children: [phase.error ? (0, import_jsx_runtime36.jsx)(Text, { color: Colors.danger, children: phase.error }) : null, phase.validating ? (0, import_jsx_runtime36.jsx)(Text, { color: Colors.chrome, children: "validating key\u2026" }) : (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [(0, import_jsx_runtime36.jsxs)(Text, { children: ["API key: ", (0, import_jsx_runtime36.jsx)(Text, { color: Colors.active, children: echo }), (0, import_jsx_runtime36.jsx)(Text, { color: Colors.chrome, children: "\u258F" })] }), (0, import_jsx_runtime36.jsx)(Text, { color: Colors.chrome, children: "enter save \xB7 esc cancel \u2014 stored in the vault, never in config" })] })] }) : null, phase.kind === "oauth" ? (0, import_jsx_runtime36.jsxs)(Box_default, { flexDirection: "column", children: [phase.lines.slice(-8).map((line, i2) => (0, import_jsx_runtime36.jsx)(Text, { color: Colors.chrome, wrap: "truncate-end", children: line }, `${i2}-${line.slice(0, 12)}`)), phase.prompt ? (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [(0, import_jsx_runtime36.jsx)(Text, { children: phase.prompt.question }), (0, import_jsx_runtime36.jsxs)(Text, { children: [(0, import_jsx_runtime36.jsx)(Text, { color: Colors.active, children: echo }), (0, import_jsx_runtime36.jsx)(Text, { color: Colors.chrome, children: "\u258F" })] })] }) : (0, import_jsx_runtime36.jsx)(Text, { color: Colors.chrome, children: "waiting for sign-in to complete\u2026 esc to cancel" })] }) : null, phase.kind === "done" ? (0, import_jsx_runtime36.jsxs)(Text, { color: Colors.active, children: ["\u2713 connected", phase.note ? ` \u2014 ${phase.note}` : ""] }) : null, phase.kind === "failed" ? (0, import_jsx_runtime36.jsxs)(Box_default, { flexDirection: "column", children: [(0, import_jsx_runtime36.jsx)(Text, { color: Colors.danger, children: phase.message }), (0, import_jsx_runtime36.jsx)(Text, { color: Colors.chrome, children: phase.retryable ? "r retry \xB7 esc close" : "esc close" })] }) : null] });
|
|
75130
75253
|
};
|
|
75131
75254
|
}
|
|
75132
75255
|
});
|
|
@@ -75193,24 +75316,24 @@ var init_plugin_setup_flow = __esm({
|
|
|
75193
75316
|
});
|
|
75194
75317
|
|
|
75195
75318
|
// ../plugin-cli/dist/components/PluginSetupDialog.js
|
|
75196
|
-
var
|
|
75319
|
+
var import_jsx_runtime37, import_react66, PluginSetupDialog;
|
|
75197
75320
|
var init_PluginSetupDialog = __esm({
|
|
75198
75321
|
async "../plugin-cli/dist/components/PluginSetupDialog.js"() {
|
|
75199
|
-
|
|
75200
|
-
|
|
75322
|
+
import_jsx_runtime37 = __toESM(require_jsx_runtime());
|
|
75323
|
+
import_react66 = __toESM(require_react());
|
|
75201
75324
|
await init_build2();
|
|
75202
75325
|
init_theme();
|
|
75203
75326
|
await init_Modal();
|
|
75204
75327
|
init_plugin_setup_flow();
|
|
75205
75328
|
PluginSetupDialog = ({ packageName, spec, onFinish }) => {
|
|
75206
|
-
const flowRef =
|
|
75329
|
+
const flowRef = import_react66.default.useRef(null);
|
|
75207
75330
|
if (flowRef.current === null) {
|
|
75208
75331
|
flowRef.current = createPluginSetupFlow(spec, onFinish);
|
|
75209
75332
|
}
|
|
75210
75333
|
const flow = flowRef.current;
|
|
75211
|
-
const [, bump] =
|
|
75212
|
-
const [buffer, setBuffer] =
|
|
75213
|
-
const [selectIndex, setSelectIndex] =
|
|
75334
|
+
const [, bump] = import_react66.default.useReducer((n2) => n2 + 1, 0);
|
|
75335
|
+
const [buffer, setBuffer] = import_react66.default.useState("");
|
|
75336
|
+
const [selectIndex, setSelectIndex] = import_react66.default.useState(0);
|
|
75214
75337
|
const field = flow.current();
|
|
75215
75338
|
const state = flow.state();
|
|
75216
75339
|
use_input_default((input, key) => {
|
|
@@ -75266,7 +75389,7 @@ var init_PluginSetupDialog = __esm({
|
|
|
75266
75389
|
}
|
|
75267
75390
|
});
|
|
75268
75391
|
const progress = `${Math.min(state.index + 1, spec.fields.length)}/${spec.fields.length}`;
|
|
75269
|
-
return (0,
|
|
75392
|
+
return (0, import_jsx_runtime37.jsxs)(Modal, { title: `setup ${packageName}`, subtitle: spec.title, children: [spec.description ? (0, import_jsx_runtime37.jsx)(Text, { color: Colors.chrome, children: spec.description }) : null, field ? (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", children: [state.error ? (0, import_jsx_runtime37.jsx)(Text, { color: Colors.danger, children: state.error }) : null, (0, import_jsx_runtime37.jsxs)(Text, { children: [(0, import_jsx_runtime37.jsxs)(Text, { color: Colors.chrome, children: ["[", progress, "] "] }), field.label, field.required === false ? (0, import_jsx_runtime37.jsx)(Text, { color: Colors.chrome, children: " (optional)" }) : null] }), field.description ? (0, import_jsx_runtime37.jsx)(Text, { color: Colors.chrome, children: field.description }) : null, field.kind === "boolean" ? (0, import_jsx_runtime37.jsx)(Text, { color: Colors.chrome, children: "y yes \xB7 n no \xB7 tab skip \xB7 esc cancel" }) : field.kind === "select" ? (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", children: [(field.options ?? []).map((c2, i2) => (0, import_jsx_runtime37.jsxs)(Text, { color: i2 === selectIndex ? Colors.active : void 0, children: [i2 === selectIndex ? "\u203A " : " ", c2] }, c2)), (0, import_jsx_runtime37.jsx)(Text, { color: Colors.chrome, children: "\u2191\u2193 choose \xB7 enter confirm \xB7 esc cancel" })] }) : (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [(0, import_jsx_runtime37.jsxs)(Text, { children: [(0, import_jsx_runtime37.jsx)(Text, { color: Colors.active, children: field.kind === "secret" ? "\u2022".repeat(buffer.length) : buffer }), (0, import_jsx_runtime37.jsx)(Text, { color: Colors.chrome, children: "\u258F" })] }), (0, import_jsx_runtime37.jsx)(Text, { color: Colors.chrome, children: field.kind === "secret" ? "enter save (empty keeps an existing value) \xB7 esc cancel" : "enter save \xB7 tab skip \xB7 esc cancel" })] })] }) : (0, import_jsx_runtime37.jsx)(Text, { color: Colors.chrome, children: "saving\u2026" })] });
|
|
75270
75393
|
};
|
|
75271
75394
|
}
|
|
75272
75395
|
});
|
|
@@ -75283,17 +75406,17 @@ function buildHints(searchable, hasTabs) {
|
|
|
75283
75406
|
parts.push("Esc close");
|
|
75284
75407
|
return parts.join(" \xB7 ");
|
|
75285
75408
|
}
|
|
75286
|
-
var
|
|
75409
|
+
var import_jsx_runtime38, import_react67, ListPicker, SearchBar;
|
|
75287
75410
|
var init_ListPicker = __esm({
|
|
75288
75411
|
async "../plugin-cli/dist/components/ListPicker.js"() {
|
|
75289
|
-
|
|
75290
|
-
|
|
75412
|
+
import_jsx_runtime38 = __toESM(require_jsx_runtime());
|
|
75413
|
+
import_react67 = __toESM(require_react());
|
|
75291
75414
|
await init_build2();
|
|
75292
75415
|
init_theme();
|
|
75293
75416
|
await init_Modal();
|
|
75294
75417
|
ListPicker = ({ title, options, tabs, initialTabId, searchable, searchPlaceholder, onSelect, onCancel }) => {
|
|
75295
75418
|
const hasTabs = !!(tabs && tabs.length > 0);
|
|
75296
|
-
const defaultTabId = (0,
|
|
75419
|
+
const defaultTabId = (0, import_react67.useMemo)(() => {
|
|
75297
75420
|
if (!hasTabs)
|
|
75298
75421
|
return void 0;
|
|
75299
75422
|
if (initialTabId && tabs.some((t2) => t2.id === initialTabId))
|
|
@@ -75301,13 +75424,13 @@ var init_ListPicker = __esm({
|
|
|
75301
75424
|
const tabWithCurrent = tabs.find((t2) => t2.options.some((o2) => o2.current));
|
|
75302
75425
|
return (tabWithCurrent ?? tabs[0]).id;
|
|
75303
75426
|
}, [hasTabs, initialTabId, tabs]);
|
|
75304
|
-
const [activeTabId, setActiveTabId] = (0,
|
|
75305
|
-
const [query, setQuery] = (0,
|
|
75306
|
-
const [cursor, setCursor] = (0,
|
|
75307
|
-
const [noSelectNotice, setNoSelectNotice] = (0,
|
|
75308
|
-
const activeTab = (0,
|
|
75427
|
+
const [activeTabId, setActiveTabId] = (0, import_react67.useState)(defaultTabId);
|
|
75428
|
+
const [query, setQuery] = (0, import_react67.useState)("");
|
|
75429
|
+
const [cursor, setCursor] = (0, import_react67.useState)(0);
|
|
75430
|
+
const [noSelectNotice, setNoSelectNotice] = (0, import_react67.useState)(false);
|
|
75431
|
+
const activeTab = (0, import_react67.useMemo)(() => hasTabs ? tabs.find((t2) => t2.id === activeTabId) ?? tabs[0] : null, [hasTabs, tabs, activeTabId]);
|
|
75309
75432
|
const sourceOptions = activeTab ? activeTab.options : options ?? [];
|
|
75310
|
-
const filtered = (0,
|
|
75433
|
+
const filtered = (0, import_react67.useMemo)(() => {
|
|
75311
75434
|
if (!searchable || !query.trim())
|
|
75312
75435
|
return sourceOptions;
|
|
75313
75436
|
const q4 = query.trim().toLowerCase();
|
|
@@ -75321,19 +75444,19 @@ var init_ListPicker = __esm({
|
|
|
75321
75444
|
return false;
|
|
75322
75445
|
});
|
|
75323
75446
|
}, [searchable, query, sourceOptions]);
|
|
75324
|
-
(0,
|
|
75447
|
+
(0, import_react67.useEffect)(() => {
|
|
75325
75448
|
setQuery("");
|
|
75326
75449
|
setCursor(0);
|
|
75327
75450
|
}, [activeTabId]);
|
|
75328
|
-
(0,
|
|
75451
|
+
(0, import_react67.useEffect)(() => {
|
|
75329
75452
|
if (cursor >= filtered.length)
|
|
75330
75453
|
setCursor(Math.max(0, filtered.length - 1));
|
|
75331
75454
|
}, [filtered.length, cursor]);
|
|
75332
|
-
(0,
|
|
75455
|
+
(0, import_react67.useEffect)(() => {
|
|
75333
75456
|
if (noSelectNotice)
|
|
75334
75457
|
setNoSelectNotice(false);
|
|
75335
75458
|
}, [query, filtered.length]);
|
|
75336
|
-
(0,
|
|
75459
|
+
(0, import_react67.useEffect)(() => {
|
|
75337
75460
|
if (query)
|
|
75338
75461
|
return;
|
|
75339
75462
|
const idx = filtered.findIndex((o2) => o2.current);
|
|
@@ -75395,15 +75518,15 @@ var init_ListPicker = __esm({
|
|
|
75395
75518
|
const subtitle = filtered.length === 0 ? query ? `no matches for "${query}"` : "no options" : `${cursor + 1} of ${filtered.length}` + (searchable && query ? ` \xB7 filtered from ${sourceOptions.length}` : "");
|
|
75396
75519
|
const hints = buildHints(searchable, hasTabs);
|
|
75397
75520
|
const modalTabs = hasTabs ? tabs.map((t2) => ({ id: t2.id, label: t2.label })) : void 0;
|
|
75398
|
-
return (0,
|
|
75521
|
+
return (0, import_jsx_runtime38.jsxs)(Modal, { title, subtitle, hints, ...modalTabs ? { tabs: modalTabs, activeTabId, onTabChange: setActiveTabId } : {}, children: [searchable ? (0, import_jsx_runtime38.jsx)(SearchBar, { query, placeholder: searchPlaceholder ?? "type to filter" }) : null, (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", children: [filtered.length === 0 ? (0, import_jsx_runtime38.jsx)(Text, { ...noSelectNotice ? { color: Colors.busy } : { dimColor: true }, children: noSelectNotice ? "nothing to select \u2014 clear the filter or press Esc" : query ? `(no options match "${query}")` : "(no options)" }) : null, moreAbove > 0 ? (0, import_jsx_runtime38.jsx)(Text, { dimColor: true, children: ` \u2191 ${moreAbove} more` }) : null, filtered.slice(start, end).map((opt, idx) => {
|
|
75399
75522
|
const i2 = start + idx;
|
|
75400
75523
|
const prevGroup = i2 > 0 ? filtered[i2 - 1].group : void 0;
|
|
75401
75524
|
const showHeader = !hasTabs && opt.group != null && opt.group !== prevGroup;
|
|
75402
75525
|
const focused = i2 === cursor;
|
|
75403
|
-
return (0,
|
|
75404
|
-
}), moreBelow > 0 ? (0,
|
|
75526
|
+
return (0, import_jsx_runtime38.jsxs)(import_react67.default.Fragment, { children: [showHeader ? (0, import_jsx_runtime38.jsx)(Box_default, { marginTop: idx === 0 ? 0 : 1, children: (0, import_jsx_runtime38.jsx)(Text, { dimColor: true, children: opt.group }) }) : null, (0, import_jsx_runtime38.jsxs)(Box_default, { children: [(0, import_jsx_runtime38.jsx)(Text, { ...focused ? {} : { dimColor: true }, children: focused ? "\u203A " : " " }), (0, import_jsx_runtime38.jsx)(Text, { ...focused ? { bold: true } : {}, children: opt.label }), opt.current ? (0, import_jsx_runtime38.jsx)(Text, { dimColor: true, children: " (current)" }) : null, opt.badge ? (0, import_jsx_runtime38.jsx)(Text, { color: opt.badgeColor === "red" ? Colors.danger : opt.badgeColor ?? Colors.danger, children: ` [${opt.badge}]` }) : null, opt.description ? (0, import_jsx_runtime38.jsx)(Text, { dimColor: true, children: ` \u2014 ${opt.description}` }) : null] })] }, opt.id);
|
|
75527
|
+
}), moreBelow > 0 ? (0, import_jsx_runtime38.jsx)(Text, { dimColor: true, children: ` \u2193 ${moreBelow} more` }) : null] })] });
|
|
75405
75528
|
};
|
|
75406
|
-
SearchBar = ({ query, placeholder }) => (0,
|
|
75529
|
+
SearchBar = ({ query, placeholder }) => (0, import_jsx_runtime38.jsxs)(Box_default, { marginBottom: 1, children: [(0, import_jsx_runtime38.jsx)(Text, { dimColor: true, children: "/ " }), query ? (0, import_jsx_runtime38.jsx)(Text, { children: query }) : (0, import_jsx_runtime38.jsx)(Text, { dimColor: true, children: placeholder }), (0, import_jsx_runtime38.jsx)(Text, { children: "\u258C" })] });
|
|
75407
75530
|
}
|
|
75408
75531
|
});
|
|
75409
75532
|
|
|
@@ -75412,10 +75535,10 @@ function oneLinePreview(s2) {
|
|
|
75412
75535
|
const flat = s2.replace(/\s+/g, " ").trim();
|
|
75413
75536
|
return flat.length <= PREVIEW_MAX ? flat : flat.slice(0, PREVIEW_MAX) + "\u2026";
|
|
75414
75537
|
}
|
|
75415
|
-
var
|
|
75538
|
+
var import_jsx_runtime39, PREVIEW_MAX, QueueView;
|
|
75416
75539
|
var init_QueueView = __esm({
|
|
75417
75540
|
async "../plugin-cli/dist/components/QueueView.js"() {
|
|
75418
|
-
|
|
75541
|
+
import_jsx_runtime39 = __toESM(require_jsx_runtime());
|
|
75419
75542
|
__toESM(require_react());
|
|
75420
75543
|
await init_build2();
|
|
75421
75544
|
init_theme();
|
|
@@ -75436,7 +75559,7 @@ var init_QueueView = __esm({
|
|
|
75436
75559
|
restCount = messages.length - 1;
|
|
75437
75560
|
}
|
|
75438
75561
|
const restPart = restCount > 0 ? ` \xB7 +${restCount} more` : "";
|
|
75439
|
-
return (0,
|
|
75562
|
+
return (0, import_jsx_runtime39.jsx)(Box_default, { flexDirection: "column", borderStyle: "single", borderBottom: false, borderLeft: false, borderRight: false, borderColor: "blackBright", borderDimColor: true, children: (0, import_jsx_runtime39.jsxs)(Box_default, { children: [(0, import_jsx_runtime39.jsxs)(Text, { color: "blackBright", dimColor: true, children: [Glyphs.contextUp, " "] }), (0, import_jsx_runtime39.jsxs)(Text, { dimColor: true, children: [headLabel, ": ", oneLinePreview(headText), restPart, " \xB7 \u2303t send \xB7 \u2303b drop"] })] }) });
|
|
75440
75563
|
};
|
|
75441
75564
|
}
|
|
75442
75565
|
});
|
|
@@ -75447,10 +75570,10 @@ function buildPromptPlaceholder(busy2, voiceReady = true) {
|
|
|
75447
75570
|
return "type to queue a message \u2014 sent after the current turn (ctrl+t to force-send first)";
|
|
75448
75571
|
return voiceReady ? "type a prompt, / for commands, Ctrl+R voice" : "type a prompt, / for commands";
|
|
75449
75572
|
}
|
|
75450
|
-
var
|
|
75573
|
+
var import_jsx_runtime40, InteractiveZone;
|
|
75451
75574
|
var init_InteractiveZone = __esm({
|
|
75452
75575
|
async "../plugin-cli/dist/session/InteractiveZone.js"() {
|
|
75453
|
-
|
|
75576
|
+
import_jsx_runtime40 = __toESM(require_jsx_runtime());
|
|
75454
75577
|
__toESM(require_react());
|
|
75455
75578
|
await init_build2();
|
|
75456
75579
|
await init_PermissionDialog();
|
|
@@ -75462,29 +75585,29 @@ var init_InteractiveZone = __esm({
|
|
|
75462
75585
|
await init_QueueView();
|
|
75463
75586
|
InteractiveZone = ({ session, pendingPermission, pendingPermissionDepth, pendingApproval, picker, pluginSetup, onPluginSetupFinish, providerConnect, onProviderConnectSuccess, onProviderConnectCancel, busy: busy2, voiceReady, voicePhase, yolo, slashCommands, queueMessages, priorityMessage, commandHotkeys, onCycleMode, externalInsert, onPermissionDecide, onApprovalDecide, onPickerSelect, onPickerCancel, onSubmit, onPasteText }) => {
|
|
75464
75587
|
if (pendingPermission) {
|
|
75465
|
-
return (0,
|
|
75588
|
+
return (0, import_jsx_runtime40.jsx)(PermissionDialog, { call: pendingPermission.call, toolDescription: session.tools.get(pendingPermission.call.name)?.description, queueDepth: pendingPermissionDepth, onDecide: (decision) => onPermissionDecide(pendingPermission, decision) });
|
|
75466
75589
|
}
|
|
75467
75590
|
if (pendingApproval) {
|
|
75468
|
-
return (0,
|
|
75591
|
+
return (0, import_jsx_runtime40.jsx)(ApprovalDialog, { request: pendingApproval.request, onDecide: (decision) => onApprovalDecide(decision) });
|
|
75469
75592
|
}
|
|
75470
75593
|
if (pluginSetup) {
|
|
75471
|
-
return (0,
|
|
75594
|
+
return (0, import_jsx_runtime40.jsx)(PluginSetupDialog, { packageName: pluginSetup.packageName, spec: pluginSetup.spec, onFinish: onPluginSetupFinish }, pluginSetup.packageName);
|
|
75472
75595
|
}
|
|
75473
75596
|
if (providerConnect && session.providerSetup) {
|
|
75474
|
-
return (0,
|
|
75597
|
+
return (0, import_jsx_runtime40.jsx)(ProviderConnectDialog, { providerId: providerConnect.providerId, setup: session.providerSetup, onSuccess: onProviderConnectSuccess, onCancel: onProviderConnectCancel }, providerConnect.providerId);
|
|
75475
75598
|
}
|
|
75476
75599
|
if (picker) {
|
|
75477
|
-
return picker.kind === "model" || picker.kind === "plugins" ? (0,
|
|
75600
|
+
return picker.kind === "model" || picker.kind === "plugins" ? (0, import_jsx_runtime40.jsx)(ListPicker, { title: picker.title, tabs: picker.tabs, ...picker.initialTabId ? { initialTabId: picker.initialTabId } : {}, searchable: picker.searchable ?? true, ...picker.searchPlaceholder ? { searchPlaceholder: picker.searchPlaceholder } : {}, onSelect: (id) => onPickerSelect(picker, id), onCancel: onPickerCancel }) : (0, import_jsx_runtime40.jsx)(ListPicker, { title: picker.title, options: picker.options, ...picker.kind === "sessions" && picker.searchable ? { searchable: true } : {}, ...picker.kind === "sessions" && picker.searchPlaceholder ? { searchPlaceholder: picker.searchPlaceholder } : {}, onSelect: (id) => onPickerSelect(picker, id), onCancel: onPickerCancel });
|
|
75478
75601
|
}
|
|
75479
|
-
return (0,
|
|
75602
|
+
return (0, import_jsx_runtime40.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [(0, import_jsx_runtime40.jsx)(QueueView, { messages: queueMessages, priority: priorityMessage }), (0, import_jsx_runtime40.jsx)(InputBox, { onSubmit, disabled: false, yolo, voicePhase, slashCommands, placeholder: buildPromptPlaceholder(busy2, voiceReady), onPasteText, commandHotkeys, onShiftTab: onCycleMode, externalInsert })] });
|
|
75480
75603
|
};
|
|
75481
75604
|
}
|
|
75482
75605
|
});
|
|
75483
|
-
var
|
|
75606
|
+
var import_jsx_runtime41, import_react70, SessionView;
|
|
75484
75607
|
var init_SessionView = __esm({
|
|
75485
75608
|
async "../plugin-cli/dist/session/SessionView.js"() {
|
|
75486
|
-
|
|
75487
|
-
|
|
75609
|
+
import_jsx_runtime41 = __toESM(require_jsx_runtime());
|
|
75610
|
+
import_react70 = __toESM(require_react());
|
|
75488
75611
|
await init_build2();
|
|
75489
75612
|
await init_build2();
|
|
75490
75613
|
init_dist2();
|
|
@@ -75507,18 +75630,18 @@ var init_SessionView = __esm({
|
|
|
75507
75630
|
SessionView = ({ session, registerInteractiveResolver, getVault, getChannels, model, version, updateAvailable, initialPrompt, initialNotice, canSwitchSession, onSwitchSession }) => {
|
|
75508
75631
|
const { exit } = use_app_default();
|
|
75509
75632
|
const stream = useEventStream(session);
|
|
75510
|
-
const [systemNotice, setSystemNotice] = (0,
|
|
75511
|
-
const [overlay, setOverlay] = (0,
|
|
75512
|
-
const [expandToolOutputs, setExpandToolOutputs] = (0,
|
|
75513
|
-
const [yolo, setYolo] = (0,
|
|
75633
|
+
const [systemNotice, setSystemNotice] = (0, import_react70.useState)(initialNotice ?? null);
|
|
75634
|
+
const [overlay, setOverlay] = (0, import_react70.useState)(null);
|
|
75635
|
+
const [expandToolOutputs, setExpandToolOutputs] = (0, import_react70.useState)(false);
|
|
75636
|
+
const [yolo, setYolo] = (0, import_react70.useState)(false);
|
|
75514
75637
|
const { mcpStatus, refreshMcpStatus } = useMcpStatus(session);
|
|
75515
|
-
const [activeModelOverride, setActiveModelOverride] = (0,
|
|
75516
|
-
const [picker, setPicker] = (0,
|
|
75638
|
+
const [activeModelOverride, setActiveModelOverride] = (0, import_react70.useState)(null);
|
|
75639
|
+
const [picker, setPicker] = (0, import_react70.useState)(null);
|
|
75517
75640
|
const permissions = usePermissionQueue(session, registerInteractiveResolver);
|
|
75518
75641
|
const images = useImageAttachments((msg) => setSystemNotice(msg));
|
|
75519
75642
|
const voice = useVoiceInput({ session, setSystemNotice });
|
|
75520
75643
|
const readAloud = useReadAloud({ session, setSystemNotice });
|
|
75521
|
-
(0,
|
|
75644
|
+
(0, import_react70.useEffect)(() => {
|
|
75522
75645
|
permissions.yoloRef.current = yolo;
|
|
75523
75646
|
}, [yolo, permissions.yoloRef]);
|
|
75524
75647
|
const turn = useTurnRunner({
|
|
@@ -75557,7 +75680,7 @@ var init_SessionView = __esm({
|
|
|
75557
75680
|
},
|
|
75558
75681
|
r: voice.toggleVoiceInput
|
|
75559
75682
|
};
|
|
75560
|
-
const compactTools = (0,
|
|
75683
|
+
const compactTools = (0, import_react70.useMemo)(() => {
|
|
75561
75684
|
const m3 = /* @__PURE__ */ new Map();
|
|
75562
75685
|
for (const tool of session.tools.list()) {
|
|
75563
75686
|
if (tool.compact)
|
|
@@ -75571,7 +75694,7 @@ var init_SessionView = __esm({
|
|
|
75571
75694
|
const contextUsed = estimateContextTokens(session.log);
|
|
75572
75695
|
const modeName = getModeName(session);
|
|
75573
75696
|
const modeBadge = getModeBadge(session);
|
|
75574
|
-
const cycleMode =
|
|
75697
|
+
const cycleMode = import_react70.default.useCallback(() => {
|
|
75575
75698
|
const modes = session.modes.list().filter(isSelectableMode);
|
|
75576
75699
|
if (modes.length === 0)
|
|
75577
75700
|
return;
|
|
@@ -75590,12 +75713,12 @@ var init_SessionView = __esm({
|
|
|
75590
75713
|
} catch {
|
|
75591
75714
|
}
|
|
75592
75715
|
}, [session]);
|
|
75593
|
-
const slashSuggestions =
|
|
75594
|
-
const installInFlightRef =
|
|
75595
|
-
const [providerConnect, setProviderConnect] =
|
|
75596
|
-
const [pluginSetup, setPluginSetup] =
|
|
75597
|
-
const rerunSlashRef =
|
|
75598
|
-
const handlePickerSelect =
|
|
75716
|
+
const slashSuggestions = import_react70.default.useMemo(() => buildSlashSuggestions(session), [session]);
|
|
75717
|
+
const installInFlightRef = import_react70.default.useRef(false);
|
|
75718
|
+
const [providerConnect, setProviderConnect] = import_react70.default.useState(null);
|
|
75719
|
+
const [pluginSetup, setPluginSetup] = import_react70.default.useState(null);
|
|
75720
|
+
const rerunSlashRef = import_react70.default.useRef(() => void 0);
|
|
75721
|
+
const handlePickerSelect = import_react70.default.useMemo(() => makePickerHandler({
|
|
75599
75722
|
session,
|
|
75600
75723
|
providerName: providerName2,
|
|
75601
75724
|
setPicker,
|
|
@@ -75713,8 +75836,8 @@ var init_SessionView = __esm({
|
|
|
75713
75836
|
rerunSlashRef.current = (line) => {
|
|
75714
75837
|
void handleSubmit(line);
|
|
75715
75838
|
};
|
|
75716
|
-
const firedInitial = (0,
|
|
75717
|
-
(0,
|
|
75839
|
+
const firedInitial = (0, import_react70.useRef)(false);
|
|
75840
|
+
(0, import_react70.useEffect)(() => {
|
|
75718
75841
|
if (firedInitial.current)
|
|
75719
75842
|
return;
|
|
75720
75843
|
if (!initialPrompt)
|
|
@@ -75722,14 +75845,14 @@ var init_SessionView = __esm({
|
|
|
75722
75845
|
firedInitial.current = true;
|
|
75723
75846
|
void handleSubmit(initialPrompt);
|
|
75724
75847
|
}, [initialPrompt]);
|
|
75725
|
-
const firedUpdateNotice = (0,
|
|
75726
|
-
(0,
|
|
75848
|
+
const firedUpdateNotice = (0, import_react70.useRef)(false);
|
|
75849
|
+
(0, import_react70.useEffect)(() => {
|
|
75727
75850
|
if (firedUpdateNotice.current || !updateAvailable || initialPrompt)
|
|
75728
75851
|
return;
|
|
75729
75852
|
firedUpdateNotice.current = true;
|
|
75730
75853
|
setSystemNotice(`\u2728 moxxy ${updateAvailable.latest} available \u2014 run \`moxxy update\``);
|
|
75731
75854
|
}, [updateAvailable, initialPrompt]);
|
|
75732
|
-
return (0,
|
|
75855
|
+
return (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [(0, import_jsx_runtime41.jsx)(ChatView, { events: stream.events, streamingDelta: stream.streamingDelta, reasoningDelta: stream.reasoningDelta, expandToolOutputs, compactTools, hideLive: overlay != null || picker != null || pendingPermission != null || pendingApproval != null }), (0, import_jsx_runtime41.jsx)(OverlayOrNotice, { overlay, systemNotice, session, events: stream.events, contextWindow, contextTokens: contextUsed, ...getVault ? { getVault } : {}, ...getChannels ? { getChannels } : {}, onClose: () => setOverlay(null) }), (0, import_jsx_runtime41.jsx)(InteractiveZone, { session, pendingPermission, pendingPermissionDepth: Math.max(0, permissions.pendingPermissions.length - 1), pendingApproval, picker, pluginSetup, onPluginSetupFinish: (values) => {
|
|
75733
75856
|
const target = pluginSetup;
|
|
75734
75857
|
setPluginSetup(null);
|
|
75735
75858
|
if (!target)
|
|
@@ -75785,7 +75908,7 @@ var init_SessionView = __esm({
|
|
|
75785
75908
|
return;
|
|
75786
75909
|
}
|
|
75787
75910
|
setPicker(null);
|
|
75788
|
-
}, onSubmit: handleSubmit, onPasteText: images.handlePasteText }), (0,
|
|
75911
|
+
}, onSubmit: handleSubmit, onPasteText: images.handlePasteText }), (0, import_jsx_runtime41.jsx)(StatusLine, { busyStartedAt: turn.busy && !pendingPermission && !pendingApproval ? turn.busyStartedAt : null, queueCount: turn.queueCount, modeName, modeBadge, provider: providerName2, model: activeModel2, mcp: mcpStatus, contextUsed, ...contextWindow ? { contextWindow } : {}, ...version ? { version } : {}, ...updateAvailable ? { updateLatest: updateAvailable.latest } : {} })] });
|
|
75789
75912
|
};
|
|
75790
75913
|
}
|
|
75791
75914
|
});
|
|
@@ -75794,11 +75917,11 @@ var init_SessionView = __esm({
|
|
|
75794
75917
|
function buildBootPlaceholder(voiceReady) {
|
|
75795
75918
|
return voiceReady ? "type a prompt to begin \xB7 / for commands \xB7 Ctrl+R voice" : "type a prompt to begin \xB7 / for commands";
|
|
75796
75919
|
}
|
|
75797
|
-
var
|
|
75920
|
+
var import_jsx_runtime42, import_react71, InteractiveSession, BootInputArea, DisabledBootInput;
|
|
75798
75921
|
var init_BootShell = __esm({
|
|
75799
75922
|
async "../plugin-cli/dist/session/BootShell.js"() {
|
|
75800
|
-
|
|
75801
|
-
|
|
75923
|
+
import_jsx_runtime42 = __toESM(require_jsx_runtime());
|
|
75924
|
+
import_react71 = __toESM(require_react());
|
|
75802
75925
|
await init_build2();
|
|
75803
75926
|
await init_BootScreen();
|
|
75804
75927
|
await init_InputBox();
|
|
@@ -75808,15 +75931,15 @@ var init_BootShell = __esm({
|
|
|
75808
75931
|
init_use_voice_input();
|
|
75809
75932
|
await init_helpers();
|
|
75810
75933
|
InteractiveSession = ({ session: eagerSession, bootstrap, registerInteractiveResolver, getVault, getChannels, model, version, updateAvailable, resumed, switchSession }) => {
|
|
75811
|
-
const [session, setSession] = (0,
|
|
75812
|
-
const [bootEvents, setBootEvents] = (0,
|
|
75813
|
-
const [bootError, setBootError] = (0,
|
|
75814
|
-
const [initialPrompt, setInitialPrompt] = (0,
|
|
75815
|
-
const [landedViaSwitch, setLandedViaSwitch] = (0,
|
|
75816
|
-
const switchingRef = (0,
|
|
75817
|
-
const [switchNotice, setSwitchNotice] = (0,
|
|
75818
|
-
const startedAt =
|
|
75819
|
-
const handleSwitchSession = (0,
|
|
75934
|
+
const [session, setSession] = (0, import_react71.useState)(eagerSession ?? null);
|
|
75935
|
+
const [bootEvents, setBootEvents] = (0, import_react71.useState)([]);
|
|
75936
|
+
const [bootError, setBootError] = (0, import_react71.useState)(null);
|
|
75937
|
+
const [initialPrompt, setInitialPrompt] = (0, import_react71.useState)(null);
|
|
75938
|
+
const [landedViaSwitch, setLandedViaSwitch] = (0, import_react71.useState)(false);
|
|
75939
|
+
const switchingRef = (0, import_react71.useRef)(false);
|
|
75940
|
+
const [switchNotice, setSwitchNotice] = (0, import_react71.useState)(null);
|
|
75941
|
+
const startedAt = import_react71.default.useMemo(() => Date.now(), []);
|
|
75942
|
+
const handleSwitchSession = (0, import_react71.useCallback)(async (target) => {
|
|
75820
75943
|
if (!switchSession)
|
|
75821
75944
|
throw new Error("switching sessions is not available");
|
|
75822
75945
|
if (switchingRef.current)
|
|
@@ -75833,7 +75956,7 @@ var init_BootShell = __esm({
|
|
|
75833
75956
|
switchingRef.current = false;
|
|
75834
75957
|
}
|
|
75835
75958
|
}, [switchSession]);
|
|
75836
|
-
(0,
|
|
75959
|
+
(0, import_react71.useEffect)(() => {
|
|
75837
75960
|
if (eagerSession || !bootstrap)
|
|
75838
75961
|
return;
|
|
75839
75962
|
let cancelled = false;
|
|
@@ -75877,28 +76000,28 @@ var init_BootShell = __esm({
|
|
|
75877
76000
|
};
|
|
75878
76001
|
}, [eagerSession, bootstrap]);
|
|
75879
76002
|
if (!session || initialPrompt == null && !resumed && !landedViaSwitch) {
|
|
75880
|
-
return (0,
|
|
76003
|
+
return (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", children: [(0, import_jsx_runtime42.jsx)(BootScreen, { events: bootEvents, startedAt, ...bootError ? { error: bootError } : {} }), session ? (0, import_jsx_runtime42.jsx)(BootInputArea, { session, ready: bootError == null, bootError, onSubmit: (text) => setInitialPrompt(text) }) : (0, import_jsx_runtime42.jsx)(DisabledBootInput, { placeholder: bootError ? "Bootstrap failed \u2014 quit and run `moxxy init`" : "Initializing\u2026" })] });
|
|
75881
76004
|
}
|
|
75882
76005
|
return (
|
|
75883
76006
|
// Key by session id so switching fully re-mounts the view — every
|
|
75884
76007
|
// session-keyed hook (event stream, turn runner, permission queue) resets to
|
|
75885
76008
|
// the new session instead of carrying the prior one's state across.
|
|
75886
|
-
(0,
|
|
76009
|
+
(0, import_jsx_runtime42.jsx)(SessionView, { session, registerInteractiveResolver, ...getVault ? { getVault } : {}, ...getChannels ? { getChannels } : {}, ...initialPrompt ? { initialPrompt } : {}, ...switchNotice ? { initialNotice: switchNotice } : {}, ...model ? { model } : {}, ...version ? { version } : {}, ...updateAvailable ? { updateAvailable } : {}, canSwitchSession: Boolean(switchSession), onSwitchSession: handleSwitchSession }, session.id)
|
|
75887
76010
|
);
|
|
75888
76011
|
};
|
|
75889
76012
|
BootInputArea = ({ session, ready, bootError, onSubmit }) => {
|
|
75890
|
-
const [systemNotice, setSystemNotice] = (0,
|
|
76013
|
+
const [systemNotice, setSystemNotice] = (0, import_react71.useState)(null);
|
|
75891
76014
|
const voice = useVoiceInput({ session, setSystemNotice });
|
|
75892
76015
|
const commandHotkeys = ready ? { r: voice.toggleVoiceInput } : {};
|
|
75893
|
-
return (0,
|
|
76016
|
+
return (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", children: [(0, import_jsx_runtime42.jsx)(Box_default, { marginTop: 2, children: (0, import_jsx_runtime42.jsx)(InputBox, { disabled: !ready, voicePhase: voice.phase, externalInsert: voice.externalInsert, commandHotkeys, placeholder: ready ? buildBootPlaceholder(voice.ready) : bootError ? "Bootstrap failed \u2014 quit and run `moxxy init`" : "Initializing\u2026", onSubmit: (text) => {
|
|
75894
76017
|
if (!ready)
|
|
75895
76018
|
return;
|
|
75896
76019
|
const trimmed = text.trim();
|
|
75897
76020
|
if (trimmed)
|
|
75898
76021
|
onSubmit(trimmed);
|
|
75899
|
-
} }) }), systemNotice ? (0,
|
|
76022
|
+
} }) }), systemNotice ? (0, import_jsx_runtime42.jsx)(SystemNotice, { notice: systemNotice }) : null, (0, import_jsx_runtime42.jsx)(Box_default, { children: (0, import_jsx_runtime42.jsx)(FooterHints, { mode: "boot", voiceReady: voice.ready }) })] });
|
|
75900
76023
|
};
|
|
75901
|
-
DisabledBootInput = ({ placeholder }) => (0,
|
|
76024
|
+
DisabledBootInput = ({ placeholder }) => (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [(0, import_jsx_runtime42.jsx)(Box_default, { marginTop: 2, children: (0, import_jsx_runtime42.jsx)(InputBox, { disabled: true, placeholder, onSubmit: () => void 0 }) }), (0, import_jsx_runtime42.jsx)(Box_default, { children: (0, import_jsx_runtime42.jsx)(FooterHints, { mode: "boot" }) })] });
|
|
75902
76025
|
}
|
|
75903
76026
|
});
|
|
75904
76027
|
|
|
@@ -75910,10 +76033,10 @@ var init_InteractiveSession = __esm({
|
|
|
75910
76033
|
});
|
|
75911
76034
|
|
|
75912
76035
|
// ../plugin-cli/dist/TuiChannel.js
|
|
75913
|
-
var
|
|
76036
|
+
var import_react72, TuiChannel;
|
|
75914
76037
|
var init_TuiChannel = __esm({
|
|
75915
76038
|
async "../plugin-cli/dist/TuiChannel.js"() {
|
|
75916
|
-
|
|
76039
|
+
import_react72 = __toESM(require_react());
|
|
75917
76040
|
await init_build2();
|
|
75918
76041
|
init_resolver();
|
|
75919
76042
|
await init_InteractiveSession();
|
|
@@ -75940,7 +76063,7 @@ var init_TuiChannel = __esm({
|
|
|
75940
76063
|
const registerInteractiveResolver = (handler) => {
|
|
75941
76064
|
this.promptHandler = handler;
|
|
75942
76065
|
};
|
|
75943
|
-
this.inkInstance = render_default(
|
|
76066
|
+
this.inkInstance = render_default(import_react72.default.createElement(InteractiveSession, {
|
|
75944
76067
|
...opts.session ? { session: opts.session } : {},
|
|
75945
76068
|
...opts.bootstrap ? { bootstrap: opts.bootstrap } : {},
|
|
75946
76069
|
registerInteractiveResolver,
|
|
@@ -75989,22 +76112,22 @@ function toRows(engine) {
|
|
|
75989
76112
|
out.push({ kind: "allow", name: r2.name, reason: r2.reason });
|
|
75990
76113
|
return out;
|
|
75991
76114
|
}
|
|
75992
|
-
var
|
|
76115
|
+
var import_jsx_runtime43, import_react73, PermissionEditor;
|
|
75993
76116
|
var init_PermissionEditor = __esm({
|
|
75994
76117
|
async "../plugin-cli/dist/components/PermissionEditor.js"() {
|
|
75995
|
-
|
|
75996
|
-
|
|
76118
|
+
import_jsx_runtime43 = __toESM(require_jsx_runtime());
|
|
76119
|
+
import_react73 = __toESM(require_react());
|
|
75997
76120
|
await init_build2();
|
|
75998
76121
|
init_dist();
|
|
75999
76122
|
PermissionEditor = ({ policyPath: policyPath2 }) => {
|
|
76000
76123
|
const { exit } = use_app_default();
|
|
76001
|
-
const [engine, setEngine] = (0,
|
|
76002
|
-
const [rows, setRows] = (0,
|
|
76003
|
-
const [cursor, setCursor] = (0,
|
|
76004
|
-
const [dirty, setDirty] = (0,
|
|
76005
|
-
const [mode, setMode] = (0,
|
|
76006
|
-
const [status, setStatus] = (0,
|
|
76007
|
-
(0,
|
|
76124
|
+
const [engine, setEngine] = (0, import_react73.useState)(null);
|
|
76125
|
+
const [rows, setRows] = (0, import_react73.useState)([]);
|
|
76126
|
+
const [cursor, setCursor] = (0, import_react73.useState)(0);
|
|
76127
|
+
const [dirty, setDirty] = (0, import_react73.useState)(false);
|
|
76128
|
+
const [mode, setMode] = (0, import_react73.useState)({ kind: "list" });
|
|
76129
|
+
const [status, setStatus] = (0, import_react73.useState)("");
|
|
76130
|
+
(0, import_react73.useEffect)(() => {
|
|
76008
76131
|
let cancelled = false;
|
|
76009
76132
|
(async () => {
|
|
76010
76133
|
const e3 = await PermissionEngine.load(policyPath2);
|
|
@@ -76131,28 +76254,28 @@ var init_PermissionEditor = __esm({
|
|
|
76131
76254
|
exit();
|
|
76132
76255
|
}
|
|
76133
76256
|
});
|
|
76134
|
-
return (0,
|
|
76257
|
+
return (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "column", padding: 1, children: [(0, import_jsx_runtime43.jsxs)(Box_default, { marginBottom: 1, children: [(0, import_jsx_runtime43.jsx)(Text, { bold: true, color: "magenta", children: "moxxy perms editor" }), (0, import_jsx_runtime43.jsxs)(Text, { dimColor: true, children: [" (", policyPath2, ")"] })] }), rows.length === 0 ? (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: "(no rules \u2014 press `a` to add an allow rule, `D` for deny)" }) : rows.map((row, i2) => {
|
|
76135
76258
|
const focused = i2 === cursor;
|
|
76136
|
-
return (0,
|
|
76137
|
-
}), (0,
|
|
76259
|
+
return (0, import_jsx_runtime43.jsxs)(Box_default, { children: [(0, import_jsx_runtime43.jsx)(Text, { color: focused ? "cyan" : void 0, children: focused ? "\u203A " : " " }), (0, import_jsx_runtime43.jsx)(Text, { color: row.kind === "allow" ? "green" : "red", children: row.kind.padEnd(5) }), (0, import_jsx_runtime43.jsxs)(Text, { children: [" ", row.name] }), row.reason ? (0, import_jsx_runtime43.jsxs)(Text, { dimColor: true, children: [" \u2014 ", row.reason] }) : null] }, `${row.kind}:${row.name}:${i2}`);
|
|
76260
|
+
}), (0, import_jsx_runtime43.jsx)(Box_default, { marginTop: 1, children: mode.kind === "add" ? (0, import_jsx_runtime43.jsxs)(Text, { children: ["new ", mode.bucket, " rule: ", (0, import_jsx_runtime43.jsx)(Text, { color: "cyan", children: mode.buffer }), (0, import_jsx_runtime43.jsx)(Text, { dimColor: true, children: " (enter to confirm, esc to cancel)" })] }) : mode.kind === "confirm-delete" ? (0, import_jsx_runtime43.jsxs)(Text, { color: "yellow", children: ["delete `", mode.row.name, "` (", mode.row.kind, ")? [y/N]"] }) : mode.kind === "message" ? (0, import_jsx_runtime43.jsxs)(Text, { color: /FAILED/i.test(mode.text) ? "red" : "green", children: [mode.text, " (press any key)"] }) : (0, import_jsx_runtime43.jsxs)(Text, { dimColor: true, children: ["\u2191/\u2193 move \xB7 space/enter flip \xB7 a add allow \xB7 D add deny \xB7 d delete \xB7 q quit", dirty || /FAILED/i.test(status) ? (0, import_jsx_runtime43.jsx)(Text, { color: /FAILED/i.test(status) ? "red" : "green", children: ` \xB7 ${status}` }) : null] }) })] });
|
|
76138
76261
|
};
|
|
76139
76262
|
}
|
|
76140
76263
|
});
|
|
76141
76264
|
|
|
76142
76265
|
// ../plugin-cli/dist/components/Logo.js
|
|
76143
|
-
var
|
|
76266
|
+
var import_jsx_runtime44, import_react74, Logo;
|
|
76144
76267
|
var init_Logo = __esm({
|
|
76145
76268
|
async "../plugin-cli/dist/components/Logo.js"() {
|
|
76146
|
-
|
|
76147
|
-
|
|
76269
|
+
import_jsx_runtime44 = __toESM(require_jsx_runtime());
|
|
76270
|
+
import_react74 = __toESM(require_react());
|
|
76148
76271
|
await init_build2();
|
|
76149
76272
|
init_logo_data();
|
|
76150
76273
|
await init_LogoLine();
|
|
76151
76274
|
Logo = ({ subtitle }) => {
|
|
76152
76275
|
const width = process.stdout.columns ?? 80;
|
|
76153
|
-
const slogan = (0,
|
|
76276
|
+
const slogan = (0, import_react74.useMemo)(() => pickSlogan(), []);
|
|
76154
76277
|
const { lines } = selectLogo(width);
|
|
76155
|
-
return (0,
|
|
76278
|
+
return (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [lines.map((line, i2) => (0, import_jsx_runtime44.jsx)(LogoLine, { text: line }, i2)), (0, import_jsx_runtime44.jsx)(Box_default, { marginTop: 1, children: (0, import_jsx_runtime44.jsx)(Text, { dimColor: true, italic: true, children: slogan }) }), subtitle ? (0, import_jsx_runtime44.jsx)(Box_default, { children: (0, import_jsx_runtime44.jsxs)(Text, { dimColor: true, children: [" ", subtitle] }) }) : null] });
|
|
76156
76279
|
};
|
|
76157
76280
|
}
|
|
76158
76281
|
});
|
|
@@ -95570,18 +95693,26 @@ function isVisibleSchedule(entry) {
|
|
|
95570
95693
|
return entry.deletedAt === void 0;
|
|
95571
95694
|
}
|
|
95572
95695
|
var SCHEDULES_STORE_GLOB = "~/.moxxy/schedules.json*";
|
|
95573
|
-
var
|
|
95574
|
-
|
|
95575
|
-
|
|
95576
|
-
|
|
95577
|
-
|
|
95578
|
-
|
|
95579
|
-
|
|
95580
|
-
|
|
95581
|
-
|
|
95582
|
-
|
|
95696
|
+
var blankStringToUndefined = (value) => typeof value === "string" && value.trim() === "" ? void 0 : value;
|
|
95697
|
+
var optionalText = z$1.preprocess(blankStringToUndefined, z$1.string().min(1).optional());
|
|
95698
|
+
var optionalRunAt = z$1.preprocess(blankStringToUndefined, z$1.union([
|
|
95699
|
+
z$1.number().int(),
|
|
95700
|
+
z$1.string().refine((value) => !Number.isNaN(Date.parse(value)), {
|
|
95701
|
+
message: "runAt must be an ISO timestamp or epoch-ms"
|
|
95702
|
+
})
|
|
95703
|
+
]).optional());
|
|
95704
|
+
var scheduleCreateInputSchema = z$1.object({
|
|
95705
|
+
name: z$1.string().min(1).max(120).regex(/^[a-z0-9][a-z0-9-]*$/i, "name must be slug-like (letters, digits, hyphens)"),
|
|
95706
|
+
prompt: z$1.string().min(1),
|
|
95707
|
+
channel: optionalText,
|
|
95708
|
+
model: optionalText,
|
|
95709
|
+
targetSessionId: optionalText.describe("Session id to fire this schedule in (where its run executes + displays). Defaults to the session that created the schedule."),
|
|
95710
|
+
cron: optionalText,
|
|
95711
|
+
runAt: optionalRunAt,
|
|
95712
|
+
timeZone: optionalText
|
|
95713
|
+
}).refine((value) => value.cron !== void 0 || value.runAt !== void 0, {
|
|
95583
95714
|
message: "provide either `cron` or `runAt`"
|
|
95584
|
-
}).refine((
|
|
95715
|
+
}).refine((value) => !(value.cron !== void 0 && value.runAt !== void 0), {
|
|
95585
95716
|
message: "provide either `cron` or `runAt`, not both"
|
|
95586
95717
|
});
|
|
95587
95718
|
function describeScheduleEntry(entry) {
|
|
@@ -95620,14 +95751,8 @@ function buildSchedulerTools(deps) {
|
|
|
95620
95751
|
return [
|
|
95621
95752
|
defineTool({
|
|
95622
95753
|
name: "schedule_create",
|
|
95623
|
-
description: "Create a scheduled prompt
|
|
95624
|
-
inputSchema:
|
|
95625
|
-
name: z$1.string().min(1).max(120).regex(/^[a-z0-9][a-z0-9-]*$/i, "name must be slug-like (letters, digits, hyphens)"),
|
|
95626
|
-
prompt: z$1.string().min(1),
|
|
95627
|
-
channel: z$1.string().optional(),
|
|
95628
|
-
model: z$1.string().optional(),
|
|
95629
|
-
targetSessionId: z$1.string().min(1).optional().describe("Session id to fire this schedule in (where its run executes + displays). Defaults to the session that created the schedule.")
|
|
95630
|
-
}).and(cronOrTimestamp),
|
|
95754
|
+
description: "Create a scheduled prompt with exactly one trigger. For a recurring schedule, set `cron` and omit `runAt` entirely. For a one-shot schedule, set `runAt` and omit `cron` entirely. Never send an empty placeholder for the unused trigger. The prompt runs in an isolated session at fire time; the final assistant message is appended to the user's inbox. Cron uses 5-field POSIX syntax in the user's local timezone (override via `timeZone`). For Telegram or other delivery, write the prompt to call the right send tool itself (e.g. \"...then call telegram_send_message with the summary\").",
|
|
95755
|
+
inputSchema: scheduleCreateInputSchema,
|
|
95631
95756
|
permission: { action: "prompt" },
|
|
95632
95757
|
isolation: {
|
|
95633
95758
|
capabilities: {
|
|
@@ -110059,6 +110184,23 @@ async function createWebSocketTransportServer(opts) {
|
|
|
110059
110184
|
};
|
|
110060
110185
|
}
|
|
110061
110186
|
|
|
110187
|
+
// ../desktop-ipc-contract/dist/focus-layout.js
|
|
110188
|
+
var FOCUS_PET_LAYOUT = Object.freeze({
|
|
110189
|
+
collapsedWidth: 84,
|
|
110190
|
+
collapsedHeight: 104,
|
|
110191
|
+
activeAvatarWidth: 72,
|
|
110192
|
+
activeHeight: 90,
|
|
110193
|
+
activeOverlap: 18
|
|
110194
|
+
});
|
|
110195
|
+
FOCUS_PET_LAYOUT.activeAvatarWidth - FOCUS_PET_LAYOUT.activeOverlap;
|
|
110196
|
+
Object.freeze({
|
|
110197
|
+
width: FOCUS_PET_LAYOUT.collapsedWidth + 36,
|
|
110198
|
+
height: FOCUS_PET_LAYOUT.collapsedHeight
|
|
110199
|
+
});
|
|
110200
|
+
Object.freeze({
|
|
110201
|
+
height: FOCUS_PET_LAYOUT.activeHeight + 36
|
|
110202
|
+
});
|
|
110203
|
+
|
|
110062
110204
|
// ../desktop-ipc-contract/dist/remote.js
|
|
110063
110205
|
var REMOTE_ALLOWED_COMMANDS = /* @__PURE__ */ new Set([
|
|
110064
110206
|
// Answer a permission/approval prompt.
|
|
@@ -110143,6 +110285,9 @@ var skillName = z.string().min(1).max(200).regex(/^[A-Za-z0-9][A-Za-z0-9 ._/-]*$
|
|
|
110143
110285
|
var vaultKeyName = z.string().min(1).max(200).regex(/^[A-Za-z0-9][A-Za-z0-9._/-]*$/, "invalid vault key name").refine((s2) => !s2.includes(".."), 'vault key name may not contain ".."');
|
|
110144
110286
|
var optionalWorkspace = z.string().min(1).max(256).optional();
|
|
110145
110287
|
var MAX_AUDIO_BASE64 = 4e7;
|
|
110288
|
+
var MAX_SYNTHESIZE_TEXT = 1e5;
|
|
110289
|
+
var speechLanguage = z.string().max(35).regex(/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/, "must be a BCP-47 language tag");
|
|
110290
|
+
var speechRate = z.number().finite().min(0.5).max(2);
|
|
110146
110291
|
var MAX_INLINE_ATTACHMENT_CONTENT = 12e6;
|
|
110147
110292
|
var MAX_INLINE_ATTACHMENTS_TOTAL = 24e6;
|
|
110148
110293
|
var BASE64_RE = /^[A-Za-z0-9+/]*={0,2}$/;
|
|
@@ -110184,6 +110329,12 @@ var ipcInputSchemas = {
|
|
|
110184
110329
|
"app.relaunch": z.undefined(),
|
|
110185
110330
|
"app.appBooted": z.undefined(),
|
|
110186
110331
|
"app.updateDiagnostics": z.undefined(),
|
|
110332
|
+
// Optional offline voice installation spawns the CLI and changes the active
|
|
110333
|
+
// synthesizer. The host owns the exact package/name; renderer input is never
|
|
110334
|
+
// accepted, preventing package-spec / CLI-argument injection.
|
|
110335
|
+
"voice.isLocalPiperInstalled": z.undefined(),
|
|
110336
|
+
"voice.installLocalPiper": z.undefined(),
|
|
110337
|
+
"voice.setRealtimeCaptureActive": z.object({ active: z.boolean() }).strict(),
|
|
110187
110338
|
// Renderer-reported confirm failure — bound the message so a hostile renderer
|
|
110188
110339
|
// can't bloat the on-disk boot-log.
|
|
110189
110340
|
"app.bootHeartbeatFailed": z.object({ error: z.string().max(2048) }),
|
|
@@ -110195,7 +110346,8 @@ var ipcInputSchemas = {
|
|
|
110195
110346
|
"focus.resize": z.object({
|
|
110196
110347
|
width: focusSize,
|
|
110197
110348
|
height: focusSize,
|
|
110198
|
-
resizable: z.boolean().optional()
|
|
110349
|
+
resizable: z.boolean().optional(),
|
|
110350
|
+
verticalAnchor: z.enum(["center", "bottom"]).optional()
|
|
110199
110351
|
}).strict(),
|
|
110200
110352
|
"onboarding.openExternal": z.object({ url: httpUrl }),
|
|
110201
110353
|
"onboarding.saveProviderKey": z.object({
|
|
@@ -110219,6 +110371,12 @@ var ipcInputSchemas = {
|
|
|
110219
110371
|
audioBase64: base64,
|
|
110220
110372
|
mimeType: z.string().max(128).optional()
|
|
110221
110373
|
}),
|
|
110374
|
+
"session.synthesize": z.object({
|
|
110375
|
+
workspaceId: optionalWorkspace,
|
|
110376
|
+
text: z.string().max(MAX_SYNTHESIZE_TEXT),
|
|
110377
|
+
language: speechLanguage.optional(),
|
|
110378
|
+
rate: speechRate.optional()
|
|
110379
|
+
}).strict(),
|
|
110222
110380
|
// Read-only snapshots and the abort RPC are reachable over the remote (WS)
|
|
110223
110381
|
// bridge — they carry free-form ids/workspaceId, so bound them like the
|
|
110224
110382
|
// sibling validated commands so a hostile remote can't OOM/log-bloat the host
|
|
@@ -125253,6 +125411,7 @@ var ACTIVE_DEF_KINDS = [
|
|
|
125253
125411
|
{ key: "compactor", registry: (s2) => s2.compactors },
|
|
125254
125412
|
{ key: "cacheStrategy", registry: (s2) => s2.cacheStrategies },
|
|
125255
125413
|
{ key: "workflowExecutor", registry: (s2) => s2.workflowExecutors },
|
|
125414
|
+
{ key: "synthesizer", registry: (s2) => s2.synthesizers },
|
|
125256
125415
|
{ key: "viewRenderer", registry: (s2) => s2.viewRenderers },
|
|
125257
125416
|
{ key: "tunnelProvider", registry: (s2) => s2.tunnelProviders },
|
|
125258
125417
|
{ key: "eventStore", registry: (s2) => s2.eventStores },
|
|
@@ -125693,7 +125852,7 @@ async function readStdinIfPiped() {
|
|
|
125693
125852
|
await init_dist12();
|
|
125694
125853
|
init_dist2();
|
|
125695
125854
|
await init_build2();
|
|
125696
|
-
var
|
|
125855
|
+
var import_react75 = __toESM(require_react());
|
|
125697
125856
|
var REMOTE_CHANNELS = /* @__PURE__ */ new Set(["telegram"]);
|
|
125698
125857
|
async function coAttachWebSurface(opts) {
|
|
125699
125858
|
const { primary, session, vault, config } = opts;
|
|
@@ -126561,7 +126720,7 @@ async function runAttachedTui(argv, tuiOpts) {
|
|
|
126561
126720
|
await remote.close().catch(() => void 0);
|
|
126562
126721
|
};
|
|
126563
126722
|
const instance = render_default(
|
|
126564
|
-
|
|
126723
|
+
import_react75.default.createElement(InteractiveSession, {
|
|
126565
126724
|
session: remote,
|
|
126566
126725
|
registerInteractiveResolver: (handler) => {
|
|
126567
126726
|
promptHandler = handler;
|
|
@@ -126763,7 +126922,7 @@ async function runSelfHostedTui(argv, tuiOpts, standalone) {
|
|
|
126763
126922
|
}
|
|
126764
126923
|
};
|
|
126765
126924
|
const { waitUntilExit } = render_default(
|
|
126766
|
-
|
|
126925
|
+
import_react75.default.createElement(InteractiveSession, {
|
|
126767
126926
|
bootstrap: async (progress) => bootSession2(
|
|
126768
126927
|
tuiOpts.resumeSessionId ? { resumeSessionId: tuiOpts.resumeSessionId } : {},
|
|
126769
126928
|
progress
|
|
@@ -129268,13 +129427,13 @@ function policyPath() {
|
|
|
129268
129427
|
async function runPermsCommand(argv) {
|
|
129269
129428
|
const sub = argv.positional[0];
|
|
129270
129429
|
if (!sub && process.stdin.isTTY) {
|
|
129271
|
-
const [{ render: render2 },
|
|
129430
|
+
const [{ render: render2 }, React58, { PermissionEditor: PermissionEditor2 }] = await Promise.all([
|
|
129272
129431
|
init_build2().then(() => build_exports),
|
|
129273
129432
|
Promise.resolve().then(() => __toESM(require_react())),
|
|
129274
129433
|
init_dist12().then(() => dist_exports4)
|
|
129275
129434
|
]);
|
|
129276
129435
|
const { waitUntilExit } = render2(
|
|
129277
|
-
|
|
129436
|
+
React58.createElement(PermissionEditor2, { policyPath: policyPath() })
|
|
129278
129437
|
);
|
|
129279
129438
|
await waitUntilExit();
|
|
129280
129439
|
return 0;
|