@arbidocs/blocks 0.5.165 → 0.5.167

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 (390) hide show
  1. package/dist/{CalendarGridImpl-ZUHFUWWA.cjs → CalendarGridImpl-2M6IPL4U.cjs} +19 -19
  2. package/dist/{CalendarGridImpl-ZUHFUWWA.cjs.map → CalendarGridImpl-2M6IPL4U.cjs.map} +1 -1
  3. package/dist/{ConnectedCallDock-LHIAK4GV.cjs → ConnectedCallDock-PFMK5OGR.cjs} +20 -20
  4. package/dist/{ConnectedCallDock-LHIAK4GV.cjs.map → ConnectedCallDock-PFMK5OGR.cjs.map} +1 -1
  5. package/dist/{ConnectedCallRoom-LA57WUKX.cjs → ConnectedCallRoom-VHU2XWLY.cjs} +19 -19
  6. package/dist/{ConnectedCallRoom-LA57WUKX.cjs.map → ConnectedCallRoom-VHU2XWLY.cjs.map} +1 -1
  7. package/dist/ConnectedMailInviteCard-S2X4XN3X.cjs +22 -0
  8. package/dist/{ConnectedMailInviteCard-LV2VARX3.cjs.map → ConnectedMailInviteCard-S2X4XN3X.cjs.map} +1 -1
  9. package/dist/{ConnectedNativeDocxComparison-SWX5DTYX.cjs → ConnectedNativeDocxComparison-AOVH47RY.cjs} +20 -20
  10. package/dist/{ConnectedNativeDocxComparison-SWX5DTYX.cjs.map → ConnectedNativeDocxComparison-AOVH47RY.cjs.map} +1 -1
  11. package/dist/{ConnectedPresentation-7ZBHQBIS.cjs → ConnectedPresentation-PYTZBAOR.cjs} +23 -23
  12. package/dist/{ConnectedPresentation-7ZBHQBIS.cjs.map → ConnectedPresentation-PYTZBAOR.cjs.map} +1 -1
  13. package/dist/{ConnectedProductionSetDialog-4N7R7SFZ.cjs → ConnectedProductionSetDialog-6ZGBUMOT.cjs} +10 -9
  14. package/dist/ConnectedProductionSetDialog-6ZGBUMOT.cjs.map +1 -0
  15. package/dist/{ConnectedSlidesTab-6XHUP32F.cjs → ConnectedSlidesTab-GT5TQPWW.cjs} +18 -18
  16. package/dist/{ConnectedSlidesTab-6XHUP32F.cjs.map → ConnectedSlidesTab-GT5TQPWW.cjs.map} +1 -1
  17. package/dist/{ConnectedStreamedWordArtifact-SROLNCGC.cjs → ConnectedStreamedWordArtifact-2WBJZI2K.cjs} +20 -20
  18. package/dist/{ConnectedStreamedWordArtifact-SROLNCGC.cjs.map → ConnectedStreamedWordArtifact-2WBJZI2K.cjs.map} +1 -1
  19. package/dist/{DocumentReviewCard-43SDO57A.cjs → DocumentReviewCard-3E44O3F6.cjs} +26 -26
  20. package/dist/{DocumentReviewCard-43SDO57A.cjs.map → DocumentReviewCard-3E44O3F6.cjs.map} +1 -1
  21. package/dist/{FilesViewerDialog-2MJHM32X.cjs → FilesViewerDialog-JCW2SMBU.cjs} +53 -51
  22. package/dist/FilesViewerDialog-JCW2SMBU.cjs.map +1 -0
  23. package/dist/{WorkspaceTableView-EWLOVD6P.cjs → WorkspaceTableView-ZKLEEPCF.cjs} +11 -11
  24. package/dist/{WorkspaceTableView-EWLOVD6P.cjs.map → WorkspaceTableView-ZKLEEPCF.cjs.map} +1 -1
  25. package/dist/agents/index.cjs +254 -254
  26. package/dist/agents/workflows/StepDocuments.d.ts +14 -1
  27. package/dist/agents/workflows/StepDocuments.js +23 -1
  28. package/dist/agents/workflows/StepDocuments.js.map +2 -2
  29. package/dist/{ai-HME7CNDE.cjs → ai-VXPILCGE.cjs} +27 -28
  30. package/dist/ai-VXPILCGE.cjs.map +1 -0
  31. package/dist/auth/index.cjs +13 -12
  32. package/dist/calendar/SchedulingAssistant.js +6 -1
  33. package/dist/calendar/SchedulingAssistant.js.map +2 -2
  34. package/dist/calendar/index.cjs +117 -117
  35. package/dist/calendar/labels.js +1 -0
  36. package/dist/calendar/labels.js.map +2 -2
  37. package/dist/calendar/types.d.ts +1 -0
  38. package/dist/calls/connected/CallPeoplePicker.d.ts +1 -1
  39. package/dist/calls/connected/CallPeoplePicker.js +4 -2
  40. package/dist/calls/connected/CallPeoplePicker.js.map +2 -2
  41. package/dist/calls/connected/ConnectedCallRoom.js +33 -2
  42. package/dist/calls/connected/ConnectedCallRoom.js.map +2 -2
  43. package/dist/calls/connected/DmCallButton.js +14 -6
  44. package/dist/calls/connected/DmCallButton.js.map +2 -2
  45. package/dist/calls/connected/call-people.d.ts +4 -2
  46. package/dist/calls/connected/call-people.js +4 -0
  47. package/dist/calls/connected/call-people.js.map +2 -2
  48. package/dist/calls/index.cjs +51 -51
  49. package/dist/chat/generatedDocuments.d.ts +2 -0
  50. package/dist/chat/generatedDocuments.js +6 -3
  51. package/dist/chat/generatedDocuments.js.map +2 -2
  52. package/dist/chat/index.cjs +120 -120
  53. package/dist/chat/rehype-doc-entity-pills.js +5 -3
  54. package/dist/chat/rehype-doc-entity-pills.js.map +2 -2
  55. package/dist/{chunk-AIKPZJNI.cjs → chunk-2KGU5G6Z.cjs} +243 -11
  56. package/dist/chunk-2KGU5G6Z.cjs.map +1 -0
  57. package/dist/{chunk-CKJTXS63.cjs → chunk-3K7V4LOF.cjs} +44 -35
  58. package/dist/chunk-3K7V4LOF.cjs.map +1 -0
  59. package/dist/{chunk-HBO567HU.cjs → chunk-4TJCJ74G.cjs} +70 -70
  60. package/dist/{chunk-HBO567HU.cjs.map → chunk-4TJCJ74G.cjs.map} +1 -1
  61. package/dist/{chunk-6XKQAQWF.cjs → chunk-5K6XHSAM.cjs} +4 -4
  62. package/dist/{chunk-6XKQAQWF.cjs.map → chunk-5K6XHSAM.cjs.map} +1 -1
  63. package/dist/{chunk-QNK5SK4Q.cjs → chunk-5PXK77RO.cjs} +4 -4
  64. package/dist/{chunk-QNK5SK4Q.cjs.map → chunk-5PXK77RO.cjs.map} +1 -1
  65. package/dist/{chunk-2QLO3HBN.cjs → chunk-6CNK2C34.cjs} +6 -6
  66. package/dist/{chunk-2QLO3HBN.cjs.map → chunk-6CNK2C34.cjs.map} +1 -1
  67. package/dist/{chunk-GEQW7XQA.cjs → chunk-6INJQAGS.cjs} +69 -66
  68. package/dist/chunk-6INJQAGS.cjs.map +1 -0
  69. package/dist/{chunk-LLVE5TST.cjs → chunk-6N7QT2DH.cjs} +4 -4
  70. package/dist/{chunk-LLVE5TST.cjs.map → chunk-6N7QT2DH.cjs.map} +1 -1
  71. package/dist/{chunk-63FEMB6U.cjs → chunk-6PKP7UT7.cjs} +57 -27
  72. package/dist/chunk-6PKP7UT7.cjs.map +1 -0
  73. package/dist/{chunk-DYIZ7W4P.cjs → chunk-6ZJBUMNK.cjs} +6 -6
  74. package/dist/{chunk-DYIZ7W4P.cjs.map → chunk-6ZJBUMNK.cjs.map} +1 -1
  75. package/dist/{chunk-QDZDHP23.cjs → chunk-7D3OMWIZ.cjs} +4 -4
  76. package/dist/{chunk-QDZDHP23.cjs.map → chunk-7D3OMWIZ.cjs.map} +1 -1
  77. package/dist/{chunk-SH7W4WVI.cjs → chunk-7FWP7W34.cjs} +9 -6
  78. package/dist/chunk-7FWP7W34.cjs.map +1 -0
  79. package/dist/{chunk-LOSCXAAF.cjs → chunk-7NVDGD63.cjs} +34 -4
  80. package/dist/chunk-7NVDGD63.cjs.map +1 -0
  81. package/dist/{chunk-FQXZZXS2.cjs → chunk-AHUEBRLX.cjs} +4 -4
  82. package/dist/{chunk-FQXZZXS2.cjs.map → chunk-AHUEBRLX.cjs.map} +1 -1
  83. package/dist/{chunk-XKQVAGVR.cjs → chunk-AKNZZGJ3.cjs} +50 -41
  84. package/dist/chunk-AKNZZGJ3.cjs.map +1 -0
  85. package/dist/{chunk-UYTFPMEA.cjs → chunk-B5AOYT4U.cjs} +8 -8
  86. package/dist/{chunk-UYTFPMEA.cjs.map → chunk-B5AOYT4U.cjs.map} +1 -1
  87. package/dist/{chunk-WKIESVWJ.cjs → chunk-BJRQHR7R.cjs} +14 -14
  88. package/dist/{chunk-WKIESVWJ.cjs.map → chunk-BJRQHR7R.cjs.map} +1 -1
  89. package/dist/{chunk-2P7VH2SK.cjs → chunk-C25KF2TM.cjs} +4 -4
  90. package/dist/{chunk-2P7VH2SK.cjs.map → chunk-C25KF2TM.cjs.map} +1 -1
  91. package/dist/{chunk-ZKKSTMMI.cjs → chunk-DNHZYLPK.cjs} +3 -3
  92. package/dist/{chunk-ZKKSTMMI.cjs.map → chunk-DNHZYLPK.cjs.map} +1 -1
  93. package/dist/{chunk-ZL6VZTG6.cjs → chunk-DOBSQC2P.cjs} +4 -4
  94. package/dist/{chunk-ZL6VZTG6.cjs.map → chunk-DOBSQC2P.cjs.map} +1 -1
  95. package/dist/{chunk-AZO4F3ME.cjs → chunk-E43TT6FH.cjs} +59 -59
  96. package/dist/{chunk-AZO4F3ME.cjs.map → chunk-E43TT6FH.cjs.map} +1 -1
  97. package/dist/{chunk-T5XLL4L2.cjs → chunk-EADZEEKI.cjs} +115 -93
  98. package/dist/chunk-EADZEEKI.cjs.map +1 -0
  99. package/dist/{chunk-5NWTA4Y4.cjs → chunk-EG3DPKXM.cjs} +5 -5
  100. package/dist/{chunk-5NWTA4Y4.cjs.map → chunk-EG3DPKXM.cjs.map} +1 -1
  101. package/dist/{chunk-WD5KQ2VC.cjs → chunk-EXUCQ6KA.cjs} +28 -28
  102. package/dist/{chunk-WD5KQ2VC.cjs.map → chunk-EXUCQ6KA.cjs.map} +1 -1
  103. package/dist/{chunk-KL7R2IBY.cjs → chunk-FC6VMY2L.cjs} +49 -44
  104. package/dist/chunk-FC6VMY2L.cjs.map +1 -0
  105. package/dist/{chunk-6U3CYVZC.cjs → chunk-FUGQ7YQW.cjs} +3 -2
  106. package/dist/chunk-FUGQ7YQW.cjs.map +1 -0
  107. package/dist/{chunk-DWN5AUMH.cjs → chunk-GD5OYIOV.cjs} +6 -6
  108. package/dist/{chunk-DWN5AUMH.cjs.map → chunk-GD5OYIOV.cjs.map} +1 -1
  109. package/dist/{chunk-CYI4OYZD.cjs → chunk-GXIXNSBV.cjs} +1108 -1060
  110. package/dist/chunk-GXIXNSBV.cjs.map +1 -0
  111. package/dist/{chunk-MB2Y2ZGM.cjs → chunk-H2BUDSKT.cjs} +6 -6
  112. package/dist/{chunk-MB2Y2ZGM.cjs.map → chunk-H2BUDSKT.cjs.map} +1 -1
  113. package/dist/{chunk-NGM4HIPP.cjs → chunk-H3VVUNEX.cjs} +21 -21
  114. package/dist/{chunk-NGM4HIPP.cjs.map → chunk-H3VVUNEX.cjs.map} +1 -1
  115. package/dist/{chunk-46LX6EQT.cjs → chunk-HN56WWBR.cjs} +2 -2
  116. package/dist/{chunk-46LX6EQT.cjs.map → chunk-HN56WWBR.cjs.map} +1 -1
  117. package/dist/{chunk-U4KUTO6O.cjs → chunk-IJ4JKHEC.cjs} +21 -21
  118. package/dist/{chunk-U4KUTO6O.cjs.map → chunk-IJ4JKHEC.cjs.map} +1 -1
  119. package/dist/{chunk-KZFE65SA.cjs → chunk-IPSR2PUU.cjs} +15 -15
  120. package/dist/{chunk-KZFE65SA.cjs.map → chunk-IPSR2PUU.cjs.map} +1 -1
  121. package/dist/chunk-IRUQZI6P.cjs +17 -0
  122. package/dist/chunk-IRUQZI6P.cjs.map +1 -0
  123. package/dist/{chunk-C2VVBU7K.cjs → chunk-IXCWZ4HC.cjs} +6 -6
  124. package/dist/{chunk-C2VVBU7K.cjs.map → chunk-IXCWZ4HC.cjs.map} +1 -1
  125. package/dist/{chunk-5HPUGSTJ.cjs → chunk-J37DOAGN.cjs} +7 -7
  126. package/dist/{chunk-5HPUGSTJ.cjs.map → chunk-J37DOAGN.cjs.map} +1 -1
  127. package/dist/{chunk-DLGYR4JL.cjs → chunk-J5CBCUQE.cjs} +8 -8
  128. package/dist/{chunk-DLGYR4JL.cjs.map → chunk-J5CBCUQE.cjs.map} +1 -1
  129. package/dist/{chunk-T26UYA6Q.cjs → chunk-JTBWI74K.cjs} +7 -7
  130. package/dist/{chunk-T26UYA6Q.cjs.map → chunk-JTBWI74K.cjs.map} +1 -1
  131. package/dist/{chunk-VHD5DZW4.cjs → chunk-KBRDUFXG.cjs} +15 -13
  132. package/dist/chunk-KBRDUFXG.cjs.map +1 -0
  133. package/dist/{chunk-Z22ORBA2.cjs → chunk-KTYJNF7R.cjs} +4 -4
  134. package/dist/{chunk-Z22ORBA2.cjs.map → chunk-KTYJNF7R.cjs.map} +1 -1
  135. package/dist/{chunk-PIWXX2M4.cjs → chunk-LG2IKM2G.cjs} +10 -10
  136. package/dist/{chunk-PIWXX2M4.cjs.map → chunk-LG2IKM2G.cjs.map} +1 -1
  137. package/dist/{chunk-RI367OOL.cjs → chunk-LJTHFTQQ.cjs} +5 -5
  138. package/dist/{chunk-RI367OOL.cjs.map → chunk-LJTHFTQQ.cjs.map} +1 -1
  139. package/dist/{chunk-KJ65QZJI.cjs → chunk-M3HYFFCK.cjs} +12 -12
  140. package/dist/{chunk-KJ65QZJI.cjs.map → chunk-M3HYFFCK.cjs.map} +1 -1
  141. package/dist/{chunk-7HHIVC23.cjs → chunk-NFVYHS3X.cjs} +65 -36
  142. package/dist/chunk-NFVYHS3X.cjs.map +1 -0
  143. package/dist/{chunk-Z2XZ2D4N.cjs → chunk-O2NHBB3D.cjs} +8 -5
  144. package/dist/chunk-O2NHBB3D.cjs.map +1 -0
  145. package/dist/{chunk-CULUTYOD.cjs → chunk-OO452QD5.cjs} +4 -4
  146. package/dist/{chunk-CULUTYOD.cjs.map → chunk-OO452QD5.cjs.map} +1 -1
  147. package/dist/{chunk-7XR6CPCU.cjs → chunk-PIJPM5RA.cjs} +25 -3
  148. package/dist/chunk-PIJPM5RA.cjs.map +1 -0
  149. package/dist/{chunk-4RR7ZZPD.cjs → chunk-PJ5OQ5VB.cjs} +5 -5
  150. package/dist/{chunk-4RR7ZZPD.cjs.map → chunk-PJ5OQ5VB.cjs.map} +1 -1
  151. package/dist/chunk-PNZVCHFS.cjs +516 -0
  152. package/dist/chunk-PNZVCHFS.cjs.map +1 -0
  153. package/dist/{chunk-SLQPSKYU.cjs → chunk-PP3KYFSS.cjs} +13 -8
  154. package/dist/chunk-PP3KYFSS.cjs.map +1 -0
  155. package/dist/{chunk-P7VUIW24.cjs → chunk-QDXZVJWN.cjs} +23 -9
  156. package/dist/chunk-QDXZVJWN.cjs.map +1 -0
  157. package/dist/{chunk-OM5J23JR.cjs → chunk-QGCNYDHZ.cjs} +24 -24
  158. package/dist/{chunk-OM5J23JR.cjs.map → chunk-QGCNYDHZ.cjs.map} +1 -1
  159. package/dist/{chunk-HJDMKDAE.cjs → chunk-SKQ5OMMF.cjs} +14 -14
  160. package/dist/{chunk-HJDMKDAE.cjs.map → chunk-SKQ5OMMF.cjs.map} +1 -1
  161. package/dist/{chunk-5GBM7BQB.cjs → chunk-SOT7NPIB.cjs} +4 -4
  162. package/dist/{chunk-5GBM7BQB.cjs.map → chunk-SOT7NPIB.cjs.map} +1 -1
  163. package/dist/{chunk-3GQQUR27.cjs → chunk-TNBNDY2J.cjs} +4 -4
  164. package/dist/{chunk-3GQQUR27.cjs.map → chunk-TNBNDY2J.cjs.map} +1 -1
  165. package/dist/{chunk-7WENPOCP.cjs → chunk-TPYOXG5S.cjs} +7 -7
  166. package/dist/{chunk-7WENPOCP.cjs.map → chunk-TPYOXG5S.cjs.map} +1 -1
  167. package/dist/{chunk-V2IV2E2B.cjs → chunk-TU46WKTN.cjs} +4 -4
  168. package/dist/{chunk-V2IV2E2B.cjs.map → chunk-TU46WKTN.cjs.map} +1 -1
  169. package/dist/{chunk-BAZZTZW5.cjs → chunk-U33XOC7T.cjs} +8 -8
  170. package/dist/{chunk-BAZZTZW5.cjs.map → chunk-U33XOC7T.cjs.map} +1 -1
  171. package/dist/{chunk-PDDC5JOE.cjs → chunk-UNSZLNA4.cjs} +12 -12
  172. package/dist/{chunk-PDDC5JOE.cjs.map → chunk-UNSZLNA4.cjs.map} +1 -1
  173. package/dist/{chunk-XMSK3LQX.cjs → chunk-UXGIMOIN.cjs} +4 -4
  174. package/dist/{chunk-XMSK3LQX.cjs.map → chunk-UXGIMOIN.cjs.map} +1 -1
  175. package/dist/{chunk-NTAGDFWU.cjs → chunk-VHXGBVT6.cjs} +4 -4
  176. package/dist/{chunk-NTAGDFWU.cjs.map → chunk-VHXGBVT6.cjs.map} +1 -1
  177. package/dist/{chunk-EKFA2OS3.cjs → chunk-VJNJ4G6Y.cjs} +4 -4
  178. package/dist/{chunk-EKFA2OS3.cjs.map → chunk-VJNJ4G6Y.cjs.map} +1 -1
  179. package/dist/{chunk-JARBYN6Z.cjs → chunk-VNUBBRJM.cjs} +8 -6
  180. package/dist/chunk-VNUBBRJM.cjs.map +1 -0
  181. package/dist/{chunk-GB5MN5FC.cjs → chunk-VWSOHZK2.cjs} +4 -4
  182. package/dist/{chunk-GB5MN5FC.cjs.map → chunk-VWSOHZK2.cjs.map} +1 -1
  183. package/dist/{chunk-JHDCDEXY.cjs → chunk-W5JTACMK.cjs} +8 -5
  184. package/dist/chunk-W5JTACMK.cjs.map +1 -0
  185. package/dist/{chunk-YGCS53TK.cjs → chunk-W6PTT27N.cjs} +27 -27
  186. package/dist/{chunk-YGCS53TK.cjs.map → chunk-W6PTT27N.cjs.map} +1 -1
  187. package/dist/{chunk-U4YOVI5D.cjs → chunk-W7TSEN3J.cjs} +6 -6
  188. package/dist/{chunk-U4YOVI5D.cjs.map → chunk-W7TSEN3J.cjs.map} +1 -1
  189. package/dist/{chunk-W5QSKW7T.cjs → chunk-WHHBEV4G.cjs} +4 -4
  190. package/dist/{chunk-W5QSKW7T.cjs.map → chunk-WHHBEV4G.cjs.map} +1 -1
  191. package/dist/{chunk-POFKTD4G.cjs → chunk-WQQ6C2ML.cjs} +5 -5
  192. package/dist/{chunk-POFKTD4G.cjs.map → chunk-WQQ6C2ML.cjs.map} +1 -1
  193. package/dist/{chunk-36NQMOJE.cjs → chunk-XGMA7ITI.cjs} +6 -6
  194. package/dist/{chunk-36NQMOJE.cjs.map → chunk-XGMA7ITI.cjs.map} +1 -1
  195. package/dist/{chunk-FVSJXCKF.cjs → chunk-XKOIHIVQ.cjs} +4 -4
  196. package/dist/{chunk-FVSJXCKF.cjs.map → chunk-XKOIHIVQ.cjs.map} +1 -1
  197. package/dist/{chunk-HXYOG3DH.cjs → chunk-Y4OTUJGD.cjs} +10 -10
  198. package/dist/{chunk-HXYOG3DH.cjs.map → chunk-Y4OTUJGD.cjs.map} +1 -1
  199. package/dist/{chunk-YA6GXWC2.cjs → chunk-ZQQVXRYZ.cjs} +4 -4
  200. package/dist/{chunk-YA6GXWC2.cjs.map → chunk-ZQQVXRYZ.cjs.map} +1 -1
  201. package/dist/{chunk-HRLWD6FJ.cjs → chunk-ZSZI576U.cjs} +9 -9
  202. package/dist/{chunk-HRLWD6FJ.cjs.map → chunk-ZSZI576U.cjs.map} +1 -1
  203. package/dist/citations/index.cjs +8 -8
  204. package/dist/collaboration/direct-messages/DmParts.d.ts +2 -1
  205. package/dist/collaboration/direct-messages/DmParts.js +21 -7
  206. package/dist/collaboration/direct-messages/DmParts.js.map +2 -2
  207. package/dist/collaboration/index.cjs +82 -82
  208. package/dist/components/EntityChip.d.ts +2 -1
  209. package/dist/components/EntityChip.js +2 -0
  210. package/dist/components/EntityChip.js.map +2 -2
  211. package/dist/connect/docx.cjs +23 -23
  212. package/dist/connect/index.cjs +2380 -1831
  213. package/dist/connect/index.cjs.map +1 -1
  214. package/dist/connect/viewer.cjs +39 -37
  215. package/dist/connection/ConnectedAgentChatPanel.d.ts +3 -1
  216. package/dist/connection/ConnectedAgentChatPanel.js +10 -5
  217. package/dist/connection/ConnectedAgentChatPanel.js.map +2 -2
  218. package/dist/connection/agents/ConnectedAgentsPage.js +6 -1
  219. package/dist/connection/agents/ConnectedAgentsPage.js.map +2 -2
  220. package/dist/connection/calendar/ConnectedCalendar.js +4 -2
  221. package/dist/connection/calendar/ConnectedCalendar.js.map +2 -2
  222. package/dist/connection/calendar/EventScheduling.js +29 -4
  223. package/dist/connection/calendar/EventScheduling.js.map +2 -2
  224. package/dist/connection/contacts/ConnectedContactsPanel.js +4 -2
  225. package/dist/connection/contacts/ConnectedContactsPanel.js.map +2 -2
  226. package/dist/connection/conversation/AgentControlBar.js +2 -2
  227. package/dist/connection/conversation/AgentControlBar.js.map +2 -2
  228. package/dist/connection/conversation/AnswerTable.js +19 -2
  229. package/dist/connection/conversation/AnswerTable.js.map +2 -2
  230. package/dist/connection/conversation/ConnectedMarkdown.js +58 -24
  231. package/dist/connection/conversation/ConnectedMarkdown.js.map +2 -2
  232. package/dist/connection/conversation/ConnectedMessage.js +19 -14
  233. package/dist/connection/conversation/ConnectedMessage.js.map +2 -2
  234. package/dist/connection/conversation/ConversationComposer.js +29 -7
  235. package/dist/connection/conversation/ConversationComposer.js.map +2 -2
  236. package/dist/connection/conversation/DocumentWorkspaceContext.d.ts +7 -2
  237. package/dist/connection/conversation/DocumentWorkspaceContext.js +31 -11
  238. package/dist/connection/conversation/DocumentWorkspaceContext.js.map +2 -2
  239. package/dist/connection/conversation/EntityReference.d.ts +8 -0
  240. package/dist/connection/conversation/EntityReference.js +124 -0
  241. package/dist/connection/conversation/EntityReference.js.map +7 -0
  242. package/dist/connection/conversation/entity-references.d.ts +1 -0
  243. package/dist/connection/conversation/entity-references.js +7 -0
  244. package/dist/connection/conversation/entity-references.js.map +7 -0
  245. package/dist/connection/conversation/open-entity-reference.d.ts +5 -0
  246. package/dist/connection/conversation/open-entity-reference.js +57 -0
  247. package/dist/connection/conversation/open-entity-reference.js.map +7 -0
  248. package/dist/connection/databases/ConnectedDatabasesPage.js +15 -2
  249. package/dist/connection/databases/ConnectedDatabasesPage.js.map +2 -2
  250. package/dist/connection/databases/DatabaseViewsMenu.d.ts +2 -1
  251. package/dist/connection/databases/DatabaseViewsMenu.js +9 -0
  252. package/dist/connection/databases/DatabaseViewsMenu.js.map +2 -2
  253. package/dist/connection/entities/ConnectedDocumentPill.js +5 -1
  254. package/dist/connection/entities/ConnectedDocumentPill.js.map +2 -2
  255. package/dist/connection/entities/ConnectedUserEntity.js +3 -0
  256. package/dist/connection/entities/ConnectedUserEntity.js.map +2 -2
  257. package/dist/connection/entities/ConnectedWorkspaceEntity.js +4 -0
  258. package/dist/connection/entities/ConnectedWorkspaceEntity.js.map +2 -2
  259. package/dist/connection/files/fields/fields-manager-panel.d.ts +1 -1
  260. package/dist/connection/files/fields/fields-manager-panel.js +1 -1
  261. package/dist/connection/files/fields/fields-manager-panel.js.map +2 -2
  262. package/dist/connection/files/grid/cells.js +11 -2
  263. package/dist/connection/files/grid/cells.js.map +2 -2
  264. package/dist/connection/files/upload/useAddFromUrls.d.ts +1 -1
  265. package/dist/connection/files/upload/useAddFromUrls.js +1 -1
  266. package/dist/connection/files/upload/useAddFromUrls.js.map +1 -1
  267. package/dist/connection/files/views/ViewSelector.js +13 -1
  268. package/dist/connection/files/views/ViewSelector.js.map +2 -2
  269. package/dist/connection/messenger/ConnectedChatThread.d.ts +0 -9
  270. package/dist/connection/messenger/ConnectedChatThread.js +72 -41
  271. package/dist/connection/messenger/ConnectedChatThread.js.map +2 -2
  272. package/dist/connection/messenger/ConnectedMessenger.js +6 -4
  273. package/dist/connection/messenger/ConnectedMessenger.js.map +2 -2
  274. package/dist/connection/messenger/DmAgentProgress.d.ts +7 -0
  275. package/dist/connection/messenger/DmAgentProgress.js +47 -0
  276. package/dist/connection/messenger/DmAgentProgress.js.map +7 -0
  277. package/dist/connection/messenger/full-variant.js +1 -1
  278. package/dist/connection/messenger/full-variant.js.map +2 -2
  279. package/dist/connection/panels/ConnectedPanelHost.d.ts +2 -10
  280. package/dist/connection/panels/ConnectedPanelHost.js +32 -4
  281. package/dist/connection/panels/ConnectedPanelHost.js.map +2 -2
  282. package/dist/connection/panels/ConnectedPanelRegistry.d.ts +1 -1
  283. package/dist/connection/panels/ConnectedPanelRegistry.js +1 -0
  284. package/dist/connection/panels/ConnectedPanelRegistry.js.map +2 -2
  285. package/dist/connection/panels/ConversationPresentation.d.ts +15 -0
  286. package/dist/connection/panels/ConversationPresentation.js +13 -0
  287. package/dist/connection/panels/ConversationPresentation.js.map +7 -0
  288. package/dist/connection/report-problem/CaptureBar.d.ts +4 -5
  289. package/dist/connection/report-problem/CaptureBar.js +56 -13
  290. package/dist/connection/report-problem/CaptureBar.js.map +2 -2
  291. package/dist/connection/report-problem/ConnectedReportProblem.d.ts +3 -1
  292. package/dist/connection/report-problem/ConnectedReportProblem.js +9 -2
  293. package/dist/connection/report-problem/ConnectedReportProblem.js.map +2 -2
  294. package/dist/connection/report-problem/ReportProblemDialog.d.ts +6 -1
  295. package/dist/connection/report-problem/ReportProblemDialog.js +24 -9
  296. package/dist/connection/report-problem/ReportProblemDialog.js.map +2 -2
  297. package/dist/connection/report-problem/SupportVideoEvidence.d.ts +7 -0
  298. package/dist/connection/report-problem/SupportVideoEvidence.js +134 -0
  299. package/dist/connection/report-problem/SupportVideoEvidence.js.map +7 -0
  300. package/dist/connection/report-problem/screen-capture.d.ts +2 -0
  301. package/dist/connection/report-problem/screen-capture.js +11 -6
  302. package/dist/connection/report-problem/screen-capture.js.map +2 -2
  303. package/dist/connection/report-problem/support-browser-context.d.ts +5 -0
  304. package/dist/connection/report-problem/support-browser-context.js +19 -0
  305. package/dist/connection/report-problem/support-browser-context.js.map +7 -0
  306. package/dist/connection/report-problem/useReportProblem.js +16 -7
  307. package/dist/connection/report-problem/useReportProblem.js.map +2 -2
  308. package/dist/connection/report-problem/useSupportVideo.d.ts +21 -0
  309. package/dist/connection/report-problem/useSupportVideo.js +167 -0
  310. package/dist/connection/report-problem/useSupportVideo.js.map +7 -0
  311. package/dist/connection/routes/useDeepLinkSync.js +41 -5
  312. package/dist/connection/routes/useDeepLinkSync.js.map +2 -2
  313. package/dist/connection/shell/workspace-project-line.js +1 -0
  314. package/dist/connection/shell/workspace-project-line.js.map +2 -2
  315. package/dist/connection/tags/ConnectedTagsPage.js +10 -1
  316. package/dist/connection/tags/ConnectedTagsPage.js.map +2 -2
  317. package/dist/connection/threads/ConversationEntity.js +8 -1
  318. package/dist/connection/threads/ConversationEntity.js.map +2 -2
  319. package/dist/connection/viewer/ViewerPdfPane.js +18 -2
  320. package/dist/connection/viewer/ViewerPdfPane.js.map +2 -2
  321. package/dist/connection/viewer/useViewedDocument.d.ts +1 -0
  322. package/dist/connection/viewer/useViewedDocument.js +4 -1
  323. package/dist/connection/viewer/useViewedDocument.js.map +2 -2
  324. package/dist/connection/viewer/useViewerTabs.js +6 -3
  325. package/dist/connection/viewer/useViewerTabs.js.map +2 -2
  326. package/dist/dashboards/index.cjs +18 -18
  327. package/dist/embed/index.cjs +49 -48
  328. package/dist/facts/index.cjs +46 -46
  329. package/dist/files/cells/DocumentNameCell.d.ts +2 -1
  330. package/dist/files/cells/DocumentNameCell.js +7 -1
  331. package/dist/files/cells/DocumentNameCell.js.map +2 -2
  332. package/dist/files/index.cjs +232 -232
  333. package/dist/home/index.cjs +26 -26
  334. package/dist/index.cjs +1026 -1022
  335. package/dist/index.d.ts +1 -1
  336. package/dist/index.js +2 -0
  337. package/dist/index.js.map +2 -2
  338. package/dist/lib/entity-id.d.ts +5 -0
  339. package/dist/lib/entity-id.js +14 -0
  340. package/dist/lib/entity-id.js.map +7 -0
  341. package/dist/lib/routes.d.ts +2 -0
  342. package/dist/lib/routes.js +32 -2
  343. package/dist/lib/routes.js.map +2 -2
  344. package/dist/pages/index.cjs +50 -50
  345. package/dist/provider/environment.d.ts +4 -0
  346. package/dist/provider/environment.js.map +2 -2
  347. package/dist/retrieval/index.cjs +4 -4
  348. package/dist/settings/index.cjs +139 -139
  349. package/dist/shell/PanelPortal.d.ts +2 -13
  350. package/dist/shell/PanelPortal.js +61 -10
  351. package/dist/shell/PanelPortal.js.map +2 -2
  352. package/dist/shell/index.cjs +53 -53
  353. package/dist/shell/useFloatingDrag.d.ts +23 -0
  354. package/dist/shell/useFloatingDrag.js +195 -0
  355. package/dist/shell/useFloatingDrag.js.map +7 -0
  356. package/dist/studio/index.cjs +35 -36
  357. package/dist/studio/index.cjs.map +1 -1
  358. package/dist/styles.css +1 -1
  359. package/dist/workflow-canvas/index.cjs +78 -79
  360. package/dist/workflow-canvas/index.cjs.map +1 -1
  361. package/dist/workspaces/index.cjs +26 -26
  362. package/node_modules/@arbidocs/coedit/package.json +1 -1
  363. package/package.json +5 -5
  364. package/dist/ConnectedMailInviteCard-LV2VARX3.cjs +0 -22
  365. package/dist/ConnectedProductionSetDialog-4N7R7SFZ.cjs.map +0 -1
  366. package/dist/FilesViewerDialog-2MJHM32X.cjs.map +0 -1
  367. package/dist/ai-HME7CNDE.cjs.map +0 -1
  368. package/dist/chunk-63FEMB6U.cjs.map +0 -1
  369. package/dist/chunk-6U3CYVZC.cjs.map +0 -1
  370. package/dist/chunk-7HHIVC23.cjs.map +0 -1
  371. package/dist/chunk-7XR6CPCU.cjs.map +0 -1
  372. package/dist/chunk-AIKPZJNI.cjs.map +0 -1
  373. package/dist/chunk-CKJTXS63.cjs.map +0 -1
  374. package/dist/chunk-CYI4OYZD.cjs.map +0 -1
  375. package/dist/chunk-GEQW7XQA.cjs.map +0 -1
  376. package/dist/chunk-JARBYN6Z.cjs.map +0 -1
  377. package/dist/chunk-JHDCDEXY.cjs.map +0 -1
  378. package/dist/chunk-KL7R2IBY.cjs.map +0 -1
  379. package/dist/chunk-LOSCXAAF.cjs.map +0 -1
  380. package/dist/chunk-MCXS6X37.cjs +0 -13
  381. package/dist/chunk-MCXS6X37.cjs.map +0 -1
  382. package/dist/chunk-MSFWSDRS.cjs +0 -320
  383. package/dist/chunk-MSFWSDRS.cjs.map +0 -1
  384. package/dist/chunk-P7VUIW24.cjs.map +0 -1
  385. package/dist/chunk-SH7W4WVI.cjs.map +0 -1
  386. package/dist/chunk-SLQPSKYU.cjs.map +0 -1
  387. package/dist/chunk-T5XLL4L2.cjs.map +0 -1
  388. package/dist/chunk-VHD5DZW4.cjs.map +0 -1
  389. package/dist/chunk-XKQVAGVR.cjs.map +0 -1
  390. package/dist/chunk-Z2XZ2D4N.cjs.map +0 -1
@@ -1,42 +1,41 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkKJ65QZJI_cjs = require('./chunk-KJ65QZJI.cjs');
5
- var chunkYGCS53TK_cjs = require('./chunk-YGCS53TK.cjs');
6
- var chunkFVSJXCKF_cjs = require('./chunk-FVSJXCKF.cjs');
4
+ var chunkM3HYFFCK_cjs = require('./chunk-M3HYFFCK.cjs');
5
+ var chunkW6PTT27N_cjs = require('./chunk-W6PTT27N.cjs');
6
+ var chunkXKOIHIVQ_cjs = require('./chunk-XKOIHIVQ.cjs');
7
7
  var chunkTJY7XPDE_cjs = require('./chunk-TJY7XPDE.cjs');
8
8
  var chunkXNW62J54_cjs = require('./chunk-XNW62J54.cjs');
9
- var chunk3GQQUR27_cjs = require('./chunk-3GQQUR27.cjs');
10
- var chunkSH7W4WVI_cjs = require('./chunk-SH7W4WVI.cjs');
11
- var chunkMSFWSDRS_cjs = require('./chunk-MSFWSDRS.cjs');
12
- var chunkFQXZZXS2_cjs = require('./chunk-FQXZZXS2.cjs');
9
+ var chunkPNZVCHFS_cjs = require('./chunk-PNZVCHFS.cjs');
10
+ var chunkAHUEBRLX_cjs = require('./chunk-AHUEBRLX.cjs');
13
11
  var chunkJWCVA4LC_cjs = require('./chunk-JWCVA4LC.cjs');
14
12
  var chunk223D4727_cjs = require('./chunk-223D4727.cjs');
15
- var chunkGB5MN5FC_cjs = require('./chunk-GB5MN5FC.cjs');
16
13
  var chunkQQMMCXBP_cjs = require('./chunk-QQMMCXBP.cjs');
17
14
  var chunk4B6HYQTW_cjs = require('./chunk-4B6HYQTW.cjs');
18
15
  var chunkMZZ3SBQL_cjs = require('./chunk-MZZ3SBQL.cjs');
19
- var chunkLLVE5TST_cjs = require('./chunk-LLVE5TST.cjs');
20
- var chunkDYIZ7W4P_cjs = require('./chunk-DYIZ7W4P.cjs');
16
+ var chunk6N7QT2DH_cjs = require('./chunk-6N7QT2DH.cjs');
17
+ var chunk6ZJBUMNK_cjs = require('./chunk-6ZJBUMNK.cjs');
21
18
  var chunkNZNBJF3M_cjs = require('./chunk-NZNBJF3M.cjs');
22
19
  var chunkWRTEKOQP_cjs = require('./chunk-WRTEKOQP.cjs');
23
- var chunk3YZKDCWY_cjs = require('./chunk-3YZKDCWY.cjs');
24
- var chunkJARBYN6Z_cjs = require('./chunk-JARBYN6Z.cjs');
20
+ var chunkVNUBBRJM_cjs = require('./chunk-VNUBBRJM.cjs');
25
21
  var chunkM55XUF4L_cjs = require('./chunk-M55XUF4L.cjs');
26
- var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
27
22
  var chunkV6C2MBFY_cjs = require('./chunk-V6C2MBFY.cjs');
28
23
  var chunkM74FWYNL_cjs = require('./chunk-M74FWYNL.cjs');
29
- var chunkJHDCDEXY_cjs = require('./chunk-JHDCDEXY.cjs');
30
- var chunkVHD5DZW4_cjs = require('./chunk-VHD5DZW4.cjs');
24
+ var chunkTNBNDY2J_cjs = require('./chunk-TNBNDY2J.cjs');
25
+ var chunk7FWP7W34_cjs = require('./chunk-7FWP7W34.cjs');
26
+ var chunkVWSOHZK2_cjs = require('./chunk-VWSOHZK2.cjs');
27
+ var chunk3YZKDCWY_cjs = require('./chunk-3YZKDCWY.cjs');
28
+ var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
29
+ var chunkW5JTACMK_cjs = require('./chunk-W5JTACMK.cjs');
30
+ var chunkKBRDUFXG_cjs = require('./chunk-KBRDUFXG.cjs');
31
31
  var chunk5F4DCIHS_cjs = require('./chunk-5F4DCIHS.cjs');
32
- var chunkZ2XZ2D4N_cjs = require('./chunk-Z2XZ2D4N.cjs');
33
- var chunkMCXS6X37_cjs = require('./chunk-MCXS6X37.cjs');
32
+ var chunkO2NHBB3D_cjs = require('./chunk-O2NHBB3D.cjs');
34
33
  var chunk75BNMCUX_cjs = require('./chunk-75BNMCUX.cjs');
35
- var chunk7XR6CPCU_cjs = require('./chunk-7XR6CPCU.cjs');
34
+ var chunkPIJPM5RA_cjs = require('./chunk-PIJPM5RA.cjs');
36
35
  var chunkY3GJBLAI_cjs = require('./chunk-Y3GJBLAI.cjs');
37
36
  var chunkIPSHAMO2_cjs = require('./chunk-IPSHAMO2.cjs');
38
37
  var chunkLJJJ6CYH_cjs = require('./chunk-LJJJ6CYH.cjs');
39
- var chunk46LX6EQT_cjs = require('./chunk-46LX6EQT.cjs');
38
+ var chunkHN56WWBR_cjs = require('./chunk-HN56WWBR.cjs');
40
39
  var jsxRuntime = require('react/jsx-runtime');
41
40
  var React6 = require('react');
42
41
  var client = require('@arbidocs/client');
@@ -55,7 +54,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
55
54
  var React6__default = /*#__PURE__*/_interopDefault(React6);
56
55
 
57
56
  var renderConnectedUser = (user, { tooltip, variant = "icon" }) => /* @__PURE__ */ jsxRuntime.jsx(
58
- chunkSH7W4WVI_cjs.ConnectedUserEntity,
57
+ chunk7FWP7W34_cjs.ConnectedUserEntity,
59
58
  {
60
59
  user,
61
60
  size: variant === "pill" ? "sm" : "xs",
@@ -77,6 +76,14 @@ function canCaptureScreen() {
77
76
  return typeof navigator !== "undefined" && !!navigator.mediaDevices?.getDisplayMedia;
78
77
  }
79
78
  async function captureCurrentTab() {
79
+ const stream = await requestScreenCapture();
80
+ try {
81
+ return await grabFrame(stream);
82
+ } finally {
83
+ stream.getTracks().forEach((track) => track.stop());
84
+ }
85
+ }
86
+ async function requestScreenCapture() {
80
87
  if (!canCaptureScreen()) {
81
88
  throw new ScreenCaptureError("unsupported", "This browser can't capture the screen.");
82
89
  }
@@ -97,11 +104,7 @@ async function captureCurrentTab() {
97
104
  }
98
105
  throw new ScreenCaptureError("failed", "Couldn't start screen capture.");
99
106
  }
100
- try {
101
- return await grabFrame(stream);
102
- } finally {
103
- stream.getTracks().forEach((track) => track.stop());
104
- }
107
+ return stream;
105
108
  }
106
109
  async function grabFrame(stream) {
107
110
  const video = document.createElement("video");
@@ -140,7 +143,7 @@ function collectBrowserDiagnostics() {
140
143
  };
141
144
  const stringify = (value) => {
142
145
  if (value instanceof Error)
143
- return chunkFQXZZXS2_cjs.formatErrorReport({ error: value, url: safeUrl(location.href) });
146
+ return chunkAHUEBRLX_cjs.formatErrorReport({ error: value, url: safeUrl(location.href) });
144
147
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean")
145
148
  return String(value);
146
149
  return "[object omitted]";
@@ -538,7 +541,7 @@ function useRemoteControlHandlers() {
538
541
  );
539
542
  }
540
543
  function ConnectionBoundWebSocket({ children }) {
541
- const { status } = chunkGB5MN5FC_cjs.useConnection();
544
+ const { status } = chunkVWSOHZK2_cjs.useConnection();
542
545
  return /* @__PURE__ */ jsxRuntime.jsx(
543
546
  react.ArbiWebSocketProvider,
544
547
  {
@@ -549,7 +552,7 @@ function ConnectionBoundWebSocket({ children }) {
549
552
  );
550
553
  }
551
554
  function OfflineMail({ children }) {
552
- const { openMail } = chunk46LX6EQT_cjs.useBlocksEnvironment();
555
+ const { openMail } = chunkHN56WWBR_cjs.useBlocksEnvironment();
553
556
  react.useOfflineMailRuntime({ openOutbox: () => openMail?.({ folder: react.OUTBOX_FOLDER }) });
554
557
  return children;
555
558
  }
@@ -564,7 +567,7 @@ function defaultHost(config, { queryClient, sessionStorage: sessionStorage2 } =
564
567
  arbi.onSigningOut(() => client$1.clear());
565
568
  arbi.onSessionExpired(() => client$1.clear());
566
569
  function DefaultHostConnection({ children }) {
567
- return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: client$1, children: /* @__PURE__ */ jsxRuntime.jsx(chunkGB5MN5FC_cjs.ConnectionProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(ConnectionBoundWebSocket, { children: /* @__PURE__ */ jsxRuntime.jsx(OfflineMail, { children }) }) }) });
570
+ return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: client$1, children: /* @__PURE__ */ jsxRuntime.jsx(chunkVWSOHZK2_cjs.ConnectionProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(ConnectionBoundWebSocket, { children: /* @__PURE__ */ jsxRuntime.jsx(OfflineMail, { children }) }) }) });
568
571
  }
569
572
  return {
570
573
  arbi,
@@ -611,7 +614,7 @@ function ConnectedProfileCard({
611
614
  nameBadge,
612
615
  children
613
616
  }) {
614
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
617
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
615
618
  const { data: profile } = react.useProfile();
616
619
  const updateProfile = react.useUpdateProfile();
617
620
  const requestEmailChange = react.useRequestEmailChange();
@@ -664,11 +667,11 @@ function ConnectedProfileCard({
664
667
  const display = profile?.fullName || "Unnamed";
665
668
  return /* @__PURE__ */ jsxRuntime.jsxs(chunkQQMMCXBP_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title: "Profile", children: [
666
669
  /* @__PURE__ */ jsxRuntime.jsx(
667
- chunkFQXZZXS2_cjs.ProfileCard,
670
+ chunkAHUEBRLX_cjs.ProfileCard,
668
671
  {
669
672
  avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
670
673
  /* @__PURE__ */ jsxRuntime.jsx(
671
- chunkFQXZZXS2_cjs.AvatarPicker,
674
+ chunkAHUEBRLX_cjs.AvatarPicker,
672
675
  {
673
676
  pictureUrl: profile?.picture,
674
677
  initials: chunkIPSHAMO2_cjs.initials(display),
@@ -709,7 +712,7 @@ function ConnectedIdentityVerification({
709
712
  onManageBilling,
710
713
  formatPrice
711
714
  }) {
712
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
715
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
713
716
  const { data: profile } = react.useProfile();
714
717
  const flow = react.useIdentityVerification({
715
718
  formatPrice,
@@ -718,7 +721,7 @@ function ConnectedIdentityVerification({
718
721
  });
719
722
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
720
723
  /* @__PURE__ */ jsxRuntime.jsx(
721
- chunkFQXZZXS2_cjs.IdentityVerificationCard,
724
+ chunkAHUEBRLX_cjs.IdentityVerificationCard,
722
725
  {
723
726
  flow,
724
727
  labels,
@@ -727,7 +730,7 @@ function ConnectedIdentityVerification({
727
730
  }
728
731
  ),
729
732
  /* @__PURE__ */ jsxRuntime.jsx(
730
- chunkFQXZZXS2_cjs.IdentityVerificationDialog,
733
+ chunkAHUEBRLX_cjs.IdentityVerificationDialog,
731
734
  {
732
735
  flow,
733
736
  accountName: profile?.fullName ?? "",
@@ -743,7 +746,7 @@ function ConnectedPasswordChangeDialog({
743
746
  recoveryMode = false,
744
747
  onRecoveryComplete
745
748
  }) {
746
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
749
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
747
750
  const getUnmetRequirement = useAuthPages().passwordRules.unmet;
748
751
  const change = react.usePasswordChange();
749
752
  const form = react.usePasswordChangeForm({
@@ -760,7 +763,7 @@ function ConnectedPasswordChangeDialog({
760
763
  onRecoveryComplete
761
764
  });
762
765
  return /* @__PURE__ */ jsxRuntime.jsx(
763
- chunkFQXZZXS2_cjs.PasswordChangeDialog,
766
+ chunkAHUEBRLX_cjs.PasswordChangeDialog,
764
767
  {
765
768
  open,
766
769
  onClose: form.onCancel,
@@ -808,7 +811,7 @@ function ConnectedNotificationPreferences({
808
811
  );
809
812
  const prefs = react.useNotificationPreferences(keys);
810
813
  return /* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsSection, { title: "Notifications", children: /* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
811
- chunkFQXZZXS2_cjs.NotificationCategoryList,
814
+ chunkAHUEBRLX_cjs.NotificationCategoryList,
812
815
  {
813
816
  masterId: "emailNotifications",
814
817
  masterTitle: "Email Notifications",
@@ -823,7 +826,7 @@ function ConnectedNotificationPreferences({
823
826
  function ConnectedSessionsRow({
824
827
  renderSessionIcon = renderSessionStatusIcon
825
828
  }) {
826
- const { notify: notify3, confirm } = chunk46LX6EQT_cjs.useBlocksEnvironment();
829
+ const { notify: notify3, confirm } = chunkHN56WWBR_cjs.useBlocksEnvironment();
827
830
  const [open, setOpen] = React6.useState(false);
828
831
  const sessions = react.useSessions({ enabled: open });
829
832
  const currentSessionId = react.useCurrentSessionId();
@@ -857,7 +860,7 @@ function ConnectedSessionsRow({
857
860
  }
858
861
  ),
859
862
  /* @__PURE__ */ jsxRuntime.jsx(
860
- chunkFQXZZXS2_cjs.ActiveSessionsDialog,
863
+ chunkAHUEBRLX_cjs.ActiveSessionsDialog,
861
864
  {
862
865
  open,
863
866
  onOpenChange: setOpen,
@@ -893,7 +896,7 @@ function ConnectedLogoutDialog({
893
896
  const sessions = react.useSessions({ enabled: open });
894
897
  const signOut = react.useSignOut();
895
898
  const isOnline = core.useIsOnline();
896
- const { confirm } = chunk46LX6EQT_cjs.useBlocksEnvironment();
899
+ const { confirm } = chunkHN56WWBR_cjs.useBlocksEnvironment();
897
900
  const run = async (everywhere) => {
898
901
  onClose();
899
902
  const confirmed = confirmSignOut ? confirmSignOut() : react.confirmLosingOfflineMail(confirm);
@@ -901,7 +904,7 @@ function ConnectedLogoutDialog({
901
904
  signOut.mutate({ everywhere, reason: "manual" });
902
905
  };
903
906
  return /* @__PURE__ */ jsxRuntime.jsx(
904
- chunkFQXZZXS2_cjs.LogoutDialog,
907
+ chunkAHUEBRLX_cjs.LogoutDialog,
905
908
  {
906
909
  open,
907
910
  onClose,
@@ -915,7 +918,7 @@ function ConnectedLogoutDialog({
915
918
  );
916
919
  }
917
920
  function ConnectedDangerZone({ renderSubscriptionLink }) {
918
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
921
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
919
922
  const [zoneOpen, setZoneOpen] = React6.useState(false);
920
923
  const [dialogOpen, setDialogOpen] = React6.useState(false);
921
924
  const { data: profile } = react.useProfile();
@@ -951,7 +954,7 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
951
954
  }
952
955
  ),
953
956
  /* @__PURE__ */ jsxRuntime.jsx(
954
- chunkFQXZZXS2_cjs.DeleteAccountDialog,
957
+ chunkAHUEBRLX_cjs.DeleteAccountDialog,
955
958
  {
956
959
  open: dialogOpen,
957
960
  onClose: flow.onClose,
@@ -968,988 +971,1010 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
968
971
  )
969
972
  ] });
970
973
  }
971
- var STANDARD_TIER_TAG = "Standard";
972
- var PREMIUM_TIER_TAG = "Premium";
973
- function useModelPicker({
974
- value: controlledValue,
975
- onValueChange: controlledOnChange
974
+ function MessageLiveSecondsComponent({
975
+ conversationId,
976
+ messageId,
977
+ isUser,
978
+ isGenerating,
979
+ offsetSeconds = 0,
980
+ fallbackSeconds,
981
+ minDisplaySeconds = 0,
982
+ suffix = "s"
976
983
  }) {
977
- const { data: availableModels } = react.useAvailableModels();
984
+ const { elapsedTime } = react.useMessageTimer({ conversationId, messageId, isUser, isGenerating });
985
+ const base = elapsedTime > 0 ? elapsedTime : fallbackSeconds ?? 0;
986
+ const value = base - offsetSeconds;
987
+ if (!Number.isFinite(value) || value < minDisplaySeconds) return null;
988
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
989
+ value.toFixed(1),
990
+ suffix
991
+ ] });
992
+ }
993
+ var MessageLiveSeconds = React6__default.default.memo(MessageLiveSecondsComponent);
994
+ var DISPLAY_FIELDS = /* @__PURE__ */ new Set(["tool", "label", "icon", "summary"]);
995
+ function getToolParams(detail) {
996
+ const params = [];
997
+ for (const [key, value] of Object.entries(detail)) {
998
+ if (DISPLAY_FIELDS.has(key) || value == null) continue;
999
+ const strValue = typeof value === "string" ? value : JSON.stringify(value);
1000
+ params.push({ key, value: strValue });
1001
+ }
1002
+ return params;
1003
+ }
1004
+ function StepModelIcon({ modelName, tag }) {
1005
+ const cfg = tag === "Premium" ? null : chunkVNUBBRJM_cjs.getModelIcon(modelName, tag);
1006
+ if (tag !== "Premium" && !cfg) return null;
1007
+ return /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
1008
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: tag === "Premium" ? /* @__PURE__ */ jsxRuntime.jsx(ui.ProviderIcon, { modelName: modelName ?? void 0, size: 11 }) : cfg && /* @__PURE__ */ jsxRuntime.jsx(cfg.icon, { className: cfg.className, style: { width: 11, height: 11 } }) }) }),
1009
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { children: modelName })
1010
+ ] });
1011
+ }
1012
+ var AgentStepsComponent = ({
1013
+ steps,
1014
+ isStreaming,
1015
+ className,
1016
+ totalElapsedTime,
1017
+ liveTimer,
1018
+ hideLive = false,
1019
+ contextUsage
1020
+ }) => {
978
1021
  const { data: userSettings } = react.useUserSettings();
979
1022
  const isDeveloper = userSettings?.developer === true;
980
- const isControlled = controlledValue !== void 0;
981
- const applyChatModel = react.useApplyChatModel();
982
- const { openSettings } = chunk46LX6EQT_cjs.useBlocksEnvironment();
983
- const currentConversationModel = react.useArbiSessionState((state) => state.chatModelName);
984
- const chatConfigId = react.useArbiSessionState((state) => state.chatModel);
985
- const sendConfigId = chatConfigId ?? userSettings?.last_config;
986
- const { data: sendConfig } = react.useConfig(sendConfigId, {
987
- enabled: !isControlled && !currentConversationModel
988
- });
989
- const sendConfigModel = sendConfig ? react.resolveConfigModel(sendConfig) : void 0;
990
- const premiumModelPref = userSettings?.premium_model;
991
- const { standardTier, premiumTier, developerModels } = React6.useMemo(() => {
992
- const empty = {
993
- standardTier: null,
994
- premiumTier: null,
995
- developerModels: []
1023
+ const invalidateWorkflows = react.useInvalidateWorkflows();
1024
+ const createdWorkflow = steps.some((step) => browser.getStepTool(step) === "create_workflow");
1025
+ React6.useEffect(() => {
1026
+ if (createdWorkflow && !isStreaming) void invalidateWorkflows();
1027
+ }, [createdWorkflow, isStreaming]);
1028
+ const invalidateAssistant = react.useInvalidateAssistant();
1029
+ const setBrief = steps.some((step) => browser.getStepTool(step) === "set_assistant_brief");
1030
+ React6.useEffect(() => {
1031
+ if (setBrief && !isStreaming) void invalidateAssistant();
1032
+ }, [setBrief, isStreaming]);
1033
+ const { data: documents = [] } = react.useDocuments();
1034
+ const docInfo = React6.useMemo(() => {
1035
+ const map = {};
1036
+ const docArray = Array.isArray(documents) ? documents : [];
1037
+ for (const doc of docArray) {
1038
+ if (doc && "external_id" in doc) {
1039
+ const d = doc;
1040
+ map[d.external_id] = {
1041
+ name: ui.getDocumentTitle(d, d.file_name ?? d.external_id),
1042
+ pages: d.n_pages ?? null
1043
+ };
1044
+ }
1045
+ }
1046
+ return map;
1047
+ }, [documents]);
1048
+ const { data: availableModels } = react.useAvailableModels();
1049
+ const getModelTag = React6.useMemo(() => {
1050
+ return (modelName) => {
1051
+ if (!modelName || !availableModels?.models) return null;
1052
+ return availableModels.models.find((m) => m.model_name === modelName)?.tags?.[0] || null;
996
1053
  };
997
- if (!availableModels?.models) return empty;
998
- const standardMembers = availableModels.models.filter(
999
- (m) => m.tags?.includes(STANDARD_TIER_TAG)
1054
+ }, [availableModels]);
1055
+ const mergedSteps = React6.useMemo(() => {
1056
+ const merged = browser.mergeAgentSteps(steps);
1057
+ if (!hideLive) return merged;
1058
+ const runningHandles = new Set(
1059
+ browser.extractSubagentLanes(merged).filter((l) => l.status === "running").map((l) => l.handle)
1000
1060
  );
1001
- const standardTier2 = standardMembers.length > 0 ? { members: standardMembers } : null;
1002
- const premiumMembers = availableModels.models.filter((m) => m.tags?.includes(PREMIUM_TIER_TAG));
1003
- let premiumTier2 = null;
1004
- if (premiumMembers.length > 0) {
1005
- const matchPref = premiumModelPref && premiumMembers.find((m) => m.model_name === premiumModelPref);
1006
- const backendDefault = availableModels.premium_default && premiumMembers.find((m) => m.model_name === availableModels.premium_default);
1007
- premiumTier2 = {
1008
- members: premiumMembers,
1009
- resolvedModelName: (matchPref || backendDefault || premiumMembers[0]).model_name
1010
- };
1061
+ return merged.filter((s) => !(s.subagent && runningHandles.has(s.subagent)));
1062
+ }, [steps, hideLive]);
1063
+ const stepDurations = React6.useMemo(() => {
1064
+ const durations = [];
1065
+ for (let i = 0; i < mergedSteps.length; i++) {
1066
+ const currentT = mergedSteps[i].t;
1067
+ if (currentT == null) {
1068
+ durations.push(null);
1069
+ continue;
1070
+ }
1071
+ if (i + 1 < mergedSteps.length) {
1072
+ const nextT = mergedSteps[i + 1].t;
1073
+ durations.push(nextT != null ? nextT - currentT : null);
1074
+ } else {
1075
+ const remaining = totalElapsedTime != null ? totalElapsedTime - currentT : null;
1076
+ durations.push(remaining != null && remaining >= 0 ? remaining : null);
1077
+ }
1011
1078
  }
1012
- const tierMemberNames = /* @__PURE__ */ new Set();
1013
- for (const m of standardMembers) tierMemberNames.add(m.model_name);
1014
- for (const m of premiumMembers) tierMemberNames.add(m.model_name);
1015
- const seen = /* @__PURE__ */ new Set();
1016
- const developer = isDeveloper ? availableModels.models.filter((m) => {
1017
- if (m.connection_scope || tierMemberNames.has(m.model_name)) return false;
1018
- if (!m.model_name.includes("@") || seen.has(m.model_name)) return false;
1019
- seen.add(m.model_name);
1020
- return true;
1021
- }).sort((a, b) => a.model_name.localeCompare(b.model_name)) : [];
1022
- const custom = availableModels.models.filter(
1023
- (m) => m.connection_scope === "personal" || m.connection_scope === "box"
1024
- );
1025
- return { standardTier: standardTier2, premiumTier: premiumTier2, developerModels: [...custom, ...developer] };
1026
- }, [availableModels, isDeveloper, premiumModelPref]);
1027
- const selectedModel = (isControlled ? controlledValue : currentConversationModel || sendConfigModel) || react.AUTO_CHAT_MODEL;
1028
- const selectedModelInfo = React6.useMemo(
1029
- () => availableModels?.models?.find((m) => m.model_name === selectedModel),
1030
- [availableModels, selectedModel]
1031
- );
1032
- const handleModelChange = React6.useCallback(
1033
- (value) => {
1034
- if (isControlled) {
1035
- controlledOnChange?.(value);
1036
- return;
1079
+ return durations;
1080
+ }, [mergedSteps, totalElapsedTime]);
1081
+ const stepTokens = React6.useMemo(() => {
1082
+ return mergedSteps.map((step) => step.step_tokens ?? null);
1083
+ }, [mergedSteps]);
1084
+ const stepGbp = React6.useMemo(() => {
1085
+ return mergedSteps.map((step) => step.step_gbp ?? null);
1086
+ }, [mergedSteps]);
1087
+ const currentStepIndex = isStreaming ? browser.getCurrentStep(mergedSteps)?.index : void 0;
1088
+ if (mergedSteps.length === 0) return null;
1089
+ const posByIndex = new Map(mergedSteps.map((s, idx) => [s.index, idx]));
1090
+ const childrenByParent = /* @__PURE__ */ new Map();
1091
+ const topLevelSteps = [];
1092
+ const laneStepsByHandle = /* @__PURE__ */ new Map();
1093
+ const laneSpawnIndex = /* @__PURE__ */ new Map();
1094
+ for (const step of mergedSteps) {
1095
+ const handle = step.subagent;
1096
+ if (handle) {
1097
+ const arr = laneStepsByHandle.get(handle);
1098
+ if (arr) arr.push(step);
1099
+ else {
1100
+ laneStepsByHandle.set(handle, [step]);
1101
+ laneSpawnIndex.set(handle, step.index);
1037
1102
  }
1038
- const label = value === react.AUTO_CHAT_MODEL ? "Quick Model Change - Auto" : `Quick Model Change - ${value}`;
1039
- applyChatModel(value, label).catch(
1040
- (error) => console.error("Failed to save model config", error)
1041
- );
1042
- },
1043
- [isControlled, controlledOnChange, applyChatModel]
1044
- );
1045
- const isAuto = selectedModel === react.AUTO_CHAT_MODEL;
1046
- React6.useEffect(() => {
1047
- if (isControlled) return;
1048
- if (!premiumTier) return;
1049
- const onPremium = premiumTier.members.some((m) => m.model_name === selectedModel);
1050
- if (!onPremium) return;
1051
- if (premiumModelPref === "") {
1052
- handleModelChange(react.AUTO_CHAT_MODEL);
1103
+ continue;
1104
+ }
1105
+ const parent = step.parent_index;
1106
+ if (parent != null && parent !== step.index && posByIndex.has(parent)) {
1107
+ const siblings = childrenByParent.get(parent) ?? [];
1108
+ siblings.push(step);
1109
+ childrenByParent.set(parent, siblings);
1110
+ } else {
1111
+ topLevelSteps.push(step);
1112
+ }
1113
+ }
1114
+ const displayRows = [
1115
+ ...topLevelSteps.map((s) => ({ index: s.index, step: s })),
1116
+ ...[...laneStepsByHandle.keys()].map((h) => ({ index: laneSpawnIndex.get(h) ?? 0, lane: h }))
1117
+ ].sort((a, b) => a.index - b.index);
1118
+ const displayNumber = /* @__PURE__ */ new Map();
1119
+ displayRows.forEach((r, i) => {
1120
+ if (r.lane) {
1121
+ laneStepsByHandle.get(r.lane)?.filter((s) => !s.subagent_status).forEach((c, ci) => displayNumber.set(c.index, `${i + 1}.${ci + 1}`));
1053
1122
  return;
1054
1123
  }
1055
- if (selectedModel === premiumTier.resolvedModelName) return;
1056
- handleModelChange(premiumTier.resolvedModelName);
1057
- }, [isControlled, premiumTier, selectedModel, premiumModelPref, handleModelChange]);
1058
- const pricing = React6.useMemo(() => {
1059
- if (isAuto || !selectedModelInfo) return null;
1060
- const inputPrice = react.formatGbpPerMillionTokens(selectedModelInfo.input_cost_per_token);
1061
- const outputPrice = react.formatGbpPerMillionTokens(selectedModelInfo.output_cost_per_token);
1062
- if (!inputPrice && !outputPrice) return null;
1063
- return { inputPrice, outputPrice, modelName: selectedModelInfo.model_name };
1064
- }, [selectedModelInfo, isAuto]);
1065
- const openPremiumSettings = React6.useCallback(() => openSettings("chat"), [openSettings]);
1066
- return {
1067
- standardTier,
1068
- premiumTier,
1069
- developerModels,
1070
- selectedModel,
1071
- selectedModelInfo,
1072
- isAuto,
1073
- /** The user switched Premium off in settings. */
1074
- premiumDisabled: premiumModelPref === "",
1075
- pricing,
1076
- handleModelChange,
1077
- openPremiumSettings
1078
- };
1079
- }
1080
- var TAG_TIER = {
1081
- Standard: "standard",
1082
- Fast: "standard",
1083
- Wise: "wise",
1084
- Reasoning: "wise",
1085
- Premium: "premium"
1086
- };
1087
- function ArbiLogo() {
1088
- return /* @__PURE__ */ jsxRuntime.jsx("img", { src: ui.ARBI_MARK_SRC, alt: "ARBI", className: "size-3.5 shrink-0 rounded-md" });
1089
- }
1090
- function ConnectedModelSelector({
1091
- variant = "default",
1092
- className,
1093
- value,
1094
- onValueChange
1095
- }) {
1096
- const picker = useModelPicker({ value, onValueChange });
1097
- const {
1098
- standardTier,
1099
- premiumTier,
1100
- developerModels,
1101
- selectedModel,
1102
- selectedModelInfo,
1103
- isAuto,
1104
- premiumDisabled,
1105
- pricing,
1106
- handleModelChange
1107
- } = picker;
1108
- const [isOpen, setIsOpen] = React6.useState(false);
1109
- const standardIcon = (model) => {
1110
- let tier = TAG_TIER[model.model_name];
1111
- if (!tier) {
1112
- for (const t of model.tags ?? []) {
1113
- if (t === STANDARD_TIER_TAG || t === PREMIUM_TIER_TAG) continue;
1114
- if (TAG_TIER[t]) {
1115
- tier = TAG_TIER[t];
1116
- break;
1117
- }
1124
+ displayNumber.set(r.step.index, String(i + 1));
1125
+ childrenByParent.get(r.step.index)?.forEach((c, ci) => displayNumber.set(c.index, `${i + 1}.${ci + 1}`));
1126
+ });
1127
+ const lastStepIndex = mergedSteps[mergedSteps.length - 1].index;
1128
+ const renderRow = (step, depth, isLastInList) => {
1129
+ const i = posByIndex.get(step.index);
1130
+ const presentation = chunkVNUBBRJM_cjs.getAgentStepPresentation(step, docInfo);
1131
+ const { tool, Icon } = presentation;
1132
+ const { label, summary, isMultiLine, details } = browser.getStepDisplay(step, docInfo);
1133
+ const accent = chunkVNUBBRJM_cjs.stepAccent(step, tool);
1134
+ const duration = stepDurations[i];
1135
+ const isLastStep = step.index === lastStepIndex;
1136
+ const isActive = step.index === currentStepIndex;
1137
+ const tier = step.step === "goal" ? step.model_recommendation : null;
1138
+ const TierIcon = tier ? chunkVNUBBRJM_cjs.MODEL_TIER_ICON_MAP[tier] : null;
1139
+ const useLiveDuration = isLastStep && liveTimer != null && step.t != null;
1140
+ const durationNode = useLiveDuration ? /* @__PURE__ */ jsxRuntime.jsx(
1141
+ MessageLiveSeconds,
1142
+ {
1143
+ ...liveTimer,
1144
+ offsetSeconds: step.t,
1145
+ fallbackSeconds: totalElapsedTime ?? null,
1146
+ minDisplaySeconds: 0.05
1118
1147
  }
1119
- }
1120
- return tier ? /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelTierIcon, { tier }) : /* @__PURE__ */ jsxRuntime.jsx(ArbiLogo, {});
1121
- };
1122
- const isSelectedStandard = !!selectedModelInfo?.tags?.includes(STANDARD_TIER_TAG);
1123
- const isSelectedPremium = !!selectedModelInfo?.tags?.includes(PREMIUM_TIER_TAG);
1124
- const triggerLabel = isAuto ? "Autoselect" : isSelectedPremium ? "Premium" : selectedModelInfo?.display_name || selectedModelInfo?.model_name || selectedModel;
1125
- const firstTag = selectedModelInfo?.tags?.[0];
1126
- const triggerIcon = isAuto ? /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelAutoIcon, {}) : isSelectedPremium ? premiumDisabled ? /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelTierIcon, { tier: "premium", isGreyed: true }) : /* @__PURE__ */ jsxRuntime.jsx(
1127
- ui.ProviderIcon,
1128
- {
1129
- modelName: selectedModelInfo?.model_name,
1130
- provider: selectedModelInfo?.provider,
1131
- size: 14,
1132
- className: "shrink-0"
1133
- }
1134
- ) : isSelectedStandard && selectedModelInfo ? standardIcon(selectedModelInfo) : firstTag && TAG_TIER[firstTag] ? /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelTierIcon, { tier: TAG_TIER[firstTag] }) : selectedModelInfo ? /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelDot, {}) : null;
1135
- const tooltip = isAuto ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm", children: "Automatically selects the best model" }) : pricing ? /* @__PURE__ */ jsxRuntime.jsx(
1136
- chunkJHDCDEXY_cjs.ModelPricingTip,
1137
- {
1138
- modelName: pricing.modelName,
1139
- inputPrice: pricing.inputPrice,
1140
- outputPrice: pricing.outputPrice
1141
- }
1142
- ) : null;
1143
- const hasTiers = !!(standardTier || premiumTier || developerModels.length);
1144
- if (variant === "compact") {
1145
- const choose = (name) => {
1146
- handleModelChange(name);
1147
- setIsOpen(false);
1148
- };
1149
- const premiumMember = premiumTier?.members.find(
1150
- (m) => m.model_name === premiumTier.resolvedModelName
1151
- );
1148
+ ) : duration != null ? `${duration.toFixed(1)}s` : null;
1149
+ const showOutcome = step.outcome && step.step !== "goal";
1150
+ const outcomeFailed = !!step.outcome && isFailureOutcome(step.outcome);
1151
+ const hasSummary = step.detail?.some((d) => d.summary);
1152
+ const toolParams = isDeveloper && step.detail && !step.step && !hasSummary ? step.detail.flatMap((d) => getToolParams(d)) : [];
1153
+ const criteria = step.step === "goal_progress" && step.detail && step.detail.length > 0 ? step.detail : null;
1154
+ const criteriaView = criteria ? criteria.map((c, idx) => ({
1155
+ key: c.criterion ?? String(idx),
1156
+ text: c.text || c.criterion || "",
1157
+ note: c.note,
1158
+ met: isCriterionMet(c.status)
1159
+ })) : null;
1160
+ const folded = childrenByParent.get(step.index);
1152
1161
  return /* @__PURE__ */ jsxRuntime.jsxs(
1153
- chunkJHDCDEXY_cjs.ModelPickerPopover,
1162
+ chunkVNUBBRJM_cjs.StepRow,
1154
1163
  {
1155
- open: isOpen,
1156
- onOpenChange: setIsOpen,
1157
- tooltip,
1158
- trigger: /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelPickerTrigger, { icon: triggerIcon, label: triggerLabel, className }),
1164
+ index: step.index,
1165
+ number: displayNumber.get(step.index) ?? String(i + 1),
1166
+ depth,
1167
+ isLast: isLastInList,
1168
+ isActive,
1169
+ accent,
1170
+ icon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 12, strokeWidth: 2.25 }),
1171
+ kind: step.narration ? "narration" : step.step ?? "tool",
1172
+ title: isActive ? presentation.description : label,
1173
+ titleTestId: isActive ? "agent-expanded-current-step-description" : void 0,
1174
+ badge: TierIcon ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
1175
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center self-center", children: /* @__PURE__ */ jsxRuntime.jsx(TierIcon, { size: 12, className: accent.fg, "aria-hidden": true }) }) }),
1176
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "top", children: chunkVNUBBRJM_cjs.MODEL_TIER_LABELS[tier] ?? tier })
1177
+ ] }) : void 0,
1178
+ meta: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1179
+ isDeveloper && /* @__PURE__ */ jsxRuntime.jsx(StepModelIcon, { modelName: step.usage?.model, tag: getModelTag(step.usage?.model) }),
1180
+ isDeveloper && stepTokens[i] != null && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
1181
+ browser.formatTokens(stepTokens[i]),
1182
+ " tok"
1183
+ ] }),
1184
+ !isActive && stepGbp[i] != null && /* @__PURE__ */ jsxRuntime.jsx("span", { children: react.formatGbp(stepGbp[i]) }),
1185
+ durationNode != null && /* @__PURE__ */ jsxRuntime.jsx("span", { children: durationNode })
1186
+ ] }),
1159
1187
  children: [
1160
- /* @__PURE__ */ jsxRuntime.jsx(
1161
- chunkJHDCDEXY_cjs.ModelOption,
1188
+ summary && !isActive && (step.narration ? (
1189
+ /* Narration is PROSE (headings, bold, lists): render markdown, not raw asterisks.
1190
+ Tool summaries stay plain text: one-line headlines where a clamp matters. */
1191
+ /* @__PURE__ */ jsxRuntime.jsx(chunkVNUBBRJM_cjs.StepNarration, { index: step.index, children: /* @__PURE__ */ jsxRuntime.jsx(chunkPNZVCHFS_cjs.ConnectedMarkdown, { isStreaming: false, children: summary }) })
1192
+ ) : /* @__PURE__ */ jsxRuntime.jsx(chunkVNUBBRJM_cjs.StepSummary, { index: step.index, multiLine: isMultiLine, children: summary })),
1193
+ details.map((d, di) => /* @__PURE__ */ jsxRuntime.jsx(chunkVNUBBRJM_cjs.StepDetail, { index: step.index, children: d }, di)),
1194
+ showOutcome && /* @__PURE__ */ jsxRuntime.jsx(chunkVNUBBRJM_cjs.StepOutcome, { index: step.index, failed: outcomeFailed, children: step.outcome }),
1195
+ toolParams.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkVNUBBRJM_cjs.StepParams, { children: toolParams.map((p) => `${p.key}=${p.value}`).join(" ") }),
1196
+ step.routing && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "mt-1 text-xs text-muted-foreground", "data-testid": "routing-details", children: [
1197
+ /* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer", children: "Routing details" }),
1198
+ /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-2 space-y-2", children: [
1199
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1200
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Answer model" }),
1201
+ /* @__PURE__ */ jsxRuntime.jsxs("dd", { children: [
1202
+ step.routing.selected_model,
1203
+ step.routing.model_recommendation ? ` (${step.routing.model_recommendation})` : ""
1204
+ ] })
1205
+ ] }),
1206
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1207
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Default document search" }),
1208
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { children: step.routing.selected_doc_ext_ids.length ? step.routing.selected_doc_ext_ids.map((id) => docInfo[id]?.name ?? step.routing.document_titles[id] ?? id).join(", ") : "No documents selected" }),
1209
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { children: "The complete document catalogue remains available for direct reading." })
1210
+ ] }),
1211
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1212
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Always available tools" }),
1213
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { children: step.routing.always_available_tool_names.map((name) => name.replaceAll("_", " ")).join(", ") || "None" })
1214
+ ] }),
1215
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1216
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Additional tools" }),
1217
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { children: step.routing.selected_tool_names == null ? "All enabled tools retained" : step.routing.selected_tool_names.filter((name) => !step.routing.always_available_tool_names.includes(name)).map((name) => name.replaceAll("_", " ")).join(", ") || "None" })
1218
+ ] }),
1219
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1220
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "History" }),
1221
+ /* @__PURE__ */ jsxRuntime.jsxs("dd", { children: [
1222
+ step.routing.retained_message_ext_ids.length,
1223
+ " messages retained",
1224
+ step.routing.history_retained_by_policy ? "; full history preserved by policy" : ""
1225
+ ] })
1226
+ ] }),
1227
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1228
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Router" }),
1229
+ /* @__PURE__ */ jsxRuntime.jsxs("dd", { children: [
1230
+ step.routing.router_model,
1231
+ " \xB7 ",
1232
+ step.routing.elapsed_seconds.toFixed(3),
1233
+ "s",
1234
+ step.routing.input_tokens != null ? ` \xB7 ${step.routing.input_tokens.toLocaleString()} input tokens` : ""
1235
+ ] })
1236
+ ] }),
1237
+ step.routing.status === "fallback" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1238
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Fallback" }),
1239
+ /* @__PURE__ */ jsxRuntime.jsxs("dd", { children: [
1240
+ "Context and authorized tools retained (",
1241
+ step.routing.fallback_reason ?? "router unavailable",
1242
+ ")."
1243
+ ] })
1244
+ ] })
1245
+ ] })
1246
+ ] }),
1247
+ criteriaView && /* @__PURE__ */ jsxRuntime.jsx(chunkVNUBBRJM_cjs.GoalCriteria, { criteria: criteriaView }),
1248
+ folded && folded.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1249
+ chunkVNUBBRJM_cjs.SubStepGroup,
1162
1250
  {
1163
- icon: /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelAutoIcon, {}),
1164
- label: "Autoselect",
1165
- isSelected: isAuto,
1166
- onSelect: () => choose(react.AUTO_CHAT_MODEL),
1167
- testId: "model-option-auto"
1251
+ parentIndex: step.index,
1252
+ summary: summariseSubSteps(folded),
1253
+ openClassName: accent.fg,
1254
+ renderSteps: () => folded.map((c, ci, arr) => renderRow(c, depth + 1, ci === arr.length - 1))
1168
1255
  }
1169
- ),
1170
- /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelMenuDivider, {}),
1171
- hasTiers ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1172
- standardTier?.members.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
1173
- chunkJHDCDEXY_cjs.ModelOption,
1174
- {
1175
- icon: standardIcon(m),
1176
- label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name,
1177
- isSelected: selectedModel === m.model_name,
1178
- onSelect: () => choose(m.model_name),
1179
- testId: `model-option-${m.model_name}`,
1180
- emphasis: "tier"
1181
- },
1182
- `standard-${m.model_name}`
1183
- )),
1184
- premiumTier && /* @__PURE__ */ jsxRuntime.jsx(
1185
- chunkJHDCDEXY_cjs.ModelTierOption,
1186
- {
1187
- icon: premiumDisabled || !premiumMember ? /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelTierIcon, { tier: "premium", isGreyed: premiumDisabled }) : (
1188
- // The resolved Premium model's provider is the row's brand icon, so the pick
1189
- // is recognisable without a model_name suffix.
1190
- /* @__PURE__ */ jsxRuntime.jsx(
1191
- ui.ProviderIcon,
1192
- {
1193
- modelName: premiumMember.model_name,
1194
- provider: premiumMember.provider,
1195
- size: 14,
1196
- className: "shrink-0"
1197
- }
1198
- )
1199
- ),
1200
- label: "Premium",
1201
- isSelected: premiumTier.members.some((m) => m.model_name === selectedModel),
1202
- isDisabled: premiumDisabled,
1203
- onSelect: () => choose(premiumTier.resolvedModelName),
1204
- testId: "model-option-tier-Premium",
1205
- action: /* @__PURE__ */ jsxRuntime.jsx(
1206
- chunkJHDCDEXY_cjs.ModelConfigureButton,
1207
- {
1208
- label: "Configure Premium tier",
1209
- tooltip: "Configure Premium",
1210
- testId: "tier-Premium-configure-button",
1211
- onClick: () => {
1212
- picker.openPremiumSettings();
1213
- setIsOpen(false);
1214
- }
1215
- }
1216
- )
1217
- },
1218
- "tier-Premium"
1219
- ),
1220
- developerModels.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1221
- /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelMenuDivider, {}),
1222
- developerModels.map((m) => {
1223
- const tag = m.tags?.[0];
1224
- return /* @__PURE__ */ jsxRuntime.jsx(
1225
- chunkJHDCDEXY_cjs.ModelOption,
1226
- {
1227
- icon: tag && TAG_TIER[tag] ? /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelTierIcon, { tier: TAG_TIER[tag] }) : /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelDot, {}),
1228
- label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name,
1229
- isSelected: selectedModel === m.model_name,
1230
- onSelect: () => choose(m.model_name),
1231
- testId: `model-option-${m.model_name}`
1232
- },
1233
- m.model_name
1234
- );
1235
- })
1236
- ] })
1237
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelMenuMessage, { children: "Loading models..." })
1256
+ )
1238
1257
  ]
1239
- }
1258
+ },
1259
+ step.index
1240
1260
  );
1241
- }
1242
- return /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
1243
- /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { value: selectedModel || "", onValueChange: handleModelChange, children: [
1244
- /* @__PURE__ */ jsxRuntime.jsx(
1245
- ui.SelectTrigger,
1261
+ };
1262
+ let summaryNode = null;
1263
+ if (contextUsage?.spent_gbp != null) {
1264
+ const runStats = browser.computeRunStats(steps);
1265
+ const totalInputTokens = contextUsage.all_llm_calls?.input_tokens ?? contextUsage.total_input;
1266
+ const totalOutputTokens = contextUsage.all_llm_calls?.output_tokens ?? contextUsage.total_output;
1267
+ const leftParts = [
1268
+ `${displayRows.length} step${displayRows.length !== 1 ? "s" : ""}`,
1269
+ `${runStats.toolCalls} tool call${runStats.toolCalls !== 1 ? "s" : ""}`
1270
+ ];
1271
+ if (totalElapsedTime != null) leftParts.push(`${totalElapsedTime.toFixed(1)}s`);
1272
+ leftParts.push(`${browser.formatTokens(totalInputTokens)} in`);
1273
+ if (totalOutputTokens > 0) leftParts.push(`${browser.formatTokens(totalOutputTokens)} out`);
1274
+ summaryNode = /* @__PURE__ */ jsxRuntime.jsx(
1275
+ chunkVNUBBRJM_cjs.StepTraceSummary,
1276
+ {
1277
+ left: leftParts.join(" \xB7 "),
1278
+ isNearBudget: browser.isNearAiUsageBudget(contextUsage),
1279
+ total: `Total: ${react.formatGbp(contextUsage.spent_gbp)}`
1280
+ }
1281
+ );
1282
+ }
1283
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkVNUBBRJM_cjs.StepTrace, { className, summary: summaryNode, children: displayRows.map((row, i) => {
1284
+ if (row.lane) {
1285
+ return /* @__PURE__ */ jsxRuntime.jsx(
1286
+ LaneBinding,
1246
1287
  {
1247
- className: ui.cn("h-8 w-[200px] text-sm", className),
1248
- "data-testid": "model-selector",
1249
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelTriggerContent, { icon: triggerIcon, label: triggerLabel })
1250
- }
1251
- ),
1252
- /* @__PURE__ */ jsxRuntime.jsxs(ui.SelectContent, { className: "z-50", children: [
1253
- /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: react.AUTO_CHAT_MODEL, "data-testid": "model-option-auto", children: /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelOptionLabel, { icon: /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelAutoIcon, {}), label: "Autoselect" }) }),
1254
- hasTiers ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1255
- standardTier?.members.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
1256
- ui.SelectItem,
1257
- {
1258
- value: m.model_name,
1259
- "data-testid": `model-option-${m.model_name}`,
1260
- children: /* @__PURE__ */ jsxRuntime.jsx(
1261
- chunkJHDCDEXY_cjs.ModelOptionLabel,
1262
- {
1263
- icon: standardIcon(m),
1264
- label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name
1265
- }
1266
- )
1267
- },
1268
- `standard-${m.model_name}`
1269
- )),
1270
- premiumTier && /* @__PURE__ */ jsxRuntime.jsx(
1271
- ui.SelectItem,
1272
- {
1273
- value: premiumTier.resolvedModelName,
1274
- "data-testid": "model-option-tier-Premium",
1275
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelOptionLabel, { icon: /* @__PURE__ */ jsxRuntime.jsx(ArbiLogo, {}), label: "Premium" })
1276
- },
1277
- "tier-Premium"
1278
- ),
1279
- developerModels.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
1280
- ui.SelectItem,
1281
- {
1282
- value: m.model_name,
1283
- "data-testid": `model-option-${m.model_name}`,
1284
- children: /* @__PURE__ */ jsxRuntime.jsx(
1285
- chunkJHDCDEXY_cjs.ModelOptionLabel,
1286
- {
1287
- icon: /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ModelDot, {}),
1288
- label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name
1289
- }
1290
- )
1291
- },
1292
- m.model_name
1293
- ))
1294
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "loading", disabled: true, children: "Loading models..." })
1295
- ] })
1296
- ] }) }) }),
1297
- tooltip && /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "top", children: tooltip })
1298
- ] }) });
1288
+ handle: row.lane,
1289
+ steps: laneStepsByHandle.get(row.lane),
1290
+ number: i + 1,
1291
+ renderRow,
1292
+ isStreaming
1293
+ },
1294
+ `lane-${row.lane}`
1295
+ );
1296
+ }
1297
+ const parent = row.step;
1298
+ return renderRow(
1299
+ parent,
1300
+ 0,
1301
+ i === displayRows.length - 1 && !childrenByParent.has(parent.index)
1302
+ );
1303
+ }) });
1304
+ };
1305
+ function LaneBinding({
1306
+ handle,
1307
+ steps,
1308
+ number,
1309
+ renderRow,
1310
+ isStreaming
1311
+ }) {
1312
+ const spawn = steps.find((s) => s.subagent_status === "running");
1313
+ const closed = steps.find((s) => s.subagent_status === "done" || s.subagent_status === "failed");
1314
+ const failed = steps.some((s) => s.subagent_status === "failed");
1315
+ const inner = steps.filter((s) => !s.subagent_status);
1316
+ const task = (spawn?.content || spawn?.focus || "").trim();
1317
+ const running = !closed && isStreaming;
1318
+ const latest = inner[inner.length - 1];
1319
+ return /* @__PURE__ */ jsxRuntime.jsx(
1320
+ chunkVNUBBRJM_cjs.SubAgentLane,
1321
+ {
1322
+ handle,
1323
+ number,
1324
+ job: browser.subagentJobLabel(task) || `Sub-agent ${handle}`,
1325
+ task,
1326
+ status: running ? "running" : failed ? "failed" : "done",
1327
+ innerCount: inner.length,
1328
+ liveFocus: latest ? latest.focus?.trim() || browser.getAgentStepLabel(latest) : "",
1329
+ renderSteps: () => inner.map((s, i) => renderRow(s, 1, i === inner.length - 1))
1330
+ }
1331
+ );
1299
1332
  }
1300
- function useHintsVisibility() {
1301
- const { data: userSettings } = react.useUserSettings();
1302
- const [sessionOverride] = react.useTransientView(chunk4B6HYQTW_cjs.TIPS_VISIBILITY_OVERRIDE, null);
1303
- return {
1304
- showHints: sessionOverride ?? userSettings?.show_hints ?? true,
1305
- settingsLoaded: userSettings !== void 0,
1306
- isDeveloper: userSettings?.developer === true
1307
- };
1333
+ function summariseSubSteps(steps) {
1334
+ const counts = /* @__PURE__ */ new Map();
1335
+ for (const s of steps) {
1336
+ const noun = subStepNoun(browser.getStepTool(s));
1337
+ counts.set(noun, (counts.get(noun) ?? 0) + 1);
1338
+ }
1339
+ return [...counts.entries()].map(([noun, n]) => `${n} ${n === 1 ? noun : pluralise(noun)}`).join(", ");
1308
1340
  }
1309
- function useContextualHints() {
1310
- const visibility = useHintsVisibility();
1311
- const session = react.useArbiSessionStore();
1312
- const updateUserSettings = react.useUpdateUserSettings();
1313
- const setShowHints = (value) => chunk4B6HYQTW_cjs.setHintsSessionOverride(session, value);
1314
- const setShowHintsPersisted = (value) => {
1315
- chunk4B6HYQTW_cjs.setHintsSessionOverride(session, null);
1316
- updateUserSettings.mutate({ show_hints: value });
1317
- };
1318
- return {
1319
- ...visibility,
1320
- setShowHints,
1321
- setShowHintsPersisted,
1322
- dismissHints: () => setShowHints(false)
1323
- };
1341
+ function isCriterionMet(status) {
1342
+ return status === "met" || status === "absent_from_corpus";
1324
1343
  }
1325
- var NO_SKILLS = [];
1326
- var ConversationComposerComponent = function ConversationComposer({
1327
- value,
1328
- onValueChange,
1329
- handleSendMessage,
1330
- isGenerating = false,
1331
- compact = false,
1332
- inputRef,
1333
- isBranching = false,
1334
- onCancelBranching,
1335
- placeholder,
1336
- onOpenSettings,
1337
- leftButton,
1338
- rightButton,
1339
- modelSelector,
1340
- skills,
1341
- onBrowseSkills,
1342
- contextUsage,
1343
- isConversationEmpty = false,
1344
- shouldOfferFollowUp = true
1344
+ function isFailureOutcome(outcome) {
1345
+ const o = outcome.toLowerCase();
1346
+ if (/\bexit\s+0\b/.test(o)) return false;
1347
+ return /\bexit\s+[1-9]/.test(o) || /timed out|timeout|failed|error\b/.test(o);
1348
+ }
1349
+ function subStepNoun(tool) {
1350
+ switch (tool) {
1351
+ case "search_inside_documents":
1352
+ case "search_conversations":
1353
+ case "web_search":
1354
+ return "search";
1355
+ case "read_document":
1356
+ case "read_url":
1357
+ case "view_document_pages":
1358
+ case "get_table_of_contents":
1359
+ return "read";
1360
+ case "execute_code":
1361
+ case "spawn_coding_agent":
1362
+ return "run";
1363
+ case "create_plan":
1364
+ return "plan";
1365
+ default:
1366
+ return "step";
1367
+ }
1368
+ }
1369
+ function pluralise(noun) {
1370
+ return noun.endsWith("h") ? `${noun}es` : `${noun}s`;
1371
+ }
1372
+ var AgentSteps = React6__default.default.memo(AgentStepsComponent, (prev, next) => {
1373
+ return prev.isStreaming === next.isStreaming && prev.className === next.className && prev.totalElapsedTime === next.totalElapsedTime && prev.steps === next.steps && prev.liveTimer === next.liveTimer && prev.hideLive === next.hideLive;
1374
+ });
1375
+ var STANDARD_TIER_TAG = "Standard";
1376
+ var PREMIUM_TIER_TAG = "Premium";
1377
+ function useModelPicker({
1378
+ value: controlledValue,
1379
+ onValueChange: controlledOnChange
1345
1380
  }) {
1346
- const session = react.useArbiSessionStore();
1347
- const sessionDraft = react.useArbiSessionState(react.selectDraft);
1348
- const newMessage = value ?? sessionDraft;
1349
- const setNewMessage = onValueChange ?? session.setDraft;
1350
- const { showHints } = useHintsVisibility();
1351
- const suggestedQuery = react.useArbiSessionState((s) => s.suggestedQuery);
1352
- const currentConversationId = react.useArbiSessionState((s) => s.conversationId);
1353
- const workspaceId = react.useArbiSessionState((s) => s.workspaceId);
1354
- const longPaste = chunkJHDCDEXY_cjs.useLongPaste(newMessage);
1355
- const textareaRef = React6.useRef(null);
1356
- const formRef = React6.useRef(null);
1357
- React6.useLayoutEffect(() => {
1358
- const el = formRef.current;
1359
- if (!el) return;
1360
- const apply = () => {
1361
- document.documentElement.style.setProperty("--chat-input-width", `${el.offsetWidth}px`);
1362
- const rect = el.getBoundingClientRect();
1363
- document.documentElement.style.setProperty("--chat-input-left", `${rect.left}px`);
1364
- document.documentElement.style.setProperty("--chat-input-top", `${rect.top}px`);
1381
+ const { data: availableModels } = react.useAvailableModels();
1382
+ const { data: userSettings } = react.useUserSettings();
1383
+ const isDeveloper = userSettings?.developer === true;
1384
+ const isControlled = controlledValue !== void 0;
1385
+ const applyChatModel = react.useApplyChatModel();
1386
+ const { openSettings } = chunkHN56WWBR_cjs.useBlocksEnvironment();
1387
+ const currentConversationModel = react.useArbiSessionState((state) => state.chatModelName);
1388
+ const chatConfigId = react.useArbiSessionState((state) => state.chatModel);
1389
+ const sendConfigId = chatConfigId ?? userSettings?.last_config;
1390
+ const { data: sendConfig } = react.useConfig(sendConfigId, {
1391
+ enabled: !isControlled && !currentConversationModel
1392
+ });
1393
+ const sendConfigModel = sendConfig ? react.resolveConfigModel(sendConfig) : void 0;
1394
+ const premiumModelPref = userSettings?.premium_model;
1395
+ const { standardTier, premiumTier, developerModels } = React6.useMemo(() => {
1396
+ const empty = {
1397
+ standardTier: null,
1398
+ premiumTier: null,
1399
+ developerModels: []
1365
1400
  };
1366
- apply();
1367
- const ro = new ResizeObserver(apply);
1368
- ro.observe(el);
1369
- return () => ro.disconnect();
1370
- }, []);
1371
- React6.useLayoutEffect(() => {
1372
- if (textareaRef.current && inputRef && "current" in inputRef) {
1373
- inputRef.current = textareaRef.current;
1374
- }
1375
- }, [inputRef]);
1376
- const {
1377
- slashToken,
1378
- filteredItems,
1379
- isOpen: isSlashMenuOpen,
1380
- canBrowseSkills
1381
- } = chunkKJ65QZJI_cjs.useSlashItems(newMessage, skills ? chunkM55XUF4L_cjs.BUILTIN_SKILLS : NO_SKILLS);
1382
- const insertSlashItem = (item) => {
1383
- if (skills?.openFor(item)) {
1384
- setNewMessage("");
1385
- return;
1401
+ if (!availableModels?.models) return empty;
1402
+ const standardMembers = availableModels.models.filter(
1403
+ (m) => m.tags?.includes(STANDARD_TIER_TAG)
1404
+ );
1405
+ const standardTier2 = standardMembers.length > 0 ? { members: standardMembers } : null;
1406
+ const premiumMembers = availableModels.models.filter((m) => m.tags?.includes(PREMIUM_TIER_TAG));
1407
+ let premiumTier2 = null;
1408
+ if (premiumMembers.length > 0) {
1409
+ const matchPref = premiumModelPref && premiumMembers.find((m) => m.model_name === premiumModelPref);
1410
+ const backendDefault = availableModels.premium_default && premiumMembers.find((m) => m.model_name === availableModels.premium_default);
1411
+ premiumTier2 = {
1412
+ members: premiumMembers,
1413
+ resolvedModelName: (matchPref || backendDefault || premiumMembers[0]).model_name
1414
+ };
1386
1415
  }
1387
- setNewMessage(`/${item.name} `);
1388
- requestAnimationFrame(() => {
1389
- const ta = textareaRef.current;
1390
- if (!ta) return;
1391
- ta.focus();
1392
- const end = `/${item.name} `.length;
1393
- ta.setSelectionRange(end, end);
1394
- });
1395
- };
1396
- const { data: users } = react.useWorkspaceUsers();
1397
- const currentUserId = react.useArbiSession().user?.external_id;
1398
- const assistantName = shell.useAssistantName();
1399
- const mentionCandidates = React6.useMemo(
1400
- () => react.buildMentionCandidates(users ?? [], currentUserId, assistantName),
1401
- [users, currentUserId, assistantName]
1416
+ const tierMemberNames = /* @__PURE__ */ new Set();
1417
+ for (const m of standardMembers) tierMemberNames.add(m.model_name);
1418
+ for (const m of premiumMembers) tierMemberNames.add(m.model_name);
1419
+ const seen = /* @__PURE__ */ new Set();
1420
+ const developer = isDeveloper ? availableModels.models.filter((m) => {
1421
+ if (m.connection_scope || tierMemberNames.has(m.model_name)) return false;
1422
+ if (!m.model_name.includes("@") || seen.has(m.model_name)) return false;
1423
+ seen.add(m.model_name);
1424
+ return true;
1425
+ }).sort((a, b) => a.model_name.localeCompare(b.model_name)) : [];
1426
+ const custom = availableModels.models.filter(
1427
+ (m) => m.connection_scope === "personal" || m.connection_scope === "box"
1428
+ );
1429
+ return { standardTier: standardTier2, premiumTier: premiumTier2, developerModels: [...custom, ...developer] };
1430
+ }, [availableModels, isDeveloper, premiumModelPref]);
1431
+ const selectedModel = (isControlled ? controlledValue : currentConversationModel || sendConfigModel) || react.AUTO_CHAT_MODEL;
1432
+ const selectedModelInfo = React6.useMemo(
1433
+ () => availableModels?.models?.find((m) => m.model_name === selectedModel),
1434
+ [availableModels, selectedModel]
1402
1435
  );
1403
- const mention = chunkVHD5DZW4_cjs.useMentionAutocomplete({
1404
- value: newMessage,
1405
- onValueChange: setNewMessage,
1406
- candidates: mentionCandidates,
1407
- textareaRef
1408
- });
1409
- const { data: conversations } = react.useConversations(workspaceId ?? void 0);
1410
- const isThread = conversations?.find((conversation) => conversation.external_id === currentConversationId)?.is_shared ?? false;
1411
- const prefillsAssistant = isThread && !isBranching;
1412
- const recipient = chunkJHDCDEXY_cjs.useRecipientDraft({
1413
- value: newMessage,
1414
- onValueChange: setNewMessage,
1415
- contextKey: currentConversationId,
1416
- defaultLabel: prefillsAssistant ? assistantName : null
1417
- });
1418
- const assistant = shell.useAssistantCopy();
1419
- const slashNav = chunk75BNMCUX_cjs.useListKeyNav({
1420
- open: isSlashMenuOpen,
1421
- items: filteredItems,
1422
- onPick: insertSlashItem,
1423
- // Clear the leading slash to fully dismiss; otherwise the menu reopens on the next letter.
1424
- onDismiss: () => setNewMessage(""),
1425
- resetKey: slashToken
1426
- });
1427
- const isComposerMenuOpen = isSlashMenuOpen || mention.isOpen;
1436
+ const handleModelChange = React6.useCallback(
1437
+ (value) => {
1438
+ if (isControlled) {
1439
+ controlledOnChange?.(value);
1440
+ return;
1441
+ }
1442
+ const label = value === react.AUTO_CHAT_MODEL ? "Quick Model Change - Auto" : `Quick Model Change - ${value}`;
1443
+ applyChatModel(value, label).catch(
1444
+ (error) => console.error("Failed to save model config", error)
1445
+ );
1446
+ },
1447
+ [isControlled, controlledOnChange, applyChatModel]
1448
+ );
1449
+ const isAuto = selectedModel === react.AUTO_CHAT_MODEL;
1428
1450
  React6.useEffect(() => {
1429
- if (isComposerMenuOpen) session.setActiveCitationKey(null);
1430
- }, [isComposerMenuOpen, session]);
1431
- const followUp = !newMessage && !isBranching && !isGenerating && shouldOfferFollowUp && showHints && suggestedQuery && suggestedQuery.conversationExtId === currentConversationId ? suggestedQuery.text : null;
1432
- const sendDraft = () => {
1433
- handleSendMessage();
1434
- textareaRef.current?.focus();
1435
- if (isBranching && onCancelBranching) onCancelBranching();
1436
- };
1437
- const onKeyDown = (event) => {
1438
- if (recipient.handleKeyDown(event)) return;
1439
- if (slashNav.handleKeyDown(event)) return;
1440
- if (mention.nav.handleKeyDown(event)) return;
1441
- if (followUp && event.key === "Tab" && !event.shiftKey) {
1442
- event.preventDefault();
1443
- setNewMessage(followUp);
1451
+ if (isControlled) return;
1452
+ if (!premiumTier) return;
1453
+ const onPremium = premiumTier.members.some((m) => m.model_name === selectedModel);
1454
+ if (!onPremium) return;
1455
+ if (premiumModelPref === "") {
1456
+ handleModelChange(react.AUTO_CHAT_MODEL);
1444
1457
  return;
1445
1458
  }
1446
- if (event.key === "Escape" && isBranching && onCancelBranching) {
1447
- event.preventDefault();
1448
- onCancelBranching();
1449
- }
1459
+ if (selectedModel === premiumTier.resolvedModelName) return;
1460
+ handleModelChange(premiumTier.resolvedModelName);
1461
+ }, [isControlled, premiumTier, selectedModel, premiumModelPref, handleModelChange]);
1462
+ const pricing = React6.useMemo(() => {
1463
+ if (isAuto || !selectedModelInfo) return null;
1464
+ const inputPrice = react.formatGbpPerMillionTokens(selectedModelInfo.input_cost_per_token);
1465
+ const outputPrice = react.formatGbpPerMillionTokens(selectedModelInfo.output_cost_per_token);
1466
+ if (!inputPrice && !outputPrice) return null;
1467
+ return { inputPrice, outputPrice, modelName: selectedModelInfo.model_name };
1468
+ }, [selectedModelInfo, isAuto]);
1469
+ const openPremiumSettings = React6.useCallback(() => openSettings("chat"), [openSettings]);
1470
+ return {
1471
+ standardTier,
1472
+ premiumTier,
1473
+ developerModels,
1474
+ selectedModel,
1475
+ selectedModelInfo,
1476
+ isAuto,
1477
+ /** The user switched Premium off in settings. */
1478
+ premiumDisabled: premiumModelPref === "",
1479
+ pricing,
1480
+ handleModelChange,
1481
+ openPremiumSettings
1450
1482
  };
1451
- const handleSubmit = (e) => {
1452
- e.preventDefault();
1453
- if (recipient.hasBody) sendDraft();
1483
+ }
1484
+ var TAG_TIER = {
1485
+ Standard: "standard",
1486
+ Fast: "standard",
1487
+ Wise: "wise",
1488
+ Reasoning: "wise",
1489
+ Premium: "premium"
1490
+ };
1491
+ function ArbiLogo() {
1492
+ return /* @__PURE__ */ jsxRuntime.jsx("img", { src: ui.ARBI_MARK_SRC, alt: "ARBI", className: "size-3.5 shrink-0 rounded-md" });
1493
+ }
1494
+ function ConnectedModelSelector({
1495
+ variant = "default",
1496
+ className,
1497
+ value,
1498
+ onValueChange
1499
+ }) {
1500
+ const picker = useModelPicker({ value, onValueChange });
1501
+ const {
1502
+ standardTier,
1503
+ premiumTier,
1504
+ developerModels,
1505
+ selectedModel,
1506
+ selectedModelInfo,
1507
+ isAuto,
1508
+ premiumDisabled,
1509
+ pricing,
1510
+ handleModelChange
1511
+ } = picker;
1512
+ const [isOpen, setIsOpen] = React6.useState(false);
1513
+ const standardIcon = (model) => {
1514
+ let tier = TAG_TIER[model.model_name];
1515
+ if (!tier) {
1516
+ for (const t of model.tags ?? []) {
1517
+ if (t === STANDARD_TIER_TAG || t === PREMIUM_TIER_TAG) continue;
1518
+ if (TAG_TIER[t]) {
1519
+ tier = TAG_TIER[t];
1520
+ break;
1521
+ }
1522
+ }
1523
+ }
1524
+ return tier ? /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelTierIcon, { tier }) : /* @__PURE__ */ jsxRuntime.jsx(ArbiLogo, {});
1454
1525
  };
1455
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
1456
- chunkVHD5DZW4_cjs.Composer.Root,
1526
+ const isSelectedStandard = !!selectedModelInfo?.tags?.includes(STANDARD_TIER_TAG);
1527
+ const isSelectedPremium = !!selectedModelInfo?.tags?.includes(PREMIUM_TIER_TAG);
1528
+ const triggerLabel = isAuto ? "Autoselect" : isSelectedPremium ? "Premium" : selectedModelInfo?.display_name || selectedModelInfo?.model_name || selectedModel;
1529
+ const firstTag = selectedModelInfo?.tags?.[0];
1530
+ const triggerIcon = isAuto ? /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelAutoIcon, {}) : isSelectedPremium ? premiumDisabled ? /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelTierIcon, { tier: "premium", isGreyed: true }) : /* @__PURE__ */ jsxRuntime.jsx(
1531
+ ui.ProviderIcon,
1457
1532
  {
1458
- onSubmit: handleSubmit,
1459
- formRef,
1460
- isBranching,
1461
- notice: isBranching ? /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.Composer.Notice, { onCancel: onCancelBranching }) : void 0,
1462
- children: /* @__PURE__ */ jsxRuntime.jsxs(
1463
- chunkVHD5DZW4_cjs.Composer.Frame,
1464
- {
1465
- className: compact ? "rounded-none border-0 px-0 py-0 shadow-none focus-within:shadow-none" : void 0,
1466
- children: [
1467
- /* @__PURE__ */ jsxRuntime.jsx(
1468
- chunk5F4DCIHS_cjs.SlashMenu,
1533
+ modelName: selectedModelInfo?.model_name,
1534
+ provider: selectedModelInfo?.provider,
1535
+ size: 14,
1536
+ className: "shrink-0"
1537
+ }
1538
+ ) : isSelectedStandard && selectedModelInfo ? standardIcon(selectedModelInfo) : firstTag && TAG_TIER[firstTag] ? /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelTierIcon, { tier: TAG_TIER[firstTag] }) : selectedModelInfo ? /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelDot, {}) : null;
1539
+ const tooltip = isAuto ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm", children: "Automatically selects the best model" }) : pricing ? /* @__PURE__ */ jsxRuntime.jsx(
1540
+ chunkW5JTACMK_cjs.ModelPricingTip,
1541
+ {
1542
+ modelName: pricing.modelName,
1543
+ inputPrice: pricing.inputPrice,
1544
+ outputPrice: pricing.outputPrice
1545
+ }
1546
+ ) : null;
1547
+ const hasTiers = !!(standardTier || premiumTier || developerModels.length);
1548
+ if (variant === "compact") {
1549
+ const choose = (name) => {
1550
+ handleModelChange(name);
1551
+ setIsOpen(false);
1552
+ };
1553
+ const premiumMember = premiumTier?.members.find(
1554
+ (m) => m.model_name === premiumTier.resolvedModelName
1555
+ );
1556
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1557
+ chunkW5JTACMK_cjs.ModelPickerPopover,
1558
+ {
1559
+ open: isOpen,
1560
+ onOpenChange: setIsOpen,
1561
+ tooltip,
1562
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelPickerTrigger, { icon: triggerIcon, label: triggerLabel, className }),
1563
+ children: [
1564
+ /* @__PURE__ */ jsxRuntime.jsx(
1565
+ chunkW5JTACMK_cjs.ModelOption,
1566
+ {
1567
+ icon: /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelAutoIcon, {}),
1568
+ label: "Autoselect",
1569
+ isSelected: isAuto,
1570
+ onSelect: () => choose(react.AUTO_CHAT_MODEL),
1571
+ testId: "model-option-auto"
1572
+ }
1573
+ ),
1574
+ /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelMenuDivider, {}),
1575
+ hasTiers ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1576
+ standardTier?.members.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
1577
+ chunkW5JTACMK_cjs.ModelOption,
1469
1578
  {
1470
- open: isSlashMenuOpen,
1471
- items: filteredItems,
1472
- selectedIndex: slashNav.selectedIndex,
1473
- setSelectedIndex: slashNav.setSelectedIndex,
1474
- listboxId: slashNav.listboxId,
1475
- onSelect: insertSlashItem,
1476
- onBrowse: canBrowseSkills ? onBrowseSkills : void 0
1477
- }
1478
- ),
1479
- /* @__PURE__ */ jsxRuntime.jsx(
1480
- chunk75BNMCUX_cjs.MentionMenu,
1579
+ icon: standardIcon(m),
1580
+ label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name,
1581
+ isSelected: selectedModel === m.model_name,
1582
+ onSelect: () => choose(m.model_name),
1583
+ testId: `model-option-${m.model_name}`,
1584
+ emphasis: "tier"
1585
+ },
1586
+ `standard-${m.model_name}`
1587
+ )),
1588
+ premiumTier && /* @__PURE__ */ jsxRuntime.jsx(
1589
+ chunkW5JTACMK_cjs.ModelTierOption,
1481
1590
  {
1482
- open: mention.isOpen,
1483
- items: mention.items,
1484
- selectedIndex: mention.nav.selectedIndex,
1485
- setSelectedIndex: mention.nav.setSelectedIndex,
1486
- listboxId: mention.nav.listboxId,
1487
- onSelect: mention.pick
1488
- }
1489
- ),
1490
- /* @__PURE__ */ jsxRuntime.jsx(
1491
- chunkVHD5DZW4_cjs.Composer.Input,
1492
- {
1493
- value: newMessage,
1494
- onValueChange: (next) => {
1495
- mention.onValueChange(next);
1496
- longPaste.onValueChange(next);
1497
- },
1498
- onPaste: (event) => longPaste.onPaste(event, newMessage),
1499
- onKeyDown,
1500
- textareaProps: {
1501
- ...mention.isOpen ? mention.nav.comboboxProps : slashNav.comboboxProps,
1502
- ...mention.textareaProps
1503
- },
1504
- textareaRef,
1505
- isPasteCollapsed: longPaste.isCollapsed,
1506
- onExpandPaste: () => {
1507
- longPaste.expand();
1508
- requestAnimationFrame(() => textareaRef.current?.focus());
1509
- },
1510
- isRoomy: isConversationEmpty,
1511
- isSuggestion: !!followUp,
1512
- compact,
1513
- placeholder: followUp || placeholder || (isBranching ? "Edit message to create a branch..." : isThread ? "Message the thread\u2026 @mention someone to notify them" : isGenerating ? "Type your next prompt..." : assistant.askAnythingPlaceholder)
1514
- }
1515
- ),
1516
- /* @__PURE__ */ jsxRuntime.jsx(
1517
- chunkVHD5DZW4_cjs.Composer.Toolbar,
1518
- {
1519
- className: compact ? "flex-nowrap" : void 0,
1520
- leading: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1521
- leftButton,
1522
- compact && modelSelector,
1523
- onOpenSettings && /* @__PURE__ */ jsxRuntime.jsx(
1524
- ui.Button,
1591
+ icon: premiumDisabled || !premiumMember ? /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelTierIcon, { tier: "premium", isGreyed: premiumDisabled }) : (
1592
+ // The resolved Premium model's provider is the row's brand icon, so the pick
1593
+ // is recognisable without a model_name suffix.
1594
+ /* @__PURE__ */ jsxRuntime.jsx(
1595
+ ui.ProviderIcon,
1525
1596
  {
1526
- type: "button",
1527
- variant: "ghost",
1528
- size: "sm",
1529
- onClick: onOpenSettings,
1530
- className: "h-8 w-8 p-0 pointer-coarse:h-11 pointer-coarse:w-11",
1531
- "aria-label": "Chat settings",
1532
- title: "Chat settings",
1533
- "data-testid": "message-input-settings-button",
1534
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "h-4 w-4 text-muted-foreground" })
1597
+ modelName: premiumMember.model_name,
1598
+ provider: premiumMember.provider,
1599
+ size: 14,
1600
+ className: "shrink-0"
1535
1601
  }
1536
1602
  )
1537
- ] }),
1538
- trailing: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1539
- !compact && modelSelector,
1540
- rightButton
1541
- ] })
1542
- }
1603
+ ),
1604
+ label: "Premium",
1605
+ isSelected: premiumTier.members.some((m) => m.model_name === selectedModel),
1606
+ isDisabled: premiumDisabled,
1607
+ onSelect: () => choose(premiumTier.resolvedModelName),
1608
+ testId: "model-option-tier-Premium",
1609
+ action: /* @__PURE__ */ jsxRuntime.jsx(
1610
+ chunkW5JTACMK_cjs.ModelConfigureButton,
1611
+ {
1612
+ label: "Configure Premium tier",
1613
+ tooltip: "Configure Premium",
1614
+ testId: "tier-Premium-configure-button",
1615
+ onClick: () => {
1616
+ picker.openPremiumSettings();
1617
+ setIsOpen(false);
1618
+ }
1619
+ }
1620
+ )
1621
+ },
1622
+ "tier-Premium"
1543
1623
  ),
1544
- /* @__PURE__ */ jsxRuntime.jsx(chunkJHDCDEXY_cjs.ContextUsageBar, { contextUsage, draftLength: newMessage.length })
1545
- ]
1624
+ developerModels.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1625
+ /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelMenuDivider, {}),
1626
+ developerModels.map((m) => {
1627
+ const tag = m.tags?.[0];
1628
+ return /* @__PURE__ */ jsxRuntime.jsx(
1629
+ chunkW5JTACMK_cjs.ModelOption,
1630
+ {
1631
+ icon: tag && TAG_TIER[tag] ? /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelTierIcon, { tier: TAG_TIER[tag] }) : /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelDot, {}),
1632
+ label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name,
1633
+ isSelected: selectedModel === m.model_name,
1634
+ onSelect: () => choose(m.model_name),
1635
+ testId: `model-option-${m.model_name}`
1636
+ },
1637
+ m.model_name
1638
+ );
1639
+ })
1640
+ ] })
1641
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelMenuMessage, { children: "Loading models..." })
1642
+ ]
1643
+ }
1644
+ );
1645
+ }
1646
+ return /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
1647
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { value: selectedModel || "", onValueChange: handleModelChange, children: [
1648
+ /* @__PURE__ */ jsxRuntime.jsx(
1649
+ ui.SelectTrigger,
1650
+ {
1651
+ className: ui.cn("h-8 w-[200px] text-sm", className),
1652
+ "data-testid": "model-selector",
1653
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelTriggerContent, { icon: triggerIcon, label: triggerLabel })
1546
1654
  }
1547
- )
1548
- }
1549
- ) });
1550
- };
1551
- var ConversationComposer2 = React6.memo(ConversationComposerComponent);
1552
- function MessageLiveSecondsComponent({
1553
- conversationId,
1554
- messageId,
1555
- isUser,
1556
- isGenerating,
1557
- offsetSeconds = 0,
1558
- fallbackSeconds,
1559
- minDisplaySeconds = 0,
1560
- suffix = "s"
1561
- }) {
1562
- const { elapsedTime } = react.useMessageTimer({ conversationId, messageId, isUser, isGenerating });
1563
- const base = elapsedTime > 0 ? elapsedTime : fallbackSeconds ?? 0;
1564
- const value = base - offsetSeconds;
1565
- if (!Number.isFinite(value) || value < minDisplaySeconds) return null;
1566
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1567
- value.toFixed(1),
1568
- suffix
1569
- ] });
1655
+ ),
1656
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.SelectContent, { className: "z-50", children: [
1657
+ /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: react.AUTO_CHAT_MODEL, "data-testid": "model-option-auto", children: /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelOptionLabel, { icon: /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelAutoIcon, {}), label: "Autoselect" }) }),
1658
+ hasTiers ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1659
+ standardTier?.members.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
1660
+ ui.SelectItem,
1661
+ {
1662
+ value: m.model_name,
1663
+ "data-testid": `model-option-${m.model_name}`,
1664
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1665
+ chunkW5JTACMK_cjs.ModelOptionLabel,
1666
+ {
1667
+ icon: standardIcon(m),
1668
+ label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name
1669
+ }
1670
+ )
1671
+ },
1672
+ `standard-${m.model_name}`
1673
+ )),
1674
+ premiumTier && /* @__PURE__ */ jsxRuntime.jsx(
1675
+ ui.SelectItem,
1676
+ {
1677
+ value: premiumTier.resolvedModelName,
1678
+ "data-testid": "model-option-tier-Premium",
1679
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelOptionLabel, { icon: /* @__PURE__ */ jsxRuntime.jsx(ArbiLogo, {}), label: "Premium" })
1680
+ },
1681
+ "tier-Premium"
1682
+ ),
1683
+ developerModels.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
1684
+ ui.SelectItem,
1685
+ {
1686
+ value: m.model_name,
1687
+ "data-testid": `model-option-${m.model_name}`,
1688
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1689
+ chunkW5JTACMK_cjs.ModelOptionLabel,
1690
+ {
1691
+ icon: /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ModelDot, {}),
1692
+ label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name
1693
+ }
1694
+ )
1695
+ },
1696
+ m.model_name
1697
+ ))
1698
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "loading", disabled: true, children: "Loading models..." })
1699
+ ] })
1700
+ ] }) }) }),
1701
+ tooltip && /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "top", children: tooltip })
1702
+ ] }) });
1570
1703
  }
1571
- var MessageLiveSeconds = React6__default.default.memo(MessageLiveSecondsComponent);
1572
- var DISPLAY_FIELDS = /* @__PURE__ */ new Set(["tool", "label", "icon", "summary"]);
1573
- function getToolParams(detail) {
1574
- const params = [];
1575
- for (const [key, value] of Object.entries(detail)) {
1576
- if (DISPLAY_FIELDS.has(key) || value == null) continue;
1577
- const strValue = typeof value === "string" ? value : JSON.stringify(value);
1578
- params.push({ key, value: strValue });
1579
- }
1580
- return params;
1704
+ function useHintsVisibility() {
1705
+ const { data: userSettings } = react.useUserSettings();
1706
+ const [sessionOverride] = react.useTransientView(chunk4B6HYQTW_cjs.TIPS_VISIBILITY_OVERRIDE, null);
1707
+ return {
1708
+ showHints: sessionOverride ?? userSettings?.show_hints ?? true,
1709
+ settingsLoaded: userSettings !== void 0,
1710
+ isDeveloper: userSettings?.developer === true
1711
+ };
1581
1712
  }
1582
- function StepModelIcon({ modelName, tag }) {
1583
- const cfg = tag === "Premium" ? null : chunkJARBYN6Z_cjs.getModelIcon(modelName, tag);
1584
- if (tag !== "Premium" && !cfg) return null;
1585
- return /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
1586
- /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: tag === "Premium" ? /* @__PURE__ */ jsxRuntime.jsx(ui.ProviderIcon, { modelName: modelName ?? void 0, size: 11 }) : cfg && /* @__PURE__ */ jsxRuntime.jsx(cfg.icon, { className: cfg.className, style: { width: 11, height: 11 } }) }) }),
1587
- /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { children: modelName })
1588
- ] });
1713
+ function useContextualHints() {
1714
+ const visibility = useHintsVisibility();
1715
+ const session = react.useArbiSessionStore();
1716
+ const updateUserSettings = react.useUpdateUserSettings();
1717
+ const setShowHints = (value) => chunk4B6HYQTW_cjs.setHintsSessionOverride(session, value);
1718
+ const setShowHintsPersisted = (value) => {
1719
+ chunk4B6HYQTW_cjs.setHintsSessionOverride(session, null);
1720
+ updateUserSettings.mutate({ show_hints: value });
1721
+ };
1722
+ return {
1723
+ ...visibility,
1724
+ setShowHints,
1725
+ setShowHintsPersisted,
1726
+ dismissHints: () => setShowHints(false)
1727
+ };
1589
1728
  }
1590
- var AgentStepsComponent = ({
1591
- steps,
1592
- isStreaming,
1593
- className,
1594
- totalElapsedTime,
1595
- liveTimer,
1596
- hideLive = false,
1597
- contextUsage
1598
- }) => {
1599
- const { data: userSettings } = react.useUserSettings();
1600
- const isDeveloper = userSettings?.developer === true;
1601
- const invalidateWorkflows = react.useInvalidateWorkflows();
1602
- const createdWorkflow = steps.some((step) => browser.getStepTool(step) === "create_workflow");
1603
- React6.useEffect(() => {
1604
- if (createdWorkflow && !isStreaming) void invalidateWorkflows();
1605
- }, [createdWorkflow, isStreaming]);
1606
- const invalidateAssistant = react.useInvalidateAssistant();
1607
- const setBrief = steps.some((step) => browser.getStepTool(step) === "set_assistant_brief");
1608
- React6.useEffect(() => {
1609
- if (setBrief && !isStreaming) void invalidateAssistant();
1610
- }, [setBrief, isStreaming]);
1611
- const { data: documents = [] } = react.useDocuments();
1612
- const docInfo = React6.useMemo(() => {
1613
- const map = {};
1614
- const docArray = Array.isArray(documents) ? documents : [];
1615
- for (const doc of docArray) {
1616
- if (doc && "external_id" in doc) {
1617
- const d = doc;
1618
- map[d.external_id] = {
1619
- name: ui.getDocumentTitle(d, d.file_name ?? d.external_id),
1620
- pages: d.n_pages ?? null
1621
- };
1622
- }
1623
- }
1624
- return map;
1625
- }, [documents]);
1626
- const { data: availableModels } = react.useAvailableModels();
1627
- const getModelTag = React6.useMemo(() => {
1628
- return (modelName) => {
1629
- if (!modelName || !availableModels?.models) return null;
1630
- return availableModels.models.find((m) => m.model_name === modelName)?.tags?.[0] || null;
1729
+ var NO_SKILLS = [];
1730
+ var ConversationComposerComponent = function ConversationComposer({
1731
+ value,
1732
+ onValueChange,
1733
+ handleSendMessage,
1734
+ isGenerating = false,
1735
+ compact = false,
1736
+ inputRef,
1737
+ isBranching = false,
1738
+ onCancelBranching,
1739
+ placeholder,
1740
+ onOpenSettings,
1741
+ leftButton,
1742
+ rightButton,
1743
+ modelSelector,
1744
+ skills,
1745
+ onBrowseSkills,
1746
+ contextUsage,
1747
+ isConversationEmpty = false,
1748
+ shouldOfferFollowUp = true
1749
+ }) {
1750
+ const session = react.useArbiSessionStore();
1751
+ const sessionDraft = react.useArbiSessionState(react.selectDraft);
1752
+ const newMessage = value ?? sessionDraft;
1753
+ const setNewMessage = onValueChange ?? session.setDraft;
1754
+ const { showHints } = useHintsVisibility();
1755
+ const suggestedQuery = react.useArbiSessionState((s) => s.suggestedQuery);
1756
+ const currentConversationId = react.useArbiSessionState((s) => s.conversationId);
1757
+ const workspaceId = react.useArbiSessionState((s) => s.workspaceId);
1758
+ const longPaste = chunkW5JTACMK_cjs.useLongPaste(newMessage);
1759
+ const textareaRef = React6.useRef(null);
1760
+ const formRef = React6.useRef(null);
1761
+ React6.useLayoutEffect(() => {
1762
+ const el = formRef.current;
1763
+ if (!el) return;
1764
+ const apply = () => {
1765
+ document.documentElement.style.setProperty("--chat-input-width", `${el.offsetWidth}px`);
1766
+ const rect = el.getBoundingClientRect();
1767
+ document.documentElement.style.setProperty("--chat-input-left", `${rect.left}px`);
1768
+ document.documentElement.style.setProperty("--chat-input-top", `${rect.top}px`);
1631
1769
  };
1632
- }, [availableModels]);
1633
- const mergedSteps = React6.useMemo(() => {
1634
- const merged = browser.mergeAgentSteps(steps);
1635
- if (!hideLive) return merged;
1636
- const runningHandles = new Set(
1637
- browser.extractSubagentLanes(merged).filter((l) => l.status === "running").map((l) => l.handle)
1638
- );
1639
- return merged.filter((s) => !(s.subagent && runningHandles.has(s.subagent)));
1640
- }, [steps, hideLive]);
1641
- const stepDurations = React6.useMemo(() => {
1642
- const durations = [];
1643
- for (let i = 0; i < mergedSteps.length; i++) {
1644
- const currentT = mergedSteps[i].t;
1645
- if (currentT == null) {
1646
- durations.push(null);
1647
- continue;
1648
- }
1649
- if (i + 1 < mergedSteps.length) {
1650
- const nextT = mergedSteps[i + 1].t;
1651
- durations.push(nextT != null ? nextT - currentT : null);
1652
- } else {
1653
- const remaining = totalElapsedTime != null ? totalElapsedTime - currentT : null;
1654
- durations.push(remaining != null && remaining >= 0 ? remaining : null);
1655
- }
1656
- }
1657
- return durations;
1658
- }, [mergedSteps, totalElapsedTime]);
1659
- const stepTokens = React6.useMemo(() => {
1660
- return mergedSteps.map((step) => step.step_tokens ?? null);
1661
- }, [mergedSteps]);
1662
- const stepGbp = React6.useMemo(() => {
1663
- return mergedSteps.map((step) => step.step_gbp ?? null);
1664
- }, [mergedSteps]);
1665
- const currentStepIndex = isStreaming ? browser.getCurrentStep(mergedSteps)?.index : void 0;
1666
- if (mergedSteps.length === 0) return null;
1667
- const posByIndex = new Map(mergedSteps.map((s, idx) => [s.index, idx]));
1668
- const childrenByParent = /* @__PURE__ */ new Map();
1669
- const topLevelSteps = [];
1670
- const laneStepsByHandle = /* @__PURE__ */ new Map();
1671
- const laneSpawnIndex = /* @__PURE__ */ new Map();
1672
- for (const step of mergedSteps) {
1673
- const handle = step.subagent;
1674
- if (handle) {
1675
- const arr = laneStepsByHandle.get(handle);
1676
- if (arr) arr.push(step);
1677
- else {
1678
- laneStepsByHandle.set(handle, [step]);
1679
- laneSpawnIndex.set(handle, step.index);
1680
- }
1681
- continue;
1682
- }
1683
- const parent = step.parent_index;
1684
- if (parent != null && parent !== step.index && posByIndex.has(parent)) {
1685
- const siblings = childrenByParent.get(parent) ?? [];
1686
- siblings.push(step);
1687
- childrenByParent.set(parent, siblings);
1688
- } else {
1689
- topLevelSteps.push(step);
1770
+ apply();
1771
+ const ro = new ResizeObserver(apply);
1772
+ ro.observe(el);
1773
+ return () => ro.disconnect();
1774
+ }, []);
1775
+ React6.useLayoutEffect(() => {
1776
+ if (textareaRef.current && inputRef && "current" in inputRef) {
1777
+ inputRef.current = textareaRef.current;
1690
1778
  }
1691
- }
1692
- const displayRows = [
1693
- ...topLevelSteps.map((s) => ({ index: s.index, step: s })),
1694
- ...[...laneStepsByHandle.keys()].map((h) => ({ index: laneSpawnIndex.get(h) ?? 0, lane: h }))
1695
- ].sort((a, b) => a.index - b.index);
1696
- const displayNumber = /* @__PURE__ */ new Map();
1697
- displayRows.forEach((r, i) => {
1698
- if (r.lane) {
1699
- laneStepsByHandle.get(r.lane)?.filter((s) => !s.subagent_status).forEach((c, ci) => displayNumber.set(c.index, `${i + 1}.${ci + 1}`));
1779
+ }, [inputRef]);
1780
+ const {
1781
+ slashToken,
1782
+ filteredItems,
1783
+ isOpen: isSlashMenuOpen,
1784
+ canBrowseSkills
1785
+ } = chunkM3HYFFCK_cjs.useSlashItems(newMessage, skills ? chunkM55XUF4L_cjs.BUILTIN_SKILLS : NO_SKILLS);
1786
+ const insertSlashItem = (item) => {
1787
+ if (skills?.openFor(item)) {
1788
+ setNewMessage("");
1700
1789
  return;
1701
1790
  }
1702
- displayNumber.set(r.step.index, String(i + 1));
1703
- childrenByParent.get(r.step.index)?.forEach((c, ci) => displayNumber.set(c.index, `${i + 1}.${ci + 1}`));
1704
- });
1705
- const lastStepIndex = mergedSteps[mergedSteps.length - 1].index;
1706
- const renderRow = (step, depth, isLastInList) => {
1707
- const i = posByIndex.get(step.index);
1708
- const presentation = chunkJARBYN6Z_cjs.getAgentStepPresentation(step, docInfo);
1709
- const { tool, Icon } = presentation;
1710
- const { label, summary, isMultiLine, details } = browser.getStepDisplay(step, docInfo);
1711
- const accent = chunkJARBYN6Z_cjs.stepAccent(step, tool);
1712
- const duration = stepDurations[i];
1713
- const isLastStep = step.index === lastStepIndex;
1714
- const isActive = step.index === currentStepIndex;
1715
- const tier = step.step === "goal" ? step.model_recommendation : null;
1716
- const TierIcon = tier ? chunkJARBYN6Z_cjs.MODEL_TIER_ICON_MAP[tier] : null;
1717
- const useLiveDuration = isLastStep && liveTimer != null && step.t != null;
1718
- const durationNode = useLiveDuration ? /* @__PURE__ */ jsxRuntime.jsx(
1719
- MessageLiveSeconds,
1720
- {
1721
- ...liveTimer,
1722
- offsetSeconds: step.t,
1723
- fallbackSeconds: totalElapsedTime ?? null,
1724
- minDisplaySeconds: 0.05
1725
- }
1726
- ) : duration != null ? `${duration.toFixed(1)}s` : null;
1727
- const showOutcome = step.outcome && step.step !== "goal";
1728
- const outcomeFailed = !!step.outcome && isFailureOutcome(step.outcome);
1729
- const hasSummary = step.detail?.some((d) => d.summary);
1730
- const toolParams = isDeveloper && step.detail && !step.step && !hasSummary ? step.detail.flatMap((d) => getToolParams(d)) : [];
1731
- const criteria = step.step === "goal_progress" && step.detail && step.detail.length > 0 ? step.detail : null;
1732
- const criteriaView = criteria ? criteria.map((c, idx) => ({
1733
- key: c.criterion ?? String(idx),
1734
- text: c.text || c.criterion || "",
1735
- note: c.note,
1736
- met: isCriterionMet(c.status)
1737
- })) : null;
1738
- const folded = childrenByParent.get(step.index);
1739
- return /* @__PURE__ */ jsxRuntime.jsxs(
1740
- chunkJARBYN6Z_cjs.StepRow,
1741
- {
1742
- index: step.index,
1743
- number: displayNumber.get(step.index) ?? String(i + 1),
1744
- depth,
1745
- isLast: isLastInList,
1746
- isActive,
1747
- accent,
1748
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 12, strokeWidth: 2.25 }),
1749
- kind: step.narration ? "narration" : step.step ?? "tool",
1750
- title: isActive ? presentation.description : label,
1751
- titleTestId: isActive ? "agent-expanded-current-step-description" : void 0,
1752
- badge: TierIcon ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
1753
- /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center self-center", children: /* @__PURE__ */ jsxRuntime.jsx(TierIcon, { size: 12, className: accent.fg, "aria-hidden": true }) }) }),
1754
- /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "top", children: chunkJARBYN6Z_cjs.MODEL_TIER_LABELS[tier] ?? tier })
1755
- ] }) : void 0,
1756
- meta: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1757
- isDeveloper && /* @__PURE__ */ jsxRuntime.jsx(StepModelIcon, { modelName: step.usage?.model, tag: getModelTag(step.usage?.model) }),
1758
- isDeveloper && stepTokens[i] != null && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
1759
- browser.formatTokens(stepTokens[i]),
1760
- " tok"
1761
- ] }),
1762
- !isActive && stepGbp[i] != null && /* @__PURE__ */ jsxRuntime.jsx("span", { children: react.formatGbp(stepGbp[i]) }),
1763
- durationNode != null && /* @__PURE__ */ jsxRuntime.jsx("span", { children: durationNode })
1764
- ] }),
1765
- children: [
1766
- summary && !isActive && (step.narration ? (
1767
- /* Narration is PROSE (headings, bold, lists): render markdown, not raw asterisks.
1768
- Tool summaries stay plain text: one-line headlines where a clamp matters. */
1769
- /* @__PURE__ */ jsxRuntime.jsx(chunkJARBYN6Z_cjs.StepNarration, { index: step.index, children: /* @__PURE__ */ jsxRuntime.jsx(chunkMSFWSDRS_cjs.ConnectedMarkdown, { isStreaming: false, children: summary }) })
1770
- ) : /* @__PURE__ */ jsxRuntime.jsx(chunkJARBYN6Z_cjs.StepSummary, { index: step.index, multiLine: isMultiLine, children: summary })),
1771
- details.map((d, di) => /* @__PURE__ */ jsxRuntime.jsx(chunkJARBYN6Z_cjs.StepDetail, { index: step.index, children: d }, di)),
1772
- showOutcome && /* @__PURE__ */ jsxRuntime.jsx(chunkJARBYN6Z_cjs.StepOutcome, { index: step.index, failed: outcomeFailed, children: step.outcome }),
1773
- toolParams.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkJARBYN6Z_cjs.StepParams, { children: toolParams.map((p) => `${p.key}=${p.value}`).join(" ") }),
1774
- step.routing && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "mt-1 text-xs text-muted-foreground", "data-testid": "routing-details", children: [
1775
- /* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer", children: "Routing details" }),
1776
- /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-2 space-y-2", children: [
1777
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1778
- /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Answer model" }),
1779
- /* @__PURE__ */ jsxRuntime.jsxs("dd", { children: [
1780
- step.routing.selected_model,
1781
- step.routing.model_recommendation ? ` (${step.routing.model_recommendation})` : ""
1782
- ] })
1783
- ] }),
1784
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1785
- /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Default document search" }),
1786
- /* @__PURE__ */ jsxRuntime.jsx("dd", { children: step.routing.selected_doc_ext_ids.length ? step.routing.selected_doc_ext_ids.map((id) => docInfo[id]?.name ?? step.routing.document_titles[id] ?? id).join(", ") : "No documents selected" }),
1787
- /* @__PURE__ */ jsxRuntime.jsx("dd", { children: "The complete document catalogue remains available for direct reading." })
1788
- ] }),
1789
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1790
- /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Always available tools" }),
1791
- /* @__PURE__ */ jsxRuntime.jsx("dd", { children: step.routing.always_available_tool_names.map((name) => name.replaceAll("_", " ")).join(", ") || "None" })
1792
- ] }),
1793
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1794
- /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Additional tools" }),
1795
- /* @__PURE__ */ jsxRuntime.jsx("dd", { children: step.routing.selected_tool_names == null ? "All enabled tools retained" : step.routing.selected_tool_names.filter((name) => !step.routing.always_available_tool_names.includes(name)).map((name) => name.replaceAll("_", " ")).join(", ") || "None" })
1796
- ] }),
1797
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1798
- /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "History" }),
1799
- /* @__PURE__ */ jsxRuntime.jsxs("dd", { children: [
1800
- step.routing.retained_message_ext_ids.length,
1801
- " messages retained",
1802
- step.routing.history_retained_by_policy ? "; full history preserved by policy" : ""
1803
- ] })
1804
- ] }),
1805
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1806
- /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Router" }),
1807
- /* @__PURE__ */ jsxRuntime.jsxs("dd", { children: [
1808
- step.routing.router_model,
1809
- " \xB7 ",
1810
- step.routing.elapsed_seconds.toFixed(3),
1811
- "s",
1812
- step.routing.input_tokens != null ? ` \xB7 ${step.routing.input_tokens.toLocaleString()} input tokens` : ""
1813
- ] })
1814
- ] }),
1815
- step.routing.status === "fallback" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1816
- /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-medium", children: "Fallback" }),
1817
- /* @__PURE__ */ jsxRuntime.jsxs("dd", { children: [
1818
- "Context and authorized tools retained (",
1819
- step.routing.fallback_reason ?? "router unavailable",
1820
- ")."
1821
- ] })
1822
- ] })
1823
- ] })
1824
- ] }),
1825
- criteriaView && /* @__PURE__ */ jsxRuntime.jsx(chunkJARBYN6Z_cjs.GoalCriteria, { criteria: criteriaView }),
1826
- folded && folded.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1827
- chunkJARBYN6Z_cjs.SubStepGroup,
1828
- {
1829
- parentIndex: step.index,
1830
- summary: summariseSubSteps(folded),
1831
- openClassName: accent.fg,
1832
- renderSteps: () => folded.map((c, ci, arr) => renderRow(c, depth + 1, ci === arr.length - 1))
1833
- }
1834
- )
1835
- ]
1836
- },
1837
- step.index
1838
- );
1791
+ setNewMessage(`/${item.name} `);
1792
+ requestAnimationFrame(() => {
1793
+ const ta = textareaRef.current;
1794
+ if (!ta) return;
1795
+ ta.focus();
1796
+ const end = `/${item.name} `.length;
1797
+ ta.setSelectionRange(end, end);
1798
+ });
1799
+ };
1800
+ const { data: users } = react.useWorkspaceUsers();
1801
+ const currentUserId = react.useArbiSession().user?.external_id;
1802
+ const assistantName = shell.useAssistantName();
1803
+ const mentionCandidates = React6.useMemo(
1804
+ () => react.buildMentionCandidates(users ?? [], currentUserId, assistantName),
1805
+ [users, currentUserId, assistantName]
1806
+ );
1807
+ const mention = chunkKBRDUFXG_cjs.useMentionAutocomplete({
1808
+ value: newMessage,
1809
+ onValueChange: setNewMessage,
1810
+ candidates: mentionCandidates,
1811
+ textareaRef
1812
+ });
1813
+ const { data: conversations } = react.useConversations(workspaceId ?? void 0);
1814
+ const isThread = conversations?.find((conversation) => conversation.external_id === currentConversationId)?.is_shared ?? false;
1815
+ const prefillsAssistant = isThread && !isBranching;
1816
+ const recipient = chunkW5JTACMK_cjs.useRecipientDraft({
1817
+ value: newMessage,
1818
+ onValueChange: setNewMessage,
1819
+ contextKey: currentConversationId,
1820
+ defaultLabel: prefillsAssistant ? assistantName : null
1821
+ });
1822
+ const assistant = shell.useAssistantCopy();
1823
+ const slashNav = chunk75BNMCUX_cjs.useListKeyNav({
1824
+ open: isSlashMenuOpen,
1825
+ items: filteredItems,
1826
+ onPick: insertSlashItem,
1827
+ // Clear the leading slash to fully dismiss; otherwise the menu reopens on the next letter.
1828
+ onDismiss: () => setNewMessage(""),
1829
+ resetKey: slashToken
1830
+ });
1831
+ const isComposerMenuOpen = isSlashMenuOpen || mention.isOpen;
1832
+ React6.useEffect(() => {
1833
+ if (isComposerMenuOpen) session.setActiveCitationKey(null);
1834
+ }, [isComposerMenuOpen, session]);
1835
+ const followUp = !newMessage && !isBranching && !isGenerating && shouldOfferFollowUp && showHints && suggestedQuery && suggestedQuery.conversationExtId === currentConversationId ? suggestedQuery.text : null;
1836
+ const sendDraft = () => {
1837
+ handleSendMessage();
1838
+ textareaRef.current?.focus();
1839
+ if (isBranching && onCancelBranching) onCancelBranching();
1839
1840
  };
1840
- let summaryNode = null;
1841
- if (contextUsage?.spent_gbp != null) {
1842
- const runStats = browser.computeRunStats(steps);
1843
- const totalInputTokens = contextUsage.all_llm_calls?.input_tokens ?? contextUsage.total_input;
1844
- const totalOutputTokens = contextUsage.all_llm_calls?.output_tokens ?? contextUsage.total_output;
1845
- const leftParts = [
1846
- `${displayRows.length} step${displayRows.length !== 1 ? "s" : ""}`,
1847
- `${runStats.toolCalls} tool call${runStats.toolCalls !== 1 ? "s" : ""}`
1848
- ];
1849
- if (totalElapsedTime != null) leftParts.push(`${totalElapsedTime.toFixed(1)}s`);
1850
- leftParts.push(`${browser.formatTokens(totalInputTokens)} in`);
1851
- if (totalOutputTokens > 0) leftParts.push(`${browser.formatTokens(totalOutputTokens)} out`);
1852
- summaryNode = /* @__PURE__ */ jsxRuntime.jsx(
1853
- chunkJARBYN6Z_cjs.StepTraceSummary,
1854
- {
1855
- left: leftParts.join(" \xB7 "),
1856
- isNearBudget: browser.isNearAiUsageBudget(contextUsage),
1857
- total: `Total: ${react.formatGbp(contextUsage.spent_gbp)}`
1858
- }
1859
- );
1860
- }
1861
- return /* @__PURE__ */ jsxRuntime.jsx(chunkJARBYN6Z_cjs.StepTrace, { className, summary: summaryNode, children: displayRows.map((row, i) => {
1862
- if (row.lane) {
1863
- return /* @__PURE__ */ jsxRuntime.jsx(
1864
- LaneBinding,
1865
- {
1866
- handle: row.lane,
1867
- steps: laneStepsByHandle.get(row.lane),
1868
- number: i + 1,
1869
- renderRow,
1870
- isStreaming
1871
- },
1872
- `lane-${row.lane}`
1873
- );
1841
+ const onKeyDown = (event) => {
1842
+ if (recipient.handleKeyDown(event)) return;
1843
+ if (slashNav.handleKeyDown(event)) return;
1844
+ if (mention.nav.handleKeyDown(event)) return;
1845
+ if (event.key === "Escape" && isBranching && onCancelBranching) {
1846
+ event.preventDefault();
1847
+ onCancelBranching();
1874
1848
  }
1875
- const parent = row.step;
1876
- return renderRow(
1877
- parent,
1878
- 0,
1879
- i === displayRows.length - 1 && !childrenByParent.has(parent.index)
1880
- );
1881
- }) });
1882
- };
1883
- function LaneBinding({
1884
- handle,
1885
- steps,
1886
- number,
1887
- renderRow,
1888
- isStreaming
1889
- }) {
1890
- const spawn = steps.find((s) => s.subagent_status === "running");
1891
- const closed = steps.find((s) => s.subagent_status === "done" || s.subagent_status === "failed");
1892
- const failed = steps.some((s) => s.subagent_status === "failed");
1893
- const inner = steps.filter((s) => !s.subagent_status);
1894
- const task = (spawn?.content || spawn?.focus || "").trim();
1895
- const running = !closed && isStreaming;
1896
- const latest = inner[inner.length - 1];
1897
- return /* @__PURE__ */ jsxRuntime.jsx(
1898
- chunkJARBYN6Z_cjs.SubAgentLane,
1849
+ };
1850
+ const handleSubmit = (e) => {
1851
+ e.preventDefault();
1852
+ if (recipient.hasBody) sendDraft();
1853
+ };
1854
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
1855
+ chunkKBRDUFXG_cjs.Composer.Root,
1899
1856
  {
1900
- handle,
1901
- number,
1902
- job: browser.subagentJobLabel(task) || `Sub-agent ${handle}`,
1903
- task,
1904
- status: running ? "running" : failed ? "failed" : "done",
1905
- innerCount: inner.length,
1906
- liveFocus: latest ? latest.focus?.trim() || browser.getAgentStepLabel(latest) : "",
1907
- renderSteps: () => inner.map((s, i) => renderRow(s, 1, i === inner.length - 1))
1857
+ onSubmit: handleSubmit,
1858
+ formRef,
1859
+ isBranching,
1860
+ notice: isBranching ? /* @__PURE__ */ jsxRuntime.jsx(chunkKBRDUFXG_cjs.Composer.Notice, { onCancel: onCancelBranching }) : void 0,
1861
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1862
+ chunkKBRDUFXG_cjs.Composer.Frame,
1863
+ {
1864
+ className: compact ? "rounded-none border-0 px-0 py-0 shadow-none focus-within:shadow-none" : void 0,
1865
+ children: [
1866
+ /* @__PURE__ */ jsxRuntime.jsx(
1867
+ chunk5F4DCIHS_cjs.SlashMenu,
1868
+ {
1869
+ open: isSlashMenuOpen,
1870
+ items: filteredItems,
1871
+ selectedIndex: slashNav.selectedIndex,
1872
+ setSelectedIndex: slashNav.setSelectedIndex,
1873
+ listboxId: slashNav.listboxId,
1874
+ onSelect: insertSlashItem,
1875
+ onBrowse: canBrowseSkills ? onBrowseSkills : void 0
1876
+ }
1877
+ ),
1878
+ /* @__PURE__ */ jsxRuntime.jsx(
1879
+ chunk75BNMCUX_cjs.MentionMenu,
1880
+ {
1881
+ open: mention.isOpen,
1882
+ items: mention.items,
1883
+ selectedIndex: mention.nav.selectedIndex,
1884
+ setSelectedIndex: mention.nav.setSelectedIndex,
1885
+ listboxId: mention.nav.listboxId,
1886
+ onSelect: mention.pick
1887
+ }
1888
+ ),
1889
+ followUp && /* @__PURE__ */ jsxRuntime.jsxs(
1890
+ "div",
1891
+ {
1892
+ className: "mb-2 flex items-start gap-3 rounded-md border border-border bg-background p-3",
1893
+ "data-testid": "follow-up-suggestion",
1894
+ children: [
1895
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
1896
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground", children: "Suggested follow-up" }),
1897
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-foreground", children: followUp })
1898
+ ] }),
1899
+ /* @__PURE__ */ jsxRuntime.jsx(
1900
+ ui.Button,
1901
+ {
1902
+ type: "button",
1903
+ variant: "outline",
1904
+ size: "sm",
1905
+ className: "shrink-0",
1906
+ onClick: () => {
1907
+ setNewMessage(followUp);
1908
+ requestAnimationFrame(() => textareaRef.current?.focus());
1909
+ },
1910
+ "data-testid": "follow-up-suggestion-button",
1911
+ children: "Use suggestion"
1912
+ }
1913
+ )
1914
+ ]
1915
+ }
1916
+ ),
1917
+ /* @__PURE__ */ jsxRuntime.jsx(
1918
+ chunkKBRDUFXG_cjs.Composer.Input,
1919
+ {
1920
+ value: newMessage,
1921
+ onValueChange: (next) => {
1922
+ mention.onValueChange(next);
1923
+ longPaste.onValueChange(next);
1924
+ },
1925
+ onPaste: (event) => longPaste.onPaste(event, newMessage),
1926
+ onKeyDown,
1927
+ textareaProps: {
1928
+ ...mention.isOpen ? mention.nav.comboboxProps : slashNav.comboboxProps,
1929
+ ...mention.textareaProps
1930
+ },
1931
+ textareaRef,
1932
+ isPasteCollapsed: longPaste.isCollapsed,
1933
+ onExpandPaste: () => {
1934
+ longPaste.expand();
1935
+ requestAnimationFrame(() => textareaRef.current?.focus());
1936
+ },
1937
+ isRoomy: isConversationEmpty,
1938
+ compact,
1939
+ placeholder: placeholder || (isBranching ? "Edit message to create a branch..." : isThread ? "Message the thread\u2026 @mention someone to notify them" : isGenerating ? "Type your next prompt..." : assistant.askAnythingPlaceholder)
1940
+ }
1941
+ ),
1942
+ /* @__PURE__ */ jsxRuntime.jsx(
1943
+ chunkKBRDUFXG_cjs.Composer.Toolbar,
1944
+ {
1945
+ className: compact ? "flex-nowrap" : void 0,
1946
+ leading: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1947
+ leftButton,
1948
+ compact && modelSelector,
1949
+ onOpenSettings && /* @__PURE__ */ jsxRuntime.jsx(
1950
+ ui.Button,
1951
+ {
1952
+ type: "button",
1953
+ variant: "ghost",
1954
+ size: "sm",
1955
+ onClick: onOpenSettings,
1956
+ className: "h-8 w-8 p-0 pointer-coarse:h-11 pointer-coarse:w-11",
1957
+ "aria-label": "Chat settings",
1958
+ title: "Chat settings",
1959
+ "data-testid": "message-input-settings-button",
1960
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "h-4 w-4 text-muted-foreground" })
1961
+ }
1962
+ )
1963
+ ] }),
1964
+ trailing: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1965
+ !compact && modelSelector,
1966
+ rightButton
1967
+ ] })
1968
+ }
1969
+ ),
1970
+ /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ContextUsageBar, { contextUsage, draftLength: newMessage.length })
1971
+ ]
1972
+ }
1973
+ )
1908
1974
  }
1909
- );
1910
- }
1911
- function summariseSubSteps(steps) {
1912
- const counts = /* @__PURE__ */ new Map();
1913
- for (const s of steps) {
1914
- const noun = subStepNoun(browser.getStepTool(s));
1915
- counts.set(noun, (counts.get(noun) ?? 0) + 1);
1916
- }
1917
- return [...counts.entries()].map(([noun, n]) => `${n} ${n === 1 ? noun : pluralise(noun)}`).join(", ");
1918
- }
1919
- function isCriterionMet(status) {
1920
- return status === "met" || status === "absent_from_corpus";
1921
- }
1922
- function isFailureOutcome(outcome) {
1923
- const o = outcome.toLowerCase();
1924
- if (/\bexit\s+0\b/.test(o)) return false;
1925
- return /\bexit\s+[1-9]/.test(o) || /timed out|timeout|failed|error\b/.test(o);
1926
- }
1927
- function subStepNoun(tool) {
1928
- switch (tool) {
1929
- case "search_inside_documents":
1930
- case "search_conversations":
1931
- case "web_search":
1932
- return "search";
1933
- case "read_document":
1934
- case "read_url":
1935
- case "view_document_pages":
1936
- case "get_table_of_contents":
1937
- return "read";
1938
- case "execute_code":
1939
- case "spawn_coding_agent":
1940
- return "run";
1941
- case "create_plan":
1942
- return "plan";
1943
- default:
1944
- return "step";
1945
- }
1946
- }
1947
- function pluralise(noun) {
1948
- return noun.endsWith("h") ? `${noun}es` : `${noun}s`;
1949
- }
1950
- var AgentSteps = React6__default.default.memo(AgentStepsComponent, (prev, next) => {
1951
- return prev.isStreaming === next.isStreaming && prev.className === next.className && prev.totalElapsedTime === next.totalElapsedTime && prev.steps === next.steps && prev.liveTimer === next.liveTimer && prev.hideLive === next.hideLive;
1952
- });
1975
+ ) });
1976
+ };
1977
+ var ConversationComposer2 = React6.memo(ConversationComposerComponent);
1953
1978
  function groupStepsByHandle(steps) {
1954
1979
  const byHandle = /* @__PURE__ */ new Map();
1955
1980
  for (const step of browser.mergeAgentSteps(steps)) {
@@ -1990,7 +2015,7 @@ function RunningSubagentsRoster({
1990
2015
  if (leafId) selectThread(leafId);
1991
2016
  };
1992
2017
  return /* @__PURE__ */ jsxRuntime.jsx(
1993
- chunkJARBYN6Z_cjs.SubagentRoster,
2018
+ chunkVNUBBRJM_cjs.SubagentRoster,
1994
2019
  {
1995
2020
  lanes: rosterLanes,
1996
2021
  className,
@@ -2006,6 +2031,15 @@ function RunningSubagentsRoster({
2006
2031
  }
2007
2032
  );
2008
2033
  }
2034
+ function hasSimpleColumnGrid(table) {
2035
+ const headerRows = table.tHead?.rows;
2036
+ if (!headerRows || headerRows.length !== 1) return false;
2037
+ const columns = headerRows[0].cells.length;
2038
+ if (columns === 0 || columns > 5) return false;
2039
+ return Array.from(table.rows).every(
2040
+ (row) => row.cells.length === columns && Array.from(row.cells).every((cell) => cell.colSpan === 1 && cell.rowSpan === 1)
2041
+ );
2042
+ }
2009
2043
  function AnswerTable({
2010
2044
  children,
2011
2045
  className,
@@ -2014,9 +2048,13 @@ function AnswerTable({
2014
2048
  const wrapperRef = React6.useRef(null);
2015
2049
  const scrollRef = React6.useRef(null);
2016
2050
  const [hasMoreRight, setHasMoreRight] = React6.useState(false);
2051
+ const [fitsColumns, setFitsColumns] = React6.useState(false);
2017
2052
  const checkOverflow = React6.useCallback(() => {
2018
2053
  const el = scrollRef.current;
2019
2054
  if (!el) return;
2055
+ const table = el.querySelector("table");
2056
+ const canFit = !!table && hasSimpleColumnGrid(table) && el.clientWidth >= 560;
2057
+ setFitsColumns((prev) => prev === canFit ? prev : canFit);
2020
2058
  const more = el.scrollLeft + el.clientWidth < el.scrollWidth - 1;
2021
2059
  setHasMoreRight((prev) => prev === more ? prev : more);
2022
2060
  }, []);
@@ -2028,7 +2066,7 @@ function AnswerTable({
2028
2066
  observer.observe(el);
2029
2067
  if (el.firstElementChild) observer.observe(el.firstElementChild);
2030
2068
  return () => observer.disconnect();
2031
- }, [checkOverflow]);
2069
+ }, [checkOverflow, fitsColumns]);
2032
2070
  const scrollRight = React6.useCallback(() => {
2033
2071
  const el = scrollRef.current;
2034
2072
  if (!el) return;
@@ -2038,7 +2076,7 @@ function AnswerTable({
2038
2076
  const table = wrapperRef.current?.querySelector("table");
2039
2077
  if (!table || !wrapperRef.current) return;
2040
2078
  try {
2041
- const filename = await chunkJHDCDEXY_cjs.downloadTableAsCsv(table, wrapperRef.current);
2079
+ const filename = await chunkW5JTACMK_cjs.downloadTableAsCsv(table, wrapperRef.current);
2042
2080
  shell.notify.success(`Saved ${filename}`);
2043
2081
  } catch (error) {
2044
2082
  console.error("Failed to download table as CSV", error);
@@ -2088,8 +2126,12 @@ function AnswerTable({
2088
2126
  "table",
2089
2127
  {
2090
2128
  "data-testid": "markdown-table",
2129
+ "data-fit-columns": fitsColumns ? "" : void 0,
2091
2130
  ...props,
2092
- className: ui.cn("[&_td]:min-w-36 [&_th]:min-w-36", className),
2131
+ className: ui.cn(
2132
+ fitsColumns ? "w-full table-fixed [&_td]:min-w-0 [&_th]:min-w-0 [&_td]:[overflow-wrap:anywhere] [&_th]:[overflow-wrap:anywhere] [&_td_*]:[overflow-wrap:anywhere] [&_th_*]:[overflow-wrap:anywhere]" : "[&_td]:min-w-36 [&_th]:min-w-36",
2133
+ className
2134
+ ),
2093
2135
  children
2094
2136
  }
2095
2137
  )
@@ -2107,7 +2149,7 @@ function AnswerTable({
2107
2149
  ] });
2108
2150
  }
2109
2151
  function useOpenChunk() {
2110
- const { openDocument } = chunk46LX6EQT_cjs.useBlocksEnvironment();
2152
+ const { openDocument } = chunkHN56WWBR_cjs.useBlocksEnvironment();
2111
2153
  const { data: documents } = react.useDocuments();
2112
2154
  return React6.useCallback(
2113
2155
  (chunk) => {
@@ -2148,13 +2190,13 @@ function withAnswerTable(components) {
2148
2190
  }
2149
2191
  return merged;
2150
2192
  }
2151
- var renderMarkdown = ({ components, isStreaming, children }) => /* @__PURE__ */ jsxRuntime.jsx(chunkMSFWSDRS_cjs.ConnectedMarkdown, { components: withAnswerTable(components), isStreaming, children });
2193
+ var renderMarkdown = ({ components, isStreaming, children }) => /* @__PURE__ */ jsxRuntime.jsx(chunkPNZVCHFS_cjs.ConnectedMarkdown, { components: withAnswerTable(components), isStreaming, children });
2152
2194
  function LinkInAnswer({ href, children, ...props }) {
2153
- const docId = chunkZ2XZ2D4N_cjs.workspaceDocIdFromHref(href, chunk46LX6EQT_cjs.useBlocksEnvironment().runtimeConfig.deploymentDomain);
2195
+ const docId = chunkO2NHBB3D_cjs.workspaceDocIdFromHref(href, chunkHN56WWBR_cjs.useBlocksEnvironment().runtimeConfig.deploymentDomain);
2154
2196
  if (docId) {
2155
- return /* @__PURE__ */ jsxRuntime.jsx(chunkMSFWSDRS_cjs.InternalDocLink, { docId, href, ...props, children });
2197
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkPNZVCHFS_cjs.InternalDocLink, { docId, href, ...props, children });
2156
2198
  }
2157
- return /* @__PURE__ */ jsxRuntime.jsx(chunkMSFWSDRS_cjs.ExternalLink, { href, ...props, children });
2199
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkPNZVCHFS_cjs.ExternalLink, { href, ...props, children });
2158
2200
  }
2159
2201
  var ConnectedCitationRendererComponent = (props) => {
2160
2202
  const session = react.useArbiSessionStore();
@@ -2256,7 +2298,7 @@ function MessageDetailsModal({
2256
2298
  ]
2257
2299
  }
2258
2300
  ),
2259
- messageDetails && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "message-details-content", children: /* @__PURE__ */ jsxRuntime.jsx(chunkFQXZZXS2_cjs.MessageJsonTree, { data: messageDetails, name: "message", defaultExpanded: true }) })
2301
+ messageDetails && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "message-details-content", children: /* @__PURE__ */ jsxRuntime.jsx(chunkAHUEBRLX_cjs.MessageJsonTree, { data: messageDetails, name: "message", defaultExpanded: true }) })
2260
2302
  ] })
2261
2303
  ]
2262
2304
  }
@@ -2286,20 +2328,20 @@ function WorkflowStepMessage({
2286
2328
  const { conversations } = react.useConversationItems();
2287
2329
  const activity = react.useConversationActivity(conversationId ?? void 0, { live: true });
2288
2330
  const plan = conversations.find((c) => c.external_id === conversationId)?.plan;
2289
- const steps = chunkJARBYN6Z_cjs.fromPlanSteps(plan?.steps ?? []);
2331
+ const steps = chunkVNUBBRJM_cjs.fromPlanSteps(plan?.steps ?? []);
2290
2332
  const found = steps.find((s) => s.id === step);
2291
2333
  const states = chunkY3GJBLAI_cjs.stepStatesFromActivity(activity.data ?? []);
2292
2334
  const { data: documents = [] } = react.useDocuments();
2293
- const { openDocument } = chunk46LX6EQT_cjs.useBlocksEnvironment();
2294
- const ref = found ? chunk7XR6CPCU_cjs.stepDocuments(steps, states, step).at(-1) : void 0;
2335
+ const { openDocument } = chunkHN56WWBR_cjs.useBlocksEnvironment();
2336
+ const ref = found ? chunkPIJPM5RA_cjs.stepDocuments(steps, states, step).at(-1) : void 0;
2295
2337
  const docId = ref ? chunkY3GJBLAI_cjs.splitDocRef(ref).id : void 0;
2296
2338
  const doc = documents.find((d) => d.external_id === docId);
2297
2339
  return /* @__PURE__ */ jsxRuntime.jsx(
2298
- chunkVHD5DZW4_cjs.WorkflowStepChip,
2340
+ chunkKBRDUFXG_cjs.WorkflowStepChip,
2299
2341
  {
2300
2342
  step,
2301
2343
  title: found?.title,
2302
- kind: found ? chunk7XR6CPCU_cjs.stepKindOf(found) : void 0,
2344
+ kind: found ? chunkPIJPM5RA_cjs.stepKindOf(found) : void 0,
2303
2345
  phase: found && activity.data ? chunkY3GJBLAI_cjs.stepPhase(steps, states, step) : void 0,
2304
2346
  document: docId ? {
2305
2347
  name: doc ? ui.getDocumentTitle(doc) : docId,
@@ -2327,7 +2369,7 @@ var MessageComponent = ({
2327
2369
  const [showDetailsModal, setShowDetailsModal] = React6.useState(false);
2328
2370
  const messageRef = React6.useRef(null);
2329
2371
  const session = react.useArbiSessionStore();
2330
- const environment = chunk46LX6EQT_cjs.useBlocksEnvironment();
2372
+ const environment = chunkHN56WWBR_cjs.useBlocksEnvironment();
2331
2373
  const linkMentions = react.useLinkMentions();
2332
2374
  const { notify: notify3 } = environment;
2333
2375
  const editingMessageId = react.useArbiSessionState((state) => state.editingMessageId);
@@ -2353,25 +2395,23 @@ var MessageComponent = ({
2353
2395
  const { data: workspaceUsers = [] } = react.useWorkspaceUsers();
2354
2396
  const streaming = shell.useMessageChatArtifact(message.external_id);
2355
2397
  const { data: workspaceDocs } = react.useDocuments();
2356
- const linkedArtifact = React6.useMemo(() => {
2357
- if (!message.external_id) return void 0;
2358
- if (streaming) return streaming;
2359
- const doc = chunkJHDCDEXY_cjs.findMessageDocument(workspaceDocs, message.external_id);
2360
- if (!doc) return void 0;
2361
- const kind = artifacts.artifactKindFromFileName(doc.file_name);
2362
- return {
2398
+ const linkedArtifacts = React6.useMemo(() => {
2399
+ const saved = chunkW5JTACMK_cjs.findMessageDocuments(workspaceDocs, message.external_id).filter((doc) => doc.external_id !== streaming?.docExtId).map((doc) => ({
2363
2400
  docExtId: doc.external_id,
2364
2401
  title: ui.getDocumentTitle(doc),
2365
2402
  isComplete: true,
2366
- mode: ui.isImageDocument(doc) ? "image" : /\.pptx$/i.test(doc.file_name ?? "") ? "presentation" : kind ?? "markdown"
2367
- };
2403
+ mode: ui.isImageDocument(doc) ? "image" : artifacts.savedArtifactMode(doc.file_name)
2404
+ }));
2405
+ return streaming ? [streaming, ...saved] : saved;
2368
2406
  }, [streaming, workspaceDocs, message.external_id]);
2407
+ const linkedArtifact = linkedArtifacts[0];
2369
2408
  const handleOpenArtifact = React6.useCallback(
2370
2409
  (docExtId) => {
2371
- session.setDocumentViewer({ tab: artifacts.viewerTabForArtifactMode(linkedArtifact?.mode) });
2410
+ const mode = linkedArtifacts.find((artifact) => artifact.docExtId === docExtId)?.mode;
2411
+ session.setDocumentViewer({ tab: artifacts.viewerTabForArtifactMode(mode) });
2372
2412
  environment.openDocument(docExtId);
2373
2413
  },
2374
- [linkedArtifact?.mode, session, environment]
2414
+ [linkedArtifacts, session, environment]
2375
2415
  );
2376
2416
  const messageAuthorUser = React6.useMemo(() => {
2377
2417
  if (!isUser) return null;
@@ -2457,7 +2497,7 @@ var MessageComponent = ({
2457
2497
  const isQueuedAnswer = !isUser && message.status === "queued" && !isGenerating;
2458
2498
  const isAwaitingAnswer = (isGenerating || isRunningOnServer) && !isStopped && !!message.pendingUserInput;
2459
2499
  const showWorkingIndicator = (isGenerating || isRunningOnServer) && !isQueuedAnswer && !responseContent.trim() && !linkedArtifact && !isAwaitingAnswer;
2460
- const workingStepLabel = showWorkingIndicator ? chunkJARBYN6Z_cjs.getCurrentAgentStepPresentation(message.agentSteps ?? [])?.description : void 0;
2500
+ const workingStepLabel = showWorkingIndicator ? chunkVNUBBRJM_cjs.getCurrentAgentStepPresentation(message.agentSteps ?? [])?.description : void 0;
2461
2501
  const showEmptyAnswer = !isUser && !isGenerating && !isRunningOnServer && !isFailed && !isStopped && !responseContent.trim() && !linkedArtifact;
2462
2502
  const isEmptyStopped = isStopped && !responseContent.trim();
2463
2503
  const stoppedQuestion = React6.useMemo(() => {
@@ -2544,7 +2584,7 @@ var MessageComponent = ({
2544
2584
  precedingUserMessage = parentMessage.content;
2545
2585
  }
2546
2586
  }
2547
- await chunkJHDCDEXY_cjs.copyMessageToClipboard({
2587
+ await chunkW5JTACMK_cjs.copyMessageToClipboard({
2548
2588
  messageRef,
2549
2589
  responseContent,
2550
2590
  messageContent: message.content,
@@ -2623,7 +2663,7 @@ var MessageComponent = ({
2623
2663
  const timeLabel = ui.formatFriendlyDate(message.created_at || "");
2624
2664
  const messageId = message.external_id;
2625
2665
  const assistant = shell.useAssistantCopy();
2626
- const transcriptRuns = chunk3GQQUR27_cjs.useTranscriptRuns();
2666
+ const transcriptRuns = chunkTNBNDY2J_cjs.useTranscriptRuns();
2627
2667
  const messageRole = isUser ? "user" : "assistant";
2628
2668
  const menuItems = [
2629
2669
  ...isUser ? [
@@ -2687,7 +2727,7 @@ var MessageComponent = ({
2687
2727
  const actions = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2688
2728
  branchControl,
2689
2729
  isUser ? /* @__PURE__ */ jsxRuntime.jsx(
2690
- chunkVHD5DZW4_cjs.MessageActionMenu,
2730
+ chunkKBRDUFXG_cjs.MessageActionMenu,
2691
2731
  {
2692
2732
  items: menuItems,
2693
2733
  heading: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -2698,7 +2738,7 @@ var MessageComponent = ({
2698
2738
  }
2699
2739
  ) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2700
2740
  /* @__PURE__ */ jsxRuntime.jsx(
2701
- chunkVHD5DZW4_cjs.MessageActionButton,
2741
+ chunkKBRDUFXG_cjs.MessageActionButton,
2702
2742
  {
2703
2743
  onClick: (e) => {
2704
2744
  e.stopPropagation();
@@ -2713,7 +2753,7 @@ var MessageComponent = ({
2713
2753
  }
2714
2754
  ),
2715
2755
  /* @__PURE__ */ jsxRuntime.jsx(
2716
- chunkVHD5DZW4_cjs.MessageActionButton,
2756
+ chunkKBRDUFXG_cjs.MessageActionButton,
2717
2757
  {
2718
2758
  onClick: (e) => {
2719
2759
  e.stopPropagation();
@@ -2726,7 +2766,7 @@ var MessageComponent = ({
2726
2766
  }
2727
2767
  ),
2728
2768
  /* @__PURE__ */ jsxRuntime.jsx(
2729
- chunkVHD5DZW4_cjs.MessageActionMenu,
2769
+ chunkKBRDUFXG_cjs.MessageActionMenu,
2730
2770
  {
2731
2771
  items: menuItems,
2732
2772
  heading: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -2744,13 +2784,13 @@ var MessageComponent = ({
2744
2784
  ] });
2745
2785
  const isBareStopped = isEmptyStopped && visibleStepCount === 0;
2746
2786
  const footer = settledForHeader && !isBareStopped && /* @__PURE__ */ jsxRuntime.jsx(
2747
- chunkVHD5DZW4_cjs.MessageFooter,
2787
+ chunkKBRDUFXG_cjs.MessageFooter,
2748
2788
  {
2749
2789
  role: messageRole,
2750
2790
  align: isOtherPerson ? "start" : "end",
2751
2791
  leading: isUser ? (
2752
2792
  // Someone else's author is the pill above their run; only mine is marked here.
2753
- !isOtherPerson && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(chunkFVSJXCKF_cjs.DocumentUser, { user: messageAuthorUser })
2793
+ !isOtherPerson && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(chunkXKOIHIVQ_cjs.DocumentUser, { user: messageAuthorUser })
2754
2794
  ) : /* @__PURE__ */ jsxRuntime.jsx(
2755
2795
  "span",
2756
2796
  {
@@ -2761,7 +2801,7 @@ var MessageComponent = ({
2761
2801
  },
2762
2802
  "data-testid": `message-model-${messageId}`,
2763
2803
  children: /* @__PURE__ */ jsxRuntime.jsx(
2764
- chunkJARBYN6Z_cjs.AssistantEntity,
2804
+ chunkVNUBBRJM_cjs.AssistantEntity,
2765
2805
  {
2766
2806
  name: modelDisplayName,
2767
2807
  modelName,
@@ -2830,7 +2870,7 @@ var MessageComponent = ({
2830
2870
  const speakerName = speaker ? ui.getUserDisplayName(speaker) : null;
2831
2871
  const isMe = transcriptSegment.speaker_ext_id === currentUser?.external_id;
2832
2872
  return /* @__PURE__ */ jsxRuntime.jsx(
2833
- chunk3GQQUR27_cjs.TranscriptEntry,
2873
+ chunkTNBNDY2J_cjs.TranscriptEntry,
2834
2874
  {
2835
2875
  speakerId: transcriptSegment.speaker_ext_id,
2836
2876
  speakerName: isMe ? "Me" : speakerName || "Former member",
@@ -2841,7 +2881,7 @@ var MessageComponent = ({
2841
2881
  );
2842
2882
  }
2843
2883
  return /* @__PURE__ */ jsxRuntime.jsx(chunkMZZ3SBQL_cjs.ErrorBoundary, { testId: "message-error-boundary", children: /* @__PURE__ */ jsxRuntime.jsxs(
2844
- chunkVHD5DZW4_cjs.MessageRoot,
2884
+ chunkKBRDUFXG_cjs.MessageRoot,
2845
2885
  {
2846
2886
  role: messageRole,
2847
2887
  messageId,
@@ -2849,15 +2889,15 @@ var MessageComponent = ({
2849
2889
  ...rest,
2850
2890
  children: [
2851
2891
  /* @__PURE__ */ jsxRuntime.jsxs(
2852
- chunkVHD5DZW4_cjs.MessageContent,
2892
+ chunkKBRDUFXG_cjs.MessageContent,
2853
2893
  {
2854
2894
  role: messageRole,
2855
2895
  messageId,
2856
2896
  align: isOtherPerson ? "start" : "end",
2857
2897
  children: [
2858
- startsAuthorRun && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageAuthor, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkFVSJXCKF_cjs.DocumentUser, { user: messageAuthorUser, variant: "pill" }) }),
2898
+ startsAuthorRun && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(chunkKBRDUFXG_cjs.MessageAuthor, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkXKOIHIVQ_cjs.DocumentUser, { user: messageAuthorUser, variant: "pill" }) }),
2859
2899
  /* @__PURE__ */ jsxRuntime.jsxs(
2860
- chunkVHD5DZW4_cjs.MessageBubble,
2900
+ chunkKBRDUFXG_cjs.MessageBubble,
2861
2901
  {
2862
2902
  ref: messageRef,
2863
2903
  role: messageRole,
@@ -2867,14 +2907,14 @@ var MessageComponent = ({
2867
2907
  className: isOtherPerson ? "border border-border bg-card" : void 0,
2868
2908
  children: [
2869
2909
  !isUser && isGenerating && /* @__PURE__ */ jsxRuntime.jsx(
2870
- chunkVHD5DZW4_cjs.MessageByline,
2910
+ chunkKBRDUFXG_cjs.MessageByline,
2871
2911
  {
2872
2912
  messageId,
2873
2913
  identity: (
2874
2914
  // Stays the ARBI identity while streaming: the model name arrives
2875
2915
  // with the first step that reports one and would swap the author
2876
2916
  // mid-answer. The model is shown in the footer once settled.
2877
- /* @__PURE__ */ jsxRuntime.jsx(chunkJARBYN6Z_cjs.AssistantEntity, { size: 16 })
2917
+ /* @__PURE__ */ jsxRuntime.jsx(chunkVNUBBRJM_cjs.AssistantEntity, { size: 16 })
2878
2918
  ),
2879
2919
  timeLabel,
2880
2920
  isSettled: settledForHeader,
@@ -2882,9 +2922,9 @@ var MessageComponent = ({
2882
2922
  statusLabel
2883
2923
  }
2884
2924
  ),
2885
- subagentTaskRecord && /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageSubagentBadge, { messageId }),
2886
- /* @__PURE__ */ jsxRuntime.jsxs(chunkVHD5DZW4_cjs.MessageBody, { messageId, children: [
2887
- settledNarration ? /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageNarration, { messageId, children: /* @__PURE__ */ jsxRuntime.jsx(chunkMSFWSDRS_cjs.ConnectedMarkdown, { isStreaming: false, children: settledNarration }) }) : null,
2925
+ subagentTaskRecord && /* @__PURE__ */ jsxRuntime.jsx(chunkKBRDUFXG_cjs.MessageSubagentBadge, { messageId }),
2926
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkKBRDUFXG_cjs.MessageBody, { messageId, children: [
2927
+ settledNarration ? /* @__PURE__ */ jsxRuntime.jsx(chunkKBRDUFXG_cjs.MessageNarration, { messageId, children: /* @__PURE__ */ jsxRuntime.jsx(chunkPNZVCHFS_cjs.ConnectedMarkdown, { isStreaming: false, children: settledNarration }) }) : null,
2888
2928
  liveContent ? role === "assistant" ? /* @__PURE__ */ jsxRuntime.jsx(
2889
2929
  ConnectedCitationRenderer,
2890
2930
  {
@@ -2894,7 +2934,7 @@ var MessageComponent = ({
2894
2934
  messageId: message.external_id || "unknown",
2895
2935
  isStreaming: isGenerating
2896
2936
  }
2897
- ) : /* @__PURE__ */ jsxRuntime.jsx(chunkMSFWSDRS_cjs.ConnectedMarkdown, { isStreaming: isGenerating, children: linkMentions(
2937
+ ) : /* @__PURE__ */ jsxRuntime.jsx(chunkPNZVCHFS_cjs.ConnectedMarkdown, { isStreaming: isGenerating, children: linkMentions(
2898
2938
  isUser && liveContent.startsWith("/pa ") ? liveContent.slice(4) : liveContent,
2899
2939
  message.mentions
2900
2940
  ) }) : null,
@@ -2998,7 +3038,14 @@ var MessageComponent = ({
2998
3038
  ]
2999
3039
  }
3000
3040
  ),
3001
- !isUser && linkedArtifact && /* @__PURE__ */ jsxRuntime.jsx(react.MessageArtifactCard, { artifact: linkedArtifact, onOpen: handleOpenArtifact }),
3041
+ !isUser && linkedArtifacts.map((artifact) => /* @__PURE__ */ jsxRuntime.jsx(
3042
+ react.MessageArtifactCard,
3043
+ {
3044
+ artifact,
3045
+ onOpen: handleOpenArtifact
3046
+ },
3047
+ artifact.docExtId
3048
+ )),
3002
3049
  !isUser && subagentLinks
3003
3050
  ]
3004
3051
  }
@@ -3060,7 +3107,7 @@ var ConnectedBranchControls = ({
3060
3107
  onPreview
3061
3108
  }) => {
3062
3109
  return /* @__PURE__ */ jsxRuntime.jsx(chunkMZZ3SBQL_cjs.ErrorBoundary, { testId: "branch-controls-error-boundary", children: /* @__PURE__ */ jsxRuntime.jsx(
3063
- chunkJHDCDEXY_cjs.BranchControls,
3110
+ chunkW5JTACMK_cjs.BranchControls,
3064
3111
  {
3065
3112
  index: branchPoint.currentBranchIndex,
3066
3113
  count: branchPoint.branches.length,
@@ -3121,7 +3168,7 @@ function ThreadsPreviewDialog({
3121
3168
  }
3122
3169
  ),
3123
3170
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0", style: { height: "70vh" }, children: /* @__PURE__ */ jsxRuntime.jsx(
3124
- chunkJHDCDEXY_cjs.ThreadVisualizer,
3171
+ chunkW5JTACMK_cjs.ThreadVisualizer,
3125
3172
  {
3126
3173
  threads: threads || [],
3127
3174
  switchToThread: (threadId) => {
@@ -3204,7 +3251,7 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3204
3251
  const session = react.useArbiSessionStore();
3205
3252
  const [previewOpen, setPreviewOpen] = React6.useState(false);
3206
3253
  const participantTints = React6.useMemo(
3207
- () => chunkJHDCDEXY_cjs.getParticipantTints(
3254
+ () => chunkW5JTACMK_cjs.getParticipantTints(
3208
3255
  messages.map(
3209
3256
  (message) => message.role === "assistant" ? "" : message.created_by_ext_id ?? ""
3210
3257
  )
@@ -3226,7 +3273,7 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3226
3273
  const isGenerating = react.useArbiSessionState((state) => state.generating[currentConversationId || ""]?.isGenerating) ?? false;
3227
3274
  const isLiveTurn = isGenerating && messages[messages.length - 1]?.isLoading === true;
3228
3275
  const lastMessage = displayMessages[displayMessages.length - 1];
3229
- const statusMessage = chunkVHD5DZW4_cjs.useStreamAnnouncement({
3276
+ const statusMessage = chunkKBRDUFXG_cjs.useStreamAnnouncement({
3230
3277
  isStreaming: isGenerating,
3231
3278
  text: lastMessage?.role === "assistant" ? chunkXNW62J54_cjs.stripThinking(lastMessage.content ?? "") : "",
3232
3279
  resetKey: currentConversationId
@@ -3239,7 +3286,7 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3239
3286
  React6.useEffect(() => {
3240
3287
  scrollContainerRef.current = scrollElementRef?.current ?? resolveScrollContainer(null);
3241
3288
  }, [scrollElementRef]);
3242
- const { items: activityItems } = chunkYGCS53TK_cjs.useConnectedThreadActivity(currentConversationId);
3289
+ const { items: activityItems } = chunkW6PTT27N_cjs.useConnectedThreadActivity(currentConversationId);
3243
3290
  const transcript = [
3244
3291
  ...displayMessages.map((message, index) => ({
3245
3292
  type: "message",
@@ -3313,32 +3360,32 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3313
3360
  const target = document.querySelector(`[data-message-id="${deepLinkMessageId}"]`);
3314
3361
  if (!target) return;
3315
3362
  target.scrollIntoView({ behavior: "smooth", block: "center" });
3316
- chunkJHDCDEXY_cjs.flashMessage(target);
3363
+ chunkW5JTACMK_cjs.flashMessage(target);
3317
3364
  session.setDeepLinkMessageId(null);
3318
3365
  }, [deepLinkMessageId, virtualItems, session]);
3319
- const status = /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageList.Status, { message: statusMessage });
3366
+ const status = /* @__PURE__ */ jsxRuntime.jsx(chunkKBRDUFXG_cjs.MessageList.Status, { message: statusMessage });
3320
3367
  if (transcript.length === 0) {
3321
3368
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3322
3369
  status,
3323
- /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageList.Empty, {})
3370
+ /* @__PURE__ */ jsxRuntime.jsx(chunkKBRDUFXG_cjs.MessageList.Empty, {})
3324
3371
  ] });
3325
3372
  }
3326
3373
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3327
3374
  status,
3328
- /* @__PURE__ */ jsxRuntime.jsxs(chunkVHD5DZW4_cjs.MessageList.Root, { isBusy: isGenerating, children: [
3329
- mainSiblingLeaf && /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageList.Banner, { onBack: () => setParentMessageId(mainSiblingLeaf) }),
3330
- /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageList.Rows, { totalSize: rowVirtualizer.getTotalSize(), children: virtualItems.map((virtualItem) => {
3375
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkKBRDUFXG_cjs.MessageList.Root, { isBusy: isGenerating, children: [
3376
+ mainSiblingLeaf && /* @__PURE__ */ jsxRuntime.jsx(chunkKBRDUFXG_cjs.MessageList.Banner, { onBack: () => setParentMessageId(mainSiblingLeaf) }),
3377
+ /* @__PURE__ */ jsxRuntime.jsx(chunkKBRDUFXG_cjs.MessageList.Rows, { totalSize: rowVirtualizer.getTotalSize(), children: virtualItems.map((virtualItem) => {
3331
3378
  const entry = transcript[virtualItem.index];
3332
3379
  if (entry.type === "activity") {
3333
3380
  return /* @__PURE__ */ jsxRuntime.jsx(
3334
- chunkVHD5DZW4_cjs.MessageList.Row,
3381
+ chunkKBRDUFXG_cjs.MessageList.Row,
3335
3382
  {
3336
3383
  ref: rowVirtualizer.measureElement,
3337
3384
  index: virtualItem.index,
3338
3385
  start: virtualItem.start,
3339
3386
  messageId: entry.id,
3340
3387
  setSize: transcript.length,
3341
- children: entry.item.card ?? /* @__PURE__ */ jsxRuntime.jsx(chunkJARBYN6Z_cjs.ThreadActivity, { item: entry.item, children: entry.item.onOpenDocument && /* @__PURE__ */ jsxRuntime.jsx(
3388
+ children: entry.item.card ?? /* @__PURE__ */ jsxRuntime.jsx(chunkVNUBBRJM_cjs.ThreadActivity, { item: entry.item, children: entry.item.onOpenDocument && /* @__PURE__ */ jsxRuntime.jsx(
3342
3389
  "button",
3343
3390
  {
3344
3391
  className: "mt-1 hover:underline text-primary",
@@ -3354,7 +3401,7 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3354
3401
  const messageId = message.external_id;
3355
3402
  const branchPoint = messageId ? getBranchControlForMessage(messageId) : null;
3356
3403
  return /* @__PURE__ */ jsxRuntime.jsx(
3357
- chunkVHD5DZW4_cjs.MessageList.Row,
3404
+ chunkKBRDUFXG_cjs.MessageList.Row,
3358
3405
  {
3359
3406
  ref: rowVirtualizer.measureElement,
3360
3407
  index: virtualItem.index,
@@ -3385,7 +3432,7 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3385
3432
  message.external_id ?? `msg-${virtualItem.index}`
3386
3433
  );
3387
3434
  }) }),
3388
- isLiveTurn ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageList.Tail, {})
3435
+ isLiveTurn ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(chunkKBRDUFXG_cjs.MessageList.Tail, {})
3389
3436
  ] }),
3390
3437
  /* @__PURE__ */ jsxRuntime.jsx(ConnectedThreadsPreview, { open: previewOpen, onOpenChange: setPreviewOpen })
3391
3438
  ] });
@@ -3415,7 +3462,7 @@ function ConnectedCompactConversation({ attachments } = {}) {
3415
3462
  parentMessageId
3416
3463
  });
3417
3464
  const session = react.useArbiSessionStore();
3418
- const slashWorkflows = chunkKJ65QZJI_cjs.useSlashSkillWorkflows({ landing: "current-chat" });
3465
+ const slashWorkflows = chunkM3HYFFCK_cjs.useSlashSkillWorkflows({ landing: "current-chat" });
3419
3466
  react.useAutoSendDraft(sendDraft);
3420
3467
  const skills = React6.useMemo(() => ({ openFor: slashWorkflows.openFor }), [slashWorkflows.openFor]);
3421
3468
  const handleSendMessage = () => {
@@ -3444,7 +3491,7 @@ function ConnectedCompactConversation({ attachments } = {}) {
3444
3491
  observer.observe(viewport);
3445
3492
  return () => observer.disconnect();
3446
3493
  }, [messageHistory.length > 0, currentConversationId]);
3447
- return /* @__PURE__ */ jsxRuntime.jsx(chunkMCXS6X37_cjs.CompactChatContext.Provider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 min-h-0", "data-arbi-compact": true, "data-testid": "embedded-chat", children: [
3494
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkKBRDUFXG_cjs.CompactChatContext.Provider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 min-h-0", "data-arbi-compact": true, "data-testid": "embedded-chat", children: [
3448
3495
  slashWorkflows.launcher,
3449
3496
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex flex-col flex-1 min-h-0 overflow-hidden bg-muted/25", children: /* @__PURE__ */ jsxRuntime.jsx(
3450
3497
  "div",
@@ -3498,7 +3545,7 @@ function ConnectedCompactConversation({ attachments } = {}) {
3498
3545
  ) })
3499
3546
  }
3500
3547
  ) }),
3501
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 w-full border-t border-border bg-background px-3 py-2 z-10", children: /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.ComposerContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(
3548
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 w-full border-t border-border bg-background px-3 py-2 z-10", children: /* @__PURE__ */ jsxRuntime.jsx(chunkKBRDUFXG_cjs.ComposerContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(
3502
3549
  ConversationComposer2,
3503
3550
  {
3504
3551
  handleSendMessage,
@@ -3574,7 +3621,7 @@ function ConnectedConversationDocumentPicker({
3574
3621
  onSelectionChange
3575
3622
  }) {
3576
3623
  const session = react.useArbiSessionStore();
3577
- const { openDocument } = chunk46LX6EQT_cjs.useBlocksEnvironment();
3624
+ const { openDocument } = chunkHN56WWBR_cjs.useBlocksEnvironment();
3578
3625
  const upload = react.useUploadDocuments();
3579
3626
  const role = react.useWorkspaceRole();
3580
3627
  const canUpload = role !== null && role !== "guest";
@@ -3966,9 +4013,9 @@ function useLoginActions({
3966
4013
  onError
3967
4014
  }) {
3968
4015
  const arbi = react.useArbi();
3969
- const signInLayer = chunkGB5MN5FC_cjs.useOptionalConnection();
4016
+ const signInLayer = chunkVWSOHZK2_cjs.useOptionalConnection();
3970
4017
  const sso = useSsoSignIn();
3971
- const environment = chunk46LX6EQT_cjs.useBlocksEnvironment();
4018
+ const environment = chunkHN56WWBR_cjs.useBlocksEnvironment();
3972
4019
  const environmentNotify = environment.notify;
3973
4020
  const notify3 = React6.useCallback(
3974
4021
  (...args) => args[1] === "error" && onError && typeof args[0] === "string" ? onError(args[0]) : environmentNotify(...args),
@@ -4142,7 +4189,7 @@ function useLoginActions({
4142
4189
  };
4143
4190
  }
4144
4191
  function useLoginForm() {
4145
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
4192
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
4146
4193
  const { onReturnPath } = useAuthPages();
4147
4194
  const [email, setEmail] = React6.useState("");
4148
4195
  const [password, setPassword] = React6.useState("");
@@ -4351,7 +4398,7 @@ function useRegisterSubmitState(isRegistering, isPending, password, confirmPassw
4351
4398
  }
4352
4399
  function useSsoVerificationRedirect() {
4353
4400
  const sso = useSsoSignIn();
4354
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
4401
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
4355
4402
  const { onVerificationFailed } = useAuthPages();
4356
4403
  React6.useEffect(() => {
4357
4404
  const urlParams = new URLSearchParams(window.location.search);
@@ -4381,14 +4428,14 @@ var sodiumWarmed = false;
4381
4428
  function warmSodium() {
4382
4429
  if (sodiumWarmed) return;
4383
4430
  sodiumWarmed = true;
4384
- const run = () => void chunkLLVE5TST_cjs.prefetchChunk(client.initSodium);
4431
+ const run = () => void chunk6N7QT2DH_cjs.prefetchChunk(client.initSodium);
4385
4432
  if (typeof window.requestIdleCallback === "function") window.requestIdleCallback(run);
4386
4433
  else window.setTimeout(run, 200);
4387
4434
  }
4388
4435
  function ConnectedLoginPage() {
4389
4436
  const sso = useSsoSignIn();
4390
4437
  const auth = useAuthPages();
4391
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
4438
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
4392
4439
  const isSsoOnly = !!auth.ssoOnly;
4393
4440
  const allowRegistration = auth.allowRegistration ?? true;
4394
4441
  const isOnline = core.useIsOnline();
@@ -4938,7 +4985,7 @@ function ConnectedCompactLogin({
4938
4985
  }) {
4939
4986
  const arbi = react.useArbi();
4940
4987
  const auth = useAuthPages();
4941
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
4988
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
4942
4989
  const isSsoOnly = !!auth.ssoOnly;
4943
4990
  const [error, setError] = React6.useState(null);
4944
4991
  const formState = useLoginForm();
@@ -5191,7 +5238,7 @@ function EmbeddedTopbar({
5191
5238
  };
5192
5239
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5193
5240
  /* @__PURE__ */ jsxRuntime.jsx(
5194
- chunkLLVE5TST_cjs.MobileAppBar,
5241
+ chunk6N7QT2DH_cjs.MobileAppBar,
5195
5242
  {
5196
5243
  showMenu: true,
5197
5244
  onMenu: () => setMenu(true),
@@ -5208,7 +5255,7 @@ function EmbeddedTopbar({
5208
5255
  }
5209
5256
  ),
5210
5257
  menu && /* @__PURE__ */ jsxRuntime.jsxs(
5211
- chunkDYIZ7W4P_cjs.Sidebar.Root,
5258
+ chunk6ZJBUMNK_cjs.Sidebar.Root,
5212
5259
  {
5213
5260
  mode: "drawer",
5214
5261
  expanded: true,
@@ -5217,14 +5264,14 @@ function EmbeddedTopbar({
5217
5264
  "aria-label": "Embedded navigation",
5218
5265
  children: [
5219
5266
  /* @__PURE__ */ jsxRuntime.jsx(
5220
- chunkDYIZ7W4P_cjs.Sidebar.DrawerHeader,
5267
+ chunk6ZJBUMNK_cjs.Sidebar.DrawerHeader,
5221
5268
  {
5222
5269
  logo: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: title }),
5223
5270
  onClose: () => setMenu(false)
5224
5271
  }
5225
5272
  ),
5226
5273
  /* @__PURE__ */ jsxRuntime.jsx(
5227
- chunkDYIZ7W4P_cjs.Sidebar.Nav,
5274
+ chunk6ZJBUMNK_cjs.Sidebar.Nav,
5228
5275
  {
5229
5276
  items: [
5230
5277
  {
@@ -5443,8 +5490,8 @@ function EmbeddedWorkspaceHeader({ title }) {
5443
5490
  const signedIn = react.useArbiSession();
5444
5491
  const workspaceId = react.useArbiSessionState((s) => s.workspaceId);
5445
5492
  const { data: workspaces = [], isLoading, error: listError } = react.useWorkspaces();
5446
- const select = chunkYGCS53TK_cjs.useSelectWorkspace();
5447
- const connection = chunkGB5MN5FC_cjs.useOptionalConnection();
5493
+ const select = chunkW6PTT27N_cjs.useSelectWorkspace();
5494
+ const connection = chunkVWSOHZK2_cjs.useOptionalConnection();
5448
5495
  const [pending, setPending] = React6.useState(false);
5449
5496
  const [error, setError] = React6.useState(null);
5450
5497
  async function choose(id) {
@@ -5624,6 +5671,7 @@ exports.createRemoteControl = createRemoteControl;
5624
5671
  exports.defaultHost = defaultHost;
5625
5672
  exports.renderConnectedUser = renderConnectedUser;
5626
5673
  exports.renderSessionStatusIcon = renderSessionStatusIcon;
5674
+ exports.requestScreenCapture = requestScreenCapture;
5627
5675
  exports.resolveSsoName = resolveSsoName;
5628
5676
  exports.ssoAccountStatus = ssoAccountStatus;
5629
5677
  exports.useAuthPages = useAuthPages;
@@ -5636,5 +5684,5 @@ exports.useRemoteControlHandlers = useRemoteControlHandlers;
5636
5684
  exports.useRemoteControlSessionReset = useRemoteControlSessionReset;
5637
5685
  exports.useSsoSignIn = useSsoSignIn;
5638
5686
  exports.useWorkspaceDocTitles = useWorkspaceDocTitles;
5639
- //# sourceMappingURL=chunk-CYI4OYZD.cjs.map
5640
- //# sourceMappingURL=chunk-CYI4OYZD.cjs.map
5687
+ //# sourceMappingURL=chunk-GXIXNSBV.cjs.map
5688
+ //# sourceMappingURL=chunk-GXIXNSBV.cjs.map