pantheon-opencode 1.1.1-beta.9 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/opencode.json +49 -2
- package/package.json +1 -1
- package/pantheon.schema.json +1 -1
- package/scripts/install-mcp.mjs +54 -18
- package/scripts/mcp_persistence_server.py +3 -3
- package/src/agents/mnemosyne.md +9 -1
- package/src/agents/nyx.md +7 -1
- package/src/agents/themis.md +8 -2
- package/src/agents/zeus.md +10 -0
- package/src/mcp/install-mcp.mjs +54 -18
- package/src/mcp/mcp_persistence_server.py +3 -3
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +208 -112
- package/src/plugins/tui/dist/tui.tsx +162 -45
- package/src/plugins/tui/src/index.tsx +162 -45
- package/src/routing.yml +11 -30
- package/commands/pantheon-audit.md +0 -25
- package/commands/pantheon-deepwork.md +0 -79
- package/commands/pantheon-focus.md +0 -9
- package/commands/pantheon-forget.md +0 -58
- package/commands/pantheon-optimize.md +0 -79
- package/commands/pantheon-remember.md +0 -44
- package/commands/pantheon-search.md +0 -48
- package/commands/pantheon-status.md +0 -71
- package/commands/pantheon.md +0 -49
- package/scripts/check-version-consistency.sh +0 -23
- package/scripts/generate-routing-docs.mjs +0 -104
- package/scripts/manifest.mjs +0 -597
- package/scripts/memory_cache.py +0 -78
- package/scripts/paths.py +0 -64
- package/scripts/prune_context.py +0 -72
- package/scripts/release-bundle.mjs +0 -109
- package/scripts/todo_enforcer.py +0 -242
- package/scripts/validate_agent_frontmatter.py +0 -226
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createComponent, createElement, createTextNode, effect, insert, insertNode, setProp } from "@opentui/solid";
|
|
2
|
-
import { For, Show, createMemo, createSignal } from "solid-js";
|
|
1
|
+
import { createComponent, createElement, createTextNode, effect, insert, insertNode, memo, setProp } from "@opentui/solid";
|
|
2
|
+
import { For, Show, createMemo, createResource, createSignal, onCleanup, onMount } from "solid-js";
|
|
3
3
|
//#region src/index.tsx
|
|
4
4
|
/** @jsxImportSource @opentui/solid */
|
|
5
5
|
const BAR_WIDTH = 20;
|
|
@@ -148,6 +148,44 @@ function buildBar(pct) {
|
|
|
148
148
|
const filled = Math.max(0, Math.min(BAR_WIDTH, Math.round(Math.max(0, Math.min(100, pct)) / 100 * BAR_WIDTH)));
|
|
149
149
|
return "█".repeat(filled) + "░".repeat(BAR_WIDTH - filled);
|
|
150
150
|
}
|
|
151
|
+
async function detectVersion(api) {
|
|
152
|
+
try {
|
|
153
|
+
const wt = api.state.path?.worktree ?? "";
|
|
154
|
+
const fp = wt ? `${wt}/package.json` : "package.json";
|
|
155
|
+
const result = await api.client.file.read({ query: { path: fp } });
|
|
156
|
+
const match = String(result?.content ?? "").match(/"version":\s*"([^"]+)"/);
|
|
157
|
+
if (match?.[1]) return match[1];
|
|
158
|
+
} catch {}
|
|
159
|
+
try {
|
|
160
|
+
const proc = api.client?.process;
|
|
161
|
+
if (typeof proc?.exec === "function") {
|
|
162
|
+
const r = await proc.exec({
|
|
163
|
+
command: "git",
|
|
164
|
+
args: [
|
|
165
|
+
"describe",
|
|
166
|
+
"--tags",
|
|
167
|
+
"--always"
|
|
168
|
+
],
|
|
169
|
+
timeoutMs: 3e3
|
|
170
|
+
});
|
|
171
|
+
const tag = (r.stdout ?? r.output ?? "").trim().replace(/^v/, "").replace(/-\d+-g[0-9a-f]+$/, "");
|
|
172
|
+
if (tag && tag !== "5.0.0") return tag;
|
|
173
|
+
}
|
|
174
|
+
} catch {}
|
|
175
|
+
try {
|
|
176
|
+
const proc = api.client?.process;
|
|
177
|
+
if (typeof proc?.exec === "function") {
|
|
178
|
+
const r = await proc.exec({
|
|
179
|
+
command: "opencode",
|
|
180
|
+
args: ["--version"],
|
|
181
|
+
timeoutMs: 3e3
|
|
182
|
+
});
|
|
183
|
+
const ver = (r.stdout ?? r.output ?? "").trim().replace(/^v/, "");
|
|
184
|
+
if (ver) return ver;
|
|
185
|
+
}
|
|
186
|
+
} catch {}
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
151
189
|
function ContextBar(props) {
|
|
152
190
|
const messages = createMemo(() => {
|
|
153
191
|
try {
|
|
@@ -167,7 +205,7 @@ function ContextBar(props) {
|
|
|
167
205
|
const ctxLimit = safeNum((pid ? (props.api.state.provider ?? []).find((p) => p.id === pid) : null)?.models?.[mid ?? ""]?.limit?.context);
|
|
168
206
|
return {
|
|
169
207
|
tokens,
|
|
170
|
-
limit: ctxLimit > 0 ? ctxLimit :
|
|
208
|
+
limit: ctxLimit > 0 ? ctxLimit : 2e5,
|
|
171
209
|
percent: ctxLimit > 0 ? Math.round(tokens / ctxLimit * 100) : 0
|
|
172
210
|
};
|
|
173
211
|
});
|
|
@@ -218,23 +256,77 @@ function ContextBar(props) {
|
|
|
218
256
|
}
|
|
219
257
|
});
|
|
220
258
|
}
|
|
259
|
+
function SessionRow(props) {
|
|
260
|
+
const theme = () => props.api.theme.current;
|
|
261
|
+
const status = createMemo(() => {
|
|
262
|
+
try {
|
|
263
|
+
const s = props.api.state.session?.status?.(props.session.id);
|
|
264
|
+
if (s?.type) return s.type;
|
|
265
|
+
} catch {}
|
|
266
|
+
return null;
|
|
267
|
+
});
|
|
268
|
+
const statusIcon = createMemo(() => {
|
|
269
|
+
switch (status()) {
|
|
270
|
+
case "busy": return "● ";
|
|
271
|
+
case "retry": return "⚠ ";
|
|
272
|
+
default: return "";
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
return (() => {
|
|
276
|
+
var _el$8 = createElement("text");
|
|
277
|
+
insert(_el$8, () => `${statusIcon()}${props.session?.id?.slice(0, 8) ?? "????"}... ${props.session?.title?.slice(0, 26) ?? "(untitled)"}`);
|
|
278
|
+
effect((_$p) => setProp(_el$8, "fg", theme().textMuted, _$p));
|
|
279
|
+
return _el$8;
|
|
280
|
+
})();
|
|
281
|
+
}
|
|
221
282
|
function View(props) {
|
|
222
283
|
const [showCommands, setShowCommands] = createSignal(false);
|
|
223
284
|
const [showAgents, setShowAgents] = createSignal(false);
|
|
224
285
|
const [showConfig, setShowConfig] = createSignal(false);
|
|
225
|
-
const [
|
|
286
|
+
const [showSessions, setShowSessions] = createSignal(false);
|
|
226
287
|
const theme = () => props.api.theme.current;
|
|
227
288
|
const branch = createMemo(() => props.api.state.vcs?.branch ? `\u2387 ${props.api.state.vcs.branch}` : null);
|
|
228
|
-
const
|
|
289
|
+
const [sessionList, { refetch: refetchSessions }] = createResource(async () => {
|
|
229
290
|
try {
|
|
230
|
-
return props.api.
|
|
291
|
+
return await props.api.client?.session?.list?.({ limit: 100 }) ?? { data: [] };
|
|
231
292
|
} catch {
|
|
232
|
-
return
|
|
293
|
+
return { data: [] };
|
|
233
294
|
}
|
|
234
295
|
});
|
|
235
|
-
const
|
|
236
|
-
const
|
|
237
|
-
|
|
296
|
+
const totalSessions = createMemo(() => {
|
|
297
|
+
const result = sessionList();
|
|
298
|
+
if (!result) return 0;
|
|
299
|
+
const data = result.data ?? result;
|
|
300
|
+
if (!Array.isArray(data)) return 0;
|
|
301
|
+
return data.filter((s) => !s.parentID).length;
|
|
302
|
+
});
|
|
303
|
+
const recentSessions = createMemo(() => {
|
|
304
|
+
const result = sessionList();
|
|
305
|
+
if (!result) return [];
|
|
306
|
+
const data = result.data ?? result;
|
|
307
|
+
if (!Array.isArray(data)) return [];
|
|
308
|
+
return data.filter((s) => !s.parentID && s.id !== props.sessionID).sort((a, b) => {
|
|
309
|
+
const ta = a.time?.updated ?? a.updated ?? 0;
|
|
310
|
+
return (b.time?.updated ?? b.updated ?? 0) - ta;
|
|
311
|
+
}).slice(0, 8);
|
|
312
|
+
});
|
|
313
|
+
const [memoryCount, setMemoryCount] = createSignal(null);
|
|
314
|
+
onMount(() => {
|
|
315
|
+
const cleanup = [];
|
|
316
|
+
try {
|
|
317
|
+
cleanup.push(props.api.event.on("session.status", refetchSessions));
|
|
318
|
+
cleanup.push(props.api.event.on("session.created", refetchSessions));
|
|
319
|
+
cleanup.push(props.api.event.on("session.updated", refetchSessions));
|
|
320
|
+
cleanup.push(props.api.event.on("session.deleted", refetchSessions));
|
|
321
|
+
} catch {}
|
|
322
|
+
try {
|
|
323
|
+
const ev = props.api.event;
|
|
324
|
+
if (typeof ev?.on === "function") {
|
|
325
|
+
cleanup.push(ev.on("memory.created", () => setMemoryCount((c) => c !== null ? c + 1 : 1)));
|
|
326
|
+
cleanup.push(ev.on("memory.deleted", () => setMemoryCount((c) => c !== null ? Math.max(0, c - 1) : 0)));
|
|
327
|
+
}
|
|
328
|
+
} catch {}
|
|
329
|
+
onCleanup(() => cleanup.forEach((fn) => fn()));
|
|
238
330
|
});
|
|
239
331
|
const configSummary = createMemo(() => {
|
|
240
332
|
const cfg = props.api.state.config;
|
|
@@ -246,24 +338,24 @@ function View(props) {
|
|
|
246
338
|
};
|
|
247
339
|
});
|
|
248
340
|
const HR = () => (() => {
|
|
249
|
-
var _el$
|
|
250
|
-
insertNode(_el$
|
|
251
|
-
effect((_$p) => setProp(_el$
|
|
252
|
-
return _el$
|
|
341
|
+
var _el$9 = createElement("text");
|
|
342
|
+
insertNode(_el$9, createTextNode(`────────────────────────────`));
|
|
343
|
+
effect((_$p) => setProp(_el$9, "fg", theme().textMuted, _$p));
|
|
344
|
+
return _el$9;
|
|
253
345
|
})();
|
|
254
346
|
return (() => {
|
|
255
|
-
var _el$
|
|
256
|
-
insertNode(_el$
|
|
257
|
-
insertNode(_el$
|
|
258
|
-
insertNode(_el$
|
|
259
|
-
insertNode(_el$
|
|
260
|
-
insertNode(_el$
|
|
261
|
-
insertNode(_el$
|
|
262
|
-
setProp(_el$
|
|
263
|
-
setProp(_el$
|
|
264
|
-
setProp(_el$
|
|
265
|
-
insert(_el$
|
|
266
|
-
insert(_el$
|
|
347
|
+
var _el$1 = createElement("box"), _el$10 = createElement("text"), _el$11 = createElement("box"), _el$12 = createElement("text"), _el$13 = createElement("text"), _el$15 = createElement("box"), _el$16 = createElement("text"), _el$17 = createElement("text"), _el$19 = createElement("box"), _el$20 = createElement("text"), _el$21 = createElement("text"), _el$23 = createElement("box"), _el$24 = createElement("text"), _el$25 = createElement("box"), _el$26 = createElement("text");
|
|
348
|
+
insertNode(_el$1, _el$10);
|
|
349
|
+
insertNode(_el$1, _el$11);
|
|
350
|
+
insertNode(_el$1, _el$15);
|
|
351
|
+
insertNode(_el$1, _el$19);
|
|
352
|
+
insertNode(_el$1, _el$23);
|
|
353
|
+
insertNode(_el$1, _el$25);
|
|
354
|
+
setProp(_el$1, "flexDirection", "column");
|
|
355
|
+
setProp(_el$1, "width", "100%");
|
|
356
|
+
setProp(_el$10, "attributes", { bold: true });
|
|
357
|
+
insert(_el$10, () => `Pantheon${props.version ? ` v${props.version}` : ""}`);
|
|
358
|
+
insert(_el$1, createComponent(Show, {
|
|
267
359
|
get when() {
|
|
268
360
|
return branch();
|
|
269
361
|
},
|
|
@@ -273,34 +365,60 @@ function View(props) {
|
|
|
273
365
|
effect((_$p) => setProp(_el$27, "fg", theme().textMuted, _$p));
|
|
274
366
|
return _el$27;
|
|
275
367
|
})()
|
|
276
|
-
}), _el$
|
|
277
|
-
insert(_el$
|
|
278
|
-
insert(_el$
|
|
368
|
+
}), _el$11);
|
|
369
|
+
insert(_el$1, createComponent(HR, {}), _el$11);
|
|
370
|
+
insert(_el$1, createComponent(ContextBar, {
|
|
279
371
|
get api() {
|
|
280
372
|
return props.api;
|
|
281
373
|
},
|
|
282
374
|
get sessionID() {
|
|
283
375
|
return props.sessionID;
|
|
284
376
|
}
|
|
285
|
-
}), _el$
|
|
286
|
-
insert(_el$
|
|
287
|
-
insertNode(_el$
|
|
288
|
-
insertNode(_el$
|
|
289
|
-
setProp(_el$
|
|
290
|
-
setProp(_el$
|
|
291
|
-
insert(_el$
|
|
292
|
-
insert(_el$
|
|
293
|
-
insert(_el$
|
|
377
|
+
}), _el$11);
|
|
378
|
+
insert(_el$1, createComponent(HR, {}), _el$11);
|
|
379
|
+
insertNode(_el$11, _el$12);
|
|
380
|
+
insertNode(_el$11, _el$13);
|
|
381
|
+
setProp(_el$11, "onMouseDown", () => setShowSessions((x) => !x));
|
|
382
|
+
setProp(_el$12, "attributes", { bold: true });
|
|
383
|
+
insert(_el$12, () => `${showSessions() ? "▼" : "▶"} Sessions`);
|
|
384
|
+
insert(_el$13, () => ` (${String(totalSessions())})`);
|
|
385
|
+
insert(_el$1, createComponent(Show, {
|
|
294
386
|
get when() {
|
|
295
|
-
return
|
|
387
|
+
return showSessions();
|
|
296
388
|
},
|
|
297
389
|
get children() {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
390
|
+
return createComponent(Show, {
|
|
391
|
+
get when() {
|
|
392
|
+
return recentSessions().length > 0;
|
|
393
|
+
},
|
|
394
|
+
get fallback() {
|
|
395
|
+
return (() => {
|
|
396
|
+
var _el$28 = createElement("box"), _el$29 = createElement("text");
|
|
397
|
+
insertNode(_el$28, _el$29);
|
|
398
|
+
setProp(_el$28, "marginLeft", 1);
|
|
399
|
+
insertNode(_el$29, createTextNode(`No recent sessions`));
|
|
400
|
+
effect((_$p) => setProp(_el$29, "fg", theme().textMuted, _$p));
|
|
401
|
+
return _el$28;
|
|
402
|
+
})();
|
|
403
|
+
},
|
|
404
|
+
get children() {
|
|
405
|
+
var _el$14 = createElement("box");
|
|
406
|
+
setProp(_el$14, "marginLeft", 1);
|
|
407
|
+
setProp(_el$14, "flexDirection", "column");
|
|
408
|
+
insert(_el$14, createComponent(For, {
|
|
409
|
+
get each() {
|
|
410
|
+
return recentSessions();
|
|
411
|
+
},
|
|
412
|
+
children: (ses) => createComponent(SessionRow, {
|
|
413
|
+
get api() {
|
|
414
|
+
return props.api;
|
|
415
|
+
},
|
|
416
|
+
session: ses
|
|
417
|
+
})
|
|
418
|
+
}));
|
|
419
|
+
return _el$14;
|
|
420
|
+
}
|
|
421
|
+
});
|
|
304
422
|
}
|
|
305
423
|
}), _el$15);
|
|
306
424
|
insertNode(_el$15, _el$16);
|
|
@@ -309,7 +427,7 @@ function View(props) {
|
|
|
309
427
|
setProp(_el$16, "attributes", { bold: true });
|
|
310
428
|
insert(_el$16, () => `${showCommands() ? "▼" : "▶"} Commands`);
|
|
311
429
|
insert(_el$17, () => ` (${String(COMMANDS.length)})`);
|
|
312
|
-
insert(_el$
|
|
430
|
+
insert(_el$1, createComponent(Show, {
|
|
313
431
|
get when() {
|
|
314
432
|
return showCommands();
|
|
315
433
|
},
|
|
@@ -320,10 +438,10 @@ function View(props) {
|
|
|
320
438
|
insert(_el$18, createComponent(For, {
|
|
321
439
|
each: COMMANDS,
|
|
322
440
|
children: (cmd) => (() => {
|
|
323
|
-
var _el$
|
|
324
|
-
insertNode(_el$
|
|
325
|
-
insertNode(_el$
|
|
326
|
-
setProp(_el$
|
|
441
|
+
var _el$31 = createElement("box"), _el$32 = createElement("text"), _el$33 = createElement("text");
|
|
442
|
+
insertNode(_el$31, _el$32);
|
|
443
|
+
insertNode(_el$31, _el$33);
|
|
444
|
+
setProp(_el$31, "onMouseDown", (e) => {
|
|
327
445
|
e.stopPropagation();
|
|
328
446
|
try {
|
|
329
447
|
const cmdApi = props.api.command;
|
|
@@ -335,18 +453,18 @@ function View(props) {
|
|
|
335
453
|
message: `Type ${cmd.name} in chat`
|
|
336
454
|
});
|
|
337
455
|
});
|
|
338
|
-
insert(_el$
|
|
339
|
-
insert(_el$
|
|
456
|
+
insert(_el$32, () => cmd.name);
|
|
457
|
+
insert(_el$33, () => ` \u2014 ${cmd.desc}`);
|
|
340
458
|
effect((_p$) => {
|
|
341
459
|
var _v$10 = cmd.name === "/pantheon" ? theme().accent : theme().textMuted, _v$11 = theme().textMuted;
|
|
342
|
-
_v$10 !== _p$.e && (_p$.e = setProp(_el$
|
|
343
|
-
_v$11 !== _p$.t && (_p$.t = setProp(_el$
|
|
460
|
+
_v$10 !== _p$.e && (_p$.e = setProp(_el$32, "fg", _v$10, _p$.e));
|
|
461
|
+
_v$11 !== _p$.t && (_p$.t = setProp(_el$33, "fg", _v$11, _p$.t));
|
|
344
462
|
return _p$;
|
|
345
463
|
}, {
|
|
346
464
|
e: void 0,
|
|
347
465
|
t: void 0
|
|
348
466
|
});
|
|
349
|
-
return _el$
|
|
467
|
+
return _el$31;
|
|
350
468
|
})()
|
|
351
469
|
}));
|
|
352
470
|
return _el$18;
|
|
@@ -358,7 +476,7 @@ function View(props) {
|
|
|
358
476
|
setProp(_el$20, "attributes", { bold: true });
|
|
359
477
|
insert(_el$20, () => `${showAgents() ? "▼" : "▶"} Agents`);
|
|
360
478
|
insert(_el$21, () => ` (${String(AGENTS.length)})`);
|
|
361
|
-
insert(_el$
|
|
479
|
+
insert(_el$1, createComponent(Show, {
|
|
362
480
|
get when() {
|
|
363
481
|
return showAgents();
|
|
364
482
|
},
|
|
@@ -369,21 +487,21 @@ function View(props) {
|
|
|
369
487
|
insert(_el$22, createComponent(For, {
|
|
370
488
|
each: AGENTS,
|
|
371
489
|
children: (agent) => (() => {
|
|
372
|
-
var _el$
|
|
373
|
-
insertNode(_el$
|
|
374
|
-
insertNode(_el$
|
|
375
|
-
insert(_el$
|
|
376
|
-
insert(_el$
|
|
490
|
+
var _el$34 = createElement("box"), _el$35 = createElement("text"), _el$36 = createElement("text");
|
|
491
|
+
insertNode(_el$34, _el$35);
|
|
492
|
+
insertNode(_el$34, _el$36);
|
|
493
|
+
insert(_el$35, () => `${agent.tier === "premium" ? "✦ " : "· "}${agent.name}`);
|
|
494
|
+
insert(_el$36, () => ` \u2014 ${agent.role}`);
|
|
377
495
|
effect((_p$) => {
|
|
378
496
|
var _v$12 = agent.tier === "premium" ? theme().accent : theme().textMuted, _v$13 = theme().textMuted;
|
|
379
|
-
_v$12 !== _p$.e && (_p$.e = setProp(_el$
|
|
380
|
-
_v$13 !== _p$.t && (_p$.t = setProp(_el$
|
|
497
|
+
_v$12 !== _p$.e && (_p$.e = setProp(_el$35, "fg", _v$12, _p$.e));
|
|
498
|
+
_v$13 !== _p$.t && (_p$.t = setProp(_el$36, "fg", _v$13, _p$.t));
|
|
381
499
|
return _p$;
|
|
382
500
|
}, {
|
|
383
501
|
e: void 0,
|
|
384
502
|
t: void 0
|
|
385
503
|
});
|
|
386
|
-
return _el$
|
|
504
|
+
return _el$34;
|
|
387
505
|
})()
|
|
388
506
|
}));
|
|
389
507
|
return _el$22;
|
|
@@ -393,7 +511,7 @@ function View(props) {
|
|
|
393
511
|
setProp(_el$23, "onMouseDown", () => setShowConfig((x) => !x));
|
|
394
512
|
setProp(_el$24, "attributes", { bold: true });
|
|
395
513
|
insert(_el$24, () => `${showConfig() ? "▼" : "▶"} Config`);
|
|
396
|
-
insert(_el$
|
|
514
|
+
insert(_el$1, createComponent(Show, {
|
|
397
515
|
get when() {
|
|
398
516
|
return showConfig();
|
|
399
517
|
},
|
|
@@ -404,44 +522,47 @@ function View(props) {
|
|
|
404
522
|
},
|
|
405
523
|
get fallback() {
|
|
406
524
|
return (() => {
|
|
407
|
-
var _el$
|
|
408
|
-
insertNode(_el$
|
|
409
|
-
setProp(_el$
|
|
410
|
-
insertNode(_el$
|
|
411
|
-
effect((_$p) => setProp(_el$
|
|
412
|
-
return _el$
|
|
525
|
+
var _el$37 = createElement("box"), _el$38 = createElement("text");
|
|
526
|
+
insertNode(_el$37, _el$38);
|
|
527
|
+
setProp(_el$37, "marginLeft", 1);
|
|
528
|
+
insertNode(_el$38, createTextNode(`No config data`));
|
|
529
|
+
effect((_$p) => setProp(_el$38, "fg", theme().textMuted, _$p));
|
|
530
|
+
return _el$37;
|
|
413
531
|
})();
|
|
414
532
|
},
|
|
415
533
|
children: (cfg) => (() => {
|
|
416
|
-
var _el$
|
|
417
|
-
insertNode(_el$
|
|
418
|
-
insertNode(_el$
|
|
419
|
-
setProp(_el$
|
|
420
|
-
setProp(_el$
|
|
421
|
-
insert(_el$
|
|
422
|
-
insert(_el$
|
|
534
|
+
var _el$40 = createElement("box"), _el$41 = createElement("text"), _el$42 = createElement("text");
|
|
535
|
+
insertNode(_el$40, _el$41);
|
|
536
|
+
insertNode(_el$40, _el$42);
|
|
537
|
+
setProp(_el$40, "marginLeft", 1);
|
|
538
|
+
setProp(_el$40, "flexDirection", "column");
|
|
539
|
+
insert(_el$41, () => `MCP: ${String(cfg().mcpCount)} Plugins: ${String(cfg().pluginCount)}`);
|
|
540
|
+
insert(_el$42, () => `Auto-compaction: ${cfg().autoCompaction ? "ON" : "OFF"}`);
|
|
423
541
|
effect((_p$) => {
|
|
424
542
|
var _v$14 = theme().textMuted, _v$15 = theme().textMuted;
|
|
425
|
-
_v$14 !== _p$.e && (_p$.e = setProp(_el$
|
|
426
|
-
_v$15 !== _p$.t && (_p$.t = setProp(_el$
|
|
543
|
+
_v$14 !== _p$.e && (_p$.e = setProp(_el$41, "fg", _v$14, _p$.e));
|
|
544
|
+
_v$15 !== _p$.t && (_p$.t = setProp(_el$42, "fg", _v$15, _p$.t));
|
|
427
545
|
return _p$;
|
|
428
546
|
}, {
|
|
429
547
|
e: void 0,
|
|
430
548
|
t: void 0
|
|
431
549
|
});
|
|
432
|
-
return _el$
|
|
550
|
+
return _el$40;
|
|
433
551
|
})()
|
|
434
552
|
});
|
|
435
553
|
}
|
|
436
554
|
}), _el$25);
|
|
437
555
|
insertNode(_el$25, _el$26);
|
|
438
556
|
setProp(_el$25, "marginTop", 1);
|
|
439
|
-
insert(_el$26, () =>
|
|
557
|
+
insert(_el$26, (() => {
|
|
558
|
+
var _c$ = memo(() => memoryCount() !== null);
|
|
559
|
+
return () => _c$() ? `Memory: ${fmtInt(memoryCount())} entries` : "Memory: N/A";
|
|
560
|
+
})());
|
|
440
561
|
effect((_p$) => {
|
|
441
562
|
var _v$3 = theme().accent, _v$4 = theme().text, _v$5 = theme().textMuted, _v$6 = theme().text, _v$7 = theme().textMuted, _v$8 = theme().text, _v$9 = theme().textMuted, _v$0 = theme().text, _v$1 = theme().textMuted;
|
|
442
|
-
_v$3 !== _p$.e && (_p$.e = setProp(_el$
|
|
443
|
-
_v$4 !== _p$.t && (_p$.t = setProp(_el$
|
|
444
|
-
_v$5 !== _p$.a && (_p$.a = setProp(_el$
|
|
563
|
+
_v$3 !== _p$.e && (_p$.e = setProp(_el$10, "fg", _v$3, _p$.e));
|
|
564
|
+
_v$4 !== _p$.t && (_p$.t = setProp(_el$12, "fg", _v$4, _p$.t));
|
|
565
|
+
_v$5 !== _p$.a && (_p$.a = setProp(_el$13, "fg", _v$5, _p$.a));
|
|
445
566
|
_v$6 !== _p$.o && (_p$.o = setProp(_el$16, "fg", _v$6, _p$.o));
|
|
446
567
|
_v$7 !== _p$.i && (_p$.i = setProp(_el$17, "fg", _v$7, _p$.i));
|
|
447
568
|
_v$8 !== _p$.n && (_p$.n = setProp(_el$20, "fg", _v$8, _p$.n));
|
|
@@ -460,36 +581,11 @@ function View(props) {
|
|
|
460
581
|
h: void 0,
|
|
461
582
|
r: void 0
|
|
462
583
|
});
|
|
463
|
-
return _el$
|
|
584
|
+
return _el$1;
|
|
464
585
|
})();
|
|
465
586
|
}
|
|
466
587
|
const tui = async (api, _options, _meta) => {
|
|
467
|
-
|
|
468
|
-
try {
|
|
469
|
-
const wt = api.state.path?.worktree ?? "";
|
|
470
|
-
const fp = wt ? `${wt}/package.json` : "package.json";
|
|
471
|
-
const result = await api.client.file.read({ query: { path: fp } });
|
|
472
|
-
const match = String(result?.content ?? "").match(/"version":\s*"([^"]+)"/);
|
|
473
|
-
if (match?.[1]) version = match[1];
|
|
474
|
-
else throw new Error("no version in file");
|
|
475
|
-
} catch {
|
|
476
|
-
try {
|
|
477
|
-
const proc = api.client?.process;
|
|
478
|
-
if (typeof proc?.exec === "function") {
|
|
479
|
-
const r = await proc.exec({
|
|
480
|
-
command: "git",
|
|
481
|
-
args: [
|
|
482
|
-
"describe",
|
|
483
|
-
"--tags",
|
|
484
|
-
"--always"
|
|
485
|
-
],
|
|
486
|
-
timeoutMs: 3e3
|
|
487
|
-
});
|
|
488
|
-
const tag = (r.stdout ?? r.output ?? "").trim().replace(/^v/, "").replace(/-\d+-g[0-9a-f]+$/, "");
|
|
489
|
-
if (tag && tag !== "5.0.0") version = tag;
|
|
490
|
-
}
|
|
491
|
-
} catch {}
|
|
492
|
-
}
|
|
588
|
+
const version = await detectVersion(api);
|
|
493
589
|
api.slots.register({
|
|
494
590
|
order: 900,
|
|
495
591
|
slots: { sidebar_content(_ctx, props) {
|