@arbidocs/blocks 0.5.164 → 0.5.166

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 (336) hide show
  1. package/dist/{ConnectedCallDock-SD4DKTMX.cjs → ConnectedCallDock-RUBZWNBS.cjs} +31 -31
  2. package/dist/{ConnectedCallDock-SD4DKTMX.cjs.map → ConnectedCallDock-RUBZWNBS.cjs.map} +1 -1
  3. package/dist/{ConnectedCallRoom-2FLGH3JB.cjs → ConnectedCallRoom-UE73GPNR.cjs} +23 -23
  4. package/dist/{ConnectedCallRoom-2FLGH3JB.cjs.map → ConnectedCallRoom-UE73GPNR.cjs.map} +1 -1
  5. package/dist/{ConnectedMailInviteCard-VMFTQ5PW.cjs → ConnectedMailInviteCard-HPOHLB72.cjs} +5 -5
  6. package/dist/{ConnectedMailInviteCard-VMFTQ5PW.cjs.map → ConnectedMailInviteCard-HPOHLB72.cjs.map} +1 -1
  7. package/dist/{ConnectedNativeDocxComparison-PV3SDVMZ.cjs → ConnectedNativeDocxComparison-P5TX46HD.cjs} +21 -21
  8. package/dist/{ConnectedNativeDocxComparison-PV3SDVMZ.cjs.map → ConnectedNativeDocxComparison-P5TX46HD.cjs.map} +1 -1
  9. package/dist/{ConnectedPresentation-Y37YBY4S.cjs → ConnectedPresentation-CQJB3BOB.cjs} +26 -26
  10. package/dist/{ConnectedPresentation-Y37YBY4S.cjs.map → ConnectedPresentation-CQJB3BOB.cjs.map} +1 -1
  11. package/dist/{ConnectedProductionSetDialog-LB5B7OXR.cjs → ConnectedProductionSetDialog-O5RX57PS.cjs} +11 -10
  12. package/dist/ConnectedProductionSetDialog-O5RX57PS.cjs.map +1 -0
  13. package/dist/{ConnectedSlidesTab-BYS7HFNK.cjs → ConnectedSlidesTab-LEA5OW75.cjs} +19 -19
  14. package/dist/{ConnectedSlidesTab-BYS7HFNK.cjs.map → ConnectedSlidesTab-LEA5OW75.cjs.map} +1 -1
  15. package/dist/{ConnectedStreamedWordArtifact-T6GE5GME.cjs → ConnectedStreamedWordArtifact-XO4ULCQO.cjs} +21 -21
  16. package/dist/{ConnectedStreamedWordArtifact-T6GE5GME.cjs.map → ConnectedStreamedWordArtifact-XO4ULCQO.cjs.map} +1 -1
  17. package/dist/{DocumentReviewCard-UXGPQNTN.cjs → DocumentReviewCard-OHWZ6YI3.cjs} +21 -21
  18. package/dist/{DocumentReviewCard-UXGPQNTN.cjs.map → DocumentReviewCard-OHWZ6YI3.cjs.map} +1 -1
  19. package/dist/{FilesViewerDialog-WESCK7AH.cjs → FilesViewerDialog-M6MRG2X7.cjs} +58 -56
  20. package/dist/FilesViewerDialog-M6MRG2X7.cjs.map +1 -0
  21. package/dist/{WorkspaceTableView-NMERZJZZ.cjs → WorkspaceTableView-ZAN4C4IZ.cjs} +8 -8
  22. package/dist/{WorkspaceTableView-NMERZJZZ.cjs.map → WorkspaceTableView-ZAN4C4IZ.cjs.map} +1 -1
  23. package/dist/agents/index.cjs +286 -286
  24. package/dist/{ai-QFY4LYQZ.cjs → ai-AV4LQ5AW.cjs} +29 -30
  25. package/dist/ai-AV4LQ5AW.cjs.map +1 -0
  26. package/dist/auth/index.cjs +12 -11
  27. package/dist/calls/index.cjs +148 -148
  28. package/dist/chat/generatedDocuments.d.ts +2 -0
  29. package/dist/chat/generatedDocuments.js +6 -3
  30. package/dist/chat/generatedDocuments.js.map +2 -2
  31. package/dist/chat/index.cjs +102 -102
  32. package/dist/chat/rehype-doc-entity-pills.js +5 -3
  33. package/dist/chat/rehype-doc-entity-pills.js.map +2 -2
  34. package/dist/{chunk-UJHQ4DA4.cjs → chunk-3DRBJGRR.cjs} +14 -14
  35. package/dist/{chunk-UJHQ4DA4.cjs.map → chunk-3DRBJGRR.cjs.map} +1 -1
  36. package/dist/{chunk-UD3LPATQ.cjs → chunk-3EIO4ZH5.cjs} +14 -14
  37. package/dist/{chunk-UD3LPATQ.cjs.map → chunk-3EIO4ZH5.cjs.map} +1 -1
  38. package/dist/{chunk-EGOLLSH7.cjs → chunk-3QHVDOQT.cjs} +57 -54
  39. package/dist/chunk-3QHVDOQT.cjs.map +1 -0
  40. package/dist/{chunk-LOSCXAAF.cjs → chunk-3UCRJRNI.cjs} +34 -4
  41. package/dist/chunk-3UCRJRNI.cjs.map +1 -0
  42. package/dist/{chunk-GS2C25ID.cjs → chunk-4RDXW7KP.cjs} +25 -25
  43. package/dist/{chunk-GS2C25ID.cjs.map → chunk-4RDXW7KP.cjs.map} +1 -1
  44. package/dist/{chunk-G3MRW4WB.cjs → chunk-5FSULBPE.cjs} +9 -9
  45. package/dist/{chunk-G3MRW4WB.cjs.map → chunk-5FSULBPE.cjs.map} +1 -1
  46. package/dist/{chunk-VU2MESEX.cjs → chunk-5G33DATM.cjs} +50 -41
  47. package/dist/chunk-5G33DATM.cjs.map +1 -0
  48. package/dist/{chunk-6XKQAQWF.cjs → chunk-5K6XHSAM.cjs} +4 -4
  49. package/dist/{chunk-6XKQAQWF.cjs.map → chunk-5K6XHSAM.cjs.map} +1 -1
  50. package/dist/{chunk-EG3DPKXM.cjs → chunk-6AFAYGJW.cjs} +5 -5
  51. package/dist/{chunk-EG3DPKXM.cjs.map → chunk-6AFAYGJW.cjs.map} +1 -1
  52. package/dist/{chunk-2EWDPIGO.cjs → chunk-6DHDITKK.cjs} +11 -6
  53. package/dist/chunk-6DHDITKK.cjs.map +1 -0
  54. package/dist/{chunk-QDZDHP23.cjs → chunk-7D3OMWIZ.cjs} +4 -4
  55. package/dist/{chunk-QDZDHP23.cjs.map → chunk-7D3OMWIZ.cjs.map} +1 -1
  56. package/dist/{chunk-SH7W4WVI.cjs → chunk-7FWP7W34.cjs} +9 -6
  57. package/dist/chunk-7FWP7W34.cjs.map +1 -0
  58. package/dist/{chunk-6P4U63HO.cjs → chunk-7GVKG3G4.cjs} +13 -13
  59. package/dist/{chunk-6P4U63HO.cjs.map → chunk-7GVKG3G4.cjs.map} +1 -1
  60. package/dist/{chunk-KCTQM3WO.cjs → chunk-7OMRSZOJ.cjs} +28 -28
  61. package/dist/{chunk-KCTQM3WO.cjs.map → chunk-7OMRSZOJ.cjs.map} +1 -1
  62. package/dist/{chunk-2QLO3HBN.cjs → chunk-7QSZSGUQ.cjs} +6 -6
  63. package/dist/{chunk-2QLO3HBN.cjs.map → chunk-7QSZSGUQ.cjs.map} +1 -1
  64. package/dist/{chunk-CQHVNV6W.cjs → chunk-AG5XZ3AM.cjs} +7 -7
  65. package/dist/{chunk-CQHVNV6W.cjs.map → chunk-AG5XZ3AM.cjs.map} +1 -1
  66. package/dist/{chunk-WQ2KG4LS.cjs → chunk-BCU65RJM.cjs} +3 -3
  67. package/dist/{chunk-WQ2KG4LS.cjs.map → chunk-BCU65RJM.cjs.map} +1 -1
  68. package/dist/chunk-BNXWT3DX.cjs +516 -0
  69. package/dist/chunk-BNXWT3DX.cjs.map +1 -0
  70. package/dist/{chunk-2P7VH2SK.cjs → chunk-C25KF2TM.cjs} +4 -4
  71. package/dist/{chunk-2P7VH2SK.cjs.map → chunk-C25KF2TM.cjs.map} +1 -1
  72. package/dist/{chunk-U4KUTO6O.cjs → chunk-CI777IPA.cjs} +21 -21
  73. package/dist/{chunk-U4KUTO6O.cjs.map → chunk-CI777IPA.cjs.map} +1 -1
  74. package/dist/{chunk-35UL4GE7.cjs → chunk-DI6UEQCZ.cjs} +4 -4
  75. package/dist/{chunk-35UL4GE7.cjs.map → chunk-DI6UEQCZ.cjs.map} +1 -1
  76. package/dist/{chunk-V27WLYTG.cjs → chunk-ER2MRSLT.cjs} +5 -5
  77. package/dist/{chunk-V27WLYTG.cjs.map → chunk-ER2MRSLT.cjs.map} +1 -1
  78. package/dist/{chunk-YHXJWYOF.cjs → chunk-FUKN3PI5.cjs} +4 -4
  79. package/dist/{chunk-YHXJWYOF.cjs.map → chunk-FUKN3PI5.cjs.map} +1 -1
  80. package/dist/{chunk-DWN5AUMH.cjs → chunk-GD5OYIOV.cjs} +6 -6
  81. package/dist/{chunk-DWN5AUMH.cjs.map → chunk-GD5OYIOV.cjs.map} +1 -1
  82. package/dist/{chunk-NGM4HIPP.cjs → chunk-H3VVUNEX.cjs} +21 -21
  83. package/dist/{chunk-NGM4HIPP.cjs.map → chunk-H3VVUNEX.cjs.map} +1 -1
  84. package/dist/{chunk-GF6AYAMI.cjs → chunk-HH5MKRBL.cjs} +9 -9
  85. package/dist/{chunk-GF6AYAMI.cjs.map → chunk-HH5MKRBL.cjs.map} +1 -1
  86. package/dist/{chunk-46LX6EQT.cjs → chunk-HN56WWBR.cjs} +2 -2
  87. package/dist/{chunk-46LX6EQT.cjs.map → chunk-HN56WWBR.cjs.map} +1 -1
  88. package/dist/chunk-IRUQZI6P.cjs +17 -0
  89. package/dist/chunk-IRUQZI6P.cjs.map +1 -0
  90. package/dist/{chunk-SLCH5JRI.cjs → chunk-IXCWZ4HC.cjs} +5 -5
  91. package/dist/{chunk-SLCH5JRI.cjs.map → chunk-IXCWZ4HC.cjs.map} +1 -1
  92. package/dist/{chunk-5HPUGSTJ.cjs → chunk-J37DOAGN.cjs} +7 -7
  93. package/dist/{chunk-5HPUGSTJ.cjs.map → chunk-J37DOAGN.cjs.map} +1 -1
  94. package/dist/{chunk-DLGYR4JL.cjs → chunk-J5CBCUQE.cjs} +8 -8
  95. package/dist/{chunk-DLGYR4JL.cjs.map → chunk-J5CBCUQE.cjs.map} +1 -1
  96. package/dist/{chunk-AHUEBRLX.cjs → chunk-JEHGTPS2.cjs} +4 -4
  97. package/dist/{chunk-AHUEBRLX.cjs.map → chunk-JEHGTPS2.cjs.map} +1 -1
  98. package/dist/{chunk-36NQMOJE.cjs → chunk-JFCTB5YI.cjs} +6 -6
  99. package/dist/{chunk-36NQMOJE.cjs.map → chunk-JFCTB5YI.cjs.map} +1 -1
  100. package/dist/{chunk-T26UYA6Q.cjs → chunk-JTBWI74K.cjs} +7 -7
  101. package/dist/{chunk-T26UYA6Q.cjs.map → chunk-JTBWI74K.cjs.map} +1 -1
  102. package/dist/{chunk-CX4VR3ZT.cjs → chunk-LE4Z2UIG.cjs} +115 -93
  103. package/dist/chunk-LE4Z2UIG.cjs.map +1 -0
  104. package/dist/{chunk-ZC6EPBVL.cjs → chunk-LZGGR63X.cjs} +4 -4
  105. package/dist/{chunk-ZC6EPBVL.cjs.map → chunk-LZGGR63X.cjs.map} +1 -1
  106. package/dist/{chunk-ZVQMCGUK.cjs → chunk-N2SJR2Y7.cjs} +36 -36
  107. package/dist/{chunk-ZVQMCGUK.cjs.map → chunk-N2SJR2Y7.cjs.map} +1 -1
  108. package/dist/{chunk-JARBYN6Z.cjs → chunk-NAXF2KHT.cjs} +5 -3
  109. package/dist/chunk-NAXF2KHT.cjs.map +1 -0
  110. package/dist/{chunk-ZPBTXRMG.cjs → chunk-NFXHBTAO.cjs} +4 -4
  111. package/dist/{chunk-ZPBTXRMG.cjs.map → chunk-NFXHBTAO.cjs.map} +1 -1
  112. package/dist/{chunk-Z2XZ2D4N.cjs → chunk-O2NHBB3D.cjs} +8 -5
  113. package/dist/chunk-O2NHBB3D.cjs.map +1 -0
  114. package/dist/{chunk-7UPEFZCV.cjs → chunk-OHWYQI3B.cjs} +15 -15
  115. package/dist/{chunk-7UPEFZCV.cjs.map → chunk-OHWYQI3B.cjs.map} +1 -1
  116. package/dist/{chunk-TU46WKTN.cjs → chunk-OIYKKUAN.cjs} +3 -3
  117. package/dist/{chunk-TU46WKTN.cjs.map → chunk-OIYKKUAN.cjs.map} +1 -1
  118. package/dist/{chunk-CULUTYOD.cjs → chunk-OO452QD5.cjs} +4 -4
  119. package/dist/{chunk-CULUTYOD.cjs.map → chunk-OO452QD5.cjs.map} +1 -1
  120. package/dist/{chunk-4RR7ZZPD.cjs → chunk-PJ5OQ5VB.cjs} +5 -5
  121. package/dist/{chunk-4RR7ZZPD.cjs.map → chunk-PJ5OQ5VB.cjs.map} +1 -1
  122. package/dist/{chunk-VHD5DZW4.cjs → chunk-PK5H5SVS.cjs} +10 -8
  123. package/dist/chunk-PK5H5SVS.cjs.map +1 -0
  124. package/dist/{chunk-2XHJVYNY.cjs → chunk-PYKTUGPE.cjs} +4 -4
  125. package/dist/{chunk-2XHJVYNY.cjs.map → chunk-PYKTUGPE.cjs.map} +1 -1
  126. package/dist/{chunk-MTN6HOY3.cjs → chunk-QD2XCNJH.cjs} +68 -68
  127. package/dist/{chunk-MTN6HOY3.cjs.map → chunk-QD2XCNJH.cjs.map} +1 -1
  128. package/dist/{chunk-P7VUIW24.cjs → chunk-QDXZVJWN.cjs} +23 -9
  129. package/dist/chunk-QDXZVJWN.cjs.map +1 -0
  130. package/dist/{chunk-MB2Y2ZGM.cjs → chunk-SJPKXXB5.cjs} +6 -6
  131. package/dist/{chunk-MB2Y2ZGM.cjs.map → chunk-SJPKXXB5.cjs.map} +1 -1
  132. package/dist/{chunk-5GBM7BQB.cjs → chunk-SOT7NPIB.cjs} +4 -4
  133. package/dist/{chunk-5GBM7BQB.cjs.map → chunk-SOT7NPIB.cjs.map} +1 -1
  134. package/dist/{chunk-BX3WRCXV.cjs → chunk-SX6KL6UN.cjs} +4 -4
  135. package/dist/{chunk-BX3WRCXV.cjs.map → chunk-SX6KL6UN.cjs.map} +1 -1
  136. package/dist/{chunk-AIKPZJNI.cjs → chunk-SXBQAMHV.cjs} +240 -8
  137. package/dist/chunk-SXBQAMHV.cjs.map +1 -0
  138. package/dist/{chunk-XTWHFHEK.cjs → chunk-TKO24ZZ6.cjs} +4 -4
  139. package/dist/{chunk-XTWHFHEK.cjs.map → chunk-TKO24ZZ6.cjs.map} +1 -1
  140. package/dist/{chunk-U4YOVI5D.cjs → chunk-TLIZD6DV.cjs} +6 -6
  141. package/dist/{chunk-U4YOVI5D.cjs.map → chunk-TLIZD6DV.cjs.map} +1 -1
  142. package/dist/{chunk-3GQQUR27.cjs → chunk-TNBNDY2J.cjs} +4 -4
  143. package/dist/{chunk-3GQQUR27.cjs.map → chunk-TNBNDY2J.cjs.map} +1 -1
  144. package/dist/{chunk-SGYURQ23.cjs → chunk-UNSZLNA4.cjs} +12 -12
  145. package/dist/{chunk-SGYURQ23.cjs.map → chunk-UNSZLNA4.cjs.map} +1 -1
  146. package/dist/{chunk-XMSK3LQX.cjs → chunk-UXGIMOIN.cjs} +4 -4
  147. package/dist/{chunk-XMSK3LQX.cjs.map → chunk-UXGIMOIN.cjs.map} +1 -1
  148. package/dist/{chunk-LLVE5TST.cjs → chunk-VDHBLDQC.cjs} +4 -4
  149. package/dist/{chunk-LLVE5TST.cjs.map → chunk-VDHBLDQC.cjs.map} +1 -1
  150. package/dist/{chunk-DYIZ7W4P.cjs → chunk-VDT7TEAH.cjs} +6 -6
  151. package/dist/{chunk-DYIZ7W4P.cjs.map → chunk-VDT7TEAH.cjs.map} +1 -1
  152. package/dist/{chunk-EKFA2OS3.cjs → chunk-VJNJ4G6Y.cjs} +4 -4
  153. package/dist/{chunk-EKFA2OS3.cjs.map → chunk-VJNJ4G6Y.cjs.map} +1 -1
  154. package/dist/{chunk-63FEMB6U.cjs → chunk-VNYMWFIT.cjs} +56 -27
  155. package/dist/chunk-VNYMWFIT.cjs.map +1 -0
  156. package/dist/{chunk-GB5MN5FC.cjs → chunk-VWSOHZK2.cjs} +4 -4
  157. package/dist/{chunk-GB5MN5FC.cjs.map → chunk-VWSOHZK2.cjs.map} +1 -1
  158. package/dist/{chunk-JHDCDEXY.cjs → chunk-W5JTACMK.cjs} +8 -5
  159. package/dist/chunk-W5JTACMK.cjs.map +1 -0
  160. package/dist/{chunk-WOVNXJK5.cjs → chunk-W7XZKTDG.cjs} +28 -28
  161. package/dist/{chunk-WOVNXJK5.cjs.map → chunk-W7XZKTDG.cjs.map} +1 -1
  162. package/dist/{chunk-ZC7X4ZIX.cjs → chunk-WGRXQ7PI.cjs} +24 -24
  163. package/dist/{chunk-ZC7X4ZIX.cjs.map → chunk-WGRXQ7PI.cjs.map} +1 -1
  164. package/dist/{chunk-W5QSKW7T.cjs → chunk-WHHBEV4G.cjs} +4 -4
  165. package/dist/{chunk-W5QSKW7T.cjs.map → chunk-WHHBEV4G.cjs.map} +1 -1
  166. package/dist/{chunk-PIWXX2M4.cjs → chunk-WV3RNWAG.cjs} +11 -11
  167. package/dist/{chunk-PIWXX2M4.cjs.map → chunk-WV3RNWAG.cjs.map} +1 -1
  168. package/dist/{chunk-TD5V5BZ3.cjs → chunk-XKXKEVHH.cjs} +8 -8
  169. package/dist/{chunk-TD5V5BZ3.cjs.map → chunk-XKXKEVHH.cjs.map} +1 -1
  170. package/dist/{chunk-K4U4TM23.cjs → chunk-YTDVWIHU.cjs} +1067 -1058
  171. package/dist/chunk-YTDVWIHU.cjs.map +1 -0
  172. package/dist/{chunk-73KNWWBW.cjs → chunk-ZLXTGHK3.cjs} +78 -78
  173. package/dist/{chunk-73KNWWBW.cjs.map → chunk-ZLXTGHK3.cjs.map} +1 -1
  174. package/dist/{chunk-YA6GXWC2.cjs → chunk-ZQQVXRYZ.cjs} +4 -4
  175. package/dist/{chunk-YA6GXWC2.cjs.map → chunk-ZQQVXRYZ.cjs.map} +1 -1
  176. package/dist/citations/index.cjs +8 -8
  177. package/dist/collaboration/direct-messages/DmParts.d.ts +2 -1
  178. package/dist/collaboration/direct-messages/DmParts.js +21 -7
  179. package/dist/collaboration/direct-messages/DmParts.js.map +2 -2
  180. package/dist/collaboration/index.cjs +69 -69
  181. package/dist/components/EntityChip.d.ts +2 -1
  182. package/dist/components/EntityChip.js +2 -0
  183. package/dist/components/EntityChip.js.map +2 -2
  184. package/dist/connect/docx.cjs +24 -24
  185. package/dist/connect/index.cjs +2244 -1728
  186. package/dist/connect/index.cjs.map +1 -1
  187. package/dist/connect/viewer.cjs +43 -41
  188. package/dist/connection/ConnectedAgentChatPanel.d.ts +3 -1
  189. package/dist/connection/ConnectedAgentChatPanel.js +5 -0
  190. package/dist/connection/ConnectedAgentChatPanel.js.map +2 -2
  191. package/dist/connection/agents/ConnectedAgentsPage.js +6 -1
  192. package/dist/connection/agents/ConnectedAgentsPage.js.map +2 -2
  193. package/dist/connection/contacts/ConnectedContactsPanel.js +4 -2
  194. package/dist/connection/contacts/ConnectedContactsPanel.js.map +2 -2
  195. package/dist/connection/conversation/ConnectedMarkdown.js +58 -24
  196. package/dist/connection/conversation/ConnectedMarkdown.js.map +2 -2
  197. package/dist/connection/conversation/ConnectedMessage.js +19 -14
  198. package/dist/connection/conversation/ConnectedMessage.js.map +2 -2
  199. package/dist/connection/conversation/DocumentWorkspaceContext.d.ts +7 -2
  200. package/dist/connection/conversation/DocumentWorkspaceContext.js +31 -11
  201. package/dist/connection/conversation/DocumentWorkspaceContext.js.map +2 -2
  202. package/dist/connection/conversation/EntityReference.d.ts +8 -0
  203. package/dist/connection/conversation/EntityReference.js +124 -0
  204. package/dist/connection/conversation/EntityReference.js.map +7 -0
  205. package/dist/connection/conversation/entity-references.d.ts +1 -0
  206. package/dist/connection/conversation/entity-references.js +7 -0
  207. package/dist/connection/conversation/entity-references.js.map +7 -0
  208. package/dist/connection/conversation/open-entity-reference.d.ts +5 -0
  209. package/dist/connection/conversation/open-entity-reference.js +57 -0
  210. package/dist/connection/conversation/open-entity-reference.js.map +7 -0
  211. package/dist/connection/databases/ConnectedDatabasesPage.js +15 -2
  212. package/dist/connection/databases/ConnectedDatabasesPage.js.map +2 -2
  213. package/dist/connection/databases/DatabaseViewsMenu.d.ts +2 -1
  214. package/dist/connection/databases/DatabaseViewsMenu.js +9 -0
  215. package/dist/connection/databases/DatabaseViewsMenu.js.map +2 -2
  216. package/dist/connection/entities/ConnectedDocumentPill.js +5 -1
  217. package/dist/connection/entities/ConnectedDocumentPill.js.map +2 -2
  218. package/dist/connection/entities/ConnectedUserEntity.js +3 -0
  219. package/dist/connection/entities/ConnectedUserEntity.js.map +2 -2
  220. package/dist/connection/entities/ConnectedWorkspaceEntity.js +4 -0
  221. package/dist/connection/entities/ConnectedWorkspaceEntity.js.map +2 -2
  222. package/dist/connection/files/grid/cells.js +11 -2
  223. package/dist/connection/files/grid/cells.js.map +2 -2
  224. package/dist/connection/files/views/ViewSelector.js +13 -1
  225. package/dist/connection/files/views/ViewSelector.js.map +2 -2
  226. package/dist/connection/messenger/ConnectedChatThread.d.ts +0 -9
  227. package/dist/connection/messenger/ConnectedChatThread.js +72 -41
  228. package/dist/connection/messenger/ConnectedChatThread.js.map +2 -2
  229. package/dist/connection/messenger/ConnectedMessenger.js +6 -4
  230. package/dist/connection/messenger/ConnectedMessenger.js.map +2 -2
  231. package/dist/connection/messenger/DmAgentProgress.d.ts +7 -0
  232. package/dist/connection/messenger/DmAgentProgress.js +47 -0
  233. package/dist/connection/messenger/DmAgentProgress.js.map +7 -0
  234. package/dist/connection/panels/ConnectedPanelHost.d.ts +2 -10
  235. package/dist/connection/panels/ConnectedPanelHost.js +31 -4
  236. package/dist/connection/panels/ConnectedPanelHost.js.map +2 -2
  237. package/dist/connection/panels/ConnectedPanelRegistry.d.ts +1 -1
  238. package/dist/connection/panels/ConnectedPanelRegistry.js +1 -0
  239. package/dist/connection/panels/ConnectedPanelRegistry.js.map +2 -2
  240. package/dist/connection/panels/ConversationPresentation.d.ts +15 -0
  241. package/dist/connection/panels/ConversationPresentation.js +13 -0
  242. package/dist/connection/panels/ConversationPresentation.js.map +7 -0
  243. package/dist/connection/report-problem/ConnectedReportProblem.d.ts +3 -1
  244. package/dist/connection/report-problem/ConnectedReportProblem.js +9 -2
  245. package/dist/connection/report-problem/ConnectedReportProblem.js.map +2 -2
  246. package/dist/connection/report-problem/ReportProblemDialog.d.ts +6 -1
  247. package/dist/connection/report-problem/ReportProblemDialog.js +21 -7
  248. package/dist/connection/report-problem/ReportProblemDialog.js.map +2 -2
  249. package/dist/connection/report-problem/SupportVideoEvidence.d.ts +7 -0
  250. package/dist/connection/report-problem/SupportVideoEvidence.js +161 -0
  251. package/dist/connection/report-problem/SupportVideoEvidence.js.map +7 -0
  252. package/dist/connection/report-problem/screen-capture.d.ts +2 -0
  253. package/dist/connection/report-problem/screen-capture.js +11 -6
  254. package/dist/connection/report-problem/screen-capture.js.map +2 -2
  255. package/dist/connection/report-problem/support-browser-context.d.ts +5 -0
  256. package/dist/connection/report-problem/support-browser-context.js +19 -0
  257. package/dist/connection/report-problem/support-browser-context.js.map +7 -0
  258. package/dist/connection/report-problem/useReportProblem.js +23 -2
  259. package/dist/connection/report-problem/useReportProblem.js.map +2 -2
  260. package/dist/connection/report-problem/useSupportVideo.d.ts +19 -0
  261. package/dist/connection/report-problem/useSupportVideo.js +166 -0
  262. package/dist/connection/report-problem/useSupportVideo.js.map +7 -0
  263. package/dist/connection/routes/useDeepLinkSync.js +41 -5
  264. package/dist/connection/routes/useDeepLinkSync.js.map +2 -2
  265. package/dist/connection/shell/workspace-project-line.js +1 -0
  266. package/dist/connection/shell/workspace-project-line.js.map +2 -2
  267. package/dist/connection/tags/ConnectedTagsPage.js +10 -1
  268. package/dist/connection/tags/ConnectedTagsPage.js.map +2 -2
  269. package/dist/connection/threads/ConversationEntity.js +8 -1
  270. package/dist/connection/threads/ConversationEntity.js.map +2 -2
  271. package/dist/connection/viewer/ViewerPdfPane.js +18 -2
  272. package/dist/connection/viewer/ViewerPdfPane.js.map +2 -2
  273. package/dist/connection/viewer/useViewedDocument.d.ts +1 -0
  274. package/dist/connection/viewer/useViewedDocument.js +4 -1
  275. package/dist/connection/viewer/useViewedDocument.js.map +2 -2
  276. package/dist/connection/viewer/useViewerTabs.js +6 -3
  277. package/dist/connection/viewer/useViewerTabs.js.map +2 -2
  278. package/dist/dashboards/index.cjs +19 -19
  279. package/dist/embed/index.cjs +49 -48
  280. package/dist/facts/index.cjs +44 -44
  281. package/dist/files/cells/DocumentNameCell.d.ts +2 -1
  282. package/dist/files/cells/DocumentNameCell.js +7 -1
  283. package/dist/files/cells/DocumentNameCell.js.map +2 -2
  284. package/dist/files/index.cjs +229 -229
  285. package/dist/home/index.cjs +25 -25
  286. package/dist/index.cjs +1704 -1700
  287. package/dist/index.d.ts +1 -1
  288. package/dist/index.js +2 -0
  289. package/dist/index.js.map +2 -2
  290. package/dist/lib/entity-id.d.ts +5 -0
  291. package/dist/lib/entity-id.js +14 -0
  292. package/dist/lib/entity-id.js.map +7 -0
  293. package/dist/lib/routes.d.ts +2 -0
  294. package/dist/lib/routes.js +32 -2
  295. package/dist/lib/routes.js.map +2 -2
  296. package/dist/pages/index.cjs +43 -43
  297. package/dist/provider/environment.d.ts +4 -0
  298. package/dist/provider/environment.js.map +2 -2
  299. package/dist/retrieval/index.cjs +4 -4
  300. package/dist/settings/index.cjs +137 -137
  301. package/dist/shell/PanelPortal.d.ts +2 -13
  302. package/dist/shell/PanelPortal.js +58 -7
  303. package/dist/shell/PanelPortal.js.map +2 -2
  304. package/dist/shell/index.cjs +85 -85
  305. package/dist/shell/useFloatingDrag.d.ts +23 -0
  306. package/dist/shell/useFloatingDrag.js +195 -0
  307. package/dist/shell/useFloatingDrag.js.map +7 -0
  308. package/dist/studio/index.cjs +43 -44
  309. package/dist/studio/index.cjs.map +1 -1
  310. package/dist/styles.css +1 -1
  311. package/dist/workflow-canvas/index.cjs +70 -71
  312. package/dist/workflow-canvas/index.cjs.map +1 -1
  313. package/dist/workspaces/index.cjs +17 -17
  314. package/node_modules/@arbidocs/coedit/package.json +1 -1
  315. package/package.json +5 -5
  316. package/dist/ConnectedProductionSetDialog-LB5B7OXR.cjs.map +0 -1
  317. package/dist/FilesViewerDialog-WESCK7AH.cjs.map +0 -1
  318. package/dist/ai-QFY4LYQZ.cjs.map +0 -1
  319. package/dist/chunk-2EWDPIGO.cjs.map +0 -1
  320. package/dist/chunk-63FEMB6U.cjs.map +0 -1
  321. package/dist/chunk-AIKPZJNI.cjs.map +0 -1
  322. package/dist/chunk-CX4VR3ZT.cjs.map +0 -1
  323. package/dist/chunk-CYWOL2LS.cjs +0 -320
  324. package/dist/chunk-CYWOL2LS.cjs.map +0 -1
  325. package/dist/chunk-EGOLLSH7.cjs.map +0 -1
  326. package/dist/chunk-JARBYN6Z.cjs.map +0 -1
  327. package/dist/chunk-JHDCDEXY.cjs.map +0 -1
  328. package/dist/chunk-K4U4TM23.cjs.map +0 -1
  329. package/dist/chunk-LOSCXAAF.cjs.map +0 -1
  330. package/dist/chunk-MCXS6X37.cjs +0 -13
  331. package/dist/chunk-MCXS6X37.cjs.map +0 -1
  332. package/dist/chunk-P7VUIW24.cjs.map +0 -1
  333. package/dist/chunk-SH7W4WVI.cjs.map +0 -1
  334. package/dist/chunk-VHD5DZW4.cjs.map +0 -1
  335. package/dist/chunk-VU2MESEX.cjs.map +0 -1
  336. package/dist/chunk-Z2XZ2D4N.cjs.map +0 -1
@@ -1,42 +1,41 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunk6P4U63HO_cjs = require('./chunk-6P4U63HO.cjs');
5
- var chunkZC7X4ZIX_cjs = require('./chunk-ZC7X4ZIX.cjs');
6
- var chunkZPBTXRMG_cjs = require('./chunk-ZPBTXRMG.cjs');
4
+ var chunk7GVKG3G4_cjs = require('./chunk-7GVKG3G4.cjs');
5
+ var chunkWGRXQ7PI_cjs = require('./chunk-WGRXQ7PI.cjs');
6
+ var chunkNFXHBTAO_cjs = require('./chunk-NFXHBTAO.cjs');
7
7
  var chunkTJY7XPDE_cjs = require('./chunk-TJY7XPDE.cjs');
8
8
  var chunkXNW62J54_cjs = require('./chunk-XNW62J54.cjs');
9
- var chunkCYWOL2LS_cjs = require('./chunk-CYWOL2LS.cjs');
10
- var chunkAHUEBRLX_cjs = require('./chunk-AHUEBRLX.cjs');
9
+ var chunkBNXWT3DX_cjs = require('./chunk-BNXWT3DX.cjs');
10
+ var chunkJEHGTPS2_cjs = require('./chunk-JEHGTPS2.cjs');
11
11
  var chunkJWCVA4LC_cjs = require('./chunk-JWCVA4LC.cjs');
12
12
  var chunk223D4727_cjs = require('./chunk-223D4727.cjs');
13
13
  var chunkQQMMCXBP_cjs = require('./chunk-QQMMCXBP.cjs');
14
14
  var chunk4B6HYQTW_cjs = require('./chunk-4B6HYQTW.cjs');
15
+ var chunkW5JTACMK_cjs = require('./chunk-W5JTACMK.cjs');
16
+ var chunkPK5H5SVS_cjs = require('./chunk-PK5H5SVS.cjs');
17
+ var chunk5F4DCIHS_cjs = require('./chunk-5F4DCIHS.cjs');
15
18
  var chunkMZZ3SBQL_cjs = require('./chunk-MZZ3SBQL.cjs');
16
- var chunkLLVE5TST_cjs = require('./chunk-LLVE5TST.cjs');
17
- var chunkDYIZ7W4P_cjs = require('./chunk-DYIZ7W4P.cjs');
19
+ var chunkVDHBLDQC_cjs = require('./chunk-VDHBLDQC.cjs');
20
+ var chunkVDT7TEAH_cjs = require('./chunk-VDT7TEAH.cjs');
18
21
  var chunkNZNBJF3M_cjs = require('./chunk-NZNBJF3M.cjs');
19
22
  var chunkWRTEKOQP_cjs = require('./chunk-WRTEKOQP.cjs');
20
- var chunkJARBYN6Z_cjs = require('./chunk-JARBYN6Z.cjs');
23
+ var chunkO2NHBB3D_cjs = require('./chunk-O2NHBB3D.cjs');
24
+ var chunk75BNMCUX_cjs = require('./chunk-75BNMCUX.cjs');
25
+ var chunkNAXF2KHT_cjs = require('./chunk-NAXF2KHT.cjs');
21
26
  var chunkM55XUF4L_cjs = require('./chunk-M55XUF4L.cjs');
27
+ var chunk7XR6CPCU_cjs = require('./chunk-7XR6CPCU.cjs');
28
+ var chunkY3GJBLAI_cjs = require('./chunk-Y3GJBLAI.cjs');
29
+ var chunkIPSHAMO2_cjs = require('./chunk-IPSHAMO2.cjs');
22
30
  var chunkV6C2MBFY_cjs = require('./chunk-V6C2MBFY.cjs');
23
31
  var chunkM74FWYNL_cjs = require('./chunk-M74FWYNL.cjs');
24
- var chunk3GQQUR27_cjs = require('./chunk-3GQQUR27.cjs');
25
- var chunkSH7W4WVI_cjs = require('./chunk-SH7W4WVI.cjs');
26
- var chunkGB5MN5FC_cjs = require('./chunk-GB5MN5FC.cjs');
32
+ var chunkTNBNDY2J_cjs = require('./chunk-TNBNDY2J.cjs');
33
+ var chunk7FWP7W34_cjs = require('./chunk-7FWP7W34.cjs');
34
+ var chunkVWSOHZK2_cjs = require('./chunk-VWSOHZK2.cjs');
27
35
  var chunk3YZKDCWY_cjs = require('./chunk-3YZKDCWY.cjs');
28
36
  var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
29
- var chunkJHDCDEXY_cjs = require('./chunk-JHDCDEXY.cjs');
30
- var chunkVHD5DZW4_cjs = require('./chunk-VHD5DZW4.cjs');
31
- var chunk5F4DCIHS_cjs = require('./chunk-5F4DCIHS.cjs');
32
- var chunkZ2XZ2D4N_cjs = require('./chunk-Z2XZ2D4N.cjs');
33
- var chunkMCXS6X37_cjs = require('./chunk-MCXS6X37.cjs');
34
- var chunk75BNMCUX_cjs = require('./chunk-75BNMCUX.cjs');
35
- var chunk7XR6CPCU_cjs = require('./chunk-7XR6CPCU.cjs');
36
- var chunkY3GJBLAI_cjs = require('./chunk-Y3GJBLAI.cjs');
37
- var chunkIPSHAMO2_cjs = require('./chunk-IPSHAMO2.cjs');
38
- var chunk46LX6EQT_cjs = require('./chunk-46LX6EQT.cjs');
39
37
  var chunkLJJJ6CYH_cjs = require('./chunk-LJJJ6CYH.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 chunkAHUEBRLX_cjs.formatErrorReport({ error: value, url: safeUrl(location.href) });
146
+ return chunkJEHGTPS2_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
- chunkAHUEBRLX_cjs.ProfileCard,
670
+ chunkJEHGTPS2_cjs.ProfileCard,
668
671
  {
669
672
  avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
670
673
  /* @__PURE__ */ jsxRuntime.jsx(
671
- chunkAHUEBRLX_cjs.AvatarPicker,
674
+ chunkJEHGTPS2_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
- chunkAHUEBRLX_cjs.IdentityVerificationCard,
724
+ chunkJEHGTPS2_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
- chunkAHUEBRLX_cjs.IdentityVerificationDialog,
733
+ chunkJEHGTPS2_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
- chunkAHUEBRLX_cjs.PasswordChangeDialog,
766
+ chunkJEHGTPS2_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
- chunkAHUEBRLX_cjs.NotificationCategoryList,
814
+ chunkJEHGTPS2_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
- chunkAHUEBRLX_cjs.ActiveSessionsDialog,
863
+ chunkJEHGTPS2_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
- chunkAHUEBRLX_cjs.LogoutDialog,
907
+ chunkJEHGTPS2_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
- chunkAHUEBRLX_cjs.DeleteAccountDialog,
957
+ chunkJEHGTPS2_cjs.DeleteAccountDialog,
955
958
  {
956
959
  open: dialogOpen,
957
960
  onClose: flow.onClose,
@@ -968,988 +971,988 @@ 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 : chunkNAXF2KHT_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 = chunkNAXF2KHT_cjs.getAgentStepPresentation(step, docInfo);
1131
+ const { tool, Icon } = presentation;
1132
+ const { label, summary, isMultiLine, details } = browser.getStepDisplay(step, docInfo);
1133
+ const accent = chunkNAXF2KHT_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 ? chunkNAXF2KHT_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
+ chunkNAXF2KHT_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: chunkNAXF2KHT_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(chunkNAXF2KHT_cjs.StepNarration, { index: step.index, children: /* @__PURE__ */ jsxRuntime.jsx(chunkBNXWT3DX_cjs.ConnectedMarkdown, { isStreaming: false, children: summary }) })
1192
+ ) : /* @__PURE__ */ jsxRuntime.jsx(chunkNAXF2KHT_cjs.StepSummary, { index: step.index, multiLine: isMultiLine, children: summary })),
1193
+ details.map((d, di) => /* @__PURE__ */ jsxRuntime.jsx(chunkNAXF2KHT_cjs.StepDetail, { index: step.index, children: d }, di)),
1194
+ showOutcome && /* @__PURE__ */ jsxRuntime.jsx(chunkNAXF2KHT_cjs.StepOutcome, { index: step.index, failed: outcomeFailed, children: step.outcome }),
1195
+ toolParams.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkNAXF2KHT_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(chunkNAXF2KHT_cjs.GoalCriteria, { criteria: criteriaView }),
1248
+ folded && folded.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1249
+ chunkNAXF2KHT_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
- }
1240
- );
1258
+ },
1259
+ step.index
1260
+ );
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
+ chunkNAXF2KHT_cjs.StepTraceSummary,
1276
+ {
1277
+ left: leftParts.join(" \xB7 "),
1278
+ isNearBudget: browser.isNearAiUsageBudget(contextUsage),
1279
+ total: `Total: ${react.formatGbp(contextUsage.spent_gbp)}`
1280
+ }
1281
+ );
1241
1282
  }
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,
1283
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkNAXF2KHT_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
+ chunkNAXF2KHT_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
- } = chunk6P4U63HO_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
+ } = chunk7GVKG3G4_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(chunkCYWOL2LS_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
+ });
1839
1799
  };
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
- );
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 = chunkPK5H5SVS_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();
1840
+ };
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 (followUp && event.key === "Tab" && !event.shiftKey) {
1846
+ event.preventDefault();
1847
+ setNewMessage(followUp);
1848
+ return;
1874
1849
  }
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,
1850
+ if (event.key === "Escape" && isBranching && onCancelBranching) {
1851
+ event.preventDefault();
1852
+ onCancelBranching();
1853
+ }
1854
+ };
1855
+ const handleSubmit = (e) => {
1856
+ e.preventDefault();
1857
+ if (recipient.hasBody) sendDraft();
1858
+ };
1859
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
1860
+ chunkPK5H5SVS_cjs.Composer.Root,
1899
1861
  {
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))
1862
+ onSubmit: handleSubmit,
1863
+ formRef,
1864
+ isBranching,
1865
+ notice: isBranching ? /* @__PURE__ */ jsxRuntime.jsx(chunkPK5H5SVS_cjs.Composer.Notice, { onCancel: onCancelBranching }) : void 0,
1866
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1867
+ chunkPK5H5SVS_cjs.Composer.Frame,
1868
+ {
1869
+ className: compact ? "rounded-none border-0 px-0 py-0 shadow-none focus-within:shadow-none" : void 0,
1870
+ children: [
1871
+ /* @__PURE__ */ jsxRuntime.jsx(
1872
+ chunk5F4DCIHS_cjs.SlashMenu,
1873
+ {
1874
+ open: isSlashMenuOpen,
1875
+ items: filteredItems,
1876
+ selectedIndex: slashNav.selectedIndex,
1877
+ setSelectedIndex: slashNav.setSelectedIndex,
1878
+ listboxId: slashNav.listboxId,
1879
+ onSelect: insertSlashItem,
1880
+ onBrowse: canBrowseSkills ? onBrowseSkills : void 0
1881
+ }
1882
+ ),
1883
+ /* @__PURE__ */ jsxRuntime.jsx(
1884
+ chunk75BNMCUX_cjs.MentionMenu,
1885
+ {
1886
+ open: mention.isOpen,
1887
+ items: mention.items,
1888
+ selectedIndex: mention.nav.selectedIndex,
1889
+ setSelectedIndex: mention.nav.setSelectedIndex,
1890
+ listboxId: mention.nav.listboxId,
1891
+ onSelect: mention.pick
1892
+ }
1893
+ ),
1894
+ /* @__PURE__ */ jsxRuntime.jsx(
1895
+ chunkPK5H5SVS_cjs.Composer.Input,
1896
+ {
1897
+ value: newMessage,
1898
+ onValueChange: (next) => {
1899
+ mention.onValueChange(next);
1900
+ longPaste.onValueChange(next);
1901
+ },
1902
+ onPaste: (event) => longPaste.onPaste(event, newMessage),
1903
+ onKeyDown,
1904
+ textareaProps: {
1905
+ ...mention.isOpen ? mention.nav.comboboxProps : slashNav.comboboxProps,
1906
+ ...mention.textareaProps
1907
+ },
1908
+ textareaRef,
1909
+ isPasteCollapsed: longPaste.isCollapsed,
1910
+ onExpandPaste: () => {
1911
+ longPaste.expand();
1912
+ requestAnimationFrame(() => textareaRef.current?.focus());
1913
+ },
1914
+ isRoomy: isConversationEmpty,
1915
+ isSuggestion: !!followUp,
1916
+ compact,
1917
+ 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)
1918
+ }
1919
+ ),
1920
+ /* @__PURE__ */ jsxRuntime.jsx(
1921
+ chunkPK5H5SVS_cjs.Composer.Toolbar,
1922
+ {
1923
+ className: compact ? "flex-nowrap" : void 0,
1924
+ leading: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1925
+ leftButton,
1926
+ compact && modelSelector,
1927
+ onOpenSettings && /* @__PURE__ */ jsxRuntime.jsx(
1928
+ ui.Button,
1929
+ {
1930
+ type: "button",
1931
+ variant: "ghost",
1932
+ size: "sm",
1933
+ onClick: onOpenSettings,
1934
+ className: "h-8 w-8 p-0 pointer-coarse:h-11 pointer-coarse:w-11",
1935
+ "aria-label": "Chat settings",
1936
+ title: "Chat settings",
1937
+ "data-testid": "message-input-settings-button",
1938
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "h-4 w-4 text-muted-foreground" })
1939
+ }
1940
+ )
1941
+ ] }),
1942
+ trailing: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1943
+ !compact && modelSelector,
1944
+ rightButton
1945
+ ] })
1946
+ }
1947
+ ),
1948
+ /* @__PURE__ */ jsxRuntime.jsx(chunkW5JTACMK_cjs.ContextUsageBar, { contextUsage, draftLength: newMessage.length })
1949
+ ]
1950
+ }
1951
+ )
1908
1952
  }
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
- });
1953
+ ) });
1954
+ };
1955
+ var ConversationComposer2 = React6.memo(ConversationComposerComponent);
1953
1956
  function groupStepsByHandle(steps) {
1954
1957
  const byHandle = /* @__PURE__ */ new Map();
1955
1958
  for (const step of browser.mergeAgentSteps(steps)) {
@@ -1990,7 +1993,7 @@ function RunningSubagentsRoster({
1990
1993
  if (leafId) selectThread(leafId);
1991
1994
  };
1992
1995
  return /* @__PURE__ */ jsxRuntime.jsx(
1993
- chunkJARBYN6Z_cjs.SubagentRoster,
1996
+ chunkNAXF2KHT_cjs.SubagentRoster,
1994
1997
  {
1995
1998
  lanes: rosterLanes,
1996
1999
  className,
@@ -2038,7 +2041,7 @@ function AnswerTable({
2038
2041
  const table = wrapperRef.current?.querySelector("table");
2039
2042
  if (!table || !wrapperRef.current) return;
2040
2043
  try {
2041
- const filename = await chunkJHDCDEXY_cjs.downloadTableAsCsv(table, wrapperRef.current);
2044
+ const filename = await chunkW5JTACMK_cjs.downloadTableAsCsv(table, wrapperRef.current);
2042
2045
  shell.notify.success(`Saved ${filename}`);
2043
2046
  } catch (error) {
2044
2047
  console.error("Failed to download table as CSV", error);
@@ -2107,7 +2110,7 @@ function AnswerTable({
2107
2110
  ] });
2108
2111
  }
2109
2112
  function useOpenChunk() {
2110
- const { openDocument } = chunk46LX6EQT_cjs.useBlocksEnvironment();
2113
+ const { openDocument } = chunkHN56WWBR_cjs.useBlocksEnvironment();
2111
2114
  const { data: documents } = react.useDocuments();
2112
2115
  return React6.useCallback(
2113
2116
  (chunk) => {
@@ -2148,13 +2151,13 @@ function withAnswerTable(components) {
2148
2151
  }
2149
2152
  return merged;
2150
2153
  }
2151
- var renderMarkdown = ({ components, isStreaming, children }) => /* @__PURE__ */ jsxRuntime.jsx(chunkCYWOL2LS_cjs.ConnectedMarkdown, { components: withAnswerTable(components), isStreaming, children });
2154
+ var renderMarkdown = ({ components, isStreaming, children }) => /* @__PURE__ */ jsxRuntime.jsx(chunkBNXWT3DX_cjs.ConnectedMarkdown, { components: withAnswerTable(components), isStreaming, children });
2152
2155
  function LinkInAnswer({ href, children, ...props }) {
2153
- const docId = chunkZ2XZ2D4N_cjs.workspaceDocIdFromHref(href, chunk46LX6EQT_cjs.useBlocksEnvironment().runtimeConfig.deploymentDomain);
2156
+ const docId = chunkO2NHBB3D_cjs.workspaceDocIdFromHref(href, chunkHN56WWBR_cjs.useBlocksEnvironment().runtimeConfig.deploymentDomain);
2154
2157
  if (docId) {
2155
- return /* @__PURE__ */ jsxRuntime.jsx(chunkCYWOL2LS_cjs.InternalDocLink, { docId, href, ...props, children });
2158
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkBNXWT3DX_cjs.InternalDocLink, { docId, href, ...props, children });
2156
2159
  }
2157
- return /* @__PURE__ */ jsxRuntime.jsx(chunkCYWOL2LS_cjs.ExternalLink, { href, ...props, children });
2160
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkBNXWT3DX_cjs.ExternalLink, { href, ...props, children });
2158
2161
  }
2159
2162
  var ConnectedCitationRendererComponent = (props) => {
2160
2163
  const session = react.useArbiSessionStore();
@@ -2256,7 +2259,7 @@ function MessageDetailsModal({
2256
2259
  ]
2257
2260
  }
2258
2261
  ),
2259
- messageDetails && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "message-details-content", children: /* @__PURE__ */ jsxRuntime.jsx(chunkAHUEBRLX_cjs.MessageJsonTree, { data: messageDetails, name: "message", defaultExpanded: true }) })
2262
+ messageDetails && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "message-details-content", children: /* @__PURE__ */ jsxRuntime.jsx(chunkJEHGTPS2_cjs.MessageJsonTree, { data: messageDetails, name: "message", defaultExpanded: true }) })
2260
2263
  ] })
2261
2264
  ]
2262
2265
  }
@@ -2286,16 +2289,16 @@ function WorkflowStepMessage({
2286
2289
  const { conversations } = react.useConversationItems();
2287
2290
  const activity = react.useConversationActivity(conversationId ?? void 0, { live: true });
2288
2291
  const plan = conversations.find((c) => c.external_id === conversationId)?.plan;
2289
- const steps = chunkJARBYN6Z_cjs.fromPlanSteps(plan?.steps ?? []);
2292
+ const steps = chunkNAXF2KHT_cjs.fromPlanSteps(plan?.steps ?? []);
2290
2293
  const found = steps.find((s) => s.id === step);
2291
2294
  const states = chunkY3GJBLAI_cjs.stepStatesFromActivity(activity.data ?? []);
2292
2295
  const { data: documents = [] } = react.useDocuments();
2293
- const { openDocument } = chunk46LX6EQT_cjs.useBlocksEnvironment();
2296
+ const { openDocument } = chunkHN56WWBR_cjs.useBlocksEnvironment();
2294
2297
  const ref = found ? chunk7XR6CPCU_cjs.stepDocuments(steps, states, step).at(-1) : void 0;
2295
2298
  const docId = ref ? chunkY3GJBLAI_cjs.splitDocRef(ref).id : void 0;
2296
2299
  const doc = documents.find((d) => d.external_id === docId);
2297
2300
  return /* @__PURE__ */ jsxRuntime.jsx(
2298
- chunkVHD5DZW4_cjs.WorkflowStepChip,
2301
+ chunkPK5H5SVS_cjs.WorkflowStepChip,
2299
2302
  {
2300
2303
  step,
2301
2304
  title: found?.title,
@@ -2327,7 +2330,7 @@ var MessageComponent = ({
2327
2330
  const [showDetailsModal, setShowDetailsModal] = React6.useState(false);
2328
2331
  const messageRef = React6.useRef(null);
2329
2332
  const session = react.useArbiSessionStore();
2330
- const environment = chunk46LX6EQT_cjs.useBlocksEnvironment();
2333
+ const environment = chunkHN56WWBR_cjs.useBlocksEnvironment();
2331
2334
  const linkMentions = react.useLinkMentions();
2332
2335
  const { notify: notify3 } = environment;
2333
2336
  const editingMessageId = react.useArbiSessionState((state) => state.editingMessageId);
@@ -2353,25 +2356,23 @@ var MessageComponent = ({
2353
2356
  const { data: workspaceUsers = [] } = react.useWorkspaceUsers();
2354
2357
  const streaming = shell.useMessageChatArtifact(message.external_id);
2355
2358
  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 {
2359
+ const linkedArtifacts = React6.useMemo(() => {
2360
+ const saved = chunkW5JTACMK_cjs.findMessageDocuments(workspaceDocs, message.external_id).filter((doc) => doc.external_id !== streaming?.docExtId).map((doc) => ({
2363
2361
  docExtId: doc.external_id,
2364
2362
  title: ui.getDocumentTitle(doc),
2365
2363
  isComplete: true,
2366
- mode: ui.isImageDocument(doc) ? "image" : /\.pptx$/i.test(doc.file_name ?? "") ? "presentation" : kind ?? "markdown"
2367
- };
2364
+ mode: ui.isImageDocument(doc) ? "image" : artifacts.savedArtifactMode(doc.file_name)
2365
+ }));
2366
+ return streaming ? [streaming, ...saved] : saved;
2368
2367
  }, [streaming, workspaceDocs, message.external_id]);
2368
+ const linkedArtifact = linkedArtifacts[0];
2369
2369
  const handleOpenArtifact = React6.useCallback(
2370
2370
  (docExtId) => {
2371
- session.setDocumentViewer({ tab: artifacts.viewerTabForArtifactMode(linkedArtifact?.mode) });
2371
+ const mode = linkedArtifacts.find((artifact) => artifact.docExtId === docExtId)?.mode;
2372
+ session.setDocumentViewer({ tab: artifacts.viewerTabForArtifactMode(mode) });
2372
2373
  environment.openDocument(docExtId);
2373
2374
  },
2374
- [linkedArtifact?.mode, session, environment]
2375
+ [linkedArtifacts, session, environment]
2375
2376
  );
2376
2377
  const messageAuthorUser = React6.useMemo(() => {
2377
2378
  if (!isUser) return null;
@@ -2457,7 +2458,7 @@ var MessageComponent = ({
2457
2458
  const isQueuedAnswer = !isUser && message.status === "queued" && !isGenerating;
2458
2459
  const isAwaitingAnswer = (isGenerating || isRunningOnServer) && !isStopped && !!message.pendingUserInput;
2459
2460
  const showWorkingIndicator = (isGenerating || isRunningOnServer) && !isQueuedAnswer && !responseContent.trim() && !linkedArtifact && !isAwaitingAnswer;
2460
- const workingStepLabel = showWorkingIndicator ? chunkJARBYN6Z_cjs.getCurrentAgentStepPresentation(message.agentSteps ?? [])?.description : void 0;
2461
+ const workingStepLabel = showWorkingIndicator ? chunkNAXF2KHT_cjs.getCurrentAgentStepPresentation(message.agentSteps ?? [])?.description : void 0;
2461
2462
  const showEmptyAnswer = !isUser && !isGenerating && !isRunningOnServer && !isFailed && !isStopped && !responseContent.trim() && !linkedArtifact;
2462
2463
  const isEmptyStopped = isStopped && !responseContent.trim();
2463
2464
  const stoppedQuestion = React6.useMemo(() => {
@@ -2544,7 +2545,7 @@ var MessageComponent = ({
2544
2545
  precedingUserMessage = parentMessage.content;
2545
2546
  }
2546
2547
  }
2547
- await chunkJHDCDEXY_cjs.copyMessageToClipboard({
2548
+ await chunkW5JTACMK_cjs.copyMessageToClipboard({
2548
2549
  messageRef,
2549
2550
  responseContent,
2550
2551
  messageContent: message.content,
@@ -2623,7 +2624,7 @@ var MessageComponent = ({
2623
2624
  const timeLabel = ui.formatFriendlyDate(message.created_at || "");
2624
2625
  const messageId = message.external_id;
2625
2626
  const assistant = shell.useAssistantCopy();
2626
- const transcriptRuns = chunk3GQQUR27_cjs.useTranscriptRuns();
2627
+ const transcriptRuns = chunkTNBNDY2J_cjs.useTranscriptRuns();
2627
2628
  const messageRole = isUser ? "user" : "assistant";
2628
2629
  const menuItems = [
2629
2630
  ...isUser ? [
@@ -2687,7 +2688,7 @@ var MessageComponent = ({
2687
2688
  const actions = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2688
2689
  branchControl,
2689
2690
  isUser ? /* @__PURE__ */ jsxRuntime.jsx(
2690
- chunkVHD5DZW4_cjs.MessageActionMenu,
2691
+ chunkPK5H5SVS_cjs.MessageActionMenu,
2691
2692
  {
2692
2693
  items: menuItems,
2693
2694
  heading: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -2698,7 +2699,7 @@ var MessageComponent = ({
2698
2699
  }
2699
2700
  ) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2700
2701
  /* @__PURE__ */ jsxRuntime.jsx(
2701
- chunkVHD5DZW4_cjs.MessageActionButton,
2702
+ chunkPK5H5SVS_cjs.MessageActionButton,
2702
2703
  {
2703
2704
  onClick: (e) => {
2704
2705
  e.stopPropagation();
@@ -2713,7 +2714,7 @@ var MessageComponent = ({
2713
2714
  }
2714
2715
  ),
2715
2716
  /* @__PURE__ */ jsxRuntime.jsx(
2716
- chunkVHD5DZW4_cjs.MessageActionButton,
2717
+ chunkPK5H5SVS_cjs.MessageActionButton,
2717
2718
  {
2718
2719
  onClick: (e) => {
2719
2720
  e.stopPropagation();
@@ -2726,7 +2727,7 @@ var MessageComponent = ({
2726
2727
  }
2727
2728
  ),
2728
2729
  /* @__PURE__ */ jsxRuntime.jsx(
2729
- chunkVHD5DZW4_cjs.MessageActionMenu,
2730
+ chunkPK5H5SVS_cjs.MessageActionMenu,
2730
2731
  {
2731
2732
  items: menuItems,
2732
2733
  heading: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -2744,13 +2745,13 @@ var MessageComponent = ({
2744
2745
  ] });
2745
2746
  const isBareStopped = isEmptyStopped && visibleStepCount === 0;
2746
2747
  const footer = settledForHeader && !isBareStopped && /* @__PURE__ */ jsxRuntime.jsx(
2747
- chunkVHD5DZW4_cjs.MessageFooter,
2748
+ chunkPK5H5SVS_cjs.MessageFooter,
2748
2749
  {
2749
2750
  role: messageRole,
2750
2751
  align: isOtherPerson ? "start" : "end",
2751
2752
  leading: isUser ? (
2752
2753
  // Someone else's author is the pill above their run; only mine is marked here.
2753
- !isOtherPerson && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(chunkZPBTXRMG_cjs.DocumentUser, { user: messageAuthorUser })
2754
+ !isOtherPerson && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(chunkNFXHBTAO_cjs.DocumentUser, { user: messageAuthorUser })
2754
2755
  ) : /* @__PURE__ */ jsxRuntime.jsx(
2755
2756
  "span",
2756
2757
  {
@@ -2761,7 +2762,7 @@ var MessageComponent = ({
2761
2762
  },
2762
2763
  "data-testid": `message-model-${messageId}`,
2763
2764
  children: /* @__PURE__ */ jsxRuntime.jsx(
2764
- chunkJARBYN6Z_cjs.AssistantEntity,
2765
+ chunkNAXF2KHT_cjs.AssistantEntity,
2765
2766
  {
2766
2767
  name: modelDisplayName,
2767
2768
  modelName,
@@ -2830,7 +2831,7 @@ var MessageComponent = ({
2830
2831
  const speakerName = speaker ? ui.getUserDisplayName(speaker) : null;
2831
2832
  const isMe = transcriptSegment.speaker_ext_id === currentUser?.external_id;
2832
2833
  return /* @__PURE__ */ jsxRuntime.jsx(
2833
- chunk3GQQUR27_cjs.TranscriptEntry,
2834
+ chunkTNBNDY2J_cjs.TranscriptEntry,
2834
2835
  {
2835
2836
  speakerId: transcriptSegment.speaker_ext_id,
2836
2837
  speakerName: isMe ? "Me" : speakerName || "Former member",
@@ -2841,7 +2842,7 @@ var MessageComponent = ({
2841
2842
  );
2842
2843
  }
2843
2844
  return /* @__PURE__ */ jsxRuntime.jsx(chunkMZZ3SBQL_cjs.ErrorBoundary, { testId: "message-error-boundary", children: /* @__PURE__ */ jsxRuntime.jsxs(
2844
- chunkVHD5DZW4_cjs.MessageRoot,
2845
+ chunkPK5H5SVS_cjs.MessageRoot,
2845
2846
  {
2846
2847
  role: messageRole,
2847
2848
  messageId,
@@ -2849,15 +2850,15 @@ var MessageComponent = ({
2849
2850
  ...rest,
2850
2851
  children: [
2851
2852
  /* @__PURE__ */ jsxRuntime.jsxs(
2852
- chunkVHD5DZW4_cjs.MessageContent,
2853
+ chunkPK5H5SVS_cjs.MessageContent,
2853
2854
  {
2854
2855
  role: messageRole,
2855
2856
  messageId,
2856
2857
  align: isOtherPerson ? "start" : "end",
2857
2858
  children: [
2858
- startsAuthorRun && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageAuthor, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkZPBTXRMG_cjs.DocumentUser, { user: messageAuthorUser, variant: "pill" }) }),
2859
+ startsAuthorRun && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(chunkPK5H5SVS_cjs.MessageAuthor, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkNFXHBTAO_cjs.DocumentUser, { user: messageAuthorUser, variant: "pill" }) }),
2859
2860
  /* @__PURE__ */ jsxRuntime.jsxs(
2860
- chunkVHD5DZW4_cjs.MessageBubble,
2861
+ chunkPK5H5SVS_cjs.MessageBubble,
2861
2862
  {
2862
2863
  ref: messageRef,
2863
2864
  role: messageRole,
@@ -2867,14 +2868,14 @@ var MessageComponent = ({
2867
2868
  className: isOtherPerson ? "border border-border bg-card" : void 0,
2868
2869
  children: [
2869
2870
  !isUser && isGenerating && /* @__PURE__ */ jsxRuntime.jsx(
2870
- chunkVHD5DZW4_cjs.MessageByline,
2871
+ chunkPK5H5SVS_cjs.MessageByline,
2871
2872
  {
2872
2873
  messageId,
2873
2874
  identity: (
2874
2875
  // Stays the ARBI identity while streaming: the model name arrives
2875
2876
  // with the first step that reports one and would swap the author
2876
2877
  // mid-answer. The model is shown in the footer once settled.
2877
- /* @__PURE__ */ jsxRuntime.jsx(chunkJARBYN6Z_cjs.AssistantEntity, { size: 16 })
2878
+ /* @__PURE__ */ jsxRuntime.jsx(chunkNAXF2KHT_cjs.AssistantEntity, { size: 16 })
2878
2879
  ),
2879
2880
  timeLabel,
2880
2881
  isSettled: settledForHeader,
@@ -2882,9 +2883,9 @@ var MessageComponent = ({
2882
2883
  statusLabel
2883
2884
  }
2884
2885
  ),
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(chunkCYWOL2LS_cjs.ConnectedMarkdown, { isStreaming: false, children: settledNarration }) }) : null,
2886
+ subagentTaskRecord && /* @__PURE__ */ jsxRuntime.jsx(chunkPK5H5SVS_cjs.MessageSubagentBadge, { messageId }),
2887
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkPK5H5SVS_cjs.MessageBody, { messageId, children: [
2888
+ settledNarration ? /* @__PURE__ */ jsxRuntime.jsx(chunkPK5H5SVS_cjs.MessageNarration, { messageId, children: /* @__PURE__ */ jsxRuntime.jsx(chunkBNXWT3DX_cjs.ConnectedMarkdown, { isStreaming: false, children: settledNarration }) }) : null,
2888
2889
  liveContent ? role === "assistant" ? /* @__PURE__ */ jsxRuntime.jsx(
2889
2890
  ConnectedCitationRenderer,
2890
2891
  {
@@ -2894,7 +2895,7 @@ var MessageComponent = ({
2894
2895
  messageId: message.external_id || "unknown",
2895
2896
  isStreaming: isGenerating
2896
2897
  }
2897
- ) : /* @__PURE__ */ jsxRuntime.jsx(chunkCYWOL2LS_cjs.ConnectedMarkdown, { isStreaming: isGenerating, children: linkMentions(
2898
+ ) : /* @__PURE__ */ jsxRuntime.jsx(chunkBNXWT3DX_cjs.ConnectedMarkdown, { isStreaming: isGenerating, children: linkMentions(
2898
2899
  isUser && liveContent.startsWith("/pa ") ? liveContent.slice(4) : liveContent,
2899
2900
  message.mentions
2900
2901
  ) }) : null,
@@ -2998,7 +2999,14 @@ var MessageComponent = ({
2998
2999
  ]
2999
3000
  }
3000
3001
  ),
3001
- !isUser && linkedArtifact && /* @__PURE__ */ jsxRuntime.jsx(react.MessageArtifactCard, { artifact: linkedArtifact, onOpen: handleOpenArtifact }),
3002
+ !isUser && linkedArtifacts.map((artifact) => /* @__PURE__ */ jsxRuntime.jsx(
3003
+ react.MessageArtifactCard,
3004
+ {
3005
+ artifact,
3006
+ onOpen: handleOpenArtifact
3007
+ },
3008
+ artifact.docExtId
3009
+ )),
3002
3010
  !isUser && subagentLinks
3003
3011
  ]
3004
3012
  }
@@ -3060,7 +3068,7 @@ var ConnectedBranchControls = ({
3060
3068
  onPreview
3061
3069
  }) => {
3062
3070
  return /* @__PURE__ */ jsxRuntime.jsx(chunkMZZ3SBQL_cjs.ErrorBoundary, { testId: "branch-controls-error-boundary", children: /* @__PURE__ */ jsxRuntime.jsx(
3063
- chunkJHDCDEXY_cjs.BranchControls,
3071
+ chunkW5JTACMK_cjs.BranchControls,
3064
3072
  {
3065
3073
  index: branchPoint.currentBranchIndex,
3066
3074
  count: branchPoint.branches.length,
@@ -3121,7 +3129,7 @@ function ThreadsPreviewDialog({
3121
3129
  }
3122
3130
  ),
3123
3131
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0", style: { height: "70vh" }, children: /* @__PURE__ */ jsxRuntime.jsx(
3124
- chunkJHDCDEXY_cjs.ThreadVisualizer,
3132
+ chunkW5JTACMK_cjs.ThreadVisualizer,
3125
3133
  {
3126
3134
  threads: threads || [],
3127
3135
  switchToThread: (threadId) => {
@@ -3204,7 +3212,7 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3204
3212
  const session = react.useArbiSessionStore();
3205
3213
  const [previewOpen, setPreviewOpen] = React6.useState(false);
3206
3214
  const participantTints = React6.useMemo(
3207
- () => chunkJHDCDEXY_cjs.getParticipantTints(
3215
+ () => chunkW5JTACMK_cjs.getParticipantTints(
3208
3216
  messages.map(
3209
3217
  (message) => message.role === "assistant" ? "" : message.created_by_ext_id ?? ""
3210
3218
  )
@@ -3226,7 +3234,7 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3226
3234
  const isGenerating = react.useArbiSessionState((state) => state.generating[currentConversationId || ""]?.isGenerating) ?? false;
3227
3235
  const isLiveTurn = isGenerating && messages[messages.length - 1]?.isLoading === true;
3228
3236
  const lastMessage = displayMessages[displayMessages.length - 1];
3229
- const statusMessage = chunkVHD5DZW4_cjs.useStreamAnnouncement({
3237
+ const statusMessage = chunkPK5H5SVS_cjs.useStreamAnnouncement({
3230
3238
  isStreaming: isGenerating,
3231
3239
  text: lastMessage?.role === "assistant" ? chunkXNW62J54_cjs.stripThinking(lastMessage.content ?? "") : "",
3232
3240
  resetKey: currentConversationId
@@ -3239,7 +3247,7 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3239
3247
  React6.useEffect(() => {
3240
3248
  scrollContainerRef.current = scrollElementRef?.current ?? resolveScrollContainer(null);
3241
3249
  }, [scrollElementRef]);
3242
- const { items: activityItems } = chunkZC7X4ZIX_cjs.useConnectedThreadActivity(currentConversationId);
3250
+ const { items: activityItems } = chunkWGRXQ7PI_cjs.useConnectedThreadActivity(currentConversationId);
3243
3251
  const transcript = [
3244
3252
  ...displayMessages.map((message, index) => ({
3245
3253
  type: "message",
@@ -3313,32 +3321,32 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3313
3321
  const target = document.querySelector(`[data-message-id="${deepLinkMessageId}"]`);
3314
3322
  if (!target) return;
3315
3323
  target.scrollIntoView({ behavior: "smooth", block: "center" });
3316
- chunkJHDCDEXY_cjs.flashMessage(target);
3324
+ chunkW5JTACMK_cjs.flashMessage(target);
3317
3325
  session.setDeepLinkMessageId(null);
3318
3326
  }, [deepLinkMessageId, virtualItems, session]);
3319
- const status = /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageList.Status, { message: statusMessage });
3327
+ const status = /* @__PURE__ */ jsxRuntime.jsx(chunkPK5H5SVS_cjs.MessageList.Status, { message: statusMessage });
3320
3328
  if (transcript.length === 0) {
3321
3329
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3322
3330
  status,
3323
- /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageList.Empty, {})
3331
+ /* @__PURE__ */ jsxRuntime.jsx(chunkPK5H5SVS_cjs.MessageList.Empty, {})
3324
3332
  ] });
3325
3333
  }
3326
3334
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3327
3335
  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) => {
3336
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkPK5H5SVS_cjs.MessageList.Root, { isBusy: isGenerating, children: [
3337
+ mainSiblingLeaf && /* @__PURE__ */ jsxRuntime.jsx(chunkPK5H5SVS_cjs.MessageList.Banner, { onBack: () => setParentMessageId(mainSiblingLeaf) }),
3338
+ /* @__PURE__ */ jsxRuntime.jsx(chunkPK5H5SVS_cjs.MessageList.Rows, { totalSize: rowVirtualizer.getTotalSize(), children: virtualItems.map((virtualItem) => {
3331
3339
  const entry = transcript[virtualItem.index];
3332
3340
  if (entry.type === "activity") {
3333
3341
  return /* @__PURE__ */ jsxRuntime.jsx(
3334
- chunkVHD5DZW4_cjs.MessageList.Row,
3342
+ chunkPK5H5SVS_cjs.MessageList.Row,
3335
3343
  {
3336
3344
  ref: rowVirtualizer.measureElement,
3337
3345
  index: virtualItem.index,
3338
3346
  start: virtualItem.start,
3339
3347
  messageId: entry.id,
3340
3348
  setSize: transcript.length,
3341
- children: entry.item.card ?? /* @__PURE__ */ jsxRuntime.jsx(chunkJARBYN6Z_cjs.ThreadActivity, { item: entry.item, children: entry.item.onOpenDocument && /* @__PURE__ */ jsxRuntime.jsx(
3349
+ children: entry.item.card ?? /* @__PURE__ */ jsxRuntime.jsx(chunkNAXF2KHT_cjs.ThreadActivity, { item: entry.item, children: entry.item.onOpenDocument && /* @__PURE__ */ jsxRuntime.jsx(
3342
3350
  "button",
3343
3351
  {
3344
3352
  className: "mt-1 hover:underline text-primary",
@@ -3354,7 +3362,7 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3354
3362
  const messageId = message.external_id;
3355
3363
  const branchPoint = messageId ? getBranchControlForMessage(messageId) : null;
3356
3364
  return /* @__PURE__ */ jsxRuntime.jsx(
3357
- chunkVHD5DZW4_cjs.MessageList.Row,
3365
+ chunkPK5H5SVS_cjs.MessageList.Row,
3358
3366
  {
3359
3367
  ref: rowVirtualizer.measureElement,
3360
3368
  index: virtualItem.index,
@@ -3385,7 +3393,7 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
3385
3393
  message.external_id ?? `msg-${virtualItem.index}`
3386
3394
  );
3387
3395
  }) }),
3388
- isLiveTurn ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(chunkVHD5DZW4_cjs.MessageList.Tail, {})
3396
+ isLiveTurn ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(chunkPK5H5SVS_cjs.MessageList.Tail, {})
3389
3397
  ] }),
3390
3398
  /* @__PURE__ */ jsxRuntime.jsx(ConnectedThreadsPreview, { open: previewOpen, onOpenChange: setPreviewOpen })
3391
3399
  ] });
@@ -3415,7 +3423,7 @@ function ConnectedCompactConversation({ attachments } = {}) {
3415
3423
  parentMessageId
3416
3424
  });
3417
3425
  const session = react.useArbiSessionStore();
3418
- const slashWorkflows = chunk6P4U63HO_cjs.useSlashSkillWorkflows({ landing: "current-chat" });
3426
+ const slashWorkflows = chunk7GVKG3G4_cjs.useSlashSkillWorkflows({ landing: "current-chat" });
3419
3427
  react.useAutoSendDraft(sendDraft);
3420
3428
  const skills = React6.useMemo(() => ({ openFor: slashWorkflows.openFor }), [slashWorkflows.openFor]);
3421
3429
  const handleSendMessage = () => {
@@ -3444,7 +3452,7 @@ function ConnectedCompactConversation({ attachments } = {}) {
3444
3452
  observer.observe(viewport);
3445
3453
  return () => observer.disconnect();
3446
3454
  }, [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: [
3455
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkPK5H5SVS_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
3456
  slashWorkflows.launcher,
3449
3457
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex flex-col flex-1 min-h-0 overflow-hidden bg-muted/25", children: /* @__PURE__ */ jsxRuntime.jsx(
3450
3458
  "div",
@@ -3498,7 +3506,7 @@ function ConnectedCompactConversation({ attachments } = {}) {
3498
3506
  ) })
3499
3507
  }
3500
3508
  ) }),
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(
3509
+ /* @__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(chunkPK5H5SVS_cjs.ComposerContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(
3502
3510
  ConversationComposer2,
3503
3511
  {
3504
3512
  handleSendMessage,
@@ -3574,7 +3582,7 @@ function ConnectedConversationDocumentPicker({
3574
3582
  onSelectionChange
3575
3583
  }) {
3576
3584
  const session = react.useArbiSessionStore();
3577
- const { openDocument } = chunk46LX6EQT_cjs.useBlocksEnvironment();
3585
+ const { openDocument } = chunkHN56WWBR_cjs.useBlocksEnvironment();
3578
3586
  const upload = react.useUploadDocuments();
3579
3587
  const role = react.useWorkspaceRole();
3580
3588
  const canUpload = role !== null && role !== "guest";
@@ -3966,9 +3974,9 @@ function useLoginActions({
3966
3974
  onError
3967
3975
  }) {
3968
3976
  const arbi = react.useArbi();
3969
- const signInLayer = chunkGB5MN5FC_cjs.useOptionalConnection();
3977
+ const signInLayer = chunkVWSOHZK2_cjs.useOptionalConnection();
3970
3978
  const sso = useSsoSignIn();
3971
- const environment = chunk46LX6EQT_cjs.useBlocksEnvironment();
3979
+ const environment = chunkHN56WWBR_cjs.useBlocksEnvironment();
3972
3980
  const environmentNotify = environment.notify;
3973
3981
  const notify3 = React6.useCallback(
3974
3982
  (...args) => args[1] === "error" && onError && typeof args[0] === "string" ? onError(args[0]) : environmentNotify(...args),
@@ -4142,7 +4150,7 @@ function useLoginActions({
4142
4150
  };
4143
4151
  }
4144
4152
  function useLoginForm() {
4145
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
4153
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
4146
4154
  const { onReturnPath } = useAuthPages();
4147
4155
  const [email, setEmail] = React6.useState("");
4148
4156
  const [password, setPassword] = React6.useState("");
@@ -4351,7 +4359,7 @@ function useRegisterSubmitState(isRegistering, isPending, password, confirmPassw
4351
4359
  }
4352
4360
  function useSsoVerificationRedirect() {
4353
4361
  const sso = useSsoSignIn();
4354
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
4362
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
4355
4363
  const { onVerificationFailed } = useAuthPages();
4356
4364
  React6.useEffect(() => {
4357
4365
  const urlParams = new URLSearchParams(window.location.search);
@@ -4381,14 +4389,14 @@ var sodiumWarmed = false;
4381
4389
  function warmSodium() {
4382
4390
  if (sodiumWarmed) return;
4383
4391
  sodiumWarmed = true;
4384
- const run = () => void chunkLLVE5TST_cjs.prefetchChunk(client.initSodium);
4392
+ const run = () => void chunkVDHBLDQC_cjs.prefetchChunk(client.initSodium);
4385
4393
  if (typeof window.requestIdleCallback === "function") window.requestIdleCallback(run);
4386
4394
  else window.setTimeout(run, 200);
4387
4395
  }
4388
4396
  function ConnectedLoginPage() {
4389
4397
  const sso = useSsoSignIn();
4390
4398
  const auth = useAuthPages();
4391
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
4399
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
4392
4400
  const isSsoOnly = !!auth.ssoOnly;
4393
4401
  const allowRegistration = auth.allowRegistration ?? true;
4394
4402
  const isOnline = core.useIsOnline();
@@ -4938,7 +4946,7 @@ function ConnectedCompactLogin({
4938
4946
  }) {
4939
4947
  const arbi = react.useArbi();
4940
4948
  const auth = useAuthPages();
4941
- const { notify: notify3 } = chunk46LX6EQT_cjs.useBlocksEnvironment();
4949
+ const { notify: notify3 } = chunkHN56WWBR_cjs.useBlocksEnvironment();
4942
4950
  const isSsoOnly = !!auth.ssoOnly;
4943
4951
  const [error, setError] = React6.useState(null);
4944
4952
  const formState = useLoginForm();
@@ -5191,7 +5199,7 @@ function EmbeddedTopbar({
5191
5199
  };
5192
5200
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5193
5201
  /* @__PURE__ */ jsxRuntime.jsx(
5194
- chunkLLVE5TST_cjs.MobileAppBar,
5202
+ chunkVDHBLDQC_cjs.MobileAppBar,
5195
5203
  {
5196
5204
  showMenu: true,
5197
5205
  onMenu: () => setMenu(true),
@@ -5208,7 +5216,7 @@ function EmbeddedTopbar({
5208
5216
  }
5209
5217
  ),
5210
5218
  menu && /* @__PURE__ */ jsxRuntime.jsxs(
5211
- chunkDYIZ7W4P_cjs.Sidebar.Root,
5219
+ chunkVDT7TEAH_cjs.Sidebar.Root,
5212
5220
  {
5213
5221
  mode: "drawer",
5214
5222
  expanded: true,
@@ -5217,14 +5225,14 @@ function EmbeddedTopbar({
5217
5225
  "aria-label": "Embedded navigation",
5218
5226
  children: [
5219
5227
  /* @__PURE__ */ jsxRuntime.jsx(
5220
- chunkDYIZ7W4P_cjs.Sidebar.DrawerHeader,
5228
+ chunkVDT7TEAH_cjs.Sidebar.DrawerHeader,
5221
5229
  {
5222
5230
  logo: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: title }),
5223
5231
  onClose: () => setMenu(false)
5224
5232
  }
5225
5233
  ),
5226
5234
  /* @__PURE__ */ jsxRuntime.jsx(
5227
- chunkDYIZ7W4P_cjs.Sidebar.Nav,
5235
+ chunkVDT7TEAH_cjs.Sidebar.Nav,
5228
5236
  {
5229
5237
  items: [
5230
5238
  {
@@ -5443,8 +5451,8 @@ function EmbeddedWorkspaceHeader({ title }) {
5443
5451
  const signedIn = react.useArbiSession();
5444
5452
  const workspaceId = react.useArbiSessionState((s) => s.workspaceId);
5445
5453
  const { data: workspaces = [], isLoading, error: listError } = react.useWorkspaces();
5446
- const select = chunkZC7X4ZIX_cjs.useSelectWorkspace();
5447
- const connection = chunkGB5MN5FC_cjs.useOptionalConnection();
5454
+ const select = chunkWGRXQ7PI_cjs.useSelectWorkspace();
5455
+ const connection = chunkVWSOHZK2_cjs.useOptionalConnection();
5448
5456
  const [pending, setPending] = React6.useState(false);
5449
5457
  const [error, setError] = React6.useState(null);
5450
5458
  async function choose(id) {
@@ -5624,6 +5632,7 @@ exports.createRemoteControl = createRemoteControl;
5624
5632
  exports.defaultHost = defaultHost;
5625
5633
  exports.renderConnectedUser = renderConnectedUser;
5626
5634
  exports.renderSessionStatusIcon = renderSessionStatusIcon;
5635
+ exports.requestScreenCapture = requestScreenCapture;
5627
5636
  exports.resolveSsoName = resolveSsoName;
5628
5637
  exports.ssoAccountStatus = ssoAccountStatus;
5629
5638
  exports.useAuthPages = useAuthPages;
@@ -5636,5 +5645,5 @@ exports.useRemoteControlHandlers = useRemoteControlHandlers;
5636
5645
  exports.useRemoteControlSessionReset = useRemoteControlSessionReset;
5637
5646
  exports.useSsoSignIn = useSsoSignIn;
5638
5647
  exports.useWorkspaceDocTitles = useWorkspaceDocTitles;
5639
- //# sourceMappingURL=chunk-K4U4TM23.cjs.map
5640
- //# sourceMappingURL=chunk-K4U4TM23.cjs.map
5648
+ //# sourceMappingURL=chunk-YTDVWIHU.cjs.map
5649
+ //# sourceMappingURL=chunk-YTDVWIHU.cjs.map