zidane-ui 9.2.3 → 9.4.0

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 (354) hide show
  1. package/dist/adapters/live.d.ts +8 -0
  2. package/dist/adapters/live.js +19 -8
  3. package/dist/adapters/server-composer-host.js +22 -9
  4. package/dist/adapters/server-git-host.js +5 -2
  5. package/dist/adapters/server-host.js +158 -27
  6. package/dist/adapters/server-machines-host.js +7 -0
  7. package/dist/adapters/server-media.d.ts +9 -1
  8. package/dist/adapters/server-media.js +14 -1
  9. package/dist/adapters/server-session-host.js +49 -0
  10. package/dist/adapters/server-settings-sections.js +4 -1
  11. package/dist/adapters/sse-host.js +3 -0
  12. package/dist/adapters/sse-protocol.d.ts +10 -0
  13. package/dist/appearance/ZoomIndicator.js +5 -8
  14. package/dist/chat/HostTranscript.d.ts +0 -12
  15. package/dist/chat/HostTranscript.js +20 -1
  16. package/dist/chat/SessionStreamsProvider.d.ts +9 -1
  17. package/dist/chat/SessionStreamsProvider.js +11 -2
  18. package/dist/chat/Transcript.d.ts +21 -11
  19. package/dist/chat/Transcript.js +346 -161
  20. package/dist/chat/composer/ModelOptionsPicker.js +6 -2
  21. package/dist/chat/composer/ModelPicker.d.ts +1 -1
  22. package/dist/chat/composer/PlacePicker.d.ts +3 -1
  23. package/dist/chat/composer/PlacePicker.js +5 -1
  24. package/dist/chat/composer/use-draft-target.js +15 -3
  25. package/dist/chat/headless/block-runs.js +26 -1
  26. package/dist/chat/headless/chip-views.js +1 -1
  27. package/dist/chat/headless/draft-target.d.ts +28 -1
  28. package/dist/chat/headless/draft-target.js +22 -1
  29. package/dist/chat/headless/host.d.ts +43 -7
  30. package/dist/chat/headless/hosts.d.ts +4 -0
  31. package/dist/chat/headless/index.d.ts +27 -26
  32. package/dist/chat/headless/index.js +15 -14
  33. package/dist/chat/headless/labels.d.ts +17 -0
  34. package/dist/chat/headless/labels.js +17 -0
  35. package/dist/chat/headless/markdown-chunks.d.ts +2 -1
  36. package/dist/chat/headless/markdown-chunks.js +12 -20
  37. package/dist/chat/headless/markdown-scan.d.ts +64 -0
  38. package/dist/chat/headless/markdown-scan.js +119 -0
  39. package/dist/chat/headless/markdown-stream.d.ts +64 -0
  40. package/dist/chat/headless/markdown-stream.js +143 -0
  41. package/dist/chat/headless/output-pager.d.ts +68 -0
  42. package/dist/chat/headless/output-pager.js +113 -0
  43. package/dist/chat/headless/prompt-origin.d.ts +2 -0
  44. package/dist/chat/headless/prompt-origin.js +6 -2
  45. package/dist/chat/headless/session-list.d.ts +10 -0
  46. package/dist/chat/headless/sidebar/activity.d.ts +14 -0
  47. package/dist/chat/headless/sidebar/activity.js +32 -0
  48. package/dist/chat/headless/sidebar/directory.d.ts +19 -2
  49. package/dist/chat/headless/sidebar/directory.js +19 -51
  50. package/dist/chat/headless/sidebar/environment.d.ts +15 -4
  51. package/dist/chat/headless/sidebar/environment.js +27 -9
  52. package/dist/chat/headless/sidebar/index.d.ts +2 -2
  53. package/dist/chat/headless/sidebar/index.js +2 -2
  54. package/dist/chat/headless/sidebar/labels.d.ts +19 -2
  55. package/dist/chat/headless/sidebar/labels.js +8 -1
  56. package/dist/chat/headless/sidebar/prewarm.d.ts +68 -0
  57. package/dist/chat/headless/sidebar/prewarm.js +114 -0
  58. package/dist/chat/headless/streams/actions.d.ts +4 -2
  59. package/dist/chat/headless/streams/actions.js +2 -1
  60. package/dist/chat/headless/streams/event-bytes.d.ts +17 -0
  61. package/dist/chat/headless/streams/event-bytes.js +46 -0
  62. package/dist/chat/headless/streams/live-events.d.ts +25 -1
  63. package/dist/chat/headless/streams/live-events.js +53 -2
  64. package/dist/chat/headless/streams/selectors.d.ts +3 -0
  65. package/dist/chat/headless/streams/selectors.js +8 -1
  66. package/dist/chat/headless/streams/session-streams.d.ts +15 -3
  67. package/dist/chat/headless/streams/session-streams.js +31 -3
  68. package/dist/chat/headless/streams/store.d.ts +45 -6
  69. package/dist/chat/headless/streams/store.js +85 -31
  70. package/dist/chat/headless/streams/transcript-map.d.ts +57 -0
  71. package/dist/chat/headless/streams/transcript-map.js +85 -0
  72. package/dist/chat/headless/streams/transcript.d.ts +4 -2
  73. package/dist/chat/headless/streams/transcript.js +19 -7
  74. package/dist/chat/headless/streams/types.d.ts +2 -1
  75. package/dist/chat/headless/transcript/batch.js +5 -1
  76. package/dist/chat/headless/transcript/blob-media.d.ts +15 -0
  77. package/dist/chat/headless/transcript/blob-media.js +23 -0
  78. package/dist/chat/headless/transcript/collapse.d.ts +10 -0
  79. package/dist/chat/headless/transcript/collapse.js +35 -6
  80. package/dist/chat/headless/transcript/derive.d.ts +98 -0
  81. package/dist/chat/headless/transcript/derive.js +89 -0
  82. package/dist/chat/headless/transcript/exchange-media.d.ts +3 -1
  83. package/dist/chat/headless/transcript/exchange-media.js +8 -5
  84. package/dist/chat/headless/transcript/fold-attachments.d.ts +2 -0
  85. package/dist/chat/headless/transcript/fold-attachments.js +3 -2
  86. package/dist/chat/headless/transcript/fold.d.ts +2 -1
  87. package/dist/chat/headless/transcript/fold.js +16 -6
  88. package/dist/chat/headless/transcript/incremental.d.ts +53 -0
  89. package/dist/chat/headless/transcript/incremental.js +181 -0
  90. package/dist/chat/headless/transcript/index.d.ts +2 -2
  91. package/dist/chat/headless/transcript/index.js +2 -2
  92. package/dist/chat/headless/transcript/nesting.js +2 -1
  93. package/dist/chat/headless/transcript/rail.d.ts +50 -1
  94. package/dist/chat/headless/transcript/rail.js +165 -23
  95. package/dist/chat/headless/transcript/rows.d.ts +5 -1
  96. package/dist/chat/headless/transcript/run-failures.js +2 -1
  97. package/dist/chat/headless/transcript/seams.d.ts +78 -0
  98. package/dist/chat/headless/transcript/seams.js +116 -0
  99. package/dist/chat/headless/transcript/tool-media.d.ts +6 -7
  100. package/dist/chat/headless/transcript/tool-media.js +27 -9
  101. package/dist/chat/index.d.ts +9 -8
  102. package/dist/chat/index.js +18 -17
  103. package/dist/chat/sidebar/ProjectIcon.js +1 -1
  104. package/dist/chat/sidebar/RowChips.js +2 -2
  105. package/dist/chat/sidebar/SessionSidebar.d.ts +6 -0
  106. package/dist/chat/sidebar/SessionSidebar.js +23 -16
  107. package/dist/chat/sidebar/SidebarFilterMenu.js +0 -1
  108. package/dist/chat/sidebar/SidebarFold.js +17 -16
  109. package/dist/chat/sidebar/SidebarFooter.d.ts +8 -5
  110. package/dist/chat/sidebar/SidebarFooter.js +6 -6
  111. package/dist/chat/sidebar/SidebarSessionRow.d.ts +7 -1
  112. package/dist/chat/sidebar/SidebarSessionRow.js +11 -8
  113. package/dist/chat/sidebar/session-menu.d.ts +4 -0
  114. package/dist/chat/sidebar/session-menu.js +14 -2
  115. package/dist/chat/sidebar/sidebar-live.js +28 -4
  116. package/dist/chat/sidebar/useInboxRows.js +6 -6
  117. package/dist/chat/sidebar/useInboxTriage.js +50 -47
  118. package/dist/chat/sidebar/useSessionSearch.js +19 -18
  119. package/dist/chat/testing/contract.d.ts +5 -3
  120. package/dist/chat/testing/contract.js +66 -1
  121. package/dist/chat/transcript/DiffLines.d.ts +6 -1
  122. package/dist/chat/transcript/DiffLines.js +35 -20
  123. package/dist/chat/transcript/EditDiffBlock.d.ts +5 -1
  124. package/dist/chat/transcript/EditDiffBlock.js +89 -30
  125. package/dist/chat/transcript/FileChip.js +28 -0
  126. package/dist/chat/transcript/LazyRow.d.ts +40 -40
  127. package/dist/chat/transcript/LazyRow.js +100 -149
  128. package/dist/chat/transcript/MermaidDiagram.js +2 -1
  129. package/dist/chat/transcript/PromptEcho.js +3 -11
  130. package/dist/chat/transcript/SessionChip.d.ts +11 -0
  131. package/dist/chat/transcript/SessionChip.js +34 -0
  132. package/dist/chat/transcript/SubagentBlock.js +3 -2
  133. package/dist/chat/transcript/TranscriptRail.d.ts +25 -2
  134. package/dist/chat/transcript/TranscriptRail.js +175 -17
  135. package/dist/chat/transcript/TranscriptRow.d.ts +4 -7
  136. package/dist/chat/transcript/TranscriptRow.js +4 -3
  137. package/dist/chat/transcript/actions.d.ts +37 -1
  138. package/dist/chat/transcript/actions.js +27 -1
  139. package/dist/chat/transcript/chip-details.d.ts +11 -0
  140. package/dist/chat/transcript/chip-details.js +17 -1
  141. package/dist/chat/transcript/clipped-output.d.ts +58 -0
  142. package/dist/chat/transcript/clipped-output.js +131 -0
  143. package/dist/chat/transcript/fold-attachments.js +10 -5
  144. package/dist/chat/transcript/fold-worker.js +5 -3
  145. package/dist/chat/transcript/fold.js +13 -4
  146. package/dist/chat/transcript/index.d.ts +11 -10
  147. package/dist/chat/transcript/index.js +10 -9
  148. package/dist/chat/transcript/markdown-cache.d.ts +17 -2
  149. package/dist/chat/transcript/markdown-cache.js +48 -4
  150. package/dist/chat/transcript/markdown.js +110 -55
  151. package/dist/chat/transcript/media-gallery.d.ts +3 -2
  152. package/dist/chat/transcript/media-gallery.js +19 -19
  153. package/dist/chat/transcript/messages.js +5 -4
  154. package/dist/chat/transcript/notices.js +2 -1
  155. package/dist/chat/transcript/prompt.d.ts +1 -1
  156. package/dist/chat/transcript/prompt.js +6 -4
  157. package/dist/chat/transcript/prose.js +2 -1
  158. package/dist/chat/transcript/root-items.d.ts +96 -0
  159. package/dist/chat/transcript/root-items.js +180 -0
  160. package/dist/chat/transcript/row-mount.d.ts +184 -0
  161. package/dist/chat/transcript/row-mount.js +532 -0
  162. package/dist/chat/transcript/row-parking.d.ts +152 -0
  163. package/dist/chat/transcript/row-parking.js +171 -0
  164. package/dist/chat/transcript/row-ui-state.d.ts +37 -0
  165. package/dist/chat/transcript/row-ui-state.js +53 -0
  166. package/dist/chat/transcript/run-rows.js +3 -2
  167. package/dist/chat/transcript/script-input.d.ts +1 -1
  168. package/dist/chat/transcript/tasks.js +3 -2
  169. package/dist/chat/transcript/tool-media.d.ts +4 -2
  170. package/dist/chat/transcript/tool-media.js +15 -7
  171. package/dist/chat/transcript/tool-parts.d.ts +27 -4
  172. package/dist/chat/transcript/tool-parts.js +31 -6
  173. package/dist/chat/transcript/tool-payload.js +26 -11
  174. package/dist/chat/transcript/tool-row.d.ts +2 -1
  175. package/dist/chat/transcript/tool-row.js +38 -19
  176. package/dist/chat/transcript/use-transcript-rows.d.ts +25 -8
  177. package/dist/chat/transcript/use-transcript-rows.js +28 -46
  178. package/dist/chat/transcript/useHistoryBackfill.d.ts +42 -0
  179. package/dist/chat/transcript/useHistoryBackfill.js +170 -0
  180. package/dist/chat/transcript/useStickToBottom.js +2 -3
  181. package/dist/chat/transcript/useTranscriptFind.js +2 -4
  182. package/dist/chat/transcript/useTranscriptScroll.d.ts +7 -4
  183. package/dist/chat/transcript/useTranscriptScroll.js +12 -1
  184. package/dist/chat/transcript/useTranscriptSearch.d.ts +2 -2
  185. package/dist/chat/transcript/useTranscriptSearch.js +35 -19
  186. package/dist/chat/transcript/useTranscriptSelectionCopy.d.ts +5 -5
  187. package/dist/chat/transcript/useTranscriptSelectionCopy.js +28 -7
  188. package/dist/chat/transcript/view-scope.d.ts +26 -6
  189. package/dist/chat/transcript/view-scope.js +106 -20
  190. package/dist/code/editor/FileTree.d.ts +2 -0
  191. package/dist/code/editor/FileTree.js +1 -1
  192. package/dist/code/editor/FileView.js +16 -25
  193. package/dist/code/editor/find/useFind.js +17 -17
  194. package/dist/code/editor/useCodeDocument.js +22 -19
  195. package/dist/code/editor/useDetachCleanup.js +4 -3
  196. package/dist/code/use-highlighted-html.js +12 -13
  197. package/dist/components/IconButton.d.ts +3 -1
  198. package/dist/components/IconButton.js +7 -2
  199. package/dist/components/IconButtonTip.d.ts +3 -1
  200. package/dist/components/IconButtonTip.js +2 -1
  201. package/dist/components/RowActionsMenu.js +7 -14
  202. package/dist/components/Tooltip.d.ts +4 -1
  203. package/dist/components/Tooltip.js +8 -6
  204. package/dist/components/assign-ref.d.ts +8 -0
  205. package/dist/components/assign-ref.js +12 -0
  206. package/dist/components/floating/FloatingSurface.js +2 -2
  207. package/dist/components/floating/HoverCard.js +32 -14
  208. package/dist/components/floating/Popover.js +4 -7
  209. package/dist/components/floating/useAnchoredPosition.d.ts +5 -3
  210. package/dist/components/floating/useAnchoredPosition.js +7 -7
  211. package/dist/components/object-key.d.ts +7 -0
  212. package/dist/components/object-key.js +18 -0
  213. package/dist/components/palette/PaletteList.js +2 -7
  214. package/dist/components/tooltip-arming.d.ts +3 -0
  215. package/dist/components/tooltip-arming.js +8 -1
  216. package/dist/core.css +3 -3
  217. package/dist/dist/{index-E1Z0aPmi.d.ts → index-BheVJOLc.d.ts} +3 -1
  218. package/dist/dist/index.d.ts +2 -2
  219. package/dist/files/FilesTab.js +0 -1
  220. package/dist/files/TreeColumn.d.ts +2 -4
  221. package/dist/files/TreeColumn.js +0 -5
  222. package/dist/files/headless/host.d.ts +3 -7
  223. package/dist/files/headless/labels.d.ts +0 -1
  224. package/dist/files/headless/labels.js +0 -1
  225. package/dist/files/headless/workspace-diff.js +1 -1
  226. package/dist/files/useCodeReview.js +1 -3
  227. package/dist/files/useFilesDiagnostics.d.ts +1 -1
  228. package/dist/files/useFilesDiagnostics.js +4 -11
  229. package/dist/files/useOpenFiles.js +9 -12
  230. package/dist/files/useWorkspace.d.ts +5 -7
  231. package/dist/files/useWorkspace.js +4 -15
  232. package/dist/git/GitBar.js +5 -3
  233. package/dist/git/MoveSessionDialog.d.ts +18 -8
  234. package/dist/git/MoveSessionDialog.js +32 -53
  235. package/dist/git/MoveToDialog.d.ts +61 -0
  236. package/dist/git/MoveToDialog.js +240 -0
  237. package/dist/git/SandboxManager.js +9 -4
  238. package/dist/git/SyncChip.js +11 -4
  239. package/dist/git/TeleportSessionDialog.d.ts +69 -0
  240. package/dist/git/TeleportSessionDialog.js +440 -0
  241. package/dist/git/headless/host.d.ts +14 -0
  242. package/dist/git/headless/index.d.ts +2 -1
  243. package/dist/git/headless/index.js +2 -1
  244. package/dist/git/headless/labels.d.ts +44 -1
  245. package/dist/git/headless/labels.js +50 -0
  246. package/dist/git/headless/sandboxes.d.ts +1 -1
  247. package/dist/git/headless/sandboxes.js +4 -3
  248. package/dist/git/headless/teleport.d.ts +76 -0
  249. package/dist/git/headless/teleport.js +19 -0
  250. package/dist/git/index.d.ts +4 -2
  251. package/dist/git/index.js +4 -2
  252. package/dist/git/useEnvironmentChoices.d.ts +5 -2
  253. package/dist/git/useEnvironmentChoices.js +12 -4
  254. package/dist/hooks/useLatest.d.ts +8 -0
  255. package/dist/hooks/useLatest.js +17 -0
  256. package/dist/hooks/useMinuteTick.d.ts +6 -2
  257. package/dist/hooks/useMinuteTick.js +12 -6
  258. package/dist/hooks/useNearViewport.js +11 -8
  259. package/dist/index.d.ts +3 -2
  260. package/dist/index.js +2 -1
  261. package/dist/keybindings/KeybindingsProvider.js +3 -4
  262. package/dist/keybindings/headless/catalog.d.ts +1 -1
  263. package/dist/keybindings/headless/catalog.js +18 -0
  264. package/dist/machines/AddServerForm.js +55 -3
  265. package/dist/machines/Banners.d.ts +2 -2
  266. package/dist/machines/Banners.js +3 -3
  267. package/dist/machines/DaemonMenu.js +1 -3
  268. package/dist/machines/HostsSection.js +5 -1
  269. package/dist/machines/OrganizationPanel.d.ts +25 -0
  270. package/dist/machines/OrganizationPanel.js +266 -0
  271. package/dist/machines/PersonalLayerPanel.d.ts +32 -0
  272. package/dist/machines/PersonalLayerPanel.js +360 -0
  273. package/dist/machines/headless/fixture-host.d.ts +10 -0
  274. package/dist/machines/headless/fixture-host.js +44 -0
  275. package/dist/machines/headless/host.d.ts +21 -1
  276. package/dist/machines/headless/index.d.ts +3 -1
  277. package/dist/machines/headless/index.js +3 -1
  278. package/dist/machines/headless/labels.d.ts +55 -0
  279. package/dist/machines/headless/labels.js +58 -1
  280. package/dist/machines/headless/layer.d.ts +64 -0
  281. package/dist/machines/headless/layer.js +56 -0
  282. package/dist/machines/headless/organization.d.ts +38 -0
  283. package/dist/machines/headless/organization.js +44 -0
  284. package/dist/machines/index.d.ts +3 -1
  285. package/dist/machines/index.js +3 -1
  286. package/dist/machines/testing/contract.d.ts +25 -1
  287. package/dist/machines/testing/contract.js +97 -1
  288. package/dist/motion/grow.js +12 -13
  289. package/dist/motion/swap.js +2 -5
  290. package/dist/motion/use-flip-list.d.ts +14 -0
  291. package/dist/motion/use-flip-list.js +17 -12
  292. package/dist/palette/headless/app-sources.js +37 -0
  293. package/dist/palette/headless/labels.js +3 -0
  294. package/dist/server/sse-handler.js +25 -2
  295. package/dist/session/DiffFileTree.js +1 -4
  296. package/dist/session/OpenSessionsDialog.d.ts +46 -0
  297. package/dist/session/OpenSessionsDialog.js +170 -0
  298. package/dist/session/PlanTracker.js +1 -2
  299. package/dist/session/ProjectHome.js +10 -9
  300. package/dist/session/RemindersPanel.js +10 -12
  301. package/dist/session/SecretsPanel.js +2 -1
  302. package/dist/session/SessionHeader.js +1 -0
  303. package/dist/session/SessionPeopleStack.d.ts +23 -0
  304. package/dist/session/SessionPeopleStack.js +65 -0
  305. package/dist/session/SessionPlaceMenu.js +5 -4
  306. package/dist/session/ShareSessionDialog.d.ts +32 -0
  307. package/dist/session/ShareSessionDialog.js +342 -0
  308. package/dist/session/TypingLine.d.ts +22 -0
  309. package/dist/session/TypingLine.js +31 -0
  310. package/dist/session/headless/host.d.ts +40 -1
  311. package/dist/session/headless/index.d.ts +4 -2
  312. package/dist/session/headless/index.js +3 -1
  313. package/dist/session/headless/labels.d.ts +49 -0
  314. package/dist/session/headless/labels.js +56 -0
  315. package/dist/session/headless/people.d.ts +29 -0
  316. package/dist/session/headless/people.js +53 -0
  317. package/dist/session/headless/place.d.ts +5 -0
  318. package/dist/session/headless/place.js +5 -1
  319. package/dist/session/headless/typing.d.ts +37 -0
  320. package/dist/session/headless/typing.js +60 -0
  321. package/dist/session/index.d.ts +5 -1
  322. package/dist/session/index.js +5 -1
  323. package/dist/settings/headless/fixture-performance.js +4 -2
  324. package/dist/settings/headless/performance.d.ts +4 -0
  325. package/dist/settings/headless/search.d.ts +1 -1
  326. package/dist/settings/headless/sections-host.d.ts +7 -2
  327. package/dist/settings/section.d.ts +15 -3
  328. package/dist/settings/section.js +15 -3
  329. package/dist/settings/sections/environments/EnvironmentsSection.js +30 -6
  330. package/dist/settings/sections/keybindings/labels.d.ts +3 -0
  331. package/dist/settings/sections/keybindings/labels.js +3 -0
  332. package/dist/settings/sections/keybindings/rows.js +12 -0
  333. package/dist/settings/sections/logs/LogsSection.js +5 -8
  334. package/dist/settings/sections/performance/PerformanceSection.js +8 -1
  335. package/dist/settings/sections/performance/labels.d.ts +2 -0
  336. package/dist/settings/sections/performance/labels.js +2 -0
  337. package/dist/styles.css +65 -9
  338. package/dist/terminal/HostTerminalSurface.js +28 -30
  339. package/dist/terminal/TerminalPanel.js +4 -12
  340. package/dist/terminal/TerminalProvider.d.ts +10 -2
  341. package/dist/terminal/TerminalProvider.js +10 -2
  342. package/dist/terminal/headless/labels.d.ts +0 -1
  343. package/dist/terminal/headless/labels.js +1 -2
  344. package/dist/terminal/headless/store.js +5 -1
  345. package/dist/views/headless/answers.d.ts +8 -2
  346. package/dist/views/headless/answers.js +58 -1
  347. package/dist/views/headless/placement.d.ts +78 -0
  348. package/dist/views/headless/placement.js +154 -44
  349. package/dist/workspace/LayoutBudget.js +1 -7
  350. package/package.json +2 -2
  351. package/src/styles/chat.css +3 -1
  352. package/src/styles/palette.css +3 -3
  353. package/src/styles/transcript.css +50 -5
  354. /package/dist/dist/{index-De9AbmxS.d.ts → index-ttmMvjgM.d.ts} +0 -0
@@ -0,0 +1,131 @@
1
+ import { LoadError } from "../../components/LoadError.js";
2
+ import { createToolOutputPager, toolOutputPagerDone } from "../headless/output-pager.js";
3
+ import { constant, useReadable } from "../headless/store.js";
4
+ import { useChatLabels } from "../useChatLabels.js";
5
+ import { useTranscriptActions } from "./actions.js";
6
+ import { LoadFullOutputButton, useFullOutput } from "./tool-parts.js";
7
+ import { useMemo, useState } from "react";
8
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
+ import { formatBytes } from "zidane/chat/pure";
10
+ // src/chat/transcript/clipped-output.tsx
11
+ const IDLE = constant({
12
+ text: "",
13
+ total: null,
14
+ missing: false,
15
+ loading: false,
16
+ error: null
17
+ });
18
+ /**
19
+ * The rest of a clipped result, read through the transcript's actions: paged
20
+ * with `toolOutputRange`, whole with `toolOutput` only.
21
+ *
22
+ * @param tool - The clipped tool row. Its `callId` (and `turnId`, a hint) address the result.
23
+ */
24
+ function useClippedOutput(tool) {
25
+ const { sessionId, toolOutputRange } = useTranscriptActions();
26
+ const whole = useFullOutput(tool);
27
+ const { callId, turnId, resultClipped } = tool;
28
+ const pager = useMemo(() => toolOutputRange && sessionId && callId && resultClipped ? createToolOutputPager((range) => toolOutputRange(callId, range, turnId)) : null, [
29
+ toolOutputRange,
30
+ sessionId,
31
+ callId,
32
+ turnId,
33
+ resultClipped
34
+ ]);
35
+ const state = useReadable(pager ?? IDLE);
36
+ const [running, setRunning] = useState(null);
37
+ const [last, setLast] = useState("more");
38
+ if (!pager) return {
39
+ text: typeof whole.full === "string" ? whole.full : null,
40
+ available: whole.available,
41
+ ready: whole.ready,
42
+ paged: null,
43
+ whole: {
44
+ full: whole.full,
45
+ load: whole.load
46
+ }
47
+ };
48
+ const run = (what) => {
49
+ setRunning(what);
50
+ setLast(what);
51
+ (what === "all" ? pager.loadAll() : pager.loadMore()).finally(() => setRunning(null));
52
+ };
53
+ return {
54
+ text: state.total !== null && !state.missing ? state.text : null,
55
+ available: true,
56
+ ready: true,
57
+ paged: {
58
+ ...state,
59
+ running: state.loading ? running : null,
60
+ run,
61
+ retry: () => run(last)
62
+ },
63
+ whole: {
64
+ full: whole.full,
65
+ load: whole.load
66
+ }
67
+ };
68
+ }
69
+ /**
70
+ * "Load full output" over a clipped result; once a page shows, how much is
71
+ * loaded with "Load more" and "Load all", and a failed read with Retry.
72
+ *
73
+ * @param props - The result's state, `className` and `style`.
74
+ */
75
+ function ClippedOutputControls({ output, className = "", style }) {
76
+ const labels = useChatLabels();
77
+ const { paged, whole } = output;
78
+ if (!output.available) return null;
79
+ if (!paged) {
80
+ if (typeof whole.full === "string") return null;
81
+ return /* @__PURE__ */ jsx(LoadFullOutputButton, {
82
+ loading: whole.full === "loading",
83
+ disabled: !output.ready,
84
+ onClick: whole.load,
85
+ className,
86
+ ...style ? { style } : {}
87
+ });
88
+ }
89
+ if (paged.missing || toolOutputPagerDone(paged) && paged.error === null) return null;
90
+ const failed = paged.error !== null && /* @__PURE__ */ jsx(LoadError, {
91
+ detail: paged.error,
92
+ onRetry: paged.retry,
93
+ children: labels.outputLoadFailed
94
+ });
95
+ if (paged.total === null) return /* @__PURE__ */ jsxs("div", {
96
+ className: `flex flex-col items-start gap-1.5 ${className}`,
97
+ style,
98
+ children: [/* @__PURE__ */ jsx(LoadFullOutputButton, {
99
+ loading: paged.loading,
100
+ disabled: false,
101
+ onClick: () => paged.run("more"),
102
+ className: ""
103
+ }), failed]
104
+ });
105
+ return /* @__PURE__ */ jsxs("div", {
106
+ className: `flex flex-col items-start gap-1.5 ${className}`,
107
+ style,
108
+ children: [/* @__PURE__ */ jsxs("div", {
109
+ className: "flex flex-wrap items-baseline gap-3",
110
+ children: [/* @__PURE__ */ jsx("span", {
111
+ className: "zg-meta",
112
+ children: labels.outputLoaded(formatBytes(paged.text.length), formatBytes(paged.total))
113
+ }), !toolOutputPagerDone(paged) && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(LoadFullOutputButton, {
114
+ loading: paged.running === "more",
115
+ disabled: paged.loading,
116
+ onClick: () => paged.run("more"),
117
+ className: "",
118
+ label: labels.loadMoreOutput,
119
+ loadingLabel: labels.loadingOutput
120
+ }), /* @__PURE__ */ jsx(LoadFullOutputButton, {
121
+ loading: paged.running === "all",
122
+ disabled: paged.loading,
123
+ onClick: () => paged.run("all"),
124
+ className: "",
125
+ label: labels.loadAllOutput,
126
+ loadingLabel: labels.loadingOutput
127
+ })] })]
128
+ }), failed]
129
+ });
130
+ }
131
+ export { ClippedOutputControls, useClippedOutput };
@@ -3,7 +3,7 @@ import { Grow, GrowPresence } from "../../motion/grow.js";
3
3
  import { RollingText } from "../../motion/roll.js";
4
4
  import { mediumKey } from "../headless/transcript/exchange-media.js";
5
5
  import { useChatLabels } from "../useChatLabels.js";
6
- import { useTranscriptActions } from "./actions.js";
6
+ import { toolMediaSrcOf, useTranscriptActions } from "./actions.js";
7
7
  import { useMediaGallery } from "./media-gallery.js";
8
8
  import { useThumbnail } from "./thumbnails.js";
9
9
  import { memo, useMemo, useState } from "react";
@@ -41,7 +41,7 @@ function stripLayout(images) {
41
41
  */
42
42
  const FoldAttachments = memo(({ attachments, className, style }) => {
43
43
  const labels = useChatLabels();
44
- const { toolMediaUrl } = useTranscriptActions();
44
+ const actions = useTranscriptActions();
45
45
  const lightbox = useLightbox();
46
46
  const mediaGallery = useMediaGallery();
47
47
  const [failed, setFailed] = useState(NO_FAILURES);
@@ -49,9 +49,14 @@ const FoldAttachments = memo(({ attachments, className, style }) => {
49
49
  keys: new Set(attachments.map((a) => a.key)),
50
50
  counted: attachments.length > STRIP_SIZE
51
51
  }));
52
- const { tiles, hidden } = useMemo(() => stripLayout(failed.size > 0 ? attachments.filter((a) => !failed.has(a.key)) : attachments), [attachments, failed]);
53
- if (!toolMediaUrl || tiles.length === 0) return null;
54
- const src = (a) => toolMediaUrl(a.callId, a.index);
52
+ const servable = (a) => toolMediaSrcOf(actions, a.callId, a) !== void 0;
53
+ const { tiles, hidden } = useMemo(() => stripLayout(attachments.filter((a) => !failed.has(a.key) && toolMediaSrcOf(actions, a.callId, a) !== void 0)), [
54
+ attachments,
55
+ failed,
56
+ actions
57
+ ]);
58
+ if (tiles.length === 0 || !servable(tiles[0])) return null;
59
+ const src = (a) => toolMediaSrcOf(actions, a.callId, a);
55
60
  const fail = (a) => {
56
61
  mediaGallery?.failed(mediumKey.tool(a.callId, a.index));
57
62
  setFailed((prev) => new Set(prev).add(a.key));
@@ -5,9 +5,11 @@ import { useChatLabels } from "../useChatLabels.js";
5
5
  import { useModelName } from "./actions.js";
6
6
  import { Caret } from "./frame.js";
7
7
  import { useTranscriptRenderers } from "./renderers.js";
8
- import { useMemo, useState } from "react";
8
+ import { useRowPartKey, useRowUiState } from "./row-ui-state.js";
9
+ import { useMemo } from "react";
9
10
  import { jsx, jsxs } from "react/jsx-runtime";
10
11
  // src/chat/transcript/fold-worker.tsx
12
+ const NO_ROWS = [];
11
13
  /**
12
14
  * A worker, opened: what it was asked (the Task step, closed by default),
13
15
  * then its own progress folded like an exchange (`foldWorkerRows`): its
@@ -19,7 +21,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
19
21
  */
20
22
  function WorkerDetails({ item, renderRows, className, style }) {
21
23
  const labels = useChatLabels();
22
- const rows = item.workerRows ?? [];
24
+ const rows = item.workerRows ?? NO_ROWS;
23
25
  const start = rows.find((r) => r.kind === "spawn-start");
24
26
  const own = start?.childId ?? rows.map((r) => "childId" in r ? r.childId : void 0).find(Boolean);
25
27
  const live = item.state === "running";
@@ -64,7 +66,7 @@ function TaskStep({ task, model, type, resume, system }) {
64
66
  const labels = useChatLabels();
65
67
  const modelName = useModelName();
66
68
  const { Markdown } = useTranscriptRenderers();
67
- const [open, setOpen] = useState(false);
69
+ const [open, setOpen] = useRowUiState(useRowPartKey("worker-task"), false);
68
70
  const mounted = useStaysMounted(open);
69
71
  const first = task.split("\n").find((line) => line.trim()) ?? "";
70
72
  const settings = [
@@ -14,6 +14,7 @@ import { Caret, Dot, RowFrame } from "./frame.js";
14
14
  import { CompactMeta } from "./receipt-parts.js";
15
15
  import { createRecentMap } from "./recent-map.js";
16
16
  import { useTranscriptRenderers } from "./renderers.js";
17
+ import { useRowUiState } from "./row-ui-state.js";
17
18
  import { ToolDetails } from "./tool-details.js";
18
19
  import { ToolTiming } from "./tool-parts.js";
19
20
  import { ModelVerdict } from "./tool-row.js";
@@ -57,7 +58,7 @@ const ExchangeFoldRow = memo(({ row, renderRows, status: runStatus, showAttachme
57
58
  const labels = useChatLabels();
58
59
  const [openState, setOpenState] = useState(() => FOLD_OPEN_STATE.get(row.id) ?? false);
59
60
  const [setupOpened] = useState(() => new Set(openSetupIds(row.rows)));
60
- const [openIds, setOpenIds] = useState(() => setupOpened.size > 0 ? new Set(setupOpened) : NO_OPEN_IDS);
61
+ const [openIds, setOpenIds] = useRowUiState(`fold-steps:${row.id}`, setupOpened.size > 0 ? new Set(setupOpened) : NO_OPEN_IDS);
61
62
  const setOpen = (next) => {
62
63
  FOLD_OPEN_STATE.set(row.id, next);
63
64
  setOpenState(next);
@@ -96,7 +97,11 @@ const ExchangeFoldRow = memo(({ row, renderRows, status: runStatus, showAttachme
96
97
  if (fresh.length === 0) return;
97
98
  fresh.forEach((id) => autoOpened.add(id));
98
99
  setOpenIds((prev) => /* @__PURE__ */ new Set([...prev, ...fresh]));
99
- }, [running, autoOpened]);
100
+ }, [
101
+ running,
102
+ autoOpened,
103
+ setOpenIds
104
+ ]);
100
105
  const setupStates = items.filter((i) => i.kind === "setup").map((i) => `${i.id}|${i.state}`).join(",");
101
106
  useEffect(() => {
102
107
  for (const entry of setupStates ? setupStates.split(",") : []) {
@@ -110,13 +115,17 @@ const ExchangeFoldRow = memo(({ row, renderRows, status: runStatus, showAttachme
110
115
  return next;
111
116
  });
112
117
  }
113
- }, [setupStates, setupOpened]);
118
+ }, [
119
+ setupStates,
120
+ setupOpened,
121
+ setOpenIds
122
+ ]);
114
123
  const toggleAction = useCallback((id) => setOpenIds((prev) => {
115
124
  const next = new Set(prev);
116
125
  if (next.has(id)) next.delete(id);
117
126
  else next.add(id);
118
127
  return next;
119
- }), []);
128
+ }), [setOpenIds]);
120
129
  const shown = useMemo(() => {
121
130
  if (open) return items;
122
131
  const inStack = new Set(cadenced.map((i) => i.id));
@@ -3,15 +3,15 @@
3
3
  * slots (`TranscriptRenderersProvider`) and actions (`TranscriptActionsProvider`).
4
4
  * `Transcript` / `HostTranscript` themselves are in `zidane-ui/chat`.
5
5
  */
6
- import { TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, useModelName, useTranscriptActions } from "./actions.js";
7
- import { TranscriptRenderersProvider, TranscriptRenderersProviderProps } from "./renderer-slots.js";
6
+ import { TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, attachmentSrcOf, toolMediaSrcOf, useModelName, useTranscriptActions } from "./actions.js";
8
7
  import { AnsiSpans, AnsiSpansProps, AnsiText, AnsiTextProps } from "./AnsiText.js";
9
- import { ToolMediaItem, parseToolMedia } from "../headless/transcript/tool-media.js";
8
+ import { TranscriptRenderersProvider, TranscriptRenderersProviderProps } from "./renderer-slots.js";
10
9
  import { AuthFailureCard, AuthFailureCardProps } from "./AuthFailureCard.js";
10
+ import { ToolMediaItem, parseToolMedia } from "../headless/transcript/tool-media.js";
11
11
  import { BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, OpenBadgeMenu, useBadgeMenu } from "./BadgeMenu.js";
12
12
  import { BADGE_GLYPH, FileBadgeIcon, FileBadgeIconProps, LinkBadge, LinkBadgeProps, LinkIcon, LinkIconProps, fileBadgeName, fileBadgeSpec, linkGlyph, siteIconValue } from "./badges.js";
13
13
  import { CardMarkdown, CardMarkdownProps } from "./CardMarkdown.js";
14
- import { useCommand, useCommitInfo, useReferencedSession, useSkill } from "./chip-details.js";
14
+ import { useCommand, useCommitInfo, useReferencedSession, useSkill, useTokenSession } from "./chip-details.js";
15
15
  import { useChipResolution, useResolveChipNow } from "./chip-resolve.js";
16
16
  import { CHIP_CARD_WIDTH, ChipCard, ChipCardProps, ChipHover, ChipHoverProps } from "./ChipCard.js";
17
17
  import { CommandCard, CommandCardProps, CommitCard, CommitCardProps, SessionCard, SessionCardProps, SkillCard, SkillCardProps, SkillGroupCard, SkillGroupCardProps } from "./ChipCards.js";
@@ -27,7 +27,7 @@ import { Caret, CaretProps, Dot, DotProps, FailedMark, FailedMarkProps, GUTTER_S
27
27
  import { ImageGenerationBlock, ImageGenerationBlockProps, drawsImageGeneration, imageRequestsOf, savedPaths } from "./ImageGenerationBlock.js";
28
28
  import { InlineChipText, InlineChipTextProps } from "./InlineChipText.js";
29
29
  import { InteractionTool, InteractionToolBody, InteractionToolBodyProps, hasInteractionBody } from "./InteractionToolBody.js";
30
- import { CvRow, CvRowProps, LazyRow, LazyRowProps, TranscriptSettling, holdForceMountRows, mountRowNow, useBackgroundMount, useForceMountRows } from "./LazyRow.js";
30
+ import { CvRow, CvRowProps, ForcedRows, LazyRow, LazyRowProps, TranscriptSettling, holdForceMountRows, useBackgroundMount, useForceMountRows, useForcedRows } from "./LazyRow.js";
31
31
  import { LiveOutput, LiveOutputProps } from "./LiveOutput.js";
32
32
  import { Markdown, MarkdownDiagrams, MarkdownDiagramsProps, MarkdownImageProps, MarkdownLinkProps, MarkdownProps } from "./markdown.js";
33
33
  import { ChipOpener, CommandScope, CommandScopeContext, INLINE_CODE_CLASS, MarkdownContext, MarkdownContextValue, OpenSessionContext } from "./markdown-context.js";
@@ -44,27 +44,28 @@ import { ReferenceChip, ReferenceChipProps, ReferenceText, ReferenceTextProps }
44
44
  import { ParsedReferenceUrl, parseReferenceUrl, referenceUrl, remarkReferences } from "./remark-references.js";
45
45
  import { ParsedRef, RefMatch, classifyInlineRef, findRefs, numberRef, parseRefUrl, refHref, remarkRefs } from "./remark-refs.js";
46
46
  import { AttachmentLabelParts, CodeBlockSlotProps, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultInlineTextProps, DefaultMarkdown, DefaultMarkdownProps, DefaultPrompt, DefaultPromptProps, DefaultSessionTitle, DefaultSessionTitleProps, InlineTextSlotProps, MarkdownSlotProps, PromptSlotProps, SessionTitleSlotProps, TextPreviewSlotProps, ToolBodySlotProps, TranscriptRenderers, defaultAttachmentLabel, useTranscriptRenderers } from "./renderers.js";
47
+ import { revealRow } from "./row-mount.js";
47
48
  import { CompactSummaryRow, CompactSummaryRowProps, RunReceiptInline, RunReceiptInlineProps, RunSummaryRow, RunSummaryRowProps } from "./run-rows.js";
48
49
  import { SelectCursor, SelectCursorProps } from "./SelectCursor.js";
49
50
  import { SelectTurnExit, SelectTurnHintKeys, SelectTurnHintKeysProps } from "./SelectTurnHint.js";
50
51
  import { SelectTurnCommands, SelectTurnProvider, SelectTurnProviderProps, SelectTurnState, SelectTurnValue, useSelectTurn } from "./SelectTurnProvider.js";
51
52
  import { RunnableCodeBlock, ShellBlockProvider, ShellBlockProviderProps } from "./shell-block.js";
52
- import { RunnableCodeBlockProps, ShellBlockScope, useShellBlockScope } from "./shell-block-scope.js";
53
53
  import { useSiteIcon } from "./site-icons.js";
54
+ import { RunnableCodeBlockProps, ShellBlockScope, useShellBlockScope } from "./shell-block-scope.js";
54
55
  import { SubagentBlock, SubagentBlockProps } from "./SubagentBlock.js";
55
56
  import { TaskBatchRow, TaskBatchRowProps, TaskRow, TaskRowProps } from "./tasks.js";
56
57
  import { ToolBatchRow, ToolBatchRowProps } from "./tool-batch.js";
57
58
  import { ToolDetails, ToolDetailsProps } from "./tool-details.js";
58
59
  import { ToolMedia, ToolMediaProps, useToolMedia } from "./tool-media.js";
59
- import { CODE_PANEL, LoadFullOutputButton, LoadFullOutputButtonProps, ReadFileBlock, ReadFileBlockProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolTiming, ToolTimingProps, useFullOutput } from "./tool-parts.js";
60
+ import { CODE_PANEL, LoadFullOutputButton, LoadFullOutputButtonProps, ReadFileBlock, ReadFileBlockProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolTiming, ToolTimingProps, useFullOutput, useFullToolCall } from "./tool-parts.js";
60
61
  import { ModelVerdict, ModelVerdictProps, NestedToolCalls, NestedToolCallsProps, ToolRow, ToolRowProps } from "./tool-row.js";
61
- import { TranscriptRail, TranscriptRailProps, TranscriptRailProvider, TranscriptRailProviderProps, useTranscriptRailStore } from "./TranscriptRail.js";
62
+ import { TranscriptRail, TranscriptRailProps, TranscriptRailProvider, TranscriptRailProviderProps, useRailOutline, useTranscriptRailStore } from "./TranscriptRail.js";
62
63
  import { RowContext, SlotEntry, TranscriptRow, TranscriptRowProps, TranscriptRowSlot, TranscriptRowSlotProps, TranscriptTurnMenu, TurnMenuTarget, isHiddenRow } from "./TranscriptRow.js";
63
64
  import { TranscriptSearch, TranscriptSearchProps } from "./TranscriptSearch.js";
64
65
  import { TurnCommands, TurnCommandsOptions, createTurnCommands, turnViewsOf, useTurnCommands } from "./turn-commands.js";
65
66
  import { TurnMenuActions, useTurnMenu } from "./TurnMenu.js";
66
67
  import { HostTurnMenuOptions, useHostTurnMenu } from "./use-host-turn-menu.js";
67
- import { TranscriptRows, TranscriptRowsInput, useSelectStops, useTranscriptRows } from "./use-transcript-rows.js";
68
+ import { TranscriptRows, TranscriptRowsInput, TranscriptSource, useSelectStops, useTranscriptRows } from "./use-transcript-rows.js";
68
69
  import { ComposerSearch, useComposerSearch } from "./useComposerSearch.js";
69
70
  import { UserBashRow, UserBashRowProps } from "./user-bash.js";
70
71
  import { SelectTurnKeysOptions, useSelectTurnKeys } from "./useSelectTurnKeys.js";
@@ -77,4 +78,4 @@ import { MAX_MATCHES, SearchHighlightStyle, TranscriptSearchOptions, TranscriptS
77
78
  import { useTranscriptSelectionCopy } from "./useTranscriptSelectionCopy.js";
78
79
  import { useWheelHoverPause } from "./useWheelHoverPause.js";
79
80
  import { MarkdownViews, MarkdownViewsProps } from "./view-scope.js";
80
- export { AUTO_FILL_PAGES, AnsiSpans, type AnsiSpansProps, AnsiText, type AnsiTextProps, AttachmentIcon, AttachmentIconProps, AttachmentLabelParts, AuthFailureCard, AuthFailureCardProps, BADGE_GLYPH, BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, CardMarkdownProps, Caret, CaretProps, ChipCard, ChipCardProps, ChipHover, ChipHoverProps, ChipOpener, CodeBlockSlotProps, CodemodeScript, type CodemodeScriptProps, CommandCard, CommandCardProps, CommandDetailRow, CommandDetailRowProps, CommandNoteRow, CommandNoteRowProps, CommandScope, CommandScopeContext, CommitCard, CommitCardProps, CompactSummaryRow, CompactSummaryRowProps, ComposerSearch, CvRow, CvRowProps, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultInlineTextProps, DefaultMarkdown, DefaultMarkdownProps, DefaultPrompt, DefaultPromptProps, DefaultSessionTitle, DefaultSessionTitleProps, DiffLines, DiffLinesProps, Dot, DotProps, EditDiffBlock, EditDiffBlockProps, EnvironmentSetupDetails, EnvironmentSetupDetailsProps, EnvironmentSetupRow, EnvironmentSetupRowProps, ErrorRow, ErrorRowProps, ExchangeFoldRow, ExchangeFoldRowProps, FILL_MIN_PROMPTS, FailedMark, FailedMarkProps, FailureRow, FailureRowProps, FileBadgeIcon, FileBadgeIconProps, FoldHeader, FoldHeaderProps, GUTTER_STEP_PX, HostTurnMenuOptions, INLINE_CODE_CLASS, ImageGenerationBlock, ImageGenerationBlockProps, InfoRow, InfoRowProps, InlineChipText, InlineChipTextProps, InlineCode, InlineCodeProps, InlineTextSlotProps, InteractionTool, InteractionToolBody, InteractionToolBodyProps, LazyRow, LazyRowProps, LineState, LinkBadge, LinkBadgeProps, LinkIcon, LinkIconProps, LiveOutput, type LiveOutputProps, LiveScriptsContext, LoadEarlierRow, LoadEarlierRowProps, LoadFullOutputButton, LoadFullOutputButtonProps, MAX_MATCHES, Markdown, MarkdownContext, MarkdownContextValue, MarkdownDiagrams, MarkdownDiagramsProps, MarkdownImageProps, MarkdownLinkProps, MarkdownProps, MarkdownSlotProps, MarkdownViews, type MarkdownViewsProps, MermaidDiagram, type MermaidDiagramProps, MessageGroupRow, MessageGroupRowProps, ModelVerdict, ModelVerdictProps, NestedToolCalls, NestedToolCallsProps, NoticeRow, NoticeRowProps, OpenBadgeMenu, OpenSessionContext, ParsedRef, ParsedReferenceUrl, PromptEcho, PromptEchoProps, PromptLines, PromptLinesProps, PromptSlotProps, ProseMarkdown, ProseMarkdownProps, ReadFileBlock, ReadFileBlockProps, RefChip, RefChipProps, RefMatch, ReferenceChip, ReferenceChipProps, ReferenceText, ReferenceTextProps, RepairedRow, RepairedRowProps, RowContext, RowFrame, RowFrameProps, RowIconsContext, RowPlace, RunReceiptInline, RunReceiptInlineProps, RunSummaryRow, RunSummaryRowProps, RunnableCodeBlock, type RunnableCodeBlockProps, ScrollPosition, SearchHighlightStyle, SelectCursor, SelectCursorProps, SelectTurnCommands, SelectTurnExit, SelectTurnHintKeys, SelectTurnHintKeysProps, SelectTurnKeysOptions, SelectTurnProvider, SelectTurnProviderProps, SelectTurnState, SelectTurnValue, SessionCard, SessionCardProps, SessionEventRow, SessionEventRowProps, SessionTitleSlotProps, ShellBlockProvider, type ShellBlockProviderProps, type ShellBlockScope, SkillCard, SkillCardProps, SkillGroupCard, SkillGroupCardProps, SlotEntry, SpawnEndRow, SpawnEndRowProps, SpawnStartRow, SpawnStartRowProps, StickToBottomOptions, SubagentBlock, SubagentBlockProps, TaskBatchRow, TaskBatchRowProps, TaskRow, TaskRowProps, TextPreviewSlotProps, TextRow, TextRowProps, ThinkingBatchRow, ThinkingBatchRowProps, ThinkingRow, ThinkingRowProps, ToolBatchRow, ToolBatchRowProps, ToolBodySlotProps, ToolDetails, ToolDetailsProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolMedia, type ToolMediaItem, ToolMediaProps, ToolRow, ToolRowProps, ToolTiming, ToolTimingProps, TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, TranscriptFind, TranscriptFindKeyOptions, TranscriptFindOptions, TranscriptFindTarget, TranscriptRail, type TranscriptRailProps, TranscriptRailProvider, type TranscriptRailProviderProps, TranscriptRenderers, TranscriptRenderersProvider, type TranscriptRenderersProviderProps, TranscriptRow, TranscriptRowProps, TranscriptRowSlot, TranscriptRowSlotProps, TranscriptRows, TranscriptRowsInput, TranscriptScrollInputs, TranscriptSearch, TranscriptSearchOptions, TranscriptSearchProps, TranscriptSearchState, TranscriptSettling, TranscriptTurnMenu, TurnCommands, TurnCommandsOptions, TurnMenuActions, TurnMenuTarget, UserBashRow, UserBashRowProps, UserPromptAttachments, UserPromptAttachmentsProps, UserPromptRow, UserPromptRowProps, WorkerDetails, WorkerDetailsProps, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph, mountRowNow, numberRef, parseRefUrl, parseReferenceUrl, parseToolMedia, refHref, referenceUrl, remarkReferences, remarkRefs, savedPaths, siteIconValue, turnViewsOf, useBackgroundMount, useBadgeMenu, useChipResolution, useCommand, useCommitInfo, useComposerSearch, useFillViewportScrollback, useForceMountRows, useFullOutput, useHostTurnMenu, useModelName, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useResolveChipNow, useRowIcons, useSelectStops, useSelectTurn, useSelectTurnKeys, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause };
81
+ export { AUTO_FILL_PAGES, AnsiSpans, type AnsiSpansProps, AnsiText, type AnsiTextProps, AttachmentIcon, AttachmentIconProps, AttachmentLabelParts, AuthFailureCard, AuthFailureCardProps, BADGE_GLYPH, BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, CardMarkdownProps, Caret, CaretProps, ChipCard, ChipCardProps, ChipHover, ChipHoverProps, ChipOpener, CodeBlockSlotProps, CodemodeScript, type CodemodeScriptProps, CommandCard, CommandCardProps, CommandDetailRow, CommandDetailRowProps, CommandNoteRow, CommandNoteRowProps, CommandScope, CommandScopeContext, CommitCard, CommitCardProps, CompactSummaryRow, CompactSummaryRowProps, ComposerSearch, CvRow, CvRowProps, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultInlineTextProps, DefaultMarkdown, DefaultMarkdownProps, DefaultPrompt, DefaultPromptProps, DefaultSessionTitle, DefaultSessionTitleProps, DiffLines, DiffLinesProps, Dot, DotProps, EditDiffBlock, EditDiffBlockProps, EnvironmentSetupDetails, EnvironmentSetupDetailsProps, EnvironmentSetupRow, EnvironmentSetupRowProps, ErrorRow, ErrorRowProps, ExchangeFoldRow, ExchangeFoldRowProps, FILL_MIN_PROMPTS, FailedMark, FailedMarkProps, FailureRow, FailureRowProps, FileBadgeIcon, FileBadgeIconProps, FoldHeader, FoldHeaderProps, ForcedRows, GUTTER_STEP_PX, HostTurnMenuOptions, INLINE_CODE_CLASS, ImageGenerationBlock, ImageGenerationBlockProps, InfoRow, InfoRowProps, InlineChipText, InlineChipTextProps, InlineCode, InlineCodeProps, InlineTextSlotProps, InteractionTool, InteractionToolBody, InteractionToolBodyProps, LazyRow, LazyRowProps, LineState, LinkBadge, LinkBadgeProps, LinkIcon, LinkIconProps, LiveOutput, type LiveOutputProps, LiveScriptsContext, LoadEarlierRow, LoadEarlierRowProps, LoadFullOutputButton, LoadFullOutputButtonProps, MAX_MATCHES, Markdown, MarkdownContext, MarkdownContextValue, MarkdownDiagrams, MarkdownDiagramsProps, MarkdownImageProps, MarkdownLinkProps, MarkdownProps, MarkdownSlotProps, MarkdownViews, type MarkdownViewsProps, MermaidDiagram, type MermaidDiagramProps, MessageGroupRow, MessageGroupRowProps, ModelVerdict, ModelVerdictProps, NestedToolCalls, NestedToolCallsProps, NoticeRow, NoticeRowProps, OpenBadgeMenu, OpenSessionContext, ParsedRef, ParsedReferenceUrl, PromptEcho, PromptEchoProps, PromptLines, PromptLinesProps, PromptSlotProps, ProseMarkdown, ProseMarkdownProps, ReadFileBlock, ReadFileBlockProps, RefChip, RefChipProps, RefMatch, ReferenceChip, ReferenceChipProps, ReferenceText, ReferenceTextProps, RepairedRow, RepairedRowProps, RowContext, RowFrame, RowFrameProps, RowIconsContext, RowPlace, RunReceiptInline, RunReceiptInlineProps, RunSummaryRow, RunSummaryRowProps, RunnableCodeBlock, type RunnableCodeBlockProps, ScrollPosition, SearchHighlightStyle, SelectCursor, SelectCursorProps, SelectTurnCommands, SelectTurnExit, SelectTurnHintKeys, SelectTurnHintKeysProps, SelectTurnKeysOptions, SelectTurnProvider, SelectTurnProviderProps, SelectTurnState, SelectTurnValue, SessionCard, SessionCardProps, SessionEventRow, SessionEventRowProps, SessionTitleSlotProps, ShellBlockProvider, type ShellBlockProviderProps, type ShellBlockScope, SkillCard, SkillCardProps, SkillGroupCard, SkillGroupCardProps, SlotEntry, SpawnEndRow, SpawnEndRowProps, SpawnStartRow, SpawnStartRowProps, StickToBottomOptions, SubagentBlock, SubagentBlockProps, TaskBatchRow, TaskBatchRowProps, TaskRow, TaskRowProps, TextPreviewSlotProps, TextRow, TextRowProps, ThinkingBatchRow, ThinkingBatchRowProps, ThinkingRow, ThinkingRowProps, ToolBatchRow, ToolBatchRowProps, ToolBodySlotProps, ToolDetails, ToolDetailsProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolMedia, type ToolMediaItem, ToolMediaProps, ToolRow, ToolRowProps, ToolTiming, ToolTimingProps, TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, TranscriptFind, TranscriptFindKeyOptions, TranscriptFindOptions, TranscriptFindTarget, TranscriptRail, type TranscriptRailProps, TranscriptRailProvider, type TranscriptRailProviderProps, TranscriptRenderers, TranscriptRenderersProvider, type TranscriptRenderersProviderProps, TranscriptRow, TranscriptRowProps, TranscriptRowSlot, TranscriptRowSlotProps, TranscriptRows, TranscriptRowsInput, TranscriptScrollInputs, TranscriptSearch, TranscriptSearchOptions, TranscriptSearchProps, TranscriptSearchState, TranscriptSettling, TranscriptSource, TranscriptTurnMenu, TurnCommands, TurnCommandsOptions, TurnMenuActions, TurnMenuTarget, UserBashRow, UserBashRowProps, UserPromptAttachments, UserPromptAttachmentsProps, UserPromptRow, UserPromptRowProps, WorkerDetails, WorkerDetailsProps, attachmentSrcOf, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph, numberRef, parseRefUrl, parseReferenceUrl, parseToolMedia, refHref, referenceUrl, remarkReferences, remarkRefs, revealRow, savedPaths, siteIconValue, toolMediaSrcOf, turnViewsOf, useBackgroundMount, useBadgeMenu, useChipResolution, useCommand, useCommitInfo, useComposerSearch, useFillViewportScrollback, useForceMountRows, useForcedRows, useFullOutput, useFullToolCall, useHostTurnMenu, useModelName, useRailOutline, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useResolveChipNow, useRowIcons, useSelectStops, useSelectTurn, useSelectTurnKeys, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useTokenSession, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause };
@@ -1,10 +1,10 @@
1
- import { TranscriptActionsProvider, useModelName, useTranscriptActions } from "./actions.js";
1
+ import { TranscriptActionsProvider, attachmentSrcOf, toolMediaSrcOf, useModelName, useTranscriptActions } from "./actions.js";
2
2
  import { AnsiSpans, AnsiText } from "./AnsiText.js";
3
3
  import { AuthFailureCard } from "./AuthFailureCard.js";
4
4
  import { BadgeMenuProvider, useBadgeMenu } from "./BadgeMenu.js";
5
5
  import { BADGE_GLYPH, FileBadgeIcon, LinkBadge, LinkIcon, fileBadgeName, fileBadgeSpec, linkGlyph, siteIconValue } from "./badges.js";
6
6
  import { CardMarkdown } from "./CardMarkdown.js";
7
- import { useCommand, useCommitInfo, useReferencedSession, useSkill } from "./chip-details.js";
7
+ import { useCommand, useCommitInfo, useReferencedSession, useSkill, useTokenSession } from "./chip-details.js";
8
8
  import { useChipResolution, useResolveChipNow } from "./chip-resolve.js";
9
9
  import { CHIP_CARD_WIDTH, ChipCard, ChipHover } from "./ChipCard.js";
10
10
  import { CommandCard, CommitCard, SessionCard, SkillCard, SkillGroupCard } from "./ChipCards.js";
@@ -13,22 +13,22 @@ import { DiffLines } from "./DiffLines.js";
13
13
  import { AUTO_FILL_PAGES, FILL_MIN_PROMPTS, LoadEarlierRow, useFillViewportScrollback } from "./EarlierHistory.js";
14
14
  import { EditDiffBlock } from "./EditDiffBlock.js";
15
15
  import { EnvironmentSetupDetails, EnvironmentSetupRow } from "./environment-setup.js";
16
- import { useShellBlockScope } from "./shell-block-scope.js";
17
16
  import { InlineCode, RefChip } from "./FileChip.js";
17
+ import { useShellBlockScope } from "./shell-block-scope.js";
18
18
  import { ExchangeFoldRow, FoldHeader, LiveScriptsContext } from "./fold.js";
19
- import { parseToolMedia } from "../headless/transcript/tool-media.js";
20
19
  import { WorkerDetails } from "./fold-worker.js";
20
+ import { parseToolMedia } from "../headless/transcript/tool-media.js";
21
21
  import { Caret, Dot, FailedMark, GUTTER_STEP_PX, RowFrame, RowIconsContext, lineStateOf, useRowIcons } from "./frame.js";
22
22
  import { ImageGenerationBlock, drawsImageGeneration, imageRequestsOf, savedPaths } from "./ImageGenerationBlock.js";
23
23
  import { InlineChipText } from "./InlineChipText.js";
24
24
  import { InteractionToolBody, hasInteractionBody } from "./InteractionToolBody.js";
25
- import { CvRow, LazyRow, TranscriptSettling, holdForceMountRows, mountRowNow, useBackgroundMount, useForceMountRows } from "./LazyRow.js";
25
+ import { CvRow, LazyRow, TranscriptSettling, holdForceMountRows, useBackgroundMount, useForceMountRows, useForcedRows } from "./LazyRow.js";
26
26
  import { LiveOutput } from "./LiveOutput.js";
27
27
  import { Markdown, MarkdownDiagrams } from "./markdown.js";
28
28
  import { CommandScopeContext, INLINE_CODE_CLASS, MarkdownContext, OpenSessionContext } from "./markdown-context.js";
29
29
  import { MermaidDiagram } from "./MermaidDiagram.js";
30
- import { TranscriptRenderersProvider } from "./renderer-slots.js";
31
30
  import { MessageGroupRow } from "./messages.js";
31
+ import { TranscriptRenderersProvider } from "./renderer-slots.js";
32
32
  import { COMMAND_DETAIL_LINE, CommandDetailRow, CommandNoteRow, ErrorRow, FailureRow, InfoRow, NoticeRow, RepairedRow, SessionEventRow, SpawnEndRow, SpawnStartRow } from "./notices.js";
33
33
  import { AttachmentIcon, UserPromptAttachments, UserPromptRow } from "./prompt.js";
34
34
  import { PromptLines, copyPromptLines } from "./prompt-lines.js";
@@ -40,6 +40,7 @@ import { ReferenceChip, ReferenceText } from "./ReferenceText.js";
40
40
  import { parseReferenceUrl, referenceUrl, remarkReferences } from "./remark-references.js";
41
41
  import { classifyInlineRef, findRefs, numberRef, parseRefUrl, refHref, remarkRefs } from "./remark-refs.js";
42
42
  import { DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultMarkdown, DefaultPrompt, DefaultSessionTitle, defaultAttachmentLabel, useTranscriptRenderers } from "./renderers.js";
43
+ import { revealRow } from "./row-mount.js";
43
44
  import { CompactSummaryRow, RunReceiptInline, RunSummaryRow } from "./run-rows.js";
44
45
  import { SelectCursor } from "./SelectCursor.js";
45
46
  import { SelectTurnExit, SelectTurnHintKeys } from "./SelectTurnHint.js";
@@ -51,9 +52,9 @@ import { TaskBatchRow, TaskRow } from "./tasks.js";
51
52
  import { ToolBatchRow } from "./tool-batch.js";
52
53
  import { ToolDetails } from "./tool-details.js";
53
54
  import { ToolMedia, useToolMedia } from "./tool-media.js";
54
- import { CODE_PANEL, LoadFullOutputButton, ReadFileBlock, ToolGlyph, ToolInput, ToolTiming, useFullOutput } from "./tool-parts.js";
55
+ import { CODE_PANEL, LoadFullOutputButton, ReadFileBlock, ToolGlyph, ToolInput, ToolTiming, useFullOutput, useFullToolCall } from "./tool-parts.js";
55
56
  import { ModelVerdict, NestedToolCalls, ToolRow } from "./tool-row.js";
56
- import { TranscriptRail, TranscriptRailProvider, useTranscriptRailStore } from "./TranscriptRail.js";
57
+ import { TranscriptRail, TranscriptRailProvider, useRailOutline, useTranscriptRailStore } from "./TranscriptRail.js";
57
58
  import { TranscriptRow, TranscriptRowSlot, isHiddenRow } from "./TranscriptRow.js";
58
59
  import { TranscriptSearch } from "./TranscriptSearch.js";
59
60
  import { createTurnCommands, turnViewsOf, useTurnCommands } from "./turn-commands.js";
@@ -72,4 +73,4 @@ import { MAX_MATCHES, SearchHighlightStyle, useTranscriptSearch } from "./useTra
72
73
  import { useTranscriptSelectionCopy } from "./useTranscriptSelectionCopy.js";
73
74
  import { useWheelHoverPause } from "./useWheelHoverPause.js";
74
75
  import { MarkdownViews } from "./view-scope.js";
75
- export { AUTO_FILL_PAGES, AnsiSpans, AnsiText, AttachmentIcon, AuthFailureCard, BADGE_GLYPH, BadgeMenuProvider, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, Caret, ChipCard, ChipHover, CodemodeScript, CommandCard, CommandDetailRow, CommandNoteRow, CommandScopeContext, CommitCard, CompactSummaryRow, CvRow, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultMarkdown, DefaultPrompt, DefaultSessionTitle, DiffLines, Dot, EditDiffBlock, EnvironmentSetupDetails, EnvironmentSetupRow, ErrorRow, ExchangeFoldRow, FILL_MIN_PROMPTS, FailedMark, FailureRow, FileBadgeIcon, FoldHeader, GUTTER_STEP_PX, INLINE_CODE_CLASS, ImageGenerationBlock, InfoRow, InlineChipText, InlineCode, InteractionToolBody, LazyRow, LinkBadge, LinkIcon, LiveOutput, LiveScriptsContext, LoadEarlierRow, LoadFullOutputButton, MAX_MATCHES, Markdown, MarkdownContext, MarkdownDiagrams, MarkdownViews, MermaidDiagram, MessageGroupRow, ModelVerdict, NestedToolCalls, NoticeRow, OpenSessionContext, PromptEcho, PromptLines, ProseMarkdown, ReadFileBlock, RefChip, ReferenceChip, ReferenceText, RepairedRow, RowFrame, RowIconsContext, RunReceiptInline, RunSummaryRow, RunnableCodeBlock, SearchHighlightStyle, SelectCursor, SelectTurnExit, SelectTurnHintKeys, SelectTurnProvider, SessionCard, SessionEventRow, ShellBlockProvider, SkillCard, SkillGroupCard, SpawnEndRow, SpawnStartRow, SubagentBlock, TaskBatchRow, TaskRow, TextRow, ThinkingBatchRow, ThinkingRow, ToolBatchRow, ToolDetails, ToolGlyph, ToolInput, ToolMedia, ToolRow, ToolTiming, TranscriptActionsProvider, TranscriptRail, TranscriptRailProvider, TranscriptRenderersProvider, TranscriptRow, TranscriptRowSlot, TranscriptSearch, TranscriptSettling, UserBashRow, UserPromptAttachments, UserPromptRow, WorkerDetails, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph, mountRowNow, numberRef, parseRefUrl, parseReferenceUrl, parseToolMedia, refHref, referenceUrl, remarkReferences, remarkRefs, savedPaths, siteIconValue, turnViewsOf, useBackgroundMount, useBadgeMenu, useChipResolution, useCommand, useCommitInfo, useComposerSearch, useFillViewportScrollback, useForceMountRows, useFullOutput, useHostTurnMenu, useModelName, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useResolveChipNow, useRowIcons, useSelectStops, useSelectTurn, useSelectTurnKeys, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause };
76
+ export { AUTO_FILL_PAGES, AnsiSpans, AnsiText, AttachmentIcon, AuthFailureCard, BADGE_GLYPH, BadgeMenuProvider, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, Caret, ChipCard, ChipHover, CodemodeScript, CommandCard, CommandDetailRow, CommandNoteRow, CommandScopeContext, CommitCard, CompactSummaryRow, CvRow, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultMarkdown, DefaultPrompt, DefaultSessionTitle, DiffLines, Dot, EditDiffBlock, EnvironmentSetupDetails, EnvironmentSetupRow, ErrorRow, ExchangeFoldRow, FILL_MIN_PROMPTS, FailedMark, FailureRow, FileBadgeIcon, FoldHeader, GUTTER_STEP_PX, INLINE_CODE_CLASS, ImageGenerationBlock, InfoRow, InlineChipText, InlineCode, InteractionToolBody, LazyRow, LinkBadge, LinkIcon, LiveOutput, LiveScriptsContext, LoadEarlierRow, LoadFullOutputButton, MAX_MATCHES, Markdown, MarkdownContext, MarkdownDiagrams, MarkdownViews, MermaidDiagram, MessageGroupRow, ModelVerdict, NestedToolCalls, NoticeRow, OpenSessionContext, PromptEcho, PromptLines, ProseMarkdown, ReadFileBlock, RefChip, ReferenceChip, ReferenceText, RepairedRow, RowFrame, RowIconsContext, RunReceiptInline, RunSummaryRow, RunnableCodeBlock, SearchHighlightStyle, SelectCursor, SelectTurnExit, SelectTurnHintKeys, SelectTurnProvider, SessionCard, SessionEventRow, ShellBlockProvider, SkillCard, SkillGroupCard, SpawnEndRow, SpawnStartRow, SubagentBlock, TaskBatchRow, TaskRow, TextRow, ThinkingBatchRow, ThinkingRow, ToolBatchRow, ToolDetails, ToolGlyph, ToolInput, ToolMedia, ToolRow, ToolTiming, TranscriptActionsProvider, TranscriptRail, TranscriptRailProvider, TranscriptRenderersProvider, TranscriptRow, TranscriptRowSlot, TranscriptSearch, TranscriptSettling, UserBashRow, UserPromptAttachments, UserPromptRow, WorkerDetails, attachmentSrcOf, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph, numberRef, parseRefUrl, parseReferenceUrl, parseToolMedia, refHref, referenceUrl, remarkReferences, remarkRefs, revealRow, savedPaths, siteIconValue, toolMediaSrcOf, turnViewsOf, useBackgroundMount, useBadgeMenu, useChipResolution, useCommand, useCommitInfo, useComposerSearch, useFillViewportScrollback, useForceMountRows, useForcedRows, useFullOutput, useFullToolCall, useHostTurnMenu, useModelName, useRailOutline, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useResolveChipNow, useRowIcons, useSelectStops, useSelectTurn, useSelectTurnKeys, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useTokenSession, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause };
@@ -23,7 +23,16 @@ export interface MarkdownParseKey {
23
23
  urlTransform: object | undefined;
24
24
  }
25
25
  /**
26
- * The parse of `text`, from the cache when it holds one.
26
+ * The parse of a text that still changes (a streaming reply's open tail): parsed every time, never cached,
27
+ * but held among the last few, so the same text settling ({@link cachedMarkdown}) parses nothing.
28
+ *
29
+ * @param text - The markdown.
30
+ * @param key - What else the parse depends on.
31
+ * @param parse - Builds the elements.
32
+ */
33
+ export declare function liveMarkdown(text: string, key: MarkdownParseKey, parse: () => ReactElement): ReactElement;
34
+ /**
35
+ * The parse of `text`, from the cache when it holds one, or the live parse it settled from.
27
36
  *
28
37
  * @param text - The markdown.
29
38
  * @param key - What else the parse depends on.
@@ -31,4 +40,10 @@ export interface MarkdownParseKey {
31
40
  */
32
41
  export declare function cachedMarkdown(text: string, key: MarkdownParseKey, parse: () => ReactElement): ReactElement;
33
42
  /** Empties the cache (tests). */
34
- export declare function clearMarkdownCache(): void;
43
+ export declare function clearMarkdownCache(): void;
44
+ /** What the cache holds, and how many parses it took in since it was last emptied (tests, benches). */
45
+ export declare function markdownCacheStats(): {
46
+ entries: number;
47
+ chars: number;
48
+ inserts: number;
49
+ };
@@ -1,8 +1,13 @@
1
1
  // src/chat/transcript/markdown-cache.ts
2
2
  /** Text held, in characters, before the least recently used parse goes. */
3
3
  const MAX_CHARS = 4e5;
4
+ /** Live parses held (`liveMarkdown`): one per reply streaming at once. */
5
+ const LIVE_HELD = 8;
4
6
  const entries = /* @__PURE__ */ new Map();
7
+ /** The last live parses, oldest first: a tail that settles as it last streamed enters the cache with its parse. */
8
+ const live = /* @__PURE__ */ new Map();
5
9
  let chars = 0;
10
+ let inserts = 0;
6
11
  const ids = /* @__PURE__ */ new WeakMap();
7
12
  let nextId = 1;
8
13
  function idOf(value) {
@@ -17,8 +22,34 @@ function hash(text) {
17
22
  for (let i = 0; i < text.length; i++) h = Math.imul(h ^ text.charCodeAt(i), 16777619);
18
23
  return h >>> 0;
19
24
  }
25
+ function idFor(text, key) {
26
+ return `${key.document ? "d" : "r"}${idOf(key.plugins)}.${idOf(key.urlTransform)}:${text.length}:${hash(text)}`;
27
+ }
20
28
  /**
21
- * The parse of `text`, from the cache when it holds one.
29
+ * The parse of a text that still changes (a streaming reply's open tail): parsed every time, never cached,
30
+ * but held among the last few, so the same text settling ({@link cachedMarkdown}) parses nothing.
31
+ *
32
+ * @param text - The markdown.
33
+ * @param key - What else the parse depends on.
34
+ * @param parse - Builds the elements.
35
+ */
36
+ function liveMarkdown(text, key, parse) {
37
+ const element = parse();
38
+ if (text.length > MAX_CHARS) return element;
39
+ const id = idFor(text, key);
40
+ live.delete(id);
41
+ live.set(id, {
42
+ element,
43
+ text
44
+ });
45
+ for (const oldest of live.keys()) {
46
+ if (live.size <= LIVE_HELD) break;
47
+ live.delete(oldest);
48
+ }
49
+ return element;
50
+ }
51
+ /**
52
+ * The parse of `text`, from the cache when it holds one, or the live parse it settled from.
22
53
  *
23
54
  * @param text - The markdown.
24
55
  * @param key - What else the parse depends on.
@@ -26,7 +57,7 @@ function hash(text) {
26
57
  */
27
58
  function cachedMarkdown(text, key, parse) {
28
59
  if (text.length > MAX_CHARS) return parse();
29
- const id = `${key.document ? "d" : "r"}${idOf(key.plugins)}.${idOf(key.urlTransform)}:${text.length}:${hash(text)}`;
60
+ const id = idFor(text, key);
30
61
  const hit = entries.get(id);
31
62
  if (hit) {
32
63
  entries.delete(id);
@@ -36,7 +67,10 @@ function cachedMarkdown(text, key, parse) {
36
67
  }
37
68
  chars -= hit.text.length;
38
69
  }
39
- const element = parse();
70
+ const settled = live.get(id);
71
+ live.delete(id);
72
+ const element = settled?.text === text ? settled.element : parse();
73
+ inserts++;
40
74
  entries.set(id, {
41
75
  element,
42
76
  text
@@ -52,6 +86,16 @@ function cachedMarkdown(text, key, parse) {
52
86
  /** Empties the cache (tests). */
53
87
  function clearMarkdownCache() {
54
88
  entries.clear();
89
+ live.clear();
55
90
  chars = 0;
91
+ inserts = 0;
92
+ }
93
+ /** What the cache holds, and how many parses it took in since it was last emptied (tests, benches). */
94
+ function markdownCacheStats() {
95
+ return {
96
+ entries: entries.size,
97
+ chars,
98
+ inserts
99
+ };
56
100
  }
57
- export { cachedMarkdown, clearMarkdownCache };
101
+ export { cachedMarkdown, clearMarkdownCache, liveMarkdown, markdownCacheStats };