langchain_agentx_stream_ui 0.8.1 → 0.8.3

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.
@@ -11,6 +11,7 @@ import {
11
11
  SILENT_TASK_TOOL_NAMES,
12
12
  SubagentTranscriptBlock,
13
13
  Write,
14
+ absorbPreToolHookIntoFold,
14
15
  classifyFinishErrorPresentation,
15
16
  classifyToolCancelSoftKind,
16
17
  coerceSubagentProgressEntries,
@@ -19,10 +20,11 @@ import {
19
20
  extractToolCancelSignals,
20
21
  formatExploreSummaryText,
21
22
  formatThoughtDurationPrefix,
23
+ resolveActiveAgentParentToolId,
22
24
  resolveHookStoppedMessage,
23
25
  resolveInterruptDisplayText,
24
26
  resolveToolCancelDisplayText
25
- } from "./chunk-GLUQUP3A.js";
27
+ } from "./chunk-Z5EWWIP3.js";
26
28
 
27
29
  // src/types/tree.ts
28
30
  function createEmptyTree() {
@@ -160,6 +162,76 @@ function classifyEvent(event, ctx, overrides, eventIndex = 0) {
160
162
  return { event, tier, parentNodeId };
161
163
  }
162
164
 
165
+ // src/core/projection/systemSummaryText.ts
166
+ function isRecord(value) {
167
+ return value !== null && typeof value === "object" && !Array.isArray(value);
168
+ }
169
+ function hookLabel(data) {
170
+ const raw = data.hook ?? data.hook_name ?? data.hookName;
171
+ return typeof raw === "string" ? raw.trim() : "hook";
172
+ }
173
+ function normalizedHookLabel(data) {
174
+ return hookLabel(data).toLowerCase().replace(/-/g, "_");
175
+ }
176
+ function isOkStopHook(data) {
177
+ const label = normalizedHookLabel(data);
178
+ if (label !== "stop" && label !== "stop_hook") return false;
179
+ const status = String(data.status ?? "").toLowerCase();
180
+ if (status === "blocked" || status === "prevented") return false;
181
+ if (data.prevented === true) return false;
182
+ return true;
183
+ }
184
+ function isPreToolHook(data) {
185
+ const label = normalizedHookLabel(data);
186
+ return label === "pre_tool" || label.includes("pre_tool") || label === "pretooluse";
187
+ }
188
+ function isHookVisibleInTimeline(data) {
189
+ if (isOkStopHook(data)) return false;
190
+ if (isPreToolHook(data)) return false;
191
+ return true;
192
+ }
193
+ function formatHookFinishedSummary(data) {
194
+ const label = hookLabel(data).toLowerCase();
195
+ const status = String(data.status ?? "").toLowerCase();
196
+ if (label === "stop" || label === "stop_hook") {
197
+ if (status === "blocked" || status === "prevented" || data.prevented === true) {
198
+ return "Stop hook blocked";
199
+ }
200
+ return "Ran stop hook";
201
+ }
202
+ const readable = hookLabel(data).replace(/_/g, "-");
203
+ return `Ran ${readable} hook`;
204
+ }
205
+ function formatSystemEventSummary(eventType, data) {
206
+ const payload = isRecord(data) ? data : {};
207
+ switch (eventType) {
208
+ case "hook-finished":
209
+ return formatHookFinishedSummary(payload);
210
+ case "compact-boundary":
211
+ return "Conversation compacted";
212
+ default:
213
+ return null;
214
+ }
215
+ }
216
+ function mergeSystemSummaryLines(lines) {
217
+ const counts = /* @__PURE__ */ new Map();
218
+ for (const line of lines) {
219
+ counts.set(line, (counts.get(line) ?? 0) + 1);
220
+ }
221
+ return [...counts.entries()].map(([line, count]) => count > 1 ? `${line} (\xD7${count})` : line).join(" \xB7 ");
222
+ }
223
+ function summarizeSystemEvents(events) {
224
+ const lines = [];
225
+ for (const evt of events) {
226
+ if (evt.eventType === "hook-finished" && isRecord(evt.data) && !isHookVisibleInTimeline(evt.data)) {
227
+ continue;
228
+ }
229
+ const line = formatSystemEventSummary(evt.eventType, evt.data);
230
+ if (line) lines.push(line);
231
+ }
232
+ return mergeSystemSummaryLines(lines);
233
+ }
234
+
163
235
  // src/core/mainTextDefer.ts
164
236
  function deferMainText(buffer, text) {
165
237
  if (!text) return buffer ?? "";
@@ -206,7 +278,7 @@ var VISIBILITY_KEYS = [
206
278
  "display_hint",
207
279
  "skip_transcript"
208
280
  ];
209
- function isRecord(value) {
281
+ function isRecord2(value) {
210
282
  return value !== null && typeof value === "object" && !Array.isArray(value);
211
283
  }
212
284
  function resolveParentAgentToolCallId(data) {
@@ -235,7 +307,7 @@ function bridgeEventDisplayMetadata(data) {
235
307
  if (!data) return null;
236
308
  const merged = {};
237
309
  const meta = data.meta;
238
- if (isRecord(meta)) {
310
+ if (isRecord2(meta)) {
239
311
  for (const key of VISIBILITY_KEYS) {
240
312
  if (key in meta) merged[key] = meta[key];
241
313
  }
@@ -1092,6 +1164,18 @@ function handleHookProgress(tree, event) {
1092
1164
  }
1093
1165
  }
1094
1166
  }
1167
+ function handleSubagentPreToolHookFold(tree, event) {
1168
+ if (event.event_type !== "hook-finished") return;
1169
+ const data = event.data;
1170
+ if (!isPreToolHook(data)) return;
1171
+ const parentId = resolveActiveAgentParentToolId(tree);
1172
+ if (!parentId) return;
1173
+ const tool = agentToolNode(tree, parentId);
1174
+ if (!tool) return;
1175
+ patchToolNode(tree, parentId, {
1176
+ subagentHookFold: absorbPreToolHookIntoFold(tool.subagentHookFold, data)
1177
+ });
1178
+ }
1095
1179
  function handleHookFinished(tree, event) {
1096
1180
  const data = event.data;
1097
1181
  const toolUseID = data.tool_use_id;
@@ -1534,6 +1618,9 @@ function handleSubagentBoundaryStart(tree, event, parentNodeId, options) {
1534
1618
  endedAt: null
1535
1619
  })
1536
1620
  });
1621
+ if (tree.openSubAgentStack[tree.openSubAgentStack.length - 1] !== parentId) {
1622
+ tree.openSubAgentStack.push(parentId);
1623
+ }
1537
1624
  }
1538
1625
  function handleSubagentBoundaryEnd(tree, event, parentNodeId) {
1539
1626
  const tool = agentToolNode(tree, parentNodeId);
@@ -1552,6 +1639,10 @@ function handleSubagentBoundaryEnd(tree, event, parentNodeId) {
1552
1639
  endedAt: eventTimeToMs(event.timestamp)
1553
1640
  })
1554
1641
  });
1642
+ const stackTop = tree.openSubAgentStack[tree.openSubAgentStack.length - 1];
1643
+ if (stackTop === parentNodeId) {
1644
+ tree.openSubAgentStack.pop();
1645
+ }
1555
1646
  }
1556
1647
  function handleSubagentToolCall(tree, _event, parentNodeId, data) {
1557
1648
  const tool = agentToolNode(tree, parentNodeId);
@@ -1711,6 +1802,7 @@ function handleDebug(tree, event, eventIndex, parentNodeId, collectDebug) {
1711
1802
  break;
1712
1803
  case "hook-finished":
1713
1804
  handleHookFinished(tree, event);
1805
+ handleSubagentPreToolHookFold(tree, event);
1714
1806
  break;
1715
1807
  }
1716
1808
  pushSystemSummarySource(tree, event, eventIndex);
@@ -2654,7 +2746,7 @@ function isGroupableToolName(toolName) {
2654
2746
  }
2655
2747
 
2656
2748
  // src/core/projection/mountCandidates.ts
2657
- function isRecord2(value) {
2749
+ function isRecord3(value) {
2658
2750
  return value !== null && typeof value === "object" && !Array.isArray(value);
2659
2751
  }
2660
2752
  function isToolUseEntry(entry) {
@@ -2754,8 +2846,8 @@ function iterMountCandidates(entries, options) {
2754
2846
  }
2755
2847
  if (exploreDetail) {
2756
2848
  if (collapsedPresent) {
2757
- const toolInput2 = isRecord2(entry.payload.tool_input) ? entry.payload.tool_input : null;
2758
- const display2 = isRecord2(entry.payload.display) ? entry.payload.display : null;
2849
+ const toolInput2 = isRecord3(entry.payload.tool_input) ? entry.payload.tool_input : null;
2850
+ const display2 = isRecord3(entry.payload.display) ? entry.payload.display : null;
2759
2851
  if (classifier?.isExploreCollapsible(
2760
2852
  typeof toolName === "string" ? toolName : null,
2761
2853
  toolInput2,
@@ -2771,8 +2863,8 @@ function iterMountCandidates(entries, options) {
2771
2863
  out.push([entryKey(entry), entry]);
2772
2864
  continue;
2773
2865
  }
2774
- const toolInput = isRecord2(entry.payload.tool_input) ? entry.payload.tool_input : null;
2775
- const display = isRecord2(entry.payload.display) ? entry.payload.display : null;
2866
+ const toolInput = isRecord3(entry.payload.tool_input) ? entry.payload.tool_input : null;
2867
+ const display = isRecord3(entry.payload.display) ? entry.payload.display : null;
2776
2868
  if (classifier.isExploreCollapsible(
2777
2869
  typeof toolName === "string" ? toolName : null,
2778
2870
  toolInput,
@@ -2787,76 +2879,6 @@ function iterMountCandidates(entries, options) {
2787
2879
  return out;
2788
2880
  }
2789
2881
 
2790
- // src/core/projection/systemSummaryText.ts
2791
- function isRecord3(value) {
2792
- return value !== null && typeof value === "object" && !Array.isArray(value);
2793
- }
2794
- function hookLabel(data) {
2795
- const raw = data.hook ?? data.hook_name ?? data.hookName;
2796
- return typeof raw === "string" ? raw.trim() : "hook";
2797
- }
2798
- function normalizedHookLabel(data) {
2799
- return hookLabel(data).toLowerCase().replace(/-/g, "_");
2800
- }
2801
- function isOkStopHook(data) {
2802
- const label = normalizedHookLabel(data);
2803
- if (label !== "stop" && label !== "stop_hook") return false;
2804
- const status = String(data.status ?? "").toLowerCase();
2805
- if (status === "blocked" || status === "prevented") return false;
2806
- if (data.prevented === true) return false;
2807
- return true;
2808
- }
2809
- function isPreToolHook(data) {
2810
- const label = normalizedHookLabel(data);
2811
- return label === "pre_tool" || label.includes("pre_tool") || label === "pretooluse";
2812
- }
2813
- function isHookVisibleInTimeline(data) {
2814
- if (isOkStopHook(data)) return false;
2815
- if (isPreToolHook(data)) return false;
2816
- return true;
2817
- }
2818
- function formatHookFinishedSummary(data) {
2819
- const label = hookLabel(data).toLowerCase();
2820
- const status = String(data.status ?? "").toLowerCase();
2821
- if (label === "stop" || label === "stop_hook") {
2822
- if (status === "blocked" || status === "prevented" || data.prevented === true) {
2823
- return "Stop hook blocked";
2824
- }
2825
- return "Ran stop hook";
2826
- }
2827
- const readable = hookLabel(data).replace(/_/g, "-");
2828
- return `Ran ${readable} hook`;
2829
- }
2830
- function formatSystemEventSummary(eventType, data) {
2831
- const payload = isRecord3(data) ? data : {};
2832
- switch (eventType) {
2833
- case "hook-finished":
2834
- return formatHookFinishedSummary(payload);
2835
- case "compact-boundary":
2836
- return "Conversation compacted";
2837
- default:
2838
- return null;
2839
- }
2840
- }
2841
- function mergeSystemSummaryLines(lines) {
2842
- const counts = /* @__PURE__ */ new Map();
2843
- for (const line of lines) {
2844
- counts.set(line, (counts.get(line) ?? 0) + 1);
2845
- }
2846
- return [...counts.entries()].map(([line, count]) => count > 1 ? `${line} (\xD7${count})` : line).join(" \xB7 ");
2847
- }
2848
- function summarizeSystemEvents(events) {
2849
- const lines = [];
2850
- for (const evt of events) {
2851
- if (evt.eventType === "hook-finished" && isRecord3(evt.data) && !isHookVisibleInTimeline(evt.data)) {
2852
- continue;
2853
- }
2854
- const line = formatSystemEventSummary(evt.eventType, evt.data);
2855
- if (line) lines.push(line);
2856
- }
2857
- return mergeSystemSummaryLines(lines);
2858
- }
2859
-
2860
2882
  // src/core/projection/shellProgress.ts
2861
2883
  var SHELL_PROGRESS_MIN_ELAPSED_SECONDS = 2;
2862
2884
  function formatDuration(totalSeconds) {
@@ -4414,9 +4436,15 @@ function CollapsedExploreNode({ entry, registry }) {
4414
4436
  }
4415
4437
 
4416
4438
  // src/view/nodes/SystemSummaryNode.tsx
4417
- import { jsx as jsx3 } from "react/jsx-runtime";
4439
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
4418
4440
  function SystemSummaryNode({ summaryText }) {
4419
- return /* @__PURE__ */ jsx3("div", { className: "lax-system-summary", "data-kind": "system_summary", children: summaryText });
4441
+ return /* @__PURE__ */ jsxs2("div", { className: "lax-system-summary", "data-kind": "system_summary", children: [
4442
+ /* @__PURE__ */ jsxs2("span", { className: "lax-system-summary__prefix", "aria-hidden": true, children: [
4443
+ "\u23BF",
4444
+ " "
4445
+ ] }),
4446
+ /* @__PURE__ */ jsx3("span", { className: "lax-system-summary__text", children: summaryText })
4447
+ ] });
4420
4448
  }
4421
4449
 
4422
4450
  // src/core/agent/agentAuthoritySelectors.ts
@@ -4518,7 +4546,7 @@ function selectVisibleTasks(tasks, options) {
4518
4546
  }
4519
4547
 
4520
4548
  // src/view/TaskList.tsx
4521
- import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
4549
+ import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
4522
4550
  var TASK_ICONS = {
4523
4551
  completed: "\u2714",
4524
4552
  in_progress: "\u25FC",
@@ -4617,25 +4645,25 @@ function TaskList({
4617
4645
  const completedCount = tasks.filter((t) => t.status === "completed").length;
4618
4646
  const inProgressCount = tasks.filter((t) => t.status === "in_progress").length;
4619
4647
  const pendingCount = tasks.filter((t) => t.status === "pending").length;
4620
- const items = /* @__PURE__ */ jsxs2("div", { className: "lax-task-list__items", children: [
4648
+ const items = /* @__PURE__ */ jsxs3("div", { className: "lax-task-list__items", children: [
4621
4649
  visibleTasks.map((task) => /* @__PURE__ */ jsx4(TaskItem, { task, allTasks: tasks }, task.id)),
4622
4650
  hiddenSummary ? /* @__PURE__ */ jsx4("div", { className: "lax-task-list__hidden-summary", children: hiddenSummary }) : null
4623
4651
  ] });
4624
4652
  if (!isStandalone) {
4625
4653
  return /* @__PURE__ */ jsx4("div", { className: "lax-task-list lax-task-list--embedded", "data-testid": "lax-task-list", children: items });
4626
4654
  }
4627
- return /* @__PURE__ */ jsxs2("div", { className: "lax-task-list", "data-testid": "lax-task-list", children: [
4628
- /* @__PURE__ */ jsxs2("div", { className: "lax-task-list__stats", children: [
4655
+ return /* @__PURE__ */ jsxs3("div", { className: "lax-task-list", "data-testid": "lax-task-list", children: [
4656
+ /* @__PURE__ */ jsxs3("div", { className: "lax-task-list__stats", children: [
4629
4657
  /* @__PURE__ */ jsx4("span", { className: "lax-task-list__stat-count", children: tasks.length }),
4630
4658
  /* @__PURE__ */ jsx4("span", { children: " tasks (" }),
4631
4659
  /* @__PURE__ */ jsx4("span", { className: "lax-task-list__stat-count", children: completedCount }),
4632
4660
  /* @__PURE__ */ jsx4("span", { children: " done" }),
4633
- inProgressCount > 0 && /* @__PURE__ */ jsxs2(Fragment, { children: [
4661
+ inProgressCount > 0 && /* @__PURE__ */ jsxs3(Fragment, { children: [
4634
4662
  ", ",
4635
4663
  /* @__PURE__ */ jsx4("span", { className: "lax-task-list__stat-count", children: inProgressCount }),
4636
4664
  " in progress"
4637
4665
  ] }),
4638
- pendingCount > 0 && /* @__PURE__ */ jsxs2(Fragment, { children: [
4666
+ pendingCount > 0 && /* @__PURE__ */ jsxs3(Fragment, { children: [
4639
4667
  ", ",
4640
4668
  /* @__PURE__ */ jsx4("span", { className: "lax-task-list__stat-count", children: pendingCount }),
4641
4669
  " open"
@@ -4680,7 +4708,7 @@ function TaskItem({ task, allTasks }) {
4680
4708
  }
4681
4709
  if (parts.length > 0) metaText = parts.join(" \xB7 ");
4682
4710
  }
4683
- return /* @__PURE__ */ jsxs2(
4711
+ return /* @__PURE__ */ jsxs3(
4684
4712
  "div",
4685
4713
  {
4686
4714
  className: `lax-task-item lax-task-item--${task.status}${isBlocked ? " lax-task-item--blocked" : ""}`,
@@ -4689,11 +4717,11 @@ function TaskItem({ task, allTasks }) {
4689
4717
  children: [
4690
4718
  /* @__PURE__ */ jsx4("span", { className: iconClassName, children: icon }),
4691
4719
  /* @__PURE__ */ jsx4("span", { className: subjectClassName, children: task.subject }),
4692
- task.owner ? /* @__PURE__ */ jsxs2("span", { className: "lax-task-item__owner", children: [
4720
+ task.owner ? /* @__PURE__ */ jsxs3("span", { className: "lax-task-item__owner", children: [
4693
4721
  " @",
4694
4722
  task.owner
4695
4723
  ] }) : null,
4696
- metaText && /* @__PURE__ */ jsxs2("span", { className: "lax-task-item__meta", children: [
4724
+ metaText && /* @__PURE__ */ jsxs3("span", { className: "lax-task-item__meta", children: [
4697
4725
  " (",
4698
4726
  metaText,
4699
4727
  ")"
@@ -4709,7 +4737,7 @@ import { useSyncExternalStore } from "react";
4709
4737
 
4710
4738
  // src/view/ModelRetryBlock.tsx
4711
4739
  import { useEffect as useEffect4, useState as useState4 } from "react";
4712
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
4740
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
4713
4741
  var MAX_ERROR_CHARS = 1e3;
4714
4742
  function formatRetryCountdownSeconds(retryDelayMs, updatedAt, nowMs) {
4715
4743
  const elapsed = Math.max(0, nowMs - updatedAt);
@@ -4728,7 +4756,7 @@ function ModelRetryBlock({ state, verbose = false }) {
4728
4756
  const errorText = state.errorMessage.trim();
4729
4757
  const truncated = !verbose && errorText.length > MAX_ERROR_CHARS;
4730
4758
  const visibleError = truncated ? `${errorText.slice(0, MAX_ERROR_CHARS)}\u2026` : errorText;
4731
- return /* @__PURE__ */ jsxs3("div", { className: "lax-model-retry", "data-testid": "lax-model-retry", children: [
4759
+ return /* @__PURE__ */ jsxs4("div", { className: "lax-model-retry", "data-testid": "lax-model-retry", children: [
4732
4760
  /* @__PURE__ */ jsx5(
4733
4761
  "button",
4734
4762
  {
@@ -4737,10 +4765,10 @@ function ModelRetryBlock({ state, verbose = false }) {
4737
4765
  onClick: () => setExpanded((prev) => !prev),
4738
4766
  "aria-expanded": expanded,
4739
4767
  "data-testid": "lax-model-retry-toggle",
4740
- children: /* @__PURE__ */ jsxs3("span", { className: "lax-model-retry__summary", "data-testid": "lax-model-retry-summary", children: [
4768
+ children: /* @__PURE__ */ jsxs4("span", { className: "lax-model-retry__summary", "data-testid": "lax-model-retry-summary", children: [
4741
4769
  "\u23BF ",
4742
4770
  summary,
4743
- !expanded && retryInSeconds > 0 ? /* @__PURE__ */ jsxs3("span", { className: "lax-model-retry__inline-countdown", children: [
4771
+ !expanded && retryInSeconds > 0 ? /* @__PURE__ */ jsxs4("span", { className: "lax-model-retry__inline-countdown", children: [
4744
4772
  " \xB7 ",
4745
4773
  retryInSeconds,
4746
4774
  "s"
@@ -4748,13 +4776,13 @@ function ModelRetryBlock({ state, verbose = false }) {
4748
4776
  ] })
4749
4777
  }
4750
4778
  ),
4751
- expanded ? /* @__PURE__ */ jsxs3("div", { className: "lax-model-retry__body", "data-testid": "lax-model-retry-body", children: [
4752
- errorText ? /* @__PURE__ */ jsxs3("div", { className: "lax-model-retry__error", "data-testid": "lax-model-retry-error", children: [
4779
+ expanded ? /* @__PURE__ */ jsxs4("div", { className: "lax-model-retry__body", "data-testid": "lax-model-retry-body", children: [
4780
+ errorText ? /* @__PURE__ */ jsxs4("div", { className: "lax-model-retry__error", "data-testid": "lax-model-retry-error", children: [
4753
4781
  /* @__PURE__ */ jsx5("span", { className: "lax-model-retry__category", children: categoryLabel }),
4754
4782
  visibleError ? /* @__PURE__ */ jsx5("pre", { className: "lax-model-retry__error-text", children: visibleError }) : null,
4755
4783
  truncated ? /* @__PURE__ */ jsx5("span", { className: "lax-model-retry__hint", children: "\u2026 (ctrl+o to expand)" }) : null
4756
4784
  ] }) : /* @__PURE__ */ jsx5("div", { className: "lax-model-retry__category-only", children: categoryLabel }),
4757
- /* @__PURE__ */ jsxs3("div", { className: "lax-model-retry__countdown", "data-testid": "lax-model-retry-countdown", children: [
4785
+ /* @__PURE__ */ jsxs4("div", { className: "lax-model-retry__countdown", "data-testid": "lax-model-retry-countdown", children: [
4758
4786
  "Retrying in ",
4759
4787
  retryInSeconds,
4760
4788
  " ",
@@ -4771,12 +4799,12 @@ function ModelRetryBlock({ state, verbose = false }) {
4771
4799
  }
4772
4800
 
4773
4801
  // src/view/CompactProgressBlock.tsx
4774
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
4802
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
4775
4803
  function CompactProgressBlock({ state }) {
4776
4804
  const bar = formatCompactProgressBar(state.percent);
4777
- return /* @__PURE__ */ jsxs4("div", { className: "lax-compact-progress", "data-testid": "lax-compact-progress", children: [
4805
+ return /* @__PURE__ */ jsxs5("div", { className: "lax-compact-progress", "data-testid": "lax-compact-progress", children: [
4778
4806
  /* @__PURE__ */ jsx6("div", { className: "lax-compact-progress__title", "data-testid": "lax-compact-progress-title", children: "\u273D Compacting conversation\u2026" }),
4779
- /* @__PURE__ */ jsxs4("div", { className: "lax-compact-progress__bar-line", "data-testid": "lax-compact-progress-bar", children: [
4807
+ /* @__PURE__ */ jsxs5("div", { className: "lax-compact-progress__bar-line", "data-testid": "lax-compact-progress-bar", children: [
4780
4808
  bar,
4781
4809
  " ",
4782
4810
  state.percent,
@@ -5016,7 +5044,7 @@ function getSpinnerFrameIndex(timeMs, reducedMotion = false) {
5016
5044
  import { useRef as useRef5 } from "react";
5017
5045
 
5018
5046
  // src/view/spinner/SpinnerGlimmerVerb.tsx
5019
- import { jsxs as jsxs5 } from "react/jsx-runtime";
5047
+ import { jsxs as jsxs6 } from "react/jsx-runtime";
5020
5048
  function SpinnerGlimmerVerb({
5021
5049
  verb,
5022
5050
  mode,
@@ -5042,7 +5070,7 @@ function SpinnerGlimmerVerb({
5042
5070
  ["--lax-spinner-flash-opacity"]: String(flashOpacity)
5043
5071
  }
5044
5072
  };
5045
- return /* @__PURE__ */ jsxs5("span", { className: classes.join(" "), style, children: [
5073
+ return /* @__PURE__ */ jsxs6("span", { className: classes.join(" "), style, children: [
5046
5074
  verb,
5047
5075
  "\u2026"
5048
5076
  ] });
@@ -5191,7 +5219,7 @@ function useStalledSpinnerIntensity(time, currentResponseLength, hasActiveTools
5191
5219
  }
5192
5220
 
5193
5221
  // src/view/spinner/SpinnerAnimationRow.tsx
5194
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
5222
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
5195
5223
  function SpinnerAnimationRow({
5196
5224
  mode,
5197
5225
  verb,
@@ -5249,7 +5277,7 @@ function SpinnerAnimationRow({
5249
5277
  className: thinkingStatus === "thinking" ? "lax-spinner-status-part--thinking" : void 0
5250
5278
  });
5251
5279
  }
5252
- return /* @__PURE__ */ jsxs6("div", { className: "lax-spinner", "data-testid": "lax-spinner", children: [
5280
+ return /* @__PURE__ */ jsxs7("div", { className: "lax-spinner", "data-testid": "lax-spinner", children: [
5253
5281
  /* @__PURE__ */ jsx7("span", { className: "lax-spinner-frame", "data-testid": "lax-spinner-frame", children: frame }),
5254
5282
  /* @__PURE__ */ jsx7(
5255
5283
  SpinnerGlimmerVerb,
@@ -5261,9 +5289,9 @@ function SpinnerAnimationRow({
5261
5289
  flashOpacity
5262
5290
  }
5263
5291
  ),
5264
- statusParts.length > 0 && /* @__PURE__ */ jsxs6("span", { className: "lax-spinner-status", children: [
5292
+ statusParts.length > 0 && /* @__PURE__ */ jsxs7("span", { className: "lax-spinner-status", children: [
5265
5293
  " (",
5266
- statusParts.map((part, i) => /* @__PURE__ */ jsxs6(
5294
+ statusParts.map((part, i) => /* @__PURE__ */ jsxs7(
5267
5295
  "span",
5268
5296
  {
5269
5297
  className: `lax-spinner-status-part${part.className ? ` ${part.className}` : ""}`,
@@ -5304,9 +5332,9 @@ function shouldShowNextTaskLine(showTaskList, tasks, sessionStatus) {
5304
5332
  }
5305
5333
 
5306
5334
  // src/view/Spinner.tsx
5307
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
5335
+ import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
5308
5336
  function MessageResponse({ children }) {
5309
- return /* @__PURE__ */ jsxs7("div", { className: "lax-message-response", children: [
5337
+ return /* @__PURE__ */ jsxs8("div", { className: "lax-message-response", children: [
5310
5338
  /* @__PURE__ */ jsx8("span", { className: "lax-message-response__marker", children: "\u23BF " }),
5311
5339
  /* @__PURE__ */ jsx8("span", { className: "lax-message-response__content", children })
5312
5340
  ] });
@@ -5435,7 +5463,7 @@ function Spinner({
5435
5463
  } else if (typeof thinkingStatus === "number") {
5436
5464
  thinkingText = `thought for ${Math.max(1, Math.round(thinkingStatus / 1e3))}s`;
5437
5465
  }
5438
- return /* @__PURE__ */ jsxs7("div", { className: "lax-spinner-container", "data-testid": "lax-spinner-container", children: [
5466
+ return /* @__PURE__ */ jsxs8("div", { className: "lax-spinner-container", "data-testid": "lax-spinner-container", children: [
5439
5467
  modelRetry ? /* @__PURE__ */ jsx8(ModelRetryBlock, { state: modelRetry, verbose }) : null,
5440
5468
  compactProgress ? /* @__PURE__ */ jsx8(CompactProgressBlock, { state: compactProgress }) : null,
5441
5469
  /* @__PURE__ */ jsx8(
@@ -5461,9 +5489,9 @@ function Spinner({
5461
5489
  // src/view/TaskListFooter.tsx
5462
5490
  import { useMemo as useMemo6, useState as useState8 } from "react";
5463
5491
  import { useSyncExternalStore as useSyncExternalStore2 } from "react";
5464
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
5492
+ import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
5465
5493
  function MessageResponse2({ children }) {
5466
- return /* @__PURE__ */ jsxs8("div", { className: "lax-message-response", children: [
5494
+ return /* @__PURE__ */ jsxs9("div", { className: "lax-message-response", children: [
5467
5495
  /* @__PURE__ */ jsx9("span", { className: "lax-message-response__marker", children: "\u23BF " }),
5468
5496
  /* @__PURE__ */ jsx9("span", { className: "lax-message-response__content", children })
5469
5497
  ] });
@@ -5524,8 +5552,8 @@ function TaskListFooter() {
5524
5552
  return null;
5525
5553
  }
5526
5554
  const label = formatTaskFooterLabel(tasks);
5527
- return /* @__PURE__ */ jsxs8("div", { className: "lax-task-list-footer", "data-testid": "lax-task-list-footer", children: [
5528
- /* @__PURE__ */ jsxs8(
5555
+ return /* @__PURE__ */ jsxs9("div", { className: "lax-task-list-footer", "data-testid": "lax-task-list-footer", children: [
5556
+ /* @__PURE__ */ jsxs9(
5529
5557
  "button",
5530
5558
  {
5531
5559
  type: "button",
@@ -5545,7 +5573,7 @@ function TaskListFooter() {
5545
5573
 
5546
5574
  // src/view/GroupedToolCallRow.tsx
5547
5575
  import { useCallback, useState as useState9 } from "react";
5548
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
5576
+ import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
5549
5577
  var INITIALIZING = "Initializing\u2026";
5550
5578
  function readGroupMeta(payload) {
5551
5579
  const raw = payload.groupMeta;
@@ -5612,18 +5640,18 @@ function GroupedSubline({
5612
5640
  const toggleExpanded = useCallback(() => {
5613
5641
  setExpanded((prev) => !prev);
5614
5642
  }, []);
5615
- return /* @__PURE__ */ jsxs9(
5643
+ return /* @__PURE__ */ jsxs10(
5616
5644
  "div",
5617
5645
  {
5618
5646
  className: "lax-tool-group__item lax-tool-group__subline-block",
5619
5647
  "data-group-index": index + 1,
5620
5648
  "data-tool-call-id": callId,
5621
5649
  children: [
5622
- /* @__PURE__ */ jsxs9("div", { className: "lax-tool-group__subline", children: [
5650
+ /* @__PURE__ */ jsxs10("div", { className: "lax-tool-group__subline", children: [
5623
5651
  /* @__PURE__ */ jsx10("span", { className: "lax-tool-group__tree", "aria-hidden": true, children: treeChar }),
5624
- /* @__PURE__ */ jsxs9("span", { className: "lax-tool-group__subline-flow", children: [
5652
+ /* @__PURE__ */ jsxs10("span", { className: "lax-tool-group__subline-flow", children: [
5625
5653
  /* @__PURE__ */ jsx10("span", { className: "lax-tool-group__subline-title", children: subTitle }),
5626
- status ? /* @__PURE__ */ jsxs9("span", { className: "lax-tool-group__subline-status", children: [
5654
+ status ? /* @__PURE__ */ jsxs10("span", { className: "lax-tool-group__subline-status", children: [
5627
5655
  " \xB7 ",
5628
5656
  status
5629
5657
  ] }) : null,
@@ -5653,8 +5681,8 @@ function GroupedToolCallRow({ payload }) {
5653
5681
  const anyPending = Array.isArray(payload.pendingCallIds) && payload.pendingCallIds.length > 0;
5654
5682
  const anyError = Array.isArray(payload.erroredCallIds) && payload.erroredCallIds.length > 0;
5655
5683
  const enableTranscript = toolUses.length >= 2;
5656
- return /* @__PURE__ */ jsxs9("div", { className: "lax-tool-group", "data-tool-name": toolName, "data-kind": "grouped_tool_use", children: [
5657
- /* @__PURE__ */ jsxs9(
5684
+ return /* @__PURE__ */ jsxs10("div", { className: "lax-tool-group", "data-tool-name": toolName, "data-kind": "grouped_tool_use", children: [
5685
+ /* @__PURE__ */ jsxs10(
5658
5686
  "div",
5659
5687
  {
5660
5688
  className: [
@@ -5690,7 +5718,7 @@ function GroupedToolCallRow({ payload }) {
5690
5718
  }
5691
5719
 
5692
5720
  // src/view/nodes/ThinkingSummaryNode.tsx
5693
- import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
5721
+ import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
5694
5722
  function formatThoughtDuration(seconds) {
5695
5723
  const rounded = Math.max(1, Math.round(seconds));
5696
5724
  return `${rounded}s`;
@@ -5715,18 +5743,18 @@ function ThinkingSummary({ node }) {
5715
5743
  const viewOptions = useSessionViewOptions();
5716
5744
  const showToolDetail = shouldShowReasoningInTimeline(viewOptions);
5717
5745
  const toolText = showToolDetail ? formatToolCounts(node) : null;
5718
- return /* @__PURE__ */ jsxs10(
5746
+ return /* @__PURE__ */ jsxs11(
5719
5747
  "div",
5720
5748
  {
5721
5749
  className: "lax-thought-summary",
5722
5750
  "data-kind": "thinking_summary",
5723
5751
  "data-round-id": node.roundId,
5724
5752
  children: [
5725
- /* @__PURE__ */ jsxs10("span", { className: "lax-thought-summary__text", children: [
5753
+ /* @__PURE__ */ jsxs11("span", { className: "lax-thought-summary__text", children: [
5726
5754
  "Thought for ",
5727
5755
  formatThoughtDuration(node.elapsedSeconds)
5728
5756
  ] }),
5729
- toolText ? /* @__PURE__ */ jsxs10("span", { className: "lax-thought-summary__tools", children: [
5757
+ toolText ? /* @__PURE__ */ jsxs11("span", { className: "lax-thought-summary__tools", children: [
5730
5758
  " \xB7 ",
5731
5759
  toolText
5732
5760
  ] }) : null,
@@ -5797,7 +5825,7 @@ function TimelineEntries({ registry }) {
5797
5825
  // src/view/Timeline.tsx
5798
5826
  import { useStore as useStore6 } from "zustand";
5799
5827
  import { useShallow as useShallow5 } from "zustand/shallow";
5800
- import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
5828
+ import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
5801
5829
  function useContentCharCount() {
5802
5830
  const store = useSessionStoreApi();
5803
5831
  return useStore6(
@@ -5819,7 +5847,7 @@ function Timeline({ showTaskListFooter = true }) {
5819
5847
  const { verbose } = useSessionViewOptions();
5820
5848
  const { startedAt } = useStore6(store, (s) => s.tree.meta);
5821
5849
  const contentCharCount = useContentCharCount();
5822
- return /* @__PURE__ */ jsxs11("div", { className: "lax-timeline", "data-testid": "lax-timeline", children: [
5850
+ return /* @__PURE__ */ jsxs12("div", { className: "lax-timeline", "data-testid": "lax-timeline", children: [
5823
5851
  /* @__PURE__ */ jsx14(TimelineEntries, { registry }),
5824
5852
  /* @__PURE__ */ jsx14(
5825
5853
  Spinner,
@@ -5882,7 +5910,7 @@ function estimateProjectedEntrySize(entry, fallback = DEFAULT_ESTIMATE_SIZE) {
5882
5910
  import { useRef as useRef7 } from "react";
5883
5911
  import { useVirtualizer } from "@tanstack/react-virtual";
5884
5912
  import { useStore as useStore7 } from "zustand";
5885
- import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
5913
+ import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
5886
5914
  var DEFAULT_VIRTUALIZE_THRESHOLD = 500;
5887
5915
  function useContentCharCount2() {
5888
5916
  const store = useSessionStoreApi();
@@ -5916,7 +5944,7 @@ function VirtualTimeline({
5916
5944
  },
5917
5945
  overscan: 5
5918
5946
  });
5919
- return /* @__PURE__ */ jsxs12(
5947
+ return /* @__PURE__ */ jsxs13(
5920
5948
  "div",
5921
5949
  {
5922
5950
  ref: parentRef,
@@ -5993,6 +6021,7 @@ export {
5993
6021
  DEFAULT_EVENT_TIERS,
5994
6022
  resolveEventTier,
5995
6023
  classifyEvent,
6024
+ formatHookFinishedSummary,
5996
6025
  streamChunk,
5997
6026
  reduceTree,
5998
6027
  reduceAgentLoopEvent,
@@ -6037,7 +6066,6 @@ export {
6037
6066
  isGroupableToolName,
6038
6067
  entryKey,
6039
6068
  iterMountCandidates,
6040
- formatHookFinishedSummary,
6041
6069
  SHELL_PROGRESS_MIN_ELAPSED_SECONDS,
6042
6070
  formatShellProgressSuffix,
6043
6071
  resolveShellProgressFromPayload,
@@ -6081,4 +6109,4 @@ export {
6081
6109
  VirtualTimeline,
6082
6110
  SessionTimeline
6083
6111
  };
6084
- //# sourceMappingURL=chunk-XEIQBTD2.js.map
6112
+ //# sourceMappingURL=chunk-I62OIBGA.js.map