@vellumai/web 0.10.10-dev.202607180138.a4a1cda → 0.10.10-dev.202607180309.9db1c71

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 (312) hide show
  1. package/dist/assets/{AnimatePresence-EM_rdPPa.js → AnimatePresence-CjZNnIP2.js} +1 -1
  2. package/dist/assets/{BundleConfirmPage-CdNhj5pq.js → BundleConfirmPage-BW5noKEq.js} +1 -1
  3. package/dist/assets/{a2a-invite-CRERu4x2.js → a2a-invite-B6BxuAmg.js} +1 -1
  4. package/dist/assets/{about-page-DaFgRaRh.js → about-page-DN52Dt9v.js} +1 -1
  5. package/dist/assets/{account-page-DrwH12zh.js → account-page-g0NnV74H.js} +1 -1
  6. package/dist/assets/{account-shell-BmBmnWdX.js → account-shell-C7QpzomH.js} +1 -1
  7. package/dist/assets/{acp-run-detail-panel-Vi6UFkMl.js → acp-run-detail-panel-I-hlyH3G.js} +4 -4
  8. package/dist/assets/{activity-steps-panel-DwrUohDE.js → activity-steps-panel-CPRkkMaL.js} +1 -1
  9. package/dist/assets/{add-credits-modal-B2zAjf03.js → add-credits-modal-D-nLZDEN.js} +1 -1
  10. package/dist/assets/ai-page-BdpvNVfX.js +1 -0
  11. package/dist/assets/{animated-avatar-t1Qo-_ou.js → animated-avatar-8TMEGliW.js} +1 -1
  12. package/dist/assets/{api-m0bzEzwy.js → api-CpkYV_q2.js} +1 -1
  13. package/dist/assets/{api-key-screen-DveWznV5.js → api-key-screen-DOeSQRdl.js} +1 -1
  14. package/dist/assets/{api-BSpBqWQF.js → api-qDsU6QKe.js} +1 -1
  15. package/dist/assets/{app-info-CBCBV0FS.js → app-info-CE0Wup60.js} +1 -1
  16. package/dist/assets/{archive-redirect-page-Cs58aCs5.js → archive-redirect-page-ChujcR5Q.js} +1 -1
  17. package/dist/assets/{assistant-feature-flag-store-B9VPCiA2.js → assistant-feature-flag-store-BH-mIJxx.js} +1 -1
  18. package/dist/assets/assistant-identity-store-D_L4IJs-.js +1 -0
  19. package/dist/assets/{assistant-status-panel-oOeNsJzS.js → assistant-status-panel-C7tnEVpS.js} +1 -1
  20. package/dist/assets/{auth-store-CYLzSHCH.js → auth-store-DPIpV04H.js} +2 -2
  21. package/dist/assets/{background-task-detail-panel-B-KWjOrw.js → background-task-detail-panel-z7k9O-v_.js} +1 -1
  22. package/dist/assets/billing-page-CA51jVZh.js +3 -0
  23. package/dist/assets/{billing-redirect-page-x7Oupr2j.js → billing-redirect-page-BJTfkf_y.js} +1 -1
  24. package/dist/assets/{bookmarks-page-CPLbyhN4.js → bookmarks-page-8FaCBqN2.js} +1 -1
  25. package/dist/assets/{browser-Cvgt8pGy.js → browser-P8oSo9Ms.js} +2 -2
  26. package/dist/assets/{build-state-D9QoVTeS.js → build-state-XxsueKj3.js} +1 -1
  27. package/dist/assets/{capture-error-DWBRXo5O.js → capture-error-EqyiBCqE.js} +1 -1
  28. package/dist/assets/{channels-page-route-B1SAQisZ.js → channels-page-route-Bd8hjcME.js} +2 -2
  29. package/dist/assets/{chat-markdown-message-CwrNmWrc.js → chat-markdown-message-CXLdPsVS.js} +2 -2
  30. package/dist/assets/{checkbox-B3knGCFG.js → checkbox-DDH8wdip.js} +1 -1
  31. package/dist/assets/{client-feature-flag-store-1EQrGwFG.js → client-feature-flag-store-DzvakVaI.js} +1 -1
  32. package/dist/assets/{client-identity-5dr2eLRF.js → client-identity-DMgU2REQ.js} +1 -1
  33. package/dist/assets/{command-palette-DPLCMZlr.js → command-palette-GTJI6h5g.js} +1 -1
  34. package/dist/assets/{command-palette-window-page-BFww6BSe.js → command-palette-window-page-BEMvySyW.js} +1 -1
  35. package/dist/assets/community-page-Dvww7lDX.js +1 -0
  36. package/dist/assets/{confirm-dialog-BPky-ipM.js → confirm-dialog-CPSA_qZw.js} +1 -1
  37. package/dist/assets/{connect-page-DAhcRWdW.js → connect-page-BhyD7RHL.js} +1 -1
  38. package/dist/assets/consent-Du7SstqI.js +1 -0
  39. package/dist/assets/{consent-controls-C5dV0gbt.js → consent-controls-CD8o394R.js} +1 -1
  40. package/dist/assets/{contacts-gateway-CPXgUIQc.js → contacts-gateway-BiIkFIwm.js} +1 -1
  41. package/dist/assets/contacts-page-route-DIXchrwv.js +1 -0
  42. package/dist/assets/{conversation-list-fetchers-CegnMeSi.js → conversation-list-fetchers-D3mWP_mn.js} +1 -1
  43. package/dist/assets/{conversation-store-CY9rjoVq.js → conversation-store-BF9mgHyk.js} +1 -1
  44. package/dist/assets/{credential-entry-page-Cwfzv2XR.js → credential-entry-page-GicdsEAA.js} +1 -1
  45. package/dist/assets/{credentials-page-DjDBPnnJ.js → credentials-page-BUG9HeAK.js} +1 -1
  46. package/dist/assets/{danger-zone-redirect-page-CTeRdzo1.js → danger-zone-redirect-page-nIx4m7Yq.js} +1 -1
  47. package/dist/assets/{debug-page-BXbIdrA1.js → debug-page-C15mBkEk.js} +3 -3
  48. package/dist/assets/{deploy-dialogs-oo5p1N5A.js → deploy-dialogs-PsqNtNxE.js} +1 -1
  49. package/dist/assets/{detail-card-BXslISTE.js → detail-card-U7kq944y.js} +1 -1
  50. package/dist/assets/{detail-panel-stop-button-QeX7HhfA.js → detail-panel-stop-button-CgVtr-pz.js} +1 -1
  51. package/dist/assets/{developer-page-Cj86RJNd.js → developer-page-BDE8Khbe.js} +1 -1
  52. package/dist/assets/{devices-redirect-page-Q4ioEMIc.js → devices-redirect-page-OYYhFvcH.js} +1 -1
  53. package/dist/assets/{diagnostics-Dfn3YU-n.js → diagnostics-BN0tm7PR.js} +1 -1
  54. package/dist/assets/{dictation-overlay-page-D_4Ke7AF.js → dictation-overlay-page-CgmEQS1N.js} +1 -1
  55. package/dist/assets/{dist-jctk0iWJ.js → dist-D_n-WHjD.js} +1 -1
  56. package/dist/assets/{dist-BcdNQOG_.js → dist-wKJrxq6J.js} +1 -1
  57. package/dist/assets/document-viewer-page-DTIKjMoO.js +1 -0
  58. package/dist/assets/{edge-swipe-arbiter-store-BMtFjpTP.js → edge-swipe-arbiter-store-zRJPRgBU.js} +1 -1
  59. package/dist/assets/effective-timezone-8F3mg6L0.js +1 -0
  60. package/dist/assets/{emails-page-D7B4t0wM.js → emails-page-BIwhTUqw.js} +1 -1
  61. package/dist/assets/{environment-store-BffvQ7cE.js → environment-store-Db43Vd5w.js} +1 -1
  62. package/dist/assets/esm-CP5RJ-5O.js +2 -0
  63. package/dist/assets/esm-CtdoT_Bj.js +2 -0
  64. package/dist/assets/{esm-CMZJ0NLd.js → esm-DUpFAuvm.js} +2 -2
  65. package/dist/assets/esm-DcaeMXfx.js +2 -0
  66. package/dist/assets/esm-eNslvlBv.js +2 -0
  67. package/dist/assets/esm-g6E0v_x2.js +1 -0
  68. package/dist/assets/esm-rNFdWsRC.js +2 -0
  69. package/dist/assets/{file-editor-CqD_ZBN2.js → file-editor-Qk0P1HQG.js} +1 -1
  70. package/dist/assets/{file-markdown-1cCkAeig.js → file-markdown-D93GqFTM.js} +1 -1
  71. package/dist/assets/general-page-ApPQmGoc.js +1 -0
  72. package/dist/assets/{haptics-Ds63G-ND.js → haptics-CpNWETti.js} +2 -2
  73. package/dist/assets/{hatching-screen-DMFsnzWN.js → hatching-screen-CBtAzWyS.js} +1 -1
  74. package/dist/assets/home-page-route-BUZEqGEU.js +1 -0
  75. package/dist/assets/{hosting-screen-CKP0Bv4Y.js → hosting-screen-C9KrQLkT.js} +1 -1
  76. package/dist/assets/identity-page-route-BD45YVGJ.js +7 -0
  77. package/dist/assets/index-C0CtAnlz.js +211 -0
  78. package/dist/assets/index-CdVB44Vu.css +2 -0
  79. package/dist/assets/{ingest-DRW7wREL.js → ingest-D3NTNAEG.js} +1 -1
  80. package/dist/assets/{inspect-page-BrTAvLum.js → inspect-page-CtcJJ0Ru.js} +3 -3
  81. package/dist/assets/{integrations-page-D4DXTmYo.js → integrations-page-k-_DK5ZI.js} +1 -1
  82. package/dist/assets/{intelligence-layout-C2H-bL9y.js → intelligence-layout-CnHRgfOJ.js} +1 -1
  83. package/dist/assets/{keyboard-shortcuts-redirect-page-1HT9y9MC.js → keyboard-shortcuts-redirect-page-Dd54rIBJ.js} +1 -1
  84. package/dist/assets/{latest-assistant-text-BLuivCij.js → latest-assistant-text-Crh-t5YF.js} +1 -1
  85. package/dist/assets/{library-detail-page-DNXQhLNc.js → library-detail-page-mv5Z5hj7.js} +1 -1
  86. package/dist/assets/{library-page-CeVLgU2f.js → library-page-Cpa4plNu.js} +1 -1
  87. package/dist/assets/{list-row-B-zluVHk.js → list-row-Bffrdhft.js} +1 -1
  88. package/dist/assets/{local-mode-BEOsCeey.js → local-mode-BZyeVbEM.js} +1 -1
  89. package/dist/assets/{login-flow-9lnZN2Jl.js → login-flow-DZ7cZrC8.js} +1 -1
  90. package/dist/assets/{login-page-C46JSVoX.js → login-page-DUaCECJw.js} +1 -1
  91. package/dist/assets/{logout-page-jH4AFONt.js → logout-page-CqPduvdV.js} +1 -1
  92. package/dist/assets/{logs-layout-BzQ4pe1_.js → logs-layout-D2pu8VM6.js} +1 -1
  93. package/dist/assets/machine-sizes-CP_wOncP.js +1 -0
  94. package/dist/assets/{memory-page-route-D01KMboS.js → memory-page-route-toZnoEWp.js} +1 -1
  95. package/dist/assets/{memory-router-playground-page-_Kb4cedz.js → memory-router-playground-page-CCegUckX.js} +1 -1
  96. package/dist/assets/{menu-vA7DTOap.js → menu-DQ3gePbA.js} +1 -1
  97. package/dist/assets/{messages-CyMiFLaG.js → messages-BIX2qg9a.js} +1 -1
  98. package/dist/assets/{metric-card-CrV07iUq.js → metric-card-DlweixbE.js} +1 -1
  99. package/dist/assets/{mobile-sidebar-drawer-CypkKgFM.js → mobile-sidebar-drawer-B1CKh_kD.js} +1 -1
  100. package/dist/assets/{modal-BwMACfj9.js → modal-BAYJ_gv8.js} +1 -1
  101. package/dist/assets/mutation-error-sKHH5VfP.js +1 -0
  102. package/dist/assets/{native-biometric-bmsKAXes.js → native-biometric-BoVRvON_.js} +1 -1
  103. package/dist/assets/{native-file-ic3pH1MN.js → native-file-BGcmWyHG.js} +2 -2
  104. package/dist/assets/{notice-DxTYVnpL.js → notice-DVOztYLG.js} +1 -1
  105. package/dist/assets/{notifications-page-C0nFiNjd.js → notifications-page-tc0Yl_eV.js} +1 -1
  106. package/dist/assets/{oauth-complete-page-B5SCiakd.js → oauth-complete-page-Bws_WZy9.js} +1 -1
  107. package/dist/assets/{oauth-popup-complete-page-4mbLC4DT.js → oauth-popup-complete-page-DASfOp7p.js} +1 -1
  108. package/dist/assets/{onboarding-store-BeNB5BOa.js → onboarding-store-y6sLKjey.js} +1 -1
  109. package/dist/assets/{page-empty-state-CenW1MAS.js → page-empty-state-VUyi7qOK.js} +1 -1
  110. package/dist/assets/{page-shell-C8iYxuQl.js → page-shell-DdVjYp3h.js} +1 -1
  111. package/dist/assets/{pairing-page-Cku1P4f1.js → pairing-page-B47URGD1.js} +1 -1
  112. package/dist/assets/{panel-item-B2OthqPQ.js → panel-item-BDy7QY-l.js} +1 -1
  113. package/dist/assets/{password-reset-page-DLKg_KLT.js → password-reset-page-DRyjEwXZ.js} +1 -1
  114. package/dist/assets/{personality-page-BR6iCgwT.js → personality-page-2StdpXU_.js} +1 -1
  115. package/dist/assets/plan-tier-meta-C5NVcdSd.js +1 -0
  116. package/dist/assets/plans-page-iU-QRn3r.js +1 -0
  117. package/dist/assets/{platform-detection-2-RH948U.js → platform-detection-ClNXTlqr.js} +1 -1
  118. package/dist/assets/{platform-loopback-page-qv4UcIt_.js → platform-loopback-page-C6LckEib.js} +1 -1
  119. package/dist/assets/{plugin-detail-page-CoXs4yXb.js → plugin-detail-page-D1rgzSD6.js} +1 -1
  120. package/dist/assets/{plugins-page-DNVfpJUD.js → plugins-page-C0z_UnVQ.js} +1 -1
  121. package/dist/assets/{popover-Bo_Uuj0u.js → popover-fomDLBqw.js} +1 -1
  122. package/dist/assets/{prefs-CHZvLt-r.js → prefs-5Fa_dSXx.js} +1 -1
  123. package/dist/assets/privacy-page-z-PiZhs_.js +1 -0
  124. package/dist/assets/{privacy-screen-Cv3htWuz.js → privacy-screen-BiqbmdE_.js} +1 -1
  125. package/dist/assets/{provider-callback-page-CiJ7B3R4.js → provider-callback-page-BH_1ie2b.js} +1 -1
  126. package/dist/assets/{provider-catalogs-DdiIdfb-.js → provider-catalogs-D_pxTzaP.js} +1 -1
  127. package/dist/assets/{provider-key-jprQFZ-x.js → provider-key-BDdLXK9A.js} +1 -1
  128. package/dist/assets/{provider-signup-page-C_QA5MST.js → provider-signup-page-CeB4Q2b0.js} +1 -1
  129. package/dist/assets/{quick-input-page-CN5yX8YN.js → quick-input-page-eQtToGio.js} +1 -1
  130. package/dist/assets/{react-query.gen-CEhhVehM.js → react-query.gen-DRJBX4Ra.js} +1 -1
  131. package/dist/assets/{remote-gateway-session-T1nYumFZ.js → remote-gateway-session-BfwzkHft.js} +1 -1
  132. package/dist/assets/{research-mock-page-B-HcAUhl.js → research-mock-page-DxFMVKd6.js} +1 -1
  133. package/dist/assets/{research-onboarding-persistence-BFQVhZfc.js → research-onboarding-persistence-BgnEo2ea.js} +1 -1
  134. package/dist/assets/{research-onboarding-route-cDoR7NJH.js → research-onboarding-route-Qy1U-XMQ.js} +2 -2
  135. package/dist/assets/resize-errors-Dq7Vom6v.js +1 -0
  136. package/dist/assets/{resolved-assistants-store-Dz6RYRLy.js → resolved-assistants-store-SYKKvZcj.js} +1 -1
  137. package/dist/assets/{return-to-BwxkOGDI.js → return-to-D4nbIcO_.js} +1 -1
  138. package/dist/assets/{review-terms-screen-Bfrtc1pt.js → review-terms-screen-D-oTm8p3.js} +1 -1
  139. package/dist/assets/{risk-9NBsMuKD.js → risk-BmGtcPcB.js} +1 -1
  140. package/dist/assets/routes-eiD3LJtx.js +1 -0
  141. package/dist/assets/{schedules-CccJFQhO.js → schedules-DWg_IXNR.js} +1 -1
  142. package/dist/assets/{schedules-page-Buh28bzx.js → schedules-page-Kj5Ecu5s.js} +1 -1
  143. package/dist/assets/{sdk.gen-CFlP6xtt.js → sdk.gen-BSsZdBJ6.js} +1 -1
  144. package/dist/assets/{security-redirect-page-BV_NfaFw.js → security-redirect-page-D1ZH6taQ.js} +1 -1
  145. package/dist/assets/select-assistant-screen-3VgCnyoH.js +1 -0
  146. package/dist/assets/{setting-row-BJM84uII.js → setting-row-DXR4ykR6.js} +1 -1
  147. package/dist/assets/{settings-divider-EnaaTmSe.js → settings-divider-DnIet4oD.js} +1 -1
  148. package/dist/assets/{settings-layout-BJxYyiYa.js → settings-layout-CZg5yP1R.js} +1 -1
  149. package/dist/assets/share-feedback-modal-BfLpYAJn.js +1 -0
  150. package/dist/assets/{sidebar-tree-CU36TSUD.js → sidebar-tree-nqUad5VP.js} +1 -1
  151. package/dist/assets/{signup-page-Bj_5r_uq.js → signup-page-OxGCHYdE.js} +1 -1
  152. package/dist/assets/{signup-shell-CHOG3IyE.js → signup-shell-DhOEyedN.js} +1 -1
  153. package/dist/assets/{site-favicon-MuwbDMQz.js → site-favicon-BKPXWWoI.js} +1 -1
  154. package/dist/assets/{skill-detail-page-WzPwj7bk.js → skill-detail-page-CPyUdufZ.js} +1 -1
  155. package/dist/assets/{skill-detail-panel-jiU-BAEk.js → skill-detail-panel-DNt_pbEe.js} +1 -1
  156. package/dist/assets/{skills-B1i3l-oV.js → skills-Cw2cPGuG.js} +1 -1
  157. package/dist/assets/{skills-page-Jrz2wj9g.js → skills-page-DXWiv2mu.js} +1 -1
  158. package/dist/assets/sliders-horizontal-BqJUzv5x.js +1 -0
  159. package/dist/assets/{sounds-redirect-page-nv8y9yQf.js → sounds-redirect-page-Ctcs6nyb.js} +1 -1
  160. package/dist/assets/{src-BYZfM6fJ.js → src-Dz1OJ5Xe.js} +1 -1
  161. package/dist/assets/{start-screen-GDguVgVD.js → start-screen-BueX7_aE.js} +1 -1
  162. package/dist/assets/{subagent-detail-panel-b4v7nZeQ.js → subagent-detail-panel-BF_cJyWl.js} +2 -2
  163. package/dist/assets/{subagent-store-D5gJYjk2.js → subagent-store-DCmgALBF.js} +1 -1
  164. package/dist/assets/superpowers-page-BEocqY-h.js +1 -0
  165. package/dist/assets/{system-events-page-CabgWUIN.js → system-events-page-CRsrNb1A.js} +1 -1
  166. package/dist/assets/{system-events-redirect-page-BLQZPEwA.js → system-events-redirect-page-D6xzat8P.js} +1 -1
  167. package/dist/assets/{tag-DXDmA1sC.js → tag-C0PH3-s4.js} +1 -1
  168. package/dist/assets/{theme-stage-page-BJmDXkIX.js → theme-stage-page-bHVPV0fm.js} +1 -1
  169. package/dist/assets/{tiptap-document-editor-DX3hZ1xo.js → tiptap-document-editor-CSo7Easc.js} +2 -2
  170. package/dist/assets/{toast-DTDPKedC.js → toast-DY_hb5KU.js} +1 -1
  171. package/dist/assets/{tool-detail-panel-BwsC_0KK.js → tool-detail-panel-C4femJO1.js} +1 -1
  172. package/dist/assets/{upgrade-cancel-page-NfV5EYVK.js → upgrade-cancel-page-BPTLP0Jg.js} +1 -1
  173. package/dist/assets/{upgrade-success-page-_mA7-_Tv.js → upgrade-success-page-CiSBEhBu.js} +1 -1
  174. package/dist/assets/{usage-redirect-page-BDBwl--E.js → usage-redirect-page-BPwKu4TW.js} +1 -1
  175. package/dist/assets/{use-active-assistant-id-AUBA6Ajw.js → use-active-assistant-id-CDpS5XaO.js} +1 -1
  176. package/dist/assets/{use-assistant-identity-details-DQtTJIaJ.js → use-assistant-identity-details-DEqgnlzB.js} +1 -1
  177. package/dist/assets/use-bus-subscription-DTEMz1uj.js +1 -0
  178. package/dist/assets/{use-edge-swipe-back-BL09SJUH.js → use-edge-swipe-back-BMZamAob.js} +1 -1
  179. package/dist/assets/{use-invite-link-dialog-Db0Gt0Hb.js → use-invite-link-dialog-DrXfhcRd.js} +1 -1
  180. package/dist/assets/use-is-org-ready-DPHHAGMn.js +1 -0
  181. package/dist/assets/{use-onboarding-login-AENqC7Or.js → use-onboarding-login-BBzUfmYO.js} +1 -1
  182. package/dist/assets/{use-reduced-motion-C8T4AelQ.js → use-reduced-motion-DgvFz95W.js} +1 -1
  183. package/dist/assets/{use-skill-actions-9slg_xUA.js → use-skill-actions-CWM6Nx2U.js} +1 -1
  184. package/dist/assets/{use-skill-detail-files-C-6OE-sf.js → use-skill-detail-files-AxI3gz1X.js} +1 -1
  185. package/dist/assets/users-Dvto6HvV.js +1 -0
  186. package/dist/assets/{utils-Da4xW4BF.js → utils-CuIE4SGk.js} +1 -1
  187. package/dist/assets/{viewer-store-BhHx00sQ.js → viewer-store-e9-qw_JR.js} +1 -1
  188. package/dist/assets/voice-page-DZAZbhBg.js +1 -0
  189. package/dist/assets/{weather-forecast-display-Bexx-tOD.js → weather-forecast-display-CWpOokSG.js} +1 -1
  190. package/dist/assets/{web-DmQI5cmP.js → web-B6XD8RKd.js} +1 -1
  191. package/dist/assets/{web-JY37S7Md.js → web-BIznYv7T.js} +1 -1
  192. package/dist/assets/{web-BOdZbCe4.js → web-BPm_-5mH.js} +1 -1
  193. package/dist/assets/{web-DqP4VnrT.js → web-Cxhg-Z7Y.js} +1 -1
  194. package/dist/assets/{web-oSSV5cLg.js → web-D71uswm-.js} +1 -1
  195. package/dist/assets/{web-S49FjuuT.js → web-DTznZ62I.js} +1 -1
  196. package/dist/assets/{web-Ddo_O6FO.js → web-Iqh_ObzT.js} +1 -1
  197. package/dist/assets/{web-BoUYVYB-.js → web-hNJsrz1V.js} +1 -1
  198. package/dist/assets/{welcome-screen-DZFkKqOP.js → welcome-screen-CqN4TjmF.js} +1 -1
  199. package/dist/assets/workflow-detail-panel-nxZz0zUY.js +1 -0
  200. package/dist/assets/workspace-page-ikPfwbP5.js +1 -0
  201. package/dist/index.html +125 -122
  202. package/package.json +1 -1
  203. package/dist/assets/ai-page-De4HhRBr.js +0 -1
  204. package/dist/assets/assistant-identity-store-CnxRDmZq.js +0 -1
  205. package/dist/assets/billing-page-BcgI2SQ8.js +0 -3
  206. package/dist/assets/community-page-CyCEk800.js +0 -1
  207. package/dist/assets/consent-Dem5VdWJ.js +0 -1
  208. package/dist/assets/contacts-page-route-CMeBTxiu.js +0 -1
  209. package/dist/assets/document-viewer-page-CfFMi0Sw.js +0 -1
  210. package/dist/assets/effective-timezone-07OCw2Cg.js +0 -1
  211. package/dist/assets/esm-BAY8zOfd.js +0 -2
  212. package/dist/assets/esm-BiTBJHmN.js +0 -2
  213. package/dist/assets/esm-Bp41gg6f.js +0 -2
  214. package/dist/assets/esm-COG_uFfb.js +0 -2
  215. package/dist/assets/esm-Ccv5Iqvw.js +0 -1
  216. package/dist/assets/esm-DT4NDEuP.js +0 -2
  217. package/dist/assets/general-page-BbdCY0fS.js +0 -1
  218. package/dist/assets/home-page-route-DRS1V8PF.js +0 -1
  219. package/dist/assets/identity-page-route-SJFAU5xX.js +0 -7
  220. package/dist/assets/index-CwXUhy2F.css +0 -2
  221. package/dist/assets/index-DXWD5kJ_.js +0 -211
  222. package/dist/assets/mutation-error-C1u1ykC6.js +0 -1
  223. package/dist/assets/privacy-page-Bo80_drx.js +0 -1
  224. package/dist/assets/resize-errors-BDudRGLc.js +0 -1
  225. package/dist/assets/routes-RtGNhNZ3.js +0 -1
  226. package/dist/assets/select-assistant-screen-F2Abh2Mg.js +0 -1
  227. package/dist/assets/share-feedback-modal-DJw7xK7E.js +0 -1
  228. package/dist/assets/superpowers-page-BgtP0phP.js +0 -1
  229. package/dist/assets/use-is-org-ready-BJdSJbr_.js +0 -1
  230. package/dist/assets/voice-page-kVj4beLV.js +0 -1
  231. package/dist/assets/workflow-detail-panel-D-pS1tGS.js +0 -1
  232. package/dist/assets/workspace-page-B7Z9LDbI.js +0 -1
  233. /package/dist/assets/{Combination-i0lvccrS.js → Combination-Cl0qbvCn.js} +0 -0
  234. /package/dist/assets/{api-errors-C6teDuOJ.js → api-errors-DNWYjUzX.js} +0 -0
  235. /package/dist/assets/{app-types-dFZ7zcAl.js → app-types-CPLnodn7.js} +0 -0
  236. /package/dist/assets/{avatar-bundled-components-CnRX88NT.js → avatar-bundled-components-BR1gDCjR.js} +0 -0
  237. /package/dist/assets/{avatar-svg-compositor-Cl0XprhK.js → avatar-svg-compositor-Cc4SMoMl.js} +0 -0
  238. /package/dist/assets/{browser-timezone-BEmli9kS.js → browser-timezone-B2VEIYkv.js} +0 -0
  239. /package/dist/assets/{build.umd-Z7aaxbdF.js → build.umd-oSNO-OgN.js} +0 -0
  240. /package/dist/assets/{by-tool-use-id-index-BgWa0GkL.js → by-tool-use-id-index-SzFsB307.js} +0 -0
  241. /package/dist/assets/{chat-DCxX6u8x.js → chat-BuCA_HeR.js} +0 -0
  242. /package/dist/assets/{client.gen-T8tvBLoj.js → client.gen-6-_D0Y3s.js} +0 -0
  243. /package/dist/assets/{cpu-1TmG9m0R.js → cpu-DuPtXZt_.js} +0 -0
  244. /package/dist/assets/{create-selectors-BMFBr-tH.js → create-selectors-BbPasxJ6.js} +0 -0
  245. /package/dist/assets/{definitions-C_5VYURy.js → definitions-Bqz3c8F6.js} +0 -0
  246. /package/dist/assets/{definitions-DyAtJXs3.js → definitions-DOIX6IPo.js} +0 -0
  247. /package/dist/assets/{dist-DS5iJwBJ2.js → dist-BbIM5YOh2.js} +0 -0
  248. /package/dist/assets/{dist-C2U6fptH.js → dist-BlzX3uOJ.js} +0 -0
  249. /package/dist/assets/{dist-BcvVs6Qn.js → dist-iSveTsvN.js} +0 -0
  250. /package/dist/assets/{domain-field-DKKi4dF-.js → domain-field-Bj9ReZlJ.js} +0 -0
  251. /package/dist/assets/{domains-D3QF404Q.js → domains-DMJk4PgF.js} +0 -0
  252. /package/dist/assets/{download-B6XjnEzx.js → download-CXYjvgB3.js} +0 -0
  253. /package/dist/assets/{dropdown-iuEqxfz1.js → dropdown-D1ytmf0F.js} +0 -0
  254. /package/dist/assets/{emoji-catalog-data-ZiR2qmj7.js → emoji-catalog-data-2JJNYpH_.js} +0 -0
  255. /package/dist/assets/{event-bus-DLOEVK-I.js → event-bus-CLQzQrf8.js} +0 -0
  256. /package/dist/assets/{external-link-Cczz6xJ4.js → external-link-5a-JuPGf.js} +0 -0
  257. /package/dist/assets/{eye-C2rSrbD-.js → eye-Cvo8rdU0.js} +0 -0
  258. /package/dist/assets/{eye-off-BQ9J3pF2.js → eye-off-BgOJcVXo.js} +0 -0
  259. /package/dist/assets/{feature-flag-catalog-BETdNFti.js → feature-flag-catalog-BMG0IJp5.js} +0 -0
  260. /package/dist/assets/{file-C8pjlmtk.js → file-D1SmEL-K.js} +0 -0
  261. /package/dist/assets/{file-text-DA128T4K.js → file-text-E5adVLLN.js} +0 -0
  262. /package/dist/assets/{folder-open-7DKBH5WB.js → folder-open-9vQalGTM.js} +0 -0
  263. /package/dist/assets/{format-file-size-BLrV7wUA.js → format-file-size-D1xR0gYX.js} +0 -0
  264. /package/dist/assets/{globe-DgKSh933.js → globe-inD5tOKN.js} +0 -0
  265. /package/dist/assets/{hard-drive-DVmyHlZR.js → hard-drive-BXh9qCfi.js} +0 -0
  266. /package/dist/assets/{impersonate-version-flag-CwwfWASp.js → impersonate-version-flag-2MqdDMfJ.js} +0 -0
  267. /package/dist/assets/{info-CqgkBvyS.js → info-DLFMsCl-.js} +0 -0
  268. /package/dist/assets/{input-C3JHwidH.js → input-Aa7YTuwq.js} +0 -0
  269. /package/dist/assets/{is-electron-BfJ5EybV.js → is-electron-f6weDa36.js} +0 -0
  270. /package/dist/assets/{key-round-CN4UKztQ.js → key-round-BggUE1Ns.js} +0 -0
  271. /package/dist/assets/{link-2-B9c5ZsFq.js → link-2-YnZe-oMg.js} +0 -0
  272. /package/dist/assets/{link-click-LdOstpIk.js → link-click-BGgGfjIf.js} +0 -0
  273. /package/dist/assets/{loader-circle-Ck8fq3yv.js → loader-circle-C9QrtO3C.js} +0 -0
  274. /package/dist/assets/{log-in-khREn0DP.js → log-in-Xv-AVlu8.js} +0 -0
  275. /package/dist/assets/{mic-DEmgi4rh.js → mic-Dmvwrxe8.js} +0 -0
  276. /package/dist/assets/{minimize-2-dsDfFPkN.js → minimize-2-B8VHIj-G.js} +0 -0
  277. /package/dist/assets/{misc-kEKtdOvw.js → misc-CEhFQ365.js} +0 -0
  278. /package/dist/assets/{monitor-BFX2ySFb.js → monitor-Cy7Q70-7.js} +0 -0
  279. /package/dist/assets/{moon-h3xmz34k.js → moon-jDX7sipq.js} +0 -0
  280. /package/dist/assets/{native-deep-link-VGyTlJ1r.js → native-deep-link-BuWa-YB7.js} +0 -0
  281. /package/dist/assets/{onboarding-step-layout-cz_jTAcR.js → onboarding-step-layout-CELgem3K.js} +0 -0
  282. /package/dist/assets/{optimistic-lifecycle-DqPbwF6F.js → optimistic-lifecycle-C4YFdBr3.js} +0 -0
  283. /package/dist/assets/{pdf-EV_WcScH.js → pdf-oAnz90ZS.js} +0 -0
  284. /package/dist/assets/{pencil-CsnkG5VN.js → pencil-BOTCmXXR.js} +0 -0
  285. /package/dist/assets/{plugin-attribution-CxIL2XiW.js → plugin-attribution-ByaMB3JX.js} +0 -0
  286. /package/dist/assets/{plus-DZZypDUF.js → plus-D54jrPDF.js} +0 -0
  287. /package/dist/assets/{pointer-CY6vXx_k.js → pointer-DHHKKCg8.js} +0 -0
  288. /package/dist/assets/{prechat-Dtu5kk5Y.js → prechat-qRQ4KcYS.js} +0 -0
  289. /package/dist/assets/{profile-metadata-VB4MBtgt.js → profile-metadata-DZwV-VFB.js} +0 -0
  290. /package/dist/assets/{progress-bar-nDEJBCTa.js → progress-bar-SOKQnJO7.js} +0 -0
  291. /package/dist/assets/{proxy-GIc5cOHK.js → proxy-Cm2z3P4f.js} +0 -0
  292. /package/dist/assets/{public-asset-DGdYMEa4.js → public-asset-DwjV5nZ3.js} +0 -0
  293. /package/dist/assets/{puzzle-C894zd87.js → puzzle-0_oQwgsv.js} +0 -0
  294. /package/dist/assets/{refresh-cw-cau3ebz1.js → refresh-cw-BkscUrbN.js} +0 -0
  295. /package/dist/assets/{repeat-BhXOPeQU.js → repeat-BRYsTqh_.js} +0 -0
  296. /package/dist/assets/{sdk.gen-BkPg0qwC.js → sdk.gen-CenbOmmb.js} +0 -0
  297. /package/dist/assets/{sdk.gen-DNK9B3EV.js → sdk.gen-DHuDeOTs.js} +0 -0
  298. /package/dist/assets/{semver-D1LWuVWG.js → semver-DKrC_c5_.js} +0 -0
  299. /package/dist/assets/{shield-check-C3mmA0Pk.js → shield-check-kgUZeU9b.js} +0 -0
  300. /package/dist/assets/{sparkles-BRtIitzJ.js → sparkles-DDIsk_nZ.js} +0 -0
  301. /package/dist/assets/{status-badge-pill-Bwe3k-op.js → status-badge-pill-DPz9khsT.js} +0 -0
  302. /package/dist/assets/{theme-preferences-Dc024H3l.js → theme-preferences-Chcmb54V.js} +0 -0
  303. /package/dist/assets/{three-dot-indicator-Ddu91mbW.js → three-dot-indicator-BuZzHFUJ.js} +0 -0
  304. /package/dist/assets/{toggle-DVRYkxHs.js → toggle-DOoEMtoI.js} +0 -0
  305. /package/dist/assets/{triangle-alert-9P--SPSP.js → triangle-alert-DXEpFOj_.js} +0 -0
  306. /package/dist/assets/{typed-storage-CiZjryGu.js → typed-storage-C5rUWwX6.js} +0 -0
  307. /package/dist/assets/{use-copy-to-clipboard-CwPMAqGY.js → use-copy-to-clipboard-Ap1ESW2j.js} +0 -0
  308. /package/dist/assets/{user-plus-Bff8IBv8.js → user-plus-Jr3b-fDv.js} +0 -0
  309. /package/dist/assets/{workflow-status-BjPX3_O_.js → workflow-status-BuGeg_Pe.js} +0 -0
  310. /package/dist/assets/{x-WIPQCgpZ.js → x-BlYc7ARd.js} +0 -0
  311. /package/dist/assets/{xterm-nJDJs-qz.js → xterm-DDweT7dw.js} +0 -0
  312. /package/dist/assets/{xterm-addon-fit-DgUD1LEf.js → xterm-addon-fit-CQtR6aLa.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{B as r,H as i,V as a,h as o,n as s,r as c,z as l}from"./proxy-GIc5cOHK.js";var u=n(),d=e(t(),1);function f(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function p(...e){return t=>{let n=!1,r=e.map(e=>{let r=f(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():f(e[t],null)}}}}function m(...e){return d.useCallback(p(...e),e)}var h=class extends d.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(o(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=o(e)&&e.offsetWidth||0,r=o(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function g({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,d.useId)(),s=(0,d.useRef)(null),l=(0,d.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:f}=(0,d.useContext)(c),p=m(s,e.props?.ref??e?.ref);return(0,d.useInsertionEffect)(()=>{let{width:e,height:c,top:u,left:d,right:p,bottom:m,direction:h}=l.current;if(t||a===!1||!s.current||!e||!c)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${d}`:g?`left: ${d}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${u}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);f&&(y.nonce=f);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{B as r,H as i,V as a,h as o,n as s,r as c,z as l}from"./proxy-Cm2z3P4f.js";var u=n(),d=e(t(),1);function f(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function p(...e){return t=>{let n=!1,r=e.map(e=>{let r=f(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():f(e[t],null)}}}}function m(...e){return d.useCallback(p(...e),e)}var h=class extends d.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(o(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=o(e)&&e.offsetWidth||0,r=o(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function g({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,d.useId)(),s=(0,d.useRef)(null),l=(0,d.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:f}=(0,d.useContext)(c),p=m(s,e.props?.ref??e?.ref);return(0,d.useInsertionEffect)(()=>{let{width:e,height:c,top:u,left:d,right:p,bottom:m,direction:h}=l.current;if(t||a===!1||!s.current||!e||!c)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${d}`:g?`left: ${d}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${u}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);f&&(y.nonce=f);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
2
2
  [data-motion-pop-id="${o}"] {
3
3
  position: absolute !important;
4
4
  width: ${e}px !important;
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./misc-kEKtdOvw.js";import{t as i}from"./format-file-size-BLrV7wUA.js";var a=e(t(),1),o=n(),s={verified:{label:`Verified`,className:`bg-[var(--system-positive-weak)] text-[var(--system-positive-strong)]`},signed:{label:`Signed`,className:`bg-[var(--system-info-weak)] text-[var(--system-info-strong)]`},unsigned:{label:`Unsigned`,className:`bg-[var(--surface-active)] text-[var(--content-secondary)]`},tampered:{label:`Tampered — signature invalid`,className:`bg-[var(--system-negative-weak)] text-[var(--system-negative-strong)]`}};function c(){let[e,t]=(0,a.useState)(null),[n,c]=(0,a.useState)(!1);if((0,a.useEffect)(()=>{window.vellum?.bundleConfirm?.getData().then(e=>{e&&t(e)})},[]),!e)return(0,o.jsx)(`div`,{className:`flex h-svh w-screen items-center justify-center bg-background text-muted-foreground select-none`,children:`Loading...`});let{manifest:l,scanResult:u,signatureResult:d,bundleSizeBytes:f}=e,p=s[d.trustTier],m=d.trustTier===`tampered`,h=u.warnings;return(0,o.jsxs)(`div`,{className:`flex h-svh w-screen flex-col bg-background px-6 pt-14 pb-6 text-foreground select-none`,children:[(0,o.jsxs)(`div`,{className:`flex items-start gap-3`,children:[l.icon?(0,o.jsx)(`span`,{className:`text-5xl leading-none`,children:l.icon}):(0,o.jsx)(`span`,{className:`text-5xl leading-none`,children:`📦`}),(0,o.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,o.jsx)(`h1`,{className:`truncate text-lg font-semibold`,children:l.name}),l.description&&(0,o.jsx)(`p`,{className:`text-muted-foreground mt-0.5 text-sm leading-snug`,children:l.description})]})]}),(0,o.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,o.jsx)(`span`,{className:r(`inline-block rounded-full px-2.5 py-0.5 text-xs font-medium`,p.className),children:p.label}),d.trustTier===`signed`&&d.signerDisplayName&&(0,o.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`by `,d.signerDisplayName]})]}),(0,o.jsxs)(`dl`,{className:`mt-4 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5 text-sm`,children:[(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Size`}),(0,o.jsx)(`dd`,{children:i(f)}),(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Created by`}),(0,o.jsx)(`dd`,{className:`truncate`,children:l.created_by}),l.capabilities.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Capabilities`}),(0,o.jsx)(`dd`,{className:`truncate`,children:l.capabilities.join(`, `)})]})]}),h.length>0&&(0,o.jsxs)(`div`,{className:`mt-4`,children:[(0,o.jsxs)(`button`,{type:`button`,className:`text-muted-foreground text-xs font-medium hover:underline`,onClick:()=>c(e=>!e),children:[n?`Hide`:`Show`,` Warnings (`,h.length,`)`]}),n&&(0,o.jsx)(`ul`,{className:`mt-1.5 space-y-1 text-xs`,children:h.map((e,t)=>(0,o.jsx)(`li`,{className:`rounded bg-[var(--system-mid-weak)] px-2 py-1 text-[var(--system-mid-strong)]`,children:e},t))})]}),(0,o.jsxs)(`div`,{className:`mt-auto flex items-center justify-end gap-3 pt-4`,children:[(0,o.jsx)(`button`,{type:`button`,className:`rounded-md border border-border px-4 py-1.5 text-sm font-medium text-foreground hover:bg-muted`,onClick:()=>window.vellum?.bundleConfirm?.respond(!1),children:`Cancel`}),(0,o.jsx)(`button`,{type:`button`,className:r(`rounded-md px-4 py-1.5 text-sm font-medium text-white`,m?`bg-red-600 hover:bg-red-700`:`bg-primary hover:bg-primary/90`),onClick:()=>window.vellum?.bundleConfirm?.respond(!0),children:m?`Install Anyway`:`Install`})]})]})}export{c as BundleConfirmPage};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./misc-CEhFQ365.js";import{t as i}from"./format-file-size-D1xR0gYX.js";var a=e(t(),1),o=n(),s={verified:{label:`Verified`,className:`bg-[var(--system-positive-weak)] text-[var(--system-positive-strong)]`},signed:{label:`Signed`,className:`bg-[var(--system-info-weak)] text-[var(--system-info-strong)]`},unsigned:{label:`Unsigned`,className:`bg-[var(--surface-active)] text-[var(--content-secondary)]`},tampered:{label:`Tampered — signature invalid`,className:`bg-[var(--system-negative-weak)] text-[var(--system-negative-strong)]`}};function c(){let[e,t]=(0,a.useState)(null),[n,c]=(0,a.useState)(!1);if((0,a.useEffect)(()=>{window.vellum?.bundleConfirm?.getData().then(e=>{e&&t(e)})},[]),!e)return(0,o.jsx)(`div`,{className:`flex h-svh w-screen items-center justify-center bg-background text-muted-foreground select-none`,children:`Loading...`});let{manifest:l,scanResult:u,signatureResult:d,bundleSizeBytes:f}=e,p=s[d.trustTier],m=d.trustTier===`tampered`,h=u.warnings;return(0,o.jsxs)(`div`,{className:`flex h-svh w-screen flex-col bg-background px-6 pt-14 pb-6 text-foreground select-none`,children:[(0,o.jsxs)(`div`,{className:`flex items-start gap-3`,children:[l.icon?(0,o.jsx)(`span`,{className:`text-5xl leading-none`,children:l.icon}):(0,o.jsx)(`span`,{className:`text-5xl leading-none`,children:`📦`}),(0,o.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,o.jsx)(`h1`,{className:`truncate text-lg font-semibold`,children:l.name}),l.description&&(0,o.jsx)(`p`,{className:`text-muted-foreground mt-0.5 text-sm leading-snug`,children:l.description})]})]}),(0,o.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,o.jsx)(`span`,{className:r(`inline-block rounded-full px-2.5 py-0.5 text-xs font-medium`,p.className),children:p.label}),d.trustTier===`signed`&&d.signerDisplayName&&(0,o.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`by `,d.signerDisplayName]})]}),(0,o.jsxs)(`dl`,{className:`mt-4 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5 text-sm`,children:[(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Size`}),(0,o.jsx)(`dd`,{children:i(f)}),(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Created by`}),(0,o.jsx)(`dd`,{className:`truncate`,children:l.created_by}),l.capabilities.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Capabilities`}),(0,o.jsx)(`dd`,{className:`truncate`,children:l.capabilities.join(`, `)})]})]}),h.length>0&&(0,o.jsxs)(`div`,{className:`mt-4`,children:[(0,o.jsxs)(`button`,{type:`button`,className:`text-muted-foreground text-xs font-medium hover:underline`,onClick:()=>c(e=>!e),children:[n?`Hide`:`Show`,` Warnings (`,h.length,`)`]}),n&&(0,o.jsx)(`ul`,{className:`mt-1.5 space-y-1 text-xs`,children:h.map((e,t)=>(0,o.jsx)(`li`,{className:`rounded bg-[var(--system-mid-weak)] px-2 py-1 text-[var(--system-mid-strong)]`,children:e},t))})]}),(0,o.jsxs)(`div`,{className:`mt-auto flex items-center justify-end gap-3 pt-4`,children:[(0,o.jsx)(`button`,{type:`button`,className:`rounded-md border border-border px-4 py-1.5 text-sm font-medium text-foreground hover:bg-muted`,onClick:()=>window.vellum?.bundleConfirm?.respond(!1),children:`Cancel`}),(0,o.jsx)(`button`,{type:`button`,className:r(`rounded-md px-4 py-1.5 text-sm font-medium text-white`,m?`bg-red-600 hover:bg-red-700`:`bg-primary hover:bg-primary/90`),onClick:()=>window.vellum?.bundleConfirm?.respond(!0),children:m?`Install Anyway`:`Install`})]})]})}export{c as BundleConfirmPage};
@@ -1 +1 @@
1
- import{c as e}from"./routes-RtGNhNZ3.js";function t(t){let n=typeof window<`u`?window.location.origin:``,r=new URLSearchParams({senderAssistantId:t.senderAssistantId,token:t.token});return`${n}${e.connect}?${r.toString()}`}function n(e){let t=e.get(`senderAssistantId`)?.trim(),n=e.get(`token`)?.trim();return!t||!n?null:{senderAssistantId:t,token:n}}export{n,t};
1
+ import{c as e}from"./routes-eiD3LJtx.js";function t(t){let n=typeof window<`u`?window.location.origin:``,r=new URLSearchParams({senderAssistantId:t.senderAssistantId,token:t.token});return`${n}${e.connect}?${r.toString()}`}function n(e){let t=e.get(`senderAssistantId`)?.trim(),n=e.get(`token`)?.trim();return!t||!n?null:{senderAssistantId:t,token:n}}export{n,t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./is-electron-BfJ5EybV.js";import{n as i,t as a}from"./app-info-CBCBV0FS.js";var o=e(t(),1),s=n();function c(){let[e,t]=(0,o.useState)(null);(0,o.useEffect)(()=>{a().then(t)},[]);let n=e??l;return(0,s.jsxs)(`div`,{className:`flex h-svh w-screen flex-col items-center justify-center bg-background px-8 pt-14 pb-8 text-center text-foreground select-none`,children:[(0,s.jsx)(`h1`,{className:`mt-4 text-2xl font-semibold`,children:n.appName}),(0,s.jsx)(`p`,{className:`text-muted-foreground mt-1 mb-7 text-xs`,children:`AI assistant for your Mac`}),(0,s.jsxs)(`dl`,{className:`mb-7 grid grid-cols-[auto_auto] gap-x-4 gap-y-1.5 text-sm`,children:[(0,s.jsx)(`dt`,{className:`text-muted-foreground text-right`,children:`Version`}),(0,s.jsx)(`dd`,{className:`text-left font-mono tabular-nums select-text`,children:n.version}),(0,s.jsx)(`dt`,{className:`text-muted-foreground text-right`,children:`Build`}),(0,s.jsx)(`dd`,{className:`text-left font-mono tabular-nums select-text`,children:n.commitSha})]}),(0,s.jsx)(`a`,{href:n.website,className:`text-primary text-sm hover:underline`,onClick:e=>{r()&&(e.preventDefault(),i())},children:new URL(n.website).host}),(0,s.jsx)(`div`,{className:`text-muted-foreground mt-auto pt-6 text-[11px]`,children:n.copyright})]})}var l={appName:`Vellum`,version:`—`,commitSha:`—`,copyright:`© ${new Date().getFullYear()} Vellum`,website:`https://vellum.ai`};export{c as AboutPage};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./is-electron-f6weDa36.js";import{n as i,t as a}from"./app-info-CE0Wup60.js";var o=e(t(),1),s=n();function c(){let[e,t]=(0,o.useState)(null);(0,o.useEffect)(()=>{a().then(t)},[]);let n=e??l;return(0,s.jsxs)(`div`,{className:`flex h-svh w-screen flex-col items-center justify-center bg-background px-8 pt-14 pb-8 text-center text-foreground select-none`,children:[(0,s.jsx)(`h1`,{className:`mt-4 text-2xl font-semibold`,children:n.appName}),(0,s.jsx)(`p`,{className:`text-muted-foreground mt-1 mb-7 text-xs`,children:`AI assistant for your Mac`}),(0,s.jsxs)(`dl`,{className:`mb-7 grid grid-cols-[auto_auto] gap-x-4 gap-y-1.5 text-sm`,children:[(0,s.jsx)(`dt`,{className:`text-muted-foreground text-right`,children:`Version`}),(0,s.jsx)(`dd`,{className:`text-left font-mono tabular-nums select-text`,children:n.version}),(0,s.jsx)(`dt`,{className:`text-muted-foreground text-right`,children:`Build`}),(0,s.jsx)(`dd`,{className:`text-left font-mono tabular-nums select-text`,children:n.commitSha})]}),(0,s.jsx)(`a`,{href:n.website,className:`text-primary text-sm hover:underline`,onClick:e=>{r()&&(e.preventDefault(),i())},children:new URL(n.website).host}),(0,s.jsx)(`div`,{className:`text-muted-foreground mt-auto pt-6 text-[11px]`,children:n.copyright})]})}var l={appName:`Vellum`,version:`—`,commitSha:`—`,copyright:`© ${new Date().getFullYear()} Vellum`,website:`https://vellum.ai`};export{c as AboutPage};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{a as i,n as a,s as o}from"./auth-store-CYLzSHCH.js";import{f as s}from"./native-biometric-bmsKAXes.js";import{c}from"./routes-RtGNhNZ3.js";import{n as l,t as u}from"./login-flow-9lnZN2Jl.js";import{ga as d}from"./index-DXWD5kJ_.js";import{r as f,t as p}from"./account-shell-BmBmnWdX.js";var m=e(t(),1),h=r();function g(){let e=i(),t=o(),r=a.use.user(),g=a.use.logout(),[_,v]=(0,m.useState)(null),[y,b]=(0,m.useState)(!1),x=async()=>{v(null),b(!0);try{await s(l,u)}catch(e){console.error(`[account] auth flow failed:`,e),v(`Something went wrong. Please try again.`),b(!1)}};return t?(0,h.jsx)(p,{children:(0,h.jsx)(f,{title:`Loading...`})}):e?(0,h.jsxs)(p,{children:[(0,h.jsx)(f,{title:`Welcome${r?.username?`, ${r.username}`:``}!`,subtitle:`You are signed in.`}),(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,h.jsx)(n,{to:c.assistant,className:`inline-flex w-full items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] no-underline transition-colors hover:bg-[var(--primary-hover)]`,children:`Go to your assistant`}),(0,h.jsx)(`button`,{type:`button`,onClick:async()=>{await g(),d(c.account.login)},className:`cursor-pointer bg-transparent text-sm font-normal text-[var(--content-secondary)] transition-colors hover:text-[var(--content-default)]`,children:`Sign out`})]})]}):(0,h.jsxs)(p,{children:[(0,h.jsx)(f,{title:`Welcome to Vellum`,subtitle:`Sign in to get started.`}),_&&(0,h.jsx)(`p`,{className:`text-center text-sm text-[var(--system-negative-strong)]`,children:_}),(0,h.jsx)(`div`,{className:`flex flex-col items-center gap-4`,children:(0,h.jsx)(`button`,{type:`button`,onClick:()=>void x(),disabled:y,className:`inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] transition-colors hover:bg-[var(--primary-hover)] disabled:opacity-50`,children:`Sign in`})})]})}export{g as AccountPage};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{a as i,n as a,s as o}from"./auth-store-DPIpV04H.js";import{f as s}from"./native-biometric-BoVRvON_.js";import{c}from"./routes-eiD3LJtx.js";import{n as l,t as u}from"./login-flow-DZ7cZrC8.js";import{ga as d}from"./index-C0CtAnlz.js";import{r as f,t as p}from"./account-shell-C7QpzomH.js";var m=e(t(),1),h=r();function g(){let e=i(),t=o(),r=a.use.user(),g=a.use.logout(),[_,v]=(0,m.useState)(null),[y,b]=(0,m.useState)(!1),x=async()=>{v(null),b(!0);try{await s(l,u)}catch(e){console.error(`[account] auth flow failed:`,e),v(`Something went wrong. Please try again.`),b(!1)}};return t?(0,h.jsx)(p,{children:(0,h.jsx)(f,{title:`Loading...`})}):e?(0,h.jsxs)(p,{children:[(0,h.jsx)(f,{title:`Welcome${r?.username?`, ${r.username}`:``}!`,subtitle:`You are signed in.`}),(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,h.jsx)(n,{to:c.assistant,className:`inline-flex w-full items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] no-underline transition-colors hover:bg-[var(--primary-hover)]`,children:`Go to your assistant`}),(0,h.jsx)(`button`,{type:`button`,onClick:async()=>{await g(),d(c.account.login)},className:`cursor-pointer bg-transparent text-sm font-normal text-[var(--content-secondary)] transition-colors hover:text-[var(--content-default)]`,children:`Sign out`})]})]}):(0,h.jsxs)(p,{children:[(0,h.jsx)(f,{title:`Welcome to Vellum`,subtitle:`Sign in to get started.`}),_&&(0,h.jsx)(`p`,{className:`text-center text-sm text-[var(--system-negative-strong)]`,children:_}),(0,h.jsx)(`div`,{className:`flex flex-col items-center gap-4`,children:(0,h.jsx)(`button`,{type:`button`,onClick:()=>void x(),disabled:y,className:`inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] transition-colors hover:bg-[var(--primary-hover)] disabled:opacity-50`,children:`Sign in`})})]})}export{g as AccountPage};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{t}from"./notice-DxTYVnpL.js";import"./src-BYZfM6fJ.js";var n=e(),r=(0,n.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,n.jsx)(`path`,{d:`M7.5 15L12.5 10L7.5 5`,stroke:`currentColor`,strokeWidth:`1.67`,strokeLinecap:`round`,strokeLinejoin:`round`})});function i({onSubmit:e,error:i,children:a,submitLabel:o,submittingLabel:s,isSubmitting:c,footer:l}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(`form`,{onSubmit:e,className:`flex flex-col gap-4`,children:[i&&(0,n.jsx)(t,{tone:`error`,children:i}),(0,n.jsx)(`div`,{className:`flex flex-col gap-3`,children:a}),(0,n.jsxs)(`button`,{type:`submit`,disabled:c,className:`mt-2 inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] transition-colors hover:bg-[var(--primary-hover)] disabled:cursor-wait disabled:opacity-50`,children:[c?s:o,r]})]}),l&&(0,n.jsx)(`div`,{className:`mt-8 text-center`,children:l})]})}function a(e){return(0,n.jsx)(`input`,{...e,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] px-4 py-3 text-sm text-[var(--content-default)] outline-none placeholder:text-[var(--content-tertiary)] focus:border-[var(--primary-base)]/50`})}function o({title:e,subtitle:t}){return(0,n.jsxs)(`div`,{className:`mb-8 text-center`,children:[(0,n.jsx)(`h1`,{className:`mb-2 font-serif text-[2rem] font-bold italic text-[var(--content-default)]`,children:e}),t&&(0,n.jsx)(`p`,{className:`text-sm text-[var(--content-secondary)]`,children:t})]})}function s({children:e}){return(0,n.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-[var(--surface-base)]`,children:(0,n.jsx)(`div`,{className:`w-full max-w-[480px] px-6`,children:(0,n.jsx)(`div`,{className:`flex flex-col items-center gap-10`,children:(0,n.jsx)(`div`,{className:`w-full`,children:e})})})})}export{a as i,i as n,o as r,s as t};
1
+ import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{t}from"./notice-DVOztYLG.js";import"./src-Dz1OJ5Xe.js";var n=e(),r=(0,n.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,n.jsx)(`path`,{d:`M7.5 15L12.5 10L7.5 5`,stroke:`currentColor`,strokeWidth:`1.67`,strokeLinecap:`round`,strokeLinejoin:`round`})});function i({onSubmit:e,error:i,children:a,submitLabel:o,submittingLabel:s,isSubmitting:c,footer:l}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(`form`,{onSubmit:e,className:`flex flex-col gap-4`,children:[i&&(0,n.jsx)(t,{tone:`error`,children:i}),(0,n.jsx)(`div`,{className:`flex flex-col gap-3`,children:a}),(0,n.jsxs)(`button`,{type:`submit`,disabled:c,className:`mt-2 inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] transition-colors hover:bg-[var(--primary-hover)] disabled:cursor-wait disabled:opacity-50`,children:[c?s:o,r]})]}),l&&(0,n.jsx)(`div`,{className:`mt-8 text-center`,children:l})]})}function a(e){return(0,n.jsx)(`input`,{...e,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] px-4 py-3 text-sm text-[var(--content-default)] outline-none placeholder:text-[var(--content-tertiary)] focus:border-[var(--primary-base)]/50`})}function o({title:e,subtitle:t}){return(0,n.jsxs)(`div`,{className:`mb-8 text-center`,children:[(0,n.jsx)(`h1`,{className:`mb-2 font-serif text-[2rem] font-bold italic text-[var(--content-default)]`,children:e}),t&&(0,n.jsx)(`p`,{className:`text-sm text-[var(--content-secondary)]`,children:t})]})}function s({children:e}){return(0,n.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-[var(--surface-base)]`,children:(0,n.jsx)(`div`,{className:`w-full max-w-[480px] px-6`,children:(0,n.jsx)(`div`,{className:`flex flex-col items-center gap-10`,children:(0,n.jsx)(`div`,{className:`w-full`,children:e})})})})}export{a as i,i as n,o as r,s as t};
@@ -1,5 +1,5 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-DWBRXo5O.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-BQVYX8n_.js";import{t as i}from"./jsx-runtime-CVSDxk6A.js";import{t as a}from"./typography-Cqi8q9o7.js";import{t as o}from"./createLucideIcon-Bjb-Kuq7.js";import{t as s}from"./arrow-left-C2re-gYj.js";import{t as c}from"./brain-Ci5ws6Wl.js";import{t as l}from"./chevron-down-DpYf9Gwq.js";import{t as u}from"./chevron-right-jRymmL7S.js";import{t as d}from"./circle-check-DqvTjWle.js";import{w as f}from"./menu-vA7DTOap.js";import{t as p}from"./code-B_ruRFrX.js";import{t as m}from"./file-text-DA128T4K.js";import{t as h}from"./globe-DgKSh933.js";import{t as g}from"./repeat-BhXOPeQU.js";import{t as _}from"./triangle-alert-9P--SPSP.js";import{t as v}from"./x-WIPQCgpZ.js";import"./src-BYZfM6fJ.js";import{t as y}from"./tag-DXDmA1sC.js";import{t as b}from"./chat-markdown-message-CwrNmWrc.js";import{t as x}from"./three-dot-indicator-Ddu91mbW.js";import{At as S,Mt as C,No as ee,Nt as w,Oo as te,Os as ne,Po as re,To as T,Zo as ie,_t as ae,gt as oe,jt as E,vt as D,wo as se,xs as ce}from"./index-DXWD5kJ_.js";import{t as le}from"./status-badge-pill-Bwe3k-op.js";var ue=o(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),de=o(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),O=e(n(),1),k=``;function A(e,t){switch(e){case`complete`:case`completed`:return`completed`;case`failed`:case`error`:return`error`;case void 0:return t;default:return`running`}}function fe(e){return(e.messageId?.startsWith(`local-marker-`)??!1)||(e.content?.startsWith(`↻ Steering: `)??!1)}function j(e){let t=e??``;return t.startsWith(`↻ Steering: `)?t.slice(S.length):t}function M(e){let t=e[e.length-1];t&&(t.kind===`agent`||t.kind===`thinking`)&&!t.isComplete&&(e[e.length-1]={...t,isComplete:!0})}function N(e,t){if(t.updateType===`agent_message_chunk`&&fe(t)){M(e),e.push({kind:`user`,id:t.messageId??`steer-${e.length}`,content:j(t.content)});return}switch(t.updateType){case`user_message_chunk`:{let n=t.messageId??k,r=j(t.content),i=e[e.length-1];i&&i.kind===`user`&&i.id===n?e[e.length-1]={...i,content:i.content+r}:(M(e),e.push({kind:`user`,id:n,content:r}));let a=e[e.length-1].content;for(let t=0;t<e.length-1;t++){let n=e[t];if(n.kind===`user`&&n.id.startsWith(`local-marker-`)&&n.content===a){e.splice(t,1);break}}return}case`agent_message_chunk`:{let n=t.messageId??k,r=e[e.length-1];if(r&&r.kind===`agent`&&r.messageId===n){e[e.length-1]={...r,content:r.content+(t.content??``)};return}if(n!==k&&r&&r.kind===`agent`&&r.messageId===k&&!r.isComplete&&r.content===(t.content??``)){e[e.length-1]={...r,messageId:n};return}M(e),e.push({kind:`agent`,messageId:n,content:t.content??``,isComplete:!1});return}case`agent_thought_chunk`:{let n=t.messageId??k,r=e[e.length-1];if(r&&r.kind===`thinking`&&r.messageId===n){e[e.length-1]={...r,content:r.content+(t.content??``)};return}M(e),e.push({kind:`thinking`,messageId:n,content:t.content??``,isComplete:!1});return}case`tool_call`:{let n=t.toolCallId;if(n===void 0)return;M(e),e.push({kind:`tool`,toolCallId:n,title:t.toolTitle??``,toolKind:t.toolKind,status:A(t.toolStatus,`running`),content:t.content,locations:P(t),rawInput:t.rawInput,rawOutput:t.rawOutput});return}case`tool_call_update`:{let n=t.toolCallId;if(n===void 0)return;let r=e.findIndex(e=>e.kind===`tool`&&e.toolCallId===n);if(r===-1)return;let i=e[r],a=P(t);e[r]={...i,title:t.toolTitle??i.title,toolKind:t.toolKind??i.toolKind,status:A(t.toolStatus,i.status),content:t.content??i.content,locations:a??i.locations,rawInput:t.rawInput===void 0?i.rawInput:t.rawInput,rawOutput:t.rawOutput===void 0?i.rawOutput:t.rawOutput};return}case`plan`:{let n=pe(t.content);if(n===null)return;let r=e.findIndex(e=>e.kind===`plan`),i={kind:`plan`,entries:n};r===-1?(M(e),e.push(i)):e[r]=i;return}}}function P(e){let t=e.locations;if(!Array.isArray(t))return;let n=[];for(let e of t){let t=e??{};typeof t.path==`string`&&n.push(typeof t.line==`number`?{path:t.path,line:t.line}:{path:t.path})}return n}function pe(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}let n=Array.isArray(t)?t:Array.isArray(t?.entries)?t.entries:null;return n===null?null:n.map(e=>{let t=e??{},n=t.content??t.label??``;return{label:typeof n==`string`?n:String(n),checked:t.checked===!0||t.status===`completed`}})}function me(e){let t=[];for(let n of e)N(t,n);return t}function F(e,t){if(e===t)return{kind:`identity`};if(e===null)return{kind:`first`};if(t.length<e.length)return{kind:`fallback`};for(let n=0;n<e.length;n++)if(e[n]!==t[n])return n===e.length-1&&t.length===e.length?{kind:`mutate-last`}:{kind:`fallback`};return t.length===e.length?{kind:`identity`}:{kind:`append`,from:e.length}}function I(){let e=null,t=[];function n(n){return t=me(n),e=n,t}function r(r){let i=F(e,r);switch(i.kind){case`identity`:return t;case`first`:return n(r);case`append`:{let n=t.slice();for(let e=i.from;e<r.length;e++)N(n,r[e]);return e=r,t=n,t}case`mutate-last`:case`fallback`:return n(r)}}return{project:r}}function L(e){let t=(0,O.useRef)(null);return t.current??=I(),t.current.project(e)}function R(e){if(!e)return[];let t;try{t=JSON.parse(e)}catch{let t=e.trimStart();return t.startsWith(`{`)||t.startsWith(`[`)?[]:[{type:`content`,text:e}]}let n=Array.isArray(t)?t:[t],r=[];for(let e of n){let t=z(e);t&&r.push(t)}return r}function z(e){if(typeof e!=`object`||!e)return null;let t=e;switch(t.type){case`content`:return{type:`content`,text:he(t.content)};case`diff`:return typeof t.path!=`string`||typeof t.newText!=`string`?null:{type:`diff`,path:t.path,newText:t.newText,...typeof t.oldText==`string`?{oldText:t.oldText}:{}};case`terminal`:{let e=ge(t);return e===void 0?{type:`terminal`}:{type:`terminal`,text:e}}default:return null}}function he(e){if(typeof e==`string`)return e;if(typeof e==`object`&&e){let t=e.text;if(typeof t==`string`)return t}return``}function ge(e){if(typeof e.text==`string`)return e.text;if(typeof e.output==`string`)return e.output;if(typeof e.content==`string`)return e.content;if(typeof e.content==`object`&&e.content!==null){let t=e.content.text;if(typeof t==`string`)return t}}function B(e){if(typeof e!=`object`||!e)return;let t=e.command;return typeof t==`string`?t:void 0}function V(e){return R(e).filter(e=>e.type===`content`||e.type===`terminal`).map(e=>`text`in e?e.text??``:``).filter(e=>e.length>0).join(`
2
- `)}function H(e){if(e!=null){if(typeof e==`string`)return e;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}}function U(e,t){let n=new Map;for(let t of e)t.type===`diff`&&n.set(t.path,{path:t.path,newText:t.newText,...t.oldText===void 0?{}:{oldText:t.oldText}});for(let e of t??[])n.has(e.path)||n.set(e.path,{path:e.path});return Array.from(n.values())}var W=i();function _e({content:e,isComplete:t}){return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-agent-message`,className:`flex w-full flex-col items-start text-chat text-[var(--content-default)]`,children:[(0,W.jsx)(b,{content:e}),!t&&(0,W.jsx)(x,{className:`mt-1`,"data-testid":`acp-chat-agent-streaming`})]})}function ve({entries:e}){return e.length===0?null:(0,W.jsxs)(`div`,{"data-testid":`acp-chat-plan-block`,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3`,children:[(0,W.jsxs)(`div`,{className:`mb-2 flex items-center gap-1.5 text-[var(--content-tertiary)]`,children:[(0,W.jsx)(ie,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(a,{variant:`body-small-emphasised`,className:`text-inherit`,children:`Plan`})]}),(0,W.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.map((e,t)=>(0,W.jsxs)(`li`,{"data-testid":`acp-chat-plan-entry`,"data-checked":e.checked,className:`flex items-start gap-2`,children:[e.checked?(0,W.jsx)(d,{"aria-hidden":!0,className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}):(0,W.jsx)(f,{"aria-hidden":!0,className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-disabled)]`}),(0,W.jsx)(`span`,{className:e.checked?`text-body-small-default text-[var(--content-tertiary)] line-through`:`text-body-small-default text-[var(--content-default)]`,children:e.label})]},t))})]})}function ye(e){switch(e){case`max_tokens`:case`max_turn_requests`:return`Stopped: limit reached`;case`refusal`:return`Refused`;case`cancelled`:return`Cancelled`;default:return`Completed`}}function be(e){return new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function G({completedAt:e}){return e===void 0?null:(0,W.jsxs)(`span`,{"data-testid":`acp-chat-terminal-time`,children:[`at `,be(e)]})}function xe({status:e,stopReason:t,error:n,completedAt:r}){if(w(e))return null;if(e===`failed`)return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`failed`,className:`flex items-start gap-2 rounded-lg bg-[var(--system-negative-weak)] px-3 py-2 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,W.jsx)(`span`,{"aria-hidden":!0,"data-testid":`acp-chat-terminal-failed-icon`,className:`flex h-[12px] w-4 shrink-0 items-center justify-center`,children:(0,W.jsx)(_,{className:`h-4 w-4`})}),(0,W.jsx)(`span`,{children:n??`Run failed`})]});if(e===`cancelled`)return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`cancelled`,className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,W.jsx)(ce,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`}),(0,W.jsx)(`span`,{children:`Cancelled`}),(0,W.jsx)(G,{completedAt:r})]});let i=ye(t);return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`completed`,className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,W.jsx)(d,{"aria-hidden":!0,className:`h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}),(0,W.jsx)(`span`,{children:i}),(0,W.jsx)(G,{completedAt:r})]})}function Se({showDot:e,isLast:t,children:n}){return(0,W.jsxs)(`div`,{className:`relative flex items-start gap-2${t?``:` pb-4`}`,children:[!t&&(0,W.jsx)(`div`,{"aria-hidden":!0,className:`absolute bottom-0 left-[6.5px] w-px bg-[var(--border-element)] ${e?`top-[16px]`:`top-0`}`}),e?(0,W.jsx)(`span`,{"aria-hidden":!0,"data-testid":`acp-chat-timeline-dot`,className:`flex h-[14px] w-[14px] shrink-0 items-center justify-center`,children:(0,W.jsx)(`span`,{className:`h-[5px] w-[5px] rounded-full bg-[var(--content-disabled)]`})}):(0,W.jsx)(`span`,{"aria-hidden":!0,className:`h-[14px] w-[14px] shrink-0`}),(0,W.jsx)(`div`,{className:`min-w-0 flex-1`,children:n})]})}function Ce({content:e,isComplete:t}){let[n,r]=(0,O.useState)(null),i=n??!t,a=e.trim().length>0,o=t?`Thought process`:`Thinking`,s=t?(0,W.jsx)(c,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(x,{dotSize:5,className:`shrink-0`,"data-testid":`acp-chat-thinking-streaming`});return a?(0,W.jsxs)(`div`,{"data-testid":`acp-chat-thinking-block`,className:`w-full`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-expanded":i,onClick:()=>r(!i),"data-testid":`acp-chat-thinking-toggle`,className:`flex w-full items-center gap-1.5 text-body-small-default text-[var(--content-tertiary)] transition-colors hover:text-[var(--content-secondary)]`,children:[i?(0,W.jsx)(l,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(u,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),s,(0,W.jsx)(`span`,{children:o})]}),i&&(0,W.jsx)(`div`,{"data-testid":`acp-chat-thinking-body`,className:`mt-1.5 border-l-2 border-[var(--border-base)] pl-3 text-body-small-default text-[var(--content-tertiary)]`,children:(0,W.jsx)(b,{content:e})})]}):(0,W.jsx)(`div`,{"data-testid":`acp-chat-thinking-block`,className:`w-full`,children:(0,W.jsxs)(`div`,{className:`flex w-full items-center gap-1.5 text-body-small-default text-[var(--content-tertiary)]`,children:[s,(0,W.jsx)(`span`,{children:o})]})})}var we={running:`neutral`,completed:`positive`,error:`negative`,ended:`neutral`},Te={running:`Running`,completed:`Completed`,error:`Failed`,ended:`Ended`},Ee={read:`Read file`,edit:`Edit file`,delete:`Delete file`,move:`Move file`,search:`Search`,execute:`Run command`,think:`Thinking`,fetch:`Fetch`,switch_mode:`Switch mode`},De=`Tool call`,Oe={read:m,edit:ue,delete:se,move:de,search:re,execute:T,think:c,fetch:h,switch_mode:g},ke=new Set([`read`,`edit`,`delete`,`move`]);function Ae({toolKind:e}){return(0,W.jsx)(e&&Oe[e]||p,{"aria-hidden":!0,className:`h-4 w-4 shrink-0 text-[var(--content-tertiary)]`})}function K({label:e,value:t,testId:n}){return(0,W.jsxs)(`div`,{"data-testid":n,children:[(0,W.jsx)(`div`,{className:`mb-1 text-body-small-default text-[var(--content-tertiary)]`,children:e}),(0,W.jsx)(`pre`,{className:`max-h-60 overflow-auto rounded-md border border-[var(--border-element)] bg-[var(--surface-base)] p-2.5 font-mono text-body-small-default text-[var(--content-secondary)]`,children:t})]})}function je({block:e,isTerminal:t=!1,onOpenDiff:n,onOpenOutput:r}){let[i,o]=(0,O.useState)(!1),s=(0,O.useMemo)(()=>R(e.content),[e.content]),c=(0,O.useMemo)(()=>V(e.content),[e.content]),d=(0,O.useMemo)(()=>c.split(`
3
- `).map(e=>e.trim()).find(e=>e.length>0&&!e.startsWith("```"))||`View output`,[c]),f=(0,O.useMemo)(()=>U(s,e.locations),[s,e.locations]),p=t&&e.status===`running`?`ended`:e.status,h=p===`running`,g=e.toolKind&&Ee[e.toolKind]||De,_=B(e.rawInput)??e.title,v=_&&_!==g&&(!ke.has(e.toolKind??``)||f.length===0)?_:null,b=H(e.rawInput),S=H(e.rawOutput),C=b!==void 0||S!==void 0;return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-tool-card`,"data-status":e.status,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(Ae,{toolKind:e.toolKind}),(0,W.jsx)(a,{variant:`body-small-emphasised`,className:`min-w-0 flex-1 truncate text-[var(--content-default)]`,title:e.title,children:g}),(0,W.jsx)(y,{tone:we[p],"data-testid":`acp-chat-tool-status`,children:Te[p]}),h&&(0,W.jsx)(x,{className:`shrink-0`,"data-testid":`acp-chat-tool-running`})]}),v&&(0,W.jsx)(`div`,{"data-testid":`acp-chat-tool-detail`,className:`mt-1.5 font-mono text-body-small-default whitespace-pre-wrap break-words text-[var(--content-secondary)]`,children:v}),f.length>0&&(0,W.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:f.map(t=>{let r=t.oldText!==void 0||t.newText!==void 0,i=`flex max-w-full items-center gap-1.5 rounded-md border border-[var(--border-base)] bg-[var(--surface-base)] px-2 py-1 text-body-small-default text-[var(--content-secondary)]`;return r?(0,W.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-file-chip`,onClick:()=>n(e.toolCallId,t),title:t.path,className:`${i} cursor-pointer transition-colors hover:bg-[var(--surface-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--border-focus)]`,children:[(0,W.jsx)(m,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate font-mono`,children:t.path})]},t.path):(0,W.jsxs)(`span`,{"data-testid":`acp-chat-tool-file-ref`,title:t.path,className:i,children:[(0,W.jsx)(m,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate font-mono`,children:t.path})]},t.path)})}),c.length>0&&(0,W.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-output-open`,onClick:()=>r?.(e.toolCallId),className:`mt-2 flex w-full items-center gap-2 rounded-md border border-[var(--border-element)] bg-[var(--surface-base)] px-2.5 py-2 text-left transition-colors hover:bg-[var(--surface-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--border-focus)]`,children:[(0,W.jsx)(T,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0 text-[var(--content-tertiary)]`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-body-small-default text-[var(--content-secondary)]`,children:d}),(0,W.jsx)(u,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0 text-[var(--content-tertiary)]`})]}),C&&(0,W.jsxs)(`div`,{className:`mt-2`,"data-testid":`acp-chat-tool-raw`,children:[(0,W.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-raw-toggle`,"aria-expanded":i,onClick:()=>o(e=>!e),className:`flex items-center gap-1 text-body-small-default text-[var(--content-tertiary)] transition-colors hover:text-[var(--content-default)]`,children:[i?(0,W.jsx)(l,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(u,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{children:i?`Hide raw input/output`:`Show raw input/output`})]}),i&&(0,W.jsxs)(`div`,{className:`mt-1.5 flex flex-col gap-2`,children:[b!==void 0&&(0,W.jsx)(K,{label:`Raw input`,value:b,testId:`acp-chat-tool-raw-input`}),S!==void 0&&(0,W.jsx)(K,{label:`Raw output`,value:S,testId:`acp-chat-tool-raw-output`})]})]})]})}function Me({content:e}){return(0,W.jsx)(`div`,{"data-testid":`acp-chat-user-turn`,className:`flex w-full justify-end`,children:(0,W.jsx)(`div`,{className:`max-w-[80%] rounded-lg bg-[var(--surface-lift)] px-4 py-3 whitespace-pre-wrap text-chat text-[var(--content-default)]`,children:e})})}function Ne(e,t){let n=e=>new Intl.NumberFormat(void 0,{style:`currency`,currency:t}).format(e);return e>0&&e<.01?`<${n(.01)}`:n(e)}var q=new Intl.NumberFormat(`en-US`);function J({label:e,value:t}){return(0,W.jsxs)(`div`,{className:`flex items-baseline gap-1`,"data-usage-stat":e.toLowerCase(),children:[(0,W.jsx)(a,{variant:`label-small-default`,className:`text-[var(--content-tertiary)]`,children:e}),(0,W.jsx)(a,{variant:`body-small-default`,className:`text-[var(--content-secondary)] tabular-nums`,children:t})]})}function Pe({entry:e}){let{inputTokens:t,outputTokens:n,costAmount:r,costCurrency:i}=e;if(t===void 0&&n===void 0)return null;let a=t??0,o=n??0,s=r!=null&&i!=null;return(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,"data-testid":`acp-usage-meter`,children:[(0,W.jsx)(J,{label:`Input`,value:q.format(a)}),(0,W.jsx)(J,{label:`Output`,value:q.format(o)}),s&&(0,W.jsx)(J,{label:`Cost`,value:Ne(r,i)})]})}function Fe({content:e}){return(0,W.jsx)(`div`,{"data-testid":`acp-chat-command-output`,className:`rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3 [&_pre]:!max-h-none`,children:(0,W.jsx)(b,{content:V(e),hardLineBreaks:!0})})}var Y=2e3;function X(e){if(e===``)return[];let t=e.split(`
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-EqyiBCqE.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-BQVYX8n_.js";import{t as i}from"./jsx-runtime-CVSDxk6A.js";import{t as a}from"./typography-Cqi8q9o7.js";import{t as o}from"./createLucideIcon-Bjb-Kuq7.js";import{t as s}from"./arrow-left-C2re-gYj.js";import{t as c}from"./brain-Ci5ws6Wl.js";import{t as l}from"./chevron-down-DpYf9Gwq.js";import{t as u}from"./chevron-right-jRymmL7S.js";import{t as d}from"./circle-check-DqvTjWle.js";import{w as f}from"./menu-DQ3gePbA.js";import{t as p}from"./code-B_ruRFrX.js";import{t as m}from"./file-text-E5adVLLN.js";import{t as h}from"./globe-inD5tOKN.js";import{t as g}from"./repeat-BRYsTqh_.js";import{t as _}from"./triangle-alert-DXEpFOj_.js";import{t as v}from"./x-BlYc7ARd.js";import"./src-Dz1OJ5Xe.js";import{t as y}from"./tag-C0PH3-s4.js";import{t as b}from"./chat-markdown-message-CXLdPsVS.js";import{t as x}from"./three-dot-indicator-BuZzHFUJ.js";import{At as S,Co as C,Eo as w,Es as ee,Mo as T,Mt as te,Nt as E,So as ne,Yo as re,_t as ie,gt as ae,jo as oe,jt as D,vt as se,ys as ce}from"./index-C0CtAnlz.js";import{t as le}from"./status-badge-pill-DPz9khsT.js";var ue=o(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),de=o(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),O=e(n(),1),k=``;function A(e,t){switch(e){case`complete`:case`completed`:return`completed`;case`failed`:case`error`:return`error`;case void 0:return t;default:return`running`}}function fe(e){return(e.messageId?.startsWith(`local-marker-`)??!1)||(e.content?.startsWith(`↻ Steering: `)??!1)}function j(e){let t=e??``;return t.startsWith(`↻ Steering: `)?t.slice(S.length):t}function M(e){let t=e[e.length-1];t&&(t.kind===`agent`||t.kind===`thinking`)&&!t.isComplete&&(e[e.length-1]={...t,isComplete:!0})}function N(e,t){if(t.updateType===`agent_message_chunk`&&fe(t)){M(e),e.push({kind:`user`,id:t.messageId??`steer-${e.length}`,content:j(t.content)});return}switch(t.updateType){case`user_message_chunk`:{let n=t.messageId??k,r=j(t.content),i=e[e.length-1];i&&i.kind===`user`&&i.id===n?e[e.length-1]={...i,content:i.content+r}:(M(e),e.push({kind:`user`,id:n,content:r}));let a=e[e.length-1].content;for(let t=0;t<e.length-1;t++){let n=e[t];if(n.kind===`user`&&n.id.startsWith(`local-marker-`)&&n.content===a){e.splice(t,1);break}}return}case`agent_message_chunk`:{let n=t.messageId??k,r=e[e.length-1];if(r&&r.kind===`agent`&&r.messageId===n){e[e.length-1]={...r,content:r.content+(t.content??``)};return}if(n!==k&&r&&r.kind===`agent`&&r.messageId===k&&!r.isComplete&&r.content===(t.content??``)){e[e.length-1]={...r,messageId:n};return}M(e),e.push({kind:`agent`,messageId:n,content:t.content??``,isComplete:!1});return}case`agent_thought_chunk`:{let n=t.messageId??k,r=e[e.length-1];if(r&&r.kind===`thinking`&&r.messageId===n){e[e.length-1]={...r,content:r.content+(t.content??``)};return}M(e),e.push({kind:`thinking`,messageId:n,content:t.content??``,isComplete:!1});return}case`tool_call`:{let n=t.toolCallId;if(n===void 0)return;M(e),e.push({kind:`tool`,toolCallId:n,title:t.toolTitle??``,toolKind:t.toolKind,status:A(t.toolStatus,`running`),content:t.content,locations:P(t),rawInput:t.rawInput,rawOutput:t.rawOutput});return}case`tool_call_update`:{let n=t.toolCallId;if(n===void 0)return;let r=e.findIndex(e=>e.kind===`tool`&&e.toolCallId===n);if(r===-1)return;let i=e[r],a=P(t);e[r]={...i,title:t.toolTitle??i.title,toolKind:t.toolKind??i.toolKind,status:A(t.toolStatus,i.status),content:t.content??i.content,locations:a??i.locations,rawInput:t.rawInput===void 0?i.rawInput:t.rawInput,rawOutput:t.rawOutput===void 0?i.rawOutput:t.rawOutput};return}case`plan`:{let n=pe(t.content);if(n===null)return;let r=e.findIndex(e=>e.kind===`plan`),i={kind:`plan`,entries:n};r===-1?(M(e),e.push(i)):e[r]=i;return}}}function P(e){let t=e.locations;if(!Array.isArray(t))return;let n=[];for(let e of t){let t=e??{};typeof t.path==`string`&&n.push(typeof t.line==`number`?{path:t.path,line:t.line}:{path:t.path})}return n}function pe(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}let n=Array.isArray(t)?t:Array.isArray(t?.entries)?t.entries:null;return n===null?null:n.map(e=>{let t=e??{},n=t.content??t.label??``;return{label:typeof n==`string`?n:String(n),checked:t.checked===!0||t.status===`completed`}})}function me(e){let t=[];for(let n of e)N(t,n);return t}function F(e,t){if(e===t)return{kind:`identity`};if(e===null)return{kind:`first`};if(t.length<e.length)return{kind:`fallback`};for(let n=0;n<e.length;n++)if(e[n]!==t[n])return n===e.length-1&&t.length===e.length?{kind:`mutate-last`}:{kind:`fallback`};return t.length===e.length?{kind:`identity`}:{kind:`append`,from:e.length}}function I(){let e=null,t=[];function n(n){return t=me(n),e=n,t}function r(r){let i=F(e,r);switch(i.kind){case`identity`:return t;case`first`:return n(r);case`append`:{let n=t.slice();for(let e=i.from;e<r.length;e++)N(n,r[e]);return e=r,t=n,t}case`mutate-last`:case`fallback`:return n(r)}}return{project:r}}function L(e){let t=(0,O.useRef)(null);return t.current??=I(),t.current.project(e)}function R(e){if(!e)return[];let t;try{t=JSON.parse(e)}catch{let t=e.trimStart();return t.startsWith(`{`)||t.startsWith(`[`)?[]:[{type:`content`,text:e}]}let n=Array.isArray(t)?t:[t],r=[];for(let e of n){let t=z(e);t&&r.push(t)}return r}function z(e){if(typeof e!=`object`||!e)return null;let t=e;switch(t.type){case`content`:return{type:`content`,text:he(t.content)};case`diff`:return typeof t.path!=`string`||typeof t.newText!=`string`?null:{type:`diff`,path:t.path,newText:t.newText,...typeof t.oldText==`string`?{oldText:t.oldText}:{}};case`terminal`:{let e=ge(t);return e===void 0?{type:`terminal`}:{type:`terminal`,text:e}}default:return null}}function he(e){if(typeof e==`string`)return e;if(typeof e==`object`&&e){let t=e.text;if(typeof t==`string`)return t}return``}function ge(e){if(typeof e.text==`string`)return e.text;if(typeof e.output==`string`)return e.output;if(typeof e.content==`string`)return e.content;if(typeof e.content==`object`&&e.content!==null){let t=e.content.text;if(typeof t==`string`)return t}}function B(e){if(typeof e!=`object`||!e)return;let t=e.command;return typeof t==`string`?t:void 0}function V(e){return R(e).filter(e=>e.type===`content`||e.type===`terminal`).map(e=>`text`in e?e.text??``:``).filter(e=>e.length>0).join(`
2
+ `)}function H(e){if(e!=null){if(typeof e==`string`)return e;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}}function U(e,t){let n=new Map;for(let t of e)t.type===`diff`&&n.set(t.path,{path:t.path,newText:t.newText,...t.oldText===void 0?{}:{oldText:t.oldText}});for(let e of t??[])n.has(e.path)||n.set(e.path,{path:e.path});return Array.from(n.values())}var W=i();function _e({content:e,isComplete:t}){return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-agent-message`,className:`flex w-full flex-col items-start text-chat text-[var(--content-default)]`,children:[(0,W.jsx)(b,{content:e}),!t&&(0,W.jsx)(x,{className:`mt-1`,"data-testid":`acp-chat-agent-streaming`})]})}function ve({entries:e}){return e.length===0?null:(0,W.jsxs)(`div`,{"data-testid":`acp-chat-plan-block`,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3`,children:[(0,W.jsxs)(`div`,{className:`mb-2 flex items-center gap-1.5 text-[var(--content-tertiary)]`,children:[(0,W.jsx)(re,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(a,{variant:`body-small-emphasised`,className:`text-inherit`,children:`Plan`})]}),(0,W.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.map((e,t)=>(0,W.jsxs)(`li`,{"data-testid":`acp-chat-plan-entry`,"data-checked":e.checked,className:`flex items-start gap-2`,children:[e.checked?(0,W.jsx)(d,{"aria-hidden":!0,className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}):(0,W.jsx)(f,{"aria-hidden":!0,className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-disabled)]`}),(0,W.jsx)(`span`,{className:e.checked?`text-body-small-default text-[var(--content-tertiary)] line-through`:`text-body-small-default text-[var(--content-default)]`,children:e.label})]},t))})]})}function ye(e){switch(e){case`max_tokens`:case`max_turn_requests`:return`Stopped: limit reached`;case`refusal`:return`Refused`;case`cancelled`:return`Cancelled`;default:return`Completed`}}function be(e){return new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function G({completedAt:e}){return e===void 0?null:(0,W.jsxs)(`span`,{"data-testid":`acp-chat-terminal-time`,children:[`at `,be(e)]})}function xe({status:e,stopReason:t,error:n,completedAt:r}){if(E(e))return null;if(e===`failed`)return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`failed`,className:`flex items-start gap-2 rounded-lg bg-[var(--system-negative-weak)] px-3 py-2 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,W.jsx)(`span`,{"aria-hidden":!0,"data-testid":`acp-chat-terminal-failed-icon`,className:`flex h-[12px] w-4 shrink-0 items-center justify-center`,children:(0,W.jsx)(_,{className:`h-4 w-4`})}),(0,W.jsx)(`span`,{children:n??`Run failed`})]});if(e===`cancelled`)return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`cancelled`,className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,W.jsx)(ce,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`}),(0,W.jsx)(`span`,{children:`Cancelled`}),(0,W.jsx)(G,{completedAt:r})]});let i=ye(t);return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`completed`,className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,W.jsx)(d,{"aria-hidden":!0,className:`h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}),(0,W.jsx)(`span`,{children:i}),(0,W.jsx)(G,{completedAt:r})]})}function Se({showDot:e,isLast:t,children:n}){return(0,W.jsxs)(`div`,{className:`relative flex items-start gap-2${t?``:` pb-4`}`,children:[!t&&(0,W.jsx)(`div`,{"aria-hidden":!0,className:`absolute bottom-0 left-[6.5px] w-px bg-[var(--border-element)] ${e?`top-[16px]`:`top-0`}`}),e?(0,W.jsx)(`span`,{"aria-hidden":!0,"data-testid":`acp-chat-timeline-dot`,className:`flex h-[14px] w-[14px] shrink-0 items-center justify-center`,children:(0,W.jsx)(`span`,{className:`h-[5px] w-[5px] rounded-full bg-[var(--content-disabled)]`})}):(0,W.jsx)(`span`,{"aria-hidden":!0,className:`h-[14px] w-[14px] shrink-0`}),(0,W.jsx)(`div`,{className:`min-w-0 flex-1`,children:n})]})}function Ce({content:e,isComplete:t}){let[n,r]=(0,O.useState)(null),i=n??!t,a=e.trim().length>0,o=t?`Thought process`:`Thinking`,s=t?(0,W.jsx)(c,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(x,{dotSize:5,className:`shrink-0`,"data-testid":`acp-chat-thinking-streaming`});return a?(0,W.jsxs)(`div`,{"data-testid":`acp-chat-thinking-block`,className:`w-full`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-expanded":i,onClick:()=>r(!i),"data-testid":`acp-chat-thinking-toggle`,className:`flex w-full items-center gap-1.5 text-body-small-default text-[var(--content-tertiary)] transition-colors hover:text-[var(--content-secondary)]`,children:[i?(0,W.jsx)(l,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(u,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),s,(0,W.jsx)(`span`,{children:o})]}),i&&(0,W.jsx)(`div`,{"data-testid":`acp-chat-thinking-body`,className:`mt-1.5 border-l-2 border-[var(--border-base)] pl-3 text-body-small-default text-[var(--content-tertiary)]`,children:(0,W.jsx)(b,{content:e})})]}):(0,W.jsx)(`div`,{"data-testid":`acp-chat-thinking-block`,className:`w-full`,children:(0,W.jsxs)(`div`,{className:`flex w-full items-center gap-1.5 text-body-small-default text-[var(--content-tertiary)]`,children:[s,(0,W.jsx)(`span`,{children:o})]})})}var we={running:`neutral`,completed:`positive`,error:`negative`,ended:`neutral`},Te={running:`Running`,completed:`Completed`,error:`Failed`,ended:`Ended`},Ee={read:`Read file`,edit:`Edit file`,delete:`Delete file`,move:`Move file`,search:`Search`,execute:`Run command`,think:`Thinking`,fetch:`Fetch`,switch_mode:`Switch mode`},De=`Tool call`,Oe={read:m,edit:ue,delete:ne,move:de,search:T,execute:C,think:c,fetch:h,switch_mode:g},ke=new Set([`read`,`edit`,`delete`,`move`]);function Ae({toolKind:e}){return(0,W.jsx)(e&&Oe[e]||p,{"aria-hidden":!0,className:`h-4 w-4 shrink-0 text-[var(--content-tertiary)]`})}function K({label:e,value:t,testId:n}){return(0,W.jsxs)(`div`,{"data-testid":n,children:[(0,W.jsx)(`div`,{className:`mb-1 text-body-small-default text-[var(--content-tertiary)]`,children:e}),(0,W.jsx)(`pre`,{className:`max-h-60 overflow-auto rounded-md border border-[var(--border-element)] bg-[var(--surface-base)] p-2.5 font-mono text-body-small-default text-[var(--content-secondary)]`,children:t})]})}function je({block:e,isTerminal:t=!1,onOpenDiff:n,onOpenOutput:r}){let[i,o]=(0,O.useState)(!1),s=(0,O.useMemo)(()=>R(e.content),[e.content]),c=(0,O.useMemo)(()=>V(e.content),[e.content]),d=(0,O.useMemo)(()=>c.split(`
3
+ `).map(e=>e.trim()).find(e=>e.length>0&&!e.startsWith("```"))||`View output`,[c]),f=(0,O.useMemo)(()=>U(s,e.locations),[s,e.locations]),p=t&&e.status===`running`?`ended`:e.status,h=p===`running`,g=e.toolKind&&Ee[e.toolKind]||De,_=B(e.rawInput)??e.title,v=_&&_!==g&&(!ke.has(e.toolKind??``)||f.length===0)?_:null,b=H(e.rawInput),S=H(e.rawOutput),w=b!==void 0||S!==void 0;return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-tool-card`,"data-status":e.status,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(Ae,{toolKind:e.toolKind}),(0,W.jsx)(a,{variant:`body-small-emphasised`,className:`min-w-0 flex-1 truncate text-[var(--content-default)]`,title:e.title,children:g}),(0,W.jsx)(y,{tone:we[p],"data-testid":`acp-chat-tool-status`,children:Te[p]}),h&&(0,W.jsx)(x,{className:`shrink-0`,"data-testid":`acp-chat-tool-running`})]}),v&&(0,W.jsx)(`div`,{"data-testid":`acp-chat-tool-detail`,className:`mt-1.5 font-mono text-body-small-default whitespace-pre-wrap break-words text-[var(--content-secondary)]`,children:v}),f.length>0&&(0,W.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:f.map(t=>{let r=t.oldText!==void 0||t.newText!==void 0,i=`flex max-w-full items-center gap-1.5 rounded-md border border-[var(--border-base)] bg-[var(--surface-base)] px-2 py-1 text-body-small-default text-[var(--content-secondary)]`;return r?(0,W.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-file-chip`,onClick:()=>n(e.toolCallId,t),title:t.path,className:`${i} cursor-pointer transition-colors hover:bg-[var(--surface-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--border-focus)]`,children:[(0,W.jsx)(m,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate font-mono`,children:t.path})]},t.path):(0,W.jsxs)(`span`,{"data-testid":`acp-chat-tool-file-ref`,title:t.path,className:i,children:[(0,W.jsx)(m,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate font-mono`,children:t.path})]},t.path)})}),c.length>0&&(0,W.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-output-open`,onClick:()=>r?.(e.toolCallId),className:`mt-2 flex w-full items-center gap-2 rounded-md border border-[var(--border-element)] bg-[var(--surface-base)] px-2.5 py-2 text-left transition-colors hover:bg-[var(--surface-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--border-focus)]`,children:[(0,W.jsx)(C,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0 text-[var(--content-tertiary)]`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-body-small-default text-[var(--content-secondary)]`,children:d}),(0,W.jsx)(u,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0 text-[var(--content-tertiary)]`})]}),w&&(0,W.jsxs)(`div`,{className:`mt-2`,"data-testid":`acp-chat-tool-raw`,children:[(0,W.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-raw-toggle`,"aria-expanded":i,onClick:()=>o(e=>!e),className:`flex items-center gap-1 text-body-small-default text-[var(--content-tertiary)] transition-colors hover:text-[var(--content-default)]`,children:[i?(0,W.jsx)(l,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(u,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{children:i?`Hide raw input/output`:`Show raw input/output`})]}),i&&(0,W.jsxs)(`div`,{className:`mt-1.5 flex flex-col gap-2`,children:[b!==void 0&&(0,W.jsx)(K,{label:`Raw input`,value:b,testId:`acp-chat-tool-raw-input`}),S!==void 0&&(0,W.jsx)(K,{label:`Raw output`,value:S,testId:`acp-chat-tool-raw-output`})]})]})]})}function Me({content:e}){return(0,W.jsx)(`div`,{"data-testid":`acp-chat-user-turn`,className:`flex w-full justify-end`,children:(0,W.jsx)(`div`,{className:`max-w-[80%] rounded-lg bg-[var(--surface-lift)] px-4 py-3 whitespace-pre-wrap text-chat text-[var(--content-default)]`,children:e})})}function Ne(e,t){let n=e=>new Intl.NumberFormat(void 0,{style:`currency`,currency:t}).format(e);return e>0&&e<.01?`<${n(.01)}`:n(e)}var q=new Intl.NumberFormat(`en-US`);function J({label:e,value:t}){return(0,W.jsxs)(`div`,{className:`flex items-baseline gap-1`,"data-usage-stat":e.toLowerCase(),children:[(0,W.jsx)(a,{variant:`label-small-default`,className:`text-[var(--content-tertiary)]`,children:e}),(0,W.jsx)(a,{variant:`body-small-default`,className:`text-[var(--content-secondary)] tabular-nums`,children:t})]})}function Pe({entry:e}){let{inputTokens:t,outputTokens:n,costAmount:r,costCurrency:i}=e;if(t===void 0&&n===void 0)return null;let a=t??0,o=n??0,s=r!=null&&i!=null;return(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,"data-testid":`acp-usage-meter`,children:[(0,W.jsx)(J,{label:`Input`,value:q.format(a)}),(0,W.jsx)(J,{label:`Output`,value:q.format(o)}),s&&(0,W.jsx)(J,{label:`Cost`,value:Ne(r,i)})]})}function Fe({content:e}){return(0,W.jsx)(`div`,{"data-testid":`acp-chat-command-output`,className:`rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3 [&_pre]:!max-h-none`,children:(0,W.jsx)(b,{content:V(e),hardLineBreaks:!0})})}var Y=2e3;function X(e){if(e===``)return[];let t=e.split(`
4
4
  `);return e.endsWith(`
5
- `)&&t.pop(),t}function Ie(e,t){let n=e.length,r=t.length,i=Array.from({length:n+1},()=>Array(r+1).fill(0));for(let a=n-1;a>=0;a--)for(let n=r-1;n>=0;n--)i[a][n]=e[a]===t[n]?i[a+1][n+1]+1:Math.max(i[a+1][n],i[a][n+1]);let a=[],o=0,s=0;for(;o<n&&s<r;)e[o]===t[s]?(a.push({type:`ctx`,text:e[o],oldNo:o+1,newNo:s+1}),o++,s++):i[o+1][s]>=i[o][s+1]?(a.push({type:`del`,text:e[o],oldNo:o+1}),o++):(a.push({type:`add`,text:t[s],newNo:s+1}),s++);for(;o<n;)a.push({type:`del`,text:e[o],oldNo:o+1}),o++;for(;s<r;)a.push({type:`add`,text:t[s],newNo:s+1}),s++;return a}function Le(e,t){let n=X(e),r=X(t);return n.length>Y||r.length>Y?[{type:`too-large`,text:`Diff too large to render (over ${Y.toLocaleString()} lines)`}]:n.length===0?r.map((e,t)=>({type:`add`,text:e,newNo:t+1})):r.length===0?n.map((e,t)=>({type:`del`,text:e,oldNo:t+1})):Ie(n,r)}var Z=`—`;function Q(e){switch(e){case`add`:return`bg-[var(--system-positive-weak)] text-[var(--system-positive-strong)]`;case`del`:return`bg-[var(--system-negative-weak)] text-[var(--system-negative-strong)]`;case`too-large`:return`text-[var(--content-tertiary)] italic`;default:return`text-[var(--content-tertiary)]`}}function Re(e){switch(e){case`add`:return`+`;case`del`:return`-`;default:return` `}}function ze({path:e,oldText:t,newText:n}){let r=Le(t??``,n??``);return(0,W.jsx)(`div`,{"aria-label":`Diff for ${e}`,"data-testid":`acp-chat-file-diff`,className:`flex flex-col overflow-hidden rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)]`,children:(0,W.jsx)(`div`,{className:`overflow-x-auto font-mono text-xs`,children:r.map((e,t)=>(0,W.jsx)(Be,{row:e},t))})})}function Be({row:e}){return e.type===`too-large`?(0,W.jsx)(`div`,{"data-diff-type":`too-large`,className:`px-3 py-2 whitespace-pre-wrap ${Q(e.type)}`,children:e.text}):(0,W.jsxs)(`div`,{"data-diff-type":e.type,className:`flex items-start whitespace-pre ${Q(e.type)}`,children:[(0,W.jsx)(`span`,{className:`w-10 shrink-0 select-none px-2 text-right text-[var(--content-tertiary)] tabular-nums`,children:e.oldNo??Z}),(0,W.jsx)(`span`,{className:`w-10 shrink-0 select-none px-2 text-right text-[var(--content-tertiary)] tabular-nums`,children:e.newNo??Z}),(0,W.jsx)(`span`,{className:`w-4 shrink-0 select-none text-center`,children:Re(e.type)}),(0,W.jsx)(`span`,{className:`flex-1 pr-3`,children:e.text})]})}var Ve=80;function $(e){return e.scrollHeight-e.clientHeight-e.scrollTop<=Ve}function He(e){let t=(0,O.useRef)(null),n=(0,O.useRef)(!0),[r,i]=(0,O.useState)(!1),a=(0,O.useCallback)(()=>{let e=t.current;e&&(e.scrollTop=e.scrollHeight)},[]),o=(0,O.useCallback)(()=>{let e=t.current;if(!e)return;let r=$(e);n.current=r,i(e=>e===!r?e:!r)},[]),s=(0,O.useCallback)(()=>{n.current=!0,a(),i(!1)},[a]),c=(0,O.useCallback)(e=>{let r=t.current;r&&r.removeEventListener(`scroll`,o),t.current=e,e&&(e.addEventListener(`scroll`,o,{passive:!0}),n.current?e.scrollTop=e.scrollHeight:o())},[o]);return(0,O.useLayoutEffect)(()=>{n.current?a():o()},[e,a,o]),{scrollRef:c,showScrollToLatest:r,scrollToLatest:s}}function Ue(e,t){switch(e.kind){case`user`:return`user-${e.id||t}`;case`agent`:return`agent-${e.messageId||t}`;case`thinking`:return`thinking-${e.messageId||t}`;case`tool`:return`tool-${e.toolCallId}`;case`plan`:return`plan`}}var We=[];function Ge({entry:e,onClose:t}){let n=w(e.status),i=L(E(t=>t.byId[e.acpSessionId]?.events??We)),[o,s]=(0,O.useState)(null),[c,l]=(0,O.useState)(e.acpSessionId);c!==e.acpSessionId&&(l(e.acpSessionId),s(null));let d=(0,O.useCallback)((e,t)=>s({kind:`diff`,toolCallId:e,path:t.path}),[]),f=(0,O.useCallback)(e=>s({kind:`output`,toolCallId:e}),[]),p=(0,O.useCallback)(()=>s(null),[]),m=(0,O.useMemo)(()=>o?i.find(e=>e.kind===`tool`&&e.toolCallId===o.toolCallId)??null:null,[o,i]),h=(0,O.useMemo)(()=>o?.kind!==`diff`||!m?null:U(R(m.content),m.locations).find(e=>e.path===o.path)??null,[o,m]),g=o?.kind===`diff`?o.path:m?B(m.rawInput)??m.title??`Output`:`Output`,{scrollRef:_,showScrollToLatest:v,scrollToLatest:y}=He((0,O.useMemo)(()=>({blocks:i,status:e.status,completedAt:e.completedAt}),[i,e.status,e.completedAt])),b=!n;return(0,W.jsxs)(`div`,{className:`flex h-full flex-col overflow-hidden rounded-xl bg-[var(--surface-lift)]`,children:[o&&(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-[var(--border-hover)] px-5 py-3`,children:[(0,W.jsx)(`button`,{type:`button`,onClick:p,title:e.agent,className:`min-w-0 shrink cursor-pointer truncate text-left text-[var(--content-default)] hover:underline`,children:(0,W.jsx)(a,{variant:`body-small-default`,as:`span`,children:e.agent})}),(0,W.jsx)(u,{className:`h-2.5 w-2.5 shrink-0 text-[var(--content-tertiary)]`,"aria-hidden":!0}),(0,W.jsx)(a,{variant:`body-small-default`,as:`span`,title:g,className:`min-w-0 shrink truncate font-mono text-[var(--content-secondary)]`,children:g})]}),(0,W.jsx)(Ke,{entry:e,isRunning:n,onClose:t,showBack:!!o,onBack:p},`header-${e.acpSessionId}`),o?(0,W.jsx)(`div`,{className:`flex-1 overflow-y-auto px-5 py-5`,children:o.kind===`diff`?(0,W.jsx)(ze,{path:o.path,oldText:h?.oldText,newText:h?.newText}):(0,W.jsx)(Fe,{content:m?.content})}):(0,W.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[(0,W.jsxs)(`div`,{ref:_,"data-testid":`acp-chat-conversation`,className:`flex h-full flex-col gap-4 overflow-y-auto px-5 py-5`,children:[(0,W.jsx)(qe,{task:e.task}),(0,W.jsx)(`div`,{className:`flex flex-col`,"data-testid":`acp-chat-timeline`,children:i.map((e,t)=>(0,W.jsx)(Se,{showDot:t===0||t===i.length-1||e.kind===`tool`||e.kind===`plan`,isLast:t===i.length-1,children:(0,W.jsx)(Je,{block:e,isTerminal:b,onOpenDiff:d,onOpenOutput:f})},Ue(e,t)))}),!n&&(0,W.jsx)(xe,{status:e.status,stopReason:e.stopReason,error:e.error,completedAt:e.completedAt})]}),v&&(0,W.jsx)(r,{variant:`outlined`,size:`compact`,iconOnly:(0,W.jsx)(ne,{}),onClick:y,"aria-label":`Go to newest`,tooltip:`Go to newest`,"data-testid":`acp-chat-scroll-to-latest`,className:`absolute bottom-3 left-1/2 -translate-x-1/2 rounded-full shadow-md`})]}),n&&!o&&(0,W.jsx)(Ye,{acpSessionId:e.acpSessionId},`steer-${e.acpSessionId}`)]})}function Ke({entry:e,isRunning:n,onClose:i,showBack:o=!1,onBack:c}){let[l,u]=(0,O.useState)(!1),d=C(e.status,e.stopReason),f=(0,O.useCallback)(()=>{u(!0),ae(e.acpSessionId).catch(e=>{u(!1),t(e,{context:`AcpRunChatView.stop`})})},[e.acpSessionId]);return(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 border-b border-[var(--border-hover)] px-5 py-4`,children:[o&&(0,W.jsx)(r,{variant:`outlined`,iconOnly:(0,W.jsx)(s,{}),onClick:c,"aria-label":`Back to conversation`,tooltip:`Back`,"data-testid":`acp-chat-diff-back`,className:`shrink-0 rounded-lg`}),(0,W.jsx)(D,{agent:e.agent,className:`h-5 w-5 shrink-0`}),(0,W.jsx)(a,{variant:`title-medium`,title:e.agent,className:`min-w-0 shrink truncate leading-snug text-[var(--content-default)]`,children:e.agent}),(0,W.jsx)(le,{color:d.color,label:d.label}),(0,W.jsx)(`span`,{className:`flex-1`}),(0,W.jsx)(Pe,{entry:e}),n&&(0,W.jsxs)(`button`,{type:`button`,"aria-label":`Stop run`,onClick:f,disabled:l,className:`flex h-8 shrink-0 cursor-pointer items-center gap-1.5 rounded-lg border border-[var(--system-negative-strong)] bg-transparent px-2.5 py-1.5 text-[var(--system-negative-strong)] transition-colors hover:bg-[var(--system-negative-weak)] disabled:cursor-default disabled:opacity-50`,children:[(0,W.jsx)(te,{className:`h-3 w-3`,fill:`currentColor`}),(0,W.jsx)(a,{variant:`label-small-default`,children:`Stop`})]}),(0,W.jsx)(r,{variant:`outlined`,iconOnly:(0,W.jsx)(v,{}),onClick:i,"aria-label":`Close run detail`,tooltip:`Close`,className:`shrink-0 rounded-lg`})]})}function qe({task:e}){return e?(0,W.jsxs)(`div`,{"data-testid":`acp-chat-objective`,children:[(0,W.jsx)(a,{variant:`body-medium-default`,as:`h3`,className:`mb-1 text-[var(--content-emphasised)]`,children:`Objective`}),(0,W.jsx)(a,{variant:`body-medium-lighter`,as:`p`,className:`whitespace-pre-wrap break-words leading-relaxed text-[var(--content-default)]`,children:e}),(0,W.jsx)(`div`,{className:`mt-4 h-px w-full bg-[var(--border-hover)]`})]}):null}function Je({block:e,isTerminal:t,onOpenDiff:n,onOpenOutput:r}){switch(e.kind){case`user`:return(0,W.jsx)(Me,{content:e.content});case`agent`:return(0,W.jsx)(_e,{content:e.content,isComplete:e.isComplete||t});case`thinking`:return(0,W.jsx)(Ce,{content:e.content,isComplete:e.isComplete||t});case`tool`:return(0,W.jsx)(je,{block:e,isTerminal:t,onOpenDiff:n,onOpenOutput:r});case`plan`:return(0,W.jsx)(ve,{entries:e.entries})}}function Ye({acpSessionId:e}){let[n,i]=(0,O.useState)(``),[a,o]=(0,O.useState)(!1);return(0,W.jsx)(`form`,{onSubmit:(0,O.useCallback)(r=>{r.preventDefault();let s=n.trim();if(!s||a)return;o(!0);let c=E.getState().appendLocalMarker({acpSessionId:e,content:`${S}${s}`});oe(e,s).then(()=>i(``)).catch(n=>{c&&E.getState().removeLocalMarker({acpSessionId:e,markerId:c}),t(n,{context:`AcpRunChatView.steer`})}).finally(()=>o(!1))},[n,a,e]),"data-testid":`acp-chat-steer-form`,className:`sticky bottom-0 z-10 shrink-0 border-t border-[var(--border-hover)] bg-[var(--surface-lift)] px-5 py-3`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md bg-[var(--surface-base)] px-3 py-2`,children:[(0,W.jsx)(`input`,{type:`text`,value:n,onChange:e=>i(e.target.value),placeholder:`Steer the run…`,disabled:a,"aria-label":`Steering instruction`,className:`text-body-medium-default min-w-0 flex-1 bg-transparent text-[color:var(--content-default)] placeholder:text-[color:var(--content-tertiary)] focus:outline-none disabled:opacity-50`}),(0,W.jsx)(r,{type:`submit`,variant:`primary`,size:`compact`,iconOnly:(0,W.jsx)(ee,{}),disabled:a||n.trim()===``,"aria-label":`Send steering instruction`,className:`shrink-0`})]})})}function Xe({entry:e,onClose:t}){return(0,W.jsx)(Ge,{entry:e,onClose:t})}export{Xe as AcpRunDetailPanel};
5
+ `)&&t.pop(),t}function Ie(e,t){let n=e.length,r=t.length,i=Array.from({length:n+1},()=>Array(r+1).fill(0));for(let a=n-1;a>=0;a--)for(let n=r-1;n>=0;n--)i[a][n]=e[a]===t[n]?i[a+1][n+1]+1:Math.max(i[a+1][n],i[a][n+1]);let a=[],o=0,s=0;for(;o<n&&s<r;)e[o]===t[s]?(a.push({type:`ctx`,text:e[o],oldNo:o+1,newNo:s+1}),o++,s++):i[o+1][s]>=i[o][s+1]?(a.push({type:`del`,text:e[o],oldNo:o+1}),o++):(a.push({type:`add`,text:t[s],newNo:s+1}),s++);for(;o<n;)a.push({type:`del`,text:e[o],oldNo:o+1}),o++;for(;s<r;)a.push({type:`add`,text:t[s],newNo:s+1}),s++;return a}function Le(e,t){let n=X(e),r=X(t);return n.length>Y||r.length>Y?[{type:`too-large`,text:`Diff too large to render (over ${Y.toLocaleString()} lines)`}]:n.length===0?r.map((e,t)=>({type:`add`,text:e,newNo:t+1})):r.length===0?n.map((e,t)=>({type:`del`,text:e,oldNo:t+1})):Ie(n,r)}var Z=`—`;function Q(e){switch(e){case`add`:return`bg-[var(--system-positive-weak)] text-[var(--system-positive-strong)]`;case`del`:return`bg-[var(--system-negative-weak)] text-[var(--system-negative-strong)]`;case`too-large`:return`text-[var(--content-tertiary)] italic`;default:return`text-[var(--content-tertiary)]`}}function Re(e){switch(e){case`add`:return`+`;case`del`:return`-`;default:return` `}}function ze({path:e,oldText:t,newText:n}){let r=Le(t??``,n??``);return(0,W.jsx)(`div`,{"aria-label":`Diff for ${e}`,"data-testid":`acp-chat-file-diff`,className:`flex flex-col overflow-hidden rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)]`,children:(0,W.jsx)(`div`,{className:`overflow-x-auto font-mono text-xs`,children:r.map((e,t)=>(0,W.jsx)(Be,{row:e},t))})})}function Be({row:e}){return e.type===`too-large`?(0,W.jsx)(`div`,{"data-diff-type":`too-large`,className:`px-3 py-2 whitespace-pre-wrap ${Q(e.type)}`,children:e.text}):(0,W.jsxs)(`div`,{"data-diff-type":e.type,className:`flex items-start whitespace-pre ${Q(e.type)}`,children:[(0,W.jsx)(`span`,{className:`w-10 shrink-0 select-none px-2 text-right text-[var(--content-tertiary)] tabular-nums`,children:e.oldNo??Z}),(0,W.jsx)(`span`,{className:`w-10 shrink-0 select-none px-2 text-right text-[var(--content-tertiary)] tabular-nums`,children:e.newNo??Z}),(0,W.jsx)(`span`,{className:`w-4 shrink-0 select-none text-center`,children:Re(e.type)}),(0,W.jsx)(`span`,{className:`flex-1 pr-3`,children:e.text})]})}var Ve=80;function $(e){return e.scrollHeight-e.clientHeight-e.scrollTop<=Ve}function He(e){let t=(0,O.useRef)(null),n=(0,O.useRef)(!0),[r,i]=(0,O.useState)(!1),a=(0,O.useCallback)(()=>{let e=t.current;e&&(e.scrollTop=e.scrollHeight)},[]),o=(0,O.useCallback)(()=>{let e=t.current;if(!e)return;let r=$(e);n.current=r,i(e=>e===!r?e:!r)},[]),s=(0,O.useCallback)(()=>{n.current=!0,a(),i(!1)},[a]),c=(0,O.useCallback)(e=>{let r=t.current;r&&r.removeEventListener(`scroll`,o),t.current=e,e&&(e.addEventListener(`scroll`,o,{passive:!0}),n.current?e.scrollTop=e.scrollHeight:o())},[o]);return(0,O.useLayoutEffect)(()=>{n.current?a():o()},[e,a,o]),{scrollRef:c,showScrollToLatest:r,scrollToLatest:s}}function Ue(e,t){switch(e.kind){case`user`:return`user-${e.id||t}`;case`agent`:return`agent-${e.messageId||t}`;case`thinking`:return`thinking-${e.messageId||t}`;case`tool`:return`tool-${e.toolCallId}`;case`plan`:return`plan`}}var We=[];function Ge({entry:e,onClose:t}){let n=E(e.status),i=L(D(t=>t.byId[e.acpSessionId]?.events??We)),[o,s]=(0,O.useState)(null),[c,l]=(0,O.useState)(e.acpSessionId);c!==e.acpSessionId&&(l(e.acpSessionId),s(null));let d=(0,O.useCallback)((e,t)=>s({kind:`diff`,toolCallId:e,path:t.path}),[]),f=(0,O.useCallback)(e=>s({kind:`output`,toolCallId:e}),[]),p=(0,O.useCallback)(()=>s(null),[]),m=(0,O.useMemo)(()=>o?i.find(e=>e.kind===`tool`&&e.toolCallId===o.toolCallId)??null:null,[o,i]),h=(0,O.useMemo)(()=>o?.kind!==`diff`||!m?null:U(R(m.content),m.locations).find(e=>e.path===o.path)??null,[o,m]),g=o?.kind===`diff`?o.path:m?B(m.rawInput)??m.title??`Output`:`Output`,{scrollRef:_,showScrollToLatest:v,scrollToLatest:y}=He((0,O.useMemo)(()=>({blocks:i,status:e.status,completedAt:e.completedAt}),[i,e.status,e.completedAt])),b=!n;return(0,W.jsxs)(`div`,{className:`flex h-full flex-col overflow-hidden rounded-xl bg-[var(--surface-lift)]`,children:[o&&(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-[var(--border-hover)] px-5 py-3`,children:[(0,W.jsx)(`button`,{type:`button`,onClick:p,title:e.agent,className:`min-w-0 shrink cursor-pointer truncate text-left text-[var(--content-default)] hover:underline`,children:(0,W.jsx)(a,{variant:`body-small-default`,as:`span`,children:e.agent})}),(0,W.jsx)(u,{className:`h-2.5 w-2.5 shrink-0 text-[var(--content-tertiary)]`,"aria-hidden":!0}),(0,W.jsx)(a,{variant:`body-small-default`,as:`span`,title:g,className:`min-w-0 shrink truncate font-mono text-[var(--content-secondary)]`,children:g})]}),(0,W.jsx)(Ke,{entry:e,isRunning:n,onClose:t,showBack:!!o,onBack:p},`header-${e.acpSessionId}`),o?(0,W.jsx)(`div`,{className:`flex-1 overflow-y-auto px-5 py-5`,children:o.kind===`diff`?(0,W.jsx)(ze,{path:o.path,oldText:h?.oldText,newText:h?.newText}):(0,W.jsx)(Fe,{content:m?.content})}):(0,W.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[(0,W.jsxs)(`div`,{ref:_,"data-testid":`acp-chat-conversation`,className:`flex h-full flex-col gap-4 overflow-y-auto px-5 py-5`,children:[(0,W.jsx)(qe,{task:e.task}),(0,W.jsx)(`div`,{className:`flex flex-col`,"data-testid":`acp-chat-timeline`,children:i.map((e,t)=>(0,W.jsx)(Se,{showDot:t===0||t===i.length-1||e.kind===`tool`||e.kind===`plan`,isLast:t===i.length-1,children:(0,W.jsx)(Je,{block:e,isTerminal:b,onOpenDiff:d,onOpenOutput:f})},Ue(e,t)))}),!n&&(0,W.jsx)(xe,{status:e.status,stopReason:e.stopReason,error:e.error,completedAt:e.completedAt})]}),v&&(0,W.jsx)(r,{variant:`outlined`,size:`compact`,iconOnly:(0,W.jsx)(ee,{}),onClick:y,"aria-label":`Go to newest`,tooltip:`Go to newest`,"data-testid":`acp-chat-scroll-to-latest`,className:`absolute bottom-3 left-1/2 -translate-x-1/2 rounded-full shadow-md`})]}),n&&!o&&(0,W.jsx)(Ye,{acpSessionId:e.acpSessionId},`steer-${e.acpSessionId}`)]})}function Ke({entry:e,isRunning:n,onClose:i,showBack:o=!1,onBack:c}){let[l,u]=(0,O.useState)(!1),d=te(e.status,e.stopReason),f=(0,O.useCallback)(()=>{u(!0),ie(e.acpSessionId).catch(e=>{u(!1),t(e,{context:`AcpRunChatView.stop`})})},[e.acpSessionId]);return(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 border-b border-[var(--border-hover)] px-5 py-4`,children:[o&&(0,W.jsx)(r,{variant:`outlined`,iconOnly:(0,W.jsx)(s,{}),onClick:c,"aria-label":`Back to conversation`,tooltip:`Back`,"data-testid":`acp-chat-diff-back`,className:`shrink-0 rounded-lg`}),(0,W.jsx)(se,{agent:e.agent,className:`h-5 w-5 shrink-0`}),(0,W.jsx)(a,{variant:`title-medium`,title:e.agent,className:`min-w-0 shrink truncate leading-snug text-[var(--content-default)]`,children:e.agent}),(0,W.jsx)(le,{color:d.color,label:d.label}),(0,W.jsx)(`span`,{className:`flex-1`}),(0,W.jsx)(Pe,{entry:e}),n&&(0,W.jsxs)(`button`,{type:`button`,"aria-label":`Stop run`,onClick:f,disabled:l,className:`flex h-8 shrink-0 cursor-pointer items-center gap-1.5 rounded-lg border border-[var(--system-negative-strong)] bg-transparent px-2.5 py-1.5 text-[var(--system-negative-strong)] transition-colors hover:bg-[var(--system-negative-weak)] disabled:cursor-default disabled:opacity-50`,children:[(0,W.jsx)(w,{className:`h-3 w-3`,fill:`currentColor`}),(0,W.jsx)(a,{variant:`label-small-default`,children:`Stop`})]}),(0,W.jsx)(r,{variant:`outlined`,iconOnly:(0,W.jsx)(v,{}),onClick:i,"aria-label":`Close run detail`,tooltip:`Close`,className:`shrink-0 rounded-lg`})]})}function qe({task:e}){return e?(0,W.jsxs)(`div`,{"data-testid":`acp-chat-objective`,children:[(0,W.jsx)(a,{variant:`body-medium-default`,as:`h3`,className:`mb-1 text-[var(--content-emphasised)]`,children:`Objective`}),(0,W.jsx)(a,{variant:`body-medium-lighter`,as:`p`,className:`whitespace-pre-wrap break-words leading-relaxed text-[var(--content-default)]`,children:e}),(0,W.jsx)(`div`,{className:`mt-4 h-px w-full bg-[var(--border-hover)]`})]}):null}function Je({block:e,isTerminal:t,onOpenDiff:n,onOpenOutput:r}){switch(e.kind){case`user`:return(0,W.jsx)(Me,{content:e.content});case`agent`:return(0,W.jsx)(_e,{content:e.content,isComplete:e.isComplete||t});case`thinking`:return(0,W.jsx)(Ce,{content:e.content,isComplete:e.isComplete||t});case`tool`:return(0,W.jsx)(je,{block:e,isTerminal:t,onOpenDiff:n,onOpenOutput:r});case`plan`:return(0,W.jsx)(ve,{entries:e.entries})}}function Ye({acpSessionId:e}){let[n,i]=(0,O.useState)(``),[a,o]=(0,O.useState)(!1);return(0,W.jsx)(`form`,{onSubmit:(0,O.useCallback)(r=>{r.preventDefault();let s=n.trim();if(!s||a)return;o(!0);let c=D.getState().appendLocalMarker({acpSessionId:e,content:`${S}${s}`});ae(e,s).then(()=>i(``)).catch(n=>{c&&D.getState().removeLocalMarker({acpSessionId:e,markerId:c}),t(n,{context:`AcpRunChatView.steer`})}).finally(()=>o(!1))},[n,a,e]),"data-testid":`acp-chat-steer-form`,className:`sticky bottom-0 z-10 shrink-0 border-t border-[var(--border-hover)] bg-[var(--surface-lift)] px-5 py-3`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md bg-[var(--surface-base)] px-3 py-2`,children:[(0,W.jsx)(`input`,{type:`text`,value:n,onChange:e=>i(e.target.value),placeholder:`Steer the run…`,disabled:a,"aria-label":`Steering instruction`,className:`text-body-medium-default min-w-0 flex-1 bg-transparent text-[color:var(--content-default)] placeholder:text-[color:var(--content-tertiary)] focus:outline-none disabled:opacity-50`}),(0,W.jsx)(r,{type:`submit`,variant:`primary`,size:`compact`,iconOnly:(0,W.jsx)(oe,{}),disabled:a||n.trim()===``,"aria-label":`Send steering instruction`,className:`shrink-0`})]})})}function Xe({entry:e,onClose:t}){return(0,W.jsx)(Ge,{entry:e,onClose:t})}export{Xe as AcpRunDetailPanel};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-BQVYX8n_.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{t as i}from"./typography-Cqi8q9o7.js";import{E as a,S as o,c as s,l as c,x as l}from"./risk-9NBsMuKD.js";import{t as u}from"./chevron-left-B_RAz34t.js";import"./src-BYZfM6fJ.js";import{t as d}from"./chat-markdown-message-CwrNmWrc.js";import{C as f,a as p,i as m,n as h,r as g,s as _,y as v}from"./site-favicon-MuwbDMQz.js";import{E as y,Ea as b,G as x,J as S,K as C,U as w,W as T,X as E,Y as D,jt as O,q as k,zt as A}from"./index-DXWD5kJ_.js";import{ToolDetailBody as j,t as M}from"./tool-detail-panel-BwsC_0KK.js";var N=e(t(),1);function P(e,t,n){let r=T(t,n.workflow),i=e=>{let t=C(e,n.workflow.byToolUseId);if(t!==null&&r.has(t))return!0;let i=w(e,n.acpByToolUseId);if(i!==null&&n.acpById[i]!==void 0)return!0;let a=x(e);return a!==void 0&&n.backgroundTaskById[a]!==void 0},a=t.filter(e=>!i(e));if(a.length===t.length)return{items:e,toolCalls:t};let o=new Set(a.map(e=>e.id));return{items:e.filter(e=>e.kind!==`toolCall`||o.has(e.toolCall.id)),toolCalls:a}}function F(e,t){let n=o(),r=b.use.byId(),i=b.use.byToolUseId(),l=b.use.notFoundRunIds(),u=b.use.hydrationFailedRunIds(),d=O.use.byId(),f=O.use.byToolUseId(),p=A.use.byId();return(0,N.useMemo)(()=>{if(!e||t==null)return null;let o=n.find(t=>a(t).includes(e));if(!o)return null;let m=c(o.contentBlocks??[],{splitInlineThinking:o.role!==`user`})[t];if(!m||m.type!==`activity`)return null;let{cardItems:h,toolCalls:g}=s(m.items);return P(h,g,{workflow:{byId:r,byToolUseId:i,notFoundRunIds:l,hydrationFailedRunIds:u},acpById:d,acpByToolUseId:f,backgroundTaskById:p})},[n,e,t,r,i,l,u,d,f,p])}var I=r(),L=60;function R({payload:e,onClose:t}){let[r,a]=(0,N.useState)(null),o=F(e.messageId,e.groupIndex),s=o?.items??e.items,c=o?.toolCalls??e.toolCalls,l=E(s),d=S(l.steps),p=D(l.state,l.steps),m=p===`loading`,h=k(p,l.totalDurationLabel??``,d.failed),g=m&&l.currentStepTitle||h,v=new Map(c.map(e=>[e.id,e])),b=r?r.kind===`thinking`?`Thinking`:r.activity||r.title:``;return(0,I.jsx)(y,{titleNode:r?(0,I.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 py-0.5`,children:[(0,I.jsx)(n,{variant:`ghost`,iconOnly:(0,I.jsx)(u,{}),"aria-label":`Back to all steps`,tooltip:`All steps`,onClick:()=>a(null),className:`-ml-2.5 shrink-0`}),(0,I.jsx)(i,{variant:`title-medium`,className:`min-w-0 shrink truncate leading-snug text-[var(--content-default)]`,children:b})]}):(0,I.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 py-0.5`,children:[(0,I.jsx)(i,{variant:`title-medium`,className:`min-w-0 shrink truncate leading-snug text-[var(--content-default)]`,children:m?(0,I.jsx)(f,{children:g}):g}),l.stepCount?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{"aria-hidden":!0,className:`size-[3px] shrink-0 rounded-full bg-[var(--content-tertiary)]`}),(0,I.jsx)(i,{variant:`title-medium`,className:`shrink-0 whitespace-nowrap leading-snug text-[var(--content-secondary)]`,children:l.stepCount})]}):null]}),closeLabel:`Close steps`,onClose:t,children:r?(0,I.jsx)(B,{detail:r}):(0,I.jsx)(_,{steps:l.steps,timeline:!0,renderStep:t=>(0,I.jsx)(z,{step:t,activeDetail:r,onOpenDetail:a,lookupToolCall:e=>v.get(e),messageId:e.messageId,groupIndex:e.groupIndex})})})}function z({step:e,activeDetail:t,onOpenDetail:n,lookupToolCall:r,messageId:i,groupIndex:a}){if(e.kind===`thinking`){let t=i!=null&&e.thinkingItemIndex!=null?{messageId:i,thinkingGroupIndex:a,thinkingItemIndex:e.thinkingItemIndex}:{};return(0,I.jsx)(m,{iconName:`brain`,label:l(e.text,L),ariaLabel:`View thinking`,active:!1,onClick:()=>n({kind:`thinking`,toolCallId:``,toolName:``,title:`Thinking`,activity:``,input:{},status:`completed`,thinkingText:e.text,...t})})}if(e.kind===`web_search`)return(0,I.jsx)(g,{step:e});if(e.kind===`web_search_error`)return(0,I.jsx)(h,{step:e});if(e.kind!==`tool`)return(0,I.jsx)(p,{step:e});let o=r(e.toolCallId);return(0,I.jsx)(m,{iconName:e.iconName,label:e.activity||e.info||e.title,active:t?.toolCallId===e.toolCallId,onClick:()=>{o&&n(v(o))}})}function B({detail:e}){let t=M(e.kind===`thinking`?e.messageId:void 0,e.thinkingGroupIndex,e.thinkingItemIndex);return(0,I.jsx)(`div`,{className:`flex flex-col gap-4`,children:e.kind===`thinking`?(0,I.jsx)(d,{content:t??e.thinkingText??``,hardLineBreaks:!0}):(0,I.jsx)(j,{detail:e})})}export{R as ActivityStepsPanel};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-BQVYX8n_.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{t as i}from"./typography-Cqi8q9o7.js";import{E as a,S as o,c as s,l as c,x as l}from"./risk-BmGtcPcB.js";import{t as u}from"./chevron-left-B_RAz34t.js";import"./src-Dz1OJ5Xe.js";import{t as d}from"./chat-markdown-message-CXLdPsVS.js";import{C as f,a as p,i as m,n as h,r as g,s as _,y as v}from"./site-favicon-BKPXWWoI.js";import{E as y,Ea as b,G as x,J as S,K as C,U as w,W as T,X as E,Y as D,jt as O,q as k,zt as A}from"./index-C0CtAnlz.js";import{ToolDetailBody as j,t as M}from"./tool-detail-panel-C4femJO1.js";var N=e(t(),1);function P(e,t,n){let r=T(t,n.workflow),i=e=>{let t=C(e,n.workflow.byToolUseId);if(t!==null&&r.has(t))return!0;let i=w(e,n.acpByToolUseId);if(i!==null&&n.acpById[i]!==void 0)return!0;let a=x(e);return a!==void 0&&n.backgroundTaskById[a]!==void 0},a=t.filter(e=>!i(e));if(a.length===t.length)return{items:e,toolCalls:t};let o=new Set(a.map(e=>e.id));return{items:e.filter(e=>e.kind!==`toolCall`||o.has(e.toolCall.id)),toolCalls:a}}function F(e,t){let n=o(),r=b.use.byId(),i=b.use.byToolUseId(),l=b.use.notFoundRunIds(),u=b.use.hydrationFailedRunIds(),d=O.use.byId(),f=O.use.byToolUseId(),p=A.use.byId();return(0,N.useMemo)(()=>{if(!e||t==null)return null;let o=n.find(t=>a(t).includes(e));if(!o)return null;let m=c(o.contentBlocks??[],{splitInlineThinking:o.role!==`user`})[t];if(!m||m.type!==`activity`)return null;let{cardItems:h,toolCalls:g}=s(m.items);return P(h,g,{workflow:{byId:r,byToolUseId:i,notFoundRunIds:l,hydrationFailedRunIds:u},acpById:d,acpByToolUseId:f,backgroundTaskById:p})},[n,e,t,r,i,l,u,d,f,p])}var I=r(),L=60;function R({payload:e,onClose:t}){let[r,a]=(0,N.useState)(null),o=F(e.messageId,e.groupIndex),s=o?.items??e.items,c=o?.toolCalls??e.toolCalls,l=E(s),d=S(l.steps),p=D(l.state,l.steps),m=p===`loading`,h=k(p,l.totalDurationLabel??``,d.failed),g=m&&l.currentStepTitle||h,v=new Map(c.map(e=>[e.id,e])),b=r?r.kind===`thinking`?`Thinking`:r.activity||r.title:``;return(0,I.jsx)(y,{titleNode:r?(0,I.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 py-0.5`,children:[(0,I.jsx)(n,{variant:`ghost`,iconOnly:(0,I.jsx)(u,{}),"aria-label":`Back to all steps`,tooltip:`All steps`,onClick:()=>a(null),className:`-ml-2.5 shrink-0`}),(0,I.jsx)(i,{variant:`title-medium`,className:`min-w-0 shrink truncate leading-snug text-[var(--content-default)]`,children:b})]}):(0,I.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 py-0.5`,children:[(0,I.jsx)(i,{variant:`title-medium`,className:`min-w-0 shrink truncate leading-snug text-[var(--content-default)]`,children:m?(0,I.jsx)(f,{children:g}):g}),l.stepCount?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{"aria-hidden":!0,className:`size-[3px] shrink-0 rounded-full bg-[var(--content-tertiary)]`}),(0,I.jsx)(i,{variant:`title-medium`,className:`shrink-0 whitespace-nowrap leading-snug text-[var(--content-secondary)]`,children:l.stepCount})]}):null]}),closeLabel:`Close steps`,onClose:t,children:r?(0,I.jsx)(B,{detail:r}):(0,I.jsx)(_,{steps:l.steps,timeline:!0,renderStep:t=>(0,I.jsx)(z,{step:t,activeDetail:r,onOpenDetail:a,lookupToolCall:e=>v.get(e),messageId:e.messageId,groupIndex:e.groupIndex})})})}function z({step:e,activeDetail:t,onOpenDetail:n,lookupToolCall:r,messageId:i,groupIndex:a}){if(e.kind===`thinking`){let t=i!=null&&e.thinkingItemIndex!=null?{messageId:i,thinkingGroupIndex:a,thinkingItemIndex:e.thinkingItemIndex}:{};return(0,I.jsx)(m,{iconName:`brain`,label:l(e.text,L),ariaLabel:`View thinking`,active:!1,onClick:()=>n({kind:`thinking`,toolCallId:``,toolName:``,title:`Thinking`,activity:``,input:{},status:`completed`,thinkingText:e.text,...t})})}if(e.kind===`web_search`)return(0,I.jsx)(g,{step:e});if(e.kind===`web_search_error`)return(0,I.jsx)(h,{step:e});if(e.kind!==`tool`)return(0,I.jsx)(p,{step:e});let o=r(e.toolCallId);return(0,I.jsx)(m,{iconName:e.iconName,label:e.activity||e.info||e.title,active:t?.toolCallId===e.toolCallId,onClick:()=>{o&&n(v(o))}})}function B({detail:e}){let t=M(e.kind===`thinking`?e.messageId:void 0,e.thinkingGroupIndex,e.thinkingItemIndex);return(0,I.jsx)(`div`,{className:`flex flex-col gap-4`,children:e.kind===`thinking`?(0,I.jsx)(d,{content:t??e.thinkingText??``,hardLineBreaks:!0}):(0,I.jsx)(j,{detail:e})})}export{R as ActivityStepsPanel};
@@ -1 +1 @@
1
- import{o as e,r as t}from"./chunk-jRWAZmH_.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-BQVYX8n_.js";import{l as i,m as a,t as o}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{n as s}from"./QueryClientProvider-DKhXIxGb.js";import{t as c}from"./useQuery-B45lW1Kk.js";import{t as l}from"./useMutation-Lj4VunQV.js";import{t as u}from"./jsx-runtime-CVSDxk6A.js";import{t as d}from"./circle-alert-CTnM6GCb.js";import{t as f}from"./loader-circle-Ck8fq3yv.js";import{t as p}from"./modal-BwMACfj9.js";import{t as m}from"./dropdown-iuEqxfz1.js";import{c as h}from"./routes-RtGNhNZ3.js";import{n as g,t as _}from"./browser-Cvgt8pGy.js";import{Di as v,ds as y,ki as b}from"./index-DXWD5kJ_.js";var x=t({AddCreditsModal:()=>D}),S=e(n(),1),C=u(),w=[`10.00`,`20.00`,`30.00`,`40.00`,`50.00`,`60.00`,`70.00`,`80.00`,`90.00`,`100.00`];function T(e){let t=parseFloat(e);if(Number.isNaN(t))return`0 credits`;let n=t.toLocaleString(`en-US`,{minimumFractionDigits:2,maximumFractionDigits:2});return`${n.endsWith(`.00`)?n.slice(0,-3):n} credits`}function E(e){if(e&&typeof e==`object`){let t=e.amount;if(Array.isArray(t)&&typeof t[0]==`string`)return t[0]}return`Failed to create checkout session. Please try again.`}function D({open:e,onOpenChange:t}){let n=s(),{pathname:u}=i(),[x]=a(),D=x.toString()?`${u}?${x.toString()}`:u,{data:O,isLoading:k}=c(v()),A=O?.allowed_top_up_amounts?.length?O.allowed_top_up_amounts:w,[j,M]=(0,S.useState)(null),N=j&&A.includes(j)?j:A[0]??w[0],P=l(b());return(0,S.useEffect)(()=>g(()=>{t(!1),n.invalidateQueries(v())}),[t,n]),(0,C.jsx)(p.Root,{open:e,onOpenChange:t,children:(0,C.jsxs)(p.Content,{size:`sm`,children:[(0,C.jsxs)(p.Header,{children:[(0,C.jsx)(p.Title,{icon:y,children:`Add Credits`}),(0,C.jsx)(p.Description,{children:`Purchase credits to continue using the assistant. You'll be redirected to Stripe to complete the payment.`})]}),(0,C.jsx)(p.Body,{children:(0,C.jsxs)(`div`,{className:`space-y-4`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`label`,{htmlFor:`add-credits-amount`,className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Amount`}),(0,C.jsx)(m,{id:`add-credits-amount`,value:N,onChange:e=>{M(e),P.isError&&P.reset()},disabled:k||!O,options:A.map(e=>({value:e,label:T(e)}))})]}),P.isError&&(0,C.jsxs)(`div`,{className:`flex items-center gap-2 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,C.jsx)(d,{className:`h-3.5 w-3.5 shrink-0`}),E(P.error)]}),(0,C.jsx)(o,{to:h.settings.usageBilling,className:`text-body-small-default text-[var(--content-tertiary)] underline hover:text-[var(--content-secondary)]`,onClick:()=>t(!1),children:`Configure Automatic Top-Ups →`})]})}),(0,C.jsxs)(p.Footer,{children:[(0,C.jsx)(p.Close,{asChild:!0,children:(0,C.jsx)(r,{variant:`outlined`,children:`Cancel`})}),(0,C.jsx)(r,{variant:`primary`,leftIcon:P.isPending?(0,C.jsx)(f,{className:`animate-spin`}):void 0,onClick:()=>{P.isPending||P.mutate({body:{amount:N,return_path:D}},{onSuccess:e=>{_(e.checkout_url)}})},disabled:P.isPending||k||!O,children:`Add credits`})]})]})})}export{x as n,D as t};
1
+ import{o as e,r as t}from"./chunk-jRWAZmH_.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-BQVYX8n_.js";import{l as i,m as a,t as o}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{n as s}from"./QueryClientProvider-DKhXIxGb.js";import{t as c}from"./useQuery-B45lW1Kk.js";import{t as l}from"./useMutation-Lj4VunQV.js";import{t as u}from"./jsx-runtime-CVSDxk6A.js";import{t as d}from"./circle-alert-CTnM6GCb.js";import{t as f}from"./loader-circle-C9QrtO3C.js";import{t as p}from"./modal-BAYJ_gv8.js";import{t as m}from"./dropdown-D1ytmf0F.js";import{c as h}from"./routes-eiD3LJtx.js";import{n as g,t as _}from"./browser-P8oSo9Ms.js";import{Di as v,ki as y,ls as b}from"./index-C0CtAnlz.js";var x=t({AddCreditsModal:()=>D}),S=e(n(),1),C=u(),w=[`10.00`,`20.00`,`30.00`,`40.00`,`50.00`,`60.00`,`70.00`,`80.00`,`90.00`,`100.00`];function T(e){let t=parseFloat(e);if(Number.isNaN(t))return`0 credits`;let n=t.toLocaleString(`en-US`,{minimumFractionDigits:2,maximumFractionDigits:2});return`${n.endsWith(`.00`)?n.slice(0,-3):n} credits`}function E(e){if(e&&typeof e==`object`){let t=e.amount;if(Array.isArray(t)&&typeof t[0]==`string`)return t[0]}return`Failed to create checkout session. Please try again.`}function D({open:e,onOpenChange:t}){let n=s(),{pathname:u}=i(),[x]=a(),D=x.toString()?`${u}?${x.toString()}`:u,{data:O,isLoading:k}=c(v()),A=O?.allowed_top_up_amounts?.length?O.allowed_top_up_amounts:w,[j,M]=(0,S.useState)(null),N=j&&A.includes(j)?j:A[0]??w[0],P=l(y());return(0,S.useEffect)(()=>g(()=>{t(!1),n.invalidateQueries(v())}),[t,n]),(0,C.jsx)(p.Root,{open:e,onOpenChange:t,children:(0,C.jsxs)(p.Content,{size:`sm`,children:[(0,C.jsxs)(p.Header,{children:[(0,C.jsx)(p.Title,{icon:b,children:`Add Credits`}),(0,C.jsx)(p.Description,{children:`Purchase credits to continue using the assistant. You'll be redirected to Stripe to complete the payment.`})]}),(0,C.jsx)(p.Body,{children:(0,C.jsxs)(`div`,{className:`space-y-4`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`label`,{htmlFor:`add-credits-amount`,className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Amount`}),(0,C.jsx)(m,{id:`add-credits-amount`,value:N,onChange:e=>{M(e),P.isError&&P.reset()},disabled:k||!O,options:A.map(e=>({value:e,label:T(e)}))})]}),P.isError&&(0,C.jsxs)(`div`,{className:`flex items-center gap-2 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,C.jsx)(d,{className:`h-3.5 w-3.5 shrink-0`}),E(P.error)]}),(0,C.jsx)(o,{to:h.settings.usageBilling,className:`text-body-small-default text-[var(--content-tertiary)] underline hover:text-[var(--content-secondary)]`,onClick:()=>t(!1),children:`Configure Automatic Top-Ups →`})]})}),(0,C.jsxs)(p.Footer,{children:[(0,C.jsx)(p.Close,{asChild:!0,children:(0,C.jsx)(r,{variant:`outlined`,children:`Cancel`})}),(0,C.jsx)(r,{variant:`primary`,leftIcon:P.isPending?(0,C.jsx)(f,{className:`animate-spin`}):void 0,onClick:()=>{P.isPending||P.mutate({body:{amount:N,return_path:D}},{onSuccess:e=>{_(e.checkout_url)}})},disabled:P.isPending||k||!O,children:`Add credits`})]})]})})}export{x as n,D as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{a as t,c as n,i as r}from"./local-settings-C-dW2vkq.js";import{r as i,t as a}from"./capture-error-EqyiBCqE.js";import{t as o}from"./react-DJZBPgpf.js";import{t as s}from"./button-BQVYX8n_.js";import{m as c,u as l}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{n as u}from"./QueryClientProvider-DKhXIxGb.js";import{t as d}from"./useQuery-B45lW1Kk.js";import{t as f}from"./useMutation-Lj4VunQV.js";import{t as p}from"./jsx-runtime-CVSDxk6A.js";import{t as m}from"./typography-Cqi8q9o7.js";import{t as h}from"./createLucideIcon-Bjb-Kuq7.js";import{t as g}from"./circle-check-DqvTjWle.js";import{n as _,t as v}from"./domain-field-Bj9ReZlJ.js";import{t as y}from"./external-link-5a-JuPGf.js";import{t as b}from"./info-DLFMsCl-.js";import{t as x}from"./loader-circle-C9QrtO3C.js";import{t as S}from"./notice-DVOztYLG.js";import{t as C}from"./tag-C0PH3-s4.js";import{t as w}from"./input-Aa7YTuwq.js";import{t as T}from"./toggle-DOoEMtoI.js";import{t as E}from"./modal-BAYJ_gv8.js";import{n as D}from"./toast-DY_hb5KU.js";import{t as O}from"./confirm-dialog-CPSA_qZw.js";import{t as k}from"./dropdown-D1ytmf0F.js";import{Ht as A,Ut as j,bn as M,ct as N,tr as P}from"./sdk.gen-DHuDeOTs.js";import{H as F,V as I,_t as L,c as R,d as z,f as B,l as V,m as ee,p as te,u as H,zt as U}from"./react-query.gen-DRJBX4Ra.js";import{r as ne}from"./utils-CuIE4SGk.js";import{r as re}from"./api-errors-DNWYjUzX.js";import{c as ie}from"./routes-eiD3LJtx.js";import{t as W}from"./use-is-org-ready-DPHHAGMn.js";import{$a as G,Ar as ae,B as oe,Ba as se,Fa as K,Fr as ce,H as le,Ha as q,Hr as ue,Ia as de,Ir as fe,Ja as pe,La as me,Lr as he,Ma as ge,Mo as _e,Mr as ve,Na as ye,Nr as be,Pa as xe,Pr as Se,Qa as Ce,R as we,Ra as Te,Rr as Ee,So as De,Ua as Oe,V as ke,Va as Ae,Vr as je,Wa as Me,Xa as Ne,Ya as Pe,Za as Fe,ao as Ie,co as Le,do as Re,eo as ze,io as Be,jr as Ve,kr as He,lo as Ue,no as We,oo as Ge,qa as Ke,ro as qe,so as Je,to as Ye,uo as Xe,wi as Ze,z as Qe,za as $e,zr as et}from"./index-C0CtAnlz.js";import{t as J}from"./use-active-assistant-id-CDpS5XaO.js";import{C as tt,D as nt,E as Y,T as rt,_ as it,b as X,c as at,d as ot,l as st,n as ct,r as lt,s as ut,t as dt,u as ft,v as pt,w as mt,x as ht,y as gt}from"./provider-catalogs-D_pxTzaP.js";import{t as _t}from"./environment-store-Db43Vd5w.js";var vt=h(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Z=e(o(),1),yt=`__custom__`;function Q(e){return e?!!(e.profile||e.provider||e.model):!1}function bt(e,t){let n=Q(e);return n===Q(t)?n?(e?.profile??null)===(t?.profile??null)&&(e?.provider??null)===(t?.provider??null)&&(e?.model??null)===(t?.model??null):!0:!1}var $=p();function xt({id:e,displayName:t,description:n,defaultProfileLabel:r,draft:i,profileOptions:a,onDraftChange:o,onToggle:s}){let c=Q(i),l=!i||!c?``:i.provider||i.model?yt:i.profile??``,u=l===yt,d=se(),f=d[0]??Je[0],p=d.find(e=>e===i?.provider)??f,m=Re(p).map(e=>({value:e.id,label:e.displayName})),h=!!i?.provider&&!i?.model;function g(t){t===`__custom__`?o(e,{profile:null,provider:f,model:Xe(f)??``}):t===``?o(e,null):o(e,{profile:t,provider:null,model:null})}function _(t){let n=Xe(t)??``;o(e,{...i??{},profile:null,provider:t,model:n})}function v(t){o(e,{...i??{},model:t})}return(0,$.jsxs)(`div`,{className:`rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)] p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`p`,{className:`text-body-medium-default font-medium text-[var(--content-default)]`,children:t}),n&&(0,$.jsxs)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:[n,r&&(0,$.jsxs)(`span`,{className:`ml-1.5 text-body-small-default text-[var(--content-tertiary)] opacity-60`,children:[`· Default: `,r]})]})]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[c&&(0,$.jsx)(k,{value:l,onChange:g,options:a,className:`w-44`,menuMinWidth:280,menuAlign:`end`}),(0,$.jsx)(T,{checked:c,onChange:t=>s(e,t),"aria-label":`Override ${t}`})]})]}),c&&u&&(0,$.jsxs)(`div`,{className:`mt-3 space-y-2 border-t border-[var(--border-base)] pt-3`,children:[(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsxs)(`div`,{className:`flex-1`,children:[(0,$.jsx)(`label`,{className:`mb-1 block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,$.jsx)(k,{value:p??``,onChange:_,options:d.map(e=>({value:e,label:Ue[e]??e}))})]}),(0,$.jsxs)(`div`,{className:`flex-1`,children:[(0,$.jsx)(`label`,{className:`mb-1 block text-body-small-default text-[var(--content-tertiary)]`,children:`Model`}),(0,$.jsx)(k,{value:i?.model??``,onChange:v,options:m})]})]}),h&&(0,$.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:`Pick a model`})]})]})}function St({isOpen:e,onClose:t,assistantId:n}){let r=(0,Z.useRef)(!1);return(0,$.jsx)(E.Root,{open:e,onOpenChange:e=>{!e&&!r.current&&t()},children:e?(0,$.jsx)(Ct,{assistantId:n,onClose:t,onSavingChange:e=>{r.current=e}}):null})}function Ct({assistantId:e,onClose:t,onSavingChange:n}){let r=u(),{data:i}=d({...R({path:{assistant_id:e}}),staleTime:3e4}),o=(0,Z.useMemo)(()=>i?.llm?.profiles??{},[i?.llm?.profiles]),c=(0,Z.useMemo)(()=>i?.llm?.profileOrder??[],[i?.llm?.profileOrder]),l=(0,Z.useMemo)(()=>i?.llm?.callSites??{},[i?.llm?.callSites]),f=(0,Z.useMemo)(()=>Pe(o,c),[o,c]),p=se(),m=U({onSuccess:t=>{H(r,{path:{assistant_id:e}},t)}}),[h,g]=(0,Z.useState)(``),[_,v]=(0,Z.useState)(``),[y,b]=(0,Z.useState)({}),[S,C]=(0,Z.useState)(!1),[T,A]=(0,Z.useState)(!1),{data:j,isLoading:M,isError:N,refetch:P}=d({...z({path:{assistant_id:e}}),enabled:!!e,staleTime:6e4,refetchOnWindowFocus:!1}),F=(0,Z.useMemo)(()=>(j?.callSites??[]).filter(e=>e.id!==`mainAgent`),[j]),I=!M&&!N&&!!j&&!!i,L=(0,Z.useMemo)(()=>F.map(e=>e.id),[F]),B=(0,Z.useMemo)(()=>{if(!I)return{};let e={};for(let t of L)if(t in y)e[t]=y[t];else{let n=l[t];e[t]=n?{...n}:{}}return e},[I,L,l,y]),V=(0,Z.useMemo)(()=>new Set(L),[L]),ee=(0,Z.useMemo)(()=>Object.entries(l).some(([e,t])=>V.has(e)&&(t?.profile!=null||t?.provider!=null||t?.model!=null)),[l,V]),te=(0,Z.useMemo)(()=>{if(!I)return!1;for(let e of Object.keys(B))if(!bt(B[e],l[e]))return!0;return!1},[I,B,l]),ne=(0,Z.useMemo)(()=>Object.values(B).some(e=>Q(e)&&!!e?.provider&&!e?.model),[B]),re=(0,Z.useMemo)(()=>ke(f,[]).map(e=>({value:e.name,label:Qe(e)})),[f]),ie=(0,Z.useCallback)(()=>{if(!_)return;let e={};for(let t of L)e[t]={profile:_};b(e)},[_,L]),W=(0,Z.useCallback)(e=>[...ke(f,[e]).map(e=>({value:e.name,label:Qe(e)})),{value:yt,label:`Custom`}],[f]),G=(0,Z.useMemo)(()=>{if(!h.trim())return F;let e=h.toLowerCase();return F.filter(t=>(t.displayName??``).toLowerCase().includes(e)||(t.description??``).toLowerCase().includes(e)||(t.domain??``).toLowerCase().includes(e))},[F,h]),ae=(0,Z.useMemo)(()=>{if(!j)return[];let e=j.domains.map(e=>e.id),t=new Map(j.domains.map(e=>[e.id,e])),n=[];for(let r of e){let e=G.filter(e=>e.domain===r);e.length>0&&n.push({domain:t.get(r),sites:e})}let r=new Set(e),i=G.filter(e=>!r.has(e.domain));return i.length>0&&n.push({domain:{id:`other`,displayName:`Other`},sites:i}),n},[j,G]),K=(0,Z.useCallback)((e,t)=>{b(n=>({...n,[e]:t}))},[]),ce=(0,Z.useCallback)((e,t)=>{if(!t){b(t=>({...t,[e]:null}));return}let n=oe(f,F.find(t=>t.id===e)?.defaultProfile);if(n)b(t=>({...t,[e]:{profile:n}}));else{let t=p[0]??Je[0],n=Xe(t)??``;b(r=>({...r,[e]:{provider:t,model:n}}))}},[F,f,p]),le=(0,Z.useCallback)(async()=>{C(!0),n?.(!0);try{let n={};for(let e of Object.keys(B)){let t=B[e]??null;n[e]=Q(t)?{profile:t?.profile??null,provider:t?.provider??null,model:t?.model??null}:null}await m.mutateAsync({path:{assistant_id:e},body:{llm:{callSites:n}}}),t(),D.success(`Overrides saved.`)}catch(e){D.error(`Failed to save overrides. Please try again.`),a(e,{context:`call_site_overrides_save`})}finally{C(!1),n?.(!1)}},[B,t,m,n,e]),q=(0,Z.useCallback)(async()=>{C(!0),n?.(!0);try{let n={};for(let e of Object.keys(B))n[e]=null;await m.mutateAsync({path:{assistant_id:e},body:{llm:{callSites:n}}}),t(),D.success(`Overrides reset.`)}catch(e){D.error(`Failed to reset overrides. Please try again.`),a(e,{context:`call_site_overrides_reset`})}finally{C(!1),n?.(!1)}},[B,t,m,n,e]);return(0,$.jsxs)(E.Content,{size:`lg`,hideCloseButton:!0,children:[(0,$.jsxs)(E.Header,{children:[(0,$.jsx)(E.Title,{children:`Action Overrides`}),(0,$.jsx)(E.Description,{children:`Customize which model profile specific actions should use. Uses your default profile if no override is set.`})]}),(0,$.jsxs)(E.Body,{children:[(0,$.jsx)(`div`,{className:`mb-4`,children:(0,$.jsx)(w,{type:`search`,value:h,onChange:e=>g(e.target.value),placeholder:`Search actions…`,leftIcon:(0,$.jsx)(_e,{className:`h-4 w-4`}),fullWidth:!0})}),re.length>0&&(0,$.jsxs)(`div`,{className:`mb-4 flex items-center gap-2 rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)] p-3`,children:[(0,$.jsx)(`p`,{className:`min-w-0 flex-1 text-body-medium-default text-[var(--content-default)]`,children:`Use one profile for all actions`}),(0,$.jsx)(k,{value:_,onChange:v,options:re,placeholder:`Choose profile…`,className:`w-44`,menuMinWidth:280,menuAlign:`end`}),(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:ie,disabled:!_||!I||S,children:`Apply to all`})]}),M&&(0,$.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,$.jsx)(x,{className:`h-6 w-6 animate-spin text-[var(--content-tertiary)]`})}),N&&(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-12 text-center`,children:[(0,$.jsx)(`p`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Couldn't load actions`}),(0,$.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Make sure your assistant is running`}),(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>void P(),children:`Retry`})]}),!M&&!N&&j&&(0,$.jsx)(`div`,{className:`space-y-4`,children:ae.length===0?(0,$.jsx)(`p`,{className:`py-8 text-center text-body-medium-lighter text-[var(--content-tertiary)]`,children:`No actions match your search.`}):ae.map(({domain:e,sites:t})=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`mb-2 text-body-small-default font-semibold uppercase tracking-wider text-[var(--content-tertiary)]`,children:e.displayName}),(0,$.jsx)(`div`,{className:`space-y-1`,children:t.map(e=>{let t=(()=>{let t=B[e.id]??null;return!t||!Q(t)?``:t.provider||t.model?`__custom__`:t.profile??``})(),n=e.defaultProfile?f.find(t=>t.name===e.defaultProfile)?.label??e.defaultProfile:null;return(0,$.jsx)(xt,{id:e.id,displayName:e.displayName,description:e.description,defaultProfileLabel:n,draft:B[e.id]??null,profileOptions:W(t===``||t===`__custom__`?null:t),onDraftChange:K,onToggle:ce},e.id)})})]},e.id))})]}),(0,$.jsxs)(E.Footer,{children:[ee&&(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>A(!0),disabled:S||!I,tintColor:`var(--system-negative-strong)`,className:`mr-auto`,children:`Reset to Defaults`}),(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:t,disabled:S,children:`Cancel`}),(0,$.jsx)(s,{variant:`primary`,size:`compact`,onClick:()=>void le(),disabled:!te||ne||S,children:S?(0,$.jsx)(x,{className:`h-4 w-4 animate-spin`}):`Save`})]}),(0,$.jsx)(O,{open:T,title:`Reset to Defaults`,message:`Every task override will be reset and will follow your active profile. This cannot be undone.`,confirmLabel:`Reset to Defaults`,destructive:!0,onConfirm:()=>{A(!1),q()},onCancel:()=>A(!1)})]})}function wt({blocked:e,availableReplacements:t,replacement:n,onReplacementChange:r,error:i,saving:a,onClose:o,onConfirm:c}){let l=``;if(e){let t=e.label||e.name;l=e.isActive&&e.callSiteIds.length>0?`"${t}" is the active profile and is used by ${e.callSiteIds.length} call site(s). Pick a replacement profile.`:e.isActive?`"${t}" is the active profile. Pick a different active profile before deleting, or select a replacement below.`:`"${t}" is used by ${e.callSiteIds.length} call site(s). Select a replacement profile to reassign them before deleting.`}return(0,$.jsx)(E.Root,{open:e!==null,onOpenChange:e=>{e||o()},children:(0,$.jsxs)(E.Content,{size:`sm`,children:[(0,$.jsx)(E.Header,{children:(0,$.jsx)(E.Title,{children:`Can't Delete Profile`})}),(0,$.jsxs)(E.Body,{className:`space-y-4`,children:[(0,$.jsx)(m,{variant:`body-medium-default`,as:`p`,children:l}),e&&e.callSiteIds.length>0&&(0,$.jsx)(`ul`,{className:`space-y-1 pl-1`,children:e.callSiteIds.map(e=>(0,$.jsxs)(`li`,{className:`text-body-small-default text-(--content-secondary)`,children:[`• `,(0,$.jsx)(`code`,{children:e})]},e))}),(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Replacement profile`}),(0,$.jsx)(k,{"aria-label":`Replacement profile`,value:n,onChange:r,options:[{value:``,label:`Select a replacement…`},...t.map(e=>({value:e.name,label:e.label??e.name}))]})]}),i&&(0,$.jsx)(m,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:i})]}),(0,$.jsxs)(E.Footer,{children:[(0,$.jsx)(s,{variant:`ghost`,size:`compact`,onClick:o,children:`Cancel`}),(0,$.jsx)(s,{variant:`primary`,size:`compact`,disabled:!n||a,onClick:c,children:a?`Saving…`:`Reassign and Delete`})]})]})})}function Tt(e,t){if(e){let n=Re(e).find(e=>e.id===t);if(n)return n.displayName}let n=t.lastIndexOf(`/`);return n>=0?t.slice(n+1):t}function Et(e,t){let n=[];e.description&&n.push(e.description);let r=e.provider_connection===`vellum`&&t?`vellum`:e.provider,i=[];if(e.model&&i.push(Tt(r,e.model)),r){let e=Ue[r]??r;i.push(`hosted by ${e}`)}return i.length>0&&n.push(i.join(` `)),n.join(` – `)}function Dt({profile:e,vellumIsManaged:t,isDragging:n,dropTarget:r,isDeleting:i,deleteError:a,isToggling:o,onDragStart:c,onDragEnd:l,onDragOver:u,onDragLeave:d,onDrop:f,onEditClick:p,onDeleteClick:h,onStatusToggle:g}){let _=e.source===`managed`,v=e.invariant===!0,y=e.status!==`disabled`;return(0,$.jsxs)(`div`,{className:`relative`,children:[r?.name===e.name&&!r.after&&(0,$.jsx)(`div`,{className:`mx-0 h-0.5 rounded-full bg-[var(--border-active)]`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg pr-2 py-2${n?` opacity-50`:``}`,draggable:!_,onDragStart:c,onDragEnd:l,onDragOver:u,onDragLeave:d,onDrop:f,children:[(0,$.jsx)(vt,{className:`h-4 w-4 shrink-0 ${_?`invisible`:`cursor-grab text-[var(--content-tertiary)]`}`}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1${y?``:` opacity-55`}`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(m,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:e.label??e.name}),_&&(0,$.jsx)(C,{tone:`positive`,title:`Managed by Platform — this profile cannot be disabled, deleted, or renamed.`,children:`Platform`})]}),e.description||e.model||e.provider?(0,$.jsx)(m,{variant:`body-medium-lighter`,as:`p`,className:`mt-0.5 text-(--content-tertiary)`,children:Et(e,t)}):null]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(!v||!y)&&(0,$.jsx)(`div`,{className:`flex shrink-0 items-center`,title:y?`Active — toggle to hide from pickers`:`Disabled — toggle to show in pickers`,children:(0,$.jsx)(T,{checked:y,onChange:e=>g(e),disabled:o,"aria-label":`${y?`Disable`:`Enable`} ${e.label??e.name}`})}),(0,$.jsxs)(`div`,{className:`flex w-[92px] items-center justify-end gap-2`,children:[(0,$.jsx)(s,{variant:`ghost`,size:`compact`,onClick:p,children:_||v?`View`:`Edit`}),(0,$.jsx)(s,{variant:`ghost`,size:`compact`,iconOnly:(0,$.jsx)(De,{}),"aria-label":`Delete ${e.label??e.name}`,disabled:_||v||i,title:_||v?`Managed profiles cannot be deleted`:void 0,onClick:h,tintColor:`var(--system-negative-strong)`})]})]})]}),r?.name===e.name&&r.after&&(0,$.jsx)(`div`,{className:`mx-0 h-0.5 rounded-full bg-[var(--border-active)]`}),a?(0,$.jsx)(m,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:a}):null]})}function Ot({isOpen:e,assistantId:t,onClose:n}){let r=u(),{data:i}=d({...R({path:{assistant_id:t}}),staleTime:3e4}),o=(0,Z.useMemo)(()=>i?.llm?.profiles??{},[i?.llm?.profiles]),s=(0,Z.useMemo)(()=>i?.llm?.profileOrder??[],[i?.llm?.profileOrder]),c=i?.llm?.activeProfile??null,l=i?.llm?.callSites??{},f=(0,Z.useMemo)(()=>Pe(o,s),[o,s]),p=U({onSuccess:e=>{H(r,{path:{assistant_id:t}},e)}}),[m,h]=(0,Z.useState)(!1),[g,_]=(0,Z.useState)(null),{data:v}=d({...I({path:{assistant_id:t}}),enabled:e}),y=v?.connections,b=y?.some(e=>e.name===`vellum`&&e.provider===`vellum`)??!1,x=Object.keys(o);async function S(e,n,r){let i=r?.mode??`replace`,c=!(e in o);if(i===`merge`&&!c){await p.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:n}}}}),h(!1),_(null);return}let l={profiles:{[e]:n}};if(c&&(l.profileOrder=s.includes(e)?s:[...s,e]),c)await p.mutateAsync({path:{assistant_id:t},body:{llm:l}});else{let n=o[e];await p.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:null}}}});try{await p.mutateAsync({path:{assistant_id:t},body:{llm:l}})}catch(r){throw a(r,{context:`settings-ai-profile-edit-recreate`}),n!=null&&await p.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:n}}}}).catch(()=>{}),r}}c&&D.success(`Profile "${n.label??e}" created`),h(!1),_(null)}return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(E.Root,{open:e,onOpenChange:e=>{e||n()},children:e?(0,$.jsx)(kt,{assistantId:t,vellumIsManaged:b,profiles:o,profileOrder:s,orderedProfiles:f,activeProfile:c,callSiteOverrides:l,onClose:n,onEditClick:e=>{_(e),h(!0)},onNewClick:()=>{_(null),h(!0)}}):null}),(0,$.jsx)(ge,{isOpen:m,mode:g?g.source===`managed`||g.invariant===!0?`view`:`edit`:`create`,profileName:g?.name,initialValues:g??void 0,existingNames:x,connections:y,assistantId:t,onSave:S,onCancel:()=>{h(!1),_(null)}})]})}function kt({assistantId:e,vellumIsManaged:t,profiles:n,profileOrder:r,orderedProfiles:i,activeProfile:o,callSiteOverrides:c,onClose:l,onEditClick:d,onNewClick:f}){let p=u(),h=U({onSuccess:t=>{H(p,{path:{assistant_id:e}},t)}}),[g,_]=(0,Z.useState)({}),[v,y]=(0,Z.useState)({}),[b,x]=(0,Z.useState)(new Set),[S,C]=(0,Z.useState)(null),[w,T]=(0,Z.useState)(null),[D,O]=(0,Z.useState)(null),[k,A]=(0,Z.useState)(null),j=(0,Z.useRef)(null),M=(0,Z.useRef)(null),[N,P]=(0,Z.useState)(null),[F,I]=(0,Z.useState)(null),[L,R]=(0,Z.useState)(``),[z,B]=(0,Z.useState)(!1),V=(0,Z.useMemo)(()=>i,[i]);async function ee(t,r){if(b.has(t.name))return!1;x(e=>new Set(e).add(t.name)),C(null);let i=r?`active`:`disabled`;if(!n[t.name])return x(e=>{let n=new Set(e);return n.delete(t.name),n}),!1;try{return await h.mutateAsync({path:{assistant_id:e},body:{llm:{profiles:{[t.name]:{status:i}}}}}),!0}catch(e){return a(e,{context:`settings-ai-profile-toggle`}),C(`Couldn't update "${t.label??t.name}". Please try again.`),!1}finally{x(e=>{let n=new Set(e);return n.delete(t.name),n})}}async function te(t){y(e=>({...e,[t]:!0})),_(e=>{let n={...e};return delete n[t],n});try{let n=r.filter(e=>e!==t);await h.mutateAsync({path:{assistant_id:e},body:{llm:{profiles:{[t]:null},profileOrder:n}}})}catch(e){a(e,{context:`settings-ai-profile-delete`}),_(e=>({...e,[t]:`Failed to delete profile. Please try again.`}))}finally{y(e=>{let n={...e};return delete n[t],n})}}function ne(e){let t=V.find(t=>t.name===e)?.label??e,n=e===o,r=Object.entries(c).filter(([t,n])=>t!==`mainAgent`&&n?.profile===e).map(([e])=>e);if(n||r.length>0){P({name:e,label:t,isActive:n,callSiteIds:r}),R(``),I(null);return}te(e)}async function re(){if(!N||!L)return;B(!0),I(null);let t={};if(N.isActive&&(t.activeProfile=L),N.callSiteIds.length>0){let e={};for(let t of N.callSiteIds)e[t]={profile:L};t.callSites=e}if(Object.keys(t).length>0)try{await h.mutateAsync({path:{assistant_id:e},body:{llm:t}})}catch(e){a(e,{context:`settings-ai-profile-reassign-delete`}),I(`Failed to reassign references. Please try again.`),B(!1);return}let n=N.name;P(null),B(!1),te(n)}async function ie(t,n){if(t===n.name)return;A(null);let i=r.filter(e=>e!==t),o=i.indexOf(n.name);if(o===-1)return;n.after&&(o+=1);let s=[...i.slice(0,o),t,...i.slice(o)];try{await h.mutateAsync({path:{assistant_id:e},body:{llm:{profileOrder:s}}})}catch(e){a(e,{context:`settings-ai-profile-reorder`}),A(`Failed to reorder profiles. Please try again.`)}}let W=V.filter(e=>e.name!==N?.name&&e.source!==`managed`),G=W.length>0?W:V.filter(e=>e.name!==N?.name);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(E.Content,{size:`md`,children:[(0,$.jsxs)(E.Header,{children:[(0,$.jsx)(E.Title,{children:`Model Profiles`}),(0,$.jsx)(E.Description,{children:`Bundle a provider and model into a named profile. Assign profiles to specific actions or swap between them when chatting.`})]}),(0,$.jsxs)(E.Body,{children:[V.length===0?(0,$.jsx)(m,{variant:`body-medium-lighter`,as:`p`,className:`py-4 text-center text-(--content-tertiary)`,children:`No profiles yet. Create one to get started.`}):(0,$.jsx)(`div`,{className:`space-y-1`,children:V.map(e=>(0,$.jsx)(Dt,{profile:e,vellumIsManaged:t,isDragging:w===e.name,dropTarget:D,isDeleting:v[e.name]??!1,deleteError:g[e.name],isToggling:b.has(e.name),onDragStart:t=>{j.current=e.name,T(e.name),t.dataTransfer&&(t.dataTransfer.effectAllowed=`move`)},onDragEnd:()=>{j.current=null,M.current=null,T(null),O(null)},onDragOver:t=>{t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=t.clientY>n.top+n.height/2,i={name:e.name,after:r};M.current=i,O(i)},onDragLeave:t=>{t.currentTarget.contains(t.relatedTarget)||(M.current=null,O(t=>t?.name===e.name?null:t))},onDrop:e=>{e.preventDefault();let t=j.current,n=M.current;j.current=null,M.current=null,T(null),O(null),t&&n&&ie(t,n)},onEditClick:()=>d(e),onDeleteClick:()=>ne(e.name),onStatusToggle:t=>void ee(e,t)},e.name))}),k&&(0,$.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:k}),S&&(0,$.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:S})]}),(0,$.jsxs)(E.Footer,{className:`justify-between`,children:[(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:f,children:`+ New Profile`}),(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:l,children:`Done`})]})]}),(0,$.jsx)(wt,{blocked:N,availableReplacements:G,replacement:L,onReplacementChange:R,error:F,saving:z,onClose:()=>{P(null),I(null)},onConfirm:()=>void re()})]})}var At=`0.10.8`;function jt(){return ne(At)}function Mt({mode:e,connection:t,assistantId:n,existingNames:r,onSave:i,onCancel:a}){let[o,c]=(0,Z.useState)(t?.label??``),l=t?.name??``,d=t?.provider??`anthropic`,f=t?.auth.type??`api_key`,[p,h]=(0,Z.useState)(()=>t?.auth.type===`api_key`?t.auth.credential:t?``:`credential/anthropic/api_key`),[g,_]=(0,Z.useState)(t?.baseUrl??``),[v,y]=(0,Z.useState)(()=>t?.models?t.models.map(e=>e.id).join(`, `):``),[b,x]=(0,Z.useState)(!1),[S,C]=(0,Z.useState)(null),T=d===`openai-compatible`,[D,O]=(0,Z.useState)(``),[k,A]=(0,Z.useState)(!1),M=u(),N=(0,Z.useMemo)(()=>q(p),[p]),F=f===`api_key`&&N!==null,{hasStoredCredential:I,isLoading:R}=$e({assistantId:n,credentialKind:`credential`,credentialName:N?`${N.service}:${N.field}`:``,enabled:F}),{credentials:z}=xe({assistantId:n,enabled:f===`api_key`});(0,Z.useEffect)(()=>{let e=t?.provider??`anthropic`;c(t?.label??``),t?.auth.type===`api_key`?h(t.auth.credential):h(t?``:`credential/${e}/api_key`),C(null),_(t?.baseUrl??``),y(t?.models?t.models.map(e=>e.id).join(`, `):``),O(``),A(!1)},[t]);let B=l.trim().length>0;async function V(){if(B){x(!0),C(null);try{let e;if(f===`api_key`){let t=p.trim()||`credential/${d}/api_key`,r=D.trim();if(r){A(!0);try{let e=q(t);await P({path:{assistant_id:n},body:e?{type:`credential`,name:`${e.service}:${e.field}`,value:r}:{type:`api_key`,name:d,value:r},throwOnError:!0});let i=Te(n,`credential`,e?`${e.service}:${e.field}`:``);M.setQueryData(i,!0),M.invalidateQueries({queryKey:L({path:{assistant_id:n}})})}catch{C(`Failed to save API key. Please try again.`);return}finally{A(!1)}}e={type:`api_key`,credential:t}}else if(t)e=t.auth;else{C(`Nothing to edit. Close and try again.`);return}let r=o.trim()||null,a={auth:e,label:r,...T&&{base_url:g.trim()||null,models:v.trim()?v.split(`,`).map(e=>({id:e.trim()})).filter(e=>e.id):null}},{data:s,error:c,response:u}=await j({path:{assistant_id:n,name:t?.name??l.trim()},body:a});if(!u?.ok){C(Me(u?.status,c)??Ae(u?.status));return}if(!s){C(`Server returned an empty response. Please try again.`);return}i(s)}catch{C(`Failed to save provider. Please try again.`)}finally{x(!1)}}}let ee=z.filter(e=>e.service===d),te=e!==`create`&&t?.auth.type===`api_key`,H=ee.length>0||te,U=K(`Enter your API key`,I);return e===`create`?(0,$.jsx)(ye,{variant:`modal`,assistantId:n,existingNames:r,defaultProviderType:d,onCreated:i,onCancel:a}):(0,$.jsxs)(E.Content,{size:`md`,children:[(0,$.jsxs)(E.Header,{children:[(0,$.jsx)(E.Title,{children:`Edit Provider`}),(0,$.jsx)(E.Description,{children:t?`Editing ${Oe(t)}.`:`Edit provider settings.`})]}),(0,$.jsxs)(E.Body,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsxs)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:[`Display Name`,` `,(0,$.jsx)(`span`,{className:`text-[var(--content-disabled)]`,children:`(optional)`})]}),(0,$.jsx)(w,{value:o,onChange:e=>c(e.target.value),placeholder:`e.g. My Anthropic Key`,fullWidth:!0})]}),T&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Base URL`}),(0,$.jsx)(w,{value:g,onChange:e=>_(e.target.value),placeholder:`https://api.example.com/v1`,fullWidth:!0})]}),(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Models`}),(0,$.jsx)(w,{value:v,onChange:e=>y(e.target.value),placeholder:`model-1, model-2`,fullWidth:!0}),(0,$.jsx)(m,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:`Comma-separated model identifiers exposed by your endpoint.`})]})]}),f===`api_key`&&(0,$.jsx)(de,{apiKeyValue:D,onApiKeyChange:O,credential:p,onCredentialChange:h,isLoadingCredential:R,apiKeyPlaceholder:U,provider:d,providerCredentials:ee,showAdvancedSection:H,onError:C}),f===`oauth_subscription`&&(0,$.jsx)(me,{assistantId:n,onConnected:i}),S&&(0,$.jsx)(m,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:S})]}),(0,$.jsxs)(E.Footer,{children:[(0,$.jsx)(s,{variant:`ghost`,size:`compact`,onClick:a,children:`Cancel`}),(0,$.jsx)(s,{variant:`primary`,size:`compact`,disabled:!B||b||k,onClick:()=>void V(),children:b?`Saving…`:`Save`})]})]})}var Nt={anthropic:!0,openai:!0,gemini:!0,fireworks:!0,openrouter:!0,vellum:!0};function Pt(e){return e in Nt}function Ft({isOpen:e,assistantId:t,onClose:n}){let[r,i]=(0,Z.useState)(!1),[a,o]=(0,Z.useState)(null),s=u(),{data:c,isLoading:l,isError:f}=d({...I({path:{assistant_id:t}}),enabled:e}),p=jt(),{data:m}=d({...B({path:{assistant_id:t}}),enabled:e&&p}),h=(0,Z.useMemo)(()=>{let e=c?.connections??[];return[...e.filter(e=>e.provider===Le),...e.filter(e=>e.provider!==Le)]},[c]);function g(){s.invalidateQueries({queryKey:te({path:{assistant_id:t}})}),s.invalidateQueries({queryKey:V({path:{assistant_id:t}})})}function _(e){s.invalidateQueries({queryKey:F({path:{assistant_id:t}})}),i(!1),o(null)}let v=h.map(e=>e.name),y=()=>{i(!1),o(null)};return(0,$.jsx)(E.Root,{open:e,onOpenChange:e=>{e||(r?y():n())},children:e?r?(0,$.jsx)(Mt,{mode:a?`edit`:`create`,connection:a??void 0,assistantId:t,existingNames:v,onSave:_,onCancel:y}):(0,$.jsx)(It,{connections:h,loading:l,isError:f,assistantId:t,supportsDefaultProvider:p,defaultConnectionName:p?m?.resolvedConnectionName??null:null,onDefaultChanged:g,onClose:n,onEditClick:e=>{o(e),i(!0)},onNewClick:()=>{o(null),i(!0)},onConnectionDeleted:()=>{s.invalidateQueries({queryKey:F({path:{assistant_id:t}})})}}):null})}function It({connections:e,loading:t,isError:n,assistantId:r,supportsDefaultProvider:i,defaultConnectionName:o,onDefaultChanged:c,onClose:l,onEditClick:u,onNewClick:d,onConnectionDeleted:p}){let[h,g]=(0,Z.useState)({}),[_,v]=(0,Z.useState)({}),y=f({...ee(),onMutate:e=>{let t=e.body?.connectionName;t&&g(e=>{let n={...e};return delete n[t],n})},onSuccess:c,onError:(e,t)=>{a(e,{context:`settings-ai-set-default-provider`});let n=t.body?.connectionName;n&&g(e=>({...e,[n]:`Failed to set default provider. Please try again.`}))}});function b(e){Pt(e.provider)&&y.mutate({path:{assistant_id:r},body:{provider:e.provider,connectionName:e.name}})}async function x(e){v(t=>({...t,[e]:!0})),g(t=>{let n={...t};return delete n[e],n});try{let{response:t}=await A({path:{assistant_id:r,name:e}});t?.ok||t?.status===404?p(e):t?.status===409?g(t=>({...t,[e]:`This provider is in use by a profile or as the default provider. Update those settings before deleting it.`})):g(t=>({...t,[e]:`Failed to delete provider. Please try again.`}))}catch{g(t=>({...t,[e]:`Failed to delete provider. Please try again.`}))}finally{v(t=>{let n={...t};return delete n[e],n})}}return(0,$.jsxs)(E.Content,{size:`md`,children:[(0,$.jsxs)(E.Header,{children:[(0,$.jsx)(E.Title,{children:`Providers`}),(0,$.jsx)(E.Description,{children:`Manage the model providers your assistant can use.`})]}),(0,$.jsx)(E.Body,{children:t?(0,$.jsx)(`div`,{className:`space-y-2 py-2`,children:[1,2,3].map(e=>(0,$.jsx)(`div`,{className:`h-10 animate-pulse rounded-lg bg-[var(--surface-active)]`},e))}):n?(0,$.jsx)(m,{variant:`body-medium-default`,as:`p`,className:`py-4 text-center text-(--system-negative-strong)`,children:`Failed to load providers. Please try again.`}):e.length===0?(0,$.jsx)(m,{variant:`body-medium-lighter`,as:`p`,className:`py-4 text-center text-(--content-tertiary)`,children:`No providers yet. Add one to get started.`}):(0,$.jsx)(`div`,{className:`space-y-1`,children:e.map(e=>{let t=_[e.name]??!1,n=h[e.name],r=e.isManaged??!1,a=e.name===o,c=Pt(e.provider),l=y.isPending&&y.variables?.body?.connectionName===e.name;return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg px-2 py-2`,children:[(0,$.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(m,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:Oe(e)}),r&&(0,$.jsx)(C,{tone:`positive`,title:`Managed by Platform — you can rename this provider, but not edit it.`,children:`Platform`}),a&&(0,$.jsx)(C,{tone:`info`,title:`Built-in profiles (Balanced, Quality, Speed) use this provider.`,children:`Default`})]})}),(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[i&&!a&&(0,$.jsx)(s,{variant:`ghost`,size:`compact`,disabled:!c||l,title:c?`Use this provider for the built-in profiles.`:`Built-in profiles can't run on this provider.`,onClick:()=>b(e),children:`Set as default`}),!r&&(0,$.jsx)(s,{variant:`ghost`,size:`compact`,onClick:()=>u(e),children:`Edit`}),(0,$.jsx)(s,{variant:`ghost`,size:`compact`,iconOnly:(0,$.jsx)(De,{}),"aria-label":`Delete ${Oe(e)}`,disabled:r||a||t,title:r?`The Vellum provider cannot be removed`:a?`This is your default provider. Set another provider as default first.`:void 0,onClick:()=>void x(e.name),tintColor:`var(--system-negative-strong)`})]})]}),n?(0,$.jsx)(m,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:n}):null]},e.name)})})}),(0,$.jsxs)(E.Footer,{className:`justify-between`,children:[(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:d,children:`+ Add Provider`}),(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:l,children:`Done`})]})]})}function Lt(){let e=J(),t=u(),{data:n}=d({...R({path:{assistant_id:e}}),staleTime:3e4}),r=jt(),{data:i,refetch:o}=d({...B({path:{assistant_id:e}}),enabled:r}),c=i?.availability,l=n?.llm?.activeProfile??null,f=n?.llm?.advisorProfile??null,p=n?.llm?.callSites??{},{profiles:h,profileOrder:g}=we(n?.llm,e),_=(0,Z.useMemo)(()=>Pe(h,g),[h,g]),v=U({onSuccess:n=>{H(t,{path:{assistant_id:e}},n)}}),[y,b]=X(l),[C,w]=X(f),[T,E]=(0,Z.useState)(!1),[O,A]=(0,Z.useState)(!1),[j,M]=(0,Z.useState)(!1),N=(0,Z.useMemo)(()=>ke(_,[y]),[_,y]),P=(0,Z.useMemo)(()=>ke(_,[C]),[_,C]),F=Object.entries(p).filter(([e,t])=>e!==`mainAgent`&&(t?.profile!=null||t?.provider!=null||t?.model!=null)).length,I=F===1?`1 Override`:F>0?`${F} Overrides`:`Overrides`,L=y!==l,z=C!==f,V=(0,Z.useCallback)(async()=>{try{let t={};L&&(t.activeProfile=y),z&&(t.advisorProfile=C),await v.mutateAsync({path:{assistant_id:e},body:{llm:t}}),D.success(`Saved.`)}catch(e){D.error(`Failed to save. Please try again.`),a(e,{context:`settings-ai-language-model-save`})}},[L,z,y,C,v,e]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ht,{title:`Language Model`,subtitle:`Configure the LLMs that power your assistant`,children:(0,$.jsxs)(`div`,{className:`space-y-4`,children:[c&&c.status!==`ok`&&(0,$.jsx)(S,{tone:c.status===`unknown`?`warning`:`error`,children:c.message??`Your default provider is not available.`}),(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Default Profile`}),(0,$.jsx)(k,{value:y??``,onChange:e=>{b(e===``?null:e)},placeholder:`Select a default profile…`,options:N.map(e=>({value:e.name,label:Qe(e)}))}),N.length===0?(0,$.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-1 text-(--content-tertiary)`,children:`No profiles yet. Click Profiles below to create one.`}):null]}),(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Advisor Profile`}),(0,$.jsx)(k,{value:C??``,onChange:e=>{w(e===``?null:e)},placeholder:`Select an advisor profile…`,options:P.map(e=>({value:e.name,label:Qe(e)}))}),(0,$.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-1 text-(--content-tertiary)`,children:`Which model your assistant consults for a second opinion`})]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>M(!0),children:`Providers`}),(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>E(!0),children:`Profiles`}),(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>A(!0),children:I})]}),(L||z)&&(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Y,{onClick:V,disabled:v.isPending}),v.isPending&&(0,$.jsx)(x,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]})}),e&&(0,$.jsx)(Ot,{isOpen:T,assistantId:e,onClose:()=>E(!1)}),e&&(0,$.jsx)(St,{isOpen:O,onClose:()=>A(!1),assistantId:e}),e&&(0,$.jsx)(Ft,{isOpen:j,assistantId:e,onClose:()=>{M(!1),r&&o()}})]})}function Rt(){let e=J();return(0,Z.useCallback)(async(t,n)=>{try{let{data:r}=await P({path:{assistant_id:e},body:{value:n,type:`api_key`,name:t},throwOnError:!0});pe(r)}catch(e){throw e instanceof Error&&e.message===`No assistant found`?D.error(`Assistant not ready. Please try again.`):D.error(`Failed to save ${t} API key. Please try again.`),a(e,{context:`provision_provider_key`}),e}},[e])}function zt(){let e=J(),i=u(),{data:o}=d({...R({path:{assistant_id:e}}),staleTime:3e4}),s=U({onSuccess:t=>{H(i,{path:{assistant_id:e}},t)}}),c=Rt(),{serverWebSearchMode:l,serverWebSearchProvider:f}=(0,Z.useMemo)(()=>{if(!o)return{serverWebSearchMode:Ce(r(pt,`your-own`),`your-own`),serverWebSearchProvider:r(gt,`inference-provider-native`)};let e=o.services?.[`web-search`];return{serverWebSearchMode:Ce(e?.mode??r(`vellum:ai:webSearchMode`,`your-own`),`your-own`),serverWebSearchProvider:e?.provider||r(`vellum:ai:webSearchProvider`,`inference-provider-native`)}},[o]),[p,m]=(0,Z.useState)(!1),[h,g]=X(l),[_,v]=X(f),[y,b]=(0,Z.useState)(``),S=G.has(_),{hasStoredCredential:C}=$e({assistantId:e,credentialKind:`api_key`,credentialName:_,enabled:S}),T=y.trim().length>0,E=p||h===`your-own`&&S&&!C&&!T||!(h!==l||(h===`managed`?`inference-provider-native`:_)!==f)&&!T,O=K(We[_]??`Enter your API key`,C),A=(0,Z.useCallback)(async()=>{m(!0);let t=y.trim(),r=h===`managed`?`inference-provider-native`:_,o=Fe(r),l=h===`your-own`&&S&&t.length>0;try{l&&await c(r,t),await s.mutateAsync({path:{assistant_id:e},body:{services:{"web-search":{mode:h,provider:r}}}}).catch(e=>{throw D.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e})}catch{m(!1);return}m(!1);try{if(n(pt,h),n(gt,r),l){o&&n(o,t);let r=Te(e,`api_key`,_);i.setQueryData(r,!0),i.invalidateQueries({queryKey:r}),b(``)}D.success(`Web search settings saved.`)}catch(e){a(e,{context:`settings-ai-web-search-persist-local`}),D.error(`Saved, but local preferences could not be written.`)}},[S,s,c,i,e,y,h,_]),j=(0,Z.useCallback)(()=>{let e=Fe(_);e&&t(e),b(``),v(`inference-provider-native`),n(gt,`inference-provider-native`)},[_,v]);return(0,$.jsx)(nt,{title:`Web Search`,subtitle:`Configure how your assistant should search the web`,mode:h,onModeChange:e=>g(e),children:h===`managed`?(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Web search is included with managed inference.`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Y,{onClick:A,disabled:E}),p&&(0,$.jsx)(x,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,$.jsx)(k,{value:_,onChange:v,options:Ye.map(e=>({value:e,label:ze[e]??e}))})]}),S&&(0,$.jsx)(w,{label:`API Key`,type:`password`,value:y,onChange:e=>b(e.target.value),placeholder:O,fullWidth:!0}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Y,{onClick:A,disabled:E}),p&&(0,$.jsx)(x,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),S&&(0,$.jsx)(rt,{onClick:j,filled:!0})]})]})})}var Bt=`default`;function Vt(){let e=J(),i=u(),{data:o}=d({...R({path:{assistant_id:e}}),staleTime:3e4}),s=U({onSuccess:t=>{H(i,{path:{assistant_id:e}},t)}}),c=Rt(),l=(0,Z.useMemo)(()=>o?o.services?.[`web-fetch`]?.provider||r(`vellum:ai:webFetchProvider`,Bt):r(it,Bt),[o]),[f,p]=(0,Z.useState)(!1),[m,h]=X(l),[g,_]=(0,Z.useState)(``),v=qe.has(m),{hasStoredCredential:y}=$e({assistantId:e,credentialKind:`api_key`,credentialName:m,enabled:v}),b=g.trim().length>0,S=f||v&&!y&&!b||m===l&&!b,C=K(Ge[m]??`Enter your API key`,y),T=(0,Z.useCallback)(async()=>{p(!0);let t=g.trim(),r=v&&t.length>0;try{r&&await c(m,t),await s.mutateAsync({path:{assistant_id:e},body:{services:{"web-fetch":{provider:m}}}}).catch(e=>{throw D.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e})}catch{p(!1);return}p(!1);try{if(n(it,m),r){let r=Ne(m);r&&n(r,t);let a=Te(e,`api_key`,m);i.setQueryData(a,!0),i.invalidateQueries({queryKey:a}),_(``)}D.success(`Web fetch settings saved.`)}catch(e){a(e,{context:`settings-ai-web-fetch-persist-local`}),D.error(`Saved, but local preferences could not be written.`)}},[v,s,c,i,e,g,m]),E=(0,Z.useCallback)(()=>{let e=Ne(m);e&&t(e),_(``),h(Bt),n(it,Bt)},[m,h]);return(0,$.jsx)(ht,{id:`web-fetch`,title:`Web Fetch`,subtitle:`Configure how your assistant reads individual web pages`,children:(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,$.jsx)(k,{value:m,onChange:h,options:Ie.map(e=>({value:e,label:Be[e]??e}))})]}),v&&(0,$.jsx)(w,{label:`API Key`,type:`password`,value:g,onChange:e=>_(e.target.value),placeholder:C,fullWidth:!0}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Y,{onClick:T,disabled:S}),f&&(0,$.jsx)(x,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),v&&(0,$.jsx)(rt,{onClick:E,filled:!0})]})]})})}function Ht({assistantId:e,assistantHandle:t,emailRootDomain:n}){let r=u(),i=l(),[o,p]=c(),[m,h]=(0,Z.useState)(``),[g,y]=(0,Z.useState)(!1),[b,C]=(0,Z.useState)(null),[w,T]=(0,Z.useState)(``),[E,k]=(0,Z.useState)(null),[A,j]=(0,Z.useState)(!1),[M,N]=(0,Z.useState)(!1),[P,F]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{g||!t||m||(h(t),y(!0))},[t,g,m]);let I=d({...Ze(),enabled:!0}),L=I.data,R=L?.entitlements,z=R?.managed_email===!0,B=!!R&&!z,V=!L&&I.isError&&!I.isFetching,ee=d({...Ve({path:{assistant_id:e}}),enabled:!B}),te=d({...fe({path:{assistant_id:e}}),enabled:!B}),H=ee.data?.results?.[0],U=te.data?.results?.[0],ne=H?`${H.subdomain}.${n}`:null,W=d({...Ee({path:{assistant_id:e,id:U?.id??``}}),enabled:!!U?.id,refetchOnWindowFocus:!1}),G=d({...be({path:{assistant_id:e,id:H?.id??``}}),enabled:!!H?.id,refetchInterval:e=>{let t=e.state.data?.status;return t===`verified`||t===`failed`?!1:1e4},refetchOnWindowFocus:!0});(0,Z.useEffect)(()=>{o.get(`release`)!==`1`||!H||U||(N(!0),p(e=>{let t=new URLSearchParams(e);return t.delete(`release`),t},{replace:!0}))},[U,H,o,p]);let oe=f(He()),se=f(ae()),K=f(Se()),le=f(ce()),q=(0,Z.useCallback)(()=>{let t={assistant_id:e};r.invalidateQueries({queryKey:ve({path:t})}),r.invalidateQueries({queryKey:he({path:t})}),U?.id&&r.invalidateQueries({queryKey:et({path:{...t,id:U.id}})}),r.invalidateQueries({queryKey:ue()})},[U?.id,e,r]),de=(0,Z.useCallback)(async()=>{let t=m.trim().toLowerCase();if(!t){C(`Enter a subdomain.`);return}j(!1);try{await oe.mutateAsync({path:{assistant_id:e},body:{subdomain:t}}),h(``),C(null),q(),D.success(`Domain ${t}.${n} registered.`)}catch(e){C(re(e,void 0,`Failed to register domain.`))}},[e,n,q,oe,m]),pe=(0,Z.useCallback)(async()=>{let t=w.trim().toLowerCase();if(!t){k(`Enter an email username.`);return}try{await K.mutateAsync({path:{assistant_id:e},body:{username:t}}),T(``),k(null),q(),D.success(`Email address created.`)}catch(e){k(re(e,void 0,`Failed to create email address.`))}},[e,q,K,w]),me=(0,Z.useCallback)(async()=>{if(U?.id){F(!1);try{await le.mutateAsync({path:{assistant_id:e,id:U.id}}),q(),D.success(`Email address removed.`)}catch(e){a(e,{context:`email_address_delete`}),D.error(`Failed to remove email address.`)}}},[U?.id,e,le,q]),ge=(0,Z.useCallback)(async()=>{if(!H?.id)return;if(U){D.error(`Remove the email address first.`);return}N(!1);let t=H.subdomain;try{await se.mutateAsync({path:{assistant_id:e,id:H.id}}),h(t),q(),D.success(`Domain released.`)}catch(e){a(e,{context:`email_domain_release`}),D.error(`Failed to release domain.`)}},[U,e,se,H?.id,H?.subdomain,q]);if(I.isLoading)return(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,$.jsx)(x,{className:`h-4 w-4 animate-spin`}),`Checking subscription…`]});if(B)return(0,$.jsxs)(S,{tone:`info`,icon:(0,$.jsx)(_,{className:`h-4 w-4`,"aria-hidden":!0}),title:`Get a dedicated email address for your assistant`,actions:(0,$.jsx)(s,{size:`compact`,onClick:()=>i(`${ie.settings.usage}?tab=billing&adjust_plan`),children:`Upgrade to Pro`}),children:[`Pro plans include a managed`,` `,`<your-subdomain>.${n}`,` inbox — no provider setup required. Or switch to `,(0,$.jsx)(`strong`,{children:`Your Own`}),` to bring an existing provider.`]});let _e=V?(0,$.jsx)(S,{tone:`warning`,title:`Couldn't verify subscription status`,actions:(0,$.jsx)(s,{size:`compact`,variant:`outlined`,onClick:()=>I.refetch(),children:`Retry`}),children:`We couldn't reach the billing service. The form below assumes managed email is enabled for your org — if it isn't, registering a domain will fail.`}):null;return H?U?(0,$.jsxs)(`div`,{className:`space-y-4`,children:[_e,(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Address`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`font-mono text-body-small-default text-[var(--content-default)]`,children:U.address}),(0,$.jsx)(tt,{status:G.data?.status,message:G.data?.message,isLoading:G.isLoading}),(0,$.jsx)(s,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,$.jsx)(De,{}),onClick:()=>F(!0),disabled:le.isPending,"aria-label":`Remove email address`})]}),(0,$.jsx)(O,{open:P,title:`Remove Email Address`,message:(0,$.jsxs)($.Fragment,{children:[`Are you sure you want to remove `,(0,$.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 font-mono text-[0.9em]`,children:U.address}),`? Your assistant will no longer be able to send or receive email at this address.`]}),confirmLabel:`Remove`,destructive:!0,onConfirm:me,onCancel:()=>F(!1)})]}),W.data?.usage&&(0,$.jsxs)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:[W.data.usage.sent_today,` /`,` `,W.data.usage.daily_limit,` sent today ·`,` `,W.data.usage.received_today,` received`]})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[_e,(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Domain`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)(`span`,{className:`font-mono text-body-small-default text-[var(--content-default)]`,children:[H.subdomain,`.`,n]}),(0,$.jsx)(tt,{status:G.data?.status,message:G.data?.message,isLoading:G.isLoading}),(0,$.jsx)(s,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,$.jsx)(De,{}),onClick:()=>N(!0),disabled:se.isPending,"aria-label":`Release domain`})]}),(0,$.jsx)(O,{open:M,title:`Release Domain`,message:(0,$.jsxs)($.Fragment,{children:[`Are you sure you want to release `,(0,$.jsxs)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 font-mono text-[0.9em]`,children:[H.subdomain,`.`,n]}),`? The subdomain will become available for others to claim.`]}),confirmLabel:`Release`,destructive:!0,onConfirm:ge,onCancel:()=>N(!1)})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Email address`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)(`div`,{className:`flex h-9 min-w-0 flex-1 items-center rounded-md border bg-[var(--field-bg)] text-body-medium-lighter transition-[border-color] duration-150 ${E?`border-[var(--system-negative-strong)]`:`border-[var(--field-border)] focus-within:border-[var(--border-active)]`}`,children:[(0,$.jsx)(`input`,{value:w,onChange:e=>{T(e.target.value.toLowerCase()),E&&k(null)},placeholder:`hi`,"aria-label":`Email username`,"aria-invalid":!!E,className:`h-full min-w-0 flex-1 bg-transparent pl-3 pr-1 text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none`}),(0,$.jsxs)(`span`,{className:`shrink-0 pr-3 font-mono text-[var(--content-secondary)]`,children:[`@`,ne]})]}),(0,$.jsx)(s,{onClick:pe,disabled:K.isPending||!w.trim(),children:K.isPending?`Creating…`:`Create`})]}),E&&(0,$.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:E})]})]}):(0,$.jsxs)(`div`,{className:`space-y-3`,children:[_e,(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Subdomain`}),(0,$.jsx)(v,{subdomain:m,onSubdomainChange:e=>{h(e),b&&C(null)},domainSuffix:n,subdomainPlaceholder:`my-assistant`,error:b}),(0,$.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Each assistant gets its own subdomain. Lowercase letters, numbers, and hyphens only.`}),(0,$.jsx)(s,{onClick:()=>j(!0),disabled:oe.isPending||!m.trim(),children:oe.isPending?`Registering…`:`Register`}),(0,$.jsx)(O,{open:A,title:`Set Subdomain`,message:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 font-mono text-[0.9em]`,children:m.trim().toLowerCase()||`subdomain`}),` will also become your assistant's public handle. You won't be able to change it once set.`]}),confirmLabel:`Confirm`,onConfirm:de,onCancel:()=>j(!1)})]})}function Ut(){let e=J(),t=W(),{data:o}=d({...je(),enabled:t}),s=o?.results?.[0]?.handle,c=_t.use.emailRootDomain(),l=Ke(),[u,f]=(0,Z.useState)(()=>l===`gated`?`your-own`:Ce(r(st,`managed`),`managed`)),[p,m]=(0,Z.useState)(()=>{let e=r(at,`resend`);return e===`mailgun`||e===`resend`?e:`resend`}),h=d({queryKey:[`byoEmailCredential`,e,p],queryFn:async()=>{let{data:t}=await N({path:{assistant_id:e},body:{service:p,field:`api_key`},throwOnError:!0});return t},enabled:u===`your-own`||l===`gated`,staleTime:6e4,retry:i,meta:{errorContext:`byo_email_credential_check`}});(0,Z.useEffect)(()=>{h.error&&a(h.error,{context:`byo_email_credential_check`,bestEffort:!0})},[h.error]);let _=h.data?.hasSecret===!0,v=(0,Z.useCallback)(e=>{f(e),n(st,e)},[]),x=(0,Z.useCallback)(()=>{n(at,p),D.success(`Email settings saved.`)},[p]),S=(0,Z.useMemo)(()=>ct.find(e=>e.id===p)??ct[0],[p]),C=(0,$.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-sunken)] p-3 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,$.jsx)(b,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--system-positive-strong)]`}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsxs)(`span`,{children:[`Configure `,S.displayName,` via the assistant CLI: ask the assistant to run the`,` `,(0,$.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 text-[12px]`,children:S.setupSkill}),` `,`skill. It walks you through storing the API key, detecting the domain, and (optionally) wiring up an inbound webhook.`]}),(0,$.jsxs)(`a`,{href:S.docsUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[`Open `,S.displayName,(0,$.jsx)(y,{className:`h-3 w-3`})]})]})]}),w=(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,$.jsx)(k,{value:p,onChange:e=>{(e===`mailgun`||e===`resend`)&&m(e)},options:ct.map(e=>({value:e.id,label:e.displayName}))})]}),_?(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-[var(--system-positive-subtle)] bg-[var(--surface-sunken)] p-3 text-body-small-default text-[var(--content-default)]`,children:[(0,$.jsx)(g,{className:`h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}),(0,$.jsxs)(`span`,{children:[S.displayName,` API key configured. To reconfigure, run the`,` `,(0,$.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 text-[12px]`,children:S.setupSkill}),` `,`skill.`]})]}),(0,$.jsxs)(`a`,{href:S.docsUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-body-small-default text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[`Open `,S.displayName,(0,$.jsx)(y,{className:`h-3 w-3`})]})]}):C,(0,$.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,$.jsx)(Y,{onClick:x,disabled:!1})})]});return l===`gated`?(0,$.jsx)(ht,{id:`email`,title:`Email`,subtitle:`Configure how your assistant sends and receives email`,children:w}):(0,$.jsx)(nt,{id:`email`,title:`Email`,subtitle:`Configure how your assistant sends and receives email`,mode:u,onModeChange:v,children:u===`managed`?(0,$.jsx)(`div`,{className:`space-y-4`,children:l===`disabled`?(0,$.jsx)(le,{children:`Log in to the Vellum platform to manage email settings.`}):(0,$.jsx)(Ht,{assistantId:e,assistantHandle:s,emailRootDomain:c})}):w})}function Wt(){let e=J(),t=u(),{data:i}=d({...R({path:{assistant_id:e}}),staleTime:3e4}),o=U({onSuccess:n=>{H(t,{path:{assistant_id:e}},n)}}),s=Rt(),[c,l]=X((0,Z.useMemo)(()=>Ce(i?i.services?.[`image-generation`]?.mode??r(`vellum:ai:imageGenMode`,`your-own`):r(ft,`your-own`),`your-own`),[i])),[f,p]=(0,Z.useState)(()=>r(ot,`gemini-3.1-flash-image-preview`)),[m,h]=(0,Z.useState)(``),[g,_]=(0,Z.useState)(!1),v=(0,Z.useCallback)(async()=>{_(!0);let r=m.trim(),i=c===`your-own`&&r.length>0;try{i&&await s(ut(f),r),await o.mutateAsync({path:{assistant_id:e},body:{services:{"image-generation":{mode:c}}}}).catch(e=>{throw D.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e});try{await M({path:{assistant_id:e},body:{modelId:f},throwOnError:!0})}catch(e){throw D.error(`Failed to update image generation model. Please try again.`),a(e,{context:`set_image_gen_model`}),e}finally{t.invalidateQueries({queryKey:V({path:{assistant_id:e}})})}}catch{_(!1);return}_(!1);try{n(ft,c),n(ot,f),i&&h(``),D.success(`Image generation settings saved.`)}catch(e){a(e,{context:`settings-ai-image-gen-persist-local`}),D.error(`Saved, but local preferences could not be written.`)}},[m,c,f,e,o,s,t]),y=(0,Z.useCallback)(()=>{h(``),p(`gemini-3.1-flash-image-preview`),n(ot,`gemini-3.1-flash-image-preview`)},[]);return(0,$.jsx)(nt,{title:`Image Generation`,subtitle:`Configure which model your assistant uses to generate images`,mode:c,onModeChange:e=>l(e),children:c===`managed`?(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Active Model`}),(0,$.jsxs)(`div`,{className:`flex items-end gap-3`,children:[(0,$.jsx)(k,{className:`flex-1`,value:f,onChange:p,options:dt.map(e=>({value:e,label:lt[e]??e}))}),(0,$.jsx)(Y,{onClick:v,disabled:g}),g&&(0,$.jsx)(x,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsx)(w,{label:`API Key`,type:`password`,value:m,onChange:e=>h(e.target.value),placeholder:ut(f)===`openai`?`Enter your OpenAI API key`:`Enter your Gemini API key`,fullWidth:!0}),(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Active Model`}),(0,$.jsx)(k,{value:f,onChange:p,options:dt.map(e=>({value:e,label:lt[e]??e}))})]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Y,{onClick:v,disabled:g}),g&&(0,$.jsx)(x,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),(0,$.jsx)(rt,{onClick:y})]})]})})}function Gt(){return(0,Z.useEffect)(()=>{let e=window.location.hash.slice(1);e&&requestAnimationFrame(()=>{document.getElementById(e)?.scrollIntoView({block:`start`})})},[]),(0,$.jsxs)(`div`,{className:`space-y-5`,children:[(0,$.jsx)(mt,{}),(0,$.jsx)(Lt,{}),(0,$.jsx)(zt,{}),(0,$.jsx)(Vt,{}),(0,$.jsx)(Ut,{}),(0,$.jsx)(Wt,{})]})}export{Gt as AiPage};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./createLucideIcon-Bjb-Kuq7.js";import{n as i,r as a}from"./avatar-svg-compositor-Cl0XprhK.js";import{t as o}from"./use-reduced-motion-C8T4AelQ.js";var s=r(`dices`,[[`rect`,{width:`12`,height:`12`,x:`2`,y:`10`,rx:`2`,ry:`2`,key:`6agr2n`}],[`path`,{d:`m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6`,key:`1o487t`}],[`path`,{d:`M6 18h.01`,key:`uhywen`}],[`path`,{d:`M10 14h.01`,key:`ssrbsk`}],[`path`,{d:`M15 6h.01`,key:`cblpky`}],[`path`,{d:`M18 9h.01`,key:`2061c0`}]]),c=e(t(),1),l=n();function u(e,t){return e+Math.random()*(t-e)}function d(e){let t=[],n=/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,r;for(;(r=n.exec(e))!==null;)t.push(parseFloat(r[0]));return t}function f(e){let t=d(e),n=0,r=0,i=0;for(let e=0;e<t.length-1;e+=2)n+=t[e],r+=t[e+1],i++;return i>0?{x:n/i,y:r/i}:{x:0,y:0}}function p(e,t,n){let r=f(e),i=t*1.1;return e.replace(/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,(t,a)=>{let o=parseFloat(t),s=e.slice(0,a).match(/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi),c=s?s.length:0,l=c%2==0,u=l?r.x:r.y,f=d(e),p=l?c+1:c-1,m=p>=0&&p<f.length?f[p]:u,h=l?o:m,g=Math.atan2((l?m:o)-r.y,h-r.x),_=1+(Math.sin(g*2+i)*.7+Math.sin(g*3-i*.5)*.3)*n;return(u+(o-u)*_).toFixed(3)})}function m(e,t,n){let r=[e];for(let i=1;i<t;i++)r.push(p(e,i,n));return r}function h({components:e,traits:t,size:n,isAssistantBusy:r=!1,breathe:s=!0}){let d=o(),{bodyShape:f,eyeStyle:p,color:h}=a(e,t.bodyShape,t.eyeStyle,t.color),{bodyTransform:g,eyeTransform:_}=i(f,p,e,n),v=p.sourceViewBox,y=f.viewBox,b=Math.min(n/y.width,n/y.height),x=(n-y.width*b)/2,S=(n-y.height*b)/2,C=Math.min(y.width/v.width,y.height/v.height),w=e.faceCenterOverrides.find(e=>e.bodyShape===f.id&&e.eyeStyle===p.id),T=w?w.faceCenter:f.faceCenter,E=T.x-p.eyeCenter.x*C,D=T.y-p.eyeCenter.y*C,O=b*(E+p.eyeCenter.x*C)+x,k=b*(D+p.eyeCenter.y*C)+S,A=(0,c.useMemo)(()=>r?m(f.svgPath,16,.06):[f.svgPath],[f.svgPath,r]),[j,M]=(0,c.useState)(!1),[N,P]=(0,c.useState)(0),[F,I]=(0,c.useState)(0),L=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(d||r){M(!1);return}let e=!1;function t(){return setTimeout(()=>{e||(M(!0),setTimeout(()=>{e||(M(!1),Math.random()<.2?setTimeout(()=>{e||(M(!0),setTimeout(()=>{e||(M(!1),t())},150))},200):t())},150))},u(3e3,7e3))}let n=t();return()=>{e=!0,clearTimeout(n)}},[d,r]),(0,c.useEffect)(()=>{if(d||r){P(0);return}let e=!1;function t(){return setTimeout(()=>{e||(P((Math.random()<.5?-1:1)*u(1,2)),setTimeout(()=>{e||(P(0),t())},200))},u(8e3,15e3))}let n=t();return()=>{e=!0,clearTimeout(n)}},[d,r]),(0,c.useEffect)(()=>{if(!r||d){I(0);return}let e=0;return L.current=setInterval(()=>{e=(e+1)%A.length,I(e)},150),()=>{L.current&&clearInterval(L.current),L.current=null}},[r,d,A.length]);let R=n/2,z=n/2,B=d?`none`:r?`avatar-morph-scale 2.4s ease-in-out infinite, avatar-morph-rotate 3s ease-in-out infinite`:s?`avatar-breathe-kf 4s ease-in-out infinite`:`none`,V=r?0:N,H=j&&!r,U=A[F]??f.svgPath;return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:n,height:n,viewBox:`0 0 ${n} ${n}`,style:{animation:B,transformOrigin:`center`},children:[(0,l.jsx)(`g`,{style:{transform:`rotate(${V}deg)`,transformOrigin:`${R}px ${z}px`,transition:V===0?`transform 0.3s ease-out`:`transform 0.2s ease-in-out`},children:(0,l.jsx)(`path`,{d:U,fill:h.hex,transform:g,style:{transition:r?`d 0.3s ease-in-out`:`none`}})}),(0,l.jsx)(`g`,{style:{transform:H?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${O}px ${k}px`,transition:`transform 0.15s ease-in-out`},children:p.paths.map((e,t)=>(0,l.jsx)(`path`,{d:e.svgPath,fill:e.color,transform:_},t))})]})}export{s as n,h as t};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./createLucideIcon-Bjb-Kuq7.js";import{n as i,r as a}from"./avatar-svg-compositor-Cc4SMoMl.js";import{t as o}from"./use-reduced-motion-DgvFz95W.js";var s=r(`dices`,[[`rect`,{width:`12`,height:`12`,x:`2`,y:`10`,rx:`2`,ry:`2`,key:`6agr2n`}],[`path`,{d:`m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6`,key:`1o487t`}],[`path`,{d:`M6 18h.01`,key:`uhywen`}],[`path`,{d:`M10 14h.01`,key:`ssrbsk`}],[`path`,{d:`M15 6h.01`,key:`cblpky`}],[`path`,{d:`M18 9h.01`,key:`2061c0`}]]),c=e(t(),1),l=n();function u(e,t){return e+Math.random()*(t-e)}function d(e){let t=[],n=/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,r;for(;(r=n.exec(e))!==null;)t.push(parseFloat(r[0]));return t}function f(e){let t=d(e),n=0,r=0,i=0;for(let e=0;e<t.length-1;e+=2)n+=t[e],r+=t[e+1],i++;return i>0?{x:n/i,y:r/i}:{x:0,y:0}}function p(e,t,n){let r=f(e),i=t*1.1;return e.replace(/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,(t,a)=>{let o=parseFloat(t),s=e.slice(0,a).match(/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi),c=s?s.length:0,l=c%2==0,u=l?r.x:r.y,f=d(e),p=l?c+1:c-1,m=p>=0&&p<f.length?f[p]:u,h=l?o:m,g=Math.atan2((l?m:o)-r.y,h-r.x),_=1+(Math.sin(g*2+i)*.7+Math.sin(g*3-i*.5)*.3)*n;return(u+(o-u)*_).toFixed(3)})}function m(e,t,n){let r=[e];for(let i=1;i<t;i++)r.push(p(e,i,n));return r}function h({components:e,traits:t,size:n,isAssistantBusy:r=!1,breathe:s=!0}){let d=o(),{bodyShape:f,eyeStyle:p,color:h}=a(e,t.bodyShape,t.eyeStyle,t.color),{bodyTransform:g,eyeTransform:_}=i(f,p,e,n),v=p.sourceViewBox,y=f.viewBox,b=Math.min(n/y.width,n/y.height),x=(n-y.width*b)/2,S=(n-y.height*b)/2,C=Math.min(y.width/v.width,y.height/v.height),w=e.faceCenterOverrides.find(e=>e.bodyShape===f.id&&e.eyeStyle===p.id),T=w?w.faceCenter:f.faceCenter,E=T.x-p.eyeCenter.x*C,D=T.y-p.eyeCenter.y*C,O=b*(E+p.eyeCenter.x*C)+x,k=b*(D+p.eyeCenter.y*C)+S,A=(0,c.useMemo)(()=>r?m(f.svgPath,16,.06):[f.svgPath],[f.svgPath,r]),[j,M]=(0,c.useState)(!1),[N,P]=(0,c.useState)(0),[F,I]=(0,c.useState)(0),L=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(d||r){M(!1);return}let e=!1;function t(){return setTimeout(()=>{e||(M(!0),setTimeout(()=>{e||(M(!1),Math.random()<.2?setTimeout(()=>{e||(M(!0),setTimeout(()=>{e||(M(!1),t())},150))},200):t())},150))},u(3e3,7e3))}let n=t();return()=>{e=!0,clearTimeout(n)}},[d,r]),(0,c.useEffect)(()=>{if(d||r){P(0);return}let e=!1;function t(){return setTimeout(()=>{e||(P((Math.random()<.5?-1:1)*u(1,2)),setTimeout(()=>{e||(P(0),t())},200))},u(8e3,15e3))}let n=t();return()=>{e=!0,clearTimeout(n)}},[d,r]),(0,c.useEffect)(()=>{if(!r||d){I(0);return}let e=0;return L.current=setInterval(()=>{e=(e+1)%A.length,I(e)},150),()=>{L.current&&clearInterval(L.current),L.current=null}},[r,d,A.length]);let R=n/2,z=n/2,B=d?`none`:r?`avatar-morph-scale 2.4s ease-in-out infinite, avatar-morph-rotate 3s ease-in-out infinite`:s?`avatar-breathe-kf 4s ease-in-out infinite`:`none`,V=r?0:N,H=j&&!r,U=A[F]??f.svgPath;return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:n,height:n,viewBox:`0 0 ${n} ${n}`,style:{animation:B,transformOrigin:`center`},children:[(0,l.jsx)(`g`,{style:{transform:`rotate(${V}deg)`,transformOrigin:`${R}px ${z}px`,transition:V===0?`transform 0.3s ease-out`:`transform 0.2s ease-in-out`},children:(0,l.jsx)(`path`,{d:U,fill:h.hex,transform:g,style:{transition:r?`d 0.3s ease-in-out`:`none`}})}),(0,l.jsx)(`g`,{style:{transform:H?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${O}px ${k}px`,transition:`transform 0.15s ease-in-out`},children:p.paths.map((e,t)=>(0,l.jsx)(`path`,{d:e.svgPath,fill:e.color,transform:_},t))})]})}export{s as n,h as t};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-jRWAZmH_.js";import{B as t,F as ee,G as te,H as n,I as ne,J as re,K as r,L as i,R as ie,U as a,V as o,W as s,X as ae,Y as c,Z as oe,q as l,z as u}from"./local-mode-BEOsCeey.js";function d(e){return oe(ne,e)}function se(e){return ae(ee,e)}var ce=i([`end_turn`,`max_tokens`,`max_turn_requests`,`refusal`,`cancelled`]),le=s({type:n(`acp_session_completed`),acpSessionId:l(),stopReason:ce}).strict(),ue=s({type:n(`acp_session_error`),acpSessionId:l(),error:l()}).strict(),de=s({type:n(`acp_session_spawned`),acpSessionId:l(),agent:l(),parentConversationId:l(),parentToolUseId:l().optional(),task:l().optional()}).strict(),fe=i([`agent_message_chunk`,`agent_thought_chunk`,`user_message_chunk`,`tool_call`,`tool_call_update`,`plan`]),pe=s({type:n(`acp_session_update`),acpSessionId:l(),updateType:fe,content:l().optional(),toolCallId:l().optional(),toolTitle:l().optional(),toolKind:l().optional(),toolStatus:l().optional(),rawInput:c().optional(),rawOutput:c().optional(),locations:u(s({path:l(),line:a().optional()})).optional(),messageId:l().optional(),seq:a().optional()}).strict(),me=s({type:n(`acp_session_usage`),acpSessionId:l(),usedTokens:a(),contextSize:a(),inputTokens:a().optional(),outputTokens:a().optional(),costAmount:a().optional(),costCurrency:l().optional()}).strict(),he=i([`idle`,`thinking`,`streaming`,`tool_running`,`awaiting_confirmation`]),ge=i([`assistant_turn`,`user_turn`,`global`]),_e=i([`message_dequeued`,`thinking_delta`,`first_text_delta`,`tool_use_start`,`preview_start`,`tool_result_received`,`confirmation_requested`,`confirmation_resolved`,`context_compacting`,`message_complete`,`generation_cancelled`,`error_terminal`]),ve=s({type:n(`assistant_activity_state`),conversationId:l(),activityVersion:a(),phase:he,anchor:ge,reason:_e,requestId:l().optional(),statusText:l().optional()}),ye=s({type:n(`assistant_text_delta`),text:l(),messageId:l().optional(),conversationId:l().optional()}),f=s({type:n(`assistant_thinking_delta`),thinking:l(),messageId:l().optional(),conversationId:l().optional(),timestampMs:a().optional()}),p=s({type:n(`assistant_turn_start`),messageId:l(),conversationId:l().optional()}),m=s({type:n(`avatar_updated`),avatarPath:l()}),h=s({type:n(`background_tool_completed`),id:l(),conversationId:l(),status:i([`completed`,`failed`,`cancelled`]),exitCode:a().nullable().optional(),output:l().optional(),completedAt:a()}),g=s({type:n(`background_tool_started`),id:l(),toolName:l(),conversationId:l(),command:l(),startedAt:a()}),_=s({type:n(`compaction_circuit_closed`),conversationId:l()}),v=s({type:n(`compaction_circuit_open`),conversationId:l(),reason:n(`3_consecutive_failures`),openUntil:a()}),y=s({label:l(),description:l(),pattern:l()}),b=s({label:l(),scope:l()}),x=s({label:l(),scope:l()}),S=s({filePath:l(),oldContent:l(),newContent:l(),isNewFile:t()}),C=i([`allow_once`,`allow_always`,`reject_once`,`reject_always`]),w=s({optionId:l(),name:l(),kind:C}),T=i([`sandbox`,`host`]),E=s({type:n(`confirmation_request`),requestId:l(),toolName:l(),input:r(l(),c()),riskLevel:l(),riskReason:l().optional(),isContainerized:t().optional(),executionTarget:T.optional(),allowlistOptions:u(y),scopeOptions:u(b),directoryScopeOptions:u(x).optional(),diff:S.optional(),conversationId:l().optional(),persistentDecisionsAllowed:t().optional(),toolUseId:l().optional(),acpToolKind:l().optional(),acpOptions:u(w).optional()}),D=s({type:n(`contact_request`),requestId:l(),channel:l().optional(),placeholder:l().optional(),label:l().optional(),description:l().optional(),role:l().optional()}),O=i([`PROVIDER_NETWORK`,`PROVIDER_RATE_LIMIT`,`MANAGED_USAGE_LIMIT`,`PROVIDER_OVERLOADED`,`PROVIDER_API`,`IMAGE_TOO_LARGE`,`PROVIDER_BILLING`,`PROVIDER_ORDERING`,`PROVIDER_WEB_SEARCH`,`PROVIDER_NOT_CONFIGURED`,`PROVIDER_INVALID_KEY`,`MANAGED_KEY_INVALID`,`CONTEXT_TOO_LARGE`,`BUDGET_YIELD_UNRECOVERED`,`MAX_TOKENS_REACHED`,`CONVERSATION_ABORTED`,`CONVERSATION_PROCESSING_FAILED`,`DISK_SPACE_CRITICAL`,`UNKNOWN`]),k=s({type:n(`conversation_error`),conversationId:l(),code:O,userMessage:l(),retryable:t(),debugDetails:l().optional(),errorCategory:l().optional(),connectionName:l().optional(),profileName:l().optional()}),A=i([`created`,`renamed`,`deleted`,`reordered`,`seen_changed`]),j=s({type:n(`conversation_list_invalidated`),reason:A}),M=i([`memory_v3`]),N=s({type:n(`conversation_notice`),conversationId:l(),source:M,code:O,userMessage:l(),errorCategory:l().optional()}),P=s({type:n(`conversation_title_updated`),conversationId:l(),title:l()}),F=i([`disabled`,`ok`,`warning`,`critical`,`unknown`]),I=i([`agent-turns`,`background-work`,`remote-ingress`]),L=s({enabled:t(),state:F,locked:t(),acknowledged:t(),overrideActive:t(),effectivelyLocked:t(),lockId:l().nullable(),usagePercent:a().nullable(),thresholdPercent:a(),path:l().nullable(),lastCheckedAt:l().nullable(),blockedCapabilities:u(I),error:l().nullable()}),R=s({type:n(`disk_pressure_status_changed`),status:L}),be=s({id:l(),surfaceId:l(),author:l(),content:l(),anchorStart:a().optional(),anchorEnd:a().optional(),anchorText:l().optional(),parentCommentId:l().optional(),status:l(),createdAt:a(),updatedAt:a()}),z=s({type:n(`document_comment_created`),conversationId:l(),surfaceId:l(),comment:be}),xe=s({type:n(`document_comment_deleted`),conversationId:l(),surfaceId:l(),commentId:l()}),Se=s({type:n(`document_comment_reopened`),conversationId:l(),surfaceId:l(),commentId:l()}),Ce=s({type:n(`document_comment_resolved`),conversationId:l(),surfaceId:l(),commentId:l(),resolvedBy:l()}),we=s({type:n(`document_editor_update`),conversationId:l(),surfaceId:l(),markdown:l(),mode:l()}),Te=s({type:n(`error`),message:l(),code:l().optional(),category:l().optional(),errorCategory:l().optional(),requestId:l().optional(),conversationId:l().optional()}),Ee=s({type:n(`generation_cancelled`),conversationId:l().optional()}),B=s({id:l().optional(),filename:l(),mimeType:l(),data:l(),sourceType:i([`sandbox_file`,`host_file`,`tool_block`]).optional(),sizeBytes:a().optional(),thumbnailData:l().optional(),fileBacked:t().optional(),filePath:l().optional()}),De=s({type:n(`generation_handoff`),conversationId:l().optional(),requestId:l().optional(),queuedCount:a(),messageId:l().optional(),attachments:u(B).optional(),attachmentWarnings:u(l()).optional()}),Oe=s({type:n(`home_feed_updated`),updatedAt:l(),newItemCount:a()}),ke=s({kind:i([`plugin`,`workspace`]),id:l()}),Ae=s({type:n(`hook_event`),conversationId:l().optional(),hookName:l(),owner:ke,detail:r(l(),c())}),je=s({type:n(`identity_changed`),name:l(),role:l(),personality:l(),emoji:l(),home:l()}),Me=i([`approved`,`rejected`,`answered`,`cancelled`,`superseded`]),Ne=s({type:n(`interaction_resolved`),requestId:l(),conversationId:l(),state:Me,kind:l()}),Pe=s({type:n(`message_complete`),messageId:l().optional(),conversationId:l().optional(),source:i([`main`,`aux`]).optional(),attachments:u(B).optional(),attachmentWarnings:u(l()).optional()}),Fe=s({type:n(`message_dequeued`),conversationId:l(),requestId:l()}),Ie=s({type:n(`message_queued`),conversationId:l(),requestId:l(),position:a()}),Le=s({type:n(`message_queued_deleted`),conversationId:l(),requestId:l()}),Re=s({type:n(`message_request_complete`),conversationId:l(),requestId:l(),runStillActive:t().optional()}),ze=s({type:n(`navigate_settings`),tab:l()}),Be=s({type:n(`notification_intent`),sourceEventName:l(),title:l(),body:l(),deliveryId:l().optional(),deepLinkMetadata:r(l(),c()).optional(),targetGuardianPrincipalId:l().optional(),silent:t().optional()}),Ve=s({type:n(`open_conversation`),conversationId:l(),title:l().optional(),anchorMessageId:l().optional(),focus:t().optional()}),He=s({type:n(`open_panel`),panelType:l(),data:r(l(),c()).optional(),conversationId:l().optional(),surfaceId:l().optional()}),Ue=s({type:n(`open_url`),url:l().min(1),title:l().optional(),conversationId:l().optional()}),V=s({id:l(),label:l(),description:l().optional()}),H=s({id:l(),question:l(),description:l().optional(),options:u(V),freeTextPlaceholder:l().optional()}),We=s({type:n(`question_request`),requestId:l(),questions:u(H),question:l(),description:l().optional(),options:u(V),freeTextPlaceholder:l().optional(),conversationId:l().optional(),toolUseId:l().optional()}),Ge=s({type:n(`relationship_state_updated`),updatedAt:l()}),Ke=s({type:n(`secret_request`),requestId:l(),service:l(),field:l(),label:l(),description:l().optional(),placeholder:l().optional(),conversationId:l().optional(),purpose:l().optional(),allowedTools:u(l()).optional(),allowedDomains:u(l()).optional(),allowOneTimeSend:t().optional()}),qe=s({type:l(),content:l().optional(),text:l().optional(),result:l().optional(),input:r(l(),c()).optional(),toolName:l().optional(),isError:t().optional(),toolUseId:l().optional()}).passthrough(),Je=s({type:n(`subagent_event`),conversationId:l(),subagentId:l(),event:qe}).strict(),Ye=s({type:n(`subagent_spawned`),subagentId:l(),parentConversationId:l(),label:l(),objective:l(),isFork:t().optional(),parentToolUseId:l().optional()}).strict(),U=i([`pending`,`running`,`awaiting_input`,`completed`,`failed`,`aborted`,`interrupted`]),W=s({inputTokens:a(),outputTokens:a(),estimatedCost:a()}).strict(),Xe=s({type:n(`subagent_status_changed`),subagentId:l(),status:U,error:l().optional(),usage:W.optional()}).strict(),Ze=s({type:n(`sync_changed`),tags:u(l().min(1)).min(1),originClientId:l().min(1).optional()}),Qe=i([`tool_start`,`tool_complete`,`status`]),$e=s({type:n(`tool_output_chunk`),chunk:l(),conversationId:l().optional(),toolUseId:l().optional(),subType:Qe.optional(),subToolName:l().optional(),subToolInput:l().optional(),subToolIsError:t().optional(),subToolId:l().optional(),messageId:l().optional()}),et=s({pattern:l(),label:l()}),tt=i([`anthropic-native`,`brave`,`perplexity`,`tavily`,`firecrawl`]),nt=i([`default`,`firecrawl`]),rt=s({rank:a(),title:l(),url:l(),domain:l(),faviconUrl:l().optional(),snippet:l().optional(),age:l().optional(),score:a().optional()}),it=s({query:l(),provider:tt,resultCount:a(),durationMs:a(),results:u(rt),errorMessage:l().optional()}),at=s({url:l(),finalUrl:l(),provider:nt.optional(),status:a(),contentType:l().optional(),byteCount:a(),charCount:a(),truncated:t(),title:l().optional(),domain:l(),faviconUrl:l().optional(),redirectCount:a(),durationMs:a(),errorMessage:l().optional(),mayRequireJavaScript:t().optional()}),G=s({webSearch:it.optional(),webFetch:at.optional()}),ot=s({type:n(`tool_result`),toolName:l(),result:l(),isError:t().optional(),diff:S.optional(),status:l().optional(),conversationId:l().optional(),imageData:l().optional(),imageDataList:u(l()).optional(),toolUseId:l().optional(),messageId:l().optional(),riskLevel:l().optional(),riskReason:l().optional(),matchedTrustRuleId:l().optional(),isContainerized:t().optional(),riskScopeOptions:u(et).optional(),riskAllowlistOptions:u(y).optional(),riskDirectoryScopeOptions:u(x).optional(),approvalMode:l().optional(),approvalReason:l().optional(),riskThreshold:l().optional(),activityMetadata:G.optional(),errorCode:l().optional(),completedAt:a().optional()}),st=s({type:n(`tool_use_preview_start`),toolUseId:l(),toolName:l(),conversationId:l().optional(),messageId:l().optional(),previewStartedAt:a().optional()}),ct=s({type:n(`tool_use_start`),toolName:l(),input:r(l(),c()),toolUseId:l().optional(),messageId:l().optional(),conversationId:l().optional(),startedAt:a().optional(),previewStartedAt:a().optional()}),lt=s({type:n(`ui_surface_complete`),conversationId:l(),surfaceId:l(),summary:l(),submittedData:r(l(),c()).optional()}),ut=s({type:n(`ui_surface_dismiss`),conversationId:l(),surfaceId:l()}),dt=s({id:l(),label:l(),style:i([`primary`,`secondary`,`destructive`]).optional(),data:r(l(),c()).optional()}),ft=s({type:n(`ui_surface_show`),conversationId:l(),surfaceId:l(),surfaceType:l(),title:l().optional(),data:r(l(),c()),actions:u(dt).optional(),display:i([`inline`,`panel`]).optional(),messageId:l().optional(),persistent:t().optional(),toolCallId:l().optional()}),pt=s({type:n(`ui_surface_update`),conversationId:l(),surfaceId:l(),data:r(l(),c())}),K=s({type:n(`usage_progress`),conversationId:l(),inputTokens:a(),outputTokens:a(),estimatedCost:a(),model:l()}),mt=s({type:n(`usage_update`),conversationId:l(),inputTokens:a(),outputTokens:a(),cacheCreationInputTokens:a().optional(),cacheReadInputTokens:a().optional(),totalInputTokens:a(),totalOutputTokens:a(),estimatedCost:a(),model:l(),contextWindowTokens:a().optional(),contextWindowMaxTokens:a().optional()}),ht=s({type:n(`user_message_echo`),text:l(),conversationId:l().optional(),messageId:l().optional(),requestId:l().optional(),clientMessageId:l().optional()}).strict(),q=i([`running`,`completed`,`failed`,`aborted`,`cap_exceeded`,`interrupted`]),gt=s({type:n(`workflow_completed`),runId:l(),conversationId:l().optional(),status:q,agentsSpawned:a(),inputTokens:a(),outputTokens:a(),summary:l().optional()}).strict(),_t=s({type:n(`workflow_leaf_finished`),runId:l(),conversationId:l(),seq:a().int(),status:i([`completed`,`failed`]),label:l().optional(),inputTokens:a().optional(),outputTokens:a().optional(),resultSummary:l().optional()}).strict(),vt=s({type:n(`workflow_leaf_started`),runId:l(),conversationId:l(),seq:a().int(),label:l().optional(),phase:l().optional(),promptSummary:l().optional()}).strict(),yt=s({type:n(`workflow_progress`),runId:l(),conversationId:l().optional(),agentsSpawned:a(),phase:l().optional(),label:l().optional(),message:l().optional()}).strict(),bt=s({type:n(`workflow_started`),runId:l(),conversationId:l(),toolUseId:l().optional(),label:l().optional()}).strict(),xt=`syntheticAgentErrorMessage`,St=`compactionAgent`,Ct=3e4,wt=s({cursorInTextField:t().optional().describe(`Whether the cursor is in an editable text field when dictation started`)}).passthrough().describe(`Dictation context (app name, window title, bundle ID, cursor state, selected text)`),Tt=s({transcription:l().describe(`Raw speech transcription`),context:wt,profileId:l().describe(`Optional dictation profile ID`).optional()}),J=s({id:l(),filename:l(),mimeType:l(),sizeBytes:a(),kind:l(),data:l().optional(),thumbnailData:l().optional(),fileBacked:t().optional()}),Et=s({pattern:l(),label:l()}),Dt=s({label:l(),description:l(),pattern:l()}),Ot=s({scope:l(),label:l()}),kt=s({requestId:l(),title:l().optional(),description:l().optional(),toolName:l().optional(),riskLevel:l().optional(),riskReason:l().optional(),input:r(l(),c()).optional(),allowlistOptions:u(y).optional(),scopeOptions:u(b).optional(),directoryScopeOptions:u(x).optional(),persistentDecisionsAllowed:t().optional()}),At=s({requestId:l(),entries:u(H)}),jt=i([`approved`,`denied`,`timed_out`]),Y=s({id:l().optional(),name:l(),input:r(l(),c()),result:l().optional(),isError:t().optional(),errorCode:l().optional(),imageData:l().optional(),imageDataList:u(l()).optional(),imageAttachmentIds:u(l()).optional(),startedAt:a().optional(),previewStartedAt:a().optional(),completedAt:a().optional(),confirmationDecision:jt.optional(),confirmationLabel:l().optional(),riskLevel:l().optional(),riskReason:l().optional(),matchedTrustRuleId:l().optional(),autoApproved:t().optional(),approvalMode:l().optional(),approvalReason:l().optional(),riskThreshold:l().optional(),riskScopeOptions:u(Et).optional(),riskAllowlistOptions:u(Dt).optional(),riskDirectoryScopeOptions:u(Ot).optional(),activityMetadata:G.optional(),scopeOptions:u(b).optional(),pendingConfirmation:kt.optional(),pendingQuestion:At.optional()}),Mt=s({id:l(),label:l(),style:l().optional(),data:r(l(),c()).optional()}),X=s({surfaceId:l(),surfaceType:l(),title:l().optional(),data:r(l(),c()),actions:u(Mt).optional(),display:l().optional(),persistent:t().optional(),completed:t().optional(),completionSummary:l().optional(),toolCallId:l().optional()}),Nt=s({subagentId:l(),label:l(),status:l(),error:l().optional(),conversationId:l().optional(),objective:l().optional()}),Pt=s({acpSessionId:l(),agent:l().optional()}),Ft=s({id:l(),toolName:l(),conversationId:l(),command:l(),startedAt:a(),status:i([`completed`,`failed`,`cancelled`]),exitCode:a().nullable(),output:l(),completedAt:a()}),It=s({appUrl:l().optional(),webUrl:l().optional()}),Lt=s({emoji:l(),op:i([`added`,`removed`]),actorDisplayName:l().optional(),targetChannelTs:l()}),Rt=s({channelId:l(),channelName:l().optional(),channelTs:l(),threadTs:l().optional(),sender:s({displayName:l().optional(),externalUserId:l().optional()}).optional(),messageLink:It.optional(),threadLink:It.optional(),eventKind:i([`message`,`reaction`]).optional(),reaction:Lt.optional()}),zt=s({type:n(`text`),text:l()}),Bt=s({type:n(`thinking`),thinking:l(),startedAt:a().optional(),completedAt:a().optional()}),Vt=s({type:n(`tool_use`),toolCall:Y}),Ht=s({type:n(`surface`),surface:X}),Ut=s({type:n(`attachment`),attachment:J}),Wt=o(`type`,[zt,Bt,Vt,Ht,Ut]),Gt=s({id:l(),mergedMessageIds:u(l()).optional(),clientMessageId:l().optional(),role:i([`user`,`assistant`]),timestamp:l(),attachments:u(J),toolCalls:u(Y).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks (the tool_use variant). Flat list of tool calls.`}).optional(),surfaces:u(X).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks (the surface variant). Flat list of surfaces.`}).optional(),textSegments:u(l()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Text segments split by tool-call boundaries.`}).optional(),thinkingSegments:u(l()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Reasoning text extracted from thinking blocks.`}).optional(),contentOrder:u(l()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Positional "<type>:<index>" content ordering (e.g. "text:0", "thinking:1").`}).optional(),contentBlocks:u(Wt).optional(),subagentNotification:Nt.optional(),acpNotification:Pt.optional(),backgroundEventNotification:t().optional(),backgroundToolCompletion:Ft.optional(),systemCard:t().optional(),slackMessage:Rt.optional(),queueStatus:i([`queued`,`processing`]).optional(),queuePosition:a().optional()}),Kt=s({status:L}),qt=n(`notification`),Jt=i([`new`,`seen`,`acted_on`,`dismissed`]),Yt=i([`low`,`medium`,`high`,`critical`]),Xt=i([`security`,`scheduling`,`background`,`email`,`system`]),Zt=i([`heartbeat`,`memory_consolidation`,`schedule`,`auto_analysis`,`user`,`other`]),Qt=s({id:l(),label:l(),prompt:l()}),$t=i([`emailDraft`,`documentPreview`,`permissionChat`,`paymentAuth`,`toolPermission`,`updatesList`]),en=s({kind:$t}),tn=s({id:l(),type:qt,priority:a().int().min(0).max(100),title:l().optional(),summary:l(),timestamp:l(),status:Jt.default(`new`),expiresAt:l().optional(),actions:u(Qt).optional(),urgency:Yt.optional(),conversationId:l().optional(),detailPanel:en.optional(),category:Xt.optional(),noteworthy:t().optional(),fromAssistant:t().optional(),metadata:r(l(),c()).optional(),sourceType:Zt.optional(),sourceKey:l().optional(),sourceLabel:l().optional(),createdAt:l()}),nn=i([`deterministic`,`assistant`]),rn=s({id:l(),label:l(),icon:l().optional(),prompt:l(),source:nn}),an=s({greeting:l(),timeAwayLabel:l(),newCount:a().int().min(0)}),on=s({items:u(tn),updatedAt:l(),contextBanner:an,suggestedPrompts:u(rn)}),sn=s({id:l(),category:i([`voice`,`world`,`priorities`]),text:l(),confidence:i([`strong`,`uncertain`]),source:i([`onboarding`,`inferred`])}),cn=s({id:l(),name:l(),description:l(),tier:i([`unlocked`,`next-up`,`earned`]),gate:l(),unlockHint:l().optional(),ctaLabel:l().optional()}),ln=s({version:n(1),assistantId:l(),tier:re([n(1),n(2),n(3),n(4)]),progressPercent:a(),facts:u(sn),capabilities:u(cn),conversationCount:a(),hatchedDate:l(),assistantName:l(),userName:l().optional(),updatedAt:l()}),un=s({key:l(),label:l(),ms:a()}),dn=s({phases:u(un),ttftMs:a().nullish(),totalToFirstTokenMs:a().nullish(),providerDurationMs:a().nullish(),firstTokenKind:i([`thinking`,`text`]).nullish()}),fn=s({provider:l().nullish(),model:l().nullish(),status:l().nullish(),inputTokens:a().nullish(),outputTokens:a().nullish(),cacheCreationInputTokens:a().nullish(),cacheReadInputTokens:a().nullish(),stopReason:l().nullish(),requestMessageCount:a().nullish(),requestToolCount:a().nullish(),responseMessageCount:a().nullish(),responseToolCallCount:a().nullish(),responsePreview:l().nullish(),toolCallNames:u(l()).nullish(),estimatedCostUsd:a().nullish(),durationMs:a().nullish()}),Z=s({kind:l(),label:l().nullish(),role:l().nullish(),text:l().nullish(),toolName:l().nullish(),data:c().optional(),language:l().nullish()}),pn=s({name:l().nullish(),message:l().nullish(),code:l().nullish(),provider:l().nullish(),statusCode:a().nullish(),retryAfterMs:a().nullish(),apiErrorCode:l().nullish(),apiErrorType:l().nullish(),apiErrorParam:l().nullish(),requestId:l().nullish()}),mn=s({id:l(),createdAt:a(),requestPayload:ie(),responsePayload:ie(),provider:l().nullish(),summary:fn.nullish(),requestSections:u(Z).nullish(),responseSections:u(Z).nullish(),agentLoopExitReason:l().nullish(),callSite:l().nullish(),error:pn.nullish(),latency:dn.nullish()}),hn=s({nodeId:l(),score:a(),semanticSimilarity:a(),recencyBoost:a(),type:l().optional()}),gn=s({reason:l(),semanticUnavailable:t(),fallbackSources:u(l())}),_n=s({enabled:t(),degraded:t(),provider:l().nullable(),model:l().nullable(),degradation:gn.nullable(),semanticHits:a().nullish(),mergedCount:a().nullish(),selectedCount:a().nullish(),tier1Count:a().nullish(),tier2Count:a().nullish(),hybridSearchLatencyMs:a().nullish(),sparseVectorUsed:t().nullish(),injectedTokens:a().nullish(),latencyMs:a().nullish(),topCandidates:u(hn),injectedText:l().nullable(),reason:l().nullable(),queryContext:l().nullable()}),vn=s({slug:l(),finalActivation:a(),ownActivation:a(),priorActivation:a(),simUser:a(),simAssistant:a(),simNow:a(),simUserRerankBoost:a().optional(),simAssistantRerankBoost:a().optional(),inRerankPool:t().optional(),spreadContribution:a(),source:l(),status:l()}),yn=s({d:a(),c_user:a(),c_assistant:a(),c_now:a(),k:a(),hops:a(),top_k:a(),epsilon:a()}),bn=s({turn:a(),mode:l(),concepts:u(vn),config:yn}),Q=s({slug:l(),source:l(),pinned:t(),sectionOrdinal:a().nullable().optional(),sectionHeading:l().nullable().optional()}),xn=s({turn:a(),live:t(),selections:u(Q),injectedText:l()}),Sn=s({messageId:l().nullish(),conversationKey:l().nullish(),conversationId:l().nullish(),conversationKind:l(),conversationTotalEstimatedCostUsd:a().nullish(),logs:u(mn),memoryRecall:_n.nullable(),memoryV2Activation:bn.nullable(),memoryV3Selection:xn.nullish()}),Cn=s({type:l(),content:l(),toolName:l().optional(),isError:t().optional(),messageId:l().optional(),toolUseId:l().optional(),input:r(l(),c()).optional()}),wn=s({subagentId:l(),objective:l().optional(),status:U.optional(),usage:W.optional(),events:u(Cn)}),Tn=s({seq:a().int(),kind:i([`agent`,`workflow`]),label:l().optional(),phase:l().optional(),promptSummary:l().optional(),status:l(),resultSummary:l().optional(),inputTokens:a().optional(),outputTokens:a().optional(),createdAt:a().nullable()}),En=s({runId:l(),status:q.optional(),agentsSpawned:a().optional(),inputTokens:a().optional(),outputTokens:a().optional(),phase:l().optional(),leaves:u(Tn)}),Dn=s({title:l().optional(),subtitle:l().optional(),body:l().optional(),metadata:u(s({label:d(),value:d()})).optional(),template:l().optional(),templateData:r(l(),c()).optional()}),On=te(e=>{let t=(typeof e==`string`?e.split(`,`):Array.isArray(e)?e:[]).map(e=>typeof e==`string`||typeof e==`number`?String(e).trim():``).filter(e=>e.length>0);return t.length>0?t:void 0},u(l()).optional()),kn=s({prompt:d().optional(),acceptedTypes:On,maxFiles:se().int().positive().optional().catch(void 0),maxSizeBytes:se().positive().optional().catch(void 0)}),An=e({ACPOptionKindSchema:()=>C,ACPOptionSchema:()=>w,AcpSessionCompletedEventSchema:()=>le,AcpSessionErrorEventSchema:()=>ue,AcpSessionSpawnedEventSchema:()=>de,AcpSessionUpdateEventSchema:()=>pe,AcpSessionUpdateTypeSchema:()=>fe,AcpSessionUsageEventSchema:()=>me,AcpStopReasonSchema:()=>ce,AllowlistOptionSchema:()=>y,AssistantActivityAnchorSchema:()=>ge,AssistantActivityPhaseSchema:()=>he,AssistantActivityReasonSchema:()=>_e,AssistantActivityStateEventSchema:()=>ve,AssistantEventEnvelopeSchema:()=>jn,AssistantEventSchema:()=>$,AssistantOutboundAttachmentSchema:()=>B,AssistantTextDeltaEventSchema:()=>ye,AssistantThinkingDeltaEventSchema:()=>f,AssistantTurnStartEventSchema:()=>p,AvatarUpdatedEventSchema:()=>m,BackgroundToolCompletedEventSchema:()=>h,BackgroundToolStartedEventSchema:()=>g,CALL_SITE_COMPACTION_AGENT:()=>St,CALL_SITE_SYNTHETIC_AGENT_ERROR_MESSAGE:()=>xt,CapabilitySchema:()=>cn,CardSurfaceDataSchema:()=>Dn,CompactionCircuitClosedEventSchema:()=>_,CompactionCircuitOpenEventSchema:()=>v,ConfirmationDiffSchema:()=>S,ConfirmationExecutionTargetSchema:()=>T,ConfirmationRequestEventSchema:()=>E,ContactRequestEventSchema:()=>D,ContextBannerSchema:()=>an,ConversationAttachmentBlockSchema:()=>Ut,ConversationContentBlockSchema:()=>Wt,ConversationErrorCodeSchema:()=>O,ConversationErrorEventSchema:()=>k,ConversationListInvalidatedEventSchema:()=>j,ConversationListInvalidatedReasonSchema:()=>A,ConversationMessageAttachmentSchema:()=>J,ConversationMessageSchema:()=>Gt,ConversationMessageSurfaceSchema:()=>X,ConversationMessageToolCallSchema:()=>Y,ConversationNoticeEventSchema:()=>N,ConversationNoticeSourceSchema:()=>M,ConversationSlackMessageSchema:()=>Rt,ConversationSubagentNotificationSchema:()=>Nt,ConversationSurfaceBlockSchema:()=>Ht,ConversationTextBlockSchema:()=>zt,ConversationThinkingBlockSchema:()=>Bt,ConversationTitleUpdatedEventSchema:()=>P,ConversationToolUseBlockSchema:()=>Vt,DEFAULT_TOOL_EXECUTION_TIMEOUT_SEC:()=>120,DictationContextSchema:()=>wt,DictationRequestSchema:()=>Tt,DirectoryScopeOptionSchema:()=>x,DiskPressureBlockedCapabilitySchema:()=>I,DiskPressureStateSchema:()=>F,DiskPressureStatusChangedEventSchema:()=>R,DiskPressureStatusResponseSchema:()=>Kt,DiskPressureStatusSchema:()=>L,DocumentCommentCreatedEventSchema:()=>z,DocumentCommentDeletedEventSchema:()=>xe,DocumentCommentReopenedEventSchema:()=>Se,DocumentCommentResolvedEventSchema:()=>Ce,DocumentEditorUpdateEventSchema:()=>we,ErrorEventSchema:()=>Te,FactSchema:()=>sn,FeedActionSchema:()=>Qt,FeedItemCategorySchema:()=>Xt,FeedItemDetailPanelKindSchema:()=>$t,FeedItemDetailPanelSchema:()=>en,FeedItemSchema:()=>tn,FeedItemSourceTypeSchema:()=>Zt,FeedItemStatusSchema:()=>Jt,FeedItemTypeSchema:()=>qt,FeedItemUrgencySchema:()=>Yt,FileUploadSurfaceDataSchema:()=>kn,GenerationCancelledEventSchema:()=>Ee,GenerationHandoffEventSchema:()=>De,HomeFeedResponseSchema:()=>on,HomeFeedUpdatedEventSchema:()=>Oe,HookEventOwnerSchema:()=>ke,HookEventSchema:()=>Ae,IdentityChangedEventSchema:()=>je,InteractionResolutionStateSchema:()=>Me,InteractionResolvedEventSchema:()=>Ne,LLMCallErrorSchema:()=>pn,LLMCallSummarySchema:()=>fn,LLMContextSectionSchema:()=>Z,LLMRequestLogEntrySchema:()=>mn,LatencyBreakdownSchema:()=>dn,LatencyPhaseSchema:()=>un,LlmContextResponseSchema:()=>Sn,MemoryCandidateSchema:()=>hn,MemoryDegradationSchema:()=>gn,MemoryRecallLogSchema:()=>_n,MemoryV2ActivationLogSchema:()=>bn,MemoryV2ConceptRowSchema:()=>vn,MemoryV2ConfigSnapshotSchema:()=>yn,MemoryV3SelectionLogSchema:()=>xn,MemoryV3SelectionRowSchema:()=>Q,MessageCompleteEventSchema:()=>Pe,MessageDequeuedEventSchema:()=>Fe,MessageQueuedDeletedEventSchema:()=>Le,MessageQueuedEventSchema:()=>Ie,MessageRequestCompleteEventSchema:()=>Re,NavigateSettingsEventSchema:()=>ze,NotificationIntentEventSchema:()=>Be,OpenConversationEventSchema:()=>Ve,OpenPanelEventSchema:()=>He,OpenUrlEventSchema:()=>Ue,PendingToolConfirmationSchema:()=>kt,QuestionEntrySchema:()=>H,QuestionOptionSchema:()=>V,QuestionRequestEventSchema:()=>We,RelationshipStateSchema:()=>ln,RelationshipStateUpdatedEventSchema:()=>Ge,RiskScopeOptionSchema:()=>et,SSE_REPLAY_RING_AGE_LIMIT_MS:()=>Ct,SSE_REPLAY_RING_COUNT_LIMIT:()=>200,ScopeOptionSchema:()=>b,SecretRequestEventSchema:()=>Ke,SubagentDetailEventSchema:()=>Cn,SubagentDetailResponseSchema:()=>wn,SubagentEventEventSchema:()=>Je,SubagentInnerEventSchema:()=>qe,SubagentSpawnedEventSchema:()=>Ye,SubagentStatusChangedEventSchema:()=>Xe,SubagentStatusSchema:()=>U,SubagentUsageStatsSchema:()=>W,SuggestedPromptSchema:()=>rn,SuggestedPromptSourceSchema:()=>nn,SurfaceActionSchema:()=>dt,SyncChangedEventSchema:()=>Ze,ToolActivityMetadataSchema:()=>G,ToolOutputChunkEventSchema:()=>$e,ToolOutputChunkSubTypeSchema:()=>Qe,ToolResultEventSchema:()=>ot,ToolUsePreviewStartEventSchema:()=>st,ToolUseStartEventSchema:()=>ct,UISurfaceCompleteEventSchema:()=>lt,UISurfaceDismissEventSchema:()=>ut,UISurfaceShowEventSchema:()=>ft,UISurfaceUpdateEventSchema:()=>pt,UsageProgressEventSchema:()=>K,UsageUpdateEventSchema:()=>mt,UserMessageEchoEventSchema:()=>ht,WebFetchMetadataSchema:()=>at,WebSearchMetadataSchema:()=>it,WebSearchProviderIdSchema:()=>tt,WebSearchResultItemSchema:()=>rt,WorkflowCompletedEventSchema:()=>gt,WorkflowJournalResponseSchema:()=>En,WorkflowLeafFinishedEventSchema:()=>_t,WorkflowLeafSchema:()=>Tn,WorkflowLeafStartedEventSchema:()=>vt,WorkflowProgressEventSchema:()=>yt,WorkflowRunStatusSchema:()=>q,WorkflowStartedEventSchema:()=>bt}),$=o(`type`,[le,ue,de,pe,me,ve,ye,f,p,m,h,g,_,v,E,D,k,j,N,P,R,z,xe,Se,Ce,we,Te,Ee,De,Oe,Ae,je,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,Je,Ye,Xe,Ze,$e,ot,st,ct,lt,ut,ft,pt,K,mt,ht,gt,_t,vt,yt,bt]),jn=s({id:l(),conversationId:l().optional(),seq:a().int().optional(),emittedAt:l(),message:$});export{kn as a,Kt as c,xt as d,K as f,Dn as i,Ct as l,$ as n,En as o,An as r,wn as s,jn as t,St as u};
1
+ import{r as e}from"./chunk-jRWAZmH_.js";import{B as t,F as ee,G as te,H as n,I as ne,J as re,K as r,L as i,R as ie,U as a,V as o,W as s,X as ae,Y as c,Z as oe,q as l,z as u}from"./local-mode-BZyeVbEM.js";function d(e){return oe(ne,e)}function se(e){return ae(ee,e)}var ce=i([`end_turn`,`max_tokens`,`max_turn_requests`,`refusal`,`cancelled`]),le=s({type:n(`acp_session_completed`),acpSessionId:l(),stopReason:ce}).strict(),ue=s({type:n(`acp_session_error`),acpSessionId:l(),error:l()}).strict(),de=s({type:n(`acp_session_spawned`),acpSessionId:l(),agent:l(),parentConversationId:l(),parentToolUseId:l().optional(),task:l().optional()}).strict(),fe=i([`agent_message_chunk`,`agent_thought_chunk`,`user_message_chunk`,`tool_call`,`tool_call_update`,`plan`]),pe=s({type:n(`acp_session_update`),acpSessionId:l(),updateType:fe,content:l().optional(),toolCallId:l().optional(),toolTitle:l().optional(),toolKind:l().optional(),toolStatus:l().optional(),rawInput:c().optional(),rawOutput:c().optional(),locations:u(s({path:l(),line:a().optional()})).optional(),messageId:l().optional(),seq:a().optional()}).strict(),me=s({type:n(`acp_session_usage`),acpSessionId:l(),usedTokens:a(),contextSize:a(),inputTokens:a().optional(),outputTokens:a().optional(),costAmount:a().optional(),costCurrency:l().optional()}).strict(),he=i([`idle`,`thinking`,`streaming`,`tool_running`,`awaiting_confirmation`]),ge=i([`assistant_turn`,`user_turn`,`global`]),_e=i([`message_dequeued`,`thinking_delta`,`first_text_delta`,`tool_use_start`,`preview_start`,`tool_result_received`,`confirmation_requested`,`confirmation_resolved`,`context_compacting`,`message_complete`,`generation_cancelled`,`error_terminal`]),ve=s({type:n(`assistant_activity_state`),conversationId:l(),activityVersion:a(),phase:he,anchor:ge,reason:_e,requestId:l().optional(),statusText:l().optional()}),ye=s({type:n(`assistant_text_delta`),text:l(),messageId:l().optional(),conversationId:l().optional()}),f=s({type:n(`assistant_thinking_delta`),thinking:l(),messageId:l().optional(),conversationId:l().optional(),timestampMs:a().optional()}),p=s({type:n(`assistant_turn_start`),messageId:l(),conversationId:l().optional()}),m=s({type:n(`avatar_updated`),avatarPath:l()}),h=s({type:n(`background_tool_completed`),id:l(),conversationId:l(),status:i([`completed`,`failed`,`cancelled`]),exitCode:a().nullable().optional(),output:l().optional(),completedAt:a()}),g=s({type:n(`background_tool_started`),id:l(),toolName:l(),conversationId:l(),command:l(),startedAt:a()}),_=s({type:n(`compaction_circuit_closed`),conversationId:l()}),v=s({type:n(`compaction_circuit_open`),conversationId:l(),reason:n(`3_consecutive_failures`),openUntil:a()}),y=s({label:l(),description:l(),pattern:l()}),b=s({label:l(),scope:l()}),x=s({label:l(),scope:l()}),S=s({filePath:l(),oldContent:l(),newContent:l(),isNewFile:t()}),C=i([`allow_once`,`allow_always`,`reject_once`,`reject_always`]),w=s({optionId:l(),name:l(),kind:C}),T=i([`sandbox`,`host`]),E=s({type:n(`confirmation_request`),requestId:l(),toolName:l(),input:r(l(),c()),riskLevel:l(),riskReason:l().optional(),isContainerized:t().optional(),executionTarget:T.optional(),allowlistOptions:u(y),scopeOptions:u(b),directoryScopeOptions:u(x).optional(),diff:S.optional(),conversationId:l().optional(),persistentDecisionsAllowed:t().optional(),toolUseId:l().optional(),acpToolKind:l().optional(),acpOptions:u(w).optional()}),D=s({type:n(`contact_request`),requestId:l(),channel:l().optional(),placeholder:l().optional(),label:l().optional(),description:l().optional(),role:l().optional()}),O=i([`PROVIDER_NETWORK`,`PROVIDER_RATE_LIMIT`,`MANAGED_USAGE_LIMIT`,`PROVIDER_OVERLOADED`,`PROVIDER_API`,`IMAGE_TOO_LARGE`,`PROVIDER_BILLING`,`PROVIDER_ORDERING`,`PROVIDER_WEB_SEARCH`,`PROVIDER_NOT_CONFIGURED`,`PROVIDER_INVALID_KEY`,`MANAGED_KEY_INVALID`,`CONTEXT_TOO_LARGE`,`BUDGET_YIELD_UNRECOVERED`,`MAX_TOKENS_REACHED`,`CONVERSATION_ABORTED`,`CONVERSATION_PROCESSING_FAILED`,`DISK_SPACE_CRITICAL`,`UNKNOWN`]),k=s({type:n(`conversation_error`),conversationId:l(),code:O,userMessage:l(),retryable:t(),debugDetails:l().optional(),errorCategory:l().optional(),connectionName:l().optional(),profileName:l().optional()}),A=i([`created`,`renamed`,`deleted`,`reordered`,`seen_changed`]),j=s({type:n(`conversation_list_invalidated`),reason:A}),M=i([`memory_v3`]),N=s({type:n(`conversation_notice`),conversationId:l(),source:M,code:O,userMessage:l(),errorCategory:l().optional()}),P=s({type:n(`conversation_title_updated`),conversationId:l(),title:l()}),F=i([`disabled`,`ok`,`warning`,`critical`,`unknown`]),I=i([`agent-turns`,`background-work`,`remote-ingress`]),L=s({enabled:t(),state:F,locked:t(),acknowledged:t(),overrideActive:t(),effectivelyLocked:t(),lockId:l().nullable(),usagePercent:a().nullable(),thresholdPercent:a(),path:l().nullable(),lastCheckedAt:l().nullable(),blockedCapabilities:u(I),error:l().nullable()}),R=s({type:n(`disk_pressure_status_changed`),status:L}),be=s({id:l(),surfaceId:l(),author:l(),content:l(),anchorStart:a().optional(),anchorEnd:a().optional(),anchorText:l().optional(),parentCommentId:l().optional(),status:l(),createdAt:a(),updatedAt:a()}),z=s({type:n(`document_comment_created`),conversationId:l(),surfaceId:l(),comment:be}),xe=s({type:n(`document_comment_deleted`),conversationId:l(),surfaceId:l(),commentId:l()}),Se=s({type:n(`document_comment_reopened`),conversationId:l(),surfaceId:l(),commentId:l()}),Ce=s({type:n(`document_comment_resolved`),conversationId:l(),surfaceId:l(),commentId:l(),resolvedBy:l()}),we=s({type:n(`document_editor_update`),conversationId:l(),surfaceId:l(),markdown:l(),mode:l()}),Te=s({type:n(`error`),message:l(),code:l().optional(),category:l().optional(),errorCategory:l().optional(),requestId:l().optional(),conversationId:l().optional()}),Ee=s({type:n(`generation_cancelled`),conversationId:l().optional()}),B=s({id:l().optional(),filename:l(),mimeType:l(),data:l(),sourceType:i([`sandbox_file`,`host_file`,`tool_block`]).optional(),sizeBytes:a().optional(),thumbnailData:l().optional(),fileBacked:t().optional(),filePath:l().optional()}),De=s({type:n(`generation_handoff`),conversationId:l().optional(),requestId:l().optional(),queuedCount:a(),messageId:l().optional(),attachments:u(B).optional(),attachmentWarnings:u(l()).optional()}),Oe=s({type:n(`home_feed_updated`),updatedAt:l(),newItemCount:a()}),ke=s({kind:i([`plugin`,`workspace`]),id:l()}),Ae=s({type:n(`hook_event`),conversationId:l().optional(),hookName:l(),owner:ke,detail:r(l(),c())}),je=s({type:n(`identity_changed`),name:l(),role:l(),personality:l(),emoji:l(),home:l()}),Me=i([`approved`,`rejected`,`answered`,`cancelled`,`superseded`]),Ne=s({type:n(`interaction_resolved`),requestId:l(),conversationId:l(),state:Me,kind:l()}),Pe=s({type:n(`message_complete`),messageId:l().optional(),conversationId:l().optional(),source:i([`main`,`aux`]).optional(),attachments:u(B).optional(),attachmentWarnings:u(l()).optional()}),Fe=s({type:n(`message_dequeued`),conversationId:l(),requestId:l()}),Ie=s({type:n(`message_queued`),conversationId:l(),requestId:l(),position:a()}),Le=s({type:n(`message_queued_deleted`),conversationId:l(),requestId:l()}),Re=s({type:n(`message_request_complete`),conversationId:l(),requestId:l(),runStillActive:t().optional()}),ze=s({type:n(`navigate_settings`),tab:l()}),Be=s({type:n(`notification_intent`),sourceEventName:l(),title:l(),body:l(),deliveryId:l().optional(),deepLinkMetadata:r(l(),c()).optional(),targetGuardianPrincipalId:l().optional(),silent:t().optional()}),Ve=s({type:n(`open_conversation`),conversationId:l(),title:l().optional(),anchorMessageId:l().optional(),focus:t().optional()}),He=s({type:n(`open_panel`),panelType:l(),data:r(l(),c()).optional(),conversationId:l().optional(),surfaceId:l().optional()}),Ue=s({type:n(`open_url`),url:l().min(1),title:l().optional(),conversationId:l().optional()}),V=s({id:l(),label:l(),description:l().optional()}),H=s({id:l(),question:l(),description:l().optional(),options:u(V),freeTextPlaceholder:l().optional()}),We=s({type:n(`question_request`),requestId:l(),questions:u(H),question:l(),description:l().optional(),options:u(V),freeTextPlaceholder:l().optional(),conversationId:l().optional(),toolUseId:l().optional()}),Ge=s({type:n(`relationship_state_updated`),updatedAt:l()}),Ke=s({type:n(`secret_request`),requestId:l(),service:l(),field:l(),label:l(),description:l().optional(),placeholder:l().optional(),conversationId:l().optional(),purpose:l().optional(),allowedTools:u(l()).optional(),allowedDomains:u(l()).optional(),allowOneTimeSend:t().optional()}),qe=s({type:l(),content:l().optional(),text:l().optional(),result:l().optional(),input:r(l(),c()).optional(),toolName:l().optional(),isError:t().optional(),toolUseId:l().optional()}).passthrough(),Je=s({type:n(`subagent_event`),conversationId:l(),subagentId:l(),event:qe}).strict(),Ye=s({type:n(`subagent_spawned`),subagentId:l(),parentConversationId:l(),label:l(),objective:l(),isFork:t().optional(),parentToolUseId:l().optional()}).strict(),U=i([`pending`,`running`,`awaiting_input`,`completed`,`failed`,`aborted`,`interrupted`]),W=s({inputTokens:a(),outputTokens:a(),estimatedCost:a()}).strict(),Xe=s({type:n(`subagent_status_changed`),subagentId:l(),status:U,error:l().optional(),usage:W.optional()}).strict(),Ze=s({type:n(`sync_changed`),tags:u(l().min(1)).min(1),originClientId:l().min(1).optional()}),Qe=i([`tool_start`,`tool_complete`,`status`]),$e=s({type:n(`tool_output_chunk`),chunk:l(),conversationId:l().optional(),toolUseId:l().optional(),subType:Qe.optional(),subToolName:l().optional(),subToolInput:l().optional(),subToolIsError:t().optional(),subToolId:l().optional(),messageId:l().optional()}),et=s({pattern:l(),label:l()}),tt=i([`anthropic-native`,`brave`,`perplexity`,`tavily`,`firecrawl`]),nt=i([`default`,`firecrawl`]),rt=s({rank:a(),title:l(),url:l(),domain:l(),faviconUrl:l().optional(),snippet:l().optional(),age:l().optional(),score:a().optional()}),it=s({query:l(),provider:tt,resultCount:a(),durationMs:a(),results:u(rt),errorMessage:l().optional()}),at=s({url:l(),finalUrl:l(),provider:nt.optional(),status:a(),contentType:l().optional(),byteCount:a(),charCount:a(),truncated:t(),title:l().optional(),domain:l(),faviconUrl:l().optional(),redirectCount:a(),durationMs:a(),errorMessage:l().optional(),mayRequireJavaScript:t().optional()}),G=s({webSearch:it.optional(),webFetch:at.optional()}),ot=s({type:n(`tool_result`),toolName:l(),result:l(),isError:t().optional(),diff:S.optional(),status:l().optional(),conversationId:l().optional(),imageData:l().optional(),imageDataList:u(l()).optional(),toolUseId:l().optional(),messageId:l().optional(),riskLevel:l().optional(),riskReason:l().optional(),matchedTrustRuleId:l().optional(),isContainerized:t().optional(),riskScopeOptions:u(et).optional(),riskAllowlistOptions:u(y).optional(),riskDirectoryScopeOptions:u(x).optional(),approvalMode:l().optional(),approvalReason:l().optional(),riskThreshold:l().optional(),activityMetadata:G.optional(),errorCode:l().optional(),completedAt:a().optional()}),st=s({type:n(`tool_use_preview_start`),toolUseId:l(),toolName:l(),conversationId:l().optional(),messageId:l().optional(),previewStartedAt:a().optional()}),ct=s({type:n(`tool_use_start`),toolName:l(),input:r(l(),c()),toolUseId:l().optional(),messageId:l().optional(),conversationId:l().optional(),startedAt:a().optional(),previewStartedAt:a().optional()}),lt=s({type:n(`ui_surface_complete`),conversationId:l(),surfaceId:l(),summary:l(),submittedData:r(l(),c()).optional()}),ut=s({type:n(`ui_surface_dismiss`),conversationId:l(),surfaceId:l()}),dt=s({id:l(),label:l(),style:i([`primary`,`secondary`,`destructive`]).optional(),data:r(l(),c()).optional()}),ft=s({type:n(`ui_surface_show`),conversationId:l(),surfaceId:l(),surfaceType:l(),title:l().optional(),data:r(l(),c()),actions:u(dt).optional(),display:i([`inline`,`panel`]).optional(),messageId:l().optional(),persistent:t().optional(),toolCallId:l().optional()}),pt=s({type:n(`ui_surface_update`),conversationId:l(),surfaceId:l(),data:r(l(),c())}),K=s({type:n(`usage_progress`),conversationId:l(),inputTokens:a(),outputTokens:a(),estimatedCost:a(),model:l()}),mt=s({type:n(`usage_update`),conversationId:l(),inputTokens:a(),outputTokens:a(),cacheCreationInputTokens:a().optional(),cacheReadInputTokens:a().optional(),totalInputTokens:a(),totalOutputTokens:a(),estimatedCost:a(),model:l(),contextWindowTokens:a().optional(),contextWindowMaxTokens:a().optional()}),ht=s({type:n(`user_message_echo`),text:l(),conversationId:l().optional(),messageId:l().optional(),requestId:l().optional(),clientMessageId:l().optional()}).strict(),q=i([`running`,`completed`,`failed`,`aborted`,`cap_exceeded`,`interrupted`]),gt=s({type:n(`workflow_completed`),runId:l(),conversationId:l().optional(),status:q,agentsSpawned:a(),inputTokens:a(),outputTokens:a(),summary:l().optional()}).strict(),_t=s({type:n(`workflow_leaf_finished`),runId:l(),conversationId:l(),seq:a().int(),status:i([`completed`,`failed`]),label:l().optional(),inputTokens:a().optional(),outputTokens:a().optional(),resultSummary:l().optional()}).strict(),vt=s({type:n(`workflow_leaf_started`),runId:l(),conversationId:l(),seq:a().int(),label:l().optional(),phase:l().optional(),promptSummary:l().optional()}).strict(),yt=s({type:n(`workflow_progress`),runId:l(),conversationId:l().optional(),agentsSpawned:a(),phase:l().optional(),label:l().optional(),message:l().optional()}).strict(),bt=s({type:n(`workflow_started`),runId:l(),conversationId:l(),toolUseId:l().optional(),label:l().optional()}).strict(),xt=`syntheticAgentErrorMessage`,St=`compactionAgent`,Ct=3e4,wt=s({cursorInTextField:t().optional().describe(`Whether the cursor is in an editable text field when dictation started`)}).passthrough().describe(`Dictation context (app name, window title, bundle ID, cursor state, selected text)`),Tt=s({transcription:l().describe(`Raw speech transcription`),context:wt,profileId:l().describe(`Optional dictation profile ID`).optional()}),J=s({id:l(),filename:l(),mimeType:l(),sizeBytes:a(),kind:l(),data:l().optional(),thumbnailData:l().optional(),fileBacked:t().optional()}),Et=s({pattern:l(),label:l()}),Dt=s({label:l(),description:l(),pattern:l()}),Ot=s({scope:l(),label:l()}),kt=s({requestId:l(),title:l().optional(),description:l().optional(),toolName:l().optional(),riskLevel:l().optional(),riskReason:l().optional(),input:r(l(),c()).optional(),allowlistOptions:u(y).optional(),scopeOptions:u(b).optional(),directoryScopeOptions:u(x).optional(),persistentDecisionsAllowed:t().optional()}),At=s({requestId:l(),entries:u(H)}),jt=i([`approved`,`denied`,`timed_out`]),Y=s({id:l().optional(),name:l(),input:r(l(),c()),result:l().optional(),isError:t().optional(),errorCode:l().optional(),imageData:l().optional(),imageDataList:u(l()).optional(),imageAttachmentIds:u(l()).optional(),startedAt:a().optional(),previewStartedAt:a().optional(),completedAt:a().optional(),confirmationDecision:jt.optional(),confirmationLabel:l().optional(),riskLevel:l().optional(),riskReason:l().optional(),matchedTrustRuleId:l().optional(),autoApproved:t().optional(),approvalMode:l().optional(),approvalReason:l().optional(),riskThreshold:l().optional(),riskScopeOptions:u(Et).optional(),riskAllowlistOptions:u(Dt).optional(),riskDirectoryScopeOptions:u(Ot).optional(),activityMetadata:G.optional(),scopeOptions:u(b).optional(),pendingConfirmation:kt.optional(),pendingQuestion:At.optional()}),Mt=s({id:l(),label:l(),style:l().optional(),data:r(l(),c()).optional()}),X=s({surfaceId:l(),surfaceType:l(),title:l().optional(),data:r(l(),c()),actions:u(Mt).optional(),display:l().optional(),persistent:t().optional(),completed:t().optional(),completionSummary:l().optional(),toolCallId:l().optional()}),Nt=s({subagentId:l(),label:l(),status:l(),error:l().optional(),conversationId:l().optional(),objective:l().optional()}),Pt=s({acpSessionId:l(),agent:l().optional()}),Ft=s({id:l(),toolName:l(),conversationId:l(),command:l(),startedAt:a(),status:i([`completed`,`failed`,`cancelled`]),exitCode:a().nullable(),output:l(),completedAt:a()}),It=s({appUrl:l().optional(),webUrl:l().optional()}),Lt=s({emoji:l(),op:i([`added`,`removed`]),actorDisplayName:l().optional(),targetChannelTs:l()}),Rt=s({channelId:l(),channelName:l().optional(),channelTs:l(),threadTs:l().optional(),sender:s({displayName:l().optional(),externalUserId:l().optional()}).optional(),messageLink:It.optional(),threadLink:It.optional(),eventKind:i([`message`,`reaction`]).optional(),reaction:Lt.optional()}),zt=s({type:n(`text`),text:l()}),Bt=s({type:n(`thinking`),thinking:l(),startedAt:a().optional(),completedAt:a().optional()}),Vt=s({type:n(`tool_use`),toolCall:Y}),Ht=s({type:n(`surface`),surface:X}),Ut=s({type:n(`attachment`),attachment:J}),Wt=o(`type`,[zt,Bt,Vt,Ht,Ut]),Gt=s({id:l(),mergedMessageIds:u(l()).optional(),clientMessageId:l().optional(),role:i([`user`,`assistant`]),timestamp:l(),attachments:u(J),toolCalls:u(Y).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks (the tool_use variant). Flat list of tool calls.`}).optional(),surfaces:u(X).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks (the surface variant). Flat list of surfaces.`}).optional(),textSegments:u(l()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Text segments split by tool-call boundaries.`}).optional(),thinkingSegments:u(l()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Reasoning text extracted from thinking blocks.`}).optional(),contentOrder:u(l()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Positional "<type>:<index>" content ordering (e.g. "text:0", "thinking:1").`}).optional(),contentBlocks:u(Wt).optional(),subagentNotification:Nt.optional(),acpNotification:Pt.optional(),backgroundEventNotification:t().optional(),backgroundToolCompletion:Ft.optional(),systemCard:t().optional(),slackMessage:Rt.optional(),queueStatus:i([`queued`,`processing`]).optional(),queuePosition:a().optional()}),Kt=s({status:L}),qt=n(`notification`),Jt=i([`new`,`seen`,`acted_on`,`dismissed`]),Yt=i([`low`,`medium`,`high`,`critical`]),Xt=i([`security`,`scheduling`,`background`,`email`,`system`]),Zt=i([`heartbeat`,`memory_consolidation`,`schedule`,`auto_analysis`,`user`,`other`]),Qt=s({id:l(),label:l(),prompt:l()}),$t=i([`emailDraft`,`documentPreview`,`permissionChat`,`paymentAuth`,`toolPermission`,`updatesList`]),en=s({kind:$t}),tn=s({id:l(),type:qt,priority:a().int().min(0).max(100),title:l().optional(),summary:l(),timestamp:l(),status:Jt.default(`new`),expiresAt:l().optional(),actions:u(Qt).optional(),urgency:Yt.optional(),conversationId:l().optional(),detailPanel:en.optional(),category:Xt.optional(),noteworthy:t().optional(),fromAssistant:t().optional(),metadata:r(l(),c()).optional(),sourceType:Zt.optional(),sourceKey:l().optional(),sourceLabel:l().optional(),createdAt:l()}),nn=i([`deterministic`,`assistant`]),rn=s({id:l(),label:l(),icon:l().optional(),prompt:l(),source:nn}),an=s({greeting:l(),timeAwayLabel:l(),newCount:a().int().min(0)}),on=s({items:u(tn),updatedAt:l(),contextBanner:an,suggestedPrompts:u(rn)}),sn=s({id:l(),category:i([`voice`,`world`,`priorities`]),text:l(),confidence:i([`strong`,`uncertain`]),source:i([`onboarding`,`inferred`])}),cn=s({id:l(),name:l(),description:l(),tier:i([`unlocked`,`next-up`,`earned`]),gate:l(),unlockHint:l().optional(),ctaLabel:l().optional()}),ln=s({version:n(1),assistantId:l(),tier:re([n(1),n(2),n(3),n(4)]),progressPercent:a(),facts:u(sn),capabilities:u(cn),conversationCount:a(),hatchedDate:l(),assistantName:l(),userName:l().optional(),updatedAt:l()}),un=s({key:l(),label:l(),ms:a()}),dn=s({phases:u(un),ttftMs:a().nullish(),totalToFirstTokenMs:a().nullish(),providerDurationMs:a().nullish(),firstTokenKind:i([`thinking`,`text`]).nullish()}),fn=s({provider:l().nullish(),model:l().nullish(),status:l().nullish(),inputTokens:a().nullish(),outputTokens:a().nullish(),cacheCreationInputTokens:a().nullish(),cacheReadInputTokens:a().nullish(),stopReason:l().nullish(),requestMessageCount:a().nullish(),requestToolCount:a().nullish(),responseMessageCount:a().nullish(),responseToolCallCount:a().nullish(),responsePreview:l().nullish(),toolCallNames:u(l()).nullish(),estimatedCostUsd:a().nullish(),durationMs:a().nullish()}),Z=s({kind:l(),label:l().nullish(),role:l().nullish(),text:l().nullish(),toolName:l().nullish(),data:c().optional(),language:l().nullish()}),pn=s({name:l().nullish(),message:l().nullish(),code:l().nullish(),provider:l().nullish(),statusCode:a().nullish(),retryAfterMs:a().nullish(),apiErrorCode:l().nullish(),apiErrorType:l().nullish(),apiErrorParam:l().nullish(),requestId:l().nullish()}),mn=s({id:l(),createdAt:a(),requestPayload:ie(),responsePayload:ie(),provider:l().nullish(),summary:fn.nullish(),requestSections:u(Z).nullish(),responseSections:u(Z).nullish(),agentLoopExitReason:l().nullish(),callSite:l().nullish(),error:pn.nullish(),latency:dn.nullish()}),hn=s({nodeId:l(),score:a(),semanticSimilarity:a(),recencyBoost:a(),type:l().optional()}),gn=s({reason:l(),semanticUnavailable:t(),fallbackSources:u(l())}),_n=s({enabled:t(),degraded:t(),provider:l().nullable(),model:l().nullable(),degradation:gn.nullable(),semanticHits:a().nullish(),mergedCount:a().nullish(),selectedCount:a().nullish(),tier1Count:a().nullish(),tier2Count:a().nullish(),hybridSearchLatencyMs:a().nullish(),sparseVectorUsed:t().nullish(),injectedTokens:a().nullish(),latencyMs:a().nullish(),topCandidates:u(hn),injectedText:l().nullable(),reason:l().nullable(),queryContext:l().nullable()}),vn=s({slug:l(),finalActivation:a(),ownActivation:a(),priorActivation:a(),simUser:a(),simAssistant:a(),simNow:a(),simUserRerankBoost:a().optional(),simAssistantRerankBoost:a().optional(),inRerankPool:t().optional(),spreadContribution:a(),source:l(),status:l()}),yn=s({d:a(),c_user:a(),c_assistant:a(),c_now:a(),k:a(),hops:a(),top_k:a(),epsilon:a()}),bn=s({turn:a(),mode:l(),concepts:u(vn),config:yn}),Q=s({slug:l(),source:l(),pinned:t(),sectionOrdinal:a().nullable().optional(),sectionHeading:l().nullable().optional()}),xn=s({turn:a(),live:t(),selections:u(Q),injectedText:l()}),Sn=s({messageId:l().nullish(),conversationKey:l().nullish(),conversationId:l().nullish(),conversationKind:l(),conversationTotalEstimatedCostUsd:a().nullish(),logs:u(mn),memoryRecall:_n.nullable(),memoryV2Activation:bn.nullable(),memoryV3Selection:xn.nullish()}),Cn=s({type:l(),content:l(),toolName:l().optional(),isError:t().optional(),messageId:l().optional(),toolUseId:l().optional(),input:r(l(),c()).optional()}),wn=s({subagentId:l(),objective:l().optional(),status:U.optional(),usage:W.optional(),events:u(Cn)}),Tn=s({seq:a().int(),kind:i([`agent`,`workflow`]),label:l().optional(),phase:l().optional(),promptSummary:l().optional(),status:l(),resultSummary:l().optional(),inputTokens:a().optional(),outputTokens:a().optional(),createdAt:a().nullable()}),En=s({runId:l(),status:q.optional(),agentsSpawned:a().optional(),inputTokens:a().optional(),outputTokens:a().optional(),phase:l().optional(),leaves:u(Tn)}),Dn=s({title:l().optional(),subtitle:l().optional(),body:l().optional(),metadata:u(s({label:d(),value:d()})).optional(),template:l().optional(),templateData:r(l(),c()).optional()}),On=te(e=>{let t=(typeof e==`string`?e.split(`,`):Array.isArray(e)?e:[]).map(e=>typeof e==`string`||typeof e==`number`?String(e).trim():``).filter(e=>e.length>0);return t.length>0?t:void 0},u(l()).optional()),kn=s({prompt:d().optional(),acceptedTypes:On,maxFiles:se().int().positive().optional().catch(void 0),maxSizeBytes:se().positive().optional().catch(void 0)}),An=e({ACPOptionKindSchema:()=>C,ACPOptionSchema:()=>w,AcpSessionCompletedEventSchema:()=>le,AcpSessionErrorEventSchema:()=>ue,AcpSessionSpawnedEventSchema:()=>de,AcpSessionUpdateEventSchema:()=>pe,AcpSessionUpdateTypeSchema:()=>fe,AcpSessionUsageEventSchema:()=>me,AcpStopReasonSchema:()=>ce,AllowlistOptionSchema:()=>y,AssistantActivityAnchorSchema:()=>ge,AssistantActivityPhaseSchema:()=>he,AssistantActivityReasonSchema:()=>_e,AssistantActivityStateEventSchema:()=>ve,AssistantEventEnvelopeSchema:()=>jn,AssistantEventSchema:()=>$,AssistantOutboundAttachmentSchema:()=>B,AssistantTextDeltaEventSchema:()=>ye,AssistantThinkingDeltaEventSchema:()=>f,AssistantTurnStartEventSchema:()=>p,AvatarUpdatedEventSchema:()=>m,BackgroundToolCompletedEventSchema:()=>h,BackgroundToolStartedEventSchema:()=>g,CALL_SITE_COMPACTION_AGENT:()=>St,CALL_SITE_SYNTHETIC_AGENT_ERROR_MESSAGE:()=>xt,CapabilitySchema:()=>cn,CardSurfaceDataSchema:()=>Dn,CompactionCircuitClosedEventSchema:()=>_,CompactionCircuitOpenEventSchema:()=>v,ConfirmationDiffSchema:()=>S,ConfirmationExecutionTargetSchema:()=>T,ConfirmationRequestEventSchema:()=>E,ContactRequestEventSchema:()=>D,ContextBannerSchema:()=>an,ConversationAttachmentBlockSchema:()=>Ut,ConversationContentBlockSchema:()=>Wt,ConversationErrorCodeSchema:()=>O,ConversationErrorEventSchema:()=>k,ConversationListInvalidatedEventSchema:()=>j,ConversationListInvalidatedReasonSchema:()=>A,ConversationMessageAttachmentSchema:()=>J,ConversationMessageSchema:()=>Gt,ConversationMessageSurfaceSchema:()=>X,ConversationMessageToolCallSchema:()=>Y,ConversationNoticeEventSchema:()=>N,ConversationNoticeSourceSchema:()=>M,ConversationSlackMessageSchema:()=>Rt,ConversationSubagentNotificationSchema:()=>Nt,ConversationSurfaceBlockSchema:()=>Ht,ConversationTextBlockSchema:()=>zt,ConversationThinkingBlockSchema:()=>Bt,ConversationTitleUpdatedEventSchema:()=>P,ConversationToolUseBlockSchema:()=>Vt,DEFAULT_TOOL_EXECUTION_TIMEOUT_SEC:()=>120,DictationContextSchema:()=>wt,DictationRequestSchema:()=>Tt,DirectoryScopeOptionSchema:()=>x,DiskPressureBlockedCapabilitySchema:()=>I,DiskPressureStateSchema:()=>F,DiskPressureStatusChangedEventSchema:()=>R,DiskPressureStatusResponseSchema:()=>Kt,DiskPressureStatusSchema:()=>L,DocumentCommentCreatedEventSchema:()=>z,DocumentCommentDeletedEventSchema:()=>xe,DocumentCommentReopenedEventSchema:()=>Se,DocumentCommentResolvedEventSchema:()=>Ce,DocumentEditorUpdateEventSchema:()=>we,ErrorEventSchema:()=>Te,FactSchema:()=>sn,FeedActionSchema:()=>Qt,FeedItemCategorySchema:()=>Xt,FeedItemDetailPanelKindSchema:()=>$t,FeedItemDetailPanelSchema:()=>en,FeedItemSchema:()=>tn,FeedItemSourceTypeSchema:()=>Zt,FeedItemStatusSchema:()=>Jt,FeedItemTypeSchema:()=>qt,FeedItemUrgencySchema:()=>Yt,FileUploadSurfaceDataSchema:()=>kn,GenerationCancelledEventSchema:()=>Ee,GenerationHandoffEventSchema:()=>De,HomeFeedResponseSchema:()=>on,HomeFeedUpdatedEventSchema:()=>Oe,HookEventOwnerSchema:()=>ke,HookEventSchema:()=>Ae,IdentityChangedEventSchema:()=>je,InteractionResolutionStateSchema:()=>Me,InteractionResolvedEventSchema:()=>Ne,LLMCallErrorSchema:()=>pn,LLMCallSummarySchema:()=>fn,LLMContextSectionSchema:()=>Z,LLMRequestLogEntrySchema:()=>mn,LatencyBreakdownSchema:()=>dn,LatencyPhaseSchema:()=>un,LlmContextResponseSchema:()=>Sn,MemoryCandidateSchema:()=>hn,MemoryDegradationSchema:()=>gn,MemoryRecallLogSchema:()=>_n,MemoryV2ActivationLogSchema:()=>bn,MemoryV2ConceptRowSchema:()=>vn,MemoryV2ConfigSnapshotSchema:()=>yn,MemoryV3SelectionLogSchema:()=>xn,MemoryV3SelectionRowSchema:()=>Q,MessageCompleteEventSchema:()=>Pe,MessageDequeuedEventSchema:()=>Fe,MessageQueuedDeletedEventSchema:()=>Le,MessageQueuedEventSchema:()=>Ie,MessageRequestCompleteEventSchema:()=>Re,NavigateSettingsEventSchema:()=>ze,NotificationIntentEventSchema:()=>Be,OpenConversationEventSchema:()=>Ve,OpenPanelEventSchema:()=>He,OpenUrlEventSchema:()=>Ue,PendingToolConfirmationSchema:()=>kt,QuestionEntrySchema:()=>H,QuestionOptionSchema:()=>V,QuestionRequestEventSchema:()=>We,RelationshipStateSchema:()=>ln,RelationshipStateUpdatedEventSchema:()=>Ge,RiskScopeOptionSchema:()=>et,SSE_REPLAY_RING_AGE_LIMIT_MS:()=>Ct,SSE_REPLAY_RING_COUNT_LIMIT:()=>200,ScopeOptionSchema:()=>b,SecretRequestEventSchema:()=>Ke,SubagentDetailEventSchema:()=>Cn,SubagentDetailResponseSchema:()=>wn,SubagentEventEventSchema:()=>Je,SubagentInnerEventSchema:()=>qe,SubagentSpawnedEventSchema:()=>Ye,SubagentStatusChangedEventSchema:()=>Xe,SubagentStatusSchema:()=>U,SubagentUsageStatsSchema:()=>W,SuggestedPromptSchema:()=>rn,SuggestedPromptSourceSchema:()=>nn,SurfaceActionSchema:()=>dt,SyncChangedEventSchema:()=>Ze,ToolActivityMetadataSchema:()=>G,ToolOutputChunkEventSchema:()=>$e,ToolOutputChunkSubTypeSchema:()=>Qe,ToolResultEventSchema:()=>ot,ToolUsePreviewStartEventSchema:()=>st,ToolUseStartEventSchema:()=>ct,UISurfaceCompleteEventSchema:()=>lt,UISurfaceDismissEventSchema:()=>ut,UISurfaceShowEventSchema:()=>ft,UISurfaceUpdateEventSchema:()=>pt,UsageProgressEventSchema:()=>K,UsageUpdateEventSchema:()=>mt,UserMessageEchoEventSchema:()=>ht,WebFetchMetadataSchema:()=>at,WebSearchMetadataSchema:()=>it,WebSearchProviderIdSchema:()=>tt,WebSearchResultItemSchema:()=>rt,WorkflowCompletedEventSchema:()=>gt,WorkflowJournalResponseSchema:()=>En,WorkflowLeafFinishedEventSchema:()=>_t,WorkflowLeafSchema:()=>Tn,WorkflowLeafStartedEventSchema:()=>vt,WorkflowProgressEventSchema:()=>yt,WorkflowRunStatusSchema:()=>q,WorkflowStartedEventSchema:()=>bt}),$=o(`type`,[le,ue,de,pe,me,ve,ye,f,p,m,h,g,_,v,E,D,k,j,N,P,R,z,xe,Se,Ce,we,Te,Ee,De,Oe,Ae,je,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,Je,Ye,Xe,Ze,$e,ot,st,ct,lt,ut,ft,pt,K,mt,ht,gt,_t,vt,yt,bt]),jn=s({id:l(),conversationId:l().optional(),seq:a().int().optional(),emittedAt:l(),message:$});export{kn as a,Kt as c,xt as d,K as f,Dn as i,Ct as l,$ as n,En as o,An as r,wn as s,jn as t,St as u};