@triedotdev/mcp 1.0.119 → 1.0.121

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.
@@ -288,11 +288,11 @@ var StreamingManager = class {
288
288
 
289
289
  // src/cli/dashboard/index.ts
290
290
  import { render } from "ink";
291
- import React9 from "react";
291
+ import React10 from "react";
292
292
 
293
293
  // src/cli/dashboard/App.tsx
294
294
  import { useState as useState2, useEffect as useEffect3, useCallback as useCallback6, useRef as useRef2 } from "react";
295
- import { Box as Box12, useInput as useInput9, useApp } from "ink";
295
+ import { Box as Box13, useInput as useInput9, useApp } from "ink";
296
296
 
297
297
  // src/cli/dashboard/state.tsx
298
298
  import React, { createContext, useContext, useReducer } from "react";
@@ -879,6 +879,7 @@ function Header() {
879
879
  }
880
880
 
881
881
  // src/cli/dashboard/components/Footer.tsx
882
+ import React2 from "react";
882
883
  import { Box as Box2, Text as Text2, useStdout as useStdout2 } from "ink";
883
884
  import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
884
885
  var VIEW_LABELS = {
@@ -901,20 +902,20 @@ var VIEW_SHORT = {
901
902
  };
902
903
  var TAB_VIEWS = ["overview", "memory", "goals", "hypotheses", "agent", "chat"];
903
904
  var CONTEXT_HINTS = {
904
- goals: "j/k nav \xB7 a add \xB7 s scan \xB7 enter complete \xB7 d delete \xB7 c clear achieved",
905
- hypotheses: "j/k nav \xB7 a add \xB7 t test \xB7 v validate \xB7 x invalidate",
906
- agent: "j/k nav \xB7 enter expand \xB7 d dismiss",
907
- memory: "j/k nav \xB7 enter expand",
908
- chat: "type to ask \xB7 enter send \xB7 esc clear",
909
- rawlog: "n/p pages \xB7 b back"
905
+ goals: "j/k nav \xB7 a add \xB7 r run check \xB7 enter complete \xB7 d delete \xB7 x clear achieved \xB7 / help",
906
+ hypotheses: "j/k nav \xB7 a add \xB7 r run check \xB7 v validate \xB7 x invalidate \xB7 / help",
907
+ agent: "j/k nav \xB7 enter expand \xB7 d dismiss \xB7 / help",
908
+ memory: "j/k nav \xB7 enter expand \xB7 / help",
909
+ chat: "type to ask \xB7 enter send \xB7 esc clear \xB7 / help",
910
+ rawlog: "n/p pages \xB7 b back \xB7 / help"
910
911
  };
911
912
  var CONTEXT_HINTS_SHORT = {
912
- goals: "j/k a s d c",
913
- hypotheses: "j/k a t v x",
914
- agent: "j/k enter d",
915
- memory: "j/k enter",
916
- chat: "enter esc",
917
- rawlog: "n/p b"
913
+ goals: "j/k a r d x /",
914
+ hypotheses: "j/k a r v x /",
915
+ agent: "j/k enter d /",
916
+ memory: "j/k enter /",
917
+ chat: "enter esc /",
918
+ rawlog: "n/p b /"
918
919
  };
919
920
  function Footer() {
920
921
  const { state } = useDashboard();
@@ -932,25 +933,23 @@ function Footer() {
932
933
  hints = narrow ? "enter esc" : "enter save \xB7 esc cancel";
933
934
  } else {
934
935
  const hintMap = narrow ? CONTEXT_HINTS_SHORT : CONTEXT_HINTS;
935
- hints = hintMap[view] || (narrow ? "s n/p" : "n/p pages \xB7 s settings");
936
+ hints = hintMap[view] || (narrow ? "s n/p /" : "n/p pages \xB7 s settings \xB7 / help");
936
937
  }
937
938
  if (veryNarrow) {
938
939
  return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", paddingX: 1, children: [
939
- /* @__PURE__ */ jsx3(Box2, { gap: 1, children: TAB_VIEWS.map((v) => {
940
+ /* @__PURE__ */ jsx3(Box2, { gap: 0, children: TAB_VIEWS.map((v, idx) => {
940
941
  const isAgent = v === "agent";
941
942
  const isCurrent = v === view;
942
- if (isCurrent) {
943
- return /* @__PURE__ */ jsx3(Text2, { color: "green", bold: true, children: labels[v] }, v);
944
- } else if (isAgent && hasUnreadNudges) {
945
- return /* @__PURE__ */ jsxs2(Text2, { color: "yellow", bold: true, children: [
943
+ const isLast = idx === TAB_VIEWS.length - 1;
944
+ return /* @__PURE__ */ jsxs2(React2.Fragment, { children: [
945
+ isCurrent ? /* @__PURE__ */ jsx3(Text2, { color: "green", bold: true, children: labels[v] }) : isAgent && hasUnreadNudges ? /* @__PURE__ */ jsxs2(Text2, { color: "yellow", bold: true, children: [
946
946
  labels[v],
947
947
  " (",
948
948
  unreadNudgesCount,
949
949
  ")"
950
- ] }, v);
951
- } else {
952
- return /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: labels[v] }, v);
953
- }
950
+ ] }) : /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: labels[v] }),
951
+ !isLast && /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: " \xB7 " })
952
+ ] }, v);
954
953
  }) }),
955
954
  /* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
956
955
  hints,
@@ -959,21 +958,19 @@ function Footer() {
959
958
  ] });
960
959
  }
961
960
  return /* @__PURE__ */ jsxs2(Box2, { paddingX: 1, justifyContent: "space-between", children: [
962
- /* @__PURE__ */ jsx3(Box2, { gap: 1, children: TAB_VIEWS.map((v) => {
961
+ /* @__PURE__ */ jsx3(Box2, { gap: 0, children: TAB_VIEWS.map((v, idx) => {
963
962
  const isAgent = v === "agent";
964
963
  const isCurrent = v === view;
965
- if (isCurrent) {
966
- return /* @__PURE__ */ jsx3(Text2, { color: "green", bold: true, children: labels[v] }, v);
967
- } else if (isAgent && hasUnreadNudges) {
968
- return /* @__PURE__ */ jsxs2(Text2, { color: "yellow", bold: true, children: [
964
+ const isLast = idx === TAB_VIEWS.length - 1;
965
+ return /* @__PURE__ */ jsxs2(React2.Fragment, { children: [
966
+ isCurrent ? /* @__PURE__ */ jsx3(Text2, { color: "green", bold: true, children: labels[v] }) : isAgent && hasUnreadNudges ? /* @__PURE__ */ jsxs2(Text2, { color: "yellow", bold: true, children: [
969
967
  labels[v],
970
968
  " (",
971
969
  unreadNudgesCount,
972
970
  ")"
973
- ] }, v);
974
- } else {
975
- return /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: labels[v] }, v);
976
- }
971
+ ] }) : /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: labels[v] }),
972
+ !isLast && /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: " \xB7 " })
973
+ ] }, v);
977
974
  }) }),
978
975
  /* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
979
976
  hints,
@@ -1248,9 +1245,109 @@ function ConfigDialog({ onClose }) {
1248
1245
  ] });
1249
1246
  }
1250
1247
 
1248
+ // src/cli/dashboard/components/HelpDialog.tsx
1249
+ import { Box as Box5, Text as Text5 } from "ink";
1250
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
1251
+ var VIEW_HELP = {
1252
+ overview: [
1253
+ { key: "tab", description: "Navigate between views" },
1254
+ { key: "g", description: "Go to Nudges" },
1255
+ { key: "o", description: "Go to Goals" },
1256
+ { key: "y", description: "Go to Hypotheses" },
1257
+ { key: "t", description: "Go to Ledger" },
1258
+ { key: "c", description: "Go to Chat" },
1259
+ { key: "l", description: "Go to Raw Log" },
1260
+ { key: "s", description: "Open Settings" },
1261
+ { key: "q / esc", description: "Quit" }
1262
+ ],
1263
+ agent: [
1264
+ { key: "j / \u2193", description: "Move down" },
1265
+ { key: "k / \u2191", description: "Move up" },
1266
+ { key: "enter", description: "Expand selected nudge" },
1267
+ { key: "d", description: "Dismiss selected nudge" },
1268
+ { key: "tab", description: "Navigate between views" },
1269
+ { key: "s", description: "Open Settings" },
1270
+ { key: "q / esc", description: "Quit" }
1271
+ ],
1272
+ goals: [
1273
+ { key: "j / \u2193", description: "Move down" },
1274
+ { key: "k / \u2191", description: "Move up" },
1275
+ { key: "a", description: "Add new goal" },
1276
+ { key: "r", description: "Run check on selected goal" },
1277
+ { key: "enter", description: "Mark goal as complete" },
1278
+ { key: "d", description: "Delete selected goal" },
1279
+ { key: "x", description: "Clear all achieved goals" },
1280
+ { key: "tab", description: "Navigate between views" },
1281
+ { key: "s", description: "Open Settings" },
1282
+ { key: "q / esc", description: "Quit" }
1283
+ ],
1284
+ hypotheses: [
1285
+ { key: "j / \u2193", description: "Move down" },
1286
+ { key: "k / \u2191", description: "Move up" },
1287
+ { key: "a", description: "Add new hypothesis" },
1288
+ { key: "r", description: "Run check on selected hypothesis" },
1289
+ { key: "v", description: "Mark hypothesis as validated" },
1290
+ { key: "x", description: "Mark hypothesis as invalidated" },
1291
+ { key: "tab", description: "Navigate between views" },
1292
+ { key: "s", description: "Open Settings" },
1293
+ { key: "q / esc", description: "Quit" }
1294
+ ],
1295
+ memory: [
1296
+ { key: "j / \u2193", description: "Move down" },
1297
+ { key: "k / \u2191", description: "Move up" },
1298
+ { key: "enter", description: "Expand selected item" },
1299
+ { key: "tab", description: "Navigate between views" },
1300
+ { key: "s", description: "Open Settings" },
1301
+ { key: "q / esc", description: "Quit" }
1302
+ ],
1303
+ chat: [
1304
+ { key: "type", description: "Enter message" },
1305
+ { key: "enter", description: "Send message" },
1306
+ { key: "esc", description: "Clear input" },
1307
+ { key: "tab", description: "Navigate between views" },
1308
+ { key: "q", description: "Quit (press twice if input active)" }
1309
+ ],
1310
+ rawlog: [
1311
+ { key: "n", description: "Next page" },
1312
+ { key: "p", description: "Previous page" },
1313
+ { key: "b", description: "Back to previous view" },
1314
+ { key: "tab", description: "Navigate between views" },
1315
+ { key: "s", description: "Open Settings" },
1316
+ { key: "q / esc", description: "Quit" }
1317
+ ]
1318
+ };
1319
+ function HelpDialog({ view, onClose }) {
1320
+ const shortcuts = VIEW_HELP[view] || VIEW_HELP.overview;
1321
+ const viewName = view.charAt(0).toUpperCase() + view.slice(1);
1322
+ return /* @__PURE__ */ jsxs5(
1323
+ Box5,
1324
+ {
1325
+ flexDirection: "column",
1326
+ borderStyle: "round",
1327
+ borderColor: "cyan",
1328
+ paddingX: 2,
1329
+ paddingY: 1,
1330
+ width: "80%",
1331
+ alignSelf: "center",
1332
+ marginTop: 2,
1333
+ children: [
1334
+ /* @__PURE__ */ jsxs5(Text5, { bold: true, color: "cyan", children: [
1335
+ viewName,
1336
+ " View - Keyboard Shortcuts"
1337
+ ] }),
1338
+ /* @__PURE__ */ jsx6(Box5, { marginTop: 1, flexDirection: "column", gap: 0, children: shortcuts.map(({ key, description }, idx) => /* @__PURE__ */ jsxs5(Box5, { gap: 2, children: [
1339
+ /* @__PURE__ */ jsx6(Box5, { width: 12, children: /* @__PURE__ */ jsx6(Text5, { color: "yellow", children: key }) }),
1340
+ /* @__PURE__ */ jsx6(Text5, { children: description })
1341
+ ] }, idx)) }),
1342
+ /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text5, { dimColor: true, children: "Press / or ? again to close" }) })
1343
+ ]
1344
+ }
1345
+ );
1346
+ }
1347
+
1251
1348
  // src/cli/dashboard/views/OverviewView.tsx
1252
- import { Box as Box5, Text as Text5, useInput as useInput2, useStdout as useStdout4 } from "ink";
1253
- import { Fragment, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
1349
+ import { Box as Box6, Text as Text6, useInput as useInput2, useStdout as useStdout4 } from "ink";
1350
+ import { Fragment, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
1254
1351
  function truncate(str, max) {
1255
1352
  return str.length > max ? str.slice(0, max - 1) + "..." : str;
1256
1353
  }
@@ -1284,18 +1381,18 @@ function OverviewView() {
1284
1381
  dispatch({ type: "DISMISS_FIX", id: activeFixes[selectedFixIndex].id });
1285
1382
  }
1286
1383
  });
1287
- return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 1, children: [
1288
- /* @__PURE__ */ jsxs5(Text5, { dimColor: true, children: [
1384
+ return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", paddingX: 1, children: [
1385
+ /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1289
1386
  "Scanned ",
1290
1387
  watch.filesScannedSession,
1291
1388
  " files ",
1292
1389
  elapsed,
1293
1390
  "s"
1294
1391
  ] }),
1295
- watch.watching && signalExtraction.enabled && /* @__PURE__ */ jsxs5(Text5, { wrap: "truncate", children: [
1296
- /* @__PURE__ */ jsx6(Text5, { color: "green", children: "\u25CF" }),
1392
+ watch.watching && signalExtraction.enabled && /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
1393
+ /* @__PURE__ */ jsx7(Text6, { color: "green", children: "\u25CF" }),
1297
1394
  " Signal extraction",
1298
- !narrow && (signalExtraction.decisionsExtracted > 0 || signalExtraction.factsExtracted > 0 || signalExtraction.blockersExtracted > 0) && /* @__PURE__ */ jsxs5(Text5, { dimColor: true, children: [
1395
+ !narrow && (signalExtraction.decisionsExtracted > 0 || signalExtraction.factsExtracted > 0 || signalExtraction.blockersExtracted > 0) && /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1299
1396
  " ",
1300
1397
  signalExtraction.decisionsExtracted,
1301
1398
  "d \xB7 ",
@@ -1309,73 +1406,73 @@ function OverviewView() {
1309
1406
  const filename = issue.file.split("/").pop() || issue.file;
1310
1407
  const lineNum = issue.line ? `:${issue.line}` : "";
1311
1408
  const issueLen = Math.max(15, contentWidth - filename.length - 6);
1312
- return /* @__PURE__ */ jsxs5(Text5, { wrap: "truncate", children: [
1313
- /* @__PURE__ */ jsx6(Text5, { color: "red", children: "\u25CF" }),
1409
+ return /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
1410
+ /* @__PURE__ */ jsx7(Text6, { color: "red", children: "\u25CF" }),
1314
1411
  " ",
1315
- /* @__PURE__ */ jsx6(Text5, { color: "red", children: truncate(issue.issue, issueLen) }),
1316
- /* @__PURE__ */ jsxs5(Text5, { dimColor: true, children: [
1412
+ /* @__PURE__ */ jsx7(Text6, { color: "red", children: truncate(issue.issue, issueLen) }),
1413
+ /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1317
1414
  " ",
1318
1415
  filename,
1319
1416
  lineNum
1320
1417
  ] })
1321
1418
  ] }, i);
1322
1419
  }),
1323
- totalIssues === 0 && criticalIssues.length === 0 && activeFixes.length === 0 && /* @__PURE__ */ jsxs5(Text5, { children: [
1324
- /* @__PURE__ */ jsx6(Text5, { color: "green", children: "\u25CF" }),
1420
+ totalIssues === 0 && criticalIssues.length === 0 && activeFixes.length === 0 && /* @__PURE__ */ jsxs6(Text6, { children: [
1421
+ /* @__PURE__ */ jsx7(Text6, { color: "green", children: "\u25CF" }),
1325
1422
  " No issues"
1326
1423
  ] }),
1327
- activeFixes.length > 0 && /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", marginTop: 1, children: [
1328
- /* @__PURE__ */ jsx6(Text5, { bold: true, children: "Goal Violations" }),
1424
+ activeFixes.length > 0 && /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", marginTop: 1, children: [
1425
+ /* @__PURE__ */ jsx7(Text6, { bold: true, children: "Goal Violations" }),
1329
1426
  activeFixes.map((fix, i) => {
1330
1427
  const isSelected = i === selectedFixIndex;
1331
1428
  const confidenceColor = fix.confidence >= 90 ? "green" : fix.confidence >= 70 ? "yellow" : "red";
1332
1429
  const shortFile = fix.file.split("/").pop() || fix.file;
1333
1430
  const descLen = Math.max(15, contentWidth - shortFile.length - 10);
1334
- return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
1335
- /* @__PURE__ */ jsxs5(Text5, { wrap: "truncate", children: [
1336
- isSelected ? /* @__PURE__ */ jsx6(Text5, { bold: true, color: "yellow", children: "> " }) : " ",
1337
- /* @__PURE__ */ jsx6(Text5, { color: "yellow", children: "\u25CF" }),
1431
+ return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
1432
+ /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
1433
+ isSelected ? /* @__PURE__ */ jsx7(Text6, { bold: true, color: "yellow", children: "> " }) : " ",
1434
+ /* @__PURE__ */ jsx7(Text6, { color: "yellow", children: "\u25CF" }),
1338
1435
  " ",
1339
- /* @__PURE__ */ jsx6(Text5, { children: truncate(fix.description, descLen) }),
1340
- /* @__PURE__ */ jsxs5(Text5, { dimColor: true, children: [
1436
+ /* @__PURE__ */ jsx7(Text6, { children: truncate(fix.description, descLen) }),
1437
+ /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1341
1438
  " ",
1342
1439
  shortFile
1343
1440
  ] })
1344
1441
  ] }),
1345
- /* @__PURE__ */ jsxs5(Text5, { wrap: "truncate", children: [
1442
+ /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
1346
1443
  " ",
1347
- /* @__PURE__ */ jsxs5(Text5, { color: confidenceColor, bold: true, children: [
1444
+ /* @__PURE__ */ jsxs6(Text6, { color: confidenceColor, bold: true, children: [
1348
1445
  fix.confidence,
1349
1446
  "%"
1350
1447
  ] }),
1351
- narrow ? fix.status === "applying" && /* @__PURE__ */ jsx6(Text5, { color: "cyan", children: " applying..." }) : /* @__PURE__ */ jsxs5(Fragment, { children: [
1352
- /* @__PURE__ */ jsxs5(Text5, { dimColor: true, children: [
1448
+ narrow ? fix.status === "applying" && /* @__PURE__ */ jsx7(Text6, { color: "cyan", children: " applying..." }) : /* @__PURE__ */ jsxs6(Fragment, { children: [
1449
+ /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1353
1450
  " confidence fix: ",
1354
1451
  truncate(fix.suggestedFix, contentWidth - 25)
1355
1452
  ] }),
1356
- fix.status === "applying" && /* @__PURE__ */ jsx6(Text5, { color: "cyan", children: " applying..." })
1453
+ fix.status === "applying" && /* @__PURE__ */ jsx7(Text6, { color: "cyan", children: " applying..." })
1357
1454
  ] })
1358
1455
  ] })
1359
1456
  ] }, fix.id);
1360
1457
  }),
1361
- /* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " f fix \xB7 x dismiss" })
1458
+ /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " f fix \xB7 x dismiss" })
1362
1459
  ] }),
1363
- /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", marginTop: 1, children: [
1364
- /* @__PURE__ */ jsx6(Text5, { bold: true, children: "Activity" }),
1365
- pageActivities.map((entry, i) => /* @__PURE__ */ jsxs5(Text5, { wrap: "truncate", children: [
1460
+ /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", marginTop: 1, children: [
1461
+ /* @__PURE__ */ jsx7(Text6, { bold: true, children: "Activity" }),
1462
+ pageActivities.map((entry, i) => /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
1366
1463
  " ",
1367
- /* @__PURE__ */ jsx6(Text5, { dimColor: true, children: entry.time }),
1464
+ /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: entry.time }),
1368
1465
  " ",
1369
1466
  truncate(entry.message, contentWidth - 14)
1370
1467
  ] }, i)),
1371
- pageActivities.length === 0 && /* @__PURE__ */ jsx6(Text5, { dimColor: true, children: " No activity yet" })
1468
+ pageActivities.length === 0 && /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " No activity yet" })
1372
1469
  ] })
1373
1470
  ] });
1374
1471
  }
1375
1472
 
1376
1473
  // src/cli/dashboard/views/AgentView.tsx
1377
1474
  import { useEffect, useCallback } from "react";
1378
- import { Box as Box6, Text as Text6, useInput as useInput3, useStdout as useStdout5 } from "ink";
1475
+ import { Box as Box7, Text as Text7, useInput as useInput3, useStdout as useStdout5 } from "ink";
1379
1476
 
1380
1477
  // src/cli/dashboard/theme.ts
1381
1478
  import pc from "picocolors";
@@ -1414,7 +1511,7 @@ function progressBar(current, total, width = 10) {
1414
1511
  }
1415
1512
 
1416
1513
  // src/cli/dashboard/views/AgentView.tsx
1417
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
1514
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1418
1515
  function timeAgo(iso) {
1419
1516
  const ms = Date.now() - new Date(iso).getTime();
1420
1517
  const mins = Math.floor(ms / 6e4);
@@ -1478,21 +1575,21 @@ function AgentView() {
1478
1575
  const decCount = decisions.length;
1479
1576
  const patCount = patterns.length;
1480
1577
  if (!loaded) {
1481
- return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", paddingX: 1, children: [
1482
- /* @__PURE__ */ jsx7(Text6, { bold: true, children: "Nudges" }),
1483
- /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " Loading..." })
1578
+ return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", paddingX: 1, children: [
1579
+ /* @__PURE__ */ jsx8(Text7, { bold: true, children: "Nudges" }),
1580
+ /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " Loading..." })
1484
1581
  ] });
1485
1582
  }
1486
1583
  if (alertCount === 0 && decCount === 0 && patCount === 0) {
1487
- return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", paddingX: 1, children: [
1488
- /* @__PURE__ */ jsx7(Text6, { bold: true, children: "Nudges" }),
1489
- /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " No nudges yet. Trie will alert you here when it spots issues." })
1584
+ return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", paddingX: 1, children: [
1585
+ /* @__PURE__ */ jsx8(Text7, { bold: true, children: "Nudges" }),
1586
+ /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " No nudges yet. Trie will alert you here when it spots issues." })
1490
1587
  ] });
1491
1588
  }
1492
- return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", paddingX: 1, children: [
1493
- /* @__PURE__ */ jsxs6(Text6, { children: [
1494
- /* @__PURE__ */ jsx7(Text6, { bold: true, children: "Nudges" }),
1495
- /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1589
+ return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", paddingX: 1, children: [
1590
+ /* @__PURE__ */ jsxs7(Text7, { children: [
1591
+ /* @__PURE__ */ jsx8(Text7, { bold: true, children: "Nudges" }),
1592
+ /* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
1496
1593
  " ",
1497
1594
  alertCount,
1498
1595
  " alerts \xB7 ",
@@ -1502,85 +1599,85 @@ function AgentView() {
1502
1599
  " patterns"
1503
1600
  ] })
1504
1601
  ] }),
1505
- alertCount > 0 && /* @__PURE__ */ jsx7(Box6, { flexDirection: "column", marginTop: 1, children: alerts.map((insight, idx) => {
1602
+ alertCount > 0 && /* @__PURE__ */ jsx8(Box7, { flexDirection: "column", marginTop: 1, children: alerts.map((insight, idx) => {
1506
1603
  const isSelected = idx === selectedInsight;
1507
1604
  const isExpanded = idx === expandedInsight;
1508
1605
  const ago = formatTimeAgo(insight.timestamp);
1509
1606
  const msg = insight.message.slice(0, msgLen) + (insight.message.length > msgLen ? "..." : "");
1510
1607
  const riskColor = insight.priority >= 8 ? "red" : insight.priority >= 5 ? "yellow" : void 0;
1511
- return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
1512
- /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
1513
- isSelected ? /* @__PURE__ */ jsx7(Text6, { bold: true, color: "green", children: "> " }) : " ",
1514
- riskColor ? /* @__PURE__ */ jsx7(Text6, { color: riskColor, children: "\u25CF" }) : /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "\u25CB" }),
1608
+ return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
1609
+ /* @__PURE__ */ jsxs7(Text7, { wrap: "truncate", children: [
1610
+ isSelected ? /* @__PURE__ */ jsx8(Text7, { bold: true, color: "green", children: "> " }) : " ",
1611
+ riskColor ? /* @__PURE__ */ jsx8(Text7, { color: riskColor, children: "\u25CF" }) : /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "\u25CB" }),
1515
1612
  " ",
1516
- isSelected ? /* @__PURE__ */ jsx7(Text6, { bold: true, children: msg }) : /* @__PURE__ */ jsx7(Text6, { children: msg }),
1517
- /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1613
+ isSelected ? /* @__PURE__ */ jsx8(Text7, { bold: true, children: msg }) : /* @__PURE__ */ jsx8(Text7, { children: msg }),
1614
+ /* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
1518
1615
  " ",
1519
1616
  insight.category,
1520
1617
  " \xB7 ",
1521
1618
  ago
1522
1619
  ] })
1523
1620
  ] }),
1524
- (isExpanded || isSelected) && insight.suggestedAction && /* @__PURE__ */ jsxs6(Text6, { children: [
1621
+ (isExpanded || isSelected) && insight.suggestedAction && /* @__PURE__ */ jsxs7(Text7, { children: [
1525
1622
  " ",
1526
- /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1623
+ /* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
1527
1624
  "->",
1528
1625
  " "
1529
1626
  ] }),
1530
- /* @__PURE__ */ jsx7(Text6, { children: insight.suggestedAction })
1627
+ /* @__PURE__ */ jsx8(Text7, { children: insight.suggestedAction })
1531
1628
  ] })
1532
1629
  ] }, insight.id);
1533
1630
  }) }),
1534
- decCount > 0 && /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", marginTop: 1, children: [
1535
- /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " Decisions" }),
1631
+ decCount > 0 && /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", marginTop: 1, children: [
1632
+ /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " Decisions" }),
1536
1633
  decisions.slice(0, 10).map((dec) => {
1537
1634
  const ago = timeAgo(dec.when);
1538
1635
  const active = dec.status === "active";
1539
- return /* @__PURE__ */ jsxs6(Text6, { children: [
1636
+ return /* @__PURE__ */ jsxs7(Text7, { children: [
1540
1637
  " ",
1541
- active ? /* @__PURE__ */ jsx7(Text6, { color: "green", children: "\u25CF" }) : /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "\u25CB" }),
1638
+ active ? /* @__PURE__ */ jsx8(Text7, { color: "green", children: "\u25CF" }) : /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "\u25CB" }),
1542
1639
  " ",
1543
1640
  dec.decision.slice(0, msgLen),
1544
1641
  dec.decision.length > msgLen ? "..." : "",
1545
- /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1642
+ /* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
1546
1643
  " ",
1547
1644
  ago
1548
1645
  ] })
1549
1646
  ] }, dec.id);
1550
1647
  })
1551
1648
  ] }),
1552
- patCount > 0 && /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", marginTop: 1, children: [
1553
- /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " Patterns" }),
1649
+ patCount > 0 && /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", marginTop: 1, children: [
1650
+ /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " Patterns" }),
1554
1651
  patterns.slice(0, 8).map((pat, idx) => {
1555
1652
  const conf = Math.round(pat.confidence * 100);
1556
1653
  const confColor = conf > 70 ? "green" : conf > 40 ? "yellow" : void 0;
1557
- return /* @__PURE__ */ jsxs6(Text6, { children: [
1654
+ return /* @__PURE__ */ jsxs7(Text7, { children: [
1558
1655
  " ",
1559
- pat.isAntiPattern ? /* @__PURE__ */ jsx7(Text6, { color: "red", children: "\u25CF" }) : /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "\u25CB" }),
1656
+ pat.isAntiPattern ? /* @__PURE__ */ jsx8(Text7, { color: "red", children: "\u25CF" }) : /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "\u25CB" }),
1560
1657
  " ",
1561
1658
  pat.description.slice(0, msgLen),
1562
1659
  pat.description.length > msgLen ? "..." : "",
1563
1660
  " ",
1564
- confColor ? /* @__PURE__ */ jsxs6(Text6, { color: confColor, children: [
1661
+ confColor ? /* @__PURE__ */ jsxs7(Text7, { color: confColor, children: [
1565
1662
  conf,
1566
1663
  "%"
1567
- ] }) : /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1664
+ ] }) : /* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
1568
1665
  conf,
1569
1666
  "%"
1570
1667
  ] })
1571
1668
  ] }, idx);
1572
1669
  })
1573
1670
  ] }),
1574
- /* @__PURE__ */ jsxs6(Box6, { marginTop: 1, gap: 2, children: [
1575
- isAIAvailable() ? /* @__PURE__ */ jsxs6(Text6, { children: [
1576
- /* @__PURE__ */ jsx7(Text6, { color: "green", children: "\u25CF" }),
1671
+ /* @__PURE__ */ jsxs7(Box7, { marginTop: 1, gap: 2, children: [
1672
+ isAIAvailable() ? /* @__PURE__ */ jsxs7(Text7, { children: [
1673
+ /* @__PURE__ */ jsx8(Text7, { color: "green", children: "\u25CF" }),
1577
1674
  " ",
1578
- /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "AI" })
1579
- ] }) : /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "\u25CB AI off" }),
1580
- agentInsights.filter((i) => i.type === "celebration").length > 0 && /* @__PURE__ */ jsxs6(Text6, { children: [
1581
- /* @__PURE__ */ jsx7(Text6, { color: "green", children: "\u25CF" }),
1675
+ /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "AI" })
1676
+ ] }) : /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "\u25CB AI off" }),
1677
+ agentInsights.filter((i) => i.type === "celebration").length > 0 && /* @__PURE__ */ jsxs7(Text7, { children: [
1678
+ /* @__PURE__ */ jsx8(Text7, { color: "green", children: "\u25CF" }),
1582
1679
  " ",
1583
- /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1680
+ /* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
1584
1681
  agentInsights.filter((i) => i.type === "celebration").length,
1585
1682
  " wins"
1586
1683
  ] })
@@ -1591,8 +1688,8 @@ function AgentView() {
1591
1688
 
1592
1689
  // src/cli/dashboard/views/GoalsView.tsx
1593
1690
  import { useCallback as useCallback2 } from "react";
1594
- import { Box as Box7, Text as Text7, useInput as useInput4 } from "ink";
1595
- import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1691
+ import { Box as Box8, Text as Text8, useInput as useInput4 } from "ink";
1692
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1596
1693
  function calculateGoalProgress(goal) {
1597
1694
  if (goal.target <= 0) return 0;
1598
1695
  const startValue = goal.startValue ?? goal.currentValue;
@@ -1695,15 +1792,19 @@ function GoalsView() {
1695
1792
  await agentState.load();
1696
1793
  const achieved = goalsPanel.goals.filter((g) => g.status === "achieved");
1697
1794
  if (achieved.length === 0) {
1795
+ dispatch({ type: "SHOW_NOTIFICATION", message: "No achieved goals to clear", severity: "info", autoHideMs: 3e3 });
1698
1796
  dispatch({ type: "ADD_ACTIVITY", message: "No achieved goals to clear" });
1699
1797
  return;
1700
1798
  }
1701
1799
  for (const goal of achieved) {
1702
1800
  await agentState.deleteGoal(goal.id);
1703
1801
  }
1802
+ dispatch({ type: "SHOW_NOTIFICATION", message: `Cleared ${achieved.length} achieved goal${achieved.length > 1 ? "s" : ""}`, severity: "info", autoHideMs: 3e3 });
1704
1803
  dispatch({ type: "ADD_ACTIVITY", message: `Cleared ${achieved.length} achieved goal${achieved.length > 1 ? "s" : ""}` });
1705
1804
  await refreshGoals();
1706
- } catch {
1805
+ } catch (error) {
1806
+ dispatch({ type: "SHOW_NOTIFICATION", message: `Failed to clear goals: ${error instanceof Error ? error.message : "unknown"}`, severity: "warning", autoHideMs: 5e3 });
1807
+ dispatch({ type: "ADD_ACTIVITY", message: `Clear failed: ${error instanceof Error ? error.message : "unknown"}` });
1707
1808
  }
1708
1809
  }, [dispatch, refreshGoals, goalsPanel.goals]);
1709
1810
  const checkGoalNow = useCallback2(async (goalId) => {
@@ -1712,29 +1813,34 @@ function GoalsView() {
1712
1813
  const goal = goalsPanel.goals.find((g) => g.id === goalId);
1713
1814
  if (!goal) return;
1714
1815
  dispatch({ type: "ADD_ACTIVITY", message: `Checking goal: ${goal.description.slice(0, 30)}...` });
1715
- dispatch({ type: "SHOW_NOTIFICATION", message: `Scanning files for goal violations...`, severity: "info", autoHideMs: 3e3 });
1716
- const { checkFilesForGoalViolations } = await import("./goal-validator-P67RNO2U.js");
1816
+ dispatch({ type: "SHOW_NOTIFICATION", message: `Scanning files for violations...`, severity: "info", autoHideMs: 3e3 });
1817
+ const { checkFilesForGoalViolations } = await import("./goal-validator-RD6QBQJB.js");
1717
1818
  const violations = await checkFilesForGoalViolations([goal], workDir);
1718
1819
  if (violations.length === 0) {
1719
1820
  dispatch({ type: "SHOW_NOTIFICATION", message: `\u2713 No violations found for: ${goal.description.slice(0, 40)}`, severity: "info", autoHideMs: 5e3 });
1720
1821
  dispatch({ type: "ADD_ACTIVITY", message: `No violations found` });
1721
1822
  } else {
1722
- dispatch({ type: "SHOW_NOTIFICATION", message: `Found ${violations.length} violation(s) for: ${goal.description.slice(0, 30)}`, severity: "warning", autoHideMs: 5e3 });
1823
+ dispatch({ type: "SHOW_NOTIFICATION", message: `Found ${violations.length} violation(s) - check Nudges tab`, severity: "warning", autoHideMs: 5e3 });
1723
1824
  dispatch({ type: "ADD_ACTIVITY", message: `Found ${violations.length} violation(s)` });
1724
1825
  for (const violation of violations) {
1725
1826
  dispatch({ type: "ADD_INSIGHTS", insights: [{
1827
+ id: `scan-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
1726
1828
  message: violation.message,
1727
1829
  severity: violation.severity,
1728
1830
  timestamp: Date.now(),
1729
1831
  category: "goal",
1832
+ type: "warning",
1730
1833
  dismissed: false,
1731
- priority: "high",
1732
- file: violation.file
1834
+ priority: violation.severity === "critical" ? 9 : 6,
1835
+ file: violation.file,
1836
+ relatedIssues: []
1733
1837
  }] });
1734
1838
  }
1735
1839
  }
1736
1840
  } catch (error) {
1737
- dispatch({ type: "ADD_ACTIVITY", message: `Check failed: ${error instanceof Error ? error.message : "unknown"}` });
1841
+ const errorMsg = error instanceof Error ? error.message : "unknown error";
1842
+ dispatch({ type: "SHOW_NOTIFICATION", message: `Check failed: ${errorMsg}`, severity: "warning", autoHideMs: 5e3 });
1843
+ dispatch({ type: "ADD_ACTIVITY", message: `Check failed: ${errorMsg}` });
1738
1844
  }
1739
1845
  }, [dispatch, goalsPanel.goals]);
1740
1846
  useInput4((_input, key) => {
@@ -1754,7 +1860,7 @@ function GoalsView() {
1754
1860
  if (_input === "a") dispatch({ type: "SET_GOALS_INPUT_MODE", mode: "add" });
1755
1861
  else if (key.upArrow || _input === "k") dispatch({ type: "SELECT_GOAL", index: Math.max(0, goalsPanel.selectedIndex - 1) });
1756
1862
  else if (key.downArrow || _input === "j") dispatch({ type: "SELECT_GOAL", index: Math.min(activeGoals.length - 1, goalsPanel.selectedIndex + 1) });
1757
- else if (_input === "s") {
1863
+ else if (_input === "r") {
1758
1864
  const selected = activeGoals[goalsPanel.selectedIndex];
1759
1865
  if (selected) void checkGoalNow(selected.id);
1760
1866
  } else if (key.return) {
@@ -1763,36 +1869,33 @@ function GoalsView() {
1763
1869
  } else if (_input === "d") {
1764
1870
  const selected = activeGoals[goalsPanel.selectedIndex];
1765
1871
  if (selected) void deleteGoal(selected.id);
1766
- } else if (_input === "c") {
1767
- void clearAchievedGoals();
1768
1872
  } else if (_input === "x") {
1769
- const completed = goalsPanel.goals.filter((g) => g.status === "achieved" || g.status === "failed");
1770
- if (completed[0]) void deleteGoal(completed[0].id);
1873
+ void clearAchievedGoals();
1771
1874
  } else if (_input === "u") {
1772
1875
  const recent = goalsPanel.goals.filter((g) => g.status === "achieved").sort((a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime());
1773
1876
  if (recent[0]) void reactivateGoal(recent[0].id);
1774
1877
  }
1775
1878
  });
1776
- return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", paddingX: 1, children: [
1777
- /* @__PURE__ */ jsx8(Text7, { bold: true, children: "Goals" }),
1778
- goalsPanel.inputMode === "add" ? /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", marginTop: 1, children: [
1779
- /* @__PURE__ */ jsx8(Box7, { borderStyle: "single", borderColor: "green", paddingX: 1, children: /* @__PURE__ */ jsxs7(Text7, { children: [
1879
+ return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", paddingX: 1, children: [
1880
+ /* @__PURE__ */ jsx9(Text8, { bold: true, children: "Goals" }),
1881
+ goalsPanel.inputMode === "add" ? /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginTop: 1, children: [
1882
+ /* @__PURE__ */ jsx9(Box8, { borderStyle: "single", borderColor: "green", paddingX: 1, children: /* @__PURE__ */ jsxs8(Text8, { children: [
1780
1883
  goalsPanel.inputBuffer,
1781
- /* @__PURE__ */ jsx8(Text7, { bold: true, color: "green", children: "|" })
1884
+ /* @__PURE__ */ jsx9(Text8, { bold: true, color: "green", children: "|" })
1782
1885
  ] }) }),
1783
- /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " enter save \xB7 esc cancel" })
1784
- ] }) : /* @__PURE__ */ jsx8(Fragment2, { children: goalsPanel.goals.length === 0 ? /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " No goals yet. Press a to add one." }) : /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
1886
+ /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " enter save \xB7 esc cancel" })
1887
+ ] }) : /* @__PURE__ */ jsx9(Fragment2, { children: goalsPanel.goals.length === 0 ? /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " No goals yet. Press a to add one." }) : /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
1785
1888
  activeGoals.map((goal, idx) => {
1786
1889
  const isSelected = goalsPanel.selectedIndex === idx;
1787
1890
  const progress = calculateGoalProgress(goal);
1788
1891
  const bar = progressBar(progress, 100, 8);
1789
1892
  const source = goal.autoGenerated ? "auto" : "";
1790
- return /* @__PURE__ */ jsxs7(Text7, { children: [
1791
- isSelected ? /* @__PURE__ */ jsx8(Text7, { bold: true, color: "green", children: "> " }) : " ",
1792
- /* @__PURE__ */ jsx8(Text7, { color: "green", children: "\u25CB" }),
1893
+ return /* @__PURE__ */ jsxs8(Text8, { children: [
1894
+ isSelected ? /* @__PURE__ */ jsx9(Text8, { bold: true, color: "green", children: "> " }) : " ",
1895
+ /* @__PURE__ */ jsx9(Text8, { color: "green", children: "\u25CB" }),
1793
1896
  " ",
1794
1897
  goal.description.slice(0, 45),
1795
- /* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
1898
+ /* @__PURE__ */ jsxs8(Text8, { dimColor: true, children: [
1796
1899
  " ",
1797
1900
  bar,
1798
1901
  " ",
@@ -1802,29 +1905,29 @@ function GoalsView() {
1802
1905
  ] })
1803
1906
  ] }, goal.id);
1804
1907
  }),
1805
- achievedGoals.length > 0 && /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", marginTop: 1, children: [
1806
- /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " Achieved" }),
1807
- achievedGoals.slice(0, 5).map((g) => /* @__PURE__ */ jsxs7(Text7, { children: [
1908
+ achievedGoals.length > 0 && /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginTop: 1, children: [
1909
+ /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " Achieved" }),
1910
+ achievedGoals.slice(0, 5).map((g) => /* @__PURE__ */ jsxs8(Text8, { children: [
1808
1911
  " ",
1809
- /* @__PURE__ */ jsx8(Text7, { color: "green", children: "\u25CF" }),
1912
+ /* @__PURE__ */ jsx9(Text8, { color: "green", children: "\u25CF" }),
1810
1913
  " ",
1811
1914
  g.description.slice(0, 50)
1812
1915
  ] }, g.id)),
1813
- achievedGoals.length > 5 && /* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
1916
+ achievedGoals.length > 5 && /* @__PURE__ */ jsxs8(Text8, { dimColor: true, children: [
1814
1917
  " +",
1815
1918
  achievedGoals.length - 5,
1816
1919
  " more"
1817
1920
  ] })
1818
1921
  ] }),
1819
- otherGoals.length > 0 && /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", marginTop: 1, children: [
1820
- /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: " Other" }),
1821
- otherGoals.slice(0, 2).map((g) => /* @__PURE__ */ jsxs7(Text7, { children: [
1922
+ otherGoals.length > 0 && /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginTop: 1, children: [
1923
+ /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " Other" }),
1924
+ otherGoals.slice(0, 2).map((g) => /* @__PURE__ */ jsxs8(Text8, { children: [
1822
1925
  " ",
1823
- /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "\u25CB" }),
1926
+ /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: "\u25CB" }),
1824
1927
  " ",
1825
1928
  g.description.slice(0, 50),
1826
1929
  " ",
1827
- /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: g.status })
1930
+ /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: g.status })
1828
1931
  ] }, g.id))
1829
1932
  ] })
1830
1933
  ] }) })
@@ -1833,8 +1936,8 @@ function GoalsView() {
1833
1936
 
1834
1937
  // src/cli/dashboard/views/HypothesesView.tsx
1835
1938
  import { useCallback as useCallback3 } from "react";
1836
- import { Box as Box8, Text as Text8, useInput as useInput5 } from "ink";
1837
- import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1939
+ import { Box as Box9, Text as Text9, useInput as useInput5 } from "ink";
1940
+ import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1838
1941
  function HypothesesView() {
1839
1942
  const { state, dispatch } = useDashboard();
1840
1943
  const { hypothesesPanel } = state;
@@ -1943,7 +2046,7 @@ function HypothesesView() {
1943
2046
  if (_input === "a") dispatch({ type: "SET_HYPOTHESES_INPUT_MODE", mode: "add" });
1944
2047
  else if (key.upArrow || _input === "k") dispatch({ type: "SELECT_HYPOTHESIS", index: Math.max(0, hypothesesPanel.selectedIndex - 1) });
1945
2048
  else if (key.downArrow || _input === "j") dispatch({ type: "SELECT_HYPOTHESIS", index: Math.min(testing.length - 1, hypothesesPanel.selectedIndex + 1) });
1946
- else if (_input === "t") {
2049
+ else if (_input === "r") {
1947
2050
  const selected = testing[hypothesesPanel.selectedIndex];
1948
2051
  if (selected) void checkHypothesisNow(selected.id);
1949
2052
  } else if (_input === "v") {
@@ -1963,24 +2066,24 @@ function HypothesesView() {
1963
2066
  if (recent[0]) void reactivateHypothesis(recent[0].id);
1964
2067
  }
1965
2068
  });
1966
- return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", paddingX: 1, children: [
1967
- /* @__PURE__ */ jsx9(Text8, { bold: true, children: "Hypotheses" }),
1968
- hypothesesPanel.inputMode === "add" ? /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginTop: 1, children: [
1969
- /* @__PURE__ */ jsx9(Box8, { borderStyle: "single", borderColor: "green", paddingX: 1, children: /* @__PURE__ */ jsxs8(Text8, { children: [
2069
+ return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", paddingX: 1, children: [
2070
+ /* @__PURE__ */ jsx10(Text9, { bold: true, children: "Hypotheses" }),
2071
+ hypothesesPanel.inputMode === "add" ? /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", marginTop: 1, children: [
2072
+ /* @__PURE__ */ jsx10(Box9, { borderStyle: "single", borderColor: "green", paddingX: 1, children: /* @__PURE__ */ jsxs9(Text9, { children: [
1970
2073
  hypothesesPanel.inputBuffer,
1971
- /* @__PURE__ */ jsx9(Text8, { bold: true, color: "green", children: "|" })
2074
+ /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: "|" })
1972
2075
  ] }) }),
1973
- /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " enter save \xB7 esc cancel" })
1974
- ] }) : /* @__PURE__ */ jsx9(Fragment3, { children: hypothesesPanel.hypotheses.length === 0 ? /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " No hypotheses yet. Press a to add one." }) : /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
2076
+ /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: " enter save \xB7 esc cancel" })
2077
+ ] }) : /* @__PURE__ */ jsx10(Fragment3, { children: hypothesesPanel.hypotheses.length === 0 ? /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: " No hypotheses yet. Press a to add one." }) : /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
1975
2078
  testing.map((hypo, idx) => {
1976
2079
  const isSelected = hypothesesPanel.selectedIndex === idx;
1977
2080
  const conf = Math.round(hypo.confidence * 100);
1978
- return /* @__PURE__ */ jsxs8(Text8, { children: [
1979
- isSelected ? /* @__PURE__ */ jsx9(Text8, { bold: true, color: "green", children: "> " }) : " ",
1980
- /* @__PURE__ */ jsx9(Text8, { color: "yellow", children: "\u25CB" }),
2081
+ return /* @__PURE__ */ jsxs9(Text9, { children: [
2082
+ isSelected ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: "> " }) : " ",
2083
+ /* @__PURE__ */ jsx10(Text9, { color: "yellow", children: "\u25CB" }),
1981
2084
  " ",
1982
2085
  hypo.statement.slice(0, 50),
1983
- /* @__PURE__ */ jsxs8(Text8, { dimColor: true, children: [
2086
+ /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
1984
2087
  " ",
1985
2088
  conf,
1986
2089
  "% \xB7 ",
@@ -1989,29 +2092,29 @@ function HypothesesView() {
1989
2092
  ] })
1990
2093
  ] }, hypo.id);
1991
2094
  }),
1992
- validated.length > 0 && /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginTop: 1, children: [
1993
- /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " Validated" }),
1994
- validated.slice(0, 3).map((h) => /* @__PURE__ */ jsxs8(Text8, { children: [
2095
+ validated.length > 0 && /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", marginTop: 1, children: [
2096
+ /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: " Validated" }),
2097
+ validated.slice(0, 3).map((h) => /* @__PURE__ */ jsxs9(Text9, { children: [
1995
2098
  " ",
1996
- /* @__PURE__ */ jsx9(Text8, { color: "green", children: "\u25CF" }),
2099
+ /* @__PURE__ */ jsx10(Text9, { color: "green", children: "\u25CF" }),
1997
2100
  " ",
1998
2101
  h.statement.slice(0, 50)
1999
2102
  ] }, h.id)),
2000
- validated.length > 3 && /* @__PURE__ */ jsxs8(Text8, { dimColor: true, children: [
2103
+ validated.length > 3 && /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
2001
2104
  " +",
2002
2105
  validated.length - 3,
2003
2106
  " more"
2004
2107
  ] })
2005
2108
  ] }),
2006
- invalidated.length > 0 && /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginTop: 1, children: [
2007
- /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " Invalidated" }),
2008
- invalidated.slice(0, 2).map((h) => /* @__PURE__ */ jsxs8(Text8, { children: [
2109
+ invalidated.length > 0 && /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", marginTop: 1, children: [
2110
+ /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: " Invalidated" }),
2111
+ invalidated.slice(0, 2).map((h) => /* @__PURE__ */ jsxs9(Text9, { children: [
2009
2112
  " ",
2010
- /* @__PURE__ */ jsx9(Text8, { color: "red", children: "\u25CF" }),
2113
+ /* @__PURE__ */ jsx10(Text9, { color: "red", children: "\u25CF" }),
2011
2114
  " ",
2012
- /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: h.statement.slice(0, 50) })
2115
+ /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: h.statement.slice(0, 50) })
2013
2116
  ] }, h.id)),
2014
- invalidated.length > 2 && /* @__PURE__ */ jsxs8(Text8, { dimColor: true, children: [
2117
+ invalidated.length > 2 && /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
2015
2118
  " +",
2016
2119
  invalidated.length - 2,
2017
2120
  " more"
@@ -2023,8 +2126,8 @@ function HypothesesView() {
2023
2126
 
2024
2127
  // src/cli/dashboard/views/MemoryTreeView.tsx
2025
2128
  import { useEffect as useEffect2, useCallback as useCallback4 } from "react";
2026
- import { Box as Box9, Text as Text9, useInput as useInput6 } from "ink";
2027
- import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
2129
+ import { Box as Box10, Text as Text10, useInput as useInput6 } from "ink";
2130
+ import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
2028
2131
  function timeAgo2(iso) {
2029
2132
  const ms = Date.now() - new Date(iso).getTime();
2030
2133
  const mins = Math.floor(ms / 6e4);
@@ -2062,15 +2165,15 @@ function MemoryTreeView() {
2062
2165
  });
2063
2166
  const sel = (nodeId) => selectedNode === nodeId;
2064
2167
  if (!loaded) {
2065
- return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", paddingX: 1, children: [
2066
- /* @__PURE__ */ jsx10(Text9, { bold: true, children: "Ledger" }),
2067
- /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: " Loading..." })
2168
+ return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", paddingX: 1, children: [
2169
+ /* @__PURE__ */ jsx11(Text10, { bold: true, children: "Ledger" }),
2170
+ /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: " Loading..." })
2068
2171
  ] });
2069
2172
  }
2070
2173
  if (!snapshot || snapshot.nodes.length === 0 && globalPatterns.length === 0) {
2071
- return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", paddingX: 1, children: [
2072
- /* @__PURE__ */ jsx10(Text9, { bold: true, children: "Ledger" }),
2073
- /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: " No entries yet. Use trie tell or trie watch to build memory." })
2174
+ return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", paddingX: 1, children: [
2175
+ /* @__PURE__ */ jsx11(Text10, { bold: true, children: "Ledger" }),
2176
+ /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: " No entries yet. Use trie tell or trie watch to build memory." })
2074
2177
  ] });
2075
2178
  }
2076
2179
  const decisionNodes = snapshot.nodes.filter((n) => n.type === "decision") ?? [];
@@ -2085,47 +2188,47 @@ function MemoryTreeView() {
2085
2188
  function renderHeader(id, label, count, emptyHint) {
2086
2189
  const expanded = expandedNodes.has(id);
2087
2190
  const isEmpty = count === 0;
2088
- return /* @__PURE__ */ jsxs9(Text9, { children: [
2089
- sel(id) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: "> " }) : " ",
2090
- expanded && !isEmpty ? /* @__PURE__ */ jsx10(Text9, { color: "green", children: "\u25CF" }) : /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "\u25CB" }),
2191
+ return /* @__PURE__ */ jsxs10(Text10, { children: [
2192
+ sel(id) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: "> " }) : " ",
2193
+ expanded && !isEmpty ? /* @__PURE__ */ jsx11(Text10, { color: "green", children: "\u25CF" }) : /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "\u25CB" }),
2091
2194
  " ",
2092
- sel(id) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: label }) : /* @__PURE__ */ jsx10(Text9, { bold: true, children: label }),
2093
- count > 0 ? /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
2195
+ sel(id) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: label }) : /* @__PURE__ */ jsx11(Text10, { bold: true, children: label }),
2196
+ count > 0 ? /* @__PURE__ */ jsxs10(Text10, { dimColor: true, children: [
2094
2197
  " (",
2095
2198
  count,
2096
2199
  ")"
2097
- ] }) : isEmpty && emptyHint ? /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
2200
+ ] }) : isEmpty && emptyHint ? /* @__PURE__ */ jsxs10(Text10, { dimColor: true, children: [
2098
2201
  " ",
2099
2202
  emptyHint
2100
2203
  ] }) : null
2101
2204
  ] });
2102
2205
  }
2103
- return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", paddingX: 1, children: [
2104
- /* @__PURE__ */ jsxs9(Text9, { children: [
2105
- /* @__PURE__ */ jsx10(Text9, { bold: true, children: "Ledger" }),
2106
- /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
2206
+ return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", paddingX: 1, children: [
2207
+ /* @__PURE__ */ jsxs10(Text10, { children: [
2208
+ /* @__PURE__ */ jsx11(Text10, { bold: true, children: "Ledger" }),
2209
+ /* @__PURE__ */ jsxs10(Text10, { dimColor: true, children: [
2107
2210
  " ",
2108
2211
  totalEntries,
2109
2212
  " entries"
2110
2213
  ] })
2111
2214
  ] }),
2112
- /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", marginTop: 1, children: [
2215
+ /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", marginTop: 1, children: [
2113
2216
  renderHeader("decisions", "Decisions", decisionNodes.length, "-- use trie tell or chat"),
2114
2217
  expandedNodes.has("decisions") && decisionNodes.slice(0, 10).map((n) => {
2115
2218
  const nodeId = `decision-${n.id}`;
2116
2219
  const dec = n.data.decision.length > 55 ? n.data.decision.slice(0, 52) + "..." : n.data.decision;
2117
2220
  const outcomeColor = n.data.outcome === "good" ? "green" : n.data.outcome === "bad" ? "red" : void 0;
2118
- return /* @__PURE__ */ jsxs9(Text9, { children: [
2119
- sel(nodeId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: "> " }) : " ",
2221
+ return /* @__PURE__ */ jsxs10(Text10, { children: [
2222
+ sel(nodeId) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: "> " }) : " ",
2120
2223
  " ",
2121
- outcomeColor ? /* @__PURE__ */ jsx10(Text9, { color: outcomeColor, children: "\u25CF" }) : /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "\u25CB" }),
2224
+ outcomeColor ? /* @__PURE__ */ jsx11(Text10, { color: outcomeColor, children: "\u25CF" }) : /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "\u25CB" }),
2122
2225
  " ",
2123
- sel(nodeId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: dec }) : /* @__PURE__ */ jsx10(Text9, { children: dec }),
2124
- /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
2226
+ sel(nodeId) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: dec }) : /* @__PURE__ */ jsx11(Text10, { children: dec }),
2227
+ /* @__PURE__ */ jsxs10(Text10, { dimColor: true, children: [
2125
2228
  " ",
2126
2229
  timeAgo2(n.data.timestamp)
2127
2230
  ] }),
2128
- outcomeColor ? /* @__PURE__ */ jsxs9(Text9, { color: outcomeColor, children: [
2231
+ outcomeColor ? /* @__PURE__ */ jsxs10(Text10, { color: outcomeColor, children: [
2129
2232
  " ",
2130
2233
  n.data.outcome
2131
2234
  ] }) : null
@@ -2137,18 +2240,18 @@ function MemoryTreeView() {
2137
2240
  const nodeId = `incident-${n.id}`;
2138
2241
  const sevColor = n.data.severity === "critical" ? "red" : n.data.severity === "major" ? "yellow" : void 0;
2139
2242
  const desc = n.data.description.length > 55 ? n.data.description.slice(0, 52) + "..." : n.data.description;
2140
- return /* @__PURE__ */ jsxs9(Text9, { children: [
2141
- sel(nodeId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: "> " }) : " ",
2243
+ return /* @__PURE__ */ jsxs10(Text10, { children: [
2244
+ sel(nodeId) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: "> " }) : " ",
2142
2245
  " ",
2143
- sevColor ? /* @__PURE__ */ jsx10(Text9, { color: sevColor, children: "\u25CF" }) : /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "\u25CB" }),
2246
+ sevColor ? /* @__PURE__ */ jsx11(Text10, { color: sevColor, children: "\u25CF" }) : /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "\u25CB" }),
2144
2247
  " ",
2145
- sel(nodeId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: desc }) : /* @__PURE__ */ jsx10(Text9, { children: desc }),
2146
- /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
2248
+ sel(nodeId) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: desc }) : /* @__PURE__ */ jsx11(Text10, { children: desc }),
2249
+ /* @__PURE__ */ jsxs10(Text10, { dimColor: true, children: [
2147
2250
  " ",
2148
2251
  timeAgo2(n.data.timestamp)
2149
2252
  ] }),
2150
2253
  " ",
2151
- n.data.resolved ? /* @__PURE__ */ jsx10(Text9, { color: "green", children: "resolved" }) : /* @__PURE__ */ jsx10(Text9, { color: "yellow", children: "open" })
2254
+ n.data.resolved ? /* @__PURE__ */ jsx11(Text10, { color: "green", children: "resolved" }) : /* @__PURE__ */ jsx11(Text10, { color: "yellow", children: "open" })
2152
2255
  ] }, n.id);
2153
2256
  }),
2154
2257
  renderHeader("patterns", "Learned Patterns", patternNodes.length, "-- Trie learns as you work"),
@@ -2157,17 +2260,17 @@ function MemoryTreeView() {
2157
2260
  const conf = Math.round(n.data.confidence * 100);
2158
2261
  const confColor = conf > 70 ? "green" : conf > 40 ? "yellow" : void 0;
2159
2262
  const desc = n.data.description.length > 50 ? n.data.description.slice(0, 47) + "..." : n.data.description;
2160
- return /* @__PURE__ */ jsxs9(Text9, { children: [
2161
- sel(nodeId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: "> " }) : " ",
2263
+ return /* @__PURE__ */ jsxs10(Text10, { children: [
2264
+ sel(nodeId) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: "> " }) : " ",
2162
2265
  " ",
2163
- n.data.isAntiPattern ? /* @__PURE__ */ jsx10(Text9, { color: "red", children: "!" }) : /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "\u25CB" }),
2266
+ n.data.isAntiPattern ? /* @__PURE__ */ jsx11(Text10, { color: "red", children: "!" }) : /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "\u25CB" }),
2164
2267
  " ",
2165
- sel(nodeId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: desc }) : /* @__PURE__ */ jsx10(Text9, { children: desc }),
2268
+ sel(nodeId) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: desc }) : /* @__PURE__ */ jsx11(Text10, { children: desc }),
2166
2269
  " ",
2167
- confColor ? /* @__PURE__ */ jsxs9(Text9, { color: confColor, children: [
2270
+ confColor ? /* @__PURE__ */ jsxs10(Text10, { color: confColor, children: [
2168
2271
  conf,
2169
2272
  "%"
2170
- ] }) : /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
2273
+ ] }) : /* @__PURE__ */ jsxs10(Text10, { dimColor: true, children: [
2171
2274
  conf,
2172
2275
  "%"
2173
2276
  ] })
@@ -2177,13 +2280,13 @@ function MemoryTreeView() {
2177
2280
  expandedNodes.has("cross-project") && globalPatterns.slice(0, 8).map((pattern) => {
2178
2281
  const patternId = `global-${pattern.id}`;
2179
2282
  const desc = pattern.pattern.length > 45 ? pattern.pattern.slice(0, 42) + "..." : pattern.pattern;
2180
- return /* @__PURE__ */ jsxs9(Text9, { children: [
2181
- sel(patternId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: "> " }) : " ",
2283
+ return /* @__PURE__ */ jsxs10(Text10, { children: [
2284
+ sel(patternId) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: "> " }) : " ",
2182
2285
  " ",
2183
- /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "\u25CB" }),
2286
+ /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "\u25CB" }),
2184
2287
  " ",
2185
- sel(patternId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: desc }) : /* @__PURE__ */ jsx10(Text9, { children: desc }),
2186
- /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
2288
+ sel(patternId) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: desc }) : /* @__PURE__ */ jsx11(Text10, { children: desc }),
2289
+ /* @__PURE__ */ jsxs10(Text10, { dimColor: true, children: [
2187
2290
  " ",
2188
2291
  pattern.projects.length,
2189
2292
  " projects \xB7 ",
@@ -2192,21 +2295,21 @@ function MemoryTreeView() {
2192
2295
  ] })
2193
2296
  ] }, pattern.id);
2194
2297
  }),
2195
- hotspots.length > 0 && /* @__PURE__ */ jsxs9(Fragment4, { children: [
2298
+ hotspots.length > 0 && /* @__PURE__ */ jsxs10(Fragment4, { children: [
2196
2299
  renderHeader("hotspots", "Risk Hotspots", hotspots.length),
2197
2300
  expandedNodes.has("hotspots") && hotspots.slice(0, 10).map((n) => {
2198
2301
  const nodeId = `file-${n.id}`;
2199
2302
  const path2 = n.data.path.split("/").slice(-2).join("/");
2200
2303
  const isCritical = n.data.riskLevel === "critical";
2201
- return /* @__PURE__ */ jsxs9(Text9, { children: [
2202
- sel(nodeId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: "> " }) : " ",
2304
+ return /* @__PURE__ */ jsxs10(Text10, { children: [
2305
+ sel(nodeId) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: "> " }) : " ",
2203
2306
  " ",
2204
- /* @__PURE__ */ jsx10(Text9, { color: isCritical ? "red" : "yellow", children: "\u25CF" }),
2307
+ /* @__PURE__ */ jsx11(Text10, { color: isCritical ? "red" : "yellow", children: "\u25CF" }),
2205
2308
  " ",
2206
- sel(nodeId) ? /* @__PURE__ */ jsx10(Text9, { bold: true, color: "green", children: path2 }) : /* @__PURE__ */ jsx10(Text9, { children: path2 }),
2309
+ sel(nodeId) ? /* @__PURE__ */ jsx11(Text10, { bold: true, color: "green", children: path2 }) : /* @__PURE__ */ jsx11(Text10, { children: path2 }),
2207
2310
  " ",
2208
- /* @__PURE__ */ jsx10(Text9, { color: isCritical ? "red" : "yellow", children: n.data.riskLevel }),
2209
- /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
2311
+ /* @__PURE__ */ jsx11(Text10, { color: isCritical ? "red" : "yellow", children: n.data.riskLevel }),
2312
+ /* @__PURE__ */ jsxs10(Text10, { dimColor: true, children: [
2210
2313
  " ",
2211
2314
  n.data.changeCount,
2212
2315
  " changes"
@@ -2218,8 +2321,8 @@ function MemoryTreeView() {
2218
2321
  }
2219
2322
 
2220
2323
  // src/cli/dashboard/views/RawLogView.tsx
2221
- import { Box as Box10, Text as Text10, useInput as useInput7 } from "ink";
2222
- import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
2324
+ import { Box as Box11, Text as Text11, useInput as useInput7 } from "ink";
2325
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
2223
2326
  function RawLogView() {
2224
2327
  const { state, dispatch } = useDashboard();
2225
2328
  const { rawLog, rawLogPage } = state;
@@ -2231,10 +2334,10 @@ function RawLogView() {
2231
2334
  });
2232
2335
  const startIdx = rawLogPage * pageSize;
2233
2336
  const logs = rawLog.slice(startIdx, startIdx + pageSize);
2234
- return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", paddingX: 1, children: [
2235
- /* @__PURE__ */ jsxs10(Text10, { children: [
2236
- /* @__PURE__ */ jsx11(Text10, { bold: true, children: "Log" }),
2237
- /* @__PURE__ */ jsxs10(Text10, { dimColor: true, children: [
2337
+ return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", paddingX: 1, children: [
2338
+ /* @__PURE__ */ jsxs11(Text11, { children: [
2339
+ /* @__PURE__ */ jsx12(Text11, { bold: true, children: "Log" }),
2340
+ /* @__PURE__ */ jsxs11(Text11, { dimColor: true, children: [
2238
2341
  " ",
2239
2342
  rawLog.length,
2240
2343
  " entries \xB7 page ",
@@ -2243,11 +2346,11 @@ function RawLogView() {
2243
2346
  totalPages
2244
2347
  ] })
2245
2348
  ] }),
2246
- rawLog.length === 0 ? /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: " No log entries yet" }) : logs.map((entry, i) => {
2247
- 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" });
2248
- return /* @__PURE__ */ jsxs10(Text10, { children: [
2349
+ rawLog.length === 0 ? /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: " No log entries yet" }) : logs.map((entry, i) => {
2350
+ const dot = entry.level === "error" ? /* @__PURE__ */ jsx12(Text11, { color: "red", children: "\u25CF" }) : entry.level === "warn" ? /* @__PURE__ */ jsx12(Text11, { color: "yellow", children: "\u25CF" }) : entry.level === "info" ? /* @__PURE__ */ jsx12(Text11, { color: "green", children: "\u25CF" }) : /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: "\u25CB" });
2351
+ return /* @__PURE__ */ jsxs11(Text11, { children: [
2249
2352
  " ",
2250
- /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: entry.time }),
2353
+ /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: entry.time }),
2251
2354
  " ",
2252
2355
  dot,
2253
2356
  " ",
@@ -2259,7 +2362,7 @@ function RawLogView() {
2259
2362
 
2260
2363
  // src/cli/dashboard/views/ChatView.tsx
2261
2364
  import { useCallback as useCallback5, useRef } from "react";
2262
- import { Box as Box11, Text as Text11, useInput as useInput8 } from "ink";
2365
+ import { Box as Box12, Text as Text12, useInput as useInput8 } from "ink";
2263
2366
 
2264
2367
  // src/tools/tell.ts
2265
2368
  import path from "path";
@@ -4990,10 +5093,9 @@ Type "yes" to proceed, or "no" to cancel.
4990
5093
  const filePattern = input.filePattern ? String(input.filePattern).trim() : void 0;
4991
5094
  const contextLines = typeof input.contextLines === "number" ? input.contextLines : 2;
4992
5095
  if (!pattern) return "Search pattern is required.";
4993
- const { execSync } = await import("child_process");
5096
+ const { spawnSync } = await import("child_process");
4994
5097
  try {
4995
5098
  const rgArgs = [
4996
- "rg",
4997
5099
  "--context",
4998
5100
  String(contextLines),
4999
5101
  "--heading",
@@ -5019,29 +5121,37 @@ Type "yes" to proceed, or "no" to cancel.
5019
5121
  "!coverage/**"
5020
5122
  );
5021
5123
  rgArgs.push(pattern, directory);
5022
- const result = execSync(rgArgs.join(" "), {
5124
+ const result = spawnSync("rg", rgArgs, {
5023
5125
  encoding: "utf-8",
5024
- maxBuffer: 10 * 1024 * 1024
5126
+ maxBuffer: 10 * 1024 * 1024,
5025
5127
  // 10MB
5128
+ cwd: directory
5026
5129
  });
5027
- if (!result.trim()) {
5130
+ if (result.error) {
5131
+ if (result.error.code === "ENOENT") {
5132
+ return `Error: ripgrep (rg) not found. Please install it:
5133
+ brew install ripgrep (macOS)
5134
+ apt install ripgrep (Ubuntu)
5135
+ Or search files using the AI-powered goal scan instead.`;
5136
+ }
5137
+ return `Search failed: ${result.error.message}`;
5138
+ }
5139
+ if (result.status === 1 || !result.stdout || !result.stdout.trim()) {
5028
5140
  return `No matches found for pattern: ${pattern}`;
5029
5141
  }
5142
+ if (result.status === 2) {
5143
+ return `Search error: ${result.stderr || "Unknown error"}`;
5144
+ }
5030
5145
  const maxLength = 5e3;
5031
- const truncated = result.length > maxLength ? result.slice(0, maxLength) + `
5146
+ const output = result.stdout;
5147
+ const truncated = output.length > maxLength ? output.slice(0, maxLength) + `
5032
5148
 
5033
- ... (truncated, ${result.length - maxLength} more characters)` : result;
5034
- const matchCount = (result.match(/^\d+:/gm) || []).length;
5149
+ ... (truncated, ${output.length - maxLength} more characters)` : output;
5150
+ const matchCount = (output.match(/^\d+:/gm) || []).length;
5035
5151
  return `Found ${matchCount} match(es) for "${pattern}":
5036
5152
 
5037
5153
  ${truncated}`;
5038
5154
  } catch (error) {
5039
- if (error.status === 1) {
5040
- return `No matches found for pattern: ${pattern}`;
5041
- }
5042
- if (error.status === 2) {
5043
- return `Error: ripgrep not found. Please install ripgrep (brew install ripgrep)`;
5044
- }
5045
5155
  return `Search failed: ${error.message}`;
5046
5156
  }
5047
5157
  }
@@ -5051,7 +5161,7 @@ ${truncated}`;
5051
5161
  }
5052
5162
 
5053
5163
  // src/cli/dashboard/views/ChatView.tsx
5054
- import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
5164
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
5055
5165
  async function buildContext(workDir, dashboardState) {
5056
5166
  const parts = [];
5057
5167
  if (dashboardState?.agentInsights) {
@@ -5148,17 +5258,24 @@ var SYSTEM_PROMPT = `You are Trie, a code guardian assistant embedded in a termi
5148
5258
 
5149
5259
  **What you CAN do:**
5150
5260
  - Check recent goal violations (nudges) in the provided project context
5151
- - Search source code files using trie_search_files (uses ripgrep)
5152
5261
  - Record incidents, decisions, and feedback about the codebase
5153
5262
  - Query stored decisions, blockers, facts, and questions from the decision ledger
5154
5263
  - Create and manage goals and hypotheses
5155
5264
  - Propose fixes for goal violations (requires user confirmation before spawning Claude Code)
5156
5265
  - Save work checkpoints
5157
5266
 
5267
+ **IMPORTANT - File Searching:**
5268
+ - You have a trie_search_files tool but it requires ripgrep to be installed
5269
+ - For searching code patterns (like emojis, TODO comments, etc.), use the provided project context first
5270
+ - If the user asks about emojis or goal violations, check the "Recent goal violations (nudges)" section
5271
+ - DO NOT use regex Unicode ranges in search patterns - they don't work reliably
5272
+ - Instead, suggest the user press 'r' in Goals view to run an AI-powered scan
5273
+
5158
5274
  **When user asks about code content:**
5159
5275
  1. First check the "Recent goal violations (nudges)" section in project context
5160
- 2. If not found in nudges, use trie_search_files to search source code directly
5161
- 3. For emojis specifically, search for common emoji patterns or unicode ranges
5276
+ 2. If found, report what you see
5277
+ 3. If not found, suggest: "Press 'r' in Goals view to run an AI-powered scan"
5278
+ 4. Do NOT attempt manual file searches for emoji detection
5162
5279
 
5163
5280
  **When user asks to fix violations:**
5164
5281
  1. Look in "Recent goal violations (nudges)" section of project context
@@ -5167,9 +5284,9 @@ var SYSTEM_PROMPT = `You are Trie, a code guardian assistant embedded in a termi
5167
5284
  4. Do NOT assume the user wants to proceed - always get confirmation first
5168
5285
 
5169
5286
  Examples:
5170
- - User: "do we have emojis?" \u2192 Check nudges first. If none, use trie_search_files to search for emoji patterns.
5287
+ - User: "do we have emojis?" \u2192 Check nudges first. If none: "I don't see emoji violations in recent nudges. Press 'r' in Goals view to run a scan."
5171
5288
  - User: "fix the emoji violation" \u2192 Find emoji violation in nudges, call trie_propose_fix (will ask user to confirm)
5172
- - User: "search for TODO comments" \u2192 Use trie_search_files with pattern "TODO|FIXME"
5289
+ - User: "search for TODO comments" \u2192 "The file search tool requires ripgrep. I recommend checking recent nudges or running a goal scan."
5173
5290
 
5174
5291
  Answer concisely. Reference specific files, decisions, and patterns when relevant.`;
5175
5292
  function ChatView() {
@@ -5185,22 +5302,22 @@ function ChatView() {
5185
5302
  dispatch({ type: "SET_CHAT_LOADING", loading: true });
5186
5303
  try {
5187
5304
  const workDir = getWorkingDirectory(void 0, true);
5188
- const lastMessage = messages[messages.length - 1];
5189
- if (lastMessage?.role === "assistant" && lastMessage.pendingFix) {
5305
+ const lastAssistantMessage = messages.filter((m) => m.role === "assistant").pop();
5306
+ if (lastAssistantMessage?.pendingFix) {
5190
5307
  const response = question.trim().toLowerCase();
5191
5308
  if (response === "yes" || response === "y") {
5192
5309
  const { spawnClaudeCodeFix } = await import("./terminal-spawn-2GU5KLPS.js");
5193
5310
  try {
5194
- await spawnClaudeCodeFix(lastMessage.pendingFix);
5311
+ await spawnClaudeCodeFix(lastAssistantMessage.pendingFix);
5195
5312
  dispatch({
5196
5313
  type: "ADD_CHAT_MESSAGE",
5197
5314
  role: "assistant",
5198
- content: `\u2713 Spawned Claude Code in a new terminal to fix "${lastMessage.pendingFix.file}".
5315
+ content: `\u2713 Spawned Claude Code in a new terminal to fix "${lastAssistantMessage.pendingFix.file}".
5199
5316
 
5200
5317
  Claude Code will:
5201
5318
  1. Review the file
5202
- 2. Understand the goal: "${lastMessage.pendingFix.goal}"
5203
- 3. Fix the violation: "${lastMessage.pendingFix.violation}"
5319
+ 2. Understand the goal: "${lastAssistantMessage.pendingFix.goal}"
5320
+ 3. Fix the violation: "${lastAssistantMessage.pendingFix.violation}"
5204
5321
  4. Preserve all functionality
5205
5322
 
5206
5323
  Check the new terminal window to see the fix in progress.`
@@ -5324,24 +5441,24 @@ ${contextBlock}`;
5324
5441
  }
5325
5442
  });
5326
5443
  if (!isAIAvailable()) {
5327
- return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", paddingX: 1, children: [
5328
- /* @__PURE__ */ jsx12(Text11, { bold: true, children: "Chat" }),
5329
- /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: " AI is not available. Press s to open settings and add your Anthropic API key." })
5444
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", paddingX: 1, children: [
5445
+ /* @__PURE__ */ jsx13(Text12, { bold: true, children: "Chat" }),
5446
+ /* @__PURE__ */ jsx13(Text12, { dimColor: true, children: " AI is not available. Press s to open settings and add your Anthropic API key." })
5330
5447
  ] });
5331
5448
  }
5332
- return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", paddingX: 1, flexGrow: 1, children: [
5333
- /* @__PURE__ */ jsx12(Text11, { bold: true, children: "Chat" }),
5334
- /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", flexGrow: 1, overflow: "hidden", marginTop: 1, children: [
5335
- messages.length === 0 && !loading && /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: " Ask about your codebase, decisions, patterns, or risks." }),
5336
- messages.map((msg, idx) => /* @__PURE__ */ jsx12(Box11, { flexDirection: "column", marginTop: idx === 0 ? 0 : 1, marginBottom: 1, children: msg.role === "user" ? /* @__PURE__ */ jsxs11(Text11, { children: [
5449
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", paddingX: 1, flexGrow: 1, children: [
5450
+ /* @__PURE__ */ jsx13(Text12, { bold: true, children: "Chat" }),
5451
+ /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", flexGrow: 1, overflow: "hidden", marginTop: 1, children: [
5452
+ messages.length === 0 && !loading && /* @__PURE__ */ jsx13(Text12, { dimColor: true, children: " Ask about your codebase, decisions, patterns, or risks." }),
5453
+ messages.map((msg, idx) => /* @__PURE__ */ jsx13(Box12, { flexDirection: "column", marginTop: idx === 0 ? 0 : 1, marginBottom: 1, children: msg.role === "user" ? /* @__PURE__ */ jsxs12(Text12, { children: [
5337
5454
  " ",
5338
- /* @__PURE__ */ jsx12(Text11, { bold: true, color: "green", children: "You:" }),
5455
+ /* @__PURE__ */ jsx13(Text12, { bold: true, color: "green", children: "You:" }),
5339
5456
  " ",
5340
5457
  msg.content
5341
- ] }) : /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
5342
- msg.toolCalls && msg.toolCalls.length > 0 && msg.toolCalls.map((tc, ti) => /* @__PURE__ */ jsxs11(Text11, { dimColor: true, children: [
5458
+ ] }) : /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
5459
+ msg.toolCalls && msg.toolCalls.length > 0 && msg.toolCalls.map((tc, ti) => /* @__PURE__ */ jsxs12(Text12, { dimColor: true, children: [
5343
5460
  " ",
5344
- /* @__PURE__ */ jsxs11(Text11, { color: "yellow", children: [
5461
+ /* @__PURE__ */ jsxs12(Text12, { color: "yellow", children: [
5345
5462
  "[",
5346
5463
  tc.name,
5347
5464
  "]"
@@ -5349,16 +5466,16 @@ ${contextBlock}`;
5349
5466
  " ",
5350
5467
  formatToolInput(tc.input)
5351
5468
  ] }, ti)),
5352
- msg.content.split("\n").map((line, li) => /* @__PURE__ */ jsxs11(Text11, { children: [
5469
+ msg.content.split("\n").map((line, li) => /* @__PURE__ */ jsxs12(Text12, { children: [
5353
5470
  li === 0 ? " Trie: " : " ",
5354
5471
  line
5355
5472
  ] }, li))
5356
5473
  ] }) }, idx)),
5357
- loading && /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: " Thinking..." })
5474
+ loading && /* @__PURE__ */ jsx13(Text12, { dimColor: true, children: " Thinking..." })
5358
5475
  ] }),
5359
- /* @__PURE__ */ jsx12(Box11, { borderStyle: "single", borderColor: "green", paddingX: 1, flexShrink: 0, children: /* @__PURE__ */ jsxs11(Text11, { children: [
5360
- inputBuffer || /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: "Ask a question..." }),
5361
- /* @__PURE__ */ jsx12(Text11, { bold: true, color: "green", children: "|" })
5476
+ /* @__PURE__ */ jsx13(Box12, { borderStyle: "single", borderColor: "green", paddingX: 1, flexShrink: 0, children: /* @__PURE__ */ jsxs12(Text12, { children: [
5477
+ inputBuffer || /* @__PURE__ */ jsx13(Text12, { dimColor: true, children: "Ask a question..." }),
5478
+ /* @__PURE__ */ jsx13(Text12, { bold: true, color: "green", children: "|" })
5362
5479
  ] }) })
5363
5480
  ] });
5364
5481
  }
@@ -5373,7 +5490,7 @@ function formatToolInput(input) {
5373
5490
  }
5374
5491
 
5375
5492
  // src/cli/dashboard/App.tsx
5376
- import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
5493
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
5377
5494
  var MAIN_VIEWS = ["overview", "memory", "goals", "hypotheses", "agent", "chat"];
5378
5495
  async function applyGoalFix(fix, dispatch) {
5379
5496
  try {
@@ -5412,7 +5529,7 @@ ${content}
5412
5529
  fixedContent = fixedContent.replace(/^```\w*\n?/, "").replace(/\n?```$/, "");
5413
5530
  }
5414
5531
  await writeFile(fullPath, fixedContent, "utf-8");
5415
- const { recordGoalViolationFixed, getActiveGoals } = await import("./goal-validator-P67RNO2U.js");
5532
+ const { recordGoalViolationFixed, getActiveGoals } = await import("./goal-validator-RD6QBQJB.js");
5416
5533
  const goals = await getActiveGoals(projectPath);
5417
5534
  const matchedGoal = goals.find((g) => g.description === fix.goalDescription);
5418
5535
  if (matchedGoal) {
@@ -5429,6 +5546,7 @@ function DashboardApp({ onReady }) {
5429
5546
  const { state, dispatch } = useDashboard();
5430
5547
  const { exit } = useApp();
5431
5548
  const [showConfig, setShowConfig] = useState2(false);
5549
+ const [showHelp, setShowHelp] = useState2(false);
5432
5550
  const dispatchRef = useRef2(dispatch);
5433
5551
  dispatchRef.current = dispatch;
5434
5552
  const stateRef = useRef2(state);
@@ -5588,6 +5706,14 @@ function DashboardApp({ onReady }) {
5588
5706
  if (showConfig) return;
5589
5707
  if (state.view === "goals" && state.goalsPanel.inputMode === "add") return;
5590
5708
  if (state.view === "hypotheses" && state.hypothesesPanel.inputMode === "add") return;
5709
+ if ((input === "/" || input === "?") && state.view !== "chat") {
5710
+ setShowHelp(!showHelp);
5711
+ return;
5712
+ }
5713
+ if (showHelp) {
5714
+ setShowHelp(false);
5715
+ return;
5716
+ }
5591
5717
  if (state.view === "chat") {
5592
5718
  if (key.tab) {
5593
5719
  const currentIndex = MAIN_VIEWS.indexOf(state.view);
@@ -5606,6 +5732,9 @@ function DashboardApp({ onReady }) {
5606
5732
  dispatch({ type: "SET_VIEW", view: MAIN_VIEWS[nextIndex] || "overview" });
5607
5733
  return;
5608
5734
  }
5735
+ if (state.view === "goals" || state.view === "hypotheses") {
5736
+ return;
5737
+ }
5609
5738
  if (input === "s") {
5610
5739
  setShowConfig(true);
5611
5740
  return;
@@ -5644,41 +5773,41 @@ function DashboardApp({ onReady }) {
5644
5773
  let viewComponent;
5645
5774
  switch (state.view) {
5646
5775
  case "overview":
5647
- viewComponent = /* @__PURE__ */ jsx13(OverviewView, {});
5776
+ viewComponent = /* @__PURE__ */ jsx14(OverviewView, {});
5648
5777
  break;
5649
5778
  case "agent":
5650
- viewComponent = /* @__PURE__ */ jsx13(AgentView, {});
5779
+ viewComponent = /* @__PURE__ */ jsx14(AgentView, {});
5651
5780
  break;
5652
5781
  case "goals":
5653
- viewComponent = /* @__PURE__ */ jsx13(GoalsView, {});
5782
+ viewComponent = /* @__PURE__ */ jsx14(GoalsView, {});
5654
5783
  break;
5655
5784
  case "hypotheses":
5656
- viewComponent = /* @__PURE__ */ jsx13(HypothesesView, {});
5785
+ viewComponent = /* @__PURE__ */ jsx14(HypothesesView, {});
5657
5786
  break;
5658
5787
  case "memory":
5659
- viewComponent = /* @__PURE__ */ jsx13(MemoryTreeView, {});
5788
+ viewComponent = /* @__PURE__ */ jsx14(MemoryTreeView, {});
5660
5789
  break;
5661
5790
  case "rawlog":
5662
- viewComponent = /* @__PURE__ */ jsx13(RawLogView, {});
5791
+ viewComponent = /* @__PURE__ */ jsx14(RawLogView, {});
5663
5792
  break;
5664
5793
  case "chat":
5665
- viewComponent = /* @__PURE__ */ jsx13(ChatView, {});
5794
+ viewComponent = /* @__PURE__ */ jsx14(ChatView, {});
5666
5795
  break;
5667
5796
  default:
5668
- viewComponent = /* @__PURE__ */ jsx13(OverviewView, {});
5797
+ viewComponent = /* @__PURE__ */ jsx14(OverviewView, {});
5669
5798
  }
5670
- return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", height: process.stdout.rows || 40, children: [
5671
- /* @__PURE__ */ jsx13(Header, {}),
5672
- /* @__PURE__ */ jsx13(Notification, {}),
5673
- /* @__PURE__ */ jsx13(Box12, { flexGrow: 1, flexDirection: "column", overflow: "hidden", children: showConfig ? /* @__PURE__ */ jsx13(ConfigDialog, { onClose: () => {
5799
+ return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", height: process.stdout.rows || 40, children: [
5800
+ /* @__PURE__ */ jsx14(Header, {}),
5801
+ !showConfig && !showHelp && /* @__PURE__ */ jsx14(Notification, {}),
5802
+ /* @__PURE__ */ jsx14(Box13, { flexGrow: 1, flexDirection: "column", overflow: "hidden", children: showConfig ? /* @__PURE__ */ jsx14(ConfigDialog, { onClose: () => {
5674
5803
  setShowConfig(false);
5675
5804
  void persistConfig();
5676
- } }) : viewComponent }),
5677
- /* @__PURE__ */ jsx13(Footer, {})
5805
+ } }) : showHelp ? /* @__PURE__ */ jsx14(HelpDialog, { view: state.view, onClose: () => setShowHelp(false) }) : viewComponent }),
5806
+ /* @__PURE__ */ jsx14(Footer, {})
5678
5807
  ] });
5679
5808
  }
5680
5809
  function App({ onReady }) {
5681
- return /* @__PURE__ */ jsx13(DashboardProvider, { children: /* @__PURE__ */ jsx13(DashboardApp, { onReady }) });
5810
+ return /* @__PURE__ */ jsx14(DashboardProvider, { children: /* @__PURE__ */ jsx14(DashboardApp, { onReady }) });
5682
5811
  }
5683
5812
 
5684
5813
  // src/cli/dashboard/index.ts
@@ -5688,7 +5817,7 @@ var InteractiveDashboard = class {
5688
5817
  getConfigFn = null;
5689
5818
  async start() {
5690
5819
  this.app = render(
5691
- React9.createElement(App, {
5820
+ React10.createElement(App, {
5692
5821
  onReady: (handler, getConfig) => {
5693
5822
  this.updateHandler = handler;
5694
5823
  this.getConfigFn = getConfig;
@@ -5733,4 +5862,4 @@ export {
5733
5862
  handleCheckpointTool,
5734
5863
  InteractiveDashboard
5735
5864
  };
5736
- //# sourceMappingURL=chunk-GSYMJLZY.js.map
5865
+ //# sourceMappingURL=chunk-7BY2KVIN.js.map