@mirrowel/opencode-subagent-explorer 0.2.0-dev.1 → 0.2.0-dev.2
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/sessions.d.ts +18 -5
- package/dist/sessions.js +86 -33
- package/dist/tui.js +249 -143
- package/dist/wizard.js +249 -143
- package/package.json +1 -1
- package/src/sessions.ts +90 -32
- package/src/wizard.tsx +60 -10
package/dist/wizard.js
CHANGED
|
@@ -55,16 +55,17 @@ function normalizeSession(raw) {
|
|
|
55
55
|
updated: toMillis(time.updated ?? record.time_updated)
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
+
var SESSION_LIST_LIMIT = 5000;
|
|
58
59
|
async function fetchSessions(client, directory) {
|
|
59
60
|
const namespace = client?.session;
|
|
60
61
|
if (!namespace?.list)
|
|
61
62
|
return;
|
|
62
63
|
const calls = [
|
|
63
|
-
() => namespace.list({ directory }),
|
|
64
|
-
() => namespace.list({ query: { directory } })
|
|
64
|
+
() => namespace.list({ directory, limit: SESSION_LIST_LIMIT }),
|
|
65
|
+
() => namespace.list({ query: { directory, limit: SESSION_LIST_LIMIT } })
|
|
65
66
|
];
|
|
66
67
|
for (const call of calls) {
|
|
67
|
-
const result = unwrap(await withTimeout(call));
|
|
68
|
+
const result = unwrap(await withTimeout(call, 8000));
|
|
68
69
|
if (Array.isArray(result))
|
|
69
70
|
return result.map(normalizeSession).filter((s) => !!s);
|
|
70
71
|
}
|
|
@@ -117,6 +118,8 @@ function loadAvSidecar(globalConfigDir) {
|
|
|
117
118
|
function stripJsoncComments(text) {
|
|
118
119
|
return text.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^:"'\\])\/\/.*$/gm, "$1").replace(/,(\s*[}\]])/g, "$1");
|
|
119
120
|
}
|
|
121
|
+
var ATTRIBUTION_PAGE_SIZE = 100;
|
|
122
|
+
var ATTRIBUTION_PAGES = 5;
|
|
120
123
|
async function fetchVariantAttribution(client, parentSessionID, directory, avParents) {
|
|
121
124
|
const map = new Map;
|
|
122
125
|
if (avParents.size === 0 || !parentSessionID)
|
|
@@ -124,29 +127,55 @@ async function fetchVariantAttribution(client, parentSessionID, directory, avPar
|
|
|
124
127
|
const namespace = client?.session;
|
|
125
128
|
if (!namespace || typeof namespace.messages !== "function")
|
|
126
129
|
return map;
|
|
127
|
-
const
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
130
|
+
const fetchPage = (before) => {
|
|
131
|
+
const query = { directory, limit: ATTRIBUTION_PAGE_SIZE };
|
|
132
|
+
if (before)
|
|
133
|
+
query.before = before;
|
|
134
|
+
const flat = namespace.messages({ sessionID: parentSessionID, ...query });
|
|
135
|
+
return flat instanceof Promise ? flat : namespace.messages({ path: { id: parentSessionID }, query });
|
|
136
|
+
};
|
|
137
|
+
const asList = (value) => {
|
|
138
|
+
if (Array.isArray(value))
|
|
139
|
+
return value;
|
|
140
|
+
if (value && typeof value === "object") {
|
|
141
|
+
const unwrapped = value.data;
|
|
142
|
+
if (Array.isArray(unwrapped))
|
|
143
|
+
return unwrapped;
|
|
144
|
+
}
|
|
145
|
+
return;
|
|
146
|
+
};
|
|
147
|
+
let before;
|
|
148
|
+
const seenCursors = new Set;
|
|
149
|
+
for (let page = 0;page < ATTRIBUTION_PAGES; page++) {
|
|
150
|
+
const messages = await withTimeout(() => fetchPage(before), 8000);
|
|
151
|
+
const list = asList(messages);
|
|
152
|
+
if (!list || list.length === 0)
|
|
153
|
+
break;
|
|
154
|
+
for (const message of list) {
|
|
155
|
+
for (const part of message.parts ?? []) {
|
|
156
|
+
if (part?.type !== "tool" || part.tool !== "task")
|
|
157
|
+
continue;
|
|
158
|
+
const metadata = part.state?.metadata;
|
|
159
|
+
const child = metadata?.sessionId;
|
|
160
|
+
const variantMeta = metadata?.agentVariants;
|
|
161
|
+
const alias = variantMeta?.alias;
|
|
162
|
+
const routedAgent = variantMeta?.routedAgent;
|
|
163
|
+
if (typeof child === "string" && typeof alias === "string" && !map.has(child)) {
|
|
164
|
+
map.set(child, {
|
|
165
|
+
alias,
|
|
166
|
+
parent: typeof routedAgent === "string" ? routedAgent : alias.replace(/-[a-z0-9-]+$/, "")
|
|
167
|
+
});
|
|
168
|
+
}
|
|
148
169
|
}
|
|
149
170
|
}
|
|
171
|
+
if (list.length < ATTRIBUTION_PAGE_SIZE)
|
|
172
|
+
break;
|
|
173
|
+
const last = list[list.length - 1];
|
|
174
|
+
const next = last?.info?.id ?? last?.id;
|
|
175
|
+
if (!next || seenCursors.has(next))
|
|
176
|
+
break;
|
|
177
|
+
seenCursors.add(next);
|
|
178
|
+
before = next;
|
|
150
179
|
}
|
|
151
180
|
return map;
|
|
152
181
|
}
|
|
@@ -222,10 +251,18 @@ function isHiddenAgent(agent, hidden, configAgents) {
|
|
|
222
251
|
return true;
|
|
223
252
|
return !configAgents.has(agent) && !BUILTIN_AGENTS.has(agent) && !agent.startsWith("av:");
|
|
224
253
|
}
|
|
254
|
+
function rowHidden(variant, agent, avParents, hidden, configAgents) {
|
|
255
|
+
if (variant)
|
|
256
|
+
return false;
|
|
257
|
+
if (agent && avParents.has(agent))
|
|
258
|
+
return false;
|
|
259
|
+
return isHiddenAgent(agent, hidden, configAgents);
|
|
260
|
+
}
|
|
225
261
|
async function deleteSession(client, sessionID) {
|
|
226
262
|
const namespace = client?.session;
|
|
227
263
|
if (!namespace)
|
|
228
264
|
return false;
|
|
265
|
+
const isErrorEnvelope = (value) => !!value && typeof value === "object" && ("error" in value) && !("data" in value);
|
|
229
266
|
const shapes = [];
|
|
230
267
|
if (typeof namespace.delete === "function") {
|
|
231
268
|
shapes.push(() => namespace.delete({ sessionID }), () => namespace.delete({ path: { sessionID } }), () => namespace.delete({ path: { id: sessionID } }), () => namespace.delete({ id: sessionID }));
|
|
@@ -235,8 +272,11 @@ async function deleteSession(client, sessionID) {
|
|
|
235
272
|
}
|
|
236
273
|
for (const call of shapes) {
|
|
237
274
|
const result = await withTimeout(call);
|
|
238
|
-
if (result
|
|
239
|
-
|
|
275
|
+
if (result === undefined)
|
|
276
|
+
continue;
|
|
277
|
+
if (isErrorEnvelope(result))
|
|
278
|
+
continue;
|
|
279
|
+
return true;
|
|
240
280
|
}
|
|
241
281
|
return false;
|
|
242
282
|
}
|
|
@@ -341,11 +381,12 @@ function explorerRows(tree, data) {
|
|
|
341
381
|
const walk = (nodes, depth) => {
|
|
342
382
|
for (const node of nodes) {
|
|
343
383
|
const variant = data.variantOf.get(node.session.id);
|
|
384
|
+
const agent = node.session.agent;
|
|
344
385
|
rows.push({
|
|
345
386
|
session: node.session,
|
|
346
387
|
depth,
|
|
347
388
|
running: data.activeIDs?.has(node.session.id) ?? false,
|
|
348
|
-
hidden: variant
|
|
389
|
+
hidden: rowHidden(variant, agent, data.avParents, data.hidden, data.configAgents),
|
|
349
390
|
variant
|
|
350
391
|
});
|
|
351
392
|
walk(node.children, depth + 1);
|
|
@@ -1078,7 +1119,50 @@ Deleting a session permanently removes it, its messages, and its history. The pa
|
|
|
1078
1119
|
});
|
|
1079
1120
|
return ok;
|
|
1080
1121
|
}
|
|
1081
|
-
|
|
1122
|
+
function CleanupProgressDialog(props) {
|
|
1123
|
+
const theme = () => themeOf(props.api);
|
|
1124
|
+
const popMode = props.api.mode.push("subagent-explorer.cleanup");
|
|
1125
|
+
onCleanup(() => popMode());
|
|
1126
|
+
const done = props.done;
|
|
1127
|
+
const total = props.total;
|
|
1128
|
+
return (() => {
|
|
1129
|
+
var _el$56 = _$createElement("box"), _el$57 = _$createElement("text"), _el$58 = _$createElement("b"), _el$60 = _$createElement("text"), _el$61 = _$createElement("text");
|
|
1130
|
+
_$insertNode(_el$56, _el$57);
|
|
1131
|
+
_$insertNode(_el$56, _el$60);
|
|
1132
|
+
_$insertNode(_el$56, _el$61);
|
|
1133
|
+
_$setProp(_el$56, "flexDirection", "column");
|
|
1134
|
+
_$setProp(_el$56, "width", "100%");
|
|
1135
|
+
_$setProp(_el$56, "paddingLeft", 2);
|
|
1136
|
+
_$setProp(_el$56, "paddingRight", 2);
|
|
1137
|
+
_$setProp(_el$56, "paddingTop", 2);
|
|
1138
|
+
_$setProp(_el$56, "paddingBottom", 2);
|
|
1139
|
+
_$setProp(_el$56, "gap", 1);
|
|
1140
|
+
_$insertNode(_el$57, _el$58);
|
|
1141
|
+
_$insertNode(_el$58, _$createTextNode(`Cleaning up idle subagent sessions\u2026`));
|
|
1142
|
+
_$insert(_el$60, () => `${done()} / ${total} deleted`);
|
|
1143
|
+
_$insertNode(_el$61, _$createTextNode(`This dialog closes when the batch finishes.`));
|
|
1144
|
+
_$effect((_p$) => {
|
|
1145
|
+
var _v$24 = theme().text, _v$25 = theme().textMuted, _v$26 = theme().textMuted;
|
|
1146
|
+
_v$24 !== _p$.e && (_p$.e = _$setProp(_el$57, "fg", _v$24, _p$.e));
|
|
1147
|
+
_v$25 !== _p$.t && (_p$.t = _$setProp(_el$60, "fg", _v$25, _p$.t));
|
|
1148
|
+
_v$26 !== _p$.a && (_p$.a = _$setProp(_el$61, "fg", _v$26, _p$.a));
|
|
1149
|
+
return _p$;
|
|
1150
|
+
}, {
|
|
1151
|
+
e: undefined,
|
|
1152
|
+
t: undefined,
|
|
1153
|
+
a: undefined
|
|
1154
|
+
});
|
|
1155
|
+
return _el$56;
|
|
1156
|
+
})();
|
|
1157
|
+
}
|
|
1158
|
+
function showCleanupProgress(api, done, total) {
|
|
1159
|
+
api.ui.dialog.replace(() => _$createComponent(CleanupProgressDialog, {
|
|
1160
|
+
api,
|
|
1161
|
+
done,
|
|
1162
|
+
total
|
|
1163
|
+
}), () => {});
|
|
1164
|
+
}
|
|
1165
|
+
async function runCleanup(api, plan, rootTitle, directory, rootID) {
|
|
1082
1166
|
if (plan.deletable.length === 0) {
|
|
1083
1167
|
await showInfo(api, {
|
|
1084
1168
|
title: "Nothing to clean up",
|
|
@@ -1097,18 +1181,40 @@ ${plan.sparedActive.length} running session(s) will be spared.` : "";
|
|
|
1097
1181
|
if (!confirmed)
|
|
1098
1182
|
return 0;
|
|
1099
1183
|
let deleted = 0;
|
|
1184
|
+
const [progressDone, setProgressDone] = createSignal(0);
|
|
1185
|
+
showCleanupProgress(api, progressDone, plan.deletable.length);
|
|
1100
1186
|
for (const session of plan.deletable) {
|
|
1101
|
-
if (await deleteSession(api.client, session.id))
|
|
1187
|
+
if (await deleteSession(api.client, session.id)) {
|
|
1102
1188
|
deleted += 1;
|
|
1189
|
+
setProgressDone(deleted);
|
|
1190
|
+
}
|
|
1103
1191
|
}
|
|
1192
|
+
const remainingIdle = await remainingIdleCount(api, directory, rootID);
|
|
1193
|
+
api.ui.dialog.clear();
|
|
1104
1194
|
const failed = plan.deletable.length - deleted;
|
|
1105
1195
|
api.ui.toast({
|
|
1106
|
-
variant: failed > 0 ? "warning" : "default",
|
|
1196
|
+
variant: failed > 0 || remainingIdle > 0 ? "warning" : "default",
|
|
1107
1197
|
title: "Cleanup finished",
|
|
1108
|
-
message: failed > 0 ? `Deleted ${deleted}, failed ${failed}.` : `Deleted ${deleted} session(s).`
|
|
1198
|
+
message: remainingIdle > 0 ? `Deleted ${deleted}. ${remainingIdle} idle session(s) still remain${failed > 0 ? ` (${failed} delete call(s) failed - re-run cleanup or delete rows individually)` : " - re-run cleanup for the newly-idle"}.` : failed > 0 ? `Deleted ${deleted}, failed ${failed}.` : `Deleted ${deleted} session(s).`
|
|
1109
1199
|
});
|
|
1110
1200
|
return deleted;
|
|
1111
1201
|
}
|
|
1202
|
+
async function remainingIdleCount(api, directory, rootID) {
|
|
1203
|
+
const sessions = await fetchSessions(api.client, directory);
|
|
1204
|
+
if (!sessions)
|
|
1205
|
+
return 0;
|
|
1206
|
+
const active = await fetchActiveSessionIDs(api.client);
|
|
1207
|
+
const rows = explorerRows(buildSessionTree(sessions, rootID), {
|
|
1208
|
+
sessions,
|
|
1209
|
+
activeIDs: active,
|
|
1210
|
+
activeKnown: active !== undefined,
|
|
1211
|
+
hidden: new Set,
|
|
1212
|
+
configAgents: new Set,
|
|
1213
|
+
variantOf: new Map,
|
|
1214
|
+
avParents: new Map
|
|
1215
|
+
});
|
|
1216
|
+
return rows.filter((row) => !row.running).length;
|
|
1217
|
+
}
|
|
1112
1218
|
function showRootPicker(api, sessions, currentRoot) {
|
|
1113
1219
|
return new Promise((resolve) => {
|
|
1114
1220
|
let settled = false;
|
|
@@ -1425,140 +1531,140 @@ function SizeSliderDialog(props) {
|
|
|
1425
1531
|
popMode();
|
|
1426
1532
|
});
|
|
1427
1533
|
return (() => {
|
|
1428
|
-
var _el$
|
|
1429
|
-
_$insertNode(_el$56, _el$57);
|
|
1430
|
-
_$insertNode(_el$56, _el$63);
|
|
1431
|
-
_$insertNode(_el$56, _el$74);
|
|
1432
|
-
_$insertNode(_el$56, _el$82);
|
|
1433
|
-
_$insertNode(_el$56, _el$93);
|
|
1434
|
-
_$setProp(_el$56, "flexDirection", "column");
|
|
1435
|
-
_$setProp(_el$56, "width", "100%");
|
|
1436
|
-
_$setProp(_el$56, "paddingLeft", 2);
|
|
1437
|
-
_$setProp(_el$56, "paddingRight", 2);
|
|
1438
|
-
_$setProp(_el$56, "paddingTop", 1);
|
|
1439
|
-
_$setProp(_el$56, "paddingBottom", 1);
|
|
1440
|
-
_$insertNode(_el$57, _el$58);
|
|
1441
|
-
_$insertNode(_el$57, _el$61);
|
|
1442
|
-
_$setProp(_el$57, "flexDirection", "row");
|
|
1443
|
-
_$setProp(_el$57, "justifyContent", "space-between");
|
|
1444
|
-
_$setProp(_el$57, "width", "100%");
|
|
1445
|
-
_$setProp(_el$57, "marginBottom", 1);
|
|
1446
|
-
_$insertNode(_el$58, _el$59);
|
|
1447
|
-
_$insertNode(_el$59, _$createTextNode(`Dialog size`));
|
|
1448
|
-
_$insertNode(_el$61, _$createTextNode(`esc`));
|
|
1449
|
-
_$setProp(_el$61, "onMouseUp", () => props.onDone(undefined));
|
|
1534
|
+
var _el$63 = _$createElement("box"), _el$64 = _$createElement("box"), _el$65 = _$createElement("text"), _el$66 = _$createElement("b"), _el$68 = _$createElement("text"), _el$70 = _$createElement("box"), _el$71 = _$createElement("text"), _el$73 = _$createElement("text"), _el$74 = _$createElement("b"), _el$75 = _$createElement("text"), _el$76 = _$createTextNode(` (`), _el$77 = _$createTextNode(` cols, w to cycle) Height: `), _el$78 = _$createElement("text"), _el$79 = _$createElement("b"), _el$80 = _$createTextNode(`%`), _el$81 = _$createElement("box"), _el$82 = _$createElement("text"), _el$83 = _$createTextNode(`25% `), _el$85 = _$createElement("text"), _el$86 = _$createTextNode(` 100%`), _el$89 = _$createElement("box"), _el$90 = _$createElement("box"), _el$91 = _$createElement("text"), _el$93 = _$createElement("text"), _el$95 = _$createElement("text"), _el$97 = _$createElement("text"), _el$99 = _$createElement("box"), _el$100 = _$createElement("box"), _el$101 = _$createElement("text"), _el$103 = _$createElement("box"), _el$104 = _$createElement("text"), _el$105 = _$createElement("b");
|
|
1450
1535
|
_$insertNode(_el$63, _el$64);
|
|
1451
|
-
_$insertNode(_el$63, _el$
|
|
1452
|
-
_$insertNode(_el$63, _el$
|
|
1453
|
-
_$insertNode(_el$63, _el$
|
|
1454
|
-
_$
|
|
1455
|
-
_$setProp(_el$63, "
|
|
1536
|
+
_$insertNode(_el$63, _el$70);
|
|
1537
|
+
_$insertNode(_el$63, _el$81);
|
|
1538
|
+
_$insertNode(_el$63, _el$89);
|
|
1539
|
+
_$insertNode(_el$63, _el$100);
|
|
1540
|
+
_$setProp(_el$63, "flexDirection", "column");
|
|
1456
1541
|
_$setProp(_el$63, "width", "100%");
|
|
1457
|
-
_$setProp(_el$63, "
|
|
1458
|
-
_$
|
|
1459
|
-
_$
|
|
1460
|
-
_$
|
|
1461
|
-
_$insertNode(_el$
|
|
1462
|
-
_$insertNode(_el$
|
|
1463
|
-
_$
|
|
1464
|
-
_$
|
|
1465
|
-
_$
|
|
1466
|
-
_$
|
|
1467
|
-
_$insertNode(_el$
|
|
1468
|
-
_$insertNode(_el$
|
|
1469
|
-
_$
|
|
1470
|
-
_$setProp(_el$
|
|
1471
|
-
_$
|
|
1542
|
+
_$setProp(_el$63, "paddingLeft", 2);
|
|
1543
|
+
_$setProp(_el$63, "paddingRight", 2);
|
|
1544
|
+
_$setProp(_el$63, "paddingTop", 1);
|
|
1545
|
+
_$setProp(_el$63, "paddingBottom", 1);
|
|
1546
|
+
_$insertNode(_el$64, _el$65);
|
|
1547
|
+
_$insertNode(_el$64, _el$68);
|
|
1548
|
+
_$setProp(_el$64, "flexDirection", "row");
|
|
1549
|
+
_$setProp(_el$64, "justifyContent", "space-between");
|
|
1550
|
+
_$setProp(_el$64, "width", "100%");
|
|
1551
|
+
_$setProp(_el$64, "marginBottom", 1);
|
|
1552
|
+
_$insertNode(_el$65, _el$66);
|
|
1553
|
+
_$insertNode(_el$66, _$createTextNode(`Dialog size`));
|
|
1554
|
+
_$insertNode(_el$68, _$createTextNode(`esc`));
|
|
1555
|
+
_$setProp(_el$68, "onMouseUp", () => props.onDone(undefined));
|
|
1556
|
+
_$insertNode(_el$70, _el$71);
|
|
1557
|
+
_$insertNode(_el$70, _el$73);
|
|
1558
|
+
_$insertNode(_el$70, _el$75);
|
|
1559
|
+
_$insertNode(_el$70, _el$78);
|
|
1560
|
+
_$setProp(_el$70, "flexDirection", "row");
|
|
1561
|
+
_$setProp(_el$70, "gap", 0);
|
|
1562
|
+
_$setProp(_el$70, "width", "100%");
|
|
1563
|
+
_$setProp(_el$70, "marginBottom", 1);
|
|
1564
|
+
_$insertNode(_el$71, _$createTextNode(`Width: `));
|
|
1565
|
+
_$insertNode(_el$73, _el$74);
|
|
1566
|
+
_$insert(_el$74, () => dialogSizeOf(props.api));
|
|
1472
1567
|
_$insertNode(_el$75, _el$76);
|
|
1473
|
-
_$
|
|
1568
|
+
_$insertNode(_el$75, _el$77);
|
|
1569
|
+
_$insert(_el$75, () => DIALOG_WIDTH_COLUMNS[dialogSizeOf(props.api)], _el$77);
|
|
1570
|
+
_$insertNode(_el$78, _el$79);
|
|
1571
|
+
_$insertNode(_el$79, _el$80);
|
|
1572
|
+
_$insert(_el$79, height, _el$80);
|
|
1573
|
+
_$insertNode(_el$81, _el$82);
|
|
1574
|
+
_$insertNode(_el$81, _el$85);
|
|
1575
|
+
_$setProp(_el$81, "flexDirection", "row");
|
|
1576
|
+
_$setProp(_el$81, "width", "100%");
|
|
1577
|
+
_$setProp(_el$81, "marginBottom", 1);
|
|
1578
|
+
_$insertNode(_el$82, _el$83);
|
|
1579
|
+
_$insert(_el$81, _$createComponent(For, {
|
|
1474
1580
|
get each() {
|
|
1475
1581
|
return sliderCells();
|
|
1476
1582
|
},
|
|
1477
1583
|
children: (cell) => (() => {
|
|
1478
|
-
var _el$
|
|
1479
|
-
_$insert(_el$
|
|
1480
|
-
_$effect((_$p) => _$setProp(_el$
|
|
1481
|
-
return _el$
|
|
1584
|
+
var _el$107 = _$createElement("text");
|
|
1585
|
+
_$insert(_el$107, () => cell.char);
|
|
1586
|
+
_$effect((_$p) => _$setProp(_el$107, "fg", cell.color, _$p));
|
|
1587
|
+
return _el$107;
|
|
1482
1588
|
})()
|
|
1483
|
-
}), _el$
|
|
1484
|
-
_$insertNode(_el$
|
|
1485
|
-
_$insertNode(_el$
|
|
1486
|
-
_$insertNode(_el$
|
|
1487
|
-
_$setProp(_el$
|
|
1488
|
-
_$setProp(_el$
|
|
1489
|
-
_$setProp(_el$
|
|
1490
|
-
_$insertNode(_el$
|
|
1491
|
-
_$insertNode(_el$
|
|
1492
|
-
_$insertNode(_el$
|
|
1493
|
-
_$insertNode(_el$
|
|
1494
|
-
_$setProp(_el$
|
|
1495
|
-
_$setProp(_el$
|
|
1496
|
-
_$insert(_el$
|
|
1589
|
+
}), _el$85);
|
|
1590
|
+
_$insertNode(_el$85, _el$86);
|
|
1591
|
+
_$insertNode(_el$89, _el$90);
|
|
1592
|
+
_$insertNode(_el$89, _el$99);
|
|
1593
|
+
_$setProp(_el$89, "flexDirection", "row");
|
|
1594
|
+
_$setProp(_el$89, "gap", 2);
|
|
1595
|
+
_$setProp(_el$89, "marginBottom", 1);
|
|
1596
|
+
_$insertNode(_el$90, _el$91);
|
|
1597
|
+
_$insertNode(_el$90, _el$93);
|
|
1598
|
+
_$insertNode(_el$90, _el$95);
|
|
1599
|
+
_$insertNode(_el$90, _el$97);
|
|
1600
|
+
_$setProp(_el$90, "flexDirection", "column");
|
|
1601
|
+
_$setProp(_el$90, "gap", 0);
|
|
1602
|
+
_$insert(_el$90, _$createComponent(For, {
|
|
1497
1603
|
each: HEIGHT_PRESETS,
|
|
1498
1604
|
children: (preset) => (() => {
|
|
1499
|
-
var _el$
|
|
1500
|
-
_$insertNode(_el$
|
|
1501
|
-
_$insertNode(_el$
|
|
1502
|
-
_$insertNode(_el$
|
|
1503
|
-
_$insert(_el$
|
|
1504
|
-
_$insert(_el$
|
|
1505
|
-
_$insert(_el$
|
|
1506
|
-
_$effect((_$p) => _$setProp(_el$
|
|
1507
|
-
return _el$
|
|
1605
|
+
var _el$108 = _$createElement("text"), _el$109 = _$createTextNode(` `), _el$110 = _$createTextNode(`: `), _el$111 = _$createTextNode(`%`);
|
|
1606
|
+
_$insertNode(_el$108, _el$109);
|
|
1607
|
+
_$insertNode(_el$108, _el$110);
|
|
1608
|
+
_$insertNode(_el$108, _el$111);
|
|
1609
|
+
_$insert(_el$108, () => preset.key, _el$109);
|
|
1610
|
+
_$insert(_el$108, () => preset.label, _el$110);
|
|
1611
|
+
_$insert(_el$108, () => preset.value, _el$111);
|
|
1612
|
+
_$effect((_$p) => _$setProp(_el$108, "fg", height() === preset.value ? theme().primary : theme().textMuted, _$p));
|
|
1613
|
+
return _el$108;
|
|
1508
1614
|
})()
|
|
1509
|
-
}), _el$
|
|
1510
|
-
_$insertNode(_el$
|
|
1511
|
-
_$insertNode(_el$
|
|
1512
|
-
_$insertNode(_el$
|
|
1513
|
-
_$insertNode(_el$
|
|
1514
|
-
_$setProp(_el$
|
|
1515
|
-
_$setProp(_el$
|
|
1516
|
-
_$insert(_el$
|
|
1615
|
+
}), _el$91);
|
|
1616
|
+
_$insertNode(_el$91, _$createTextNode(` `));
|
|
1617
|
+
_$insertNode(_el$93, _$createTextNode(`left/right 1%`));
|
|
1618
|
+
_$insertNode(_el$95, _$createTextNode(`up/down 5%`));
|
|
1619
|
+
_$insertNode(_el$97, _$createTextNode(`c custom`));
|
|
1620
|
+
_$setProp(_el$99, "flexDirection", "column");
|
|
1621
|
+
_$setProp(_el$99, "gap", 0);
|
|
1622
|
+
_$insert(_el$99, _$createComponent(For, {
|
|
1517
1623
|
get each() {
|
|
1518
1624
|
return preview();
|
|
1519
1625
|
},
|
|
1520
1626
|
children: (line) => (() => {
|
|
1521
|
-
var _el$
|
|
1522
|
-
_$insert(_el$
|
|
1523
|
-
_$effect((_$p) => _$setProp(_el$
|
|
1524
|
-
return _el$
|
|
1627
|
+
var _el$112 = _$createElement("text");
|
|
1628
|
+
_$insert(_el$112, line);
|
|
1629
|
+
_$effect((_$p) => _$setProp(_el$112, "fg", theme().textMuted, _$p));
|
|
1630
|
+
return _el$112;
|
|
1525
1631
|
})()
|
|
1526
1632
|
}));
|
|
1527
|
-
_$insertNode(_el$
|
|
1528
|
-
_$insertNode(_el$
|
|
1529
|
-
_$setProp(_el$
|
|
1530
|
-
_$setProp(_el$
|
|
1531
|
-
_$setProp(_el$
|
|
1532
|
-
_$insertNode(_el$
|
|
1533
|
-
_$insertNode(_el$
|
|
1534
|
-
_$setProp(_el$
|
|
1535
|
-
_$setProp(_el$
|
|
1536
|
-
_$setProp(_el$
|
|
1633
|
+
_$insertNode(_el$100, _el$101);
|
|
1634
|
+
_$insertNode(_el$100, _el$103);
|
|
1635
|
+
_$setProp(_el$100, "flexDirection", "row");
|
|
1636
|
+
_$setProp(_el$100, "justifyContent", "space-between");
|
|
1637
|
+
_$setProp(_el$100, "width", "100%");
|
|
1638
|
+
_$insertNode(_el$101, _$createTextNode(`enter save`));
|
|
1639
|
+
_$insertNode(_el$103, _el$104);
|
|
1640
|
+
_$setProp(_el$103, "paddingLeft", 3);
|
|
1641
|
+
_$setProp(_el$103, "paddingRight", 3);
|
|
1642
|
+
_$setProp(_el$103, "onMouseUp", () => {
|
|
1537
1643
|
setDialogHeightPercent(props.api, height());
|
|
1538
1644
|
props.onDone({
|
|
1539
1645
|
action: "save",
|
|
1540
1646
|
height: height()
|
|
1541
1647
|
});
|
|
1542
1648
|
});
|
|
1543
|
-
_$insertNode(_el$
|
|
1544
|
-
_$insertNode(_el$
|
|
1649
|
+
_$insertNode(_el$104, _el$105);
|
|
1650
|
+
_$insertNode(_el$105, _$createTextNode(`save`));
|
|
1545
1651
|
_$effect((_p$) => {
|
|
1546
|
-
var _v$
|
|
1547
|
-
_v$
|
|
1548
|
-
_v$
|
|
1549
|
-
_v$
|
|
1550
|
-
_v$
|
|
1551
|
-
_v$
|
|
1552
|
-
_v$
|
|
1553
|
-
_v$
|
|
1554
|
-
_v$
|
|
1555
|
-
_v$
|
|
1556
|
-
_v$
|
|
1557
|
-
_v$
|
|
1558
|
-
_v$
|
|
1559
|
-
_v$
|
|
1560
|
-
_v$
|
|
1561
|
-
_v$
|
|
1652
|
+
var _v$27 = theme().accent, _v$28 = theme().textMuted, _v$29 = theme().textMuted, _v$30 = theme().primary, _v$31 = theme().textMuted, _v$32 = theme().primary, _v$33 = theme().textMuted, _v$34 = theme().textMuted, _v$35 = theme().textMuted, _v$36 = theme().textMuted, _v$37 = theme().textMuted, _v$38 = theme().textMuted, _v$39 = theme().textMuted, _v$40 = theme().primary, _v$41 = theme().background;
|
|
1653
|
+
_v$27 !== _p$.e && (_p$.e = _$setProp(_el$65, "fg", _v$27, _p$.e));
|
|
1654
|
+
_v$28 !== _p$.t && (_p$.t = _$setProp(_el$68, "fg", _v$28, _p$.t));
|
|
1655
|
+
_v$29 !== _p$.a && (_p$.a = _$setProp(_el$71, "fg", _v$29, _p$.a));
|
|
1656
|
+
_v$30 !== _p$.o && (_p$.o = _$setProp(_el$73, "fg", _v$30, _p$.o));
|
|
1657
|
+
_v$31 !== _p$.i && (_p$.i = _$setProp(_el$75, "fg", _v$31, _p$.i));
|
|
1658
|
+
_v$32 !== _p$.n && (_p$.n = _$setProp(_el$78, "fg", _v$32, _p$.n));
|
|
1659
|
+
_v$33 !== _p$.s && (_p$.s = _$setProp(_el$82, "fg", _v$33, _p$.s));
|
|
1660
|
+
_v$34 !== _p$.h && (_p$.h = _$setProp(_el$85, "fg", _v$34, _p$.h));
|
|
1661
|
+
_v$35 !== _p$.r && (_p$.r = _$setProp(_el$91, "fg", _v$35, _p$.r));
|
|
1662
|
+
_v$36 !== _p$.d && (_p$.d = _$setProp(_el$93, "fg", _v$36, _p$.d));
|
|
1663
|
+
_v$37 !== _p$.l && (_p$.l = _$setProp(_el$95, "fg", _v$37, _p$.l));
|
|
1664
|
+
_v$38 !== _p$.u && (_p$.u = _$setProp(_el$97, "fg", _v$38, _p$.u));
|
|
1665
|
+
_v$39 !== _p$.c && (_p$.c = _$setProp(_el$101, "fg", _v$39, _p$.c));
|
|
1666
|
+
_v$40 !== _p$.w && (_p$.w = _$setProp(_el$103, "backgroundColor", _v$40, _p$.w));
|
|
1667
|
+
_v$41 !== _p$.m && (_p$.m = _$setProp(_el$104, "fg", _v$41, _p$.m));
|
|
1562
1668
|
return _p$;
|
|
1563
1669
|
}, {
|
|
1564
1670
|
e: undefined,
|
|
@@ -1577,7 +1683,7 @@ function SizeSliderDialog(props) {
|
|
|
1577
1683
|
w: undefined,
|
|
1578
1684
|
m: undefined
|
|
1579
1685
|
});
|
|
1580
|
-
return _el$
|
|
1686
|
+
return _el$63;
|
|
1581
1687
|
})();
|
|
1582
1688
|
}
|
|
1583
1689
|
async function mainMenu(api) {
|
|
@@ -1643,7 +1749,7 @@ The host client does not expose session.list for this directory.`
|
|
|
1643
1749
|
continue;
|
|
1644
1750
|
}
|
|
1645
1751
|
if (action.type === "cleanup") {
|
|
1646
|
-
await runCleanup(api, cleanupTargets(tree, data.activeIDs), rootSession?.title ?? rootID);
|
|
1752
|
+
await runCleanup(api, cleanupTargets(tree, data.activeIDs), rootSession?.title ?? rootID, directory, rootID);
|
|
1647
1753
|
continue;
|
|
1648
1754
|
}
|
|
1649
1755
|
}
|
package/package.json
CHANGED