langchain_agentx_stream_ui 0.8.2 → 0.8.4

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,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { b as ToolDisplayProps, T as ToolBodyComponent } from './types-BzeE37Ze.js';
3
- import { T as ToolDisplayRegistry } from './sessionViewOptions-DaxstMhx.js';
2
+ import { b as ToolDisplayProps, T as ToolBodyComponent } from './types-Db-2uTSL.js';
3
+ import { T as ToolDisplayRegistry } from './sessionViewOptions-DboYs118.js';
4
4
 
5
5
  declare function DefaultToolBody({ result, bodyMode, onBodyModeChange, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
6
6
 
@@ -20,13 +20,13 @@ declare function WriteToolBody({ input, result, bodyMode, onBodyModeChange, }: T
20
20
 
21
21
  declare function BashToolBody({ result, bodyMode, onBodyModeChange, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
22
22
 
23
- declare function AgentToolBody({ result, bodyMode, onBodyModeChange, status, subagentProgress, subagentTranscript, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
23
+ declare function AgentToolBody({ result, bodyMode, onBodyModeChange, status, subagentProgress, subagentTranscript, subagentHookFold, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
24
24
 
25
25
  declare function WebSearchToolBody({ result, bodyMode, onBodyModeChange, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
26
26
 
27
27
  declare function WebFetchToolBody({ result, bodyMode, onBodyModeChange, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
28
28
 
29
- declare function SkillToolBody({ result, bodyMode, onBodyModeChange, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
29
+ declare function SkillToolBody({ input, result, bodyMode, onBodyModeChange, status, skillProgressMessages, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
30
30
 
31
31
  declare function AskUserQuestionToolBody({ input, result, bodyMode, onBodyModeChange, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
32
32
 
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as ToolBodyMode } from './types-BzeE37Ze.js';
2
+ import { a as ToolBodyMode } from './types-Db-2uTSL.js';
3
3
 
4
4
  declare const MAX_PREVIEW_LINES = 3;
5
5
  interface TruncatedContentProps {
@@ -780,6 +780,60 @@ function softKindTestId(softKind, scope = "tool") {
780
780
  return softKind === "canceled" ? "lax-tool-canceled" : "lax-tool-rejected";
781
781
  }
782
782
 
783
+ // src/core/subagentHookFold.ts
784
+ var AGENT_FOLD_TOOL_NAMES = /* @__PURE__ */ new Set(["Agent", "Task"]);
785
+ function isAgentFoldTool(tool) {
786
+ return AGENT_FOLD_TOOL_NAMES.has(tool.toolName);
787
+ }
788
+ function hasRunningSubagentSession(tool) {
789
+ const sessions = tool.subagentSessions;
790
+ if (!sessions) return false;
791
+ return Object.values(sessions).some((marker) => marker.status === "running");
792
+ }
793
+ function resolveActiveAgentParentToolId(tree) {
794
+ const stack = tree.openSubAgentStack;
795
+ if (stack.length > 0) {
796
+ for (let i = stack.length - 1; i >= 0; i -= 1) {
797
+ const id = stack[i];
798
+ const node = tree.byId[id];
799
+ if (node?.kind === "tool_call" && isAgentFoldTool(node)) {
800
+ return id;
801
+ }
802
+ }
803
+ }
804
+ for (let i = tree.rootChildren.length - 1; i >= 0; i -= 1) {
805
+ const id = tree.rootChildren[i];
806
+ const node = tree.byId[id];
807
+ if (node?.kind !== "tool_call" || !isAgentFoldTool(node)) continue;
808
+ if (node.status === "running" && hasRunningSubagentSession(node)) {
809
+ return id;
810
+ }
811
+ }
812
+ return void 0;
813
+ }
814
+ function absorbPreToolHookIntoFold(fold, data) {
815
+ const durationMs = typeof data.duration_ms === "number" && Number.isFinite(data.duration_ms) ? Math.max(0, data.duration_ms) : 0;
816
+ return {
817
+ hookCount: (fold?.hookCount ?? 0) + 1,
818
+ hookTotalMs: (fold?.hookTotalMs ?? 0) + durationMs
819
+ };
820
+ }
821
+ function formatHookDuration(totalMs) {
822
+ if (totalMs < 1e3) return `${Math.round(totalMs)}ms`;
823
+ const seconds = totalMs / 1e3;
824
+ if (seconds < 10) return `${seconds.toFixed(1)}s`;
825
+ return `${Math.round(seconds)}s`;
826
+ }
827
+ function formatSubagentHookFoldLine(fold) {
828
+ const { hookCount, hookTotalMs } = fold;
829
+ const label = hookCount === 1 ? "hook" : "hooks";
830
+ const base = `Ran ${hookCount} PreToolUse ${label}`;
831
+ if (hookTotalMs > 0) {
832
+ return `${base} (${formatHookDuration(hookTotalMs)})`;
833
+ }
834
+ return base;
835
+ }
836
+
783
837
  // src/view/tools/agent/AgentProgressLines.tsx
784
838
  import { jsx, jsxs } from "react/jsx-runtime";
785
839
  function AgentProgressLines({
@@ -830,10 +884,25 @@ function AgentProgressLines({
830
884
  // src/view/tools/presentation/subagentTranscriptRenderer.ts
831
885
  function toolCallsFromAssistant(message) {
832
886
  const raw = message.tool_calls;
833
- if (!Array.isArray(raw)) return [];
834
- return raw.filter(
835
- (item) => item != null && typeof item === "object" && !Array.isArray(item)
836
- );
887
+ if (Array.isArray(raw) && raw.length > 0) {
888
+ return raw.filter(
889
+ (item) => item != null && typeof item === "object" && !Array.isArray(item)
890
+ );
891
+ }
892
+ const content = message.content;
893
+ if (!Array.isArray(content)) return [];
894
+ const fromContent = [];
895
+ for (const block of content) {
896
+ if (block == null || typeof block !== "object" || Array.isArray(block)) continue;
897
+ const item = block;
898
+ if (item.type !== "tool_use") continue;
899
+ fromContent.push({
900
+ name: item.name,
901
+ input: item.input,
902
+ id: item.id
903
+ });
904
+ }
905
+ return fromContent;
837
906
  }
838
907
  function toolInputFromCall(call) {
839
908
  const args = call.args;
@@ -994,10 +1063,11 @@ function renderTranscriptLaneLines(entries) {
994
1063
  }
995
1064
  };
996
1065
  for (const entry of entries) {
1066
+ const entryKey = entry.id ?? "entry";
997
1067
  if (entry.messageKind === "assistant") {
998
1068
  const toolCalls = toolCallsFromAssistant(entry.message);
999
1069
  if (toolCalls.length > 0) {
1000
- for (const call of toolCalls) {
1070
+ toolCalls.forEach((call, callIndex) => {
1001
1071
  const callName = String(call.name ?? entry.toolName ?? "Tool").trim();
1002
1072
  const text2 = formatAssistantToolLine(
1003
1073
  callName,
@@ -1005,15 +1075,23 @@ function renderTranscriptLaneLines(entries) {
1005
1075
  toolInputFromCall(call)
1006
1076
  );
1007
1077
  if (text2.length > 0) {
1008
- pendingCalls.push({ kind: "call", text: text2 });
1078
+ pendingCalls.push({
1079
+ kind: "call",
1080
+ text: text2,
1081
+ lineKey: `${entryKey}:a:${callIndex}`
1082
+ });
1009
1083
  }
1010
- }
1084
+ });
1011
1085
  continue;
1012
1086
  }
1013
1087
  flushPendingCalls();
1014
1088
  const text = String(entry.message.content ?? "").trim();
1015
1089
  if (text) {
1016
- lines.push({ kind: "call", text: truncatePreview2(text, 240) });
1090
+ lines.push({
1091
+ kind: "call",
1092
+ text: truncatePreview2(text, 240),
1093
+ lineKey: `${entryKey}:a:0`
1094
+ });
1017
1095
  }
1018
1096
  continue;
1019
1097
  }
@@ -1024,7 +1102,7 @@ function renderTranscriptLaneLines(entries) {
1024
1102
  if (paired && paired.text.length > 0) {
1025
1103
  lines.push(paired);
1026
1104
  }
1027
- lines.push(result);
1105
+ lines.push({ ...result, lineKey: `${entryKey}:u:0` });
1028
1106
  }
1029
1107
  }
1030
1108
  flushPendingCalls();
@@ -1101,7 +1179,8 @@ function AgentToolBody({
1101
1179
  onBodyModeChange,
1102
1180
  status,
1103
1181
  subagentProgress,
1104
- subagentTranscript
1182
+ subagentTranscript,
1183
+ subagentHookFold
1105
1184
  }) {
1106
1185
  const softKind = result ? classifyToolResultSoftKind(result) : null;
1107
1186
  if (softKind) {
@@ -1135,7 +1214,8 @@ function AgentToolBody({
1135
1214
  const showTranscriptLane = bodyMode === "full" && transcriptLane.length > 0;
1136
1215
  const showRunningProgress = status === "running" && progress.length > 0 && !showTranscriptLane;
1137
1216
  const showTranscriptFallback = bodyMode === "full" && !showTranscriptLane && transcriptFallback.length > 0;
1138
- if (!showRunningProgress && !showDoneSummary && !doneFilesystemStatus && !showTranscriptLane && !showTranscriptFallback) {
1217
+ const hookFoldLine = subagentHookFold && subagentHookFold.hookCount > 0 ? formatSubagentHookFoldLine(subagentHookFold) : null;
1218
+ if (!showRunningProgress && !showDoneSummary && !doneFilesystemStatus && !showTranscriptLane && !showTranscriptFallback && !hookFoldLine) {
1139
1219
  const idleLabel = status === "failed" || status === "cancelled" ? "(stopped)" : "(running)";
1140
1220
  return /* @__PURE__ */ jsx3("div", { className: "lax-tool-body lax-tool-body--agent", children: /* @__PURE__ */ jsx3("div", { className: "lax-tool-body__block", "data-variant": "dim", children: /* @__PURE__ */ jsx3("pre", { className: "lax-tool-body__text", children: idleLabel }) }) });
1141
1221
  }
@@ -1169,7 +1249,18 @@ function AgentToolBody({
1169
1249
  }
1170
1250
  ) : null,
1171
1251
  showTranscriptLane ? /* @__PURE__ */ jsx3(SubagentTranscriptBlock, { entries: transcriptLane, dataSource: "transcript-lane" }) : null,
1172
- showTranscriptFallback ? /* @__PURE__ */ jsx3(TranscriptFallbackLines, { text: transcriptFallback }) : null
1252
+ showTranscriptFallback ? /* @__PURE__ */ jsx3(TranscriptFallbackLines, { text: transcriptFallback }) : null,
1253
+ hookFoldLine ? /* @__PURE__ */ jsx3(
1254
+ "div",
1255
+ {
1256
+ className: "lax-agent-progress lax-agent-progress--hook-fold",
1257
+ "data-testid": "lax-agent-subagent-hook-fold",
1258
+ children: /* @__PURE__ */ jsxs3("div", { className: "lax-agent-progress__line", children: [
1259
+ /* @__PURE__ */ jsx3("span", { className: "lax-agent-progress__gutter", "aria-hidden": true, children: AGENT_PROGRESS_GUTTER }),
1260
+ /* @__PURE__ */ jsx3("span", { className: "lax-agent-progress__text", children: hookFoldLine })
1261
+ ] })
1262
+ }
1263
+ ) : null
1173
1264
  ] });
1174
1265
  }
1175
1266
 
@@ -1575,25 +1666,122 @@ function ReadToolBody({
1575
1666
  ] });
1576
1667
  }
1577
1668
 
1669
+ // src/view/tools/skill/skillForkUI.ts
1670
+ var SKILL_PROGRESS_TAIL_LINES = 3;
1671
+ var SKILL_FORK_INITIALIZING = "Initializing\u2026";
1672
+ function isSkillForkExecution(input, display) {
1673
+ const inp = asInputRecord(input);
1674
+ const d = asDisplayRecord(display);
1675
+ const ctx = strField(inp, "context") || strField(d, "execution_context") || strField(inp, "execution_context");
1676
+ return typeof ctx === "string" && ctx.trim().toLowerCase() === "fork";
1677
+ }
1678
+ function isSkillForkDoneResult(input, display) {
1679
+ if (!isSkillForkExecution(input, display)) return false;
1680
+ const d = asDisplayRecord(display);
1681
+ if (d?.status === "forked") return true;
1682
+ if (d?.execution_context === "fork" && d?.fork_result != null) return true;
1683
+ return false;
1684
+ }
1685
+
1686
+ // src/view/tools/skill/SkillProgressLines.tsx
1687
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
1688
+ function toTranscriptEntry(entry) {
1689
+ return {
1690
+ id: entry.id,
1691
+ agentId: entry.agentId,
1692
+ messageKind: entry.messageKind,
1693
+ message: entry.message,
1694
+ step: entry.step,
1695
+ toolName: entry.toolName
1696
+ };
1697
+ }
1698
+ function SkillProgressLines({
1699
+ entries,
1700
+ mode,
1701
+ maxVisible = SKILL_PROGRESS_TAIL_LINES,
1702
+ onExpand
1703
+ }) {
1704
+ if (entries.length === 0) {
1705
+ return /* @__PURE__ */ jsx11("div", { className: "lax-skill-progress", "data-testid": "lax-skill-progress-initializing", children: /* @__PURE__ */ jsxs8("div", { className: "lax-agent-progress__line", children: [
1706
+ /* @__PURE__ */ jsx11("span", { className: "lax-agent-progress__gutter", "aria-hidden": true, children: AGENT_PROGRESS_GUTTER }),
1707
+ /* @__PURE__ */ jsx11("span", { className: "lax-agent-progress__text lax-skill-progress__initializing", children: SKILL_FORK_INITIALIZING })
1708
+ ] }) });
1709
+ }
1710
+ const allLines = renderTranscriptLaneLines(entries.map(toTranscriptEntry));
1711
+ const limit = mode === "full" ? allLines.length : maxVisible;
1712
+ const visible = allLines.slice(-limit);
1713
+ const hiddenCount = allLines.length - visible.length;
1714
+ return /* @__PURE__ */ jsxs8("div", { className: "lax-skill-progress", "data-testid": "lax-skill-progress", children: [
1715
+ visible.map((line, index) => /* @__PURE__ */ jsxs8(
1716
+ "div",
1717
+ {
1718
+ className: "lax-agent-progress__line",
1719
+ children: [
1720
+ /* @__PURE__ */ jsx11("span", { className: "lax-agent-progress__gutter", "aria-hidden": true, children: AGENT_PROGRESS_GUTTER }),
1721
+ /* @__PURE__ */ jsx11("span", { className: "lax-agent-progress__text", children: line.text })
1722
+ ]
1723
+ },
1724
+ line.lineKey ?? `skill-progress-line:${index}`
1725
+ )),
1726
+ hiddenCount > 0 && mode !== "full" ? /* @__PURE__ */ jsxs8("div", { className: "lax-agent-progress__line lax-agent-progress__line--more", children: [
1727
+ /* @__PURE__ */ jsx11("span", { className: "lax-agent-progress__gutter", "aria-hidden": true, children: AGENT_PROGRESS_INDENT }),
1728
+ /* @__PURE__ */ jsxs8(
1729
+ "button",
1730
+ {
1731
+ type: "button",
1732
+ className: "lax-agent-progress__more",
1733
+ "aria-expanded": false,
1734
+ onClick: onExpand,
1735
+ children: [
1736
+ "+",
1737
+ hiddenCount,
1738
+ " more tool ",
1739
+ hiddenCount === 1 ? "use" : "uses"
1740
+ ]
1741
+ }
1742
+ )
1743
+ ] }) : null
1744
+ ] });
1745
+ }
1746
+
1578
1747
  // src/view/tools/skill/SkillToolBody.tsx
1579
- import { jsx as jsx11 } from "react/jsx-runtime";
1748
+ import { jsx as jsx12 } from "react/jsx-runtime";
1580
1749
  var MAX_BODY_LINES = 20;
1581
1750
  function SkillToolBody({
1751
+ input,
1582
1752
  result,
1583
1753
  bodyMode,
1584
- onBodyModeChange
1754
+ onBodyModeChange,
1755
+ status,
1756
+ skillProgressMessages
1585
1757
  }) {
1586
1758
  if (result?.error) {
1587
- return /* @__PURE__ */ jsx11("div", { className: "lax-tool-body lax-tool-body--skill", children: /* @__PURE__ */ jsx11("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx11("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
1759
+ return /* @__PURE__ */ jsx12("div", { className: "lax-tool-body lax-tool-body--skill", children: /* @__PURE__ */ jsx12("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx12("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
1760
+ }
1761
+ const display = result?.display;
1762
+ const forkExec = isSkillForkExecution(input, display);
1763
+ const forkDone = isSkillForkDoneResult(input, display);
1764
+ if (forkDone || forkExec && status === "done") {
1765
+ return /* @__PURE__ */ jsx12("div", { className: "lax-tool-body lax-tool-body--skill", "data-testid": "lax-skill-fork-done", children: /* @__PURE__ */ jsx12("div", { className: "lax-tool-body__block", "data-variant": "dim", children: /* @__PURE__ */ jsx12("pre", { className: "lax-tool-body__text", children: "Done" }) }) });
1766
+ }
1767
+ if (forkExec && status === "running") {
1768
+ return /* @__PURE__ */ jsx12("div", { className: "lax-tool-body lax-tool-body--skill lax-tool-body--skill-fork-running", children: /* @__PURE__ */ jsx12(
1769
+ SkillProgressLines,
1770
+ {
1771
+ entries: skillProgressMessages ?? [],
1772
+ mode: bodyMode,
1773
+ onExpand: () => onBodyModeChange?.("full")
1774
+ }
1775
+ ) });
1588
1776
  }
1589
1777
  const text = result?.summary?.trim() ?? "";
1590
1778
  if (!text) {
1591
- return /* @__PURE__ */ jsx11("div", { className: "lax-tool-body lax-tool-body--skill", children: /* @__PURE__ */ jsx11("div", { className: "lax-tool-body__block", "data-variant": "dim", children: /* @__PURE__ */ jsx11("pre", { className: "lax-tool-body__text", children: "(done)" }) }) });
1779
+ return /* @__PURE__ */ jsx12("div", { className: "lax-tool-body lax-tool-body--skill", children: /* @__PURE__ */ jsx12("div", { className: "lax-tool-body__block", "data-variant": "dim", children: /* @__PURE__ */ jsx12("pre", { className: "lax-tool-body__text", children: "(done)" }) }) });
1592
1780
  }
1593
1781
  const { text: truncated, truncated: was } = truncateLines(text, MAX_BODY_LINES);
1594
1782
  const bodyText = was ? `${truncated}
1595
1783
  \u2026 \u5DF2\u622A\u65AD` : truncated;
1596
- return /* @__PURE__ */ jsx11("div", { className: "lax-tool-body lax-tool-body--skill", children: /* @__PURE__ */ jsx11(
1784
+ return /* @__PURE__ */ jsx12("div", { className: "lax-tool-body lax-tool-body--skill", children: /* @__PURE__ */ jsx12(
1597
1785
  TruncatedContent,
1598
1786
  {
1599
1787
  text: bodyText,
@@ -1605,7 +1793,7 @@ function SkillToolBody({
1605
1793
  }
1606
1794
 
1607
1795
  // src/view/tools/webfetch/WebFetchToolBody.tsx
1608
- import { jsx as jsx12 } from "react/jsx-runtime";
1796
+ import { jsx as jsx13 } from "react/jsx-runtime";
1609
1797
  var RECEIVED_RE = /Received\s+.+/i;
1610
1798
  var MAX_BODY_LINES2 = 15;
1611
1799
  function buildWebFetchBody(result) {
@@ -1634,10 +1822,10 @@ function WebFetchToolBody({
1634
1822
  onBodyModeChange
1635
1823
  }) {
1636
1824
  if (result?.error) {
1637
- return /* @__PURE__ */ jsx12("div", { className: "lax-tool-body lax-tool-body--webfetch", children: /* @__PURE__ */ jsx12("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx12("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
1825
+ return /* @__PURE__ */ jsx13("div", { className: "lax-tool-body lax-tool-body--webfetch", children: /* @__PURE__ */ jsx13("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx13("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
1638
1826
  }
1639
1827
  const bodyText = buildWebFetchBody(result);
1640
- return /* @__PURE__ */ jsx12("div", { className: "lax-tool-body lax-tool-body--webfetch", children: /* @__PURE__ */ jsx12(
1828
+ return /* @__PURE__ */ jsx13("div", { className: "lax-tool-body lax-tool-body--webfetch", children: /* @__PURE__ */ jsx13(
1641
1829
  TruncatedContent,
1642
1830
  {
1643
1831
  text: bodyText,
@@ -1649,7 +1837,7 @@ function WebFetchToolBody({
1649
1837
  }
1650
1838
 
1651
1839
  // src/view/tools/websearch/WebSearchToolBody.tsx
1652
- import { jsx as jsx13 } from "react/jsx-runtime";
1840
+ import { jsx as jsx14 } from "react/jsx-runtime";
1653
1841
  var MAX_BODY_LINES3 = 15;
1654
1842
  function buildWebSearchBody(result) {
1655
1843
  const d = asDisplayRecord(result?.display);
@@ -1674,10 +1862,10 @@ function WebSearchToolBody({
1674
1862
  onBodyModeChange
1675
1863
  }) {
1676
1864
  if (result?.error) {
1677
- return /* @__PURE__ */ jsx13("div", { className: "lax-tool-body lax-tool-body--websearch", children: /* @__PURE__ */ jsx13("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx13("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
1865
+ return /* @__PURE__ */ jsx14("div", { className: "lax-tool-body lax-tool-body--websearch", children: /* @__PURE__ */ jsx14("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx14("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
1678
1866
  }
1679
1867
  const bodyText = buildWebSearchBody(result);
1680
- return /* @__PURE__ */ jsx13("div", { className: "lax-tool-body lax-tool-body--websearch", children: /* @__PURE__ */ jsx13(
1868
+ return /* @__PURE__ */ jsx14("div", { className: "lax-tool-body lax-tool-body--websearch", children: /* @__PURE__ */ jsx14(
1681
1869
  TruncatedContent,
1682
1870
  {
1683
1871
  text: bodyText,
@@ -1689,7 +1877,7 @@ function WebSearchToolBody({
1689
1877
  }
1690
1878
 
1691
1879
  // src/view/tools/write/WriteToolBody.tsx
1692
- import { jsx as jsx14 } from "react/jsx-runtime";
1880
+ import { jsx as jsx15 } from "react/jsx-runtime";
1693
1881
  function buildWriteBodyText(input, display, summary) {
1694
1882
  const d = asDisplayRecord(display);
1695
1883
  const inp = asInputRecord(input);
@@ -1731,7 +1919,7 @@ function WriteToolBody({
1731
1919
  onBodyModeChange
1732
1920
  }) {
1733
1921
  if (result?.error) {
1734
- return /* @__PURE__ */ jsx14("div", { className: "lax-tool-body lax-tool-body--write", children: /* @__PURE__ */ jsx14("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx14("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
1922
+ return /* @__PURE__ */ jsx15("div", { className: "lax-tool-body lax-tool-body--write", children: /* @__PURE__ */ jsx15("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx15("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
1735
1923
  }
1736
1924
  const body = buildWriteBodyText(
1737
1925
  input,
@@ -1739,7 +1927,7 @@ function WriteToolBody({
1739
1927
  result?.summary ?? ""
1740
1928
  );
1741
1929
  if (body.kind === "diff") {
1742
- return /* @__PURE__ */ jsx14("div", { className: "lax-tool-body lax-tool-body--write", children: /* @__PURE__ */ jsx14(
1930
+ return /* @__PURE__ */ jsx15("div", { className: "lax-tool-body lax-tool-body--write", children: /* @__PURE__ */ jsx15(
1743
1931
  DiffView,
1744
1932
  {
1745
1933
  diff: body.text,
@@ -1748,7 +1936,7 @@ function WriteToolBody({
1748
1936
  }
1749
1937
  ) });
1750
1938
  }
1751
- return /* @__PURE__ */ jsx14("div", { className: "lax-tool-body lax-tool-body--write", children: /* @__PURE__ */ jsx14(
1939
+ return /* @__PURE__ */ jsx15("div", { className: "lax-tool-body lax-tool-body--write", children: /* @__PURE__ */ jsx15(
1752
1940
  TruncatedContent,
1753
1941
  {
1754
1942
  text: body.text,
@@ -1801,6 +1989,8 @@ export {
1801
1989
  isCancelToolResultError,
1802
1990
  resolveToolCancelDisplayText,
1803
1991
  softKindTestId,
1992
+ resolveActiveAgentParentToolId,
1993
+ absorbPreToolHookIntoFold,
1804
1994
  formatExploreSummaryText,
1805
1995
  formatThoughtDurationPrefix,
1806
1996
  asDisplayRecord,
@@ -1824,6 +2014,7 @@ export {
1824
2014
  GlobToolBody,
1825
2015
  GrepToolBody,
1826
2016
  ReadToolBody,
2017
+ isSkillForkExecution,
1827
2018
  SkillToolBody,
1828
2019
  WebFetchToolBody,
1829
2020
  WebSearchToolBody,
@@ -1831,4 +2022,4 @@ export {
1831
2022
  ToolDisplayRegistry,
1832
2023
  createDefaultToolRegistry
1833
2024
  };
1834
- //# sourceMappingURL=chunk-GLUQUP3A.js.map
2025
+ //# sourceMappingURL=chunk-BAMDIFNS.js.map