@opengeni/react 4.0.2 → 4.0.5-canary.39120434730001

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 (916) hide show
  1. package/README.md +787 -26
  2. package/dist/accounts.js +2 -0
  3. package/dist/accounts.js.map +1 -1
  4. package/dist/approvals.d.ts +2 -1
  5. package/dist/artifacts-document.js +6 -3
  6. package/dist/artifacts-presentation.js +6 -3
  7. package/dist/artifacts-spreadsheet.d.ts +1 -1
  8. package/dist/artifacts-spreadsheet.js +6 -3
  9. package/dist/artifacts.d.ts +5 -1
  10. package/dist/artifacts.js +542 -278
  11. package/dist/artifacts.js.map +1 -1
  12. package/dist/browser-viewer-GEHX3KYE.js +20 -0
  13. package/dist/capability-catalog-row.d.ts +20 -0
  14. package/dist/capability-logo-fallback.d.ts +3 -0
  15. package/dist/chat-interactive-block-5V3BGLXT.js +15 -0
  16. package/dist/chunk-2DDJ6YH6.js +41 -0
  17. package/dist/chunk-2DDJ6YH6.js.map +1 -0
  18. package/dist/chunk-2EGXXUG4.js +1161 -0
  19. package/dist/chunk-2EGXXUG4.js.map +1 -0
  20. package/dist/chunk-2XKRY4GF.js +302 -0
  21. package/dist/chunk-2XKRY4GF.js.map +1 -0
  22. package/dist/chunk-2ZUUIMBY.js +343 -0
  23. package/dist/chunk-2ZUUIMBY.js.map +1 -0
  24. package/dist/chunk-4F4FGCH2.js +34 -0
  25. package/dist/chunk-4F4FGCH2.js.map +1 -0
  26. package/dist/{chunk-Z7WBDB4E.js → chunk-4M2MJLY3.js} +848 -867
  27. package/dist/chunk-4M2MJLY3.js.map +1 -0
  28. package/dist/chunk-4U7SHFQ2.js +193 -0
  29. package/dist/chunk-4U7SHFQ2.js.map +1 -0
  30. package/dist/chunk-5I4VRWBB.js +56 -0
  31. package/dist/chunk-5I4VRWBB.js.map +1 -0
  32. package/dist/{chunk-24M4YBCL.js → chunk-62XZ3IX3.js} +1751 -845
  33. package/dist/chunk-62XZ3IX3.js.map +1 -0
  34. package/dist/chunk-77THWHSU.js +308 -0
  35. package/dist/chunk-77THWHSU.js.map +1 -0
  36. package/dist/chunk-7CZLTFXF.js +466 -0
  37. package/dist/chunk-7CZLTFXF.js.map +1 -0
  38. package/dist/chunk-7N5AD2TC.js +327 -0
  39. package/dist/chunk-7N5AD2TC.js.map +1 -0
  40. package/dist/chunk-7SZ7MMCY.js +325 -0
  41. package/dist/chunk-7SZ7MMCY.js.map +1 -0
  42. package/dist/chunk-7TG6KTR2.js +3153 -0
  43. package/dist/chunk-7TG6KTR2.js.map +1 -0
  44. package/dist/chunk-AIX25FIQ.js +409 -0
  45. package/dist/chunk-AIX25FIQ.js.map +1 -0
  46. package/dist/chunk-AT2HD6RQ.js +1936 -0
  47. package/dist/chunk-AT2HD6RQ.js.map +1 -0
  48. package/dist/chunk-B27E3V37.js +29 -0
  49. package/dist/chunk-B27E3V37.js.map +1 -0
  50. package/dist/{chunk-5M6VTFJ5.js → chunk-B4EDAXMC.js} +37 -13
  51. package/dist/chunk-B4EDAXMC.js.map +1 -0
  52. package/dist/chunk-BOG2FED3.js +35 -0
  53. package/dist/chunk-BOG2FED3.js.map +1 -0
  54. package/dist/chunk-BQYQU5QW.js +109 -0
  55. package/dist/chunk-BQYQU5QW.js.map +1 -0
  56. package/dist/{chunk-PAJU5KKL.js → chunk-BRIOXCLH.js} +68 -25
  57. package/dist/chunk-BRIOXCLH.js.map +1 -0
  58. package/dist/chunk-CM7LVUKC.js +35 -0
  59. package/dist/chunk-CM7LVUKC.js.map +1 -0
  60. package/dist/{chunk-KCGXPP5V.js → chunk-CXIGFHVL.js} +35 -23
  61. package/dist/chunk-CXIGFHVL.js.map +1 -0
  62. package/dist/chunk-DHXKEJBH.js +71 -0
  63. package/dist/chunk-DHXKEJBH.js.map +1 -0
  64. package/dist/{chunk-NOSYBS2D.js → chunk-DN3TKURW.js} +12 -9
  65. package/dist/chunk-DN3TKURW.js.map +1 -0
  66. package/dist/chunk-DNJ23AWQ.js +35 -0
  67. package/dist/chunk-DNJ23AWQ.js.map +1 -0
  68. package/dist/chunk-ESAMXNBZ.js +3237 -0
  69. package/dist/chunk-ESAMXNBZ.js.map +1 -0
  70. package/dist/{chunk-4MDLEHXL.js → chunk-EWATYP5L.js} +64 -44
  71. package/dist/chunk-EWATYP5L.js.map +1 -0
  72. package/dist/{chunk-YBM6CQRU.js → chunk-FQ5CXNUG.js} +65 -42
  73. package/dist/chunk-FQ5CXNUG.js.map +1 -0
  74. package/dist/chunk-FVROZ7HR.js +14396 -0
  75. package/dist/chunk-FVROZ7HR.js.map +1 -0
  76. package/dist/chunk-HEVQKE27.js +150 -0
  77. package/dist/chunk-HEVQKE27.js.map +1 -0
  78. package/dist/chunk-HZ47S3DP.js +1086 -0
  79. package/dist/chunk-HZ47S3DP.js.map +1 -0
  80. package/dist/chunk-I5BJ7ENY.js +174 -0
  81. package/dist/chunk-I5BJ7ENY.js.map +1 -0
  82. package/dist/chunk-IGFZFLI2.js +1390 -0
  83. package/dist/chunk-IGFZFLI2.js.map +1 -0
  84. package/dist/chunk-IGVL3ELX.js +46 -0
  85. package/dist/chunk-IGVL3ELX.js.map +1 -0
  86. package/dist/chunk-IOD24LGR.js +384 -0
  87. package/dist/chunk-IOD24LGR.js.map +1 -0
  88. package/dist/chunk-IOYHDEP3.js +38 -0
  89. package/dist/chunk-IOYHDEP3.js.map +1 -0
  90. package/dist/chunk-IQL77TMM.js +803 -0
  91. package/dist/chunk-IQL77TMM.js.map +1 -0
  92. package/dist/chunk-IZV5FTJC.js +55 -0
  93. package/dist/chunk-IZV5FTJC.js.map +1 -0
  94. package/dist/{chunk-H5YGYNXS.js → chunk-JAYYFOOB.js} +75 -28
  95. package/dist/chunk-JAYYFOOB.js.map +1 -0
  96. package/dist/chunk-KN2MYSCC.js +409 -0
  97. package/dist/chunk-KN2MYSCC.js.map +1 -0
  98. package/dist/{chunk-PEI6RANI.js → chunk-KYVJMTXL.js} +434 -145
  99. package/dist/chunk-KYVJMTXL.js.map +1 -0
  100. package/dist/{chunk-ZYRGEKWS.js → chunk-LJUMYUBO.js} +3 -1
  101. package/dist/{chunk-ZYRGEKWS.js.map → chunk-LJUMYUBO.js.map} +1 -1
  102. package/dist/{chunk-ICA6R6TW.js → chunk-LNUD3JNI.js} +1532 -395
  103. package/dist/chunk-LNUD3JNI.js.map +1 -0
  104. package/dist/chunk-M357MHH3.js +2 -0
  105. package/dist/{chunk-BV5A4OTE.js → chunk-MEL6PH2I.js} +1218 -537
  106. package/dist/chunk-MEL6PH2I.js.map +1 -0
  107. package/dist/chunk-MF6WS2XF.js +386 -0
  108. package/dist/chunk-MF6WS2XF.js.map +1 -0
  109. package/dist/chunk-MK2TQO4Y.js +24 -0
  110. package/dist/chunk-MK2TQO4Y.js.map +1 -0
  111. package/dist/chunk-N7S72EXK.js +25 -0
  112. package/dist/chunk-N7S72EXK.js.map +1 -0
  113. package/dist/{chunk-KZ73RL76.js → chunk-NAWXARTY.js} +58 -9
  114. package/dist/chunk-NAWXARTY.js.map +1 -0
  115. package/dist/chunk-NX4ADH73.js +14 -0
  116. package/dist/chunk-NX4ADH73.js.map +1 -0
  117. package/dist/chunk-OYQQJL3J.js +16 -0
  118. package/dist/chunk-OYQQJL3J.js.map +1 -0
  119. package/dist/chunk-P4MKPCTC.js +51 -0
  120. package/dist/chunk-P4MKPCTC.js.map +1 -0
  121. package/dist/{chunk-JVYQRRC4.js → chunk-PEHTX3V7.js} +21 -1
  122. package/dist/chunk-PEHTX3V7.js.map +1 -0
  123. package/dist/chunk-PMV53IMM.js +26 -0
  124. package/dist/chunk-PMV53IMM.js.map +1 -0
  125. package/dist/{chunk-HUIKIDM5.js → chunk-QOEWDOFW.js} +295 -156
  126. package/dist/chunk-QOEWDOFW.js.map +1 -0
  127. package/dist/chunk-QV3DJVRZ.js +11 -0
  128. package/dist/chunk-QV3DJVRZ.js.map +1 -0
  129. package/dist/{chunk-HUMIRRYI.js → chunk-QYUYVSNG.js} +1103 -1699
  130. package/dist/chunk-QYUYVSNG.js.map +1 -0
  131. package/dist/{chunk-6J56T3MG.js → chunk-RRAQ5FV5.js} +186 -60
  132. package/dist/chunk-RRAQ5FV5.js.map +1 -0
  133. package/dist/{chunk-5YK2ZDIG.js → chunk-TNEZNMSN.js} +4 -10
  134. package/dist/chunk-TNEZNMSN.js.map +1 -0
  135. package/dist/{chunk-22KP6LR5.js → chunk-TXS65BB2.js} +3 -1
  136. package/dist/{chunk-22KP6LR5.js.map → chunk-TXS65BB2.js.map} +1 -1
  137. package/dist/chunk-UIWIOB4U.js +2215 -0
  138. package/dist/chunk-UIWIOB4U.js.map +1 -0
  139. package/dist/chunk-UNJPZGNK.js +63 -0
  140. package/dist/chunk-UNJPZGNK.js.map +1 -0
  141. package/dist/chunk-V7UGCQHQ.js +86 -0
  142. package/dist/chunk-V7UGCQHQ.js.map +1 -0
  143. package/dist/chunk-VU4QUISJ.js +3405 -0
  144. package/dist/chunk-VU4QUISJ.js.map +1 -0
  145. package/dist/chunk-WEY5J52U.js +467 -0
  146. package/dist/chunk-WEY5J52U.js.map +1 -0
  147. package/dist/chunk-WH2CBESG.js +409 -0
  148. package/dist/chunk-WH2CBESG.js.map +1 -0
  149. package/dist/{chunk-VZTQ73XT.js → chunk-XEA5BCMA.js} +3 -1
  150. package/dist/{chunk-VZTQ73XT.js.map → chunk-XEA5BCMA.js.map} +1 -1
  151. package/dist/{chunk-NLTS7JHI.js → chunk-XEIHS3RN.js} +834 -403
  152. package/dist/chunk-XEIHS3RN.js.map +1 -0
  153. package/dist/chunk-YNXZRE3F.js +408 -0
  154. package/dist/chunk-YNXZRE3F.js.map +1 -0
  155. package/dist/chunk-YSRBFJMQ.js +43 -0
  156. package/dist/chunk-YSRBFJMQ.js.map +1 -0
  157. package/dist/{chunk-NEXLLTP4.js → chunk-ZGFU4LVW.js} +6 -5
  158. package/dist/chunk-ZGFU4LVW.js.map +1 -0
  159. package/dist/chunk-ZO35BAMO.js +172 -0
  160. package/dist/chunk-ZO35BAMO.js.map +1 -0
  161. package/dist/chunk-ZUWF4NF7.js +13 -0
  162. package/dist/chunk-ZUWF4NF7.js.map +1 -0
  163. package/dist/client.d.ts +15 -6
  164. package/dist/clipboard.js +3 -1
  165. package/dist/commands/registry.d.ts +2 -1
  166. package/dist/commands/types.d.ts +2 -0
  167. package/dist/components/anthropic-mark.d.ts +3 -0
  168. package/dist/components/approval-surface.d.ts +21 -7
  169. package/dist/components/artifacts/artifact-chrome.d.ts +121 -0
  170. package/dist/components/artifacts/artifact-sandbox.d.ts +30 -0
  171. package/dist/components/artifacts/artifact-surface.d.ts +4 -2
  172. package/dist/components/artifacts/chat-interactive-block.d.ts +29 -0
  173. package/dist/components/artifacts/deferred-chat-media.d.ts +15 -0
  174. package/dist/components/artifacts/document-editor.d.ts +4 -2
  175. package/dist/components/artifacts/editable-artifact-ui.d.ts +4 -2
  176. package/dist/components/artifacts/editable-artifact-view.d.ts +48 -0
  177. package/dist/components/artifacts/editable-document.d.ts +3 -2
  178. package/dist/components/artifacts/editable-presentation.d.ts +4 -3
  179. package/dist/components/artifacts/editable-spreadsheet.d.ts +8 -3
  180. package/dist/components/artifacts/index.d.ts +8 -1
  181. package/dist/components/artifacts/inline-html-document.d.ts +2 -0
  182. package/dist/components/artifacts/latest-task-runner.d.ts +15 -0
  183. package/dist/components/artifacts/presentation-editor.d.ts +6 -2
  184. package/dist/components/artifacts/published-html-artifact-frame.d.ts +17 -40
  185. package/dist/components/artifacts/session-artifact-viewer.d.ts +39 -0
  186. package/dist/components/artifacts/site-view.d.ts +26 -0
  187. package/dist/components/artifacts/spreadsheet-command-queue.d.ts +20 -0
  188. package/dist/components/artifacts/spreadsheet-download.d.ts +7 -0
  189. package/dist/components/artifacts/spreadsheet-general-display.d.ts +24 -0
  190. package/dist/components/artifacts/spreadsheet-grid.d.ts +11 -4
  191. package/dist/components/artifacts/spreadsheet-resize.d.ts +50 -0
  192. package/dist/components/artifacts/spreadsheet-submissions.d.ts +9 -0
  193. package/dist/components/artifacts/visualization-assets.gen.d.ts +2 -0
  194. package/dist/components/browser-select-control.d.ts +16 -0
  195. package/dist/components/browser-viewer.d.ts +11 -2
  196. package/dist/components/chat-composer.d.ts +21 -3
  197. package/dist/components/child-session-link.d.ts +5 -1
  198. package/dist/components/claude-mark.d.ts +3 -0
  199. package/dist/components/code-editor.d.ts +1 -4
  200. package/dist/components/command-palette.d.ts +1 -1
  201. package/dist/components/composer-transcription-control.d.ts +7 -0
  202. package/dist/components/composer.d.ts +30 -67
  203. package/dist/components/computer-viewer.d.ts +1 -1
  204. package/dist/components/copy-button.d.ts +3 -1
  205. package/dist/components/desktop-viewer.d.ts +1 -1
  206. package/dist/components/generated-video-player.d.ts +1 -1
  207. package/dist/components/grok-mark.d.ts +26 -0
  208. package/dist/components/human-input-form.d.ts +26 -32
  209. package/dist/components/human-input-surface.d.ts +5 -1
  210. package/dist/components/linkified-text.d.ts +18 -0
  211. package/dist/components/machine-input-display.d.ts +25 -3
  212. package/dist/components/machine-status-pill.d.ts +3 -2
  213. package/dist/components/machines/agent-status-icon.d.ts +6 -0
  214. package/dist/components/machines/health.d.ts +2 -1
  215. package/dist/components/machines/machine-detail.d.ts +7 -1
  216. package/dist/components/machines/machine-status.d.ts +49 -0
  217. package/dist/components/machines/metric-history-chart.d.ts +1 -1
  218. package/dist/components/machines/series.d.ts +3 -2
  219. package/dist/components/markdown-table-layout.d.ts +11 -2
  220. package/dist/components/markdown.d.ts +37 -4
  221. package/dist/components/message-timeline.d.ts +79 -7
  222. package/dist/components/model-mark.d.ts +29 -0
  223. package/dist/components/model-picker.d.ts +1 -1
  224. package/dist/components/model-policy-picker.d.ts +31 -22
  225. package/dist/components/new-conversation.d.ts +32 -0
  226. package/dist/components/open-geni-chat.d.ts +73 -0
  227. package/dist/components/open-geni-links.d.ts +69 -0
  228. package/dist/components/openrouter-mark.d.ts +6 -0
  229. package/dist/components/opper-mark.d.ts +7 -0
  230. package/dist/components/preview-loading.d.ts +2 -0
  231. package/dist/components/provider-recovery-notice.d.ts +17 -0
  232. package/dist/components/queue-item-content.d.ts +10 -0
  233. package/dist/components/rehype-secret-refs.d.ts +23 -0
  234. package/dist/components/remark-soft-line-breaks.d.ts +38 -0
  235. package/dist/components/sandbox-workspace.d.ts +18 -0
  236. package/dist/components/secret-question-field.d.ts +31 -0
  237. package/dist/components/secret-ref-chip.d.ts +35 -0
  238. package/dist/components/session-capability-frame.d.ts +37 -0
  239. package/dist/components/session-chrome.d.ts +20 -7
  240. package/dist/components/session-commands.d.ts +6 -0
  241. package/dist/components/session-connection-request.d.ts +8 -0
  242. package/dist/components/session-conversation.d.ts +147 -6
  243. package/dist/components/session-list.d.ts +39 -0
  244. package/dist/components/session-mcp-capability-card.d.ts +41 -0
  245. package/dist/components/session-proxy-scope.d.ts +35 -0
  246. package/dist/components/session-status.d.ts +6 -2
  247. package/dist/components/session-usage-limit-notice.d.ts +39 -0
  248. package/dist/components/this-computer/illustrations.d.ts +38 -0
  249. package/dist/components/this-computer/labels.d.ts +111 -0
  250. package/dist/components/this-computer/this-computer-card.d.ts +40 -0
  251. package/dist/components/this-computer/this-computer-setup.d.ts +35 -0
  252. package/dist/components/this-computer/this-computer-status.d.ts +42 -0
  253. package/dist/components/this-computer/use-this-computer.d.ts +29 -0
  254. package/dist/components/timeline-anchor.d.ts +3 -0
  255. package/dist/components/timeline-annotation-shared.d.ts +3 -2
  256. package/dist/components/timeline-annotations-dialog.d.ts +2 -1
  257. package/dist/components/timeline-annotations.d.ts +5 -1
  258. package/dist/components/timeline-reading-progress.d.ts +11 -0
  259. package/dist/components/timeline-search.d.ts +34 -0
  260. package/dist/components/timeline-settlement.d.ts +16 -0
  261. package/dist/components/tool-action-review.d.ts +48 -0
  262. package/dist/components/tool-review-history.d.ts +25 -0
  263. package/dist/components/usage-limit-notice.d.ts +50 -0
  264. package/dist/components/usage-member-list.d.ts +92 -0
  265. package/dist/components/usage-meter.d.ts +74 -0
  266. package/dist/components/use-viewer-menu-dismiss.d.ts +2 -0
  267. package/dist/components/user-message-body.d.ts +10 -1
  268. package/dist/components/workbench-changes.d.ts +2 -1
  269. package/dist/composer-messages.d.ts +75 -0
  270. package/dist/composer-messages.js +9 -0
  271. package/dist/composer-messages.js.map +1 -0
  272. package/dist/composer-voice-events.d.ts +8 -0
  273. package/dist/composer.d.ts +3 -3
  274. package/dist/composer.js +25 -12
  275. package/dist/computer-viewer-VOIOZGVZ.js +21 -0
  276. package/dist/computer-viewer-VOIOZGVZ.js.map +1 -0
  277. package/dist/connect-account-identity.d.ts +8 -0
  278. package/dist/connect-accounts.d.ts +15 -0
  279. package/dist/connect-chooser.d.ts +18 -0
  280. package/dist/connect-panel.d.ts +18 -0
  281. package/dist/connect-setup.d.ts +18 -0
  282. package/dist/connect.d.ts +21 -0
  283. package/dist/connect.js +2216 -0
  284. package/dist/connect.js.map +1 -0
  285. package/dist/connection-catalog.d.ts +38 -0
  286. package/dist/connection-discovery.d.ts +12 -0
  287. package/dist/connection-installed.d.ts +17 -0
  288. package/dist/connection-logo.d.ts +9 -0
  289. package/dist/connection-service-logo.d.ts +8 -0
  290. package/dist/connection-service-presentation.d.ts +13 -0
  291. package/dist/connection-skeleton.d.ts +5 -0
  292. package/dist/connection-type-picker.d.ts +6 -0
  293. package/dist/conversation-timeline.d.ts +1 -1
  294. package/dist/desktop.d.ts +7 -0
  295. package/dist/desktop.js +28 -0
  296. package/dist/desktop.js.map +1 -0
  297. package/dist/device-authorization.d.ts +23 -0
  298. package/dist/diffs.d.ts +8 -0
  299. package/dist/diffs.js +15 -0
  300. package/dist/diffs.js.map +1 -0
  301. package/dist/discovery-cache.d.ts +5 -0
  302. package/dist/editor.d.ts +7 -0
  303. package/dist/editor.js +23 -0
  304. package/dist/editor.js.map +1 -0
  305. package/dist/embedded-new-voice-KPLC5UJZ.js +19 -0
  306. package/dist/embedded-new-voice-KPLC5UJZ.js.map +1 -0
  307. package/dist/embedded-voice-V2RFSLIU.js +19 -0
  308. package/dist/embedded-voice-V2RFSLIU.js.map +1 -0
  309. package/dist/fleet-decision-row-FE73NSQ6.js +361 -0
  310. package/dist/fleet-decision-row-FE73NSQ6.js.map +1 -0
  311. package/dist/hooks/internal.d.ts +27 -2
  312. package/dist/hooks/latest-question.d.ts +26 -0
  313. package/dist/hooks/session-view-cache.d.ts +38 -0
  314. package/dist/hooks/shared-machines-list.d.ts +4 -0
  315. package/dist/hooks/shared-query.d.ts +123 -0
  316. package/dist/hooks/use-attached-browsers.d.ts +1 -1
  317. package/dist/hooks/use-auth-runs.d.ts +1 -4
  318. package/dist/hooks/use-available-models.d.ts +8 -3
  319. package/dist/hooks/use-browser-frame-stream.d.ts +1 -1
  320. package/dist/hooks/use-browser-session.d.ts +12 -1
  321. package/dist/hooks/use-client-config-flags.d.ts +49 -0
  322. package/dist/hooks/use-codex-accounts.d.ts +48 -9
  323. package/dist/hooks/use-composer.d.ts +24 -3
  324. package/dist/hooks/use-computer-frame-stream.d.ts +1 -1
  325. package/dist/hooks/use-computer-input-posture.d.ts +13 -0
  326. package/dist/hooks/use-computer-session.d.ts +5 -0
  327. package/dist/hooks/use-connect.d.ts +23 -0
  328. package/dist/hooks/use-desktop-stream.d.ts +1 -1
  329. package/dist/hooks/use-file-attachments.d.ts +4 -0
  330. package/dist/hooks/use-goal.d.ts +2 -1
  331. package/dist/hooks/use-last-started-turn-policy.d.ts +5 -1
  332. package/dist/hooks/use-machine-chip.d.ts +3 -2
  333. package/dist/hooks/use-new-conversation.d.ts +56 -0
  334. package/dist/hooks/use-new-session-draft.d.ts +74 -0
  335. package/dist/hooks/use-realtime-voice-models.d.ts +7 -0
  336. package/dist/hooks/use-sandbox-files.d.ts +3 -2
  337. package/dist/hooks/use-session-conversation.d.ts +49 -0
  338. package/dist/hooks/use-session-events.d.ts +21 -2
  339. package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
  340. package/dist/hooks/use-session-model-account.d.ts +48 -0
  341. package/dist/hooks/use-supergrok-accounts.d.ts +7 -1
  342. package/dist/hooks/use-terminal-stream.d.ts +11 -5
  343. package/dist/hooks/use-transcription.d.ts +2 -1
  344. package/dist/hooks/use-usage.d.ts +40 -0
  345. package/dist/hooks/use-vaults.d.ts +53 -0
  346. package/dist/hooks/use-voice-input.d.ts +8 -1
  347. package/dist/hooks/use-workspace-sessions.d.ts +24 -5
  348. package/dist/human-input-model.d.ts +123 -0
  349. package/dist/identity-link-accounts.d.ts +11 -0
  350. package/dist/identity-link-consent.d.ts +18 -0
  351. package/dist/index.d.ts +83 -18
  352. package/dist/index.js +2317 -6453
  353. package/dist/index.js.map +1 -1
  354. package/dist/interaction.d.ts +1 -1
  355. package/dist/interaction.js +20 -29
  356. package/dist/interaction.js.map +1 -1
  357. package/dist/latest-question-SXBXROBT.js +118 -0
  358. package/dist/latest-question-SXBXROBT.js.map +1 -0
  359. package/dist/lib/client-config-read.d.ts +31 -0
  360. package/dist/lib/clipboard.d.ts +7 -0
  361. package/dist/lib/error-message.d.ts +7 -0
  362. package/dist/lib/format.d.ts +59 -9
  363. package/dist/lib/host-theme.d.ts +77 -0
  364. package/dist/lib/interaction-errors.d.ts +3 -0
  365. package/dist/lib/menu-styles.d.ts +22 -0
  366. package/dist/lib/notify-observer.d.ts +2 -0
  367. package/dist/lib/pierre-diffs-loader.d.ts +20 -0
  368. package/dist/lib/provider-recovery.d.ts +56 -0
  369. package/dist/lib/scrollbars.d.ts +11 -0
  370. package/dist/lib/terminal-input-readiness.d.ts +11 -0
  371. package/dist/lib/transient-retry.d.ts +26 -0
  372. package/dist/lib/workbench-peers.d.ts +36 -0
  373. package/dist/lib/xterm-theme.d.ts +7 -5
  374. package/dist/machines.js +12 -6
  375. package/dist/{markdown-table-layout-3Z3AWBY7.js → markdown-table-layout-3PV2UAAH.js} +51 -9
  376. package/dist/markdown-table-layout-3PV2UAAH.js.map +1 -0
  377. package/dist/mcp-connection-status.d.ts +15 -0
  378. package/dist/messages/en.d.ts +3328 -0
  379. package/dist/messages/runtime.d.ts +69 -0
  380. package/dist/messages.d.ts +3 -0
  381. package/dist/messages.js +16 -0
  382. package/dist/messages.js.map +1 -0
  383. package/dist/model-mark-paths.d.ts +34 -0
  384. package/dist/model-mark-paths.js +16 -0
  385. package/dist/model-mark-paths.js.map +1 -0
  386. package/dist/model-picker-model.d.ts +112 -0
  387. package/dist/model-picker-model.js +25 -0
  388. package/dist/model-picker-model.js.map +1 -0
  389. package/dist/model-policy-picker-menu-NWIETWSR.js +18 -0
  390. package/dist/model-policy-picker-menu-NWIETWSR.js.map +1 -0
  391. package/dist/model-policy.d.ts +35 -10
  392. package/dist/model-policy.js +12 -1
  393. package/dist/native-previews.d.ts +29 -0
  394. package/dist/native-previews.js +82 -0
  395. package/dist/native-previews.js.map +1 -0
  396. package/dist/new-session-draft.d.ts +7 -0
  397. package/dist/new-session-draft.js +639 -0
  398. package/dist/new-session-draft.js.map +1 -0
  399. package/dist/notification-text.d.ts +27 -0
  400. package/dist/{noto-sans-arabic-loader-IA2T4X2A.js → noto-sans-arabic-loader-XSH2KYWJ.js} +3 -1
  401. package/dist/{noto-sans-arabic-loader-IA2T4X2A.js.map → noto-sans-arabic-loader-XSH2KYWJ.js.map} +1 -1
  402. package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js → noto-sans-jp-loader.generated-MR5L6V7K.js} +3 -1
  403. package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js.map → noto-sans-jp-loader.generated-MR5L6V7K.js.map} +1 -1
  404. package/dist/organization-model.d.ts +33 -0
  405. package/dist/organization-model.js +65 -0
  406. package/dist/organization-model.js.map +1 -0
  407. package/dist/platform-activity-row-VSQ2FZ5T.js +119 -0
  408. package/dist/platform-activity-row-VSQ2FZ5T.js.map +1 -0
  409. package/dist/plugin-details.d.ts +14 -0
  410. package/dist/plugin-discovery.d.ts +25 -0
  411. package/dist/preview-loading-paint.d.ts +20 -0
  412. package/dist/provider.d.ts +37 -2
  413. package/dist/queue-presentation-model.d.ts +73 -0
  414. package/dist/queue-presentation-model.js +38 -0
  415. package/dist/queue-presentation-model.js.map +1 -0
  416. package/dist/{queue-surface-implementation-LK3S4BIW.js → queue-surface-implementation-MEKXXWGR.js} +189 -343
  417. package/dist/queue-surface-implementation-MEKXXWGR.js.map +1 -0
  418. package/dist/realtime/embedded-new-voice.d.ts +1 -0
  419. package/dist/realtime/embedded-voice.d.ts +1 -0
  420. package/dist/realtime/realtime-control.d.ts +4 -65
  421. package/dist/realtime/session-realtime.d.ts +79 -0
  422. package/dist/realtime.js +26 -1333
  423. package/dist/realtime.js.map +1 -1
  424. package/dist/sandbox-files-5NRC2QUT.js +24 -0
  425. package/dist/sandbox-files-5NRC2QUT.js.map +1 -0
  426. package/dist/sandbox-label-model.d.ts +31 -0
  427. package/dist/sandbox-label-model.js +20 -0
  428. package/dist/sandbox-label-model.js.map +1 -0
  429. package/dist/scrollbars.d.ts +1 -0
  430. package/dist/scrollbars.js +10 -0
  431. package/dist/scrollbars.js.map +1 -0
  432. package/dist/secret-reference-label.d.ts +15 -0
  433. package/dist/secrets-ui.d.ts +57 -0
  434. package/dist/session-agents-model.d.ts +11 -0
  435. package/dist/session-agents-model.js +25 -0
  436. package/dist/session-agents-model.js.map +1 -0
  437. package/dist/session-attention-model.d.ts +8 -0
  438. package/dist/session-attention-model.js +47 -0
  439. package/dist/session-attention-model.js.map +1 -0
  440. package/dist/session-auth-recommendation.d.ts +6 -0
  441. package/dist/session-capability-policy.d.ts +32 -0
  442. package/dist/session-context.d.ts +9 -1
  443. package/dist/session-feedback-model.d.ts +21 -0
  444. package/dist/session-feedback-model.js +56 -0
  445. package/dist/session-feedback-model.js.map +1 -0
  446. package/dist/session-list-model.d.ts +139 -0
  447. package/dist/session-list-model.js +274 -0
  448. package/dist/session-list-model.js.map +1 -0
  449. package/dist/session-realtime-OZCE6IKP.js +22 -0
  450. package/dist/session-realtime-OZCE6IKP.js.map +1 -0
  451. package/dist/session-realtime.d.ts +7 -0
  452. package/dist/session-realtime.js +20 -0
  453. package/dist/session-realtime.js.map +1 -0
  454. package/dist/session-status-model.d.ts +37 -0
  455. package/dist/session-ui.d.ts +40 -3
  456. package/dist/session-ui.js +127 -21
  457. package/dist/session-ui.js.map +1 -1
  458. package/dist/session.d.ts +10 -2
  459. package/dist/session.js +44 -20
  460. package/dist/site-snapshot.d.ts +14 -0
  461. package/dist/sites-ui.d.ts +24 -0
  462. package/dist/sites.d.ts +3 -0
  463. package/dist/sites.js +15 -0
  464. package/dist/sites.js.map +1 -0
  465. package/dist/skill-discovery.d.ts +47 -0
  466. package/dist/terminal.d.ts +8 -0
  467. package/dist/terminal.js +33 -0
  468. package/dist/terminal.js.map +1 -0
  469. package/dist/testing/session-scenarios.d.ts +10 -0
  470. package/dist/testing/session-scenarios.js +367 -0
  471. package/dist/testing/session-scenarios.js.map +1 -0
  472. package/dist/this-computer.d.ts +8 -0
  473. package/dist/this-computer.js +1042 -0
  474. package/dist/this-computer.js.map +1 -0
  475. package/dist/timeline/activity-rail.d.ts +12 -2
  476. package/dist/timeline/agent-identity.d.ts +30 -0
  477. package/dist/timeline/agent-row.d.ts +31 -0
  478. package/dist/timeline/allowance-exhausted-row.d.ts +24 -0
  479. package/dist/timeline/compaction-copy.d.ts +47 -0
  480. package/dist/timeline/focus-sequence.d.ts +9 -0
  481. package/dist/timeline/genie-copy.d.ts +4 -0
  482. package/dist/timeline/genie-loading.d.ts +48 -0
  483. package/dist/timeline/index.d.ts +12 -5
  484. package/dist/timeline/invoked-tool.d.ts +6 -0
  485. package/dist/timeline/knowledge-receipt.d.ts +17 -0
  486. package/dist/timeline/learning-refusal-copy.d.ts +23 -0
  487. package/dist/timeline/learning-refusal-row.d.ts +19 -0
  488. package/dist/timeline/message-sender.d.ts +19 -0
  489. package/dist/timeline/notice-presentation.d.ts +14 -0
  490. package/dist/timeline/parsers.d.ts +11 -0
  491. package/dist/timeline/patch-apply-command.d.ts +19 -0
  492. package/dist/timeline/platform-activity-presentation.d.ts +26 -0
  493. package/dist/timeline/platform-activity-row.d.ts +1 -2
  494. package/dist/timeline/presented-image.d.ts +11 -0
  495. package/dist/timeline/projection.d.ts +32 -2
  496. package/dist/timeline/provider-logo.d.ts +15 -0
  497. package/dist/timeline/question-nav-model.d.ts +23 -0
  498. package/dist/timeline/registry.d.ts +10 -1
  499. package/dist/timeline/retained-image.d.ts +18 -0
  500. package/dist/timeline/retained-loaders.d.ts +27 -0
  501. package/dist/timeline/rolling-activity.d.ts +11 -0
  502. package/dist/timeline/screenshot-lightbox.d.ts +23 -1
  503. package/dist/timeline/session-usage-limit-row.d.ts +11 -0
  504. package/dist/timeline/shared.d.ts +8 -3
  505. package/dist/timeline/startup-dispatch-details.d.ts +5 -0
  506. package/dist/timeline/startup-preference.d.ts +3 -0
  507. package/dist/timeline/startup-timings.d.ts +4 -0
  508. package/dist/timeline/tool-display-name.d.ts +6 -2
  509. package/dist/timeline/tool-presentation.d.ts +185 -0
  510. package/dist/timeline/turn-summary-model.d.ts +102 -0
  511. package/dist/timeline/turn-summary.d.ts +20 -54
  512. package/dist/timeline/types.d.ts +184 -7
  513. package/dist/timeline/work-presentation.d.ts +61 -0
  514. package/dist/{timeline-annotation-markers-DRSTLEM6.js → timeline-annotation-markers-HYLRTT6S.js} +11 -6
  515. package/dist/timeline-annotation-markers-HYLRTT6S.js.map +1 -0
  516. package/dist/{timeline-annotation-selection-IHLUGVND.js → timeline-annotation-selection-LBKW5GHA.js} +15 -5
  517. package/dist/timeline-annotation-selection-LBKW5GHA.js.map +1 -0
  518. package/dist/{timeline-annotations-dialog-6Q53N5FG.js → timeline-annotations-dialog-JKVINC42.js} +34 -19
  519. package/dist/timeline-annotations-dialog-JKVINC42.js.map +1 -0
  520. package/dist/timeline-model.d.ts +29 -0
  521. package/dist/timeline-model.js +254 -0
  522. package/dist/timeline-model.js.map +1 -0
  523. package/dist/usage/allowance-copy.d.ts +26 -0
  524. package/dist/usage/session-usage-limit.d.ts +89 -0
  525. package/dist/usage/summary.d.ts +35 -0
  526. package/dist/usage.d.ts +17 -0
  527. package/dist/usage.js +1201 -0
  528. package/dist/usage.js.map +1 -0
  529. package/dist/voice-recording-owner.d.ts +7 -0
  530. package/package.json +119 -7
  531. package/src/approvals.ts +8 -1
  532. package/src/artifacts-spreadsheet.ts +1 -0
  533. package/src/artifacts.ts +41 -0
  534. package/src/assets/README.md +8 -0
  535. package/src/assets/gmail.ico +0 -0
  536. package/src/assets/outlook.ico +0 -0
  537. package/src/capability-catalog-row.tsx +96 -0
  538. package/src/capability-logo-fallback.ts +22 -0
  539. package/src/client.ts +18 -30
  540. package/src/commands/registry.ts +46 -36
  541. package/src/commands/types.ts +2 -0
  542. package/src/components/anthropic-mark.tsx +10 -0
  543. package/src/components/approval-surface.tsx +407 -142
  544. package/src/components/artifacts/artifact-chrome.tsx +425 -0
  545. package/src/components/artifacts/artifact-sandbox.tsx +193 -0
  546. package/src/components/artifacts/artifact-surface.tsx +48 -26
  547. package/src/components/artifacts/chat-interactive-block.tsx +260 -0
  548. package/src/components/artifacts/deferred-chat-media.tsx +72 -0
  549. package/src/components/artifacts/document-editor.tsx +193 -45
  550. package/src/components/artifacts/editable-artifact-ui.tsx +23 -11
  551. package/src/components/artifacts/editable-artifact-view.tsx +199 -0
  552. package/src/components/artifacts/editable-artifact-workbench.tsx +8 -3
  553. package/src/components/artifacts/editable-document.tsx +76 -54
  554. package/src/components/artifacts/editable-presentation.tsx +86 -40
  555. package/src/components/artifacts/editable-spreadsheet.tsx +581 -121
  556. package/src/components/artifacts/index.ts +42 -0
  557. package/src/components/artifacts/inline-html-document.ts +24 -0
  558. package/src/components/artifacts/latest-task-runner.ts +49 -0
  559. package/src/components/artifacts/presentation-editor.tsx +422 -122
  560. package/src/components/artifacts/published-html-artifact-frame.tsx +79 -265
  561. package/src/components/artifacts/session-artifact-viewer.tsx +381 -0
  562. package/src/components/artifacts/site-view.tsx +129 -0
  563. package/src/components/artifacts/spreadsheet-canvas.ts +5 -10
  564. package/src/components/artifacts/spreadsheet-command-queue.ts +190 -0
  565. package/src/components/artifacts/spreadsheet-download.tsx +117 -0
  566. package/src/components/artifacts/spreadsheet-general-display.ts +43 -0
  567. package/src/components/artifacts/spreadsheet-grid.tsx +390 -172
  568. package/src/components/artifacts/spreadsheet-resize.tsx +432 -0
  569. package/src/components/artifacts/spreadsheet-submissions.tsx +46 -0
  570. package/src/components/artifacts/visualization-assets/base.css +1015 -0
  571. package/src/components/artifacts/visualization-assets/helpers.html +349 -0
  572. package/src/components/artifacts/visualization-assets.gen.ts +3 -0
  573. package/src/components/browser-select-control.tsx +320 -0
  574. package/src/components/browser-viewer.tsx +1102 -505
  575. package/src/components/chat-composer.tsx +42 -3
  576. package/src/components/child-session-link.tsx +16 -5
  577. package/src/components/claude-mark.tsx +11 -0
  578. package/src/components/code-editor.tsx +38 -27
  579. package/src/components/command-palette.tsx +4 -1
  580. package/src/components/composer-transcription-control.tsx +151 -50
  581. package/src/components/composer.tsx +281 -176
  582. package/src/components/computer-viewer.tsx +1013 -341
  583. package/src/components/copy-button.tsx +17 -7
  584. package/src/components/desktop-viewer.tsx +42 -33
  585. package/src/components/diff-view.tsx +3 -1
  586. package/src/components/enrollment-consent.tsx +39 -34
  587. package/src/components/enrollment-device-flow.tsx +31 -19
  588. package/src/components/file-browser.tsx +47 -35
  589. package/src/components/fleet-tile.tsx +8 -4
  590. package/src/components/generated-video-player.tsx +10 -5
  591. package/src/components/grok-mark.tsx +34 -0
  592. package/src/components/human-input-form.tsx +438 -251
  593. package/src/components/human-input-surface.tsx +8 -0
  594. package/src/components/interaction-intervention-banner.tsx +15 -13
  595. package/src/components/linkified-text.tsx +79 -0
  596. package/src/components/machine-card.tsx +56 -89
  597. package/src/components/machine-dock-bar.tsx +10 -4
  598. package/src/components/machine-health-pill.tsx +4 -2
  599. package/src/components/machine-input-display.ts +309 -34
  600. package/src/components/machine-metrics.tsx +10 -7
  601. package/src/components/machine-status-pill.tsx +23 -15
  602. package/src/components/machines/agent-status-icon.tsx +31 -0
  603. package/src/components/machines/health.ts +53 -10
  604. package/src/components/machines/machine-detail.tsx +230 -42
  605. package/src/components/machines/machine-operation-policy.tsx +36 -29
  606. package/src/components/machines/machine-status.ts +264 -0
  607. package/src/components/machines/metric-history-chart.tsx +8 -2
  608. package/src/components/machines/series.ts +12 -11
  609. package/src/components/machines-dashboard.tsx +16 -9
  610. package/src/components/markdown-table-layout.ts +67 -9
  611. package/src/components/markdown.tsx +470 -133
  612. package/src/components/message-timeline.tsx +2290 -752
  613. package/src/components/model-mark.tsx +102 -0
  614. package/src/components/model-picker.tsx +27 -9
  615. package/src/components/model-policy-picker-menu.tsx +204 -100
  616. package/src/components/model-policy-picker.tsx +215 -152
  617. package/src/components/new-conversation.tsx +223 -0
  618. package/src/components/open-geni-chat.tsx +311 -0
  619. package/src/components/open-geni-links.tsx +183 -0
  620. package/src/components/openrouter-mark.tsx +13 -0
  621. package/src/components/opper-mark.tsx +18 -0
  622. package/src/components/pierre-diff.tsx +47 -19
  623. package/src/components/pierre-file.tsx +38 -11
  624. package/src/components/preview-loading.tsx +111 -0
  625. package/src/components/provider-recovery-notice.tsx +51 -0
  626. package/src/components/queue-item-content.ts +16 -0
  627. package/src/components/queue-surface-implementation.tsx +185 -420
  628. package/src/components/queue-surface-state.tsx +13 -8
  629. package/src/components/queue-surface.tsx +3 -1
  630. package/src/components/rehype-secret-refs.ts +98 -0
  631. package/src/components/remark-soft-line-breaks.ts +166 -0
  632. package/src/components/sandbox-files.tsx +75 -44
  633. package/src/components/sandbox-terminal.tsx +103 -22
  634. package/src/components/sandbox-workspace.tsx +168 -78
  635. package/src/components/secret-question-field.tsx +326 -0
  636. package/src/components/secret-ref-chip.tsx +187 -0
  637. package/src/components/session-capability-frame.tsx +203 -0
  638. package/src/components/session-chrome.tsx +559 -328
  639. package/src/components/session-commands-panel.tsx +34 -17
  640. package/src/components/session-commands.tsx +18 -0
  641. package/src/components/session-connection-request.tsx +99 -0
  642. package/src/components/session-conversation.tsx +853 -118
  643. package/src/components/session-list.tsx +259 -0
  644. package/src/components/session-mcp-capability-card.tsx +681 -0
  645. package/src/components/session-proxy-scope.tsx +160 -0
  646. package/src/components/session-status.tsx +35 -21
  647. package/src/components/session-usage-limit-notice.tsx +176 -0
  648. package/src/components/this-computer/illustrations.tsx +164 -0
  649. package/src/components/this-computer/labels.ts +234 -0
  650. package/src/components/this-computer/this-computer-card.tsx +203 -0
  651. package/src/components/this-computer/this-computer-setup.tsx +433 -0
  652. package/src/components/this-computer/this-computer-status.tsx +329 -0
  653. package/src/components/this-computer/use-this-computer.ts +183 -0
  654. package/src/components/timeline-anchor.tsx +43 -15
  655. package/src/components/timeline-annotation-chrome.tsx +33 -9
  656. package/src/components/timeline-annotation-markers.tsx +4 -2
  657. package/src/components/timeline-annotation-selection.tsx +11 -2
  658. package/src/components/timeline-annotation-shared.ts +9 -8
  659. package/src/components/timeline-annotations-dialog.tsx +30 -9
  660. package/src/components/timeline-annotations.tsx +24 -7
  661. package/src/components/timeline-reading-progress.ts +80 -0
  662. package/src/components/timeline-search.tsx +168 -0
  663. package/src/components/timeline-settlement.ts +60 -0
  664. package/src/components/tool-action-review.tsx +670 -0
  665. package/src/components/tool-review-history.tsx +88 -0
  666. package/src/components/usage-limit-notice.tsx +183 -0
  667. package/src/components/usage-member-list.tsx +797 -0
  668. package/src/components/usage-meter.tsx +386 -0
  669. package/src/components/use-viewer-menu-dismiss.ts +33 -0
  670. package/src/components/user-message-body.tsx +33 -2
  671. package/src/components/workbench-changes.tsx +28 -16
  672. package/src/components/workspace-dock.tsx +45 -13
  673. package/src/composer-messages.ts +153 -0
  674. package/src/composer-voice-events.ts +12 -0
  675. package/src/composer.ts +4 -0
  676. package/src/connect-account-identity.tsx +38 -0
  677. package/src/connect-accounts.tsx +233 -0
  678. package/src/connect-chooser.tsx +339 -0
  679. package/src/connect-panel.tsx +104 -0
  680. package/src/connect-setup.tsx +354 -0
  681. package/src/connect.ts +60 -0
  682. package/src/connection-assets.d.ts +4 -0
  683. package/src/connection-catalog.tsx +175 -0
  684. package/src/connection-discovery.tsx +251 -0
  685. package/src/connection-installed.tsx +56 -0
  686. package/src/connection-logo.tsx +37 -0
  687. package/src/connection-service-logo.tsx +55 -0
  688. package/src/connection-service-presentation.ts +46 -0
  689. package/src/connection-skeleton.tsx +16 -0
  690. package/src/connection-type-picker.tsx +38 -0
  691. package/src/conversation-timeline.ts +11 -2
  692. package/src/desktop.ts +24 -0
  693. package/src/device-authorization.tsx +111 -0
  694. package/src/diffs.ts +16 -0
  695. package/src/discovery-cache.ts +42 -0
  696. package/src/editor.ts +13 -0
  697. package/src/hooks/internal.ts +93 -10
  698. package/src/hooks/latest-question.ts +168 -0
  699. package/src/hooks/session-view-cache.ts +167 -0
  700. package/src/hooks/shared-machines-list.ts +34 -1
  701. package/src/hooks/shared-query.ts +744 -0
  702. package/src/hooks/use-attached-browsers.ts +1 -1
  703. package/src/hooks/use-auth-runs.ts +0 -27
  704. package/src/hooks/use-available-models.ts +20 -10
  705. package/src/hooks/use-browser-frame-stream.ts +23 -4
  706. package/src/hooks/use-browser-session.ts +684 -206
  707. package/src/hooks/use-browser-sessions.ts +32 -1
  708. package/src/hooks/use-client-config-flags.ts +102 -0
  709. package/src/hooks/use-codex-accounts.ts +216 -43
  710. package/src/hooks/use-composer.ts +240 -59
  711. package/src/hooks/use-computer-frame-stream.ts +29 -9
  712. package/src/hooks/use-computer-input-posture.ts +96 -0
  713. package/src/hooks/use-computer-session.ts +419 -100
  714. package/src/hooks/use-connect.ts +23 -0
  715. package/src/hooks/use-desktop-stream.ts +19 -28
  716. package/src/hooks/use-file-attachments.ts +19 -3
  717. package/src/hooks/use-goal.ts +172 -21
  718. package/src/hooks/use-human-input.ts +16 -2
  719. package/src/hooks/use-last-started-turn-policy.ts +37 -11
  720. package/src/hooks/use-machine-chip.ts +13 -8
  721. package/src/hooks/use-machines.ts +24 -10
  722. package/src/hooks/use-new-conversation.ts +377 -0
  723. package/src/hooks/use-new-session-draft.ts +813 -0
  724. package/src/hooks/use-realtime-voice-models.ts +46 -0
  725. package/src/hooks/use-sandbox-files.ts +22 -16
  726. package/src/hooks/use-session-background-commands.ts +2 -2
  727. package/src/hooks/use-session-capabilities.ts +3 -2
  728. package/src/hooks/use-session-conversation.ts +150 -0
  729. package/src/hooks/use-session-events.ts +403 -64
  730. package/src/hooks/use-session-lineage.ts +47 -9
  731. package/src/hooks/use-session-mcp-approval-policy.ts +13 -5
  732. package/src/hooks/use-session-model-account.ts +174 -0
  733. package/src/hooks/use-session.ts +19 -3
  734. package/src/hooks/use-slash-commands.ts +6 -11
  735. package/src/hooks/use-supergrok-accounts.ts +22 -8
  736. package/src/hooks/use-terminal-stream.ts +153 -27
  737. package/src/hooks/use-transcription.ts +45 -19
  738. package/src/hooks/use-turn-queue.ts +25 -5
  739. package/src/hooks/use-usage.ts +100 -0
  740. package/src/hooks/use-vaults.ts +153 -0
  741. package/src/hooks/use-video-artifact-playback.ts +1 -1
  742. package/src/hooks/use-voice-input.ts +127 -19
  743. package/src/hooks/use-workspace-capture.ts +3 -2
  744. package/src/hooks/use-workspace-sessions.ts +74 -7
  745. package/src/human-input-model.ts +374 -0
  746. package/src/identity-link-accounts.tsx +149 -0
  747. package/src/identity-link-consent.tsx +193 -0
  748. package/src/index.ts +282 -16
  749. package/src/interaction.ts +1 -0
  750. package/src/lib/client-config-read.ts +76 -0
  751. package/src/lib/clipboard.ts +29 -0
  752. package/src/lib/error-message.ts +37 -0
  753. package/src/lib/format.ts +231 -36
  754. package/src/lib/host-theme.ts +529 -0
  755. package/src/lib/interaction-errors.ts +15 -0
  756. package/src/lib/menu-styles.ts +44 -0
  757. package/src/lib/notify-observer.ts +15 -0
  758. package/src/lib/pierre-diffs-loader.ts +53 -0
  759. package/src/lib/provider-recovery.ts +255 -0
  760. package/src/lib/scrollbars.ts +30 -0
  761. package/src/lib/terminal-input-readiness.ts +51 -0
  762. package/src/lib/transient-retry.ts +101 -0
  763. package/src/lib/workbench-peers.ts +62 -0
  764. package/src/lib/xterm-theme.ts +23 -21
  765. package/src/mcp-connection-status.ts +39 -0
  766. package/src/messages/en.ts +3810 -0
  767. package/src/messages/runtime.tsx +175 -0
  768. package/src/messages.ts +19 -0
  769. package/src/model-mark-paths.ts +53 -0
  770. package/src/model-picker-model.ts +343 -0
  771. package/src/model-policy.ts +301 -79
  772. package/src/native-previews.ts +104 -0
  773. package/src/new-session-draft.ts +22 -0
  774. package/src/notification-text.ts +81 -0
  775. package/src/organization-model.ts +123 -0
  776. package/src/plugin-details.tsx +192 -0
  777. package/src/plugin-discovery.tsx +209 -0
  778. package/src/preview-loading-paint.ts +68 -0
  779. package/src/provider.tsx +105 -21
  780. package/src/queue-presentation-model.ts +475 -0
  781. package/src/realtime/dropdown-menu.tsx +19 -12
  782. package/src/realtime/embedded-new-voice.tsx +1 -0
  783. package/src/realtime/embedded-voice.tsx +3 -0
  784. package/src/realtime/realtime-control.tsx +240 -609
  785. package/src/realtime/session-realtime.ts +582 -0
  786. package/src/sandbox-label-model.ts +56 -0
  787. package/src/scrollbars.ts +3 -0
  788. package/src/secret-reference-label.ts +47 -0
  789. package/src/secrets-ui.tsx +59 -0
  790. package/src/session-agents-model.ts +40 -0
  791. package/src/session-attention-model.ts +62 -0
  792. package/src/session-auth-recommendation.ts +50 -0
  793. package/src/session-capability-policy.ts +200 -0
  794. package/src/session-context.ts +13 -5
  795. package/src/session-feedback-model.ts +101 -0
  796. package/src/session-list-model.ts +437 -0
  797. package/src/session-realtime.ts +18 -0
  798. package/src/session-status-model.ts +99 -0
  799. package/src/session-ui.ts +102 -3
  800. package/src/session.ts +19 -1
  801. package/src/site-snapshot.ts +74 -0
  802. package/src/sites-ui.tsx +350 -0
  803. package/src/sites.ts +3 -0
  804. package/src/skill-discovery.tsx +221 -0
  805. package/src/terminal.ts +26 -0
  806. package/src/testing/session-scenarios.ts +404 -0
  807. package/src/this-computer.ts +62 -0
  808. package/src/timeline/activity-rail.tsx +289 -119
  809. package/src/timeline/agent-identity.tsx +84 -0
  810. package/src/timeline/agent-row.tsx +235 -0
  811. package/src/timeline/allowance-exhausted-row.tsx +90 -0
  812. package/src/timeline/compaction-copy.ts +125 -0
  813. package/src/timeline/fleet-decision-row.tsx +120 -101
  814. package/src/timeline/focus-sequence.ts +44 -0
  815. package/src/timeline/genie-copy.ts +22 -0
  816. package/src/timeline/genie-loading.tsx +158 -0
  817. package/src/timeline/index.ts +37 -2
  818. package/src/timeline/invoked-tool.ts +15 -0
  819. package/src/timeline/knowledge-receipt.tsx +104 -0
  820. package/src/timeline/learning-refusal-copy.ts +67 -0
  821. package/src/timeline/learning-refusal-row.tsx +70 -0
  822. package/src/timeline/message-sender.tsx +71 -0
  823. package/src/timeline/notice-presentation.ts +67 -0
  824. package/src/timeline/parsers.ts +42 -2
  825. package/src/timeline/patch-apply-command.tsx +139 -0
  826. package/src/timeline/platform-activity-presentation.ts +219 -0
  827. package/src/timeline/platform-activity-row.tsx +34 -98
  828. package/src/timeline/presented-image.ts +63 -0
  829. package/src/timeline/projection.ts +1556 -71
  830. package/src/timeline/provider-logo.tsx +53 -0
  831. package/src/timeline/question-nav-model.ts +28 -0
  832. package/src/timeline/registry.ts +11 -1
  833. package/src/timeline/retained-image.ts +102 -0
  834. package/src/timeline/retained-loaders.ts +91 -0
  835. package/src/timeline/rolling-activity.tsx +84 -0
  836. package/src/timeline/screenshot-lightbox.tsx +250 -10
  837. package/src/timeline/session-usage-limit-row.tsx +44 -0
  838. package/src/timeline/shared.tsx +76 -29
  839. package/src/timeline/startup-dispatch-details.tsx +43 -0
  840. package/src/timeline/startup-preference.ts +33 -0
  841. package/src/timeline/startup-timings.tsx +164 -0
  842. package/src/timeline/tool-diff.tsx +3 -1
  843. package/src/timeline/tool-display-name.ts +38 -6
  844. package/src/timeline/tool-presentation.ts +1552 -0
  845. package/src/timeline/tool-renderers.tsx +1019 -1265
  846. package/src/timeline/turn-summary-model.ts +363 -0
  847. package/src/timeline/turn-summary.tsx +288 -367
  848. package/src/timeline/types.ts +191 -7
  849. package/src/timeline/work-presentation.ts +196 -0
  850. package/src/timeline-model.ts +143 -0
  851. package/src/usage/allowance-copy.ts +70 -0
  852. package/src/usage/session-usage-limit.ts +270 -0
  853. package/src/usage/summary.ts +93 -0
  854. package/src/usage.ts +70 -0
  855. package/src/voice-recording-owner.ts +22 -0
  856. package/styles/compiled.css +2010 -651
  857. package/styles/connect.css +290 -0
  858. package/styles/connect.d.ts +1 -0
  859. package/styles/effective-tokens.css +1 -0
  860. package/styles/index.css +286 -9
  861. package/styles/responsive.css +98 -6
  862. package/styles/session-capability.css +44 -0
  863. package/styles/this-computer.css +1042 -0
  864. package/styles/this-computer.d.ts +1 -0
  865. package/styles/tokens.css +132 -64
  866. package/dist/browser-viewer-NTD6UIPR.js +0 -14
  867. package/dist/chunk-24M4YBCL.js.map +0 -1
  868. package/dist/chunk-4MDLEHXL.js.map +0 -1
  869. package/dist/chunk-5M6VTFJ5.js.map +0 -1
  870. package/dist/chunk-5PQJOCX5.js +0 -902
  871. package/dist/chunk-5PQJOCX5.js.map +0 -1
  872. package/dist/chunk-5YK2ZDIG.js.map +0 -1
  873. package/dist/chunk-6J56T3MG.js.map +0 -1
  874. package/dist/chunk-BV5A4OTE.js.map +0 -1
  875. package/dist/chunk-CQG7YUJB.js +0 -10883
  876. package/dist/chunk-CQG7YUJB.js.map +0 -1
  877. package/dist/chunk-H5YGYNXS.js.map +0 -1
  878. package/dist/chunk-HUIKIDM5.js.map +0 -1
  879. package/dist/chunk-HUMIRRYI.js.map +0 -1
  880. package/dist/chunk-ICA6R6TW.js.map +0 -1
  881. package/dist/chunk-JVYQRRC4.js.map +0 -1
  882. package/dist/chunk-KCGXPP5V.js.map +0 -1
  883. package/dist/chunk-KZ73RL76.js.map +0 -1
  884. package/dist/chunk-NEXLLTP4.js.map +0 -1
  885. package/dist/chunk-NLTS7JHI.js.map +0 -1
  886. package/dist/chunk-NOSYBS2D.js.map +0 -1
  887. package/dist/chunk-PAJU5KKL.js.map +0 -1
  888. package/dist/chunk-PEI6RANI.js.map +0 -1
  889. package/dist/chunk-PLYRL5ER.js +0 -164
  890. package/dist/chunk-PLYRL5ER.js.map +0 -1
  891. package/dist/chunk-R4KRSFGA.js +0 -290
  892. package/dist/chunk-R4KRSFGA.js.map +0 -1
  893. package/dist/chunk-UMECRJRV.js +0 -223
  894. package/dist/chunk-UMECRJRV.js.map +0 -1
  895. package/dist/chunk-VRBL3F5E.js +0 -241
  896. package/dist/chunk-VRBL3F5E.js.map +0 -1
  897. package/dist/chunk-YBM6CQRU.js.map +0 -1
  898. package/dist/chunk-Z7WBDB4E.js.map +0 -1
  899. package/dist/computer-viewer-7TEZC6Y2.js +0 -16
  900. package/dist/fleet-decision-row-YZ3ZKWMM.js +0 -352
  901. package/dist/fleet-decision-row-YZ3ZKWMM.js.map +0 -1
  902. package/dist/hooks/use-environments.d.ts +0 -41
  903. package/dist/hooks/use-packs.d.ts +0 -32
  904. package/dist/markdown-table-layout-3Z3AWBY7.js.map +0 -1
  905. package/dist/model-policy-picker-menu-3R336DP2.js +0 -13
  906. package/dist/platform-activity-row-27LKAWZD.js +0 -169
  907. package/dist/platform-activity-row-27LKAWZD.js.map +0 -1
  908. package/dist/queue-surface-implementation-LK3S4BIW.js.map +0 -1
  909. package/dist/timeline-annotation-markers-DRSTLEM6.js.map +0 -1
  910. package/dist/timeline-annotation-selection-IHLUGVND.js.map +0 -1
  911. package/dist/timeline-annotations-dialog-6Q53N5FG.js.map +0 -1
  912. package/src/hooks/use-environments.ts +0 -182
  913. package/src/hooks/use-packs.ts +0 -157
  914. /package/dist/{browser-viewer-NTD6UIPR.js.map → browser-viewer-GEHX3KYE.js.map} +0 -0
  915. /package/dist/{computer-viewer-7TEZC6Y2.js.map → chat-interactive-block-5V3BGLXT.js.map} +0 -0
  916. /package/dist/{model-policy-picker-menu-3R336DP2.js.map → chunk-M357MHH3.js.map} +0 -0
@@ -0,0 +1,1936 @@
1
+ "use client";
2
+ import {
3
+ prefersReducedMotion
4
+ } from "./chunk-OYQQJL3J.js";
5
+ import {
6
+ annotatableText,
7
+ rangeFromOffsets,
8
+ visibleClientRect
9
+ } from "./chunk-DN3TKURW.js";
10
+ import {
11
+ chainLinkResolvers,
12
+ useOpenGeniLinkResolver
13
+ } from "./chunk-BQYQU5QW.js";
14
+ import {
15
+ secretReferenceLabel
16
+ } from "./chunk-DNJ23AWQ.js";
17
+ import {
18
+ paintPreviewLoading
19
+ } from "./chunk-UNJPZGNK.js";
20
+ import {
21
+ copyTextToClipboard,
22
+ tableElementToTsv
23
+ } from "./chunk-PEHTX3V7.js";
24
+ import {
25
+ Tooltip,
26
+ TooltipContent,
27
+ TooltipProvider,
28
+ TooltipTrigger,
29
+ useLightboxOptional
30
+ } from "./chunk-7CZLTFXF.js";
31
+ import {
32
+ stringifyPayload
33
+ } from "./chunk-AIX25FIQ.js";
34
+ import {
35
+ cn
36
+ } from "./chunk-TXS65BB2.js";
37
+ import {
38
+ useOpenGeniText
39
+ } from "./chunk-VU4QUISJ.js";
40
+
41
+ // src/secrets-ui.tsx
42
+ import { createContext, useContext } from "react";
43
+ import { jsx } from "react/jsx-runtime";
44
+ var SecretsUiContext = createContext(null);
45
+ function SecretsUiProvider({
46
+ value,
47
+ children
48
+ }) {
49
+ return /* @__PURE__ */ jsx(SecretsUiContext.Provider, { value, children });
50
+ }
51
+ function useSecretsUi() {
52
+ return useContext(SecretsUiContext);
53
+ }
54
+
55
+ // src/components/secret-ref-chip.tsx
56
+ import { FileLockIcon, LockIcon } from "lucide-react";
57
+ import { Fragment } from "react";
58
+ import { Fragment as Fragment2, jsx as jsx2, jsxs } from "react/jsx-runtime";
59
+ var CHIP_CLASS = (
60
+ // em-relative so one chip reads right in prose, payload mono runs and titles.
61
+ "og-secret-chip inline-flex max-w-full min-w-0 items-center gap-[0.3em] rounded-full border border-og-border bg-og-surface-2 px-[0.5em] align-baseline font-og-sans text-[0.9em] leading-[1.45] font-medium not-italic text-og-fg no-underline [overflow-wrap:normal] [word-break:normal]"
62
+ );
63
+ function SecretChipFrame({
64
+ icon,
65
+ primary,
66
+ suffix,
67
+ title,
68
+ srPrefix,
69
+ href,
70
+ className,
71
+ dataAttributes
72
+ }) {
73
+ const Icon = icon === "file" ? FileLockIcon : LockIcon;
74
+ const body = /* @__PURE__ */ jsxs(Fragment2, { children: [
75
+ /* @__PURE__ */ jsx2(Icon, { "aria-hidden": "true", className: "size-[1em] shrink-0 text-og-fg-muted" }),
76
+ /* @__PURE__ */ jsx2("span", { className: "sr-only", children: srPrefix }),
77
+ /* @__PURE__ */ jsx2("span", { className: "min-w-0 max-w-[18em] truncate", children: primary }),
78
+ suffix ? /* @__PURE__ */ jsx2("span", { className: "shrink-0 whitespace-nowrap", children: suffix }) : null
79
+ ] });
80
+ if (href) {
81
+ return /* @__PURE__ */ jsx2(
82
+ "a",
83
+ {
84
+ href,
85
+ title,
86
+ className: cn(
87
+ CHIP_CLASS,
88
+ "cursor-pointer transition-colors hover:border-og-border-strong hover:bg-og-surface-3 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-og-accent/55",
89
+ className
90
+ ),
91
+ ...dataAttributes,
92
+ children: body
93
+ }
94
+ );
95
+ }
96
+ return /* @__PURE__ */ jsx2("span", { title, className: cn(CHIP_CLASS, className), ...dataAttributes, children: body });
97
+ }
98
+ function SecretRefChip({ reference, linkable = true, className }) {
99
+ const ui = useSecretsUi();
100
+ return /* @__PURE__ */ jsx2(SecretRefChipView, { ui, reference, linkable, className });
101
+ }
102
+ function SecretRefChipView({
103
+ ui,
104
+ reference,
105
+ linkable,
106
+ className
107
+ }) {
108
+ const t = useOpenGeniText();
109
+ const label = secretReferenceLabel(t, reference);
110
+ const href = linkable ? ui?.hrefForReference?.(reference) ?? null : null;
111
+ return /* @__PURE__ */ jsx2(
112
+ SecretChipFrame,
113
+ {
114
+ icon: reference.kind === "secretfile" ? "file" : "lock",
115
+ primary: label.primary,
116
+ suffix: label.suffix,
117
+ title: reference.raw,
118
+ srPrefix: `${reference.kind === "secretfile" ? t("secretRefChip.secretFile") : t("secretRefChip.secret")} `,
119
+ href,
120
+ className,
121
+ dataAttributes: { "data-og-secret-ref": reference.raw }
122
+ }
123
+ );
124
+ }
125
+ function SecretRefText({ text, linkable = true, chipClassName }) {
126
+ const ui = useSecretsUi();
127
+ return /* @__PURE__ */ jsx2(Fragment2, { children: renderSecretRefText(ui, text, { linkable, chipClassName }) });
128
+ }
129
+ function mayContainSecretReference(text) {
130
+ return text.includes("{{secret");
131
+ }
132
+ function renderSecretRefText(ui, text, options = {}) {
133
+ if (!ui || !mayContainSecretReference(text)) return text;
134
+ const tokens = ui.tokenize(text);
135
+ if (!tokens.some((token) => token.type === "reference")) return text;
136
+ let offset = 0;
137
+ return tokens.map((token) => {
138
+ if (token.type === "reference") {
139
+ offset = token.reference.end;
140
+ return /* @__PURE__ */ jsx2(
141
+ SecretRefChipView,
142
+ {
143
+ ui,
144
+ reference: token.reference,
145
+ linkable: options.linkable ?? true,
146
+ className: options.chipClassName
147
+ },
148
+ `ref-${token.reference.start}`
149
+ );
150
+ }
151
+ if (token.type === "invalid") {
152
+ offset = token.end;
153
+ return /* @__PURE__ */ jsx2(Fragment, { children: token.raw }, `invalid-${token.start}`);
154
+ }
155
+ return /* @__PURE__ */ jsx2(Fragment, { children: token.value }, `text-${offset}`);
156
+ });
157
+ }
158
+ function SecretAnswerChip({ result, label, className }) {
159
+ return /* @__PURE__ */ jsx2(
160
+ SecretChipFrame,
161
+ {
162
+ icon: "lock",
163
+ primary: label,
164
+ suffix: result.username ? ` \xB7 ${result.username}` : "",
165
+ title: result.reference,
166
+ srPrefix: "",
167
+ className: cn("text-og-sm", className),
168
+ dataAttributes: { "data-og-secret-answer": result.reference }
169
+ }
170
+ );
171
+ }
172
+
173
+ // src/timeline/disclosure-context.tsx
174
+ import { createContext as createContext2, useContext as useContext2 } from "react";
175
+ import { jsx as jsx3 } from "react/jsx-runtime";
176
+ var DisclosureDefaultsContext = createContext2(void 0);
177
+ function DisclosureDefaultsProvider({
178
+ defaultOpen,
179
+ children
180
+ }) {
181
+ return /* @__PURE__ */ jsx3(DisclosureDefaultsContext.Provider, { value: defaultOpen, children });
182
+ }
183
+ function useForcedDefaultOpen() {
184
+ return useContext2(DisclosureDefaultsContext);
185
+ }
186
+
187
+ // src/timeline/shared.tsx
188
+ import { CameraIcon, CameraOffIcon, ChevronRightIcon } from "lucide-react";
189
+ import { createContext as createContext4, useContext as useContext4, useEffect, useState } from "react";
190
+
191
+ // src/components/timeline-search.tsx
192
+ import { createContext as createContext3, useContext as useContext3, useLayoutEffect, useRef } from "react";
193
+ var TimelineSearchRevealContext = createContext3(null);
194
+ var useTimelineSearchReveal = () => useContext3(TimelineSearchRevealContext);
195
+ function isTimelineSearchTarget(item, target) {
196
+ const sources = item.sourceEvents ?? ("annotationSource" in item && item.annotationSource ? [item.annotationSource] : []);
197
+ return sources.some(
198
+ (source) => source.sequence === target.sequence && (!target.eventId || source.eventId === target.eventId)
199
+ );
200
+ }
201
+ function literalSearchOffset(text, query, occurrence = 0) {
202
+ if (!query || !Number.isSafeInteger(occurrence) || occurrence < 0) return -1;
203
+ const pattern = new RegExp(query.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "giu");
204
+ let match;
205
+ let index = 0;
206
+ while (match = pattern.exec(text)) {
207
+ if (index++ === occurrence) return match.index;
208
+ }
209
+ return -1;
210
+ }
211
+ function matchAtOffset(text, query, offset) {
212
+ if (!query || !Number.isSafeInteger(offset) || offset < 0 || offset > text.length) return -1;
213
+ const pattern = new RegExp(query.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "iyu");
214
+ pattern.lastIndex = offset;
215
+ return pattern.exec(text)?.index === offset ? offset : -1;
216
+ }
217
+ function searchMatchOffset(text, target) {
218
+ if (target.offset != null) return matchAtOffset(text, target.query, target.offset);
219
+ return literalSearchOffset(text, target.query, target.occurrence);
220
+ }
221
+ var nextHighlightId = 0;
222
+ function useTimelineSearchNavigation(root, itemId, target, releasePin, revision) {
223
+ const highlightName = useRef("");
224
+ if (!highlightName.current) highlightName.current = `og-search-${++nextHighlightId}`;
225
+ const key = target ? JSON.stringify([
226
+ itemId,
227
+ target.sequence,
228
+ target.eventId,
229
+ target.query,
230
+ target.occurrence ?? 0,
231
+ target.offset ?? null
232
+ ]) : null;
233
+ const navigated = useRef(null);
234
+ useLayoutEffect(() => {
235
+ if (!key) navigated.current = null;
236
+ if (!key || !target || !itemId || !root.current) return;
237
+ releasePin();
238
+ const scroller = root.current;
239
+ const registry = globalThis.CSS?.highlights;
240
+ const HighlightClass = globalThis.Highlight;
241
+ const style = document.createElement("style");
242
+ style.textContent = `::highlight(${highlightName.current}) { background: var(--og-color-accent-deep); color: var(--og-color-accent-fg); }`;
243
+ scroller.append(style);
244
+ let frame = 0;
245
+ const update = () => {
246
+ const source = [...scroller.querySelectorAll("[data-og-search-item]")].find(
247
+ (element) => element.dataset.ogSearchItem === itemId
248
+ );
249
+ if (!source) return;
250
+ const materialized = [
251
+ ...source.querySelectorAll("[data-og-search-occurrence]")
252
+ ].find(
253
+ (element) => element.dataset.ogSearchSequence === String(target.sequence) && element.dataset.ogSearchQuery === target.query && (target.offset != null ? element.dataset.ogSearchOffset === String(target.offset) : element.dataset.ogSearchOccurrence === String(target.occurrence ?? 0))
254
+ );
255
+ const { text, spans } = annotatableText(materialized ?? source);
256
+ const offset = materialized ? matchAtOffset(text, target.query, 0) : target.offset != null ? -1 : searchMatchOffset(text, target);
257
+ const range = offset < 0 ? null : rangeFromOffsets(spans, offset, offset + target.query.length);
258
+ if (range && registry && HighlightClass)
259
+ registry.set(highlightName.current, new HighlightClass(range));
260
+ else registry?.delete(highlightName.current);
261
+ const rect = range ? visibleClientRect(range) : null;
262
+ if (navigated.current === key || !range || !rect) return;
263
+ const box = rect;
264
+ if (!box.height && !box.width) return;
265
+ scroller.scrollTop += box.top - scroller.getBoundingClientRect().top - scroller.clientHeight / 2;
266
+ navigated.current = key;
267
+ };
268
+ const schedule = () => {
269
+ cancelAnimationFrame(frame);
270
+ frame = requestAnimationFrame(update);
271
+ };
272
+ const observer = new MutationObserver(schedule);
273
+ observer.observe(scroller, { childList: true, subtree: true, characterData: true });
274
+ const resize = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(schedule);
275
+ resize?.observe(scroller);
276
+ schedule();
277
+ return () => {
278
+ observer.disconnect();
279
+ resize?.disconnect();
280
+ cancelAnimationFrame(frame);
281
+ registry?.delete(highlightName.current);
282
+ style.remove();
283
+ };
284
+ }, [key, root, itemId, target, releasePin, revision]);
285
+ }
286
+
287
+ // src/timeline/shared.tsx
288
+ import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
289
+ var ToolCallTruncationContext = createContext4(null);
290
+ function ToolCallTruncationProvider({
291
+ value,
292
+ children
293
+ }) {
294
+ return /* @__PURE__ */ jsx4(ToolCallTruncationContext.Provider, { value, children });
295
+ }
296
+ var ICON_TONE = {
297
+ accent: "text-og-accent",
298
+ failed: "text-og-status-failed",
299
+ running: "text-og-status-running",
300
+ muted: "text-og-fg-subtle"
301
+ };
302
+ var CompactActivityContext = createContext4(false);
303
+ function ActivityDisclosure({
304
+ icon,
305
+ iconTone: iconToneProp = "muted",
306
+ title,
307
+ titleMono,
308
+ running,
309
+ preview,
310
+ compactPreview,
311
+ media,
312
+ chip: chipProp,
313
+ failed,
314
+ cancelled,
315
+ expandable = true,
316
+ defaultOpen,
317
+ children
318
+ }) {
319
+ const t = useOpenGeniText();
320
+ const iconTone = failed && iconToneProp === "muted" ? "failed" : iconToneProp;
321
+ const chip = chipProp ?? (failed ? { tone: "bad", text: t("timeline.chip.failed") } : cancelled ? { tone: "interrupted", text: t("timeline.chip.interrupted") } : void 0);
322
+ const forcedDefaultOpen = useForcedDefaultOpen();
323
+ const [open, setOpen] = useState(defaultOpen ?? forcedDefaultOpen ?? false);
324
+ const searchReveal = useTimelineSearchReveal();
325
+ useEffect(() => {
326
+ if (searchReveal) setOpen(true);
327
+ }, [searchReveal]);
328
+ const truncation = useContext4(ToolCallTruncationContext);
329
+ const compact = useContext4(CompactActivityContext);
330
+ if (compact)
331
+ return /* @__PURE__ */ jsxs2("span", { className: "og-rolling-label", children: [
332
+ /* @__PURE__ */ jsx4("span", { className: cn("shrink-0", ICON_TONE[iconTone]), children: icon }),
333
+ /* @__PURE__ */ jsxs2("span", { className: "og-command-reel", children: [
334
+ /* @__PURE__ */ jsx4("span", { className: "og-reel-title", children: title }),
335
+ (compactPreview === void 0 ? preview : compactPreview) ? /* @__PURE__ */ jsx4("span", { className: "og-reel-preview text-og-fg-subtle", children: compactPreview === void 0 ? preview : compactPreview }) : null
336
+ ] })
337
+ ] });
338
+ const hasBody = expandable && (children != null || truncation != null);
339
+ const previewVisible = preview != null && !open;
340
+ const rowClass = cn(
341
+ "group/disclosure flex w-full min-w-0 items-center gap-2 rounded-og-sm px-1.5 py-1.5 text-left text-og-base",
342
+ "text-og-fg-muted transition-colors duration-150",
343
+ // A tool row is a touch target on coarse pointers: grow its hit area to the
344
+ // 44px mobile minimum without loosening the dense desktop rail.
345
+ "pointer-coarse:min-h-11 pointer-coarse:py-2.5"
346
+ );
347
+ const inner = /* @__PURE__ */ jsxs2(Fragment3, { children: [
348
+ hasBody ? /* @__PURE__ */ jsx4(ChevronRightIcon, { className: "size-3.5 shrink-0 text-og-fg-subtle transition-transform duration-[var(--_og-duration-disclose)] ease-og-in-out group-data-[state=open]/disclosure:rotate-90" }) : /* @__PURE__ */ jsx4("span", { className: "size-3.5 shrink-0" }),
349
+ /* @__PURE__ */ jsx4("span", { className: cn("shrink-0", ICON_TONE[iconTone]), children: icon }),
350
+ /* @__PURE__ */ jsxs2("span", { className: cn("og-command-reel", running && "og-command-reel-running"), children: [
351
+ /* @__PURE__ */ jsx4(
352
+ "span",
353
+ {
354
+ className: cn(
355
+ "min-w-0 shrink truncate text-og-base font-medium",
356
+ titleMono && "font-og-mono text-og-sm font-normal"
357
+ ),
358
+ children: title
359
+ }
360
+ ),
361
+ previewVisible && !media ? /* @__PURE__ */ jsx4("span", { className: "min-w-0 flex-1 truncate text-og-sm text-og-fg-subtle", children: preview }) : /* @__PURE__ */ jsx4("span", { className: "flex-1" })
362
+ ] }),
363
+ media && !open ? /* @__PURE__ */ jsx4("span", { className: "ml-auto flex shrink-0 items-center gap-2 pl-2", children: media }) : chip && !open ? /* @__PURE__ */ jsx4("span", { className: "ml-auto shrink-0 pl-2", children: /* @__PURE__ */ jsx4(Chip, { chip }) }) : null
364
+ ] });
365
+ const dataStatus = cancelled ? "cancelled" : failed ? "failed" : void 0;
366
+ if (!hasBody) {
367
+ return /* @__PURE__ */ jsx4("div", { className: cn(rowClass, "cursor-default"), "data-status": dataStatus, children: inner });
368
+ }
369
+ return /* @__PURE__ */ jsxs2("div", { children: [
370
+ /* @__PURE__ */ jsx4(
371
+ "div",
372
+ {
373
+ role: "button",
374
+ tabIndex: 0,
375
+ "aria-expanded": open,
376
+ "data-state": open ? "open" : "closed",
377
+ onClick: () => setOpen((prev) => !prev),
378
+ onKeyDown: (event) => {
379
+ if (event.key === "Enter" || event.key === " ") {
380
+ event.preventDefault();
381
+ setOpen((prev) => !prev);
382
+ }
383
+ },
384
+ "data-status": dataStatus,
385
+ className: cn(
386
+ rowClass,
387
+ "cursor-pointer outline-hidden hover:bg-og-surface-1 hover:text-og-fg",
388
+ "focus-visible:ring-2 focus-visible:ring-og-accent focus-visible:ring-offset-0"
389
+ ),
390
+ children: inner
391
+ }
392
+ ),
393
+ open ? /* @__PURE__ */ jsxs2("div", { className: "mb-2 ml-7 mt-1.5 flex flex-col gap-2 overflow-hidden animate-og-expand", children: [
394
+ children,
395
+ truncation ? /* @__PURE__ */ jsx4(ToolCallTruncationNotice, { truncation }) : null
396
+ ] }) : null
397
+ ] });
398
+ }
399
+ function ToolCallTruncationNotice({ truncation }) {
400
+ const t = useOpenGeniText();
401
+ const fullEvidence = truncation.fullEvidence.available ? "retained" : truncation.fullEvidence.reason ?? "unavailable";
402
+ return /* @__PURE__ */ jsxs2("div", { "data-og-tool-output-truncation": "", className: "text-og-sm leading-5 text-og-fg-subtle", children: [
403
+ t("timeline.shared.outputBoundedAt"),
404
+ " ",
405
+ /* @__PURE__ */ jsx4("code", { className: "font-og-mono", children: truncation.surface }),
406
+ truncation.omittedBytes != null && truncation.omittedBytes > 0 ? ` \xB7 ${t("timeline.shared.bytesOmitted", { count: truncation.omittedBytes, bytes: truncation.omittedBytes.toLocaleString(t.locale) })}` : null,
407
+ ` \xB7 ${t("timeline.shared.truncationReason")} `,
408
+ /* @__PURE__ */ jsx4("code", { className: "font-og-mono", children: truncation.reason }),
409
+ ` \xB7 ${t("timeline.shared.fullEvidence")} `,
410
+ /* @__PURE__ */ jsx4("code", { className: "font-og-mono", children: fullEvidence })
411
+ ] });
412
+ }
413
+ function Chip({ chip }) {
414
+ const base = "inline-flex items-center font-og-mono text-og-xs leading-none";
415
+ const withText = chip.text ? "gap-1.5" : "gap-0";
416
+ if (chip.tone === "bad") {
417
+ return /* @__PURE__ */ jsxs2("span", { className: cn(base, withText, "text-og-status-failed"), children: [
418
+ /* @__PURE__ */ jsx4("span", { className: "size-1.5 rounded-full bg-og-status-failed" }),
419
+ chip.text
420
+ ] });
421
+ }
422
+ if (chip.tone === "interrupted") {
423
+ return /* @__PURE__ */ jsx4("span", { className: cn(base, "text-og-fg-subtle og-cancelled-chip"), children: chip.text });
424
+ }
425
+ return /* @__PURE__ */ jsx4("span", { className: cn(base, "text-og-fg-subtle"), children: chip.text });
426
+ }
427
+ function TermBlock({
428
+ command,
429
+ workdir,
430
+ output,
431
+ live,
432
+ tailLines = 12,
433
+ failed
434
+ }) {
435
+ const t = useOpenGeniText();
436
+ const [full, setFull] = useState(false);
437
+ const empty = output.trim() === "";
438
+ const lines = output.split("\n");
439
+ const big = lines.length > tailLines + 4;
440
+ const shown = full || !big ? output : lines.slice(-tailLines).join("\n");
441
+ const showMore = big && !full;
442
+ const showHeader = command != null || workdir != null;
443
+ return /* @__PURE__ */ jsxs2(
444
+ "div",
445
+ {
446
+ className: cn(
447
+ "min-w-0 border-l-2 pl-3",
448
+ failed ? "border-og-status-failed/50" : live ? "border-og-status-running/50" : "border-og-border"
449
+ ),
450
+ children: [
451
+ showHeader ? /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 pb-1", children: [
452
+ /* @__PURE__ */ jsx4("span", { className: "select-none text-og-status-idle", children: "$" }),
453
+ command != null ? /* @__PURE__ */ jsx4("span", { className: "min-w-0 flex-1 truncate font-og-mono text-og-sm text-og-fg-muted", children: /* @__PURE__ */ jsx4(SecretRefText, { text: command }) }) : /* @__PURE__ */ jsx4("span", { className: "flex-1" }),
454
+ workdir ? /* @__PURE__ */ jsx4("span", { className: "shrink-0 font-og-mono text-og-xs text-og-fg-subtle", children: workdir }) : null
455
+ ] }) : null,
456
+ empty ? /* @__PURE__ */ jsx4("p", { className: "font-og-mono text-og-xs italic text-og-fg-subtle", children: t("timeline.shared.noOutput") }) : /* @__PURE__ */ jsxs2("pre", { className: "max-h-72 overflow-auto whitespace-pre-wrap break-all font-og-mono text-og-xs leading-5 text-og-fg-muted", children: [
457
+ shown,
458
+ live ? /* @__PURE__ */ jsx4("span", { className: "ml-px inline-block h-[1em] w-[2px] translate-y-[2px] animate-og-blink bg-og-accent align-middle" }) : null
459
+ ] }),
460
+ showMore ? /* @__PURE__ */ jsx4(
461
+ "button",
462
+ {
463
+ type: "button",
464
+ onClick: () => setFull(true),
465
+ className: "mt-1 text-left text-og-xs text-og-fg-subtle transition-colors hover:text-og-fg",
466
+ children: t("timeline.shared.showFullOutputLengthLines", { length: lines.length })
467
+ }
468
+ ) : null
469
+ ]
470
+ }
471
+ );
472
+ }
473
+ function PayloadBlock({
474
+ label,
475
+ value,
476
+ failed
477
+ }) {
478
+ const text = typeof value === "string" ? value : stringifyPayload(value);
479
+ if (!text || text.trim() === "") {
480
+ return null;
481
+ }
482
+ return /* @__PURE__ */ jsxs2(
483
+ "div",
484
+ {
485
+ className: cn(
486
+ "min-w-0 border-l-2 pl-3",
487
+ failed ? "border-og-status-failed/50" : "border-og-border"
488
+ ),
489
+ children: [
490
+ /* @__PURE__ */ jsx4("p", { className: "mb-1 text-og-xs font-medium uppercase tracking-[0.08em] text-og-fg-subtle", children: label }),
491
+ /* @__PURE__ */ jsx4(
492
+ "pre",
493
+ {
494
+ className: cn(
495
+ "max-h-64 overflow-auto whitespace-pre-wrap break-all font-og-mono text-og-xs leading-5",
496
+ failed ? "text-og-status-failed" : "text-og-fg-muted"
497
+ ),
498
+ children: /* @__PURE__ */ jsx4(SecretRefText, { text })
499
+ }
500
+ )
501
+ ]
502
+ }
503
+ );
504
+ }
505
+ function BodyNote({
506
+ children,
507
+ tone
508
+ }) {
509
+ if (tone === "error") {
510
+ return /* @__PURE__ */ jsx4("div", { className: "border-l-2 border-og-status-failed/50 pl-3 font-og-mono text-og-xs leading-5 text-og-status-failed", children });
511
+ }
512
+ return /* @__PURE__ */ jsx4("p", { className: "px-0.5 text-og-sm italic leading-5 text-og-fg-subtle", children });
513
+ }
514
+ var MEDIA_BOX = "h-7 w-[52px] shrink-0 rounded-og-xs border border-og-border";
515
+ function MediaSkeleton() {
516
+ return /* @__PURE__ */ jsxs2(
517
+ "span",
518
+ {
519
+ className: cn(
520
+ MEDIA_BOX,
521
+ "relative inline-flex items-center justify-center overflow-hidden bg-og-surface-2"
522
+ ),
523
+ children: [
524
+ /* @__PURE__ */ jsx4("span", { className: "absolute inset-0 animate-og-pulse bg-og-surface-3/50" }),
525
+ /* @__PURE__ */ jsx4(CameraIcon, { className: "relative size-3.5 text-og-fg-subtle" })
526
+ ]
527
+ }
528
+ );
529
+ }
530
+ function MediaEmpty() {
531
+ return /* @__PURE__ */ jsx4("span", { className: cn(MEDIA_BOX, "inline-flex items-center justify-center bg-og-bg"), children: /* @__PURE__ */ jsx4(CameraOffIcon, { className: "size-3.5 text-og-fg-subtle" }) });
532
+ }
533
+ function Thumbnail({
534
+ src,
535
+ caption,
536
+ alt = "screenshot",
537
+ expandLabel: expandLabelProp,
538
+ lightboxLabel: lightboxLabelProp,
539
+ downloadFilename
540
+ }) {
541
+ const t = useOpenGeniText();
542
+ const expandLabel = expandLabelProp === void 0 ? t("timeline.shared.expandScreenshot") : expandLabelProp;
543
+ const lightboxLabel = lightboxLabelProp === void 0 ? t("timeline.shared.screenshot") : lightboxLabelProp;
544
+ const lightbox = useLightboxOptional();
545
+ const [failed, setFailed] = useState(false);
546
+ if (failed) {
547
+ return /* @__PURE__ */ jsx4(MediaEmpty, {});
548
+ }
549
+ const img = /* @__PURE__ */ jsx4(
550
+ "img",
551
+ {
552
+ src,
553
+ alt,
554
+ onError: () => setFailed(true),
555
+ className: "h-full w-full object-cover transition-opacity group-hover/thumb:opacity-80"
556
+ }
557
+ );
558
+ if (!lightbox) {
559
+ return /* @__PURE__ */ jsx4("span", { className: cn(MEDIA_BOX, "inline-flex overflow-hidden bg-og-bg"), children: img });
560
+ }
561
+ return /* @__PURE__ */ jsx4(
562
+ "button",
563
+ {
564
+ type: "button",
565
+ onClick: (event) => {
566
+ event.stopPropagation();
567
+ lightbox.open(src, caption, event.currentTarget, lightboxLabel, downloadFilename);
568
+ },
569
+ onKeyDown: (event) => {
570
+ if (event.key === "Enter" || event.key === " ") {
571
+ event.stopPropagation();
572
+ }
573
+ },
574
+ className: cn(
575
+ MEDIA_BOX,
576
+ "group/thumb relative inline-flex overflow-hidden bg-og-bg outline-hidden",
577
+ "focus-visible:ring-2 focus-visible:ring-og-accent"
578
+ ),
579
+ "aria-label": expandLabel,
580
+ children: img
581
+ }
582
+ );
583
+ }
584
+ function ScreenshotFigure({
585
+ src,
586
+ caption,
587
+ showCaption = true,
588
+ alt = "screenshot",
589
+ expandLabel: expandLabelProp,
590
+ lightboxLabel: lightboxLabelProp,
591
+ downloadFilename
592
+ }) {
593
+ const t = useOpenGeniText();
594
+ const expandLabel = expandLabelProp === void 0 ? t("timeline.shared.expandScreenshot") : expandLabelProp;
595
+ const lightboxLabel = lightboxLabelProp === void 0 ? t("timeline.shared.screenshot") : lightboxLabelProp;
596
+ const lightbox = useLightboxOptional();
597
+ const [failed, setFailed] = useState(false);
598
+ const surface = "block w-full overflow-hidden rounded-og-md border border-og-border bg-og-bg";
599
+ const img = /* @__PURE__ */ jsx4(
600
+ "img",
601
+ {
602
+ src,
603
+ alt,
604
+ onError: () => setFailed(true),
605
+ className: "max-h-80 w-full object-contain"
606
+ }
607
+ );
608
+ return /* @__PURE__ */ jsxs2("figure", { className: "m-0 min-w-0", children: [
609
+ failed ? /* @__PURE__ */ jsx4("div", { className: "rounded-og-md border border-og-border bg-og-bg px-3 py-6 text-center font-og-mono text-og-xs text-og-fg-subtle", children: t("timeline.shared.imageUnavailable") }) : lightbox ? /* @__PURE__ */ jsx4(
610
+ "button",
611
+ {
612
+ type: "button",
613
+ onClick: (event) => lightbox.open(src, caption, event.currentTarget, lightboxLabel, downloadFilename),
614
+ className: surface,
615
+ "aria-label": expandLabel,
616
+ children: img
617
+ }
618
+ ) : /* @__PURE__ */ jsx4("div", { className: surface, children: img }),
619
+ caption && showCaption ? /* @__PURE__ */ jsx4("figcaption", { className: "mt-1.5 font-og-mono text-og-xs text-og-fg-subtle", children: caption }) : null
620
+ ] });
621
+ }
622
+
623
+ // src/components/copy-button.tsx
624
+ import { CheckIcon, CopyIcon } from "lucide-react";
625
+ import { memo, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
626
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
627
+ var COPIED_MS = 1600;
628
+ var CopyButton = memo(function CopyButton2({
629
+ text,
630
+ label: labelProp,
631
+ className,
632
+ reveal = "group-hover"
633
+ }) {
634
+ const t = useOpenGeniText();
635
+ const label = labelProp === void 0 ? t("copyButton.copy") : labelProp;
636
+ const [copied, setCopied] = useState2(false);
637
+ const [tipOpen, setTipOpen] = useState2(false);
638
+ const timerRef = useRef2(null);
639
+ useEffect2(() => {
640
+ return () => {
641
+ if (timerRef.current !== null) {
642
+ clearTimeout(timerRef.current);
643
+ }
644
+ };
645
+ }, []);
646
+ const onClick = async (event) => {
647
+ event.preventDefault();
648
+ event.stopPropagation();
649
+ const button = event.currentTarget;
650
+ const pointerActivated = event.detail > 0;
651
+ const value = typeof text === "function" ? text() : text;
652
+ const ok = await copyTextToClipboard(value);
653
+ if (!ok) {
654
+ return;
655
+ }
656
+ setCopied(true);
657
+ setTipOpen(true);
658
+ if (timerRef.current !== null) {
659
+ clearTimeout(timerRef.current);
660
+ }
661
+ timerRef.current = setTimeout(() => {
662
+ timerRef.current = null;
663
+ setCopied(false);
664
+ setTipOpen(false);
665
+ }, COPIED_MS);
666
+ if (pointerActivated) {
667
+ button.blur();
668
+ }
669
+ };
670
+ const tip = copied ? t("copyButton.copied") : label;
671
+ return /* @__PURE__ */ jsxs3(
672
+ Tooltip,
673
+ {
674
+ open: copied ? true : tipOpen,
675
+ onOpenChange: (next) => {
676
+ if (!copied) {
677
+ setTipOpen(next);
678
+ }
679
+ },
680
+ children: [
681
+ /* @__PURE__ */ jsx5(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx5(
682
+ "button",
683
+ {
684
+ type: "button",
685
+ "data-og-copy": "",
686
+ "data-state": copied ? "copied" : "idle",
687
+ "aria-label": tip,
688
+ onClick,
689
+ className: cn(
690
+ "inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm pointer-coarse:size-11",
691
+ "text-og-fg-subtle transition-[opacity,color,background-color] duration-150",
692
+ "hover:bg-og-surface-2/80 hover:text-og-fg",
693
+ "focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent/40",
694
+ reveal === "group-hover" && "opacity-0 group-hover/copy:opacity-100 group-focus-within/copy:opacity-100 pointer-coarse:opacity-70",
695
+ copied && "opacity-100 text-og-accent",
696
+ className
697
+ ),
698
+ children: copied ? /* @__PURE__ */ jsx5(CheckIcon, { className: "size-3.5", "aria-hidden": true }) : /* @__PURE__ */ jsx5(CopyIcon, { className: "size-3.5", "aria-hidden": true })
699
+ }
700
+ ) }),
701
+ /* @__PURE__ */ jsx5(TooltipContent, { side: "top", children: tip })
702
+ ]
703
+ }
704
+ );
705
+ });
706
+ function CopyHoverFrame({
707
+ children,
708
+ className,
709
+ copyText,
710
+ label,
711
+ align = "end",
712
+ trailing
713
+ }) {
714
+ if (copyText.trim().length === 0) {
715
+ return /* @__PURE__ */ jsx5("div", { className, children });
716
+ }
717
+ return /* @__PURE__ */ jsxs3("div", { className: cn("group/copy", className), children: [
718
+ children,
719
+ /* @__PURE__ */ jsxs3(
720
+ "div",
721
+ {
722
+ "data-og-annotation-chrome": "",
723
+ className: cn(
724
+ "flex h-6 items-center gap-1.5 pointer-coarse:h-11",
725
+ align === "end" ? "justify-end" : "justify-start"
726
+ ),
727
+ children: [
728
+ /* @__PURE__ */ jsx5(
729
+ CopyButton,
730
+ {
731
+ text: copyText,
732
+ label,
733
+ reveal: "group-hover",
734
+ className: "size-6 pointer-coarse:size-11"
735
+ }
736
+ ),
737
+ trailing
738
+ ]
739
+ }
740
+ )
741
+ ] });
742
+ }
743
+
744
+ // src/components/markdown.tsx
745
+ import {
746
+ Children,
747
+ createContext as createContext5,
748
+ useContext as useContext5,
749
+ isValidElement,
750
+ memo as memo2,
751
+ useEffect as useEffect4,
752
+ useMemo,
753
+ useReducer,
754
+ useRef as useRef4,
755
+ useState as useState3
756
+ } from "react";
757
+ import ReactMarkdown, {
758
+ defaultUrlTransform
759
+ } from "react-markdown";
760
+ import remarkGfm from "remark-gfm";
761
+ import { PanelsTopLeftIcon } from "lucide-react";
762
+
763
+ // src/lib/motion-inspect.ts
764
+ var MOTION_INSPECT_SCALE = 1;
765
+
766
+ // src/components/preview-loading.tsx
767
+ import { useEffect as useEffect3, useRef as useRef3 } from "react";
768
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
769
+ function PreviewLoading() {
770
+ const t = useOpenGeniText();
771
+ const ref = useRef3(null);
772
+ useEffect3(() => {
773
+ const canvas = ref.current;
774
+ if (!canvas) return;
775
+ let ctx;
776
+ try {
777
+ ctx = canvas.getContext("2d");
778
+ } catch {
779
+ return;
780
+ }
781
+ if (!ctx) return;
782
+ const context = ctx;
783
+ const motion = window.matchMedia?.("(prefers-reduced-motion: reduce)");
784
+ let frame;
785
+ let time = 2;
786
+ let last;
787
+ let disposed = false;
788
+ let visible = false;
789
+ const canAnimate = () => !disposed && visible && !document.hidden && motion?.matches === false;
790
+ function draw() {
791
+ const w = canvas.clientWidth;
792
+ const h = canvas.clientHeight;
793
+ if (!w || !h || document.hidden || disposed) return;
794
+ const d = Math.min(window.devicePixelRatio || 1, 2);
795
+ if (canvas.width !== Math.round(w * d) || canvas.height !== Math.round(h * d)) {
796
+ canvas.width = Math.round(w * d);
797
+ canvas.height = Math.round(h * d);
798
+ }
799
+ const style = getComputedStyle(canvas);
800
+ const ink = style.getPropertyValue("--_og-preview-ink").trim() || "#9fdccd";
801
+ const glowColor = style.getPropertyValue("--_og-preview-glow").trim() || "#5fb8a3";
802
+ context.setTransform(d, 0, 0, d, 0, 0);
803
+ paintPreviewLoading(context, w, h, time, ink, glowColor);
804
+ canvas.dataset.painted = "true";
805
+ }
806
+ function stop() {
807
+ if (frame !== void 0) window.cancelAnimationFrame(frame);
808
+ frame = void 0;
809
+ last = void 0;
810
+ }
811
+ function tick(stamp) {
812
+ frame = void 0;
813
+ if (!canAnimate()) return;
814
+ if (last !== void 0) time += Math.min((stamp - last) / 1e3, 0.05);
815
+ last = stamp;
816
+ draw();
817
+ frame = window.requestAnimationFrame(tick);
818
+ }
819
+ function refresh() {
820
+ stop();
821
+ if (disposed || document.hidden || !visible && intersection) return;
822
+ draw();
823
+ if (canAnimate() && typeof window.requestAnimationFrame === "function") {
824
+ frame = window.requestAnimationFrame(tick);
825
+ }
826
+ }
827
+ const intersection = typeof IntersectionObserver === "function" ? new IntersectionObserver(([entry]) => {
828
+ visible = entry?.isIntersecting === true;
829
+ refresh();
830
+ }) : void 0;
831
+ intersection?.observe(canvas);
832
+ const resize = typeof ResizeObserver === "function" ? new ResizeObserver(refresh) : void 0;
833
+ resize?.observe(canvas);
834
+ const theme = typeof MutationObserver === "function" ? new MutationObserver(refresh) : void 0;
835
+ for (let ancestor = canvas.parentElement; ancestor; ancestor = ancestor.parentElement) {
836
+ theme?.observe(ancestor, {
837
+ attributes: true,
838
+ attributeFilter: ["class", "style", "data-og-theme"]
839
+ });
840
+ }
841
+ motion?.addEventListener?.("change", refresh);
842
+ document.addEventListener("visibilitychange", refresh);
843
+ window.addEventListener("resize", refresh);
844
+ if (!intersection) draw();
845
+ return () => {
846
+ disposed = true;
847
+ stop();
848
+ intersection?.disconnect();
849
+ resize?.disconnect();
850
+ theme?.disconnect();
851
+ motion?.removeEventListener?.("change", refresh);
852
+ document.removeEventListener("visibilitychange", refresh);
853
+ window.removeEventListener("resize", refresh);
854
+ };
855
+ }, []);
856
+ return /* @__PURE__ */ jsxs4("div", { className: "og-preview-loading", children: [
857
+ /* @__PURE__ */ jsx6("canvas", { ref, "aria-hidden": "true" }),
858
+ /* @__PURE__ */ jsx6("span", { className: "og-preview-loading-label", children: t("previewLoading.preparingPreview") })
859
+ ] });
860
+ }
861
+
862
+ // src/components/remark-soft-line-breaks.ts
863
+ var LINE_ENDING = /\r\n|\r|\n/g;
864
+ var HAS_LINE_ENDING = /[\r\n]/;
865
+ var LINE_PREFIX = /[\t >]*/y;
866
+ function remarkSoftLineBreaks() {
867
+ return (tree, file) => {
868
+ walk(tree, typeof file?.value === "string" ? file.value : void 0);
869
+ };
870
+ }
871
+ function walk(node, source) {
872
+ if (!node.children) {
873
+ return;
874
+ }
875
+ let next = null;
876
+ for (let index = 0; index < node.children.length; index += 1) {
877
+ const child = node.children[index];
878
+ if (child.type === "text" && typeof child.value === "string" && HAS_LINE_ENDING.test(child.value)) {
879
+ next ??= node.children.slice(0, index);
880
+ next.push(...splitText(child, child.value, source));
881
+ continue;
882
+ }
883
+ walk(child, source);
884
+ next?.push(child);
885
+ }
886
+ if (next !== null) {
887
+ node.children = next;
888
+ }
889
+ }
890
+ function splitText(node, value, source) {
891
+ const segments = [];
892
+ let cursor = 0;
893
+ for (const match of value.matchAll(LINE_ENDING)) {
894
+ segments.push({ value: value.slice(cursor, match.index), index: cursor });
895
+ cursor = match.index + match[0].length;
896
+ }
897
+ segments.push({ value: value.slice(cursor), index: cursor });
898
+ const starts = segmentStarts(node, segments, source);
899
+ const nodeEnd = exactPoint(node.position?.end);
900
+ const out = [];
901
+ segments.forEach((segment, k) => {
902
+ const start = starts?.[k];
903
+ const isLast = k === segments.length - 1;
904
+ const end = start === void 0 ? void 0 : isLast && nodeEnd !== void 0 ? nodeEnd : {
905
+ line: start.line,
906
+ column: start.column + segment.value.length,
907
+ offset: start.offset + segment.value.length
908
+ };
909
+ if (segment.value.length > 0) {
910
+ out.push({
911
+ type: "text",
912
+ value: segment.value,
913
+ ...start !== void 0 && end !== void 0 ? { position: { start, end } } : {}
914
+ });
915
+ }
916
+ if (!isLast) {
917
+ const nextStart = starts?.[k + 1];
918
+ out.push({
919
+ type: "break",
920
+ ...end !== void 0 && nextStart !== void 0 ? { position: { start: end, end: nextStart } } : {}
921
+ });
922
+ }
923
+ });
924
+ return out;
925
+ }
926
+ function segmentStarts(node, segments, source) {
927
+ const start = exactPoint(node.position?.start);
928
+ if (start === void 0) {
929
+ return void 0;
930
+ }
931
+ const endOffset = node.position?.end?.offset;
932
+ const lineStarts = [];
933
+ if (source !== void 0 && endOffset !== void 0 && endOffset >= start.offset) {
934
+ for (const match of source.slice(start.offset, endOffset).matchAll(LINE_ENDING)) {
935
+ lineStarts.push(start.offset + match.index + match[0].length);
936
+ }
937
+ }
938
+ const anchoredSource = lineStarts.length === segments.length - 1 ? source : void 0;
939
+ return segments.map((segment, k) => {
940
+ if (k === 0) {
941
+ return start;
942
+ }
943
+ if (anchoredSource !== void 0) {
944
+ const lineStart = lineStarts[k - 1];
945
+ LINE_PREFIX.lastIndex = lineStart;
946
+ const prefix = LINE_PREFIX.exec(anchoredSource)?.[0].length ?? 0;
947
+ return { line: start.line + k, column: prefix + 1, offset: lineStart + prefix };
948
+ }
949
+ return { line: start.line + k, column: 1, offset: start.offset + segment.index };
950
+ });
951
+ }
952
+ function exactPoint(point) {
953
+ if (point === void 0 || typeof point.line !== "number" || typeof point.column !== "number" || typeof point.offset !== "number") {
954
+ return void 0;
955
+ }
956
+ return { line: point.line, column: point.column, offset: point.offset };
957
+ }
958
+
959
+ // src/components/rehype-secret-refs.ts
960
+ var MARKER = "{{secret";
961
+ function rehypeSecretRefs(options) {
962
+ const { tokenize } = options;
963
+ return (tree) => {
964
+ walk2(tree);
965
+ };
966
+ function walk2(node) {
967
+ if (!node.children) return;
968
+ let changed = false;
969
+ const next = [];
970
+ for (const child of node.children) {
971
+ if (child.type === "text" && child.value.includes(MARKER)) {
972
+ const split = splitText2(child);
973
+ if (split) {
974
+ next.push(...split);
975
+ changed = true;
976
+ continue;
977
+ }
978
+ } else if (child.type === "element") {
979
+ const element = child;
980
+ if (element.tagName === "code") {
981
+ const chip = wholeReference(element);
982
+ if (chip) {
983
+ next.push(chip);
984
+ changed = true;
985
+ continue;
986
+ }
987
+ } else if (element.tagName !== "pre" && element.tagName !== "a") {
988
+ walk2(element);
989
+ }
990
+ } else if ("children" in child) {
991
+ walk2(child);
992
+ }
993
+ next.push(child);
994
+ }
995
+ if (changed) node.children = next;
996
+ }
997
+ function splitText2(node) {
998
+ const tokens = tokenize(node.value);
999
+ if (!tokens.some((token) => token.type === "reference")) return null;
1000
+ return tokens.map(
1001
+ (token) => token.type === "reference" ? chipPlaceholder(token.reference.raw) : { type: "text", value: token.type === "text" ? token.value : token.raw }
1002
+ );
1003
+ }
1004
+ function wholeReference(code) {
1005
+ if (code.children.length !== 1) return null;
1006
+ const only = code.children[0];
1007
+ if (only.type !== "text") return null;
1008
+ const value = only.value;
1009
+ if (!value.includes(MARKER)) return null;
1010
+ const tokens = tokenize(value.trim());
1011
+ const token = tokens.length === 1 ? tokens[0] : null;
1012
+ return token?.type === "reference" ? chipPlaceholder(token.reference.raw) : null;
1013
+ }
1014
+ }
1015
+ function chipPlaceholder(raw) {
1016
+ return {
1017
+ type: "element",
1018
+ tagName: "span",
1019
+ properties: { dataOgSecretRef: raw },
1020
+ children: [{ type: "text", value: raw }]
1021
+ };
1022
+ }
1023
+
1024
+ // src/components/soften-streaming-markdown.ts
1025
+ function softenStreamingMarkdown(source) {
1026
+ if (source.length === 0) {
1027
+ return source;
1028
+ }
1029
+ let text = source;
1030
+ if (countFences(text) % 2 === 1) {
1031
+ text += text.endsWith("\n") ? "```" : "\n```";
1032
+ }
1033
+ const segments = splitByFences(text);
1034
+ for (const segment of segments) {
1035
+ if (segment.kind === "fence") {
1036
+ continue;
1037
+ }
1038
+ segment.value = closeInlineMarkers(segment.value);
1039
+ }
1040
+ let result = segments.map((segment) => segment.value).join("");
1041
+ if (text.endsWith("\n") && !result.endsWith("\n")) {
1042
+ result += "\n";
1043
+ }
1044
+ return result;
1045
+ }
1046
+ function countFences(text) {
1047
+ let count = 0;
1048
+ for (const line of text.split("\n")) {
1049
+ if (/^ {0,3}```/.test(line)) {
1050
+ count += 1;
1051
+ }
1052
+ }
1053
+ return count;
1054
+ }
1055
+ function splitByFences(text) {
1056
+ const segments = [];
1057
+ const lines = text.split("\n");
1058
+ let buf = [];
1059
+ let inFence = false;
1060
+ const flush = (kind, mode) => {
1061
+ if (buf.length === 0) {
1062
+ return;
1063
+ }
1064
+ let value = buf.join("\n");
1065
+ if (mode === "boundary") {
1066
+ value += "\n";
1067
+ }
1068
+ segments.push({ kind, value });
1069
+ buf = [];
1070
+ };
1071
+ for (const line of lines) {
1072
+ const isFence = /^ {0,3}```/.test(line);
1073
+ if (isFence) {
1074
+ if (inFence) {
1075
+ buf.push(line);
1076
+ flush("fence", "end");
1077
+ inFence = false;
1078
+ } else {
1079
+ flush("prose", "boundary");
1080
+ buf.push(line);
1081
+ inFence = true;
1082
+ }
1083
+ continue;
1084
+ }
1085
+ buf.push(line);
1086
+ }
1087
+ flush(inFence ? "fence" : "prose", "end");
1088
+ return segments;
1089
+ }
1090
+ function closeInlineMarkers(prose) {
1091
+ let text = prose;
1092
+ text = closeDelimiter(text, "~~");
1093
+ text = closeDelimiter(text, "**");
1094
+ text = closeDelimiter(text, "__");
1095
+ text = closeSingleBackticks(text);
1096
+ text = closeSingleAsterisks(text);
1097
+ text = closeUnfinishedLink(text);
1098
+ return text;
1099
+ }
1100
+ function closeDelimiter(text, delimiter) {
1101
+ let count = 0;
1102
+ let i = 0;
1103
+ while (i < text.length) {
1104
+ if (text[i] === "\\" && i + 1 < text.length) {
1105
+ i += 2;
1106
+ continue;
1107
+ }
1108
+ if (text.startsWith(delimiter, i)) {
1109
+ count += 1;
1110
+ i += delimiter.length;
1111
+ continue;
1112
+ }
1113
+ i += 1;
1114
+ }
1115
+ return count % 2 === 1 ? insertBeforeTrailingNewlines(text, delimiter) : text;
1116
+ }
1117
+ function insertBeforeTrailingNewlines(text, suffix) {
1118
+ let end = text.length;
1119
+ while (end > 0 && text[end - 1] === "\n") {
1120
+ end -= 1;
1121
+ }
1122
+ return text.slice(0, end) + suffix + text.slice(end);
1123
+ }
1124
+ function closeSingleBackticks(text) {
1125
+ let count = 0;
1126
+ for (let i = 0; i < text.length; i += 1) {
1127
+ if (text[i] === "\\" && i + 1 < text.length) {
1128
+ i += 1;
1129
+ continue;
1130
+ }
1131
+ if (text[i] === "`") {
1132
+ if (text.startsWith("```", i)) {
1133
+ i += 2;
1134
+ continue;
1135
+ }
1136
+ count += 1;
1137
+ }
1138
+ }
1139
+ return count % 2 === 1 ? insertBeforeTrailingNewlines(text, "`") : text;
1140
+ }
1141
+ function closeSingleAsterisks(text) {
1142
+ let count = 0;
1143
+ for (let i = 0; i < text.length; i += 1) {
1144
+ if (text[i] === "\\" && i + 1 < text.length) {
1145
+ i += 1;
1146
+ continue;
1147
+ }
1148
+ if (text[i] === "*" && text[i + 1] === "*") {
1149
+ i += 1;
1150
+ continue;
1151
+ }
1152
+ if (text[i] === "*") {
1153
+ count += 1;
1154
+ }
1155
+ }
1156
+ return count % 2 === 1 ? insertBeforeTrailingNewlines(text, "*") : text;
1157
+ }
1158
+ function closeUnfinishedLink(text) {
1159
+ const open = text.lastIndexOf("](");
1160
+ if (open === -1) {
1161
+ return text;
1162
+ }
1163
+ const after = text.slice(open + 2);
1164
+ if (after.includes(")")) {
1165
+ return text;
1166
+ }
1167
+ if (after.includes("[")) {
1168
+ return text;
1169
+ }
1170
+ return insertBeforeTrailingNewlines(text, ")");
1171
+ }
1172
+
1173
+ // src/components/stream-reveal.ts
1174
+ var INK_FADE_MS = 420 * MOTION_INSPECT_SCALE;
1175
+ var INITIAL_ANIMATED_LIMIT = 400;
1176
+ function createStreamReveal() {
1177
+ let batches = [];
1178
+ let revealedChars = -1;
1179
+ return {
1180
+ observe(text, now) {
1181
+ if (revealedChars === -1) {
1182
+ revealedChars = text.length > INITIAL_ANIMATED_LIMIT ? text.length : 0;
1183
+ }
1184
+ if (text.length <= revealedChars) {
1185
+ revealedChars = Math.max(revealedChars, text.length);
1186
+ return;
1187
+ }
1188
+ batches.push({ start: revealedChars, end: text.length, birth: now });
1189
+ revealedChars = text.length;
1190
+ batches = batches.filter((batch) => batch.birth + INK_FADE_MS > now);
1191
+ },
1192
+ delayFor(offset, now) {
1193
+ const batch = findBatch(batches, offset);
1194
+ if (!batch) {
1195
+ return null;
1196
+ }
1197
+ const delay = batch.birth - now;
1198
+ return delay + INK_FADE_MS <= 0 ? null : delay;
1199
+ },
1200
+ hasActive(now) {
1201
+ const last = batches[batches.length - 1];
1202
+ return last !== void 0 && last.birth + INK_FADE_MS > now;
1203
+ }
1204
+ };
1205
+ }
1206
+ function findBatch(batches, offset) {
1207
+ let low = 0;
1208
+ let high = batches.length - 1;
1209
+ while (low <= high) {
1210
+ const mid = low + high >> 1;
1211
+ const batch = batches[mid];
1212
+ if (offset < batch.start) {
1213
+ high = mid - 1;
1214
+ } else if (offset >= batch.end) {
1215
+ low = mid + 1;
1216
+ } else {
1217
+ return batch;
1218
+ }
1219
+ }
1220
+ return null;
1221
+ }
1222
+ function rehypeStreamReveal(options) {
1223
+ const { reveal, now } = options;
1224
+ return (tree) => {
1225
+ walk2(tree, false);
1226
+ };
1227
+ function walk2(node, insideVerbatim) {
1228
+ if (!node.children) {
1229
+ return;
1230
+ }
1231
+ const verbatim = insideVerbatim || node.tagName === "code" || node.tagName === "pre";
1232
+ const next = [];
1233
+ for (const child of node.children) {
1234
+ if (child.type === "text" && !verbatim) {
1235
+ next.push(...splitTextNode(child));
1236
+ continue;
1237
+ }
1238
+ walk2(child, verbatim);
1239
+ next.push(child);
1240
+ }
1241
+ node.children = next;
1242
+ }
1243
+ function splitTextNode(node) {
1244
+ const sourceOffset = node.position?.start?.offset;
1245
+ if (sourceOffset === void 0) {
1246
+ return [node];
1247
+ }
1248
+ const value = node.value;
1249
+ const out = [];
1250
+ let plain = "";
1251
+ const flushPlain = () => {
1252
+ if (plain.length > 0) {
1253
+ out.push({ type: "text", value: plain });
1254
+ plain = "";
1255
+ }
1256
+ };
1257
+ let i = 0;
1258
+ while (i < value.length) {
1259
+ const delay = reveal.delayFor(sourceOffset + i, now);
1260
+ let j = i + 1;
1261
+ while (j < value.length) {
1262
+ const nextDelay = reveal.delayFor(sourceOffset + j, now);
1263
+ if (nextDelay !== delay) {
1264
+ break;
1265
+ }
1266
+ j += 1;
1267
+ }
1268
+ const slice = value.slice(i, j);
1269
+ if (delay === null) {
1270
+ plain += slice;
1271
+ } else {
1272
+ flushPlain();
1273
+ out.push({
1274
+ type: "element",
1275
+ tagName: "span",
1276
+ properties: {
1277
+ className: ["og-stream-ink"],
1278
+ style: `animation-delay:${Math.round(delay)}ms`
1279
+ },
1280
+ children: [{ type: "text", value: slice }]
1281
+ });
1282
+ }
1283
+ i = j;
1284
+ }
1285
+ flushPlain();
1286
+ return out.length > 0 ? out : [node];
1287
+ }
1288
+ }
1289
+
1290
+ // src/components/markdown.tsx
1291
+ import {
1292
+ parseOpenGeniLink,
1293
+ parseSandboxLink,
1294
+ parseRetainedFileReference,
1295
+ isReservedOpenGeniLink,
1296
+ openGeniLinkScheme
1297
+ } from "@opengeni/sdk";
1298
+ import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
1299
+ var InteractiveContext = createContext5({ source: "" });
1300
+ var baseComponents = {
1301
+ h1: ({ children, ...props }) => /* @__PURE__ */ jsx7(
1302
+ "h1",
1303
+ {
1304
+ className: "mt-5 mb-2.5 text-xl font-semibold tracking-tight text-og-fg first:mt-0",
1305
+ ...props,
1306
+ children
1307
+ }
1308
+ ),
1309
+ h2: ({ children, ...props }) => /* @__PURE__ */ jsx7("h2", { className: "mt-5 mb-2 text-lg font-semibold tracking-tight text-og-fg first:mt-0", ...props, children }),
1310
+ h3: ({ children, ...props }) => /* @__PURE__ */ jsx7(
1311
+ "h3",
1312
+ {
1313
+ className: "mt-4 mb-1.5 text-og-md font-semibold tracking-tight text-og-fg first:mt-0",
1314
+ ...props,
1315
+ children
1316
+ }
1317
+ ),
1318
+ h4: ({ children, ...props }) => /* @__PURE__ */ jsx7(
1319
+ "h4",
1320
+ {
1321
+ className: "mt-4 mb-1.5 text-og-sm font-semibold uppercase tracking-[0.04em] text-og-fg first:mt-0",
1322
+ ...props,
1323
+ children
1324
+ }
1325
+ ),
1326
+ p: ({ children, ...props }) => /* @__PURE__ */ jsx7("p", { className: "my-2.5 leading-7 first:mt-0 last:mb-0", ...props, children }),
1327
+ strong: ({ children, ...props }) => /* @__PURE__ */ jsx7("strong", { className: "font-semibold text-og-fg", ...props, children }),
1328
+ em: ({ children, ...props }) => /* @__PURE__ */ jsx7("em", { className: "italic", ...props, children }),
1329
+ ul: ({ children, ...props }) => /* @__PURE__ */ jsx7(
1330
+ "ul",
1331
+ {
1332
+ className: "my-2.5 ml-5 flex list-disc flex-col gap-1 marker:text-og-fg-subtle first:mt-0 last:mb-0",
1333
+ ...props,
1334
+ children
1335
+ }
1336
+ ),
1337
+ ol: ({ children, ...props }) => /* @__PURE__ */ jsx7(
1338
+ "ol",
1339
+ {
1340
+ className: "my-2.5 ml-5 flex list-decimal flex-col gap-1 marker:text-og-fg-subtle first:mt-0 last:mb-0",
1341
+ ...props,
1342
+ children
1343
+ }
1344
+ ),
1345
+ // GFM task-list items carry a leading checkbox <input>; `list-none` + a
1346
+ // negative margin pull the checkbox back to the bullet column so it aligns
1347
+ // with the text.
1348
+ li: ({ children, ...props }) => /* @__PURE__ */ jsx7(
1349
+ "li",
1350
+ {
1351
+ className: "leading-7 marker:text-og-fg-subtle [&>ul]:my-1 [&>ol]:my-1 [&:has(>input)]:list-none [&:has(>input)]:-ml-5",
1352
+ ...props,
1353
+ children
1354
+ }
1355
+ ),
1356
+ input: ({ type, ...props }) => type === "checkbox" ? /* @__PURE__ */ jsx7(
1357
+ "input",
1358
+ {
1359
+ ...props,
1360
+ type: "checkbox",
1361
+ disabled: true,
1362
+ className: "mr-2 size-3.5 translate-y-[2px] cursor-default accent-og-accent align-baseline"
1363
+ }
1364
+ ) : /* @__PURE__ */ jsx7("input", { type, ...props }),
1365
+ blockquote: ({ children, ...props }) => /* @__PURE__ */ jsx7(
1366
+ "blockquote",
1367
+ {
1368
+ className: "my-3 border-l-2 border-og-border-strong pl-3.5 text-og-fg-muted [&>p]:my-1.5 first:mt-0 last:mb-0",
1369
+ ...props,
1370
+ children
1371
+ }
1372
+ ),
1373
+ hr: (props) => /* @__PURE__ */ jsx7("hr", { className: "my-4 border-0 border-t border-og-border", ...props }),
1374
+ // Inline `code` vs fenced code blocks. react-markdown v10 no longer passes an
1375
+ // `inline` flag; a fenced block is a <code> whose parent is <pre> (styled by
1376
+ // the `pre` renderer), so a `code` reaching here is treated as inline.
1377
+ code: ({ children, className: _className, ...props }) => /* @__PURE__ */ jsx7(
1378
+ "code",
1379
+ {
1380
+ className: "rounded-og-xs bg-og-surface-2 px-1 py-0.5 font-og-mono text-og-sm text-og-fg",
1381
+ ...props,
1382
+ children
1383
+ }
1384
+ ),
1385
+ // Fenced code — quiet mono block (no card / no nested vertical scroll).
1386
+ pre: InteractiveCodeBlock,
1387
+ // Tables stay unboxed (hairline rules); hover reveals a TSV copy control.
1388
+ table: ({ children, ...props }) => /* @__PURE__ */ jsx7(MarkdownTable, { ...props, children }),
1389
+ thead: ({ children, ...props }) => /* @__PURE__ */ jsx7("thead", { ...props, children }),
1390
+ th: ({ children, ...props }) => /* @__PURE__ */ jsx7(
1391
+ "th",
1392
+ {
1393
+ className: "border-b border-og-border px-0 py-1.5 pr-4 text-left font-medium text-og-fg first:pl-0",
1394
+ ...props,
1395
+ children
1396
+ }
1397
+ ),
1398
+ td: ({ children, ...props }) => /* @__PURE__ */ jsx7(
1399
+ "td",
1400
+ {
1401
+ className: "border-b border-og-border/70 px-0 py-1.5 pr-4 align-top text-og-fg-muted",
1402
+ ...props,
1403
+ children
1404
+ }
1405
+ ),
1406
+ img: MarkdownImage
1407
+ };
1408
+ var MARKDOWN_LINK_CLASS = "break-words font-medium og-link";
1409
+ var MarkdownLinkContext = createContext5({});
1410
+ var UNAVAILABLE_LABEL = (t) => ({
1411
+ file: t("markdown.thisFileNeedsAWorkspace"),
1412
+ "editable-artifact": t("markdown.thisArtifactNeedsAWorkspace"),
1413
+ site: t("markdown.thisSiteNeedsAWorkspace")
1414
+ });
1415
+ function linkActionTitle(t, target) {
1416
+ if (target.kind === "sandbox-file") {
1417
+ return target.line !== null ? t("markdown.openPathAtLineLine", { path: target.path, line: target.line }) : t("markdown.openPath", { path: target.path });
1418
+ }
1419
+ return target.kind === "file" ? t("markdown.openFile") : target.kind === "site" ? t("markdown.openSite") : t("markdown.openArtifact");
1420
+ }
1421
+ function MarkdownSpan({
1422
+ node: _node,
1423
+ children,
1424
+ ...props
1425
+ }) {
1426
+ const raw = props["data-og-secret-ref"];
1427
+ if (typeof raw === "string") return /* @__PURE__ */ jsx7(MarkdownSecretRef, { raw, children });
1428
+ return /* @__PURE__ */ jsx7("span", { ...props, children });
1429
+ }
1430
+ function MarkdownSecretRef({ raw, children }) {
1431
+ const ui = useSecretsUi();
1432
+ const token = ui?.tokenize(raw).find((candidate) => candidate.type === "reference");
1433
+ if (!token || token.type !== "reference") return /* @__PURE__ */ jsx7(Fragment4, { children });
1434
+ return /* @__PURE__ */ jsx7(SecretRefChip, { reference: token.reference });
1435
+ }
1436
+ var markdownComponents = {
1437
+ ...baseComponents,
1438
+ span: MarkdownSpan,
1439
+ p: ({ children, node, ...props }) => {
1440
+ const containsArtifact = node?.children.some(
1441
+ (child) => child.type === "element" && child.tagName === "img" && typeof child.properties.src === "string" && retainedImageId(child.properties.src)
1442
+ );
1443
+ const Tag = containsArtifact ? "div" : "p";
1444
+ return /* @__PURE__ */ jsx7(Tag, { className: "my-2.5 leading-7 first:mt-0 last:mb-0", ...props, children });
1445
+ },
1446
+ a: ({ children, href, ...props }) => {
1447
+ const t = useOpenGeniText();
1448
+ const { onSandboxFile, artifactHref, resolveLink } = useContext5(MarkdownLinkContext);
1449
+ const inherited = useOpenGeniLinkResolver();
1450
+ const target = parseOpenGeniLink(href);
1451
+ if (target) {
1452
+ if (target.kind === "file" && target.workspaceId === null && artifactHref) {
1453
+ const destination2 = defaultUrlTransform(artifactHref(target.fileId));
1454
+ if (destination2) {
1455
+ return /* @__PURE__ */ jsx7(
1456
+ "a",
1457
+ {
1458
+ className: MARKDOWN_LINK_CLASS,
1459
+ href: destination2,
1460
+ target: "_blank",
1461
+ rel: "noreferrer noopener",
1462
+ children
1463
+ }
1464
+ );
1465
+ }
1466
+ }
1467
+ const resolution = target.kind === "sandbox-file" && onSandboxFile ? { open: () => onSandboxFile(target.path, target.line ?? void 0) } : chainLinkResolvers(resolveLink, inherited)?.(target);
1468
+ const destination = resolution?.href ? defaultUrlTransform(resolution.href) : "";
1469
+ if (destination) {
1470
+ return /* @__PURE__ */ jsx7(
1471
+ "a",
1472
+ {
1473
+ className: MARKDOWN_LINK_CLASS,
1474
+ href: destination,
1475
+ target: "_blank",
1476
+ rel: "noreferrer noopener",
1477
+ children
1478
+ }
1479
+ );
1480
+ }
1481
+ if (resolution?.open) {
1482
+ return /* @__PURE__ */ jsx7(ActionMarkdownLink, { title: linkActionTitle(t, target), onOpen: resolution.open, children });
1483
+ }
1484
+ if (target.kind === "sandbox-file") {
1485
+ return /* @__PURE__ */ jsx7(
1486
+ "span",
1487
+ {
1488
+ className: "break-words font-medium text-og-fg-subtle underline decoration-dotted underline-offset-2",
1489
+ "aria-disabled": "true",
1490
+ title: t("markdown.thisSandboxFileRequiresA"),
1491
+ children
1492
+ }
1493
+ );
1494
+ }
1495
+ return /* @__PURE__ */ jsxs5("span", { title: UNAVAILABLE_LABEL(t)[target.kind], "data-og-link-unavailable": target.kind, children: [
1496
+ children,
1497
+ " ",
1498
+ t("markdown.artifactUnavailable")
1499
+ ] });
1500
+ }
1501
+ if (isReservedOpenGeniLink(href) || !href) {
1502
+ return /* @__PURE__ */ jsxs5(
1503
+ "span",
1504
+ {
1505
+ className: "break-words text-og-fg-subtle",
1506
+ "aria-disabled": "true",
1507
+ title: isSandboxHref(href) ? t("markdown.thisSandboxFileReferenceIs") : t("markdown.thisLinkIsUnavailable"),
1508
+ children: [
1509
+ children,
1510
+ " ",
1511
+ t("markdown.linkUnavailable")
1512
+ ]
1513
+ }
1514
+ );
1515
+ }
1516
+ return /* @__PURE__ */ jsx7(
1517
+ "a",
1518
+ {
1519
+ className: MARKDOWN_LINK_CLASS,
1520
+ target: "_blank",
1521
+ rel: "noreferrer noopener",
1522
+ href,
1523
+ ...props,
1524
+ children
1525
+ }
1526
+ );
1527
+ }
1528
+ };
1529
+ function ActionMarkdownLink({
1530
+ title,
1531
+ onOpen,
1532
+ children
1533
+ }) {
1534
+ const t = useOpenGeniText();
1535
+ const [state, setState] = useState3("idle");
1536
+ return /* @__PURE__ */ jsxs5(
1537
+ "button",
1538
+ {
1539
+ type: "button",
1540
+ className: cn(
1541
+ MARKDOWN_LINK_CLASS,
1542
+ "inline-flex min-h-7 cursor-pointer items-center aria-disabled:cursor-wait aria-disabled:opacity-70 pointer-coarse:min-h-11"
1543
+ ),
1544
+ "aria-disabled": state === "loading" || void 0,
1545
+ "aria-busy": state === "loading",
1546
+ title: state === "error" ? t("markdown.couldnTOpenThisFile") : title,
1547
+ onClick: () => {
1548
+ if (state === "loading") return;
1549
+ setState("loading");
1550
+ void Promise.resolve().then(onOpen).then(
1551
+ () => setState("idle"),
1552
+ () => setState("error")
1553
+ );
1554
+ },
1555
+ children: [
1556
+ children,
1557
+ state === "loading" ? " (opening\u2026)" : state === "error" ? " (retry)" : null
1558
+ ]
1559
+ }
1560
+ );
1561
+ }
1562
+ function isSandboxHref(href) {
1563
+ return openGeniLinkScheme(href) === "sandbox";
1564
+ }
1565
+ function sandboxFileLocationFromHref(href) {
1566
+ return parseSandboxLink(href);
1567
+ }
1568
+ function sandboxFilePathFromHref(href) {
1569
+ return sandboxFileLocationFromHref(href)?.path ?? null;
1570
+ }
1571
+ function retainedImageId(src) {
1572
+ return parseRetainedFileReference(src);
1573
+ }
1574
+ function MarkdownImage({ src, alt }) {
1575
+ const t = useOpenGeniText();
1576
+ const { renderImage, suppressImages } = useContext5(InteractiveContext);
1577
+ if (suppressImages)
1578
+ return /* @__PURE__ */ jsxs5("span", { "data-og-image-placeholder": "", children: [
1579
+ alt || t("markdown.image"),
1580
+ " ",
1581
+ t("markdown.previewUnavailable")
1582
+ ] });
1583
+ if (!src) return /* @__PURE__ */ jsx7("span", { children: alt ?? t("markdown.imageUnavailable") });
1584
+ if (retainedImageId(src))
1585
+ return renderImage ? /* @__PURE__ */ jsx7(Fragment4, { children: renderImage({ src, alt: alt ?? "" }) }) : /* @__PURE__ */ jsxs5("span", { children: [
1586
+ alt || t("markdown.image"),
1587
+ " ",
1588
+ t("markdown.previewUnavailable")
1589
+ ] });
1590
+ return /* @__PURE__ */ jsx7("img", { src, alt: alt ?? "", loading: "lazy", className: "my-3 max-w-full rounded-og-md" });
1591
+ }
1592
+ var markdownUrlTransform = (url, key, node) => key === "href" && node.tagName === "a" && isReservedOpenGeniLink(url) || key === "src" && node.tagName === "img" && retainedImageId(url) ? url : defaultUrlTransform(url);
1593
+ var REVEAL_LINGER_MS = 480 * MOTION_INSPECT_SCALE;
1594
+ var MARKDOWN_SETTLE_MS = 480 * MOTION_INSPECT_SCALE;
1595
+ function nodeText(node) {
1596
+ if (node == null || typeof node === "boolean") {
1597
+ return "";
1598
+ }
1599
+ if (typeof node === "string" || typeof node === "number") {
1600
+ return String(node);
1601
+ }
1602
+ if (Array.isArray(node)) {
1603
+ return node.map(nodeText).join("");
1604
+ }
1605
+ if (isValidElement(node)) {
1606
+ return nodeText(node.props.children);
1607
+ }
1608
+ return "";
1609
+ }
1610
+ function fenceLanguage(children) {
1611
+ let found = null;
1612
+ Children.forEach(children, (child) => {
1613
+ if (found || !isValidElement(child)) {
1614
+ return;
1615
+ }
1616
+ const match = /language-([a-zA-Z0-9_+-]+)/.exec(child.props.className ?? "");
1617
+ if (match?.[1]) {
1618
+ found = match[1];
1619
+ }
1620
+ });
1621
+ return found;
1622
+ }
1623
+ function InteractiveCodeBlock({ children, node }) {
1624
+ const t = useOpenGeniText();
1625
+ const { source, render, streaming } = useContext5(InteractiveContext);
1626
+ const language = fenceLanguage(children);
1627
+ if (render && (language === "opengeni-html" || language === "opengeni-site")) {
1628
+ const start = node?.position?.start.offset;
1629
+ const end = node?.position?.end.offset;
1630
+ const original = start !== void 0 && end !== void 0 && end <= source.length ? source.slice(start, end) : "";
1631
+ const lines = original.trimEnd().split("\n");
1632
+ const opening = lines[0]?.match(/^ {0,3}([\x60]{3,}|~{3,})/);
1633
+ const closing = lines.at(-1)?.replace(/^\s*(?:>\s*)+/, "").trim();
1634
+ const complete = opening && lines.length > 1 && closing && closing.length >= opening[1].length && [...closing].every((c) => c === opening[1][0]);
1635
+ if (!complete) {
1636
+ return /* @__PURE__ */ jsx7("div", { role: "status", "aria-live": "polite", "aria-busy": streaming === true, className: "my-3", children: streaming ? /* @__PURE__ */ jsx7(PreviewLoading, {}) : /* @__PURE__ */ jsx7(
1637
+ ActivityDisclosure,
1638
+ {
1639
+ icon: /* @__PURE__ */ jsx7(PanelsTopLeftIcon, { "aria-hidden": true, className: "size-3.5" }),
1640
+ title: t("markdown.previewIncomplete"),
1641
+ running: false,
1642
+ expandable: false,
1643
+ preview: t("markdown.generationStoppedBeforeThePreview")
1644
+ }
1645
+ ) });
1646
+ }
1647
+ return /* @__PURE__ */ jsx7(Fragment4, { children: render({
1648
+ kind: language === "opengeni-html" ? "html" : "site",
1649
+ content: nodeText(children).replace(/\n$/, "")
1650
+ }) });
1651
+ }
1652
+ return /* @__PURE__ */ jsx7(MarkdownCodeBlock, { children });
1653
+ }
1654
+ function MarkdownCodeBlock({ children }) {
1655
+ const t = useOpenGeniText();
1656
+ const code = nodeText(children).replace(/\n$/, "");
1657
+ const language = fenceLanguage(children);
1658
+ return /* @__PURE__ */ jsxs5("div", { className: "group/copy relative mt-3 first:mt-0", children: [
1659
+ /* @__PURE__ */ jsxs5("div", { className: "pointer-events-none absolute top-1.5 right-1.5 z-10 flex items-center gap-1", children: [
1660
+ language ? /* @__PURE__ */ jsx7("span", { className: "rounded px-1 py-0.5 font-og-mono text-[10px] uppercase tracking-wide text-og-fg-subtle/80 opacity-0 transition-opacity group-hover/copy:opacity-100 pointer-coarse:opacity-70", children: language }) : null,
1661
+ /* @__PURE__ */ jsx7("div", { className: "pointer-events-auto", children: /* @__PURE__ */ jsx7(CopyButton, { text: code, label: t("markdown.copyCode"), reveal: "group-hover" }) })
1662
+ ] }),
1663
+ /* @__PURE__ */ jsx7(
1664
+ "pre",
1665
+ {
1666
+ tabIndex: 0,
1667
+ className: "overflow-x-auto overflow-y-hidden rounded-og-md bg-og-surface-1/70 px-3 py-2.5 font-og-mono text-og-sm leading-5 text-og-fg-muted [scrollbar-gutter:stable] [&>code]:block [&>code]:border-0 [&>code]:bg-transparent [&>code]:p-0 [&>code]:leading-5 [&>code]:text-inherit",
1668
+ children
1669
+ }
1670
+ )
1671
+ ] });
1672
+ }
1673
+ function MarkdownTable({ children, className, ...props }) {
1674
+ const t = useOpenGeniText();
1675
+ const wrapperRef = useRef4(null);
1676
+ const tableRef = useRef4(null);
1677
+ const layoutRef = useRef4(void 0);
1678
+ useEffect4(() => {
1679
+ const wrapper = wrapperRef.current;
1680
+ const table = tableRef.current;
1681
+ if (!wrapper?.closest("[data-og-wide-table-message]") || !table) return;
1682
+ let disposed = false;
1683
+ void import("./markdown-table-layout-3PV2UAAH.js").then(({ observeMarkdownTableLayout }) => {
1684
+ if (!disposed) layoutRef.current = observeMarkdownTableLayout(wrapper, table);
1685
+ }).catch(() => {
1686
+ });
1687
+ return () => {
1688
+ disposed = true;
1689
+ layoutRef.current?.disconnect();
1690
+ layoutRef.current = void 0;
1691
+ };
1692
+ }, []);
1693
+ useEffect4(() => {
1694
+ layoutRef.current?.measure();
1695
+ }, [children]);
1696
+ return (
1697
+ // Touch shows the copy action permanently at full touch size, so it sits
1698
+ // under the table there instead of covering the right-aligned header.
1699
+ /* @__PURE__ */ jsxs5(
1700
+ "div",
1701
+ {
1702
+ ref: wrapperRef,
1703
+ "data-og-table": "",
1704
+ className: "group/copy relative mt-3 max-w-full first:mt-0 pointer-coarse:pb-11",
1705
+ children: [
1706
+ /* @__PURE__ */ jsx7("div", { className: "pointer-events-none absolute top-0 right-0 z-10 pointer-coarse:top-auto pointer-coarse:bottom-0", children: /* @__PURE__ */ jsx7("div", { className: "pointer-events-auto", children: /* @__PURE__ */ jsx7(
1707
+ CopyButton,
1708
+ {
1709
+ text: () => tableElementToTsv(tableRef.current),
1710
+ label: t("markdown.copyTable"),
1711
+ reveal: "group-hover"
1712
+ }
1713
+ ) }) }),
1714
+ /* @__PURE__ */ jsx7("div", { className: "overflow-x-auto", tabIndex: 0, children: /* @__PURE__ */ jsx7(
1715
+ "table",
1716
+ {
1717
+ ref: tableRef,
1718
+ className: cn(
1719
+ // Leading `&` only: a trailing one (`tr:last-child>&`) under the scoped
1720
+ // selector list needs `:is()`, which bundlers warn about for older targets.
1721
+ "w-full min-w-0 border-collapse text-og-base [&_tr:last-child>td]:border-b-0",
1722
+ className
1723
+ ),
1724
+ ...props,
1725
+ children
1726
+ }
1727
+ ) })
1728
+ ]
1729
+ }
1730
+ )
1731
+ );
1732
+ }
1733
+ var REMARK_PLUGINS = [remarkGfm];
1734
+ var SOFT_LINE_BREAK_REMARK_PLUGINS = [
1735
+ remarkGfm,
1736
+ remarkSoftLineBreaks
1737
+ ];
1738
+ function MarkdownImpl({
1739
+ children,
1740
+ artifactHref,
1741
+ className,
1742
+ softLineBreaks = false,
1743
+ streaming = false,
1744
+ onSandboxFile,
1745
+ renderInteractiveBlock,
1746
+ renderImage,
1747
+ resolveLink,
1748
+ suppressImages
1749
+ }) {
1750
+ const revealRef = useRef4(null);
1751
+ const bodyRef = useRef4(null);
1752
+ const [, bump] = useReducer((n) => n + 1, 0);
1753
+ const [settling, setSettling] = useState3(false);
1754
+ const hadRevealRef = useRef4(false);
1755
+ const now = typeof performance !== "undefined" ? performance.now() : Date.now();
1756
+ const crystallize = (mutate) => {
1757
+ mutate();
1758
+ setSettling(true);
1759
+ bump();
1760
+ return setTimeout(() => setSettling(false), MARKDOWN_SETTLE_MS);
1761
+ };
1762
+ if (streaming && revealRef.current === null && !prefersReducedMotion()) {
1763
+ revealRef.current = createStreamReveal();
1764
+ }
1765
+ const reveal = revealRef.current;
1766
+ if (reveal !== null && streaming) {
1767
+ reveal.observe(children, now);
1768
+ }
1769
+ if (reveal !== null) {
1770
+ hadRevealRef.current = true;
1771
+ }
1772
+ const revealActive = reveal !== null && (streaming || reveal.hasActive(now));
1773
+ const secretsUi = useSecretsUi();
1774
+ const secretRefs = secretsUi && mayContainSecretReference(children) ? [[rehypeSecretRefs, { tokenize: secretsUi.tokenize }]] : [];
1775
+ const rehypePluginList = [
1776
+ ...secretRefs,
1777
+ ...revealActive && reveal !== null ? [[rehypeStreamReveal, { reveal, now }]] : []
1778
+ ];
1779
+ const rehypePlugins = rehypePluginList.length > 0 ? rehypePluginList : void 0;
1780
+ useEffect4(() => {
1781
+ if (streaming || revealRef.current === null) {
1782
+ return;
1783
+ }
1784
+ let clearSettle;
1785
+ const timer = setTimeout(() => {
1786
+ const shouldSettle = hadRevealRef.current && !prefersReducedMotion();
1787
+ if (shouldSettle) {
1788
+ hadRevealRef.current = false;
1789
+ }
1790
+ if (shouldSettle) {
1791
+ clearSettle = crystallize(() => {
1792
+ revealRef.current = null;
1793
+ });
1794
+ } else {
1795
+ revealRef.current = null;
1796
+ bump();
1797
+ }
1798
+ }, REVEAL_LINGER_MS);
1799
+ return () => {
1800
+ clearTimeout(timer);
1801
+ if (clearSettle !== void 0) {
1802
+ clearTimeout(clearSettle);
1803
+ }
1804
+ };
1805
+ }, [streaming]);
1806
+ const wasStreamingRef = useRef4(streaming);
1807
+ useEffect4(() => {
1808
+ const ended = wasStreamingRef.current && !streaming;
1809
+ wasStreamingRef.current = streaming;
1810
+ if (!ended || revealRef.current !== null || prefersReducedMotion()) {
1811
+ return;
1812
+ }
1813
+ setSettling(true);
1814
+ const timer = setTimeout(() => setSettling(false), MARKDOWN_SETTLE_MS);
1815
+ return () => clearTimeout(timer);
1816
+ }, [streaming]);
1817
+ const parseText = streaming || revealActive ? softenStreamingMarkdown(children) : children;
1818
+ const linkContext = useMemo(
1819
+ () => ({ onSandboxFile, artifactHref, resolveLink }),
1820
+ [onSandboxFile, artifactHref, resolveLink]
1821
+ );
1822
+ const interactiveContext = useMemo(
1823
+ () => ({
1824
+ source: children,
1825
+ streaming,
1826
+ ...renderInteractiveBlock ? { render: renderInteractiveBlock } : {},
1827
+ ...renderImage ? { renderImage } : {},
1828
+ ...suppressImages ? { suppressImages } : {}
1829
+ }),
1830
+ [children, streaming, renderInteractiveBlock, renderImage, suppressImages]
1831
+ );
1832
+ return /* @__PURE__ */ jsx7(MarkdownLinkContext.Provider, { value: linkContext, children: /* @__PURE__ */ jsx7(InteractiveContext.Provider, { value: interactiveContext, children: /* @__PURE__ */ jsx7(TooltipProvider, { delayDuration: 400, children: /* @__PURE__ */ jsx7(
1833
+ "div",
1834
+ {
1835
+ ref: bodyRef,
1836
+ className: cn(
1837
+ "og-markdown-body min-w-0 break-words",
1838
+ settling && "og-markdown-settle",
1839
+ className
1840
+ ),
1841
+ children: /* @__PURE__ */ jsx7(
1842
+ ReactMarkdown,
1843
+ {
1844
+ remarkPlugins: softLineBreaks ? SOFT_LINE_BREAK_REMARK_PLUGINS : REMARK_PLUGINS,
1845
+ rehypePlugins,
1846
+ components: markdownComponents,
1847
+ urlTransform: markdownUrlTransform,
1848
+ children: parseText
1849
+ }
1850
+ )
1851
+ }
1852
+ ) }) }) });
1853
+ }
1854
+ var Markdown = memo2(function SearchableMarkdown(props) {
1855
+ const t = useOpenGeniText();
1856
+ const [retained, setRetained] = useState3(
1857
+ null
1858
+ );
1859
+ if (props.searchTarget && (retained?.target !== props.searchTarget || retained.text !== props.children)) {
1860
+ setRetained({ text: props.children, target: props.searchTarget });
1861
+ }
1862
+ const target = props.searchTarget ?? (retained?.text === props.children ? retained.target : null);
1863
+ if (!target) return /* @__PURE__ */ jsx7(MarkdownImpl, { ...props });
1864
+ const offset = searchMatchOffset(props.children, target);
1865
+ if (offset < 0)
1866
+ return props.searchTarget ? /* @__PURE__ */ jsx7("div", { role: "status", children: t("markdown.thisMatchIsNoLonger") }) : /* @__PURE__ */ jsx7(MarkdownImpl, { ...props });
1867
+ let start = Math.max(0, offset - 240);
1868
+ let end = Math.min(props.children.length, offset + target.query.length + 240);
1869
+ if (start > 0 && /[\uDC00-\uDFFF]/.test(props.children[start])) start--;
1870
+ if (end < props.children.length && /[\uDC00-\uDFFF]/.test(props.children[end])) end++;
1871
+ const MatchTag = props.searchTarget ? "mark" : "span";
1872
+ return /* @__PURE__ */ jsxs5("div", { className: cn("og-markdown-body min-w-0 break-words", props.className), children: [
1873
+ /* @__PURE__ */ jsxs5("div", { "data-og-annotation-chrome": "", className: "text-xs opacity-70", children: [
1874
+ t("markdown.matchInMessageSourceExcerpt"),
1875
+ /* @__PURE__ */ jsx7(
1876
+ "button",
1877
+ {
1878
+ type: "button",
1879
+ disabled: !!props.searchTarget,
1880
+ title: props.searchTarget ? t("markdown.closeFindToShowThe") : void 0,
1881
+ className: "ml-2 inline-flex min-h-7 items-center rounded-og-sm px-1.5 text-og-xs font-medium text-og-fg-muted outline-hidden hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent/45 pointer-coarse:min-h-11 disabled:opacity-50",
1882
+ onClick: () => setRetained(null),
1883
+ children: t("markdown.showFormattedMessage")
1884
+ }
1885
+ )
1886
+ ] }),
1887
+ /* @__PURE__ */ jsxs5("div", { style: { whiteSpace: "pre-wrap", overflowWrap: "anywhere" }, children: [
1888
+ start > 0 ? "\u2026" : "",
1889
+ props.children.slice(start, offset),
1890
+ /* @__PURE__ */ jsx7(
1891
+ MatchTag,
1892
+ {
1893
+ "data-og-search-occurrence": target.occurrence ?? 0,
1894
+ "data-og-search-sequence": target.sequence,
1895
+ "data-og-search-query": target.query,
1896
+ "data-og-search-offset": offset,
1897
+ children: props.children.slice(offset, offset + target.query.length)
1898
+ }
1899
+ ),
1900
+ props.children.slice(offset + target.query.length, end),
1901
+ end < props.children.length ? "\u2026" : ""
1902
+ ] })
1903
+ ] });
1904
+ });
1905
+
1906
+ export {
1907
+ SecretsUiProvider,
1908
+ useSecretsUi,
1909
+ SecretRefChip,
1910
+ SecretRefText,
1911
+ SecretAnswerChip,
1912
+ TimelineSearchRevealContext,
1913
+ useTimelineSearchReveal,
1914
+ isTimelineSearchTarget,
1915
+ useTimelineSearchNavigation,
1916
+ DisclosureDefaultsProvider,
1917
+ useForcedDefaultOpen,
1918
+ ToolCallTruncationProvider,
1919
+ CompactActivityContext,
1920
+ ActivityDisclosure,
1921
+ TermBlock,
1922
+ PayloadBlock,
1923
+ BodyNote,
1924
+ MediaSkeleton,
1925
+ MediaEmpty,
1926
+ Thumbnail,
1927
+ ScreenshotFigure,
1928
+ MOTION_INSPECT_SCALE,
1929
+ CopyButton,
1930
+ CopyHoverFrame,
1931
+ sandboxFileLocationFromHref,
1932
+ sandboxFilePathFromHref,
1933
+ retainedImageId,
1934
+ Markdown
1935
+ };
1936
+ //# sourceMappingURL=chunk-AT2HD6RQ.js.map