@sixb/app 0.2.3 → 0.2.5

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 (329) hide show
  1. package/assets/connector-icons/README.md +1 -0
  2. package/assets/connector-icons/ctm.png +0 -0
  3. package/dist/agent/activity-label.d.ts.map +1 -1
  4. package/dist/agent/agent-chat.d.ts +3 -1
  5. package/dist/agent/agent-chat.d.ts.map +1 -1
  6. package/dist/agent/agent-panel.d.ts.map +1 -1
  7. package/dist/agent/artifact-panel.d.ts +3 -1
  8. package/dist/agent/artifact-panel.d.ts.map +1 -1
  9. package/dist/agent/background/background-tool-row.d.ts.map +1 -1
  10. package/dist/agent/background/interpret.d.ts +1 -1
  11. package/dist/agent/background/interpret.d.ts.map +1 -1
  12. package/dist/agent/components/composer-settings.d.ts +1 -1
  13. package/dist/agent/components/composer-settings.d.ts.map +1 -1
  14. package/dist/agent/components/composer.d.ts +22 -5
  15. package/dist/agent/components/composer.d.ts.map +1 -1
  16. package/dist/agent/components/context-meter.d.ts +1 -1
  17. package/dist/agent/components/context-meter.d.ts.map +1 -1
  18. package/dist/agent/components/conversation-panel.d.ts +8 -2
  19. package/dist/agent/components/conversation-panel.d.ts.map +1 -1
  20. package/dist/agent/components/message-parts.d.ts +2 -1
  21. package/dist/agent/components/message-parts.d.ts.map +1 -1
  22. package/dist/agent/components/message-view.d.ts.map +1 -1
  23. package/dist/agent/components/pending-messages.d.ts +20 -0
  24. package/dist/agent/components/pending-messages.d.ts.map +1 -0
  25. package/dist/agent/components/sandbox-recovery.d.ts +11 -2
  26. package/dist/agent/components/sandbox-recovery.d.ts.map +1 -1
  27. package/dist/agent/components/threads-button.d.ts +1 -1
  28. package/dist/agent/components/threads-button.d.ts.map +1 -1
  29. package/dist/agent/components/transcript.d.ts +5 -0
  30. package/dist/agent/components/transcript.d.ts.map +1 -1
  31. package/dist/agent/conversation.d.ts +3 -6
  32. package/dist/agent/conversation.d.ts.map +1 -1
  33. package/dist/agent/delegation/agent-exchange.d.ts +16 -0
  34. package/dist/agent/delegation/agent-exchange.d.ts.map +1 -0
  35. package/dist/agent/delegation/child-card.d.ts +3 -3
  36. package/dist/agent/delegation/child-card.d.ts.map +1 -1
  37. package/dist/agent/delegation/child-parts.d.ts +1 -10
  38. package/dist/agent/delegation/child-parts.d.ts.map +1 -1
  39. package/dist/agent/delegation/child-work.d.ts.map +1 -1
  40. package/dist/agent/delegation/interpret.d.ts +9 -10
  41. package/dist/agent/delegation/interpret.d.ts.map +1 -1
  42. package/dist/agent/delegation/use-children.d.ts.map +1 -1
  43. package/dist/agent/file-edits/file-edit-tool-view.d.ts +10 -0
  44. package/dist/agent/file-edits/file-edit-tool-view.d.ts.map +1 -0
  45. package/dist/agent/file-edits/interpret.d.ts +25 -0
  46. package/dist/agent/file-edits/interpret.d.ts.map +1 -0
  47. package/dist/agent/hooks/use-agent-conversation.d.ts +16 -4
  48. package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
  49. package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
  50. package/dist/agent/hooks/use-thread-stream.d.ts.map +1 -1
  51. package/dist/agent/i18n/en.d.ts +114 -5
  52. package/dist/agent/i18n/en.d.ts.map +1 -1
  53. package/dist/agent/i18n/fr.d.ts.map +1 -1
  54. package/dist/agent/i18n/index.d.ts +190 -8
  55. package/dist/agent/i18n/index.d.ts.map +1 -1
  56. package/dist/agent/inbox-handoff.d.ts +10 -0
  57. package/dist/agent/inbox-handoff.d.ts.map +1 -0
  58. package/dist/agent/live-run.d.ts +8 -1
  59. package/dist/agent/live-run.d.ts.map +1 -1
  60. package/dist/agent/message-agent/interpret.d.ts +2 -2
  61. package/dist/agent/message-agent/interpret.d.ts.map +1 -1
  62. package/dist/agent/publish-artifact/interpret.d.ts +1 -1
  63. package/dist/agent/publish-artifact/interpret.d.ts.map +1 -1
  64. package/dist/agent/questions/interpret.d.ts +31 -0
  65. package/dist/agent/questions/interpret.d.ts.map +1 -0
  66. package/dist/agent/questions/question-card.d.ts +16 -0
  67. package/dist/agent/questions/question-card.d.ts.map +1 -0
  68. package/dist/agent/questions/question-composer.d.ts +15 -0
  69. package/dist/agent/questions/question-composer.d.ts.map +1 -0
  70. package/dist/agent/read/interpret.d.ts +8 -1
  71. package/dist/agent/read/interpret.d.ts.map +1 -1
  72. package/dist/agent/read/read-tool-view.d.ts.map +1 -1
  73. package/dist/agent/search/interpret.d.ts +101 -0
  74. package/dist/agent/search/interpret.d.ts.map +1 -0
  75. package/dist/agent/search/search-tool-view.d.ts +10 -0
  76. package/dist/agent/search/search-tool-view.d.ts.map +1 -0
  77. package/dist/agent/thread-state.d.ts +26 -0
  78. package/dist/agent/thread-state.d.ts.map +1 -0
  79. package/dist/agent/tool-views/built-in.d.ts.map +1 -1
  80. package/dist/agent/tool-views/registry.d.ts +5 -6
  81. package/dist/agent/tool-views/registry.d.ts.map +1 -1
  82. package/dist/agent/types.d.ts +5 -1
  83. package/dist/agent/types.d.ts.map +1 -1
  84. package/dist/agent/view-file/view-file-tool-view.d.ts +2 -1
  85. package/dist/agent/view-file/view-file-tool-view.d.ts.map +1 -1
  86. package/dist/agent/waits.d.ts +14 -0
  87. package/dist/agent/waits.d.ts.map +1 -0
  88. package/dist/artifacts/card-preview.d.ts.map +1 -1
  89. package/dist/artifacts/edit-session.d.ts +11 -1
  90. package/dist/artifacts/edit-session.d.ts.map +1 -1
  91. package/dist/artifacts/editor/block-handle.d.ts +20 -0
  92. package/dist/artifacts/editor/block-handle.d.ts.map +1 -0
  93. package/dist/artifacts/editor/blocks.d.ts +34 -0
  94. package/dist/artifacts/editor/blocks.d.ts.map +1 -0
  95. package/dist/artifacts/editor/callout-view.d.ts +7 -0
  96. package/dist/artifacts/editor/callout-view.d.ts.map +1 -0
  97. package/dist/artifacts/editor/document-editor.d.ts +30 -0
  98. package/dist/artifacts/editor/document-editor.d.ts.map +1 -0
  99. package/dist/artifacts/editor/figure-view.d.ts +12 -0
  100. package/dist/artifacts/editor/figure-view.d.ts.map +1 -0
  101. package/dist/artifacts/editor/find-blocks.d.ts +6 -0
  102. package/dist/artifacts/editor/find-blocks.d.ts.map +1 -0
  103. package/dist/artifacts/editor/markdown-document.d.ts +12 -0
  104. package/dist/artifacts/editor/markdown-document.d.ts.map +1 -0
  105. package/dist/artifacts/editor/messages.d.ts +4 -0
  106. package/dist/artifacts/editor/messages.d.ts.map +1 -0
  107. package/dist/artifacts/editor/schema.d.ts +21 -0
  108. package/dist/artifacts/editor/schema.d.ts.map +1 -0
  109. package/dist/artifacts/editor/selection-toolbar.d.ts +35 -0
  110. package/dist/artifacts/editor/selection-toolbar.d.ts.map +1 -0
  111. package/dist/artifacts/editor/slash-menu.d.ts +43 -0
  112. package/dist/artifacts/editor/slash-menu.d.ts.map +1 -0
  113. package/dist/artifacts/editor/upload.d.ts +12 -0
  114. package/dist/artifacts/editor/upload.d.ts.map +1 -0
  115. package/dist/artifacts/file-source.d.ts +5 -0
  116. package/dist/artifacts/file-source.d.ts.map +1 -1
  117. package/dist/artifacts/frame-editor/bundle.d.ts +7 -0
  118. package/dist/artifacts/frame-editor/bundle.d.ts.map +1 -0
  119. package/dist/artifacts/frame-editor/commands.d.ts +93 -0
  120. package/dist/artifacts/frame-editor/commands.d.ts.map +1 -0
  121. package/dist/artifacts/frame-editor/entry.d.ts +2 -0
  122. package/dist/artifacts/frame-editor/entry.d.ts.map +1 -0
  123. package/dist/artifacts/frame-editor/frame.d.ts +5 -0
  124. package/dist/artifacts/frame-editor/frame.d.ts.map +1 -0
  125. package/dist/artifacts/frame-editor/keys.d.ts +8 -0
  126. package/dist/artifacts/frame-editor/keys.d.ts.map +1 -0
  127. package/dist/artifacts/frame-editor/protocol.d.ts +186 -0
  128. package/dist/artifacts/frame-editor/protocol.d.ts.map +1 -0
  129. package/dist/artifacts/frame-editor/schema.d.ts +34 -0
  130. package/dist/artifacts/frame-editor/schema.d.ts.map +1 -0
  131. package/dist/artifacts/frame-editor/style.d.ts +2 -0
  132. package/dist/artifacts/frame-editor/style.d.ts.map +1 -0
  133. package/dist/artifacts/frame.d.ts +2 -2
  134. package/dist/artifacts/frame.d.ts.map +1 -1
  135. package/dist/artifacts/live/boards.d.ts +2 -0
  136. package/dist/artifacts/live/boards.d.ts.map +1 -1
  137. package/dist/artifacts/live/document.d.ts +32 -0
  138. package/dist/artifacts/live/document.d.ts.map +1 -0
  139. package/dist/artifacts/live/header.d.ts +4 -4
  140. package/dist/artifacts/live/header.d.ts.map +1 -1
  141. package/dist/artifacts/live/presence.d.ts.map +1 -1
  142. package/dist/artifacts/live/session.d.ts +2 -0
  143. package/dist/artifacts/live/session.d.ts.map +1 -1
  144. package/dist/artifacts/live/view.d.ts +4 -3
  145. package/dist/artifacts/live/view.d.ts.map +1 -1
  146. package/dist/artifacts/messages.d.ts +278 -2
  147. package/dist/artifacts/messages.d.ts.map +1 -1
  148. package/dist/artifacts/pdf.d.ts +8 -0
  149. package/dist/artifacts/pdf.d.ts.map +1 -0
  150. package/dist/artifacts/queries.d.ts +80 -0
  151. package/dist/artifacts/queries.d.ts.map +1 -1
  152. package/dist/artifacts/references/references.d.ts +3 -3
  153. package/dist/artifacts/references/references.d.ts.map +1 -1
  154. package/dist/artifacts/renderers/canvas/board-editor.d.ts +11 -4
  155. package/dist/artifacts/renderers/canvas/board-editor.d.ts.map +1 -1
  156. package/dist/artifacts/renderers/canvas/board.d.ts +14 -2
  157. package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -1
  158. package/dist/artifacts/renderers/canvas/canvas.d.ts +4 -3
  159. package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -1
  160. package/dist/artifacts/renderers/canvas/comment-pins.d.ts +4 -2
  161. package/dist/artifacts/renderers/canvas/comment-pins.d.ts.map +1 -1
  162. package/dist/artifacts/renderers/canvas/comments-panel.d.ts.map +1 -1
  163. package/dist/artifacts/renderers/canvas/comments.d.ts +2 -1
  164. package/dist/artifacts/renderers/canvas/comments.d.ts.map +1 -1
  165. package/dist/artifacts/renderers/canvas/controls.d.ts +15 -4
  166. package/dist/artifacts/renderers/canvas/controls.d.ts.map +1 -1
  167. package/dist/artifacts/renderers/canvas/focus.d.ts +19 -5
  168. package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -1
  169. package/dist/artifacts/renderers/canvas/gestures.d.ts +46 -0
  170. package/dist/artifacts/renderers/canvas/gestures.d.ts.map +1 -0
  171. package/dist/artifacts/renderers/canvas/page-resize.d.ts +21 -0
  172. package/dist/artifacts/renderers/canvas/page-resize.d.ts.map +1 -0
  173. package/dist/artifacts/renderers/canvas/page-size-controls.d.ts +21 -0
  174. package/dist/artifacts/renderers/canvas/page-size-controls.d.ts.map +1 -0
  175. package/dist/artifacts/renderers/canvas/page-size.d.ts +93 -0
  176. package/dist/artifacts/renderers/canvas/page-size.d.ts.map +1 -0
  177. package/dist/artifacts/renderers/canvas/page-zoom.d.ts +64 -0
  178. package/dist/artifacts/renderers/canvas/page-zoom.d.ts.map +1 -0
  179. package/dist/artifacts/renderers/canvas/shown-size.d.ts +26 -0
  180. package/dist/artifacts/renderers/canvas/shown-size.d.ts.map +1 -0
  181. package/dist/artifacts/renderers/designed-document.d.ts +28 -0
  182. package/dist/artifacts/renderers/designed-document.d.ts.map +1 -0
  183. package/dist/artifacts/renderers/document-tree.d.ts +2 -0
  184. package/dist/artifacts/renderers/document-tree.d.ts.map +1 -1
  185. package/dist/artifacts/renderers/document.d.ts +9 -1
  186. package/dist/artifacts/renderers/document.d.ts.map +1 -1
  187. package/dist/artifacts/renderers/live-frame.d.ts +145 -0
  188. package/dist/artifacts/renderers/live-frame.d.ts.map +1 -0
  189. package/dist/artifacts/renderers/page-editor.d.ts +16 -0
  190. package/dist/artifacts/renderers/page-editor.d.ts.map +1 -0
  191. package/dist/artifacts/renderers/page.d.ts +10 -1
  192. package/dist/artifacts/renderers/page.d.ts.map +1 -1
  193. package/dist/artifacts/viewer.d.ts.map +1 -1
  194. package/dist/{chunk-001c4gnk.js → chunk-4fex83k2.js} +19965 -13027
  195. package/dist/chunk-4fex83k2.js.map +239 -0
  196. package/dist/{chunk-5crvhjp2.js → chunk-4wm09prf.js} +1633 -1999
  197. package/dist/chunk-4wm09prf.js.map +27 -0
  198. package/dist/{chunk-fwb9mxwm.js → chunk-5sgac68y.js} +1 -1
  199. package/dist/{chunk-kes4ygmz.js → chunk-69qgh20f.js} +1 -1
  200. package/dist/chunk-y51c4tsz.js +11 -0
  201. package/dist/chunk-y51c4tsz.js.map +10 -0
  202. package/dist/index.d.ts +4 -1
  203. package/dist/index.d.ts.map +1 -1
  204. package/dist/index.js +13 -6
  205. package/dist/index.js.map +5 -5
  206. package/dist/pages/console/data/messages.d.ts +6 -0
  207. package/dist/pages/console/data/messages.d.ts.map +1 -1
  208. package/dist/pages/console/data/shared.d.ts.map +1 -1
  209. package/dist/pages.js +12 -5
  210. package/dist/pages.js.map +6 -6
  211. package/dist/shell/search-command.d.ts.map +1 -1
  212. package/package.json +22 -5
  213. package/src/agent/activity-label.ts +9 -1
  214. package/src/agent/agent-chat.tsx +57 -37
  215. package/src/agent/agent-execution-trace.tsx +2 -2
  216. package/src/agent/agent-panel.tsx +6 -4
  217. package/src/agent/agent.css +254 -0
  218. package/src/agent/artifact-panel.tsx +77 -22
  219. package/src/agent/background/background-tool-row.tsx +24 -10
  220. package/src/agent/background/interpret.ts +60 -51
  221. package/src/agent/components/composer-settings.tsx +20 -10
  222. package/src/agent/components/composer.tsx +342 -104
  223. package/src/agent/components/context-meter.tsx +7 -3
  224. package/src/agent/components/conversation-panel.tsx +96 -37
  225. package/src/agent/components/message-parts.tsx +390 -64
  226. package/src/agent/components/message-view.tsx +12 -2
  227. package/src/agent/components/pending-messages.tsx +338 -0
  228. package/src/agent/components/sandbox-recovery.tsx +36 -17
  229. package/src/agent/components/threads-button.tsx +3 -2
  230. package/src/agent/components/transcript.tsx +92 -45
  231. package/src/agent/conversation.ts +203 -54
  232. package/src/agent/delegation/agent-exchange.tsx +53 -0
  233. package/src/agent/delegation/child-card.tsx +6 -40
  234. package/src/agent/delegation/child-parts.tsx +1 -84
  235. package/src/agent/delegation/child-work.tsx +19 -5
  236. package/src/agent/delegation/interpret.ts +64 -61
  237. package/src/agent/delegation/model.ts +1 -1
  238. package/src/agent/file-edits/file-edit-tool-view.tsx +126 -0
  239. package/src/agent/file-edits/interpret.ts +120 -0
  240. package/src/agent/hooks/use-agent-conversation.ts +360 -92
  241. package/src/agent/hooks/use-thread-stream.ts +10 -0
  242. package/src/agent/i18n/en.ts +134 -16
  243. package/src/agent/i18n/fr.ts +122 -16
  244. package/src/agent/inbox-handoff.ts +47 -0
  245. package/src/agent/live-run.ts +23 -2
  246. package/src/agent/message-agent/interpret.ts +4 -3
  247. package/src/agent/publish-artifact/interpret.ts +14 -5
  248. package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +2 -2
  249. package/src/agent/questions/interpret.ts +90 -0
  250. package/src/agent/questions/question-card.tsx +57 -0
  251. package/src/agent/questions/question-composer.tsx +257 -0
  252. package/src/agent/react-router.tsx +2 -2
  253. package/src/agent/read/interpret.ts +34 -1
  254. package/src/agent/read/read-tool-view.tsx +20 -4
  255. package/src/agent/search/interpret.ts +367 -0
  256. package/src/agent/search/search-tool-view.tsx +235 -0
  257. package/src/agent/thread-state.ts +114 -0
  258. package/src/agent/tool-views/built-in.tsx +33 -6
  259. package/src/agent/tool-views/registry.tsx +28 -2
  260. package/src/agent/types.ts +7 -0
  261. package/src/agent/view-file/view-file-tool-view.tsx +33 -19
  262. package/src/agent/waits.ts +50 -0
  263. package/src/artifacts/artifacts.css +434 -0
  264. package/src/artifacts/card-preview.tsx +6 -1
  265. package/src/artifacts/edit-session.tsx +15 -1
  266. package/src/artifacts/editor/block-handle.tsx +278 -0
  267. package/src/artifacts/editor/blocks.ts +216 -0
  268. package/src/artifacts/editor/callout-view.tsx +31 -0
  269. package/src/artifacts/editor/document-editor.tsx +484 -0
  270. package/src/artifacts/editor/figure-view.tsx +66 -0
  271. package/src/artifacts/editor/find-blocks.ts +19 -0
  272. package/src/artifacts/editor/markdown-document.tsx +72 -0
  273. package/src/artifacts/editor/messages.ts +4 -0
  274. package/src/artifacts/editor/schema.ts +159 -0
  275. package/src/artifacts/editor/selection-toolbar.tsx +364 -0
  276. package/src/artifacts/editor/slash-menu.tsx +251 -0
  277. package/src/artifacts/editor/upload.ts +40 -0
  278. package/src/artifacts/file-source.ts +11 -0
  279. package/src/artifacts/frame-editor/bundle.ts +8 -0
  280. package/src/artifacts/frame-editor/commands.ts +565 -0
  281. package/src/artifacts/frame-editor/entry.ts +6 -0
  282. package/src/artifacts/frame-editor/frame.ts +847 -0
  283. package/src/artifacts/frame-editor/generated/editor.txt +149 -0
  284. package/src/artifacts/frame-editor/generated.d.ts +5 -0
  285. package/src/artifacts/frame-editor/keys.ts +323 -0
  286. package/src/artifacts/frame-editor/protocol.ts +151 -0
  287. package/src/artifacts/frame-editor/schema.ts +293 -0
  288. package/src/artifacts/frame-editor/style.ts +58 -0
  289. package/src/artifacts/frame.tsx +14 -5
  290. package/src/artifacts/live/boards.ts +46 -3
  291. package/src/artifacts/live/document.ts +89 -0
  292. package/src/artifacts/live/header.tsx +9 -14
  293. package/src/artifacts/live/presence.ts +5 -1
  294. package/src/artifacts/live/session.ts +4 -2
  295. package/src/artifacts/live/view.ts +14 -8
  296. package/src/artifacts/messages.ts +192 -2
  297. package/src/artifacts/pdf.ts +50 -0
  298. package/src/artifacts/references/references.tsx +46 -11
  299. package/src/artifacts/renderers/canvas/board-editor.tsx +44 -155
  300. package/src/artifacts/renderers/canvas/board.tsx +70 -8
  301. package/src/artifacts/renderers/canvas/canvas.tsx +66 -15
  302. package/src/artifacts/renderers/canvas/comment-pins.tsx +5 -0
  303. package/src/artifacts/renderers/canvas/comments-panel.tsx +58 -1
  304. package/src/artifacts/renderers/canvas/comments.ts +8 -4
  305. package/src/artifacts/renderers/canvas/controls.tsx +64 -30
  306. package/src/artifacts/renderers/canvas/focus.tsx +200 -56
  307. package/src/artifacts/renderers/canvas/gestures.ts +265 -0
  308. package/src/artifacts/renderers/canvas/page-resize.tsx +542 -0
  309. package/src/artifacts/renderers/canvas/page-size-controls.tsx +193 -0
  310. package/src/artifacts/renderers/canvas/page-size.ts +218 -0
  311. package/src/artifacts/renderers/canvas/page-zoom.ts +280 -0
  312. package/src/artifacts/renderers/canvas/shown-size.ts +105 -0
  313. package/src/artifacts/renderers/designed-document.tsx +277 -0
  314. package/src/artifacts/renderers/document-tree.ts +9 -0
  315. package/src/artifacts/renderers/document.tsx +13 -102
  316. package/src/artifacts/renderers/live-frame.ts +163 -0
  317. package/src/artifacts/renderers/page-editor.tsx +613 -0
  318. package/src/artifacts/renderers/page.tsx +21 -4
  319. package/src/artifacts/viewer.tsx +101 -41
  320. package/src/index.ts +8 -0
  321. package/src/pages/console/data/messages.ts +6 -0
  322. package/src/pages/console/data/projections.tsx +4 -0
  323. package/src/pages/console/data/shared.tsx +1 -0
  324. package/src/pages/console/ontology/lineage/trail.tsx +3 -0
  325. package/src/shell/search-command.tsx +2 -0
  326. package/dist/chunk-001c4gnk.js.map +0 -204
  327. package/dist/chunk-5crvhjp2.js.map +0 -28
  328. /package/dist/{chunk-fwb9mxwm.js.map → chunk-5sgac68y.js.map} +0 -0
  329. /package/dist/{chunk-kes4ygmz.js.map → chunk-69qgh20f.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { type FileSource, messageFileSource } from "../artifacts/file-source"
2
2
  import { isApprovalOutcomeMessage } from "./approvals"
3
- import type { LiveRunState } from "./live-run"
3
+ import type { LiveInboxRead, LiveRunState } from "./live-run"
4
4
  import { knownName, type MessageAuthor, principalKey } from "./message-authors"
5
5
  import {
6
6
  type NormalizedFile,
@@ -80,8 +80,9 @@ export interface AgentConversationMessage {
80
80
  readonly id: string | null
81
81
  readonly role: "user" | "assistant"
82
82
  /**
83
- * `pending`: sent, not saved yet. `streaming`: a reply that still comes from its run, until its
84
- * saved copy replaces it. `complete`: everything else.
83
+ * `pending`: sent, not saved yet. `streaming`: from the run's live stream until its saved copy
84
+ * replaces it: the reply, and a message the run read while answering, where it read it.
85
+ * `complete`: everything else.
85
86
  */
86
87
  readonly status: "pending" | "streaming" | "complete"
87
88
  /** The run that wrote a reply. */
@@ -153,26 +154,48 @@ export function conversationMessages(input: ConversationMessagesInput): AgentCon
153
154
  for (const run of input.runs ?? []) {
154
155
  if (run.status === "failed" || run.status === "cancelled") ended.set(run.id, run.status)
155
156
  }
157
+ // A turn that read messages as it answered holds a reply on each side of them: only its last one
158
+ // says how the turn ended, as its live copy did.
159
+ const lastReplyOfRun = new Map<string, string>()
160
+ for (const message of input.messages) {
161
+ if (message.role === "assistant" && message.runId !== null) {
162
+ lastReplyOfRun.set(message.runId, message.id)
163
+ }
164
+ }
156
165
 
166
+ let lastUserMessageId: string | null = null
157
167
  for (const message of input.messages) {
158
168
  if (message.role === "system") continue
159
169
 
160
170
  savedIds.add(message.id)
161
171
  if (message.role === "assistant" && message.runId !== null) answeredRuns.add(message.runId)
172
+ if (message.role === "user") lastUserMessageId = message.id
162
173
 
163
174
  // Continue writes the model a message the reader never wrote: nothing to draw. Neither is the
164
175
  // one a decision resumes a turn with: its calls' cards say how they ended, and the resumed
165
176
  // answer stays right under the one it continues.
166
177
  if (isContinuation(message) || isApprovalOutcomeMessage(message)) continue
167
178
 
168
- // One reply per run: a second one, which nothing writes today, keeps a key of its own.
179
+ // A run's reply after a message it read keeps the key its live copy had (see liveMessages).
169
180
  const preferred = savedKey(message, input.sentKeys)
170
- const key = keys.has(preferred) ? `message:${message.id}` : preferred
181
+ const after =
182
+ message.role === "assistant" && lastUserMessageId !== null
183
+ ? `${preferred}:after:${lastUserMessageId}`
184
+ : null
185
+ const key = !keys.has(preferred)
186
+ ? preferred
187
+ : after !== null && !keys.has(after)
188
+ ? after
189
+ : `message:${message.id}`
171
190
  keys.add(key)
172
191
 
173
192
  const saved = savedMessage(message, key, authorOf(message.authorPrincipal, input), input)
174
193
  const unfinished =
175
- message.role === "assistant" && message.runId !== null ? ended.get(message.runId) : undefined
194
+ message.role === "assistant" &&
195
+ message.runId !== null &&
196
+ lastReplyOfRun.get(message.runId) === message.id
197
+ ? ended.get(message.runId)
198
+ : undefined
176
199
  result.push(unfinished ? unfinishedMessage(saved, unfinished) : saved)
177
200
  }
178
201
 
@@ -181,8 +204,7 @@ export function conversationMessages(input: ConversationMessagesInput): AgentCon
181
204
  result.push(pendingMessage(pending, input))
182
205
  }
183
206
 
184
- const live = liveReply(input, savedIds, answeredRuns)
185
- if (live) result.push(live)
207
+ result.push(...liveMessages(input, savedIds, answeredRuns))
186
208
 
187
209
  return result
188
210
  }
@@ -239,7 +261,7 @@ interface SavedEntry {
239
261
  readonly message: AgentConversationMessage
240
262
  }
241
263
 
242
- const savedEntries = new WeakMap<AgentMessage, SavedEntry>()
264
+ const savedEntries = new WeakMap<AgentMessage, readonly SavedEntry[]>()
243
265
 
244
266
  function savedMessage(
245
267
  message: AgentMessage,
@@ -248,15 +270,11 @@ function savedMessage(
248
270
  input: ConversationMessagesInput
249
271
  ): AgentConversationMessage {
250
272
  const observed = Boolean(input.observed)
251
- const cached = savedEntries.get(message)
252
- if (
253
- cached &&
254
- cached.key === key &&
255
- cached.observed === observed &&
256
- sameAuthor(cached.author, author)
257
- ) {
258
- return cached.message
259
- }
273
+ const existing = savedEntries.get(message)
274
+ const hit = existing?.find(
275
+ (entry) => entry.key === key && entry.observed === observed && sameAuthor(entry.author, author)
276
+ )
277
+ if (hit) return hit.message
260
278
 
261
279
  const fileSource = (fileRef: AgentFileRef, path: string) =>
262
280
  messageFileSource({
@@ -284,7 +302,8 @@ function savedMessage(
284
302
  ...(message.compaction ? { compaction: message.compaction } : {}),
285
303
  }
286
304
 
287
- savedEntries.set(message, { key, author, observed, message: converted })
305
+ const nextEntry: SavedEntry = { key, author, observed, message: converted }
306
+ savedEntries.set(message, existing ? [nextEntry, ...existing.slice(0, 1)] : [nextEntry])
288
307
  return converted
289
308
  }
290
309
 
@@ -418,76 +437,186 @@ function pendingMessage(
418
437
  }
419
438
  }
420
439
 
421
- /** The reply streaming in, until its saved copy is in the conversation. */
422
- function liveReply(
440
+ /**
441
+ * The reply streaming in, until its saved copies are in the conversation. A message the run read as
442
+ * it answered sits where it read it, between the reply before and the reply after, as the thread
443
+ * holds them once the turn ends; each keeps the key its saved copy will have.
444
+ */
445
+ function liveMessages(
423
446
  input: ConversationMessagesInput,
424
447
  savedIds: ReadonlySet<string>,
425
448
  answeredRuns: ReadonlySet<string>
426
- ): AgentConversationMessage | null {
449
+ ): AgentConversationMessage[] {
427
450
  const live = input.live
428
- if (!live || live.runId === null || live.parts.length === 0) return null
429
- if (live.finalizedMessageId !== null && savedIds.has(live.finalizedMessageId)) return null
430
- if (answeredRuns.has(live.runId)) return null
451
+ if (!live || live.runId === null) return []
452
+ if (live.parts.length === 0 && live.inboxReads.length === 0) return []
453
+ if (live.finalizedMessageId !== null && savedIds.has(live.finalizedMessageId)) return []
454
+ if (answeredRuns.has(live.runId)) return []
431
455
 
432
456
  // A worker that stopped mid-turn saved none of what it streamed.
433
457
  const presentation = input.presentation
434
- if (presentation.kind === "interrupted" && !presentation.hasProgress) return null
458
+ if (presentation.kind === "interrupted" && !presentation.hasProgress) return []
435
459
 
460
+ const runId = live.runId
436
461
  const unfinished =
437
462
  live.finishStatus === "failed" || live.finishStatus === "cancelled"
438
463
  ? live.finishStatus
439
464
  : undefined
465
+ // Saved but not read back yet: the reply keeps its live shape until the copy replaces it.
466
+ const status = live.active || live.finalizedMessageId !== null ? "streaming" : "complete"
467
+
468
+ const result: AgentConversationMessage[] = []
469
+ let replied = false
470
+ let lastRead: string | null = null
471
+ const reply = (from: number, to: number, last: boolean) => {
472
+ const parts = liveParts(live, from, to, last)
473
+ if (parts.length === 0) return
474
+
475
+ result.push({
476
+ key: replied && lastRead !== null ? `run:${runId}:after:${lastRead}` : `run:${runId}`,
477
+ id: null,
478
+ role: "assistant",
479
+ status,
480
+ runId,
481
+ parts,
482
+ context: [],
483
+ diagnostics: [],
484
+ ...(last && unfinished ? { unfinished } : {}),
485
+ })
486
+ replied = true
487
+ }
488
+
489
+ let from = 0
490
+ for (const read of live.inboxReads) {
491
+ reply(from, read.at, false)
492
+ from = read.at
493
+
494
+ for (const message of read.messages) {
495
+ if (savedIds.has(message.id)) continue
496
+
497
+ result.push(readMessage(message, input))
498
+ lastRead = message.id
499
+ }
500
+ }
501
+ reply(from, live.parts.length, true)
502
+
503
+ return result
504
+ }
505
+
506
+ /** A message the run read as it answered, drawn as the thread will hold it. */
507
+ function readMessage(
508
+ message: LiveInboxRead["messages"][number],
509
+ input: ConversationMessagesInput
510
+ ): AgentConversationMessage {
511
+ const author = authorOf(message.authorPrincipal, input)
440
512
 
441
513
  return {
442
- key: `run:${live.runId}`,
514
+ key: `message:${message.id}`,
443
515
  id: null,
444
- role: "assistant",
445
- // Saved but not read back yet: the reply keeps its live shape until the copy replaces it.
446
- status: live.active || live.finalizedMessageId !== null ? "streaming" : "complete",
447
- runId: live.runId,
448
- parts: liveParts(live),
449
- context: [],
516
+ role: "user",
517
+ status: "streaming",
518
+ runId: null,
519
+ ...(author ? { author } : {}),
520
+ parts: message.parts.flatMap((part) =>
521
+ part.type === "text" ? [{ type: "text" as const, text: part.text, streaming: false }] : []
522
+ ),
523
+ context: message.parts.flatMap((part) =>
524
+ part.type === "context"
525
+ ? [{ context: part.context as AgentContextInput, origin: part.origin }]
526
+ : []
527
+ ),
450
528
  diagnostics: [],
451
- ...(unfinished ? { unfinished } : {}),
452
529
  }
453
530
  }
454
531
 
455
- /** The live parts. Text streams in spans the built-in chat joins, so they join here too. */
456
- function liveParts(live: LiveRunState): AgentConversationPart[] {
532
+ const liveNonTextParts = new WeakMap<
533
+ NormalizedPart,
534
+ { readonly key: string | undefined; readonly part: AgentConversationPart }
535
+ >()
536
+ const liveSettledTextParts = new WeakMap<NormalizedPart, AgentConversationPart>()
537
+
538
+ /**
539
+ * The live parts from `from` to `to`. Text streams in spans the built-in chat joins, so they join
540
+ * here too; the model is still writing the text the `last` ones end on.
541
+ */
542
+ function liveParts(
543
+ live: LiveRunState,
544
+ from: number,
545
+ to: number,
546
+ last: boolean
547
+ ): AgentConversationPart[] {
457
548
  const result: AgentConversationPart[] = []
458
549
 
459
- live.parts.forEach((part, index) => {
550
+ live.parts.slice(from, to).forEach((part, offset) => {
460
551
  switch (part.kind) {
461
552
  case "text": {
462
553
  const previous = result.at(-1)
463
554
  if (previous?.type === "text") {
464
555
  result[result.length - 1] = { ...previous, text: previous.text + part.text }
465
556
  } else {
466
- result.push({ type: "text", text: part.text, streaming: false })
557
+ const cached = liveSettledTextParts.get(part)
558
+ if (cached) {
559
+ result.push(cached)
560
+ } else {
561
+ const created: AgentConversationPart = {
562
+ type: "text",
563
+ text: part.text,
564
+ streaming: false,
565
+ }
566
+ liveSettledTextParts.set(part, created)
567
+ result.push(created)
568
+ }
467
569
  }
468
570
  return
469
571
  }
470
572
 
471
- case "reasoning":
472
- result.push({ type: "reasoning", text: part.text, streaming: part.streaming })
573
+ case "reasoning": {
574
+ const cached = liveNonTextParts.get(part)
575
+ if (cached) {
576
+ result.push(cached.part)
577
+ return
578
+ }
579
+ const created: AgentConversationPart = {
580
+ type: "reasoning",
581
+ text: part.text,
582
+ streaming: part.streaming,
583
+ }
584
+ liveNonTextParts.set(part, { key: undefined, part: created })
585
+ result.push(created)
473
586
  return
587
+ }
474
588
 
475
589
  case "tool": {
476
- const key = live.partKeys[index]
590
+ const key = live.partKeys[from + offset]
591
+ const cached = liveNonTextParts.get(part)
592
+ if (cached && cached.key === key) {
593
+ result.push(cached.part)
594
+ return
595
+ }
477
596
  const toolCallId = key?.startsWith("tool#") ? key.slice("tool#".length) : undefined
478
- result.push({
597
+ const created: AgentConversationPart = {
479
598
  type: "tool",
480
599
  toolName: part.tool.toolName,
481
600
  ...(toolCallId === undefined ? {} : { toolCallId }),
482
601
  ...toolViewProps(part.tool),
483
602
  ...(part.tool.files ? { files: part.tool.files.map(fileOf) } : {}),
484
- })
603
+ }
604
+ liveNonTextParts.set(part, { key, part: created })
605
+ result.push(created)
485
606
  return
486
607
  }
487
608
 
488
- case "file":
489
- result.push({ type: "file", ...fileOf(part) })
609
+ case "file": {
610
+ const cached = liveNonTextParts.get(part)
611
+ if (cached) {
612
+ result.push(cached.part)
613
+ return
614
+ }
615
+ const created: AgentConversationPart = { type: "file", ...fileOf(part) }
616
+ liveNonTextParts.set(part, { key: undefined, part: created })
617
+ result.push(created)
490
618
  return
619
+ }
491
620
 
492
621
  case "step-start":
493
622
  return
@@ -497,10 +626,9 @@ function liveParts(live: LiveRunState): AgentConversationPart[] {
497
626
  }
498
627
  })
499
628
 
500
- // The model is still writing the text it ended on.
501
- const last = result.at(-1)
502
- if (live.active && last?.type === "text") {
503
- result[result.length - 1] = { ...last, streaming: true }
629
+ const end = result.at(-1)
630
+ if (last && live.active && end?.type === "text") {
631
+ result[result.length - 1] = { ...end, streaming: true }
504
632
  }
505
633
 
506
634
  return result
@@ -516,31 +644,49 @@ function fileOf(file: NormalizedFile): AgentConversationFile {
516
644
  * The parts as the built-in chat draws them. Two text parts in a row were two steps, which the
517
645
  * chat keeps apart with the step boundary between them.
518
646
  */
647
+ const normalizedPartEntries = new WeakMap<AgentConversationPart, NormalizedPart>()
648
+ const normalizedToolEntries = new WeakMap<AgentConversationToolPart, NormalizedTool>()
649
+ const STEP_START_PART: NormalizedPart = { kind: "step-start" }
650
+
519
651
  export function normalizedParts(parts: readonly AgentConversationPart[]): NormalizedPart[] {
520
652
  const result: NormalizedPart[] = []
521
653
 
522
654
  for (const part of parts) {
655
+ if (part.type === "text" && result.at(-1)?.kind === "text") {
656
+ result.push(STEP_START_PART)
657
+ }
658
+
659
+ const cached = normalizedPartEntries.get(part)
660
+ if (cached) {
661
+ result.push(cached)
662
+ continue
663
+ }
664
+
665
+ let created: NormalizedPart
523
666
  switch (part.type) {
524
667
  case "text":
525
- if (result.at(-1)?.kind === "text") result.push({ kind: "step-start" })
526
- result.push({ kind: "text", text: part.text })
668
+ created = { kind: "text", text: part.text }
527
669
  break
528
670
 
529
671
  case "reasoning":
530
- result.push({ kind: "reasoning", text: part.text, streaming: part.streaming })
672
+ created = { kind: "reasoning", text: part.text, streaming: part.streaming }
531
673
  break
532
674
 
533
675
  case "tool":
534
- result.push({ kind: "tool", tool: normalizedTool(part) })
676
+ created = { kind: "tool", tool: normalizedTool(part) }
535
677
  break
536
678
 
537
679
  case "file":
538
- result.push({ kind: "file", ...fileOf(part) })
680
+ created = { kind: "file", ...fileOf(part) }
539
681
  break
540
682
 
541
683
  default:
542
684
  part satisfies never
685
+ continue
543
686
  }
687
+
688
+ normalizedPartEntries.set(part, created)
689
+ result.push(created)
544
690
  }
545
691
 
546
692
  return result
@@ -548,7 +694,10 @@ export function normalizedParts(parts: readonly AgentConversationPart[]): Normal
548
694
 
549
695
  /** A tool part as the built-in tool views read it. */
550
696
  export function normalizedTool(part: AgentConversationToolPart): NormalizedTool {
697
+ const cached = normalizedToolEntries.get(part)
698
+ if (cached) return cached
551
699
  const { type: _type, toolCallId: _toolCallId, ...tool } = part
700
+ normalizedToolEntries.set(part, tool)
552
701
  return tool
553
702
  }
554
703
 
@@ -0,0 +1,53 @@
1
+ import { Bubble, BubbleContent } from "@sixb/ui/components"
2
+ import { useAgentMessages } from "../i18n"
3
+ import type { NormalizedTool } from "../parts"
4
+ import { askedQuestions } from "../questions/interpret"
5
+
6
+ /**
7
+ * What the Agent sent a sub-agent, in the sub-agent's panel: its answer or its message, on the
8
+ * other side of the conversation, as a person's message reads in the Agent's own.
9
+ */
10
+ export function AgentNote({ text }: { readonly text: string }) {
11
+ return (
12
+ <Bubble variant="secondary" align="end" data-agent-note="">
13
+ <BubbleContent className="rounded-2xl px-3.5 py-2 text-[15px] whitespace-pre-wrap">
14
+ {text}
15
+ </BubbleContent>
16
+ </Bubble>
17
+ )
18
+ }
19
+
20
+ /**
21
+ * A sub-agent's question to the Agent, in its panel: what it asked, as its own words, then the
22
+ * Agent's answer when it came in the same run. One that came later opens the next run instead.
23
+ */
24
+ export function ChildAsked({ tool }: { readonly tool: NormalizedTool }) {
25
+ const labels = useAgentMessages().delegation
26
+ const questions = askedQuestions(tool.input)
27
+ if (questions.length === 0) return null
28
+ const output = isRecord(tool.output) ? tool.output : {}
29
+ const answer = typeof output.answer === "string" ? output.answer : null
30
+
31
+ return (
32
+ <div className="flex flex-col gap-3">
33
+ <div className="flex flex-col gap-1.5 text-[15px] leading-relaxed text-foreground">
34
+ {questions.map((question) => (
35
+ <div key={question.question}>
36
+ <p className="break-words">{question.question}</p>
37
+ {question.choices.length > 0 ? (
38
+ <p className="text-[13px] text-muted-foreground">{question.choices.join(" · ")}</p>
39
+ ) : null}
40
+ </div>
41
+ ))}
42
+ </div>
43
+ {answer !== null ? <AgentNote text={answer} /> : null}
44
+ {output.status === "unanswered" ? (
45
+ <p className="text-[13px] text-muted-foreground">{labels.noAnswer}</p>
46
+ ) : null}
47
+ </div>
48
+ )
49
+ }
50
+
51
+ function isRecord(value: unknown): value is Record<string, unknown> {
52
+ return typeof value === "object" && value !== null && !Array.isArray(value)
53
+ }
@@ -10,17 +10,10 @@ import { heldCallOf } from "../approvals"
10
10
  import { ApprovalCard } from "../components/approval-card"
11
11
  import { FileAttachmentCard } from "../components/file-attachment-card"
12
12
  import { useAgentMessages } from "../i18n"
13
- import {
14
- AgentAvatar,
15
- Exchanges,
16
- ModelChip,
17
- NEEDS_READER_TEXT,
18
- statusLabel,
19
- WorkedFor,
20
- } from "./child-parts"
13
+ import { AgentAvatar, ModelChip, NEEDS_READER_TEXT, statusLabel, WorkedFor } from "./child-parts"
21
14
  import { ChildWork } from "./child-work"
22
15
  import { useDelegationCards } from "./context"
23
- import { type AgentChild, activeRun, childTitle, liveQuestion } from "./interpret"
16
+ import { type AgentChild, activeRun, childTitle } from "./interpret"
24
17
  import type { ChildModel } from "./model"
25
18
  import { type ChildrenSource, refreshChildren } from "./use-children"
26
19
 
@@ -206,12 +199,11 @@ export function ChildDetail({
206
199
  }
207
200
 
208
201
  /**
209
- * What waits on the reader from one sub-agent, under the reply's line: the question it asked, and
210
- * the calls it holds for approval. Named when the reply has several, so each says whose it is.
202
+ * What waits on the reader from one sub-agent, under the reply's line: the calls it holds for
203
+ * approval. What passed between it and the Agent reads in its panel, from its own thread.
211
204
  */
212
205
  export function ChildAttention({
213
206
  model,
214
- observed,
215
207
  named,
216
208
  }: {
217
209
  readonly model: ChildModel
@@ -219,37 +211,11 @@ export function ChildAttention({
219
211
  readonly named: boolean
220
212
  }) {
221
213
  const labels = useAgentMessages().delegation
222
- const cards = useDelegationCards()
223
- const { child, view, live, state, needsReader } = model
224
- const exchanges = cards?.delegation.exchanges.get(child.id) ?? []
225
- const openQuestion =
226
- view?.awaiting?.type === "answer"
227
- ? view.awaiting.question.text
228
- : state === "asking" && live
229
- ? liveQuestion(live.parts)
230
- : null
231
- const asks = exchanges.length > 0 || openQuestion !== null
232
- if (!asks && model.approvals.length === 0 && !model.heldLater) return null
214
+ const { child } = model
215
+ if (model.approvals.length === 0 && !model.heldLater) return null
233
216
 
234
217
  return (
235
218
  <div className="flex flex-col gap-2" data-child-key={child.key}>
236
- {asks ? (
237
- <div className="pl-[1.875rem]">
238
- {named ? (
239
- <p className="mb-1 text-xs font-medium text-muted-foreground">
240
- {childTitle(child.key)}
241
- </p>
242
- ) : null}
243
- <Exchanges
244
- exchanges={exchanges}
245
- openQuestion={openQuestion}
246
- urgent={needsReader || state === "asking"}
247
- />
248
- {state === "answer" && !observed ? (
249
- <p className="mt-1 text-xs text-muted-foreground">{labels.answerHint}</p>
250
- ) : null}
251
- </div>
252
- ) : null}
253
219
  {model.heldLater ? (
254
220
  <button
255
221
  type="button"
@@ -1,7 +1,7 @@
1
1
  import { listModelsOptions } from "@sixb/client/hooks"
2
2
  import { cn } from "@sixb/ui/lib/utils"
3
3
  import { useQuery } from "@tanstack/react-query"
4
- import { Bot, Check, CornerDownRight, MessageCircleQuestion } from "lucide-react"
4
+ import { Bot } from "lucide-react"
5
5
  import { useEffect, useState } from "react"
6
6
  import { latestWorkLabel } from "../activity-label"
7
7
  import { ProviderLogo } from "../components/provider-logo"
@@ -10,7 +10,6 @@ import type { AgentMessages } from "../i18n/en"
10
10
  import {
11
11
  type AgentChild,
12
12
  activeRun,
13
- type ChildExchange,
14
13
  type ChildState,
15
14
  formatWorked,
16
15
  isActive,
@@ -187,88 +186,6 @@ export function ModelChip({
187
186
  )
188
187
  }
189
188
 
190
- /**
191
- * What the Agent told the child, what the child asked, and what the Agent answered. The question
192
- * it waits on reads in full, in amber when the reader is the one to answer.
193
- */
194
- export function Exchanges({
195
- exchanges,
196
- openQuestion,
197
- urgent,
198
- }: {
199
- readonly exchanges: readonly ChildExchange[]
200
- readonly openQuestion: string | null
201
- readonly urgent: boolean
202
- }) {
203
- const labels = useAgentMessages().delegation
204
- const shown = [...exchanges]
205
- if (openQuestion && !shown.some((each) => each.kind === "asked" && each.text === openQuestion)) {
206
- shown.push({ kind: "asked", text: openQuestion })
207
- }
208
-
209
- let lastAsked = -1
210
- shown.forEach((each, index) => {
211
- if (each.kind === "asked" && each.text === openQuestion) lastAsked = index
212
- })
213
-
214
- return (
215
- <ul className="flex flex-col gap-1.5">
216
- {shown.map((exchange, index) => {
217
- const open = index === lastAsked
218
- const amber = open && urgent
219
- // The question waiting on the reader: its card says so already, so it reads as itself.
220
- if (amber) {
221
- return (
222
- <li key={`${exchange.kind}:${index}`} className="text-sm leading-5 text-foreground">
223
- <span className="sr-only">{labels.asks} · </span>
224
- {exchange.text}
225
- </li>
226
- )
227
- }
228
- const Icon =
229
- exchange.kind === "asked"
230
- ? MessageCircleQuestion
231
- : exchange.kind === "answered"
232
- ? Check
233
- : CornerDownRight
234
- const label =
235
- exchange.kind === "asked"
236
- ? labels.asks
237
- : exchange.kind === "answered"
238
- ? labels.answer
239
- : labels.fromAgent
240
-
241
- return (
242
- <li
243
- key={`${exchange.kind}:${index}`}
244
- className={cn(
245
- "flex min-w-0 items-start gap-2 text-[13px] leading-5",
246
- exchange.kind === "answered" && "pl-5"
247
- )}
248
- >
249
- <Icon
250
- className={cn(
251
- "mt-0.5 size-3.5 shrink-0",
252
- amber ? "text-amber-600 dark:text-amber-400" : "text-muted-foreground"
253
- )}
254
- aria-hidden="true"
255
- />
256
- <p className={cn("min-w-0 break-words", !open && "line-clamp-3")} title={exchange.text}>
257
- <span
258
- className={cn("font-medium", amber ? NEEDS_READER_TEXT : "text-muted-foreground")}
259
- >
260
- {label}
261
- </span>
262
- <span className="text-muted-foreground"> · </span>
263
- <span className="text-foreground">{exchange.text}</span>
264
- </p>
265
- </li>
266
- )
267
- })}
268
- </ul>
269
- )
270
- }
271
-
272
189
  function tierOf(value: string | undefined): "light" | "standard" | "heavy" | undefined {
273
190
  return value === "light" || value === "standard" || value === "heavy" ? value : undefined
274
191
  }