@vellumai/web 0.10.12-staging.2 → 0.10.12

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 (409) hide show
  1. package/dist/assets/{AnimatePresence-DwfFixKx.js → AnimatePresence-3WpfAWHe.js} +1 -1
  2. package/dist/assets/{BundleConfirmPage-gQyAQ1Np.js → BundleConfirmPage-CDklssHh.js} +1 -1
  3. package/dist/assets/{a2a-invite-h0ZA9fjr.js → a2a-invite-DUYZLVQb.js} +1 -1
  4. package/dist/assets/{about-page-o4HW3X7x.js → about-page-CT70Pgvf.js} +1 -1
  5. package/dist/assets/access-D3fUSyFH.js +1 -0
  6. package/dist/assets/{account-page-CCGELSOs.js → account-page-D5cJIu1-.js} +1 -1
  7. package/dist/assets/{account-shell-AfPNPQvp.js → account-shell-C_IH8r44.js} +1 -1
  8. package/dist/assets/{acp-run-actions-Ct6s3jTx.js → acp-run-actions-CAjb0Wcm.js} +1 -1
  9. package/dist/assets/{acp-run-detail-panel-6KF1gTs7.js → acp-run-detail-panel-DqzZdPiN.js} +1 -1
  10. package/dist/assets/{acp-run-store-DvHGcG6-.js → acp-run-store-C6n-XeY_.js} +1 -1
  11. package/dist/assets/{activity-steps-panel-BixdRLE2.js → activity-steps-panel-BzHQOJsQ.js} +1 -1
  12. package/dist/assets/{add-credits-modal-IV5EP5Uo.js → add-credits-modal-CCEMf2_U.js} +1 -1
  13. package/dist/assets/ai-page-BznkOakE.js +1 -0
  14. package/dist/assets/{animated-avatar-B7_KzM7V.js → animated-avatar-DzfEDnTh.js} +1 -1
  15. package/dist/assets/{api-DL5vlAJ0.js → api-CJFoPWHm.js} +1 -1
  16. package/dist/assets/{api-BafF_-rc.js → api-XwdNiVE9.js} +1 -1
  17. package/dist/assets/{api-key-screen-Dh7AJqr3.js → api-key-screen-BXn2F-lQ.js} +1 -1
  18. package/dist/assets/{app-card-BV9XWgfV.js → app-card-Uowaj1kh.js} +1 -1
  19. package/dist/assets/{app-info-Bus9qaJo.js → app-info-qQex8Ndg.js} +1 -1
  20. package/dist/assets/{archive-redirect-page-Cyh8EfTp.js → archive-redirect-page-CpKvFqvX.js} +1 -1
  21. package/dist/assets/{assistant-feature-flag-store-DrFDLNVv.js → assistant-feature-flag-store-CLqMw4mK.js} +1 -1
  22. package/dist/assets/assistant-identity-store-DIyVo8LV.js +1 -0
  23. package/dist/assets/{assistant-status-panel-DODbammu.js → assistant-status-panel-DKnWIr7_.js} +1 -1
  24. package/dist/assets/{auth-store-CK95leo_.js → auth-store-D9BqFncz.js} +2 -2
  25. package/dist/assets/{avatar-renderer-DAklEC5T.js → avatar-renderer-DK54o2kQ.js} +1 -1
  26. package/dist/assets/avatar-svg-compositor-FtVPqzlC.js +1 -0
  27. package/dist/assets/{background-task-actions-BfAGLLHN.js → background-task-actions-CmYMPa2o.js} +1 -1
  28. package/dist/assets/{background-task-detail-panel-DOWj29Ko.js → background-task-detail-panel-KDqjs7i2.js} +1 -1
  29. package/dist/assets/{background-task-store-CN04oS2z.js → background-task-store-DFS8MP5D.js} +1 -1
  30. package/dist/assets/billing-page-Cc5fHBn2.js +3 -0
  31. package/dist/assets/{billing-redirect-page-BsV6cEpx.js → billing-redirect-page-BRcj5q0u.js} +1 -1
  32. package/dist/assets/{bookmarks-page-CPmWAOGH.js → bookmarks-page-fFnFzh4F.js} +1 -1
  33. package/dist/assets/{browser-DtFBB5v5.js → browser-CNL8hh8H.js} +2 -2
  34. package/dist/assets/{build-state-DoiXhrgx.js → build-state-WR9nlRgM.js} +1 -1
  35. package/dist/assets/{capture-error-CqtAGHQu.js → capture-error-Bj8_eutd.js} +1 -1
  36. package/dist/assets/{channels-page-route-BBwlgesO.js → channels-page-route-wxREzs6W.js} +1 -1
  37. package/dist/assets/{chat-avatar-C7xsXP27.js → chat-avatar-DIDq1Jt5.js} +1 -1
  38. package/dist/assets/{chat-layout-slots-store-C325hn1X.js → chat-layout-slots-store-C2IFeZFr.js} +1 -1
  39. package/dist/assets/{chat-markdown-message-C2uQyAXa.js → chat-markdown-message-ERK48E1Z.js} +2 -2
  40. package/dist/assets/{checkbox-BZTUJtxM.js → checkbox-BY0BDJjm.js} +1 -1
  41. package/dist/assets/{client-feature-flag-store-DR6pLmyc.js → client-feature-flag-store-oTfL8Oiz.js} +1 -1
  42. package/dist/assets/{client-identity-ChGFRQsv.js → client-identity-BS5mQsaQ.js} +1 -1
  43. package/dist/assets/{command-palette-CYwgr9BF.js → command-palette-CsRPcIM-.js} +1 -1
  44. package/dist/assets/{command-palette-window-page-ByOPmEAV.js → command-palette-window-page-BzQ_oDaq.js} +1 -1
  45. package/dist/assets/{community-page-D7FDDkdu.js → community-page-mlhk4LsN.js} +1 -1
  46. package/dist/assets/{confirm-dialog-DZX6LhLy.js → confirm-dialog-UYFm4osC.js} +1 -1
  47. package/dist/assets/{connect-page-BXelaj8V.js → connect-page-PuRyFup0.js} +1 -1
  48. package/dist/assets/consent-DbD2Hcbf.js +1 -0
  49. package/dist/assets/{consent-controls-DoUmeaFm.js → consent-controls-BOFoWAYO.js} +1 -1
  50. package/dist/assets/{contacts-gateway-BI9Ok4O5.js → contacts-gateway-C5OljhCC.js} +1 -1
  51. package/dist/assets/{contacts-page-route-C2cmfHU4.js → contacts-page-route-VBlklzVL.js} +1 -1
  52. package/dist/assets/{conversation-cache-irOw8vtk.js → conversation-cache-CqCkWHT6.js} +1 -1
  53. package/dist/assets/{conversation-list-fetchers-CeiuJYcE.js → conversation-list-fetchers-D84gJs6f.js} +1 -1
  54. package/dist/assets/{conversation-navigation-DUNqTEXk.js → conversation-navigation-Wm7_pLFs.js} +1 -1
  55. package/dist/assets/{conversation-queries-Bo-ZW6ul.js → conversation-queries-Ba_1sW5M.js} +1 -1
  56. package/dist/assets/{conversation-store-C0tvFESx.js → conversation-store-bshB7nDP.js} +1 -1
  57. package/dist/assets/{credential-entry-page-Dt_0bNAT.js → credential-entry-page-Bfrl1sD_.js} +1 -1
  58. package/dist/assets/{credentials-page-BDfP4yY4.js → credentials-page-B-AJyMvk.js} +1 -1
  59. package/dist/assets/{danger-zone-redirect-page-CpEYg1lA.js → danger-zone-redirect-page-DKfrmf_o.js} +1 -1
  60. package/dist/assets/{debug-page-Bh4VqdzS.js → debug-page-DWEIExMH.js} +2 -2
  61. package/dist/assets/{deploy-dialogs-D_AQFfc0.js → deploy-dialogs-BNMcZzII.js} +1 -1
  62. package/dist/assets/{deploy-store-Co5K25DO.js → deploy-store-CxnShfQj.js} +1 -1
  63. package/dist/assets/{detail-card-BKbhBGhy.js → detail-card-CwtjhGfi.js} +1 -1
  64. package/dist/assets/{detail-panel-stop-button-C-Y-hevf.js → detail-panel-stop-button-C1rystDS.js} +1 -1
  65. package/dist/assets/{detail-shell-BW-7Q0R6.js → detail-shell-DcNnOqM_.js} +1 -1
  66. package/dist/assets/{developer-page-tydL_eOW.js → developer-page-Bu7HBiPJ.js} +1 -1
  67. package/dist/assets/{devices-redirect-page-7yfm7RVK.js → devices-redirect-page-Cvt_H5ig.js} +1 -1
  68. package/dist/assets/{diagnostics-C1vLQi8c.js → diagnostics-Dva51gYK.js} +1 -1
  69. package/dist/assets/{dictation-overlay-page-BM_PPlmh.js → dictation-overlay-page-zpoNqudq.js} +1 -1
  70. package/dist/assets/{dictation-overlay-w1YHEfFR.js → dictation-overlay-pePw7mLd.js} +1 -1
  71. package/dist/assets/{dist-BswnB-bR.js → dist-DC9QooLF.js} +1 -1
  72. package/dist/assets/{dist-CQN0ZAOZ.js → dist-oCfq2a_n.js} +1 -1
  73. package/dist/assets/{document-viewer-container-Do8yUakJ.js → document-viewer-container-Cl4jDmfx.js} +2 -2
  74. package/dist/assets/{document-viewer-page-BzM3ABt9.js → document-viewer-page-kV6TCXu0.js} +1 -1
  75. package/dist/assets/{edge-swipe-arbiter-store-D9XJTxJJ.js → edge-swipe-arbiter-store-DyemvsR-.js} +1 -1
  76. package/dist/assets/effective-timezone-qiooajmO.js +1 -0
  77. package/dist/assets/{emails-page-Cn56Zrp2.js → emails-page-D9E3uXkG.js} +1 -1
  78. package/dist/assets/{environment-store-BXSWXdjm.js → environment-store-BFVmN-OW.js} +1 -1
  79. package/dist/assets/esm-BQjZqfJZ.js +2 -0
  80. package/dist/assets/esm-BTyZM-kf.js +2 -0
  81. package/dist/assets/esm-BWFeAIOX.js +2 -0
  82. package/dist/assets/{esm-DCA3xHJS.js → esm-C6-ZMSya.js} +2 -2
  83. package/dist/assets/esm-CDPcGg-B.js +2 -0
  84. package/dist/assets/esm-DEY-lP80.js +1 -0
  85. package/dist/assets/esm-DKdDWqsF.js +2 -0
  86. package/dist/assets/{eye-bbox-vHbpD-XX.js → eye-bbox-DXmmg9ML.js} +1 -1
  87. package/dist/assets/{file-editor-AqFGpEiG.js → file-editor-DpNdd7HZ.js} +1 -1
  88. package/dist/assets/{file-markdown-Dz0E8JCw.js → file-markdown-CLmQTpqL.js} +1 -1
  89. package/dist/assets/{first-run-scope-vr9PkCPF.js → first-run-scope-BoT9LMYw.js} +1 -1
  90. package/dist/assets/{funnel-events-wLEIhAS6.js → funnel-events-CK938pi2.js} +1 -1
  91. package/dist/assets/general-page-DpKVqj5t.js +1 -0
  92. package/dist/assets/{get-memory-stats-B9qL5lJg.js → get-memory-stats-ERcqnC0Q.js} +1 -1
  93. package/dist/assets/{haptics-BOyIPZDm.js → haptics-D9eNTUq-.js} +2 -2
  94. package/dist/assets/{hatching-screen-DKqcfIqT.js → hatching-screen-d3SWqFKY.js} +1 -1
  95. package/dist/assets/{home-page-route-4LoUJVyf.js → home-page-route-BOCisuYY.js} +1 -1
  96. package/dist/assets/{hosting-screen-ChxMs5SE.js → hosting-screen-6xIW6q02.js} +1 -1
  97. package/dist/assets/{identity-page-route-BZv_8gEN.js → identity-page-route-qWwRSRld.js} +1 -1
  98. package/dist/assets/index-B0l9Wjpj.css +2 -0
  99. package/dist/assets/{index-4G2A642F.js → index-BOC87TAq.js} +3 -3
  100. package/dist/assets/{ingest-JAa1OGej.js → ingest-DGkxw0Go.js} +1 -1
  101. package/dist/assets/{inspect-page-D6BmfgaE.js → inspect-page-CRBfQ5WU.js} +3 -3
  102. package/dist/assets/{installed-plugins-query-BARnE4gA.js → installed-plugins-query-C29LGAEV.js} +1 -1
  103. package/dist/assets/{integration-icon-B5V_-Cwm.js → integration-icon-Dvjn3ytY.js} +1 -1
  104. package/dist/assets/{integrations-page-CiKJbgld.js → integrations-page-D5KWY6v-.js} +1 -1
  105. package/dist/assets/{intelligence-layout-iZMnS_UR.js → intelligence-layout-DP9zklR6.js} +1 -1
  106. package/dist/assets/{invalidate-plugin-queries-QIHve9na.js → invalidate-plugin-queries-DamxiwYv.js} +1 -1
  107. package/dist/assets/{keyboard-shortcuts-redirect-page-Bj55BTMo.js → keyboard-shortcuts-redirect-page--bCvhp62.js} +1 -1
  108. package/dist/assets/{latest-assistant-text-BjCANctw.js → latest-assistant-text-D5WR-o6J.js} +1 -1
  109. package/dist/assets/{library-detail-page-rAKEZjAC.js → library-detail-page-pviljaQw.js} +1 -1
  110. package/dist/assets/{library-page-DLXws76z.js → library-page-CYYuLywk.js} +1 -1
  111. package/dist/assets/{list-row-MeHwwyA6.js → list-row-B1wPb2Au.js} +1 -1
  112. package/dist/assets/{local-mode-CTrmCbAp.js → local-mode-Ckii2tmN.js} +1 -1
  113. package/dist/assets/{local-runtime-upgrade-DhywiNJj.js → local-runtime-upgrade-BggVMXfW.js} +1 -1
  114. package/dist/assets/{login-flow-GvzsqmPU.js → login-flow-BCNBNLzu.js} +1 -1
  115. package/dist/assets/{login-page-BpyN5i3N.js → login-page-DdHXGGAt.js} +1 -1
  116. package/dist/assets/{logout-page-BYTvA7jR.js → logout-page-DjihP6Qk.js} +1 -1
  117. package/dist/assets/{logs-layout-CAsT7PSA.js → logs-layout-C84-h0Hn.js} +1 -1
  118. package/dist/assets/{memory-page-route-Ct0vQuTQ.js → memory-page-route-dGWTWCWF.js} +1 -1
  119. package/dist/assets/{memory-router-playground-page-Dw5KRcud.js → memory-router-playground-page-CjUiz_bH.js} +1 -1
  120. package/dist/assets/{menu-CKZtG-s_.js → menu-BvjhxZo7.js} +1 -1
  121. package/dist/assets/{messages-DR9NaU6I.js → messages-Dl5_cjD9.js} +1 -1
  122. package/dist/assets/{metric-card-BGMRvm8T.js → metric-card-CkAD9RpC.js} +1 -1
  123. package/dist/assets/{mobile-sidebar-drawer-Dwe3U09O.js → mobile-sidebar-drawer-CbJ5JfXT.js} +1 -1
  124. package/dist/assets/{modal-DwsThLGg.js → modal-BR4CUFBd.js} +1 -1
  125. package/dist/assets/mutation-error-CwYvaYnb.js +1 -0
  126. package/dist/assets/native-anchor-CVNubOIm.js +1 -0
  127. package/dist/assets/{native-biometric-BBZbTKi0.js → native-biometric-CntdlaL-.js} +1 -1
  128. package/dist/assets/{native-file-fkzAxQg0.js → native-file-B6_oAU2Q.js} +2 -2
  129. package/dist/assets/{not-found-BAcyD9Pu.js → not-found-DV3iLBwm.js} +1 -1
  130. package/dist/assets/{notice-DCp7WO3L.js → notice-BMK7xqUw.js} +1 -1
  131. package/dist/assets/{notifications-page-DzAAMGmB.js → notifications-page-B9vnqyB1.js} +1 -1
  132. package/dist/assets/{oauth-complete-page-pSE2ePnC.js → oauth-complete-page-BSxiDbQm.js} +1 -1
  133. package/dist/assets/{oauth-connection-utils-U3iVzpfJ.js → oauth-connection-utils-DbcihBL8.js} +1 -1
  134. package/dist/assets/{oauth-popup-complete-page-D4Uc4M6G.js → oauth-popup-complete-page-CyYbqLoK.js} +1 -1
  135. package/dist/assets/{onboarding-layout-1lVX8db0.js → onboarding-layout-Dd5fPfE7.js} +1 -1
  136. package/dist/assets/{onboarding-store-hpvNtD3A.js → onboarding-store-DutUn1E3.js} +1 -1
  137. package/dist/assets/open-workspace-file-CpveqBim.js +2 -0
  138. package/dist/assets/{page-empty-state-BOJLN0oo.js → page-empty-state-BA3_YQN2.js} +1 -1
  139. package/dist/assets/{page-shell-CdgW9nzA.js → page-shell-_QxBKTK3.js} +1 -1
  140. package/dist/assets/{pairing-page-KqVmsFUh.js → pairing-page-DPfIgf3F.js} +1 -1
  141. package/dist/assets/{panel-item-ldBYDDDs.js → panel-item-CrtoJCrd.js} +1 -1
  142. package/dist/assets/{password-reset-page-CMaCRCUO.js → password-reset-page-D55bGMVy.js} +1 -1
  143. package/dist/assets/{personality-page-Dt5aGp-e.js → personality-page-fJJd-i4s.js} +1 -1
  144. package/dist/assets/plans-page-C-JyEPT_.js +1 -0
  145. package/dist/assets/{platform-detection-DOh3jMAT.js → platform-detection-CMiRPRCq.js} +1 -1
  146. package/dist/assets/{platform-login-notice-LOYoqOMf.js → platform-login-notice-BG9TFAJa.js} +1 -1
  147. package/dist/assets/{platform-loopback-page-BscTnDN8.js → platform-loopback-page-DunGLusR.js} +1 -1
  148. package/dist/assets/{plugin-detail-page-rtP8WprQ.js → plugin-detail-page-BngHrN8T.js} +1 -1
  149. package/dist/assets/{plugins-page-BlLCo_51.js → plugins-page-DD0t1_pE.js} +1 -1
  150. package/dist/assets/plugins-surface-D4i2vqBz.js +1 -0
  151. package/dist/assets/{popover-BFL-uOLh.js → popover-BRpYVASI.js} +1 -1
  152. package/dist/assets/{prefs-B2UAscQt.js → prefs-BZnS5vR_.js} +1 -1
  153. package/dist/assets/{privacy-page-DIfDx43s.js → privacy-page-nZvfh3dh.js} +1 -1
  154. package/dist/assets/{privacy-screen-CT2vDIPL.js → privacy-screen-D2aDT6E6.js} +1 -1
  155. package/dist/assets/{provider-callback-page-CBhBrIAp.js → provider-callback-page-BwANEd-K.js} +1 -1
  156. package/dist/assets/{provider-key-BoyxWMGQ.js → provider-key-B3R8SlMJ.js} +1 -1
  157. package/dist/assets/{provider-signup-page-MRdEILUW.js → provider-signup-page-Cz2DP-jP.js} +1 -1
  158. package/dist/assets/{quick-input-page-ZAHDIH7x.js → quick-input-page-CF2MJnCE.js} +1 -1
  159. package/dist/assets/{react-query.gen-oEdI--ip.js → react-query.gen-Mwd5l-vZ.js} +1 -1
  160. package/dist/assets/{react-query.gen-CbsPBjd9.js → react-query.gen-r3I6j8-1.js} +1 -1
  161. package/dist/assets/{remote-gateway-session-DAfJAELv.js → remote-gateway-session-BHjZ9gQ6.js} +1 -1
  162. package/dist/assets/{research-facts-e-0TmtJP.js → research-facts-UIXXE8D6.js} +1 -1
  163. package/dist/assets/{research-mock-page-DTTf0zfR.js → research-mock-page-DnbQpZcp.js} +1 -1
  164. package/dist/assets/{research-onboarding-persistence-BN6g1lF7.js → research-onboarding-persistence-CceFfAqE.js} +1 -1
  165. package/dist/assets/{research-onboarding-route-xdBEvVjC.js → research-onboarding-route-yg2iKw6i.js} +1 -1
  166. package/dist/assets/{research-results-view-DhHY5ZPj.js → research-results-view-CxhTn2J7.js} +1 -1
  167. package/dist/assets/{resolved-assistants-store-PdwcxGwN.js → resolved-assistants-store-C-PdxK8f.js} +1 -1
  168. package/dist/assets/{retire-confirm-dialog-BF8nORxR.js → retire-confirm-dialog--eF_pXhA.js} +1 -1
  169. package/dist/assets/{review-terms-screen-DWW0H6gs.js → review-terms-screen-Dpk-gyJE.js} +1 -1
  170. package/dist/assets/{risk-DXfbjxrL.js → risk-C_bbPQPd.js} +1 -1
  171. package/dist/assets/{routes-C3xPjNWF.js → routes-BBFM42ft.js} +11 -11
  172. package/dist/assets/{routes-bwxCYLJj.js → routes-vE-2hncW.js} +1 -1
  173. package/dist/assets/{runtime-upgrade-banner-Dlp0eQiE.js → runtime-upgrade-banner-DQI-l3Yc.js} +2 -2
  174. package/dist/assets/{schedules-o0jcCr54.js → schedules-DF5cTXBf.js} +1 -1
  175. package/dist/assets/{schedules-page-BCofuXAr.js → schedules-page-Dgu-znOf.js} +1 -1
  176. package/dist/assets/{sdk.gen-C6q_cviY.js → sdk.gen-BIu1DgTs.js} +1 -1
  177. package/dist/assets/{security-redirect-page-B_ci75cb.js → security-redirect-page-BEohiPDW.js} +1 -1
  178. package/dist/assets/{select-assistant-screen-g68FASxq.js → select-assistant-screen-C2q8wO2f.js} +1 -1
  179. package/dist/assets/{setting-row-CxQBrD8s.js → setting-row-0LXvW7Kh.js} +1 -1
  180. package/dist/assets/{settings-divider-ORJowxpl.js → settings-divider-CXIrJieH.js} +1 -1
  181. package/dist/assets/{settings-layout-DvMiWCPp.js → settings-layout-b7iBWIT-.js} +1 -1
  182. package/dist/assets/settings-navigation-BGdjm0Ki.js +1 -0
  183. package/dist/assets/{share-feedback-modal-BlqdxyC5.js → share-feedback-modal-B05-nKgu.js} +1 -1
  184. package/dist/assets/{sidebar-tree-DtsphGOt.js → sidebar-tree-ByF78JHW.js} +1 -1
  185. package/dist/assets/{signup-page-B-9iClzh.js → signup-page-CGauGszD.js} +1 -1
  186. package/dist/assets/{signup-shell-CS8qe8J1.js → signup-shell-Bw6r9tWP.js} +1 -1
  187. package/dist/assets/{site-favicon-BwdB2A7_.js → site-favicon-CCyX9r-Z.js} +1 -1
  188. package/dist/assets/{skill-detail-page-RlOqtrxz.js → skill-detail-page-GlV5JRzQ.js} +1 -1
  189. package/dist/assets/{skill-detail-panel-72NTcSvY.js → skill-detail-panel-crqCBZbU.js} +1 -1
  190. package/dist/assets/{skills-CS48H_5g.js → skills-C1CAcW7T.js} +1 -1
  191. package/dist/assets/{skills-page-B5c4S__U.js → skills-page-BikP-AR7.js} +1 -1
  192. package/dist/assets/{slack-setup-wizard-DyLOaNeb.js → slack-setup-wizard-DKj1_XdA.js} +1 -1
  193. package/dist/assets/{cpu-eUAdrpWb.js → sliders-horizontal-slneqAyY.js} +1 -1
  194. package/dist/assets/{sound-manager-BkU9w22u.js → sound-manager-xEbUgFv-.js} +1 -1
  195. package/dist/assets/{sounds-page-B_VfIF_f.js → sounds-page-9_otQ97S.js} +1 -1
  196. package/dist/assets/{src-B9F84D64.js → src-D89CNeuT.js} +1 -1
  197. package/dist/assets/{start-screen-BzchtmN4.js → start-screen-DSF3melT.js} +1 -1
  198. package/dist/assets/{stream-watchdog-LwK1DR5Q.js → stream-watchdog-BafbDdX9.js} +1 -1
  199. package/dist/assets/{subagent-detail-panel-CnkzZsGz.js → subagent-detail-panel-q0g4JWAX.js} +1 -1
  200. package/dist/assets/{subagent-store-CM0X7ol2.js → subagent-store-D-GPthdC.js} +1 -1
  201. package/dist/assets/{superpowers-page-D0T5rLBb.js → superpowers-page-UgdWFWsF.js} +1 -1
  202. package/dist/assets/{system-events-page-9lCNzX-7.js → system-events-page-Bw94HLwx.js} +1 -1
  203. package/dist/assets/{system-events-redirect-page-AHa_MARa.js → system-events-redirect-page-BGZQC8-K.js} +1 -1
  204. package/dist/assets/{tag-D8NAGb0r.js → tag-NXcyiTkK.js} +1 -1
  205. package/dist/assets/{theme-stage-page-CntGqJIW.js → theme-stage-page-bEZxHTyN.js} +1 -1
  206. package/dist/assets/{threshold-presets-ti1ttrv3.js → threshold-presets-BO8En2q0.js} +1 -1
  207. package/dist/assets/{tiptap-document-editor-BOuerIA1.js → tiptap-document-editor-CyY1HRzV.js} +1 -1
  208. package/dist/assets/{toast-DR7D7Uma.js → toast-LgLp4obE.js} +1 -1
  209. package/dist/assets/{tool-detail-panel-B6-P-pe0.js → tool-detail-panel-DFMOphDJ.js} +1 -1
  210. package/dist/assets/{transcript-message-body-shared-CQwPiuDN.js → transcript-message-body-shared-nWAkSzar.js} +1 -1
  211. package/dist/assets/{trust-rules-api-lD2Ni46I.js → trust-rules-api-C0-hkXT2.js} +1 -1
  212. package/dist/assets/{upgrade-cancel-page-D0hw2jKj.js → upgrade-cancel-page-DwxI6NLL.js} +1 -1
  213. package/dist/assets/{upgrade-success-page-CmEZ39Sn.js → upgrade-success-page-SO92J-Rf.js} +1 -1
  214. package/dist/assets/{usage-redirect-page-Cq2M7ii4.js → usage-redirect-page-BJBkecYr.js} +1 -1
  215. package/dist/assets/{use-active-assistant-id-BcM35kFN.js → use-active-assistant-id-Cjbsk2Q3.js} +1 -1
  216. package/dist/assets/{use-app-theme-DVqzJFH6.js → use-app-theme-Q42fO5Nz.js} +1 -1
  217. package/dist/assets/{use-assistant-avatar-DpMH3A_7.js → use-assistant-avatar-DSu2_Mzi.js} +1 -1
  218. package/dist/assets/{use-assistant-capability-DkGxxxTG.js → use-assistant-capability-gxe56K48.js} +1 -1
  219. package/dist/assets/{use-assistant-identity-details-CN_tizo0.js → use-assistant-identity-details-CpHkzjrI.js} +1 -1
  220. package/dist/assets/{use-avatar-accent-var-C4DSU-BO.js → use-avatar-accent-var-PV9tsBJj.js} +1 -1
  221. package/dist/assets/{use-bookmarks-DzswOt-6.js → use-bookmarks-BbJtKyHe.js} +1 -1
  222. package/dist/assets/{use-bundled-avatar-components-IQw2k8-g.js → use-bundled-avatar-components-Gp_YaD6o.js} +2 -2
  223. package/dist/assets/{use-bus-subscription-DIENjckU.js → use-bus-subscription-Cu4Y9DQi.js} +1 -1
  224. package/dist/assets/use-checkout-dismiss-refresh-kdxxDNpF.js +1 -0
  225. package/dist/assets/{use-command-palette-sections-BFYwWTT8.js → use-command-palette-sections-BWjxkwKB.js} +1 -1
  226. package/dist/assets/{use-discord-nudge-CRU-lEHV.js → use-discord-nudge-C_QdHIeX.js} +1 -1
  227. package/dist/assets/{use-edge-swipe-6PtOzG4E.js → use-edge-swipe-DVeTYbmY.js} +1 -1
  228. package/dist/assets/{use-edge-swipe-back-Y66_jaFR.js → use-edge-swipe-back-DDq-N20h.js} +1 -1
  229. package/dist/assets/{use-edit-app-B3lr2KkA.js → use-edit-app-DfFIonqZ.js} +1 -1
  230. package/dist/assets/{use-effective-timezone-Da7pvXSm.js → use-effective-timezone-LqzBqHBy.js} +1 -1
  231. package/dist/assets/{use-invite-link-dialog-4cPtNBj0.js → use-invite-link-dialog-DX58-LWY.js} +1 -1
  232. package/dist/assets/use-ios-app-nudge-BO8jWfr0.js +1 -0
  233. package/dist/assets/use-is-org-ready-X_98Cnx9.js +1 -0
  234. package/dist/assets/{use-onboarding-login-DWweCRJ-.js → use-onboarding-login-B8rpbSEh.js} +1 -1
  235. package/dist/assets/{use-platform-gate-DcS6snds.js → use-platform-gate-Dry0Nv4f.js} +1 -1
  236. package/dist/assets/{use-reduced-motion-Bv27WKCk.js → use-reduced-motion-Se97jRQ-.js} +1 -1
  237. package/dist/assets/{use-save-twilio-credentials-BDbv1FdS.js → use-save-twilio-credentials-CUQ6gdIj.js} +1 -1
  238. package/dist/assets/{use-skill-actions-C34mG6kK.js → use-skill-actions-DgK7Nmt1.js} +1 -1
  239. package/dist/assets/{use-skill-detail-files-M-YjNd2c.js → use-skill-detail-files-_v4zUF6S.js} +1 -1
  240. package/dist/assets/use-sticky-profiles-B0zVD3uk.js +1 -0
  241. package/dist/assets/{use-subagent-card-data-CmbaKWII.js → use-subagent-card-data-YbAN73Fw.js} +1 -1
  242. package/dist/assets/{use-supports-bookmarks-CJC-T2ro.js → use-supports-bookmarks-C3J7FtDn.js} +1 -1
  243. package/dist/assets/{use-swipe-engine-RAFE-Hrf.js → use-swipe-engine-DRvffOuu.js} +1 -1
  244. package/dist/assets/{utils-DW4oHJu6.js → utils-BtC1KiH4.js} +1 -1
  245. package/dist/assets/{utils-CrvvcikL.js → utils-CnB60ZJN.js} +1 -1
  246. package/dist/assets/{viewer-store-CLSpfTlZ.js → viewer-store-BDpZVbcr.js} +1 -1
  247. package/dist/assets/{voice-list-woCTax9H.js → voice-list-DJeZeHuA.js} +1 -1
  248. package/dist/assets/{voice-page-BDjuMuY8.js → voice-page-DQcyxaPl.js} +1 -1
  249. package/dist/assets/{voice-picker-modal-BiCmmLJz.js → voice-picker-modal-BXMvQihh.js} +1 -1
  250. package/dist/assets/{weather-forecast-display-D5OkfHyL.js → weather-forecast-display-D2sn4QD4.js} +1 -1
  251. package/dist/assets/{web-BMLENaxE.js → web-7I6Bn0iP.js} +1 -1
  252. package/dist/assets/{web-BK2xLXXm.js → web-BE7l06mM.js} +1 -1
  253. package/dist/assets/{web-BLJkVZnq.js → web-BEpNr5_U.js} +1 -1
  254. package/dist/assets/{web-Cc4zhBG7.js → web-BPyURh2Z.js} +1 -1
  255. package/dist/assets/{web-D6tBOv21.js → web-Bj8XUknF.js} +1 -1
  256. package/dist/assets/{web-Cimwq57E.js → web-CBluPLFP.js} +1 -1
  257. package/dist/assets/{web-C4ApmvCw.js → web-Cmg3AbZk.js} +1 -1
  258. package/dist/assets/{web-BQLS3-Jp.js → web-DHVjLzid.js} +1 -1
  259. package/dist/assets/{welcome-screen-BTmdDQ8q.js → welcome-screen-n-cGiojh.js} +1 -1
  260. package/dist/assets/{workflow-detail-panel-BigYPr9m.js → workflow-detail-panel-Cq3AwWXE.js} +1 -1
  261. package/dist/assets/{workflow-store-B-5tSUVD.js → workflow-store-QV5aMjTt.js} +1 -1
  262. package/dist/assets/{workspace-page-D1Ds9_ey.js → workspace-page-CL9z2Jrs.js} +1 -1
  263. package/dist/index.html +228 -229
  264. package/package.json +1 -1
  265. package/dist/assets/access-DFmdmMm5.js +0 -1
  266. package/dist/assets/ai-page-_F_gn-vY.js +0 -1
  267. package/dist/assets/assistant-identity-store-RThYdwnA.js +0 -1
  268. package/dist/assets/avatar-svg-compositor-CgyK5D40.js +0 -1
  269. package/dist/assets/billing-page-D1vuR7wJ.js +0 -3
  270. package/dist/assets/consent-Bkslj0yQ.js +0 -1
  271. package/dist/assets/crown-DTdTkF6n.js +0 -1
  272. package/dist/assets/effective-timezone-CnKC3vj0.js +0 -1
  273. package/dist/assets/esm-CBsKAtYP.js +0 -2
  274. package/dist/assets/esm-CkAk1b7M.js +0 -1
  275. package/dist/assets/esm-DVuEArjY.js +0 -2
  276. package/dist/assets/esm-LrelsjXA.js +0 -2
  277. package/dist/assets/esm-NJgNz35U.js +0 -2
  278. package/dist/assets/esm-PbRZjFG7.js +0 -2
  279. package/dist/assets/general-page-CVLpYzRN.js +0 -1
  280. package/dist/assets/index-_3FdgMgw.css +0 -2
  281. package/dist/assets/mutation-error--1w2EbUT.js +0 -1
  282. package/dist/assets/native-anchor-DtMEHD4d.js +0 -1
  283. package/dist/assets/open-workspace-file-C0ZDhKxD.js +0 -2
  284. package/dist/assets/plans-page-B0jfFMS-.js +0 -1
  285. package/dist/assets/plugins-surface-C6q5ZBC0.js +0 -1
  286. package/dist/assets/settings-navigation-DCqMil0c.js +0 -1
  287. package/dist/assets/sliders-horizontal-D5dtNWk8.js +0 -1
  288. package/dist/assets/use-checkout-dismiss-refresh-DRknWbR3.js +0 -1
  289. package/dist/assets/use-ios-app-nudge-BV5eX4Fv.js +0 -1
  290. package/dist/assets/use-is-org-ready-DryM43xt.js +0 -1
  291. package/dist/assets/use-sticky-profiles-CostDY59.js +0 -1
  292. /package/dist/assets/{Combination-C7TWRLS7.js → Combination-CkAMwkbS.js} +0 -0
  293. /package/dist/assets/{api-errors-BRGPPSWw.js → api-errors-CFiCT7Ap.js} +0 -0
  294. /package/dist/assets/{app-types-DSkgEmV3.js → app-types-CBg2__YH.js} +0 -0
  295. /package/dist/assets/{apple-logo-BaqMf8q6.js → apple-logo-poQac1tY.js} +0 -0
  296. /package/dist/assets/{avatar-bundled-components-CTd294ra.js → avatar-bundled-components-CecbESCk.js} +0 -0
  297. /package/dist/assets/{avatar-subagent-BpXST4nO.js → avatar-subagent-C9WTTUjI.js} +0 -0
  298. /package/dist/assets/{avatar-tone-4L7foPzW.js → avatar-tone-CMoWR2JX.js} +0 -0
  299. /package/dist/assets/{browser-timezone-DGz-HvxU.js → browser-timezone-C_0jBUid.js} +0 -0
  300. /package/dist/assets/{build.umd-DlzJAHJ4.js → build.umd-59c0EvgO.js} +0 -0
  301. /package/dist/assets/{by-tool-use-id-index-DcsiqOhc.js → by-tool-use-id-index-aoRP6d51.js} +0 -0
  302. /package/dist/assets/{chat-BIJEFb5u.js → chat-BrL0k2UY.js} +0 -0
  303. /package/dist/assets/{client.gen-Dq2brHDV.js → client.gen-CV05d-kw.js} +0 -0
  304. /package/dist/assets/{conversation-selection-Cx6Axfzb.js → conversation-selection-3EKkKt0G.js} +0 -0
  305. /package/dist/assets/{create-selectors-B-P03-8K.js → create-selectors-Qo7kcikX.js} +0 -0
  306. /package/dist/assets/{definitions-MzBHgkRs.js → definitions-OhJf_HMS.js} +0 -0
  307. /package/dist/assets/{definitions-quuEj_td.js → definitions-PikNVFdS.js} +0 -0
  308. /package/dist/assets/{dices-FpUbVcWW.js → dices-DcuIF52A.js} +0 -0
  309. /package/dist/assets/{dist-BJSu8g5P.js → dist-BwAT3VYQ.js} +0 -0
  310. /package/dist/assets/{dist-CKLJHt4Z.js → dist-CaYJ736y.js} +0 -0
  311. /package/dist/assets/{dist-BKxs5XmY.js → dist-jXSU-ejH.js} +0 -0
  312. /package/dist/assets/{domains-BwT1h2fD.js → domains-DWRzNRJy.js} +0 -0
  313. /package/dist/assets/{download-BBg2iaa4.js → download-CywcQLB2.js} +0 -0
  314. /package/dist/assets/{dropdown-Dt0Iof85.js → dropdown-BCfnSdIZ.js} +0 -0
  315. /package/dist/assets/{edit-chat-session-BVmK2sam.js → edit-chat-session-yPtopwB6.js} +0 -0
  316. /package/dist/assets/{ellipsis-BRJI5_P1.js → ellipsis-DnoqTkj4.js} +0 -0
  317. /package/dist/assets/{emoji-catalog-data-BCc1YNMR.js → emoji-catalog-data-COLzb2Wj.js} +0 -0
  318. /package/dist/assets/{event-bus-D2jlU6rm.js → event-bus-DSxmBYhD.js} +0 -0
  319. /package/dist/assets/{external-link-CAce-RVu.js → external-link-CS0aVYGt.js} +0 -0
  320. /package/dist/assets/{external-urls-HAW1JmbX.js → external-urls-BYwuIdYk.js} +0 -0
  321. /package/dist/assets/{eye-DTyDWiqu.js → eye-BMVGQXHT.js} +0 -0
  322. /package/dist/assets/{eye-off-fuOP4Lij.js → eye-off-Jdx8qkOK.js} +0 -0
  323. /package/dist/assets/{feature-flag-catalog-C45bOtg3.js → feature-flag-catalog-BAyJlRMY.js} +0 -0
  324. /package/dist/assets/{file-CNougInA.js → file-Ddp9Dqgl.js} +0 -0
  325. /package/dist/assets/{file-code-DD3K2kve.js → file-code-BDHws4Dk.js} +0 -0
  326. /package/dist/assets/{file-plus-Dq2xo7Ic.js → file-plus-C3SBA8ll.js} +0 -0
  327. /package/dist/assets/{file-text-BCsUYVEF.js → file-text-Br730Q4B.js} +0 -0
  328. /package/dist/assets/{folder-Dgxb-gKb.js → folder-DF8nFp7N.js} +0 -0
  329. /package/dist/assets/{folder-open-CAb0DLYq.js → folder-open-Nlg0OphT.js} +0 -0
  330. /package/dist/assets/{format-date-C5pKGCAG.js → format-date-RZ9mCDCy.js} +0 -0
  331. /package/dist/assets/{format-file-size-Btq3aJL3.js → format-file-size-CQaPE33p.js} +0 -0
  332. /package/dist/assets/{globe-CEgs-yoc.js → globe-CMtjL_s_.js} +0 -0
  333. /package/dist/assets/{hard-drive-dYuXAWBE.js → hard-drive-DWFPKcXI.js} +0 -0
  334. /package/dist/assets/{hard-navigate-V2EFapkk.js → hard-navigate-DZlpL1No.js} +0 -0
  335. /package/dist/assets/{heart-BqO0KKAc.js → heart-789ajxtB.js} +0 -0
  336. /package/dist/assets/{impersonate-version-flag-QIrc9g5I.js → impersonate-version-flag-4Ki_3iKD.js} +0 -0
  337. /package/dist/assets/{inbox-DXYIwUrn.js → inbox-B6TknLsk.js} +0 -0
  338. /package/dist/assets/{info-CYiVdnQV.js → info-vgPTIsGI.js} +0 -0
  339. /package/dist/assets/{input-C-GkeWCw.js → input-hw3el2GJ.js} +0 -0
  340. /package/dist/assets/{is-electron-7N7iyz1y.js → is-electron-m5eeGBnd.js} +0 -0
  341. /package/dist/assets/{key-round-CSc3w5ka.js → key-round-0Zop_GsZ.js} +0 -0
  342. /package/dist/assets/{laptop-ByoaxLxg.js → laptop-DSZhU52i.js} +0 -0
  343. /package/dist/assets/{layout-grid-PPpVK0nJ.js → layout-grid-DA_CfD6d.js} +0 -0
  344. /package/dist/assets/{link-2-BMNZFfWH.js → link-2-BKL8QWRX.js} +0 -0
  345. /package/dist/assets/{link-CowyzCIZ.js → link-BfUb7cwC.js} +0 -0
  346. /package/dist/assets/{link-click-DLYgWZdo.js → link-click-BoSQACXo.js} +0 -0
  347. /package/dist/assets/{list-CDyb1CGV.js → list-DNbTcxAh.js} +0 -0
  348. /package/dist/assets/{loader-circle-BzJ2kz3F.js → loader-circle-XREx3i4W.js} +0 -0
  349. /package/dist/assets/{log-in-Bhye1kwc.js → log-in-CqVJRYe-.js} +0 -0
  350. /package/dist/assets/{log-out-BLE632qu.js → log-out-B4hsBWnk.js} +0 -0
  351. /package/dist/assets/{machine-sizes-Cu2Qa0bd.js → machine-sizes-DAflIPTM.js} +0 -0
  352. /package/dist/assets/{mail-DABv3_Ue.js → mail-CMdPNysl.js} +0 -0
  353. /package/dist/assets/{message-circle-gk_DFUIg.js → message-circle-BsH7vHtN.js} +0 -0
  354. /package/dist/assets/{message-square-zCNXaHYX.js → message-square-CQGiY4zk.js} +0 -0
  355. /package/dist/assets/{message-square-text-asdoy3SW.js → message-square-text-D0Q7W58R.js} +0 -0
  356. /package/dist/assets/{mic-DZrWtAAu.js → mic-xmDFUbCL.js} +0 -0
  357. /package/dist/assets/{minimize-2-BR0ed4mI.js → minimize-2-CaXsUqSp.js} +0 -0
  358. /package/dist/assets/{misc-CAQM4FGM.js → misc-DckBb5zz.js} +0 -0
  359. /package/dist/assets/{monitor-B5vtTCxm.js → monitor-B1y28fS1.js} +0 -0
  360. /package/dist/assets/{moon-DSdti3GO.js → moon-BJzODLTY.js} +0 -0
  361. /package/dist/assets/{native-deep-link-D4jZANvf.js → native-deep-link-PvbVHiPM.js} +0 -0
  362. /package/dist/assets/{oauth-popup-Bru0o3W0.js → oauth-popup-DZEqljdC.js} +0 -0
  363. /package/dist/assets/{onboarding-step-layout-D9rghAjS.js → onboarding-step-layout-CURfuoh4.js} +0 -0
  364. /package/dist/assets/{optimistic-lifecycle-50vNA6dY.js → optimistic-lifecycle-C2a6IJ7E.js} +0 -0
  365. /package/dist/assets/{paperclip-DVE0scjU.js → paperclip-c8Xlrnx4.js} +0 -0
  366. /package/dist/assets/{pdf-DFUISXhq.js → pdf-IQXtc7_x.js} +0 -0
  367. /package/dist/assets/{plugin-attribution-CItr0rSf.js → plugin-attribution-DCFEMRUF.js} +0 -0
  368. /package/dist/assets/{pointer-QlIwQKYH.js → pointer-RLpjGG7A.js} +0 -0
  369. /package/dist/assets/{prechat-EVefdGcO.js → prechat-DIuViPZk.js} +0 -0
  370. /package/dist/assets/{profile-metadata-D2IzF-q3.js → profile-metadata-h4CTeMKT.js} +0 -0
  371. /package/dist/assets/{progress-bar-CJxkStgF.js → progress-bar-C_T5_pf2.js} +0 -0
  372. /package/dist/assets/{proxy-Ca4nD_gM.js → proxy-RtD8704m.js} +0 -0
  373. /package/dist/assets/{public-asset-CoSMBS62.js → public-asset-CbDDcomC.js} +0 -0
  374. /package/dist/assets/{rotate-ccw-Da_2DvhY.js → rotate-ccw-BjzeX7qz.js} +0 -0
  375. /package/dist/assets/{sandbox-bridge-BhR-nW2z.js → sandbox-bridge-DgDrAWv3.js} +0 -0
  376. /package/dist/assets/{sdk.gen-CsFDyJ6U.js → sdk.gen-BVAVE6A_.js} +0 -0
  377. /package/dist/assets/{sdk.gen-DEFA-6EJ.js → sdk.gen-DPKrJeho.js} +0 -0
  378. /package/dist/assets/{search-DA3TmTuR.js → search-BVW-n8to.js} +0 -0
  379. /package/dist/assets/{semver-Bfq1LtyW.js → semver-BpijV4FQ.js} +0 -0
  380. /package/dist/assets/{send-DHWUIK7G.js → send-Q71Exj3z.js} +0 -0
  381. /package/dist/assets/{shield-check-C7I-REGg.js → shield-check-22NwY9JM.js} +0 -0
  382. /package/dist/assets/{shield-B69p45Kq.js → shield-fzs_emVe.js} +0 -0
  383. /package/dist/assets/{smartphone-BbK6bGuE.js → smartphone-mDNwm_ss.js} +0 -0
  384. /package/dist/assets/{sparkles-DC8kqYjt.js → sparkles-Ccrj7hxd.js} +0 -0
  385. /package/dist/assets/{square-Bn3X6ZlO.js → square-D_e8nR-F.js} +0 -0
  386. /package/dist/assets/{status-badge-pill-wJPMXQk1.js → status-badge-pill-z1OKPW3B.js} +0 -0
  387. /package/dist/assets/{sun-BKEPYS7Q.js → sun-Dw0t1n1O.js} +0 -0
  388. /package/dist/assets/{terminal-Cs_TREv-.js → terminal-CdCI6wMV.js} +0 -0
  389. /package/dist/assets/{theme-preferences-LQuLaIA6.js → theme-preferences-ln8xC5zH.js} +0 -0
  390. /package/dist/assets/{three-dot-indicator-CfjkCgEH.js → three-dot-indicator-SJcKW5cG.js} +0 -0
  391. /package/dist/assets/{toggle-D776PTw-.js → toggle-lfnhEAcN.js} +0 -0
  392. /package/dist/assets/{trash-2-De6X8YiM.js → trash-2-L5LNgw9o.js} +0 -0
  393. /package/dist/assets/{triangle-alert--e3n47gm.js → triangle-alert-CQfiAg_t.js} +0 -0
  394. /package/dist/assets/{typed-storage-zmOSvIeO.js → typed-storage-9Sn8tkE7.js} +0 -0
  395. /package/dist/assets/{use-copy-to-clipboard-O2AZwhGa.js → use-copy-to-clipboard-DBVpNZOl.js} +0 -0
  396. /package/dist/assets/{use-is-mobile-Cx2xnNUx.js → use-is-mobile-Bz2l7wPL.js} +0 -0
  397. /package/dist/assets/{user-Dq9DUxnU.js → user-_zNqL48O.js} +0 -0
  398. /package/dist/assets/{user-plus-CXMJ1x_5.js → user-plus-oiIr9ey8.js} +0 -0
  399. /package/dist/assets/{users-DWDkv8ju.js → users-iLvfYFOP.js} +0 -0
  400. /package/dist/assets/{video-CZnrM0pw.js → video-BcgduiJ6.js} +0 -0
  401. /package/dist/assets/{volume-2-Bj3y3ZBJ.js → volume-2-CvT-JEIl.js} +0 -0
  402. /package/dist/assets/{workflow-DbPANJpf.js → workflow-cWWiPi3K.js} +0 -0
  403. /package/dist/assets/{workflow-status-CgrMMiJT.js → workflow-status-DXdUkbSd.js} +0 -0
  404. /package/dist/assets/{workspace-theme-tokens-bLqHFK0a.js → workspace-theme-tokens-J8dqkK9n.js} +0 -0
  405. /package/dist/assets/{wrench-tjOqvzJ2.js → wrench-0WW0zkkG.js} +0 -0
  406. /package/dist/assets/{x-DuBvjmAE.js → x-JBAsSOmg.js} +0 -0
  407. /package/dist/assets/{xterm-DZ5GcyM-.js → xterm-CdT0HObJ.js} +0 -0
  408. /package/dist/assets/{xterm-addon-fit-SiMU5kXG.js → xterm-addon-fit-CPcVj1i5.js} +0 -0
  409. /package/dist/assets/{zoom-in-BBlu4Gwn.js → zoom-in-CaLYwni-.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{t as n}from"./jsx-runtime-D3ZM-ToX.js";import{B as r,H as i,U as a,V as o,h as s,n as c,r as l}from"./proxy-Ca4nD_gM.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(s(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=s(e)&&e.offsetWidth||0,r=s(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),c=(0,d.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:f}=(0,d.useContext)(l),p=m(s,e.props?.ref??e?.ref);return(0,d.useInsertionEffect)(()=>{let{width:e,height:l,top:u,left:d,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!l)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-BFJW0bSv.js";import{t as n}from"./jsx-runtime-D3ZM-ToX.js";import{B as r,H as i,U as a,V as o,h as s,n as c,r as l}from"./proxy-RtD8704m.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(s(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=s(e)&&e.offsetWidth||0,r=s(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),c=(0,d.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:f}=(0,d.useContext)(l),p=m(s,e.props?.ref??e?.ref);return(0,d.useInsertionEffect)(()=>{let{width:e,height:l,top:u,left:d,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!l)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-BFJW0bSv.js";import{t as n}from"./jsx-runtime-D3ZM-ToX.js";import{t as r}from"./misc-CAQM4FGM.js";import{t as i}from"./format-file-size-Btq3aJL3.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-BFJW0bSv.js";import{t as n}from"./jsx-runtime-D3ZM-ToX.js";import{t as r}from"./misc-DckBb5zz.js";import{t as i}from"./format-file-size-CQaPE33p.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{u as e}from"./routes-bwxCYLJj.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{u as e}from"./routes-vE-2hncW.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-BFJW0bSv.js";import{t as n}from"./jsx-runtime-D3ZM-ToX.js";import{t as r}from"./is-electron-7N7iyz1y.js";import{n as i,t as a}from"./app-info-Bus9qaJo.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-BFJW0bSv.js";import{t as n}from"./jsx-runtime-D3ZM-ToX.js";import{t as r}from"./is-electron-m5eeGBnd.js";import{n as i,t as a}from"./app-info-qQex8Ndg.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};
@@ -0,0 +1 @@
1
+ import{n as e}from"./auth-store-D9BqFncz.js";import{t}from"./assistant-feature-flag-store-CLqMw4mK.js";function n(e,t){return t||e?.isStaff===!0||e?.email?.toLowerCase().endsWith(`@vellum.ai`)===!0}function r(){return n(e.use.user(),t.use.settingsDeveloperNav()===!0)}export{r as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{t as n}from"./chunk-5KNZJZUH-Bsoom5--.js";import{t as r}from"./jsx-runtime-D3ZM-ToX.js";import{a as i,n as a,s as o}from"./auth-store-CK95leo_.js";import{f as s}from"./native-biometric-BBZbTKi0.js";import{u as c}from"./routes-bwxCYLJj.js";import{t as l}from"./hard-navigate-V2EFapkk.js";import{n as u,t as d}from"./login-flow-GvzsqmPU.js";import{r as f,t as p}from"./account-shell-AfPNPQvp.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(u,d)}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(),l(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-BFJW0bSv.js";import{t as n}from"./chunk-5KNZJZUH-Bsoom5--.js";import{t as r}from"./jsx-runtime-D3ZM-ToX.js";import{a as i,n as a,s as o}from"./auth-store-D9BqFncz.js";import{f as s}from"./native-biometric-CntdlaL-.js";import{u as c}from"./routes-vE-2hncW.js";import{t as l}from"./hard-navigate-DZlpL1No.js";import{n as u,t as d}from"./login-flow-BCNBNLzu.js";import{r as f,t as p}from"./account-shell-C_IH8r44.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(u,d)}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(),l(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-D3ZM-ToX.js";import{t}from"./notice-DCp7WO3L.js";import"./src-B9F84D64.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-D3ZM-ToX.js";import{t}from"./notice-BMK7xqUw.js";import"./src-D89CNeuT.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 +1 @@
1
- import{t as e}from"./jsx-runtime-D3ZM-ToX.js";import{t}from"./createLucideIcon-CAM1RhH8.js";import{t as n}from"./code-qafFA0_-.js";import{n as r}from"./resolved-assistants-store-PdwcxGwN.js";import{Ur as i}from"./sdk.gen-CsFDyJ6U.js";import{t as a}from"./public-asset-CoSMBS62.js";import{r as o}from"./acp-run-store-DvHGcG6-.js";var s=t(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),c=t(`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`}]]),l=t(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),u=e();function d(e){let t=e.toLowerCase();if(t.includes(`claude`))return`/images/prior-assistants/claude.svg`;if(t.includes(`codex`)||t.includes(`openai`)||t.includes(`gpt`))return`/images/prior-assistants/chatgpt.svg`;if(t.includes(`copilot`))return`/images/prior-assistants/copilot.svg`}function f({agent:e,className:t=`h-4 w-4 shrink-0`}){let r=e?d(e):void 0;return r?(0,u.jsx)(`img`,{src:a(r),alt:``,"aria-hidden":!0,"data-testid":`acp-agent-icon-brand`,className:t}):(0,u.jsx)(n,{className:`${t} text-[var(--content-secondary)]`,"aria-hidden":!0})}function p(){let e=r.getState().activeAssistantId;if(!e)throw Error(`No active assistant`);return e}async function m(e){let t=p(),n=o.getState(),r=n.byId[e]?.status;n.cancelRun({acpSessionId:e,completedAt:Date.now()});try{let{response:n}=await i.post({url:`/v1/assistants/{assistant_id}/acp/{id}/cancel`,path:{assistant_id:t,id:e},body:{}});if(!n?.ok)throw Error(`Failed to stop ACP run: ${n?.status}`)}catch(t){throw r!==void 0&&o.getState().restoreRunStatus({acpSessionId:e,status:r}),t}}async function h(e,t){let{data:n,response:r}=await i.post({url:`/v1/assistants/{assistant_id}/acp/{id}/steer`,path:{assistant_id:p(),id:e},body:{instruction:t}});if(!r?.ok)throw Error(`Failed to steer ACP run: ${r?.status}`);return n}export{c as a,l as i,m as n,s as o,f as r,h as t};
1
+ import{t as e}from"./jsx-runtime-D3ZM-ToX.js";import{t}from"./createLucideIcon-CAM1RhH8.js";import{t as n}from"./code-qafFA0_-.js";import{n as r}from"./resolved-assistants-store-C-PdxK8f.js";import{Ur as i}from"./sdk.gen-BVAVE6A_.js";import{t as a}from"./public-asset-CbDDcomC.js";import{r as o}from"./acp-run-store-C6n-XeY_.js";var s=t(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),c=t(`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`}]]),l=t(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),u=e();function d(e){let t=e.toLowerCase();if(t.includes(`claude`))return`/images/prior-assistants/claude.svg`;if(t.includes(`codex`)||t.includes(`openai`)||t.includes(`gpt`))return`/images/prior-assistants/chatgpt.svg`;if(t.includes(`copilot`))return`/images/prior-assistants/copilot.svg`}function f({agent:e,className:t=`h-4 w-4 shrink-0`}){let r=e?d(e):void 0;return r?(0,u.jsx)(`img`,{src:a(r),alt:``,"aria-hidden":!0,"data-testid":`acp-agent-icon-brand`,className:t}):(0,u.jsx)(n,{className:`${t} text-[var(--content-secondary)]`,"aria-hidden":!0})}function p(){let e=r.getState().activeAssistantId;if(!e)throw Error(`No active assistant`);return e}async function m(e){let t=p(),n=o.getState(),r=n.byId[e]?.status;n.cancelRun({acpSessionId:e,completedAt:Date.now()});try{let{response:n}=await i.post({url:`/v1/assistants/{assistant_id}/acp/{id}/cancel`,path:{assistant_id:t,id:e},body:{}});if(!n?.ok)throw Error(`Failed to stop ACP run: ${n?.status}`)}catch(t){throw r!==void 0&&o.getState().restoreRunStatus({acpSessionId:e,status:r}),t}}async function h(e,t){let{data:n,response:r}=await i.post({url:`/v1/assistants/{assistant_id}/acp/{id}/steer`,path:{assistant_id:p(),id:e},body:{instruction:t}});if(!r?.ok)throw Error(`Failed to steer ACP run: ${r?.status}`);return n}export{c as a,l as i,m as n,s as o,f as r,h as t};
@@ -1,4 +1,4 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-CqtAGHQu.js";import{t as n}from"./react-BFJW0bSv.js";import{t as r}from"./button-Dy5001j6.js";import{t as i}from"./jsx-runtime-D3ZM-ToX.js";import{t as a}from"./typography-DEI9Ra9z.js";import{t as o}from"./createLucideIcon-CAM1RhH8.js";import{a as s,i as c,n as l,o as u,r as d,t as f}from"./acp-run-actions-Ct6s3jTx.js";import{t as p}from"./arrow-left-C2ylPLHq.js";import{t as m}from"./brain-BIzJCPA6.js";import{t as h}from"./chevron-down-B5A-0g8A.js";import{t as g}from"./chevron-right-HU6H84S0.js";import{t as _}from"./circle-check-CjGnAahM.js";import{t as v}from"./circle-minus-DNfBAj4g.js";import{w as y}from"./menu-CKZtG-s_.js";import{t as b}from"./code-qafFA0_-.js";import{t as x}from"./file-text-BCsUYVEF.js";import{t as ee}from"./globe-CEgs-yoc.js";import{t as te}from"./repeat-GCVYEp1h.js";import{t as ne}from"./search-DA3TmTuR.js";import{t as S}from"./send-DHWUIK7G.js";import{t as re}from"./square-Bn3X6ZlO.js";import{t as C}from"./terminal-Cs_TREv-.js";import{t as ie}from"./trash-2-De6X8YiM.js";import{t as ae}from"./triangle-alert--e3n47gm.js";import{t as oe}from"./x-DuBvjmAE.js";import"./src-B9F84D64.js";import{t as se}from"./tag-D8NAGb0r.js";import{t as w}from"./chat-markdown-message-C2uQyAXa.js";import{a as T,i as ce,n as E,r as D}from"./acp-run-store-DvHGcG6-.js";import{t as O}from"./three-dot-indicator-CfjkCgEH.js";import{t as le}from"./status-badge-pill-wJPMXQk1.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`}]]),k=e(n(),1),A=``;function j(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 de(e){return(e.messageId?.startsWith(`local-marker-`)??!1)||(e.content?.startsWith(`↻ Steering: `)??!1)}function M(e){let t=e??``;return t.startsWith(`↻ Steering: `)?t.slice(E.length):t}function N(e){let t=e[e.length-1];t&&(t.kind===`agent`||t.kind===`thinking`)&&!t.isComplete&&(e[e.length-1]={...t,isComplete:!0})}function P(e,t){if(t.updateType===`agent_message_chunk`&&de(t)){N(e),e.push({kind:`user`,id:t.messageId??`steer-${e.length}`,content:M(t.content)});return}switch(t.updateType){case`user_message_chunk`:{let n=t.messageId??A,r=M(t.content),i=e[e.length-1];i&&i.kind===`user`&&i.id===n?e[e.length-1]={...i,content:i.content+r}:(N(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??A,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!==A&&r&&r.kind===`agent`&&r.messageId===A&&!r.isComplete&&r.content===(t.content??``)){e[e.length-1]={...r,messageId:n};return}N(e),e.push({kind:`agent`,messageId:n,content:t.content??``,isComplete:!1});return}case`agent_thought_chunk`:{let n=t.messageId??A,r=e[e.length-1];if(r&&r.kind===`thinking`&&r.messageId===n){e[e.length-1]={...r,content:r.content+(t.content??``)};return}N(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;N(e),e.push({kind:`tool`,toolCallId:n,title:t.toolTitle??``,toolKind:t.toolKind,status:j(t.toolStatus,`running`),content:t.content,locations:F(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=F(t);e[r]={...i,title:t.toolTitle??i.title,toolKind:t.toolKind??i.toolKind,status:j(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=fe(t.content);if(n===null)return;let r=e.findIndex(e=>e.kind===`plan`),i={kind:`plan`,entries:n};r===-1?(N(e),e.push(i)):e[r]=i;return}}}function F(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 fe(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 pe(e){let t=[];for(let n of e)P(t,n);return t}function me(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=pe(n),e=n,t}function r(r){let i=me(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++)P(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,k.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(`
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-Bj8_eutd.js";import{t as n}from"./react-BFJW0bSv.js";import{t as r}from"./button-Dy5001j6.js";import{t as i}from"./jsx-runtime-D3ZM-ToX.js";import{t as a}from"./typography-DEI9Ra9z.js";import{t as o}from"./createLucideIcon-CAM1RhH8.js";import{a as s,i as c,n as l,o as u,r as d,t as f}from"./acp-run-actions-CAjb0Wcm.js";import{t as p}from"./arrow-left-C2ylPLHq.js";import{t as m}from"./brain-BIzJCPA6.js";import{t as h}from"./chevron-down-B5A-0g8A.js";import{t as g}from"./chevron-right-HU6H84S0.js";import{t as _}from"./circle-check-CjGnAahM.js";import{t as v}from"./circle-minus-DNfBAj4g.js";import{w as y}from"./menu-BvjhxZo7.js";import{t as b}from"./code-qafFA0_-.js";import{t as x}from"./file-text-Br730Q4B.js";import{t as ee}from"./globe-CMtjL_s_.js";import{t as te}from"./repeat-GCVYEp1h.js";import{t as ne}from"./search-BVW-n8to.js";import{t as S}from"./send-Q71Exj3z.js";import{t as re}from"./square-D_e8nR-F.js";import{t as C}from"./terminal-CdCI6wMV.js";import{t as ie}from"./trash-2-L5LNgw9o.js";import{t as ae}from"./triangle-alert-CQfiAg_t.js";import{t as oe}from"./x-JBAsSOmg.js";import"./src-D89CNeuT.js";import{t as se}from"./tag-NXcyiTkK.js";import{t as w}from"./chat-markdown-message-ERK48E1Z.js";import{a as T,i as ce,n as E,r as D}from"./acp-run-store-C6n-XeY_.js";import{t as O}from"./three-dot-indicator-SJcKW5cG.js";import{t as le}from"./status-badge-pill-z1OKPW3B.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`}]]),k=e(n(),1),A=``;function j(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 de(e){return(e.messageId?.startsWith(`local-marker-`)??!1)||(e.content?.startsWith(`↻ Steering: `)??!1)}function M(e){let t=e??``;return t.startsWith(`↻ Steering: `)?t.slice(E.length):t}function N(e){let t=e[e.length-1];t&&(t.kind===`agent`||t.kind===`thinking`)&&!t.isComplete&&(e[e.length-1]={...t,isComplete:!0})}function P(e,t){if(t.updateType===`agent_message_chunk`&&de(t)){N(e),e.push({kind:`user`,id:t.messageId??`steer-${e.length}`,content:M(t.content)});return}switch(t.updateType){case`user_message_chunk`:{let n=t.messageId??A,r=M(t.content),i=e[e.length-1];i&&i.kind===`user`&&i.id===n?e[e.length-1]={...i,content:i.content+r}:(N(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??A,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!==A&&r&&r.kind===`agent`&&r.messageId===A&&!r.isComplete&&r.content===(t.content??``)){e[e.length-1]={...r,messageId:n};return}N(e),e.push({kind:`agent`,messageId:n,content:t.content??``,isComplete:!1});return}case`agent_thought_chunk`:{let n=t.messageId??A,r=e[e.length-1];if(r&&r.kind===`thinking`&&r.messageId===n){e[e.length-1]={...r,content:r.content+(t.content??``)};return}N(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;N(e),e.push({kind:`tool`,toolCallId:n,title:t.toolTitle??``,toolKind:t.toolKind,status:j(t.toolStatus,`running`),content:t.content,locations:F(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=F(t);e[r]={...i,title:t.toolTitle??i.title,toolKind:t.toolKind??i.toolKind,status:j(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=fe(t.content);if(n===null)return;let r=e.findIndex(e=>e.kind===`plan`),i={kind:`plan`,entries:n};r===-1?(N(e),e.push(i)):e[r]=i;return}}}function F(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 fe(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 pe(e){let t=[];for(let n of e)P(t,n);return t}function me(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=pe(n),e=n,t}function r(r){let i=me(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++)P(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,k.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
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)(w,{content:e}),!t&&(0,W.jsx)(O,{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)(c,{"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)(_,{"aria-hidden":!0,className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}):(0,W.jsx)(y,{"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(T(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)(ae,{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)(v,{"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)(_,{"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,k.useState)(null),i=n??!t,a=e.trim().length>0,o=t?`Thought process`:`Thinking`,s=t?(0,W.jsx)(m,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(O,{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)(h,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(g,{"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)(w,{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:x,edit:ue,delete:ie,move:s,search:ne,execute:C,think:m,fetch:ee,switch_mode:te},ke=new Set([`read`,`edit`,`delete`,`move`]);function Ae({toolKind:e}){return(0,W.jsx)(e&&Oe[e]||b,{"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,k.useState)(!1),s=(0,k.useMemo)(()=>R(e.content),[e.content]),c=(0,k.useMemo)(()=>V(e.content),[e.content]),l=(0,k.useMemo)(()=>c.split(`
3
3
  `).map(e=>e.trim()).find(e=>e.length>0&&!e.startsWith("```"))||`View output`,[c]),u=(0,k.useMemo)(()=>U(s,e.locations),[s,e.locations]),d=t&&e.status===`running`?`ended`:e.status,f=d===`running`,p=e.toolKind&&Ee[e.toolKind]||De,m=B(e.rawInput)??e.title,_=m&&m!==p&&(!ke.has(e.toolKind??``)||u.length===0)?m:null,v=H(e.rawInput),y=H(e.rawOutput),b=v!==void 0||y!==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:p}),(0,W.jsx)(se,{tone:we[d],"data-testid":`acp-chat-tool-status`,children:Te[d]}),f&&(0,W.jsx)(O,{className:`shrink-0`,"data-testid":`acp-chat-tool-running`})]}),_&&(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:_}),u.length>0&&(0,W.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:u.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)(x,{"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)(x,{"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:l}),(0,W.jsx)(g,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0 text-[var(--content-tertiary)]`})]}),b&&(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)(h,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(g,{"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:[v!==void 0&&(0,W.jsx)(K,{label:`Raw input`,value:v,testId:`acp-chat-tool-raw-input`}),y!==void 0&&(0,W.jsx)(K,{label:`Raw output`,value:y,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)(w,{content:V(e),hardLineBreaks:!0})})}var Y=2e3;function X(e){if(e===``)return[];let t=e.split(`
4
4
  `);return e.endsWith(`
@@ -1 +1 @@
1
- import{n as e,t}from"./create-selectors-B-P03-8K.js";import{t as n}from"./by-tool-use-id-index-DcsiqOhc.js";import{a as r,i,n as a,r as o,t as s}from"./optimistic-lifecycle-50vNA6dY.js";function c(e){return e===`initializing`||e===`running`}function l(e){switch(e){case`completed`:return`var(--system-positive-strong)`;case`failed`:case`cancelled`:return`var(--system-negative-strong)`;default:return`var(--primary-base)`}}function u(e){switch(e){case`initializing`:return`Initializing`;case`running`:return`Running`;case`completed`:return`Completed`;case`failed`:return`Failed`;case`cancelled`:return`Cancelled`;default:return`Unknown`}}function d(e,t){return e===`completed`&&t===`cancelled`?{label:`Cancelled`,color:`var(--system-mid-strong)`}:{label:u(e),color:l(e)}}var f=`↻ Steering: `,p=`local-marker-`,m={byId:{},orderedIds:[],byToolUseId:new Map,highWaterMark:new Map};function h(e,t){return[...e,t]}function g(e,t){let n=new Map,r=[];for(let i of[...e,...t]){if(typeof i.seq!=`number`){r.push(i);continue}n.has(i.seq)||n.set(i.seq,i)}let i=Array.from(n.values()).sort((e,t)=>(e.seq??0)-(t.seq??0));return r.length?[...i,...r]:i}function _(e,t){let n=g(e.events,t.events),r=i(e.status,t.status,c);return{...e,events:n,status:r,stopReason:t.stopReason??e.stopReason,error:t.error??e.error,completedAt:t.completedAt??e.completedAt,usedTokens:t.usedTokens||e.usedTokens,contextSize:t.contextSize||e.contextSize,inputTokens:t.inputTokens??e.inputTokens,outputTokens:t.outputTokens??e.outputTokens,costAmount:t.costAmount??e.costAmount,costCurrency:t.costCurrency??e.costCurrency,task:e.task??t.task,parentToolUseId:e.parentToolUseId??t.parentToolUseId}}function v(e,t,n){if(typeof n!=`number`)return e;let r=e.get(t);return r!==void 0&&r>=n?e:new Map(e).set(t,n)}function y(e,t){return{getStatus:e=>e.status,isActive:c,cancelledStatus:`cancelled`,applyCancel:t=>({...t,status:`cancelled`,completedAt:e}),applyRestore:(e,t)=>({...e,status:t,completedAt:void 0}),applyRetire:n=>({...n,status:`cancelled`,stopReason:t,completedAt:e})}}var b=t(e()((e,t)=>({...m,spawnRun:r=>{let{byId:i,orderedIds:a,byToolUseId:o}=t(),s=i[r.acpSessionId];if(s){if(c(s.status))return;let t={...s,status:`running`,stopReason:void 0,error:void 0,completedAt:void 0,task:s.task??r.task,parentToolUseId:s.parentToolUseId??r.parentToolUseId},a=s.parentToolUseId?o:n(o,r.parentToolUseId,r.acpSessionId);e({byId:{...i,[r.acpSessionId]:t},byToolUseId:a});return}let l={acpSessionId:r.acpSessionId,agent:r.agent,parentConversationId:r.parentConversationId,task:r.task,status:`running`,startedAt:r.startedAt,parentToolUseId:r.parentToolUseId,usedTokens:0,contextSize:0,events:[]},u=n(o,r.parentToolUseId,r.acpSessionId);e({byId:{...i,[r.acpSessionId]:l},orderedIds:[...a,r.acpSessionId],byToolUseId:u})},receiveEvent:n=>{let{byId:r,highWaterMark:i}=t(),a=r[n.acpSessionId];a&&e({byId:{...r,[n.acpSessionId]:{...a,events:h(a.events,n.event)}},highWaterMark:v(i,n.acpSessionId,n.event.seq)})},appendLocalMarker:n=>{let{byId:r}=t(),i=r[n.acpSessionId];if(!i)return null;let a=i.events.reduce((e,t)=>typeof t.seq==`number`&&t.seq>e?t.seq:e,0),o=`${p}${i.events.length}`,s={seq:a+.5,updateType:`agent_message_chunk`,messageId:o,content:n.content};return e({byId:{...r,[n.acpSessionId]:{...i,events:[...i.events,s]}}}),o},removeLocalMarker:n=>{let{byId:r}=t(),i=r[n.acpSessionId];if(!i)return;let a=i.events.filter(e=>e.messageId!==n.markerId);a.length!==i.events.length&&e({byId:{...r,[n.acpSessionId]:{...i,events:a}}})},setTerminal:n=>{let{byId:r}=t(),i=r[n.acpSessionId];i&&e({byId:{...r,[n.acpSessionId]:{...i,status:n.status,stopReason:n.stopReason??i.stopReason,error:n.error??i.error,completedAt:n.completedAt}}})},cancelRun:n=>{let{byId:r}=t(),i=s(r[n.acpSessionId],y(n.completedAt));i&&e({byId:{...r,[n.acpSessionId]:i}})},restoreRunStatus:n=>{let{byId:r}=t(),i=a(r[n.acpSessionId],n.status,y());i&&e({byId:{...r,[n.acpSessionId]:i}})},retireMissingRuns:n=>{let{byId:r}=t(),i=y(n.completedAt,`daemon_restarted`),a=!1,s={...r};for(let e of n.acpSessionIds){let t=o(s[e],i);t&&(s[e]=t,a=!0)}a&&e({byId:s})},updateUsage:n=>{let{byId:r}=t(),i=r[n.acpSessionId];i&&e({byId:{...r,[n.acpSessionId]:{...i,usedTokens:n.usedTokens,contextSize:n.contextSize,inputTokens:n.inputTokens??i.inputTokens,outputTokens:n.outputTokens??i.outputTokens,costAmount:n.costAmount??i.costAmount,costCurrency:n.costCurrency??i.costCurrency}}})},seedFromHistory:i=>{let{byId:a,orderedIds:o,byToolUseId:s,highWaterMark:c}=t(),{byId:l,orderedIds:u}=r({entries:i,byId:a,orderedIds:o,idOf:e=>e.acpSessionId,merge:_}),d=s,f=c;for(let e of i){d=n(d,e.parentToolUseId,e.acpSessionId);for(let t of l[e.acpSessionId].events)typeof t.seq==`number`&&(f=v(f,e.acpSessionId,t.seq))}e({byId:l,orderedIds:u,byToolUseId:d,highWaterMark:f})},reset:()=>e({byId:{},orderedIds:[],byToolUseId:new Map,highWaterMark:new Map})})));export{c as a,d as i,f as n,b as r,p as t};
1
+ import{n as e,t}from"./create-selectors-Qo7kcikX.js";import{t as n}from"./by-tool-use-id-index-aoRP6d51.js";import{a as r,i,n as a,r as o,t as s}from"./optimistic-lifecycle-C2a6IJ7E.js";function c(e){return e===`initializing`||e===`running`}function l(e){switch(e){case`completed`:return`var(--system-positive-strong)`;case`failed`:case`cancelled`:return`var(--system-negative-strong)`;default:return`var(--primary-base)`}}function u(e){switch(e){case`initializing`:return`Initializing`;case`running`:return`Running`;case`completed`:return`Completed`;case`failed`:return`Failed`;case`cancelled`:return`Cancelled`;default:return`Unknown`}}function d(e,t){return e===`completed`&&t===`cancelled`?{label:`Cancelled`,color:`var(--system-mid-strong)`}:{label:u(e),color:l(e)}}var f=`↻ Steering: `,p=`local-marker-`,m={byId:{},orderedIds:[],byToolUseId:new Map,highWaterMark:new Map};function h(e,t){return[...e,t]}function g(e,t){let n=new Map,r=[];for(let i of[...e,...t]){if(typeof i.seq!=`number`){r.push(i);continue}n.has(i.seq)||n.set(i.seq,i)}let i=Array.from(n.values()).sort((e,t)=>(e.seq??0)-(t.seq??0));return r.length?[...i,...r]:i}function _(e,t){let n=g(e.events,t.events),r=i(e.status,t.status,c);return{...e,events:n,status:r,stopReason:t.stopReason??e.stopReason,error:t.error??e.error,completedAt:t.completedAt??e.completedAt,usedTokens:t.usedTokens||e.usedTokens,contextSize:t.contextSize||e.contextSize,inputTokens:t.inputTokens??e.inputTokens,outputTokens:t.outputTokens??e.outputTokens,costAmount:t.costAmount??e.costAmount,costCurrency:t.costCurrency??e.costCurrency,task:e.task??t.task,parentToolUseId:e.parentToolUseId??t.parentToolUseId}}function v(e,t,n){if(typeof n!=`number`)return e;let r=e.get(t);return r!==void 0&&r>=n?e:new Map(e).set(t,n)}function y(e,t){return{getStatus:e=>e.status,isActive:c,cancelledStatus:`cancelled`,applyCancel:t=>({...t,status:`cancelled`,completedAt:e}),applyRestore:(e,t)=>({...e,status:t,completedAt:void 0}),applyRetire:n=>({...n,status:`cancelled`,stopReason:t,completedAt:e})}}var b=t(e()((e,t)=>({...m,spawnRun:r=>{let{byId:i,orderedIds:a,byToolUseId:o}=t(),s=i[r.acpSessionId];if(s){if(c(s.status))return;let t={...s,status:`running`,stopReason:void 0,error:void 0,completedAt:void 0,task:s.task??r.task,parentToolUseId:s.parentToolUseId??r.parentToolUseId},a=s.parentToolUseId?o:n(o,r.parentToolUseId,r.acpSessionId);e({byId:{...i,[r.acpSessionId]:t},byToolUseId:a});return}let l={acpSessionId:r.acpSessionId,agent:r.agent,parentConversationId:r.parentConversationId,task:r.task,status:`running`,startedAt:r.startedAt,parentToolUseId:r.parentToolUseId,usedTokens:0,contextSize:0,events:[]},u=n(o,r.parentToolUseId,r.acpSessionId);e({byId:{...i,[r.acpSessionId]:l},orderedIds:[...a,r.acpSessionId],byToolUseId:u})},receiveEvent:n=>{let{byId:r,highWaterMark:i}=t(),a=r[n.acpSessionId];a&&e({byId:{...r,[n.acpSessionId]:{...a,events:h(a.events,n.event)}},highWaterMark:v(i,n.acpSessionId,n.event.seq)})},appendLocalMarker:n=>{let{byId:r}=t(),i=r[n.acpSessionId];if(!i)return null;let a=i.events.reduce((e,t)=>typeof t.seq==`number`&&t.seq>e?t.seq:e,0),o=`${p}${i.events.length}`,s={seq:a+.5,updateType:`agent_message_chunk`,messageId:o,content:n.content};return e({byId:{...r,[n.acpSessionId]:{...i,events:[...i.events,s]}}}),o},removeLocalMarker:n=>{let{byId:r}=t(),i=r[n.acpSessionId];if(!i)return;let a=i.events.filter(e=>e.messageId!==n.markerId);a.length!==i.events.length&&e({byId:{...r,[n.acpSessionId]:{...i,events:a}}})},setTerminal:n=>{let{byId:r}=t(),i=r[n.acpSessionId];i&&e({byId:{...r,[n.acpSessionId]:{...i,status:n.status,stopReason:n.stopReason??i.stopReason,error:n.error??i.error,completedAt:n.completedAt}}})},cancelRun:n=>{let{byId:r}=t(),i=s(r[n.acpSessionId],y(n.completedAt));i&&e({byId:{...r,[n.acpSessionId]:i}})},restoreRunStatus:n=>{let{byId:r}=t(),i=a(r[n.acpSessionId],n.status,y());i&&e({byId:{...r,[n.acpSessionId]:i}})},retireMissingRuns:n=>{let{byId:r}=t(),i=y(n.completedAt,`daemon_restarted`),a=!1,s={...r};for(let e of n.acpSessionIds){let t=o(s[e],i);t&&(s[e]=t,a=!0)}a&&e({byId:s})},updateUsage:n=>{let{byId:r}=t(),i=r[n.acpSessionId];i&&e({byId:{...r,[n.acpSessionId]:{...i,usedTokens:n.usedTokens,contextSize:n.contextSize,inputTokens:n.inputTokens??i.inputTokens,outputTokens:n.outputTokens??i.outputTokens,costAmount:n.costAmount??i.costAmount,costCurrency:n.costCurrency??i.costCurrency}}})},seedFromHistory:i=>{let{byId:a,orderedIds:o,byToolUseId:s,highWaterMark:c}=t(),{byId:l,orderedIds:u}=r({entries:i,byId:a,orderedIds:o,idOf:e=>e.acpSessionId,merge:_}),d=s,f=c;for(let e of i){d=n(d,e.parentToolUseId,e.acpSessionId);for(let t of l[e.acpSessionId].events)typeof t.seq==`number`&&(f=v(f,e.acpSessionId,t.seq))}e({byId:l,orderedIds:u,byToolUseId:d,highWaterMark:f})},reset:()=>e({byId:{},orderedIds:[],byToolUseId:new Map,highWaterMark:new Map})})));export{c as a,d as i,f as n,b as r,p as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{t as n}from"./button-Dy5001j6.js";import{t as r}from"./jsx-runtime-D3ZM-ToX.js";import{t as i}from"./typography-DEI9Ra9z.js";import{H as a,S as o,c as s,l as c,x as l}from"./risk-DXfbjxrL.js";import{_ as u,a as d,f,g as p,i as m,r as h,v as g,y as _}from"./transcript-message-body-shared-CQwPiuDN.js";import{t as v}from"./chevron-left-CytMddTB.js";import"./src-B9F84D64.js";import{t as y}from"./chat-markdown-message-C2uQyAXa.js";import{t as b}from"./workflow-store-B-5tSUVD.js";import{t as x}from"./background-task-store-CN04oS2z.js";import{r as S}from"./acp-run-store-DvHGcG6-.js";import{C,a as w,i as T,n as E,r as D,s as O,y as k}from"./site-favicon-BwdB2A7_.js";import{t as A}from"./detail-shell-BW-7Q0R6.js";import{ToolDetailBody as j,t as M}from"./tool-detail-panel-B6-P-pe0.js";var N=e(t(),1);function P(e,t,n){let r=m(t,n.workflow),i=e=>{let t=f(e,n.workflow.byToolUseId);if(t!==null&&r.has(t))return!0;let i=h(e,n.acpByToolUseId);if(i!==null&&n.acpById[i]!==void 0)return!0;let a=d(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=S.use.byId(),f=S.use.byToolUseId(),p=x.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=_(s),d=u(l.steps),f=g(l.state,l.steps),m=f===`loading`,h=p(f,l.totalDurationLabel??``,d.failed),y=m&&l.currentStepTitle||h,b=new Map(c.map(e=>[e.id,e])),x=r?r.kind===`thinking`?`Thinking`:r.activity||r.title:``;return(0,I.jsx)(A,{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)(v,{}),"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:x})]}):(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)(C,{children:y}):y}),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)(O,{steps:l.steps,timeline:!0,renderStep:t=>(0,I.jsx)(z,{step:t,activeDetail:r,onOpenDetail:a,lookupToolCall:e=>b.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)(T,{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)(D,{step:e});if(e.kind===`web_search_error`)return(0,I.jsx)(E,{step:e});if(e.kind!==`tool`)return(0,I.jsx)(w,{step:e});let o=r(e.toolCallId);return(0,I.jsx)(T,{iconName:e.iconName,label:e.activity||e.info||e.title,active:t?.toolCallId===e.toolCallId,onClick:()=>{o&&n(k(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)(y,{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-BFJW0bSv.js";import{t as n}from"./button-Dy5001j6.js";import{t as r}from"./jsx-runtime-D3ZM-ToX.js";import{t as i}from"./typography-DEI9Ra9z.js";import{H as a,S as o,c as s,l as c,x as l}from"./risk-C_bbPQPd.js";import{_ as u,a as d,f,g as p,i as m,r as h,v as g,y as _}from"./transcript-message-body-shared-nWAkSzar.js";import{t as v}from"./chevron-left-CytMddTB.js";import"./src-D89CNeuT.js";import{t as y}from"./chat-markdown-message-ERK48E1Z.js";import{t as b}from"./workflow-store-QV5aMjTt.js";import{t as x}from"./background-task-store-DFS8MP5D.js";import{r as S}from"./acp-run-store-C6n-XeY_.js";import{C,a as w,i as T,n as E,r as D,s as O,y as k}from"./site-favicon-CCyX9r-Z.js";import{t as A}from"./detail-shell-DcNnOqM_.js";import{ToolDetailBody as j,t as M}from"./tool-detail-panel-DFMOphDJ.js";var N=e(t(),1);function P(e,t,n){let r=m(t,n.workflow),i=e=>{let t=f(e,n.workflow.byToolUseId);if(t!==null&&r.has(t))return!0;let i=h(e,n.acpByToolUseId);if(i!==null&&n.acpById[i]!==void 0)return!0;let a=d(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=S.use.byId(),f=S.use.byToolUseId(),p=x.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=_(s),d=u(l.steps),f=g(l.state,l.steps),m=f===`loading`,h=p(f,l.totalDurationLabel??``,d.failed),y=m&&l.currentStepTitle||h,b=new Map(c.map(e=>[e.id,e])),x=r?r.kind===`thinking`?`Thinking`:r.activity||r.title:``;return(0,I.jsx)(A,{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)(v,{}),"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:x})]}):(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)(C,{children:y}):y}),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)(O,{steps:l.steps,timeline:!0,renderStep:t=>(0,I.jsx)(z,{step:t,activeDetail:r,onOpenDetail:a,lookupToolCall:e=>b.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)(T,{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)(D,{step:e});if(e.kind===`web_search_error`)return(0,I.jsx)(E,{step:e});if(e.kind!==`tool`)return(0,I.jsx)(w,{step:e});let o=r(e.toolCallId);return(0,I.jsx)(T,{iconName:e.iconName,label:e.activity||e.info||e.title,active:t?.toolCallId===e.toolCallId,onClick:()=>{o&&n(k(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)(y,{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-BFJW0bSv.js";import{t as r}from"./button-Dy5001j6.js";import{l as i,m as a,t as o}from"./chunk-5KNZJZUH-Bsoom5--.js";import{n as s}from"./QueryClientProvider-CMu7CkQU.js";import{t as c}from"./useQuery-Bz-fbQ-m.js";import{t as l}from"./useMutation-CXGTrp4W.js";import{t as u}from"./jsx-runtime-D3ZM-ToX.js";import{t as d}from"./chevron-right-HU6H84S0.js";import{t as f}from"./circle-alert-DVCpoZrc.js";import{t as p}from"./loader-circle-BzJ2kz3F.js";import{t as m}from"./modal-DwsThLGg.js";import{t as h}from"./dropdown-Dt0Iof85.js";import{u as g}from"./routes-bwxCYLJj.js";import{n as _,r as v}from"./browser-DtFBB5v5.js";import{ft as y,mt as b}from"./react-query.gen-oEdI--ip.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(y()),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)(()=>v(()=>{t(!1),n.invalidateQueries(y())}),[t,n]),(0,C.jsx)(m.Root,{open:e,onOpenChange:t,children:(0,C.jsxs)(m.Content,{size:`sm`,children:[(0,C.jsxs)(m.Header,{children:[(0,C.jsx)(m.Title,{children:`Add Credits`}),(0,C.jsx)(m.Description,{children:`You'll be redirected to Stripe to complete the payment.`})]}),(0,C.jsx)(m.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)(h,{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)(f,{className:`h-3.5 w-3.5 shrink-0`}),E(P.error)]}),(0,C.jsxs)(o,{to:g.settings.usageBilling,className:`flex items-center gap-1 text-body-small-default text-[var(--content-tertiary)] hover:text-[var(--content-secondary)]`,onClick:()=>t(!1),children:[`Configure Automatic Top-Ups`,(0,C.jsx)(d,{className:`size-4`})]}),(0,C.jsx)(`div`,{className:`h-px w-full bg-[var(--border-subtle)]`})]})}),(0,C.jsxs)(m.Footer,{children:[(0,C.jsx)(m.Close,{asChild:!0,children:(0,C.jsx)(r,{variant:`outlined`,children:`Cancel`})}),(0,C.jsx)(r,{variant:`primary`,leftIcon:P.isPending?(0,C.jsx)(p,{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:`Continue`})]})]})})}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-BFJW0bSv.js";import{t as r}from"./button-Dy5001j6.js";import{l as i,m as a,t as o}from"./chunk-5KNZJZUH-Bsoom5--.js";import{n as s}from"./QueryClientProvider-CMu7CkQU.js";import{t as c}from"./useQuery-Bz-fbQ-m.js";import{t as l}from"./useMutation-CXGTrp4W.js";import{t as u}from"./jsx-runtime-D3ZM-ToX.js";import{t as d}from"./chevron-right-HU6H84S0.js";import{t as f}from"./circle-alert-DVCpoZrc.js";import{t as p}from"./loader-circle-XREx3i4W.js";import{t as m}from"./modal-BR4CUFBd.js";import{t as h}from"./dropdown-BCfnSdIZ.js";import{u as g}from"./routes-vE-2hncW.js";import{n as _,r as v}from"./browser-CNL8hh8H.js";import{ft as y,mt as b}from"./react-query.gen-Mwd5l-vZ.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(y()),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)(()=>v(()=>{t(!1),n.invalidateQueries(y())}),[t,n]),(0,C.jsx)(m.Root,{open:e,onOpenChange:t,children:(0,C.jsxs)(m.Content,{size:`sm`,children:[(0,C.jsxs)(m.Header,{children:[(0,C.jsx)(m.Title,{children:`Add Credits`}),(0,C.jsx)(m.Description,{children:`You'll be redirected to Stripe to complete the payment.`})]}),(0,C.jsx)(m.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)(h,{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)(f,{className:`h-3.5 w-3.5 shrink-0`}),E(P.error)]}),(0,C.jsxs)(o,{to:g.settings.usageBillingConfigureTopUps,className:`flex items-center gap-1 text-body-small-default text-[var(--content-tertiary)] hover:text-[var(--content-secondary)]`,onClick:()=>t(!1),children:[`Configure Automatic Top-Ups`,(0,C.jsx)(d,{className:`size-4`})]}),(0,C.jsx)(`div`,{className:`h-px w-full bg-[var(--border-subtle)]`})]})}),(0,C.jsxs)(m.Footer,{children:[(0,C.jsx)(m.Close,{asChild:!0,children:(0,C.jsx)(r,{variant:`outlined`,children:`Cancel`})}),(0,C.jsx)(r,{variant:`primary`,leftIcon:P.isPending?(0,C.jsx)(p,{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:`Continue`})]})]})})}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-Bj8_eutd.js";import{t as o}from"./react-BFJW0bSv.js";import{t as s}from"./button-Dy5001j6.js";import{m as c,u as l}from"./chunk-5KNZJZUH-Bsoom5--.js";import{n as u}from"./QueryClientProvider-CMu7CkQU.js";import{t as d}from"./useQuery-Bz-fbQ-m.js";import{t as f}from"./useMutation-CXGTrp4W.js";import{t as p}from"./jsx-runtime-D3ZM-ToX.js";import{t as m}from"./cn-CJf7MmLX.js";import{t as h}from"./typography-DEI9Ra9z.js";import{t as g}from"./createLucideIcon-CAM1RhH8.js";import{t as _}from"./check-sC49_hjU.js";import{t as v}from"./chevron-down-B5A-0g8A.js";import{t as y}from"./circle-alert-DVCpoZrc.js";import{t as b}from"./circle-check-CjGnAahM.js";import{t as x}from"./clock-BYTc0Ds9.js";import{t as S}from"./external-link-CS0aVYGt.js";import{t as C}from"./info-vgPTIsGI.js";import{t as w}from"./list-DNbTcxAh.js";import{t as T}from"./loader-circle-XREx3i4W.js";import{t as E}from"./mail-CMdPNysl.js";import{t as D}from"./search-BVW-n8to.js";import{t as O}from"./trash-2-L5LNgw9o.js";import{t as k}from"./triangle-alert-CQfiAg_t.js";import{t as A}from"./notice-BMK7xqUw.js";import{j}from"./src-D89CNeuT.js";import{t as M}from"./tag-NXcyiTkK.js";import{t as N}from"./popover-BRpYVASI.js";import{t as P}from"./input-hw3el2GJ.js";import{t as F}from"./toggle-lfnhEAcN.js";import{t as I}from"./modal-BR4CUFBd.js";import{n as L}from"./toast-LgLp4obE.js";import{t as R}from"./confirm-dialog-UYFm4osC.js";import{t as z}from"./dropdown-BCfnSdIZ.js";import{$ as B,A as V,B as ee,C as H,F as U,G as W,H as te,I as G,J as K,K as q,L as J,M as Y,N as X,P as Z,Q as ne,R as re,S as ie,U as ae,V as oe,W as se,X as ce,Y as le,Z as ue,_ as de,a as fe,at as pe,b as me,c as he,d as ge,et as _e,f as ve,g as ye,h as be,i as xe,it as Se,j as Ce,k as we,l as Te,m as Ee,n as De,nt as Oe,o as ke,ot as Ae,p as je,q as Me,r as Ne,rt as Pe,s as Fe,st as Ie,t as Le,tt as Re,u as ze,v as Be,x as Ve,z as He}from"./use-sticky-profiles-B0zVD3uk.js";import{Ut as Ue,Wt as We,ar as Ge,ft as Ke,j as qe,lt as Je,wn as Ye}from"./sdk.gen-BVAVE6A_.js";import{Bt as Xe,Ft as Ze,H as Qe,V as $e,_t as et,c as tt,d as nt,f as rt,l as it,m as at,p as ot,u as st}from"./react-query.gen-r3I6j8-1.js";import{t as ct}from"./assistant-identity-store-DIyVo8LV.js";import{i as lt,r as ut,t as dt}from"./utils-CnB60ZJN.js";import{r as ft}from"./api-errors-CFiCT7Ap.js";import{u as pt}from"./routes-vE-2hncW.js";import{i as mt}from"./use-platform-gate-Dry0Nv4f.js";import{t as ht}from"./use-is-org-ready-X_98Cnx9.js";import{c as gt,d as _t,f as vt,g as yt,h as bt,l as xt,lt as St,m as Ct,o as wt,p as Tt,s as Et,u as Dt,v as Ot,y as kt}from"./react-query.gen-Mwd5l-vZ.js";import{a as At,i as jt,n as Mt,o as Nt}from"./voice-list-DJeZeHuA.js";import{t as Pt}from"./platform-login-notice-BG9TFAJa.js";import{t as Ft}from"./use-active-assistant-id-Cjbsk2Q3.js";import{t as It}from"./detail-card-CwtjhGfi.js";import{t as Lt}from"./environment-store-BFVmN-OW.js";var Rt=g(`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`}]]),Q=e(o(),1),$=p();function zt({mode:e,onChange:t}){return(0,$.jsx)(`div`,{className:`max-w-[280px]`,children:(0,$.jsx)(j,{ariaLabel:`Service mode`,value:e,onChange:t,items:[{value:`managed`,label:`Managed`},{value:`your-own`,label:`Your Own`}]})})}function Bt({id:e,title:t,subtitle:n,mode:r,onModeChange:i,children:a}){return(0,$.jsxs)(It,{id:e,title:t,subtitle:n,accessory:(0,$.jsx)(zt,{mode:r,onChange:i}),children:[(0,$.jsx)(`div`,{className:`h-px bg-[var(--surface-active)]`}),(0,$.jsx)(`div`,{className:`mt-4`,children:a})]})}function Vt({id:e,title:t,subtitle:n,children:r}){return(0,$.jsxs)(It,{id:e,title:t,subtitle:n,children:[(0,$.jsx)(`div`,{className:`h-px bg-[var(--surface-active)]`}),(0,$.jsx)(`div`,{className:`mt-4`,children:r})]})}function Ht(){return(0,$.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)] px-4 py-2.5`,children:[(0,$.jsx)(C,{className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-tertiary)]`}),(0,$.jsxs)(`p`,{className:`text-body-medium-lighter text-[var(--content-secondary)]`,children:[`Managed services are metered and deducted from your Vellum account balance.`,` `,(0,$.jsxs)(`a`,{href:`https://www.vellum.ai/docs/pricing`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--primary-base)] hover:underline`,children:[`View pricing`,(0,$.jsx)(S,{className:`h-3.5 w-3.5`})]})]})]})}function Ut({status:e,message:t,isLoading:n}){return n?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2.5 py-0.5 text-body-small-default text-[var(--content-quiet)]`,children:[(0,$.jsx)(T,{className:`h-3 w-3 animate-spin`}),`Checking domain…`]}):e?e===`verified`?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--system-positive-weak)] px-2.5 py-0.5 text-body-small-default text-[var(--system-positive-strong)]`,title:`DNS records have been verified. Your domain is ready to send and receive email.`,children:[(0,$.jsx)(_,{className:`h-3 w-3`}),`Domain verified`]}):e===`pending`||e===`not_started`?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--system-mid-weak)] px-2.5 py-0.5 text-body-small-default text-[var(--system-mid-strong)]`,title:`DNS records have been provisioned. Waiting for the email provider to verify them — this usually takes a few minutes.`,children:[(0,$.jsx)(x,{className:`h-3 w-3`}),`Verifying domain…`]}):(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--system-negative-weak)] px-2.5 py-0.5 text-body-small-default text-[var(--system-negative-strong)]`,title:`Domain verification failed. DNS records may not have propagated correctly. You could try releasing and re-registering the domain.`,children:[(0,$.jsx)(y,{className:`h-3 w-3`}),`Verification failed`]}):(0,$.jsx)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2.5 py-0.5 text-body-small-default text-[var(--content-quiet)]`,title:`Unable to retrieve domain verification status.`,children:`Unknown status`})}function Wt({onClick:e,disabled:t}){return(0,$.jsx)(s,{onClick:e,disabled:t,children:`Save`})}function Gt({onClick:e,filled:t=!1}){return(0,$.jsx)(s,{variant:t?`danger`:`dangerGhost`,onClick:e,children:`Reset`})}function Kt({guide:e}){return(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)(C,{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,$.jsx)(`span`,{children:e.description}),(0,$.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[e.linkLabel,(0,$.jsx)(S,{className:`h-3 w-3`})]})]})]})}var qt=`__custom__`;function Jt(e){return e?!!(e.profile||e.provider||e.model):!1}function Yt(e,t){let n=Jt(e);return n===Jt(t)?n?(e?.profile??null)===(t?.profile??null)&&(e?.provider??null)===(t?.provider??null)&&(e?.model??null)===(t?.model??null):!0:!1}function Xt({id:e,displayName:t,description:n,defaultProfileLabel:r,draft:i,profileOptions:a,onDraftChange:o,onToggle:s}){let c=Jt(i),l=!i||!c?``:i.provider||i.model?qt:i.profile??``,u=l===qt,d=He(),f=d[0]??Pe[0],p=d.find(e=>e===i?.provider)??f,m=Ie(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:Ae(f)??``}):t===``?o(e,null):o(e,{profile:t,provider:null,model:null})}function _(t){let n=Ae(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)(z,{value:l,onChange:g,options:a,className:`w-44`,menuMinWidth:280,menuAlign:`end`}),(0,$.jsx)(F,{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)(z,{value:p??``,onChange:_,options:d.map(e=>({value:e,label:pe[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)(z,{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 Zt({isOpen:e,onClose:t,assistantId:n}){let r=(0,Q.useRef)(!1);return(0,$.jsx)(I.Root,{open:e,onOpenChange:e=>{!e&&!r.current&&t()},children:e?(0,$.jsx)(Qt,{assistantId:n,onClose:t,onSavingChange:e=>{r.current=e}}):null})}function Qt({assistantId:e,onClose:t,onSavingChange:n}){let r=u(),{data:i}=d({...tt({path:{assistant_id:e}}),staleTime:3e4}),o=(0,Q.useMemo)(()=>i?.llm?.profiles??{},[i?.llm?.profiles]),c=(0,Q.useMemo)(()=>i?.llm?.profileOrder??[],[i?.llm?.profileOrder]),l=(0,Q.useMemo)(()=>i?.llm?.callSites??{},[i?.llm?.callSites]),f=(0,Q.useMemo)(()=>W(o,c),[o,c]),p=He(),m=Xe({onSuccess:t=>{st(r,{path:{assistant_id:e}},t)}}),[h,g]=(0,Q.useState)(``),[_,v]=(0,Q.useState)(``),[y,b]=(0,Q.useState)({}),[x,S]=(0,Q.useState)(!1),[C,w]=(0,Q.useState)(!1),{data:E,isLoading:O,isError:k,refetch:A}=d({...nt({path:{assistant_id:e}}),enabled:!!e,staleTime:6e4,refetchOnWindowFocus:!1}),j=(0,Q.useMemo)(()=>(E?.callSites??[]).filter(e=>e.id!==`mainAgent`),[E]),M=!O&&!k&&!!E&&!!i,N=(0,Q.useMemo)(()=>j.map(e=>e.id),[j]),F=(0,Q.useMemo)(()=>{if(!M)return{};let e={};for(let t of N)if(t in y)e[t]=y[t];else{let n=l[t];e[t]=n?{...n}:{}}return e},[M,N,l,y]),B=(0,Q.useMemo)(()=>new Set(N),[N]),V=(0,Q.useMemo)(()=>Object.entries(l).some(([e,t])=>B.has(e)&&(t?.profile!=null||t?.provider!=null||t?.model!=null)),[l,B]),ee=(0,Q.useMemo)(()=>{if(!M)return!1;for(let e of Object.keys(F))if(!Yt(F[e],l[e]))return!0;return!1},[M,F,l]),H=(0,Q.useMemo)(()=>Object.values(F).some(e=>Jt(e)&&!!e?.provider&&!e?.model),[F]),U=(0,Q.useMemo)(()=>xe(f,[]).map(e=>({value:e.name,label:De(e)})),[f]),te=(0,Q.useCallback)(()=>{if(!_)return;let e={};for(let t of N)e[t]={profile:_};b(e)},[_,N]),G=(0,Q.useCallback)(e=>[...xe(f,[e]).map(e=>({value:e.name,label:De(e)})),{value:qt,label:`Custom`}],[f]),K=(0,Q.useMemo)(()=>{if(!h.trim())return j;let e=h.toLowerCase();return j.filter(t=>(t.displayName??``).toLowerCase().includes(e)||(t.description??``).toLowerCase().includes(e)||(t.domain??``).toLowerCase().includes(e))},[j,h]),q=(0,Q.useMemo)(()=>{if(!E)return[];let e=E.domains.map(e=>e.id),t=new Map(E.domains.map(e=>[e.id,e])),n=[];for(let r of e){let e=K.filter(e=>e.domain===r);e.length>0&&n.push({domain:t.get(r),sites:e})}let r=new Set(e),i=K.filter(e=>!r.has(e.domain));return i.length>0&&n.push({domain:{id:`other`,displayName:`Other`},sites:i}),n},[E,K]),J=(0,Q.useCallback)((e,t)=>{b(n=>({...n,[e]:t}))},[]),Y=(0,Q.useCallback)((e,t)=>{if(!t){b(t=>({...t,[e]:null}));return}let n=Ne(f,j.find(t=>t.id===e)?.defaultProfile);if(n)b(t=>({...t,[e]:{profile:n}}));else{let t=p[0]??Pe[0],n=Ae(t)??``;b(r=>({...r,[e]:{provider:t,model:n}}))}},[j,f,p]),X=(0,Q.useCallback)(async()=>{S(!0),n?.(!0);try{let n={};for(let e of Object.keys(F)){let t=F[e]??null;n[e]=Jt(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(),L.success(`Overrides saved.`)}catch(e){L.error(`Failed to save overrides. Please try again.`),a(e,{context:`call_site_overrides_save`})}finally{S(!1),n?.(!1)}},[F,t,m,n,e]),Z=(0,Q.useCallback)(async()=>{S(!0),n?.(!0);try{let n={};for(let e of Object.keys(F))n[e]=null;await m.mutateAsync({path:{assistant_id:e},body:{llm:{callSites:n}}}),t(),L.success(`Overrides reset.`)}catch(e){L.error(`Failed to reset overrides. Please try again.`),a(e,{context:`call_site_overrides_reset`})}finally{S(!1),n?.(!1)}},[F,t,m,n,e]);return(0,$.jsxs)(I.Content,{size:`lg`,hideCloseButton:!0,children:[(0,$.jsxs)(I.Header,{children:[(0,$.jsx)(I.Title,{children:`Action Overrides`}),(0,$.jsx)(I.Description,{children:`Customize which model profile specific actions should use. Uses your default profile if no override is set.`})]}),(0,$.jsxs)(I.Body,{children:[(0,$.jsx)(`div`,{className:`mb-4`,children:(0,$.jsx)(P,{type:`search`,value:h,onChange:e=>g(e.target.value),placeholder:`Search actions…`,leftIcon:(0,$.jsx)(D,{className:`h-4 w-4`}),fullWidth:!0})}),U.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)(z,{value:_,onChange:v,options:U,placeholder:`Choose profile…`,className:`w-44`,menuMinWidth:280,menuAlign:`end`}),(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:te,disabled:!_||!M||x,children:`Apply to all`})]}),O&&(0,$.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,$.jsx)(T,{className:`h-6 w-6 animate-spin text-[var(--content-tertiary)]`})}),k&&(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 A(),children:`Retry`})]}),!O&&!k&&E&&(0,$.jsx)(`div`,{className:`space-y-4`,children:q.length===0?(0,$.jsx)(`p`,{className:`py-8 text-center text-body-medium-lighter text-[var(--content-tertiary)]`,children:`No actions match your search.`}):q.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=F[e.id]??null;return!t||!Jt(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:F[e.id]??null,profileOptions:G(t===``||t===`__custom__`?null:t),onDraftChange:J,onToggle:Y},e.id)})})]},e.id))})]}),(0,$.jsxs)(I.Footer,{children:[V&&(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>w(!0),disabled:x||!M,tintColor:`var(--system-negative-strong)`,className:`mr-auto`,children:`Reset to Defaults`}),(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:t,disabled:x,children:`Cancel`}),(0,$.jsx)(s,{variant:`primary`,size:`compact`,onClick:()=>void X(),disabled:!ee||H||x,children:x?(0,$.jsx)(T,{className:`h-4 w-4 animate-spin`}):`Save`})]}),(0,$.jsx)(R,{open:C,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:()=>{w(!1),Z()},onCancel:()=>w(!1)})]})}function $t({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)(I.Root,{open:e!==null,onOpenChange:e=>{e||o()},children:(0,$.jsxs)(I.Content,{size:`sm`,children:[(0,$.jsx)(I.Header,{children:(0,$.jsx)(I.Title,{children:`Can't Delete Profile`})}),(0,$.jsxs)(I.Body,{className:`space-y-4`,children:[(0,$.jsx)(h,{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)(z,{"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)(h,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:i})]}),(0,$.jsxs)(I.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 en(e,t){if(e){let n=Ie(e).find(e=>e.id===t);if(n)return n.displayName}let n=t.lastIndexOf(`/`);return n>=0?t.slice(n+1):t}function tn(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(en(r,e.model)),r){let e=pe[r]??r;i.push(`hosted by ${e}`)}return i.length>0&&n.push(i.join(` `)),n.join(` – `)}function nn({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:m,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)(Rt,{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)(h,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:e.label??e.name}),_&&(0,$.jsx)(M,{tone:`positive`,title:`Managed by Platform — this profile cannot be disabled, deleted, or renamed.`,children:`Platform`})]}),e.description||e.model||e.provider?(0,$.jsx)(h,{variant:`body-medium-lighter`,as:`p`,className:`mt-0.5 text-(--content-tertiary)`,children:tn(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)(F,{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)(O,{}),"aria-label":`Delete ${e.label??e.name}`,disabled:_||v||i,title:_||v?`Managed profiles cannot be deleted`:void 0,onClick:m,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)(h,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:a}):null]})}function rn({isOpen:e,assistantId:t,onClose:n}){let r=u(),{data:i}=d({...tt({path:{assistant_id:t}}),staleTime:3e4}),o=(0,Q.useMemo)(()=>i?.llm?.profiles??{},[i?.llm?.profiles]),s=(0,Q.useMemo)(()=>i?.llm?.profileOrder??[],[i?.llm?.profileOrder]),c=i?.llm?.activeProfile??null,l=i?.llm?.callSites??{},f=(0,Q.useMemo)(()=>W(o,s),[o,s]),p=Xe({onSuccess:e=>{st(r,{path:{assistant_id:t}},e)}}),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(null),{data:v}=d({...$e({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&&L.success(`Profile "${n.label??e}" created`),h(!1),_(null)}return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(I.Root,{open:e,onOpenChange:e=>{e||n()},children:e?(0,$.jsx)(an,{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)(we,{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 an({assistantId:e,vellumIsManaged:t,profiles:n,profileOrder:r,orderedProfiles:i,activeProfile:o,callSiteOverrides:c,onClose:l,onEditClick:d,onNewClick:f}){let p=u(),m=Xe({onSuccess:t=>{st(p,{path:{assistant_id:e}},t)}}),[g,_]=(0,Q.useState)({}),[v,y]=(0,Q.useState)({}),[b,x]=(0,Q.useState)(new Set),[S,C]=(0,Q.useState)(null),[w,T]=(0,Q.useState)(null),[E,D]=(0,Q.useState)(null),[O,k]=(0,Q.useState)(null),A=(0,Q.useRef)(null),j=(0,Q.useRef)(null),[M,N]=(0,Q.useState)(null),[P,F]=(0,Q.useState)(null),[L,R]=(0,Q.useState)(``),[z,B]=(0,Q.useState)(!1),V=(0,Q.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 m.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 H(t){y(e=>({...e,[t]:!0})),_(e=>{let n={...e};return delete n[t],n});try{let n=r.filter(e=>e!==t);await m.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 U(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){N({name:e,label:t,isActive:n,callSiteIds:r}),R(``),F(null);return}H(e)}async function W(){if(!M||!L)return;B(!0),F(null);let t={};if(M.isActive&&(t.activeProfile=L),M.callSiteIds.length>0){let e={};for(let t of M.callSiteIds)e[t]={profile:L};t.callSites=e}if(Object.keys(t).length>0)try{await m.mutateAsync({path:{assistant_id:e},body:{llm:t}})}catch(e){a(e,{context:`settings-ai-profile-reassign-delete`}),F(`Failed to reassign references. Please try again.`),B(!1);return}let n=M.name;N(null),B(!1),H(n)}async function te(t,n){if(t===n.name)return;k(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 m.mutateAsync({path:{assistant_id:e},body:{llm:{profileOrder:s}}})}catch(e){a(e,{context:`settings-ai-profile-reorder`}),k(`Failed to reorder profiles. Please try again.`)}}let G=V.filter(e=>e.name!==M?.name&&e.source!==`managed`),K=G.length>0?G:V.filter(e=>e.name!==M?.name);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(I.Content,{size:`md`,children:[(0,$.jsxs)(I.Header,{children:[(0,$.jsx)(I.Title,{children:`Model Profiles`}),(0,$.jsx)(I.Description,{children:`Bundle a provider and model into a named profile. Assign profiles to specific actions or swap between them when chatting.`})]}),(0,$.jsxs)(I.Body,{children:[V.length===0?(0,$.jsx)(h,{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)(nn,{profile:e,vellumIsManaged:t,isDragging:w===e.name,dropTarget:E,isDeleting:v[e.name]??!1,deleteError:g[e.name],isToggling:b.has(e.name),onDragStart:t=>{A.current=e.name,T(e.name),t.dataTransfer&&(t.dataTransfer.effectAllowed=`move`)},onDragEnd:()=>{A.current=null,j.current=null,T(null),D(null)},onDragOver:t=>{t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=t.clientY>n.top+n.height/2,i={name:e.name,after:r};j.current=i,D(i)},onDragLeave:t=>{t.currentTarget.contains(t.relatedTarget)||(j.current=null,D(t=>t?.name===e.name?null:t))},onDrop:e=>{e.preventDefault();let t=A.current,n=j.current;A.current=null,j.current=null,T(null),D(null),t&&n&&te(t,n)},onEditClick:()=>d(e),onDeleteClick:()=>U(e.name),onStatusToggle:t=>void ee(e,t)},e.name))}),O&&(0,$.jsx)(h,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:O}),S&&(0,$.jsx)(h,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:S})]}),(0,$.jsxs)(I.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)($t,{blocked:M,availableReplacements:K,replacement:L,onReplacementChange:R,error:P,saving:z,onClose:()=>{N(null),F(null)},onConfirm:()=>void W()})]})}var on=`0.10.8`;function sn(){return ut(on)}function cn({mode:e,connection:t,assistantId:n,existingNames:r,connections:i,onSave:a,onCancel:o}){let[c,l]=(0,Q.useState)(t?.label??``),d=t?.name??``,f=t?.provider??`anthropic`,p=t?.auth.type??`api_key`,[m,g]=(0,Q.useState)(()=>t?.auth.type===`api_key`?t.auth.credential:t?``:`credential/anthropic/api_key`),[_,v]=(0,Q.useState)(t?.baseUrl??``),[y,b]=(0,Q.useState)(()=>t?.models?t.models.map(e=>e.id).join(`, `):``),[x,S]=(0,Q.useState)(!1),[C,w]=(0,Q.useState)(null),T=f===`openai-compatible`,[E,D]=(0,Q.useState)(``),[O,k]=(0,Q.useState)(!1),A=u(),j=(0,Q.useMemo)(()=>oe(m),[m]),M=p===`api_key`&&j!==null,{hasStoredCredential:N,isLoading:F}=re({assistantId:n,credentialKind:`credential`,credentialName:j?`${j.service}:${j.field}`:``,enabled:M}),{credentials:L}=Ce({assistantId:n,enabled:p===`api_key`});(0,Q.useEffect)(()=>{let e=t?.provider??`anthropic`;l(t?.label??``),t?.auth.type===`api_key`?g(t.auth.credential):g(t?``:`credential/${e}/api_key`),w(null),v(t?.baseUrl??``),b(t?.models?t.models.map(e=>e.id).join(`, `):``),D(``),k(!1)},[t]);let R=c.trim()!==(t?.label??``).trim(),z=T&&R?U(c,i,t?.name):null,B=d.trim().length>0&&z===null;async function H(){if(B){S(!0),w(null);try{let e;if(p===`api_key`){let t=m.trim()||`credential/${f}/api_key`,r=E.trim();if(r){k(!0);try{let e=oe(t);await Ge({path:{assistant_id:n},body:e?{type:`credential`,name:`${e.service}:${e.field}`,value:r}:{type:`api_key`,name:f,value:r},throwOnError:!0});let i=J(n,`credential`,e?`${e.service}:${e.field}`:``);A.setQueryData(i,!0),A.invalidateQueries({queryKey:et({path:{assistant_id:n}})})}catch{w(`Failed to save API key. Please try again.`);return}finally{k(!1)}}e={type:`api_key`,credential:t}}else if(t)e=t.auth;else{w(`Nothing to edit. Close and try again.`);return}let r=c.trim()||null,i={auth:e,label:r,...T&&{base_url:_.trim()||null,models:y.trim()?y.split(`,`).map(e=>({id:e.trim()})).filter(e=>e.id):null}},{data:o,error:s,response:l}=await We({path:{assistant_id:n,name:t?.name??d.trim()},body:i});if(!l?.ok){w(ae(l?.status,s)??ee(l?.status));return}if(!o){w(`Server returned an empty response. Please try again.`);return}a(o)}catch{w(`Failed to save provider. Please try again.`)}finally{S(!1)}}}let W=L.filter(e=>e.service===f),K=e!==`create`&&t?.auth.type===`api_key`,q=W.length>0||K,ne=Y(`Enter your API key`,N);return e===`create`?(0,$.jsx)(V,{variant:`modal`,assistantId:n,existingNames:r,connections:i,defaultProviderType:f,onCreated:a,onCancel:o}):(0,$.jsxs)(I.Content,{size:`md`,children:[(0,$.jsxs)(I.Header,{children:[(0,$.jsx)(I.Title,{children:`Edit Provider`}),(0,$.jsx)(I.Description,{children:t?`Editing ${te(t)}.`:`Edit provider settings.`})]}),(0,$.jsxs)(I.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)(P,{value:c,onChange:e=>l(e.target.value),placeholder:`e.g. My Anthropic Key`,fullWidth:!0}),z?(0,$.jsx)(h,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:Z[z]}):null]}),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)(P,{value:_,onChange:e=>v(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)(P,{value:y,onChange:e=>b(e.target.value),placeholder:`model-1, model-2`,fullWidth:!0}),(0,$.jsx)(h,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:`Comma-separated model identifiers exposed by your endpoint.`})]})]}),p===`api_key`&&(0,$.jsx)(X,{apiKeyValue:E,onApiKeyChange:D,credential:m,onCredentialChange:g,isLoadingCredential:F,apiKeyPlaceholder:ne,provider:f,providerCredentials:W,showAdvancedSection:q,onError:w}),p===`oauth_subscription`&&(0,$.jsx)(G,{assistantId:n,onConnected:a}),C&&(0,$.jsx)(h,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:C})]}),(0,$.jsxs)(I.Footer,{children:[(0,$.jsx)(s,{variant:`ghost`,size:`compact`,onClick:o,children:`Cancel`}),(0,$.jsx)(s,{variant:`primary`,size:`compact`,disabled:!B||x||O,onClick:()=>void H(),children:x?`Saving…`:`Save`})]})]})}var ln={anthropic:!0,openai:!0,gemini:!0,fireworks:!0,openrouter:!0,vellum:!0};function un(e){return e in ln}function dn(e){let t=e.baseUrl??``;try{e.baseUrl&&(t=new URL(e.baseUrl).host)}catch{}let n=[];t&&n.push(t);let r=e.models?.length??0;return r>0&&n.push(`${r} ${r===1?`model`:`models`}`),e.auth.type===`none`&&n.push(`keyless`),n.join(` · `)}function fn({isOpen:e,assistantId:t,onClose:n}){let[r,i]=(0,Q.useState)(!1),[a,o]=(0,Q.useState)(null),s=u(),{data:c,isLoading:l,isError:f}=d({...$e({path:{assistant_id:t}}),enabled:e}),p=sn(),{data:m}=d({...rt({path:{assistant_id:t}}),enabled:e&&p}),h=(0,Q.useMemo)(()=>{let e=c?.connections??[];return[...e.filter(e=>e.provider===Se),...e.filter(e=>e.provider!==Se)]},[c]);function g(){s.invalidateQueries({queryKey:ot({path:{assistant_id:t}})}),s.invalidateQueries({queryKey:it({path:{assistant_id:t}})})}function _(e){s.invalidateQueries({queryKey:Qe({path:{assistant_id:t}})}),i(!1),o(null)}let v=h.map(e=>e.name),y=()=>{i(!1),o(null)};return(0,$.jsx)(I.Root,{open:e,onOpenChange:e=>{e||(r?y():n())},children:e?r?(0,$.jsx)(cn,{mode:a?`edit`:`create`,connection:a??void 0,assistantId:t,existingNames:v,connections:h,onSave:_,onCancel:y}):(0,$.jsx)(pn,{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:Qe({path:{assistant_id:t}})})}}):null})}function pn({connections:e,loading:t,isError:n,assistantId:r,supportsDefaultProvider:i,defaultConnectionName:o,onDefaultChanged:c,onClose:l,onEditClick:u,onNewClick:d,onConnectionDeleted:p}){let[m,g]=(0,Q.useState)({}),[_,v]=(0,Q.useState)({}),y=f({...at(),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){un(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 Ue({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)(I.Content,{size:`md`,children:[(0,$.jsxs)(I.Header,{children:[(0,$.jsx)(I.Title,{children:`Providers`}),(0,$.jsx)(I.Description,{children:`Manage the model providers your assistant can use.`})]}),(0,$.jsx)(I.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)(h,{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)(h,{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=m[e.name],r=e.isManaged??!1,a=e.name===o,c=un(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,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(h,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:te(e)}),r&&(0,$.jsx)(M,{tone:`positive`,title:`Managed by Platform — you can rename this provider, but not edit it.`,children:`Platform`}),a&&(0,$.jsx)(M,{tone:`info`,title:`Built-in profiles (Balanced, Quality, Speed) use this provider.`,children:`Default`}),e.provider===`vellum`?null:e.provider===`openai-compatible`&&(0,$.jsx)(M,{tone:`neutral`,title:`A provider you created — served by an OpenAI-compatible endpoint.`,children:`Custom`})]}),e.provider===`openai-compatible`?(0,$.jsx)(h,{variant:`body-small-default`,as:`p`,className:`text-(--content-tertiary)`,children:dn(e)}):null]}),(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)(O,{}),"aria-label":`Delete ${te(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)(h,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:n}):null]},e.name)})})}),(0,$.jsxs)(I.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 mn(e){let[t,n]=(0,Q.useState)(void 0);return(0,Q.useEffect)(()=>{t!==void 0&&e===t.value&&n(void 0)},[e,t]),[t===void 0?e:t.value,(0,Q.useCallback)(e=>n(e===void 0?void 0:{value:e}),[])]}function hn(){let e=Ft(),t=u(),{data:n}=d({...tt({path:{assistant_id:e}}),staleTime:3e4}),r=sn(),{data:i,refetch:o}=d({...rt({path:{assistant_id:e}}),enabled:r}),c=i?.availability,l=n?.llm?.activeProfile??null,f=n?.llm?.advisorProfile??null,p=n?.llm?.callSites??{},{profiles:m,profileOrder:g}=Le(n?.llm,e),_=(0,Q.useMemo)(()=>W(m,g),[m,g]),v=Xe({onSuccess:n=>{st(t,{path:{assistant_id:e}},n)}}),[y,b]=mn(l),[x,S]=mn(f),[C,w]=(0,Q.useState)(!1),[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(!1),j=(0,Q.useMemo)(()=>xe(_,[y]),[_,y]),M=(0,Q.useMemo)(()=>xe(_,[x]),[_,x]),N=Object.entries(p).filter(([e,t])=>e!==`mainAgent`&&(t?.profile!=null||t?.provider!=null||t?.model!=null)).length,P=N===1?`1 Override`:N>0?`${N} Overrides`:`Overrides`,F=y!==l,I=x!==f,R=(0,Q.useCallback)(async()=>{try{let t={};F&&(t.activeProfile=y),I&&(t.advisorProfile=x),await v.mutateAsync({path:{assistant_id:e},body:{llm:t}}),L.success(`Saved.`)}catch(e){L.error(`Failed to save. Please try again.`),a(e,{context:`settings-ai-language-model-save`})}},[F,I,y,x,v,e]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Vt,{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)(A,{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)(z,{value:y??``,onChange:e=>{b(e===``?null:e)},placeholder:`Select a default profile…`,options:j.map(e=>({value:e.name,label:De(e)}))}),j.length===0?(0,$.jsx)(h,{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)(z,{value:x??``,onChange:e=>{S(e===``?null:e)},placeholder:`Select an advisor profile…`,options:M.map(e=>({value:e.name,label:De(e)}))}),(0,$.jsx)(h,{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:()=>k(!0),children:`Providers`}),(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>w(!0),children:`Profiles`}),(0,$.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>D(!0),children:P})]}),(F||I)&&(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Wt,{onClick:R,disabled:v.isPending}),v.isPending&&(0,$.jsx)(T,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]})}),e&&(0,$.jsx)(rn,{isOpen:C,assistantId:e,onClose:()=>w(!1)}),e&&(0,$.jsx)(Zt,{isOpen:E,onClose:()=>D(!1),assistantId:e}),e&&(0,$.jsx)(fn,{isOpen:O,assistantId:e,onClose:()=>{k(!1),r&&o()}})]})}function gn(){let e=Ft();return(0,Q.useCallback)(async(t,n)=>{try{let{data:r}=await Ge({path:{assistant_id:e},body:{value:n,type:`api_key`,name:t},throwOnError:!0});se(r)}catch(e){throw e instanceof Error&&e.message===`No assistant found`?L.error(`Assistant not ready. Please try again.`):L.error(`Failed to save ${t} API key. Please try again.`),a(e,{context:`provision_provider_key`}),e}},[e])}var _n=`0.10.12`;function vn(){return dt(_n)}function yn(){let e=Ft(),i=u(),o=ht(),{data:s}=d({...tt({path:{assistant_id:e}}),enabled:o,staleTime:3e4}),c=Xe({onSuccess:t=>{st(i,{path:{assistant_id:e}},t)}}),l=gn(),f=(0,Q.useMemo)(()=>{if(!s)return r(be,`inference-provider-native`);let e=s.services?.[`web-search`];return(e?.mode===`managed`&&e?.provider!==`inference-provider-native`?`vellum`:e?.provider)||r(`vellum:ai:webSearchProvider`,`inference-provider-native`)},[s]),[p,m]=(0,Q.useState)(!1),[h,g]=mn(f),[_,v]=(0,Q.useState)(``),y=le.has(h),{hasStoredCredential:b}=re({assistantId:e,credentialKind:`api_key`,credentialName:h,enabled:y}),x=_.trim().length>0,S=p||y&&!b&&!x||h===f&&!x,C=Y(ne[h]??`Enter your API key`,b),w=(0,Q.useCallback)(async()=>{m(!0);let t=_.trim(),r=Me(h),o=y&&t.length>0;try{o&&await l(h,t),await lt();let n=h===`vellum`?vn()?{provider:`vellum`,mode:`managed`}:{mode:`managed`}:{provider:h,mode:`your-own`};await c.mutateAsync({path:{assistant_id:e},body:{services:{"web-search":n}}}).catch(e=>{throw L.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(be,h),o){r&&n(r,t);let a=J(e,`api_key`,h);i.setQueryData(a,!0),i.invalidateQueries({queryKey:a}),v(``)}L.success(`Web search settings saved.`)}catch(e){a(e,{context:`settings-ai-web-search-persist-local`}),L.error(`Saved, but local preferences could not be written.`)}},[y,c,l,i,e,_,h]),E=(0,Q.useCallback)(()=>{let e=Me(h);e&&t(e),v(``),g(`inference-provider-native`),n(be,`inference-provider-native`)},[h,g]);return(0,$.jsx)(Vt,{title:`Web Search`,subtitle:`Configure how your assistant should search the web`,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)(z,{"aria-label":`Web search provider`,value:h,onChange:g,options:ue.map(e=>({value:e,label:ce[e]??e}))})]}),h===`vellum`&&(0,$.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Search runs through your Vellum account.`}),y&&(0,$.jsx)(P,{label:`API Key`,type:`password`,value:_,onChange:e=>v(e.target.value),placeholder:C,fullWidth:!0}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Wt,{onClick:w,disabled:S}),p&&(0,$.jsx)(T,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),y&&(0,$.jsx)(Gt,{onClick:E,filled:!0})]})]})})}var bn=`default`;function xn(){let e=Ft(),i=u(),{data:o}=d({...tt({path:{assistant_id:e}}),staleTime:3e4}),s=Xe({onSuccess:t=>{st(i,{path:{assistant_id:e}},t)}}),c=gn(),l=(0,Q.useMemo)(()=>o?o.services?.[`web-fetch`]?.provider||r(`vellum:ai:webFetchProvider`,bn):r(Ee,bn),[o]),[f,p]=(0,Q.useState)(!1),[m,h]=mn(l),[g,_]=(0,Q.useState)(``),v=B.has(m),{hasStoredCredential:y}=re({assistantId:e,credentialKind:`api_key`,credentialName:m,enabled:v}),b=g.trim().length>0,x=f||v&&!y&&!b||m===l&&!b,S=Y(Oe[m]??`Enter your API key`,y),C=(0,Q.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 L.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(Ee,m),r){let r=q(m);r&&n(r,t);let a=J(e,`api_key`,m);i.setQueryData(a,!0),i.invalidateQueries({queryKey:a}),_(``)}L.success(`Web fetch settings saved.`)}catch(e){a(e,{context:`settings-ai-web-fetch-persist-local`}),L.error(`Saved, but local preferences could not be written.`)}},[v,s,c,i,e,g,m]),w=(0,Q.useCallback)(()=>{let e=q(m);e&&t(e),_(``),h(bn),n(Ee,bn)},[m,h]);return(0,$.jsx)(Vt,{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)(z,{value:m,onChange:h,options:Re.map(e=>({value:e,label:_e[e]??e}))})]}),v&&(0,$.jsx)(P,{label:`API Key`,type:`password`,value:g,onChange:e=>_(e.target.value),placeholder:S,fullWidth:!0}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Wt,{onClick:C,disabled:x}),f&&(0,$.jsx)(T,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),v&&(0,$.jsx)(Gt,{onClick:w,filled:!0})]})]})})}function Sn({subdomain:e,onSubdomainChange:t,domainSuffix:n,subdomainPlaceholder:r=`my-assistant`,disabled:i,autoFocus:a,prefix:o,error:s,locked:c,lockedMessage:l}){return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`flex h-9 w-full items-center rounded-md border bg-[var(--field-bg)] text-body-medium-lighter transition-[border-color] duration-150 ${s?`border-[var(--system-negative-strong)]`:`border-[var(--field-border)] focus-within:border-[var(--border-active)]`}`,children:[o,(0,$.jsx)(`input`,{value:e,onChange:e=>t(e.target.value.toLowerCase().trim()),disabled:i||c,readOnly:c,autoFocus:a,placeholder:r,"aria-label":`Subdomain`,"aria-invalid":!!s,className:`h-full min-w-0 flex-1 bg-transparent ${o?`pl-1.5`:`pl-3`} pr-1 text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none disabled:cursor-not-allowed disabled:opacity-60`}),(0,$.jsxs)(`span`,{className:`shrink-0 pr-3 font-mono text-[var(--content-secondary)]`,children:[`.`,n]})]}),s&&(0,$.jsx)(`p`,{className:`mt-1.5 text-body-small-default text-[var(--system-negative-strong)]`,children:s}),c&&l&&(0,$.jsx)(`p`,{className:`mt-1.5 text-body-small-default text-[var(--content-tertiary)]`,children:l})]})}function Cn({assistantId:e,assistantHandle:t,emailRootDomain:n}){let r=u(),i=l(),[o,p]=c(),[m,h]=(0,Q.useState)(``),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(null),[b,x]=(0,Q.useState)(``),[S,C]=(0,Q.useState)(null),[w,D]=(0,Q.useState)(!1),[k,j]=(0,Q.useState)(!1),[M,N]=(0,Q.useState)(!1);(0,Q.useEffect)(()=>{g||!t||m||(h(t),_(!0))},[t,g,m]);let P=d({...St(),enabled:!0}),F=P.data,I=F?.entitlements,z=I?.managed_email===!0,B=!!I&&!z,V=!F&&P.isError&&!P.isFetching,ee=d({...gt({path:{assistant_id:e}}),enabled:!B}),H=d({...Tt({path:{assistant_id:e}}),enabled:!B}),U=ee.data?.results?.[0],W=H.data?.results?.[0],te=U?`${U.subdomain}.${n}`:null,G=d({...bt({path:{assistant_id:e,id:W?.id??``}}),enabled:!!W?.id,refetchOnWindowFocus:!1}),K=d({...Dt({path:{assistant_id:e,id:U?.id??``}}),enabled:!!U?.id,refetchInterval:e=>{let t=e.state.data?.status;return t===`verified`||t===`failed`?!1:1e4},refetchOnWindowFocus:!0});(0,Q.useEffect)(()=>{o.get(`release`)!==`1`||!U||W||(j(!0),p(e=>{let t=new URLSearchParams(e);return t.delete(`release`),t},{replace:!0}))},[W,U,o,p]);let q=f(wt()),J=f(Et()),Y=f(_t()),X=f(vt()),Z=(0,Q.useCallback)(()=>{let t={assistant_id:e};r.invalidateQueries({queryKey:xt({path:t})}),r.invalidateQueries({queryKey:Ct({path:t})}),W?.id&&r.invalidateQueries({queryKey:yt({path:{...t,id:W.id}})}),r.invalidateQueries({queryKey:kt()})},[W?.id,e,r]),ne=(0,Q.useCallback)(async()=>{let t=m.trim().toLowerCase();if(!t){y(`Enter a subdomain.`);return}D(!1);try{await q.mutateAsync({path:{assistant_id:e},body:{subdomain:t}}),h(``),y(null),Z(),L.success(`Domain ${t}.${n} registered.`)}catch(e){y(ft(e,void 0,`Failed to register domain.`))}},[e,n,Z,q,m]),re=(0,Q.useCallback)(async()=>{let t=b.trim().toLowerCase();if(!t){C(`Enter an email username.`);return}try{await Y.mutateAsync({path:{assistant_id:e},body:{username:t}}),x(``),C(null),Z(),L.success(`Email address created.`)}catch(e){C(ft(e,void 0,`Failed to create email address.`))}},[e,Z,Y,b]),ie=(0,Q.useCallback)(async()=>{if(W?.id){N(!1);try{await X.mutateAsync({path:{assistant_id:e,id:W.id}}),Z(),L.success(`Email address removed.`)}catch(e){a(e,{context:`email_address_delete`}),L.error(`Failed to remove email address.`)}}},[W?.id,e,X,Z]),ae=(0,Q.useCallback)(async()=>{if(!U?.id)return;if(W){L.error(`Remove the email address first.`);return}j(!1);let t=U.subdomain;try{await J.mutateAsync({path:{assistant_id:e,id:U.id}}),h(t),Z(),L.success(`Domain released.`)}catch(e){a(e,{context:`email_domain_release`}),L.error(`Failed to release domain.`)}},[W,e,J,U?.id,U?.subdomain,Z]);if(P.isLoading)return(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,$.jsx)(T,{className:`h-4 w-4 animate-spin`}),`Checking subscription…`]});if(B)return(0,$.jsx)(A,{tone:`info`,icon:(0,$.jsx)(E,{className:`h-4 w-4`,"aria-hidden":!0}),title:`Give your assistant its own email address`,actions:(0,$.jsx)(s,{size:`compact`,onClick:()=>i(pt.plans),children:`Upgrade`}),children:`Upgrade to a plan that includes an email address for your assistant. No provider setup required.`});let oe=V?(0,$.jsx)(A,{tone:`warning`,title:`Couldn't verify subscription status`,actions:(0,$.jsx)(s,{size:`compact`,variant:`outlined`,onClick:()=>P.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 U?W?(0,$.jsxs)(`div`,{className:`space-y-4`,children:[oe,(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:W.address}),(0,$.jsx)(Ut,{status:K.data?.status,message:K.data?.message,isLoading:K.isLoading}),(0,$.jsx)(s,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,$.jsx)(O,{}),onClick:()=>N(!0),disabled:X.isPending,"aria-label":`Remove email address`})]}),(0,$.jsx)(R,{open:M,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:W.address}),`? Your assistant will no longer be able to send or receive email at this address.`]}),confirmLabel:`Remove`,destructive:!0,onConfirm:ie,onCancel:()=>N(!1)})]}),G.data?.usage&&(0,$.jsxs)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:[G.data.usage.sent_today,` /`,` `,G.data.usage.daily_limit,` sent today ·`,` `,G.data.usage.received_today,` received`]})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[oe,(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:[U.subdomain,`.`,n]}),(0,$.jsx)(Ut,{status:K.data?.status,message:K.data?.message,isLoading:K.isLoading}),(0,$.jsx)(s,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,$.jsx)(O,{}),onClick:()=>j(!0),disabled:J.isPending,"aria-label":`Release domain`})]}),(0,$.jsx)(R,{open:k,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:[U.subdomain,`.`,n]}),`? The subdomain will become available for others to claim.`]}),confirmLabel:`Release`,destructive:!0,onConfirm:ae,onCancel:()=>j(!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 ${S?`border-[var(--system-negative-strong)]`:`border-[var(--field-border)] focus-within:border-[var(--border-active)]`}`,children:[(0,$.jsx)(`input`,{value:b,onChange:e=>{x(e.target.value.toLowerCase()),S&&C(null)},placeholder:`hi`,"aria-label":`Email username`,"aria-invalid":!!S,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:[`@`,te]})]}),(0,$.jsx)(s,{onClick:re,disabled:Y.isPending||!b.trim(),children:Y.isPending?`Creating…`:`Create`})]}),S&&(0,$.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:S})]})]}):(0,$.jsxs)(`div`,{className:`space-y-3`,children:[oe,(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Subdomain`}),(0,$.jsx)(Sn,{subdomain:m,onSubdomainChange:e=>{h(e),v&&y(null)},domainSuffix:n,subdomainPlaceholder:`my-assistant`,error:v}),(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:()=>D(!0),disabled:q.isPending||!m.trim(),children:q.isPending?`Registering…`:`Register`}),(0,$.jsx)(R,{open:w,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:ne,onCancel:()=>D(!1)})]})}function wn(){let e=Ft(),t=ht(),{data:o}=d({...Ot(),enabled:t}),s=o?.results?.[0]?.handle,c=Lt.use.emailRootDomain(),l=mt(),[u,f]=(0,Q.useState)(()=>l===`gated`?`your-own`:K(r(ke,`managed`),`managed`)),[p,m]=(0,Q.useState)(()=>{let e=r(fe,`resend`);return e===`mailgun`||e===`resend`?e:`resend`}),h=d({queryKey:[`byoEmailCredential`,e,p],queryFn:async()=>{let{data:t}=await Je({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,Q.useEffect)(()=>{h.error&&a(h.error,{context:`byo_email_credential_check`,bestEffort:!0})},[h.error]);let g=h.data?.hasSecret===!0,_=(0,Q.useCallback)(e=>{f(e),n(ke,e)},[]),v=(0,Q.useCallback)(()=>{n(fe,p),L.success(`Email settings saved.`)},[p]),y=(0,Q.useMemo)(()=>de.find(e=>e.id===p)??de[0],[p]),x=(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)(C,{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 `,y.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:y.setupSkill}),` `,`skill. It walks you through storing the API key, detecting the domain, and (optionally) wiring up an inbound webhook.`]}),(0,$.jsxs)(`a`,{href:y.docsUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[`Open `,y.displayName,(0,$.jsx)(S,{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)(z,{value:p,onChange:e=>{(e===`mailgun`||e===`resend`)&&m(e)},options:de.map(e=>({value:e.id,label:e.displayName}))})]}),g?(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)(b,{className:`h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}),(0,$.jsxs)(`span`,{children:[y.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:y.setupSkill}),` `,`skill.`]})]}),(0,$.jsxs)(`a`,{href:y.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 `,y.displayName,(0,$.jsx)(S,{className:`h-3 w-3`})]})]}):x,(0,$.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,$.jsx)(Wt,{onClick:v,disabled:!1})})]});return l===`gated`?(0,$.jsx)(Vt,{id:`email`,title:`Email`,subtitle:`Configure how your assistant sends and receives email`,children:w}):(0,$.jsx)(Bt,{id:`email`,title:`Email`,subtitle:`Configure how your assistant sends and receives email`,mode:u,onModeChange:_,children:u===`managed`?(0,$.jsx)(`div`,{className:`space-y-4`,children:l===`disabled`?(0,$.jsx)(Pt,{children:`Log in to the Vellum platform to manage email settings.`}):(0,$.jsx)(Cn,{assistantId:e,assistantHandle:s,emailRootDomain:c})}):w})}function Tn(){let e=Ft(),t=u(),{data:i}=d({...tt({path:{assistant_id:e}}),staleTime:3e4}),o=Xe({onSuccess:n=>{st(t,{path:{assistant_id:e}},n)}}),s=gn(),[c,l]=mn((0,Q.useMemo)(()=>K(i?i.services?.[`image-generation`]?.mode??r(`vellum:ai:imageGenMode`,`your-own`):r(Fe,`your-own`),`your-own`),[i])),[f,p]=(0,Q.useState)(()=>r(he,`gemini-3.1-flash-image-preview`)),[m,h]=(0,Q.useState)(``),[g,_]=(0,Q.useState)(!1),v=(0,Q.useCallback)(async()=>{_(!0);let r=m.trim(),i=c===`your-own`&&r.length>0;try{i&&await s(ie(f),r),await o.mutateAsync({path:{assistant_id:e},body:{services:{"image-generation":{mode:c}}}}).catch(e=>{throw L.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e});try{await Ye({path:{assistant_id:e},body:{modelId:f},throwOnError:!0})}catch(e){throw L.error(`Failed to update image generation model. Please try again.`),a(e,{context:`set_image_gen_model`}),e}finally{t.invalidateQueries({queryKey:it({path:{assistant_id:e}})})}}catch{_(!1);return}_(!1);try{n(Fe,c),n(he,f),i&&h(``),L.success(`Image generation settings saved.`)}catch(e){a(e,{context:`settings-ai-image-gen-persist-local`}),L.error(`Saved, but local preferences could not be written.`)}},[m,c,f,e,o,s,t]),y=(0,Q.useCallback)(()=>{h(``),p(`gemini-3.1-flash-image-preview`),n(he,`gemini-3.1-flash-image-preview`)},[]);return(0,$.jsx)(Bt,{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)(z,{className:`flex-1`,value:f,onChange:p,options:ye.map(e=>({value:e,label:Be[e]??e}))}),(0,$.jsx)(Wt,{onClick:v,disabled:g}),g&&(0,$.jsx)(T,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsx)(P,{label:`API Key`,type:`password`,value:m,onChange:e=>h(e.target.value),placeholder:ie(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)(z,{value:f,onChange:p,options:ye.map(e=>({value:e,label:Be[e]??e}))})]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Wt,{onClick:v,disabled:g}),g&&(0,$.jsx)(T,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),(0,$.jsx)(Gt,{onClick:y})]})]})})}async function En(e){let{provider:t,apiKey:n,voiceId:r,text:i}=e;if(n.trim().length===0)return{kind:`error`,message:`Save an API key for this provider first.`};try{return t===`elevenlabs`?await Dn(n,r,i):t===`deepgram`?await On(n,i):t===`fish-audio`?{kind:`unsupported`,message:`Fish Audio TTS is only supported in the desktop app today. Use ElevenLabs or Deepgram to test from the browser.`}:t===`xai`?{kind:`unsupported`,message:`xAI TTS is only supported in the desktop app today. Use ElevenLabs or Deepgram to test from the browser.`}:{kind:`unsupported`,message:`TTS testing for "${t}" is not supported from the browser yet.`}}catch(e){return{kind:`error`,message:e instanceof Error?e.message:`Failed to reach the TTS provider.`}}}async function Dn(e,t,n){let r=t.trim();if(r.length===0)return{kind:`error`,message:`Enter and save a Voice ID before testing ElevenLabs.`};let i=await fetch(`https://api.elevenlabs.io/v1/text-to-speech/${encodeURIComponent(r)}?output_format=mp3_44100_128`,{method:`POST`,headers:{"xi-api-key":e,"Content-Type":`application/json`,Accept:`audio/mpeg`},body:JSON.stringify({text:n,model_id:`eleven_turbo_v2_5`})});return i.ok?{kind:`audio`,blob:await i.blob()}:{kind:`error`,message:await kn(i,`ElevenLabs rejected the request.`)}}async function On(e,t){let n=await fetch(`https://api.deepgram.com/v1/speak?model=aura-2-thalia-en`,{method:`POST`,headers:{Authorization:`Token ${e}`,"Content-Type":`application/json`,Accept:`audio/mpeg`},body:JSON.stringify({text:t})});return n.ok?{kind:`audio`,blob:await n.blob()}:{kind:`error`,message:await kn(n,`Deepgram rejected the request.`)}}async function kn(e,t){try{let n=await e.text();if(n.length===0)return`${t} (HTTP ${e.status})`;try{let e=JSON.parse(n);if(e&&typeof e==`object`&&`detail`in e&&typeof e.detail==`string`)return e.detail;if(e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`)return e.message}catch{}return n.slice(0,200)}catch{return`${t} (HTTP ${e.status})`}}function An({assistantId:e,value:t,onChange:n,className:r}){let[i,a]=(0,Q.useState)(!1),{voices:o}=At(e);if(o.length===0)return null;let s=o.find(e=>e.model===t)??o[0];return(0,$.jsxs)(N.Root,{open:i,onOpenChange:a,children:[(0,$.jsx)(N.Trigger,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,"aria-label":`Voice`,className:m(`flex h-9 w-full items-center gap-2 rounded-md border border-[var(--field-border)] bg-[var(--field-bg)] px-3 text-left text-body-medium-lighter text-[var(--content-default)] transition-colors focus:outline-none data-[state=open]:border-[var(--border-active)]`,r),children:[(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:s?jt(s.description):`Select a voice`}),(0,$.jsx)(v,{className:`h-3.5 w-3.5 shrink-0 text-[var(--content-tertiary)]`,"aria-hidden":!0})]})}),(0,$.jsx)(N.Content,{side:`bottom`,align:`start`,className:`w-[var(--radix-popover-trigger-width)] p-1`,children:(0,$.jsx)(Mt,{assistantId:e,value:t,onChange:n,onSelect:()=>a(!1),showSource:!0})})]})}var jn={elevenlabs:`voiceId`,"fish-audio":`referenceId`,xai:`voiceId`};function Mn({assistantId:e,hideSaveButton:t=!1,hideCredentialsGuide:i=!1,onSaveStateChange:a}={}){let o=Ft(),c=e??o,l=ct.use.name()??`your assistant`,f=ht(),p=u(),{data:m}=d({...Ze({path:{assistant_id:c}}),enabled:f,staleTime:1/0}),h=(0,Q.useMemo)(()=>{let e=m?.providers;if(!e)return Ve;if(e.some(e=>e.id===`vellum`))return e;let t=Ve.find(e=>e.id===`vellum`);return t?[t,...e]:e},[m]),{data:g}=d({...tt({path:{assistant_id:c}}),enabled:f,staleTime:3e4}),_=g?.services?.tts,v=_?.mode===`managed`?`vellum`:_?.provider,y=`elevenlabs`,b=(0,Q.useMemo)(()=>v??r(`vellum:voice:ttsProvider`,y),[v,y]),x=!!v,[S,C]=mn(b),[T,E]=(0,Q.useState)(``),[D,O]=(0,Q.useState)(``),[k,A]=(0,Q.useState)(``),[j,M]=(0,Q.useState)(!1),[N,F]=(0,Q.useState)(!1),[I,R]=(0,Q.useState)(!1),{voices:B,defaultModel:V,fetched:ee}=Nt(c,{enabled:S===`vellum`}),H=_?.providers?.vellum?.model??V??``,[U,W]=mn(H),te=B.find(e=>e.model===U)??B[0],[G,K]=(0,Q.useState)(null),q=B.some(e=>e.model===H),J=G??(ee&&H!==``&&!q),Y=(0,Q.useMemo)(()=>h.find(e=>e.id===S)??h[0],[S,h]),X=S===`vellum`&&Y.supportsVoiceSelection&&U.trim()!==``&&U.trim()!==H,Z=(0,Q.useCallback)(e=>{let t=r(ge+e,``),n=r(je+e,``);M(t.length>0),O(n),A(n),E(``)},[]);(0,Q.useEffect)(()=>{Z(S)},[S,Z]);let ne=(0,Q.useMemo)(()=>{let e=S!==b,t=T.trim().length>0,n=D.trim()!==k;return e||t||n||X},[S,b,T,D,k,X]),re=(0,Q.useCallback)(async()=>{let e=T.trim(),t=D.trim(),i=Y.id;n(ve,i),e.length>0&&n(ge+i,e),n(je+i,t);let a=e.length>0?e:r(ge+i,``),o=jn[i];R(!0);try{if(a.length>0){let{response:e}=await Ke({path:{assistant_id:c},body:{service:i,field:`api_key`,value:a,label:`${Y.displayName} API Key`},throwOnError:!1});if(!e?.ok)throw Error(`Failed to store API key (HTTP ${e?.status??`?`})`)}let e={...S!==b||!x?{provider:i,mode:i===`vellum`?`managed`:`your-own`}:{},...o?{providers:{[i]:{[o]:t}}}:{},...X?{providers:{vellum:{model:U.trim()}}}:{}};if(Object.keys(e).length>0){let{response:t}=await qe({path:{assistant_id:c},body:{services:{tts:e}},throwOnError:!1});if(!t?.ok)throw Error(`Failed to save configuration (HTTP ${t?.status??`?`})`)}return M(a.length>0),A(t),E(``),p.invalidateQueries({queryKey:it({path:{assistant_id:c}})}),L.success(`Text-to-speech settings saved`),!0}catch(e){return L.error(e instanceof Error?e.message:`Failed to save text-to-speech settings`),!1}finally{R(!1)}},[c,S,U,X,T,D,Y,b,x,p]);(0,Q.useEffect)(()=>{a?.({hasChanges:ne,saving:I,save:re})},[a,ne,I,re]);let ie=(0,Q.useCallback)(()=>{n(ge+S,``),M(!1),E(``)},[S]),ae=(0,Q.useCallback)(async()=>{F(!0);try{let e=r(ge+S,``),t=T.trim(),n=t.length>0?t:e;if(n.length===0){L.error(`Save an API key for this provider before testing.`);return}let i=r(je+S,``),a=D.trim(),o=await En({provider:S,apiKey:n,voiceId:a.length>0?a:i,text:`Hey! It's ${l}. How does this sound?`});if(o.kind!==`audio`){L.error(o.message);return}let s=URL.createObjectURL(o.blob);try{let e=new Audio(s);await e.play(),await new Promise(t=>{e.onended=()=>t(),e.onerror=()=>t()})}finally{URL.revokeObjectURL(s)}}finally{F(!1)}},[l,T,S,D]),oe=j?`•••••••• (Enter a new key to replace)`:Y.apiKeyPlaceholder,se=S===`vellum`,ce=se&&Y.supportsVoiceSelection,le=(0,$.jsxs)(s,{variant:`link`,size:`compact`,className:`inline-flex h-auto items-center gap-1 px-0 underline [--vbtn-fg:var(--content-tertiary)]`,onClick:()=>{K(!1),B.some(e=>e.model===U)||W(V||B[0]?.model||``)},children:[(0,$.jsx)(w,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),`Choose from catalog`]}),ue=ce&&J&&B.length>0?le:null;return(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)(z,{value:S,onChange:C,options:h.map(e=>({value:e.id,label:e.displayName})),"aria-label":`TTS provider`})]}),!se&&(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`API Key`}),(0,$.jsx)(P,{type:`password`,value:T,onChange:e=>E(e.target.value),placeholder:oe,fullWidth:!0})]}),ce&&(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Voice`}),J?(0,$.jsx)(P,{type:`text`,value:U,onChange:e=>W(e.target.value),placeholder:`Enter a voice ID`,"aria-label":`Custom voice ID`,fullWidth:!0}):te?(0,$.jsx)(An,{assistantId:c,value:U,onChange:W}):ee&&(0,$.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`No managed voices are currently available.`})]}),Y.supportsVoiceSelection&&!se&&(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Voice ID`}),(0,$.jsx)(P,{type:`text`,value:D,onChange:e=>O(e.target.value),placeholder:`Enter a voice ID`,fullWidth:!0})]}),!i&&!se&&(0,$.jsx)(Kt,{guide:Y.credentialsGuide}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[!se&&(0,$.jsx)(s,{variant:`outlined`,onClick:ae,disabled:N,children:N?`Testing…`:`Test`}),(0,$.jsxs)(`div`,{className:`ml-auto flex items-center gap-3`,children:[ue,!t&&(0,$.jsx)(Wt,{onClick:re,disabled:!ne||I}),j&&!se&&(0,$.jsx)(Gt,{onClick:ie})]})]})]})}function Nn(){return(0,$.jsx)(Vt,{id:`text-to-speech`,title:`Text-to-Speech`,subtitle:`Configure how your assistant speaks`,children:(0,$.jsx)(Mn,{})})}var Pn={vellum:{provider:`vellum`},deepgram:{provider:`deepgram`,credentialService:`deepgram`},openai:{provider:`openai-whisper`,credentialService:`openai`}},Fn={vellum:`vellum`,deepgram:`deepgram`,"openai-whisper":`openai`},In=`deepgram`;function Ln({assistantId:e,hideSaveButton:t=!1,hideCredentialsGuide:i=!1,onSaveStateChange:a}={}){let o=Ft(),s=e??o,c=ht(),l=u(),[f]=(0,Q.useState)(()=>me.filter(e=>!e.requiresNativeDictation||H())),p=In,{data:m}=d({...tt({path:{assistant_id:s}}),enabled:c,staleTime:3e4}),h=m?.services?.stt,g=h?.mode===`managed`?`vellum`:h?.provider,_=(0,Q.useMemo)(()=>{let e=g?Fn[g]:void 0;if(e&&f.some(t=>t.id===e))return e;let t=r(ze,p);return f.some(e=>e.id===t)?t:p},[g,f,p]),v=!!g,[y,b]=mn(_),[x,S]=(0,Q.useState)(``),[C,w]=(0,Q.useState)(!1),[T,E]=(0,Q.useState)(!1);(0,Q.useEffect)(()=>{let e=r(ze,p);e===`macos-native`&&!f.some(t=>t.id===e)&&n(ze,p)},[f,p]);let D=(0,Q.useMemo)(()=>f.find(e=>e.id===y)??f[0],[f,y]),O=D.apiKeyPlaceholder!==void 0;(0,Q.useEffect)(()=>{w(r(Te+y,``).length>0),S(``)},[y]);let A=(0,Q.useMemo)(()=>{let e=y!==_,t=x.trim().length>0;return e||t},[y,_,x]),j=(0,Q.useCallback)(async()=>{let e=x.trim();n(ze,y),e.length>0&&n(Te+y,e);let t=Pn[y];E(!0);try{if(t?.credentialService){let n=e.length>0?e:r(Te+y,``);if(n.length>0){let{response:e}=await Ke({path:{assistant_id:s},body:{service:t.credentialService,field:`api_key`,value:n,label:`${D.displayName} API Key`},throwOnError:!1});if(!e?.ok)throw Error(`Failed to store API key (HTTP ${e?.status??`?`})`)}}if(t&&(y!==_||!v)||g===`vellum`&&y!==`vellum`){let e=t?.provider??In,{response:n}=await qe({path:{assistant_id:s},body:{services:{stt:{provider:e,mode:e===`vellum`?`managed`:`your-own`}}},throwOnError:!1});if(!n?.ok)throw Error(`Failed to save configuration (HTTP ${n?.status??`?`})`)}return e.length>0&&w(!0),S(``),l.invalidateQueries({queryKey:it({path:{assistant_id:s}})}),L.success(`Speech-to-text settings saved`),!0}catch(e){return L.error(e instanceof Error?e.message:`Failed to save speech-to-text settings`),!1}finally{E(!1)}},[s,y,x,D,_,v,g,l]);(0,Q.useEffect)(()=>{a?.({hasChanges:A,saving:T,save:j})},[a,A,T,j]);let M=(0,Q.useCallback)(()=>{n(Te+y,``),w(!1),S(``)},[y]),N=C?`•••••••• (Enter a new key to replace)`:D.apiKeyPlaceholder;return(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)(z,{value:y,onChange:b,options:f.map(e=>({value:e.id,label:e.displayName})),"aria-label":`STT provider`})]}),O&&(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`API Key`}),(0,$.jsx)(P,{type:`password`,value:x,onChange:e=>S(e.target.value),placeholder:N,fullWidth:!0})]}),D.setupWarning&&(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)(k,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--system-mid-strong)]`}),(0,$.jsx)(`span`,{children:D.setupWarning})]}),!i&&D.credentialsGuide&&(0,$.jsx)(Kt,{guide:D.credentialsGuide}),y===`vellum`&&(0,$.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Transcription runs through your Vellum account.`}),(!t||C)&&(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[!t&&(0,$.jsx)(Wt,{onClick:j,disabled:!A||T}),C&&(0,$.jsx)(Gt,{onClick:M})]})]})}function Rn(){return(0,$.jsx)(Vt,{title:`Speech-to-Text`,subtitle:`Configure how your assistant transcribes speech`,children:(0,$.jsx)(Ln,{})})}function zn(){return(0,Q.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)(Ht,{}),(0,$.jsx)(hn,{}),(0,$.jsx)(yn,{}),(0,$.jsx)(xn,{}),(0,$.jsx)(wn,{}),(0,$.jsx)(Tn,{}),(0,$.jsx)(Nn,{}),(0,$.jsx)(Rn,{})]})}export{zn as AiPage};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{t as n}from"./jsx-runtime-D3ZM-ToX.js";import{n as r,r as i}from"./avatar-svg-compositor-CgyK5D40.js";import{t as a}from"./use-reduced-motion-Bv27WKCk.js";var o=e(t(),1),s=n();function c(e,t){return e+Math.random()*(t-e)}function l(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 u(e){let t=0,n=0,r=0;for(let i=0;i<e.length-1;i+=2)t+=e[i],n+=e[i+1],r++;return r>0?{x:t/r,y:n/r}:{x:0,y:0}}function d(e,t,n,r,i){let a=r*1.1,o=0;return e.replace(/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,()=>{let e=o;o++;let r=t[e],s=e%2==0,c=s?n.x:n.y,l=s?e+1:e-1,u=l>=0&&l<t.length?t[l]:c,d=s?r:u,f=Math.atan2((s?u:r)-n.y,d-n.x),p=1+(Math.sin(f*2+a)*.7+Math.sin(f*3-a*.5)*.3)*i;return(c+(r-c)*p).toFixed(3)})}function f(e,t,n){let r=l(e),i=u(r),a=[e];for(let o=1;o<t;o++)a.push(d(e,r,i,o,n));return a}function p({components:e,traits:t,size:n,isAssistantBusy:l=!1,breathe:u=!0}){let d=a(),{bodyShape:p,eyeStyle:m,color:h}=i(e,t.bodyShape,t.eyeStyle,t.color),{bodyTransform:g,eyeTransform:_}=r(p,m,e,n),v=m.sourceViewBox,y=p.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===p.id&&e.eyeStyle===m.id),T=w?w.faceCenter:p.faceCenter,E=T.x-m.eyeCenter.x*C,D=T.y-m.eyeCenter.y*C,O=b*(E+m.eyeCenter.x*C)+x,k=b*(D+m.eyeCenter.y*C)+S,A=(0,o.useMemo)(()=>l?f(p.svgPath,16,.06):[p.svgPath],[p.svgPath,l]),[j,M]=(0,o.useState)(!1),[N,P]=(0,o.useState)(0),[F,I]=(0,o.useState)(0),L=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(d||l){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))},c(3e3,7e3))}let n=t();return()=>{e=!0,clearTimeout(n)}},[d,l]),(0,o.useEffect)(()=>{if(d||l){P(0);return}let e=!1;function t(){return setTimeout(()=>{e||(P((Math.random()<.5?-1:1)*c(1,2)),setTimeout(()=>{e||(P(0),t())},200))},c(8e3,15e3))}let n=t();return()=>{e=!0,clearTimeout(n)}},[d,l]),(0,o.useEffect)(()=>{if(!l||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}},[l,d,A.length]);let R=n/2,z=n/2,B=d?`none`:l?`avatar-morph-scale 2.4s ease-in-out infinite, avatar-morph-rotate 3s ease-in-out infinite`:u?`avatar-breathe-kf 4s ease-in-out infinite`:`none`,V=l?0:N,H=j&&!l,U=A[F]??p.svgPath;return(0,s.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,s.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,s.jsx)(`path`,{d:U,fill:h.hex,transform:g,style:{transition:l?`d 0.3s ease-in-out`:`none`}})}),(0,s.jsx)(`g`,{style:{transform:H?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${O}px ${k}px`,transition:`transform 0.15s ease-in-out`},children:m.paths.map((e,t)=>(0,s.jsx)(`path`,{d:e.svgPath,fill:e.color,transform:_},t))})]})}export{p as t};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{t as n}from"./jsx-runtime-D3ZM-ToX.js";import{n as r,r as i}from"./avatar-svg-compositor-FtVPqzlC.js";import{t as a}from"./use-reduced-motion-Se97jRQ-.js";var o=e(t(),1),s=n();function c(e,t){return e+Math.random()*(t-e)}function l(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 u(e){let t=0,n=0,r=0;for(let i=0;i<e.length-1;i+=2)t+=e[i],n+=e[i+1],r++;return r>0?{x:t/r,y:n/r}:{x:0,y:0}}function d(e,t,n,r,i){let a=r*1.1,o=0;return e.replace(/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,()=>{let e=o;o++;let r=t[e],s=e%2==0,c=s?n.x:n.y,l=s?e+1:e-1,u=l>=0&&l<t.length?t[l]:c,d=s?r:u,f=Math.atan2((s?u:r)-n.y,d-n.x),p=1+(Math.sin(f*2+a)*.7+Math.sin(f*3-a*.5)*.3)*i;return(c+(r-c)*p).toFixed(3)})}function f(e,t,n){let r=l(e),i=u(r),a=[e];for(let o=1;o<t;o++)a.push(d(e,r,i,o,n));return a}function p({components:e,traits:t,size:n,isAssistantBusy:l=!1,breathe:u=!0}){let d=a(),{bodyShape:p,eyeStyle:m,color:h}=i(e,t.bodyShape,t.eyeStyle,t.color),{bodyTransform:g,eyeTransform:_}=r(p,m,e,n),v=m.sourceViewBox,y=p.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===p.id&&e.eyeStyle===m.id),T=w?w.faceCenter:p.faceCenter,E=T.x-m.eyeCenter.x*C,D=T.y-m.eyeCenter.y*C,O=b*(E+m.eyeCenter.x*C)+x,k=b*(D+m.eyeCenter.y*C)+S,A=(0,o.useMemo)(()=>l?f(p.svgPath,16,.06):[p.svgPath],[p.svgPath,l]),[j,M]=(0,o.useState)(!1),[N,P]=(0,o.useState)(0),[F,I]=(0,o.useState)(0),L=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(d||l){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))},c(3e3,7e3))}let n=t();return()=>{e=!0,clearTimeout(n)}},[d,l]),(0,o.useEffect)(()=>{if(d||l){P(0);return}let e=!1;function t(){return setTimeout(()=>{e||(P((Math.random()<.5?-1:1)*c(1,2)),setTimeout(()=>{e||(P(0),t())},200))},c(8e3,15e3))}let n=t();return()=>{e=!0,clearTimeout(n)}},[d,l]),(0,o.useEffect)(()=>{if(!l||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}},[l,d,A.length]);let R=n/2,z=n/2,B=d?`none`:l?`avatar-morph-scale 2.4s ease-in-out infinite, avatar-morph-rotate 3s ease-in-out infinite`:u?`avatar-breathe-kf 4s ease-in-out infinite`:`none`,V=l?0:N,H=j&&!l,U=A[F]??p.svgPath;return(0,s.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,s.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,s.jsx)(`path`,{d:U,fill:h.hex,transform:g,style:{transition:l?`d 0.3s ease-in-out`:`none`}})}),(0,s.jsx)(`g`,{style:{transform:H?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${O}px ${k}px`,transition:`transform 0.15s ease-in-out`},children:m.paths.map((e,t)=>(0,s.jsx)(`path`,{d:e.svgPath,fill:e.color,transform:_},t))})]})}export{p as t};