@opengeni/react 6.5.2-canary.41607687019001 → 6.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1154) hide show
  1. package/dist/app/app-state.d.ts +4 -0
  2. package/dist/app/app-state.js +19 -14
  3. package/dist/app/components/Composer.js +25 -23
  4. package/dist/app/components/agent/agent-capability-picker.js +10 -8
  5. package/dist/app/components/artifacts/artifact-browse-controls.js +4 -4
  6. package/dist/app/components/artifacts/artifact-library.js +21 -19
  7. package/dist/app/components/artifacts/artifact-page-chrome.js +3 -3
  8. package/dist/app/components/artifacts/artifact-viewer.js +23 -22
  9. package/dist/app/components/artifacts/artifact-viewer.js.map +1 -1
  10. package/dist/app/components/artifacts/chat-interactive-block.js +12 -12
  11. package/dist/app/components/artifacts/copy-artifact-link.js +7 -5
  12. package/dist/app/components/artifacts/file-reach-dialog.js +11 -9
  13. package/dist/app/components/artifacts/inline-chat-image.js +18 -18
  14. package/dist/app/components/artifacts/retained-file-preview.js +24 -23
  15. package/dist/app/components/artifacts/retained-text-preview.js +3 -3
  16. package/dist/app/components/artifacts/site-audience.js +6 -5
  17. package/dist/app/components/artifacts/site-conversations.js +16 -14
  18. package/dist/app/components/artifacts/site-data.js +18 -16
  19. package/dist/app/components/artifacts/site-public-link.js +3 -2
  20. package/dist/app/components/artifacts/site-publishing-page.js +39 -37
  21. package/dist/app/components/artifacts/site-publishing.js +34 -32
  22. package/dist/app/components/artifacts/site-settings.js +38 -36
  23. package/dist/app/components/artifacts/site-version-menu.js +8 -7
  24. package/dist/app/components/billing-class-mark.js +3 -3
  25. package/dist/app/components/bots/bot-launch-strip.js +17 -17
  26. package/dist/app/components/bots/bot-template-dialog.js +30 -28
  27. package/dist/app/components/bots/bot-template-shortcuts.js +19 -19
  28. package/dist/app/components/bots/bot-templates-page.js +38 -36
  29. package/dist/app/components/bots/bot-templates-page.js.map +1 -1
  30. package/dist/app/components/capabilities/capability-detail-sheet.js +13 -11
  31. package/dist/app/components/capabilities/capability-logo-source.js +13 -13
  32. package/dist/app/components/capabilities/capability-logo.js +4 -3
  33. package/dist/app/components/capabilities/connector-tool-permissions.js +8 -6
  34. package/dist/app/components/capabilities/native-connect-setup.js +14 -14
  35. package/dist/app/components/capabilities/own-logins-shared-heads-up.js +7 -6
  36. package/dist/app/components/capabilities/perform-capability-action.js +7 -6
  37. package/dist/app/components/capabilities/prepared-mcp-setup-card.js +17 -17
  38. package/dist/app/components/capabilities/session-capability-card.js +72 -70
  39. package/dist/app/components/capabilities/session-capability-card.js.map +1 -1
  40. package/dist/app/components/capabilities/session-chrome-card.js +28 -26
  41. package/dist/app/components/capabilities/session-connection-accounts.js +4 -3
  42. package/dist/app/components/capabilities/session-custom-mcp-card.js +20 -19
  43. package/dist/app/components/capabilities/session-github-card.js +22 -20
  44. package/dist/app/components/capabilities/session-machine-card.js +27 -25
  45. package/dist/app/components/capabilities/session-personal-github-card.js +16 -16
  46. package/dist/app/components/capabilities/session-plugin-card.js +10 -9
  47. package/dist/app/components/capabilities/use-capabilities-catalog.js +4 -3
  48. package/dist/app/components/capabilities/use-connection-accounts.js +5 -4
  49. package/dist/app/components/command-menu/chat-status.js +15 -13
  50. package/dist/app/components/command-menu/chat-switcher.js +35 -33
  51. package/dist/app/components/command-menu/chat-switcher.js.map +1 -1
  52. package/dist/app/components/command-menu/command-menu.js +53 -50
  53. package/dist/app/components/command-menu/command-menu.js.map +1 -1
  54. package/dist/app/components/command-menu/shortcut-sheet.js +18 -16
  55. package/dist/app/components/command-menu/shortcut-sheet.js.map +1 -1
  56. package/dist/app/components/common.js +4 -3
  57. package/dist/app/components/composer-capabilities-menu-body.js +4 -4
  58. package/dist/app/components/composer-mobile-plus-panel.js +8 -8
  59. package/dist/app/components/composer-mobile-plus.js +1 -1
  60. package/dist/app/components/credit-required-gate.js +3 -3
  61. package/dist/app/components/credit-required-prompt.js +10 -8
  62. package/dist/app/components/credit-required-prompt.js.map +1 -1
  63. package/dist/app/components/credits/checkout-credits-celebration.js +3 -2
  64. package/dist/app/components/credits/checkout-return.js +3 -2
  65. package/dist/app/components/credits/checkout-return.js.map +1 -1
  66. package/dist/app/components/credits/coupon-redeem.js +5 -4
  67. package/dist/app/components/credits/credit-refusal-notice.js +7 -5
  68. package/dist/app/components/cross-slot-deep-link-recovery.js +5 -4
  69. package/dist/app/components/desktop/app-shots.js +13 -11
  70. package/dist/app/components/desktop/computer-use.js +6 -4
  71. package/dist/app/components/desktop/this-computer.js +9 -7
  72. package/dist/app/components/feedback.js +5 -4
  73. package/dist/app/components/follow-up-repository-menu-body.js +8 -6
  74. package/dist/app/components/follow-up-repository-menu-body.js.map +1 -1
  75. package/dist/app/components/follow-up-repository-picker.js +1 -1
  76. package/dist/app/components/github-app-connect-launcher.js +5 -4
  77. package/dist/app/components/in-app-help-link.js +3 -3
  78. package/dist/app/components/knowledge/agent-learning-settings.js +3 -2
  79. package/dist/app/components/knowledge/agent-learning-settings.js.map +1 -1
  80. package/dist/app/components/machines/connect-machine-dialog.js +18 -16
  81. package/dist/app/components/manual-repository-editor.js +3 -2
  82. package/dist/app/components/markdown.js +6 -6
  83. package/dist/app/components/models/models-ui.js +12 -10
  84. package/dist/app/components/my-things.js +12 -10
  85. package/dist/app/components/my-things.js.map +1 -1
  86. package/dist/app/components/new-session-starters.js +3 -3
  87. package/dist/app/components/own-where-it-works.js +9 -7
  88. package/dist/app/components/personal-resource-attachment-surface.js +4 -4
  89. package/dist/app/components/pickers.js +5 -5
  90. package/dist/app/components/rail/channel-create-dialog.js +7 -5
  91. package/dist/app/components/rail/project-glyph.js +17 -17
  92. package/dist/app/components/rail/project-profile.js +31 -29
  93. package/dist/app/components/rail/rail-context.js +3 -3
  94. package/dist/app/components/rail/rail-sections.js +68 -66
  95. package/dist/app/components/rail/session-header.js +59 -57
  96. package/dist/app/components/rail/session-list.js +66 -64
  97. package/dist/app/components/rail/session-row-content.js +4 -4
  98. package/dist/app/components/rail/session-row-hover-details.js +14 -12
  99. package/dist/app/components/rail/session-shell.js +90 -88
  100. package/dist/app/components/rail/site-session-group-heading.js +8 -8
  101. package/dist/app/components/repository-picker.js +8 -6
  102. package/dist/app/components/secrets/session-secrets-panel.js +4 -3
  103. package/dist/app/components/secrets/vault-model.js +3 -2
  104. package/dist/app/components/session/agent-configuration-panel.js +25 -23
  105. package/dist/app/components/session/agent-configuration-panel.js.map +1 -1
  106. package/dist/app/components/session/artifact-link-boundary.js +3 -3
  107. package/dist/app/components/session/artifact-session-page.js +11 -9
  108. package/dist/app/components/session/banners.js +8 -8
  109. package/dist/app/components/session/codex-usage-notice.js +5 -3
  110. package/dist/app/components/session/console-new-conversation.js +42 -40
  111. package/dist/app/components/session/context-text-reader.js +3 -2
  112. package/dist/app/components/session/descendant-requests.js +39 -37
  113. package/dist/app/components/session/descendant-requests.js.map +1 -1
  114. package/dist/app/components/session/editable-artifacts-workspace.js +36 -34
  115. package/dist/app/components/session/editable-artifacts-workspace.js.map +1 -1
  116. package/dist/app/components/session/failed-session-banner.js +13 -11
  117. package/dist/app/components/session/failed-session-banner.js.map +1 -1
  118. package/dist/app/components/session/failure-recovery-boundary.js +3 -3
  119. package/dist/app/components/session/human-input-delegation-record.js +2 -2
  120. package/dist/app/components/session/human-input.js +33 -31
  121. package/dist/app/components/session/inspector.js +57 -55
  122. package/dist/app/components/session/inspector.js.map +1 -1
  123. package/dist/app/components/session/message-actions.js +5 -4
  124. package/dist/app/components/session/message-actions.js.map +1 -1
  125. package/dist/app/components/session/message-resource-attachments.js +12 -11
  126. package/dist/app/components/session/message-resource-attachments.js.map +1 -1
  127. package/dist/app/components/session/model-context-inspector.js +6 -4
  128. package/dist/app/components/session/model-recovery-notice.js +3 -3
  129. package/dist/app/components/session/new-session-settings-menu.js +11 -9
  130. package/dist/app/components/session/new-session-setup-strip.js +18 -18
  131. package/dist/app/components/session/sandbox-recovery-actions.js +3 -3
  132. package/dist/app/components/session/sandbox-switcher.js +10 -9
  133. package/dist/app/components/session/sandbox-workspace.js +47 -46
  134. package/dist/app/components/session/search-markdown-highlight.js +7 -7
  135. package/dist/app/components/session/search-results-view.js +8 -8
  136. package/dist/app/components/session/session-admin-access.js +13 -11
  137. package/dist/app/components/session/session-admission-notice.js +7 -5
  138. package/dist/app/components/session/session-avatar-picker.js +22 -20
  139. package/dist/app/components/session/session-avatar.js +16 -16
  140. package/dist/app/components/session/session-machine-access-notice.js +7 -5
  141. package/dist/app/components/session/session-profile-dialog.js +29 -27
  142. package/dist/app/components/session/session-profile-editor.js +30 -28
  143. package/dist/app/components/session/session-retention.js +10 -8
  144. package/dist/app/components/session/session-search-dialog.js +10 -10
  145. package/dist/app/components/session/session-skill-reviews.js +2 -1
  146. package/dist/app/components/session/session-skill-reviews.js.map +1 -1
  147. package/dist/app/components/session/session-tenancy-control.js +13 -11
  148. package/dist/app/components/session/session-tenancy-control.js.map +1 -1
  149. package/dist/app/components/session/session-unattended-setting.js +7 -5
  150. package/dist/app/components/session/session-usage-limit-section.js +11 -9
  151. package/dist/app/components/session/share-chat-dialog.js +9 -7
  152. package/dist/app/components/session/site-origin-link.js +3 -3
  153. package/dist/app/components/session/subagents.js +8 -8
  154. package/dist/app/components/session/subscription-account-indicator.js +6 -6
  155. package/dist/app/components/session-connectors-menu-body.js +4 -3
  156. package/dist/app/components/session-connectors-menu-body.js.map +1 -1
  157. package/dist/app/components/settings/row-select.js +7 -5
  158. package/dist/app/components/toaster.js +3 -2
  159. package/dist/app/components/transcription-settings.js +11 -9
  160. package/dist/app/components/ui/destructive-confirm.js +11 -9
  161. package/dist/app/components/usage/usage-entry.js +5 -5
  162. package/dist/app/components/window-bar.js +16 -14
  163. package/dist/app/components/workspace-composer-plus.js +22 -21
  164. package/dist/app/components/workspace-reach.js +6 -4
  165. package/dist/app/components/workspace-tenant-boundary.js +5 -4
  166. package/dist/app/embed/memory-navigation.js +3 -3
  167. package/dist/app/embed/session-app.js +211 -209
  168. package/dist/app/lib/actions/actions-provider.js +15 -13
  169. package/dist/app/lib/agent-capabilities.js +3 -3
  170. package/dist/app/lib/app-surfaces.js +7 -6
  171. package/dist/app/lib/archive-session.d.ts +9 -4
  172. package/dist/app/lib/archive-session.js +4 -2
  173. package/dist/app/lib/bot-templates.js +3 -2
  174. package/dist/app/lib/capabilities.js +3 -2
  175. package/dist/app/lib/codex-usage-query.js +2 -2
  176. package/dist/app/lib/composer-connectors.js +17 -16
  177. package/dist/app/lib/console-site.js +2 -2
  178. package/dist/app/lib/console-text.js +2 -2
  179. package/dist/app/lib/events.js +9 -9
  180. package/dist/app/lib/failed-session-copy.js +3 -3
  181. package/dist/app/lib/inbox.js +4 -2
  182. package/dist/app/lib/model-access-onboarding.js +3 -3
  183. package/dist/app/lib/move-chat-to-machine.js +3 -3
  184. package/dist/app/lib/navigation.js +2 -2
  185. package/dist/app/lib/session-branch-cache.js +6 -6
  186. package/dist/app/lib/session-create.js +4 -4
  187. package/dist/app/lib/session-group-pagination.js +6 -6
  188. package/dist/app/lib/session-hover-facts.js +13 -11
  189. package/dist/app/lib/session-model.js +2 -2
  190. package/dist/app/lib/session-rail.js +3 -3
  191. package/dist/app/lib/session-rename.js +3 -3
  192. package/dist/app/lib/session-restart-operation-controller.js +4 -3
  193. package/dist/app/lib/session-tenancy.js +3 -2
  194. package/dist/app/lib/session-usage-limit.js +3 -2
  195. package/dist/app/lib/sessions-group.js +5 -5
  196. package/dist/app/lib/site-publishing.js +3 -2
  197. package/dist/app/lib/site-tool-consent-dialog.js +9 -7
  198. package/dist/app/lib/site-tool-consent-dialog.js.map +1 -1
  199. package/dist/app/lib/site-tool-consent.js +1 -1
  200. package/dist/app/lib/subscription-plans.js +3 -2
  201. package/dist/app/lib/toast.js +2 -1
  202. package/dist/app/lib/turn-failure-analytics.js +4 -4
  203. package/dist/app/lib/use-duplicate-site.js +6 -5
  204. package/dist/app/lib/use-follow-up-repositories.js +6 -5
  205. package/dist/app/lib/use-workspace-integrations.js +4 -3
  206. package/dist/app/lib/use-workspace-machines.js +4 -4
  207. package/dist/app/lib/use-workspace-model-catalog.js +5 -4
  208. package/dist/app/lib/use-workspace-rigs.js +2 -2
  209. package/dist/app/lib/workspace-navigation-preference.js +4 -4
  210. package/dist/app/lib/workspace-scope-context.js +3 -3
  211. package/dist/app/routes/artifacts.js +67 -66
  212. package/dist/app/routes/artifacts.js.map +1 -1
  213. package/dist/app/routes/retained-artifact.js +42 -40
  214. package/dist/app/routes/retained-artifact.js.map +1 -1
  215. package/dist/app/routes/session-unavailable.js +8 -7
  216. package/dist/app/routes/session.js +119 -117
  217. package/dist/app/routes/sessions-index-hydration.js +5 -5
  218. package/dist/app/routes/sessions-index.js +104 -102
  219. package/dist/app/routes/site-view.js +67 -65
  220. package/dist/app/routes/site-view.js.map +1 -1
  221. package/dist/artifacts-document.js +4 -4
  222. package/dist/artifacts-presentation.js +4 -4
  223. package/dist/artifacts-spreadsheet.js +4 -4
  224. package/dist/artifacts.js +10 -10
  225. package/dist/automations.js +17 -15
  226. package/dist/automations.js.map +1 -1
  227. package/dist/browser-viewer-TC27OCIP.js +23 -0
  228. package/dist/chat-interactive-block-RWPQBHVS.js +18 -0
  229. package/dist/chunk-2BDT3UZQ.js +229 -0
  230. package/dist/chunk-2CLNIEK4.js +373 -0
  231. package/dist/chunk-2FSBSCZJ.js +451 -0
  232. package/dist/chunk-2I7HDP53.js +199 -0
  233. package/dist/chunk-2INLDVK3.js +15 -0
  234. package/dist/chunk-2KALVELR.js +126 -0
  235. package/dist/chunk-2M3J7ZWQ.js +418 -0
  236. package/dist/chunk-2OP6WLGV.js +708 -0
  237. package/dist/chunk-2RG7NIAS.js +2936 -0
  238. package/dist/chunk-2STUPWEL.js +135 -0
  239. package/dist/chunk-2YUOVM3G.js +271 -0
  240. package/dist/chunk-2Z3NQNTM.js +3670 -0
  241. package/dist/chunk-3CPWWGNK.js +920 -0
  242. package/dist/chunk-3ED2U6XE.js +37 -0
  243. package/dist/chunk-3GZA4BUW.js +216 -0
  244. package/dist/chunk-3IK6UYO6.js +1022 -0
  245. package/dist/chunk-3PZ7JZI2.js +431 -0
  246. package/dist/chunk-4DVJ6ONS.js +50 -0
  247. package/dist/chunk-4DVNUCRR.js +2386 -0
  248. package/dist/chunk-4DVNUCRR.js.map +1 -0
  249. package/dist/chunk-4E3ZJRTZ.js +41 -0
  250. package/dist/chunk-4SAWSRAA.js +141 -0
  251. package/dist/chunk-53AGXXZM.js +307 -0
  252. package/dist/chunk-54YW6SZZ.js +818 -0
  253. package/dist/chunk-57AZS3IE.js +2317 -0
  254. package/dist/chunk-5CPEEAFD.js +143 -0
  255. package/dist/chunk-5EWSRZ2Y.js +340 -0
  256. package/dist/chunk-5IE76VCY.js +387 -0
  257. package/dist/chunk-5NWEKLDZ.js +170 -0
  258. package/dist/chunk-5O2FCCHZ.js +198 -0
  259. package/dist/chunk-5QAY6K77.js +399 -0
  260. package/dist/chunk-5YKW2K6I.js +625 -0
  261. package/dist/chunk-5YKW2K6I.js.map +1 -0
  262. package/dist/chunk-6BCXNDEI.js +4116 -0
  263. package/dist/chunk-6BCXNDEI.js.map +1 -0
  264. package/dist/chunk-6DK6Z4UN.js +2599 -0
  265. package/dist/chunk-6DVCC7QS.js +702 -0
  266. package/dist/chunk-6JHU2UBS.js +2058 -0
  267. package/dist/chunk-6PZ7OBYU.js +490 -0
  268. package/dist/chunk-6WD2INST.js +539 -0
  269. package/dist/chunk-6WD2INST.js.map +1 -0
  270. package/dist/chunk-6WGRDRMA.js +163 -0
  271. package/dist/chunk-77WAKEAH.js +186 -0
  272. package/dist/chunk-7T2ZE3VT.js +5558 -0
  273. package/dist/chunk-7T2ZE3VT.js.map +1 -0
  274. package/dist/chunk-7TDO3CUM.js +393 -0
  275. package/dist/chunk-7TIX2UAR.js +247 -0
  276. package/dist/chunk-7V5REBCP.js +148 -0
  277. package/dist/chunk-7VMZGLYI.js +339 -0
  278. package/dist/chunk-7W37NS3I.js +236 -0
  279. package/dist/chunk-7X6SDK2C.js +111 -0
  280. package/dist/chunk-7ZNUHRP5.js +95 -0
  281. package/dist/chunk-A36PZALD.js +84 -0
  282. package/dist/chunk-AUI6VA63.js +107 -0
  283. package/dist/chunk-AW2MQB37.js +24 -0
  284. package/dist/chunk-AWKES45Y.js +198 -0
  285. package/dist/chunk-AXHZYXUV.js +132 -0
  286. package/dist/chunk-BHNSJVBC.js +129 -0
  287. package/dist/chunk-BJEJFISW.js +50 -0
  288. package/dist/chunk-BJFH6JI5.js +422 -0
  289. package/dist/chunk-BMICEQZQ.js +960 -0
  290. package/dist/chunk-BTLBYBLU.js +29 -0
  291. package/dist/chunk-BXBDYNRP.js +89 -0
  292. package/dist/chunk-C372BFOV.js +357 -0
  293. package/dist/chunk-C43KRXGA.js +234 -0
  294. package/dist/chunk-C43KRXGA.js.map +1 -0
  295. package/dist/chunk-CMKGILJK.js +4824 -0
  296. package/dist/chunk-CRAOSVHC.js +50 -0
  297. package/dist/chunk-CRU35QQH.js +281 -0
  298. package/dist/chunk-CUIWCGMA.js +172 -0
  299. package/dist/chunk-D5TWNFFE.js +38 -0
  300. package/dist/chunk-DF5EAHDN.js +4461 -0
  301. package/dist/chunk-DJAXC5OK.js +56 -0
  302. package/dist/chunk-DXBYWSL5.js +3550 -0
  303. package/dist/chunk-DXR5PDFP.js +84 -0
  304. package/dist/chunk-DZWARC4M.js +267 -0
  305. package/dist/chunk-DZXEDSQI.js +106 -0
  306. package/dist/chunk-E7XERZWC.js +48 -0
  307. package/dist/chunk-ECJBYNLJ.js +79 -0
  308. package/dist/chunk-EDI6SJ2N.js +43 -0
  309. package/dist/chunk-EWSOC6WF.js +114 -0
  310. package/dist/chunk-F2OPHAUN.js +103 -0
  311. package/dist/chunk-F4ISQGGM.js +81 -0
  312. package/dist/chunk-FO4LYKJL.js +197 -0
  313. package/dist/chunk-FPXASDG5.js +73 -0
  314. package/dist/chunk-FSOQDUCG.js +117 -0
  315. package/dist/chunk-FSOQDUCG.js.map +1 -0
  316. package/dist/chunk-FVXBNBHO.js +157 -0
  317. package/dist/chunk-FYWT2O76.js +34 -0
  318. package/dist/chunk-FYWT2O76.js.map +1 -0
  319. package/dist/chunk-FZC5N55X.js +981 -0
  320. package/dist/chunk-GAVYGBFI.js +99 -0
  321. package/dist/chunk-GFIMOUDT.js +846 -0
  322. package/dist/chunk-GFIMOUDT.js.map +1 -0
  323. package/dist/chunk-GKVJIDHF.js +33 -0
  324. package/dist/chunk-GVN5SZLX.js +212 -0
  325. package/dist/chunk-H3T7IWNA.js +134 -0
  326. package/dist/chunk-HAX4LCR5.js +261 -0
  327. package/dist/chunk-HC4JFZVU.js +121 -0
  328. package/dist/chunk-HEFPPMBQ.js +581 -0
  329. package/dist/chunk-HGKTHF2U.js +1356 -0
  330. package/dist/chunk-HGKTHF2U.js.map +1 -0
  331. package/dist/chunk-HNLR7Q4Z.js +83 -0
  332. package/dist/chunk-HSOXMJOT.js +12 -0
  333. package/dist/chunk-I4MRDSUF.js +281 -0
  334. package/dist/chunk-I4QEJ62Y.js +202 -0
  335. package/dist/chunk-I5B5L6Q4.js +56 -0
  336. package/dist/chunk-I5QZJODL.js +264 -0
  337. package/dist/chunk-I7ITSXSJ.js +603 -0
  338. package/dist/chunk-I7XIZRFD.js +390 -0
  339. package/dist/chunk-IDANQPRH.js +82 -0
  340. package/dist/chunk-IFB3WJ36.js +212 -0
  341. package/dist/chunk-IHTAKKTK.js +264 -0
  342. package/dist/chunk-IKXNLWAL.js +205 -0
  343. package/dist/chunk-IKXNLWAL.js.map +1 -0
  344. package/dist/chunk-ILDXWY37.js +173 -0
  345. package/dist/chunk-IMDQUHBJ.js +570 -0
  346. package/dist/chunk-IMZCQBOT.js +119 -0
  347. package/dist/chunk-IXPTECSC.js +403 -0
  348. package/dist/chunk-J255A3N5.js +71 -0
  349. package/dist/chunk-J5F5HPPW.js +141 -0
  350. package/dist/chunk-JDTGRRNU.js +5045 -0
  351. package/dist/chunk-JDTGRRNU.js.map +1 -0
  352. package/dist/chunk-JEA3QDX7.js +2469 -0
  353. package/dist/chunk-JEUPAVYY.js +156 -0
  354. package/dist/chunk-JKHKLL5W.js +194 -0
  355. package/dist/chunk-JQL7ZH6C.js +650 -0
  356. package/dist/chunk-JWB44UGJ.js +57 -0
  357. package/dist/chunk-JZ4NLCAP.js +333 -0
  358. package/dist/chunk-K2A5PXQ5.js +412 -0
  359. package/dist/chunk-K56XV3C3.js +623 -0
  360. package/dist/chunk-K6GAXXVA.js +23 -0
  361. package/dist/chunk-KCBMFSMS.js +199 -0
  362. package/dist/chunk-KF2FV3ZJ.js +268 -0
  363. package/dist/chunk-KJD65EJP.js +278 -0
  364. package/dist/chunk-KLEUWIMZ.js +386 -0
  365. package/dist/chunk-KODELWYT.js +309 -0
  366. package/dist/chunk-KRDR5RJD.js +83 -0
  367. package/dist/chunk-KUDGXAF7.js +914 -0
  368. package/dist/chunk-KY2R73CG.js +171 -0
  369. package/dist/chunk-KY2R73CG.js.map +1 -0
  370. package/dist/chunk-KYS77RPN.js +85 -0
  371. package/dist/chunk-L7YTNTIK.js +368 -0
  372. package/dist/chunk-LHPNABDH.js +686 -0
  373. package/dist/chunk-MFROMEKA.js +401 -0
  374. package/dist/chunk-MIHN76LX.js +2656 -0
  375. package/dist/chunk-MIYFS2XN.js +42 -0
  376. package/dist/chunk-MJUCFQMS.js +65 -0
  377. package/dist/chunk-MM4FNWI4.js +3064 -0
  378. package/dist/chunk-MNZG4OHU.js +790 -0
  379. package/dist/chunk-MVW6HNPI.js +250 -0
  380. package/dist/chunk-MVW6HNPI.js.map +1 -0
  381. package/dist/chunk-N6AACDUW.js +200 -0
  382. package/dist/chunk-NC55IFN3.js +781 -0
  383. package/dist/chunk-NC7PVOEK.js +98 -0
  384. package/dist/chunk-NCYMNCJO.js +70 -0
  385. package/dist/chunk-ND2BXV3P.js +259 -0
  386. package/dist/chunk-NDBTFUO6.js +272 -0
  387. package/dist/chunk-NDQJZ7HF.js +206 -0
  388. package/dist/chunk-NGJJJPZZ.js +162 -0
  389. package/dist/chunk-NJTSNNE7.js +251 -0
  390. package/dist/chunk-NPGISCU6.js +4159 -0
  391. package/dist/chunk-NPGISCU6.js.map +1 -0
  392. package/dist/chunk-NRTE7DNV.js +1270 -0
  393. package/dist/chunk-NULUNM7H.js +290 -0
  394. package/dist/chunk-NUNZS36W.js +227 -0
  395. package/dist/chunk-NW53H5RW.js +2424 -0
  396. package/dist/chunk-NXCMHIKI.js +263 -0
  397. package/dist/chunk-O3LKCBP5.js +159 -0
  398. package/dist/chunk-O4EA4F3W.js +103 -0
  399. package/dist/chunk-O4EA4F3W.js.map +1 -0
  400. package/dist/chunk-O4OOG3D6.js +116 -0
  401. package/dist/chunk-O4OOG3D6.js.map +1 -0
  402. package/dist/chunk-O6N4ABCA.js +376 -0
  403. package/dist/chunk-O732GAFC.js +112 -0
  404. package/dist/chunk-OF4TIKYC.js +690 -0
  405. package/dist/chunk-OMPVOMPP.js +70 -0
  406. package/dist/chunk-OPJJSKUK.js +118 -0
  407. package/dist/chunk-OPWCMA4D.js +196 -0
  408. package/dist/chunk-ORJPS5VN.js +1193 -0
  409. package/dist/chunk-OSY5K7L7.js +187 -0
  410. package/dist/chunk-OV6QJRT4.js +45 -0
  411. package/dist/chunk-OVKYVZMW.js +108 -0
  412. package/dist/chunk-OZCBM3UC.js +171 -0
  413. package/dist/chunk-P3A2EINJ.js +61 -0
  414. package/dist/chunk-PTAG4PDC.js +27 -0
  415. package/dist/chunk-PTF5B7TJ.js +298 -0
  416. package/dist/chunk-Q3DPEYX4.js +848 -0
  417. package/dist/chunk-Q6CGOPJD.js +215 -0
  418. package/dist/chunk-Q6CGOPJD.js.map +1 -0
  419. package/dist/chunk-QB2KMIDP.js +100 -0
  420. package/dist/chunk-QCSJ4CWE.js +1067 -0
  421. package/dist/chunk-QIOQ2NPQ.js +414 -0
  422. package/dist/chunk-QK5EFEUT.js +353 -0
  423. package/dist/chunk-QPQBLYQJ.js +41 -0
  424. package/dist/chunk-QPSGCC5D.js +184 -0
  425. package/dist/chunk-QZAAUQRN.js +474 -0
  426. package/dist/chunk-QZM6YDJW.js +489 -0
  427. package/dist/chunk-QZM6YDJW.js.map +1 -0
  428. package/dist/chunk-RGBI63KJ.js +188 -0
  429. package/dist/chunk-RLBKLAEY.js +138 -0
  430. package/dist/chunk-RMFKVOM7.js +304 -0
  431. package/dist/chunk-ROKQU7WG.js +258 -0
  432. package/dist/chunk-RPVREAU7.js +251 -0
  433. package/dist/chunk-RQKLF42C.js +723 -0
  434. package/dist/chunk-SC6RRD2D.js +38 -0
  435. package/dist/chunk-SC6RRD2D.js.map +1 -0
  436. package/dist/chunk-SEO7TICN.js +94 -0
  437. package/dist/chunk-SHHJCL7X.js +432 -0
  438. package/dist/chunk-SIRLACNZ.js +114 -0
  439. package/dist/chunk-SKPHMYAA.js +237 -0
  440. package/dist/chunk-SODC7T6L.js +1583 -0
  441. package/dist/chunk-SQJIKMN3.js +366 -0
  442. package/dist/chunk-SVINDKVW.js +26 -0
  443. package/dist/chunk-SYCDHPZF.js +335 -0
  444. package/dist/chunk-T2QX3FDP.js +133 -0
  445. package/dist/chunk-T3OWFVMS.js +1187 -0
  446. package/dist/chunk-T6XI5FLY.js +61 -0
  447. package/dist/chunk-T7OXJZCX.js +62 -0
  448. package/dist/chunk-TAT5USZN.js +353 -0
  449. package/dist/chunk-TPQTRNER.js +172 -0
  450. package/dist/chunk-TUIN4MB7.js +266 -0
  451. package/dist/chunk-TX3VECZU.js +71 -0
  452. package/dist/chunk-TXLIEOJX.js +9624 -0
  453. package/dist/chunk-U3DN4HEY.js +27 -0
  454. package/dist/chunk-U7XM7CB4.js +191 -0
  455. package/dist/chunk-UJK53QFL.js +140 -0
  456. package/dist/chunk-UMTXA2TH.js +319 -0
  457. package/dist/chunk-UPDSXFK5.js +199 -0
  458. package/dist/chunk-UTIAXH52.js +269 -0
  459. package/dist/chunk-UVN5TMHU.js +1184 -0
  460. package/dist/chunk-V4Z4B2E3.js +52 -0
  461. package/dist/chunk-V4Z4B2E3.js.map +1 -0
  462. package/dist/chunk-VGYXW3VG.js +246 -0
  463. package/dist/chunk-VS7AHPCZ.js +255 -0
  464. package/dist/chunk-VTTAJOQ7.js +121 -0
  465. package/dist/chunk-VWPOLUAO.js +99 -0
  466. package/dist/chunk-X3MWB2QU.js +3851 -0
  467. package/dist/chunk-X6KAJI3V.js +211 -0
  468. package/dist/chunk-XBLRHV5R.js +50 -0
  469. package/dist/chunk-XDFP2LMW.js +605 -0
  470. package/dist/chunk-XEQMZB3C.js +525 -0
  471. package/dist/chunk-XEYLT5VA.js +223 -0
  472. package/dist/chunk-XHIQ5I6N.js +918 -0
  473. package/dist/chunk-XLH7QY2R.js +378 -0
  474. package/dist/chunk-XWFAMUZQ.js +113 -0
  475. package/dist/chunk-Y4BB2KS2.js +294 -0
  476. package/dist/chunk-Y4BB2KS2.js.map +1 -0
  477. package/dist/chunk-Y4OBB2VN.js +84 -0
  478. package/dist/chunk-YCVD6CI3.js +234 -0
  479. package/dist/chunk-YENLNISG.js +270 -0
  480. package/dist/chunk-YIRVLKAX.js +351 -0
  481. package/dist/chunk-YL73CVNK.js +390 -0
  482. package/dist/chunk-YLS6QE5G.js +288 -0
  483. package/dist/chunk-YNF2OC54.js +366 -0
  484. package/dist/chunk-YNF2OC54.js.map +1 -0
  485. package/dist/chunk-YPWU5KPE.js +147 -0
  486. package/dist/chunk-YQXTDZSU.js +2984 -0
  487. package/dist/chunk-YSJEAAOL.js +178 -0
  488. package/dist/chunk-YWIFM7D7.js +499 -0
  489. package/dist/chunk-YWVI6ZMK.js +103 -0
  490. package/dist/chunk-Z4FMAFNH.js +847 -0
  491. package/dist/chunk-Z654FWNU.js +136 -0
  492. package/dist/chunk-Z7Y523PS.js +130 -0
  493. package/dist/chunk-ZD67RM6G.js +60 -0
  494. package/dist/chunk-ZEG4VPBL.js +187 -0
  495. package/dist/chunk-ZHDFQITM.js +283 -0
  496. package/dist/chunk-ZHDFQITM.js.map +1 -0
  497. package/dist/chunk-ZLYCOBHW.js +75 -0
  498. package/dist/chunk-ZNJ5MTXV.js +89 -0
  499. package/dist/chunk-ZSGY3H53.js +155 -0
  500. package/dist/chunk-ZTPXACWB.js +1788 -0
  501. package/dist/chunk-ZUA3JMI6.js +107 -0
  502. package/dist/chunk-ZYAZUPPV.js +559 -0
  503. package/dist/composer.js +8 -8
  504. package/dist/computer-viewer-TDDO25AV.js +21 -0
  505. package/dist/connect.js +12 -12
  506. package/dist/desktop-dictation.js +12 -10
  507. package/dist/desktop-dictation.js.map +1 -1
  508. package/dist/desktop.js +2 -2
  509. package/dist/editor.js +2 -2
  510. package/dist/embedded-new-voice-2G3VLPVQ.js +24 -0
  511. package/dist/embedded-voice-T5IWOWGD.js +24 -0
  512. package/dist/fleet-decision-row-WM64KXP3.js +361 -0
  513. package/dist/in-chat-connect-model.js +5 -5
  514. package/dist/index.js +51 -51
  515. package/dist/interaction.js +5 -5
  516. package/dist/machines.js +3 -3
  517. package/dist/meetings-recorder.js +1 -1
  518. package/dist/meetings.js +40 -32
  519. package/dist/meetings.js.map +1 -1
  520. package/dist/messages/en.d.ts +3 -0
  521. package/dist/messages.js +1 -1
  522. package/dist/model-policy-picker-menu-SMC6J6QN.js +22 -0
  523. package/dist/payment-page-card-G4U63KUV.js +223 -0
  524. package/dist/platform-activity-row-BUZGZAKZ.js +128 -0
  525. package/dist/queue-surface-implementation-4KUZ4PJV.js +908 -0
  526. package/dist/realtime.js +4 -4
  527. package/dist/recorder-host-WF2RRR56.js +69 -0
  528. package/dist/recorder-host-WF2RRR56.js.map +1 -0
  529. package/dist/recordings.js +3 -3
  530. package/dist/sandbox-files-ESDMOFSD.js +27 -0
  531. package/dist/session-app.js +211 -209
  532. package/dist/session-connect-cards-Q53KMMYY.js +25 -0
  533. package/dist/session-list-model.js +2 -2
  534. package/dist/session-realtime-CF3I35WJ.js +30 -0
  535. package/dist/session-realtime.js +2 -2
  536. package/dist/session-ui.js +33 -31
  537. package/dist/session.js +5 -5
  538. package/dist/sites.js +2 -2
  539. package/dist/terminal.js +2 -2
  540. package/dist/this-computer.js +3 -3
  541. package/dist/timeline-annotation-markers-CJK4RYZ4.js +157 -0
  542. package/dist/timeline-annotation-selection-67GF5H26.js +208 -0
  543. package/dist/timeline-annotations-dialog-ONJPQDJQ.js +283 -0
  544. package/dist/ui/access-list.js +11 -9
  545. package/dist/ui/access-list.js.map +1 -1
  546. package/dist/ui/api-error.d.ts +6 -3
  547. package/dist/ui/api-error.js +2 -1
  548. package/dist/ui/cadence-picker.js +6 -4
  549. package/dist/ui/choice-cards.js +5 -3
  550. package/dist/ui/confirm-dialog.js +2 -2
  551. package/dist/ui/copy-field.js +5 -3
  552. package/dist/ui/detail-page.js +2 -2
  553. package/dist/ui/detail-sheet.js +2 -2
  554. package/dist/ui/diff-view.js +4 -3
  555. package/dist/ui/disclosure.js +3 -3
  556. package/dist/ui/email-chips-input.js +5 -3
  557. package/dist/ui/error-message.js +2 -1
  558. package/dist/ui/error-reference.d.ts +15 -0
  559. package/dist/ui/error-text.d.ts +10 -0
  560. package/dist/ui/error-text.js +9 -0
  561. package/dist/ui/error-text.js.map +1 -0
  562. package/dist/ui/field.js +4 -2
  563. package/dist/ui/flush-form-page.js +8 -6
  564. package/dist/ui/form-dialog.js +7 -5
  565. package/dist/ui/list-row.js +3 -3
  566. package/dist/ui/load-failure.js +3 -2
  567. package/dist/ui/load-failure.js.map +1 -1
  568. package/dist/ui/notice.js +3 -1
  569. package/dist/ui/relative-time.js +2 -2
  570. package/dist/ui/revision-history.js +9 -7
  571. package/dist/ui/revision-history.js.map +1 -1
  572. package/dist/ui/role-select.js +10 -8
  573. package/dist/ui/segmented-control.js +4 -2
  574. package/dist/ui/select-menu.js +5 -3
  575. package/dist/ui/setting-row.js +3 -1
  576. package/dist/ui/switch.js +4 -2
  577. package/dist/ui/usage-meter.js +3 -3
  578. package/dist/ui/word-list-row.js +4 -2
  579. package/dist/usage.js +2 -2
  580. package/dist/workbench.js +4 -4
  581. package/package.json +5 -6
  582. package/src/app/app-state.tsx +126 -14
  583. package/src/app/components/artifacts/site-data.tsx +2 -2
  584. package/src/app/components/artifacts/site-settings.tsx +2 -2
  585. package/src/app/components/rail/session-list.tsx +7 -8
  586. package/src/app/components/rail/session-shell.tsx +3 -3
  587. package/src/app/components/repository-picker.tsx +8 -1
  588. package/src/app/components/session/model-context-inspector.tsx +2 -1
  589. package/src/app/components/session/session-admin-access.tsx +2 -2
  590. package/src/app/lib/actions/chat-operations.ts +4 -4
  591. package/src/app/lib/archive-session.test.tsx +265 -2
  592. package/src/app/lib/archive-session.tsx +175 -9
  593. package/src/app/lib/copy-link.ts +2 -2
  594. package/src/app/lib/inbox.tsx +2 -2
  595. package/src/app/lib/session-failure-toasts.ts +3 -2
  596. package/src/app/lib/toast.test.tsx +215 -0
  597. package/src/app/lib/toast.tsx +67 -2
  598. package/src/app/personal-github-reconnect.test.tsx +356 -0
  599. package/src/app/routes/artifacts.tsx +1 -2
  600. package/src/components/tool-action-review.tsx +14 -1
  601. package/src/meetings/delete-meeting-dialog.tsx +2 -1
  602. package/src/meetings/meeting-ask.tsx +2 -1
  603. package/src/meetings/meeting-detail-page.tsx +2 -1
  604. package/src/meetings/meeting-notes.tsx +2 -1
  605. package/src/meetings/meeting-settings.tsx +4 -1
  606. package/src/meetings/meeting-transcript.tsx +4 -1
  607. package/src/meetings/recorder-context.tsx +10 -0
  608. package/src/meetings/recorder-host.test.tsx +60 -2
  609. package/src/meetings/recorder-host.tsx +16 -3
  610. package/src/meetings/recorder-panel.tsx +2 -1
  611. package/src/meetings/recorder-workspace.test.tsx +26 -1
  612. package/src/messages/en.ts +6 -0
  613. package/src/ui/api-error.test.ts +29 -5
  614. package/src/ui/api-error.tsx +10 -4
  615. package/src/ui/error-message.tsx +8 -0
  616. package/src/ui/error-reference.test.ts +54 -0
  617. package/src/ui/error-reference.ts +51 -0
  618. package/src/ui/error-text.test.tsx +66 -0
  619. package/src/ui/error-text.tsx +49 -0
  620. package/src/ui/field.tsx +4 -1
  621. package/src/ui/notice.tsx +7 -2
  622. package/src/ui/setting-row.tsx +4 -1
  623. package/styles/app.css +12 -0
  624. package/styles/compiled.css +9 -0
  625. package/dist/browser-viewer-NOP5EAUO.js +0 -23
  626. package/dist/chat-interactive-block-G7O44JHR.js +0 -18
  627. package/dist/chunk-26RWVLRD.js +0 -135
  628. package/dist/chunk-2AHTY7OT.js +0 -247
  629. package/dist/chunk-2GDNWKSC.js +0 -3670
  630. package/dist/chunk-2JENKGCE.js +0 -339
  631. package/dist/chunk-2KYQC4T5.js +0 -155
  632. package/dist/chunk-2RREGDQH.js +0 -708
  633. package/dist/chunk-2T7DX6KR.js +0 -353
  634. package/dist/chunk-2VB2O4FQ.js +0 -920
  635. package/dist/chunk-2VTTKH23.js +0 -94
  636. package/dist/chunk-2XNG2KNT.js +0 -172
  637. package/dist/chunk-2YC6JQRO.js +0 -399
  638. package/dist/chunk-2ZVRJRXC.js +0 -27
  639. package/dist/chunk-35737UT4.js +0 -162
  640. package/dist/chunk-366XZ4PM.js +0 -41
  641. package/dist/chunk-36MIDGAH.js +0 -199
  642. package/dist/chunk-3FD76LXM.js +0 -212
  643. package/dist/chunk-3OVIXY4O.js +0 -213
  644. package/dist/chunk-3OVIXY4O.js.map +0 -1
  645. package/dist/chunk-3QNRBEYH.js +0 -432
  646. package/dist/chunk-3QX55WLC.js +0 -15
  647. package/dist/chunk-3USJPT2S.js +0 -1022
  648. package/dist/chunk-42CMQ5VR.js +0 -251
  649. package/dist/chunk-4LPOWQJY.js +0 -42
  650. package/dist/chunk-4NBTZRKT.js +0 -79
  651. package/dist/chunk-4OXI6HCV.js +0 -118
  652. package/dist/chunk-4SZZAFYQ.js +0 -2317
  653. package/dist/chunk-4TQL3WP2.js +0 -140
  654. package/dist/chunk-4Y6BK7IU.js +0 -196
  655. package/dist/chunk-4YD7YZC5.js +0 -373
  656. package/dist/chunk-5DTST3TP.js +0 -81
  657. package/dist/chunk-5FH5LQVS.js +0 -130
  658. package/dist/chunk-5KWMYPJV.js +0 -847
  659. package/dist/chunk-5MUJDC6C.js +0 -84
  660. package/dist/chunk-5QM2WPKV.js +0 -41
  661. package/dist/chunk-5WUN7XPD.js +0 -1184
  662. package/dist/chunk-64PO2WXU.js +0 -1067
  663. package/dist/chunk-6AHATAAY.js +0 -431
  664. package/dist/chunk-6ED2YWBT.js +0 -56
  665. package/dist/chunk-6GXVYAGR.js +0 -170
  666. package/dist/chunk-6H4SJBPE.js +0 -85
  667. package/dist/chunk-6MT3HHUB.js +0 -84
  668. package/dist/chunk-6UHCBH4G.js +0 -198
  669. package/dist/chunk-6WLX3NR3.js +0 -198
  670. package/dist/chunk-73NXYYWE.js +0 -112
  671. package/dist/chunk-76ERNKIZ.js +0 -603
  672. package/dist/chunk-776QZ573.js +0 -57
  673. package/dist/chunk-7BYWOFVH.js +0 -171
  674. package/dist/chunk-7O5CGGIQ.js +0 -108
  675. package/dist/chunk-7QOHRZ67.js +0 -251
  676. package/dist/chunk-7WIDB4PL.js +0 -2058
  677. package/dist/chunk-7WKP3DYJ.js +0 -37
  678. package/dist/chunk-7XOVTPDI.js +0 -227
  679. package/dist/chunk-AB5MBIXY.js +0 -281
  680. package/dist/chunk-ADNMXBCX.js +0 -1193
  681. package/dist/chunk-AFBJTUFK.js +0 -202
  682. package/dist/chunk-ALVRWCXE.js +0 -61
  683. package/dist/chunk-AOHU6O3M.js +0 -247
  684. package/dist/chunk-AOHU6O3M.js.map +0 -1
  685. package/dist/chunk-APW4T4SW.js +0 -270
  686. package/dist/chunk-AXBSYWKX.js +0 -2656
  687. package/dist/chunk-B2I5ZW35.js +0 -422
  688. package/dist/chunk-B3LMRTRF.js +0 -223
  689. package/dist/chunk-BE2XENG2.js +0 -292
  690. package/dist/chunk-BE2XENG2.js.map +0 -1
  691. package/dist/chunk-BF4SADKX.js +0 -29
  692. package/dist/chunk-BKP43KK4.js +0 -1788
  693. package/dist/chunk-BM3NEZ6X.js +0 -781
  694. package/dist/chunk-BT3BAGB5.js +0 -216
  695. package/dist/chunk-BTSYDIVJ.js +0 -357
  696. package/dist/chunk-BUBNGKWG.js +0 -70
  697. package/dist/chunk-BVUJV5WR.js +0 -126
  698. package/dist/chunk-BZO5ZMUP.js +0 -27
  699. package/dist/chunk-C3HUF3M2.js +0 -157
  700. package/dist/chunk-C5QCAOES.js +0 -264
  701. package/dist/chunk-CGK6ALQU.js +0 -159
  702. package/dist/chunk-CPYGO76Q.js +0 -335
  703. package/dist/chunk-CQH4FWYA.js +0 -490
  704. package/dist/chunk-CZP5QXNB.js +0 -234
  705. package/dist/chunk-D2TOWEYH.js +0 -266
  706. package/dist/chunk-D6L4GHRH.js +0 -340
  707. package/dist/chunk-DKT3N37I.js +0 -50
  708. package/dist/chunk-DMMJIFKA.js +0 -84
  709. package/dist/chunk-DO74DQC7.js +0 -26
  710. package/dist/chunk-DOFJZ2JU.js +0 -83
  711. package/dist/chunk-DSXVY5WZ.js +0 -119
  712. package/dist/chunk-E337C2VK.js +0 -82
  713. package/dist/chunk-E6NRSRBE.js +0 -114
  714. package/dist/chunk-E6SQKHAU.js +0 -114
  715. package/dist/chunk-E7UIVD7F.js +0 -236
  716. package/dist/chunk-EGBII4CP.js +0 -229
  717. package/dist/chunk-EILSAQVJ.js +0 -200
  718. package/dist/chunk-ELL6HSYR.js +0 -307
  719. package/dist/chunk-EUBGLFFR.js +0 -73
  720. package/dist/chunk-EW6RNWSH.js +0 -212
  721. package/dist/chunk-EYUT5Y6V.js +0 -2599
  722. package/dist/chunk-F7U3QPZ3.js +0 -304
  723. package/dist/chunk-FBTJKSTM.js +0 -1270
  724. package/dist/chunk-FC2FTSK3.js +0 -2424
  725. package/dist/chunk-FOGNA3BU.js +0 -148
  726. package/dist/chunk-FQFKHNC7.js +0 -650
  727. package/dist/chunk-FTCHM755.js +0 -50
  728. package/dist/chunk-FXSHP4JZ.js +0 -3550
  729. package/dist/chunk-G6ZZC543.js +0 -818
  730. package/dist/chunk-G7FU6PUA.js +0 -100
  731. package/dist/chunk-GA4YEAMX.js +0 -3851
  732. package/dist/chunk-GE33BGB7.js +0 -12
  733. package/dist/chunk-GQ67HSJY.js +0 -570
  734. package/dist/chunk-GXXZ3WAK.js +0 -106
  735. package/dist/chunk-H2TCRX3H.js +0 -237
  736. package/dist/chunk-HLL4PBO7.js +0 -60
  737. package/dist/chunk-HLOEPV5C.js +0 -259
  738. package/dist/chunk-HUAGBS4O.js +0 -56
  739. package/dist/chunk-I36GSRUJ.js +0 -211
  740. package/dist/chunk-I6VBHT7S.js +0 -261
  741. package/dist/chunk-ICNNNOXE.js +0 -333
  742. package/dist/chunk-ICX64J4U.js +0 -172
  743. package/dist/chunk-ID36Y46W.js +0 -5046
  744. package/dist/chunk-ID36Y46W.js.map +0 -1
  745. package/dist/chunk-IGVVXLKJ.js +0 -559
  746. package/dist/chunk-IKJLSBUI.js +0 -2984
  747. package/dist/chunk-IKMUFDVS.js +0 -50
  748. package/dist/chunk-IKUNOX7F.js +0 -255
  749. package/dist/chunk-ILKDYBON.js +0 -288
  750. package/dist/chunk-IVYJX3OY.js +0 -187
  751. package/dist/chunk-JCY4CMDH.js +0 -107
  752. package/dist/chunk-JJZPLGIP.js +0 -474
  753. package/dist/chunk-JW33RV4V.js +0 -143
  754. package/dist/chunk-JWPA6ZPZ.js +0 -351
  755. package/dist/chunk-JZ4QXS6D.js +0 -50
  756. package/dist/chunk-K42OUZQ3.js +0 -386
  757. package/dist/chunk-K5TOVX5A.js +0 -206
  758. package/dist/chunk-K63HGHZX.js +0 -99
  759. package/dist/chunk-K6R5T44I.js +0 -75
  760. package/dist/chunk-KHJ5PXFM.js +0 -914
  761. package/dist/chunk-KJZRQ55O.js +0 -2319
  762. package/dist/chunk-KJZRQ55O.js.map +0 -1
  763. package/dist/chunk-KKI55ZMW.js +0 -65
  764. package/dist/chunk-KRPLAAFP.js +0 -199
  765. package/dist/chunk-KVFEZDBO.js +0 -134
  766. package/dist/chunk-L4I665WK.js +0 -45
  767. package/dist/chunk-L4OF77LE.js +0 -110
  768. package/dist/chunk-L4OF77LE.js.map +0 -1
  769. package/dist/chunk-LA5T52RM.js +0 -70
  770. package/dist/chunk-LM2W5YAT.js +0 -401
  771. package/dist/chunk-LQ62ECE6.js +0 -390
  772. package/dist/chunk-LQDUHU3Y.js +0 -71
  773. package/dist/chunk-LRJIYTZW.js +0 -4157
  774. package/dist/chunk-LRJIYTZW.js.map +0 -1
  775. package/dist/chunk-LRN6GYAZ.js +0 -138
  776. package/dist/chunk-M4SDVTKJ.js +0 -790
  777. package/dist/chunk-MA6O7CM6.js +0 -99
  778. package/dist/chunk-MBIBB6GI.js +0 -197
  779. package/dist/chunk-MF3ZFB4H.js +0 -199
  780. package/dist/chunk-MJJGJMYJ.js +0 -98
  781. package/dist/chunk-MLJADQFI.js +0 -4824
  782. package/dist/chunk-MQG7RV3B.js +0 -62
  783. package/dist/chunk-MTTGSQA5.js +0 -186
  784. package/dist/chunk-MW7Y3T55.js +0 -525
  785. package/dist/chunk-MYUFMVCH.js +0 -121
  786. package/dist/chunk-N3OARGH2.js +0 -61
  787. package/dist/chunk-NB2HMRT2.js +0 -353
  788. package/dist/chunk-NFDFYWMV.js +0 -141
  789. package/dist/chunk-NWGNFN3N.js +0 -1187
  790. package/dist/chunk-NWJRPDIO.js +0 -840
  791. package/dist/chunk-NWJRPDIO.js.map +0 -1
  792. package/dist/chunk-NXWBBZJV.js +0 -267
  793. package/dist/chunk-NY2QWROL.js +0 -71
  794. package/dist/chunk-O2IOPP3R.js +0 -848
  795. package/dist/chunk-O2UWH5RG.js +0 -141
  796. package/dist/chunk-O5YWDLYF.js +0 -393
  797. package/dist/chunk-OBMCZO7E.js +0 -121
  798. package/dist/chunk-OD3DCCCB.js +0 -132
  799. package/dist/chunk-OMH7R6I3.js +0 -390
  800. package/dist/chunk-OSA5EQG5.js +0 -113
  801. package/dist/chunk-OSJ3MUTZ.js +0 -2936
  802. package/dist/chunk-OWAYJ2OV.js +0 -368
  803. package/dist/chunk-OYXBFSGK.js +0 -269
  804. package/dist/chunk-PC2EBA5G.js +0 -4116
  805. package/dist/chunk-PC2EBA5G.js.map +0 -1
  806. package/dist/chunk-PC2MVXIP.js +0 -363
  807. package/dist/chunk-PC2MVXIP.js.map +0 -1
  808. package/dist/chunk-PENGLDR5.js +0 -309
  809. package/dist/chunk-PSMAWRPL.js +0 -191
  810. package/dist/chunk-PW4IMTYR.js +0 -702
  811. package/dist/chunk-PW54V7T5.js +0 -387
  812. package/dist/chunk-Q2EXYSMO.js +0 -24
  813. package/dist/chunk-Q2XJK5I4.js +0 -51
  814. package/dist/chunk-Q2XJK5I4.js.map +0 -1
  815. package/dist/chunk-Q4EFRI6X.js +0 -258
  816. package/dist/chunk-Q52CXW6C.js +0 -48
  817. package/dist/chunk-Q6XQ2R37.js +0 -184
  818. package/dist/chunk-QAJ53XBW.js +0 -23
  819. package/dist/chunk-QDTKECT4.js +0 -129
  820. package/dist/chunk-QE3ZFGI3.js +0 -43
  821. package/dist/chunk-QHHSUR2Y.js +0 -298
  822. package/dist/chunk-QHNVNR7B.js +0 -173
  823. package/dist/chunk-QIK2Q6N5.js +0 -376
  824. package/dist/chunk-QWL4L366.js +0 -38
  825. package/dist/chunk-R3J2PTVQ.js +0 -690
  826. package/dist/chunk-RBRX5ZS3.js +0 -319
  827. package/dist/chunk-REX6JIC7.js +0 -33
  828. package/dist/chunk-RGZ7EEC3.js +0 -537
  829. package/dist/chunk-RGZ7EEC3.js.map +0 -1
  830. package/dist/chunk-RIPS7GFR.js +0 -960
  831. package/dist/chunk-RTBZNFNV.js +0 -1354
  832. package/dist/chunk-RTBZNFNV.js.map +0 -1
  833. package/dist/chunk-SKMNW4SW.js +0 -187
  834. package/dist/chunk-SRFARKXC.js +0 -623
  835. package/dist/chunk-SWIHWCTW.js +0 -4461
  836. package/dist/chunk-TA5CFTO4.js +0 -103
  837. package/dist/chunk-TF4ZVJLI.js +0 -156
  838. package/dist/chunk-TG7DADJR.js +0 -9624
  839. package/dist/chunk-TI4R2ZD5.js +0 -623
  840. package/dist/chunk-TI4R2ZD5.js.map +0 -1
  841. package/dist/chunk-TNKWOUWP.js +0 -412
  842. package/dist/chunk-TNUSPXPW.js +0 -5555
  843. package/dist/chunk-TNUSPXPW.js.map +0 -1
  844. package/dist/chunk-TNYFHKVV.js +0 -366
  845. package/dist/chunk-TPMZBOFH.js +0 -178
  846. package/dist/chunk-TW3LKRJF.js +0 -263
  847. package/dist/chunk-TZAO65I4.js +0 -83
  848. package/dist/chunk-U5EFEMYU.js +0 -89
  849. package/dist/chunk-U6M4LS3M.js +0 -378
  850. package/dist/chunk-UI4HI5QK.js +0 -918
  851. package/dist/chunk-UJDOWCQ3.js +0 -272
  852. package/dist/chunk-UJUQ2QOX.js +0 -581
  853. package/dist/chunk-UQ3IM6FY.js +0 -133
  854. package/dist/chunk-UYE47LO6.js +0 -246
  855. package/dist/chunk-VADHIT26.js +0 -89
  856. package/dist/chunk-VFQ3H6CO.js +0 -163
  857. package/dist/chunk-VGUN6VB2.js +0 -188
  858. package/dist/chunk-VGWWEVSD.js +0 -723
  859. package/dist/chunk-VIEFJ2DM.js +0 -2469
  860. package/dist/chunk-VLXM36VS.js +0 -268
  861. package/dist/chunk-W3BFRR2G.js +0 -499
  862. package/dist/chunk-W5MPXR3A.js +0 -981
  863. package/dist/chunk-W5OWKVZG.js +0 -136
  864. package/dist/chunk-W6FRORMX.js +0 -486
  865. package/dist/chunk-W6FRORMX.js.map +0 -1
  866. package/dist/chunk-W7XROSZO.js +0 -232
  867. package/dist/chunk-W7XROSZO.js.map +0 -1
  868. package/dist/chunk-WEZ5PXZP.js +0 -403
  869. package/dist/chunk-WHWUWN2X.js +0 -197
  870. package/dist/chunk-WHWUWN2X.js.map +0 -1
  871. package/dist/chunk-WLEDGIVS.js +0 -114
  872. package/dist/chunk-WLEDGIVS.js.map +0 -1
  873. package/dist/chunk-WNDAKLHG.js +0 -281
  874. package/dist/chunk-WTJ4PLMU.js +0 -103
  875. package/dist/chunk-WV2KPJUW.js +0 -107
  876. package/dist/chunk-X3VY5EGY.js +0 -277
  877. package/dist/chunk-X3VY5EGY.js.map +0 -1
  878. package/dist/chunk-XDBYWVCW.js +0 -418
  879. package/dist/chunk-XF7MA4U5.js +0 -36
  880. package/dist/chunk-XF7MA4U5.js.map +0 -1
  881. package/dist/chunk-XOSQP3YA.js +0 -605
  882. package/dist/chunk-XYBV4ZJQ.js +0 -271
  883. package/dist/chunk-YBKVGLQR.js +0 -147
  884. package/dist/chunk-YDCUBUWH.js +0 -1583
  885. package/dist/chunk-YG6NARQY.js +0 -51
  886. package/dist/chunk-YG6NARQY.js.map +0 -1
  887. package/dist/chunk-YSVD5HI4.js +0 -278
  888. package/dist/chunk-YT3WGNG6.js +0 -290
  889. package/dist/chunk-YYICQDK4.js +0 -414
  890. package/dist/chunk-YYLMZLI6.js +0 -686
  891. package/dist/chunk-ZAMTKG5U.js +0 -95
  892. package/dist/chunk-ZDLYSXKN.js +0 -111
  893. package/dist/chunk-ZG447FSS.js +0 -194
  894. package/dist/chunk-ZIT5KD4Q.js +0 -264
  895. package/dist/chunk-ZUDOVDKR.js +0 -3064
  896. package/dist/chunk-ZW2ECJ3A.js +0 -451
  897. package/dist/computer-viewer-LPZ763KF.js +0 -21
  898. package/dist/embedded-new-voice-YVMKSLKJ.js +0 -24
  899. package/dist/embedded-voice-BJPQFXSU.js +0 -24
  900. package/dist/fleet-decision-row-AA4H5CDT.js +0 -361
  901. package/dist/model-policy-picker-menu-HSMWVO4P.js +0 -22
  902. package/dist/payment-page-card-3LTSFJGN.js +0 -223
  903. package/dist/platform-activity-row-5VYV6TX4.js +0 -128
  904. package/dist/queue-surface-implementation-NXHZUKD2.js +0 -908
  905. package/dist/recorder-host-ZKRWTDBM.js +0 -57
  906. package/dist/recorder-host-ZKRWTDBM.js.map +0 -1
  907. package/dist/sandbox-files-YCMLQUFU.js +0 -27
  908. package/dist/session-connect-cards-KSQLMRM5.js +0 -25
  909. package/dist/session-realtime-ZR6JLG3Y.js +0 -30
  910. package/dist/timeline-annotation-markers-YAHDPWVG.js +0 -157
  911. package/dist/timeline-annotation-selection-KHXNCEJP.js +0 -208
  912. package/dist/timeline-annotations-dialog-Y4XD3N7B.js +0 -283
  913. /package/dist/{browser-viewer-NOP5EAUO.js.map → browser-viewer-TC27OCIP.js.map} +0 -0
  914. /package/dist/{chat-interactive-block-G7O44JHR.js.map → chat-interactive-block-RWPQBHVS.js.map} +0 -0
  915. /package/dist/{chunk-EGBII4CP.js.map → chunk-2BDT3UZQ.js.map} +0 -0
  916. /package/dist/{chunk-4YD7YZC5.js.map → chunk-2CLNIEK4.js.map} +0 -0
  917. /package/dist/{chunk-ZW2ECJ3A.js.map → chunk-2FSBSCZJ.js.map} +0 -0
  918. /package/dist/{chunk-KRPLAAFP.js.map → chunk-2I7HDP53.js.map} +0 -0
  919. /package/dist/{chunk-3QX55WLC.js.map → chunk-2INLDVK3.js.map} +0 -0
  920. /package/dist/{chunk-BVUJV5WR.js.map → chunk-2KALVELR.js.map} +0 -0
  921. /package/dist/{chunk-XDBYWVCW.js.map → chunk-2M3J7ZWQ.js.map} +0 -0
  922. /package/dist/{chunk-2RREGDQH.js.map → chunk-2OP6WLGV.js.map} +0 -0
  923. /package/dist/{chunk-OSJ3MUTZ.js.map → chunk-2RG7NIAS.js.map} +0 -0
  924. /package/dist/{chunk-26RWVLRD.js.map → chunk-2STUPWEL.js.map} +0 -0
  925. /package/dist/{chunk-XYBV4ZJQ.js.map → chunk-2YUOVM3G.js.map} +0 -0
  926. /package/dist/{chunk-2GDNWKSC.js.map → chunk-2Z3NQNTM.js.map} +0 -0
  927. /package/dist/{chunk-2VB2O4FQ.js.map → chunk-3CPWWGNK.js.map} +0 -0
  928. /package/dist/{chunk-7WKP3DYJ.js.map → chunk-3ED2U6XE.js.map} +0 -0
  929. /package/dist/{chunk-BT3BAGB5.js.map → chunk-3GZA4BUW.js.map} +0 -0
  930. /package/dist/{chunk-3USJPT2S.js.map → chunk-3IK6UYO6.js.map} +0 -0
  931. /package/dist/{chunk-6AHATAAY.js.map → chunk-3PZ7JZI2.js.map} +0 -0
  932. /package/dist/{chunk-JZ4QXS6D.js.map → chunk-4DVJ6ONS.js.map} +0 -0
  933. /package/dist/{chunk-5QM2WPKV.js.map → chunk-4E3ZJRTZ.js.map} +0 -0
  934. /package/dist/{chunk-NFDFYWMV.js.map → chunk-4SAWSRAA.js.map} +0 -0
  935. /package/dist/{chunk-ELL6HSYR.js.map → chunk-53AGXXZM.js.map} +0 -0
  936. /package/dist/{chunk-G6ZZC543.js.map → chunk-54YW6SZZ.js.map} +0 -0
  937. /package/dist/{chunk-4SZZAFYQ.js.map → chunk-57AZS3IE.js.map} +0 -0
  938. /package/dist/{chunk-JW33RV4V.js.map → chunk-5CPEEAFD.js.map} +0 -0
  939. /package/dist/{chunk-D6L4GHRH.js.map → chunk-5EWSRZ2Y.js.map} +0 -0
  940. /package/dist/{chunk-PW54V7T5.js.map → chunk-5IE76VCY.js.map} +0 -0
  941. /package/dist/{chunk-6GXVYAGR.js.map → chunk-5NWEKLDZ.js.map} +0 -0
  942. /package/dist/{chunk-6UHCBH4G.js.map → chunk-5O2FCCHZ.js.map} +0 -0
  943. /package/dist/{chunk-2YC6JQRO.js.map → chunk-5QAY6K77.js.map} +0 -0
  944. /package/dist/{chunk-EYUT5Y6V.js.map → chunk-6DK6Z4UN.js.map} +0 -0
  945. /package/dist/{chunk-PW4IMTYR.js.map → chunk-6DVCC7QS.js.map} +0 -0
  946. /package/dist/{chunk-7WIDB4PL.js.map → chunk-6JHU2UBS.js.map} +0 -0
  947. /package/dist/{chunk-CQH4FWYA.js.map → chunk-6PZ7OBYU.js.map} +0 -0
  948. /package/dist/{chunk-VFQ3H6CO.js.map → chunk-6WGRDRMA.js.map} +0 -0
  949. /package/dist/{chunk-MTTGSQA5.js.map → chunk-77WAKEAH.js.map} +0 -0
  950. /package/dist/{chunk-O5YWDLYF.js.map → chunk-7TDO3CUM.js.map} +0 -0
  951. /package/dist/{chunk-2AHTY7OT.js.map → chunk-7TIX2UAR.js.map} +0 -0
  952. /package/dist/{chunk-FOGNA3BU.js.map → chunk-7V5REBCP.js.map} +0 -0
  953. /package/dist/{chunk-2JENKGCE.js.map → chunk-7VMZGLYI.js.map} +0 -0
  954. /package/dist/{chunk-E7UIVD7F.js.map → chunk-7W37NS3I.js.map} +0 -0
  955. /package/dist/{chunk-ZDLYSXKN.js.map → chunk-7X6SDK2C.js.map} +0 -0
  956. /package/dist/{chunk-ZAMTKG5U.js.map → chunk-7ZNUHRP5.js.map} +0 -0
  957. /package/dist/{chunk-DMMJIFKA.js.map → chunk-A36PZALD.js.map} +0 -0
  958. /package/dist/{chunk-WV2KPJUW.js.map → chunk-AUI6VA63.js.map} +0 -0
  959. /package/dist/{chunk-Q2EXYSMO.js.map → chunk-AW2MQB37.js.map} +0 -0
  960. /package/dist/{chunk-6WLX3NR3.js.map → chunk-AWKES45Y.js.map} +0 -0
  961. /package/dist/{chunk-OD3DCCCB.js.map → chunk-AXHZYXUV.js.map} +0 -0
  962. /package/dist/{chunk-QDTKECT4.js.map → chunk-BHNSJVBC.js.map} +0 -0
  963. /package/dist/{chunk-FTCHM755.js.map → chunk-BJEJFISW.js.map} +0 -0
  964. /package/dist/{chunk-B2I5ZW35.js.map → chunk-BJFH6JI5.js.map} +0 -0
  965. /package/dist/{chunk-RIPS7GFR.js.map → chunk-BMICEQZQ.js.map} +0 -0
  966. /package/dist/{chunk-BF4SADKX.js.map → chunk-BTLBYBLU.js.map} +0 -0
  967. /package/dist/{chunk-U5EFEMYU.js.map → chunk-BXBDYNRP.js.map} +0 -0
  968. /package/dist/{chunk-BTSYDIVJ.js.map → chunk-C372BFOV.js.map} +0 -0
  969. /package/dist/{chunk-MLJADQFI.js.map → chunk-CMKGILJK.js.map} +0 -0
  970. /package/dist/{chunk-DKT3N37I.js.map → chunk-CRAOSVHC.js.map} +0 -0
  971. /package/dist/{chunk-WNDAKLHG.js.map → chunk-CRU35QQH.js.map} +0 -0
  972. /package/dist/{chunk-2XNG2KNT.js.map → chunk-CUIWCGMA.js.map} +0 -0
  973. /package/dist/{chunk-QWL4L366.js.map → chunk-D5TWNFFE.js.map} +0 -0
  974. /package/dist/{chunk-SWIHWCTW.js.map → chunk-DF5EAHDN.js.map} +0 -0
  975. /package/dist/{chunk-HUAGBS4O.js.map → chunk-DJAXC5OK.js.map} +0 -0
  976. /package/dist/{chunk-FXSHP4JZ.js.map → chunk-DXBYWSL5.js.map} +0 -0
  977. /package/dist/{chunk-5MUJDC6C.js.map → chunk-DXR5PDFP.js.map} +0 -0
  978. /package/dist/{chunk-NXWBBZJV.js.map → chunk-DZWARC4M.js.map} +0 -0
  979. /package/dist/{chunk-GXXZ3WAK.js.map → chunk-DZXEDSQI.js.map} +0 -0
  980. /package/dist/{chunk-Q52CXW6C.js.map → chunk-E7XERZWC.js.map} +0 -0
  981. /package/dist/{chunk-4NBTZRKT.js.map → chunk-ECJBYNLJ.js.map} +0 -0
  982. /package/dist/{chunk-QE3ZFGI3.js.map → chunk-EDI6SJ2N.js.map} +0 -0
  983. /package/dist/{chunk-E6NRSRBE.js.map → chunk-EWSOC6WF.js.map} +0 -0
  984. /package/dist/{chunk-TA5CFTO4.js.map → chunk-F2OPHAUN.js.map} +0 -0
  985. /package/dist/{chunk-5DTST3TP.js.map → chunk-F4ISQGGM.js.map} +0 -0
  986. /package/dist/{chunk-MBIBB6GI.js.map → chunk-FO4LYKJL.js.map} +0 -0
  987. /package/dist/{chunk-EUBGLFFR.js.map → chunk-FPXASDG5.js.map} +0 -0
  988. /package/dist/{chunk-C3HUF3M2.js.map → chunk-FVXBNBHO.js.map} +0 -0
  989. /package/dist/{chunk-W5MPXR3A.js.map → chunk-FZC5N55X.js.map} +0 -0
  990. /package/dist/{chunk-MA6O7CM6.js.map → chunk-GAVYGBFI.js.map} +0 -0
  991. /package/dist/{chunk-REX6JIC7.js.map → chunk-GKVJIDHF.js.map} +0 -0
  992. /package/dist/{chunk-EW6RNWSH.js.map → chunk-GVN5SZLX.js.map} +0 -0
  993. /package/dist/{chunk-KVFEZDBO.js.map → chunk-H3T7IWNA.js.map} +0 -0
  994. /package/dist/{chunk-I6VBHT7S.js.map → chunk-HAX4LCR5.js.map} +0 -0
  995. /package/dist/{chunk-OBMCZO7E.js.map → chunk-HC4JFZVU.js.map} +0 -0
  996. /package/dist/{chunk-UJUQ2QOX.js.map → chunk-HEFPPMBQ.js.map} +0 -0
  997. /package/dist/{chunk-DOFJZ2JU.js.map → chunk-HNLR7Q4Z.js.map} +0 -0
  998. /package/dist/{chunk-GE33BGB7.js.map → chunk-HSOXMJOT.js.map} +0 -0
  999. /package/dist/{chunk-AB5MBIXY.js.map → chunk-I4MRDSUF.js.map} +0 -0
  1000. /package/dist/{chunk-AFBJTUFK.js.map → chunk-I4QEJ62Y.js.map} +0 -0
  1001. /package/dist/{chunk-6ED2YWBT.js.map → chunk-I5B5L6Q4.js.map} +0 -0
  1002. /package/dist/{chunk-C5QCAOES.js.map → chunk-I5QZJODL.js.map} +0 -0
  1003. /package/dist/{chunk-76ERNKIZ.js.map → chunk-I7ITSXSJ.js.map} +0 -0
  1004. /package/dist/{chunk-OMH7R6I3.js.map → chunk-I7XIZRFD.js.map} +0 -0
  1005. /package/dist/{chunk-E337C2VK.js.map → chunk-IDANQPRH.js.map} +0 -0
  1006. /package/dist/{chunk-3FD76LXM.js.map → chunk-IFB3WJ36.js.map} +0 -0
  1007. /package/dist/{chunk-ZIT5KD4Q.js.map → chunk-IHTAKKTK.js.map} +0 -0
  1008. /package/dist/{chunk-QHNVNR7B.js.map → chunk-ILDXWY37.js.map} +0 -0
  1009. /package/dist/{chunk-GQ67HSJY.js.map → chunk-IMDQUHBJ.js.map} +0 -0
  1010. /package/dist/{chunk-DSXVY5WZ.js.map → chunk-IMZCQBOT.js.map} +0 -0
  1011. /package/dist/{chunk-WEZ5PXZP.js.map → chunk-IXPTECSC.js.map} +0 -0
  1012. /package/dist/{chunk-NY2QWROL.js.map → chunk-J255A3N5.js.map} +0 -0
  1013. /package/dist/{chunk-O2UWH5RG.js.map → chunk-J5F5HPPW.js.map} +0 -0
  1014. /package/dist/{chunk-VIEFJ2DM.js.map → chunk-JEA3QDX7.js.map} +0 -0
  1015. /package/dist/{chunk-TF4ZVJLI.js.map → chunk-JEUPAVYY.js.map} +0 -0
  1016. /package/dist/{chunk-ZG447FSS.js.map → chunk-JKHKLL5W.js.map} +0 -0
  1017. /package/dist/{chunk-FQFKHNC7.js.map → chunk-JQL7ZH6C.js.map} +0 -0
  1018. /package/dist/{chunk-776QZ573.js.map → chunk-JWB44UGJ.js.map} +0 -0
  1019. /package/dist/{chunk-ICNNNOXE.js.map → chunk-JZ4NLCAP.js.map} +0 -0
  1020. /package/dist/{chunk-TNKWOUWP.js.map → chunk-K2A5PXQ5.js.map} +0 -0
  1021. /package/dist/{chunk-SRFARKXC.js.map → chunk-K56XV3C3.js.map} +0 -0
  1022. /package/dist/{chunk-QAJ53XBW.js.map → chunk-K6GAXXVA.js.map} +0 -0
  1023. /package/dist/{chunk-MF3ZFB4H.js.map → chunk-KCBMFSMS.js.map} +0 -0
  1024. /package/dist/{chunk-VLXM36VS.js.map → chunk-KF2FV3ZJ.js.map} +0 -0
  1025. /package/dist/{chunk-YSVD5HI4.js.map → chunk-KJD65EJP.js.map} +0 -0
  1026. /package/dist/{chunk-K42OUZQ3.js.map → chunk-KLEUWIMZ.js.map} +0 -0
  1027. /package/dist/{chunk-PENGLDR5.js.map → chunk-KODELWYT.js.map} +0 -0
  1028. /package/dist/{chunk-TZAO65I4.js.map → chunk-KRDR5RJD.js.map} +0 -0
  1029. /package/dist/{chunk-KHJ5PXFM.js.map → chunk-KUDGXAF7.js.map} +0 -0
  1030. /package/dist/{chunk-6H4SJBPE.js.map → chunk-KYS77RPN.js.map} +0 -0
  1031. /package/dist/{chunk-OWAYJ2OV.js.map → chunk-L7YTNTIK.js.map} +0 -0
  1032. /package/dist/{chunk-YYLMZLI6.js.map → chunk-LHPNABDH.js.map} +0 -0
  1033. /package/dist/{chunk-LM2W5YAT.js.map → chunk-MFROMEKA.js.map} +0 -0
  1034. /package/dist/{chunk-AXBSYWKX.js.map → chunk-MIHN76LX.js.map} +0 -0
  1035. /package/dist/{chunk-4LPOWQJY.js.map → chunk-MIYFS2XN.js.map} +0 -0
  1036. /package/dist/{chunk-KKI55ZMW.js.map → chunk-MJUCFQMS.js.map} +0 -0
  1037. /package/dist/{chunk-ZUDOVDKR.js.map → chunk-MM4FNWI4.js.map} +0 -0
  1038. /package/dist/{chunk-M4SDVTKJ.js.map → chunk-MNZG4OHU.js.map} +0 -0
  1039. /package/dist/{chunk-EILSAQVJ.js.map → chunk-N6AACDUW.js.map} +0 -0
  1040. /package/dist/{chunk-BM3NEZ6X.js.map → chunk-NC55IFN3.js.map} +0 -0
  1041. /package/dist/{chunk-MJJGJMYJ.js.map → chunk-NC7PVOEK.js.map} +0 -0
  1042. /package/dist/{chunk-LA5T52RM.js.map → chunk-NCYMNCJO.js.map} +0 -0
  1043. /package/dist/{chunk-HLOEPV5C.js.map → chunk-ND2BXV3P.js.map} +0 -0
  1044. /package/dist/{chunk-UJDOWCQ3.js.map → chunk-NDBTFUO6.js.map} +0 -0
  1045. /package/dist/{chunk-K5TOVX5A.js.map → chunk-NDQJZ7HF.js.map} +0 -0
  1046. /package/dist/{chunk-35737UT4.js.map → chunk-NGJJJPZZ.js.map} +0 -0
  1047. /package/dist/{chunk-42CMQ5VR.js.map → chunk-NJTSNNE7.js.map} +0 -0
  1048. /package/dist/{chunk-FBTJKSTM.js.map → chunk-NRTE7DNV.js.map} +0 -0
  1049. /package/dist/{chunk-YT3WGNG6.js.map → chunk-NULUNM7H.js.map} +0 -0
  1050. /package/dist/{chunk-7XOVTPDI.js.map → chunk-NUNZS36W.js.map} +0 -0
  1051. /package/dist/{chunk-FC2FTSK3.js.map → chunk-NW53H5RW.js.map} +0 -0
  1052. /package/dist/{chunk-TW3LKRJF.js.map → chunk-NXCMHIKI.js.map} +0 -0
  1053. /package/dist/{chunk-CGK6ALQU.js.map → chunk-O3LKCBP5.js.map} +0 -0
  1054. /package/dist/{chunk-QIK2Q6N5.js.map → chunk-O6N4ABCA.js.map} +0 -0
  1055. /package/dist/{chunk-73NXYYWE.js.map → chunk-O732GAFC.js.map} +0 -0
  1056. /package/dist/{chunk-R3J2PTVQ.js.map → chunk-OF4TIKYC.js.map} +0 -0
  1057. /package/dist/{chunk-BUBNGKWG.js.map → chunk-OMPVOMPP.js.map} +0 -0
  1058. /package/dist/{chunk-4OXI6HCV.js.map → chunk-OPJJSKUK.js.map} +0 -0
  1059. /package/dist/{chunk-4Y6BK7IU.js.map → chunk-OPWCMA4D.js.map} +0 -0
  1060. /package/dist/{chunk-ADNMXBCX.js.map → chunk-ORJPS5VN.js.map} +0 -0
  1061. /package/dist/{chunk-SKMNW4SW.js.map → chunk-OSY5K7L7.js.map} +0 -0
  1062. /package/dist/{chunk-L4I665WK.js.map → chunk-OV6QJRT4.js.map} +0 -0
  1063. /package/dist/{chunk-7O5CGGIQ.js.map → chunk-OVKYVZMW.js.map} +0 -0
  1064. /package/dist/{chunk-7BYWOFVH.js.map → chunk-OZCBM3UC.js.map} +0 -0
  1065. /package/dist/{chunk-ALVRWCXE.js.map → chunk-P3A2EINJ.js.map} +0 -0
  1066. /package/dist/{chunk-BZO5ZMUP.js.map → chunk-PTAG4PDC.js.map} +0 -0
  1067. /package/dist/{chunk-QHHSUR2Y.js.map → chunk-PTF5B7TJ.js.map} +0 -0
  1068. /package/dist/{chunk-O2IOPP3R.js.map → chunk-Q3DPEYX4.js.map} +0 -0
  1069. /package/dist/{chunk-G7FU6PUA.js.map → chunk-QB2KMIDP.js.map} +0 -0
  1070. /package/dist/{chunk-64PO2WXU.js.map → chunk-QCSJ4CWE.js.map} +0 -0
  1071. /package/dist/{chunk-YYICQDK4.js.map → chunk-QIOQ2NPQ.js.map} +0 -0
  1072. /package/dist/{chunk-NB2HMRT2.js.map → chunk-QK5EFEUT.js.map} +0 -0
  1073. /package/dist/{chunk-366XZ4PM.js.map → chunk-QPQBLYQJ.js.map} +0 -0
  1074. /package/dist/{chunk-Q6XQ2R37.js.map → chunk-QPSGCC5D.js.map} +0 -0
  1075. /package/dist/{chunk-JJZPLGIP.js.map → chunk-QZAAUQRN.js.map} +0 -0
  1076. /package/dist/{chunk-VGUN6VB2.js.map → chunk-RGBI63KJ.js.map} +0 -0
  1077. /package/dist/{chunk-LRN6GYAZ.js.map → chunk-RLBKLAEY.js.map} +0 -0
  1078. /package/dist/{chunk-F7U3QPZ3.js.map → chunk-RMFKVOM7.js.map} +0 -0
  1079. /package/dist/{chunk-Q4EFRI6X.js.map → chunk-ROKQU7WG.js.map} +0 -0
  1080. /package/dist/{chunk-7QOHRZ67.js.map → chunk-RPVREAU7.js.map} +0 -0
  1081. /package/dist/{chunk-VGWWEVSD.js.map → chunk-RQKLF42C.js.map} +0 -0
  1082. /package/dist/{chunk-2VTTKH23.js.map → chunk-SEO7TICN.js.map} +0 -0
  1083. /package/dist/{chunk-3QNRBEYH.js.map → chunk-SHHJCL7X.js.map} +0 -0
  1084. /package/dist/{chunk-E6SQKHAU.js.map → chunk-SIRLACNZ.js.map} +0 -0
  1085. /package/dist/{chunk-H2TCRX3H.js.map → chunk-SKPHMYAA.js.map} +0 -0
  1086. /package/dist/{chunk-YDCUBUWH.js.map → chunk-SODC7T6L.js.map} +0 -0
  1087. /package/dist/{chunk-TNYFHKVV.js.map → chunk-SQJIKMN3.js.map} +0 -0
  1088. /package/dist/{chunk-DO74DQC7.js.map → chunk-SVINDKVW.js.map} +0 -0
  1089. /package/dist/{chunk-CPYGO76Q.js.map → chunk-SYCDHPZF.js.map} +0 -0
  1090. /package/dist/{chunk-UQ3IM6FY.js.map → chunk-T2QX3FDP.js.map} +0 -0
  1091. /package/dist/{chunk-NWGNFN3N.js.map → chunk-T3OWFVMS.js.map} +0 -0
  1092. /package/dist/{chunk-N3OARGH2.js.map → chunk-T6XI5FLY.js.map} +0 -0
  1093. /package/dist/{chunk-MQG7RV3B.js.map → chunk-T7OXJZCX.js.map} +0 -0
  1094. /package/dist/{chunk-2T7DX6KR.js.map → chunk-TAT5USZN.js.map} +0 -0
  1095. /package/dist/{chunk-ICX64J4U.js.map → chunk-TPQTRNER.js.map} +0 -0
  1096. /package/dist/{chunk-D2TOWEYH.js.map → chunk-TUIN4MB7.js.map} +0 -0
  1097. /package/dist/{chunk-LQDUHU3Y.js.map → chunk-TX3VECZU.js.map} +0 -0
  1098. /package/dist/{chunk-TG7DADJR.js.map → chunk-TXLIEOJX.js.map} +0 -0
  1099. /package/dist/{chunk-2ZVRJRXC.js.map → chunk-U3DN4HEY.js.map} +0 -0
  1100. /package/dist/{chunk-PSMAWRPL.js.map → chunk-U7XM7CB4.js.map} +0 -0
  1101. /package/dist/{chunk-4TQL3WP2.js.map → chunk-UJK53QFL.js.map} +0 -0
  1102. /package/dist/{chunk-RBRX5ZS3.js.map → chunk-UMTXA2TH.js.map} +0 -0
  1103. /package/dist/{chunk-36MIDGAH.js.map → chunk-UPDSXFK5.js.map} +0 -0
  1104. /package/dist/{chunk-OYXBFSGK.js.map → chunk-UTIAXH52.js.map} +0 -0
  1105. /package/dist/{chunk-5WUN7XPD.js.map → chunk-UVN5TMHU.js.map} +0 -0
  1106. /package/dist/{chunk-UYE47LO6.js.map → chunk-VGYXW3VG.js.map} +0 -0
  1107. /package/dist/{chunk-IKUNOX7F.js.map → chunk-VS7AHPCZ.js.map} +0 -0
  1108. /package/dist/{chunk-MYUFMVCH.js.map → chunk-VTTAJOQ7.js.map} +0 -0
  1109. /package/dist/{chunk-K63HGHZX.js.map → chunk-VWPOLUAO.js.map} +0 -0
  1110. /package/dist/{chunk-GA4YEAMX.js.map → chunk-X3MWB2QU.js.map} +0 -0
  1111. /package/dist/{chunk-I36GSRUJ.js.map → chunk-X6KAJI3V.js.map} +0 -0
  1112. /package/dist/{chunk-IKMUFDVS.js.map → chunk-XBLRHV5R.js.map} +0 -0
  1113. /package/dist/{chunk-XOSQP3YA.js.map → chunk-XDFP2LMW.js.map} +0 -0
  1114. /package/dist/{chunk-MW7Y3T55.js.map → chunk-XEQMZB3C.js.map} +0 -0
  1115. /package/dist/{chunk-B3LMRTRF.js.map → chunk-XEYLT5VA.js.map} +0 -0
  1116. /package/dist/{chunk-UI4HI5QK.js.map → chunk-XHIQ5I6N.js.map} +0 -0
  1117. /package/dist/{chunk-U6M4LS3M.js.map → chunk-XLH7QY2R.js.map} +0 -0
  1118. /package/dist/{chunk-OSA5EQG5.js.map → chunk-XWFAMUZQ.js.map} +0 -0
  1119. /package/dist/{chunk-6MT3HHUB.js.map → chunk-Y4OBB2VN.js.map} +0 -0
  1120. /package/dist/{chunk-CZP5QXNB.js.map → chunk-YCVD6CI3.js.map} +0 -0
  1121. /package/dist/{chunk-APW4T4SW.js.map → chunk-YENLNISG.js.map} +0 -0
  1122. /package/dist/{chunk-JWPA6ZPZ.js.map → chunk-YIRVLKAX.js.map} +0 -0
  1123. /package/dist/{chunk-LQ62ECE6.js.map → chunk-YL73CVNK.js.map} +0 -0
  1124. /package/dist/{chunk-ILKDYBON.js.map → chunk-YLS6QE5G.js.map} +0 -0
  1125. /package/dist/{chunk-YBKVGLQR.js.map → chunk-YPWU5KPE.js.map} +0 -0
  1126. /package/dist/{chunk-IKJLSBUI.js.map → chunk-YQXTDZSU.js.map} +0 -0
  1127. /package/dist/{chunk-TPMZBOFH.js.map → chunk-YSJEAAOL.js.map} +0 -0
  1128. /package/dist/{chunk-W3BFRR2G.js.map → chunk-YWIFM7D7.js.map} +0 -0
  1129. /package/dist/{chunk-WTJ4PLMU.js.map → chunk-YWVI6ZMK.js.map} +0 -0
  1130. /package/dist/{chunk-5KWMYPJV.js.map → chunk-Z4FMAFNH.js.map} +0 -0
  1131. /package/dist/{chunk-W5OWKVZG.js.map → chunk-Z654FWNU.js.map} +0 -0
  1132. /package/dist/{chunk-5FH5LQVS.js.map → chunk-Z7Y523PS.js.map} +0 -0
  1133. /package/dist/{chunk-HLL4PBO7.js.map → chunk-ZD67RM6G.js.map} +0 -0
  1134. /package/dist/{chunk-IVYJX3OY.js.map → chunk-ZEG4VPBL.js.map} +0 -0
  1135. /package/dist/{chunk-K6R5T44I.js.map → chunk-ZLYCOBHW.js.map} +0 -0
  1136. /package/dist/{chunk-VADHIT26.js.map → chunk-ZNJ5MTXV.js.map} +0 -0
  1137. /package/dist/{chunk-2KYQC4T5.js.map → chunk-ZSGY3H53.js.map} +0 -0
  1138. /package/dist/{chunk-BKP43KK4.js.map → chunk-ZTPXACWB.js.map} +0 -0
  1139. /package/dist/{chunk-JCY4CMDH.js.map → chunk-ZUA3JMI6.js.map} +0 -0
  1140. /package/dist/{chunk-IGVVXLKJ.js.map → chunk-ZYAZUPPV.js.map} +0 -0
  1141. /package/dist/{computer-viewer-LPZ763KF.js.map → computer-viewer-TDDO25AV.js.map} +0 -0
  1142. /package/dist/{embedded-new-voice-YVMKSLKJ.js.map → embedded-new-voice-2G3VLPVQ.js.map} +0 -0
  1143. /package/dist/{embedded-voice-BJPQFXSU.js.map → embedded-voice-T5IWOWGD.js.map} +0 -0
  1144. /package/dist/{fleet-decision-row-AA4H5CDT.js.map → fleet-decision-row-WM64KXP3.js.map} +0 -0
  1145. /package/dist/{model-policy-picker-menu-HSMWVO4P.js.map → model-policy-picker-menu-SMC6J6QN.js.map} +0 -0
  1146. /package/dist/{payment-page-card-3LTSFJGN.js.map → payment-page-card-G4U63KUV.js.map} +0 -0
  1147. /package/dist/{platform-activity-row-5VYV6TX4.js.map → platform-activity-row-BUZGZAKZ.js.map} +0 -0
  1148. /package/dist/{queue-surface-implementation-NXHZUKD2.js.map → queue-surface-implementation-4KUZ4PJV.js.map} +0 -0
  1149. /package/dist/{sandbox-files-YCMLQUFU.js.map → sandbox-files-ESDMOFSD.js.map} +0 -0
  1150. /package/dist/{session-connect-cards-KSQLMRM5.js.map → session-connect-cards-Q53KMMYY.js.map} +0 -0
  1151. /package/dist/{session-realtime-ZR6JLG3Y.js.map → session-realtime-CF3I35WJ.js.map} +0 -0
  1152. /package/dist/{timeline-annotation-markers-YAHDPWVG.js.map → timeline-annotation-markers-CJK4RYZ4.js.map} +0 -0
  1153. /package/dist/{timeline-annotation-selection-KHXNCEJP.js.map → timeline-annotation-selection-67GF5H26.js.map} +0 -0
  1154. /package/dist/{timeline-annotations-dialog-Y4XD3N7B.js.map → timeline-annotations-dialog-ONJPQDJQ.js.map} +0 -0
@@ -0,0 +1,2936 @@
1
+ "use client";
2
+ import {
3
+ OPEN_WORKSTREAM_CONTROL_EVENT
4
+ } from "./chunk-3IWPC6O3.js";
5
+ import {
6
+ useCalmServiceFailure
7
+ } from "./chunk-SVKPSCTH.js";
8
+ import {
9
+ defaultChatComposerMessages
10
+ } from "./chunk-DGMR6JEJ.js";
11
+ import {
12
+ useVoiceInput
13
+ } from "./chunk-SODC7T6L.js";
14
+ import {
15
+ shouldRecallQueuedOnKey,
16
+ shouldSteerOnKey,
17
+ shouldSubmitOnKey
18
+ } from "./chunk-MIHN76LX.js";
19
+ import {
20
+ Tooltip,
21
+ TooltipContent,
22
+ TooltipProvider,
23
+ TooltipTrigger
24
+ } from "./chunk-6IWKHHRS.js";
25
+ import {
26
+ ShimmerText,
27
+ useLightboxOptional
28
+ } from "./chunk-XHIQ5I6N.js";
29
+ import {
30
+ COMPOSER_VOICE_INPUT_START_EVENT,
31
+ ComposerFooterSignalProvider,
32
+ composerVoiceEventScope,
33
+ useComposerFooterSignal,
34
+ useComposerFooterSignalState
35
+ } from "./chunk-6F34IWSA.js";
36
+ import {
37
+ ComposerResponsiveContext
38
+ } from "./chunk-XEA5BCMA.js";
39
+ import {
40
+ useErrorMessage
41
+ } from "./chunk-CM7LVUKC.js";
42
+ import {
43
+ composerSubmissionErrorMessage
44
+ } from "./chunk-5MOJZORA.js";
45
+ import {
46
+ OPENGENI_UPDATING_ACTION_NOTICE,
47
+ OPENGENI_UPDATING_NOTICE,
48
+ isActionFailure
49
+ } from "./chunk-5AIMVW6Y.js";
50
+ import {
51
+ groupPickerRowsByBillingClass,
52
+ projectClientModelRows
53
+ } from "./chunk-ZHC47M2B.js";
54
+ import {
55
+ cn
56
+ } from "./chunk-TXS65BB2.js";
57
+ import {
58
+ singleSendText,
59
+ useOpenGeniText
60
+ } from "./chunk-7T2ZE3VT.js";
61
+
62
+ // src/commands/registry.ts
63
+ import { formatErrorMessage } from "@opengeni/sdk";
64
+ function parseCommandLine(value) {
65
+ if (value[0] !== "/") {
66
+ return null;
67
+ }
68
+ const body = value.slice(1);
69
+ const firstSpace = body.indexOf(" ");
70
+ if (firstSpace === -1) {
71
+ return { name: body, rest: "", hasTrailingSpace: false, args: [] };
72
+ }
73
+ const name = body.slice(0, firstSpace);
74
+ const rest = body.slice(firstSpace + 1);
75
+ return {
76
+ name,
77
+ rest,
78
+ hasTrailingSpace: true,
79
+ args: rest.split(/\s+/).filter((token) => token.length > 0)
80
+ };
81
+ }
82
+ var PERMISSION_SUPERUSER = "workspace:admin";
83
+ function hasPermission(required, permissions) {
84
+ if (!required) {
85
+ return true;
86
+ }
87
+ return permissions.includes(required) || permissions.includes(PERMISSION_SUPERUSER);
88
+ }
89
+ function matchCommand(commands, value) {
90
+ const parsed = parseCommandLine(value);
91
+ if (!parsed) {
92
+ return null;
93
+ }
94
+ const token = parsed.name.toLowerCase();
95
+ return commands.find((command) => command.name === token || command.aliases?.includes(token)) ?? null;
96
+ }
97
+ function filterCommands(commands, token, ctx) {
98
+ const needle = token.toLowerCase();
99
+ return commands.filter((command) => {
100
+ if (!hasPermission(command.permission, ctx.permissions)) {
101
+ return false;
102
+ }
103
+ if (command.available && !command.available(ctx)) {
104
+ return false;
105
+ }
106
+ if (needle.length === 0) {
107
+ return true;
108
+ }
109
+ return command.name.startsWith(needle) || (command.aliases?.some((alias) => alias.startsWith(needle)) ?? false);
110
+ });
111
+ }
112
+ function argHint(args) {
113
+ if (!args || args.length === 0) {
114
+ return "";
115
+ }
116
+ return args.map((arg) => {
117
+ const label = arg.oneOf ? arg.oneOf.join("|") : arg.name;
118
+ return arg.required ? `<${label}>` : `[${label}]`;
119
+ }).join(" ");
120
+ }
121
+ function firstMissingRequiredArg(command, args) {
122
+ const required = (command.args ?? []).filter((arg) => arg.required);
123
+ for (let i = 0; i < required.length; i += 1) {
124
+ const value = args[i];
125
+ if (value === void 0 || value.length === 0) {
126
+ return required[i] ?? null;
127
+ }
128
+ }
129
+ return null;
130
+ }
131
+ function requireSession(t, ctx) {
132
+ if (!ctx.sessionId) {
133
+ throw new Error(t("commands.registry.noActiveSessionYetStart"));
134
+ }
135
+ return ctx.sessionId;
136
+ }
137
+ var hasSession = (ctx) => ctx.sessionId !== null;
138
+ var defaultCommands = (t) => [
139
+ {
140
+ name: "help",
141
+ aliases: ["?"],
142
+ description: t("commands.registry.showAvailableCommands"),
143
+ run: (_args, ctx) => {
144
+ ctx.openHelp();
145
+ return { status: "ok" };
146
+ }
147
+ },
148
+ {
149
+ name: "clear-view",
150
+ description: t("commands.registry.clearTheLocalTimelineView"),
151
+ run: (_args, ctx) => {
152
+ const cleared = ctx.clearView();
153
+ if (!cleared) {
154
+ return {
155
+ status: "error",
156
+ message: t("commands.registry.thisViewCanTBe")
157
+ };
158
+ }
159
+ return { status: "ok", message: t("commands.registry.localViewCleared") };
160
+ }
161
+ },
162
+ {
163
+ name: "goal",
164
+ description: t("commands.registry.pauseOrResumeTheSession"),
165
+ permission: "sessions:control",
166
+ available: hasSession,
167
+ args: [
168
+ { name: "action", required: true, oneOf: ["pause", "resume"], description: "pause | resume" }
169
+ ],
170
+ run: async (args, ctx) => {
171
+ const sessionId = requireSession(t, ctx);
172
+ const action = args[0];
173
+ if (action !== "pause" && action !== "resume") {
174
+ return { status: "error", message: "Usage: /goal pause | /goal resume" };
175
+ }
176
+ try {
177
+ await ctx.client.updateGoal(ctx.workspaceId, sessionId, {
178
+ status: action === "pause" ? "paused" : "active"
179
+ });
180
+ return {
181
+ status: "ok",
182
+ message: action === "pause" ? t("commands.registry.goalPaused") : t("commands.registry.goalResumed")
183
+ };
184
+ } catch (cause) {
185
+ return {
186
+ status: "error",
187
+ message: commandErrorMessage(ctx, cause, goalErrorMessage(t, cause, action))
188
+ };
189
+ }
190
+ }
191
+ },
192
+ {
193
+ name: "compact",
194
+ description: t("commands.registry.compactTheConversationContextNow"),
195
+ permission: "sessions:control",
196
+ available: hasSession,
197
+ run: async (_args, ctx) => {
198
+ const sessionId = requireSession(t, ctx);
199
+ try {
200
+ const result = await ctx.client.compactSessionContext(ctx.workspaceId, sessionId);
201
+ return { status: "ok", message: result.message };
202
+ } catch (cause) {
203
+ return { status: "error", message: commandErrorMessage(ctx, cause) };
204
+ }
205
+ }
206
+ },
207
+ {
208
+ name: "clear",
209
+ description: t("commands.registry.clearTheConversationContextDestructive"),
210
+ permission: "sessions:control",
211
+ danger: true,
212
+ available: hasSession,
213
+ run: async (_args, ctx) => {
214
+ const sessionId = requireSession(t, ctx);
215
+ const confirmed = await ctx.confirm();
216
+ if (!confirmed) {
217
+ return { status: "ok", keepDraft: true };
218
+ }
219
+ try {
220
+ await ctx.client.clearSessionContext(ctx.workspaceId, sessionId);
221
+ return { status: "ok", message: t("commands.registry.contextCleared") };
222
+ } catch (cause) {
223
+ return {
224
+ status: "error",
225
+ message: commandErrorMessage(ctx, cause, clearErrorMessage(t, cause))
226
+ };
227
+ }
228
+ }
229
+ }
230
+ ];
231
+ function commandErrorMessage(ctx, cause, message = formatErrorMessage(cause)) {
232
+ return ctx.formatError?.(cause, message) || message;
233
+ }
234
+ function statusCode(cause) {
235
+ if (cause && typeof cause === "object" && "status" in cause && typeof cause.status === "number") {
236
+ return cause.status;
237
+ }
238
+ return void 0;
239
+ }
240
+ function goalErrorMessage(t, cause, action) {
241
+ const code = statusCode(cause);
242
+ if (code === 404) {
243
+ return t("commands.registry.thisSessionHasNoGoal");
244
+ }
245
+ if (code === 409) {
246
+ return action === "resume" ? t("commands.registry.onlyAPausedGoalCan") : t("commands.registry.goalIsAlreadyInA");
247
+ }
248
+ return formatErrorMessage(cause);
249
+ }
250
+ function clearErrorMessage(t, cause) {
251
+ if (statusCode(cause) === 409) {
252
+ return t("commands.registry.pauseTheSessionAndWait");
253
+ }
254
+ return formatErrorMessage(cause);
255
+ }
256
+
257
+ // src/hooks/use-slash-commands.ts
258
+ import { useCallback, useMemo, useRef, useState } from "react";
259
+ function useSlashCommands(options) {
260
+ const formatError = useErrorMessage();
261
+ const { commands, context, handlers, value, setValue } = options;
262
+ const [highlight, setHighlight] = useState(0);
263
+ const [dismissedValue, setDismissedValue] = useState(null);
264
+ const dismissed = dismissedValue !== null && dismissedValue === value;
265
+ const navigatedRef = useRef(false);
266
+ const navTokenRef = useRef(value);
267
+ if (navTokenRef.current !== value) {
268
+ navTokenRef.current = value;
269
+ navigatedRef.current = false;
270
+ }
271
+ const parsed = useMemo(() => parseCommandLine(value), [value]);
272
+ const filterCtx = useMemo(
273
+ () => ({
274
+ sessionId: context?.sessionId ?? null,
275
+ status: context?.status ?? null,
276
+ permissions: context?.permissions ?? []
277
+ }),
278
+ [context?.sessionId, context?.status, context?.permissions]
279
+ );
280
+ const activeCommand = useMemo(() => {
281
+ if (!parsed || !parsed.hasTrailingSpace) {
282
+ return null;
283
+ }
284
+ return matchCommand(commands, value);
285
+ }, [commands, value, parsed]);
286
+ const items = useMemo(() => {
287
+ if (!parsed) {
288
+ return [];
289
+ }
290
+ if (activeCommand) {
291
+ return [activeCommand];
292
+ }
293
+ return filterCommands(commands, parsed.name, filterCtx);
294
+ }, [commands, parsed, activeCommand, filterCtx]);
295
+ const open = parsed !== null && items.length > 0 && !dismissed;
296
+ const isCommandDraft = parsed !== null && items.length > 0;
297
+ const clampedHighlight = items.length === 0 ? 0 : Math.min(highlight, items.length - 1);
298
+ const activeArgHint = activeCommand ? argHint(activeCommand.args) : "";
299
+ const buildContext = useCallback(
300
+ (command) => {
301
+ if (!context) {
302
+ return null;
303
+ }
304
+ return { ...context, ...handlers, formatError, confirm: () => handlers.confirm(command) };
305
+ },
306
+ [context, handlers, formatError]
307
+ );
308
+ const execute = useCallback(
309
+ async (command, args) => {
310
+ const ctx = buildContext(command);
311
+ if (!ctx) {
312
+ return;
313
+ }
314
+ try {
315
+ const result = await command.run(args, ctx);
316
+ if (result.message) {
317
+ ctx.notice({ tone: result.status === "ok" ? "ok" : "error", message: result.message });
318
+ }
319
+ if (result.status === "ok" && !result.keepDraft) {
320
+ setValue("");
321
+ }
322
+ } catch (cause) {
323
+ ctx.notice({ tone: "error", message: formatError(cause) });
324
+ }
325
+ },
326
+ [buildContext, setValue, formatError]
327
+ );
328
+ const autocomplete = useCallback(
329
+ (command) => {
330
+ setValue(`/${command.name} `);
331
+ setHighlight(0);
332
+ },
333
+ [setValue]
334
+ );
335
+ const autocompleteHighlighted = useCallback(() => {
336
+ const command = items[clampedHighlight];
337
+ if (command) {
338
+ autocomplete(command);
339
+ }
340
+ }, [items, clampedHighlight, autocomplete]);
341
+ const runningRef = useRef(false);
342
+ const runResolved = useCallback(
343
+ async (command, executionOptions) => {
344
+ if (!parsed || runningRef.current) {
345
+ return;
346
+ }
347
+ runningRef.current = true;
348
+ try {
349
+ const explicit = executionOptions?.explicit ?? false;
350
+ const nameMatchesToken = command.name === parsed.name.toLowerCase() || (command.aliases?.includes(parsed.name.toLowerCase()) ?? false);
351
+ if (!explicit && !activeCommand && !nameMatchesToken && !parsed.hasTrailingSpace) {
352
+ autocomplete(command);
353
+ return;
354
+ }
355
+ const args = nameMatchesToken || parsed.hasTrailingSpace ? parsed.args : [];
356
+ const missing = firstMissingRequiredArg(command, args);
357
+ if (missing) {
358
+ if (!parsed.hasTrailingSpace) {
359
+ autocomplete(command);
360
+ }
361
+ return;
362
+ }
363
+ await execute(command, args);
364
+ } finally {
365
+ runningRef.current = false;
366
+ }
367
+ },
368
+ [parsed, activeCommand, autocomplete, execute]
369
+ );
370
+ const runHighlighted = useCallback(async () => {
371
+ if (!parsed) {
372
+ return;
373
+ }
374
+ if (navigatedRef.current && !activeCommand) {
375
+ const highlighted = items[clampedHighlight];
376
+ if (highlighted) {
377
+ await runResolved(highlighted, { explicit: true });
378
+ }
379
+ return;
380
+ }
381
+ const token = parsed.name.toLowerCase();
382
+ const exact = items.find((item) => item.name === token || item.aliases?.includes(token));
383
+ const command = activeCommand ?? exact ?? items[clampedHighlight];
384
+ if (!command) {
385
+ return;
386
+ }
387
+ await runResolved(command);
388
+ }, [parsed, activeCommand, items, clampedHighlight, runResolved]);
389
+ const runAt = useCallback(
390
+ async (index) => {
391
+ const command = items[index];
392
+ if (!command) {
393
+ return;
394
+ }
395
+ await runResolved(command, { explicit: true });
396
+ },
397
+ [items, runResolved]
398
+ );
399
+ const onKeyDown = useCallback(
400
+ (event) => {
401
+ if (!open) {
402
+ return false;
403
+ }
404
+ switch (event.key) {
405
+ case "ArrowDown": {
406
+ event.preventDefault();
407
+ navigatedRef.current = true;
408
+ setHighlight(
409
+ (current) => items.length === 0 ? 0 : (Math.min(current, items.length - 1) + 1) % items.length
410
+ );
411
+ return true;
412
+ }
413
+ case "ArrowUp": {
414
+ event.preventDefault();
415
+ navigatedRef.current = true;
416
+ setHighlight((current) => {
417
+ const base = Math.min(current, items.length - 1);
418
+ return items.length === 0 ? 0 : (base - 1 + items.length) % items.length;
419
+ });
420
+ return true;
421
+ }
422
+ case "Tab": {
423
+ event.preventDefault();
424
+ autocompleteHighlighted();
425
+ return true;
426
+ }
427
+ case "Enter": {
428
+ if (event.shiftKey || event.nativeEvent?.isComposing) {
429
+ return false;
430
+ }
431
+ event.preventDefault();
432
+ void runHighlighted();
433
+ return true;
434
+ }
435
+ case "Escape": {
436
+ event.preventDefault();
437
+ setDismissedValue(value);
438
+ return true;
439
+ }
440
+ default:
441
+ return false;
442
+ }
443
+ },
444
+ [open, items, autocompleteHighlighted, runHighlighted, value]
445
+ );
446
+ return {
447
+ open,
448
+ isCommandDraft,
449
+ items,
450
+ highlight: clampedHighlight,
451
+ setHighlight,
452
+ activeCommand,
453
+ activeArgHint,
454
+ onKeyDown,
455
+ runHighlighted,
456
+ runAt,
457
+ autocompleteHighlighted
458
+ };
459
+ }
460
+
461
+ // src/components/command-palette.tsx
462
+ import { AnimatePresence, motion } from "motion/react";
463
+ import { jsx, jsxs } from "react/jsx-runtime";
464
+ function CommandPalette({
465
+ open,
466
+ items,
467
+ highlight,
468
+ onHighlight,
469
+ onRun,
470
+ argHintText,
471
+ listboxId,
472
+ label: labelProp,
473
+ dangerLabel = "danger"
474
+ }) {
475
+ const t = useOpenGeniText();
476
+ const label = labelProp === void 0 ? t("commandPalette.slashCommands") : labelProp;
477
+ return /* @__PURE__ */ jsx(AnimatePresence, { children: open ? /* @__PURE__ */ jsxs(
478
+ motion.div,
479
+ {
480
+ initial: { opacity: 0, y: 6, scale: 0.99 },
481
+ animate: { opacity: 1, y: 0, scale: 1 },
482
+ exit: { opacity: 0, y: 6, scale: 0.99 },
483
+ transition: { duration: 0.13, ease: "easeOut" },
484
+ className: cn(
485
+ "absolute bottom-full left-0 right-0 z-20 mb-2 overflow-hidden",
486
+ "rounded-og-lg border border-og-border bg-og-surface-2 shadow-og-sm"
487
+ ),
488
+ children: [
489
+ /* @__PURE__ */ jsx(
490
+ "ul",
491
+ {
492
+ id: listboxId,
493
+ role: "listbox",
494
+ "aria-label": label,
495
+ className: "max-h-72 overflow-y-auto py-1",
496
+ children: items.map((command, index) => {
497
+ const selected = index === highlight;
498
+ const hint = argHint(command.args);
499
+ return /* @__PURE__ */ jsxs(
500
+ "li",
501
+ {
502
+ id: `${listboxId}-option-${index}`,
503
+ role: "option",
504
+ "aria-selected": selected,
505
+ onMouseEnter: () => onHighlight(index),
506
+ onMouseDown: (event) => {
507
+ event.preventDefault();
508
+ onRun(index);
509
+ },
510
+ className: cn(
511
+ "mx-1 flex cursor-pointer items-center gap-2 rounded-og-md px-2.5 py-1.5",
512
+ "transition-colors duration-100",
513
+ selected ? "bg-og-accent/15 text-og-fg" : "text-og-fg-muted hover:bg-og-surface-3"
514
+ ),
515
+ children: [
516
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-baseline gap-1.5", children: [
517
+ /* @__PURE__ */ jsxs(
518
+ "span",
519
+ {
520
+ className: cn(
521
+ "font-mono text-[13px]",
522
+ selected ? "text-og-accent" : "text-og-fg"
523
+ ),
524
+ children: [
525
+ "/",
526
+ command.name
527
+ ]
528
+ }
529
+ ),
530
+ hint ? /* @__PURE__ */ jsx("span", { className: "truncate font-mono text-[11px] text-og-fg-subtle", children: hint }) : null
531
+ ] }),
532
+ /* @__PURE__ */ jsxs("span", { className: "ml-auto flex items-center gap-1.5", children: [
533
+ command.danger ? /* @__PURE__ */ jsx("span", { className: "rounded-og-xs bg-og-status-failed/15 px-1 text-[10px] uppercase tracking-wide text-og-status-failed", children: dangerLabel }) : null,
534
+ /* @__PURE__ */ jsx("span", { className: "og-command-description truncate text-[12px] text-og-fg-subtle max-sm:hidden", children: command.description })
535
+ ] })
536
+ ]
537
+ },
538
+ command.name
539
+ );
540
+ })
541
+ }
542
+ ),
543
+ argHintText ? /* @__PURE__ */ jsx("div", { className: "border-t border-og-border px-3 py-1.5 font-mono text-[11px] text-og-fg-subtle", children: argHintText }) : null
544
+ ]
545
+ }
546
+ ) : null });
547
+ }
548
+
549
+ // src/components/model-picker.tsx
550
+ import { modelDisplayName } from "@opengeni/sdk/model-display";
551
+ import { ChevronDownIcon } from "lucide-react";
552
+ import { useId, useMemo as useMemo2 } from "react";
553
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
554
+ var EMPTY_CLIENT_MODELS = [];
555
+ function isCodexClientModel(model) {
556
+ return model.id.startsWith("codex/") || model.source === "codex";
557
+ }
558
+ function isCodexPickerRow(row) {
559
+ return row.id.startsWith("codex/") || row.catalog.source === "codex";
560
+ }
561
+ function applyCodexOnlyRows(t, rows, codexOnly) {
562
+ if (!codexOnly) return rows;
563
+ return rows.map((row) => {
564
+ if (isCodexPickerRow(row)) return row;
565
+ return {
566
+ ...row,
567
+ selectable: false,
568
+ unavailableReason: row.unavailableReason ?? t("modelPicker.codexOnlySession")
569
+ };
570
+ });
571
+ }
572
+ function providerGroups(models, codexOnly) {
573
+ const byProvider = /* @__PURE__ */ new Map();
574
+ for (const model of models) {
575
+ let group = byProvider.get(model.provider);
576
+ if (!group) {
577
+ group = { label: model.providerLabel, models: [] };
578
+ byProvider.set(model.provider, group);
579
+ }
580
+ group.models.push({
581
+ ...model,
582
+ optionDisabled: codexOnly && !isCodexClientModel(model)
583
+ });
584
+ }
585
+ const groups = [...byProvider.values()];
586
+ if (codexOnly) {
587
+ const codexIndex = groups.findIndex(
588
+ (group) => group.models.some((model) => !model.optionDisabled && isCodexClientModel(model))
589
+ );
590
+ if (codexIndex > 0) groups.unshift(...groups.splice(codexIndex, 1));
591
+ }
592
+ return groups;
593
+ }
594
+ function ModelPicker({
595
+ models = EMPTY_CLIENT_MODELS,
596
+ rows,
597
+ value,
598
+ onChange,
599
+ disabled,
600
+ className,
601
+ label: labelProp,
602
+ codexOnly = false
603
+ }) {
604
+ const t = useOpenGeniText();
605
+ const label = labelProp === void 0 ? t("modelPicker.model") : labelProp;
606
+ const selectId = useId();
607
+ const effectiveRows = useMemo2(
608
+ () => rows && rows.length > 0 ? applyCodexOnlyRows(t, rows, codexOnly) : [],
609
+ [rows, codexOnly, t]
610
+ );
611
+ const billingGroups = useMemo2(
612
+ () => effectiveRows.length > 0 ? groupPickerRowsByBillingClass(t, effectiveRows, { codexOnly, selectedId: value }) : [],
613
+ [effectiveRows, codexOnly, value, t]
614
+ );
615
+ const providerGroupList = useMemo2(() => providerGroups(models, codexOnly), [models, codexOnly]);
616
+ const modelLabels = useMemo2(
617
+ () => new Map(projectClientModelRows(t, models).map((row) => [row.id, row.label])),
618
+ [models, t]
619
+ );
620
+ const useBillingGroups = Boolean(effectiveRows.length);
621
+ if (models.length === 0 && effectiveRows.length === 0) {
622
+ return null;
623
+ }
624
+ return /* @__PURE__ */ jsxs2("span", { className: cn("relative inline-flex items-center", className), children: [
625
+ /* @__PURE__ */ jsx2("label", { htmlFor: selectId, className: "sr-only", children: label }),
626
+ /* @__PURE__ */ jsx2(
627
+ "select",
628
+ {
629
+ id: selectId,
630
+ value: value ?? "",
631
+ onChange: (event) => onChange(event.target.value),
632
+ disabled: disabled === true,
633
+ "aria-label": label,
634
+ className: cn(
635
+ "og-model-picker-native h-8 max-w-[180px] cursor-pointer appearance-none truncate rounded-og-md bg-transparent pointer-coarse:h-11",
636
+ "py-0 pl-2 pr-6 text-[13px] text-og-fg-muted",
637
+ "transition-colors duration-150 hover:bg-og-surface-2 hover:text-og-fg",
638
+ "focus:outline-hidden focus-visible:outline-hidden",
639
+ "disabled:cursor-not-allowed disabled:opacity-50"
640
+ ),
641
+ children: useBillingGroups ? billingGroups.map((group) => /* @__PURE__ */ jsx2("optgroup", { label: group.label, children: group.rows.map((row) => /* @__PURE__ */ jsx2("option", { value: row.id, disabled: !row.selectable, children: row.unavailableReason ? `${row.label} (${row.unavailableReason})` : row.label }, row.id)) }, group.billingClass)) : providerGroupList.map((group) => /* @__PURE__ */ jsx2("optgroup", { label: group.label, children: group.models.map((model) => /* @__PURE__ */ jsx2("option", { value: model.id, disabled: model.optionDisabled, children: modelLabels.get(model.id) ?? modelDisplayName(model) }, model.id)) }, group.label))
642
+ }
643
+ ),
644
+ /* @__PURE__ */ jsx2(
645
+ ChevronDownIcon,
646
+ {
647
+ "aria-hidden": true,
648
+ className: "pointer-events-none absolute right-1.5 size-3.5 text-og-fg-subtle"
649
+ }
650
+ )
651
+ ] });
652
+ }
653
+
654
+ // src/components/composer.tsx
655
+ import {
656
+ AppWindowIcon,
657
+ ArrowUpIcon,
658
+ ChevronDownIcon as ChevronDownIcon2,
659
+ FileIcon,
660
+ ImageIcon,
661
+ LoaderCircleIcon,
662
+ PaperclipIcon,
663
+ PauseIcon,
664
+ PlayIcon,
665
+ RotateCwIcon,
666
+ SquareIcon,
667
+ XIcon
668
+ } from "lucide-react";
669
+ import { AnimatePresence as AnimatePresence2, motion as motion2 } from "motion/react";
670
+ import {
671
+ cloneElement,
672
+ createContext,
673
+ forwardRef,
674
+ useCallback as useCallback2,
675
+ useContext,
676
+ useEffect,
677
+ useId as useId2,
678
+ useLayoutEffect,
679
+ useMemo as useMemo3,
680
+ useRef as useRef2,
681
+ useState as useState2
682
+ } from "react";
683
+ import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
684
+ function ComposerTip({
685
+ tip,
686
+ children
687
+ }) {
688
+ if (!tip) return children;
689
+ return cloneElement(children, { title: tip });
690
+ }
691
+ var HELD_SEND_LIMIT_MS = 3e4;
692
+ var composerHeightMirror = null;
693
+ function measureComposerContentHeight(textarea) {
694
+ if (typeof document === "undefined") {
695
+ return textarea.scrollHeight;
696
+ }
697
+ const width = textarea.clientWidth;
698
+ if (width <= 0) {
699
+ return textarea.offsetHeight;
700
+ }
701
+ let mirror = composerHeightMirror;
702
+ if (!mirror) {
703
+ mirror = document.createElement("textarea");
704
+ mirror.setAttribute("aria-hidden", "true");
705
+ mirror.tabIndex = -1;
706
+ mirror.rows = 1;
707
+ mirror.style.cssText = "position:fixed;top:0;left:-100000px;visibility:hidden;pointer-events:none;height:auto;min-height:0;max-height:none;overflow:hidden;z-index:-1;";
708
+ composerHeightMirror = mirror;
709
+ }
710
+ const style = getComputedStyle(textarea);
711
+ mirror.style.width = `${width}px`;
712
+ mirror.style.boxSizing = style.boxSizing;
713
+ mirror.style.font = style.font;
714
+ mirror.style.fontSize = style.fontSize;
715
+ mirror.style.fontFamily = style.fontFamily;
716
+ mirror.style.fontWeight = style.fontWeight;
717
+ mirror.style.fontStyle = style.fontStyle;
718
+ mirror.style.letterSpacing = style.letterSpacing;
719
+ mirror.style.lineHeight = style.lineHeight;
720
+ mirror.style.textTransform = style.textTransform;
721
+ mirror.style.paddingTop = style.paddingTop;
722
+ mirror.style.paddingRight = style.paddingRight;
723
+ mirror.style.paddingBottom = style.paddingBottom;
724
+ mirror.style.paddingLeft = style.paddingLeft;
725
+ mirror.style.borderTopWidth = style.borderTopWidth;
726
+ mirror.style.borderRightWidth = style.borderRightWidth;
727
+ mirror.style.borderBottomWidth = style.borderBottomWidth;
728
+ mirror.style.borderLeftWidth = style.borderLeftWidth;
729
+ mirror.style.borderStyle = style.borderStyle;
730
+ mirror.style.whiteSpace = style.whiteSpace;
731
+ mirror.style.wordBreak = style.wordBreak;
732
+ mirror.style.overflowWrap = style.overflowWrap;
733
+ mirror.value = textarea.value;
734
+ if (!mirror.isConnected) {
735
+ document.documentElement.appendChild(mirror);
736
+ }
737
+ return mirror.scrollHeight;
738
+ }
739
+ function applyComposerTextareaHeight(textarea, maxPx = 220, measure = measureComposerContentHeight) {
740
+ const before = textarea.offsetHeight;
741
+ const nextPx = Math.min(
742
+ textarea.scrollHeight > textarea.clientHeight + 1 ? textarea.scrollHeight : measure(textarea),
743
+ maxPx
744
+ );
745
+ if (Math.abs(nextPx - before) < 1) {
746
+ return;
747
+ }
748
+ textarea.style.height = `${nextPx}px`;
749
+ }
750
+ var WORKING_CONTROLS_LINGER_MS = 1e3;
751
+ function useLingeringTrue(value, lingerMs) {
752
+ const [state, setState] = useState2({ value, lingering: false });
753
+ let current = state;
754
+ if (state.value !== value) {
755
+ current = { value, lingering: state.value && !value };
756
+ setState(current);
757
+ }
758
+ const { lingering } = current;
759
+ const currentValue = current.value;
760
+ useEffect(() => {
761
+ if (!lingering || currentValue) return;
762
+ const timer = setTimeout(
763
+ () => setState((latest) => latest.value ? latest : { value: false, lingering: false }),
764
+ lingerMs
765
+ );
766
+ return () => clearTimeout(timer);
767
+ }, [currentValue, lingering, lingerMs]);
768
+ return current.value || current.lingering;
769
+ }
770
+ function useChatComposerController({
771
+ delivery,
772
+ draft,
773
+ control,
774
+ effectiveControl,
775
+ queuedAheadCount = 0,
776
+ canControlWorkspace = false,
777
+ controlLinks,
778
+ disabled = false,
779
+ attachments,
780
+ commands: commandsProp,
781
+ commandContext,
782
+ onClearView,
783
+ onPaste,
784
+ messages: messageOverrides,
785
+ runControl = "pause",
786
+ running = false,
787
+ queuedRecall
788
+ }) {
789
+ const t = useOpenGeniText();
790
+ const commands = useMemo3(() => commandsProp ?? defaultCommands(t), [commandsProp, t]);
791
+ const formatError = useErrorMessage();
792
+ const singleSend = delivery.singleSend === true;
793
+ const deliveryWorking = delivery.working ?? true;
794
+ const working = deliveryWorking;
795
+ const workstreamWorking = useLingeringTrue(
796
+ deliveryWorking || running,
797
+ WORKING_CONTROLS_LINGER_MS
798
+ );
799
+ const messages = useMemo3(
800
+ () => ({
801
+ ...defaultChatComposerMessages(singleSend ? singleSendText(t) : t),
802
+ ...messageOverrides
803
+ }),
804
+ [messageOverrides, singleSend, t]
805
+ );
806
+ const id = useId2();
807
+ const rootRef = useRef2(null);
808
+ const textareaRef = useRef2(null);
809
+ const pauseButtonRef = useRef2(null);
810
+ const fileInputRef = useRef2(null);
811
+ const listboxId = useId2();
812
+ const controlPaused = effectiveControl?.state === "paused";
813
+ const [stoppedHere, setStoppedHere] = useState2(false);
814
+ useEffect(() => {
815
+ if (!controlPaused) setStoppedHere(false);
816
+ }, [controlPaused]);
817
+ const resumesOnSend = runControl === "stop" && stoppedHere && controlPaused && effectiveControl?.directState === "paused" && effectiveControl.additionalBlockerCount === 0 && queuedAheadCount === 0;
818
+ const paused = controlPaused && !resumesOnSend;
819
+ const [controlDetailsOpen, setControlDetailsOpen] = useState2(false);
820
+ const [paletteMounted, setPaletteMounted] = useState2(false);
821
+ const [submitting, setSubmitting] = useState2(false);
822
+ const [submittingMode, setSubmittingMode] = useState2(null);
823
+ const submittingRef = useRef2(false);
824
+ const controlOperationRef = useRef2(false);
825
+ const deliveryValue = delivery.value;
826
+ const setDeliveryValue = delivery.setValue;
827
+ const mountedRef = useRef2(true);
828
+ const deliveredValueRef = useRef2(deliveryValue);
829
+ const liveValueRef = useRef2(deliveryValue);
830
+ const [renderedValue, setRenderedValue] = useState2(deliveryValue);
831
+ const deliveryChanged = deliveryValue !== deliveredValueRef.current;
832
+ if (deliveryChanged) {
833
+ deliveredValueRef.current = deliveryValue;
834
+ liveValueRef.current = deliveryValue;
835
+ }
836
+ const setComposerValue = useCallback2(
837
+ (next) => {
838
+ liveValueRef.current = next;
839
+ setRenderedValue(next);
840
+ setDeliveryValue(next);
841
+ },
842
+ [setDeliveryValue]
843
+ );
844
+ const visibleValue = deliveryChanged ? deliveryValue : renderedValue;
845
+ useLayoutEffect(() => {
846
+ if (renderedValue !== liveValueRef.current) {
847
+ setRenderedValue(liveValueRef.current);
848
+ }
849
+ }, [deliveryValue, renderedValue]);
850
+ useEffect(() => {
851
+ mountedRef.current = true;
852
+ return () => {
853
+ mountedRef.current = false;
854
+ };
855
+ }, []);
856
+ useEffect(() => {
857
+ const openControl = (event) => {
858
+ const requestedId = event instanceof CustomEvent && isRecord(event.detail) && typeof event.detail.composerId === "string" ? event.detail.composerId : null;
859
+ if (requestedId && requestedId !== id) return;
860
+ if (!requestedId) {
861
+ const roots = document.querySelectorAll("[data-og-composer-id]");
862
+ if (roots.length > 1 && !rootRef.current?.contains(document.activeElement)) return;
863
+ }
864
+ textareaRef.current?.scrollIntoView({ block: "end", behavior: "smooth" });
865
+ if (paused) {
866
+ setControlDetailsOpen(true);
867
+ return;
868
+ }
869
+ window.requestAnimationFrame(() => pauseButtonRef.current?.focus());
870
+ };
871
+ document.addEventListener(OPEN_WORKSTREAM_CONTROL_EVENT, openControl);
872
+ return () => document.removeEventListener(OPEN_WORKSTREAM_CONTROL_EVENT, openControl);
873
+ }, [id, paused]);
874
+ const blockedByAttachment = attachments?.hasUnresolved === true;
875
+ const [dragging, setDragging] = useState2(false);
876
+ const dragCarriesFiles = (event) => event.dataTransfer !== null && [...event.dataTransfer.types].includes("Files");
877
+ const handleDragOver = useCallback2(
878
+ (event) => {
879
+ if (!attachments || !dragCarriesFiles(event)) return;
880
+ event.preventDefault();
881
+ if (!disabled) setDragging(true);
882
+ },
883
+ [attachments, disabled]
884
+ );
885
+ const handleDragLeave = useCallback2(
886
+ (event) => {
887
+ if (!attachments) return;
888
+ if (event.currentTarget.contains(event.relatedTarget)) return;
889
+ setDragging(false);
890
+ },
891
+ [attachments]
892
+ );
893
+ const handleDrop = useCallback2(
894
+ (event) => {
895
+ if (!attachments || !dragCarriesFiles(event)) return;
896
+ event.preventDefault();
897
+ setDragging(false);
898
+ if (!disabled && event.dataTransfer.files.length > 0)
899
+ attachments.addFiles(event.dataTransfer.files);
900
+ },
901
+ [attachments, disabled]
902
+ );
903
+ useEffect(() => {
904
+ if (disabled) setDragging(false);
905
+ }, [disabled]);
906
+ const [notice, setNotice] = useState2(null);
907
+ const [helpOpen, setHelpOpen] = useState2(false);
908
+ const [confirmState, setConfirmState] = useState2(null);
909
+ const pendingConfirm = useRef2(null);
910
+ const settleConfirmation = useCallback2((confirmed) => {
911
+ const resolve = pendingConfirm.current;
912
+ pendingConfirm.current = null;
913
+ setConfirmState(null);
914
+ resolve?.(confirmed);
915
+ }, []);
916
+ useEffect(
917
+ () => () => {
918
+ pendingConfirm.current?.(false);
919
+ pendingConfirm.current = null;
920
+ },
921
+ []
922
+ );
923
+ const resizeInputRafRef = useRef2(null);
924
+ const resizeInput = useCallback2(() => {
925
+ if (resizeInputRafRef.current !== null) {
926
+ return;
927
+ }
928
+ resizeInputRafRef.current = requestAnimationFrame(() => {
929
+ resizeInputRafRef.current = null;
930
+ const textarea = textareaRef.current;
931
+ if (!textarea) {
932
+ return;
933
+ }
934
+ applyComposerTextareaHeight(textarea, 220);
935
+ });
936
+ }, []);
937
+ useEffect(() => resizeInput(), [resizeInput, visibleValue]);
938
+ useEffect(
939
+ () => () => {
940
+ if (resizeInputRafRef.current !== null) {
941
+ cancelAnimationFrame(resizeInputRafRef.current);
942
+ resizeInputRafRef.current = null;
943
+ }
944
+ },
945
+ []
946
+ );
947
+ const handlers = useMemo3(
948
+ () => ({
949
+ notice: (next) => {
950
+ setNotice(next);
951
+ delivery.clearError();
952
+ },
953
+ openHelp: () => setHelpOpen(true),
954
+ clearView: () => {
955
+ if (!onClearView) return false;
956
+ onClearView();
957
+ return true;
958
+ },
959
+ confirm: (command) => new Promise((resolve) => {
960
+ pendingConfirm.current?.(false);
961
+ pendingConfirm.current = resolve;
962
+ setConfirmState({ command, resolve: settleConfirmation });
963
+ })
964
+ }),
965
+ [delivery, onClearView, settleConfirmation]
966
+ );
967
+ const palette = useSlashCommands({
968
+ commands,
969
+ context: commandContext,
970
+ handlers,
971
+ value: visibleValue,
972
+ setValue: setComposerValue
973
+ });
974
+ const paletteEnabled = commandContext !== void 0;
975
+ const commandDraftBlocked = paletteEnabled && palette.isCommandDraft;
976
+ const annotationsIncomplete = (delivery.annotations ?? []).some(
977
+ (annotation) => annotation.note.trim().length === 0
978
+ );
979
+ const preparing = delivery.preparing === true;
980
+ const hasDraftText = visibleValue.trim().length > 0 || (attachments?.attachments.length ?? 0) > 0;
981
+ const waitsForPreparation = preparing && hasDraftText;
982
+ const heldSendRef = useRef2(null);
983
+ const heldSendNoticeRef = useRef2(null);
984
+ const clearHeldSendNotice = useCallback2(() => {
985
+ const shown = heldSendNoticeRef.current;
986
+ if (!shown) return;
987
+ heldSendNoticeRef.current = null;
988
+ setNotice((current) => current === shown ? null : current);
989
+ }, []);
990
+ const latestSendRef = useRef2({ delivery, resumesOnSend, singleSend });
991
+ useLayoutEffect(() => {
992
+ latestSendRef.current = { delivery, resumesOnSend, singleSend };
993
+ });
994
+ const deliveryCanSend = delivery.canSend;
995
+ useEffect(() => {
996
+ const release = heldSendRef.current;
997
+ if (!release) return;
998
+ const ready = deliveryCanSend && !disabled;
999
+ if (!ready && waitsForPreparation) return;
1000
+ heldSendRef.current = null;
1001
+ release(ready);
1002
+ }, [deliveryCanSend, disabled, waitsForPreparation]);
1003
+ useEffect(
1004
+ () => () => {
1005
+ heldSendRef.current?.(false);
1006
+ heldSendRef.current = null;
1007
+ },
1008
+ []
1009
+ );
1010
+ const submitBlocker = disabled ? "disabled" : blockedByAttachment ? "attachment" : delivery.sending || submitting ? "sending" : commandDraftBlocked ? "command" : annotationsIncomplete ? "annotations" : delivery.canSend || waitsForPreparation ? null : "empty";
1011
+ const canSubmit = submitBlocker === null;
1012
+ const submit = useCallback2(
1013
+ async (mode) => {
1014
+ clearHeldSendNotice();
1015
+ if (commandDraftBlocked) {
1016
+ setNotice({ tone: "error", message: messages.slashCommandBlocked });
1017
+ delivery.clearError();
1018
+ return false;
1019
+ }
1020
+ if (disabled || blockedByAttachment || delivery.sending || submittingRef.current)
1021
+ return false;
1022
+ if (annotationsIncomplete) {
1023
+ setNotice({ tone: "error", message: messages.annotationNotesRequired });
1024
+ delivery.clearError();
1025
+ delivery.requestAnnotationReview?.();
1026
+ return false;
1027
+ }
1028
+ if (!delivery.canSend && !waitsForPreparation) return false;
1029
+ submittingRef.current = true;
1030
+ setSubmitting(true);
1031
+ setSubmittingMode(mode);
1032
+ try {
1033
+ if (!delivery.canSend) {
1034
+ let gaveUp = false;
1035
+ const ready = await new Promise((resolve) => {
1036
+ const limit = window.setTimeout(() => {
1037
+ if (heldSendRef.current !== settle) return;
1038
+ heldSendRef.current = null;
1039
+ gaveUp = true;
1040
+ resolve(false);
1041
+ }, HELD_SEND_LIMIT_MS);
1042
+ const settle = (value) => {
1043
+ window.clearTimeout(limit);
1044
+ resolve(value);
1045
+ };
1046
+ heldSendRef.current = settle;
1047
+ });
1048
+ if (!ready) {
1049
+ if (gaveUp && mountedRef.current) {
1050
+ const gaveUpNotice = {
1051
+ tone: "error",
1052
+ message: messages.heldSendGaveUp ?? t("composerMessages.heldSendGaveUp")
1053
+ };
1054
+ heldSendNoticeRef.current = gaveUpNotice;
1055
+ setNotice(gaveUpNotice);
1056
+ }
1057
+ return false;
1058
+ }
1059
+ }
1060
+ const current = latestSendRef.current;
1061
+ if (current.resumesOnSend) return await current.delivery.steer();
1062
+ if (mode !== "steer" || current.singleSend) return await current.delivery.send();
1063
+ return current.delivery.sendAlternate ? await current.delivery.sendAlternate() : await current.delivery.steer();
1064
+ } finally {
1065
+ submittingRef.current = false;
1066
+ if (mountedRef.current) {
1067
+ setSubmitting(false);
1068
+ setSubmittingMode(null);
1069
+ }
1070
+ }
1071
+ },
1072
+ [
1073
+ annotationsIncomplete,
1074
+ blockedByAttachment,
1075
+ clearHeldSendNotice,
1076
+ commandDraftBlocked,
1077
+ delivery,
1078
+ disabled,
1079
+ messages.annotationNotesRequired,
1080
+ messages.heldSendGaveUp,
1081
+ messages.slashCommandBlocked,
1082
+ t,
1083
+ waitsForPreparation
1084
+ ]
1085
+ );
1086
+ const recallingRef = useRef2(false);
1087
+ const caretToEndRef = useRef2(false);
1088
+ const placeCaretAtEnd = useCallback2(() => {
1089
+ const textarea = textareaRef.current;
1090
+ if (!textarea) return;
1091
+ textarea.focus();
1092
+ const end = textarea.value.length;
1093
+ textarea.setSelectionRange(end, end);
1094
+ }, []);
1095
+ useLayoutEffect(() => {
1096
+ if (!caretToEndRef.current) return;
1097
+ caretToEndRef.current = false;
1098
+ placeCaretAtEnd();
1099
+ }, [placeCaretAtEnd, visibleValue]);
1100
+ const recallQueued = useCallback2(async () => {
1101
+ if (!queuedRecall || recallingRef.current) return;
1102
+ recallingRef.current = true;
1103
+ try {
1104
+ const outcome = await queuedRecall.recall();
1105
+ if (!mountedRef.current) return;
1106
+ if (outcome === "recalled") {
1107
+ caretToEndRef.current = true;
1108
+ window.requestAnimationFrame(() => {
1109
+ if (!caretToEndRef.current) return;
1110
+ caretToEndRef.current = false;
1111
+ placeCaretAtEnd();
1112
+ });
1113
+ } else if (outcome === "already_sent") {
1114
+ setNotice({
1115
+ tone: "ok",
1116
+ message: messages.queuedPromptAlreadySent ?? t("composerMessages.queuedPromptAlreadySent")
1117
+ });
1118
+ }
1119
+ } catch {
1120
+ } finally {
1121
+ recallingRef.current = false;
1122
+ }
1123
+ }, [messages.queuedPromptAlreadySent, placeCaretAtEnd, queuedRecall, t]);
1124
+ const handleKeyDown = useCallback2(
1125
+ (event) => {
1126
+ if (paletteEnabled && paletteMounted && palette.onKeyDown(event)) return;
1127
+ if (queuedRecall?.available && !disabled && shouldRecallQueuedOnKey(event, {
1128
+ value: event.currentTarget.value,
1129
+ selectionStart: event.currentTarget.selectionStart,
1130
+ selectionEnd: event.currentTarget.selectionEnd,
1131
+ hasOtherContent: (delivery.annotations?.length ?? 0) > 0 || (draft?.restoredResources.length ?? 0) > 0 || (attachments?.attachments.length ?? 0) > 0,
1132
+ popupOpen: paletteEnabled && paletteMounted && palette.open
1133
+ })) {
1134
+ event.preventDefault();
1135
+ void recallQueued();
1136
+ return;
1137
+ }
1138
+ if (!shouldSubmitOnKey(event)) return;
1139
+ event.preventDefault();
1140
+ void submit(shouldSteerOnKey(event) ? "steer" : "queue");
1141
+ },
1142
+ [
1143
+ attachments,
1144
+ delivery.annotations,
1145
+ disabled,
1146
+ draft?.restoredResources,
1147
+ palette,
1148
+ paletteEnabled,
1149
+ paletteMounted,
1150
+ queuedRecall,
1151
+ recallQueued,
1152
+ submit
1153
+ ]
1154
+ );
1155
+ const handlePaste = useCallback2(
1156
+ (event) => {
1157
+ if (disabled) return;
1158
+ onPaste?.(event);
1159
+ attachments?.addFromPaste(event);
1160
+ },
1161
+ [attachments, disabled, onPaste]
1162
+ );
1163
+ const handleFileChange = useCallback2(
1164
+ (event) => {
1165
+ if (!disabled && event.target.files) attachments?.addFiles(event.target.files);
1166
+ event.target.value = "";
1167
+ },
1168
+ [attachments, disabled]
1169
+ );
1170
+ const helpCommands = useMemo3(
1171
+ () => commands.filter((command) => {
1172
+ if (command.permission && commandContext) {
1173
+ const permissions = commandContext.permissions;
1174
+ return permissions.includes(command.permission) || permissions.includes("workspace:admin");
1175
+ }
1176
+ return true;
1177
+ }),
1178
+ [commandContext, commands]
1179
+ );
1180
+ const calmServiceFailure = useCalmServiceFailure(delivery.error);
1181
+ const calmActionFailure = calmServiceFailure && isActionFailure(delivery.error);
1182
+ const serviceUpdating = calmServiceFailure && !calmActionFailure || delivery.reconnecting === true;
1183
+ const activeNotice = notice ?? (calmActionFailure ? { tone: "ok", message: OPENGENI_UPDATING_ACTION_NOTICE(t) } : delivery.error && !calmServiceFailure ? {
1184
+ tone: "error",
1185
+ message: /control changed|paused while/i.test(delivery.error.message) ? messages.controlChangedError : formatError(
1186
+ delivery.error,
1187
+ composerSubmissionErrorMessage(
1188
+ t,
1189
+ delivery.error,
1190
+ delivery.canBuyCredits ?? true
1191
+ ) || messages.sendFailedError
1192
+ )
1193
+ } : null);
1194
+ useEffect(() => {
1195
+ if (notice?.tone !== "ok") return;
1196
+ const timer = window.setTimeout(
1197
+ () => setNotice((current) => current === notice ? null : current),
1198
+ 2400
1199
+ );
1200
+ return () => window.clearTimeout(timer);
1201
+ }, [notice]);
1202
+ useEffect(() => {
1203
+ if (annotationsIncomplete) return;
1204
+ setNotice(
1205
+ (current) => current?.message === messages.annotationNotesRequired ? null : current
1206
+ );
1207
+ }, [annotationsIncomplete, messages.annotationNotesRequired]);
1208
+ const attachmentCount = attachments?.attachments.length ?? 0;
1209
+ useEffect(() => {
1210
+ clearHeldSendNotice();
1211
+ }, [attachmentCount, clearHeldSendNotice, visibleValue]);
1212
+ const runControlOperation = useCallback2(async (operation) => {
1213
+ if (controlOperationRef.current) return false;
1214
+ controlOperationRef.current = true;
1215
+ try {
1216
+ await operation();
1217
+ return true;
1218
+ } finally {
1219
+ controlOperationRef.current = false;
1220
+ }
1221
+ }, []);
1222
+ const pause = useCallback2(
1223
+ async (reason) => {
1224
+ if (!control || control.pausing || control.resuming) return false;
1225
+ return await runControlOperation(() => control.pause(reason));
1226
+ },
1227
+ [control, runControlOperation]
1228
+ );
1229
+ const resume = useCallback2(
1230
+ async (reason) => {
1231
+ if (!control || control.pausing || control.resuming) return false;
1232
+ return await runControlOperation(() => control.resume(reason));
1233
+ },
1234
+ [control, runControlOperation]
1235
+ );
1236
+ const resumeScope = useCallback2(
1237
+ async (option) => {
1238
+ if (!control || control.pausing || control.resuming) return false;
1239
+ return await runControlOperation(() => control.resumeScope(option));
1240
+ },
1241
+ [control, runControlOperation]
1242
+ );
1243
+ const stop = useCallback2(async () => {
1244
+ const stopped = await pause();
1245
+ if (stopped && mountedRef.current) setStoppedHere(true);
1246
+ return stopped;
1247
+ }, [pause]);
1248
+ return {
1249
+ id,
1250
+ rootRef,
1251
+ textareaRef,
1252
+ pauseButtonRef,
1253
+ fileInputRef,
1254
+ listboxId,
1255
+ effectiveControl,
1256
+ queuedAheadCount,
1257
+ canControlWorkspace,
1258
+ controlLinks,
1259
+ disabled,
1260
+ attachments,
1261
+ messages,
1262
+ sending: delivery.sending || submitting,
1263
+ error: delivery.error,
1264
+ clearError: delivery.clearError,
1265
+ hasDraftState: draft !== void 0,
1266
+ draftConflict: draft?.draftConflict ?? null,
1267
+ draftSaving: draft?.draftSaving ?? false,
1268
+ restoredResources: draft?.restoredResources ?? [],
1269
+ removeRestoredResource: draft?.removeRestoredResource,
1270
+ resolveDraftConflict: draft?.resolveDraftConflict,
1271
+ hasControl: control !== void 0,
1272
+ runControl,
1273
+ running,
1274
+ pausing: control?.pausing ?? false,
1275
+ resuming: control?.resuming ?? false,
1276
+ pause,
1277
+ stop,
1278
+ resume,
1279
+ resumeScope,
1280
+ paused,
1281
+ controlDetailsOpen,
1282
+ setControlDetailsOpen,
1283
+ paletteMounted,
1284
+ setPaletteMounted,
1285
+ dragging,
1286
+ handleDragOver,
1287
+ handleDragLeave,
1288
+ handleDrop,
1289
+ palette,
1290
+ paletteEnabled,
1291
+ commandDraftBlocked,
1292
+ confirmState,
1293
+ settleConfirmation,
1294
+ helpOpen,
1295
+ setHelpOpen,
1296
+ helpCommands,
1297
+ activeNotice,
1298
+ /** Opengeni is updating: show the calm reconnecting line, not an error. */
1299
+ serviceUpdating,
1300
+ serviceUpdatingMessage: OPENGENI_UPDATING_NOTICE(t),
1301
+ canSubmit,
1302
+ submitBlocker,
1303
+ submit,
1304
+ busySend: delivery.busySend ?? "queue",
1305
+ singleSend,
1306
+ /** The agent works here (a turn runs or messages wait); Send uses its working wording and the Steer/Queue choice shows. */
1307
+ working,
1308
+ /** This conversation, work it started or a pending wake keeps it working; Pause is offered (lingers briefly). */
1309
+ workstreamWorking,
1310
+ alternateSend: delivery.sendAlternate && working ? delivery.alternateSend ?? null : null,
1311
+ submittingMode,
1312
+ handleKeyDown,
1313
+ handlePaste,
1314
+ handleFileChange,
1315
+ focusInput: () => textareaRef.current?.focus(),
1316
+ setValue: setComposerValue,
1317
+ value: visibleValue
1318
+ };
1319
+ }
1320
+ var ComposerContext = createContext(null);
1321
+ function useComposerController() {
1322
+ const controller = useContext(ComposerContext);
1323
+ if (!controller) throw new Error("useChatComposer must be used inside <Composer.Root>");
1324
+ return controller;
1325
+ }
1326
+ function useChatComposer() {
1327
+ return useComposerController();
1328
+ }
1329
+ function isRecord(value) {
1330
+ return typeof value === "object" && value !== null;
1331
+ }
1332
+ var Root = forwardRef(function ComposerRoot({ controller, children, className, style, responsiveBasis = "viewport", ...props }, forwardedRef) {
1333
+ const responsiveRootRef = useRef2(null);
1334
+ const responsiveContext = useMemo3(
1335
+ () => ({ responsiveBasis, rootRef: responsiveRootRef }),
1336
+ [responsiveBasis]
1337
+ );
1338
+ return /* @__PURE__ */ jsx3(ComposerContext.Provider, { value: controller, children: /* @__PURE__ */ jsx3(ComposerResponsiveContext.Provider, { value: responsiveContext, children: /* @__PURE__ */ jsx3(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsxs3(
1339
+ "div",
1340
+ {
1341
+ ...props,
1342
+ ref: mergeRefs(controller.rootRef, responsiveRootRef, forwardedRef),
1343
+ "data-og-composer-id": controller.id,
1344
+ "data-og-responsive-basis": responsiveBasis,
1345
+ className: cn("og-root og-composer", className),
1346
+ style: { paddingBottom: "env(safe-area-inset-bottom)", ...style },
1347
+ children: [
1348
+ children,
1349
+ /* @__PURE__ */ jsx3(ComposerAnnouncements, {})
1350
+ ]
1351
+ }
1352
+ ) }) }) });
1353
+ });
1354
+ var Frame = forwardRef(function ComposerFrame({ className, ...props }, ref) {
1355
+ return /* @__PURE__ */ jsx3("div", { ...props, ref, className: cn("relative", className) });
1356
+ });
1357
+ function CommandPalette2({ className }) {
1358
+ const controller = useComposerController();
1359
+ const setPaletteMounted = controller.setPaletteMounted;
1360
+ useEffect(() => {
1361
+ setPaletteMounted(true);
1362
+ return () => setPaletteMounted(false);
1363
+ }, [setPaletteMounted]);
1364
+ if (!controller.paletteEnabled) return null;
1365
+ return /* @__PURE__ */ jsx3("div", { className, children: /* @__PURE__ */ jsx3(
1366
+ CommandPalette,
1367
+ {
1368
+ open: controller.palette.open && controller.confirmState === null,
1369
+ items: controller.palette.items,
1370
+ highlight: controller.palette.highlight,
1371
+ onHighlight: controller.palette.setHighlight,
1372
+ onRun: (index) => {
1373
+ controller.palette.setHighlight(index);
1374
+ void controller.palette.runAt(index);
1375
+ },
1376
+ argHintText: controller.palette.activeArgHint,
1377
+ listboxId: controller.listboxId,
1378
+ label: controller.messages.slashCommandsLabel,
1379
+ dangerLabel: controller.messages.danger
1380
+ }
1381
+ ) });
1382
+ }
1383
+ var Surface = forwardRef(function ComposerSurface({ className, children, ...props }, ref) {
1384
+ const controller = useComposerController();
1385
+ return /* @__PURE__ */ jsxs3(
1386
+ "div",
1387
+ {
1388
+ "data-og-composer-surface": "",
1389
+ ...props,
1390
+ ref,
1391
+ onDragOver: controller.attachments ? controller.handleDragOver : void 0,
1392
+ onDragLeave: controller.attachments ? controller.handleDragLeave : void 0,
1393
+ onDrop: controller.attachments ? controller.handleDrop : void 0,
1394
+ className: cn(
1395
+ "relative rounded-og-lg border border-og-border/90 bg-og-surface-1 shadow-og-sm",
1396
+ "transition-[border-color,box-shadow] duration-200 ease-og-out",
1397
+ "focus-within:border-og-accent/50 focus-within:shadow-og-glow",
1398
+ controller.dragging && "border-dashed border-og-accent",
1399
+ className
1400
+ ),
1401
+ children: [
1402
+ controller.dragging ? /* @__PURE__ */ jsx3(
1403
+ "div",
1404
+ {
1405
+ "aria-hidden": true,
1406
+ className: cn(
1407
+ "pointer-events-none absolute inset-0 z-10 flex items-center justify-center",
1408
+ "rounded-og-lg bg-og-surface-1/85 text-og-menu font-medium text-og-accent backdrop-blur-[1px]"
1409
+ ),
1410
+ children: /* @__PURE__ */ jsxs3("span", { className: "inline-flex items-center gap-2", children: [
1411
+ /* @__PURE__ */ jsx3(PaperclipIcon, { className: "size-4" }),
1412
+ controller.messages.dropFiles
1413
+ ] })
1414
+ }
1415
+ ) : null,
1416
+ children
1417
+ ]
1418
+ }
1419
+ );
1420
+ });
1421
+ function PausedState() {
1422
+ const controller = useComposerController();
1423
+ if (!controller.paused || !controller.effectiveControl || !controller.hasControl) return null;
1424
+ return /* @__PURE__ */ jsx3(
1425
+ WorkstreamPausedStrip,
1426
+ {
1427
+ control: controller.effectiveControl,
1428
+ queuedAheadCount: controller.queuedAheadCount,
1429
+ open: controller.controlDetailsOpen,
1430
+ busy: controller.resuming,
1431
+ sending: controller.sending,
1432
+ canControlWorkspace: controller.canControlWorkspace,
1433
+ controlLinks: controller.controlLinks,
1434
+ messages: controller.messages,
1435
+ onOpenChange: controller.setControlDetailsOpen,
1436
+ onResume: () => void controller.resume(),
1437
+ onResumeOption: (option) => void controller.resumeScope(option)
1438
+ }
1439
+ );
1440
+ }
1441
+ function RestoredResources() {
1442
+ const controller = useComposerController();
1443
+ if (controller.restoredResources.length === 0 || !controller.removeRestoredResource) return null;
1444
+ return /* @__PURE__ */ jsx3(
1445
+ RestoredResourceChips,
1446
+ {
1447
+ resources: controller.restoredResources,
1448
+ messages: controller.messages,
1449
+ onRemove: controller.removeRestoredResource
1450
+ }
1451
+ );
1452
+ }
1453
+ function Attachments() {
1454
+ const controller = useComposerController();
1455
+ if (!controller.attachments || controller.attachments.attachments.length === 0) return null;
1456
+ return /* @__PURE__ */ jsx3(
1457
+ AttachmentChips,
1458
+ {
1459
+ attachments: controller.attachments.attachments,
1460
+ messages: controller.messages,
1461
+ disabled: controller.disabled,
1462
+ onRemove: controller.attachments.remove,
1463
+ onRetry: controller.attachments.retry,
1464
+ onRetainPreview: controller.attachments.retainPreview,
1465
+ onLoadPreview: controller.attachments.loadPreview
1466
+ }
1467
+ );
1468
+ }
1469
+ var EDITING_FOCUS_SELECTOR = 'input, textarea, select, [contenteditable="true"], [role="textbox"]';
1470
+ var POPUP_FOCUS_SELECTOR = '[role="menu"], [role="menubar"], [role="listbox"], [role="dialog"], [role="alertdialog"]';
1471
+ function focusBelongsElsewhere(textarea) {
1472
+ const active = textarea.ownerDocument.activeElement;
1473
+ if (!active || active === textarea) return false;
1474
+ if (active.closest(EDITING_FOCUS_SELECTOR)) return true;
1475
+ const popup = active.closest(POPUP_FOCUS_SELECTOR);
1476
+ if (popup) return !popup.contains(textarea);
1477
+ return active !== textarea.ownerDocument.body && active !== textarea.ownerDocument.documentElement;
1478
+ }
1479
+ var Input = forwardRef(function ComposerInput({ rows = 1, placeholder, className, "aria-label": ariaLabel, autoFocus = false, ...props }, forwardedRef) {
1480
+ const controller = useComposerController();
1481
+ const autoFocusedRef = useRef2(false);
1482
+ const paletteOpen = controller.paletteEnabled && controller.paletteMounted && controller.palette.open;
1483
+ useEffect(() => {
1484
+ if (!autoFocus || controller.disabled || autoFocusedRef.current) return;
1485
+ const frame = window.requestAnimationFrame(() => {
1486
+ const textarea = controller.textareaRef.current;
1487
+ if (!textarea || textarea.disabled) return;
1488
+ autoFocusedRef.current = true;
1489
+ if (focusBelongsElsewhere(textarea)) return;
1490
+ textarea.focus();
1491
+ });
1492
+ return () => window.cancelAnimationFrame(frame);
1493
+ }, [autoFocus, controller.disabled, controller.textareaRef]);
1494
+ useEffect(() => {
1495
+ const textarea = controller.textareaRef.current;
1496
+ if (!textarea || typeof ResizeObserver === "undefined") return;
1497
+ let width = textarea.clientWidth;
1498
+ let frame = null;
1499
+ const observer = new ResizeObserver(() => {
1500
+ if (textarea.clientWidth === width) return;
1501
+ width = textarea.clientWidth;
1502
+ if (frame !== null) return;
1503
+ frame = window.requestAnimationFrame(() => {
1504
+ frame = null;
1505
+ applyComposerTextareaHeight(textarea, 220);
1506
+ });
1507
+ });
1508
+ observer.observe(textarea);
1509
+ return () => {
1510
+ observer.disconnect();
1511
+ if (frame !== null) window.cancelAnimationFrame(frame);
1512
+ };
1513
+ }, [controller.textareaRef]);
1514
+ return /* @__PURE__ */ jsx3(
1515
+ "textarea",
1516
+ {
1517
+ ...props,
1518
+ ref: mergeRefs(controller.textareaRef, forwardedRef),
1519
+ rows,
1520
+ value: controller.value,
1521
+ onChange: (event) => controller.setValue(event.target.value),
1522
+ onKeyDown: controller.handleKeyDown,
1523
+ onPaste: controller.handlePaste,
1524
+ placeholder: controller.paused && !controller.disabled ? controller.messages.pausedPlaceholder : placeholder ?? controller.messages.messagePlaceholder,
1525
+ disabled: controller.disabled,
1526
+ "aria-label": ariaLabel ?? controller.messages.inputLabel,
1527
+ "aria-keyshortcuts": "Enter Meta+Enter Control+Enter Shift+Enter",
1528
+ "aria-autocomplete": controller.paletteEnabled && controller.paletteMounted ? "list" : void 0,
1529
+ "aria-controls": paletteOpen ? controller.listboxId : void 0,
1530
+ "aria-activedescendant": paletteOpen ? `${controller.listboxId}-option-${controller.palette.highlight}` : void 0,
1531
+ className: cn(
1532
+ "og-composer-input block w-full resize-none bg-transparent px-3.5 pt-3 pb-1 text-og-composer md:px-4 md:text-og-composer-wide pointer-coarse:min-h-11",
1533
+ "text-og-fg placeholder:text-og-fg-subtle focus:outline-hidden focus-visible:outline-hidden",
1534
+ "disabled:cursor-not-allowed disabled:opacity-60",
1535
+ className
1536
+ )
1537
+ }
1538
+ );
1539
+ });
1540
+ function Confirmation() {
1541
+ const controller = useComposerController();
1542
+ const command = controller.confirmState?.command;
1543
+ if (!command || !controller.confirmState) return null;
1544
+ return /* @__PURE__ */ jsx3(
1545
+ ConfirmBar,
1546
+ {
1547
+ command,
1548
+ messages: controller.messages,
1549
+ onCancel: () => controller.settleConfirmation(false),
1550
+ onConfirm: () => controller.settleConfirmation(true),
1551
+ returnFocusRef: controller.textareaRef
1552
+ }
1553
+ );
1554
+ }
1555
+ var Footer = forwardRef(function ComposerFooter({ className, children, ...props }, ref) {
1556
+ const signals = useComposerFooterSignalState();
1557
+ return /* @__PURE__ */ jsx3(
1558
+ "div",
1559
+ {
1560
+ ...props,
1561
+ ...signals.attributes,
1562
+ ref,
1563
+ className: cn(
1564
+ "og-composer-footer flex items-end gap-1.5 px-2 pb-2 pt-0.5 sm:px-2.5 sm:pb-2.5",
1565
+ // Mobile: one control row — never wrap into a second toolbar line.
1566
+ "max-sm:flex-nowrap max-sm:items-center max-sm:gap-1",
1567
+ className
1568
+ ),
1569
+ children: /* @__PURE__ */ jsx3(ComposerFooterSignalProvider, { value: signals.report, children })
1570
+ }
1571
+ );
1572
+ });
1573
+ var Controls = forwardRef(
1574
+ function ComposerControls({ className, ...props }, ref) {
1575
+ return /* @__PURE__ */ jsx3(
1576
+ "span",
1577
+ {
1578
+ ...props,
1579
+ ref,
1580
+ className: cn(
1581
+ "og-composer-controls flex min-w-0 flex-1 flex-wrap items-center gap-1.5",
1582
+ // Phone: 44px touch targets already space themselves; tight gaps leave
1583
+ // the model pill room for its name.
1584
+ "max-sm:flex-nowrap max-sm:gap-0.5",
1585
+ className
1586
+ )
1587
+ }
1588
+ );
1589
+ }
1590
+ );
1591
+ var Hint = forwardRef(function ComposerHint({ className, children, ...props }, ref) {
1592
+ const controller = useComposerController();
1593
+ return /* @__PURE__ */ jsx3(
1594
+ "span",
1595
+ {
1596
+ ...props,
1597
+ ref,
1598
+ className: cn(
1599
+ "og-composer-hint min-w-0 flex-1 px-1.5 text-og-xs text-og-fg-subtle max-sm:hidden",
1600
+ className
1601
+ ),
1602
+ children: children ?? controller.messages.keyboardHint
1603
+ }
1604
+ );
1605
+ });
1606
+ var Actions = forwardRef(function ComposerActions({ className, ...props }, ref) {
1607
+ return /* @__PURE__ */ jsx3(
1608
+ "span",
1609
+ {
1610
+ ...props,
1611
+ ref,
1612
+ className: cn(
1613
+ "og-composer-actions ml-auto flex shrink-0 items-center gap-1.5",
1614
+ "max-sm:flex-nowrap max-sm:gap-0.5",
1615
+ className
1616
+ )
1617
+ }
1618
+ );
1619
+ });
1620
+ var AttachButton = forwardRef(
1621
+ function ComposerAttachButton({ accept, multiple = true, className, "aria-label": ariaLabel, title, children, ...props }, ref) {
1622
+ const controller = useComposerController();
1623
+ if (!controller.attachments) return null;
1624
+ const tip = title ?? controller.messages.attachFiles;
1625
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
1626
+ /* @__PURE__ */ jsx3(
1627
+ "input",
1628
+ {
1629
+ ref: controller.fileInputRef,
1630
+ type: "file",
1631
+ accept,
1632
+ multiple,
1633
+ "data-og-composer-attach": true,
1634
+ className: "hidden",
1635
+ onChange: controller.handleFileChange
1636
+ }
1637
+ ),
1638
+ /* @__PURE__ */ jsx3(ComposerTip, { tip, children: /* @__PURE__ */ jsx3(
1639
+ "button",
1640
+ {
1641
+ ...props,
1642
+ ref,
1643
+ type: "button",
1644
+ disabled: controller.disabled,
1645
+ onClick: () => controller.fileInputRef.current?.click(),
1646
+ "aria-label": ariaLabel ?? tip,
1647
+ className: cn(
1648
+ "inline-flex size-8 items-center justify-center rounded-og-md",
1649
+ "text-og-fg-muted transition-colors duration-150 hover:bg-og-surface-2 hover:text-og-fg",
1650
+ "disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-11",
1651
+ className
1652
+ ),
1653
+ children: children ?? /* @__PURE__ */ jsx3(PaperclipIcon, { className: "size-4" })
1654
+ }
1655
+ ) })
1656
+ ] });
1657
+ }
1658
+ );
1659
+ function ModelPicker2({
1660
+ models,
1661
+ rows,
1662
+ value,
1663
+ onChange,
1664
+ label,
1665
+ className,
1666
+ codexOnly
1667
+ }) {
1668
+ const controller = useComposerController();
1669
+ return /* @__PURE__ */ jsx3(
1670
+ ModelPicker,
1671
+ {
1672
+ models,
1673
+ rows,
1674
+ value,
1675
+ onChange: (modelId) => onChange?.(modelId),
1676
+ disabled: controller.disabled,
1677
+ label: label ?? controller.messages.modelLabel,
1678
+ className,
1679
+ codexOnly
1680
+ }
1681
+ );
1682
+ }
1683
+ function pausePresence(controller) {
1684
+ if (controller.runControl !== "pause" || !controller.effectiveControl || controller.paused || !controller.hasControl)
1685
+ return "none";
1686
+ return controller.workstreamWorking ? "shown" : "reserved";
1687
+ }
1688
+ var PAUSE_BOX_CLASS = "inline-flex size-8 items-center justify-center pointer-coarse:size-11";
1689
+ var PAUSE_YIELDS_CLASS = "og-composer-pause-yields max-sm:hidden";
1690
+ function PauseButtonSlot() {
1691
+ const controller = useComposerController();
1692
+ if (pausePresence(controller) !== "reserved") return null;
1693
+ return /* @__PURE__ */ jsx3(
1694
+ "span",
1695
+ {
1696
+ "aria-hidden": true,
1697
+ "data-og-composer-pause-slot": "",
1698
+ className: cn(
1699
+ PAUSE_BOX_CLASS,
1700
+ "invisible shrink-0",
1701
+ controller.submitBlocker !== "empty" && PAUSE_YIELDS_CLASS
1702
+ )
1703
+ }
1704
+ );
1705
+ }
1706
+ var PauseButton = forwardRef(
1707
+ function ComposerPauseButton({ className, "aria-label": ariaLabel, title, children, ...props }, ref) {
1708
+ const controller = useComposerController();
1709
+ if (pausePresence(controller) !== "shown") return null;
1710
+ const busy = controller.pausing || controller.resuming;
1711
+ const tip = title ?? controller.messages.pauseTitle;
1712
+ const yieldsToDraft = controller.submitBlocker !== "empty";
1713
+ return /* @__PURE__ */ jsx3(ComposerTip, { tip, children: /* @__PURE__ */ jsx3(
1714
+ "button",
1715
+ {
1716
+ "data-analytics-action": "pause",
1717
+ ...props,
1718
+ ref: mergeRefs(controller.pauseButtonRef, ref),
1719
+ type: "button",
1720
+ onClick: () => void controller.pause(),
1721
+ disabled: busy,
1722
+ "aria-label": ariaLabel ?? controller.messages.pauseAriaLabel,
1723
+ className: cn(
1724
+ PAUSE_BOX_CLASS,
1725
+ "rounded-og-md border border-og-border",
1726
+ "bg-og-surface-2 text-og-fg-muted transition-colors duration-150",
1727
+ "hover:border-og-status-waiting/50 hover:text-og-status-waiting",
1728
+ "disabled:opacity-50",
1729
+ yieldsToDraft && PAUSE_YIELDS_CLASS,
1730
+ className
1731
+ ),
1732
+ children: children ?? (busy ? /* @__PURE__ */ jsx3(LoaderCircleIcon, { className: "size-3.5 animate-og-spin" }) : /* @__PURE__ */ jsx3(PauseIcon, { className: "size-3.5 fill-current" }))
1733
+ }
1734
+ ) });
1735
+ }
1736
+ );
1737
+ var StopButton = forwardRef(
1738
+ function ComposerStopButton({ className, "aria-label": ariaLabel, title, children, ...props }, ref) {
1739
+ const t = useOpenGeniText();
1740
+ const controller = useComposerController();
1741
+ if (controller.runControl !== "stop" || !controller.running || !controller.hasControl || controller.effectiveControl?.state === "paused")
1742
+ return null;
1743
+ const busy = controller.pausing;
1744
+ const label = ariaLabel ?? controller.messages.stopAriaLabel ?? t("composer.stop");
1745
+ const tip = title ?? controller.messages.stopTitle ?? label;
1746
+ return /* @__PURE__ */ jsx3(ComposerTip, { tip, children: /* @__PURE__ */ jsx3(
1747
+ "button",
1748
+ {
1749
+ "data-analytics-action": "stop",
1750
+ "data-og-composer-stop": "",
1751
+ ...props,
1752
+ ref,
1753
+ type: "button",
1754
+ onClick: () => void controller.stop(),
1755
+ disabled: busy,
1756
+ "aria-label": label,
1757
+ className: cn(
1758
+ "inline-flex size-8 items-center justify-center rounded-og-md border border-og-border pointer-coarse:size-11",
1759
+ "bg-og-surface-1 text-og-fg transition-colors duration-150",
1760
+ "hover:bg-og-surface-2 disabled:opacity-50",
1761
+ className
1762
+ ),
1763
+ children: children ?? (busy ? /* @__PURE__ */ jsx3(LoaderCircleIcon, { className: "size-3.5 animate-og-spin" }) : /* @__PURE__ */ jsx3(SquareIcon, { className: "size-3 fill-current" }))
1764
+ }
1765
+ ) });
1766
+ }
1767
+ );
1768
+ var AlternateSendButton = forwardRef(
1769
+ function ComposerAlternateSendButton({ className, "aria-label": ariaLabel, title, children, ...props }, ref) {
1770
+ const t = useOpenGeniText();
1771
+ const controller = useComposerController();
1772
+ if (controller.alternateSend === null || controller.paused || controller.submitBlocker === "empty" || controller.submitBlocker === "disabled")
1773
+ return null;
1774
+ const queues = controller.alternateSend === "queue";
1775
+ const label = queues ? controller.messages.queueLabel ?? t("composerMessages.queue") : controller.messages.steerLabel ?? t("composerMessages.steer");
1776
+ const tip = title ?? (controller.submitBlocker === "annotations" ? controller.messages.annotationNotesRequired : queues ? controller.messages.queueTitle ?? t("composerMessages.queueRunsAfterCurrentWork") : controller.messages.steerTitle ?? t("composerMessages.steerReadsItSoon"));
1777
+ const inFlight = controller.sending && controller.submittingMode === "steer";
1778
+ return /* @__PURE__ */ jsx3(ComposerTip, { tip, children: /* @__PURE__ */ jsx3(
1779
+ "button",
1780
+ {
1781
+ "data-analytics-action": queues ? "queue" : "steer",
1782
+ "data-og-composer-alternate-send": "",
1783
+ ...props,
1784
+ ref,
1785
+ type: "button",
1786
+ onClick: (event) => {
1787
+ const hadFocus = event.currentTarget === document.activeElement;
1788
+ void controller.submit("steer").then((sent) => {
1789
+ if (sent && hadFocus) controller.focusInput();
1790
+ });
1791
+ },
1792
+ disabled: !controller.canSubmit,
1793
+ "aria-label": ariaLabel ?? label,
1794
+ "aria-keyshortcuts": "Meta+Enter Control+Enter",
1795
+ className: cn(
1796
+ "inline-flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-og-md px-2.5 pointer-coarse:h-11 pointer-coarse:px-3.5",
1797
+ "border border-og-border bg-og-surface-1 text-og-control font-medium text-og-fg",
1798
+ "transition-[background-color,transform,opacity] duration-150 ease-og-spring",
1799
+ "hover:bg-og-surface-2 active:scale-95",
1800
+ "disabled:cursor-not-allowed disabled:opacity-50",
1801
+ className
1802
+ ),
1803
+ children: children ?? (inFlight ? /* @__PURE__ */ jsxs3(Fragment, { children: [
1804
+ /* @__PURE__ */ jsx3(LoaderCircleIcon, { "aria-hidden": "true", className: "size-3.5 animate-og-spin" }),
1805
+ /* @__PURE__ */ jsx3("span", { children: label })
1806
+ ] }) : label)
1807
+ }
1808
+ ) });
1809
+ }
1810
+ );
1811
+ var SendButton = forwardRef(
1812
+ function ComposerSendButton({ className, "aria-label": ariaLabel, title, children, ...props }, ref) {
1813
+ const controller = useComposerController();
1814
+ const tip = title ?? (controller.submitBlocker === "annotations" ? controller.messages.annotationNotesRequired : controller.paused ? controller.messages.sendAndResumeTitle : !controller.working ? controller.messages.idleSendTitle ?? controller.messages.sendTitle : controller.busySend === "steer" ? controller.messages.steerSendTitle ?? controller.messages.sendTitle : controller.messages.sendTitle);
1815
+ return /* @__PURE__ */ jsx3(ComposerTip, { tip, children: /* @__PURE__ */ jsx3(
1816
+ "button",
1817
+ {
1818
+ "data-analytics-action": "send",
1819
+ ...props,
1820
+ ref,
1821
+ type: "button",
1822
+ onClick: (event) => {
1823
+ const hadFocus = event.currentTarget === document.activeElement;
1824
+ void controller.submit("queue").then((sent) => {
1825
+ if (sent && hadFocus) controller.focusInput();
1826
+ });
1827
+ },
1828
+ disabled: !controller.canSubmit,
1829
+ "data-og-tip": tip,
1830
+ "aria-label": ariaLabel ?? (controller.paused ? controller.messages.sendAndResumeAriaLabel : controller.messages.sendMessageAriaLabel),
1831
+ className: cn(
1832
+ "inline-flex size-8 items-center justify-center rounded-og-md pointer-coarse:size-11",
1833
+ "border border-og-primary-border bg-og-primary text-og-primary-fg",
1834
+ "transition-[background-color,transform,opacity] duration-150 ease-og-spring",
1835
+ "hover:bg-og-primary-hover active:scale-95",
1836
+ "disabled:cursor-not-allowed disabled:opacity-50",
1837
+ className
1838
+ ),
1839
+ children: children ?? (controller.sending && controller.submittingMode !== "steer" ? /* @__PURE__ */ jsx3(LoaderCircleIcon, { className: "size-4 animate-og-spin" }) : /* @__PURE__ */ jsx3(ArrowUpIcon, { className: "size-4" }))
1840
+ }
1841
+ ) });
1842
+ }
1843
+ );
1844
+ function Help() {
1845
+ const controller = useComposerController();
1846
+ return /* @__PURE__ */ jsx3(AnimatePresence2, { children: controller.helpOpen ? /* @__PURE__ */ jsx3(
1847
+ HelpPanel,
1848
+ {
1849
+ commands: controller.helpCommands,
1850
+ messages: controller.messages,
1851
+ onClose: () => controller.setHelpOpen(false)
1852
+ }
1853
+ ) : null });
1854
+ }
1855
+ function Status() {
1856
+ const controller = useComposerController();
1857
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
1858
+ /* @__PURE__ */ jsx3(AnimatePresence2, { children: controller.activeNotice ? (
1859
+ // Visible only: the composer root's ComposerAnnouncements region
1860
+ // already announces this notice, so a second live region here would
1861
+ // make screen readers read it twice.
1862
+ /* @__PURE__ */ jsx3(
1863
+ motion2.p,
1864
+ {
1865
+ initial: { opacity: 0, height: 0 },
1866
+ animate: { opacity: 1, height: "auto" },
1867
+ exit: { opacity: 0, height: 0 },
1868
+ className: cn(
1869
+ "overflow-hidden px-1 pt-1.5 text-og-control",
1870
+ controller.activeNotice.tone === "ok" ? "text-og-fg-muted" : "text-og-status-failed"
1871
+ ),
1872
+ children: controller.activeNotice.message
1873
+ },
1874
+ "notice"
1875
+ )
1876
+ ) : controller.serviceUpdating ? /* @__PURE__ */ jsxs3(
1877
+ motion2.p,
1878
+ {
1879
+ "data-og-composer-status": "updating",
1880
+ initial: { opacity: 0, height: 0 },
1881
+ animate: { opacity: 1, height: "auto" },
1882
+ exit: { opacity: 0, height: 0 },
1883
+ className: "flex items-center gap-1.5 overflow-hidden px-1 pt-1.5 text-og-control text-og-fg-muted",
1884
+ children: [
1885
+ /* @__PURE__ */ jsx3(
1886
+ LoaderCircleIcon,
1887
+ {
1888
+ "aria-hidden": "true",
1889
+ className: "size-3.5 shrink-0 animate-og-spin motion-reduce:animate-none"
1890
+ }
1891
+ ),
1892
+ /* @__PURE__ */ jsx3("span", { children: controller.serviceUpdatingMessage })
1893
+ ]
1894
+ },
1895
+ "service-updating"
1896
+ ) : null }),
1897
+ controller.draftConflict ? /* @__PURE__ */ jsxs3("div", { className: "mt-1.5 flex flex-wrap items-center gap-2 px-1 text-og-xs text-og-status-failed", children: [
1898
+ /* @__PURE__ */ jsx3("span", { className: "min-w-0 flex-1", children: controller.messages.draftConflict }),
1899
+ /* @__PURE__ */ jsx3(
1900
+ "button",
1901
+ {
1902
+ type: "button",
1903
+ className: "underline underline-offset-2",
1904
+ onClick: () => void controller.resolveDraftConflict?.("use_remote"),
1905
+ children: controller.messages.useOtherDraft
1906
+ }
1907
+ ),
1908
+ /* @__PURE__ */ jsx3(
1909
+ "button",
1910
+ {
1911
+ type: "button",
1912
+ className: "font-medium underline underline-offset-2",
1913
+ onClick: () => void controller.resolveDraftConflict?.("keep_mine"),
1914
+ children: controller.messages.keepMine
1915
+ }
1916
+ )
1917
+ ] }) : null
1918
+ ] });
1919
+ }
1920
+ function ComposerAnnouncements() {
1921
+ const controller = useComposerController();
1922
+ return /* @__PURE__ */ jsxs3("div", { className: "sr-only", children: [
1923
+ controller.activeNotice ? /* @__PURE__ */ jsx3("p", { role: controller.activeNotice.tone === "error" ? "alert" : "status", children: controller.activeNotice.message }) : controller.serviceUpdating ? /* @__PURE__ */ jsx3("p", { role: "status", children: controller.serviceUpdatingMessage }) : null,
1924
+ controller.draftConflict ? /* @__PURE__ */ jsx3("p", { role: "alert", children: controller.messages.draftConflict }) : null
1925
+ ] });
1926
+ }
1927
+ function mergeRefs(...refs) {
1928
+ return (node) => {
1929
+ for (const ref of refs) {
1930
+ if (typeof ref === "function") ref(node);
1931
+ else if (ref) ref.current = node;
1932
+ }
1933
+ };
1934
+ }
1935
+ function WorkstreamPausedStrip({
1936
+ control,
1937
+ queuedAheadCount,
1938
+ open,
1939
+ busy,
1940
+ sending,
1941
+ canControlWorkspace,
1942
+ controlLinks,
1943
+ messages,
1944
+ onOpenChange,
1945
+ onResume,
1946
+ onResumeOption
1947
+ }) {
1948
+ const blocker = control.primaryBlocker;
1949
+ const cause = blocker?.kind === "workspace" ? messages.workspacePaused : control.directState === "paused" ? messages.pausedHere : messages.pausedBy(blocker?.displayName ?? messages.parentBlocker);
1950
+ const primary = control.resumeOptions.find((option) => option.scope === "selected");
1951
+ const broaderOptions = control.resumeOptions.filter(
1952
+ (option) => option !== primary && option.scope !== "selected" && (option.scope !== "workspace" || canControlWorkspace)
1953
+ );
1954
+ return /* @__PURE__ */ jsxs3("div", { className: "border-b border-og-status-waiting/25 bg-og-status-waiting/[0.07]", children: [
1955
+ /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 items-center gap-2 px-3 py-2", children: [
1956
+ /* @__PURE__ */ jsx3(PauseIcon, { className: "size-3.5 shrink-0 text-og-status-waiting" }),
1957
+ /* @__PURE__ */ jsxs3(
1958
+ "button",
1959
+ {
1960
+ type: "button",
1961
+ className: "min-w-0 flex-1 text-left",
1962
+ onClick: () => onOpenChange(!open),
1963
+ "aria-expanded": open,
1964
+ children: [
1965
+ /* @__PURE__ */ jsx3("span", { className: "block truncate text-og-xs font-medium text-og-fg", children: cause }),
1966
+ /* @__PURE__ */ jsx3("span", { className: "block truncate text-[11px] text-og-fg-muted", children: queuedAheadCount > 0 ? messages.queuedAhead(queuedAheadCount) : sending ? messages.resumingAndSending : messages.nextMessageResumes })
1967
+ ]
1968
+ }
1969
+ ),
1970
+ /* @__PURE__ */ jsxs3(
1971
+ "button",
1972
+ {
1973
+ type: "button",
1974
+ "aria-label": messages.resumeThisWorkstream,
1975
+ 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",
1976
+ disabled: busy,
1977
+ onClick: onResume,
1978
+ children: [
1979
+ busy ? /* @__PURE__ */ jsx3(LoaderCircleIcon, { className: "size-3.5 animate-og-spin" }) : /* @__PURE__ */ jsx3(PlayIcon, { className: "size-3.5 fill-current" }),
1980
+ /* @__PURE__ */ jsx3("span", { className: "og-composer-resume-label-long hidden min-[400px]:inline", children: messages.resumeThisWorkstream }),
1981
+ /* @__PURE__ */ jsx3("span", { className: "og-composer-resume-label-short min-[400px]:hidden", children: messages.resumeShort })
1982
+ ]
1983
+ }
1984
+ ),
1985
+ /* @__PURE__ */ jsx3(
1986
+ "button",
1987
+ {
1988
+ type: "button",
1989
+ className: "inline-flex size-8 shrink-0 items-center justify-center rounded-og-md text-og-fg-muted hover:bg-og-surface-2 pointer-coarse:size-11",
1990
+ onClick: () => onOpenChange(!open),
1991
+ "aria-label": open ? messages.hidePauseDetails : messages.showPauseDetails,
1992
+ children: /* @__PURE__ */ jsx3(ChevronDownIcon2, { className: cn("size-3.5 transition-transform", open && "rotate-180") })
1993
+ }
1994
+ )
1995
+ ] }),
1996
+ open ? /* @__PURE__ */ jsxs3("div", { className: "border-t border-og-status-waiting/20 px-3 pb-3 pt-2", children: [
1997
+ /* @__PURE__ */ jsx3("ul", { className: "grid gap-2", "aria-label": messages.pauseReasonsLabel, children: control.blockers.map((entry, index) => /* @__PURE__ */ jsxs3(
1998
+ "li",
1999
+ {
2000
+ className: "text-og-xs",
2001
+ children: [
2002
+ /* @__PURE__ */ jsx3("span", { className: "font-medium text-og-fg", children: index === 0 ? messages.pausedByLabel : messages.alsoPausedByLabel }),
2003
+ blockerHref(entry, controlLinks) ? /* @__PURE__ */ jsx3(
2004
+ "a",
2005
+ {
2006
+ href: blockerHref(entry, controlLinks),
2007
+ className: "font-medium text-og-fg underline decoration-og-border-strong underline-offset-2 hover:text-og-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent/40",
2008
+ children: entry.displayName
2009
+ }
2010
+ ) : /* @__PURE__ */ jsx3("span", { className: "font-medium text-og-fg", children: entry.displayName }),
2011
+ entry.reason ? /* @__PURE__ */ jsxs3("span", { className: "text-og-fg-muted", children: [
2012
+ " \xB7 ",
2013
+ entry.reason
2014
+ ] }) : null,
2015
+ entry.actor ? /* @__PURE__ */ jsxs3("span", { className: "text-og-fg-subtle", children: [
2016
+ " \xB7 ",
2017
+ entry.actor
2018
+ ] }) : null,
2019
+ entry.changedAt ? /* @__PURE__ */ jsxs3("span", { className: "text-og-fg-subtle", children: [
2020
+ " ",
2021
+ "\xB7 ",
2022
+ messages.formatRelativeTime(entry.changedAt)
2023
+ ] }) : null
2024
+ ]
2025
+ },
2026
+ `${entry.kind}-${entry.sessionId ?? "workspace"}-${entry.revision}`
2027
+ )) }),
2028
+ broaderOptions.length > 0 ? /* @__PURE__ */ jsx3("div", { className: "mt-2 flex flex-wrap gap-1.5", children: broaderOptions.map((option) => /* @__PURE__ */ jsx3(
2029
+ ComposerTip,
2030
+ {
2031
+ tip: option.impactCopy,
2032
+ children: /* @__PURE__ */ jsxs3(
2033
+ "button",
2034
+ {
2035
+ type: "button",
2036
+ disabled: busy,
2037
+ onClick: () => onResumeOption(option),
2038
+ className: "rounded-og-md border border-og-border bg-og-surface-1 px-2 py-1 text-og-xs text-og-fg-muted hover:bg-og-surface-2 hover:text-og-fg pointer-coarse:min-h-10",
2039
+ children: [
2040
+ /* @__PURE__ */ jsx3("span", { className: "block font-medium", children: option.scope === "workspace" ? messages.resumeWorkspace : messages.resumeFromSession }),
2041
+ /* @__PURE__ */ jsx3("span", { className: "block text-[10px] text-og-fg-subtle", children: option.selectedStateAfter === "active" ? messages.sessionCanRun : messages.stillPausedBy(
2042
+ option.remainingPrimaryBlocker?.displayName ?? messages.narrowerPause
2043
+ ) })
2044
+ ]
2045
+ }
2046
+ )
2047
+ },
2048
+ `${option.scope}-${option.targetId ?? "selected"}`
2049
+ )) }) : null
2050
+ ] }) : null
2051
+ ] });
2052
+ }
2053
+ function blockerHref(blocker, links) {
2054
+ if (blocker.kind === "workspace") return links?.workspaceHref;
2055
+ return blocker.sessionId ? links?.sessionHref?.(blocker.sessionId) : void 0;
2056
+ }
2057
+ function RestoredResourceChips({
2058
+ resources,
2059
+ messages,
2060
+ onRemove
2061
+ }) {
2062
+ return /* @__PURE__ */ jsx3(
2063
+ "div",
2064
+ {
2065
+ className: "flex flex-wrap gap-1.5 border-b border-og-border px-3 py-2",
2066
+ "aria-label": messages.restoredResourcesLabel,
2067
+ children: resources.map((resource, index) => /* @__PURE__ */ jsxs3(
2068
+ "span",
2069
+ {
2070
+ className: "inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-og-md border border-og-border bg-og-surface-2 px-2 py-1 text-og-xs text-og-fg-muted",
2071
+ children: [
2072
+ /* @__PURE__ */ jsx3(FileIcon, { className: "size-3 shrink-0" }),
2073
+ /* @__PURE__ */ jsx3("span", { className: "truncate", children: resource.kind === "file" ? messages.restoredFile(resource.fileId) : resource.uri }),
2074
+ /* @__PURE__ */ jsx3(
2075
+ "button",
2076
+ {
2077
+ type: "button",
2078
+ className: "shrink-0 hover:text-og-fg",
2079
+ onClick: () => onRemove(index),
2080
+ "aria-label": messages.removeRestoredResource(index),
2081
+ children: /* @__PURE__ */ jsx3(XIcon, { className: "size-3" })
2082
+ }
2083
+ )
2084
+ ]
2085
+ },
2086
+ `${resource.kind}-${resource.kind === "file" ? resource.fileId : resource.uri}`
2087
+ ))
2088
+ }
2089
+ );
2090
+ }
2091
+ function ConfirmBar({
2092
+ command,
2093
+ messages,
2094
+ onCancel,
2095
+ onConfirm,
2096
+ returnFocusRef
2097
+ }) {
2098
+ const confirmRef = useRef2(null);
2099
+ const descriptionId = useId2();
2100
+ useEffect(() => {
2101
+ const returnTo = returnFocusRef?.current ?? null;
2102
+ confirmRef.current?.focus();
2103
+ return () => returnTo?.focus();
2104
+ }, [returnFocusRef]);
2105
+ return /* @__PURE__ */ jsxs3(
2106
+ "div",
2107
+ {
2108
+ role: "alertdialog",
2109
+ "aria-label": messages.confirmCommand(command.name),
2110
+ "aria-describedby": descriptionId,
2111
+ "data-testid": "danger-confirm",
2112
+ onKeyDown: (event) => {
2113
+ if (event.key === "Escape") {
2114
+ event.preventDefault();
2115
+ event.stopPropagation();
2116
+ onCancel();
2117
+ }
2118
+ },
2119
+ className: "flex items-end justify-between gap-2 px-2.5 pb-2.5 pt-1",
2120
+ children: [
2121
+ /* @__PURE__ */ jsx3("span", { id: descriptionId, className: "min-w-0 flex-1 px-1.5 text-og-sm text-og-status-failed", children: messages.confirmDescription(command) }),
2122
+ /* @__PURE__ */ jsxs3("span", { className: "flex shrink-0 items-center gap-1.5", children: [
2123
+ /* @__PURE__ */ jsx3(
2124
+ "button",
2125
+ {
2126
+ type: "button",
2127
+ onClick: onCancel,
2128
+ className: "rounded-og-md border border-og-border bg-og-surface-2 px-2.5 py-1 text-og-sm text-og-fg-muted hover:bg-og-surface-3 pointer-coarse:min-h-11",
2129
+ children: messages.cancel
2130
+ }
2131
+ ),
2132
+ /* @__PURE__ */ jsx3(
2133
+ "button",
2134
+ {
2135
+ ref: confirmRef,
2136
+ type: "button",
2137
+ onClick: onConfirm,
2138
+ className: "rounded-og-md border border-og-status-failed/50 bg-og-status-failed/15 px-2.5 py-1 text-og-sm text-og-status-failed hover:bg-og-status-failed/25 pointer-coarse:min-h-11",
2139
+ children: messages.runCommand(command.name)
2140
+ }
2141
+ )
2142
+ ] })
2143
+ ]
2144
+ }
2145
+ );
2146
+ }
2147
+ function AttachmentChips({
2148
+ attachments,
2149
+ messages,
2150
+ disabled,
2151
+ onRemove,
2152
+ onRetry,
2153
+ onRetainPreview,
2154
+ onLoadPreview
2155
+ }) {
2156
+ const t = useOpenGeniText();
2157
+ const lightbox = useLightboxOptional();
2158
+ const previewRequest = useRef2(null);
2159
+ const [previewLoadingId, setPreviewLoadingId] = useState2(null);
2160
+ const [previewErrorId, setPreviewErrorId] = useState2(null);
2161
+ const [storedThumbs, setStoredThumbs] = useState2({});
2162
+ const [brokenLocal, setBrokenLocal] = useState2(() => /* @__PURE__ */ new Set());
2163
+ const thumbRequests = useRef2(/* @__PURE__ */ new Map());
2164
+ const localPreview = (attachment) => attachment.previewUrl && !brokenLocal.has(attachment.id) ? attachment.previewUrl : void 0;
2165
+ useEffect(() => {
2166
+ if (!onLoadPreview) return;
2167
+ for (const attachment of attachments) {
2168
+ const id = attachment.id;
2169
+ if (attachment.status !== "ready" || !attachment.file || !attachment.contentType.startsWith("image/") || attachment.previewUrl && !brokenLocal.has(id) || storedThumbs[id] || thumbRequests.current.has(id)) {
2170
+ continue;
2171
+ }
2172
+ const controller = new AbortController();
2173
+ thumbRequests.current.set(id, controller);
2174
+ void onLoadPreview(id, controller.signal).then((url) => {
2175
+ if (url && !controller.signal.aborted) {
2176
+ setStoredThumbs((current) => ({ ...current, [id]: url }));
2177
+ }
2178
+ }).catch(() => void 0).finally(() => {
2179
+ if (thumbRequests.current.get(id) === controller) thumbRequests.current.delete(id);
2180
+ });
2181
+ }
2182
+ }, [attachments, brokenLocal, onLoadPreview, storedThumbs]);
2183
+ useEffect(() => {
2184
+ const requests = thumbRequests.current;
2185
+ return () => {
2186
+ for (const controller of requests.values()) controller.abort();
2187
+ requests.clear();
2188
+ };
2189
+ }, []);
2190
+ useEffect(() => () => previewRequest.current?.abort(), [onLoadPreview]);
2191
+ async function openPreview(attachment, source, canLoadPreview) {
2192
+ previewRequest.current?.abort();
2193
+ const attachmentId = attachment.id;
2194
+ const local = localPreview(attachment);
2195
+ const releaseSource = local ? onRetainPreview(attachmentId) : void 0;
2196
+ let src = local ?? storedThumbs[attachmentId];
2197
+ if (!releaseSource && canLoadPreview) src = storedThumbs[attachmentId];
2198
+ if (!src && canLoadPreview) {
2199
+ const controller = new AbortController();
2200
+ previewRequest.current = controller;
2201
+ setPreviewLoadingId(attachmentId);
2202
+ setPreviewErrorId(null);
2203
+ try {
2204
+ src = await onLoadPreview(attachmentId, controller.signal);
2205
+ if (controller.signal.aborted) return;
2206
+ if (!src) {
2207
+ setPreviewErrorId(attachmentId);
2208
+ return;
2209
+ }
2210
+ } catch {
2211
+ if (!controller.signal.aborted) setPreviewErrorId(attachmentId);
2212
+ return;
2213
+ } finally {
2214
+ if (previewRequest.current === controller) {
2215
+ setPreviewLoadingId(null);
2216
+ }
2217
+ }
2218
+ }
2219
+ lightbox.open(
2220
+ src,
2221
+ attachment.name,
2222
+ source,
2223
+ messages.attachmentPreviewLabel,
2224
+ attachment.name,
2225
+ {
2226
+ download: messages.downloadAttachment(attachment.name),
2227
+ close: messages.closeAttachmentPreview
2228
+ },
2229
+ releaseSource
2230
+ );
2231
+ }
2232
+ return (
2233
+ // Compact chips extend their touch targets beyond their visible borders.
2234
+ // Keep neighboring rows and columns outside those expanded hit areas.
2235
+ /* @__PURE__ */ jsx3("div", { className: "flex flex-wrap gap-1.5 px-3 pt-2 pb-0.5 pointer-coarse:gap-2.5", children: attachments.map((attachment) => {
2236
+ const failed = attachment.status === "failed";
2237
+ const secureContextRequired = attachment.errorCode === "secure_context_required";
2238
+ const previewFailed = previewErrorId === attachment.id;
2239
+ const previewLoading = previewLoadingId === attachment.id;
2240
+ const local = localPreview(attachment);
2241
+ const thumb = local ?? storedThumbs[attachment.id];
2242
+ const onThumbError = local ? () => setBrokenLocal(
2243
+ (current) => current.has(attachment.id) ? current : new Set(current).add(attachment.id)
2244
+ ) : void 0;
2245
+ const canLoadPreview = Boolean(
2246
+ lightbox && onLoadPreview && attachment.status === "ready" && attachment.file && attachment.contentType.startsWith("image/")
2247
+ );
2248
+ const appShot = attachment.appShot;
2249
+ const statusText = previewFailed ? messages.previewUnavailable ?? t("composer.previewUnavailable") : attachment.status === "uploading" ? messages.uploading : failed ? attachment.error || messages.uploadFailed : appShot ? t("composer.appShotSummary", { app: appShot.app }) : messages.formatBytes(attachment.sizeBytes);
2250
+ const displayName = appShot ? appShot.title.trim() || appShot.app : attachment.name;
2251
+ const compact = !appShot && !failed && !previewFailed;
2252
+ const thumbSize = appShot ? "h-10 w-16" : compact ? "size-6" : "size-8";
2253
+ return /* @__PURE__ */ jsxs3(
2254
+ "div",
2255
+ {
2256
+ "data-app-shot": appShot ? "" : void 0,
2257
+ className: cn(
2258
+ "flex min-w-0 items-center gap-2 rounded-og-md border text-og-sm",
2259
+ compact ? "py-1 pr-1 pl-1" : "px-2 py-1.5",
2260
+ // A captured window arrives from outside the page: let it settle in.
2261
+ appShot && "animate-og-enter",
2262
+ failed ? cn(
2263
+ "border-og-status-failed/40 bg-og-status-failed/10",
2264
+ secureContextRequired ? "max-w-full items-start sm:max-w-[32rem]" : appShot ? "max-w-[320px]" : "max-w-[240px]"
2265
+ ) : cn(
2266
+ "border-og-border bg-og-surface-2",
2267
+ appShot ? "max-w-[320px]" : "max-w-[240px]"
2268
+ )
2269
+ ),
2270
+ children: [
2271
+ lightbox && (thumb || canLoadPreview) ? /* @__PURE__ */ jsx3(
2272
+ "button",
2273
+ {
2274
+ type: "button",
2275
+ className: cn(
2276
+ thumbSize,
2277
+ "shrink-0 overflow-hidden rounded outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent",
2278
+ // The slim chip's 24px preview keeps a 44px touch target; the
2279
+ // hit area grows over the name, never the remove button.
2280
+ compact && "relative overflow-visible pointer-coarse:before:absolute pointer-coarse:before:-inset-y-2.5 pointer-coarse:before:-left-2.5 pointer-coarse:before:-right-2.5 pointer-coarse:before:content-['']",
2281
+ appShot && "border border-og-border bg-og-surface-1",
2282
+ !thumb && "flex items-center justify-center disabled:cursor-wait"
2283
+ ),
2284
+ "aria-label": messages.previewAttachment(displayName),
2285
+ "aria-busy": previewLoading || void 0,
2286
+ disabled: previewLoading,
2287
+ onClick: (event) => void openPreview(attachment, event.currentTarget, canLoadPreview),
2288
+ children: thumb ? /* @__PURE__ */ jsx3(
2289
+ "img",
2290
+ {
2291
+ src: thumb,
2292
+ alt: "",
2293
+ onError: onThumbError,
2294
+ className: cn(
2295
+ "h-full w-full object-cover transition-opacity hover:opacity-80",
2296
+ appShot && "object-top",
2297
+ compact && "rounded"
2298
+ )
2299
+ }
2300
+ ) : previewLoading ? /* @__PURE__ */ jsx3(LoaderCircleIcon, { className: "size-4 animate-og-spin text-og-fg-muted" }) : /* @__PURE__ */ jsx3(ImageIcon, { className: "size-4 text-og-fg-muted" })
2301
+ }
2302
+ ) : thumb ? /* @__PURE__ */ jsx3(
2303
+ "img",
2304
+ {
2305
+ src: thumb,
2306
+ alt: "",
2307
+ onError: onThumbError,
2308
+ className: cn(thumbSize, "shrink-0 rounded object-cover", appShot && "object-top")
2309
+ }
2310
+ ) : attachment.contentType.startsWith("image/") ? /* @__PURE__ */ jsx3(ImageIcon, { className: "size-4 shrink-0 text-og-fg-muted" }) : /* @__PURE__ */ jsx3(FileIcon, { className: "size-4 shrink-0 text-og-fg-muted" }),
2311
+ compact ? /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 flex-1 items-baseline gap-1.5", children: [
2312
+ /* @__PURE__ */ jsx3("span", { className: "truncate font-medium text-og-fg", children: displayName }),
2313
+ /* @__PURE__ */ jsx3("span", { className: "shrink-0 text-og-xs text-og-fg-subtle tabular-nums", children: statusText })
2314
+ ] }) : /* @__PURE__ */ jsxs3("div", { className: "min-w-0 flex-1", children: [
2315
+ /* @__PURE__ */ jsx3("div", { className: "truncate font-medium text-og-fg", children: displayName }),
2316
+ appShot && !failed && !previewFailed && attachment.status !== "uploading" ? /* @__PURE__ */ jsx3(
2317
+ ComposerTip,
2318
+ {
2319
+ tip: appShot.text?.trim() ? t("composer.appShotTextIncluded") : t("composer.appShotNoText"),
2320
+ children: /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 items-center gap-1 text-og-xs text-og-fg-subtle", children: [
2321
+ /* @__PURE__ */ jsx3(AppWindowIcon, { "aria-hidden": true, className: "size-3 shrink-0" }),
2322
+ /* @__PURE__ */ jsx3("span", { className: "truncate", children: statusText })
2323
+ ] })
2324
+ }
2325
+ ) : secureContextRequired ? /* @__PURE__ */ jsx3("div", { className: "break-words text-og-xs leading-4 text-og-status-failed", children: statusText }) : failed || previewFailed ? /* @__PURE__ */ jsx3(ComposerTip, { tip: statusText, children: /* @__PURE__ */ jsx3("div", { className: "truncate text-og-xs text-og-status-failed", children: statusText }) }) : /* @__PURE__ */ jsx3("div", { className: "truncate text-og-xs text-og-fg-subtle", children: statusText })
2326
+ ] }),
2327
+ attachment.status === "uploading" ? /* @__PURE__ */ jsx3(LoaderCircleIcon, { className: "size-3.5 shrink-0 animate-og-spin" }) : null,
2328
+ failed && !secureContextRequired && onRetry ? /* @__PURE__ */ jsx3(ComposerTip, { tip: messages.retryUpload, children: /* @__PURE__ */ jsx3(
2329
+ "button",
2330
+ {
2331
+ type: "button",
2332
+ onClick: () => onRetry(attachment.id),
2333
+ disabled,
2334
+ 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",
2335
+ "aria-label": messages.retryAttachment(displayName),
2336
+ children: /* @__PURE__ */ jsx3(RotateCwIcon, { className: "size-3.5" })
2337
+ }
2338
+ ) }) : null,
2339
+ /* @__PURE__ */ jsx3(
2340
+ "button",
2341
+ {
2342
+ type: "button",
2343
+ onClick: () => onRemove(attachment.id),
2344
+ disabled,
2345
+ className: cn(
2346
+ "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",
2347
+ // The slim chip keeps a 44px touch target with an invisible hit area.
2348
+ compact ? "relative pointer-coarse:p-1.5 pointer-coarse:before:absolute pointer-coarse:before:-inset-2.5 pointer-coarse:before:content-['']" : "pointer-coarse:size-10"
2349
+ ),
2350
+ "aria-label": messages.removeAttachment(displayName),
2351
+ children: /* @__PURE__ */ jsx3(XIcon, { className: "size-3.5" })
2352
+ }
2353
+ )
2354
+ ]
2355
+ },
2356
+ attachment.id
2357
+ );
2358
+ }) })
2359
+ );
2360
+ }
2361
+ function HelpPanel({
2362
+ commands,
2363
+ messages,
2364
+ onClose
2365
+ }) {
2366
+ return /* @__PURE__ */ jsxs3(
2367
+ motion2.div,
2368
+ {
2369
+ initial: { opacity: 0, height: 0 },
2370
+ animate: { opacity: 1, height: "auto" },
2371
+ exit: { opacity: 0, height: 0 },
2372
+ className: "mt-2 overflow-hidden rounded-og-lg border border-og-border bg-og-surface-2",
2373
+ children: [
2374
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between border-b border-og-border px-3 py-1.5", children: [
2375
+ /* @__PURE__ */ jsx3("span", { className: "text-og-sm font-medium text-og-fg", children: messages.commands }),
2376
+ /* @__PURE__ */ jsx3(
2377
+ "button",
2378
+ {
2379
+ type: "button",
2380
+ onClick: onClose,
2381
+ className: "text-og-xs text-og-fg-subtle hover:text-og-fg",
2382
+ children: messages.close
2383
+ }
2384
+ )
2385
+ ] }),
2386
+ /* @__PURE__ */ jsx3("ul", { className: "py-1", children: commands.map((command) => {
2387
+ const hint = argHint(command.args);
2388
+ return /* @__PURE__ */ jsxs3("li", { className: "flex items-baseline gap-2 px-3 py-1", children: [
2389
+ /* @__PURE__ */ jsxs3("span", { className: "font-mono text-og-sm text-og-accent", children: [
2390
+ "/",
2391
+ command.name,
2392
+ hint ? /* @__PURE__ */ jsx3("span", { className: "ml-1 text-og-fg-subtle", children: hint }) : null
2393
+ ] }),
2394
+ /* @__PURE__ */ jsx3("span", { className: "text-og-sm text-og-fg-muted", children: command.description }),
2395
+ command.danger ? /* @__PURE__ */ jsx3("span", { className: "ml-auto rounded-og-xs bg-og-status-failed/15 px-1 text-og-xs uppercase tracking-wide text-og-status-failed", children: messages.danger }) : null
2396
+ ] }, command.name);
2397
+ }) })
2398
+ ]
2399
+ }
2400
+ );
2401
+ }
2402
+
2403
+ // src/components/composer-transcription-control.tsx
2404
+ import {
2405
+ ClipboardPasteIcon,
2406
+ LoaderCircleIcon as LoaderCircleIcon2,
2407
+ MicIcon,
2408
+ RefreshCwIcon,
2409
+ SquareIcon as SquareIcon2,
2410
+ Trash2Icon,
2411
+ XIcon as XIcon2
2412
+ } from "lucide-react";
2413
+ import { AnimatePresence as AnimatePresence3, motion as motion3 } from "motion/react";
2414
+ import {
2415
+ forwardRef as forwardRef2,
2416
+ useCallback as useCallback3,
2417
+ useEffect as useEffect2,
2418
+ useRef as useRef3,
2419
+ useState as useState3
2420
+ } from "react";
2421
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
2422
+ var Tip = /* @__PURE__ */ forwardRef2(
2423
+ function Tip2({ tip, children }, ref) {
2424
+ return /* @__PURE__ */ jsxs4(Tooltip, { children: [
2425
+ /* @__PURE__ */ jsx4(TooltipTrigger, { ref, asChild: true, children }),
2426
+ /* @__PURE__ */ jsx4(TooltipContent, { side: "top", children: tip })
2427
+ ] });
2428
+ }
2429
+ );
2430
+ var defaultMessages = (t) => ({
2431
+ start: t("composerTranscriptionControl.startVoiceInput"),
2432
+ stop: t("composerTranscriptionControl.stopAndTranscribe"),
2433
+ cancel: t("composerTranscriptionControl.discardDictation"),
2434
+ retry: t("composerTranscriptionControl.retryVoiceInput"),
2435
+ transcribeSaved: t("composerTranscriptionControl.transcribeSavedRecording"),
2436
+ timeRemaining: t("composerTranscriptionControl.stopsAndTranscribesInSeconds", {
2437
+ seconds: "{seconds}"
2438
+ }),
2439
+ pauseRetrying: t("composerTranscriptionControl.pauseAutomaticRetry"),
2440
+ requestingPermission: t("composerTranscriptionControl.requestingMicrophone"),
2441
+ recording: t("composerTranscriptionControl.recordingPressEscapeToDiscard"),
2442
+ saving: t("composerTranscriptionControl.savingAudioLocally"),
2443
+ transcribing: t("composerTranscriptionControl.transcribing"),
2444
+ retrying: t("composerTranscriptionControl.savedRetryingTranscription"),
2445
+ recovered: t("composerTranscriptionControl.recordingSavedOnThisDevice"),
2446
+ recoveredTranscript: t("composerTranscriptionControl.transcriptSavedInsertItInto"),
2447
+ insertRecoveredTranscript: t("composerTranscriptionControl.insertSavedTranscript"),
2448
+ discardRecovered: t("composerTranscriptionControl.discardSavedRecording"),
2449
+ unavailableDisabled: t("composerTranscriptionControl.voiceInputIsUnavailableWhile"),
2450
+ unavailable: t("composerTranscriptionControl.voiceInputIsUnavailableFor"),
2451
+ errorPermissionDenied: t("composerTranscriptionControl.microphoneAccessIsBlockedAllow"),
2452
+ errorNotSupported: t("composerTranscriptionControl.voiceInputIsNotSupported"),
2453
+ errorUnavailable: t("composerTranscriptionControl.voiceInputIsNotConfigured"),
2454
+ errorInsufficientCredits: t("composerTranscriptionControl.voiceInputNeedsCreditsRecording"),
2455
+ errorAllowanceExhausted: t("composerTranscriptionControl.usageLimitReachedRecordingSaved"),
2456
+ errorPolicyBlocked: t("composerTranscriptionControl.voiceInputIsnTAllowed"),
2457
+ errorRegionRestricted: t("inferenceRegion.notSupportedInEu"),
2458
+ errorTooLarge: t("composerTranscriptionControl.recordingIsTooLargeTry"),
2459
+ errorInvalidAudio: t("composerTranscriptionControl.theRecordingCouldNotBe"),
2460
+ errorStorageUnavailable: t("composerTranscriptionControl.voiceInputStoppedBecauseAudio"),
2461
+ errorRetryable: t("composerTranscriptionControl.savedTranscriptionFailedRetryWhen"),
2462
+ errorHandoffUncertain: t("composerTranscriptionControl.transcriptSavedCheckYourDraft"),
2463
+ errorUnknown: t("composerTranscriptionControl.voiceInputCouldNotStart")
2464
+ });
2465
+ var WAVEFORM_BARS = 18;
2466
+ var WAVEFORM_BAR_KEYS = Array.from(
2467
+ { length: WAVEFORM_BARS },
2468
+ (_, index) => `voice-waveform-bar-${index + 1}`
2469
+ );
2470
+ function ComposerTranscriptionControl({
2471
+ client = null,
2472
+ workspaceId = "",
2473
+ capability = null,
2474
+ workspaceEnabled = false,
2475
+ language = null,
2476
+ beforeStart,
2477
+ messages: overrides,
2478
+ className,
2479
+ recordings,
2480
+ platform,
2481
+ suppressed = false
2482
+ }) {
2483
+ const t = useOpenGeniText();
2484
+ const composer = useChatComposer();
2485
+ const messages = { ...defaultMessages(t), ...overrides };
2486
+ const startScope = useRef3(null);
2487
+ const hostGate = useRef3(beforeStart);
2488
+ hostGate.current = beforeStart;
2489
+ const gate = useCallback3(async () => {
2490
+ if (hostGate.current && !await hostGate.current()) return false;
2491
+ startScope.current?.dispatchEvent(new Event(COMPOSER_VOICE_INPUT_START_EVENT));
2492
+ return true;
2493
+ }, []);
2494
+ const transcription = useVoiceInput({
2495
+ client,
2496
+ workspaceId,
2497
+ capability,
2498
+ enabled: workspaceEnabled && !suppressed,
2499
+ value: composer.value,
2500
+ setValue: composer.setValue,
2501
+ focusInput: composer.focusInput,
2502
+ disabled: composer.disabled,
2503
+ language,
2504
+ beforeStart: gate,
2505
+ recordings,
2506
+ platform
2507
+ });
2508
+ const { status } = transcription;
2509
+ const retrying = status === "retrying";
2510
+ const capturing = status === "requesting-permission" || status === "recording";
2511
+ const setAsideTranscription = transcription.setAside;
2512
+ const discardTranscription = transcription.discard;
2513
+ const hasRecoverableRecording = transcription.hasRecoverableRecording;
2514
+ useEffect2(() => {
2515
+ if (!suppressed) return;
2516
+ if (status === "recording" || status === "requesting-permission") {
2517
+ setAsideTranscription();
2518
+ } else if (status === "error" && !hasRecoverableRecording) {
2519
+ void discardTranscription();
2520
+ }
2521
+ }, [setAsideTranscription, discardTranscription, hasRecoverableRecording, status, suppressed]);
2522
+ const active = capturing || status === "saving" || status === "transcribing";
2523
+ const recoverable = transcription.hasRecoverableRecording && (retrying || status === "recovered" || status === "transcript-ready" || status === "error");
2524
+ const savedTranscript = status === "transcript-ready" && transcription.savedTranscript !== null;
2525
+ const unavailableMessage = composer.disabled ? messages.unavailableDisabled : !capability?.available || !workspaceEnabled ? messages.unavailable : !transcription.available ? messages.errorStorageUnavailable : null;
2526
+ const idleLabel = unavailableMessage ?? (status === "error" ? messages.retry : messages.start);
2527
+ const errorMessage = transcription.error ? transcriptionErrorMessage(transcription.error, messages) : null;
2528
+ const announcement = status === "requesting-permission" ? messages.requestingPermission : status === "recording" ? messages.recording : status === "saving" ? messages.saving : status === "transcribing" ? messages.transcribing : retrying ? messages.retrying : status === "recovered" ? messages.recovered : status === "transcript-ready" ? messages.recoveredTranscript : status === "error" ? errorMessage ?? messages.errorUnknown : unavailableMessage;
2529
+ const recoveredLabel = savedTranscript ? errorMessage ?? messages.recoveredTranscript : retrying ? messages.retrying : status === "error" ? errorMessage ?? messages.errorRetryable : messages.recovered;
2530
+ function start(event) {
2531
+ if (unavailableMessage) {
2532
+ event.preventDefault();
2533
+ return;
2534
+ }
2535
+ startScope.current = composerVoiceEventScope(event.currentTarget) ?? null;
2536
+ void transcription.start();
2537
+ }
2538
+ const needsAttention = !capturing && (recoverable || status === "error" && !!errorMessage);
2539
+ useComposerFooterSignal("transcription-capturing", !suppressed && capturing);
2540
+ useComposerFooterSignal("transcription-attention", !suppressed && needsAttention);
2541
+ return /* @__PURE__ */ jsx4(AnimatePresence3, { initial: false, children: suppressed ? null : /* @__PURE__ */ jsx4(
2542
+ motion3.span,
2543
+ {
2544
+ initial: { opacity: 0, width: 0 },
2545
+ animate: { opacity: 1, width: "auto" },
2546
+ exit: { opacity: 0, width: 0 },
2547
+ transition: { duration: 0.36, ease: [0.22, 1, 0.36, 1] },
2548
+ className: cn(
2549
+ "inline-flex min-w-0 overflow-hidden",
2550
+ // Mobile capture mode reserves the footer for this control. Keep the
2551
+ // shell itself from shrinking and clipping its trailing actions.
2552
+ capturing && "shrink-0",
2553
+ className
2554
+ ),
2555
+ "data-transcription-status": status,
2556
+ "data-transcription-capturing": capturing ? "" : void 0,
2557
+ "data-transcription-attention": needsAttention ? "" : void 0,
2558
+ children: /* @__PURE__ */ jsxs4("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [
2559
+ /* @__PURE__ */ jsx4(AnimatePresence3, { mode: "popLayout", initial: false, children: recoverable ? /* @__PURE__ */ jsxs4(
2560
+ motion3.span,
2561
+ {
2562
+ initial: { opacity: 0, scale: 0.96 },
2563
+ animate: { opacity: 1, scale: 1 },
2564
+ exit: { opacity: 0, scale: 0.96 },
2565
+ transition: { duration: 0.16, ease: [0.22, 1, 0.36, 1] },
2566
+ className: cn(
2567
+ "inline-flex h-8 min-w-0 items-center gap-1 rounded-og-md border border-og-border/80",
2568
+ "bg-og-surface-2/70 pl-2 pr-1 pointer-coarse:h-11"
2569
+ ),
2570
+ children: [
2571
+ /* @__PURE__ */ jsx4(
2572
+ "span",
2573
+ {
2574
+ title: recoveredLabel,
2575
+ className: "og-transcription-recovered-label max-w-56 line-clamp-2 text-og-xs leading-tight text-og-fg-muted max-sm:max-w-32",
2576
+ children: recoveredLabel
2577
+ }
2578
+ ),
2579
+ /* @__PURE__ */ jsx4(
2580
+ Tip,
2581
+ {
2582
+ tip: savedTranscript ? messages.insertRecoveredTranscript : retrying ? messages.pauseRetrying : status === "recovered" ? messages.transcribeSaved : messages.retry,
2583
+ children: /* @__PURE__ */ jsx4(
2584
+ "button",
2585
+ {
2586
+ type: "button",
2587
+ disabled: composer.disabled && !retrying,
2588
+ onClick: () => savedTranscript ? void transcription.insertSavedTranscript() : retrying ? transcription.setAside() : transcription.retry(),
2589
+ "aria-label": savedTranscript ? messages.insertRecoveredTranscript : retrying ? messages.pauseRetrying : status === "recovered" ? messages.transcribeSaved : messages.retry,
2590
+ className: cn(
2591
+ "inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
2592
+ "border border-og-primary-border bg-og-primary text-og-primary-fg hover:bg-og-primary-hover transition-colors duration-150 motion-reduce:transition-none",
2593
+ "disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-11"
2594
+ ),
2595
+ children: savedTranscript ? /* @__PURE__ */ jsx4(ClipboardPasteIcon, { className: "size-3.5" }) : retrying ? /* @__PURE__ */ jsx4(SquareIcon2, { className: "size-3.5" }) : /* @__PURE__ */ jsx4(RefreshCwIcon, { className: "size-3.5" })
2596
+ }
2597
+ )
2598
+ }
2599
+ ),
2600
+ /* @__PURE__ */ jsx4(Tip, { tip: messages.discardRecovered, children: /* @__PURE__ */ jsx4(
2601
+ "button",
2602
+ {
2603
+ type: "button",
2604
+ disabled: composer.disabled,
2605
+ onClick: () => void transcription.discard(),
2606
+ "aria-label": messages.discardRecovered,
2607
+ className: cn(
2608
+ "inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
2609
+ "text-og-fg-muted transition-colors duration-150 motion-reduce:transition-none",
2610
+ "hover:bg-og-surface-3 hover:text-og-status-failed disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-11"
2611
+ ),
2612
+ children: /* @__PURE__ */ jsx4(Trash2Icon, { className: "size-3.5" })
2613
+ }
2614
+ ) })
2615
+ ]
2616
+ },
2617
+ "recovered"
2618
+ ) : active ? /* @__PURE__ */ jsxs4(
2619
+ motion3.span,
2620
+ {
2621
+ initial: { opacity: 0, scale: 0.96 },
2622
+ animate: { opacity: 1, scale: 1 },
2623
+ exit: { opacity: 0, scale: 0.96 },
2624
+ transition: { duration: 0.16, ease: [0.22, 1, 0.36, 1] },
2625
+ className: cn(
2626
+ "inline-flex h-8 items-center gap-1 rounded-og-md border border-og-border/80",
2627
+ "bg-og-surface-2/70 pl-2 pr-1 pointer-coarse:h-11"
2628
+ ),
2629
+ children: [
2630
+ status === "requesting-permission" ? /* @__PURE__ */ jsx4(
2631
+ LoaderCircleIcon2,
2632
+ {
2633
+ className: "size-3.5 shrink-0 text-og-fg-muted animate-og-spin motion-reduce:animate-none",
2634
+ "aria-hidden": true
2635
+ }
2636
+ ) : /* @__PURE__ */ jsxs4("span", { className: "flex items-center gap-1.5", children: [
2637
+ status === "recording" ? /* @__PURE__ */ jsx4(
2638
+ "span",
2639
+ {
2640
+ "aria-hidden": true,
2641
+ className: "size-1.5 shrink-0 rounded-full bg-og-status-failed animate-og-pulse motion-reduce:animate-none"
2642
+ }
2643
+ ) : null,
2644
+ /* @__PURE__ */ jsx4(
2645
+ VoiceWaveform,
2646
+ {
2647
+ stream: status === "recording" ? transcription.stream : null,
2648
+ mode: status === "recording" ? "recording" : "transcribing"
2649
+ }
2650
+ ),
2651
+ status === "recording" && transcription.recordingStartedAt !== null ? /* @__PURE__ */ jsx4(
2652
+ RecordingClock,
2653
+ {
2654
+ startedAt: transcription.recordingStartedAt,
2655
+ maxSeconds: transcription.maxRecordingSeconds,
2656
+ remainingLabel: messages.timeRemaining
2657
+ }
2658
+ ) : null
2659
+ ] }),
2660
+ status === "recording" ? /* @__PURE__ */ jsxs4(Fragment2, { children: [
2661
+ /* @__PURE__ */ jsx4(Tip, { tip: messages.cancel, children: /* @__PURE__ */ jsx4(
2662
+ "button",
2663
+ {
2664
+ type: "button",
2665
+ onClick: () => transcription.cancel(),
2666
+ "aria-label": messages.cancel,
2667
+ className: cn(
2668
+ "inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
2669
+ "text-og-fg-muted transition-colors duration-150 motion-reduce:transition-none",
2670
+ "hover:bg-og-surface-3 hover:text-og-fg pointer-coarse:size-11"
2671
+ ),
2672
+ children: /* @__PURE__ */ jsx4(XIcon2, { className: "size-3.5" })
2673
+ }
2674
+ ) }),
2675
+ /* @__PURE__ */ jsx4(Tip, { tip: messages.stop, children: /* @__PURE__ */ jsx4(
2676
+ "button",
2677
+ {
2678
+ type: "button",
2679
+ onClick: () => transcription.stop(),
2680
+ "aria-label": messages.stop,
2681
+ className: cn(
2682
+ "inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
2683
+ "border border-og-primary-border bg-og-primary text-og-primary-fg hover:bg-og-primary-hover",
2684
+ "transition-colors duration-150 motion-reduce:transition-none pointer-coarse:size-11"
2685
+ ),
2686
+ children: /* @__PURE__ */ jsx4(SquareIcon2, { className: "size-2.5 fill-current" })
2687
+ }
2688
+ ) })
2689
+ ] }) : status === "transcribing" || status === "saving" ? /* @__PURE__ */ jsx4(ShimmerText, { className: "px-1.5 text-og-xs font-medium whitespace-nowrap", children: status === "saving" ? messages.saving : messages.transcribing }) : /* @__PURE__ */ jsx4("span", { className: "px-1.5 text-og-xs text-og-fg-muted whitespace-nowrap", children: messages.requestingPermission })
2690
+ ]
2691
+ },
2692
+ status === "transcribing" || status === "saving" ? "processing" : "capture"
2693
+ ) : /* @__PURE__ */ jsx4(Tip, { tip: idleLabel, children: /* @__PURE__ */ jsx4(
2694
+ motion3.button,
2695
+ {
2696
+ type: "button",
2697
+ "data-og-composer-dictate": true,
2698
+ initial: { opacity: 0, scale: 0.96 },
2699
+ animate: { opacity: 1, scale: 1 },
2700
+ exit: { opacity: 0, scale: 0.96 },
2701
+ transition: { duration: 0.14, ease: [0.22, 1, 0.36, 1] },
2702
+ onClick: start,
2703
+ "aria-label": idleLabel,
2704
+ "aria-pressed": false,
2705
+ "aria-disabled": unavailableMessage !== null,
2706
+ className: cn(
2707
+ "inline-flex size-8 shrink-0 items-center justify-center rounded-og-md pointer-coarse:size-11",
2708
+ "text-og-fg-muted transition-colors duration-150 motion-reduce:transition-none",
2709
+ unavailableMessage ? "cursor-not-allowed opacity-45" : "hover:bg-og-surface-2 hover:text-og-fg"
2710
+ ),
2711
+ children: /* @__PURE__ */ jsx4(MicIcon, { className: "size-4" })
2712
+ }
2713
+ ) }, "idle") }),
2714
+ status === "error" && errorMessage && !recoverable ? (
2715
+ // Nothing is saved in this state, so dismissing loses no speech.
2716
+ /* @__PURE__ */ jsxs4(
2717
+ "button",
2718
+ {
2719
+ type: "button",
2720
+ title: errorMessage,
2721
+ "aria-label": t("composerTranscriptionControl.dismissErrormessage", { errorMessage }),
2722
+ onClick: () => void transcription.discard(),
2723
+ className: cn(
2724
+ "inline-flex min-w-0 items-center gap-1 rounded-og-sm text-left outline-hidden",
2725
+ "text-og-status-failed focus-visible:ring-2 focus-visible:ring-og-accent/45"
2726
+ ),
2727
+ children: [
2728
+ /* @__PURE__ */ jsx4("span", { className: "og-transcription-error-label max-w-56 line-clamp-2 text-og-xs leading-tight max-sm:max-w-32", children: errorMessage }),
2729
+ /* @__PURE__ */ jsx4(XIcon2, { className: "size-3 shrink-0 opacity-70", "aria-hidden": true })
2730
+ ]
2731
+ }
2732
+ )
2733
+ ) : null,
2734
+ /* @__PURE__ */ jsx4(
2735
+ "span",
2736
+ {
2737
+ className: "sr-only",
2738
+ role: status === "error" ? "alert" : "status",
2739
+ "aria-live": "polite",
2740
+ children: announcement
2741
+ }
2742
+ )
2743
+ ] })
2744
+ },
2745
+ "composer-dictate"
2746
+ ) });
2747
+ }
2748
+ function RecordingClock({
2749
+ startedAt,
2750
+ maxSeconds,
2751
+ remainingLabel
2752
+ }) {
2753
+ const [now, setNow] = useState3(() => Date.now());
2754
+ useEffect2(() => {
2755
+ const timer = setInterval(() => setNow(Date.now()), 500);
2756
+ return () => clearInterval(timer);
2757
+ }, []);
2758
+ const elapsed = Math.max(0, Math.floor((now - startedAt) / 1e3));
2759
+ const remaining = maxSeconds === null ? null : Math.max(0, maxSeconds - elapsed);
2760
+ const warn = remaining !== null && remaining <= 15;
2761
+ const label = `${Math.floor(elapsed / 60)}:${String(elapsed % 60).padStart(2, "0")}`;
2762
+ return /* @__PURE__ */ jsxs4(
2763
+ "span",
2764
+ {
2765
+ "data-recording-clock": true,
2766
+ title: warn ? remainingLabel.replace("{seconds}", String(remaining)) : void 0,
2767
+ className: cn(
2768
+ "min-w-[2.25rem] text-right text-og-xs tabular-nums",
2769
+ warn ? "font-medium text-og-status-failed" : "text-og-fg-muted"
2770
+ ),
2771
+ children: [
2772
+ label,
2773
+ warn ? /* @__PURE__ */ jsx4("span", { className: "sr-only", children: remainingLabel.replace("{seconds}", String(remaining)) }) : null
2774
+ ]
2775
+ }
2776
+ );
2777
+ }
2778
+ function VoiceWaveform({
2779
+ stream,
2780
+ mode
2781
+ }) {
2782
+ const [levels, setLevels] = useState3(() => restingLevels(WAVEFORM_BARS));
2783
+ const [live, setLive] = useState3(false);
2784
+ useEffect2(() => {
2785
+ if (!stream || mode !== "recording") {
2786
+ setLive(false);
2787
+ setLevels(restingLevels(WAVEFORM_BARS));
2788
+ return;
2789
+ }
2790
+ const AudioCtx = window.AudioContext ?? window.webkitAudioContext;
2791
+ if (!AudioCtx) return;
2792
+ let cancelled = false;
2793
+ let frame = 0;
2794
+ let context = null;
2795
+ try {
2796
+ context = new AudioCtx();
2797
+ const source = context.createMediaStreamSource(stream);
2798
+ const analyser = context.createAnalyser();
2799
+ analyser.fftSize = 64;
2800
+ analyser.smoothingTimeConstant = 0.8;
2801
+ source.connect(analyser);
2802
+ const bins = new Uint8Array(analyser.frequencyBinCount);
2803
+ const tick = () => {
2804
+ if (cancelled) return;
2805
+ analyser.getByteFrequencyData(bins);
2806
+ const next = new Array(WAVEFORM_BARS);
2807
+ const usable = Math.max(8, Math.floor(bins.length * 0.65));
2808
+ for (let i = 0; i < WAVEFORM_BARS; i++) {
2809
+ const start = Math.floor(i / WAVEFORM_BARS * usable);
2810
+ const end = Math.max(start + 1, Math.floor((i + 1) / WAVEFORM_BARS * usable));
2811
+ let sum = 0;
2812
+ for (let j = start; j < end; j++) sum += bins[j] ?? 0;
2813
+ const avg = sum / (end - start) / 255;
2814
+ next[i] = Math.min(1, 0.14 + avg * 1.65);
2815
+ }
2816
+ setLevels(next);
2817
+ setLive(true);
2818
+ frame = requestAnimationFrame(tick);
2819
+ };
2820
+ void context.resume().then(() => {
2821
+ if (!cancelled) frame = requestAnimationFrame(tick);
2822
+ });
2823
+ } catch {
2824
+ setLive(false);
2825
+ }
2826
+ return () => {
2827
+ cancelled = true;
2828
+ cancelAnimationFrame(frame);
2829
+ void context?.close();
2830
+ };
2831
+ }, [stream, mode]);
2832
+ return /* @__PURE__ */ jsx4(
2833
+ "span",
2834
+ {
2835
+ "aria-hidden": true,
2836
+ "data-voice-waveform": live ? "live" : "fallback",
2837
+ className: "flex h-4 w-[3.75rem] items-center justify-center gap-px",
2838
+ children: WAVEFORM_BAR_KEYS.map((key, index) => {
2839
+ const level = levels[index] ?? 0;
2840
+ return /* @__PURE__ */ jsx4(
2841
+ "span",
2842
+ {
2843
+ className: cn(
2844
+ "w-0.5 rounded-full bg-og-fg-muted/90 origin-center",
2845
+ !live && "animate-og-waveform motion-reduce:animate-none",
2846
+ mode === "transcribing" && "opacity-45"
2847
+ ),
2848
+ style: {
2849
+ height: live ? `${Math.max(3, Math.round(level * 14))}px` : "14px",
2850
+ animationDelay: live ? void 0 : `${index % 9 * 0.07}s`,
2851
+ opacity: live ? 0.55 + level * 0.45 : void 0
2852
+ }
2853
+ },
2854
+ key
2855
+ );
2856
+ })
2857
+ }
2858
+ );
2859
+ }
2860
+ function restingLevels(count) {
2861
+ return Array.from({ length: count }, (_, index) => 0.22 + index * 17 % 5 * 0.06);
2862
+ }
2863
+ function transcriptionErrorMessage(code, messages) {
2864
+ switch (code) {
2865
+ case "insufficient_credits":
2866
+ return messages.errorInsufficientCredits;
2867
+ case "allowance_exhausted":
2868
+ case "monthly_model_cost_limit":
2869
+ return messages.errorAllowanceExhausted;
2870
+ case "policy_blocked":
2871
+ return messages.errorPolicyBlocked;
2872
+ case "region_restricted":
2873
+ return messages.errorRegionRestricted;
2874
+ case "permission_denied":
2875
+ return messages.errorPermissionDenied;
2876
+ case "not_supported":
2877
+ return messages.errorNotSupported;
2878
+ case "unavailable":
2879
+ return messages.errorUnavailable;
2880
+ case "too_large":
2881
+ return messages.errorTooLarge;
2882
+ case "invalid_audio":
2883
+ return messages.errorInvalidAudio;
2884
+ case "storage_unavailable":
2885
+ return messages.errorStorageUnavailable;
2886
+ case "network":
2887
+ case "provider":
2888
+ case "timeout":
2889
+ return messages.errorRetryable;
2890
+ case "handoff_uncertain":
2891
+ return messages.errorHandoffUncertain;
2892
+ case "unknown":
2893
+ return messages.errorUnknown;
2894
+ default:
2895
+ return messages.errorUnknown;
2896
+ }
2897
+ }
2898
+
2899
+ export {
2900
+ parseCommandLine,
2901
+ hasPermission,
2902
+ matchCommand,
2903
+ filterCommands,
2904
+ argHint,
2905
+ firstMissingRequiredArg,
2906
+ defaultCommands,
2907
+ useSlashCommands,
2908
+ CommandPalette,
2909
+ ModelPicker,
2910
+ useChatComposerController,
2911
+ useChatComposer,
2912
+ Root,
2913
+ Frame,
2914
+ CommandPalette2,
2915
+ Surface,
2916
+ PausedState,
2917
+ RestoredResources,
2918
+ Attachments,
2919
+ Input,
2920
+ Confirmation,
2921
+ Footer,
2922
+ Controls,
2923
+ Hint,
2924
+ Actions,
2925
+ AttachButton,
2926
+ ModelPicker2,
2927
+ PauseButtonSlot,
2928
+ PauseButton,
2929
+ StopButton,
2930
+ AlternateSendButton,
2931
+ SendButton,
2932
+ Help,
2933
+ Status,
2934
+ ComposerTranscriptionControl
2935
+ };
2936
+ //# sourceMappingURL=chunk-2RG7NIAS.js.map