pantheon-opencode 1.5.0-beta.12 → 1.5.0-beta.14

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.
@@ -165,7 +165,7 @@ async function detectVersion(api) {
165
165
  if (ver) return ver;
166
166
  }
167
167
  } catch {}
168
- return "1.5.0-beta.12";
168
+ return "1.5.0-beta.14";
169
169
  }
170
170
  /**
171
171
  * usage-bar — AI subscription usage gauge for the opencode TUI.
@@ -933,22 +933,24 @@ function compareDelegationEntries(a, b) {
933
933
  return (b.updatedAt ?? b.startedAt) - (a.updatedAt ?? a.startedAt);
934
934
  }
935
935
  /** Split the panel list: active jobs (running/retry, stale-marked) first,
936
- * then the most recent terminal reports, then the archived tail (paginated
937
- * in the View). Pure — so the history-only panel (no sessionID) is testable
936
+ * then the most recent terminal reports; the remaining tail is collapsed
937
+ * by the View into a single "… +N more" line. Pure — so the history-only panel (no sessionID) is testable
938
938
  * without the TUI runtime. */
939
939
  function splitDelegationList(all, maxRecent = 8, now = Date.now(), staleThresholdMs = 1800 * 1e3) {
940
940
  const isActiveState = (st) => st === "running" || st === "retry" || st === "stale-running";
941
- const active = all.filter((d) => isActiveState(d.state)).map((d) => markStaleIfRunning(d, now, staleThresholdMs));
942
- const terminal = all.filter((d) => !isActiveState(d.state));
943
941
  return {
944
- active,
945
- recent: terminal.slice(0, maxRecent),
946
- archived: terminal.slice(maxRecent)
942
+ active: all.filter((d) => isActiveState(d.state)).map((d) => markStaleIfRunning(d, now, staleThresholdMs)).sort(compareDelegationEntries),
943
+ recent: all.filter((d) => !isActiveState(d.state)).filter((d) => {
944
+ if (d.updatedAt === null || !Number.isFinite(d.updatedAt)) return true;
945
+ const age = now - d.updatedAt;
946
+ if (age < 0) return true;
947
+ return age < (delegationRowStatus(d.state) === "failed" ? DELEGATION_FAILED_RETENTION_MS : DELEGATION_DONE_RETENTION_MS);
948
+ }).sort(compareDelegationEntries).slice(0, maxRecent)
947
949
  };
948
950
  }
949
- /** The list the panel actually renders (kept for the header count and
950
- * existing tests): active jobs first, then the most recent terminal
951
- * reports (capped) — the archived tail is rendered separately. Pure. */
951
+ /** Live-first window used by {@link ceilingDelegationList} (kept for the
952
+ * ceiling helper and existing tests): active jobs first, then the most
953
+ * recent terminal reports (capped). Pure. */
952
954
  function visibleDelegationList(all, maxTerminal = 8, now = Date.now(), staleThresholdMs = 1800 * 1e3) {
953
955
  const { active, recent } = splitDelegationList(all, maxTerminal, now, staleThresholdMs);
954
956
  return [...active, ...recent];
@@ -959,6 +961,10 @@ const STALE_RUNNING_THRESHOLD_MS = 1800 * 1e3;
959
961
  * considered stale. Combined with the stale-running threshold to produce the
960
962
  * display-only `stale-running` state. */
961
963
  const IDLE_SILENCE_MS = 60 * 1e3;
964
+ /** Visual-only terminal retention windows. Reports remain on disk and in the
965
+ * board; these constants only control which rows enter the TUI window. */
966
+ const DELEGATION_DONE_RETENTION_MS = 120 * 1e3;
967
+ const DELEGATION_FAILED_RETENTION_MS = 600 * 1e3;
962
968
  /**
963
969
  * Mark a running entry as `stale-running` if it has been running longer than
964
970
  * the threshold AND has no recent activity (no `updatedAt` change in the last
@@ -976,7 +982,7 @@ function markStaleIfRunning(entry, now, thresholdMs = STALE_RUNNING_THRESHOLD_MS
976
982
  state: "stale-running"
977
983
  };
978
984
  }
979
- /** Compact elapsed-time label: "5m 12s", "1h 30m", "2d 4h" — ticks every
985
+ /** Compact elapsed-time label, single unit only: "12s"/"3m"/"1h"/"2d" — ticks every
980
986
  * second for running jobs. */
981
987
  function fmtElapsed(ms) {
982
988
  const total = Math.max(0, Math.floor(ms / 1e3));
@@ -984,9 +990,9 @@ function fmtElapsed(ms) {
984
990
  const hours = Math.floor(total % 86400 / 3600);
985
991
  const minutes = Math.floor(total % 3600 / 60);
986
992
  const seconds = total % 60;
987
- if (days > 0) return `${days}d ${hours}h`;
988
- if (hours > 0) return `${hours}h ${minutes}m`;
989
- if (minutes > 0) return `${minutes}m ${seconds}s`;
993
+ if (days > 0) return `${days}d`;
994
+ if (hours > 0) return `${hours}h`;
995
+ if (minutes > 0) return `${minutes}m`;
990
996
  return `${seconds}s`;
991
997
  }
992
998
  /** Elapsed label for one entry: an ACTIVE entry (running/retry/stale-running)
@@ -1040,38 +1046,18 @@ function delegationSpinnerFrame(now) {
1040
1046
  * (`retry`, `stale-running`). Fase 1 deliberately omits speculative
1041
1047
  * blocked/paused/scheduled/skipped. There is no `pending` display state: a
1042
1048
  * pre-dispatch tool part maps to `running` in {@link reduceDelegationToolPart}. */
1043
- /** Static glyph per display state. `running` shows its base spinner frame;
1044
- * callers that animate must prefer {@link delegationStateMarker}. Unicode
1045
- * geometric shapes only (no Nerd Font) — shape is an independent channel
1046
- * from color, so rows stay legible without color. */
1047
- const DELEGATION_STATE_GLYPHS = {
1048
- running: "⠋",
1049
- retry: "⟳",
1050
- "stale-running": "⚠",
1051
- completed: "✓",
1052
- error: "✕",
1053
- cancelled: "−",
1054
- startup_failed: "⚠",
1055
- startup_unknown: "⚠"
1056
- };
1057
- function delegationStateGlyph(state) {
1058
- return DELEGATION_STATE_GLYPHS[state];
1059
- }
1060
- /** Row marker (`<glyph> `) — the state channel. `running` animates through
1061
- * {@link delegationSpinnerFrame} for the given tick; every other state is
1062
- * static. Pure. */
1063
- function delegationStateMarker(state, now = Date.now()) {
1064
- return `${state === "running" ? delegationSpinnerFrame(now) : delegationStateGlyph(state)} `;
1065
- }
1066
1049
  /** Semantic tone mapped to the TUI theme at the row ({@link DelegationRow}).
1067
1050
  * Kept separate + pure so the color channel is testable without booting the
1068
1051
  * renderer. */
1052
+ /** Color is the ONLY channel separating `stale-running` from a live `running`
1053
+ * row — the 4-glyph row design has no dedicated stale shape. Display-only;
1054
+ * no behavior change. */
1069
1055
  function delegationStateTone(state) {
1070
1056
  switch (state) {
1071
1057
  case "running":
1072
1058
  case "retry":
1073
1059
  case "startup_unknown": return "warning";
1074
- case "stale-running":
1060
+ case "stale-running": return "warning";
1075
1061
  case "error":
1076
1062
  case "startup_failed": return "error";
1077
1063
  case "completed": return "success";
@@ -1082,9 +1068,6 @@ function delegationStateTone(state) {
1082
1068
  const latestToolActivity = /* @__PURE__ */ new Map();
1083
1069
  const MAX_TOOL_ACTIVITY_ENTRIES = 200;
1084
1070
  const TOOL_ACTIVITY_TTL_MS = 300 * 1e3;
1085
- /** Archived-section pagination state — module-level so it survives sidebar
1086
- * remounts (route changes) without leaking into the component tree. */
1087
- const archivedUiState = { page: 0 };
1088
1071
  /** First usable summary string from common tool input fields. */
1089
1072
  function summarizeToolInput(input) {
1090
1073
  if (!input) return "";
@@ -1155,6 +1138,11 @@ function mergeChildDelegationSources(children, live) {
1155
1138
  for (const liveEntry of live) {
1156
1139
  if (liveEntry.alias === null && liveEntry.taskID === null && Date.now() - liveEntry.startedAt > 3e4) continue;
1157
1140
  const incoming = toDelegationEntry(liveEntry);
1141
+ const isNativeLive = liveEntry.tool === "task" && liveEntry.alias === null;
1142
+ if (isNativeLive) {
1143
+ incoming.source = "children-only";
1144
+ incoming.alias = "native-task";
1145
+ }
1158
1146
  const index = (incoming.taskID !== void 0 ? byTask.get(incoming.taskID) : void 0) ?? (incoming.alias !== "" ? bySessionAlias.get(key(incoming.sessionID, incoming.alias)) : void 0);
1159
1147
  if (index === void 0) {
1160
1148
  result.push(incoming);
@@ -1182,7 +1170,7 @@ function mergeChildDelegationSources(children, live) {
1182
1170
  startedAt: Math.min(existing.startedAt, incoming.startedAt),
1183
1171
  updatedAt: incoming.updatedAt,
1184
1172
  read: incoming.read,
1185
- source: "live"
1173
+ source: isNativeLive ? existing.source : "live"
1186
1174
  };
1187
1175
  }
1188
1176
  result.sort(compareDelegationEntries);
@@ -1366,7 +1354,7 @@ function removeDelegationEntry(map, partIDOrCallID) {
1366
1354
  * SDK exposes `api.state.part(messageID)`). The native `task` tool spawns a
1367
1355
  * child session with parentID = caller — the same mechanism as
1368
1356
  * pantheon_delegate — so its parts feed the live-map as the native signal
1369
- * (rows render `nat:` via the children channel). Pure w.r.t. I/O — used
1357
+ * (rows come from the children channel). Pure w.r.t. I/O — used
1370
1358
  * by the mount re-scan to re-seed the live map after compaction/attach. */
1371
1359
  function collectDelegationToolParts(messages, getParts) {
1372
1360
  const out = [];
@@ -1499,44 +1487,14 @@ function mergeBoardDelegationSources(base, board) {
1499
1487
  bySessionAlias.set(key(incoming.sessionID, incoming.alias), next);
1500
1488
  continue;
1501
1489
  }
1502
- out[index] = incoming;
1490
+ out[index] = {
1491
+ ...incoming,
1492
+ sessionID: incoming.sessionID !== "" ? incoming.sessionID : out[index]?.sessionID ?? ""
1493
+ };
1503
1494
  }
1504
1495
  out.sort(compareDelegationEntries);
1505
1496
  return out;
1506
1497
  }
1507
- /** 'session' = focused session only (default); 'all' = every session the
1508
- * board knows about. */
1509
- /** api.kv key holding the persisted scope (defaults to 'session'). */
1510
- const DELEGATION_SCOPE_KV_KEY = "delegations.scope";
1511
- /** Structural subset of TuiKV — kept local so the pure helpers are testable
1512
- * without the TUI runtime. */
1513
- /** Read the persisted scope; anything malformed/absent → 'session'. */
1514
- function readDelegationScope(kv) {
1515
- try {
1516
- return kv?.get?.("delegations.scope", "session") === "all" ? "all" : "session";
1517
- } catch {
1518
- return "session";
1519
- }
1520
- }
1521
- /** Persist the scope. Failure is non-fatal — the signal keeps it in memory. */
1522
- function writeDelegationScope(kv, scope) {
1523
- try {
1524
- kv?.set?.(DELEGATION_SCOPE_KV_KEY, scope);
1525
- } catch {}
1526
- }
1527
- /** Keyboard/click toggle target. Pure. */
1528
- function nextDelegationScope(scope) {
1529
- return scope === "session" ? "all" : "session";
1530
- }
1531
- /** Keep only the focused session's jobs ('session') or all of them ('all').
1532
- * An empty sessionID marks a current-session child (the children channel is
1533
- * session-scoped and only fills sessionID from a matching md report), so it
1534
- * counts as the current session. With no resolved session there is nothing
1535
- * to scope against — fail-open to the full list. Pure. */
1536
- function filterDelegationsByScope(entries, scope, sessionID) {
1537
- if (scope === "all" || sessionID === null) return [...entries];
1538
- return entries.filter((entry) => entry.sessionID === sessionID || entry.sessionID === "");
1539
- }
1540
1498
  /** Server-aligned session id validity: opencode rejects anything not starting
1541
1499
  * with "ses" (SchemaError). This deliberately mirrors that exact contract —
1542
1500
  * nothing stricter, nothing looser — so a template placeholder ("{sessionID}"),
@@ -1593,33 +1551,59 @@ function childStatusToState(status) {
1593
1551
  if (status === "retry") return "retry";
1594
1552
  return "running";
1595
1553
  }
1596
- /** Short row prefix for a delegation entry (one of the two visual channels
1597
- * that split native task() work from pantheon_delegate jobs — the other is
1598
- * {@link delegationIcon}):
1554
+ /** Status-only row model: ONE glyph + ONE identity per row.
1599
1555
  *
1600
- * - `nat:<agent>` — a native task() child (source 'children-only', no board
1601
- * report). The child session carries no board alias, so the agent IS the
1602
- * identity.
1603
- * - `pan:<alias>` — a pantheon_delegate board row (`pan:apo-1`), the same
1604
- * alias the manager prints in pantheon_delegation_list.
1605
- *
1606
- * Short prefixes keep the narrow sidebar readable (the old
1607
- * `pan:apo-1`/`nat:` tags ate the row width). */
1608
- function delegationTag(entry) {
1609
- return entry.source === "children-only" ? `nat:${entry.agent}` : `pan:${entry.alias}`;
1610
- }
1611
- /** Row glyph: hollow diamond `◇` for native task() children (info color,
1612
- * outline) vs filled diamond `◆` for pantheon_delegate rows (state color).
1613
- * Shape + color are independent channels, so the split stays legible even
1614
- * without color. */
1615
- function delegationIcon(entry) {
1616
- return entry.source === "children-only" ? "◇" : "◆";
1617
- }
1618
- /** Row identity after the status marker + glyph. Pantheon rows append the
1619
- * agent (`pan:apo-1 apollo`); native rows already carry it inside the tag
1620
- * (`nat:apollo`) and must not duplicate it. */
1621
- function formatDelegationIdentity(entry) {
1622
- return entry.source === "children-only" ? delegationTag(entry) : `${delegationTag(entry)} ${entry.agent}`;
1556
+ * A row is
1557
+ * `{glyph} {alias:7} {elapsed:>5}` plus a muted description line. The short
1558
+ * alias (`apo-1`) is the single identity; rows without a board alias show
1559
+ * the agent instead (never both). */
1560
+ /** Map every FSM/display state to one of the 4 row kinds. reconciled never
1561
+ * reaches the panel (the board parser drops it) but reads as done;
1562
+ * cancelled reads as done; startup_failed reads as failed while
1563
+ * startup_unknown (no error known) reads as retry. Pure. */
1564
+ function delegationRowStatus(state) {
1565
+ switch (state) {
1566
+ case "running":
1567
+ case "stale-running": return "active";
1568
+ case "retry":
1569
+ case "startup_unknown": return "retry";
1570
+ case "completed":
1571
+ case "cancelled": return "done";
1572
+ case "error":
1573
+ case "startup_failed": return "failed";
1574
+ }
1575
+ }
1576
+ /** The only 4 glyphs a row may show: animated active, done, failed, retry.
1577
+ * Shape is redundant with color (never the only signal). Pure. */
1578
+ const DELEGATION_ROW_GLYPHS = {
1579
+ active: "⠋",
1580
+ done: "✓",
1581
+ failed: "✕",
1582
+ retry: "⟳"
1583
+ };
1584
+ function delegationRowGlyph(status) {
1585
+ return DELEGATION_ROW_GLYPHS[status];
1586
+ }
1587
+ /** Row marker (`<glyph> `) — the single state channel. `active` animates
1588
+ * through the 1s spinner for the given tick; every other kind is static.
1589
+ * Pure. */
1590
+ function delegationRowMarker(state, now = Date.now()) {
1591
+ const status = delegationRowStatus(state);
1592
+ return `${status === "active" ? delegationSpinnerFrame(now) : delegationRowGlyph(status)} `;
1593
+ }
1594
+ /** ONE identity per row: the short board alias (`apo-1`); a row without a
1595
+ * board alias (native task() child, alias `native-task`) shows the agent
1596
+ * instead — never alias + agent stacked. Pure. */
1597
+ function delegationRowIdentity(entry) {
1598
+ if (entry.alias === "native-task" && entry.agent !== "") return entry.agent;
1599
+ return entry.alias;
1600
+ }
1601
+ /** Fixed alias cell, pad-right + hard-truncate to `width` (default 7) so
1602
+ * identities line up across rows. Pure. */
1603
+ const DELEGATION_ALIAS_WIDTH = 7;
1604
+ function formatDelegationAlias(identity, width = 7) {
1605
+ if (identity.length >= width) return identity.slice(0, width);
1606
+ return `${identity}${" ".repeat(width - identity.length)}`;
1623
1607
  }
1624
1608
  /** Max description width on the row detail line — the old 180-char slice
1625
1609
  * wrapped the sidebar; 44 keeps one readable line. */
@@ -1645,33 +1629,67 @@ function truncateDelegationDescription(text, max = 44) {
1645
1629
  if (graphemes.length <= max) return text;
1646
1630
  return `${graphemes.slice(0, Math.max(0, max - 1)).join("")}\u2026`;
1647
1631
  }
1648
- /** Fixed elapsed-time box: right-aligned to `width` (default 8) so elapsed
1649
- * values line up across rows, e.g. ` 12s`. A label that already fills
1632
+ /** Fixed elapsed-time box: right-aligned to `width` (default 5) so elapsed
1633
+ * values line up across rows, e.g. ` 12s`. A label that already fills
1650
1634
  * the box is returned untouched. Pure. */
1651
- const DELEGATION_ELAPSED_WIDTH = 8;
1652
- function formatDelegationElapsed(entry, now, width = 8) {
1635
+ const DELEGATION_ELAPSED_WIDTH = 5;
1636
+ function formatDelegationElapsed(entry, now, width = 5) {
1653
1637
  const label = delegationElapsed(entry, now);
1654
1638
  if (label.length >= width) return label;
1655
1639
  return `${" ".repeat(width - label.length)}${label}`;
1656
1640
  }
1657
- /** First row line: `<marker><glyph> <identity>`. The marker already carries
1658
- * its trailing space. Pure — the row renders the returned string verbatim. */
1659
- function formatDelegationRow(entry, marker) {
1660
- return `${marker}${delegationIcon(entry)} ${formatDelegationIdentity(entry)}`;
1661
- }
1662
- /** Header summary: `(N active · M done · nat:K pan:M)`. Active counts
1663
- * running/retry AND display-only stale-running (a stale row is still a live
1664
- * job — it must never read as done). Pure. */
1641
+ /** Colored left half of a row line: `<marker><alias:7> ` — the state glyph
1642
+ * plus the single identity, padded so the muted elapsed column aligns. The
1643
+ * row renders this colored lead separately from the muted elapsed tail. Pure. */
1644
+ function formatDelegationRowLead(entry, marker) {
1645
+ return `${marker}${formatDelegationAlias(delegationRowIdentity(entry))} `;
1646
+ }
1647
+ /** Visible-row ceiling for the panel: the remainder collapses into a single
1648
+ * "… +N more" line. Live rows render first, so a running job is never hidden
1649
+ * by the cap. */
1650
+ const DELEGATION_VISIBLE_CEILING = 8;
1651
+ /** Header summary: `(N active · M done)` plus `· K failed` only when K > 0.
1652
+ * Active counts running/retry AND display-only stale-running (a stale row is
1653
+ * still a live job — it must never read as done); failed counts
1654
+ * error/startup_failed; cancelled reads as done. Pure. */
1665
1655
  function formatDelegationHeader(entries) {
1666
1656
  let active = 0;
1667
- for (const e of entries) if (e.state === "running" || e.state === "retry" || e.state === "stale-running") active++;
1668
- const done = entries.length - active;
1669
- const counts = countDelegationSources(entries);
1670
- return `(${active} active \u00b7 ${done} done \u00b7 nat:${counts.native} pan:${counts.pantheon})`;
1657
+ let done = 0;
1658
+ let failed = 0;
1659
+ for (const e of entries) switch (delegationRowStatus(e.state)) {
1660
+ case "active":
1661
+ case "retry":
1662
+ active++;
1663
+ break;
1664
+ case "failed":
1665
+ failed++;
1666
+ break;
1667
+ case "done":
1668
+ done++;
1669
+ break;
1670
+ }
1671
+ const tail = failed > 0 ? ` · ${failed} failed` : "";
1672
+ return `(${active} active · ${done} done${tail})`;
1673
+ }
1674
+ /** Cap the panel: live rows first, then most-recent retained terminal rows, at
1675
+ * most `maxVisible` total. Hidden counts describe the retained render list,
1676
+ * not expired history. */
1677
+ function ceilingDelegationList(all, maxVisible = 8, now = Date.now()) {
1678
+ const { active, recent } = splitDelegationList(all, all.length, now);
1679
+ const visibleActive = active.slice(0, maxVisible);
1680
+ const visible = [...visibleActive, ...recent.slice(0, Math.max(0, maxVisible - visibleActive.length))];
1681
+ const hiddenActive = Math.max(0, active.length - visibleActive.length);
1682
+ const hiddenTerminal = Math.max(0, recent.length - (visible.length - visibleActive.length));
1683
+ return {
1684
+ visible,
1685
+ hidden: hiddenActive + hiddenTerminal,
1686
+ hiddenActive,
1687
+ hiddenTerminal
1688
+ };
1671
1689
  }
1672
1690
  /** Split a display list into native task() rows vs pantheon_delegate rows.
1673
1691
  * Native = source 'children-only' (no board report); everything else counts
1674
- * as pantheon. Pure — powers the header breakdown + the hooks.log line. */
1692
+ * as pantheon. Pure — powers the hooks.log line. */
1675
1693
  function countDelegationSources(entries) {
1676
1694
  let native = 0;
1677
1695
  for (const e of entries) if (e.source === "children-only") native++;
@@ -1696,15 +1714,18 @@ function formatPanelLogLine(children, pantheon, native, md, events) {
1696
1714
  * time.created. A report-less child is a NATIVE task() child (every
1697
1715
  * child of the current session — pantheon_delegate OR the native `task()`
1698
1716
  * tool — carries parentID = caller), so it gets source 'children-only',
1699
- * the internal alias 'native-task' and the `nat:` tag instead of a
1717
+ * the internal alias 'native-task' instead of a
1700
1718
  * board alias. The 'task nativa' description fallback keeps the row
1701
1719
  * non-empty when the child carries no title.
1702
1720
  * Terminal md state wins over the derived state; a running md defers to
1703
1721
  * the child's live status. A running child is NEVER archived — it always
1704
1722
  * lands in the active split (splitDelegationList active = running/retry).
1723
+ * `parentSessionID` (the focused session id) is stamped on report-less
1724
+ * children so the row carries its origin session; omit it and they stay
1725
+ * unscoped ('').
1705
1726
  * Sorted running-first (compareDelegationEntries).
1706
1727
  * Pure — no I/O. */
1707
- function childrenToDelegationEntries(children, md, now = Date.now()) {
1728
+ function childrenToDelegationEntries(children, md, now = Date.now(), parentSessionID = "") {
1708
1729
  const byTaskID = /* @__PURE__ */ new Map();
1709
1730
  for (const m of md) if (m.taskID !== void 0 && !byTaskID.has(m.taskID)) byTaskID.set(m.taskID, m);
1710
1731
  const out = [];
@@ -1716,7 +1737,7 @@ function childrenToDelegationEntries(children, md, now = Date.now()) {
1716
1737
  const state = mdEntry !== void 0 && mdEntry.state !== "running" ? mdEntry.state : childStatusToState(child.status);
1717
1738
  out.push({
1718
1739
  alias: mdEntry?.alias ?? "native-task",
1719
- sessionID: mdEntry?.sessionID ?? "",
1740
+ sessionID: mdEntry?.sessionID ?? parentSessionID,
1720
1741
  taskID: child.id,
1721
1742
  agent: mdEntry?.agent ?? child.agent ?? "agent",
1722
1743
  state,
@@ -1737,8 +1758,19 @@ function childrenToDelegationEntries(children, md, now = Date.now()) {
1737
1758
  * unsubstituted "{sessionID}" placeholder can never be routed. */
1738
1759
  function navigateToDelegationSession(route, taskID) {
1739
1760
  if (typeof route?.navigate !== "function" || !isValidSessionId(taskID)) return false;
1740
- route.navigate("session", { sessionID: taskID });
1741
- return true;
1761
+ try {
1762
+ const navigation = route.navigate("session", { sessionID: taskID });
1763
+ if (navigation !== void 0) Promise.resolve(navigation).catch(() => void 0);
1764
+ return true;
1765
+ } catch {
1766
+ return false;
1767
+ }
1768
+ }
1769
+ /** Build the mouse handler used by each delegation row. */
1770
+ function createDelegationRowOpenHandler(route, taskID) {
1771
+ return () => {
1772
+ navigateToDelegationSession(route, taskID);
1773
+ };
1742
1774
  }
1743
1775
  /** Silence-by-default panel logger.
1744
1776
  * @param projectRoot the PROJECT ROOT — the logger appends to
@@ -1802,7 +1834,7 @@ function SessionRow(props) {
1802
1834
  }
1803
1835
  function DelegationRow(props) {
1804
1836
  const theme = () => props.api.theme.current;
1805
- const color = createMemo(() => {
1837
+ const tone = createMemo(() => {
1806
1838
  const t = theme();
1807
1839
  switch (delegationStateTone(props.job.state)) {
1808
1840
  case "warning": return t.warning;
@@ -1811,57 +1843,52 @@ function DelegationRow(props) {
1811
1843
  default: return t.textMuted;
1812
1844
  }
1813
1845
  });
1814
- const marker = createMemo(() => delegationStateMarker(props.job.state, props.animationNow));
1815
- const tagColor = createMemo(() => props.job.source === "children-only" ? theme().info : color());
1816
- const description = createMemo(() => truncateDelegationDescription(props.job.description));
1846
+ const marker = createMemo(() => delegationRowMarker(props.job.state, props.animationNow));
1847
+ const lead = createMemo(() => formatDelegationRowLead(props.job, marker()));
1817
1848
  const elapsed = createMemo(() => formatDelegationElapsed(props.job, props.now));
1849
+ const description = createMemo(() => truncateDelegationDescription(props.job.description));
1818
1850
  const activity = createMemo(() => latestToolActivityFor(latestToolActivity, props.job.taskID, props.now));
1819
- const open = () => {
1820
- navigateToDelegationSession(props.api.route, props.job.taskID);
1821
- };
1851
+ const open = createDelegationRowOpenHandler(props.api.route, props.job.taskID);
1822
1852
  return (() => {
1823
- var _el$13 = createElement("box"), _el$14 = createElement("box"), _el$15 = createElement("text"), _el$16 = createElement("box"), _el$18 = createElement("text");
1853
+ var _el$13 = createElement("box"), _el$14 = createElement("box"), _el$15 = createElement("text"), _el$16 = createElement("span"), _el$17 = createElement("span");
1824
1854
  insertNode(_el$13, _el$14);
1825
- insertNode(_el$13, _el$16);
1826
1855
  setProp(_el$13, "onMouseDown", open);
1827
1856
  insertNode(_el$14, _el$15);
1828
1857
  setProp(_el$14, "flexDirection", "row");
1829
- insert(_el$15, () => formatDelegationRow(props.job, marker()));
1830
- insertNode(_el$16, _el$18);
1831
- setProp(_el$16, "flexDirection", "row");
1832
- insert(_el$16, createComponent(Show, {
1858
+ insertNode(_el$15, _el$16);
1859
+ insertNode(_el$15, _el$17);
1860
+ insert(_el$16, lead);
1861
+ insert(_el$17, elapsed);
1862
+ insert(_el$13, createComponent(Show, {
1833
1863
  get when() {
1834
1864
  return description() !== "";
1835
1865
  },
1836
1866
  get children() {
1837
- var _el$17 = createElement("text");
1838
- insert(_el$17, description);
1839
- effect((_$p) => setProp(_el$17, "fg", theme().textMuted, _$p));
1840
- return _el$17;
1867
+ var _el$18 = createElement("text");
1868
+ insert(_el$18, () => ` ${description()}`);
1869
+ effect((_$p) => setProp(_el$18, "fg", theme().textMuted, _$p));
1870
+ return _el$18;
1841
1871
  }
1842
- }), _el$18);
1843
- insert(_el$18, elapsed);
1872
+ }), null);
1844
1873
  insert(_el$13, createComponent(Show, {
1845
1874
  get when() {
1846
1875
  return activity();
1847
1876
  },
1848
1877
  children: (a) => (() => {
1849
1878
  var _el$19 = createElement("text");
1850
- insert(_el$19, () => ` \u21b3 ${truncateDelegationDescription(`${a().tool}${a().summary !== "" ? ` ${a().summary}` : ""}`)}`);
1879
+ insert(_el$19, () => ` ↳ ${truncateDelegationDescription(`${a().tool}${a().summary !== "" ? ` ${a().summary}` : ""}`)}`);
1851
1880
  effect((_$p) => setProp(_el$19, "fg", theme().textMuted, _$p));
1852
1881
  return _el$19;
1853
1882
  })()
1854
1883
  }), null);
1855
1884
  effect((_p$) => {
1856
- var _v$5 = tagColor(), _v$6 = description() !== "" ? "space-between" : "flex-end", _v$7 = theme().textMuted;
1857
- _v$5 !== _p$.e && (_p$.e = setProp(_el$15, "fg", _v$5, _p$.e));
1858
- _v$6 !== _p$.t && (_p$.t = setProp(_el$16, "justifyContent", _v$6, _p$.t));
1859
- _v$7 !== _p$.a && (_p$.a = setProp(_el$18, "fg", _v$7, _p$.a));
1885
+ var _v$5 = tone(), _v$6 = theme().textMuted;
1886
+ _v$5 !== _p$.e && (_p$.e = setProp(_el$16, "fg", _v$5, _p$.e));
1887
+ _v$6 !== _p$.t && (_p$.t = setProp(_el$17, "fg", _v$6, _p$.t));
1860
1888
  return _p$;
1861
1889
  }, {
1862
1890
  e: void 0,
1863
- t: void 0,
1864
- a: void 0
1891
+ t: void 0
1865
1892
  });
1866
1893
  return _el$13;
1867
1894
  })();
@@ -1921,11 +1948,6 @@ function View(props) {
1921
1948
  });
1922
1949
  const projectRoot = createMemo(() => resolvePantheonRoot(props.api.state.path));
1923
1950
  const panelLog = createTuiLogger(projectRoot());
1924
- const [delegationScope, setDelegationScope] = createSignal(readDelegationScope(props.api.kv));
1925
- const applyDelegationScope = (scope) => {
1926
- setDelegationScope(scope);
1927
- writeDelegationScope(props.api.kv, scope);
1928
- };
1929
1951
  const [childDelegations, setChildDelegations] = createSignal([]);
1930
1952
  const [now, setNow] = createSignal(Date.now());
1931
1953
  const [animationNow, setAnimationNow] = createSignal(Date.now());
@@ -1977,8 +1999,7 @@ function View(props) {
1977
1999
  const childEntries = childrenToDelegationEntries(children.map((c) => ({
1978
2000
  ...c,
1979
2001
  status: resolveStatus(c.id)
1980
- })), md, now());
1981
- for (const entry of childEntries) if (entry.sessionID === "") entry.sessionID = sessionID;
2002
+ })), md, now(), sessionID);
1982
2003
  for (const [k, v] of props.liveStore.map) if (v.alias === null && v.taskID === null && Date.now() - v.startedAt > 3e4) props.liveStore.map.delete(k);
1983
2004
  const liveEntries = [...props.liveStore.map.values()].filter((entry) => entry.sessionID === sessionID);
1984
2005
  setChildDelegations(mergeBoardDelegationSources(mergeChildDelegationSources(childEntries, liveEntries), board));
@@ -1990,19 +2011,8 @@ function View(props) {
1990
2011
  })();
1991
2012
  return delegationsInflight;
1992
2013
  };
1993
- const scopedDelegations = createMemo(() => filterDelegationsByScope(childDelegations(), delegationScope(), resolveCurrentSessionID({
1994
- sessionID: props.sessionID,
1995
- api: props.api
1996
- })));
1997
- const delegationSplit = createMemo(() => splitDelegationList(scopedDelegations()));
1998
- const visibleDelegations = createMemo(() => [...delegationSplit().active, ...delegationSplit().recent]);
1999
- const delegationHeader = createMemo(() => formatDelegationHeader(scopedDelegations()));
2000
- const [archivedPage, setArchivedPage] = createSignal(archivedUiState.page);
2001
- const clampArchivedPage = (page, pages) => {
2002
- const clamped = Math.max(0, Math.min(page, Math.max(0, pages - 1)));
2003
- archivedUiState.page = clamped;
2004
- setArchivedPage(clamped);
2005
- };
2014
+ const delegationCeiling = createMemo(() => ceilingDelegationList(childDelegations(), 8, now()));
2015
+ const delegationHeader = createMemo(() => formatDelegationHeader(delegationCeiling().visible));
2006
2016
  onMount(() => {
2007
2017
  const cleanup = [];
2008
2018
  try {
@@ -2046,23 +2056,6 @@ function View(props) {
2046
2056
  if (parts.length > 0 && seedLiveDelegationMap(props.liveStore.map, parts) > 0) props.liveStore.bump();
2047
2057
  }
2048
2058
  } catch {}
2049
- try {
2050
- const keymap = props.api?.keymap;
2051
- if (typeof keymap?.registerLayer === "function") {
2052
- const off = keymap.registerLayer({
2053
- priority: 1e3,
2054
- commands: [{
2055
- name: "pantheon.delegations.toggleScope",
2056
- run: () => applyDelegationScope(nextDelegationScope(delegationScope()))
2057
- }],
2058
- bindings: [{
2059
- key: "ctrl+shift+d",
2060
- cmd: "pantheon.delegations.toggleScope"
2061
- }]
2062
- });
2063
- if (typeof off === "function") cleanup.push(off);
2064
- }
2065
- } catch {}
2066
2059
  onCleanup(() => cleanup.forEach((fn) => {
2067
2060
  fn();
2068
2061
  }));
@@ -2074,7 +2067,7 @@ function View(props) {
2074
2067
  return _el$20;
2075
2068
  })();
2076
2069
  return (() => {
2077
- var _el$22 = createElement("box"), _el$23 = createElement("text"), _el$24 = createElement("box"), _el$25 = createElement("text"), _el$26 = createElement("text"), _el$28 = createElement("box"), _el$29 = createElement("text"), _el$30 = createElement("text"), _el$31 = createElement("text"), _el$33 = createElement("text"), _el$35 = createElement("text"), _el$37 = createElement("text");
2070
+ var _el$22 = createElement("box"), _el$23 = createElement("text"), _el$24 = createElement("box"), _el$25 = createElement("text"), _el$26 = createElement("text"), _el$28 = createElement("box"), _el$29 = createElement("text"), _el$30 = createElement("text");
2078
2071
  insertNode(_el$22, _el$23);
2079
2072
  insertNode(_el$22, _el$24);
2080
2073
  insertNode(_el$22, _el$28);
@@ -2087,10 +2080,10 @@ function View(props) {
2087
2080
  return branch();
2088
2081
  },
2089
2082
  children: (b) => (() => {
2090
- var _el$40 = createElement("text");
2091
- insert(_el$40, b);
2092
- effect((_$p) => setProp(_el$40, "fg", theme().textMuted, _$p));
2093
- return _el$40;
2083
+ var _el$33 = createElement("text");
2084
+ insert(_el$33, b);
2085
+ effect((_$p) => setProp(_el$33, "fg", theme().textMuted, _$p));
2086
+ return _el$33;
2094
2087
  })()
2095
2088
  }), _el$24);
2096
2089
  insert(_el$22, createComponent(Show, {
@@ -2099,37 +2092,37 @@ function View(props) {
2099
2092
  },
2100
2093
  get fallback() {
2101
2094
  return (() => {
2102
- var _el$41 = createElement("box"), _el$42 = createElement("text");
2103
- insertNode(_el$41, _el$42);
2104
- setProp(_el$41, "flexDirection", "row");
2105
- setProp(_el$41, "gap", 1);
2106
- insertNode(_el$42, createTextNode(`Preset: default`));
2107
- effect((_$p) => setProp(_el$42, "fg", theme().textMuted, _$p));
2108
- return _el$41;
2095
+ var _el$34 = createElement("box"), _el$35 = createElement("text");
2096
+ insertNode(_el$34, _el$35);
2097
+ setProp(_el$34, "flexDirection", "row");
2098
+ setProp(_el$34, "gap", 1);
2099
+ insertNode(_el$35, createTextNode(`Preset: default`));
2100
+ effect((_$p) => setProp(_el$35, "fg", theme().textMuted, _$p));
2101
+ return _el$34;
2109
2102
  })();
2110
2103
  },
2111
2104
  children: (name) => (() => {
2112
- var _el$44 = createElement("box"), _el$45 = createElement("text"), _el$47 = createElement("text"), _el$48 = createElement("text");
2113
- insertNode(_el$44, _el$45);
2114
- insertNode(_el$44, _el$47);
2115
- insertNode(_el$44, _el$48);
2116
- setProp(_el$44, "flexDirection", "row");
2117
- setProp(_el$44, "gap", 1);
2118
- insertNode(_el$45, createTextNode(`⚡ Preset:`));
2119
- insert(_el$47, name);
2120
- insert(_el$48, () => `(${preset().source ?? ""})`);
2105
+ var _el$37 = createElement("box"), _el$38 = createElement("text"), _el$40 = createElement("text"), _el$41 = createElement("text");
2106
+ insertNode(_el$37, _el$38);
2107
+ insertNode(_el$37, _el$40);
2108
+ insertNode(_el$37, _el$41);
2109
+ setProp(_el$37, "flexDirection", "row");
2110
+ setProp(_el$37, "gap", 1);
2111
+ insertNode(_el$38, createTextNode(`⚡ Preset:`));
2112
+ insert(_el$40, name);
2113
+ insert(_el$41, () => `(${preset().source ?? ""})`);
2121
2114
  effect((_p$) => {
2122
- var _v$17 = theme().textMuted, _v$18 = theme().accent, _v$19 = theme().textMuted;
2123
- _v$17 !== _p$.e && (_p$.e = setProp(_el$45, "fg", _v$17, _p$.e));
2124
- _v$18 !== _p$.t && (_p$.t = setProp(_el$47, "fg", _v$18, _p$.t));
2125
- _v$19 !== _p$.a && (_p$.a = setProp(_el$48, "fg", _v$19, _p$.a));
2115
+ var _v$10 = theme().textMuted, _v$11 = theme().accent, _v$12 = theme().textMuted;
2116
+ _v$10 !== _p$.e && (_p$.e = setProp(_el$38, "fg", _v$10, _p$.e));
2117
+ _v$11 !== _p$.t && (_p$.t = setProp(_el$40, "fg", _v$11, _p$.t));
2118
+ _v$12 !== _p$.a && (_p$.a = setProp(_el$41, "fg", _v$12, _p$.a));
2126
2119
  return _p$;
2127
2120
  }, {
2128
2121
  e: void 0,
2129
2122
  t: void 0,
2130
2123
  a: void 0
2131
2124
  });
2132
- return _el$44;
2125
+ return _el$37;
2133
2126
  })()
2134
2127
  }), _el$24);
2135
2128
  insert(_el$22, createComponent(HR, {}), _el$24);
@@ -2150,12 +2143,12 @@ function View(props) {
2150
2143
  },
2151
2144
  get fallback() {
2152
2145
  return (() => {
2153
- var _el$49 = createElement("box"), _el$50 = createElement("text");
2154
- insertNode(_el$49, _el$50);
2155
- setProp(_el$49, "marginLeft", 1);
2156
- insertNode(_el$50, createTextNode(`No recent sessions`));
2157
- effect((_$p) => setProp(_el$50, "fg", theme().textMuted, _$p));
2158
- return _el$49;
2146
+ var _el$42 = createElement("box"), _el$43 = createElement("text");
2147
+ insertNode(_el$42, _el$43);
2148
+ setProp(_el$42, "marginLeft", 1);
2149
+ insertNode(_el$43, createTextNode(`No recent sessions`));
2150
+ effect((_$p) => setProp(_el$43, "fg", theme().textMuted, _$p));
2151
+ return _el$42;
2159
2152
  })();
2160
2153
  },
2161
2154
  get children() {
@@ -2180,26 +2173,13 @@ function View(props) {
2180
2173
  }), _el$28);
2181
2174
  insertNode(_el$28, _el$29);
2182
2175
  insertNode(_el$28, _el$30);
2183
- insertNode(_el$28, _el$31);
2184
- insertNode(_el$28, _el$33);
2185
- insertNode(_el$28, _el$35);
2186
- insertNode(_el$28, _el$37);
2187
2176
  setProp(_el$28, "onMouseDown", () => setShowDelegations((x) => !x));
2188
2177
  setProp(_el$29, "attributes", 1);
2189
2178
  insert(_el$29, () => `${showDelegations() ? "▼" : "▶"} Delegations`);
2190
- insert(_el$30, () => ` ${delegationHeader()}`);
2191
- insertNode(_el$31, createTextNode(` `));
2192
- insertNode(_el$33, createTextNode(`[Sessão]`));
2193
- setProp(_el$33, "onMouseDown", (e) => {
2194
- if (typeof e === "object" && e !== null && "stopPropagation" in e) e.stopPropagation();
2195
- applyDelegationScope("session");
2196
- });
2197
- insertNode(_el$35, createTextNode(`/`));
2198
- insertNode(_el$37, createTextNode(`[Tudo]`));
2199
- setProp(_el$37, "onMouseDown", (e) => {
2200
- if (typeof e === "object" && e !== null && "stopPropagation" in e) e.stopPropagation();
2201
- applyDelegationScope("all");
2202
- });
2179
+ insert(_el$30, (() => {
2180
+ var _c$ = memo(() => delegationCeiling().visible.length > 0);
2181
+ return () => _c$() ? ` ${delegationHeader()}` : " — idle";
2182
+ })());
2203
2183
  insert(_el$22, createComponent(Show, {
2204
2184
  get when() {
2205
2185
  return showDelegations();
@@ -2207,25 +2187,25 @@ function View(props) {
2207
2187
  get children() {
2208
2188
  return createComponent(Show, {
2209
2189
  get when() {
2210
- return visibleDelegations().length > 0;
2190
+ return delegationCeiling().visible.length > 0;
2211
2191
  },
2212
2192
  get fallback() {
2213
2193
  return (() => {
2214
- var _el$52 = createElement("box"), _el$53 = createElement("text");
2215
- insertNode(_el$52, _el$53);
2216
- setProp(_el$52, "marginLeft", 1);
2217
- insertNode(_el$53, createTextNode(`No delegations`));
2218
- effect((_$p) => setProp(_el$53, "fg", theme().textMuted, _$p));
2219
- return _el$52;
2194
+ var _el$45 = createElement("box"), _el$46 = createElement("text");
2195
+ insertNode(_el$45, _el$46);
2196
+ setProp(_el$45, "marginLeft", 1);
2197
+ insertNode(_el$46, createTextNode(`No delegations`));
2198
+ effect((_$p) => setProp(_el$46, "fg", theme().textMuted, _$p));
2199
+ return _el$45;
2220
2200
  })();
2221
2201
  },
2222
2202
  get children() {
2223
- var _el$39 = createElement("box");
2224
- setProp(_el$39, "marginLeft", 1);
2225
- setProp(_el$39, "flexDirection", "column");
2226
- insert(_el$39, createComponent(For, {
2203
+ var _el$31 = createElement("box");
2204
+ setProp(_el$31, "marginLeft", 1);
2205
+ setProp(_el$31, "flexDirection", "column");
2206
+ insert(_el$31, createComponent(For, {
2227
2207
  get each() {
2228
- return visibleDelegations();
2208
+ return delegationCeiling().visible;
2229
2209
  },
2230
2210
  children: (job) => createComponent(DelegationRow, {
2231
2211
  get api() {
@@ -2240,97 +2220,39 @@ function View(props) {
2240
2220
  }
2241
2221
  })
2242
2222
  }), null);
2243
- insert(_el$39, createComponent(Show, {
2223
+ insert(_el$31, createComponent(Show, {
2244
2224
  get when() {
2245
- return delegationSplit().archived.length > 0;
2225
+ return delegationCeiling().hidden > 0;
2246
2226
  },
2247
2227
  get children() {
2248
- return (() => {
2249
- const archived = delegationSplit().archived;
2250
- const pageSize = 8;
2251
- const pages = Math.ceil(archived.length / pageSize);
2252
- const page = Math.min(archivedPage(), pages - 1);
2253
- const slice = archived.slice(page * pageSize, page * pageSize + pageSize);
2254
- return (() => {
2255
- var _el$55 = createElement("box"), _el$56 = createElement("box"), _el$57 = createElement("text"), _el$59 = createElement("text"), _el$60 = createElement("text"), _el$61 = createElement("text");
2256
- insertNode(_el$55, _el$56);
2257
- setProp(_el$55, "flexDirection", "column");
2258
- insertNode(_el$56, _el$57);
2259
- insertNode(_el$56, _el$59);
2260
- insertNode(_el$56, _el$60);
2261
- insertNode(_el$56, _el$61);
2262
- setProp(_el$56, "flexDirection", "row");
2263
- setProp(_el$56, "marginLeft", 0);
2264
- insertNode(_el$57, createTextNode(`‹ `));
2265
- setProp(_el$57, "onMouseDown", () => clampArchivedPage(page - 1, pages));
2266
- insert(_el$59, () => `Archived (${archived.length}) `);
2267
- insert(_el$60, `${page + 1}/${pages}`);
2268
- insertNode(_el$61, createTextNode(` ›`));
2269
- setProp(_el$61, "onMouseDown", () => clampArchivedPage(page + 1, pages));
2270
- insert(_el$55, createComponent(For, {
2271
- each: slice,
2272
- children: (job) => createComponent(DelegationRow, {
2273
- get api() {
2274
- return props.api;
2275
- },
2276
- job,
2277
- get now() {
2278
- return now();
2279
- },
2280
- get animationNow() {
2281
- return animationNow();
2282
- }
2283
- })
2284
- }), null);
2285
- effect((_p$) => {
2286
- var _v$20 = theme().textMuted, _v$21 = theme().textMuted, _v$22 = theme().textMuted, _v$23 = theme().textMuted;
2287
- _v$20 !== _p$.e && (_p$.e = setProp(_el$57, "fg", _v$20, _p$.e));
2288
- _v$21 !== _p$.t && (_p$.t = setProp(_el$59, "fg", _v$21, _p$.t));
2289
- _v$22 !== _p$.a && (_p$.a = setProp(_el$60, "fg", _v$22, _p$.a));
2290
- _v$23 !== _p$.o && (_p$.o = setProp(_el$61, "fg", _v$23, _p$.o));
2291
- return _p$;
2292
- }, {
2293
- e: void 0,
2294
- t: void 0,
2295
- a: void 0,
2296
- o: void 0
2297
- });
2298
- return _el$55;
2299
- })();
2300
- })();
2228
+ var _el$32 = createElement("text");
2229
+ insert(_el$32, (() => {
2230
+ var _c$2 = memo(() => delegationCeiling().hiddenActive > 0);
2231
+ return () => _c$2() ? `… +${delegationCeiling().hiddenActive} active` : `… +${delegationCeiling().hiddenTerminal} more`;
2232
+ })());
2233
+ effect((_$p) => setProp(_el$32, "fg", theme().textMuted, _$p));
2234
+ return _el$32;
2301
2235
  }
2302
2236
  }), null);
2303
- return _el$39;
2237
+ return _el$31;
2304
2238
  }
2305
2239
  });
2306
2240
  }
2307
2241
  }), null);
2308
2242
  effect((_p$) => {
2309
- var _v$8 = theme().accent, _v$9 = theme().text, _v$0 = theme().textMuted, _v$1 = theme().text, _v$10 = theme().textMuted, _v$11 = theme().textMuted, _v$12 = delegationScope() === "session" ? theme().accent : theme().textMuted, _v$13 = delegationScope() === "session" ? 1 : void 0, _v$14 = theme().textMuted, _v$15 = delegationScope() === "all" ? theme().accent : theme().textMuted, _v$16 = delegationScope() === "all" ? 1 : void 0;
2310
- _v$8 !== _p$.e && (_p$.e = setProp(_el$23, "fg", _v$8, _p$.e));
2311
- _v$9 !== _p$.t && (_p$.t = setProp(_el$25, "fg", _v$9, _p$.t));
2312
- _v$0 !== _p$.a && (_p$.a = setProp(_el$26, "fg", _v$0, _p$.a));
2313
- _v$1 !== _p$.o && (_p$.o = setProp(_el$29, "fg", _v$1, _p$.o));
2314
- _v$10 !== _p$.i && (_p$.i = setProp(_el$30, "fg", _v$10, _p$.i));
2315
- _v$11 !== _p$.n && (_p$.n = setProp(_el$31, "fg", _v$11, _p$.n));
2316
- _v$12 !== _p$.s && (_p$.s = setProp(_el$33, "fg", _v$12, _p$.s));
2317
- _v$13 !== _p$.h && (_p$.h = setProp(_el$33, "attributes", _v$13, _p$.h));
2318
- _v$14 !== _p$.r && (_p$.r = setProp(_el$35, "fg", _v$14, _p$.r));
2319
- _v$15 !== _p$.d && (_p$.d = setProp(_el$37, "fg", _v$15, _p$.d));
2320
- _v$16 !== _p$.l && (_p$.l = setProp(_el$37, "attributes", _v$16, _p$.l));
2243
+ var _v$7 = theme().accent, _v$8 = theme().text, _v$9 = theme().textMuted, _v$0 = theme().text, _v$1 = theme().textMuted;
2244
+ _v$7 !== _p$.e && (_p$.e = setProp(_el$23, "fg", _v$7, _p$.e));
2245
+ _v$8 !== _p$.t && (_p$.t = setProp(_el$25, "fg", _v$8, _p$.t));
2246
+ _v$9 !== _p$.a && (_p$.a = setProp(_el$26, "fg", _v$9, _p$.a));
2247
+ _v$0 !== _p$.o && (_p$.o = setProp(_el$29, "fg", _v$0, _p$.o));
2248
+ _v$1 !== _p$.i && (_p$.i = setProp(_el$30, "fg", _v$1, _p$.i));
2321
2249
  return _p$;
2322
2250
  }, {
2323
2251
  e: void 0,
2324
2252
  t: void 0,
2325
2253
  a: void 0,
2326
2254
  o: void 0,
2327
- i: void 0,
2328
- n: void 0,
2329
- s: void 0,
2330
- h: void 0,
2331
- r: void 0,
2332
- d: void 0,
2333
- l: void 0
2255
+ i: void 0
2334
2256
  });
2335
2257
  return _el$22;
2336
2258
  })();
@@ -2392,6 +2314,6 @@ const plugin = {
2392
2314
  setup: async () => {}
2393
2315
  };
2394
2316
  //#endregion
2395
- export { DELEGATION_DESCRIPTION_MAX, DELEGATION_ELAPSED_WIDTH, DELEGATION_SCOPE_KV_KEY, DELEGATION_STATE_GLYPHS, IDLE_SILENCE_MS, STALE_RUNNING_THRESHOLD_MS, boardRecordToDelegationEntry, boardRecordsToDelegationEntries, boardStatePath, buildChildrenPath, childStatusToState, childrenToDelegationEntries, collectDelegationToolParts, compareDelegationEntries, countDelegationSources, plugin as default, delegationActivity, delegationActivityLabel, delegationElapsed, delegationIcon, delegationSpinnerFrame, delegationStateGlyph, delegationStateMarker, delegationStateTone, delegationTag, extractToolActivity, filterDelegationsByScope, fmtElapsed, formatDelegationElapsed, formatDelegationHeader, formatDelegationIdentity, formatDelegationRow, formatPanelLogLine, isValidSessionId, latestToolActivityFor, markStaleIfRunning, mergeBoardDelegationSources, mergeChildDelegationSources, mergeDelegationSources, navigateToDelegationSession, nextDelegationScope, panelLogDir, parseDelegationMarkdown, parseDelegationToolPart, readAllDelegationEntries, readBoardState, readDelegationEntries, readDelegationScope, reduceDelegationToolPart, removeDelegationEntry, resolveCurrentSessionID, resolveDelegationsDir, resolvePantheonRoot, safeSessionPath, seedLiveDelegationMap, splitDelegationList, toDelegationEntry, trackToolActivity, truncateDelegationDescription, tuiLogPath, visibleDelegationList, writeDelegationScope };
2317
+ export { DELEGATION_ALIAS_WIDTH, DELEGATION_DESCRIPTION_MAX, DELEGATION_DONE_RETENTION_MS, DELEGATION_ELAPSED_WIDTH, DELEGATION_FAILED_RETENTION_MS, DELEGATION_ROW_GLYPHS, DELEGATION_VISIBLE_CEILING, IDLE_SILENCE_MS, STALE_RUNNING_THRESHOLD_MS, boardRecordToDelegationEntry, boardRecordsToDelegationEntries, boardStatePath, buildChildrenPath, ceilingDelegationList, childStatusToState, childrenToDelegationEntries, collectDelegationToolParts, compareDelegationEntries, countDelegationSources, createDelegationRowOpenHandler, plugin as default, delegationActivity, delegationActivityLabel, delegationElapsed, delegationRowGlyph, delegationRowIdentity, delegationRowMarker, delegationRowStatus, delegationSpinnerFrame, delegationStateTone, extractToolActivity, fmtElapsed, formatDelegationAlias, formatDelegationElapsed, formatDelegationHeader, formatDelegationRowLead, formatPanelLogLine, isValidSessionId, latestToolActivityFor, markStaleIfRunning, mergeBoardDelegationSources, mergeChildDelegationSources, mergeDelegationSources, navigateToDelegationSession, panelLogDir, parseDelegationMarkdown, parseDelegationToolPart, readAllDelegationEntries, readBoardState, readDelegationEntries, reduceDelegationToolPart, removeDelegationEntry, resolveCurrentSessionID, resolveDelegationsDir, resolvePantheonRoot, safeSessionPath, seedLiveDelegationMap, splitDelegationList, toDelegationEntry, trackToolActivity, truncateDelegationDescription, tuiLogPath, visibleDelegationList };
2396
2318
 
2397
2319
  //# sourceMappingURL=tui.js.map