@aiwayds/dsh-opentui 0.30.0 → 0.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.30.1] - 2026-11-27
11
+
12
+ ### Fixed
13
+
14
+ - Subagent transcript viewer stayed empty for background agents: live
15
+ `agent.transcript` frames with an empty parent `turnId` were rejected by the
16
+ client; the seam now accepts them and dedupes by childId/runId/turnId/seq so
17
+ per-turn seq resets no longer drop rows (#23).
18
+ - Activity panel subagent rows hard-capped the latest-line preview at 32
19
+ display columns; the preview now uses the remaining row width, normalizes
20
+ streamed multiline text, and omits dangling separators for empty tails (#24).
21
+
10
22
  ## [0.30.0] - 2026-11-27
11
23
 
12
24
  ### Added
@@ -38483,6 +38483,19 @@ function widthTail(text, maxWidth) {
38483
38483
  }
38484
38484
  return out;
38485
38485
  }
38486
+ function normalizedLastLine(text) {
38487
+ if (text === undefined)
38488
+ return "";
38489
+ const lines = text.replace(/\r\n?/g, `
38490
+ `).split(`
38491
+ `);
38492
+ for (let i = lines.length - 1;i >= 0; i--) {
38493
+ const line = lines[i].trim();
38494
+ if (line !== "")
38495
+ return line.replace(/\s+/gu, " ");
38496
+ }
38497
+ return "";
38498
+ }
38486
38499
  function secsFrom(startedAt, elapsedSec, now) {
38487
38500
  if (startedAt !== undefined)
38488
38501
  return `${((now - startedAt) / 1000).toFixed(1)}s`;
@@ -38549,13 +38562,18 @@ function thinkLinesFor(row, now, spin, thinkLines) {
38549
38562
  fadeOutAt: row.streaming === true ? undefined : skinStopAt(row)
38550
38563
  }));
38551
38564
  }
38552
- function agentLine(agent, position, count, parentIndex, now = Date.now()) {
38565
+ function agentLine(agent, position, count, innerWidth, parentIndex, now = Date.now()) {
38553
38566
  const branch = position === count - 1 ? "\u2514\u2500 " : "\u251C\u2500 ";
38554
38567
  const indent = parentIndex === undefined ? "" : " ".repeat(stringWidth(`${TODO_STATUS_GLYPHS.in_progress} ${parentIndex} `));
38555
38568
  const elapsed = secsFrom(agent.startedAt, agent.elapsedSec, now);
38556
- const tail = widthTail(agent.lastLine ?? "", 32);
38557
38569
  const namePrefix = subagentNamePrefix(agent.name, agent.label);
38558
- const content = `${agent.label} \xB7 ${elapsed} \xB7 round ${agent.rounds} \xB7 ${tail}`;
38570
+ const prefix = `${indent}${branch}${namePrefix}`;
38571
+ const labelPart = `${agent.label} \xB7 ${elapsed} \xB7 round ${agent.rounds}`;
38572
+ const head = `${prefix}${labelPart}`;
38573
+ const lastLine = normalizedLastLine(agent.lastLine);
38574
+ const tailBudget = lastLine === "" ? 0 : innerWidth - stringWidth(head) - stringWidth(" \xB7 ");
38575
+ const tail = tailBudget <= 0 ? "" : widthTail(lastLine, tailBudget);
38576
+ const content = tail.trim() === "" ? labelPart : `${labelPart} \xB7 ${tail}`;
38559
38577
  return {
38560
38578
  kind: "agent",
38561
38579
  index: parentIndex,
@@ -38599,7 +38617,7 @@ function buildMergedDock(data, options) {
38599
38617
  const brief = combineBriefText(todoBriefLine(data.todos, now, data.todoStartedAt), options.subagentBrief ?? "");
38600
38618
  if (brief !== "")
38601
38619
  upperLines.push({ kind: "todo", segments: [{ text: brief, tone: "running" }] });
38602
- lowerRaw = agents.map((agent, i) => agentLine(agent, i, agents.length, undefined, now));
38620
+ lowerRaw = agents.map((agent, i) => agentLine(agent, i, agents.length, options.innerWidth, undefined, now));
38603
38621
  } else if (scene === "B") {
38604
38622
  upperLines = thinkAtGear;
38605
38623
  lowerRaw = [];
@@ -55675,7 +55693,7 @@ var init_subagents_viewer = __esm(() => {
55675
55693
  import { TextAttributes as TextAttributes12 } from "@opentui/core";
55676
55694
  function resolveVersion() {
55677
55695
  try {
55678
- return "0.30.0";
55696
+ return "0.30.1";
55679
55697
  } catch {
55680
55698
  return "dev";
55681
55699
  }
@@ -63397,10 +63415,10 @@ var init_bridge_session_seam = __esm(() => {
63397
63415
  const frameSession = typeof payload.sessionId === "string" ? payload.sessionId : "";
63398
63416
  const childId = typeof payload.childId === "string" ? payload.childId : "";
63399
63417
  const turnId = typeof payload.turnId === "string" ? payload.turnId : "";
63400
- const runId = typeof payload.runId === "string" && payload.runId !== "" ? payload.runId : turnId;
63418
+ const runId = typeof payload.runId === "string" ? payload.runId : "";
63401
63419
  const seq = typeof payload.seq === "number" && Number.isFinite(payload.seq) ? payload.seq : -1;
63402
63420
  const rows = payload.rows;
63403
- if (childId === "" || turnId === "" || seq < 0 || !Array.isArray(rows))
63421
+ if (childId === "" || runId === "" && turnId === "" || seq < 0 || !Array.isArray(rows))
63404
63422
  return;
63405
63423
  if (this.#subagentTranscriptSettled.has(childId))
63406
63424
  return;
@@ -63413,8 +63431,8 @@ var init_bridge_session_seam = __esm(() => {
63413
63431
  } else if (frameSession !== "" && frameSession !== this.#subagentSessionId)
63414
63432
  return;
63415
63433
  let run = this.#subagentTranscriptRuns.get(childId);
63416
- if (run === undefined || run.runId !== runId) {
63417
- run = { runId, seen: new Set };
63434
+ if (run === undefined || run.runId !== runId || run.turnId !== turnId) {
63435
+ run = { runId, turnId, seen: new Set };
63418
63436
  this.#subagentTranscriptRuns.set(childId, run);
63419
63437
  }
63420
63438
  if (run.seen.has(seq))
@@ -65904,5 +65922,5 @@ if (import.meta.main) {
65904
65922
  main();
65905
65923
  }
65906
65924
 
65907
- //# debugId=C42A38938DADC27A64756E2164756E21
65925
+ //# debugId=6886CF64AF78A9FF64756E2164756E21
65908
65926
  //# sourceMappingURL=index.js.map