@opengeni/react 2.5.0-canary.2 → 3.0.1-canary.38817070914001

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 (865) hide show
  1. package/README.md +784 -22
  2. package/dist/accounts.d.ts +64 -0
  3. package/dist/accounts.js +824 -0
  4. package/dist/accounts.js.map +1 -0
  5. package/dist/approvals.d.ts +2 -1
  6. package/dist/artifacts-document.js +5 -3
  7. package/dist/artifacts-presentation.js +5 -3
  8. package/dist/artifacts-spreadsheet.d.ts +1 -1
  9. package/dist/artifacts-spreadsheet.js +5 -3
  10. package/dist/artifacts.d.ts +5 -1
  11. package/dist/artifacts.js +536 -42
  12. package/dist/artifacts.js.map +1 -1
  13. package/dist/browser-viewer-M7BIVFTW.js +19 -0
  14. package/dist/capability-catalog-row.d.ts +20 -0
  15. package/dist/capability-logo-fallback.d.ts +3 -0
  16. package/dist/chat-interactive-block-BO2IWXVK.js +14 -0
  17. package/dist/chunk-2DDJ6YH6.js +41 -0
  18. package/dist/chunk-2DDJ6YH6.js.map +1 -0
  19. package/dist/chunk-2HVLQ26H.js +183 -0
  20. package/dist/chunk-2HVLQ26H.js.map +1 -0
  21. package/dist/chunk-3PVDYTTB.js +24 -0
  22. package/dist/chunk-3PVDYTTB.js.map +1 -0
  23. package/dist/chunk-3UZCWK46.js +298 -0
  24. package/dist/chunk-3UZCWK46.js.map +1 -0
  25. package/dist/chunk-47CKUXTW.js +293 -0
  26. package/dist/chunk-47CKUXTW.js.map +1 -0
  27. package/dist/chunk-4QYP6QUI.js +109 -0
  28. package/dist/chunk-4QYP6QUI.js.map +1 -0
  29. package/dist/chunk-5EY26VZ7.js +1053 -0
  30. package/dist/chunk-5EY26VZ7.js.map +1 -0
  31. package/dist/chunk-5I4VRWBB.js +56 -0
  32. package/dist/chunk-5I4VRWBB.js.map +1 -0
  33. package/dist/chunk-5WOR7UCL.js +191 -0
  34. package/dist/chunk-5WOR7UCL.js.map +1 -0
  35. package/dist/chunk-5XEXTWEM.js +1911 -0
  36. package/dist/chunk-5XEXTWEM.js.map +1 -0
  37. package/dist/chunk-5YJLGOM5.js +51 -0
  38. package/dist/chunk-5YJLGOM5.js.map +1 -0
  39. package/dist/chunk-6JFN3OWG.js +386 -0
  40. package/dist/chunk-6JFN3OWG.js.map +1 -0
  41. package/dist/chunk-6SNDCUPB.js +83 -0
  42. package/dist/chunk-6SNDCUPB.js.map +1 -0
  43. package/dist/chunk-7QJT5O4S.js +35 -0
  44. package/dist/chunk-7QJT5O4S.js.map +1 -0
  45. package/dist/chunk-A55KV72M.js +402 -0
  46. package/dist/chunk-A55KV72M.js.map +1 -0
  47. package/dist/chunk-B27E3V37.js +29 -0
  48. package/dist/chunk-B27E3V37.js.map +1 -0
  49. package/dist/chunk-BOFEQC6K.js +162 -0
  50. package/dist/chunk-BOFEQC6K.js.map +1 -0
  51. package/dist/chunk-CM7LVUKC.js +35 -0
  52. package/dist/chunk-CM7LVUKC.js.map +1 -0
  53. package/dist/chunk-CORUP6JB.js +122 -0
  54. package/dist/chunk-CORUP6JB.js.map +1 -0
  55. package/dist/chunk-CSX5FFKZ.js +35 -0
  56. package/dist/chunk-CSX5FFKZ.js.map +1 -0
  57. package/dist/chunk-EGVHJKGJ.js +3125 -0
  58. package/dist/chunk-EGVHJKGJ.js.map +1 -0
  59. package/dist/{chunk-NEXLLTP4.js → chunk-G76LSA76.js} +6 -5
  60. package/dist/chunk-G76LSA76.js.map +1 -0
  61. package/dist/{chunk-PEI6RANI.js → chunk-GQMRL52F.js} +311 -75
  62. package/dist/chunk-GQMRL52F.js.map +1 -0
  63. package/dist/{chunk-QGBJ6GHG.js → chunk-GUUXOISA.js} +1113 -457
  64. package/dist/chunk-GUUXOISA.js.map +1 -0
  65. package/dist/{chunk-MXJGO7LE.js → chunk-HGKELH6Z.js} +1178 -115
  66. package/dist/chunk-HGKELH6Z.js.map +1 -0
  67. package/dist/{chunk-HUIKIDM5.js → chunk-I7X2P4FU.js} +225 -116
  68. package/dist/chunk-I7X2P4FU.js.map +1 -0
  69. package/dist/chunk-IGFZFLI2.js +1390 -0
  70. package/dist/chunk-IGFZFLI2.js.map +1 -0
  71. package/dist/{chunk-4MDLEHXL.js → chunk-IMSUVYQB.js} +26 -13
  72. package/dist/chunk-IMSUVYQB.js.map +1 -0
  73. package/dist/chunk-IOYHDEP3.js +38 -0
  74. package/dist/chunk-IOYHDEP3.js.map +1 -0
  75. package/dist/{chunk-X4JAFD5R.js → chunk-ISN726VG.js} +1513 -697
  76. package/dist/chunk-ISN726VG.js.map +1 -0
  77. package/dist/chunk-IZV5FTJC.js +55 -0
  78. package/dist/chunk-IZV5FTJC.js.map +1 -0
  79. package/dist/chunk-KF33GTWN.js +343 -0
  80. package/dist/chunk-KF33GTWN.js.map +1 -0
  81. package/dist/chunk-KSGQ5ODA.js +457 -0
  82. package/dist/chunk-KSGQ5ODA.js.map +1 -0
  83. package/dist/chunk-KZENYIA2.js +382 -0
  84. package/dist/chunk-KZENYIA2.js.map +1 -0
  85. package/dist/chunk-LJUMYUBO.js +218 -0
  86. package/dist/chunk-LJUMYUBO.js.map +1 -0
  87. package/dist/chunk-LSW2OJVV.js +380 -0
  88. package/dist/chunk-LSW2OJVV.js.map +1 -0
  89. package/dist/chunk-M357MHH3.js +2 -0
  90. package/dist/chunk-M357MHH3.js.map +1 -0
  91. package/dist/chunk-N7S72EXK.js +25 -0
  92. package/dist/chunk-N7S72EXK.js.map +1 -0
  93. package/dist/chunk-NX4ADH73.js +14 -0
  94. package/dist/chunk-NX4ADH73.js.map +1 -0
  95. package/dist/chunk-O5GPRG76.js +3006 -0
  96. package/dist/chunk-O5GPRG76.js.map +1 -0
  97. package/dist/chunk-O7F6UJO4.js +71 -0
  98. package/dist/chunk-O7F6UJO4.js.map +1 -0
  99. package/dist/chunk-OYQQJL3J.js +16 -0
  100. package/dist/chunk-OYQQJL3J.js.map +1 -0
  101. package/dist/{chunk-H5YGYNXS.js → chunk-P4BNUO57.js} +60 -17
  102. package/dist/chunk-P4BNUO57.js.map +1 -0
  103. package/dist/{chunk-JVYQRRC4.js → chunk-PEHTX3V7.js} +21 -1
  104. package/dist/chunk-PEHTX3V7.js.map +1 -0
  105. package/dist/chunk-PMV53IMM.js +26 -0
  106. package/dist/chunk-PMV53IMM.js.map +1 -0
  107. package/dist/{chunk-ZUT5QSQB.js → chunk-PWCBMEV2.js} +4262 -3917
  108. package/dist/chunk-PWCBMEV2.js.map +1 -0
  109. package/dist/{chunk-KCGXPP5V.js → chunk-PYEOPA4M.js} +13 -7
  110. package/dist/chunk-PYEOPA4M.js.map +1 -0
  111. package/dist/{chunk-T7VAYG2I.js → chunk-Q26UAIXI.js} +257 -45
  112. package/dist/chunk-Q26UAIXI.js.map +1 -0
  113. package/dist/{chunk-KZ73RL76.js → chunk-QHUE7E4N.js} +8 -3
  114. package/dist/chunk-QHUE7E4N.js.map +1 -0
  115. package/dist/chunk-QV3DJVRZ.js +11 -0
  116. package/dist/chunk-QV3DJVRZ.js.map +1 -0
  117. package/dist/chunk-R5SBNG7S.js +810 -0
  118. package/dist/chunk-R5SBNG7S.js.map +1 -0
  119. package/dist/chunk-RI42H5IU.js +326 -0
  120. package/dist/chunk-RI42H5IU.js.map +1 -0
  121. package/dist/chunk-S2QH6EZ5.js +211 -0
  122. package/dist/chunk-S2QH6EZ5.js.map +1 -0
  123. package/dist/chunk-S5ZT4TBR.js +2028 -0
  124. package/dist/chunk-S5ZT4TBR.js.map +1 -0
  125. package/dist/chunk-SHLZMAJN.js +304 -0
  126. package/dist/chunk-SHLZMAJN.js.map +1 -0
  127. package/dist/chunk-TGXK4BAZ.js +293 -0
  128. package/dist/chunk-TGXK4BAZ.js.map +1 -0
  129. package/dist/{chunk-XXWH2JLC.js → chunk-TIHSXNBC.js} +616 -621
  130. package/dist/chunk-TIHSXNBC.js.map +1 -0
  131. package/dist/{chunk-5YK2ZDIG.js → chunk-TNEZNMSN.js} +4 -10
  132. package/dist/chunk-TNEZNMSN.js.map +1 -0
  133. package/dist/{chunk-22KP6LR5.js → chunk-TXS65BB2.js} +3 -1
  134. package/dist/{chunk-22KP6LR5.js.map → chunk-TXS65BB2.js.map} +1 -1
  135. package/dist/chunk-UNJPZGNK.js +63 -0
  136. package/dist/chunk-UNJPZGNK.js.map +1 -0
  137. package/dist/chunk-VIUEOHXY.js +394 -0
  138. package/dist/chunk-VIUEOHXY.js.map +1 -0
  139. package/dist/chunk-VWH3YAV7.js +14058 -0
  140. package/dist/chunk-VWH3YAV7.js.map +1 -0
  141. package/dist/{chunk-ICA6R6TW.js → chunk-WNN7NO2N.js} +1451 -355
  142. package/dist/chunk-WNN7NO2N.js.map +1 -0
  143. package/dist/chunk-XDA5QJE7.js +402 -0
  144. package/dist/chunk-XDA5QJE7.js.map +1 -0
  145. package/dist/{chunk-VZTQ73XT.js → chunk-XEA5BCMA.js} +3 -1
  146. package/dist/{chunk-VZTQ73XT.js.map → chunk-XEA5BCMA.js.map} +1 -1
  147. package/dist/chunk-XHF7OYAN.js +1150 -0
  148. package/dist/chunk-XHF7OYAN.js.map +1 -0
  149. package/dist/chunk-YSRBFJMQ.js +43 -0
  150. package/dist/chunk-YSRBFJMQ.js.map +1 -0
  151. package/dist/chunk-ZOZAPAUO.js +174 -0
  152. package/dist/chunk-ZOZAPAUO.js.map +1 -0
  153. package/dist/chunk-ZQV5W7YC.js +809 -0
  154. package/dist/chunk-ZQV5W7YC.js.map +1 -0
  155. package/dist/chunk-ZUWF4NF7.js +13 -0
  156. package/dist/chunk-ZUWF4NF7.js.map +1 -0
  157. package/dist/client.d.ts +16 -7
  158. package/dist/clipboard.js +3 -1
  159. package/dist/commands/types.d.ts +2 -0
  160. package/dist/components/anthropic-mark.d.ts +3 -0
  161. package/dist/components/approval-surface.d.ts +19 -6
  162. package/dist/components/artifacts/artifact-chrome.d.ts +120 -0
  163. package/dist/components/artifacts/artifact-sandbox.d.ts +30 -0
  164. package/dist/components/artifacts/artifact-surface.d.ts +4 -2
  165. package/dist/components/artifacts/chat-interactive-block.d.ts +29 -0
  166. package/dist/components/artifacts/deferred-chat-media.d.ts +15 -0
  167. package/dist/components/artifacts/document-editor.d.ts +4 -2
  168. package/dist/components/artifacts/editable-artifact-ui.d.ts +2 -1
  169. package/dist/components/artifacts/editable-artifact-view.d.ts +48 -0
  170. package/dist/components/artifacts/editable-document.d.ts +1 -1
  171. package/dist/components/artifacts/editable-presentation.d.ts +2 -2
  172. package/dist/components/artifacts/editable-spreadsheet.d.ts +8 -3
  173. package/dist/components/artifacts/index.d.ts +9 -2
  174. package/dist/components/artifacts/inline-html-document.d.ts +2 -0
  175. package/dist/components/artifacts/latest-task-runner.d.ts +15 -0
  176. package/dist/components/artifacts/presentation-editor.d.ts +6 -2
  177. package/dist/components/artifacts/published-html-artifact-frame.d.ts +23 -3
  178. package/dist/components/artifacts/session-artifact-viewer.d.ts +39 -0
  179. package/dist/components/artifacts/site-view.d.ts +26 -0
  180. package/dist/components/artifacts/spreadsheet-command-queue.d.ts +20 -0
  181. package/dist/components/artifacts/spreadsheet-download.d.ts +7 -0
  182. package/dist/components/artifacts/spreadsheet-general-display.d.ts +24 -0
  183. package/dist/components/artifacts/spreadsheet-grid.d.ts +10 -3
  184. package/dist/components/artifacts/spreadsheet-resize.d.ts +50 -0
  185. package/dist/components/artifacts/spreadsheet-submissions.d.ts +9 -0
  186. package/dist/components/artifacts/visualization-assets.gen.d.ts +2 -0
  187. package/dist/components/browser-select-control.d.ts +16 -0
  188. package/dist/components/browser-viewer.d.ts +11 -2
  189. package/dist/components/chat-composer.d.ts +21 -3
  190. package/dist/components/child-session-link.d.ts +9 -0
  191. package/dist/components/claude-mark.d.ts +3 -0
  192. package/dist/components/code-editor.d.ts +1 -4
  193. package/dist/components/composer-transcription-control.d.ts +7 -0
  194. package/dist/components/composer.d.ts +38 -63
  195. package/dist/components/computer-viewer.d.ts +1 -1
  196. package/dist/components/copy-button.d.ts +3 -1
  197. package/dist/components/desktop-viewer.d.ts +1 -1
  198. package/dist/components/file-browser.d.ts +4 -1
  199. package/dist/components/fleet-tile.d.ts +2 -2
  200. package/dist/components/grok-mark.d.ts +26 -0
  201. package/dist/components/human-input-form.d.ts +28 -32
  202. package/dist/components/human-input-surface.d.ts +7 -2
  203. package/dist/components/linkified-text.d.ts +18 -0
  204. package/dist/components/machine-input-display.d.ts +22 -1
  205. package/dist/components/machines/agent-status-icon.d.ts +6 -0
  206. package/dist/components/machines/machine-detail.d.ts +7 -1
  207. package/dist/components/machines/machine-status.d.ts +48 -0
  208. package/dist/components/markdown-table-layout.d.ts +18 -0
  209. package/dist/components/markdown.d.ts +37 -4
  210. package/dist/components/message-timeline.d.ts +86 -7
  211. package/dist/components/model-mark.d.ts +29 -0
  212. package/dist/components/model-policy-picker-menu.d.ts +9 -0
  213. package/dist/components/model-policy-picker.d.ts +41 -25
  214. package/dist/components/new-conversation.d.ts +32 -0
  215. package/dist/components/open-geni-chat.d.ts +73 -0
  216. package/dist/components/open-geni-links.d.ts +68 -0
  217. package/dist/components/openrouter-mark.d.ts +6 -0
  218. package/dist/components/opper-mark.d.ts +7 -0
  219. package/dist/components/preview-loading.d.ts +2 -0
  220. package/dist/components/provider-recovery-notice.d.ts +16 -0
  221. package/dist/components/queue-item-content.d.ts +9 -0
  222. package/dist/components/rehype-secret-refs.d.ts +23 -0
  223. package/dist/components/remark-soft-line-breaks.d.ts +38 -0
  224. package/dist/components/sandbox-files.d.ts +6 -1
  225. package/dist/components/sandbox-workspace.d.ts +23 -0
  226. package/dist/components/secret-question-field.d.ts +31 -0
  227. package/dist/components/secret-ref-chip.d.ts +35 -0
  228. package/dist/components/session-capability-frame.d.ts +37 -0
  229. package/dist/components/session-chrome.d.ts +57 -8
  230. package/dist/components/session-commands-panel.d.ts +6 -0
  231. package/dist/components/session-commands.d.ts +6 -0
  232. package/dist/components/session-connection-request.d.ts +8 -0
  233. package/dist/components/session-conversation.d.ts +157 -0
  234. package/dist/components/session-list.d.ts +39 -0
  235. package/dist/components/session-mcp-capability-card.d.ts +41 -0
  236. package/dist/components/session-proxy-scope.d.ts +35 -0
  237. package/dist/components/session-status.d.ts +4 -1
  238. package/dist/components/session-usage-limit-notice.d.ts +39 -0
  239. package/dist/components/timeline-anchor.d.ts +24 -0
  240. package/dist/components/timeline-annotation-chrome.d.ts +25 -0
  241. package/dist/components/timeline-annotation-layout.d.ts +42 -0
  242. package/dist/components/timeline-annotation-markers.d.ts +8 -0
  243. package/dist/components/timeline-annotation-reveal-context.d.ts +4 -0
  244. package/dist/components/timeline-annotation-shared.d.ts +31 -0
  245. package/dist/components/timeline-annotations-dialog.d.ts +3 -2
  246. package/dist/components/timeline-annotations.d.ts +13 -3
  247. package/dist/components/timeline-reading-progress.d.ts +11 -0
  248. package/dist/components/timeline-search.d.ts +34 -0
  249. package/dist/components/timeline-settlement.d.ts +16 -0
  250. package/dist/components/tip-follow.d.ts +16 -0
  251. package/dist/components/tool-action-review.d.ts +47 -0
  252. package/dist/components/tool-review-history.d.ts +25 -0
  253. package/dist/components/usage-limit-notice.d.ts +49 -0
  254. package/dist/components/usage-member-list.d.ts +91 -0
  255. package/dist/components/usage-meter.d.ts +73 -0
  256. package/dist/components/use-viewer-menu-dismiss.d.ts +2 -0
  257. package/dist/components/user-message-body.d.ts +10 -1
  258. package/dist/composer-messages.d.ts +74 -0
  259. package/dist/composer-messages.js +9 -0
  260. package/dist/composer-messages.js.map +1 -0
  261. package/dist/composer-voice-events.d.ts +8 -0
  262. package/dist/composer.d.ts +5 -4
  263. package/dist/composer.js +26 -13
  264. package/dist/computer-viewer-GMLDXPON.js +20 -0
  265. package/dist/computer-viewer-GMLDXPON.js.map +1 -0
  266. package/dist/connect-account-identity.d.ts +8 -0
  267. package/dist/connect-accounts.d.ts +15 -0
  268. package/dist/connect-chooser.d.ts +18 -0
  269. package/dist/connect-panel.d.ts +18 -0
  270. package/dist/connect-setup.d.ts +18 -0
  271. package/dist/connect.d.ts +21 -0
  272. package/dist/connect.js +2149 -0
  273. package/dist/connect.js.map +1 -0
  274. package/dist/connection-catalog.d.ts +38 -0
  275. package/dist/connection-discovery.d.ts +12 -0
  276. package/dist/connection-installed.d.ts +17 -0
  277. package/dist/connection-logo.d.ts +9 -0
  278. package/dist/connection-service-logo.d.ts +8 -0
  279. package/dist/connection-service-presentation.d.ts +13 -0
  280. package/dist/connection-skeleton.d.ts +5 -0
  281. package/dist/connection-type-picker.d.ts +6 -0
  282. package/dist/conversation-timeline.d.ts +5 -0
  283. package/dist/desktop.d.ts +7 -0
  284. package/dist/desktop.js +27 -0
  285. package/dist/desktop.js.map +1 -0
  286. package/dist/device-authorization.d.ts +23 -0
  287. package/dist/diffs.d.ts +8 -0
  288. package/dist/diffs.js +15 -0
  289. package/dist/diffs.js.map +1 -0
  290. package/dist/discovery-cache.d.ts +5 -0
  291. package/dist/editor.d.ts +7 -0
  292. package/dist/editor.js +22 -0
  293. package/dist/editor.js.map +1 -0
  294. package/dist/embedded-new-voice-OCRNT6U5.js +18 -0
  295. package/dist/embedded-new-voice-OCRNT6U5.js.map +1 -0
  296. package/dist/embedded-session-client.d.ts +23 -0
  297. package/dist/embedded-voice-RPHPYVBT.js +18 -0
  298. package/dist/embedded-voice-RPHPYVBT.js.map +1 -0
  299. package/dist/file-node-visibility.d.ts +15 -0
  300. package/dist/{fleet-decision-row-GGCAT4E4.js → fleet-decision-row-SI63O5V4.js} +4 -1
  301. package/dist/fleet-decision-row-SI63O5V4.js.map +1 -0
  302. package/dist/hooks/latest-question.d.ts +25 -0
  303. package/dist/hooks/shared-machines-list.d.ts +4 -0
  304. package/dist/hooks/shared-query.d.ts +113 -0
  305. package/dist/hooks/use-attached-browsers.d.ts +1 -1
  306. package/dist/hooks/use-auth-runs.d.ts +1 -4
  307. package/dist/hooks/use-available-models.d.ts +1 -1
  308. package/dist/hooks/use-browser-frame-stream.d.ts +1 -1
  309. package/dist/hooks/use-browser-session.d.ts +12 -1
  310. package/dist/hooks/use-client-config-flags.d.ts +49 -0
  311. package/dist/hooks/use-codex-accounts.d.ts +59 -10
  312. package/dist/hooks/use-composer.d.ts +24 -2
  313. package/dist/hooks/use-computer-frame-stream.d.ts +1 -1
  314. package/dist/hooks/use-computer-input-posture.d.ts +13 -0
  315. package/dist/hooks/use-computer-session.d.ts +4 -0
  316. package/dist/hooks/use-connect.d.ts +23 -0
  317. package/dist/hooks/use-desktop-stream.d.ts +1 -1
  318. package/dist/hooks/use-file-attachments.d.ts +21 -2
  319. package/dist/hooks/use-goal.d.ts +2 -1
  320. package/dist/hooks/use-last-started-turn-policy.d.ts +5 -1
  321. package/dist/hooks/use-new-conversation.d.ts +56 -0
  322. package/dist/hooks/use-new-session-draft.d.ts +74 -0
  323. package/dist/hooks/use-realtime-voice-models.d.ts +7 -0
  324. package/dist/hooks/use-sandbox-files.d.ts +4 -1
  325. package/dist/hooks/use-session-conversation.d.ts +49 -0
  326. package/dist/hooks/use-session-events.d.ts +28 -7
  327. package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
  328. package/dist/hooks/use-session-model-account.d.ts +48 -0
  329. package/dist/hooks/use-supergrok-accounts.d.ts +7 -1
  330. package/dist/hooks/use-terminal-stream.d.ts +11 -5
  331. package/dist/hooks/use-usage.d.ts +40 -0
  332. package/dist/hooks/use-vaults.d.ts +53 -0
  333. package/dist/hooks/use-voice-input.d.ts +8 -1
  334. package/dist/hooks/use-workspace-edit.d.ts +4 -0
  335. package/dist/hooks/use-workspace-sessions.d.ts +22 -5
  336. package/dist/human-input-model.d.ts +122 -0
  337. package/dist/human-input.d.ts +3 -1
  338. package/dist/identity-link-accounts.d.ts +11 -0
  339. package/dist/identity-link-consent.d.ts +18 -0
  340. package/dist/index.d.ts +85 -20
  341. package/dist/index.js +2371 -6544
  342. package/dist/index.js.map +1 -1
  343. package/dist/interaction.d.ts +1 -1
  344. package/dist/interaction.js +14 -24
  345. package/dist/interaction.js.map +1 -1
  346. package/dist/latest-question-CHE7E753.js +118 -0
  347. package/dist/latest-question-CHE7E753.js.map +1 -0
  348. package/dist/lib/clipboard.d.ts +7 -0
  349. package/dist/lib/error-message.d.ts +7 -0
  350. package/dist/lib/format.d.ts +58 -4
  351. package/dist/lib/host-theme.d.ts +77 -0
  352. package/dist/lib/interaction-errors.d.ts +3 -0
  353. package/dist/lib/menu-styles.d.ts +22 -0
  354. package/dist/lib/notify-observer.d.ts +2 -0
  355. package/dist/lib/pierre-diffs-loader.d.ts +20 -0
  356. package/dist/lib/provider-recovery.d.ts +55 -0
  357. package/dist/lib/terminal-input-readiness.d.ts +11 -0
  358. package/dist/lib/transient-retry.d.ts +25 -0
  359. package/dist/lib/workbench-peers.d.ts +36 -0
  360. package/dist/lib/xterm-theme.d.ts +7 -5
  361. package/dist/machines.js +9 -5
  362. package/dist/markdown-table-layout-3PV2UAAH.js +113 -0
  363. package/dist/markdown-table-layout-3PV2UAAH.js.map +1 -0
  364. package/dist/mcp-connection-status.d.ts +14 -0
  365. package/dist/model-mark-paths.d.ts +34 -0
  366. package/dist/model-mark-paths.js +16 -0
  367. package/dist/model-mark-paths.js.map +1 -0
  368. package/dist/model-picker-model.d.ts +111 -0
  369. package/dist/model-picker-model.js +25 -0
  370. package/dist/model-picker-model.js.map +1 -0
  371. package/dist/model-policy-picker-menu-7GJ5URPR.js +17 -0
  372. package/dist/model-policy-picker-menu-7GJ5URPR.js.map +1 -0
  373. package/dist/model-policy.d.ts +30 -3
  374. package/dist/model-policy.js +14 -1
  375. package/dist/native-previews.d.ts +28 -0
  376. package/dist/native-previews.js +82 -0
  377. package/dist/native-previews.js.map +1 -0
  378. package/dist/new-session-draft.d.ts +7 -0
  379. package/dist/new-session-draft.js +639 -0
  380. package/dist/new-session-draft.js.map +1 -0
  381. package/dist/notification-text.d.ts +27 -0
  382. package/dist/{noto-sans-arabic-loader-IA2T4X2A.js → noto-sans-arabic-loader-XSH2KYWJ.js} +3 -1
  383. package/dist/{noto-sans-arabic-loader-IA2T4X2A.js.map → noto-sans-arabic-loader-XSH2KYWJ.js.map} +1 -1
  384. package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js → noto-sans-jp-loader.generated-MR5L6V7K.js} +3 -1
  385. package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js.map → noto-sans-jp-loader.generated-MR5L6V7K.js.map} +1 -1
  386. package/dist/older-history.d.ts +3 -2
  387. package/dist/organization-model.d.ts +32 -0
  388. package/dist/organization-model.js +65 -0
  389. package/dist/organization-model.js.map +1 -0
  390. package/dist/{platform-activity-row-BJHUHXAT.js → platform-activity-row-5OCKOQWZ.js} +16 -78
  391. package/dist/platform-activity-row-5OCKOQWZ.js.map +1 -0
  392. package/dist/plugin-details.d.ts +14 -0
  393. package/dist/plugin-discovery.d.ts +25 -0
  394. package/dist/preview-loading-paint.d.ts +20 -0
  395. package/dist/provider.d.ts +25 -2
  396. package/dist/queue-presentation-model.d.ts +72 -0
  397. package/dist/queue-presentation-model.js +38 -0
  398. package/dist/queue-presentation-model.js.map +1 -0
  399. package/dist/{queue-surface-implementation-BSKUWHRI.js → queue-surface-implementation-GJBH7NKO.js} +65 -265
  400. package/dist/queue-surface-implementation-GJBH7NKO.js.map +1 -0
  401. package/dist/realtime/embedded-new-voice.d.ts +1 -0
  402. package/dist/realtime/embedded-voice.d.ts +1 -0
  403. package/dist/realtime/realtime-control.d.ts +4 -65
  404. package/dist/realtime/session-realtime.d.ts +78 -0
  405. package/dist/realtime.js +25 -1294
  406. package/dist/realtime.js.map +1 -1
  407. package/dist/sandbox-files-O27IPOZW.js +21 -0
  408. package/dist/sandbox-files-O27IPOZW.js.map +1 -0
  409. package/dist/sandbox-label-model.d.ts +30 -0
  410. package/dist/sandbox-label-model.js +20 -0
  411. package/dist/sandbox-label-model.js.map +1 -0
  412. package/dist/secret-reference-label.d.ts +14 -0
  413. package/dist/secrets-ui.d.ts +57 -0
  414. package/dist/session-agents-model.d.ts +10 -0
  415. package/dist/session-agents-model.js +25 -0
  416. package/dist/session-agents-model.js.map +1 -0
  417. package/dist/session-attention-model.d.ts +8 -0
  418. package/dist/session-attention-model.js +47 -0
  419. package/dist/session-attention-model.js.map +1 -0
  420. package/dist/session-auth-recommendation.d.ts +5 -0
  421. package/dist/session-capability-policy.d.ts +31 -0
  422. package/dist/session-feedback-model.d.ts +20 -0
  423. package/dist/session-feedback-model.js +56 -0
  424. package/dist/session-feedback-model.js.map +1 -0
  425. package/dist/session-list-model.d.ts +138 -0
  426. package/dist/session-list-model.js +274 -0
  427. package/dist/session-list-model.js.map +1 -0
  428. package/dist/session-realtime-7DJOIHQW.js +21 -0
  429. package/dist/session-realtime-7DJOIHQW.js.map +1 -0
  430. package/dist/session-realtime.d.ts +7 -0
  431. package/dist/session-realtime.js +19 -0
  432. package/dist/session-realtime.js.map +1 -0
  433. package/dist/session-status-model.d.ts +36 -0
  434. package/dist/session-ui.d.ts +39 -1
  435. package/dist/session-ui.js +125 -12
  436. package/dist/session-ui.js.map +1 -1
  437. package/dist/session.d.ts +10 -2
  438. package/dist/session.js +37 -20
  439. package/dist/site-snapshot.d.ts +14 -0
  440. package/dist/sites-ui.d.ts +24 -0
  441. package/dist/sites.d.ts +3 -0
  442. package/dist/sites.js +14 -0
  443. package/dist/sites.js.map +1 -0
  444. package/dist/skill-discovery.d.ts +47 -0
  445. package/dist/terminal.d.ts +8 -0
  446. package/dist/terminal.js +32 -0
  447. package/dist/terminal.js.map +1 -0
  448. package/dist/testing/session-scenarios.d.ts +10 -0
  449. package/dist/testing/session-scenarios.js +367 -0
  450. package/dist/testing/session-scenarios.js.map +1 -0
  451. package/dist/timeline/activity-rail.d.ts +11 -2
  452. package/dist/timeline/agent-identity.d.ts +30 -0
  453. package/dist/timeline/agent-row.d.ts +31 -0
  454. package/dist/timeline/allowance-exhausted-row.d.ts +24 -0
  455. package/dist/timeline/compaction-copy.d.ts +46 -0
  456. package/dist/timeline/entrance.d.ts +13 -1
  457. package/dist/timeline/focus-sequence.d.ts +9 -0
  458. package/dist/timeline/genie-copy.d.ts +3 -0
  459. package/dist/timeline/genie-loading.d.ts +47 -0
  460. package/dist/timeline/index.d.ts +10 -4
  461. package/dist/timeline/knowledge-receipt.d.ts +17 -0
  462. package/dist/timeline/message-sender.d.ts +19 -0
  463. package/dist/timeline/notice-presentation.d.ts +13 -0
  464. package/dist/timeline/parsers.d.ts +11 -0
  465. package/dist/timeline/patch-apply-command.d.ts +18 -0
  466. package/dist/timeline/platform-activity-presentation.d.ts +21 -0
  467. package/dist/timeline/platform-activity-row.d.ts +1 -2
  468. package/dist/timeline/presented-image.d.ts +11 -0
  469. package/dist/timeline/projection.d.ts +31 -2
  470. package/dist/timeline/provider-logo.d.ts +15 -0
  471. package/dist/timeline/question-nav-model.d.ts +23 -0
  472. package/dist/timeline/registry.d.ts +12 -1
  473. package/dist/timeline/retained-image.d.ts +18 -0
  474. package/dist/timeline/retained-loaders.d.ts +27 -0
  475. package/dist/timeline/rolling-activity.d.ts +11 -0
  476. package/dist/timeline/screenshot-lightbox.d.ts +39 -2
  477. package/dist/timeline/session-usage-limit-row.d.ts +11 -0
  478. package/dist/timeline/shared.d.ts +4 -1
  479. package/dist/timeline/startup-dispatch-details.d.ts +5 -0
  480. package/dist/timeline/startup-preference.d.ts +3 -0
  481. package/dist/timeline/startup-timings.d.ts +4 -0
  482. package/dist/timeline/tool-display-name.d.ts +5 -2
  483. package/dist/timeline/tool-presentation.d.ts +172 -0
  484. package/dist/timeline/turn-summary-model.d.ts +95 -0
  485. package/dist/timeline/turn-summary.d.ts +20 -54
  486. package/dist/timeline/types.d.ts +179 -7
  487. package/dist/timeline/work-presentation.d.ts +60 -0
  488. package/dist/timeline-annotation-markers-U3G66KUD.js +166 -0
  489. package/dist/timeline-annotation-markers-U3G66KUD.js.map +1 -0
  490. package/dist/timeline-annotation-selection-BI7QTPTZ.js +242 -0
  491. package/dist/timeline-annotation-selection-BI7QTPTZ.js.map +1 -0
  492. package/dist/timeline-annotations-dialog-FOMHSDTE.js +274 -0
  493. package/dist/timeline-annotations-dialog-FOMHSDTE.js.map +1 -0
  494. package/dist/timeline-model.d.ts +29 -0
  495. package/dist/timeline-model.js +254 -0
  496. package/dist/timeline-model.js.map +1 -0
  497. package/dist/usage/allowance-copy.d.ts +25 -0
  498. package/dist/usage/session-usage-limit.d.ts +88 -0
  499. package/dist/usage/summary.d.ts +35 -0
  500. package/dist/usage.d.ts +17 -0
  501. package/dist/usage.js +1187 -0
  502. package/dist/usage.js.map +1 -0
  503. package/dist/voice-recording-owner.d.ts +7 -0
  504. package/package.json +105 -5
  505. package/src/accounts.tsx +1072 -0
  506. package/src/approvals.ts +8 -1
  507. package/src/artifacts-spreadsheet.ts +1 -0
  508. package/src/artifacts.ts +44 -0
  509. package/src/assets/README.md +8 -0
  510. package/src/assets/gmail.ico +0 -0
  511. package/src/assets/outlook.ico +0 -0
  512. package/src/capability-catalog-row.tsx +94 -0
  513. package/src/capability-logo-fallback.ts +22 -0
  514. package/src/client.ts +20 -31
  515. package/src/commands/registry.ts +18 -15
  516. package/src/commands/types.ts +2 -0
  517. package/src/components/anthropic-mark.tsx +10 -0
  518. package/src/components/approval-surface.tsx +401 -138
  519. package/src/components/artifacts/artifact-chrome.tsx +413 -0
  520. package/src/components/artifacts/artifact-sandbox.tsx +189 -0
  521. package/src/components/artifacts/artifact-surface.tsx +40 -20
  522. package/src/components/artifacts/chat-interactive-block.tsx +260 -0
  523. package/src/components/artifacts/deferred-chat-media.tsx +67 -0
  524. package/src/components/artifacts/document-editor.tsx +141 -16
  525. package/src/components/artifacts/editable-artifact-ui.tsx +4 -2
  526. package/src/components/artifacts/editable-artifact-view.tsx +197 -0
  527. package/src/components/artifacts/editable-artifact-workbench.tsx +5 -2
  528. package/src/components/artifacts/editable-document.tsx +37 -36
  529. package/src/components/artifacts/editable-presentation.tsx +36 -18
  530. package/src/components/artifacts/editable-spreadsheet.tsx +543 -103
  531. package/src/components/artifacts/index.ts +45 -0
  532. package/src/components/artifacts/inline-html-document.ts +24 -0
  533. package/src/components/artifacts/latest-task-runner.ts +49 -0
  534. package/src/components/artifacts/presentation-editor.tsx +323 -67
  535. package/src/components/artifacts/published-html-artifact-frame.tsx +122 -5
  536. package/src/components/artifacts/session-artifact-viewer.tsx +378 -0
  537. package/src/components/artifacts/site-view.tsx +121 -0
  538. package/src/components/artifacts/spreadsheet-canvas.ts +5 -10
  539. package/src/components/artifacts/spreadsheet-command-queue.ts +184 -0
  540. package/src/components/artifacts/spreadsheet-download.tsx +109 -0
  541. package/src/components/artifacts/spreadsheet-general-display.ts +43 -0
  542. package/src/components/artifacts/spreadsheet-grid.tsx +344 -144
  543. package/src/components/artifacts/spreadsheet-resize.tsx +421 -0
  544. package/src/components/artifacts/spreadsheet-submissions.tsx +46 -0
  545. package/src/components/artifacts/visualization-assets/base.css +1015 -0
  546. package/src/components/artifacts/visualization-assets/helpers.html +349 -0
  547. package/src/components/artifacts/visualization-assets.gen.ts +3 -0
  548. package/src/components/browser-select-control.tsx +312 -0
  549. package/src/components/browser-viewer.tsx +778 -318
  550. package/src/components/chat-composer.tsx +131 -85
  551. package/src/components/child-session-link.tsx +36 -0
  552. package/src/components/claude-mark.tsx +11 -0
  553. package/src/components/code-editor.tsx +13 -16
  554. package/src/components/composer-transcription-control.tsx +128 -30
  555. package/src/components/composer.tsx +426 -175
  556. package/src/components/computer-viewer.tsx +880 -253
  557. package/src/components/copy-button.tsx +13 -5
  558. package/src/components/desktop-viewer.tsx +1 -1
  559. package/src/components/enrollment-consent.tsx +1 -1
  560. package/src/components/enrollment-device-flow.tsx +1 -1
  561. package/src/components/file-browser.tsx +43 -34
  562. package/src/components/fleet-tile.tsx +9 -18
  563. package/src/components/generated-video-player.tsx +4 -2
  564. package/src/components/grok-mark.tsx +34 -0
  565. package/src/components/human-input-form.tsx +590 -283
  566. package/src/components/human-input-surface.tsx +21 -6
  567. package/src/components/interaction-intervention-banner.tsx +2 -2
  568. package/src/components/linkified-text.tsx +79 -0
  569. package/src/components/machine-card.tsx +35 -78
  570. package/src/components/machine-dock-bar.tsx +1 -1
  571. package/src/components/machine-input-display.ts +197 -3
  572. package/src/components/machines/agent-status-icon.tsx +31 -0
  573. package/src/components/machines/machine-detail.tsx +200 -31
  574. package/src/components/machines/machine-operation-policy.tsx +1 -1
  575. package/src/components/machines/machine-status.ts +241 -0
  576. package/src/components/machines-dashboard.tsx +2 -17
  577. package/src/components/markdown-table-layout.ts +143 -0
  578. package/src/components/markdown.tsx +466 -129
  579. package/src/components/message-timeline.tsx +2601 -734
  580. package/src/components/model-mark.tsx +102 -0
  581. package/src/components/model-picker.tsx +15 -4
  582. package/src/components/model-policy-picker-menu.tsx +371 -0
  583. package/src/components/model-policy-picker.tsx +256 -412
  584. package/src/components/new-conversation.tsx +221 -0
  585. package/src/components/open-geni-chat.tsx +309 -0
  586. package/src/components/open-geni-links.tsx +179 -0
  587. package/src/components/openrouter-mark.tsx +13 -0
  588. package/src/components/opper-mark.tsx +18 -0
  589. package/src/components/pierre-diff.tsx +41 -16
  590. package/src/components/pierre-file.tsx +35 -10
  591. package/src/components/preview-loading.tsx +109 -0
  592. package/src/components/provider-recovery-notice.tsx +49 -0
  593. package/src/components/queue-item-content.ts +14 -0
  594. package/src/components/queue-surface-implementation.tsx +51 -356
  595. package/src/components/queue-surface-state.tsx +3 -1
  596. package/src/components/rehype-secret-refs.ts +98 -0
  597. package/src/components/remark-soft-line-breaks.ts +166 -0
  598. package/src/components/sandbox-files.tsx +133 -17
  599. package/src/components/sandbox-terminal.tsx +84 -13
  600. package/src/components/sandbox-workspace.tsx +157 -51
  601. package/src/components/secret-question-field.tsx +324 -0
  602. package/src/components/secret-ref-chip.tsx +185 -0
  603. package/src/components/session-capability-frame.tsx +197 -0
  604. package/src/components/session-chrome.tsx +842 -251
  605. package/src/components/session-commands-panel.tsx +126 -0
  606. package/src/components/session-commands.tsx +18 -0
  607. package/src/components/session-connection-request.tsx +97 -0
  608. package/src/components/session-conversation.tsx +876 -0
  609. package/src/components/session-list.tsx +257 -0
  610. package/src/components/session-mcp-capability-card.tsx +680 -0
  611. package/src/components/session-proxy-scope.tsx +153 -0
  612. package/src/components/session-status.tsx +26 -17
  613. package/src/components/session-usage-limit-notice.tsx +174 -0
  614. package/src/components/timeline-anchor.tsx +119 -0
  615. package/src/components/timeline-annotation-chrome.tsx +196 -0
  616. package/src/components/timeline-annotation-layout.ts +268 -0
  617. package/src/components/timeline-annotation-markers.tsx +185 -0
  618. package/src/components/timeline-annotation-reveal-context.ts +9 -0
  619. package/src/components/timeline-annotation-selection.tsx +106 -54
  620. package/src/components/timeline-annotation-shared.ts +245 -0
  621. package/src/components/timeline-annotations-dialog.tsx +185 -128
  622. package/src/components/timeline-annotations.tsx +189 -45
  623. package/src/components/timeline-reading-progress.ts +80 -0
  624. package/src/components/timeline-search.tsx +168 -0
  625. package/src/components/timeline-settlement.ts +60 -0
  626. package/src/components/tip-follow.ts +52 -0
  627. package/src/components/tool-action-review.tsx +650 -0
  628. package/src/components/tool-review-history.tsx +88 -0
  629. package/src/components/tooltip.tsx +38 -5
  630. package/src/components/usage-limit-notice.tsx +179 -0
  631. package/src/components/usage-member-list.tsx +792 -0
  632. package/src/components/usage-meter.tsx +382 -0
  633. package/src/components/use-viewer-menu-dismiss.ts +33 -0
  634. package/src/components/user-message-body.tsx +27 -2
  635. package/src/components/workspace-dock.tsx +18 -1
  636. package/src/composer-messages.ts +150 -0
  637. package/src/composer-voice-events.ts +12 -0
  638. package/src/composer.ts +6 -1
  639. package/src/connect-account-identity.tsx +34 -0
  640. package/src/connect-accounts.tsx +233 -0
  641. package/src/connect-chooser.tsx +336 -0
  642. package/src/connect-panel.tsx +99 -0
  643. package/src/connect-setup.tsx +355 -0
  644. package/src/connect.ts +60 -0
  645. package/src/connection-assets.d.ts +4 -0
  646. package/src/connection-catalog.tsx +162 -0
  647. package/src/connection-discovery.tsx +238 -0
  648. package/src/connection-installed.tsx +51 -0
  649. package/src/connection-logo.tsx +37 -0
  650. package/src/connection-service-logo.tsx +55 -0
  651. package/src/connection-service-presentation.ts +46 -0
  652. package/src/connection-skeleton.tsx +16 -0
  653. package/src/connection-type-picker.tsx +36 -0
  654. package/src/conversation-timeline.ts +92 -0
  655. package/src/desktop.ts +24 -0
  656. package/src/device-authorization.tsx +98 -0
  657. package/src/diffs.ts +16 -0
  658. package/src/discovery-cache.ts +42 -0
  659. package/src/editor.ts +13 -0
  660. package/src/embedded-session-client.ts +104 -0
  661. package/src/file-node-visibility.ts +66 -0
  662. package/src/hooks/internal.ts +3 -2
  663. package/src/hooks/latest-question.ts +164 -0
  664. package/src/hooks/shared-machines-list.ts +34 -1
  665. package/src/hooks/shared-query.ts +721 -0
  666. package/src/hooks/use-attached-browsers.ts +1 -1
  667. package/src/hooks/use-auth-runs.ts +0 -27
  668. package/src/hooks/use-available-models.ts +21 -15
  669. package/src/hooks/use-browser-frame-stream.ts +19 -2
  670. package/src/hooks/use-browser-session.ts +680 -205
  671. package/src/hooks/use-browser-sessions.ts +32 -1
  672. package/src/hooks/use-client-config-flags.ts +118 -0
  673. package/src/hooks/use-codex-accounts.ts +247 -47
  674. package/src/hooks/use-composer.ts +340 -49
  675. package/src/hooks/use-computer-frame-stream.ts +25 -7
  676. package/src/hooks/use-computer-input-posture.ts +94 -0
  677. package/src/hooks/use-computer-session.ts +409 -95
  678. package/src/hooks/use-connect.ts +23 -0
  679. package/src/hooks/use-desktop-stream.ts +19 -28
  680. package/src/hooks/use-file-attachments.ts +118 -10
  681. package/src/hooks/use-goal.ts +107 -13
  682. package/src/hooks/use-human-input.ts +31 -4
  683. package/src/hooks/use-last-started-turn-policy.ts +46 -14
  684. package/src/hooks/use-machines.ts +4 -0
  685. package/src/hooks/use-new-conversation.ts +374 -0
  686. package/src/hooks/use-new-session-draft.ts +813 -0
  687. package/src/hooks/use-realtime-voice-models.ts +46 -0
  688. package/src/hooks/use-sandbox-files.ts +68 -20
  689. package/src/hooks/use-session-background-commands.ts +22 -11
  690. package/src/hooks/use-session-capabilities.ts +3 -2
  691. package/src/hooks/use-session-conversation.ts +150 -0
  692. package/src/hooks/use-session-events.ts +703 -382
  693. package/src/hooks/use-session-lineage.ts +20 -16
  694. package/src/hooks/use-session-mcp-approval-policy.ts +13 -5
  695. package/src/hooks/use-session-model-account.ts +174 -0
  696. package/src/hooks/use-session.ts +53 -21
  697. package/src/hooks/use-slash-commands.ts +6 -11
  698. package/src/hooks/use-supergrok-accounts.ts +22 -8
  699. package/src/hooks/use-terminal-stream.ts +153 -27
  700. package/src/hooks/use-transcription.ts +6 -0
  701. package/src/hooks/use-turn-queue.ts +2 -1
  702. package/src/hooks/use-usage.ts +100 -0
  703. package/src/hooks/use-vaults.ts +153 -0
  704. package/src/hooks/use-video-artifact-playback.ts +1 -1
  705. package/src/hooks/use-voice-input.ts +127 -19
  706. package/src/hooks/use-workspace-capture.ts +3 -2
  707. package/src/hooks/use-workspace-edit.ts +23 -5
  708. package/src/hooks/use-workspace-sessions.ts +97 -32
  709. package/src/human-input-model.ts +359 -0
  710. package/src/human-input.ts +12 -1
  711. package/src/identity-link-accounts.tsx +148 -0
  712. package/src/identity-link-consent.tsx +192 -0
  713. package/src/index.ts +273 -16
  714. package/src/interaction.ts +1 -0
  715. package/src/lib/clipboard.ts +29 -0
  716. package/src/lib/error-message.ts +37 -0
  717. package/src/lib/format.ts +213 -16
  718. package/src/lib/host-theme.ts +524 -0
  719. package/src/lib/interaction-errors.ts +15 -0
  720. package/src/lib/menu-styles.ts +44 -0
  721. package/src/lib/notify-observer.ts +15 -0
  722. package/src/lib/pierre-diffs-loader.ts +53 -0
  723. package/src/lib/provider-recovery.ts +240 -0
  724. package/src/lib/terminal-input-readiness.ts +51 -0
  725. package/src/lib/transient-retry.ts +99 -0
  726. package/src/lib/workbench-peers.ts +62 -0
  727. package/src/lib/xterm-theme.ts +23 -21
  728. package/src/mcp-connection-status.ts +35 -0
  729. package/src/model-mark-paths.ts +53 -0
  730. package/src/model-picker-model.ts +330 -0
  731. package/src/model-policy.ts +299 -74
  732. package/src/native-previews.ts +100 -0
  733. package/src/new-session-draft.ts +22 -0
  734. package/src/notification-text.ts +81 -0
  735. package/src/older-history.ts +22 -4
  736. package/src/organization-model.ts +118 -0
  737. package/src/plugin-details.tsx +185 -0
  738. package/src/plugin-discovery.tsx +196 -0
  739. package/src/preview-loading-paint.ts +68 -0
  740. package/src/provider.tsx +74 -15
  741. package/src/queue-presentation-model.ts +464 -0
  742. package/src/realtime/dropdown-menu.tsx +19 -12
  743. package/src/realtime/embedded-new-voice.tsx +1 -0
  744. package/src/realtime/embedded-voice.tsx +3 -0
  745. package/src/realtime/realtime-control.tsx +138 -501
  746. package/src/realtime/session-realtime.ts +566 -0
  747. package/src/sandbox-label-model.ts +53 -0
  748. package/src/secret-reference-label.ts +43 -0
  749. package/src/secrets-ui.tsx +59 -0
  750. package/src/session-agents-model.ts +33 -0
  751. package/src/session-attention-model.ts +62 -0
  752. package/src/session-auth-recommendation.ts +48 -0
  753. package/src/session-capability-policy.ts +196 -0
  754. package/src/session-context.ts +3 -4
  755. package/src/session-feedback-model.ts +95 -0
  756. package/src/session-list-model.ts +434 -0
  757. package/src/session-realtime.ts +18 -0
  758. package/src/session-status-model.ts +99 -0
  759. package/src/session-ui.ts +98 -1
  760. package/src/session.ts +22 -1
  761. package/src/site-snapshot.ts +74 -0
  762. package/src/sites-ui.tsx +348 -0
  763. package/src/sites.ts +3 -0
  764. package/src/skill-discovery.tsx +208 -0
  765. package/src/terminal.ts +26 -0
  766. package/src/testing/session-scenarios.ts +404 -0
  767. package/src/timeline/activity-rail.tsx +242 -101
  768. package/src/timeline/agent-identity.tsx +84 -0
  769. package/src/timeline/agent-row.tsx +231 -0
  770. package/src/timeline/allowance-exhausted-row.tsx +86 -0
  771. package/src/timeline/compaction-copy.ts +115 -0
  772. package/src/timeline/entrance.tsx +28 -3
  773. package/src/timeline/fleet-decision-projection.ts +2 -1
  774. package/src/timeline/fleet-decision-row.tsx +1 -0
  775. package/src/timeline/focus-sequence.ts +44 -0
  776. package/src/timeline/genie-copy.ts +19 -0
  777. package/src/timeline/genie-loading.tsx +143 -0
  778. package/src/timeline/index.ts +30 -1
  779. package/src/timeline/knowledge-receipt.tsx +100 -0
  780. package/src/timeline/message-sender.tsx +71 -0
  781. package/src/timeline/notice-presentation.ts +48 -0
  782. package/src/timeline/parsers.ts +42 -2
  783. package/src/timeline/patch-apply-command.tsx +135 -0
  784. package/src/timeline/platform-activity-presentation.ts +166 -0
  785. package/src/timeline/platform-activity-row.tsx +15 -90
  786. package/src/timeline/presented-image.ts +63 -0
  787. package/src/timeline/projection.ts +1743 -76
  788. package/src/timeline/provider-logo.tsx +53 -0
  789. package/src/timeline/question-nav-model.ts +28 -0
  790. package/src/timeline/registry.ts +26 -4
  791. package/src/timeline/retained-image.ts +97 -0
  792. package/src/timeline/retained-loaders.ts +91 -0
  793. package/src/timeline/rolling-activity.tsx +80 -0
  794. package/src/timeline/screenshot-lightbox.tsx +319 -32
  795. package/src/timeline/session-usage-limit-row.tsx +42 -0
  796. package/src/timeline/shared.tsx +42 -15
  797. package/src/timeline/startup-dispatch-details.tsx +36 -0
  798. package/src/timeline/startup-preference.ts +33 -0
  799. package/src/timeline/startup-timings.tsx +145 -0
  800. package/src/timeline/tool-display-name.ts +19 -7
  801. package/src/timeline/tool-presentation.ts +1316 -0
  802. package/src/timeline/tool-renderers.tsx +835 -1138
  803. package/src/timeline/turn-summary-model.ts +343 -0
  804. package/src/timeline/turn-summary.tsx +272 -365
  805. package/src/timeline/types.ts +189 -6
  806. package/src/timeline/work-presentation.ts +189 -0
  807. package/src/timeline-model.ts +143 -0
  808. package/src/usage/allowance-copy.ts +64 -0
  809. package/src/usage/session-usage-limit.ts +266 -0
  810. package/src/usage/summary.ts +93 -0
  811. package/src/usage.ts +70 -0
  812. package/src/voice-recording-owner.ts +22 -0
  813. package/styles/compiled.css +2303 -745
  814. package/styles/connect.css +290 -0
  815. package/styles/connect.d.ts +1 -0
  816. package/styles/effective-tokens.css +1 -0
  817. package/styles/index.css +278 -9
  818. package/styles/responsive.css +99 -7
  819. package/styles/session-capability.css +44 -0
  820. package/styles/tokens.css +136 -66
  821. package/dist/browser-viewer-GXUICIAG.js +0 -14
  822. package/dist/chunk-4MDLEHXL.js.map +0 -1
  823. package/dist/chunk-5YK2ZDIG.js.map +0 -1
  824. package/dist/chunk-6H6S5V4Z.js +0 -9571
  825. package/dist/chunk-6H6S5V4Z.js.map +0 -1
  826. package/dist/chunk-ATQJEWCA.js +0 -2263
  827. package/dist/chunk-ATQJEWCA.js.map +0 -1
  828. package/dist/chunk-FK6VG4LL.js +0 -90
  829. package/dist/chunk-FK6VG4LL.js.map +0 -1
  830. package/dist/chunk-H5YGYNXS.js.map +0 -1
  831. package/dist/chunk-HUIKIDM5.js.map +0 -1
  832. package/dist/chunk-ICA6R6TW.js.map +0 -1
  833. package/dist/chunk-JVYQRRC4.js.map +0 -1
  834. package/dist/chunk-KCGXPP5V.js.map +0 -1
  835. package/dist/chunk-KZ73RL76.js.map +0 -1
  836. package/dist/chunk-LAKLF4PA.js +0 -141
  837. package/dist/chunk-LAKLF4PA.js.map +0 -1
  838. package/dist/chunk-MXJGO7LE.js.map +0 -1
  839. package/dist/chunk-NEXLLTP4.js.map +0 -1
  840. package/dist/chunk-PEI6RANI.js.map +0 -1
  841. package/dist/chunk-QGBJ6GHG.js.map +0 -1
  842. package/dist/chunk-T7VAYG2I.js.map +0 -1
  843. package/dist/chunk-W6NFJXSA.js +0 -454
  844. package/dist/chunk-W6NFJXSA.js.map +0 -1
  845. package/dist/chunk-WSK7G5LE.js +0 -170
  846. package/dist/chunk-WSK7G5LE.js.map +0 -1
  847. package/dist/chunk-X4A66EWZ.js +0 -223
  848. package/dist/chunk-X4A66EWZ.js.map +0 -1
  849. package/dist/chunk-X4JAFD5R.js.map +0 -1
  850. package/dist/chunk-XXWH2JLC.js.map +0 -1
  851. package/dist/chunk-ZUT5QSQB.js.map +0 -1
  852. package/dist/computer-viewer-ZOP4Q7A7.js +0 -16
  853. package/dist/fleet-decision-row-GGCAT4E4.js.map +0 -1
  854. package/dist/hooks/use-environments.d.ts +0 -41
  855. package/dist/hooks/use-packs.d.ts +0 -32
  856. package/dist/platform-activity-row-BJHUHXAT.js.map +0 -1
  857. package/dist/queue-surface-implementation-BSKUWHRI.js.map +0 -1
  858. package/dist/timeline-annotation-selection-3L7LHGG2.js +0 -187
  859. package/dist/timeline-annotation-selection-3L7LHGG2.js.map +0 -1
  860. package/dist/timeline-annotations-dialog-U7EVLR75.js +0 -196
  861. package/dist/timeline-annotations-dialog-U7EVLR75.js.map +0 -1
  862. package/src/hooks/use-environments.ts +0 -182
  863. package/src/hooks/use-packs.ts +0 -157
  864. /package/dist/{browser-viewer-GXUICIAG.js.map → browser-viewer-M7BIVFTW.js.map} +0 -0
  865. /package/dist/{computer-viewer-ZOP4Q7A7.js.map → chat-interactive-block-BO2IWXVK.js.map} +0 -0
@@ -9,6 +9,7 @@ import {
9
9
  PauseIcon,
10
10
  PlayIcon,
11
11
  RotateCwIcon,
12
+ SquareIcon,
12
13
  XIcon,
13
14
  } from "lucide-react";
14
15
  import { AnimatePresence, motion } from "motion/react";
@@ -36,6 +37,7 @@ import {
36
37
  type RefObject,
37
38
  } from "react";
38
39
  import { argHint, defaultCommands } from "../commands/registry";
40
+ import { useErrorMessage } from "../lib/error-message";
39
41
  import type { Notice, SlashCommand } from "../commands/types";
40
42
  import type { ComposerState } from "../hooks/use-composer";
41
43
  import { shouldSteerOnKey, shouldSubmitOnKey } from "../hooks/use-composer";
@@ -50,8 +52,10 @@ import {
50
52
  ComposerResponsiveContext,
51
53
  type ResponsiveBasis,
52
54
  } from "../lib/composer-responsive-context";
53
- import { composerSubmissionErrorMessage, formatBytes, formatRelativeTime } from "../lib/format";
55
+ import { composerSubmissionErrorMessage } from "../lib/format";
56
+ import { defaultChatComposerMessages, type ChatComposerMessages } from "../composer-messages";
54
57
  import type { PickerModelRow } from "../model-policy";
58
+ import { useLightboxOptional } from "../timeline/screenshot-lightbox";
55
59
  import { OPEN_WORKSTREAM_CONTROL_EVENT } from "../workstream-control-event";
56
60
  import { CommandPalette as CommandPaletteView } from "./command-palette";
57
61
  import { ModelPicker as ModelPickerView } from "./model-picker";
@@ -73,7 +77,16 @@ function ComposerTip({
73
77
 
74
78
  export type ComposerDelivery = Pick<
75
79
  ComposerState,
76
- "value" | "setValue" | "send" | "steer" | "sending" | "canSend" | "error" | "clearError"
80
+ | "value"
81
+ | "setValue"
82
+ | "send"
83
+ | "steer"
84
+ | "sending"
85
+ | "canSend"
86
+ | "error"
87
+ | "clearError"
88
+ | "annotations"
89
+ | "requestAnnotationReview"
77
90
  >;
78
91
 
79
92
  export type ComposerDraftState = Pick<
@@ -95,130 +108,8 @@ export type ComposerControlLinks = {
95
108
  sessionHref?: ((sessionId: string) => string) | undefined;
96
109
  };
97
110
 
98
- export type ChatComposerMessages = {
99
- messagePlaceholder: string;
100
- pausedPlaceholder: string;
101
- inputLabel: string;
102
- keyboardHint: string;
103
- slashCommandBlocked: string;
104
- controlChangedError: string;
105
- sendFailedError: string;
106
- dropFiles: string;
107
- attachFiles: string;
108
- pauseAriaLabel: string;
109
- pauseTitle: string;
110
- sendMessageAriaLabel: string;
111
- sendAndResumeAriaLabel: string;
112
- sendTitle: string;
113
- sendAndResumeTitle: string;
114
- workspacePaused: string;
115
- pausedHere: string;
116
- parentBlocker: string;
117
- narrowerPause: string;
118
- pausedBy: (displayName: string) => string;
119
- queuedAhead: (count: number) => string;
120
- resumingAndSending: string;
121
- nextMessageResumes: string;
122
- resumeThisWorkstream: string;
123
- resumeShort: string;
124
- hidePauseDetails: string;
125
- showPauseDetails: string;
126
- pauseReasonsLabel: string;
127
- pausedByLabel: string;
128
- alsoPausedByLabel: string;
129
- resumeWorkspace: string;
130
- resumeFromSession: string;
131
- sessionCanRun: string;
132
- stillPausedBy: (displayName: string) => string;
133
- restoredResourcesLabel: string;
134
- restoredFile: (fileId: string) => string;
135
- removeRestoredResource: (index: number) => string;
136
- uploading: string;
137
- uploadFailed: string;
138
- retryAttachment: (name: string) => string;
139
- retryUpload: string;
140
- removeAttachment: (name: string) => string;
141
- confirmCommand: (name: string) => string;
142
- confirmDescription: (command: SlashCommand) => string;
143
- cancel: string;
144
- runCommand: (name: string) => string;
145
- commands: string;
146
- slashCommandsLabel: string;
147
- modelLabel: string;
148
- close: string;
149
- danger: string;
150
- draftConflict: string;
151
- useOtherDraft: string;
152
- keepMine: string;
153
- savingDraft: string;
154
- formatBytes: (bytes: number) => string;
155
- formatRelativeTime: (changedAt: string) => string;
156
- };
157
-
158
- export const defaultChatComposerMessages: ChatComposerMessages = {
159
- messagePlaceholder: "Message the agent…",
160
- pausedPlaceholder: "Message the agent — it will wait in the queue…",
161
- inputLabel: "Message the agent",
162
- keyboardHint: "Enter to queue · Cmd/Ctrl+Enter to steer · Shift+Enter for a new line",
163
- slashCommandBlocked:
164
- "That's a slash command — press Enter in the command list to run it, or edit the line to send a message.",
165
- controlChangedError:
166
- "This workstream was paused while you were sending. Nothing was sent, and your draft is still here.",
167
- sendFailedError: "Sending failed — your draft is still here. Try again.",
168
- dropFiles: "Drop files to attach",
169
- attachFiles: "Attach files",
170
- pauseAriaLabel: "Pause this workstream",
171
- pauseTitle: "Pause this workstream; queued prompts and approvals are preserved",
172
- sendMessageAriaLabel: "Send message",
173
- sendAndResumeAriaLabel: "Add message to queue",
174
- sendTitle: "Queue message (Enter); steer with Cmd/Ctrl+Enter",
175
- sendAndResumeTitle: "Add to queue (Enter); steer now with Cmd/Ctrl+Enter",
176
- workspacePaused: "Workspace paused",
177
- pausedHere: "Paused here",
178
- parentBlocker: "parent",
179
- narrowerPause: "a narrower pause",
180
- pausedBy: (displayName) => `Paused by ${displayName}`,
181
- queuedAhead: (count) =>
182
- `${count} waiting prompt${count === 1 ? "" : "s"}; your message joins the queue.`,
183
- resumingAndSending: "Sending…",
184
- nextMessageResumes: "Messages wait in the queue until you resume.",
185
- resumeThisWorkstream: "Resume this workstream",
186
- resumeShort: "Resume",
187
- hidePauseDetails: "Hide pause details",
188
- showPauseDetails: "Show pause details",
189
- pauseReasonsLabel: "Reasons this workstream is paused",
190
- pausedByLabel: "Paused by ",
191
- alsoPausedByLabel: "Also paused by ",
192
- resumeWorkspace: "Resume workspace",
193
- resumeFromSession: "Resume from this session",
194
- sessionCanRun: "This session will be able to run",
195
- stillPausedBy: (displayName) => `Still paused by ${displayName}`,
196
- restoredResourcesLabel: "Restored prompt resources",
197
- restoredFile: (fileId) => `File ${fileId.slice(0, 8)}`,
198
- removeRestoredResource: (index) => `Remove restored resource ${index + 1}`,
199
- uploading: "Uploading",
200
- uploadFailed: "Upload failed",
201
- retryAttachment: (name) => `Retry ${name}`,
202
- retryUpload: "Retry upload",
203
- removeAttachment: (name) => `Remove ${name}`,
204
- confirmCommand: (name) => `Confirm /${name}`,
205
- confirmDescription: (command) => `Run /${command.name}? ${command.description}`,
206
- cancel: "Cancel",
207
- runCommand: (name) => `Run /${name}`,
208
- commands: "Commands",
209
- slashCommandsLabel: "Slash commands",
210
- modelLabel: "Model",
211
- close: "Close",
212
- danger: "danger",
213
- draftConflict: "This draft changed in another tab. Your local draft is still here.",
214
- useOtherDraft: "Use other draft",
215
- keepMine: "Keep mine",
216
- // Kept for embedder message overrides / back-compat. Routine autosave is
217
- // silent — only draft conflicts surface under the composer.
218
- savingDraft: "Saving draft…",
219
- formatBytes,
220
- formatRelativeTime,
221
- };
111
+ export { defaultChatComposerMessages } from "../composer-messages";
112
+ export type { ChatComposerMessages } from "../composer-messages";
222
113
 
223
114
  export type ComposerSubmitMode = "queue" | "steer";
224
115
  export type ComposerSubmitBlocker =
@@ -226,9 +117,21 @@ export type ComposerSubmitBlocker =
226
117
  | "attachment"
227
118
  | "sending"
228
119
  | "command"
120
+ | "annotations"
229
121
  | "empty"
230
122
  | null;
231
123
 
124
+ /**
125
+ * How the composer offers run control.
126
+ * - `pause`: the workstream Pause control and paused-state strip (default; the
127
+ * Opengeni console).
128
+ * - `stop`: a Stop control only while a response runs. Stopping pauses this
129
+ * conversation; the next message continues it, so people never see a paused
130
+ * state they have to resume. Pauses applied elsewhere still show.
131
+ * - `none`: no run control.
132
+ */
133
+ export type ComposerRunControl = "pause" | "stop" | "none";
134
+
232
135
  export type UseChatComposerControllerOptions = {
233
136
  delivery: ComposerDelivery;
234
137
  draft?: ComposerDraftState | undefined;
@@ -244,6 +147,10 @@ export type UseChatComposerControllerOptions = {
244
147
  onClearView?: (() => void) | undefined;
245
148
  onPaste?: ((event: ClipboardEvent<HTMLTextAreaElement>) => void) | undefined;
246
149
  messages?: Partial<ChatComposerMessages> | undefined;
150
+ /** Run control presentation. Defaults to `pause`. */
151
+ runControl?: ComposerRunControl | undefined;
152
+ /** A response is in progress; shows the Stop control under `runControl="stop"`. */
153
+ running?: boolean | undefined;
247
154
  };
248
155
 
249
156
  /**
@@ -270,7 +177,7 @@ function measureComposerContentHeight(textarea: HTMLTextAreaElement): number {
270
177
  mirror.tabIndex = -1;
271
178
  mirror.rows = 1;
272
179
  mirror.style.cssText =
273
- "position:absolute;top:0;left:0;visibility:hidden;pointer-events:none;height:auto;min-height:0;max-height:none;overflow:hidden;z-index:-1;";
180
+ "position:fixed;top:0;left:-100000px;visibility:hidden;pointer-events:none;height:auto;min-height:0;max-height:none;overflow:hidden;z-index:-1;";
274
181
  composerHeightMirror = mirror;
275
182
  }
276
183
 
@@ -350,7 +257,10 @@ export function useChatComposerController({
350
257
  onClearView,
351
258
  onPaste,
352
259
  messages: messageOverrides,
260
+ runControl = "pause",
261
+ running = false,
353
262
  }: UseChatComposerControllerOptions) {
263
+ const formatError = useErrorMessage();
354
264
  const messages = useMemo(
355
265
  () => ({ ...defaultChatComposerMessages, ...messageOverrides }),
356
266
  [messageOverrides],
@@ -361,36 +271,55 @@ export function useChatComposerController({
361
271
  const pauseButtonRef = useRef<HTMLButtonElement | null>(null);
362
272
  const fileInputRef = useRef<HTMLInputElement | null>(null);
363
273
  const listboxId = useId();
364
- const paused = effectiveControl?.state === "paused";
274
+ const controlPaused = effectiveControl?.state === "paused";
275
+ // Set when this composer's Stop paused the conversation; cleared once it runs
276
+ // again. Pauses from anyone or anywhere else are never reinterpreted.
277
+ const [stoppedHere, setStoppedHere] = useState(false);
278
+ useEffect(() => {
279
+ if (!controlPaused) setStoppedHere(false);
280
+ }, [controlPaused]);
281
+ // Under Stop, the stopped response is not a state to manage: hide it and let
282
+ // the next message continue (a Steer resumes a paused branch). It applies
283
+ // only to this conversation's own pause with nothing queued behind it.
284
+ const resumesOnSend =
285
+ runControl === "stop" &&
286
+ stoppedHere &&
287
+ controlPaused &&
288
+ effectiveControl?.directState === "paused" &&
289
+ effectiveControl.additionalBlockerCount === 0 &&
290
+ queuedAheadCount === 0;
291
+ const paused = controlPaused && !resumesOnSend;
365
292
  const [controlDetailsOpen, setControlDetailsOpen] = useState(false);
366
293
  const [paletteMounted, setPaletteMounted] = useState(false);
367
294
  const [submitting, setSubmitting] = useState(false);
368
295
  const submittingRef = useRef(false);
369
296
  const controlOperationRef = useRef(false);
297
+ const deliveryValue = delivery.value;
298
+ const setDeliveryValue = delivery.setValue;
370
299
  const mountedRef = useRef(true);
371
- const deliveredValueRef = useRef(delivery.value);
372
- const liveValueRef = useRef(delivery.value);
373
- const [renderedValue, setRenderedValue] = useState(delivery.value);
374
- const deliveryChanged = delivery.value !== deliveredValueRef.current;
300
+ const deliveredValueRef = useRef(deliveryValue);
301
+ const liveValueRef = useRef(deliveryValue);
302
+ const [renderedValue, setRenderedValue] = useState(deliveryValue);
303
+ const deliveryChanged = deliveryValue !== deliveredValueRef.current;
375
304
  if (deliveryChanged) {
376
- deliveredValueRef.current = delivery.value;
377
- liveValueRef.current = delivery.value;
305
+ deliveredValueRef.current = deliveryValue;
306
+ liveValueRef.current = deliveryValue;
378
307
  }
379
308
  const setComposerValue = useCallback(
380
309
  (next: string) => {
381
310
  liveValueRef.current = next;
382
311
  setRenderedValue(next);
383
- delivery.setValue(next);
312
+ setDeliveryValue(next);
384
313
  },
385
- [delivery.setValue],
314
+ [setDeliveryValue],
386
315
  );
387
- const visibleValue = deliveryChanged ? delivery.value : renderedValue;
316
+ const visibleValue = deliveryChanged ? deliveryValue : renderedValue;
388
317
 
389
318
  useLayoutEffect(() => {
390
319
  if (renderedValue !== liveValueRef.current) {
391
320
  setRenderedValue(liveValueRef.current);
392
321
  }
393
- }, [delivery.value, renderedValue]);
322
+ }, [deliveryValue, renderedValue]);
394
323
 
395
324
  useEffect(() => {
396
325
  mountedRef.current = true;
@@ -424,7 +353,6 @@ export function useChatComposerController({
424
353
  }, [id, paused]);
425
354
 
426
355
  const blockedByAttachment = attachments?.hasUnresolved === true;
427
- const hasReadyAttachment = (attachments?.readyResources.length ?? 0) > 0;
428
356
 
429
357
  const [dragging, setDragging] = useState(false);
430
358
  const dragCarriesFiles = (event: { dataTransfer: DataTransfer | null }): boolean =>
@@ -433,9 +361,9 @@ export function useChatComposerController({
433
361
  (event: DragEvent<HTMLDivElement>) => {
434
362
  if (!attachments || !dragCarriesFiles(event)) return;
435
363
  event.preventDefault();
436
- setDragging(true);
364
+ if (!disabled) setDragging(true);
437
365
  },
438
- [attachments],
366
+ [attachments, disabled],
439
367
  );
440
368
  const handleDragLeave = useCallback(
441
369
  (event: DragEvent<HTMLDivElement>) => {
@@ -450,11 +378,16 @@ export function useChatComposerController({
450
378
  if (!attachments || !dragCarriesFiles(event)) return;
451
379
  event.preventDefault();
452
380
  setDragging(false);
453
- if (event.dataTransfer.files.length > 0) attachments.addFiles(event.dataTransfer.files);
381
+ if (!disabled && event.dataTransfer.files.length > 0)
382
+ attachments.addFiles(event.dataTransfer.files);
454
383
  },
455
- [attachments],
384
+ [attachments, disabled],
456
385
  );
457
386
 
387
+ useEffect(() => {
388
+ if (disabled) setDragging(false);
389
+ }, [disabled]);
390
+
458
391
  const [notice, setNotice] = useState<Notice | null>(null);
459
392
  const [helpOpen, setHelpOpen] = useState(false);
460
393
  const [confirmState, setConfirmState] = useState<ConfirmState>(null);
@@ -534,6 +467,9 @@ export function useChatComposerController({
534
467
  });
535
468
  const paletteEnabled = commandContext !== undefined;
536
469
  const commandDraftBlocked = paletteEnabled && palette.isCommandDraft;
470
+ const annotationsIncomplete = (delivery.annotations ?? []).some(
471
+ (annotation) => annotation.note.trim().length === 0,
472
+ );
537
473
 
538
474
  const submitBlocker: ComposerSubmitBlocker = disabled
539
475
  ? "disabled"
@@ -543,9 +479,11 @@ export function useChatComposerController({
543
479
  ? "sending"
544
480
  : commandDraftBlocked
545
481
  ? "command"
546
- : delivery.canSend || hasReadyAttachment
547
- ? null
548
- : "empty";
482
+ : annotationsIncomplete
483
+ ? "annotations"
484
+ : delivery.canSend
485
+ ? null
486
+ : "empty";
549
487
  const canSubmit = submitBlocker === null;
550
488
 
551
489
  const submit = useCallback(
@@ -557,23 +495,31 @@ export function useChatComposerController({
557
495
  }
558
496
  if (disabled || blockedByAttachment || delivery.sending || submittingRef.current)
559
497
  return false;
560
- if (!delivery.canSend && !hasReadyAttachment) return false;
498
+ if (annotationsIncomplete) {
499
+ setNotice({ tone: "error", message: messages.annotationNotesRequired });
500
+ delivery.clearError();
501
+ delivery.requestAnnotationReview?.();
502
+ return false;
503
+ }
504
+ if (!delivery.canSend) return false;
561
505
  submittingRef.current = true;
562
506
  setSubmitting(true);
563
507
  try {
564
- return mode === "steer" ? await delivery.steer() : await delivery.send();
508
+ return mode === "steer" || resumesOnSend ? await delivery.steer() : await delivery.send();
565
509
  } finally {
566
510
  submittingRef.current = false;
567
511
  if (mountedRef.current) setSubmitting(false);
568
512
  }
569
513
  },
570
514
  [
515
+ annotationsIncomplete,
571
516
  blockedByAttachment,
572
517
  commandDraftBlocked,
573
518
  delivery,
574
519
  disabled,
575
- hasReadyAttachment,
520
+ messages.annotationNotesRequired,
576
521
  messages.slashCommandBlocked,
522
+ resumesOnSend,
577
523
  ],
578
524
  );
579
525
 
@@ -588,17 +534,18 @@ export function useChatComposerController({
588
534
  );
589
535
  const handlePaste = useCallback(
590
536
  (event: ClipboardEvent<HTMLTextAreaElement>) => {
537
+ if (disabled) return;
591
538
  onPaste?.(event);
592
539
  attachments?.addFromPaste(event);
593
540
  },
594
- [attachments, onPaste],
541
+ [attachments, disabled, onPaste],
595
542
  );
596
543
  const handleFileChange = useCallback(
597
544
  (event: ChangeEvent<HTMLInputElement>) => {
598
- if (event.target.files) attachments?.addFiles(event.target.files);
545
+ if (!disabled && event.target.files) attachments?.addFiles(event.target.files);
599
546
  event.target.value = "";
600
547
  },
601
- [attachments],
548
+ [attachments, disabled],
602
549
  );
603
550
 
604
551
  const helpCommands = useMemo(
@@ -621,7 +568,10 @@ export function useChatComposerController({
621
568
  tone: "error" as const,
622
569
  message: /control changed|paused while/i.test(delivery.error.message)
623
570
  ? messages.controlChangedError
624
- : composerSubmissionErrorMessage(delivery.error) || messages.sendFailedError,
571
+ : formatError(
572
+ delivery.error,
573
+ composerSubmissionErrorMessage(delivery.error) || messages.sendFailedError,
574
+ ),
625
575
  }
626
576
  : null);
627
577
  useEffect(() => {
@@ -632,6 +582,12 @@ export function useChatComposerController({
632
582
  );
633
583
  return () => window.clearTimeout(timer);
634
584
  }, [notice]);
585
+ useEffect(() => {
586
+ if (annotationsIncomplete) return;
587
+ setNotice((current) =>
588
+ current?.message === messages.annotationNotesRequired ? null : current,
589
+ );
590
+ }, [annotationsIncomplete, messages.annotationNotesRequired]);
635
591
 
636
592
  const runControlOperation = useCallback(async (operation: () => Promise<void>) => {
637
593
  if (controlOperationRef.current) return false;
@@ -666,6 +622,12 @@ export function useChatComposerController({
666
622
  [control, runControlOperation],
667
623
  );
668
624
 
625
+ const stop = useCallback(async (): Promise<boolean> => {
626
+ const stopped = await pause();
627
+ if (stopped && mountedRef.current) setStoppedHere(true);
628
+ return stopped;
629
+ }, [pause]);
630
+
669
631
  return {
670
632
  id,
671
633
  rootRef,
@@ -690,9 +652,12 @@ export function useChatComposerController({
690
652
  removeRestoredResource: draft?.removeRestoredResource,
691
653
  resolveDraftConflict: draft?.resolveDraftConflict,
692
654
  hasControl: control !== undefined,
655
+ runControl,
656
+ running,
693
657
  pausing: control?.pausing ?? false,
694
658
  resuming: control?.resuming ?? false,
695
659
  pause,
660
+ stop,
696
661
  resume,
697
662
  resumeScope,
698
663
  paused,
@@ -862,6 +827,7 @@ export const Surface = forwardRef<HTMLDivElement, ComposerSurfaceProps>(function
862
827
  const controller = useComposerController();
863
828
  return (
864
829
  <div
830
+ data-og-composer-surface=""
865
831
  {...props}
866
832
  ref={ref}
867
833
  onDragOver={controller.attachments ? controller.handleDragOver : undefined}
@@ -933,8 +899,11 @@ export function Attachments() {
933
899
  <AttachmentChips
934
900
  attachments={controller.attachments.attachments}
935
901
  messages={controller.messages}
902
+ disabled={controller.disabled}
936
903
  onRemove={controller.attachments.remove}
937
904
  onRetry={controller.attachments.retry}
905
+ onRetainPreview={controller.attachments.retainPreview}
906
+ onLoadPreview={controller.attachments.loadPreview}
938
907
  />
939
908
  );
940
909
  }
@@ -952,6 +921,31 @@ type OwnedInputProps =
952
921
  | "aria-keyshortcuts";
953
922
  export type ComposerInputProps = Omit<ComponentPropsWithoutRef<"textarea">, OwnedInputProps>;
954
923
 
924
+ const EDITING_FOCUS_SELECTOR =
925
+ 'input, textarea, select, [contenteditable="true"], [role="textbox"]';
926
+ const POPUP_FOCUS_SELECTOR =
927
+ '[role="menu"], [role="menubar"], [role="listbox"], [role="dialog"], [role="alertdialog"]';
928
+
929
+ /**
930
+ * Initial focus is a convenience, not authority to move focus the person has
931
+ * placed elsewhere. It yields to a field they started editing and to an open
932
+ * menu, listbox, or dialog that does not contain the composer: moving focus
933
+ * behind a non-modal popup dismisses it, and a modal surface owns focus until
934
+ * it closes.
935
+ */
936
+ function focusBelongsElsewhere(textarea: HTMLTextAreaElement): boolean {
937
+ const active = textarea.ownerDocument.activeElement;
938
+ if (!active || active === textarea) return false;
939
+ if (active.closest(EDITING_FOCUS_SELECTOR)) return true;
940
+ const popup = active.closest(POPUP_FOCUS_SELECTOR);
941
+ if (popup) return !popup.contains(textarea);
942
+ // A dismissed popup can restore a button or link while draft hydration is
943
+ // still pending. Its focus remains intentional after the popup disappears.
944
+ return (
945
+ active !== textarea.ownerDocument.body && active !== textarea.ownerDocument.documentElement
946
+ );
947
+ }
948
+
955
949
  export const Input = forwardRef<HTMLTextAreaElement, ComposerInputProps>(function ComposerInput(
956
950
  { rows = 1, placeholder, className, "aria-label": ariaLabel, autoFocus = false, ...props },
957
951
  forwardedRef,
@@ -961,19 +955,45 @@ export const Input = forwardRef<HTMLTextAreaElement, ComposerInputProps>(functio
961
955
  const paletteOpen =
962
956
  controller.paletteEnabled && controller.paletteMounted && controller.palette.open;
963
957
 
964
- // Native autoFocus loses when the textarea mounts disabled (create-session draft
965
- // hydrate). Retry once the controller becomes interactive.
958
+ // Focus once the controller is interactive. The textarea can mount disabled
959
+ // (create-session draft hydrate), and the route can finish loading after the
960
+ // person has already moved on, so this deliberately does not use the native
961
+ // autoFocus attribute: that would take focus at mount without the guard.
966
962
  useEffect(() => {
967
963
  if (!autoFocus || controller.disabled || autoFocusedRef.current) return;
968
964
  const frame = window.requestAnimationFrame(() => {
969
965
  const textarea = controller.textareaRef.current;
970
966
  if (!textarea || textarea.disabled) return;
971
967
  autoFocusedRef.current = true;
968
+ if (focusBelongsElsewhere(textarea)) return;
972
969
  textarea.focus();
973
970
  });
974
971
  return () => window.cancelAnimationFrame(frame);
975
972
  }, [autoFocus, controller.disabled, controller.textareaRef]);
976
973
 
974
+ // Text rewraps when the box gets narrower or wider (panel resize, viewport
975
+ // change), so refit the height on width changes, not only on edits.
976
+ useEffect(() => {
977
+ const textarea = controller.textareaRef.current;
978
+ if (!textarea || typeof ResizeObserver === "undefined") return;
979
+ let width = textarea.clientWidth;
980
+ let frame: number | null = null;
981
+ const observer = new ResizeObserver(() => {
982
+ if (textarea.clientWidth === width) return;
983
+ width = textarea.clientWidth;
984
+ if (frame !== null) return;
985
+ frame = window.requestAnimationFrame(() => {
986
+ frame = null;
987
+ applyComposerTextareaHeight(textarea, 220);
988
+ });
989
+ });
990
+ observer.observe(textarea);
991
+ return () => {
992
+ observer.disconnect();
993
+ if (frame !== null) window.cancelAnimationFrame(frame);
994
+ };
995
+ }, [controller.textareaRef]);
996
+
977
997
  return (
978
998
  <textarea
979
999
  {...props}
@@ -989,7 +1009,6 @@ export const Input = forwardRef<HTMLTextAreaElement, ComposerInputProps>(functio
989
1009
  : (placeholder ?? controller.messages.messagePlaceholder)
990
1010
  }
991
1011
  disabled={controller.disabled}
992
- autoFocus={autoFocus && !controller.disabled}
993
1012
  aria-label={ariaLabel ?? controller.messages.inputLabel}
994
1013
  aria-keyshortcuts="Enter Meta+Enter Control+Enter Shift+Enter"
995
1014
  aria-autocomplete={
@@ -1054,7 +1073,9 @@ export const Controls = forwardRef<HTMLSpanElement, ComposerControlsProps>(
1054
1073
  ref={ref}
1055
1074
  className={cn(
1056
1075
  "og-composer-controls flex min-w-0 flex-1 flex-wrap items-center gap-1.5",
1057
- "max-sm:flex-nowrap max-sm:gap-1",
1076
+ // Phone: 44px touch targets already space themselves; tight gaps leave
1077
+ // the model pill room for its name.
1078
+ "max-sm:flex-nowrap max-sm:gap-0.5",
1058
1079
  className,
1059
1080
  )}
1060
1081
  />
@@ -1095,7 +1116,7 @@ export const Actions = forwardRef<HTMLSpanElement, ComposerActionsProps>(functio
1095
1116
  ref={ref}
1096
1117
  className={cn(
1097
1118
  "og-composer-actions ml-auto flex shrink-0 items-center gap-1.5",
1098
- "max-sm:flex-nowrap max-sm:gap-1",
1119
+ "max-sm:flex-nowrap max-sm:gap-0.5",
1099
1120
  className,
1100
1121
  )}
1101
1122
  />
@@ -1200,12 +1221,19 @@ export const PauseButton = forwardRef<HTMLButtonElement, ComposerPauseButtonProp
1200
1221
  ref,
1201
1222
  ) {
1202
1223
  const controller = useComposerController();
1203
- if (!controller.effectiveControl || controller.paused || !controller.hasControl) return null;
1224
+ if (
1225
+ controller.runControl !== "pause" ||
1226
+ !controller.effectiveControl ||
1227
+ controller.paused ||
1228
+ !controller.hasControl
1229
+ )
1230
+ return null;
1204
1231
  const busy = controller.pausing || controller.resuming;
1205
1232
  const tip = title ?? controller.messages.pauseTitle;
1206
1233
  return (
1207
1234
  <ComposerTip tip={tip}>
1208
1235
  <button
1236
+ data-analytics-action="pause"
1209
1237
  {...props}
1210
1238
  ref={mergeRefs(controller.pauseButtonRef, ref)}
1211
1239
  type="button"
@@ -1232,6 +1260,62 @@ export const PauseButton = forwardRef<HTMLButtonElement, ComposerPauseButtonProp
1232
1260
  },
1233
1261
  );
1234
1262
 
1263
+ export type ComposerStopButtonProps = Omit<
1264
+ ButtonHTMLAttributes<HTMLButtonElement>,
1265
+ OwnedButtonProps
1266
+ >;
1267
+
1268
+ /**
1269
+ * Stop the running response. Rendered only under `runControl="stop"` while a
1270
+ * response runs; stopping pauses this conversation and the next message
1271
+ * continues it.
1272
+ */
1273
+ export const StopButton = forwardRef<HTMLButtonElement, ComposerStopButtonProps>(
1274
+ function ComposerStopButton(
1275
+ { className, "aria-label": ariaLabel, title, children, ...props },
1276
+ ref,
1277
+ ) {
1278
+ const controller = useComposerController();
1279
+ if (
1280
+ controller.runControl !== "stop" ||
1281
+ !controller.running ||
1282
+ !controller.hasControl ||
1283
+ controller.effectiveControl?.state === "paused"
1284
+ )
1285
+ return null;
1286
+ const busy = controller.pausing;
1287
+ const label = ariaLabel ?? controller.messages.stopAriaLabel ?? "Stop";
1288
+ const tip = title ?? controller.messages.stopTitle ?? label;
1289
+ return (
1290
+ <ComposerTip tip={tip}>
1291
+ <button
1292
+ data-analytics-action="stop"
1293
+ data-og-composer-stop=""
1294
+ {...props}
1295
+ ref={ref}
1296
+ type="button"
1297
+ onClick={() => void controller.stop()}
1298
+ disabled={busy}
1299
+ aria-label={label}
1300
+ className={cn(
1301
+ "inline-flex size-8 items-center justify-center rounded-og-md border border-og-border pointer-coarse:size-11",
1302
+ "bg-og-surface-1 text-og-fg transition-colors duration-150",
1303
+ "hover:bg-og-surface-2 disabled:opacity-50",
1304
+ className,
1305
+ )}
1306
+ >
1307
+ {children ??
1308
+ (busy ? (
1309
+ <LoaderCircleIcon className="size-3.5 animate-og-spin" />
1310
+ ) : (
1311
+ <SquareIcon className="size-3 fill-current" />
1312
+ ))}
1313
+ </button>
1314
+ </ComposerTip>
1315
+ );
1316
+ },
1317
+ );
1318
+
1235
1319
  export type ComposerSendButtonProps = Omit<
1236
1320
  ButtonHTMLAttributes<HTMLButtonElement>,
1237
1321
  OwnedButtonProps
@@ -1245,10 +1329,15 @@ export const SendButton = forwardRef<HTMLButtonElement, ComposerSendButtonProps>
1245
1329
  const controller = useComposerController();
1246
1330
  const tip =
1247
1331
  title ??
1248
- (controller.paused ? controller.messages.sendAndResumeTitle : controller.messages.sendTitle);
1332
+ (controller.submitBlocker === "annotations"
1333
+ ? controller.messages.annotationNotesRequired
1334
+ : controller.paused
1335
+ ? controller.messages.sendAndResumeTitle
1336
+ : controller.messages.sendTitle);
1249
1337
  return (
1250
1338
  <ComposerTip tip={tip}>
1251
1339
  <button
1340
+ data-analytics-action="send"
1252
1341
  {...props}
1253
1342
  ref={ref}
1254
1343
  type="button"
@@ -1263,10 +1352,10 @@ export const SendButton = forwardRef<HTMLButtonElement, ComposerSendButtonProps>
1263
1352
  }
1264
1353
  className={cn(
1265
1354
  "inline-flex size-8 items-center justify-center rounded-og-md pointer-coarse:size-11",
1266
- "bg-og-accent text-og-accent-fg shadow-og-sm",
1355
+ "border border-og-primary-border bg-og-primary text-og-primary-fg",
1267
1356
  "transition-[background-color,transform,opacity] duration-150 ease-og-spring",
1268
- "hover:bg-og-accent-strong active:scale-95",
1269
- "disabled:cursor-not-allowed disabled:bg-og-surface-3 disabled:text-og-fg-subtle disabled:shadow-none",
1357
+ "hover:bg-og-primary-hover active:scale-95",
1358
+ "disabled:cursor-not-allowed disabled:opacity-50",
1270
1359
  className,
1271
1360
  )}
1272
1361
  >
@@ -1423,7 +1512,7 @@ function WorkstreamPausedStrip({
1423
1512
  <button
1424
1513
  type="button"
1425
1514
  aria-label={messages.resumeThisWorkstream}
1426
- className="inline-flex min-h-8 shrink-0 items-center gap-1.5 rounded-og-md border border-og-status-waiting/35 bg-og-surface-1 px-2.5 text-og-xs font-medium text-og-fg hover:bg-og-surface-2 pointer-coarse:min-h-11"
1515
+ className="inline-flex min-h-8 shrink-0 items-center gap-1.5 rounded-og-md border border-og-primary-border bg-og-primary px-2.5 text-og-xs font-medium text-og-primary-fg hover:bg-og-primary-hover disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:min-h-11"
1427
1516
  disabled={busy}
1428
1517
  onClick={onResume}
1429
1518
  >
@@ -1623,20 +1712,143 @@ function ConfirmBar({
1623
1712
  function AttachmentChips({
1624
1713
  attachments,
1625
1714
  messages,
1715
+ disabled,
1626
1716
  onRemove,
1627
1717
  onRetry,
1718
+ onRetainPreview,
1719
+ onLoadPreview,
1628
1720
  }: {
1629
1721
  attachments: UseFileAttachmentsResult["attachments"];
1630
1722
  messages: ChatComposerMessages;
1723
+ disabled: boolean;
1631
1724
  onRemove: (id: string) => void;
1632
1725
  onRetry?: ((id: string) => void) | undefined;
1726
+ onRetainPreview: UseFileAttachmentsResult["retainPreview"];
1727
+ onLoadPreview: UseFileAttachmentsResult["loadPreview"];
1633
1728
  }) {
1729
+ const lightbox = useLightboxOptional();
1730
+ const previewRequest = useRef<AbortController | null>(null);
1731
+ const [previewLoadingId, setPreviewLoadingId] = useState<string | null>(null);
1732
+ const [previewErrorId, setPreviewErrorId] = useState<string | null>(null);
1733
+ // Thumbnails always show: an uploaded image without a live local preview (a
1734
+ // restored draft, a revoked or broken object URL) loads its stored copy.
1735
+ const [storedThumbs, setStoredThumbs] = useState<Record<string, string>>({});
1736
+ const [brokenLocal, setBrokenLocal] = useState<ReadonlySet<string>>(() => new Set());
1737
+ const thumbRequests = useRef<Map<string, AbortController>>(new Map());
1738
+ const localPreview = (attachment: UseFileAttachmentsResult["attachments"][number]) =>
1739
+ attachment.previewUrl && !brokenLocal.has(attachment.id) ? attachment.previewUrl : undefined;
1740
+
1741
+ useEffect(() => {
1742
+ if (!onLoadPreview) return;
1743
+ for (const attachment of attachments) {
1744
+ const id = attachment.id;
1745
+ if (
1746
+ attachment.status !== "ready" ||
1747
+ !attachment.file ||
1748
+ !attachment.contentType.startsWith("image/") ||
1749
+ (attachment.previewUrl && !brokenLocal.has(id)) ||
1750
+ storedThumbs[id] ||
1751
+ thumbRequests.current.has(id)
1752
+ ) {
1753
+ continue;
1754
+ }
1755
+ const controller = new AbortController();
1756
+ thumbRequests.current.set(id, controller);
1757
+ void onLoadPreview(id, controller.signal)
1758
+ .then((url) => {
1759
+ if (url && !controller.signal.aborted) {
1760
+ setStoredThumbs((current) => ({ ...current, [id]: url }));
1761
+ }
1762
+ })
1763
+ .catch(() => undefined)
1764
+ .finally(() => {
1765
+ if (thumbRequests.current.get(id) === controller) thumbRequests.current.delete(id);
1766
+ });
1767
+ }
1768
+ }, [attachments, brokenLocal, onLoadPreview, storedThumbs]);
1769
+ useEffect(() => {
1770
+ const requests = thumbRequests.current;
1771
+ return () => {
1772
+ for (const controller of requests.values()) controller.abort();
1773
+ requests.clear();
1774
+ };
1775
+ }, []);
1776
+
1777
+ useEffect(() => () => previewRequest.current?.abort(), [onLoadPreview]);
1778
+
1779
+ async function openPreview(
1780
+ attachment: UseFileAttachmentsResult["attachments"][number],
1781
+ source: HTMLButtonElement,
1782
+ canLoadPreview: boolean,
1783
+ ) {
1784
+ previewRequest.current?.abort();
1785
+ const attachmentId = attachment.id;
1786
+ const local = localPreview(attachment);
1787
+ const releaseSource = local ? onRetainPreview(attachmentId) : undefined;
1788
+ let src = local ?? storedThumbs[attachmentId];
1789
+ // An unretained local URL may already be revoked: prefer the stored copy.
1790
+ if (!releaseSource && canLoadPreview) src = storedThumbs[attachmentId];
1791
+ if (!src && canLoadPreview) {
1792
+ const controller = new AbortController();
1793
+ previewRequest.current = controller;
1794
+ setPreviewLoadingId(attachmentId);
1795
+ setPreviewErrorId(null);
1796
+ try {
1797
+ src = await onLoadPreview!(attachmentId, controller.signal);
1798
+ if (controller.signal.aborted) return;
1799
+ if (!src) {
1800
+ setPreviewErrorId(attachmentId);
1801
+ return;
1802
+ }
1803
+ } catch {
1804
+ if (!controller.signal.aborted) setPreviewErrorId(attachmentId);
1805
+ return;
1806
+ } finally {
1807
+ if (previewRequest.current === controller) {
1808
+ setPreviewLoadingId(null);
1809
+ }
1810
+ }
1811
+ }
1812
+ lightbox!.open(
1813
+ src!,
1814
+ attachment.name,
1815
+ source,
1816
+ messages.attachmentPreviewLabel,
1817
+ attachment.name,
1818
+ {
1819
+ download: messages.downloadAttachment(attachment.name),
1820
+ close: messages.closeAttachmentPreview,
1821
+ },
1822
+ releaseSource,
1823
+ );
1824
+ }
1825
+
1634
1826
  return (
1635
1827
  <div className="flex flex-wrap gap-2 px-3 py-2">
1636
1828
  {attachments.map((attachment) => {
1637
1829
  const failed = attachment.status === "failed";
1638
- const statusText =
1639
- attachment.status === "uploading"
1830
+ const secureContextRequired = attachment.errorCode === "secure_context_required";
1831
+ const previewFailed = previewErrorId === attachment.id;
1832
+ const previewLoading = previewLoadingId === attachment.id;
1833
+ const local = localPreview(attachment);
1834
+ const thumb = local ?? storedThumbs[attachment.id];
1835
+ // A local object URL that fails (revoked, unreadable) falls back to the stored copy.
1836
+ const onThumbError = local
1837
+ ? () =>
1838
+ setBrokenLocal((current) =>
1839
+ current.has(attachment.id) ? current : new Set(current).add(attachment.id),
1840
+ )
1841
+ : undefined;
1842
+ const canLoadPreview = Boolean(
1843
+ lightbox &&
1844
+ onLoadPreview &&
1845
+ attachment.status === "ready" &&
1846
+ attachment.file &&
1847
+ attachment.contentType.startsWith("image/"),
1848
+ );
1849
+ const statusText = previewFailed
1850
+ ? (messages.previewUnavailable ?? "Preview unavailable")
1851
+ : attachment.status === "uploading"
1640
1852
  ? messages.uploading
1641
1853
  : failed
1642
1854
  ? attachment.error || messages.uploadFailed
@@ -1645,16 +1857,49 @@ function AttachmentChips({
1645
1857
  <div
1646
1858
  key={attachment.id}
1647
1859
  className={cn(
1648
- "flex min-w-0 max-w-[240px] items-center gap-2 rounded-og-md border px-2 py-1.5 text-og-sm",
1860
+ "flex min-w-0 items-center gap-2 rounded-og-md border px-2 py-1.5 text-og-sm",
1649
1861
  failed
1650
- ? "border-og-status-failed/40 bg-og-status-failed/10"
1651
- : "border-og-border bg-og-surface-2",
1862
+ ? cn(
1863
+ "border-og-status-failed/40 bg-og-status-failed/10",
1864
+ secureContextRequired
1865
+ ? "max-w-full items-start sm:max-w-[32rem]"
1866
+ : "max-w-[240px]",
1867
+ )
1868
+ : "max-w-[240px] border-og-border bg-og-surface-2",
1652
1869
  )}
1653
1870
  >
1654
- {attachment.previewUrl ? (
1871
+ {lightbox && (thumb || canLoadPreview) ? (
1872
+ <button
1873
+ type="button"
1874
+ className={cn(
1875
+ "size-8 shrink-0 overflow-hidden rounded outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent",
1876
+ !thumb && "flex items-center justify-center disabled:cursor-wait",
1877
+ )}
1878
+ aria-label={messages.previewAttachment(attachment.name)}
1879
+ aria-busy={previewLoading || undefined}
1880
+ disabled={previewLoading}
1881
+ onClick={(event) =>
1882
+ void openPreview(attachment, event.currentTarget, canLoadPreview)
1883
+ }
1884
+ >
1885
+ {thumb ? (
1886
+ <img
1887
+ src={thumb}
1888
+ alt=""
1889
+ onError={onThumbError}
1890
+ className="h-full w-full object-cover transition-opacity hover:opacity-80"
1891
+ />
1892
+ ) : previewLoading ? (
1893
+ <LoaderCircleIcon className="size-4 animate-og-spin text-og-fg-muted" />
1894
+ ) : (
1895
+ <ImageIcon className="size-4 text-og-fg-muted" />
1896
+ )}
1897
+ </button>
1898
+ ) : thumb ? (
1655
1899
  <img
1656
- src={attachment.previewUrl}
1900
+ src={thumb}
1657
1901
  alt=""
1902
+ onError={onThumbError}
1658
1903
  className="size-8 shrink-0 rounded object-cover"
1659
1904
  />
1660
1905
  ) : attachment.contentType.startsWith("image/") ? (
@@ -1664,7 +1909,11 @@ function AttachmentChips({
1664
1909
  )}
1665
1910
  <div className="min-w-0 flex-1">
1666
1911
  <div className="truncate font-medium text-og-fg">{attachment.name}</div>
1667
- {failed ? (
1912
+ {secureContextRequired ? (
1913
+ <div className="break-words text-og-xs leading-4 text-og-status-failed">
1914
+ {statusText}
1915
+ </div>
1916
+ ) : failed || previewFailed ? (
1668
1917
  <ComposerTip tip={statusText}>
1669
1918
  <div className="truncate text-og-xs text-og-status-failed">{statusText}</div>
1670
1919
  </ComposerTip>
@@ -1675,12 +1924,13 @@ function AttachmentChips({
1675
1924
  {attachment.status === "uploading" ? (
1676
1925
  <LoaderCircleIcon className="size-3.5 shrink-0 animate-og-spin" />
1677
1926
  ) : null}
1678
- {failed && onRetry ? (
1927
+ {failed && !secureContextRequired && onRetry ? (
1679
1928
  <ComposerTip tip={messages.retryUpload}>
1680
1929
  <button
1681
1930
  type="button"
1682
1931
  onClick={() => onRetry(attachment.id)}
1683
- className="shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg pointer-coarse:size-10"
1932
+ disabled={disabled}
1933
+ className="shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-10"
1684
1934
  aria-label={messages.retryAttachment(attachment.name)}
1685
1935
  >
1686
1936
  <RotateCwIcon className="size-3.5" />
@@ -1690,7 +1940,8 @@ function AttachmentChips({
1690
1940
  <button
1691
1941
  type="button"
1692
1942
  onClick={() => onRemove(attachment.id)}
1693
- className="shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg pointer-coarse:size-10"
1943
+ disabled={disabled}
1944
+ className="shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-10"
1694
1945
  aria-label={messages.removeAttachment(attachment.name)}
1695
1946
  >
1696
1947
  <XIcon className="size-3.5" />