langchain_agentx_stream_ui 0.1.2 → 0.1.8

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.
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  Agent,
3
+ AgentProgressLines,
3
4
  Bash,
4
5
  Edit,
5
6
  Glob,
@@ -7,9 +8,12 @@ import {
7
8
  INTERNAL_TOOL_NAMES,
8
9
  Read,
9
10
  SILENT_TASK_TOOL_NAMES,
11
+ SubagentTranscriptBlock,
10
12
  Write,
11
- createDefaultToolRegistry
12
- } from "./chunk-MHK53ZHC.js";
13
+ coerceSubagentProgressEntries,
14
+ createDefaultToolRegistry,
15
+ extractLastToolInfoFromProgress
16
+ } from "./chunk-7CLAU74Y.js";
13
17
 
14
18
  // src/types/tree.ts
15
19
  function createEmptyTree() {
@@ -37,7 +41,9 @@ function createEmptyTree() {
37
41
  completed: 0,
38
42
  customMessage: null
39
43
  },
40
- modelRetry: null
44
+ modelRetry: null,
45
+ parallelAgentTextGateCallIds: null,
46
+ deferredMainText: ""
41
47
  };
42
48
  }
43
49
 
@@ -65,6 +71,7 @@ var DEFAULT_EVENT_TIERS = {
65
71
  "subagent-end": "collapsed",
66
72
  "subagent-tool-call": "collapsed",
67
73
  "subagent-tool-result": "collapsed",
74
+ "subagent-transcript-message": "collapsed",
68
75
  "subagent-model-step": "collapsed",
69
76
  "hook-progress": "debug",
70
77
  "hook-finished": "debug",
@@ -102,7 +109,7 @@ function resolveToolParentId(event, ctx, eventIndex) {
102
109
  return toolNodeIdFromEvent(event, eventIndex);
103
110
  }
104
111
  function isSubagentFoldEvent(event) {
105
- if (event.event_type === "subagent-start" || event.event_type === "subagent-end" || event.event_type === "subagent-tool-call" || event.event_type === "subagent-tool-result" || event.event_type === "subagent-model-step") {
112
+ if (event.event_type === "subagent-start" || event.event_type === "subagent-end" || event.event_type === "subagent-tool-call" || event.event_type === "subagent-tool-result" || event.event_type === "subagent-transcript-message" || event.event_type === "subagent-model-step") {
106
113
  return true;
107
114
  }
108
115
  if (event.event_type === "tool-progress") {
@@ -132,11 +139,30 @@ function classifyEvent(event, ctx, overrides, eventIndex = 0) {
132
139
  return { event, tier, parentNodeId };
133
140
  }
134
141
 
142
+ // src/core/mainTextDefer.ts
143
+ function deferMainText(buffer, text) {
144
+ if (!text) return buffer ?? "";
145
+ return (buffer ?? "") + text;
146
+ }
147
+ function flushDeferredMainText(buffer) {
148
+ return buffer ?? "";
149
+ }
150
+
135
151
  // src/core/eventVisibility.ts
136
152
  var SUBAGENT_LEAK_FOLD_TOOLS = /* @__PURE__ */ new Set(["Bash", "Read", "Glob", "Grep"]);
137
153
  function isSubagentLeakFoldToolName(toolName) {
138
154
  return SUBAGENT_LEAK_FOLD_TOOLS.has(toolName);
139
155
  }
156
+ function findAgentToolCallNodeByCallId(tree, callId) {
157
+ const trimmed = callId.trim();
158
+ if (!trimmed) return null;
159
+ for (const node of Object.values(tree.byId)) {
160
+ if (node.kind !== "tool_call" || node.toolName !== "Agent") continue;
161
+ const id = (node.toolCallId ?? node.id.replace(/^tool:/, "")).trim();
162
+ if (id === trimmed) return node;
163
+ }
164
+ return null;
165
+ }
140
166
  function getRunningAgentParentCallIds(tree) {
141
167
  const ids = [];
142
168
  const seen = /* @__PURE__ */ new Set();
@@ -217,6 +243,65 @@ function isSubagentScopedTextEvent(data) {
217
243
  function isSubagentScopedReasoningEvent(data) {
218
244
  return isSubagentScopedTextEvent(data);
219
245
  }
246
+ var EXPLICIT_MAIN_QUERY_SOURCES = /* @__PURE__ */ new Set([
247
+ "repl_main",
248
+ "repl_main_thread",
249
+ "main_thread"
250
+ ]);
251
+ function isExplicitMainOrchestratorText(data) {
252
+ if (!data) return false;
253
+ const meta = bridgeEventDisplayMetadata(data);
254
+ const qs = meta?.query_source ?? data.query_source;
255
+ if (typeof qs === "string") {
256
+ const trimmed = qs.trim();
257
+ if (trimmed && !isAgentSubagentQuerySource(trimmed)) {
258
+ if (EXPLICIT_MAIN_QUERY_SOURCES.has(trimmed)) return true;
259
+ if (trimmed.startsWith("repl:")) return true;
260
+ }
261
+ }
262
+ if (data.emitter_route === "main") return true;
263
+ if (meta?.emitter_route === "main") return true;
264
+ return false;
265
+ }
266
+ function isParallelAgentTextGateActive(tree) {
267
+ const latched = tree.parallelAgentTextGateCallIds;
268
+ if (latched && latched.length >= 2) {
269
+ return latched.some((id) => {
270
+ const node = findAgentToolCallNodeByCallId(tree, id);
271
+ return !node || node.status === "running";
272
+ });
273
+ }
274
+ return getRunningAgentParentCallIds(tree).length >= 2;
275
+ }
276
+ function updateParallelAgentTextGate(tree) {
277
+ const running = getRunningAgentParentCallIds(tree);
278
+ let ids = tree.parallelAgentTextGateCallIds ?? [];
279
+ if (running.length >= 2) {
280
+ ids = [.../* @__PURE__ */ new Set([...ids, ...running])];
281
+ }
282
+ if (ids.length < 2) {
283
+ return tree.parallelAgentTextGateCallIds === null ? tree : { ...tree, parallelAgentTextGateCallIds: null };
284
+ }
285
+ const allTerminal = ids.every((id) => {
286
+ const node = findAgentToolCallNodeByCallId(tree, id);
287
+ return node != null && (node.status === "done" || node.status === "failed");
288
+ });
289
+ if (allTerminal) {
290
+ return { ...tree, parallelAgentTextGateCallIds: null };
291
+ }
292
+ const nextIds = [...ids];
293
+ if (tree.parallelAgentTextGateCallIds?.length === nextIds.length && tree.parallelAgentTextGateCallIds.every((id, i) => id === nextIds[i])) {
294
+ return tree;
295
+ }
296
+ return { ...tree, parallelAgentTextGateCallIds: nextIds };
297
+ }
298
+ function shouldDropParallelSubagentText(tree, data) {
299
+ if (!isParallelAgentTextGateActive(tree)) return false;
300
+ if (!data) return false;
301
+ if (isSubagentScopedTextEvent(data)) return true;
302
+ if (isExplicitMainOrchestratorText(data)) return false;
303
+ return true;
304
+ }
220
305
  function isDroppedByEmitterRoute(data) {
221
306
  if (!data) return false;
222
307
  if (isDropRouteValue(data.emitter_route)) return true;
@@ -296,6 +381,56 @@ function upsertSubagentSession(sessions, marker) {
296
381
  return { ...sessions, [marker.agentId]: marker };
297
382
  }
298
383
 
384
+ // src/core/subagentTranscriptLane.ts
385
+ function readField(row, camel, snake) {
386
+ const camelValue = row[camel];
387
+ if (camelValue !== void 0 && camelValue !== null) return camelValue;
388
+ const snakeValue = row[snake];
389
+ if (snakeValue !== void 0 && snakeValue !== null) return snakeValue;
390
+ return void 0;
391
+ }
392
+ function appendSubagentTranscriptMessage(entries, payload) {
393
+ const agentId = payload.agentId.trim();
394
+ if (!agentId) return entries;
395
+ const messageKind = payload.messageKind;
396
+ if (messageKind !== "assistant" && messageKind !== "user") return entries;
397
+ if (!payload.message || typeof payload.message !== "object") return entries;
398
+ return [
399
+ ...entries,
400
+ {
401
+ agentId,
402
+ messageKind,
403
+ message: payload.message,
404
+ step: payload.step,
405
+ toolName: payload.toolName,
406
+ subagentType: payload.subagentType
407
+ }
408
+ ];
409
+ }
410
+ function coerceSubagentTranscriptEntries(raw) {
411
+ if (!Array.isArray(raw)) return [];
412
+ const entries = [];
413
+ for (const item of raw) {
414
+ if (item == null || typeof item !== "object" || Array.isArray(item)) continue;
415
+ const row = item;
416
+ const agentId = readField(row, "agentId", "agent_id");
417
+ const kindRaw = readField(row, "messageKind", "message_kind");
418
+ const message = readField(row, "message", "message");
419
+ if (!agentId || !message) continue;
420
+ const messageKind = kindRaw === "user" ? "user" : kindRaw === "assistant" ? "assistant" : null;
421
+ if (!messageKind) continue;
422
+ entries.push({
423
+ agentId,
424
+ messageKind,
425
+ message,
426
+ step: readField(row, "step", "step"),
427
+ toolName: readField(row, "toolName", "tool_name"),
428
+ subagentType: readField(row, "subagentType", "subagent_type")
429
+ });
430
+ }
431
+ return entries;
432
+ }
433
+
299
434
  // src/core/taskSnapshot.ts
300
435
  var OPEN_TASK_STATUSES = /* @__PURE__ */ new Set(["pending", "in_progress"]);
301
436
  function normalizeTaskStatus(raw) {
@@ -685,6 +820,26 @@ function handleHookFinished(tree, event) {
685
820
  };
686
821
  }
687
822
  }
823
+ function extractDeferText(data) {
824
+ if (typeof data.text === "string") return data.text;
825
+ if (typeof data.delta === "string") return data.delta;
826
+ return "";
827
+ }
828
+ function flushDeferredMainTextToTree(tree, event, seq) {
829
+ const text = flushDeferredMainText(tree.deferredMainText);
830
+ tree.deferredMainText = "";
831
+ if (!text) return;
832
+ const id = `text:defer-${seq}`;
833
+ const node = {
834
+ kind: "text",
835
+ id,
836
+ accumulated: text,
837
+ status: "done",
838
+ startedAt: eventTimeToMs(event.timestamp)
839
+ };
840
+ tree.byId[id] = node;
841
+ appendMainStageChild(tree, id, event, seq);
842
+ }
688
843
  function handleTextStart(tree, event, seq) {
689
844
  clearModelRetry(tree);
690
845
  const id = `text:${seq}`;
@@ -1039,6 +1194,24 @@ function handleSubagentToolResult(tree, _event, parentNodeId, data) {
1039
1194
  })
1040
1195
  });
1041
1196
  }
1197
+ function handleSubagentTranscriptMessage(tree, parentNodeId, data) {
1198
+ const tool = agentToolNode(tree, parentNodeId);
1199
+ if (!tool || !parentNodeId) return;
1200
+ const message = data.message;
1201
+ if (message == null || typeof message !== "object" || Array.isArray(message)) return;
1202
+ const messageKind = data.message_kind;
1203
+ if (messageKind !== "assistant" && messageKind !== "user") return;
1204
+ patchToolNode(tree, parentNodeId, {
1205
+ subagentTranscript: appendSubagentTranscriptMessage(tool.subagentTranscript ?? [], {
1206
+ agentId: data.agent_id,
1207
+ messageKind,
1208
+ message,
1209
+ step: data.step,
1210
+ toolName: data.tool_name,
1211
+ subagentType: data.subagent_type
1212
+ })
1213
+ });
1214
+ }
1042
1215
  function handleStepStart(tree, event, parentNodeId, seq) {
1043
1216
  const toolId = parentNodeId;
1044
1217
  if (toolId && tree.byId[toolId]?.kind === "tool_call") {
@@ -1268,6 +1441,13 @@ function applyClassified(tree, classified, eventIndex, options) {
1268
1441
  case "subagent-tool-result":
1269
1442
  handleSubagentToolResult(tree, event, parentNodeId, event.data);
1270
1443
  break;
1444
+ case "subagent-transcript-message":
1445
+ handleSubagentTranscriptMessage(
1446
+ tree,
1447
+ parentNodeId,
1448
+ event.data
1449
+ );
1450
+ break;
1271
1451
  case "subagent-model-step":
1272
1452
  break;
1273
1453
  case "start-step":
@@ -1283,21 +1463,36 @@ function applyClassified(tree, classified, eventIndex, options) {
1283
1463
  return;
1284
1464
  }
1285
1465
  switch (event.event_type) {
1286
- case "text-start":
1287
- if (isDroppedByEmitterRoute(event.data)) break;
1288
- if (isSubagentScopedTextEvent(event.data)) break;
1466
+ case "text-start": {
1467
+ const textData = event.data;
1468
+ if (isDroppedByEmitterRoute(textData)) break;
1469
+ if (isSubagentScopedTextEvent(textData)) break;
1470
+ if (shouldDropParallelSubagentText(tree, textData)) break;
1289
1471
  handleTextStart(tree, event, seq);
1290
1472
  break;
1291
- case "text-delta":
1292
- if (isDroppedByEmitterRoute(event.data)) break;
1293
- if (isSubagentScopedTextEvent(event.data)) break;
1473
+ }
1474
+ case "text-delta": {
1475
+ const textData = event.data;
1476
+ if (isDroppedByEmitterRoute(textData)) break;
1477
+ if (isSubagentScopedTextEvent(textData)) break;
1478
+ if (shouldDropParallelSubagentText(tree, textData)) {
1479
+ tree.deferredMainText = deferMainText(
1480
+ tree.deferredMainText,
1481
+ extractDeferText(textData)
1482
+ );
1483
+ break;
1484
+ }
1294
1485
  handleTextDelta(tree, event, seq);
1295
1486
  break;
1296
- case "text-end":
1297
- if (isDroppedByEmitterRoute(event.data)) break;
1298
- if (isSubagentScopedTextEvent(event.data)) break;
1487
+ }
1488
+ case "text-end": {
1489
+ const textData = event.data;
1490
+ if (isDroppedByEmitterRoute(textData)) break;
1491
+ if (isSubagentScopedTextEvent(textData)) break;
1492
+ if (shouldDropParallelSubagentText(tree, textData)) break;
1299
1493
  handleTextEnd(tree, event);
1300
1494
  break;
1495
+ }
1301
1496
  case "reasoning-start":
1302
1497
  if (isDroppedByEmitterRoute(event.data)) break;
1303
1498
  if (isSubagentScopedReasoningEvent(event.data)) break;
@@ -1369,7 +1564,12 @@ function reduceTree(tree, event, eventIndex, options) {
1369
1564
  if (event.session_id && !next.meta.sessionId) {
1370
1565
  next.meta.sessionId = event.session_id;
1371
1566
  }
1372
- return next;
1567
+ const latchedBeforeGateUpdate = next.parallelAgentTextGateCallIds;
1568
+ const updated = updateParallelAgentTextGate(next);
1569
+ if (latchedBeforeGateUpdate !== null && updated.parallelAgentTextGateCallIds === null) {
1570
+ flushDeferredMainTextToTree(updated, event, eventIndex);
1571
+ }
1572
+ return updated;
1373
1573
  }
1374
1574
  var reduceAgentLoopEvent = reduceTree;
1375
1575
  function reduceEvents(events, options) {
@@ -2793,7 +2993,7 @@ var GroupedToolUseAccumulator = class {
2793
2993
  for (const item of bucket.toolUses) {
2794
2994
  const payload = item.entry.payload;
2795
2995
  nodeIds.push(item.nodeId);
2796
- toolUses.push({
2996
+ const toolUse = {
2797
2997
  tool_call_id: item.toolCallId,
2798
2998
  tool_name: item.toolName,
2799
2999
  tool_input: payload.tool_input ?? {},
@@ -2802,7 +3002,14 @@ var GroupedToolUseAccumulator = class {
2802
3002
  is_error: payload.is_error,
2803
3003
  display: payload.display,
2804
3004
  meta: payload.meta
2805
- });
3005
+ };
3006
+ if (Array.isArray(payload.subagent_progress) && payload.subagent_progress.length > 0) {
3007
+ toolUse.subagent_progress = payload.subagent_progress;
3008
+ }
3009
+ if (Array.isArray(payload.subagent_transcript) && payload.subagent_transcript.length > 0) {
3010
+ toolUse.subagent_transcript = payload.subagent_transcript;
3011
+ }
3012
+ toolUses.push(toolUse);
2806
3013
  if (isResolved(payload)) {
2807
3014
  resolvedCallIds.push(item.toolCallId);
2808
3015
  toolResults.push({
@@ -3315,6 +3522,9 @@ function mapToolCall(node, pendingPermissionTools) {
3315
3522
  if (node.subagentProgress?.length) {
3316
3523
  payload.subagent_progress = node.subagentProgress;
3317
3524
  }
3525
+ if (node.subagentTranscript?.length) {
3526
+ payload.subagent_transcript = node.subagentTranscript;
3527
+ }
3318
3528
  if (responseId) {
3319
3529
  payload.message_id = responseId;
3320
3530
  }
@@ -4298,8 +4508,7 @@ function SpinnerGlimmerVerb({
4298
4508
  mode,
4299
4509
  reducedMotion,
4300
4510
  stalledIntensity,
4301
- flashOpacity,
4302
- shimmerActive
4511
+ flashOpacity
4303
4512
  }) {
4304
4513
  const classes = ["lax-spinner-verb"];
4305
4514
  if (reducedMotion) {
@@ -4308,11 +4517,8 @@ function SpinnerGlimmerVerb({
4308
4517
  classes.push("lax-spinner-verb--stalled");
4309
4518
  } else if (mode === "tool-use") {
4310
4519
  classes.push("lax-spinner-verb--tool-use");
4311
- } else if (shimmerActive) {
4312
- classes.push("lax-spinner-verb--shimmer");
4313
- if (mode === "requesting") {
4314
- classes.push("lax-spinner-verb--shimmer-fast");
4315
- }
4520
+ } else {
4521
+ classes.push("lax-spinner-verb--static");
4316
4522
  }
4317
4523
  const style = {
4318
4524
  ...stalledIntensity > 0 && {
@@ -4496,7 +4702,6 @@ function SpinnerAnimationRow({
4496
4702
  );
4497
4703
  const frameIndex = getSpinnerFrameIndex(time, reducedMotion);
4498
4704
  const frame = SPINNER_FRAMES[frameIndex];
4499
- const shimmerActive = !reducedMotion && stalledIntensity === 0 && (mode === "requesting" || mode === "thinking");
4500
4705
  const flashOpacity = reducedMotion || mode !== "tool-use" ? 0 : (Math.sin(time / 1e3 * Math.PI) + 1) / 2;
4501
4706
  if (reducedMotion) {
4502
4707
  tokenCounterRef.current = targetTokenCount;
@@ -4539,8 +4744,7 @@ function SpinnerAnimationRow({
4539
4744
  mode,
4540
4745
  reducedMotion,
4541
4746
  stalledIntensity,
4542
- flashOpacity,
4543
- shimmerActive
4747
+ flashOpacity
4544
4748
  }
4545
4749
  ),
4546
4750
  statusParts.length > 0 && /* @__PURE__ */ jsxs5("span", { className: "lax-spinner-status", children: [
@@ -4817,6 +5021,7 @@ function TaskListFooter() {
4817
5021
  }
4818
5022
 
4819
5023
  // src/view/GroupedToolCallRow.tsx
5024
+ import { useCallback, useState as useState9 } from "react";
4820
5025
  import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
4821
5026
  var INITIALIZING = "Initializing\u2026";
4822
5027
  function readGroupMeta(payload) {
@@ -4831,7 +5036,7 @@ function readToolUses(payload) {
4831
5036
  (item) => item != null && typeof item === "object" && !Array.isArray(item)
4832
5037
  );
4833
5038
  }
4834
- function sublineStatus(callId, payload) {
5039
+ function sublineStatus(callId, entry, payload) {
4835
5040
  const pending = new Set(
4836
5041
  Array.isArray(payload.pendingCallIds) ? payload.pendingCallIds : []
4837
5042
  );
@@ -4841,7 +5046,9 @@ function sublineStatus(callId, payload) {
4841
5046
  const resolved = new Set(
4842
5047
  Array.isArray(payload.resolvedCallIds) ? payload.resolvedCallIds : []
4843
5048
  );
4844
- if (pending.has(callId)) return INITIALIZING;
5049
+ if (pending.has(callId)) {
5050
+ return extractLastToolInfoFromProgress(entry.subagent_progress) ?? INITIALIZING;
5051
+ }
4845
5052
  if (errored.has(callId)) return "Error";
4846
5053
  if (resolved.has(callId)) {
4847
5054
  const results = Array.isArray(payload.toolResults) ? payload.toolResults : [];
@@ -4863,6 +5070,67 @@ function sublineStatus(callId, payload) {
4863
5070
  }
4864
5071
  return null;
4865
5072
  }
5073
+ function GroupedSubline({
5074
+ callId,
5075
+ entry,
5076
+ payload,
5077
+ hideType,
5078
+ treeChar,
5079
+ index,
5080
+ enableTranscript
5081
+ }) {
5082
+ const [expanded, setExpanded] = useState9(false);
5083
+ const subTitle = formatAgentSublineTitle(entry, hideType);
5084
+ const status = sublineStatus(callId, entry, payload);
5085
+ const transcript = coerceSubagentTranscriptEntries(entry.subagent_transcript);
5086
+ const progress = coerceSubagentProgressEntries(entry.subagent_progress);
5087
+ const hasTranscriptLane = transcript.length > 0;
5088
+ const canExpand = enableTranscript && (hasTranscriptLane || progress.length > 0);
5089
+ const toggleExpanded = useCallback(() => {
5090
+ setExpanded((prev) => !prev);
5091
+ }, []);
5092
+ return /* @__PURE__ */ jsxs8(
5093
+ "div",
5094
+ {
5095
+ className: "lax-tool-group__item lax-tool-group__subline-block",
5096
+ "data-group-index": index + 1,
5097
+ "data-tool-call-id": callId,
5098
+ children: [
5099
+ /* @__PURE__ */ jsxs8("div", { className: "lax-tool-group__subline", children: [
5100
+ /* @__PURE__ */ jsx9("span", { className: "lax-tool-group__tree", "aria-hidden": true, children: treeChar }),
5101
+ /* @__PURE__ */ jsx9("span", { className: "lax-tool-group__subline-title", children: subTitle }),
5102
+ status && /* @__PURE__ */ jsxs8("span", { className: "lax-tool-group__subline-status", children: [
5103
+ " \xB7 ",
5104
+ status
5105
+ ] })
5106
+ ] }),
5107
+ canExpand && !expanded ? /* @__PURE__ */ jsx9(
5108
+ "button",
5109
+ {
5110
+ type: "button",
5111
+ className: "lax-tool-group__transcript-link",
5112
+ onClick: toggleExpanded,
5113
+ "aria-expanded": false,
5114
+ children: "Show transcript"
5115
+ }
5116
+ ) : null,
5117
+ canExpand && expanded ? /* @__PURE__ */ jsxs8("div", { className: "lax-tool-group__transcript-panel", "data-testid": "lax-grouped-transcript", children: [
5118
+ hasTranscriptLane ? /* @__PURE__ */ jsx9(SubagentTranscriptBlock, { entries: transcript, dataSource: "transcript-lane" }) : /* @__PURE__ */ jsx9(AgentProgressLines, { entries: progress, mode: "full" }),
5119
+ /* @__PURE__ */ jsx9(
5120
+ "button",
5121
+ {
5122
+ type: "button",
5123
+ className: "lax-tool-group__transcript-link",
5124
+ onClick: toggleExpanded,
5125
+ "aria-expanded": true,
5126
+ children: "Hide transcript"
5127
+ }
5128
+ )
5129
+ ] }) : null
5130
+ ]
5131
+ }
5132
+ );
5133
+ }
4866
5134
  function GroupedToolCallRow({ payload }) {
4867
5135
  const toolName = String(payload.toolName ?? payload.tool_name ?? "Agent");
4868
5136
  const groupMeta = readGroupMeta(payload);
@@ -4871,6 +5139,7 @@ function GroupedToolCallRow({ payload }) {
4871
5139
  const title = groupMeta?.title ?? `${toolName} \xD7 ${toolUses.length}`;
4872
5140
  const anyPending = Array.isArray(payload.pendingCallIds) && payload.pendingCallIds.length > 0;
4873
5141
  const anyError = Array.isArray(payload.erroredCallIds) && payload.erroredCallIds.length > 0;
5142
+ const enableTranscript = toolUses.length >= 2;
4874
5143
  return /* @__PURE__ */ jsxs8("div", { className: "lax-tool-group", "data-tool-name": toolName, "data-kind": "grouped_tool_use", children: [
4875
5144
  /* @__PURE__ */ jsxs8(
4876
5145
  "div",
@@ -4888,24 +5157,18 @@ function GroupedToolCallRow({ payload }) {
4888
5157
  ),
4889
5158
  /* @__PURE__ */ jsx9("div", { className: "lax-tool-group__items", children: toolUses.map((entry, index) => {
4890
5159
  const callId = String(entry.tool_call_id ?? "");
4891
- const subTitle = formatAgentSublineTitle(entry, hideType);
4892
- const status = sublineStatus(callId, payload);
4893
5160
  const isLast = index === toolUses.length - 1;
4894
5161
  const treeChar = isLast ? "\u2514\u2500" : "\u251C\u2500";
4895
- return /* @__PURE__ */ jsxs8(
4896
- "div",
5162
+ return /* @__PURE__ */ jsx9(
5163
+ GroupedSubline,
4897
5164
  {
4898
- className: "lax-tool-group__item lax-tool-group__subline",
4899
- "data-group-index": index + 1,
4900
- "data-tool-call-id": callId,
4901
- children: [
4902
- /* @__PURE__ */ jsx9("span", { className: "lax-tool-group__tree", "aria-hidden": true, children: treeChar }),
4903
- /* @__PURE__ */ jsx9("span", { className: "lax-tool-group__subline-title", children: subTitle }),
4904
- status && /* @__PURE__ */ jsxs8("span", { className: "lax-tool-group__subline-status", children: [
4905
- " \xB7 ",
4906
- status
4907
- ] })
4908
- ]
5165
+ callId,
5166
+ entry,
5167
+ payload,
5168
+ hideType,
5169
+ treeChar,
5170
+ index,
5171
+ enableTranscript
4909
5172
  },
4910
5173
  callId || `group-item-${index}`
4911
5174
  );
@@ -5294,4 +5557,4 @@ export {
5294
5557
  VirtualTimeline,
5295
5558
  SessionTimeline
5296
5559
  };
5297
- //# sourceMappingURL=chunk-3B4WC67E.js.map
5560
+ //# sourceMappingURL=chunk-LBJFJF22.js.map