@triedotdev/mcp 1.0.103 → 1.0.105
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.
|
@@ -1255,110 +1255,39 @@ import { join } from "path";
|
|
|
1255
1255
|
|
|
1256
1256
|
// src/cli/dashboard/components/Header.tsx
|
|
1257
1257
|
import { Box, Text } from "ink";
|
|
1258
|
-
|
|
1259
|
-
// src/cli/dashboard/theme.ts
|
|
1260
|
-
import pc2 from "picocolors";
|
|
1261
|
-
var colors = {
|
|
1262
|
-
border: (s) => pc2.cyan(s),
|
|
1263
|
-
header: (s) => pc2.bold(pc2.cyan(s)),
|
|
1264
|
-
brand: (s) => pc2.bold(pc2.cyan(s)),
|
|
1265
|
-
dim: (s) => pc2.dim(s),
|
|
1266
|
-
critical: (s) => pc2.bold(pc2.red(s)),
|
|
1267
|
-
serious: (s) => pc2.yellow(s),
|
|
1268
|
-
moderate: (s) => pc2.blue(s),
|
|
1269
|
-
low: (s) => pc2.dim(s),
|
|
1270
|
-
success: (s) => pc2.green(s),
|
|
1271
|
-
running: (s) => pc2.yellow(s),
|
|
1272
|
-
waiting: (s) => pc2.dim(s),
|
|
1273
|
-
alert: (s) => pc2.bold(pc2.red(s)),
|
|
1274
|
-
selected: (s) => pc2.bold(pc2.magenta(s)),
|
|
1275
|
-
highlight: (s) => pc2.bold(pc2.white(s)),
|
|
1276
|
-
yellow: (s) => pc2.yellow(s)
|
|
1277
|
-
};
|
|
1278
|
-
var WATCH_FRAMES = ["\u25D0", "\u25D3", "\u25D1", "\u25D2"];
|
|
1279
|
-
function formatTimeAgo(timestamp) {
|
|
1280
|
-
const seconds = Math.floor((Date.now() - timestamp) / 1e3);
|
|
1281
|
-
if (seconds < 10) return "just now";
|
|
1282
|
-
if (seconds < 60) return `${seconds}s ago`;
|
|
1283
|
-
const minutes = Math.floor(seconds / 60);
|
|
1284
|
-
if (minutes < 60) return `${minutes}m ago`;
|
|
1285
|
-
const hours = Math.floor(minutes / 60);
|
|
1286
|
-
return `${hours}h ago`;
|
|
1287
|
-
}
|
|
1288
|
-
function insightIcon(type) {
|
|
1289
|
-
switch (type) {
|
|
1290
|
-
case "warning":
|
|
1291
|
-
return { icon: "[!]", color: colors.critical };
|
|
1292
|
-
case "observation":
|
|
1293
|
-
return { icon: "[>]", color: colors.serious };
|
|
1294
|
-
case "suggestion":
|
|
1295
|
-
return { icon: "[?]", color: colors.highlight };
|
|
1296
|
-
case "celebration":
|
|
1297
|
-
return { icon: "[+]", color: colors.success };
|
|
1298
|
-
case "question":
|
|
1299
|
-
return { icon: "[?]", color: colors.moderate };
|
|
1300
|
-
default:
|
|
1301
|
-
return { icon: "[>]", color: colors.dim };
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
function progressBar(current, total, width = 10) {
|
|
1305
|
-
if (total <= 0) return colors.dim("[" + "\u2591".repeat(width) + "]");
|
|
1306
|
-
const progress = Math.min(1, current / total);
|
|
1307
|
-
const filled = Math.round(width * progress);
|
|
1308
|
-
const empty = width - filled;
|
|
1309
|
-
return colors.border("[") + colors.success("\u2588".repeat(filled)) + colors.dim("\u2591".repeat(empty)) + colors.border("]");
|
|
1310
|
-
}
|
|
1311
|
-
function stripEmojis(s) {
|
|
1312
|
-
return s.replace(/[\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{FE00}-\u{FE0F}\u{200D}\u{20E3}\u{FE0F}\u{E0020}-\u{E007F}]/gu, "").trim();
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
// src/cli/dashboard/components/Header.tsx
|
|
1316
1258
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
1317
1259
|
function Header() {
|
|
1318
1260
|
const { state } = useDashboard();
|
|
1319
|
-
const time = (/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", { hour12: false, hour: "2-digit", minute: "2-digit", second: "2-digit" });
|
|
1320
|
-
const frameIdx = Math.floor(Date.now() / 200) % WATCH_FRAMES.length;
|
|
1321
|
-
const spinner = WATCH_FRAMES[frameIdx] || "\u25D0";
|
|
1322
1261
|
const { signalExtraction, watch, alerts } = state;
|
|
1323
1262
|
const totalExtracted = signalExtraction.decisionsExtracted + signalExtraction.factsExtracted + signalExtraction.blockersExtracted + signalExtraction.questionsExtracted;
|
|
1324
1263
|
let statusLabel;
|
|
1325
1264
|
if (watch.watching) {
|
|
1326
1265
|
statusLabel = totalExtracted > 0 ? /* @__PURE__ */ jsxs(Text, { children: [
|
|
1327
|
-
/* @__PURE__ */
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
] }),
|
|
1266
|
+
/* @__PURE__ */ jsx2(Text, { color: "green", children: "\u25CF" }),
|
|
1267
|
+
" ",
|
|
1268
|
+
/* @__PURE__ */ jsx2(Text, { color: "green", bold: true, children: "Learning" }),
|
|
1331
1269
|
" ",
|
|
1332
1270
|
/* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
1333
1271
|
totalExtracted,
|
|
1334
1272
|
" signals"
|
|
1335
1273
|
] })
|
|
1336
1274
|
] }) : /* @__PURE__ */ jsxs(Text, { children: [
|
|
1337
|
-
/* @__PURE__ */
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
] }),
|
|
1341
|
-
" ",
|
|
1342
|
-
/* @__PURE__ */ jsx2(Text, { dimColor: true, children: "ready" })
|
|
1275
|
+
/* @__PURE__ */ jsx2(Text, { color: "green", children: "\u25CF" }),
|
|
1276
|
+
" ",
|
|
1277
|
+
/* @__PURE__ */ jsx2(Text, { bold: true, children: "Watching" })
|
|
1343
1278
|
] });
|
|
1344
1279
|
} else {
|
|
1345
|
-
statusLabel = /* @__PURE__ */
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
/* @__PURE__ */ jsxs(Box, { children: [
|
|
1354
|
-
/* @__PURE__ */ jsx2(Text, { color: "cyan", bold: true, children: "TRIE" }),
|
|
1355
|
-
watch.watching && /* @__PURE__ */ jsx2(Text, { dimColor: true, children: " [autonomous]" })
|
|
1356
|
-
] }),
|
|
1280
|
+
statusLabel = /* @__PURE__ */ jsxs(Text, { children: [
|
|
1281
|
+
/* @__PURE__ */ jsx2(Text, { dimColor: true, children: "\u25CB" }),
|
|
1282
|
+
" ",
|
|
1283
|
+
/* @__PURE__ */ jsx2(Text, { dimColor: true, children: "Idle" })
|
|
1284
|
+
] });
|
|
1285
|
+
}
|
|
1286
|
+
return /* @__PURE__ */ jsxs(Box, { paddingX: 1, justifyContent: "space-between", children: [
|
|
1287
|
+
/* @__PURE__ */ jsx2(Text, { color: "green", bold: true, children: "trie" }),
|
|
1357
1288
|
/* @__PURE__ */ jsxs(Box, { gap: 2, children: [
|
|
1358
1289
|
statusLabel,
|
|
1359
|
-
|
|
1360
|
-
alerts.hasCritical && /* @__PURE__ */ jsx2(Text, { color: "red", bold: true, children: "\u2502 ALERT: CRITICAL" }),
|
|
1361
|
-
/* @__PURE__ */ jsx2(Text, { dimColor: true, children: time })
|
|
1290
|
+
alerts.hasCritical && /* @__PURE__ */ jsx2(Text, { color: "red", bold: true, children: "\u25CF Alert" })
|
|
1362
1291
|
] })
|
|
1363
1292
|
] });
|
|
1364
1293
|
}
|
|
@@ -1374,82 +1303,39 @@ var VIEW_LABELS = {
|
|
|
1374
1303
|
hypotheses: "Hypotheses",
|
|
1375
1304
|
memory: "Memory"
|
|
1376
1305
|
};
|
|
1377
|
-
function Hint({ k, label }) {
|
|
1378
|
-
return /* @__PURE__ */ jsxs2(Text2, { children: [
|
|
1379
|
-
/* @__PURE__ */ jsx3(Text2, { color: "cyan", children: "[" }),
|
|
1380
|
-
/* @__PURE__ */ jsx3(Text2, { bold: true, children: k }),
|
|
1381
|
-
/* @__PURE__ */ jsx3(Text2, { color: "cyan", children: "]" }),
|
|
1382
|
-
/* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
|
|
1383
|
-
" ",
|
|
1384
|
-
label
|
|
1385
|
-
] })
|
|
1386
|
-
] });
|
|
1387
|
-
}
|
|
1388
1306
|
function Footer() {
|
|
1389
1307
|
const { state } = useDashboard();
|
|
1390
1308
|
const { view } = state;
|
|
1391
|
-
const
|
|
1392
|
-
|
|
1393
|
-
const label = VIEW_LABELS[v];
|
|
1394
|
-
return isActive ? /* @__PURE__ */ jsx3(Text2, { color: "cyan", bold: true, inverse: true, children: ` ${label} ` }, v) : /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: ` ${label} ` }, v);
|
|
1395
|
-
});
|
|
1396
|
-
let hints;
|
|
1309
|
+
const label = VIEW_LABELS[view];
|
|
1310
|
+
let contextHints;
|
|
1397
1311
|
if (view === "goals" && state.goalsPanel.inputMode === "add") {
|
|
1398
|
-
|
|
1399
|
-
/* @__PURE__ */ jsx3(Hint, { k: "Enter", label: "Save" }),
|
|
1400
|
-
/* @__PURE__ */ jsx3(Hint, { k: "Esc", label: "Cancel" })
|
|
1401
|
-
] });
|
|
1312
|
+
contextHints = "enter save \xB7 esc cancel";
|
|
1402
1313
|
} else if (view === "hypotheses" && state.hypothesesPanel.inputMode === "add") {
|
|
1403
|
-
|
|
1404
|
-
/* @__PURE__ */ jsx3(Hint, { k: "Enter", label: "Save" }),
|
|
1405
|
-
/* @__PURE__ */ jsx3(Hint, { k: "Esc", label: "Cancel" })
|
|
1406
|
-
] });
|
|
1314
|
+
contextHints = "enter save \xB7 esc cancel";
|
|
1407
1315
|
} else if (view === "goals") {
|
|
1408
|
-
|
|
1409
|
-
/* @__PURE__ */ jsx3(Hint, { k: "j/k", label: "Nav" }),
|
|
1410
|
-
/* @__PURE__ */ jsx3(Hint, { k: "a", label: "Add" }),
|
|
1411
|
-
/* @__PURE__ */ jsx3(Hint, { k: "Enter", label: "Complete" }),
|
|
1412
|
-
/* @__PURE__ */ jsx3(Hint, { k: "d", label: "Delete" })
|
|
1413
|
-
] });
|
|
1316
|
+
contextHints = "j/k nav \xB7 a add \xB7 enter complete \xB7 d delete";
|
|
1414
1317
|
} else if (view === "hypotheses") {
|
|
1415
|
-
|
|
1416
|
-
/* @__PURE__ */ jsx3(Hint, { k: "j/k", label: "Nav" }),
|
|
1417
|
-
/* @__PURE__ */ jsx3(Hint, { k: "a", label: "Add" }),
|
|
1418
|
-
/* @__PURE__ */ jsx3(Hint, { k: "v", label: "Validate" }),
|
|
1419
|
-
/* @__PURE__ */ jsx3(Hint, { k: "x", label: "Invalidate" })
|
|
1420
|
-
] });
|
|
1318
|
+
contextHints = "j/k nav \xB7 a add \xB7 v validate \xB7 x invalidate";
|
|
1421
1319
|
} else if (view === "agent") {
|
|
1422
|
-
|
|
1423
|
-
/* @__PURE__ */ jsx3(Hint, { k: "j/k", label: "Nav" }),
|
|
1424
|
-
/* @__PURE__ */ jsx3(Hint, { k: "Enter", label: "Expand" }),
|
|
1425
|
-
/* @__PURE__ */ jsx3(Hint, { k: "d", label: "Dismiss" }),
|
|
1426
|
-
/* @__PURE__ */ jsx3(Hint, { k: "i", label: "Ignore" }),
|
|
1427
|
-
/* @__PURE__ */ jsx3(Hint, { k: "x", label: "Clear" })
|
|
1428
|
-
] });
|
|
1320
|
+
contextHints = "j/k nav \xB7 enter expand \xB7 d dismiss";
|
|
1429
1321
|
} else if (view === "memory") {
|
|
1430
|
-
|
|
1431
|
-
/* @__PURE__ */ jsx3(Hint, { k: "j/k", label: "Nav" }),
|
|
1432
|
-
/* @__PURE__ */ jsx3(Hint, { k: "Enter", label: "Expand" }),
|
|
1433
|
-
/* @__PURE__ */ jsx3(Hint, { k: "b", label: "Back" })
|
|
1434
|
-
] });
|
|
1322
|
+
contextHints = "j/k nav \xB7 enter expand \xB7 b back";
|
|
1435
1323
|
} else if (view === "rawlog") {
|
|
1436
|
-
|
|
1437
|
-
/* @__PURE__ */ jsx3(Hint, { k: "n/p", label: "Pages" }),
|
|
1438
|
-
/* @__PURE__ */ jsx3(Hint, { k: "b", label: "Back" })
|
|
1439
|
-
] });
|
|
1324
|
+
contextHints = "n/p pages \xB7 b back";
|
|
1440
1325
|
} else {
|
|
1441
|
-
|
|
1442
|
-
/* @__PURE__ */ jsx3(Hint, { k: "Tab", label: "Views" }),
|
|
1443
|
-
/* @__PURE__ */ jsx3(Hint, { k: "n/p", label: "Pages" }),
|
|
1444
|
-
/* @__PURE__ */ jsx3(Hint, { k: "h", label: "Help" })
|
|
1445
|
-
] });
|
|
1326
|
+
contextHints = "n/p pages \xB7 h help";
|
|
1446
1327
|
}
|
|
1447
|
-
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
|
|
1448
|
-
/* @__PURE__ */
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1328
|
+
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", paddingX: 1, children: [
|
|
1329
|
+
/* @__PURE__ */ jsxs2(Box2, { justifyContent: "space-between", children: [
|
|
1330
|
+
/* @__PURE__ */ jsxs2(Text2, { children: [
|
|
1331
|
+
/* @__PURE__ */ jsx3(Text2, { color: "green", children: "\u25CF" }),
|
|
1332
|
+
" ",
|
|
1333
|
+
/* @__PURE__ */ jsx3(Text2, { color: "green", bold: true, children: label }),
|
|
1334
|
+
/* @__PURE__ */ jsx3(Text2, { dimColor: true, children: " (tab to cycle)" })
|
|
1335
|
+
] }),
|
|
1336
|
+
/* @__PURE__ */ jsx3(Text2, { dimColor: true, children: "q quit" })
|
|
1337
|
+
] }),
|
|
1338
|
+
/* @__PURE__ */ jsx3(Text2, { dimColor: true, children: contextHints })
|
|
1453
1339
|
] });
|
|
1454
1340
|
}
|
|
1455
1341
|
|
|
@@ -1569,181 +1455,172 @@ function ConfigDialog({ onClose }) {
|
|
|
1569
1455
|
}
|
|
1570
1456
|
});
|
|
1571
1457
|
const sectionTitle = section === "main" ? "TRIE AGENT CONFIGURATION" : section === "performance" ? "PERFORMANCE SETTINGS" : section === "riskThresholds" ? "RISK THRESHOLDS" : section === "agentSmith" ? "AGENT SMITH SETTINGS" : "CONFIGURATION";
|
|
1572
|
-
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", borderStyle: "round", borderColor: "
|
|
1573
|
-
/* @__PURE__ */ jsx5(Text4, {
|
|
1458
|
+
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, paddingY: 0, children: [
|
|
1459
|
+
/* @__PURE__ */ jsx5(Text4, { bold: true, children: sectionTitle }),
|
|
1574
1460
|
/* @__PURE__ */ jsx5(Text4, { children: " " }),
|
|
1575
1461
|
items.map((item, idx) => {
|
|
1576
1462
|
const isSelected = selectedIndex === idx;
|
|
1577
1463
|
return /* @__PURE__ */ jsxs4(Text4, { children: [
|
|
1578
|
-
isSelected ? /* @__PURE__ */
|
|
1464
|
+
isSelected ? /* @__PURE__ */ jsxs4(Text4, { bold: true, color: "green", children: [
|
|
1465
|
+
">",
|
|
1466
|
+
" "
|
|
1467
|
+
] }) : /* @__PURE__ */ jsx5(Text4, { children: " " }),
|
|
1579
1468
|
/* @__PURE__ */ jsxs4(Text4, { bold: isSelected, children: [
|
|
1580
1469
|
item.label,
|
|
1581
1470
|
": "
|
|
1582
1471
|
] }),
|
|
1583
1472
|
editing && isSelected ? /* @__PURE__ */ jsxs4(Text4, { children: [
|
|
1584
1473
|
editBuffer,
|
|
1585
|
-
/* @__PURE__ */ jsx5(Text4, { bold: true, color: "
|
|
1474
|
+
/* @__PURE__ */ jsx5(Text4, { bold: true, color: "green", children: "|" })
|
|
1586
1475
|
] }) : /* @__PURE__ */ jsx5(Text4, { dimColor: true, children: item.value })
|
|
1587
1476
|
] }, item.key);
|
|
1588
1477
|
}),
|
|
1589
1478
|
/* @__PURE__ */ jsx5(Text4, { children: " " }),
|
|
1590
|
-
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: section === "main" ? "
|
|
1479
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: section === "main" ? "enter select \xB7 esc close" : "enter edit \xB7 esc/b back" })
|
|
1591
1480
|
] });
|
|
1592
1481
|
}
|
|
1593
1482
|
|
|
1594
1483
|
// src/cli/dashboard/views/OverviewView.tsx
|
|
1595
1484
|
import { Box as Box5, Text as Text5 } from "ink";
|
|
1596
|
-
import {
|
|
1485
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1597
1486
|
function OverviewView() {
|
|
1598
1487
|
const { state } = useDashboard();
|
|
1599
1488
|
const { progress, signalExtraction, watch, issues, activityLog, activityPage } = state;
|
|
1600
|
-
const {
|
|
1489
|
+
const { totalIssues, processedFiles } = progress;
|
|
1601
1490
|
const endTime = state.scanComplete && state.scanEndTime ? state.scanEndTime : Date.now();
|
|
1602
1491
|
const elapsed = ((endTime - state.scanStartTime) / 1e3).toFixed(1);
|
|
1603
|
-
const totalExtracted = signalExtraction.decisionsExtracted + signalExtraction.factsExtracted + signalExtraction.blockersExtracted + signalExtraction.questionsExtracted;
|
|
1604
1492
|
const criticalIssues = issues.filter((i) => i.severity === "critical").slice(0, 3);
|
|
1605
1493
|
const activityRows = 8;
|
|
1606
1494
|
const startIdx = activityPage * activityRows;
|
|
1607
1495
|
const pageActivities = activityLog.slice(startIdx, startIdx + activityRows);
|
|
1608
1496
|
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 1, children: [
|
|
1609
1497
|
/* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1498
|
+
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: "\u25CF" }),
|
|
1499
|
+
" Scanned ",
|
|
1610
1500
|
/* @__PURE__ */ jsx6(Text5, { bold: true, children: processedFiles }),
|
|
1501
|
+
" files ",
|
|
1611
1502
|
/* @__PURE__ */ jsxs5(Text5, { dimColor: true, children: [
|
|
1612
|
-
" files scanned in ",
|
|
1613
1503
|
elapsed,
|
|
1614
1504
|
"s"
|
|
1615
1505
|
] })
|
|
1616
1506
|
] }),
|
|
1617
|
-
watch.watching && /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
1507
|
+
watch.watching && signalExtraction.enabled && /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
1618
1508
|
/* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1619
|
-
|
|
1620
|
-
" Signal extraction
|
|
1621
|
-
"
|
|
1622
|
-
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: signalExtraction.enabled ? "enabled" : "limited (set ANTHROPIC_API_KEY)" })
|
|
1509
|
+
/* @__PURE__ */ jsx6(Text5, { color: "green", children: "\u25CF" }),
|
|
1510
|
+
" Signal extraction ",
|
|
1511
|
+
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: "enabled" })
|
|
1623
1512
|
] }),
|
|
1624
|
-
|
|
1625
|
-
"
|
|
1626
|
-
|
|
1627
|
-
"
|
|
1628
|
-
signalExtraction.
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
/* @__PURE__ */ jsx6(Text5, { color: "cyan", bold: true, children: "SUMMARY" }),
|
|
1637
|
-
/* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
1638
|
-
/* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1639
|
-
/* @__PURE__ */ jsxs5(Text5, { color: "red", bold: true, children: [
|
|
1640
|
-
"[!] ",
|
|
1641
|
-
String(issuesBySeverity.critical).padStart(4),
|
|
1642
|
-
" Critical issues"
|
|
1643
|
-
] }),
|
|
1644
|
-
issuesBySeverity.critical > 0 && /* @__PURE__ */ jsxs5(Text5, { color: "red", bold: true, children: [
|
|
1645
|
-
" ",
|
|
1646
|
-
"<-",
|
|
1647
|
-
" FIX NOW"
|
|
1648
|
-
] })
|
|
1649
|
-
] }),
|
|
1650
|
-
/* @__PURE__ */ jsxs5(Text5, { color: "yellow", children: [
|
|
1651
|
-
"[x] ",
|
|
1652
|
-
String(issuesBySeverity.serious).padStart(4),
|
|
1653
|
-
" Serious issues"
|
|
1654
|
-
] }),
|
|
1655
|
-
/* @__PURE__ */ jsxs5(Text5, { color: "blue", children: [
|
|
1656
|
-
"[~] ",
|
|
1657
|
-
String(issuesBySeverity.moderate).padStart(4),
|
|
1658
|
-
" Moderate issues"
|
|
1659
|
-
] }),
|
|
1660
|
-
/* @__PURE__ */ jsxs5(Text5, { dimColor: true, children: [
|
|
1661
|
-
"[-] ",
|
|
1662
|
-
String(issuesBySeverity.low).padStart(4),
|
|
1663
|
-
" Low issues"
|
|
1664
|
-
] })
|
|
1665
|
-
] })
|
|
1666
|
-
] }),
|
|
1667
|
-
watch.watching && signalExtraction.enabled && /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1668
|
-
/* @__PURE__ */ jsx6(Text5, { children: " " }),
|
|
1669
|
-
/* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
1670
|
-
/* @__PURE__ */ jsx6(Text5, { color: "cyan", bold: true, children: "DECISION LEDGER" }),
|
|
1671
|
-
/* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1672
|
-
/* @__PURE__ */ jsx6(Text5, { bold: true, children: "Agent Learning" }),
|
|
1673
|
-
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " - Building institutional knowledge" })
|
|
1674
|
-
] }),
|
|
1675
|
-
/* @__PURE__ */ jsx6(Text5, { children: " " }),
|
|
1676
|
-
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: "Signals Extracted:" }),
|
|
1677
|
-
/* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1678
|
-
" ",
|
|
1679
|
-
/* @__PURE__ */ jsx6(Text5, { bold: true, children: signalExtraction.decisionsExtracted }),
|
|
1680
|
-
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " decisions" })
|
|
1681
|
-
] }),
|
|
1682
|
-
/* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1683
|
-
" ",
|
|
1684
|
-
/* @__PURE__ */ jsx6(Text5, { bold: true, children: signalExtraction.factsExtracted }),
|
|
1685
|
-
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " facts" })
|
|
1686
|
-
] }),
|
|
1687
|
-
/* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1688
|
-
" ",
|
|
1689
|
-
/* @__PURE__ */ jsx6(Text5, { bold: true, children: signalExtraction.blockersExtracted }),
|
|
1690
|
-
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " blockers" })
|
|
1691
|
-
] }),
|
|
1692
|
-
/* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1693
|
-
" ",
|
|
1694
|
-
/* @__PURE__ */ jsx6(Text5, { bold: true, children: signalExtraction.questionsExtracted }),
|
|
1695
|
-
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " questions" })
|
|
1696
|
-
] }),
|
|
1697
|
-
/* @__PURE__ */ jsx6(Text5, { children: " " }),
|
|
1698
|
-
/* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1699
|
-
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: "Use " }),
|
|
1700
|
-
/* @__PURE__ */ jsx6(Text5, { bold: true, children: "trie gotcha" }),
|
|
1701
|
-
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " to query the ledger" })
|
|
1702
|
-
] })
|
|
1513
|
+
(signalExtraction.decisionsExtracted > 0 || signalExtraction.factsExtracted > 0 || signalExtraction.blockersExtracted > 0) && /* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1514
|
+
" ",
|
|
1515
|
+
/* @__PURE__ */ jsx6(Text5, { color: "green", children: "\u25CB" }),
|
|
1516
|
+
" ",
|
|
1517
|
+
/* @__PURE__ */ jsx6(Text5, { bold: true, children: signalExtraction.decisionsExtracted }),
|
|
1518
|
+
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " decisions" }),
|
|
1519
|
+
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " \xB7 " }),
|
|
1520
|
+
/* @__PURE__ */ jsx6(Text5, { bold: true, children: signalExtraction.factsExtracted }),
|
|
1521
|
+
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " facts" }),
|
|
1522
|
+
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " \xB7 " }),
|
|
1523
|
+
/* @__PURE__ */ jsx6(Text5, { bold: true, children: signalExtraction.blockersExtracted }),
|
|
1524
|
+
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " blockers" })
|
|
1703
1525
|
] })
|
|
1704
1526
|
] }),
|
|
1705
|
-
criticalIssues.length > 0 && /* @__PURE__ */ jsxs5(
|
|
1527
|
+
criticalIssues.length > 0 && /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
1706
1528
|
/* @__PURE__ */ jsx6(Text5, { children: " " }),
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
lineNum
|
|
1723
|
-
] })
|
|
1724
|
-
] }, i);
|
|
1725
|
-
})
|
|
1726
|
-
] })
|
|
1529
|
+
criticalIssues.map((issue, i) => {
|
|
1530
|
+
const filename = issue.file.split("/").pop() || issue.file;
|
|
1531
|
+
const lineNum = issue.line ? `:${issue.line}` : "";
|
|
1532
|
+
const desc = issue.issue.slice(0, 50) + (issue.issue.length > 50 ? "..." : "");
|
|
1533
|
+
return /* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1534
|
+
/* @__PURE__ */ jsx6(Text5, { color: "red", children: "\u25CF" }),
|
|
1535
|
+
" ",
|
|
1536
|
+
/* @__PURE__ */ jsx6(Text5, { color: "red", children: desc }),
|
|
1537
|
+
/* @__PURE__ */ jsxs5(Text5, { dimColor: true, children: [
|
|
1538
|
+
" ",
|
|
1539
|
+
filename,
|
|
1540
|
+
lineNum
|
|
1541
|
+
] })
|
|
1542
|
+
] }, i);
|
|
1543
|
+
})
|
|
1727
1544
|
] }),
|
|
1728
|
-
totalIssues === 0 && criticalIssues.length === 0 && /* @__PURE__ */ jsxs5(
|
|
1729
|
-
/* @__PURE__ */ jsx6(Text5, {
|
|
1730
|
-
|
|
1545
|
+
totalIssues === 0 && criticalIssues.length === 0 && /* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1546
|
+
/* @__PURE__ */ jsx6(Text5, { color: "green", children: "\u25CF" }),
|
|
1547
|
+
" No issues found"
|
|
1731
1548
|
] }),
|
|
1732
1549
|
/* @__PURE__ */ jsx6(Text5, { children: " " }),
|
|
1733
1550
|
/* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
1734
|
-
/* @__PURE__ */ jsx6(Text5, {
|
|
1551
|
+
/* @__PURE__ */ jsx6(Text5, { bold: true, children: "Activity" }),
|
|
1735
1552
|
pageActivities.map((entry, i) => /* @__PURE__ */ jsxs5(Text5, { children: [
|
|
1736
|
-
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: entry.time }),
|
|
1737
1553
|
" ",
|
|
1738
|
-
|
|
1554
|
+
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: "\u25CF" }),
|
|
1555
|
+
" ",
|
|
1556
|
+
entry.message,
|
|
1557
|
+
" ",
|
|
1558
|
+
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: entry.time })
|
|
1739
1559
|
] }, i)),
|
|
1740
|
-
pageActivities.length === 0 && /* @__PURE__ */ jsx6(Text5, { dimColor: true, children: "No activity yet." })
|
|
1560
|
+
pageActivities.length === 0 && /* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " No activity yet." })
|
|
1741
1561
|
] })
|
|
1742
1562
|
] });
|
|
1743
1563
|
}
|
|
1744
1564
|
|
|
1745
1565
|
// src/cli/dashboard/views/AgentView.tsx
|
|
1746
1566
|
import { Box as Box6, Text as Text6, useInput as useInput2 } from "ink";
|
|
1567
|
+
|
|
1568
|
+
// src/cli/dashboard/theme.ts
|
|
1569
|
+
import pc2 from "picocolors";
|
|
1570
|
+
var colors = {
|
|
1571
|
+
border: (s) => pc2.dim(s),
|
|
1572
|
+
header: (s) => pc2.bold(pc2.white(s)),
|
|
1573
|
+
brand: (s) => pc2.bold(pc2.green(s)),
|
|
1574
|
+
dim: (s) => pc2.dim(s),
|
|
1575
|
+
critical: (s) => pc2.bold(pc2.red(s)),
|
|
1576
|
+
serious: (s) => pc2.yellow(s),
|
|
1577
|
+
moderate: (s) => pc2.blue(s),
|
|
1578
|
+
low: (s) => pc2.dim(s),
|
|
1579
|
+
success: (s) => pc2.green(s),
|
|
1580
|
+
running: (s) => pc2.yellow(s),
|
|
1581
|
+
waiting: (s) => pc2.dim(s),
|
|
1582
|
+
alert: (s) => pc2.bold(pc2.red(s)),
|
|
1583
|
+
selected: (s) => pc2.bold(pc2.green(s)),
|
|
1584
|
+
highlight: (s) => pc2.bold(pc2.white(s)),
|
|
1585
|
+
yellow: (s) => pc2.yellow(s)
|
|
1586
|
+
};
|
|
1587
|
+
function formatTimeAgo(timestamp) {
|
|
1588
|
+
const seconds = Math.floor((Date.now() - timestamp) / 1e3);
|
|
1589
|
+
if (seconds < 10) return "just now";
|
|
1590
|
+
if (seconds < 60) return `${seconds}s ago`;
|
|
1591
|
+
const minutes = Math.floor(seconds / 60);
|
|
1592
|
+
if (minutes < 60) return `${minutes}m ago`;
|
|
1593
|
+
const hours = Math.floor(minutes / 60);
|
|
1594
|
+
return `${hours}h ago`;
|
|
1595
|
+
}
|
|
1596
|
+
function insightIcon(type) {
|
|
1597
|
+
switch (type) {
|
|
1598
|
+
case "warning":
|
|
1599
|
+
return { icon: "\u25CF", color: colors.critical };
|
|
1600
|
+
case "observation":
|
|
1601
|
+
return { icon: "\u25CB", color: colors.serious };
|
|
1602
|
+
case "suggestion":
|
|
1603
|
+
return { icon: "\u25CB", color: colors.highlight };
|
|
1604
|
+
case "celebration":
|
|
1605
|
+
return { icon: "\u25CF", color: colors.success };
|
|
1606
|
+
case "question":
|
|
1607
|
+
return { icon: "\u25CB", color: colors.moderate };
|
|
1608
|
+
default:
|
|
1609
|
+
return { icon: "\u25CB", color: colors.dim };
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
function progressBar(current, total, width = 10) {
|
|
1613
|
+
if (total <= 0) return colors.dim("\u2591".repeat(width));
|
|
1614
|
+
const progress = Math.min(1, current / total);
|
|
1615
|
+
const filled = Math.round(width * progress);
|
|
1616
|
+
const empty = width - filled;
|
|
1617
|
+
return colors.success("\u2588".repeat(filled)) + colors.dim("\u2591".repeat(empty));
|
|
1618
|
+
}
|
|
1619
|
+
function stripEmojis(s) {
|
|
1620
|
+
return s.replace(/[\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{FE00}-\u{FE0F}\u{200D}\u{20E3}\u{FE0F}\u{E0020}-\u{E007F}]/gu, "").trim();
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
// src/cli/dashboard/views/AgentView.tsx
|
|
1747
1624
|
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1748
1625
|
function AgentView() {
|
|
1749
1626
|
const { state, dispatch } = useDashboard();
|
|
@@ -1769,68 +1646,53 @@ function AgentView() {
|
|
|
1769
1646
|
const agency = agencyStatus;
|
|
1770
1647
|
return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", paddingX: 1, children: [
|
|
1771
1648
|
/* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1772
|
-
/* @__PURE__ */ jsx7(Text6, {
|
|
1773
|
-
activeCount > 0 ? /* @__PURE__ */ jsxs6(Text6, {
|
|
1774
|
-
"
|
|
1649
|
+
/* @__PURE__ */ jsx7(Text6, { bold: true, children: "Agent Insights" }),
|
|
1650
|
+
activeCount > 0 ? /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1651
|
+
" ",
|
|
1775
1652
|
activeCount,
|
|
1776
|
-
" active
|
|
1653
|
+
" active"
|
|
1777
1654
|
] }) : /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1778
|
-
"
|
|
1655
|
+
" ",
|
|
1779
1656
|
totalInsights,
|
|
1780
|
-
" total
|
|
1781
|
-
] })
|
|
1782
|
-
" ",
|
|
1783
|
-
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "Your autonomous code companion" })
|
|
1657
|
+
" total"
|
|
1658
|
+
] })
|
|
1784
1659
|
] }),
|
|
1785
|
-
agency && /* @__PURE__ */ jsxs6(
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
" ",
|
|
1802
|
-
/* @__PURE__ */ jsx7(Text6, { color: agency.riskLevel === "critical" ? "red" : agency.riskLevel === "high" ? "yellow" : agency.riskLevel === "medium" ? "yellow" : "green", children: agency.riskLevel.toUpperCase() })
|
|
1803
|
-
] }),
|
|
1804
|
-
/* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1805
|
-
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "Effect:" }),
|
|
1806
|
-
" ",
|
|
1807
|
-
/* @__PURE__ */ jsxs6(Text6, { color: agency.effectiveness >= 80 ? "green" : agency.effectiveness >= 50 ? "yellow" : "yellow", children: [
|
|
1808
|
-
agency.effectiveness,
|
|
1809
|
-
"%"
|
|
1810
|
-
] })
|
|
1811
|
-
] }),
|
|
1812
|
-
agency.isQuietHours && /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "[quiet]" })
|
|
1660
|
+
agency && /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1661
|
+
"Goals ",
|
|
1662
|
+
agency.goals.active,
|
|
1663
|
+
"/",
|
|
1664
|
+
agency.goals.completed + agency.goals.active,
|
|
1665
|
+
" \xB7 ",
|
|
1666
|
+
"Hypo ",
|
|
1667
|
+
agency.hypotheses.testing,
|
|
1668
|
+
" testing",
|
|
1669
|
+
" \xB7 ",
|
|
1670
|
+
"Risk ",
|
|
1671
|
+
agency.riskLevel,
|
|
1672
|
+
" \xB7 ",
|
|
1673
|
+
agency.effectiveness,
|
|
1674
|
+
"% effective",
|
|
1675
|
+
agency.isQuietHours ? " \xB7 quiet" : ""
|
|
1813
1676
|
] }),
|
|
1814
1677
|
/* @__PURE__ */ jsx7(Text6, { children: " " }),
|
|
1815
1678
|
visibleInsights.length === 0 && state.notificationHistory.length === 0 ? /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
1816
|
-
/* @__PURE__ */
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " \u2022 Speaks conversationally about what matters" }),
|
|
1821
|
-
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " \u2022 Suggests specific actions to take" }),
|
|
1822
|
-
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " \u2022 Celebrates when you fix issues" }),
|
|
1823
|
-
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " \u2022 Tracks patterns over time" }),
|
|
1679
|
+
/* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1680
|
+
/* @__PURE__ */ jsx7(Text6, { color: "green", children: "\u25CF" }),
|
|
1681
|
+
" The Trie Agent is watching over your code."
|
|
1682
|
+
] }),
|
|
1824
1683
|
/* @__PURE__ */ jsx7(Text6, { children: " " }),
|
|
1825
|
-
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "
|
|
1684
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " Synthesizes insights from all skills" }),
|
|
1685
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " Suggests specific actions to take" }),
|
|
1686
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " Tracks patterns over time" }),
|
|
1826
1687
|
/* @__PURE__ */ jsx7(Text6, { children: " " }),
|
|
1827
1688
|
isAIAvailable() ? /* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1828
|
-
/* @__PURE__ */ jsx7(Text6, { color: "green", children: "
|
|
1689
|
+
/* @__PURE__ */ jsx7(Text6, { color: "green", children: "\u25CF" }),
|
|
1829
1690
|
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " AI-enhanced insights enabled" })
|
|
1830
1691
|
] }) : /* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1831
|
-
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "
|
|
1692
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "\u25CB" }),
|
|
1693
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " Set " }),
|
|
1832
1694
|
/* @__PURE__ */ jsx7(Text6, { bold: true, children: "ANTHROPIC_API_KEY" }),
|
|
1833
|
-
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " for AI
|
|
1695
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " for AI insights" })
|
|
1834
1696
|
] })
|
|
1835
1697
|
] }) : /* @__PURE__ */ jsx7(Box6, { flexDirection: "column", children: visibleInsights.map((insight, idx) => {
|
|
1836
1698
|
const isSelected = idx === selectedInsight;
|
|
@@ -1838,66 +1700,47 @@ function AgentView() {
|
|
|
1838
1700
|
const ago = formatTimeAgo(insight.timestamp);
|
|
1839
1701
|
const { icon, color } = insightIcon(insight.type);
|
|
1840
1702
|
const cleanMessage = stripEmojis(insight.message);
|
|
1841
|
-
const msgMaxLen =
|
|
1703
|
+
const msgMaxLen = 65;
|
|
1842
1704
|
const msg = cleanMessage.length > msgMaxLen ? cleanMessage.slice(0, msgMaxLen - 3) + "..." : cleanMessage;
|
|
1843
|
-
const status = isExpanded ? "v" : ">";
|
|
1844
1705
|
return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", marginBottom: 1, children: [
|
|
1845
1706
|
/* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1846
|
-
isSelected ? /* @__PURE__ */
|
|
1847
|
-
|
|
1848
|
-
status,
|
|
1707
|
+
isSelected ? /* @__PURE__ */ jsxs6(Text6, { bold: true, color: "green", children: [
|
|
1708
|
+
">",
|
|
1849
1709
|
" "
|
|
1850
|
-
] }),
|
|
1851
|
-
isSelected ? /* @__PURE__ */
|
|
1852
|
-
icon,
|
|
1710
|
+
] }) : /* @__PURE__ */ jsx7(Text6, { children: " " }),
|
|
1711
|
+
isSelected ? /* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1712
|
+
/* @__PURE__ */ jsx7(Text6, { color: "green", children: icon }),
|
|
1713
|
+
" ",
|
|
1714
|
+
/* @__PURE__ */ jsx7(Text6, { bold: true, children: msg })
|
|
1715
|
+
] }) : /* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1716
|
+
color(icon),
|
|
1853
1717
|
" ",
|
|
1854
1718
|
color(msg)
|
|
1719
|
+
] }),
|
|
1720
|
+
/* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1721
|
+
" ",
|
|
1722
|
+
insight.category,
|
|
1723
|
+
" \xB7 ",
|
|
1724
|
+
ago
|
|
1855
1725
|
] })
|
|
1856
1726
|
] }),
|
|
1857
|
-
/* @__PURE__ */ jsxs6(
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
isSelected && !isExpanded ? " \u2022 Press Enter to expand" : ""
|
|
1863
|
-
] }),
|
|
1864
|
-
isExpanded && insight.details && /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", marginLeft: 7, children: [
|
|
1865
|
-
insight.details.issueBreakdown && Object.keys(insight.details.issueBreakdown).length > 0 && /* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1866
|
-
insight.details.issueBreakdown["critical"] ? /* @__PURE__ */ jsxs6(Text6, { color: "red", children: [
|
|
1867
|
-
insight.details.issueBreakdown["critical"],
|
|
1868
|
-
" critical"
|
|
1869
|
-
] }) : null,
|
|
1870
|
-
insight.details.issueBreakdown["serious"] ? /* @__PURE__ */ jsxs6(Text6, { color: "yellow", children: [
|
|
1871
|
-
" \u2022 ",
|
|
1872
|
-
insight.details.issueBreakdown["serious"],
|
|
1873
|
-
" serious"
|
|
1874
|
-
] }) : null,
|
|
1875
|
-
insight.details.issueBreakdown["moderate"] ? /* @__PURE__ */ jsxs6(Text6, { color: "blue", children: [
|
|
1876
|
-
" \u2022 ",
|
|
1877
|
-
insight.details.issueBreakdown["moderate"],
|
|
1878
|
-
" moderate"
|
|
1879
|
-
] }) : null
|
|
1727
|
+
isExpanded && insight.details && /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", marginLeft: 4, children: [
|
|
1728
|
+
insight.details.issueBreakdown && Object.keys(insight.details.issueBreakdown).length > 0 && /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1729
|
+
insight.details.issueBreakdown["critical"] ? `${insight.details.issueBreakdown["critical"]} critical` : "",
|
|
1730
|
+
insight.details.issueBreakdown["serious"] ? ` \xB7 ${insight.details.issueBreakdown["serious"]} serious` : "",
|
|
1731
|
+
insight.details.issueBreakdown["moderate"] ? ` \xB7 ${insight.details.issueBreakdown["moderate"]} moderate` : ""
|
|
1880
1732
|
] }),
|
|
1881
1733
|
insight.details.affectedFiles && insight.details.affectedFiles.length > 0 && /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
1882
|
-
/* @__PURE__ */
|
|
1883
|
-
|
|
1884
|
-
" \u2022 ",
|
|
1734
|
+
insight.details.affectedFiles.slice(0, 5).map((f, fi) => /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1735
|
+
" ",
|
|
1885
1736
|
f
|
|
1886
1737
|
] }, fi)),
|
|
1887
|
-
insight.details.affectedFiles.length >
|
|
1888
|
-
"
|
|
1889
|
-
insight.details.affectedFiles.length -
|
|
1738
|
+
insight.details.affectedFiles.length > 5 && /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1739
|
+
" +",
|
|
1740
|
+
insight.details.affectedFiles.length - 5,
|
|
1890
1741
|
" more"
|
|
1891
1742
|
] })
|
|
1892
1743
|
] }),
|
|
1893
|
-
insight.details.examples && insight.details.examples.length > 0 && /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
1894
|
-
/* @__PURE__ */ jsx7(Text6, { color: "cyan", bold: true, children: "Examples:" }),
|
|
1895
|
-
insight.details.examples.slice(0, 5).map((ex, ei) => /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1896
|
-
" \u2022 ",
|
|
1897
|
-
ex.slice(0, 60),
|
|
1898
|
-
ex.length > 60 ? "..." : ""
|
|
1899
|
-
] }, ei))
|
|
1900
|
-
] }),
|
|
1901
1744
|
insight.details.comparison && /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1902
1745
|
insight.details.trend === "improving" ? "\u2193" : insight.details.trend === "worsening" ? "\u2191" : "\u2192",
|
|
1903
1746
|
" ",
|
|
@@ -1905,35 +1748,50 @@ function AgentView() {
|
|
|
1905
1748
|
] })
|
|
1906
1749
|
] }),
|
|
1907
1750
|
insight.suggestedAction && (isExpanded || isSelected) && /* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1908
|
-
"
|
|
1909
|
-
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "\u2192
|
|
1751
|
+
" ",
|
|
1752
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "\u2192" }),
|
|
1753
|
+
" ",
|
|
1910
1754
|
/* @__PURE__ */ jsx7(Text6, { bold: true, children: insight.suggestedAction })
|
|
1911
1755
|
] }),
|
|
1912
1756
|
insight.actionCommand && isExpanded && /* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1913
|
-
"
|
|
1914
|
-
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "$
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
isSelected && /* @__PURE__ */ jsx7(Text6, { bold: true, children: "[Enter to run]" })
|
|
1757
|
+
" ",
|
|
1758
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "$" }),
|
|
1759
|
+
" ",
|
|
1760
|
+
/* @__PURE__ */ jsx7(Text6, { color: "green", children: insight.actionCommand })
|
|
1918
1761
|
] })
|
|
1919
1762
|
] }, insight.id);
|
|
1920
1763
|
}) }),
|
|
1921
1764
|
/* @__PURE__ */ jsx7(Text6, { children: " " }),
|
|
1922
1765
|
/* @__PURE__ */ jsxs6(Box6, { gap: 2, children: [
|
|
1923
|
-
agentInsights.filter((i) => i.type === "warning").length > 0 && /* @__PURE__ */ jsxs6(Text6, {
|
|
1924
|
-
|
|
1925
|
-
"
|
|
1766
|
+
agentInsights.filter((i) => i.type === "warning").length > 0 && /* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1767
|
+
/* @__PURE__ */ jsx7(Text6, { color: "red", children: "\u25CF" }),
|
|
1768
|
+
" ",
|
|
1769
|
+
/* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1770
|
+
agentInsights.filter((i) => i.type === "warning").length,
|
|
1771
|
+
" warnings"
|
|
1772
|
+
] })
|
|
1926
1773
|
] }),
|
|
1927
|
-
agentInsights.filter((i) => i.type === "suggestion").length > 0 && /* @__PURE__ */ jsxs6(Text6, {
|
|
1928
|
-
|
|
1929
|
-
"
|
|
1774
|
+
agentInsights.filter((i) => i.type === "suggestion").length > 0 && /* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1775
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "\u25CB" }),
|
|
1776
|
+
" ",
|
|
1777
|
+
/* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1778
|
+
agentInsights.filter((i) => i.type === "suggestion").length,
|
|
1779
|
+
" suggestions"
|
|
1780
|
+
] })
|
|
1930
1781
|
] }),
|
|
1931
|
-
agentInsights.filter((i) => i.type === "celebration").length > 0 && /* @__PURE__ */ jsxs6(Text6, {
|
|
1932
|
-
|
|
1933
|
-
"
|
|
1782
|
+
agentInsights.filter((i) => i.type === "celebration").length > 0 && /* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1783
|
+
/* @__PURE__ */ jsx7(Text6, { color: "green", children: "\u25CF" }),
|
|
1784
|
+
" ",
|
|
1785
|
+
/* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
1786
|
+
agentInsights.filter((i) => i.type === "celebration").length,
|
|
1787
|
+
" wins"
|
|
1788
|
+
] })
|
|
1934
1789
|
] }),
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
|
|
1790
|
+
isAIAvailable() ? /* @__PURE__ */ jsxs6(Text6, { children: [
|
|
1791
|
+
/* @__PURE__ */ jsx7(Text6, { color: "green", children: "\u25CF" }),
|
|
1792
|
+
" ",
|
|
1793
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "AI" })
|
|
1794
|
+
] }) : /* @__PURE__ */ jsx7(Text6, { children: /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "\u25CB AI off" }) })
|
|
1937
1795
|
] })
|
|
1938
1796
|
] });
|
|
1939
1797
|
}
|
|
@@ -1941,7 +1799,7 @@ function AgentView() {
|
|
|
1941
1799
|
// src/cli/dashboard/views/GoalsView.tsx
|
|
1942
1800
|
import { useCallback } from "react";
|
|
1943
1801
|
import { Box as Box7, Text as Text7, useInput as useInput3 } from "ink";
|
|
1944
|
-
import { Fragment
|
|
1802
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1945
1803
|
function calculateGoalProgress(goal) {
|
|
1946
1804
|
if (goal.target <= 0) return 0;
|
|
1947
1805
|
const startValue = goal.startValue ?? goal.currentValue;
|
|
@@ -2070,74 +1928,75 @@ function GoalsView() {
|
|
|
2070
1928
|
});
|
|
2071
1929
|
return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", paddingX: 1, children: [
|
|
2072
1930
|
/* @__PURE__ */ jsxs7(Text7, { children: [
|
|
2073
|
-
/* @__PURE__ */ jsx8(Text7, {
|
|
1931
|
+
/* @__PURE__ */ jsx8(Text7, { bold: true, children: "Goals" }),
|
|
2074
1932
|
" ",
|
|
2075
1933
|
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "Track progress, achieve targets" })
|
|
2076
1934
|
] }),
|
|
2077
1935
|
/* @__PURE__ */ jsx8(Text7, { children: " " }),
|
|
2078
1936
|
goalsPanel.inputMode === "add" ? /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
2079
|
-
/* @__PURE__ */ jsxs7(Text7, { children: [
|
|
2080
|
-
/* @__PURE__ */ jsx8(Text7, { bold: true, children: "New goal:" }),
|
|
2081
|
-
" ",
|
|
1937
|
+
/* @__PURE__ */ jsx8(Box7, { borderStyle: "round", borderColor: "green", paddingX: 1, children: /* @__PURE__ */ jsxs7(Text7, { children: [
|
|
2082
1938
|
goalsPanel.inputBuffer,
|
|
2083
|
-
/* @__PURE__ */ jsx8(Text7, { bold: true, color: "
|
|
2084
|
-
] }),
|
|
2085
|
-
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children:
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "
|
|
2089
|
-
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "Press [a] to add your first goal, or wait for auto-generated goals." })
|
|
1939
|
+
/* @__PURE__ */ jsx8(Text7, { bold: true, color: "green", children: "|" })
|
|
1940
|
+
] }) }),
|
|
1941
|
+
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " enter save \xB7 esc cancel" })
|
|
1942
|
+
] }) : /* @__PURE__ */ jsx8(Fragment, { children: goalsPanel.goals.length === 0 ? /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
1943
|
+
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " No goals yet." }),
|
|
1944
|
+
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " Press a to add your first goal." })
|
|
2090
1945
|
] }) : /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
2091
1946
|
activeGoals.length > 0 && /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
2092
|
-
/* @__PURE__ */ jsx8(Text7, { bold: true, children: "Active:" }),
|
|
2093
1947
|
activeGoals.map((goal, idx) => {
|
|
2094
1948
|
const isSelected = goalsPanel.selectedIndex === idx;
|
|
2095
1949
|
const progress = calculateGoalProgress(goal);
|
|
2096
|
-
const bar = progressBar(progress, 100,
|
|
2097
|
-
const source = goal.autoGenerated ?
|
|
1950
|
+
const bar = progressBar(progress, 100, 8);
|
|
1951
|
+
const source = goal.autoGenerated ? "auto" : "manual";
|
|
2098
1952
|
return /* @__PURE__ */ jsxs7(Text7, { children: [
|
|
2099
|
-
isSelected ? /* @__PURE__ */
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
1953
|
+
isSelected ? /* @__PURE__ */ jsxs7(Text7, { bold: true, color: "green", children: [
|
|
1954
|
+
">",
|
|
1955
|
+
" "
|
|
1956
|
+
] }) : /* @__PURE__ */ jsx8(Text7, { children: " " }),
|
|
1957
|
+
/* @__PURE__ */ jsx8(Text7, { color: "green", children: "\u25CB" }),
|
|
2103
1958
|
" ",
|
|
2104
|
-
|
|
1959
|
+
goal.description.slice(0, 45),
|
|
1960
|
+
/* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
|
|
1961
|
+
" ",
|
|
1962
|
+
source,
|
|
1963
|
+
" ",
|
|
1964
|
+
bar,
|
|
1965
|
+
" ",
|
|
1966
|
+
progress,
|
|
1967
|
+
"%"
|
|
1968
|
+
] })
|
|
2105
1969
|
] }, goal.id);
|
|
2106
1970
|
}),
|
|
2107
1971
|
/* @__PURE__ */ jsx8(Text7, { children: " " })
|
|
2108
1972
|
] }),
|
|
2109
1973
|
achievedGoals.length > 0 && /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
2110
|
-
/* @__PURE__ */
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
" [+] ",
|
|
1974
|
+
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " Achieved" }),
|
|
1975
|
+
achievedGoals.slice(0, 5).map((g) => /* @__PURE__ */ jsxs7(Text7, { children: [
|
|
1976
|
+
" ",
|
|
1977
|
+
/* @__PURE__ */ jsx8(Text7, { color: "green", children: "\u25CF" }),
|
|
1978
|
+
" ",
|
|
2116
1979
|
g.description.slice(0, 50)
|
|
2117
1980
|
] }, g.id)),
|
|
2118
1981
|
achievedGoals.length > 5 && /* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
|
|
2119
|
-
"
|
|
1982
|
+
" +",
|
|
2120
1983
|
achievedGoals.length - 5,
|
|
2121
1984
|
" more"
|
|
2122
1985
|
] }),
|
|
2123
1986
|
/* @__PURE__ */ jsx8(Text7, { children: " " })
|
|
2124
1987
|
] }),
|
|
2125
1988
|
otherGoals.length > 0 && /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
2126
|
-
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "Other
|
|
2127
|
-
otherGoals.slice(0, 2).map((g) => {
|
|
2128
|
-
|
|
2129
|
-
|
|
1989
|
+
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " Other" }),
|
|
1990
|
+
otherGoals.slice(0, 2).map((g) => /* @__PURE__ */ jsxs7(Text7, { children: [
|
|
1991
|
+
" ",
|
|
1992
|
+
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "\u25CB" }),
|
|
1993
|
+
" ",
|
|
1994
|
+
g.description.slice(0, 50),
|
|
1995
|
+
/* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
|
|
2130
1996
|
" ",
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
/* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
|
|
2135
|
-
" (",
|
|
2136
|
-
g.status,
|
|
2137
|
-
")"
|
|
2138
|
-
] })
|
|
2139
|
-
] }, g.id);
|
|
2140
|
-
})
|
|
1997
|
+
g.status
|
|
1998
|
+
] })
|
|
1999
|
+
] }, g.id))
|
|
2141
2000
|
] })
|
|
2142
2001
|
] }) })
|
|
2143
2002
|
] });
|
|
@@ -2146,7 +2005,7 @@ function GoalsView() {
|
|
|
2146
2005
|
// src/cli/dashboard/views/HypothesesView.tsx
|
|
2147
2006
|
import { useCallback as useCallback2 } from "react";
|
|
2148
2007
|
import { Box as Box8, Text as Text8, useInput as useInput4 } from "ink";
|
|
2149
|
-
import { Fragment as
|
|
2008
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2150
2009
|
function HypothesesView() {
|
|
2151
2010
|
const { state, dispatch } = useDashboard();
|
|
2152
2011
|
const { hypothesesPanel } = state;
|
|
@@ -2251,80 +2110,69 @@ function HypothesesView() {
|
|
|
2251
2110
|
});
|
|
2252
2111
|
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", paddingX: 1, children: [
|
|
2253
2112
|
/* @__PURE__ */ jsxs8(Text8, { children: [
|
|
2254
|
-
/* @__PURE__ */ jsx9(Text8, {
|
|
2113
|
+
/* @__PURE__ */ jsx9(Text8, { bold: true, children: "Hypotheses" }),
|
|
2255
2114
|
" ",
|
|
2256
2115
|
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children: "Test theories about your codebase" })
|
|
2257
2116
|
] }),
|
|
2258
2117
|
/* @__PURE__ */ jsx9(Text8, { children: " " }),
|
|
2259
2118
|
hypothesesPanel.inputMode === "add" ? /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
2260
|
-
/* @__PURE__ */ jsxs8(Text8, { children: [
|
|
2261
|
-
/* @__PURE__ */ jsx9(Text8, { bold: true, children: "New hypothesis:" }),
|
|
2262
|
-
" ",
|
|
2119
|
+
/* @__PURE__ */ jsx9(Box8, { borderStyle: "round", borderColor: "green", paddingX: 1, children: /* @__PURE__ */ jsxs8(Text8, { children: [
|
|
2263
2120
|
hypothesesPanel.inputBuffer,
|
|
2264
|
-
/* @__PURE__ */ jsx9(Text8, { bold: true, color: "
|
|
2265
|
-
] }),
|
|
2266
|
-
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children:
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children: "
|
|
2270
|
-
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children: "Press [a] to add your first hypothesis." }),
|
|
2271
|
-
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children: "The agent will collect evidence and update confidence over time." })
|
|
2121
|
+
/* @__PURE__ */ jsx9(Text8, { bold: true, color: "green", children: "|" })
|
|
2122
|
+
] }) }),
|
|
2123
|
+
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " enter save \xB7 esc cancel" })
|
|
2124
|
+
] }) : /* @__PURE__ */ jsx9(Fragment2, { children: hypothesesPanel.hypotheses.length === 0 ? /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
2125
|
+
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " No hypotheses yet." }),
|
|
2126
|
+
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " Press a to add your first hypothesis." })
|
|
2272
2127
|
] }) : /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
2273
2128
|
testing.length > 0 && /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
2274
|
-
/* @__PURE__ */ jsx9(Text8, { bold: true, children: "Testing:" }),
|
|
2275
2129
|
testing.map((hypo, idx) => {
|
|
2276
2130
|
const isSelected = hypothesesPanel.selectedIndex === idx;
|
|
2277
2131
|
const conf = Math.round(hypo.confidence * 100);
|
|
2278
|
-
return /* @__PURE__ */
|
|
2279
|
-
/* @__PURE__ */ jsxs8(Text8, { children: [
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
conf,
|
|
2287
|
-
"%)"
|
|
2288
|
-
] })
|
|
2289
|
-
] }),
|
|
2132
|
+
return /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", children: /* @__PURE__ */ jsxs8(Text8, { children: [
|
|
2133
|
+
isSelected ? /* @__PURE__ */ jsxs8(Text8, { bold: true, color: "green", children: [
|
|
2134
|
+
">",
|
|
2135
|
+
" "
|
|
2136
|
+
] }) : /* @__PURE__ */ jsx9(Text8, { children: " " }),
|
|
2137
|
+
/* @__PURE__ */ jsx9(Text8, { color: "yellow", children: "\u25CB" }),
|
|
2138
|
+
" ",
|
|
2139
|
+
hypo.statement.slice(0, 50),
|
|
2290
2140
|
/* @__PURE__ */ jsxs8(Text8, { dimColor: true, children: [
|
|
2291
|
-
"
|
|
2141
|
+
" ",
|
|
2142
|
+
conf,
|
|
2143
|
+
"% \xB7 ",
|
|
2292
2144
|
hypo.evidenceCount,
|
|
2293
|
-
"
|
|
2145
|
+
" evidence"
|
|
2294
2146
|
] })
|
|
2295
|
-
] }, hypo.id);
|
|
2147
|
+
] }) }, hypo.id);
|
|
2296
2148
|
}),
|
|
2297
2149
|
/* @__PURE__ */ jsx9(Text8, { children: " " })
|
|
2298
2150
|
] }),
|
|
2299
2151
|
validated.length > 0 && /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
2300
|
-
/* @__PURE__ */
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
h.statement.slice(0, 50),
|
|
2307
|
-
'"'
|
|
2152
|
+
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " Validated" }),
|
|
2153
|
+
validated.slice(0, 3).map((h) => /* @__PURE__ */ jsxs8(Text8, { children: [
|
|
2154
|
+
" ",
|
|
2155
|
+
/* @__PURE__ */ jsx9(Text8, { color: "green", children: "\u25CF" }),
|
|
2156
|
+
" ",
|
|
2157
|
+
h.statement.slice(0, 50)
|
|
2308
2158
|
] }, h.id)),
|
|
2309
2159
|
validated.length > 3 && /* @__PURE__ */ jsxs8(Text8, { dimColor: true, children: [
|
|
2310
|
-
"
|
|
2160
|
+
" +",
|
|
2311
2161
|
validated.length - 3,
|
|
2312
2162
|
" more"
|
|
2313
2163
|
] }),
|
|
2314
2164
|
/* @__PURE__ */ jsx9(Text8, { children: " " })
|
|
2315
2165
|
] }),
|
|
2316
2166
|
invalidated.length > 0 && /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
2317
|
-
/* @__PURE__ */
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
'"'
|
|
2325
|
-
] }) }, h.id)),
|
|
2167
|
+
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " Invalidated" }),
|
|
2168
|
+
invalidated.slice(0, 2).map((h) => /* @__PURE__ */ jsxs8(Text8, { children: [
|
|
2169
|
+
" ",
|
|
2170
|
+
/* @__PURE__ */ jsx9(Text8, { color: "red", children: "\u25CF" }),
|
|
2171
|
+
" ",
|
|
2172
|
+
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children: h.statement.slice(0, 50) })
|
|
2173
|
+
] }, h.id)),
|
|
2326
2174
|
invalidated.length > 2 && /* @__PURE__ */ jsxs8(Text8, { dimColor: true, children: [
|
|
2327
|
-
"
|
|
2175
|
+
" +",
|
|
2328
2176
|
invalidated.length - 2,
|
|
2329
2177
|
" more"
|
|
2330
2178
|
] })
|
|
@@ -2390,40 +2238,58 @@ function MemoryTreeView() {
|
|
|
2390
2238
|
const sel = (nodeId) => selectedNode === nodeId;
|
|
2391
2239
|
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", paddingX: 1, children: [
|
|
2392
2240
|
/* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2393
|
-
/* @__PURE__ */ jsx10(Text9, {
|
|
2241
|
+
/* @__PURE__ */ jsx10(Text9, { bold: true, children: "Memory" }),
|
|
2394
2242
|
" ",
|
|
2395
2243
|
/* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
|
|
2396
|
-
"[",
|
|
2397
2244
|
totalIssues,
|
|
2398
|
-
" issues
|
|
2245
|
+
" issues"
|
|
2399
2246
|
] })
|
|
2400
2247
|
] }),
|
|
2401
2248
|
/* @__PURE__ */ jsx10(Text9, { children: " " }),
|
|
2402
|
-
!loaded ? /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "Loading memory data..." }) : issues.length === 0 && globalPatterns.length === 0 ? /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
|
|
2403
|
-
/* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "No issues in memory yet." }),
|
|
2404
|
-
/* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "Run a scan to populate the memory tree." })
|
|
2249
|
+
!loaded ? /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: " Loading memory data..." }) : issues.length === 0 && globalPatterns.length === 0 ? /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
|
|
2250
|
+
/* @__PURE__ */ jsx10(Text9, { dimColor: true, children: " No issues in memory yet." }),
|
|
2251
|
+
/* @__PURE__ */ jsx10(Text9, { dimColor: true, children: " Run a scan to populate the memory tree." })
|
|
2405
2252
|
] }) : /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
|
|
2406
2253
|
/* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2407
|
-
sel("severity") ? /* @__PURE__ */
|
|
2408
|
-
|
|
2254
|
+
sel("severity") ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "green", children: [
|
|
2255
|
+
">",
|
|
2256
|
+
" "
|
|
2257
|
+
] }) : /* @__PURE__ */ jsx10(Text9, { children: " " }),
|
|
2258
|
+
expandedNodes.has("severity") ? /* @__PURE__ */ jsx10(Text9, { color: "green", children: "\u25CF" }) : /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "\u25CB" }),
|
|
2409
2259
|
" ",
|
|
2410
|
-
sel("severity") ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "
|
|
2260
|
+
sel("severity") ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: "By Severity" }) : /* @__PURE__ */ jsx10(Text9, { bold: true, children: "By Severity" })
|
|
2411
2261
|
] }),
|
|
2412
2262
|
expandedNodes.has("severity") && ["critical", "serious", "moderate", "low"].map((sev) => {
|
|
2413
2263
|
const count = bySeverity[sev]?.length || 0;
|
|
2414
2264
|
const nodeId = `severity-${sev}`;
|
|
2415
2265
|
const barStr = severityBar(count, maxCount);
|
|
2416
|
-
const
|
|
2417
|
-
const
|
|
2418
|
-
const sevColor = isLow ? void 0 : sevColorMap[sev];
|
|
2419
|
-
const SevText = ({ children }) => isLow ? /* @__PURE__ */ jsx10(Text9, { dimColor: true, children }) : sevColor ? /* @__PURE__ */ jsx10(Text9, { color: sevColor, children }) : /* @__PURE__ */ jsx10(Text9, { children });
|
|
2266
|
+
const sevColorMap = { critical: "red", serious: "yellow", moderate: "blue", low: void 0 };
|
|
2267
|
+
const sevColor = sevColorMap[sev];
|
|
2420
2268
|
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
|
|
2421
2269
|
/* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2422
|
-
sel(nodeId) ? /* @__PURE__ */
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2270
|
+
sel(nodeId) ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "green", children: [
|
|
2271
|
+
">",
|
|
2272
|
+
" "
|
|
2273
|
+
] }) : /* @__PURE__ */ jsx10(Text9, { children: " " }),
|
|
2274
|
+
" ",
|
|
2275
|
+
sel(nodeId) ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "green", children: [
|
|
2276
|
+
sev,
|
|
2277
|
+
" (",
|
|
2278
|
+
count,
|
|
2279
|
+
")"
|
|
2280
|
+
] }) : sevColor ? /* @__PURE__ */ jsxs9(Text9, { color: sevColor, children: [
|
|
2281
|
+
sev,
|
|
2282
|
+
" (",
|
|
2283
|
+
count,
|
|
2284
|
+
")"
|
|
2285
|
+
] }) : /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
|
|
2286
|
+
sev,
|
|
2287
|
+
" (",
|
|
2288
|
+
count,
|
|
2289
|
+
")"
|
|
2290
|
+
] }),
|
|
2291
|
+
" ",
|
|
2292
|
+
sevColor ? /* @__PURE__ */ jsx10(Text9, { color: sevColor, children: barStr }) : /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: barStr })
|
|
2427
2293
|
] }),
|
|
2428
2294
|
expandedNodes.has(nodeId) && (bySeverity[sev] || []).slice(0, 5).map((issue, i) => {
|
|
2429
2295
|
const issueId = `severity-${sev}-${issue.id}`;
|
|
@@ -2431,81 +2297,102 @@ function MemoryTreeView() {
|
|
|
2431
2297
|
const line = issue.line ? `:${issue.line}` : "";
|
|
2432
2298
|
const desc = issue.issue.slice(0, 35) + (issue.issue.length > 35 ? "..." : "");
|
|
2433
2299
|
return /* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2434
|
-
sel(issueId) ? /* @__PURE__ */
|
|
2435
|
-
|
|
2436
|
-
|
|
2300
|
+
sel(issueId) ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "green", children: [
|
|
2301
|
+
">",
|
|
2302
|
+
" "
|
|
2303
|
+
] }) : /* @__PURE__ */ jsx10(Text9, { children: " " }),
|
|
2304
|
+
" ",
|
|
2437
2305
|
/* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
|
|
2438
2306
|
filename,
|
|
2439
2307
|
line
|
|
2440
2308
|
] }),
|
|
2441
|
-
"
|
|
2442
|
-
/* @__PURE__ */ jsx10(
|
|
2309
|
+
" ",
|
|
2310
|
+
/* @__PURE__ */ jsx10(Text9, { dimColor: true, children: desc })
|
|
2443
2311
|
] }, i);
|
|
2444
2312
|
})
|
|
2445
2313
|
] }, sev);
|
|
2446
2314
|
}),
|
|
2447
2315
|
/* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2448
|
-
sel("files") ? /* @__PURE__ */
|
|
2449
|
-
|
|
2316
|
+
sel("files") ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "green", children: [
|
|
2317
|
+
">",
|
|
2318
|
+
" "
|
|
2319
|
+
] }) : /* @__PURE__ */ jsx10(Text9, { children: " " }),
|
|
2320
|
+
expandedNodes.has("files") ? /* @__PURE__ */ jsx10(Text9, { color: "green", children: "\u25CF" }) : /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "\u25CB" }),
|
|
2450
2321
|
" ",
|
|
2451
|
-
sel("files") ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "
|
|
2322
|
+
sel("files") ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: "By File (Hot Spots)" }) : /* @__PURE__ */ jsx10(Text9, { bold: true, children: "By File (Hot Spots)" })
|
|
2452
2323
|
] }),
|
|
2453
|
-
expandedNodes.has("files") && sortedFiles.map(([file, fileIssues]
|
|
2324
|
+
expandedNodes.has("files") && sortedFiles.map(([file, fileIssues]) => {
|
|
2454
2325
|
const fileId = `file-${file}`;
|
|
2455
2326
|
const filename = file.split("/").pop() || file;
|
|
2456
2327
|
const count = fileIssues.length;
|
|
2457
|
-
const isLast = idx === sortedFiles.length - 1;
|
|
2458
2328
|
return /* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2459
|
-
sel(fileId) ? /* @__PURE__ */
|
|
2329
|
+
sel(fileId) ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "green", children: [
|
|
2330
|
+
">",
|
|
2331
|
+
" "
|
|
2332
|
+
] }) : /* @__PURE__ */ jsx10(Text9, { children: " " }),
|
|
2460
2333
|
" ",
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2334
|
+
sel(fileId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: filename }) : /* @__PURE__ */ jsx10(Text9, { children: filename }),
|
|
2335
|
+
/* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
|
|
2336
|
+
" (",
|
|
2337
|
+
count,
|
|
2338
|
+
")"
|
|
2339
|
+
] })
|
|
2464
2340
|
] }, file);
|
|
2465
2341
|
}),
|
|
2466
2342
|
/* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2467
|
-
sel("agents") ? /* @__PURE__ */
|
|
2468
|
-
|
|
2343
|
+
sel("agents") ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "green", children: [
|
|
2344
|
+
">",
|
|
2345
|
+
" "
|
|
2346
|
+
] }) : /* @__PURE__ */ jsx10(Text9, { children: " " }),
|
|
2347
|
+
expandedNodes.has("agents") ? /* @__PURE__ */ jsx10(Text9, { color: "green", children: "\u25CF" }) : /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "\u25CB" }),
|
|
2469
2348
|
" ",
|
|
2470
|
-
sel("agents") ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "
|
|
2349
|
+
sel("agents") ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: "By Agent" }) : /* @__PURE__ */ jsx10(Text9, { bold: true, children: "By Agent" })
|
|
2471
2350
|
] }),
|
|
2472
|
-
expandedNodes.has("agents") && sortedAgents.map(([agent, agentIssues]
|
|
2351
|
+
expandedNodes.has("agents") && sortedAgents.map(([agent, agentIssues]) => {
|
|
2473
2352
|
const agentId = `agent-${agent}`;
|
|
2474
|
-
const isLast = idx === sortedAgents.length - 1;
|
|
2475
2353
|
return /* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2476
|
-
sel(agentId) ? /* @__PURE__ */
|
|
2354
|
+
sel(agentId) ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "green", children: [
|
|
2355
|
+
">",
|
|
2356
|
+
" "
|
|
2357
|
+
] }) : /* @__PURE__ */ jsx10(Text9, { children: " " }),
|
|
2477
2358
|
" ",
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2359
|
+
sel(agentId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: agent }) : /* @__PURE__ */ jsx10(Text9, { children: agent }),
|
|
2360
|
+
/* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
|
|
2361
|
+
" (",
|
|
2362
|
+
agentIssues.length,
|
|
2363
|
+
")"
|
|
2364
|
+
] })
|
|
2481
2365
|
] }, agent);
|
|
2482
2366
|
}),
|
|
2483
2367
|
/* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2484
|
-
sel("patterns") ? /* @__PURE__ */
|
|
2485
|
-
|
|
2368
|
+
sel("patterns") ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "green", children: [
|
|
2369
|
+
">",
|
|
2370
|
+
" "
|
|
2371
|
+
] }) : /* @__PURE__ */ jsx10(Text9, { children: " " }),
|
|
2372
|
+
expandedNodes.has("patterns") ? /* @__PURE__ */ jsx10(Text9, { color: "green", children: "\u25CF" }) : /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "\u25CB" }),
|
|
2486
2373
|
" ",
|
|
2487
|
-
sel("patterns") ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "
|
|
2488
|
-
"
|
|
2374
|
+
sel("patterns") ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "green", children: [
|
|
2375
|
+
"Patterns (",
|
|
2489
2376
|
globalPatterns.length,
|
|
2490
2377
|
" recurring)"
|
|
2491
|
-
] }) : /* @__PURE__ */ jsxs9(Text9, {
|
|
2492
|
-
"
|
|
2378
|
+
] }) : /* @__PURE__ */ jsxs9(Text9, { bold: true, children: [
|
|
2379
|
+
"Patterns (",
|
|
2493
2380
|
globalPatterns.length,
|
|
2494
2381
|
" recurring)"
|
|
2495
2382
|
] })
|
|
2496
2383
|
] }),
|
|
2497
|
-
expandedNodes.has("patterns") && globalPatterns.slice(0, 5).map((pattern
|
|
2384
|
+
expandedNodes.has("patterns") && globalPatterns.slice(0, 5).map((pattern) => {
|
|
2498
2385
|
const patternId = `pattern-${pattern.id}`;
|
|
2499
|
-
const isLast = idx === Math.min(4, globalPatterns.length - 1);
|
|
2500
2386
|
const desc = pattern.pattern.slice(0, 40) + (pattern.pattern.length > 40 ? "..." : "");
|
|
2501
2387
|
return /* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2502
|
-
sel(patternId) ? /* @__PURE__ */
|
|
2388
|
+
sel(patternId) ? /* @__PURE__ */ jsxs9(Text9, { bold: true, color: "green", children: [
|
|
2389
|
+
">",
|
|
2390
|
+
" "
|
|
2391
|
+
] }) : /* @__PURE__ */ jsx10(Text9, { children: " " }),
|
|
2503
2392
|
" ",
|
|
2504
|
-
isLast ? "\u2514\u2500 " : "\u251C\u2500 ",
|
|
2505
2393
|
/* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
|
|
2506
|
-
'"',
|
|
2507
2394
|
desc,
|
|
2508
|
-
|
|
2395
|
+
" \xB7 ",
|
|
2509
2396
|
pattern.projects.length,
|
|
2510
2397
|
" projects"
|
|
2511
2398
|
] })
|
|
@@ -2513,19 +2400,14 @@ function MemoryTreeView() {
|
|
|
2513
2400
|
}),
|
|
2514
2401
|
/* @__PURE__ */ jsx10(Text9, { children: " " }),
|
|
2515
2402
|
/* @__PURE__ */ jsxs9(Box9, { gap: 2, children: [
|
|
2403
|
+
/* @__PURE__ */ jsx10(Text9, { children: stats?.improvementTrend === "improving" ? /* @__PURE__ */ jsx10(Text9, { color: "green", children: "\u25CF Improving" }) : stats?.improvementTrend === "declining" ? /* @__PURE__ */ jsx10(Text9, { color: "red", children: "\u25CF Declining" }) : /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "\u25CB Stable" }) }),
|
|
2516
2404
|
/* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2517
|
-
/* @__PURE__ */ jsx10(Text9, {
|
|
2518
|
-
|
|
2405
|
+
/* @__PURE__ */ jsx10(Text9, { color: "green", children: stats?.resolvedCount || 0 }),
|
|
2406
|
+
/* @__PURE__ */ jsx10(Text9, { dimColor: true, children: " resolved" })
|
|
2519
2407
|
] }),
|
|
2520
|
-
/* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2521
|
-
|
|
2522
|
-
" "
|
|
2523
|
-
/* @__PURE__ */ jsx10(Text9, { color: "green", children: stats?.resolvedCount || 0 })
|
|
2524
|
-
] }),
|
|
2525
|
-
/* @__PURE__ */ jsxs9(Text9, { children: [
|
|
2526
|
-
/* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "Historical:" }),
|
|
2527
|
-
" ",
|
|
2528
|
-
/* @__PURE__ */ jsx10(Text9, { dimColor: true, children: stats?.historicalIssues || 0 })
|
|
2408
|
+
/* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
|
|
2409
|
+
stats?.historicalIssues || 0,
|
|
2410
|
+
" historical"
|
|
2529
2411
|
] })
|
|
2530
2412
|
] })
|
|
2531
2413
|
] })
|
|
@@ -2551,7 +2433,7 @@ function RawLogView() {
|
|
|
2551
2433
|
const logs = rawLog.slice(startIdx, startIdx + pageSize);
|
|
2552
2434
|
return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", paddingX: 1, children: [
|
|
2553
2435
|
/* @__PURE__ */ jsxs10(Text10, { children: [
|
|
2554
|
-
/* @__PURE__ */ jsx11(Text10, {
|
|
2436
|
+
/* @__PURE__ */ jsx11(Text10, { bold: true, children: "Log" }),
|
|
2555
2437
|
" ",
|
|
2556
2438
|
/* @__PURE__ */ jsxs10(Text10, { dimColor: true, children: [
|
|
2557
2439
|
"Page ",
|
|
@@ -2564,15 +2446,15 @@ function RawLogView() {
|
|
|
2564
2446
|
/* @__PURE__ */ jsx11(Text10, { dimColor: true, children: " entries" })
|
|
2565
2447
|
] }),
|
|
2566
2448
|
/* @__PURE__ */ jsx11(Text10, { children: " " }),
|
|
2567
|
-
rawLog.length === 0 ? /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "No log entries yet." }) : /* @__PURE__ */ jsx11(Box10, { flexDirection: "column", children: logs.map((entry, i) => {
|
|
2568
|
-
const
|
|
2569
|
-
const levelEl = entry.level === "error" ? /* @__PURE__ */ jsx11(Text10, { color: "red", children: levelTag }) : entry.level === "warn" ? /* @__PURE__ */ jsx11(Text10, { color: "yellow", children: levelTag }) : entry.level === "info" ? /* @__PURE__ */ jsx11(Text10, { color: "green", children: levelTag }) : /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: levelTag });
|
|
2449
|
+
rawLog.length === 0 ? /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: " No log entries yet." }) : /* @__PURE__ */ jsx11(Box10, { flexDirection: "column", children: logs.map((entry, i) => {
|
|
2450
|
+
const dot = entry.level === "error" ? /* @__PURE__ */ jsx11(Text10, { color: "red", children: "\u25CF" }) : entry.level === "warn" ? /* @__PURE__ */ jsx11(Text10, { color: "yellow", children: "\u25CF" }) : entry.level === "info" ? /* @__PURE__ */ jsx11(Text10, { color: "green", children: "\u25CF" }) : /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "\u25CB" });
|
|
2570
2451
|
return /* @__PURE__ */ jsxs10(Text10, { children: [
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
levelEl,
|
|
2452
|
+
" ",
|
|
2453
|
+
dot,
|
|
2574
2454
|
" ",
|
|
2575
|
-
entry.message.slice(0,
|
|
2455
|
+
entry.message.slice(0, 70),
|
|
2456
|
+
" ",
|
|
2457
|
+
/* @__PURE__ */ jsx11(Text10, { dimColor: true, children: entry.time })
|
|
2576
2458
|
] }, i);
|
|
2577
2459
|
}) })
|
|
2578
2460
|
] });
|
|
@@ -2715,7 +2597,6 @@ function DashboardApp({ onReady }) {
|
|
|
2715
2597
|
if (showConfig) return;
|
|
2716
2598
|
if (state.view === "goals" && state.goalsPanel.inputMode === "add") return;
|
|
2717
2599
|
if (state.view === "hypotheses" && state.hypothesesPanel.inputMode === "add") return;
|
|
2718
|
-
if (state.view === "agent" || state.view === "memory") return;
|
|
2719
2600
|
if (input === "q" || key.escape) {
|
|
2720
2601
|
exit();
|
|
2721
2602
|
process.exit(0);
|
|
@@ -2724,22 +2605,38 @@ function DashboardApp({ onReady }) {
|
|
|
2724
2605
|
const currentIndex = MAIN_VIEWS.indexOf(state.view);
|
|
2725
2606
|
const nextIndex = currentIndex >= 0 ? (currentIndex + 1) % MAIN_VIEWS.length : 0;
|
|
2726
2607
|
dispatch({ type: "SET_VIEW", view: MAIN_VIEWS[nextIndex] || "overview" });
|
|
2608
|
+
return;
|
|
2609
|
+
}
|
|
2610
|
+
if (input === "c") {
|
|
2611
|
+
setShowConfig(true);
|
|
2612
|
+
return;
|
|
2613
|
+
}
|
|
2614
|
+
if (input === "l") {
|
|
2615
|
+
dispatch({ type: "SET_VIEW", view: "rawlog" });
|
|
2616
|
+
return;
|
|
2617
|
+
}
|
|
2618
|
+
if (input === "g") {
|
|
2619
|
+
dispatch({ type: "SET_VIEW", view: "agent" });
|
|
2620
|
+
return;
|
|
2727
2621
|
}
|
|
2728
|
-
if (input === "b") dispatch({ type: "GO_BACK" });
|
|
2729
|
-
if (input === "c") setShowConfig(true);
|
|
2730
|
-
if (input === "n") dispatch({ type: "NEXT_PAGE" });
|
|
2731
|
-
if (input === "p") dispatch({ type: "PREV_PAGE" });
|
|
2732
|
-
if (input === "l") dispatch({ type: "SET_VIEW", view: "rawlog" });
|
|
2733
|
-
if (input === "g") dispatch({ type: "SET_VIEW", view: "agent" });
|
|
2734
2622
|
if (input === "o") {
|
|
2735
2623
|
dispatch({ type: "SET_VIEW", view: "goals" });
|
|
2736
2624
|
void refreshGoals();
|
|
2625
|
+
return;
|
|
2737
2626
|
}
|
|
2738
2627
|
if (input === "y") {
|
|
2739
2628
|
dispatch({ type: "SET_VIEW", view: "hypotheses" });
|
|
2740
2629
|
void refreshHypotheses();
|
|
2630
|
+
return;
|
|
2631
|
+
}
|
|
2632
|
+
if (input === "t") {
|
|
2633
|
+
dispatch({ type: "SET_VIEW", view: "memory" });
|
|
2634
|
+
return;
|
|
2741
2635
|
}
|
|
2742
|
-
if (
|
|
2636
|
+
if (state.view === "agent" || state.view === "memory") return;
|
|
2637
|
+
if (input === "b") dispatch({ type: "GO_BACK" });
|
|
2638
|
+
if (input === "n") dispatch({ type: "NEXT_PAGE" });
|
|
2639
|
+
if (input === "p") dispatch({ type: "PREV_PAGE" });
|
|
2743
2640
|
});
|
|
2744
2641
|
let viewComponent;
|
|
2745
2642
|
switch (state.view) {
|
|
@@ -2819,4 +2716,4 @@ export {
|
|
|
2819
2716
|
getOutputManager,
|
|
2820
2717
|
InteractiveDashboard
|
|
2821
2718
|
};
|
|
2822
|
-
//# sourceMappingURL=chunk-
|
|
2719
|
+
//# sourceMappingURL=chunk-HBPTBNFJ.js.map
|