@qredence/fleet 0.5.9 → 0.5.11

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.
Files changed (121) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/web/client/assets/agent-activity-CwMDU7aP.js +1 -0
  3. package/dist/web/client/assets/artifacts-panel-CQmFEF_H.js +1 -0
  4. package/dist/web/client/assets/{button-BV9NafmI.js → button-BR2WWrFo.js} +1 -1
  5. package/dist/web/client/assets/{chat-command-palette-C_HgND2N.js → chat-command-palette-CmHTS3rs.js} +1 -1
  6. package/dist/web/client/assets/{chat-DdPRGn-U.js → chat-yh02zgA7.js} +2 -2
  7. package/dist/web/client/assets/{citations-BQ_pr_9_.js → citations-C_tPOJE_.js} +1 -1
  8. package/dist/web/client/assets/{command-Cx-UYeQ9.js → command-DPfiaYUL.js} +1 -1
  9. package/dist/web/client/assets/{dialog-Dh7WpGIu.js → dialog-BEZuZhzk.js} +1 -1
  10. package/dist/web/client/assets/{fleet-message-queue-DPBMIZSU.js → fleet-message-queue-DUz6Hfrf.js} +1 -1
  11. package/dist/web/client/assets/{fleet-pi-tool-renderer-DMjrKLi2.js → fleet-pi-tool-renderer-BEDIO3al.js} +4 -4
  12. package/dist/web/client/assets/fleet-reasoning-panel-CbkO7u-v.js +1 -0
  13. package/dist/web/client/assets/{fleet-subagent-list-BnRnrWKS.js → fleet-subagent-list-iKUtLJKZ.js} +1 -1
  14. package/dist/web/client/assets/fleet-tool-timeline-C8heL7ae.js +1 -0
  15. package/dist/web/client/assets/{fork-picker-dialog-CAhWx0G5.js → fork-picker-dialog-ByBOGVsa.js} +1 -1
  16. package/dist/web/client/assets/globals-B_I1Eq1u.css +2 -0
  17. package/dist/web/client/assets/horizontal-resize-qK6eRhIG.js +1 -0
  18. package/dist/web/client/assets/{index-CwtZA4hF.js → index-C1zOjrMK.js} +3 -3
  19. package/dist/web/client/assets/{input-Bol3TP4v.js → input-0wwjWjKq.js} +1 -1
  20. package/dist/web/client/assets/{input-group-D5gi9zBK.js → input-group-BFDsCVS9.js} +1 -1
  21. package/dist/web/client/assets/{ipython-tool-BrMePqD-.js → ipython-tool-ldJ9F1Cw.js} +1 -1
  22. package/dist/web/client/assets/model-selector-list-DsKTuAgS.js +1 -0
  23. package/dist/web/client/assets/{notify-BnNaNaBU.js → notify-DgMKgZZW.js} +1 -1
  24. package/dist/web/client/assets/{openui-renderer-nuOkzdau.js → openui-renderer-J3dhPpL4.js} +5 -5
  25. package/dist/web/client/assets/prompt-input-qPIXZ-Rb.js +1 -0
  26. package/dist/web/client/assets/prompt-suggestions-Cc--lSNR.js +1 -0
  27. package/dist/web/client/assets/{provider-catalog-CO1GxLYe.js → provider-catalog-D8G66gwc.js} +1 -1
  28. package/dist/web/client/assets/{provider-label-B0E-wWFV.js → provider-label-Dpr7djG9.js} +1 -1
  29. package/dist/web/client/assets/repl-panel-DsPX04Xr.js +1 -0
  30. package/dist/web/client/assets/{resources-panel-Bo8dfUdm.js → resources-panel-D867-goy.js} +1 -1
  31. package/dist/web/client/assets/right-panel-registry-DewpBWHM.js +2 -0
  32. package/dist/web/client/assets/routes-vNkVToAF.js +16 -0
  33. package/dist/web/client/assets/safe-storage-s25GrfpH.js +1 -0
  34. package/dist/web/client/assets/session-insights-panel-YnaXvTpi.js +1 -0
  35. package/dist/web/client/assets/settings-dialog-B-v4me3Y.js +1 -0
  36. package/dist/web/client/assets/skeleton-loaders-C9vHwAYV.js +1 -0
  37. package/dist/web/client/assets/{subagent-chat-panel-Ck06wcIJ.js → subagent-chat-panel-DkVUumrP.js} +1 -1
  38. package/dist/web/client/assets/subagent-transcript-D8wmQxXe.js +1 -0
  39. package/dist/web/client/assets/subagents-panel-BMp2Ego0.js +1 -0
  40. package/dist/web/client/assets/{surfaces-cW-gp56p.js → surfaces-DI-U-_2a.js} +1 -1
  41. package/dist/web/client/assets/{switch-J2Lvo_tF.js → switch-9rTeg6J6.js} +1 -1
  42. package/dist/web/client/assets/{toast-BzAKULar.js → toast-Bt9p2OL4.js} +1 -1
  43. package/dist/web/client/assets/tool-result-DfnPN0FQ.js +4 -0
  44. package/dist/web/client/assets/ui-preferences-CImQGZm_.js +1 -0
  45. package/dist/web/client/assets/virtualized-turn-list-DMJENRY0.js +6 -0
  46. package/dist/web/client/assets/{workspace-panel-DI1W3ce9.js → workspace-panel-G6yMpKJ8.js} +1 -1
  47. package/dist/web/client/bundle-budget.json +6 -6
  48. package/dist/web/server/{_tanstack-start-manifest_v-DkghjPW8-5E6WBVI6.js → _tanstack-start-manifest_v-po4woX6g-AUGCOEZ2.js} +20 -19
  49. package/dist/web/server/{agent-activity-B-JMvecd-SLE3GGY2.js → agent-activity-CS2rbF_C-A3R26CYH.js} +2 -2
  50. package/dist/web/server/{artifacts-panel-D20iI9ud-YGBYV6NF.js → artifacts-panel-8GGUCtOd-X5TNKTY2.js} +17 -17
  51. package/dist/web/server/{chat-command-palette-DmDvAEZe-CONFK6YH.js → chat-command-palette-Dgl5tqWn-72LLEWUD.js} +7 -7
  52. package/dist/web/server/{chunk-K5ESTT4A.js → chunk-7MDZVLIY.js} +11 -3
  53. package/dist/web/server/{chunk-EBCYJSBR.js → chunk-7SD2ZSEA.js} +3 -3
  54. package/dist/web/server/{chunk-BTXNB4CP.js → chunk-ABBWBBSS.js} +13 -13
  55. package/dist/web/server/{chunk-VMYYWXF4.js → chunk-AGFRJQZ7.js} +2 -2
  56. package/dist/web/server/{chunk-FZMWPQNE.js → chunk-BXWAUTTH.js} +4 -4
  57. package/dist/web/server/{chunk-54II5QXQ.js → chunk-ETTDO4UO.js} +6 -3
  58. package/dist/web/server/{chunk-EHNIN245.js → chunk-GETSIVNU.js} +5 -5
  59. package/dist/web/server/{chunk-NRDG2ISJ.js → chunk-GGT2ZKDB.js} +49 -49
  60. package/dist/web/server/{chunk-X2R5YPQZ.js → chunk-IJPCV6DH.js} +3 -2
  61. package/dist/web/server/{chunk-TFHXOWFX.js → chunk-JQDLJ7KI.js} +20 -20
  62. package/dist/web/server/{chunk-VHBFU4TG.js → chunk-JUROEEWM.js} +43 -14
  63. package/dist/web/server/{chunk-WQDG5ZM2.js → chunk-KOUEJ3NU.js} +2 -2
  64. package/dist/web/server/{chunk-JICJWC33.js → chunk-LZ4Q5KUJ.js} +10 -10
  65. package/dist/web/server/{chunk-W6IZDM2G.js → chunk-MIW4LJTV.js} +4 -4
  66. package/dist/web/server/{chunk-2TRF62K5.js → chunk-N6NOTURM.js} +3 -3
  67. package/dist/web/server/{chunk-5XX7RKJ6.js → chunk-NXJ32VFR.js} +5 -5
  68. package/dist/web/server/{chunk-EFNPNSDO.js → chunk-O4OTWWPF.js} +7 -7
  69. package/dist/web/server/{chunk-X6RKK47S.js → chunk-P6UMR32I.js} +2 -2
  70. package/dist/web/server/{chunk-QJQZLBLU.js → chunk-P7H2OPKF.js} +3 -3
  71. package/dist/web/server/{chunk-MLPLZVON.js → chunk-RNOJACWQ.js} +54 -30
  72. package/dist/web/server/chunk-SZJUXVWG.js +40 -0
  73. package/dist/web/server/{chunk-ZCJXHV2R.js → chunk-UAPNEWCA.js} +4 -4
  74. package/dist/web/server/{chunk-WVBBA2VV.js → chunk-WILCIZYU.js} +195 -11
  75. package/dist/web/server/{chunk-FED63ZHU.js → chunk-WKV2Z4KO.js} +10 -5
  76. package/dist/web/server/{chunk-TGZIE2T6.js → chunk-WM4PUT6M.js} +4 -4
  77. package/dist/web/server/{chunk-56NGD3FN.js → chunk-WYL2DW5R.js} +2 -2
  78. package/dist/web/server/{chunk-IMK45Q23.js → chunk-XKKXXG6N.js} +3 -3
  79. package/dist/web/server/{chunk-ANL4B775.js → chunk-XLNCWZMZ.js} +2 -2
  80. package/dist/web/server/{chunk-ZVL6TBG5.js → chunk-YKVGQBZA.js} +13 -9
  81. package/dist/web/server/{chunk-IFHABBJO.js → chunk-YXXRP3NS.js} +18 -10
  82. package/dist/web/server/{fleet-message-queue-BvMcWtLo-6CMMI73U.js → fleet-message-queue-j0DCU5Xy-5HKBHMPV.js} +5 -5
  83. package/dist/web/server/{fleet-pi-tool-renderer-CgbmlIoe-7MSJLEGU.js → fleet-pi-tool-renderer-umKunT3K-O4GBH35V.js} +5 -5
  84. package/dist/web/server/{fleet-reasoning-panel-D_K48UOT-GN2PA6KT.js → fleet-reasoning-panel-BxC2COxi-GPLMQSTT.js} +9 -9
  85. package/dist/web/server/{fleet-subagent-list-5luKtpds-3OTVFHJQ.js → fleet-subagent-list-CpSYzCIq-JDH2LHSS.js} +1 -1
  86. package/dist/web/server/{fleet-tool-timeline-DwRqQgOj-HUFLGMDV.js → fleet-tool-timeline-IB36_PB2-XJENTO6I.js} +1 -1
  87. package/dist/web/server/{fork-picker-dialog-DfSRzUI5-EBRK5HNO.js → fork-picker-dialog-DlINz9UQ-UWIXFDJX.js} +5 -5
  88. package/dist/web/server/{model-selector-list-wCp4_UWC-2NQUCAM3.js → model-selector-list-OYnzNbyu-HBGCNF2L.js} +10 -10
  89. package/dist/web/server/{openui-renderer-BNLpfzyj-JUPJXUWF.js → openui-renderer-Cj7kfqyL-EKJ6JTTQ.js} +9 -9
  90. package/dist/web/server/{prompt-suggestions-BOmHi4-J-C563CHFU.js → prompt-suggestions-D4AEEY7K-RZSP7PWV.js} +3 -3
  91. package/dist/web/server/{repl-panel-yyxhwe4c-7U6HXYPS.js → repl-panel-D5KsoJik-BQKO53JO.js} +9 -9
  92. package/dist/web/server/{resources-panel-j4fAIi9g-5C267IXV.js → resources-panel-CE5pD4vy-V5FXBTYC.js} +2 -2
  93. package/dist/web/server/{router-dnEmu1cU-LUH74TAC.js → router-Ci1wxI7I-E2AYMNON.js} +255 -78
  94. package/dist/web/server/{routes-Ci5_8lws-F54KB46D.js → routes-CRpm9-Sa-IYK6MUJO.js} +720 -549
  95. package/dist/web/server/server.js +2 -2
  96. package/dist/web/server/{session-insights-panel-BHZyKDTo-LRMAMA3O.js → session-insights-panel-CUhdgvRt-VB2HUCQP.js} +4 -4
  97. package/dist/web/server/{settings-dialog-CdFpyzR--JVYIS5OD.js → settings-dialog-BvkgNflv-GPJ6COQO.js} +22 -18
  98. package/dist/web/server/{subagent-chat-panel-DVgf-whR-6G2ASMGU.js → subagent-chat-panel-CMuvW9Sd-M5TEEGQW.js} +14 -14
  99. package/dist/web/server/{subagents-panel-D2CN0IYy-3L6ZNQ3Q.js → subagents-panel-DgfB6_Yy-4INEPE3Y.js} +16 -16
  100. package/dist/web/server/{workspace-panel-BOs-58Cv-SWQBMZSB.js → workspace-panel-bpwj-Veu-Q2CEJMN4.js} +4 -3
  101. package/package.json +1 -1
  102. package/dist/web/client/assets/agent-activity-CDcDNVC6.js +0 -1
  103. package/dist/web/client/assets/artifacts-panel-N4k9VcJr.js +0 -1
  104. package/dist/web/client/assets/fleet-reasoning-panel-MtbSdoCv.js +0 -1
  105. package/dist/web/client/assets/fleet-tool-timeline-COzPrwr8.js +0 -1
  106. package/dist/web/client/assets/generative-text-renderer-CzwNIs3b.js +0 -6
  107. package/dist/web/client/assets/globals-C7ovVTh2.css +0 -2
  108. package/dist/web/client/assets/horizontal-resize-Bl3AyBJg.js +0 -1
  109. package/dist/web/client/assets/model-selector-list-CJY9pyt2.js +0 -1
  110. package/dist/web/client/assets/prompt-input-BpuTiX7Z.js +0 -1
  111. package/dist/web/client/assets/prompt-suggestions-CXM6knMK.js +0 -1
  112. package/dist/web/client/assets/repl-panel-BDQ5MEgV.js +0 -1
  113. package/dist/web/client/assets/right-panel-registry-DOyEvIMD.js +0 -2
  114. package/dist/web/client/assets/routes-DkefU9yA.js +0 -16
  115. package/dist/web/client/assets/session-insights-panel-CQdT90Op.js +0 -1
  116. package/dist/web/client/assets/settings-dialog-B6rt69m_.js +0 -1
  117. package/dist/web/client/assets/skeleton-loaders-DjGv9LLA.js +0 -1
  118. package/dist/web/client/assets/subagent-transcript-BwCv3nTL.js +0 -1
  119. package/dist/web/client/assets/subagents-panel-BkOorzzy.js +0 -1
  120. package/dist/web/client/assets/tool-result-Cp13oeRn.js +0 -4
  121. package/dist/web/client/assets/ui-preferences-DUEFuJFj.js +0 -1
@@ -30,7 +30,7 @@ import {
30
30
  cn
31
31
  } from "./chunk-DJMHPJBP.js";
32
32
 
33
- // web/app/dist/server/assets/citations-UswwFSUx.js
33
+ // web/app/dist/server/assets/citations-CYHZanjq.js
34
34
  import { Suspense, lazy, useCallback, useEffect, useId, useState } from "react";
35
35
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
36
36
  var BookOpenText = createLucideIcon("book-open-text", [
@@ -191,7 +191,7 @@ function CitationRow({ citation, index, idPrefix }) {
191
191
  /* @__PURE__ */ jsxs("span", {
192
192
  className: "flex shrink-0 items-center gap-1.5",
193
193
  children: [/* @__PURE__ */ jsx("span", {
194
- className: "grid size-5 place-items-center rounded-md bg-foreground/[0.05] text-[10px] font-semibold tabular-nums text-muted-foreground",
194
+ className: "grid size-5 place-items-center rounded-md bg-foreground/[0.05] text-[0.625rem] font-semibold tabular-nums text-muted-foreground",
195
195
  children: index
196
196
  }), safeUrl ? /* @__PURE__ */ jsx(ExternalLink, { className: "size-3.5 text-muted-foreground/40 transition-colors group-hover/citation:text-muted-foreground" }) : null]
197
197
  })
@@ -276,7 +276,7 @@ function Citations({ citations, title = "Sources", open, defaultOpen = false, on
276
276
  children: title
277
277
  }),
278
278
  /* @__PURE__ */ jsx("span", {
279
- className: "rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-semibold tabular-nums",
279
+ className: "rounded-full bg-muted px-1.5 py-0.5 text-[0.625rem] font-semibold tabular-nums",
280
280
  children: citations.length
281
281
  }),
282
282
  /* @__PURE__ */ jsx(m.span, {
@@ -5,7 +5,7 @@ import {
5
5
  cn
6
6
  } from "./chunk-DJMHPJBP.js";
7
7
 
8
- // web/app/dist/server/assets/ipython-tool-DHKjxYuT.js
8
+ // web/app/dist/server/assets/ipython-tool-XRT6nQzr.js
9
9
  import React, { memo, useEffect, useMemo, useRef, useState } from "react";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  var CodeXml = createLucideIcon("code-xml", [
@@ -273,7 +273,7 @@ function IpythonCardHeader({ isPending, isBashCell, hasError, kernelRestarted })
273
273
  children: [/* @__PURE__ */ jsxs("div", {
274
274
  className: "flex min-w-0 items-center gap-1.5 overflow-hidden",
275
275
  children: [/* @__PURE__ */ jsxs("span", {
276
- className: "inline-flex items-center gap-1 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px] leading-none text-muted-foreground uppercase",
276
+ className: "inline-flex items-center gap-1 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[0.625rem] leading-none text-muted-foreground uppercase",
277
277
  children: [/* @__PURE__ */ jsx(CodeXml, { className: "h-3 w-3" }), isBashCell ? "shell" : "python"]
278
278
  }), isPending ? /* @__PURE__ */ jsx(ToolTextShimmer, {
279
279
  as: "span",
@@ -303,9 +303,9 @@ function IpythonCardHeader({ isPending, isBashCell, hasError, kernelRestarted })
303
303
  }
304
304
  function IpythonBackgroundOutput({ output }) {
305
305
  return /* @__PURE__ */ jsxs("div", {
306
- className: "mt-1.5 border-t border-dashed border-border/70 pt-1.5 font-mono text-[11px] leading-[15px]",
306
+ className: "mt-1.5 border-t border-dashed border-border/70 pt-1.5 font-mono text-[0.6875rem] leading-[15px]",
307
307
  children: [/* @__PURE__ */ jsx("span", {
308
- className: "text-[10px] font-semibold uppercase tracking-wider text-amber-600/90 dark:text-amber-400/90",
308
+ className: "text-[0.625rem] font-semibold uppercase tracking-wider text-amber-600/90 dark:text-amber-400/90",
309
309
  children: "Unattributed background output:"
310
310
  }), /* @__PURE__ */ jsx("div", {
311
311
  className: "mt-0.5 max-h-[140px] overflow-auto whitespace-pre-wrap rounded bg-muted/40 p-1.5 text-muted-foreground",
@@ -333,7 +333,7 @@ function IpythonCellCard({ step, state, onComplete, approval, cellIndex, part })
333
333
  kernelRestarted: details?.kernelRestarted
334
334
  }),
335
335
  /* @__PURE__ */ jsxs("div", {
336
- className: "overflow-hidden border-t border-border bg-background px-2.5 py-1.5 font-mono text-[12px] leading-[16px]",
336
+ className: "overflow-hidden border-t border-border bg-background px-2.5 py-1.5 font-mono text-[0.75rem] leading-[16px]",
337
337
  children: [
338
338
  /* @__PURE__ */ jsxs("div", {
339
339
  className: "break-all whitespace-pre-wrap",
@@ -21,7 +21,7 @@ import {
21
21
  createLucideIcon
22
22
  } from "./chunk-4ZIEVI5O.js";
23
23
 
24
- // web/app/dist/server/assets/right-panel-registry-DS4op1ha.js
24
+ // web/app/dist/server/assets/right-panel-registry-BSPaXYPC.js
25
25
  import { Suspense, lazy } from "react";
26
26
  import { jsx, jsxs } from "react/jsx-runtime";
27
27
  var Activity = createLucideIcon("activity", [["path", {
@@ -46,12 +46,12 @@ var Library = createLucideIcon("library", [
46
46
  key: "6qkkli"
47
47
  }]
48
48
  ]);
49
- var LazyArtifactsPanel = lazy(() => import("./artifacts-panel-D20iI9ud-YGBYV6NF.js").then(({ ArtifactsPanelContent }) => ({ default: ArtifactsPanelContent })));
50
- var LazyResourcesPanel = lazy(() => import("./resources-panel-j4fAIi9g-5C267IXV.js").then(({ ResourcesPanelContent }) => ({ default: ResourcesPanelContent })));
51
- var LazySessionInsightsPanel = lazy(() => import("./session-insights-panel-BHZyKDTo-LRMAMA3O.js").then(({ SessionInsightsPanel }) => ({ default: SessionInsightsPanel })));
52
- var LazyReplPanel = lazy(() => import("./repl-panel-yyxhwe4c-7U6HXYPS.js").then(({ ReplPanelContent }) => ({ default: ReplPanelContent })));
53
- var LazySubagentsPanel = lazy(() => import("./subagents-panel-D2CN0IYy-3L6ZNQ3Q.js").then(({ SubagentsPanelContent }) => ({ default: SubagentsPanelContent })));
54
- var LazyWorkspacePanel = lazy(() => import("./workspace-panel-BOs-58Cv-SWQBMZSB.js").then(({ WorkspacePanelContent }) => ({ default: WorkspacePanelContent })));
49
+ var LazyArtifactsPanel = lazy(() => import("./artifacts-panel-8GGUCtOd-X5TNKTY2.js").then(({ ArtifactsPanelContent }) => ({ default: ArtifactsPanelContent })));
50
+ var LazyResourcesPanel = lazy(() => import("./resources-panel-CE5pD4vy-V5FXBTYC.js").then(({ ResourcesPanelContent }) => ({ default: ResourcesPanelContent })));
51
+ var LazySessionInsightsPanel = lazy(() => import("./session-insights-panel-CUhdgvRt-VB2HUCQP.js").then(({ SessionInsightsPanel }) => ({ default: SessionInsightsPanel })));
52
+ var LazyReplPanel = lazy(() => import("./repl-panel-D5KsoJik-BQKO53JO.js").then(({ ReplPanelContent }) => ({ default: ReplPanelContent })));
53
+ var LazySubagentsPanel = lazy(() => import("./subagents-panel-DgfB6_Yy-4INEPE3Y.js").then(({ SubagentsPanelContent }) => ({ default: SubagentsPanelContent })));
54
+ var LazyWorkspacePanel = lazy(() => import("./workspace-panel-bpwj-Veu-Q2CEJMN4.js").then(({ WorkspacePanelContent }) => ({ default: WorkspacePanelContent })));
55
55
  function PanelFallback() {
56
56
  return /* @__PURE__ */ jsxs("div", {
57
57
  className: "flex min-h-32 flex-col gap-3 p-4",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  activeElement,
3
3
  ownerDocument
4
- } from "./chunk-JICJWC33.js";
4
+ } from "./chunk-LZ4Q5KUJ.js";
5
5
  import {
6
6
  useControlled
7
7
  } from "./chunk-S3PQ6HKH.js";
@@ -24,7 +24,7 @@ import {
24
24
  cn
25
25
  } from "./chunk-DJMHPJBP.js";
26
26
 
27
- // web/app/dist/server/assets/input-CGUxMA95.js
27
+ // web/app/dist/server/assets/input-B4o4sWf7.js
28
28
  import * as React$1 from "react";
29
29
  import { jsx } from "react/jsx-runtime";
30
30
  var DEFAULT_VALIDITY_STATE = {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  Input
3
- } from "./chunk-X6RKK47S.js";
3
+ } from "./chunk-P6UMR32I.js";
4
4
  import {
5
5
  Button,
6
6
  cva
7
- } from "./chunk-JICJWC33.js";
7
+ } from "./chunk-LZ4Q5KUJ.js";
8
8
  import {
9
9
  cn
10
10
  } from "./chunk-DJMHPJBP.js";
11
11
 
12
- // web/app/dist/server/assets/input-group-a7xcJ8a9.js
12
+ // web/app/dist/server/assets/input-group-BcYuKbrc.js
13
13
  import "react";
14
14
  import { jsx } from "react/jsx-runtime";
15
15
  function InputGroup({ className, ...props }) {
@@ -6,10 +6,11 @@ import {
6
6
  MessageContent,
7
7
  MessageScroller,
8
8
  UserMessage,
9
+ VirtualizedTurnList,
9
10
  buildAssistantElements,
10
11
  groupMessages,
11
12
  normalizeAssistantToolParts
12
- } from "./chunk-WVBBA2VV.js";
13
+ } from "./chunk-WILCIZYU.js";
13
14
  import {
14
15
  RefreshCw
15
16
  } from "./chunk-OKL5ZRVB.js";
@@ -18,22 +19,22 @@ import {
18
19
  } from "./chunk-UCA4WN66.js";
19
20
  import {
20
21
  FleetPiToolRenderer
21
- } from "./chunk-TFHXOWFX.js";
22
+ } from "./chunk-JQDLJ7KI.js";
22
23
  import {
23
24
  PI_TOOL_RENDERERS
24
- } from "./chunk-2TRF62K5.js";
25
+ } from "./chunk-N6NOTURM.js";
25
26
  import {
26
27
  FleetToolTimeline
27
- } from "./chunk-X2R5YPQZ.js";
28
+ } from "./chunk-IJPCV6DH.js";
28
29
  import {
29
30
  FleetSubagentList
30
- } from "./chunk-EBCYJSBR.js";
31
+ } from "./chunk-7SD2ZSEA.js";
31
32
  import {
32
33
  derivePrimeAgentArtifactRuns
33
34
  } from "./chunk-4UBOIY2S.js";
34
35
  import {
35
36
  Button
36
- } from "./chunk-JICJWC33.js";
37
+ } from "./chunk-LZ4Q5KUJ.js";
37
38
  import {
38
39
  CircleAlert
39
40
  } from "./chunk-ZCVWADNW.js";
@@ -41,8 +42,8 @@ import {
41
42
  cn
42
43
  } from "./chunk-DJMHPJBP.js";
43
44
 
44
- // web/app/dist/server/assets/subagent-transcript-Bec7mVZl.js
45
- import { useMemo } from "react";
45
+ // web/app/dist/server/assets/subagent-transcript-CMFc5Jn2.js
46
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
46
47
  import { jsx, jsxs } from "react/jsx-runtime";
47
48
  function transcriptStatus(child) {
48
49
  if (child.status === "running" || child.status === "recovering") return "streaming";
@@ -86,20 +87,44 @@ function SubagentTurnView({ turn, isLast, isStreaming, artifacts, presentation }
86
87
  children: assistantElements
87
88
  }),
88
89
  isLast && presentation ? /* @__PURE__ */ jsx(FleetSubagentList, {
89
- children: presentation.rlmChildren,
90
- tree: presentation.rlmTree
90
+ tree: presentation.rlmTree,
91
+ children: presentation.rlmChildren
91
92
  }) : null
92
93
  ] })
93
94
  }) })
94
95
  }) : null]
95
96
  });
96
97
  }
98
+ function getSubagentTurnKey(turn, index) {
99
+ return turn.user?.id ?? turn.assistants[0]?.id ?? `subagent-turn-${index}`;
100
+ }
97
101
  function SubagentTranscriptView({ child, parentSessionId, transcript, onRefresh, fullWidth = false, status: statusOverride }) {
98
102
  const turns = useMemo(() => transcript?.status !== "loading" ? groupMessages(transcript?.messages ?? []) : [], [transcript]);
99
103
  const childStatus = statusOverride ?? transcriptStatus(child);
100
104
  const artifactRuns = useMemo(() => transcript?.status !== "loading" ? derivePrimeAgentArtifactRuns(transcript?.messages ?? [], transcript?.presentation, childStatus) : [], [childStatus, transcript]);
101
105
  const artifacts = useMemo(() => artifactRuns.flatMap((run) => run.artifacts), [artifactRuns]);
106
+ const presentation = transcript?.presentation;
107
+ const renderSubagentTurn = useCallback((turn, index) => {
108
+ const isLast = index === turns.length - 1;
109
+ return /* @__PURE__ */ jsx(SubagentTurnView, {
110
+ turn,
111
+ isLast,
112
+ isStreaming: isLast && childStatus === "streaming",
113
+ artifacts: isLast ? artifacts : [],
114
+ presentation: isLast ? presentation : void 0
115
+ });
116
+ }, [
117
+ artifacts,
118
+ childStatus,
119
+ presentation,
120
+ turns.length
121
+ ]);
102
122
  const title = child.sessionName || child.label;
123
+ const [heartbeatLabel, setHeartbeatLabel] = useState(null);
124
+ useEffect(() => {
125
+ setHeartbeatLabel(child.lastHeardFrom ? new Date(child.lastHeardFrom).toLocaleTimeString() : null);
126
+ }, [child.lastHeardFrom]);
127
+ const viewportRef = useRef(null);
103
128
  return /* @__PURE__ */ jsxs("section", {
104
129
  "aria-label": `Subagent thread: ${child.label}`,
105
130
  className: cn(fullWidth ? "flex min-h-0 min-w-0 flex-1 flex-col" : "space-y-2", "min-w-0"),
@@ -117,20 +142,20 @@ function SubagentTranscriptView({ child, parentSessionId, transcript, onRefresh,
117
142
  className: "min-w-0 flex-1 truncate text-xs font-medium text-foreground/80",
118
143
  children: title
119
144
  }), /* @__PURE__ */ jsx("span", {
120
- className: "shrink-0 text-[10px] capitalize text-foreground/45",
145
+ className: "shrink-0 text-[0.625rem] capitalize text-foreground/45",
121
146
  children: child.status
122
147
  })]
123
148
  }),
124
149
  child.model ? /* @__PURE__ */ jsx("p", {
125
- className: "truncate font-mono text-[10px] text-foreground/40",
150
+ className: "truncate font-mono text-[0.625rem] text-foreground/40",
126
151
  children: child.model
127
152
  }) : null,
128
- child.lastHeardFrom ? /* @__PURE__ */ jsxs("p", {
129
- className: "truncate text-[10px] text-foreground/40",
130
- children: ["Heartbeat: ", new Date(child.lastHeardFrom).toLocaleTimeString()]
153
+ heartbeatLabel ? /* @__PURE__ */ jsxs("p", {
154
+ className: "truncate text-[0.625rem] text-foreground/40",
155
+ children: ["Heartbeat: ", heartbeatLabel]
131
156
  }) : null,
132
157
  child.answerPreview || child.recap ? /* @__PURE__ */ jsx("p", {
133
- className: "mt-1 line-clamp-3 whitespace-pre-wrap text-[11px] leading-4 text-foreground/55",
158
+ className: "mt-1 line-clamp-3 whitespace-pre-wrap text-[0.6875rem] leading-4 text-foreground/55",
134
159
  children: child.answerPreview ?? child.recap
135
160
  }) : null
136
161
  ]
@@ -147,23 +172,23 @@ function SubagentTranscriptView({ child, parentSessionId, transcript, onRefresh,
147
172
  }) : null
148
173
  ]
149
174
  }), !parentSessionId ? /* @__PURE__ */ jsx("p", {
150
- className: "rounded-md border border-dashed border-border/70 px-3 py-3 text-[11px] leading-4 text-foreground/45",
175
+ className: "rounded-md border border-dashed border-border/70 p-3 text-[0.6875rem] leading-4 text-foreground/45",
151
176
  children: "This subagent thread is unavailable until the parent session is active."
152
177
  }) : transcript?.status === "loading" ? /* @__PURE__ */ jsx("div", {
153
- className: cn("flex items-center justify-center rounded-md border border-dashed border-border/70 text-[11px] text-foreground/45", fullWidth ? "min-h-32 flex-1" : "min-h-32"),
178
+ className: cn("flex items-center justify-center rounded-md border border-dashed border-border/70 text-[0.6875rem] text-foreground/45", fullWidth ? "min-h-32 flex-1" : "min-h-32"),
154
179
  children: "Loading subagent thread\u2026"
155
180
  }) : transcript?.status === "error" && turns.length === 0 ? /* @__PURE__ */ jsxs("div", {
156
181
  role: "alert",
157
- className: "flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] leading-4 text-destructive",
182
+ className: "flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[0.6875rem] leading-4 text-destructive",
158
183
  children: [/* @__PURE__ */ jsx(CircleAlert, { className: "mt-0.5 size-3.5 shrink-0" }), /* @__PURE__ */ jsx("span", { children: transcript.error?.message ?? "Unable to load this subagent thread." })]
159
184
  }) : turns.length === 0 ? /* @__PURE__ */ jsx("p", {
160
- className: "rounded-md border border-dashed border-border/70 px-3 py-3 text-[11px] leading-4 text-foreground/45",
185
+ className: "rounded-md border border-dashed border-border/70 p-3 text-[0.6875rem] leading-4 text-foreground/45",
161
186
  children: "This subagent thread has no messages yet."
162
187
  }) : /* @__PURE__ */ jsxs("div", {
163
188
  className: "flex min-h-0 flex-1 flex-col",
164
189
  children: [transcript?.error ? /* @__PURE__ */ jsxs("div", {
165
190
  role: "alert",
166
- className: "mx-4 mt-2 flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] leading-4 text-destructive sm:mx-6",
191
+ className: "mx-4 mt-2 flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[0.6875rem] leading-4 text-destructive sm:mx-6",
167
192
  children: [/* @__PURE__ */ jsx(CircleAlert, { className: "mt-0.5 size-3.5 shrink-0" }), /* @__PURE__ */ jsx("span", { children: transcript.error.message })]
168
193
  }) : null, /* @__PURE__ */ jsx("div", {
169
194
  className: cn("min-h-0 rounded-md border border-border/60 bg-background", fullWidth ? "flex min-h-0 flex-1 flex-col border-x-0 rounded-none border-b-0" : "h-96 max-h-[calc(100svh-18rem)]"),
@@ -173,17 +198,16 @@ function SubagentTranscriptView({ child, parentSessionId, transcript, onRefresh,
173
198
  followOutput: childStatus === "streaming",
174
199
  label: `Transcript for ${child.label}`,
175
200
  smooth: childStatus === "streaming",
201
+ viewportRef,
176
202
  viewportClassName: fullWidth ? "px-0" : void 0,
177
203
  contentClassName: cn("flex flex-col gap-4", fullWidth ? "mx-auto w-full max-w-3xl px-4 py-6 sm:px-6" : "px-2.5 py-3"),
178
- children: turns.map((turn, index) => {
179
- const isLast = index === turns.length - 1;
180
- return /* @__PURE__ */ jsx(SubagentTurnView, {
181
- turn,
182
- isLast,
183
- isStreaming: isLast && childStatus === "streaming",
184
- artifacts: isLast ? artifacts : [],
185
- presentation: isLast ? transcript?.presentation : void 0
186
- }, turn.user?.id ?? `subagent-turn-${index}`);
204
+ children: /* @__PURE__ */ jsx(VirtualizedTurnList, {
205
+ estimateSize: 320,
206
+ getItemKey: getSubagentTurnKey,
207
+ itemGap: 16,
208
+ items: turns,
209
+ renderItem: renderSubagentTurn,
210
+ viewportRef
187
211
  })
188
212
  })
189
213
  })]
@@ -0,0 +1,40 @@
1
+ // web/app/dist/server/assets/safe-storage-BmW7IjhZ.js
2
+ function getStorage(kind) {
3
+ if (typeof window === "undefined") return null;
4
+ try {
5
+ return kind === "local" ? window.localStorage : window.sessionStorage;
6
+ } catch {
7
+ return null;
8
+ }
9
+ }
10
+ function readStoredValue(key, kind = "local") {
11
+ const storage = getStorage(kind);
12
+ if (!storage) return null;
13
+ try {
14
+ return storage.getItem(key);
15
+ } catch {
16
+ return null;
17
+ }
18
+ }
19
+ function writeStoredValue(key, value, kind = "local") {
20
+ const storage = getStorage(kind);
21
+ if (!storage) return;
22
+ try {
23
+ storage.setItem(key, value);
24
+ } catch {
25
+ }
26
+ }
27
+ function removeStoredValue(key, kind = "local") {
28
+ const storage = getStorage(kind);
29
+ if (!storage) return;
30
+ try {
31
+ storage.removeItem(key);
32
+ } catch {
33
+ }
34
+ }
35
+
36
+ export {
37
+ readStoredValue,
38
+ writeStoredValue,
39
+ removeStoredValue
40
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useValueChanged
3
- } from "./chunk-TGZIE2T6.js";
3
+ } from "./chunk-WM4PUT6M.js";
4
4
  import {
5
5
  fieldValidityMapping,
6
6
  useFieldRootContext,
@@ -8,12 +8,12 @@ import {
8
8
  useLabelableContext,
9
9
  useLabelableId,
10
10
  useRegisterFieldControl
11
- } from "./chunk-X6RKK47S.js";
11
+ } from "./chunk-P6UMR32I.js";
12
12
  import {
13
13
  cva,
14
14
  visuallyHidden,
15
15
  visuallyHiddenInput
16
- } from "./chunk-JICJWC33.js";
16
+ } from "./chunk-LZ4Q5KUJ.js";
17
17
  import {
18
18
  useControlled
19
19
  } from "./chunk-S3PQ6HKH.js";
@@ -35,7 +35,7 @@ import {
35
35
  cn
36
36
  } from "./chunk-DJMHPJBP.js";
37
37
 
38
- // web/app/dist/server/assets/switch-2rTMwr-w.js
38
+ // web/app/dist/server/assets/switch-DRjVvKvm.js
39
39
  import * as React$1 from "react";
40
40
  import "react";
41
41
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-FJV6EQDW.js";
4
4
  import {
5
5
  notify
6
- } from "./chunk-56NGD3FN.js";
6
+ } from "./chunk-WYL2DW5R.js";
7
7
  import {
8
8
  LazyMarkdown,
9
9
  useHoverCapable
10
- } from "./chunk-2TRF62K5.js";
10
+ } from "./chunk-N6NOTURM.js";
11
11
  import {
12
12
  Copy
13
13
  } from "./chunk-2ATMSG7U.js";
@@ -42,8 +42,8 @@ import {
42
42
  cn
43
43
  } from "./chunk-DJMHPJBP.js";
44
44
 
45
- // web/app/dist/server/assets/generative-text-renderer-CdDBV74a.js
46
- import { Suspense, cloneElement, createContext, lazy, memo, useCallback, useContext, useEffect, useEffectEvent, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
45
+ // web/app/dist/server/assets/virtualized-turn-list-CVAfBX0T.js
46
+ import { Fragment, Suspense, cloneElement, createContext, lazy, memo, useCallback, useContext, useEffect, useEffectEvent, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
47
47
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
48
48
  import { createPortal } from "react-dom";
49
49
  var ChevronLeft = createLucideIcon("chevron-left", [["path", {
@@ -669,7 +669,7 @@ function MessageScroller({ followOutput = true, followThreshold = 56, smooth = t
669
669
  children: /* @__PURE__ */ jsx("div", {
670
670
  ref: contentRef,
671
671
  role: "log",
672
- "aria-live": "polite",
672
+ "aria-live": busy ? "off" : "polite",
673
673
  "aria-relevant": "additions text",
674
674
  "aria-busy": busy,
675
675
  className: contentClassName,
@@ -971,7 +971,7 @@ function FileAttachment({ id, filename, size, isImage, url, onRemove, className,
971
971
  title: filename,
972
972
  children: filename
973
973
  }), size !== void 0 && /* @__PURE__ */ jsx("span", {
974
- className: "text-[10px] text-muted-foreground",
974
+ className: "text-[0.625rem] text-muted-foreground",
975
975
  children: formatFileSize(size)
976
976
  })]
977
977
  })] }),
@@ -1153,7 +1153,7 @@ function PayloadPart({ part }) {
1153
1153
  children: part.title
1154
1154
  }),
1155
1155
  part.text ? /* @__PURE__ */ jsx("pre", {
1156
- className: "m-0 whitespace-pre-wrap break-words px-3 py-3 font-mono text-xs leading-5 text-foreground/80",
1156
+ className: "m-0 whitespace-pre-wrap break-words p-3 font-mono text-xs leading-5 text-foreground/80",
1157
1157
  children: part.text
1158
1158
  }) : null,
1159
1159
  payload ? /* @__PURE__ */ jsxs("details", {
@@ -1257,7 +1257,7 @@ function CopyButton({ text, onCopied }) {
1257
1257
  onMouseDown: (event) => event.stopPropagation(),
1258
1258
  className: cn("flex size-6 items-center justify-center rounded-md transition-[background-color,opacity,transform] duration-150 ease-out active:scale-[0.97]", "bg-transparent opacity-50 hover:bg-an-foreground/10 hover:opacity-100"),
1259
1259
  children: /* @__PURE__ */ jsxs("div", {
1260
- className: "relative h-3.5 w-3.5",
1260
+ className: "relative size-3.5",
1261
1261
  children: [/* @__PURE__ */ jsx(Copy, { className: cn("absolute inset-0 h-3.5 w-3.5 text-an-foreground-muted transition-[opacity,transform] duration-150 ease-out", copied ? "scale-50 opacity-0" : "scale-100 opacity-100") }), /* @__PURE__ */ jsx(Check, { className: cn("absolute inset-0 h-3.5 w-3.5 text-an-foreground-muted transition-[opacity,transform] duration-150 ease-out", copied ? "scale-100 opacity-100" : "scale-50 opacity-0") })]
1262
1262
  })
1263
1263
  });
@@ -1416,7 +1416,7 @@ function buildAssistantElements(parts, opts) {
1416
1416
  }
1417
1417
  const text = textChunks.join("\n\n");
1418
1418
  if (text) elems.push(/* @__PURE__ */ jsx("div", {
1419
- className: "group/assistant-text text-[14px]",
1419
+ className: "group/assistant-text text-[0.875rem]",
1420
1420
  children: /* @__PURE__ */ jsx(TextRendererComponent, {
1421
1421
  content: text,
1422
1422
  isStreaming,
@@ -1487,7 +1487,7 @@ function groupMessages(messages) {
1487
1487
  if (current) turns.push(current);
1488
1488
  return turns;
1489
1489
  }
1490
- var LazyGenerativeTextRenderer = lazy(() => import("./openui-renderer-BNLpfzyj-JUPJXUWF.js").then((n) => n.n).then(({ GenerativeTextRenderer }) => ({ default: GenerativeTextRenderer })));
1490
+ var LazyGenerativeTextRenderer = lazy(() => import("./openui-renderer-Cj7kfqyL-EKJ6JTTQ.js").then((n) => n.n).then(({ GenerativeTextRenderer }) => ({ default: GenerativeTextRenderer })));
1491
1491
  function PlainTextFallback({ className, content }) {
1492
1492
  return /* @__PURE__ */ jsx("div", {
1493
1493
  className: className ? `${className} whitespace-pre-wrap` : "whitespace-pre-wrap",
@@ -1507,6 +1507,189 @@ function FleetGenerativeTextRenderer(props) {
1507
1507
  children: /* @__PURE__ */ jsx(LazyGenerativeTextRenderer, { ...props })
1508
1508
  });
1509
1509
  }
1510
+ function findItemAtOffset(offsets, target, itemCount) {
1511
+ if (itemCount === 0) return 0;
1512
+ let low = 0;
1513
+ let high = itemCount;
1514
+ while (low < high) {
1515
+ const middle = Math.floor((low + high) / 2);
1516
+ if (offsets[middle] <= target) low = middle + 1;
1517
+ else high = middle;
1518
+ }
1519
+ return Math.max(0, Math.min(itemCount - 1, low - 1));
1520
+ }
1521
+ function buildOffsets(itemKeys, measuredHeights, estimateSize, itemGap) {
1522
+ const offsets = [0];
1523
+ for (const [index, key] of itemKeys.entries()) offsets.push(offsets[offsets.length - 1] + (measuredHeights.get(key) ?? estimateSize) + (index < itemKeys.length - 1 ? itemGap : 0));
1524
+ return offsets;
1525
+ }
1526
+ function VirtualizedTurnList({ estimateSize, getItemKey, itemGap = 0, items, overscan = 1.5, renderItem, viewportRef }) {
1527
+ const itemKeys = useMemo(() => items.map((item, index) => getItemKey(item, index)), [getItemKey, items]);
1528
+ const shouldVirtualize = items.length >= 40;
1529
+ const [measuredHeights, setMeasuredHeights] = useState(() => /* @__PURE__ */ new Map());
1530
+ const [viewport, setViewport] = useState({
1531
+ height: 0,
1532
+ scrollTop: 0
1533
+ });
1534
+ const itemKeysRef = useRef(itemKeys);
1535
+ const measuredHeightsRef = useRef(measuredHeights);
1536
+ const estimateSizeRef = useRef(estimateSize);
1537
+ const itemGapRef = useRef(itemGap);
1538
+ const offsetsRef = useRef([0]);
1539
+ const pendingScrollAdjustmentRef = useRef(0);
1540
+ const rowNodesRef = useRef(/* @__PURE__ */ new Map());
1541
+ const rowKeysRef = useRef(/* @__PURE__ */ new WeakMap());
1542
+ const rowObserverRef = useRef(null);
1543
+ const updateViewport = useCallback(() => {
1544
+ const element = viewportRef.current;
1545
+ if (!element) return;
1546
+ const next = {
1547
+ height: element.clientHeight,
1548
+ scrollTop: element.scrollTop
1549
+ };
1550
+ setViewport((current) => current.height === next.height && current.scrollTop === next.scrollTop ? current : next);
1551
+ }, [viewportRef]);
1552
+ const setRowRef = useCallback((key, node) => {
1553
+ const previous = rowNodesRef.current.get(key);
1554
+ if (previous && previous !== node) {
1555
+ rowObserverRef.current?.unobserve(previous);
1556
+ rowNodesRef.current.delete(key);
1557
+ }
1558
+ if (!node) return;
1559
+ rowNodesRef.current.set(key, node);
1560
+ rowKeysRef.current.set(node, key);
1561
+ rowObserverRef.current?.observe(node);
1562
+ }, []);
1563
+ const offsets = useMemo(() => {
1564
+ return buildOffsets(itemKeys, measuredHeights, estimateSize, itemGap);
1565
+ }, [
1566
+ estimateSize,
1567
+ itemGap,
1568
+ itemKeys,
1569
+ measuredHeights
1570
+ ]);
1571
+ useLayoutEffect(() => {
1572
+ updateViewport();
1573
+ }, [items.length, updateViewport]);
1574
+ useLayoutEffect(() => {
1575
+ itemKeysRef.current = itemKeys;
1576
+ measuredHeightsRef.current = measuredHeights;
1577
+ estimateSizeRef.current = estimateSize;
1578
+ itemGapRef.current = itemGap;
1579
+ offsetsRef.current = offsets;
1580
+ }, [
1581
+ estimateSize,
1582
+ itemGap,
1583
+ itemKeys,
1584
+ measuredHeights,
1585
+ offsets
1586
+ ]);
1587
+ useEffect(() => {
1588
+ const element = viewportRef.current;
1589
+ if (!element) return;
1590
+ element.addEventListener("scroll", updateViewport, { passive: true });
1591
+ window.addEventListener("resize", updateViewport);
1592
+ updateViewport();
1593
+ let viewportObserver;
1594
+ if (typeof ResizeObserver !== "undefined") {
1595
+ viewportObserver = new ResizeObserver(updateViewport);
1596
+ viewportObserver.observe(element);
1597
+ }
1598
+ return () => {
1599
+ element.removeEventListener("scroll", updateViewport);
1600
+ window.removeEventListener("resize", updateViewport);
1601
+ viewportObserver?.disconnect();
1602
+ };
1603
+ }, [updateViewport, viewportRef]);
1604
+ const updateMeasuredHeights = useCallback((entries) => {
1605
+ const current = measuredHeightsRef.current;
1606
+ let next = current;
1607
+ for (const entry of entries) {
1608
+ const key = rowKeysRef.current.get(entry.target);
1609
+ const height = entry.contentRect.height;
1610
+ if (!key || height <= 0 || current.get(key) === height) continue;
1611
+ if (next === current) next = new Map(current);
1612
+ next.set(key, height);
1613
+ }
1614
+ if (next === current) return;
1615
+ const element = viewportRef.current;
1616
+ const itemKeys2 = itemKeysRef.current;
1617
+ const nextOffsets = buildOffsets(itemKeys2, next, estimateSizeRef.current, itemGapRef.current);
1618
+ if (element && itemKeys2.length > 0) {
1619
+ const beforeOffsets = offsetsRef.current;
1620
+ const anchorIndex = findItemAtOffset(beforeOffsets, Math.max(0, element.scrollTop), itemKeys2.length);
1621
+ const anchorKey = itemKeys2[anchorIndex];
1622
+ if (anchorKey && anchorIndex > 0) {
1623
+ const offsetDelta = (nextOffsets[itemKeys2.indexOf(anchorKey)] ?? 0) - (beforeOffsets[anchorIndex] ?? 0);
1624
+ if (offsetDelta !== 0) pendingScrollAdjustmentRef.current += offsetDelta;
1625
+ }
1626
+ }
1627
+ measuredHeightsRef.current = next;
1628
+ offsetsRef.current = nextOffsets;
1629
+ setMeasuredHeights(next);
1630
+ }, [viewportRef]);
1631
+ useLayoutEffect(() => {
1632
+ if (!shouldVirtualize || typeof ResizeObserver === "undefined") return;
1633
+ const observer = new ResizeObserver((entries) => updateMeasuredHeights(entries));
1634
+ rowObserverRef.current = observer;
1635
+ for (const node of rowNodesRef.current.values()) observer.observe(node);
1636
+ return () => {
1637
+ observer.disconnect();
1638
+ if (rowObserverRef.current === observer) rowObserverRef.current = null;
1639
+ };
1640
+ }, [shouldVirtualize, updateMeasuredHeights]);
1641
+ useEffect(() => {
1642
+ const current = measuredHeightsRef.current;
1643
+ if (current.size === 0) return;
1644
+ const validKeys = new Set(itemKeys);
1645
+ const next = new Map([...current].filter(([key]) => validKeys.has(key)));
1646
+ if (next.size === current.size) return;
1647
+ measuredHeightsRef.current = next;
1648
+ setMeasuredHeights(next);
1649
+ }, [itemKeys]);
1650
+ useLayoutEffect(() => {
1651
+ const adjustment = pendingScrollAdjustmentRef.current;
1652
+ const element = viewportRef.current;
1653
+ if (!element || adjustment === 0) return;
1654
+ element.scrollTop += adjustment;
1655
+ pendingScrollAdjustmentRef.current = 0;
1656
+ updateViewport();
1657
+ }, [
1658
+ measuredHeights,
1659
+ updateViewport,
1660
+ viewportRef
1661
+ ]);
1662
+ if (!shouldVirtualize) return /* @__PURE__ */ jsx(Fragment$1, { children: items.map((item, index) => /* @__PURE__ */ jsx(Fragment, { children: renderItem(item, index) }, itemKeys[index])) });
1663
+ const totalHeight = offsets[offsets.length - 1] ?? 0;
1664
+ const overscanDistance = Math.max(estimateSize, viewport.height * overscan);
1665
+ const firstVisible = findItemAtOffset(offsets, Math.max(0, viewport.scrollTop - overscanDistance), items.length);
1666
+ const lastVisible = Math.min(items.length - 1, findItemAtOffset(offsets, viewport.scrollTop + viewport.height + overscanDistance, items.length) + 1);
1667
+ return /* @__PURE__ */ jsx("div", {
1668
+ "data-rendered-turn-count": lastVisible - firstVisible + 1,
1669
+ "data-total-turn-count": items.length,
1670
+ "data-virtualized-transcript": "true",
1671
+ style: {
1672
+ height: totalHeight,
1673
+ position: "relative",
1674
+ width: "100%"
1675
+ },
1676
+ children: items.slice(firstVisible, lastVisible + 1).map((item, index) => {
1677
+ const itemIndex = firstVisible + index;
1678
+ const key = itemKeys[itemIndex];
1679
+ return /* @__PURE__ */ jsx("div", {
1680
+ ref: (node) => setRowRef(key, node),
1681
+ "data-virtualized-turn-index": itemIndex,
1682
+ style: {
1683
+ left: 0,
1684
+ position: "absolute",
1685
+ right: 0,
1686
+ top: offsets[itemIndex]
1687
+ },
1688
+ children: renderItem(item, itemIndex)
1689
+ }, key);
1690
+ })
1691
+ });
1692
+ }
1510
1693
 
1511
1694
  export {
1512
1695
  ChevronLeft,
@@ -1520,7 +1703,8 @@ export {
1520
1703
  normalizeAssistantToolParts,
1521
1704
  buildAssistantElements,
1522
1705
  groupMessages,
1523
- FleetGenerativeTextRenderer
1706
+ FleetGenerativeTextRenderer,
1707
+ VirtualizedTurnList
1524
1708
  };
1525
1709
  /**
1526
1710
  * @license lucide-react v1.38.0 - ISC