@vellumai/web 0.10.11-dev.202607221933.baa2119 → 0.10.11-dev.202607222129.31c06e5

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 (232) hide show
  1. package/dist/assets/{AnimatePresence-C8APSgIu.js → AnimatePresence-C42g9zWi.js} +3 -3
  2. package/dist/assets/{BundleConfirmPage-DNYvq-iC.js → BundleConfirmPage-3mylM4ZL.js} +1 -1
  3. package/dist/assets/{Combination-CRZ7Bg3f.js → Combination-DXrVEfaA.js} +1 -1
  4. package/dist/assets/{about-page-XGv9RAQu.js → about-page-CDdCEGZl.js} +1 -1
  5. package/dist/assets/{account-page-BTuXazxB.js → account-page-CzZuoekz.js} +1 -1
  6. package/dist/assets/{account-shell-CGkhTBfc.js → account-shell-Bw5tLjak.js} +1 -1
  7. package/dist/assets/{acp-run-detail-panel-MmrH2dwd.js → acp-run-detail-panel-DssICbn8.js} +4 -4
  8. package/dist/assets/{activity-steps-panel-CTrABRV1.js → activity-steps-panel-CeLVlAeY.js} +1 -1
  9. package/dist/assets/{add-credits-modal-F52jjB45.js → add-credits-modal-BFTdUmH6.js} +1 -1
  10. package/dist/assets/ai-page-ukSnDSJr.js +1 -0
  11. package/dist/assets/{animated-avatar-D36iTfMF.js → animated-avatar-6bSYRHZr.js} +1 -1
  12. package/dist/assets/{api-DkdVwOxT.js → api-CxAtNZ-r.js} +1 -1
  13. package/dist/assets/api-DqHVnn1b.js +1 -0
  14. package/dist/assets/{api-key-screen-Cr6tOl8S.js → api-key-screen-DD_TJKco.js} +1 -1
  15. package/dist/assets/{assistant-feature-flag-store-DuuDCLuS.js → assistant-feature-flag-store-Bh-_qc7v.js} +1 -1
  16. package/dist/assets/{assistant-status-panel-BhJkFBTi.js → assistant-status-panel-gpwr0glD.js} +1 -1
  17. package/dist/assets/auth-store-Lzg3kiaw.js +2 -0
  18. package/dist/assets/{background-task-detail-panel-_Bw4wSRH.js → background-task-detail-panel-BCXH3MXV.js} +1 -1
  19. package/dist/assets/billing-page-BZwgqWS1.js +3 -0
  20. package/dist/assets/{bookmarks-page-BhNbOYSg.js → bookmarks-page-B-PbfvFN.js} +1 -1
  21. package/dist/assets/{browser-CUpmd8oz.js → browser-Cvy3lr__.js} +2 -2
  22. package/dist/assets/{build-state-IyDyesd2.js → build-state-Bo2Ut5Js.js} +1 -1
  23. package/dist/assets/button-CW7wKp2r.js +1 -0
  24. package/dist/assets/{card-D8zyWtZh.js → card-Cf8bWrcq.js} +1 -1
  25. package/dist/assets/{channels-page-route-Ca1iWSkL.js → channels-page-route-DEwl411M.js} +2 -2
  26. package/dist/assets/chat-CNlH625o.js +1 -0
  27. package/dist/assets/chat-markdown-message-CjK8FRpm.js +2 -0
  28. package/dist/assets/{checkbox-1DytZ46G.js → checkbox-D5aqx2QZ.js} +1 -1
  29. package/dist/assets/{client-feature-flag-store-BI4z6UOY.js → client-feature-flag-store-BOcAh56y.js} +1 -1
  30. package/dist/assets/{command-palette-C18hRHXB.js → command-palette-DNujIsf0.js} +1 -1
  31. package/dist/assets/{command-palette-window-page-Bs7nyUOe.js → command-palette-window-page-mWNMMe4I.js} +1 -1
  32. package/dist/assets/{community-page-Bf7YWY7S.js → community-page-DEcDCjsQ.js} +1 -1
  33. package/dist/assets/{confirm-dialog-Zyfei9GV.js → confirm-dialog-DxBl6zcI.js} +1 -1
  34. package/dist/assets/{connect-page-BPS-ZbTc.js → connect-page-DuBhY8KD.js} +1 -1
  35. package/dist/assets/{consent-controls-a3lLNrbR.js → consent-controls-HYKKj225.js} +1 -1
  36. package/dist/assets/contacts-page-route-BS2duMoh.js +1 -0
  37. package/dist/assets/{credential-entry-page-Bo9MyWJX.js → credential-entry-page-CVOU9a8m.js} +1 -1
  38. package/dist/assets/{credentials-page-DZTud37s.js → credentials-page-DDgYexAA.js} +1 -1
  39. package/dist/assets/{debug-page-CXd4HoJ7.js → debug-page-B_us491I.js} +3 -3
  40. package/dist/assets/{deploy-dialogs-B2KiWrEe.js → deploy-dialogs-CB5PSyxZ.js} +1 -1
  41. package/dist/assets/{detail-card-BXVPDa5J.js → detail-card-CAHT277C.js} +1 -1
  42. package/dist/assets/{detail-panel-stop-button-ChKf-46C.js → detail-panel-stop-button-26G26Tqs.js} +1 -1
  43. package/dist/assets/developer-page-Dqug_k0U.js +1 -0
  44. package/dist/assets/{dictation-overlay-page-CZRUD9qJ.js → dictation-overlay-page-Rz3bqW3f.js} +1 -1
  45. package/dist/assets/{dist-Krx5xY9z.js → dist-B_4-HXSm.js} +1 -1
  46. package/dist/assets/{dist-y8XVYHzD.js → dist-D7fbUVVD.js} +1 -1
  47. package/dist/assets/{dist-CO5a5--H.js → dist-V7BKcICH.js} +1 -1
  48. package/dist/assets/{dist-Cul7ysiV.js → dist-kYT5dDAe.js} +1 -1
  49. package/dist/assets/{document-viewer-page-cHXNfErr.js → document-viewer-page-DmHPShuz.js} +1 -1
  50. package/dist/assets/{dropdown-BxYrCXBS.js → dropdown-DQozlhbb.js} +1 -1
  51. package/dist/assets/{emails-page-DgmWq23T.js → emails-page-s9TxP6jP.js} +1 -1
  52. package/dist/assets/{esm-CtFJECNT.js → esm-BGZHdoYP.js} +2 -2
  53. package/dist/assets/{esm-BvREcXsb.js → esm-CZhfXk6a.js} +2 -2
  54. package/dist/assets/{esm-CABHbixu.js → esm-Da6ZHZYd.js} +2 -2
  55. package/dist/assets/{esm-u9ag4ek2.js → esm-DcTPJLRl.js} +2 -2
  56. package/dist/assets/esm-LOX7qY3n.js +2 -0
  57. package/dist/assets/{esm-Dy0d6BZB.js → esm-hFTNI1fw.js} +2 -2
  58. package/dist/assets/feature-flag-catalog-W5kYlNH2.js +1 -0
  59. package/dist/assets/{file-editor-CmUOlTjl.js → file-editor-BdFicqX_.js} +1 -1
  60. package/dist/assets/{file-markdown-BXMDJYDD.js → file-markdown-BCMtcYze.js} +1 -1
  61. package/dist/assets/{general-page-BVWKFUsd.js → general-page-DsrG3cM2.js} +1 -1
  62. package/dist/assets/{haptics-CXVXviY1.js → haptics-ThOnpgA-.js} +2 -2
  63. package/dist/assets/{hatching-screen-DPCeV75d.js → hatching-screen-CuzULcU_.js} +1 -1
  64. package/dist/assets/home-page-route-Cc3ksf3X.js +1 -0
  65. package/dist/assets/{hosting-screen-Cb6yCWrz.js → hosting-screen-DufVMlwF.js} +1 -1
  66. package/dist/assets/identity-page-route-CUrEsO_0.js +7 -0
  67. package/dist/assets/index-BRSW3eiH.css +2 -0
  68. package/dist/assets/index-C7ix_asE.js +217 -0
  69. package/dist/assets/{input-ZpyYt_a0.js → input-D3MhHg0d.js} +1 -1
  70. package/dist/assets/{inspect-page-DMtLyfeS.js → inspect-page-BUAbv6xj.js} +4 -4
  71. package/dist/assets/{integrations-page-CB4Tc_d1.js → integrations-page-9JcrAORp.js} +1 -1
  72. package/dist/assets/{intelligence-layout-CxxCLiFO.js → intelligence-layout-DJjUScCy.js} +1 -1
  73. package/dist/assets/{library-detail-page-IhOT4Jph.js → library-detail-page-BCAZmbR6.js} +1 -1
  74. package/dist/assets/{library-page-BpHOV3jv.js → library-page-CiTHHvZ5.js} +1 -1
  75. package/dist/assets/{list-row-CFyYr-FU.js → list-row-CVw67M2Z.js} +1 -1
  76. package/dist/assets/{login-flow-xM94yfZy.js → login-flow-DYrO-od6.js} +1 -1
  77. package/dist/assets/{login-page-hM0g8LFI.js → login-page-DAFzFbRp.js} +1 -1
  78. package/dist/assets/{logout-page-CNz1LTSY.js → logout-page-CsPkQ-4I.js} +1 -1
  79. package/dist/assets/{logs-layout-DioKpdeF.js → logs-layout-DBJaWlOK.js} +1 -1
  80. package/dist/assets/memory-page-route-CpPfBU9j.js +2 -0
  81. package/dist/assets/{memory-router-playground-page-BCfQ2zWi.js → memory-router-playground-page-DfGhXcZW.js} +1 -1
  82. package/dist/assets/{menu-C9SOvGlk.js → menu-DSB0wFjY.js} +1 -1
  83. package/dist/assets/{metric-card-DDHse5we.js → metric-card-TrndloL3.js} +1 -1
  84. package/dist/assets/{misc-D0u5tzSd.js → misc-BMp6WHdm.js} +1 -1
  85. package/dist/assets/{mobile-sidebar-drawer-D9v0PpYI.js → mobile-sidebar-drawer-CVT3O8os.js} +1 -1
  86. package/dist/assets/{modal-BtcwNEBj.js → modal-D_Y2RPD5.js} +1 -1
  87. package/dist/assets/mutation-error-CSy2D6ry.js +1 -0
  88. package/dist/assets/native-anchor-ChGbTnsU.js +1 -0
  89. package/dist/assets/{native-file-CIQQYbIp.js → native-file-CKFw72Il.js} +2 -2
  90. package/dist/assets/{notice-DkAWz47A.js → notice-CvJ7MBx5.js} +1 -1
  91. package/dist/assets/{notifications-page-BS2GmBjD.js → notifications-page-DcHyVoSk.js} +1 -1
  92. package/dist/assets/{oauth-complete-page-mxqE6rCA.js → oauth-complete-page-DjKBNbdN.js} +1 -1
  93. package/dist/assets/{oauth-popup-complete-page-Cpf2kPNU.js → oauth-popup-complete-page-2KKVC5zM.js} +1 -1
  94. package/dist/assets/{page-empty-state-Co5e7lOF.js → page-empty-state-DhwyXbFT.js} +1 -1
  95. package/dist/assets/{page-shell-CAoXXReY.js → page-shell-BUD21prh.js} +1 -1
  96. package/dist/assets/{pairing-page-DNPxREzR.js → pairing-page-7NMcVDJj.js} +1 -1
  97. package/dist/assets/{panel-item-An-BBeyL.js → panel-item-D1WbMkez.js} +1 -1
  98. package/dist/assets/{personality-page-Ce_Qm2cp.js → personality-page-CwaMBzXV.js} +1 -1
  99. package/dist/assets/plans-page-Cre3Gpys.js +1 -0
  100. package/dist/assets/{platform-loopback-page-DRElW55V.js → platform-loopback-page-CIcVs3UP.js} +1 -1
  101. package/dist/assets/{plugin-detail-page-DAlLoybE.js → plugin-detail-page-R7HOcOd1.js} +1 -1
  102. package/dist/assets/{popover-Bl6742nZ.js → popover-BglbovUA.js} +1 -1
  103. package/dist/assets/privacy-page-CTQpOjs-.js +1 -0
  104. package/dist/assets/{privacy-screen-C05Qf8-3.js → privacy-screen-DgHmBdN-.js} +1 -1
  105. package/dist/assets/{progress-bar-Bqv7D4mZ.js → progress-bar-DrwFU9Ti.js} +1 -1
  106. package/dist/assets/{provider-callback-page-7lCx-5li.js → provider-callback-page-kcYxB4WF.js} +1 -1
  107. package/dist/assets/{provider-signup-page-BMAi3lou.js → provider-signup-page-D9aI4WFt.js} +1 -1
  108. package/dist/assets/{proxy-BzlH_XAe.js → proxy-DoUA9mK6.js} +1 -1
  109. package/dist/assets/{quick-input-page-LVkv3KP4.js → quick-input-page-D2Bqa3St.js} +1 -1
  110. package/dist/assets/{research-mock-page-7srDoNvK.js → research-mock-page-C6zrZtBI.js} +1 -1
  111. package/dist/assets/research-onboarding-route-AYDHEowO.js +43 -0
  112. package/dist/assets/{review-terms-screen-Dsntd0nU.js → review-terms-screen-BSa9jNvG.js} +1 -1
  113. package/dist/assets/{risk-DIRsQZCZ.js → risk-C-ZyBTAb.js} +1 -1
  114. package/dist/assets/{schedules-page-ANwXBbHw.js → schedules-page-gqD1Tbf8.js} +1 -1
  115. package/dist/assets/{select-assistant-screen-Byptt05K.js → select-assistant-screen-CFvCmydl.js} +1 -1
  116. package/dist/assets/{setting-row-BL-mNsNh.js → setting-row-DbMFAasE.js} +1 -1
  117. package/dist/assets/settings-divider-RhnS0iml.js +1 -0
  118. package/dist/assets/{settings-layout-Cm34rPj8.js → settings-layout-XYxLMpW0.js} +1 -1
  119. package/dist/assets/share-feedback-modal-Bjh3dK-n.js +1 -0
  120. package/dist/assets/{shared-ui-BQzVwlXn.js → shared-ui-CUd8SsYi.js} +1 -1
  121. package/dist/assets/{sidebar-tree-DrzE0Jyv.js → sidebar-tree-CDqUGPSK.js} +1 -1
  122. package/dist/assets/{signup-page-CCUuskkM.js → signup-page-DgYRwrxX.js} +1 -1
  123. package/dist/assets/{signup-shell-C--ZjbjA.js → signup-shell-BXZMEgBY.js} +1 -1
  124. package/dist/assets/{site-favicon-DewrgH-a.js → site-favicon-DHBOONR1.js} +1 -1
  125. package/dist/assets/{skill-detail-page-D_PcInrM.js → skill-detail-page-Dnh8ep5N.js} +1 -1
  126. package/dist/assets/{skill-detail-panel-QoaxPpCX.js → skill-detail-panel-DIn7RLCC.js} +1 -1
  127. package/dist/assets/{skills-C7LCNEFA.js → skills-BFnEzvAC.js} +1 -1
  128. package/dist/assets/{src-BNYQ8guL.js → src-BT0gNVcT.js} +2 -2
  129. package/dist/assets/{start-screen-BWJii2no.js → start-screen-CJb-0lgs.js} +1 -1
  130. package/dist/assets/{subagent-detail-panel-BsPcIQ85.js → subagent-detail-panel-V44LtNl6.js} +1 -1
  131. package/dist/assets/{subagent-store-Dr3FrKiG.js → subagent-store-CPEG25fH.js} +1 -1
  132. package/dist/assets/superpowers-page-X0kSM_TF.js +1 -0
  133. package/dist/assets/{system-events-page-BARlmsdY.js → system-events-page-Duos2ubJ.js} +1 -1
  134. package/dist/assets/{tag-B6WeUtBW.js → tag-CJyI1Y2J.js} +1 -1
  135. package/dist/assets/{theme-stage-page-eXVxLFfi.js → theme-stage-page-BU-Gj4c2.js} +1 -1
  136. package/dist/assets/tier-upgrade-resize-modal-CbRtJhAf.js +1 -0
  137. package/dist/assets/{tiptap-document-editor-CM8rLP9w.js → tiptap-document-editor-D1aVS6nK.js} +2 -2
  138. package/dist/assets/{toast-Be8FEQ-I.js → toast-zHo1wvF9.js} +1 -1
  139. package/dist/assets/{toggle-QSEiPr3k.js → toggle-Ca1aoG-l.js} +1 -1
  140. package/dist/assets/{tool-detail-panel-BLLGFD3k.js → tool-detail-panel-C-O4opDs.js} +1 -1
  141. package/dist/assets/typography-1kyF_Eu1.js +1 -0
  142. package/dist/assets/{upgrade-cancel-page-BN873SsM.js → upgrade-cancel-page-UaVSwAVr.js} +1 -1
  143. package/dist/assets/{upgrade-success-page-DhPly3fp.js → upgrade-success-page-CBs03tVb.js} +1 -1
  144. package/dist/assets/{use-assistant-identity-details-D2HgphdP.js → use-assistant-identity-details-CKel0e_r.js} +1 -1
  145. package/dist/assets/{use-edge-swipe-back-DDRGGiWx.js → use-edge-swipe-back-Dv1ShCT7.js} +1 -1
  146. package/dist/assets/use-invite-link-dialog-BfVPh6F5.js +1 -0
  147. package/dist/assets/use-is-org-ready-Ba5vxuqM.js +1 -0
  148. package/dist/assets/{use-onboarding-login-DxALcEIP.js → use-onboarding-login-DMLLDHRX.js} +1 -1
  149. package/dist/assets/{use-reduced-motion-CcGT6CHV.js → use-reduced-motion-DpK6cQN-.js} +1 -1
  150. package/dist/assets/{use-skill-actions-_fTnRmQu.js → use-skill-actions-DPXX5qWL.js} +1 -1
  151. package/dist/assets/{use-skill-detail-files-DSYS5cni.js → use-skill-detail-files-CuoCiyOy.js} +1 -1
  152. package/dist/assets/voice-page-DdjI8A76.js +1 -0
  153. package/dist/assets/{weather-forecast-display-CuVMLDZg.js → weather-forecast-display-0GtxW555.js} +1 -1
  154. package/dist/assets/{web-C_RyjuPn.js → web-BgxqKmFT.js} +1 -1
  155. package/dist/assets/{web-D1Wdlc7e.js → web-TTULY5zV.js} +1 -1
  156. package/dist/assets/{welcome-screen-BsESWnlC.js → welcome-screen-DZhajJW3.js} +1 -1
  157. package/dist/assets/{workflow-detail-panel-Di6HXfLP.js → workflow-detail-panel-Cw0kRLTK.js} +1 -1
  158. package/dist/assets/workspace-page-7j1DZUlp.js +1 -0
  159. package/dist/index.html +52 -51
  160. package/package.json +1 -1
  161. package/dist/assets/ai-page-Cnqe_MF7.js +0 -1
  162. package/dist/assets/api-zOKpkRT4.js +0 -1
  163. package/dist/assets/auth-store-yYPy4QuG.js +0 -2
  164. package/dist/assets/billing-page-GwV110rl.js +0 -3
  165. package/dist/assets/button-BQVYX8n_.js +0 -1
  166. package/dist/assets/chat-BDhsGoUo.js +0 -1
  167. package/dist/assets/chat-markdown-message-DdvPHLTI.js +0 -2
  168. package/dist/assets/contacts-page-route-DvE4cWB1.js +0 -1
  169. package/dist/assets/developer-page-DuGuTkuS.js +0 -1
  170. package/dist/assets/esm-B-GaVjH1.js +0 -2
  171. package/dist/assets/feature-flag-catalog-XCUDf5iL.js +0 -1
  172. package/dist/assets/home-page-route-GRWsjnoO.js +0 -1
  173. package/dist/assets/identity-page-route-Cekp7lb1.js +0 -7
  174. package/dist/assets/index-CtMfDVgi.css +0 -2
  175. package/dist/assets/index-D5iUyXUl.js +0 -217
  176. package/dist/assets/memory-page-route-BChNkOHd.js +0 -2
  177. package/dist/assets/mutation-error-C9sr8Rue.js +0 -1
  178. package/dist/assets/plans-page-CyFzFPMf.js +0 -1
  179. package/dist/assets/privacy-page-CKLXEI25.js +0 -1
  180. package/dist/assets/research-onboarding-route-B4MdewsW.js +0 -43
  181. package/dist/assets/settings-divider-jsYVGphg.js +0 -1
  182. package/dist/assets/share-feedback-modal-Do56cx6v.js +0 -1
  183. package/dist/assets/superpowers-page-DttFOVF5.js +0 -1
  184. package/dist/assets/tier-upgrade-resize-modal-BTi56abH.js +0 -1
  185. package/dist/assets/typography-Cqi8q9o7.js +0 -1
  186. package/dist/assets/use-invite-link-dialog-B7jUrCaY.js +0 -1
  187. package/dist/assets/use-is-org-ready-CoKP2L8w.js +0 -1
  188. package/dist/assets/voice-page-D5c_WgX8.js +0 -1
  189. package/dist/assets/workspace-page-BAX94prH.js +0 -1
  190. /package/dist/assets/{a2a-invite-VS3p3CfD.js → a2a-invite-sGxHSsPS.js} +0 -0
  191. /package/dist/assets/{app-info-Clwt3pCt.js → app-info-DDWMarAq.js} +0 -0
  192. /package/dist/assets/{app-types-XM5qKBD0.js → app-types-CR9QB0-8.js} +0 -0
  193. /package/dist/assets/{archive-redirect-page-Brvq3ES5.js → archive-redirect-page-emWqj2aZ.js} +0 -0
  194. /package/dist/assets/{billing-redirect-page-B3C0OqCH.js → billing-redirect-page-BFcz_1bP.js} +0 -0
  195. /package/dist/assets/{build.umd-Cygy7skA.js → build.umd-CW7LiBLq.js} +0 -0
  196. /package/dist/assets/{contacts-gateway-C1Oif2mf.js → contacts-gateway-C1Yhfk72.js} +0 -0
  197. /package/dist/assets/{danger-zone-redirect-page-DjzXSO6Q.js → danger-zone-redirect-page-CKqC2kf5.js} +0 -0
  198. /package/dist/assets/{definitions-yU7UnVpH.js → definitions-BUCExH-9.js} +0 -0
  199. /package/dist/assets/{definitions-BEx8SBhF.js → definitions-DpZNNWA7.js} +0 -0
  200. /package/dist/assets/{devices-redirect-page-aDimdAFs.js → devices-redirect-page-BBmdT-cM.js} +0 -0
  201. /package/dist/assets/{emoji-catalog-data-D8lRMt3A.js → emoji-catalog-data-Do3FUA8t.js} +0 -0
  202. /package/dist/assets/{environment-store-R_3zZFKL.js → environment-store-geigPfHz.js} +0 -0
  203. /package/dist/assets/{esm-BhZb3XhL.js → esm-BNfE-1QY.js} +0 -0
  204. /package/dist/assets/{format-file-size-BSrdQr7P.js → format-file-size-B9DWgk-8.js} +0 -0
  205. /package/dist/assets/{get-memory-stats-KWGzIlTp.js → get-memory-stats-CswQQLY0.js} +0 -0
  206. /package/dist/assets/{keyboard-shortcuts-redirect-page-Cwga2alP.js → keyboard-shortcuts-redirect-page-BlXA_79i.js} +0 -0
  207. /package/dist/assets/{latest-assistant-text-BKts4hYK.js → latest-assistant-text-CQ8YGbvQ.js} +0 -0
  208. /package/dist/assets/{link-click-Cw5JZikw.js → link-click-B_ZqHynd.js} +0 -0
  209. /package/dist/assets/{onboarding-step-layout-2XcmxqFN.js → onboarding-step-layout-CEt9JOpN.js} +0 -0
  210. /package/dist/assets/{password-reset-page-BJ68aXQ5.js → password-reset-page-DzLdCWhJ.js} +0 -0
  211. /package/dist/assets/{pdf-aq5Mn3GZ.js → pdf-BFBTGjwO.js} +0 -0
  212. /package/dist/assets/{plugin-attribution-6W3_ulYk.js → plugin-attribution-meUNq3wV.js} +0 -0
  213. /package/dist/assets/{plugins-page-DbqKT2CS.js → plugins-page-CeEkVNFM.js} +0 -0
  214. /package/dist/assets/{profile-metadata-CMym5q9r.js → profile-metadata-C6i7Ro9a.js} +0 -0
  215. /package/dist/assets/{provider-key-ACM9xzKs.js → provider-key-BPINSkGG.js} +0 -0
  216. /package/dist/assets/{schedules-CqDlgP0M.js → schedules-CL3Ox7Jc.js} +0 -0
  217. /package/dist/assets/{security-redirect-page-x1aDP81r.js → security-redirect-page-DYh8CKKb.js} +0 -0
  218. /package/dist/assets/{skills-page-bdypLibR.js → skills-page-CX46pcIo.js} +0 -0
  219. /package/dist/assets/{sounds-redirect-page-Blt0vV_7.js → sounds-redirect-page-DfVvXEAS.js} +0 -0
  220. /package/dist/assets/{status-badge-pill-0N6rTEBg.js → status-badge-pill-j3ke1d9o.js} +0 -0
  221. /package/dist/assets/{system-events-redirect-page-CMriM4T-.js → system-events-redirect-page-BHASNLky.js} +0 -0
  222. /package/dist/assets/{three-dot-indicator-CwchtNVS.js → three-dot-indicator-BuZzHFUJ.js} +0 -0
  223. /package/dist/assets/{usage-redirect-page-CYLunqbd.js → usage-redirect-page-1zbr09t0.js} +0 -0
  224. /package/dist/assets/{use-copy-to-clipboard-D3nUm_6n.js → use-copy-to-clipboard-Ap1ESW2j.js} +0 -0
  225. /package/dist/assets/{web-DwtkFwhF.js → web-Cfu1-OYV.js} +0 -0
  226. /package/dist/assets/{web-DE01jWtm.js → web-CpMgd0X0.js} +0 -0
  227. /package/dist/assets/{web-D2t1-p2V.js → web-D5EBYCt2.js} +0 -0
  228. /package/dist/assets/{web-DNkvgjT6.js → web-DT7Uml3n.js} +0 -0
  229. /package/dist/assets/{web-DK4RzUrM.js → web-D_z4FjB0.js} +0 -0
  230. /package/dist/assets/{web-DoV8m3zw.js → web-F3CAps0-.js} +0 -0
  231. /package/dist/assets/{xterm-DUb6-aPw.js → xterm-BSc05cUt.js} +0 -0
  232. /package/dist/assets/{xterm-addon-fit-D82wciIP.js → xterm-addon-fit-CW_qH798.js} +0 -0
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-BQVYX8n_.js";import{m as r,n as i,t as a,u as o}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{n as s}from"./QueryClientProvider-DKhXIxGb.js";import{t as c}from"./useQuery-B45lW1Kk.js";import{t as l}from"./useMutation-Lj4VunQV.js";import{t as u}from"./jsx-runtime-CVSDxk6A.js";import{t as d}from"./typography-Cqi8q9o7.js";import{t as f}from"./card-D8zyWtZh.js";import{t as p}from"./createLucideIcon-Bjb-Kuq7.js";import{t as m}from"./arrow-left-C2re-gYj.js";import{t as h}from"./panel-item-An-BBeyL.js";import{t as g}from"./link-2-B9c5ZsFq.js";import{t as _}from"./loader-circle-Ck8fq3yv.js";import{t as v}from"./pencil-CsnkG5VN.js";import{t as y}from"./plus-DZZypDUF.js";import{t as b}from"./user-plus-KuzSTM_D.js";import{t as x}from"./tag-B6WeUtBW.js";import{t as S}from"./input-ZpyYt_a0.js";import{t as C}from"./modal-BtcwNEBj.js";import{n as w}from"./toast-Be8FEQ-I.js";import{t as T}from"./confirm-dialog-Zyfei9GV.js";import{C as E}from"./sdk.gen-BR-xXIZm.js";import{Ht as ee,S as D,Ut as te,a as O,b as ne,x as k}from"./react-query.gen-DfzfX_Jv.js";import{t as re}from"./assistant-identity-store-CgJwLRMd.js";import{u as ie}from"./routes-D4ff4ONd.js";import{t as ae}from"./assistant-feature-flag-store-DuuDCLuS.js";import{Cn as A,Ha as j,J as M,Jo as N,Rs as P,Sa as F,Sn as I,Vs as L,Vt as oe,Ws as se,Yo as R,bs as z,cs as B,is as V,ns as H,w as ce}from"./index-D5iUyXUl.js";import{a as le,d as ue,i as de,n as fe,o as pe,r as me,t as he}from"./use-invite-link-dialog-B7jUrCaY.js";import{t as U}from"./detail-card-BXVPDa5J.js";import{n as ge,t as _e}from"./mobile-sidebar-drawer-D9v0PpYI.js";import{t as W}from"./mutation-error-C9sr8Rue.js";import{a as ve,i as ye,n as be,t as xe}from"./contacts-gateway-C1Oif2mf.js";var Se=p(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Ce=p(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),we=p(`git-merge`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]),G=e(t(),1),K=new Set([`slack`]);function q(e){return e.status===`verified`||e.status===`active`&&e.verifiedAt!=null}var J=u();function Y({channels:e,pendingChannelKey:t=null,onConnect:n,onDisconnect:r}){let[i,a]=(0,G.useState)(null);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:`flex flex-col`,children:e.map((e,i)=>(0,J.jsxs)(`div`,{children:[i>0?(0,J.jsx)(`div`,{className:`border-t`,style:{borderColor:`var(--border-base)`}}):null,(0,J.jsx)(X,{channel:e,pending:t===e.key,onConnect:n?()=>n(e.key):void 0,onDisconnect:r?()=>a(e.key):void 0})]},e.key))}),(0,J.jsx)(T,{open:i!==null,title:`Disconnect ${i?A(i):``}?`,message:`This clears the stored credentials for this channel. You can reconnect later.`,confirmLabel:`Disconnect`,destructive:!0,onConfirm:()=>{i&&r&&r(i),a(null)},onCancel:()=>a(null)})]})}function X({channel:e,pending:t,onConnect:r,onDisconnect:i}){let a=e.status===`ready`;return(0,J.jsxs)(`div`,{className:`flex items-center gap-3 py-4`,children:[(0,J.jsx)(I,{channelId:e.key,className:`h-4 w-4 shrink-0 text-[color:var(--content-secondary)]`}),(0,J.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:A(e.key)}),a&&e.address?(0,J.jsx)(`span`,{className:`truncate text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:e.address}):null,(0,J.jsx)(`div`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:a?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-1 h-8 px-2.5 rounded-md whitespace-nowrap select-none text-body-small-emphasised leading-none bg-[var(--content-default)] text-[var(--surface-base)]`,children:[(0,J.jsx)(P,{className:`h-3 w-3`}),`Connected`]}),(0,J.jsx)(n,{variant:`danger`,onClick:i,disabled:!i||t,children:t?`Disconnecting…`:`Disconnect`})]}):(0,J.jsx)(n,{variant:`outlined`,onClick:r,disabled:!r||t,children:`Connect`})})]})}function Z({role:e,contactType:t}){let{label:n,tone:r}=Te(e,t);return(0,J.jsx)(x,{tone:r,children:n})}function Te(e,t){switch(e){case`guardian`:return{label:`Guardian`,tone:`positive`};case`assistant`:return{label:`Assistant`,tone:`negative`};default:return t===`assistant`?{label:`Assistant`,tone:`negative`}:{label:`Human`,tone:`warning`}}}function Ee({assistantName:e,...t}){let n=ue(e);return(0,J.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,J.jsx)(U,{title:`${n} (Your Assistant)`,accessory:(0,J.jsx)(Z,{role:`assistant`}),compactAccessory:!0}),(0,J.jsx)(U,{title:`Channels`,subtitle:`Where ${n} can be reached.`,children:(0,J.jsx)(Y,{...t})})]})}function De({provenance:e}){return e.source===`global-default`?(0,J.jsx)(x,{children:`Global default`}):(0,J.jsxs)(x,{children:[`Default from`,(0,J.jsx)(n,{asChild:!0,variant:`link`,size:`compact`,className:`h-auto px-0`,children:(0,J.jsxs)(a,{to:`${ie.channels}?setup=${e.channel}`,children:[`Channels → `,A(e.channel)]})})]})}var Q=new Set([`telegram`,`phone`,`vellum`,`whatsapp`,`slack`,`email`,`platform`,`a2a`]);function Oe(e){return Q.has(e)}function ke(e,t){return e.id===`a2a`?t&&t.status!==`revoked`?{kind:`connected`}:{kind:`setup`}:t!=null&&q(t)?{kind:`verified`}:t?.status===`blocked`?{kind:`none`}:t&&t.status!==`revoked`?{kind:`unverified`}:{kind:`setup`}}function Ae(e,t,n){let r=[],i=new Set;if(e)for(let t of e)t.id===`a2a`&&!n||(r.push(t),i.add(t.id));for(let e of t)e.status===`revoked`||i.has(e.type)||e.type===`a2a`&&!n||Oe(e.type)&&(r.push({id:e.type,label:e.type.charAt(0).toUpperCase()+e.type.slice(1),subtitle:``,icon:`help-circle`,supportsVerification:!1,setupMessages:{guardian:``,contact:``}}),i.add(e.type));return r}function je({name:e,className:t,style:n}){switch(e){case`bot`:return(0,J.jsx)(L,{className:t,style:n});case`hash`:return(0,J.jsx)(z,{className:t,style:n});case`send`:return(0,J.jsx)(N,{className:t,style:n});case`phone`:return(0,J.jsx)(H,{className:t,style:n});case`mail`:return(0,J.jsx)(B,{className:t,style:n});case`message-square`:return(0,J.jsx)(V,{className:t,style:n});default:return(0,J.jsx)(Se,{className:t,style:n})}}function Me({contactChannels:e,availableChannels:t,a2aEnabled:n,channelProvenance:r,setupLabel:i=`Invite`,verifyLoading:a,verifySubject:o=`self`,onSetupChannel:s,onVerifyChannel:c,onRevokeChannel:l,onLinkAccount:u}){let[d,f]=(0,G.useState)(null),[p,m]=(0,G.useState)(null),h=new Map;for(let t of e)t.status!==`revoked`&&(h.has(t.type)||h.set(t.type,t));return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:`flex flex-col`,children:Ae(t,e,n).map((e,t)=>{let n=h.get(e.id);return(0,J.jsxs)(`div`,{children:[t>0&&(0,J.jsx)(`div`,{className:`border-t`,style:{borderColor:`var(--border-base)`}}),(0,J.jsx)(Ne,{info:e,existing:n,provenance:n&&oe(e.id)?r?.[e.id]:void 0,setupLabel:i,verifyLoading:a,onSetup:s?()=>s(e.id):void 0,onVerify:c&&e.supportsVerification?()=>f(e):void 0,onRevoke:l&&n?()=>m({channelId:n.id,channel:e}):void 0,onLinkAccount:u&&K.has(e.id)?()=>u(e.id):void 0})]},e.id)})}),d&&(0,J.jsx)(T,{open:!0,title:`Verify ${d.label}`,message:o===`contact`?`This will mark this contact's ${d.label} channel as verified. Your assistant will recognize them when they reach out from it.`:`This will mark your ${d.label} channel as verified. Your assistant will recognize you when you reach out from it.`,confirmLabel:`Verify`,onConfirm:()=>{d&&(c?.(d.id),f(null))},onCancel:()=>f(null)}),p&&(0,J.jsx)(T,{open:!0,title:`Revoke ${p.channel.label}`,message:`This will disconnect the verified channel. The contact will need to re-verify to use this channel again.`,confirmLabel:`Revoke`,destructive:!0,onConfirm:()=>{l?.(p.channelId,p.channel.id),m(null)},onCancel:()=>m(null)})]})}function Ne({info:e,existing:t,provenance:r,setupLabel:i,verifyLoading:a,onSetup:o,onVerify:s,onRevoke:c,onLinkAccount:l}){let u=ke(e,t);return(0,J.jsxs)(`div`,{className:`flex items-center gap-3 py-4`,children:[(0,J.jsx)(je,{name:e.icon,className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),(0,J.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e.label}),t?.address?(0,J.jsx)(`span`,{className:`truncate text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:t.address}):null,(0,J.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[r?(0,J.jsx)(De,{provenance:r}):null,u.kind===`connected`?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-1 h-8 px-2.5 rounded-md whitespace-nowrap select-none text-body-small-emphasised leading-none bg-[var(--content-default)] text-[var(--surface-base)]`,children:[(0,J.jsx)(P,{className:`h-3 w-3`}),`Connected`]}),c?(0,J.jsx)(n,{variant:`danger`,onClick:c,children:`Revoke`}):null]}):u.kind===`verified`?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-1 h-8 px-2.5 rounded-md whitespace-nowrap select-none text-body-small-emphasised leading-none bg-[var(--content-default)] text-[var(--surface-base)]`,children:[(0,J.jsx)(P,{className:`h-3 w-3`}),`Verified`]}),c?(0,J.jsx)(n,{variant:`danger`,onClick:c,children:`Revoke`}):null]}):u.kind===`unverified`?(0,J.jsx)(n,{variant:`outlined`,onClick:s,disabled:!s||a,children:a?`Verifying…`:`Verify`}):u.kind===`setup`?e.id===`a2a`?null:(0,J.jsxs)(J.Fragment,{children:[l?(0,J.jsxs)(n,{onClick:l,children:[(0,J.jsx)(g,{className:`h-3.5 w-3.5`}),`Link account`]}):null,(0,J.jsx)(n,{variant:`outlined`,onClick:o,disabled:!o,children:i})]}):null]})]})}function Pe(e){return(0,J.jsx)(Fe,{...e},e.contact.id)}function Fe({contact:e,savePending:t,deletePending:r,verifyPending:i,mergePending:a=!1,canMerge:o=!1,availableChannels:s,a2aEnabled:c,channelProvenance:l,onSave:u,onDelete:d,onMerge:f,onSetupChannel:p,onVerifyChannel:m,onRevokeChannel:h,onLinkAccount:g}){let _=e.displayName===`New Contact`,[v,y]=(0,G.useState)(_?``:e.displayName),[b,x]=(0,G.useState)(e.notes??``),[C,w]=(0,G.useState)(!1),E=v.trim(),ee=b.trim(),D=_?``:e.displayName,te=e.notes??``,O=E!==D||ee!==te,ne=E.length>0&&O&&!t&&!r,k=_&&e.channels.length===0&&e.interactionCount===0,re=E||e.displayName,ie=`${e.interactionCount} interaction${e.interactionCount===1?``:`s`}`;return(0,J.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,J.jsx)(U,{title:re,accessory:(0,J.jsx)(Z,{role:e.role,contactType:e.contactType}),compactAccessory:!0,subtitle:ie,children:(0,J.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,J.jsx)(S,{label:`Name`,type:`text`,value:v,onChange:e=>y(e.target.value),placeholder:`Give this human a name`,autoFocus:_,disabled:t||r,fullWidth:!0}),(0,J.jsx)(S,{label:`Notes`,type:`text`,value:b,onChange:e=>x(e.target.value),placeholder:`Optional notes about the human which AI will take into account`,disabled:t||r,fullWidth:!0}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(n,{type:`button`,onClick:()=>u({displayName:E,notes:ee}),disabled:!ne,children:t?`Saving…`:`Save`}),f?(0,J.jsx)(n,{type:`button`,variant:`outlined`,onClick:f,disabled:!o||k||O||a||t||r,title:o?k?`Save this contact before merging`:O?`Save your changes before merging`:void 0:`No other contacts available to merge`,children:a?`Merging…`:`Merge…`}):null,(0,J.jsx)(n,{type:`button`,variant:`danger`,onClick:()=>{k?d():w(!0)},disabled:r,children:r?`Deleting…`:`Delete Contact`})]})]})}),(0,J.jsx)(U,{title:`Linked accounts`,subtitle:`Where the assistant recognizes this contact. Link accounts you know, invite the ones you don't.`,children:(0,J.jsx)(Me,{contactChannels:e.channels,availableChannels:s,a2aEnabled:c,channelProvenance:l,verifyLoading:i,verifySubject:`contact`,onSetupChannel:p,onVerifyChannel:m,onRevokeChannel:h,onLinkAccount:g})}),(0,J.jsx)(T,{open:C,title:`Delete ${e.displayName}?`,message:`This will permanently delete this contact and all their channels. This action cannot be undone.`,confirmLabel:`Delete`,destructive:!0,onConfirm:()=>{w(!1),d()},onCancel:()=>w(!1)})]})}function Ie(e){return(0,J.jsx)(Le,{...e},`${e.survivor.id}:${e.open?`open`:`closed`}`)}function Le({open:e,survivor:t,candidates:r,pending:i,errorMessage:a,onMerge:o,onClose:s}){let[c,l]=(0,G.useState)(``),[u,f]=(0,G.useState)(null);(0,G.useEffect)(()=>{u&&!r.some(e=>e.id===u)&&f(null)},[r,u]);let p=(0,G.useMemo)(()=>{let e=c.trim().toLowerCase();return e?r.filter(t=>t.displayName.toLowerCase().includes(e)):r},[r,c]),h=u?r.find(e=>e.id===u)??null:null,g=He(t);return(0,J.jsx)(C.Root,{open:e,onOpenChange:e=>{!e&&!i&&s()},children:(0,J.jsxs)(C.Content,{size:`md`,children:[(0,J.jsxs)(C.Header,{children:[(0,J.jsx)(C.Title,{icon:we,children:h?`Merge "${h.displayName}" into ${g}?`:`Merge another contact into ${g}`}),(0,J.jsx)(C.Description,{children:h?`Channels and notes from the merged contact will move over. The merged contact will be deleted.`:`The contact you pick will be deleted. Its channels and notes will be added to this one.`})]}),(0,J.jsxs)(C.Body,{className:`flex flex-col gap-3`,children:[h?(0,J.jsx)(Be,{survivor:t,donor:h}):r.length===0?(0,J.jsx)(Ve,{}):(0,J.jsx)(Re,{search:c,onSearch:l,candidates:p,onPick:f}),a?(0,J.jsx)(d,{as:`p`,variant:`body-small-default`,className:`text-(--system-negative-strong)`,role:`alert`,children:a}):null]}),(0,J.jsx)(C.Footer,{children:h?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(n,{variant:`outlined`,onClick:()=>f(null),disabled:i,leftIcon:(0,J.jsx)(m,{"aria-hidden":!0}),children:`Back`}),(0,J.jsx)(n,{variant:`danger`,onClick:()=>o(h.id),disabled:i,children:i?`Merging…`:`Merge`})]}):(0,J.jsx)(n,{variant:`outlined`,onClick:s,disabled:i,children:`Cancel`})})]})})}function Re({search:e,onSearch:t,candidates:n,onPick:r}){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(S,{type:`text`,value:e,onChange:e=>t(e.target.value),placeholder:`Search contacts`,leftIcon:(0,J.jsx)(R,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),fullWidth:!0}),(0,J.jsx)(`div`,{className:`flex max-h-[320px] min-h-[120px] flex-col gap-1 overflow-y-auto`,role:`listbox`,"aria-label":`Select a contact to merge`,children:n.length===0?(0,J.jsx)(d,{as:`p`,variant:`body-small-default`,className:`px-3 py-4 text-center text-(--content-tertiary)`,children:`No matching contacts`}):n.map(e=>(0,J.jsx)(ze,{contact:e,onPick:()=>r(e.id)},e.id))})]})}function ze({contact:e,onPick:t}){let n=Ke(e).join(` | `)||void 0;return(0,J.jsx)(h,{asChild:!0,label:``,children:(0,J.jsx)(`button`,{type:`button`,onClick:t,role:`option`,"aria-selected":`false`,className:`flex h-auto w-full items-center gap-2 rounded-[6px] px-[8px] py-2 text-left`,children:(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(`span`,{className:`truncate text-body-medium-default`,children:e.displayName}),n?(0,J.jsx)(`span`,{className:`truncate text-body-small-default text-(--content-tertiary)`,children:n}):null]})})})}function Be({survivor:e,donor:t}){let n=He(e),{moved:r,duplicates:i}=Ge(e,t);return(0,J.jsxs)(`ul`,{className:`flex flex-col gap-2 text-body-medium-lighter text-(--content-secondary)`,children:[(0,J.jsxs)(`li`,{children:[(0,J.jsxs)(`span`,{className:`text-(--content-default)`,children:[`“`,t.displayName,`”`]}),` `,`will be deleted.`]}),(0,J.jsx)(`li`,{children:r.length===0?`No new channels will move to ${n}.`:`${r.length} channel${r.length===1?``:`s`} will move to ${n}: ${r.map(e=>We(e.type)).join(`, `)}.`}),i.length>0?(0,J.jsxs)(`li`,{className:`text-(--content-tertiary)`,children:[i.length,` duplicate channel`,i.length===1?``:`s`,` already on `,n,` `,`(skipped).`]}):null,t.notes?(0,J.jsx)(`li`,{children:`Notes from the merged contact will be appended.`}):null,(0,J.jsx)(`li`,{className:`text-(--content-tertiary)`,children:`This cannot be undone.`})]})}function Ve(){return(0,J.jsx)(d,{as:`p`,variant:`body-medium-lighter`,className:`px-3 py-6 text-center text-(--content-tertiary)`,children:`No other contacts available to merge.`})}function He(e){return e.role===`guardian`?!e.displayName||e.displayName.startsWith(`vellum-principal-`)?`you`:`${e.displayName} (you)`:e.displayName||`this contact`}var Ue={slack:`Slack`,telegram:`Telegram`,phone:`Phone`,email:`Email`,whatsapp:`WhatsApp`};function We(e){return Ue[e.toLowerCase()]??e}function Ge(e,t){let n=[],r=[];for(let i of t.channels)i.status!==`revoked`&&(e.channels.some(e=>e.type===i.type&&e.address.toLowerCase()===i.address.toLowerCase())?r.push(i):n.push(i));return{moved:n,duplicates:r}}function Ke(e){let t=new Set,n=[];for(let r of e.channels){if(r.status===`revoked`)continue;let e=r.type.toLowerCase();t.has(e)||(t.add(e),n.push(Ue[e]??r.type))}return n}function qe({loading:e,guardian:t,assistantName:r,regularContacts:i,selection:a,onSelect:o,onAddContact:s,addingContact:c=!1}){let[l,u]=(0,G.useState)(``),d=l.trim()?i.filter(e=>e.displayName.toLowerCase().includes(l.trim().toLowerCase())):i;return(0,J.jsx)(f.Root,{className:`flex h-full flex-col overflow-hidden`,children:(0,J.jsxs)(f.Body,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsx)(`h2`,{className:`text-title-medium`,style:{color:`var(--content-default)`},children:`Entries`}),(0,J.jsx)(n,{type:`button`,variant:`ghost`,iconOnly:c?(0,J.jsx)(_,{className:`animate-spin`,"aria-hidden":!0}):(0,J.jsx)(y,{"aria-hidden":!0}),onClick:s,disabled:c,"aria-label":`Add contact`,tintColor:`var(--content-secondary)`})]}),(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[t?(0,J.jsx)($,{name:t.displayName?`${t.displayName} (You)`:`You`,role:t.role,channelTypes:t.channelTypes,selected:a?.kind===`contact`&&a.contactId===t.id,onClick:()=>o({kind:`contact`,contactId:t.id}),trailingIcon:`pencil`}):null,(0,J.jsx)($,{name:r?.trim()||`Your Assistant`,role:`assistant`,selected:a?.kind===`assistant`,onClick:()=>o({kind:`assistant`}),trailingIcon:`more`})]}),(0,J.jsx)(`div`,{className:`border-t`,style:{borderColor:`var(--border-base)`}}),i.length>0?(0,J.jsx)(S,{type:`text`,value:l,onChange:e=>u(e.target.value),placeholder:`Search Contacts`,leftIcon:(0,J.jsx)(R,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),fullWidth:!0}):null,i.length>0?(0,J.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto flex flex-col gap-1`,children:[d.map(e=>(0,J.jsx)($,{name:e.displayName,role:e.role,contactType:e.contactType,channelTypes:e.channelTypes,verified:e.verified,selected:a?.kind===`contact`&&a.contactId===e.id,onClick:()=>o({kind:`contact`,contactId:e.id}),trailingIcon:`more`},e.id)),d.length===0?(0,J.jsx)(`p`,{className:`px-3 py-4 text-center text-body-small-default`,style:{color:`var(--content-tertiary)`},children:`No matching contacts`}):null]}):e?null:(0,J.jsx)(n,{type:`button`,variant:`ghost`,onClick:s,disabled:c,tintColor:`var(--primary-base)`,leftIcon:c?(0,J.jsx)(_,{className:`animate-spin`,"aria-hidden":!0}):(0,J.jsx)(b,{"aria-hidden":!0}),children:`Add Contact`})]})})}function $({name:e,role:t,contactType:n,channelTypes:r,selected:i,onClick:a,trailingIcon:o,verified:s}){let c=r&&r.length>0?r.join(` | `):void 0;return(0,J.jsx)(h,{asChild:!0,active:i,label:``,trailingAction:o===`pencil`?(0,J.jsx)(v,{className:`h-3.5 w-3.5`,"aria-hidden":!0}):o===`more`?(0,J.jsx)(Ce,{className:`h-3.5 w-3.5`,"aria-hidden":!0}):void 0,children:(0,J.jsxs)(`button`,{type:`button`,onClick:a,className:`flex h-auto w-full items-center gap-2 rounded-[6px] px-[8px] py-2 text-left`,children:[(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(`span`,{className:`truncate text-body-medium-default`,children:e}),c?(0,J.jsx)(`span`,{className:`truncate text-body-small-default`,style:{color:`var(--content-tertiary)`},children:c}):null]}),(0,J.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1`,children:[s===void 0?null:(0,J.jsx)(x,{tone:s?`positive`:`neutral`,children:s?`Verified`:`Unverified`}),(0,J.jsx)(Z,{role:t,contactType:n})]})]})})}function Je(e){return(0,J.jsx)(Ye,{...e},e.contact.id)}function Ye({contact:e,savePending:t,verifyPending:r,mergePending:i=!1,canMerge:a=!1,availableChannels:o,a2aEnabled:s,onSave:c,onMerge:l,onSetupChannel:u,onVerifyChannel:d,onRevokeChannel:f,onGenerateInviteLink:p}){let m=e.displayName.startsWith(`vellum-principal-`),h=m?``:e.displayName,[g,_]=(0,G.useState)(h),[v,y]=(0,G.useState)(e.notes??``),b=g.trim(),x=v.trim(),C=b!==h.trim()||x!==(e.notes??``).trim(),w=C&&!t,T=`${e.interactionCount} interaction${e.interactionCount===1?``:`s`}`;return(0,J.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,J.jsx)(U,{title:m?`You`:`${e.displayName} (You)`,accessory:(0,J.jsx)(Z,{role:`guardian`}),compactAccessory:!0,subtitle:T,children:(0,J.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,J.jsx)(S,{label:`Name`,type:`text`,value:g,onChange:e=>_(e.target.value),placeholder:`Your name`,disabled:t,fullWidth:!0}),(0,J.jsx)(S,{label:`Notes`,type:`text`,value:v,onChange:e=>y(e.target.value),placeholder:`Notes about yourself which AI will take into account`,disabled:t,fullWidth:!0}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(n,{variant:`primary`,onClick:()=>c({displayName:b||e.displayName,notes:x}),disabled:!w,children:t?`Saving…`:`Save`}),l?(0,J.jsx)(n,{variant:`outlined`,onClick:l,disabled:!a||C||i||t,title:a?C?`Save your changes before merging`:void 0:`No other contacts available to merge`,children:i?`Merging…`:`Merge…`}):null]})]})}),(0,J.jsx)(U,{title:`Channels`,subtitle:`Once verified, your assistant will recognize you when you message from these channels.`,children:(0,J.jsx)(Me,{contactChannels:e.channels,availableChannels:o,a2aEnabled:s,setupLabel:`Verify me`,verifyLoading:r,onSetupChannel:u,onVerifyChannel:d,onRevokeChannel:f})}),p?(0,J.jsx)(le,{onClick:p}):null]})}function Xe(e,t){let n=t.trim().toLowerCase().replace(/^@/,``);return n===``?e:e.filter(e=>e.displayName.toLowerCase().includes(n)||e.username.toLowerCase().includes(n))}function Ze(e){let t=e.trim().split(/\s+/).filter(Boolean);return`${t[0]?.[0]??`?`}${t.length>1?t[t.length-1]?.[0]??``:``}`.toUpperCase()}function Qe({open:e,channelLabel:t,contactName:r,accounts:i,loading:a,errorMessage:o,pendingAccountId:s,onPick:c,onClose:l,onInviteInstead:u}){let[d,f]=(0,G.useState)(``);(0,G.useEffect)(()=>{e&&f(``)},[e]);let p=(0,G.useMemo)(()=>Xe(i??[],d),[i,d]),m=s!=null;return(0,J.jsx)(C.Root,{open:e,onOpenChange:e=>!e&&l(),children:(0,J.jsxs)(C.Content,{size:`sm`,children:[(0,J.jsxs)(C.Header,{children:[(0,J.jsxs)(C.Title,{children:[`Link `,t,` account`]}),(0,J.jsxs)(C.Description,{children:[`Search your `,t,` workspace and pick`,` `,(0,J.jsx)(`span`,{className:`text-[color:var(--content-default)]`,children:r}),`’s account.`]})]}),(0,J.jsxs)(C.Body,{className:`flex flex-col gap-3`,children:[(0,J.jsx)(S,{type:`search`,value:d,onChange:e=>f(e.target.value),placeholder:`Search by name or @handle`,"aria-label":`Search ${t} workspace accounts`,leftIcon:(0,J.jsx)(R,{className:`h-4 w-4`}),fullWidth:!0}),o?(0,J.jsx)(`p`,{className:`text-body-small-default text-[color:var(--content-negative)]`,children:o}):null,(0,J.jsx)(`div`,{className:`max-h-80 overflow-y-auto`,children:a?(0,J.jsx)(`p`,{className:`py-4 text-center text-body-small-default text-[color:var(--content-tertiary)]`,children:`Loading workspace members…`}):p.length===0?(0,J.jsx)(`p`,{className:`py-4 text-center text-body-small-default text-[color:var(--content-tertiary)]`,children:(i?.length??0)===0?`No workspace members found.`:`No members match.`}):(0,J.jsx)(`ul`,{className:`flex flex-col`,children:p.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(`button`,{type:`button`,onClick:()=>c(e),disabled:m,className:`flex w-full cursor-pointer items-center gap-3 rounded-md px-2 py-2 text-left transition-colors hover:bg-[var(--surface-overlay)] disabled:cursor-not-allowed disabled:opacity-60`,children:[e.imageUrl?(0,J.jsx)(`img`,{src:e.imageUrl,alt:``,className:`h-8 w-8 shrink-0 rounded-full`}):(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[var(--tag-bg-neutral)] text-body-small-emphasised text-[color:var(--content-secondary)]`,children:Ze(e.displayName)}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,J.jsx)(`span`,{className:`truncate text-body-medium-default text-[color:var(--content-default)]`,children:e.displayName}),(0,J.jsxs)(`span`,{className:`truncate text-body-small-default text-[color:var(--content-tertiary)]`,children:[`@`,e.username]})]}),s===e.id?(0,J.jsx)(`span`,{className:`ml-auto shrink-0 text-body-small-default text-[color:var(--content-tertiary)]`,children:`Linking…`}):null]})},e.id))})})]}),(0,J.jsxs)(C.Footer,{className:`items-center justify-between gap-3 border-t border-[var(--border-base)]`,children:[(0,J.jsxs)(`p`,{className:`text-body-small-default text-[color:var(--content-tertiary)]`,children:[`Picking marks this account as`,` `,(0,J.jsx)(`span`,{className:`text-[color:var(--content-secondary)]`,children:`guardian-linked`}),` `,`— you vouch for the identity, no handshake needed.`]}),u?(0,J.jsxs)(n,{variant:`link`,className:`shrink-0`,onClick:u,disabled:m,children:[`Or send an invite instead`,(0,J.jsx)(se,{className:`h-3.5 w-3.5`})]}):null]})]})})}function $e(e){let t={};for(let n of e)oe(n.channelType)&&(t[n.channelType]=n.policy===`trusted_contacts`?{source:`global-default`}:{source:`channel-default`,channel:n.channelType});return t}function et(e){return $e(de(e))}function tt(e){let t=ae.use.channelTrustFloors(),n=me(),r=t&&n,i=c({...F({path:{assistant_id:e}}),enabled:r,select:et});return r?i.data:void 0}function nt({assistantId:e,channelType:t,contact:n,onLinked:r}){let[i,a]=(0,G.useState)(!1),o=l({mutationFn:n=>be(e,n.contact,{type:t,address:n.account.id}),onSuccess:(e,t)=>{a(!1),w.success(`Linked as @${t.account.username}`),r()}}),s=(0,G.useCallback)(()=>{o.reset(),a(!0)},[o]),c=(0,G.useCallback)(()=>{o.isPending||(o.reset(),a(!1))},[o]),u=(0,G.useCallback)(e=>{!n||o.isPending||o.mutate({contact:n,account:e})},[n,o]);return{channelType:t,dialogOpen:i,open:s,close:c,linkErrorMessage:o.error instanceof Error?o.error.message:o.error?`Failed to link account`:null,pendingAccountId:o.isPending?o.variables.account.id:null,pick:u}}var rt=[{id:`slack`,label:`Slack`,subtitle:`Message your assistant from Slack`,icon:`hash`,supportsVerification:!0,setupMessages:{guardian:`I'd like to verify my identity as your guardian on Slack. Can you help me set that up?`,contact:`I'd like to verify a contact's Slack identity. Can you walk me through it?`}},{id:`telegram`,label:`Telegram`,subtitle:`Message your assistant from Telegram`,icon:`send`,supportsVerification:!0,setupMessages:{guardian:`I'd like to verify my identity as your guardian on Telegram. Can you help me set that up?`,contact:`I'd like to verify a contact's Telegram identity. Can you walk me through it?`}},{id:`phone`,label:`Phone Calling`,subtitle:`Call or text your assistant via phone`,icon:`phone`,supportsVerification:!0,setupMessages:{guardian:`I'd like to verify my identity as your guardian for phone calls. Can you help me set that up?`,contact:`I'd like to verify a contact's phone number. Can you help me set that up?`}}],it=[];function at({assistantId:e,onStartSetupConversation:t}){let n=ae.use.a2aChannel(),a=re.use.name(),o=s(),[u]=r(),d=u.get(`setup`),f=d&&oe(d)?d:null,[p,m]=(0,G.useState)({kind:`assistant`}),h=he(e),[g,_]=(0,G.useState)(!1),[v,y]=(0,G.useState)(!1),b=ue(a),x=(0,G.useMemo)(()=>({path:{assistant_id:e}}),[e]),S=k(x),C=c({...ne(x),enabled:!!e,select:e=>e.contacts}),T=fe({assistantId:e,onStartSetupConversation:t}),A=tt(e),j=c({...O({path:{assistant_id:e}}),enabled:!!e,queryFn:async({signal:t})=>{let{data:n,error:r,response:i}=await E({path:{assistant_id:e},signal:t,throwOnError:!1});if(!i||i.status===404)return{channels:rt};if(!i.ok)throw r??Error(`Failed to fetch channel availability`);return n},select:e=>e.channels}).data??it,M=C.data,N=(0,G.useMemo)(()=>M?.find(e=>e.role===`guardian`)??null,[M]),P=(0,G.useMemo)(()=>M?.filter(e=>e.role!==`guardian`)??[],[M]),F=(0,G.useMemo)(()=>p.kind===`contact`?M?.find(e=>e.id===p.contactId)??null:null,[M,p]),I=(0,G.useMemo)(()=>!M||!F?[]:M.filter(e=>e.id!==F.id&&e.role!==`guardian`),[M,F]),L=I.length>0,se=(0,G.useRef)(!!f);(0,G.useEffect)(()=>{se.current||N&&(se.current=!0,m({kind:`contact`,contactId:N.id}))},[N]);let R=(0,G.useCallback)(()=>o.invalidateQueries({queryKey:S}),[o,S]),z=l({mutationFn:()=>ye(e,{displayName:`New Contact`}),onMutate:async()=>{await o.cancelQueries({queryKey:S})},onSuccess:e=>{D(o,x,t=>t?{...t,contacts:[...t.contacts,e]}:void 0),m({kind:`contact`,contactId:e.id})},onError:W(`Failed to create contact`),onSettled:()=>R()}),B=l({mutationFn:t=>xe(e,t),onSuccess:(e,t)=>{D(o,x,e=>e?{...e,contacts:e.contacts.filter(e=>e.id!==t)}:void 0),m({kind:`assistant`})},onError:W(`Failed to delete contact`),onSettled:()=>R()}),V=l({mutationFn:({contactId:t,patch:n})=>ye(e,{id:t,displayName:n.displayName,notes:n.notes}),onSuccess:e=>{D(o,x,t=>t?{...t,contacts:t.contacts.map(t=>t.id===e.id?e:t)}:void 0)},onError:W(`Failed to save contact`),onSettled:()=>R()}),H=te({onMutate:async()=>{await o.cancelQueries({queryKey:S})},onSuccess:(e,t)=>{let n=e.contact,r=t.body.mergeId;n&&(D(o,x,e=>e?{...e,contacts:e.contacts.filter(e=>e.id!==r).map(e=>e.id===n.id?n:e)}:void 0),m({kind:`contact`,contactId:n.id})),y(!1),w.success(`Contacts merged`)},onSettled:()=>R()}),le=(0,G.useCallback)(e=>{m(e),_(!1),y(!1),H.reset()},[H]),de=(0,G.useCallback)(()=>{H.reset(),y(!0)},[H]),me=(0,G.useCallback)(()=>{H.isPending||(y(!1),H.reset())},[H]),U=ee({onSuccess:()=>R()}),be=(0,G.useCallback)((t,n)=>{U.mutate({path:{assistant_id:e,contactChannelId:t},body:{status:`revoked`}})},[U,e]),Se=(0,G.useCallback)(()=>{z.isPending||z.mutate()},[z]),Ce=(0,G.useCallback)(e=>{if(!t)return;let n=j.find(t=>t.id===e)?.setupMessages.contact;n&&t(n)},[j,t]),we=(0,G.useCallback)(e=>{if(!t)return;let n=j.find(t=>t.id===e)?.setupMessages.guardian;n&&t(n)},[j,t]),K=l({mutationFn:t=>ve(e,t.channelId),onSuccess:()=>R(),onError:W(`Failed to verify channel`)}),q=(0,G.useCallback)(e=>{if(!F)return;let t=F.channels.find(t=>t.type===e&&t.status!==`revoked`);t&&K.mutate({channelId:t.id})},[F,K]),Y=nt({assistantId:e,channelType:`slack`,contact:F?{id:F.id,displayName:F.displayName}:null,onLinked:R}),X=c({...ce(e),enabled:!!e&&Y.dialogOpen,select:e=>e.users}),Z=T.channels.some(e=>e.key===`slack`&&e.status===`ready`),Te=(0,G.useCallback)(e=>{e===Y.channelType&&Y.open()},[Y]),De=B.isPending?B.variables:null,Q=(0,G.useMemo)(()=>F?V.isPending&&V.variables?.contactId===F.id?{...F,displayName:V.variables.patch.displayName,notes:V.variables.patch.notes}:F:null,[F,V.isPending,V.variables]);if(f)return(0,J.jsx)(i,{to:`${ie.channels}?setup=${f}`,replace:!0});let Oe={loading:C.isLoading,assistantName:b,guardian:N?{id:N.id,displayName:N.displayName.startsWith(`vellum-principal-`)?``:N.displayName,role:N.role,channelTypes:lt(N.channels,n)}:null,regularContacts:P.filter(e=>e.id!==De).map(e=>({id:e.id,displayName:e.displayName,role:e.role,contactType:e.contactType,channelTypes:lt(e.channels,n),verified:ct(e.channels)})),selection:p,onAddContact:Se,addingContact:z.isPending};return(0,J.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-hidden sm:flex-row sm:gap-6`,children:[(0,J.jsx)(`div`,{className:`flex items-center sm:hidden`,children:(0,J.jsx)(ge,{onClick:()=>_(!0)})}),(0,J.jsx)(_e,{open:g,onClose:()=>_(!1),title:`Contacts`,children:(0,J.jsx)(qe,{...Oe,onSelect:le})}),(0,J.jsx)(`aside`,{className:`hidden min-h-0 w-[320px] shrink-0 overflow-y-auto self-stretch sm:block`,children:(0,J.jsx)(qe,{...Oe,onSelect:le})}),(0,J.jsx)(`section`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto`,children:p.kind===`assistant`||p.kind===`contact`&&p.contactId===De?(0,J.jsx)(Ee,{assistantName:b,channels:T.channels,pendingChannelKey:T.pendingChannelKey,onConnect:T.onSetup,onDisconnect:T.onDisconnect}):Q?Q.role===`guardian`?(0,J.jsx)(Je,{contact:Q,savePending:V.isPending,verifyPending:K.isPending,mergePending:H.isPending,canMerge:L,availableChannels:j,a2aEnabled:n,onSave:e=>{V.mutate({contactId:Q.id,patch:e})},onMerge:de,onSetupChannel:t?we:void 0,onVerifyChannel:q,onRevokeChannel:be,onGenerateInviteLink:n?h.open:void 0}):(0,J.jsx)(Pe,{contact:Q,savePending:V.isPending,deletePending:B.isPending,verifyPending:K.isPending,mergePending:H.isPending,canMerge:L,availableChannels:j,a2aEnabled:n,channelProvenance:A,onSave:e=>{V.mutate({contactId:Q.id,patch:e})},onDelete:()=>{B.mutate(Q.id)},onMerge:de,onSetupChannel:t?Ce:void 0,onVerifyChannel:q,onRevokeChannel:be,onLinkAccount:Z?Te:void 0}):(0,J.jsx)(ot,{})}),F?(0,J.jsx)(Ie,{open:v,survivor:F,candidates:I,pending:H.isPending,errorMessage:H.error instanceof Error?H.error.message:H.error?`Failed to merge contacts`:null,onMerge:t=>H.mutate({path:{assistant_id:e},body:{keepId:F.id,mergeId:t}}),onClose:me}):null,(0,J.jsx)(Qe,{open:Y.dialogOpen,channelLabel:`Slack`,contactName:F?.displayName??``,accounts:X.data,loading:X.isLoading,errorMessage:X.isError?`Couldn’t load the workspace roster. Check the Slack connection and try again.`:Y.linkErrorMessage,pendingAccountId:Y.pendingAccountId,onPick:Y.pick,onClose:Y.close,onInviteInstead:t?()=>{Y.close(),Ce(Y.channelType)}:void 0}),(0,J.jsx)(pe,{open:h.isOpen,assistantId:e,onClose:h.close})]})}function ot(){return(0,J.jsx)(`div`,{className:`flex h-full items-center justify-center py-16`,children:(0,J.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`Select a contact`})})}var st={slack:`Slack`,telegram:`Telegram`,phone:`Phone`,email:`Email`,whatsapp:`WhatsApp`,a2a:`A2A`};function ct(e){return e.some(e=>e.status!==`revoked`&&(e.type===`a2a`||q(e)))}function lt(e,t){let n=new Set,r=[];for(let i of e){if(i.status===`revoked`)continue;let e=i.type.toLowerCase();n.has(e)||e===`a2a`&&!t||(n.add(e),r.push(st[e]??i.type))}return r}function ut(){let e=o(),t=M();return(0,J.jsx)(at,{assistantId:t,onStartSetupConversation:t=>{j(e,{prompt:t})}},t)}export{ut as ContactsPageRoute};
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{a as t,m as n,o as r,t as i}from"./capture-error-anSemq95.js";import{t as a}from"./react-DJZBPgpf.js";import{P as o,t as s}from"./button-BQVYX8n_.js";import{m as c,n as l,u}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{n as d}from"./QueryClientProvider-DKhXIxGb.js";import{t as f}from"./useQuery-B45lW1Kk.js";import{t as p}from"./jsx-runtime-CVSDxk6A.js";import{t as m}from"./createLucideIcon-Bjb-Kuq7.js";import{t as h}from"./bug-BMI_6ziD.js";import{t as g}from"./info-CqgkBvyS.js";import{t as _}from"./loader-circle-Ck8fq3yv.js";import{t as ee}from"./triangle-alert-CnjNKhNx.js";import"./src-BNYQ8guL.js";import{t as v}from"./tag-B6WeUtBW.js";import{t as y}from"./toggle-QSEiPr3k.js";import{n as b}from"./toast-Be8FEQ-I.js";import{t as te}from"./confirm-dialog-Zyfei9GV.js";import{t as x}from"./dropdown-BxYrCXBS.js";import{C as S,f as C}from"./local-mode-Dydd46cS.js";import{Bt as ne,Qt as re,X as ie,Y as ae,Zt as oe,c as w,u as T}from"./react-query.gen-DfzfX_Jv.js";import{D as E}from"./auth-store-yYPy4QuG.js";import{t as D}from"./client.gen-DVfIRXUZ.js";import{c as se,o as ce}from"./api-DkdVwOxT.js";import{u as O}from"./routes-D4ff4ONd.js";import{t as k}from"./use-is-org-ready-CoKP2L8w.js";import{a as le,l as A,o as j}from"./feature-flag-catalog-XCUDf5iL.js";import{t as M}from"./client-feature-flag-store-BI4z6UOY.js";import{t as N}from"./assistant-feature-flag-store-DuuDCLuS.js";import{t as P}from"./misc-D0u5tzSd.js";import{Fs as F,J as I,Yo as L,pi as R,ri as z}from"./index-D5iUyXUl.js";import{t as B}from"./detail-card-BXVPDa5J.js";import{t as V}from"./environment-store-R_3zZFKL.js";import{n as H}from"./assistant-status-panel-BhJkFBTi.js";var U=m(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),W=m(`timer`,[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`,key:`14vaq8`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`,key:`17fdiu`}],[`circle`,{cx:`12`,cy:`14`,r:`8`,key:`1e1u0o`}]]),G=e(a(),1),K=p();function ue({memoryEnabled:e}){let t=I(),n=d(),{data:r}=f({...ae({path:{assistant_id:t}}),staleTime:3e4}),a=e=>{ie(n,{path:{assistant_id:t}},t=>t&&{...t,status:e?`running`:`not_running`})},o=oe({onSuccess:()=>a(!0)}),s=re({onSuccess:()=>a(!1)}),c=async e=>{try{e?(await o.mutateAsync({path:{assistant_id:t}}),b.success(`Background worker started.`)):(await s.mutateAsync({path:{assistant_id:t}}),b.success(`Background worker stopped.`))}catch(e){i(e,{context:`settings-memory-worker-toggle`}),b.error(`Failed to update background worker.`)}};if(!r)return null;let l=o.isPending||s.isPending;return(0,K.jsxs)(`div`,{className:`flex flex-row items-start justify-between gap-4 border-t border-[var(--border-subtle)] pt-4`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,K.jsx)(`h3`,{className:`text-body-medium-default text-[var(--content-emphasised)]`,children:`Background worker`}),(0,K.jsx)(`p`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:`Run memory consolidation in a dedicated background process. It starts automatically; stop it to pause background memory processing until the next restart.`})]}),(0,K.jsx)(y,{checked:r.status===`running`,onChange:e=>void c(e),"aria-label":`Enable background memory worker`,disabled:!e||l})]})}function de(){let{healthz:e}=H(),t=I(),n=d(),r=e?.capabilities?.memoryOptOut===!0,{data:a}=f({...w({path:{assistant_id:t}}),staleTime:3e4,enabled:r}),o=ne({onSuccess:e=>{T(n,{path:{assistant_id:t}},e)}}),s=a?.memory?.enabled!==!1,c=async e=>{try{await o.mutateAsync({path:{assistant_id:t},body:{memory:{enabled:e}}}),b.success(e?`Memory enabled.`:`Memory disabled.`)}catch(e){i(e,{context:`settings-memory-toggle`}),b.error(`Failed to update memory setting.`)}};return r?(0,K.jsx)(B,{title:`Memory`,subtitle:`Let your assistant remember information from past conversations. Turning this off also pauses memory consolidation.`,accessory:(0,K.jsx)(y,{checked:s,onChange:e=>void c(e),"aria-label":`Enable memory`,disabled:o.isPending}),compactAccessory:!0,children:(0,K.jsx)(ue,{memoryEnabled:s})}):null}function fe(){let e=d(),[t,n]=(0,G.useState)(!1),[r,i]=(0,G.useState)(!1),a=k(),o=I(),{data:c,isLoading:l}=f({...R({path:{id:o}}),enabled:a}),{data:u,isLoading:p}=f({...z({query:{hosting:`all`}}),enabled:a}),m=l||p,h=u?.results??[];return(0,K.jsxs)(`div`,{className:`space-y-6`,children:[(0,K.jsx)(pe,{assistant:c??null,loading:m}),(0,K.jsx)(me,{assistants:h,activeAssistantId:o,loading:m}),(0,K.jsxs)(B,{title:`Hatch New Assistant`,subtitle:`Create a new assistant instance.`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,K.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Provision a new assistant. This may take a moment.`}),(0,K.jsx)(s,{variant:`outlined`,leftIcon:t?(0,K.jsx)(_,{className:`animate-spin`}):void 0,onClick:()=>i(!0),disabled:t,className:`shrink-0`,children:`Hatch`})]}),(0,K.jsx)(te,{open:r,title:`Hatch New Assistant`,message:`Are you sure you want to create a new assistant? This will provision new infrastructure.`,confirmLabel:`Hatch`,onConfirm:async()=>{i(!1),n(!0);try{let t=await ce(void 0,`create`);if(t.ok){if(C())try{let e=await se();e.ok&&await S(e.data,E.getState().currentOrganizationId??void 0)}catch{}b.success(t.status===201?`New assistant hatched successfully.`:`Returned your existing assistant — no new one was created.`),e.invalidateQueries({queryKey:[{_id:`assistantsRetrieve`}]}),e.invalidateQueries({queryKey:z({query:{hosting:`all`}}).queryKey})}else{let e=typeof t.error?.detail==`string`?t.error.detail:`Failed to hatch assistant.`;b.error(e)}}catch{b.error(`Failed to hatch assistant.`)}finally{n(!1)}},onCancel:()=>i(!1)})]})]})}function pe({assistant:e,loading:t}){return t?(0,K.jsx)(B,{title:`Assistant Info`,children:(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-body-medium-lighter text-[var(--content-tertiary)]`,children:[(0,K.jsx)(_,{className:`h-4 w-4 animate-spin`}),`Loading assistant info...`]})}):e?(0,K.jsx)(B,{title:`Assistant Info`,subtitle:`Current assistant details.`,children:(0,K.jsxs)(`div`,{className:`grid grid-cols-[140px_minmax(0,1fr)] gap-y-3`,children:[(0,K.jsx)(q,{children:`Name`}),(0,K.jsx)(J,{children:e.name??`Unnamed`}),(0,K.jsx)(q,{children:`Status`}),(0,K.jsx)(`div`,{children:(0,K.jsx)(v,{tone:e.status===`active`?`positive`:`neutral`,children:e.status})}),(0,K.jsx)(q,{children:`Assistant ID`}),(0,K.jsx)(`span`,{className:`break-all font-mono text-body-small-default text-[var(--content-tertiary)]`,children:e.id}),e.machine_id&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(q,{children:`Machine ID`}),(0,K.jsx)(`span`,{className:`break-all font-mono text-body-small-default text-[var(--content-tertiary)]`,children:e.machine_id})]}),(0,K.jsx)(q,{children:`Created`}),(0,K.jsx)(J,{children:new Date(e.created).toLocaleDateString()}),(0,K.jsx)(q,{children:`Last Modified`}),(0,K.jsx)(J,{children:new Date(e.modified).toLocaleDateString()}),e.current_release_version&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(q,{children:`Version`}),(0,K.jsx)(J,{children:e.current_release_version})]})]})}):(0,K.jsx)(B,{title:`Assistant Info`,children:(0,K.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`No assistant found. Hatch an assistant to get started.`})})}function me({assistants:e,activeAssistantId:t,loading:n}){return n||e.length===0?null:(0,K.jsx)(B,{title:`All Assistants`,subtitle:`${e.length} assistant${e.length===1?``:`s`} found.`,children:(0,K.jsx)(`div`,{className:`max-h-[300px] space-y-2 overflow-y-auto`,children:e.map(e=>{let n=e.id===t;return(0,K.jsx)(`div`,{className:`flex items-center justify-between gap-4 rounded-lg border px-4 py-3 ${n?`border-[var(--border-focus)] bg-[var(--surface-lift)]`:`border-[var(--border-base)] bg-[var(--surface-default)]`}`,children:(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`truncate text-body-medium-default text-[var(--content-default)]`,children:e.name||`Unnamed`}),(0,K.jsx)(v,{tone:e.status===`active`?`positive`:`neutral`,children:e.status}),n&&(0,K.jsx)(v,{tone:`warning`,children:`Current`})]}),(0,K.jsx)(`span`,{className:`font-mono text-body-small-default text-[var(--content-tertiary)]`,children:e.id})]})},e.id)})})})}function q({children:e}){return(0,K.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:e})}function J({children:e}){return(0,K.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e})}function he(){let e=V.use.emailRootDomain(),t=V.use.isNonProduction(),n=V.use.setEnvironment();return(0,K.jsx)(B,{title:`Environment`,subtitle:`Environment configuration overrides for this session.`,children:(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-start gap-3 py-3`,children:[(0,K.jsx)(`div`,{className:`shrink-0 pt-0.5`,children:(0,K.jsx)(y,{checked:t,onChange:e=>n({isNonProduction:e}),"aria-label":`Non-Production is ${t?`on`:`off`}`})}),(0,K.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[(0,K.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Non-Production`}),(0,K.jsx)(`span`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Indicates a non-production environment. Enables dev-only UI surfaces and diagnostics.`})]})]}),(0,K.jsxs)(`div`,{className:`flex items-start gap-3 py-3`,children:[(0,K.jsx)(`div`,{className:`shrink-0 pt-0.5`,children:(0,K.jsx)(v,{tone:`neutral`,children:e})}),(0,K.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[(0,K.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Email Root Domain`}),(0,K.jsx)(`span`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Root domain used for assistant email addresses (e.g. vellum.me).`})]})]})]})})}async function ge(){let{data:e,response:t}=await D.get({url:`/v1/feature-flags/`,throwOnError:!1});return t?.ok?e?.flags??[]:[]}var Y={client:`warning`,assistant:`positive`};function _e(){let e=I(),{data:t}=f({queryKey:[`feature-flag-definitions`],queryFn:ge,enabled:k(),staleTime:300*1e3}),n=(0,G.useMemo)(()=>{let e=new Map;if(!t)return e;for(let n of t)n.type===`string`&&n.values?.length&&e.set(n.key,n.values);return e},[t]),[r,i]=(0,G.useState)(``),a=M(),o=N(),s=(0,G.useMemo)(()=>{let e=[];for(let t of j){let r=le(t.key);if(typeof t.defaultEnabled==`boolean`){let n=a[r],i=o[r],s=t.scope===`both`?n===!0||i===!0:t.scope===`assistant`?i:n;if(typeof s!=`boolean`)continue;e.push({kind:`boolean`,storeKey:r,scope:t.scope,label:t.label,description:t.description,value:s,defaultValue:t.defaultEnabled})}else if(typeof t.defaultEnabled==`string`){let i=a.stringFlags?.[r],s=o.stringFlags?.[r],c=t.scope===`assistant`?s??t.defaultEnabled:i??t.defaultEnabled;e.push({kind:`string`,storeKey:r,scope:t.scope,label:t.label,description:t.description,value:c,defaultValue:t.defaultEnabled,values:n.get(t.key)??t.values})}}return e.sort((e,t)=>e.label.localeCompare(t.label,void 0,{sensitivity:`base`}))},[a,o,n]),c=(0,G.useMemo)(()=>{if(!r.trim())return s;let e=r.trim().toLowerCase();return s.filter(t=>t.label.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)||t.storeKey.toLowerCase().includes(e)||t.scope.includes(e)||t.scope===`both`&&(`client`.includes(e)||`assistant`.includes(e)))},[s,r]);return(0,K.jsx)(B,{title:`Feature Flags`,subtitle:`Active feature flags evaluated for the current session.`,children:(0,K.jsxs)(`div`,{className:`space-y-4`,children:[(0,K.jsxs)(`div`,{className:`relative`,children:[(0,K.jsx)(L,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--content-tertiary)]`}),(0,K.jsx)(`input`,{type:`text`,placeholder:`Search flags...`,value:r,onChange:e=>i(e.target.value),className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-default)] py-2 pl-9 pr-3 text-body-medium-default text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] focus:border-[var(--border-focus)] focus:outline-none`})]}),c.length===0&&(0,K.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`No matching flags.`}),c.length>0&&(0,K.jsx)(`div`,{className:`max-h-[500px] space-y-2 overflow-y-auto`,children:c.map(t=>(0,K.jsx)(ye,{flag:t,assistantId:e},t.storeKey))})]})})}function X({scope:e}){return e===`both`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(v,{tone:Y.client,children:`client`}),(0,K.jsx)(v,{tone:Y.assistant,children:`assistant`})]}):(0,K.jsx)(v,{tone:Y[e],children:e})}function Z({flag:e,assistantId:t}){let n=M.use.setFlag(),r=N.use.setFlag();return(0,K.jsxs)(`div`,{className:`flex items-start gap-3 py-3`,children:[(0,K.jsx)(`div`,{className:`shrink-0 pt-0.5`,children:(0,K.jsx)(y,{checked:e.value,onChange:i=>{A(e.scope,`client`)&&n(e.storeKey,i),A(e.scope,`assistant`)&&r(e.storeKey,i,t)},"aria-label":`${e.label} is ${e.value?`on`:`off`}`})}),(0,K.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:e.label}),(0,K.jsx)(X,{scope:e.scope})]}),(0,K.jsx)(`span`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:e.description}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,K.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Default:`}),(0,K.jsx)(v,{tone:`neutral`,children:e.defaultValue?`On`:`Off`})]})]})]})}function ve({flag:e,assistantId:t}){let n=M.use.setStringFlag(),r=N.use.setStringFlag(),[i,a]=(0,G.useState)(e.value);(0,G.useEffect)(()=>{a(e.value)},[e.value]);let s=i=>{i!==e.value&&(A(e.scope,`client`)&&n(e.storeKey,i),A(e.scope,`assistant`)&&r(e.storeKey,i,t))},c=i!==e.value,l=e.values&&e.values.length>0?e.values:null,u=c&&l!=null&&!l.includes(i),d=()=>{u||s(i)},f=e=>{e.key===`Enter`&&e.currentTarget.blur()},p=l!=null&&l.includes(e.value);return(0,K.jsx)(`div`,{className:`flex items-start gap-3 py-3`,children:(0,K.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1.5`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:e.label}),(0,K.jsx)(X,{scope:e.scope})]}),(0,K.jsx)(`span`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:e.description}),p?(0,K.jsx)(x,{value:e.value,onChange:e=>{a(e),s(e)},options:l.map(e=>({value:e,label:e})),className:`w-48`,"aria-label":`${e.label} value`}):(0,K.jsxs)(`div`,{className:`space-y-1`,children:[(0,K.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value),onBlur:d,onKeyDown:f,className:o(`w-full rounded-lg border bg-[var(--surface-default)] px-3 py-1.5 text-body-small-default text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] focus:outline-none`,u?`border-[var(--system-negative-strong)]`:`border-[var(--border-base)] focus:border-[var(--border-focus)]`),placeholder:e.defaultValue||`Enter value...`}),u&&(0,K.jsxs)(`span`,{className:`block text-body-small-default text-[var(--system-negative-strong)]`,children:[`Expected one of: `,l.join(`, `)]})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,K.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Default:`}),(0,K.jsx)(v,{tone:`neutral`,children:e.defaultValue||`(empty)`})]})]})})}function ye({flag:e,assistantId:t}){return e.kind===`string`?(0,K.jsx)(ve,{flag:e,assistantId:t}):(0,K.jsx)(Z,{flag:e,assistantId:t})}function be(){let e=(0,G.useCallback)(()=>{t(Error(`[Dev Settings] Test error event`)),b.success(`Sentry error event sent.`)},[]),i=(0,G.useCallback)(()=>{r(`[Dev Settings] Test warning event`,`warning`),b.success(`Sentry warning event sent.`)},[]),a=(0,G.useCallback)(()=>{r(`[Dev Settings] Test info event`,`info`),b.success(`Sentry info event sent.`)},[]),o=(0,G.useCallback)(()=>{r(`[Dev Settings] Test fatal event`,`fatal`),b.success(`Sentry fatal event sent.`)},[]),s=(0,G.useCallback)(()=>{n({name:`[Dev Settings] Test transaction`,op:`test.transaction`,forceTransaction:!0}).end(),b.success(`Sentry performance transaction sent.`)},[]);return(0,K.jsx)(B,{title:`Sentry Testing`,subtitle:`Fire test events to verify Sentry integration is working.`,children:(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsx)(Q,{icon:(0,K.jsx)(U,{className:`h-4 w-4 text-[var(--system-negative-strong)]`}),label:`Fatal Event`,description:`Send a fatal-level event to Sentry.`,onClick:o}),(0,K.jsx)(Q,{icon:(0,K.jsx)(F,{className:`h-4 w-4 text-[var(--system-negative-default)]`}),label:`Error Event`,description:`Capture a test Error exception.`,onClick:e}),(0,K.jsx)(Q,{icon:(0,K.jsx)(ee,{className:`h-4 w-4 text-[var(--system-warning-default)]`}),label:`Warning Event`,description:`Send a warning-level message.`,onClick:i}),(0,K.jsx)(Q,{icon:(0,K.jsx)(g,{className:`h-4 w-4 text-[var(--content-tertiary)]`}),label:`Info Event`,description:`Send an info-level message.`,onClick:a}),(0,K.jsx)(Q,{icon:(0,K.jsx)(W,{className:`h-4 w-4 text-[var(--system-positive-default)]`}),label:`Performance Transaction`,description:`Start and end a test transaction span.`,onClick:s})]})})}function Q({icon:e,label:t,description:n,onClick:r}){return(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-4 rounded-lg border border-[var(--border-base)] px-4 py-3`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,K.jsx)(`div`,{className:`shrink-0`,children:e}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`p`,{className:`text-body-medium-default text-[var(--content-default)]`,children:t}),(0,K.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:n})]})]}),(0,K.jsxs)(s,{variant:`outlined`,size:`compact`,onClick:r,children:[(0,K.jsx)(h,{className:`h-4 w-4`}),`Send`]})]})}var $=[{id:`feature-flags`,label:`Feature Flags`},{id:`lifecycle`,label:`Assistant Lifecycle`},{id:`sentry`,label:`Sentry Testing`},{id:`memory`,label:`Memory`}];function xe(){let e=u(),[t,n]=c(),r=N.use.settingsDeveloperNav(),i=N.use.hasHydrated(),a=(0,G.useMemo)(()=>{let e=t.get(`tab`);return $.find(t=>t.id===e)?.id??`feature-flags`},[t]);if(i&&!r)return(0,K.jsx)(l,{replace:!0,to:O.settings.general});let o=e=>{let r=new URLSearchParams(t.toString());e===`feature-flags`?r.delete(`tab`):r.set(`tab`,e),n(r,{replace:!0})};return(0,K.jsxs)(`div`,{"data-slot":`developer-page`,className:`flex min-h-0 flex-1 flex-col`,children:[(0,K.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-4 border-b border-[var(--border-base)]`,children:[(0,K.jsx)(`div`,{role:`tablist`,"aria-label":`Developer sections`,className:`flex items-center gap-1`,children:$.map(e=>{let t=e.id===a;return(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":t,"aria-controls":`developer-tab-panel-${e.id}`,id:`developer-tab-${e.id}`,onClick:()=>o(e.id),className:P(`relative -mb-px cursor-pointer border-b-2 px-4 py-2 text-body-medium-default transition-colors`,t?`border-[var(--system-positive-strong)] text-[var(--system-positive-strong)]`:`border-transparent text-[var(--content-tertiary)] hover:text-[var(--content-default)] dark:text-[var(--content-disabled)] dark:hover:text-[var(--content-default)]`),children:e.label},e.id)})}),C()&&(0,K.jsx)(s,{variant:`outlined`,className:`mb-1 shrink-0`,onClick:()=>void e(`${O.selectAssistant}?noAutoSkip=1`),children:`Choose Assistant`})]}),(0,K.jsxs)(`div`,{id:`developer-tab-panel-${a}`,role:`tabpanel`,"aria-labelledby":`developer-tab-${a}`,className:`flex min-h-0 flex-1 flex-col pt-6`,children:[a===`feature-flags`&&(0,K.jsxs)(`div`,{className:`space-y-6`,children:[(0,K.jsx)(_e,{}),(0,K.jsx)(he,{})]}),a===`lifecycle`&&(0,K.jsx)(fe,{}),a===`sentry`&&(0,K.jsx)(be,{}),a===`memory`&&(0,K.jsx)(`div`,{className:`space-y-4`,children:(0,K.jsx)(de,{})})]})]})}export{xe as DeveloperPage};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/web-C_RyjuPn.js","assets/dist-DyRKd0bN2.js","assets/definitions-BEx8SBhF.js"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./preload-helper-BewR0kVT.js";import{i as t}from"./dist-DyRKd0bN2.js";import{n,t as r}from"./definitions-BEx8SBhF.js";var i=t(`Haptics`,{web:()=>e(()=>import(`./web-C_RyjuPn.js`).then(e=>new e.HapticsWeb),__vite__mapDeps([0,1,2]))});export{i as Haptics,r as ImpactStyle,n as NotificationType};
@@ -1 +0,0 @@
1
- var e={version:1,flags:[{id:`user-hosted-enabled`,scope:`client`,key:`user-hosted-enabled`,label:`User Hosted Enabled`,description:`Enable user-hosted onboarding flow`,defaultEnabled:!1},{id:`proactive-tips`,scope:`client`,key:`proactive-tips`,label:`Proactive Tips`,description:`Gates the dismissible proactive tip card in the web sidebar. String-valued so future A/B arms can be added as new values.`,defaultEnabled:`off`,values:[`off`,`on`]},{id:`experiment-activation-flow-2026-06-03`,scope:`both`,key:`experiment-activation-flow-2026-06-03`,label:`Activation Flow Experiment 2026-06-03`,description:`Multivariate activation-flow experiment. control = standard flow; variant-a = activation rail; personal-page = new sign-up-page variant (front-end only). Targeted via LaunchDarkly.`,defaultEnabled:`control`,values:[`control`,`variant-a`,`personal-page`]},{id:`local-docker-enabled`,scope:`client`,key:`local-docker-enabled`,label:`Local Docker Mode`,description:`When enabled, the Local hosting option uses Docker under the hood for sandboxed execution, hiding the separate Docker card`,defaultEnabled:!1},{id:`a2a-channel`,scope:`assistant`,key:`a2a-channel`,label:`A2A Channel`,description:`Enable the A2A (Agent-to-Agent) channel for inter-assistant communication via the open A2A protocol`,defaultEnabled:!1},{id:`settings-developer-nav`,scope:`assistant`,key:`settings-developer-nav`,label:`Settings Developer Nav`,description:`Control Developer nav visibility in macOS settings`,defaultEnabled:!1},{id:`developer-menu-items`,scope:`client`,key:`developer-menu-items`,label:`Developer Menu Items`,description:`Show Component Gallery and Replay Onboarding in the menu bar`,defaultEnabled:!1},{id:`settings-embedding-provider`,scope:`assistant`,key:`settings-embedding-provider`,label:`Embedding Provider Settings`,description:`Show the Embedding service card in Models & Services settings`,defaultEnabled:!1},{id:`multi-platform-assistant`,scope:`client`,key:`multi-platform-assistant`,label:`Multi-Platform Assistant Switcher`,description:`Enable the menu-bar assistant switcher for managing multiple platform-hosted assistants (new/switch/retire)`,defaultEnabled:!1},{id:`quick-input`,scope:`client`,key:`quick-input`,label:`Quick Input`,description:`Enable the Quick Input popover on right-click of the menu bar icon`,defaultEnabled:!1},{id:`expand-completed-steps`,scope:`client`,key:`expand-completed-steps`,label:`Expand Completed Steps`,description:`Auto-expand completed tool call step groups instead of showing them collapsed`,defaultEnabled:!1},{id:`backward-releases`,scope:`assistant`,key:`backward-releases`,label:`Backward Releases`,description:`Show older versions in the version picker, allowing rollback to previous releases`,defaultEnabled:!1},{id:`voice-mode`,scope:`assistant`,key:`voice-mode`,label:`Voice Mode`,description:`Show the live voice conversation button in the composer`,defaultEnabled:!1},{id:`voice-triage-escalate`,scope:`assistant`,key:`voice-triage-escalate`,label:`Voice Triage & Escalate`,description:`Front each live-voice turn with a fast model that answers simple turns and escalates tricky ones to the quality model, cutting perceived latency. The same leg decides the endpoint: its first token holds a mid-thought pause, escalates, or begins the answer, replacing the separate endpoint-decider call`,defaultEnabled:!1},{id:`voice-duplex-handoff`,scope:`assistant`,key:`voice-duplex-handoff`,label:`Voice Duplex Handoff`,description:`When a user barges in during live voice, keep the interrupted turn running as a background subagent instead of discarding it (true-duplex handoff)`,defaultEnabled:!1},{id:`fast-mode`,scope:`assistant`,key:`fast-mode`,label:`Fast Mode`,description:`Enable Anthropic fast mode for Opus models (4.6, 4.7, 4.8), delivering up to 2.5x higher output tokens per second at premium pricing`,defaultEnabled:!1},{id:`teleport`,scope:`client`,key:`teleport`,label:`Teleport`,description:`Enable teleport UI in General settings for moving assistants between hosting environments`,defaultEnabled:!1},{id:`apple-container`,scope:`client`,key:`apple-container`,label:`Apple Container`,description:`Enable assistant sandboxing via Apple Containers on macOS 26+, providing a lightweight native sandbox without third-party dependencies`,defaultEnabled:!1},{id:`fork-from-message`,scope:`client`,key:`fork-from-message`,label:`Fork from Message`,description:`Show the 'Fork from here' option in message overflow menus`,defaultEnabled:!1},{id:`home-tab`,scope:`client`,key:`home-tab`,label:`Home Tab`,description:`Replace the knowledge graph top-level tab with a new Home page showing relationship progression, facts, and capability tiers`,defaultEnabled:!1},{id:`scroll-debug-overlay`,scope:`client`,key:`scroll-debug-overlay`,label:`Scroll Debug Overlay`,description:`Show a live HUD in the top-right of the conversation with scroll geometry, velocity, update rate, and anchor-preserver activity. Developer diagnostic for investigating scroll jank.`,defaultEnabled:!1},{id:`compaction-playground`,scope:`assistant`,key:`compaction-playground`,label:`Compaction Playground`,description:`Expose the developer-only Compaction Playground tab in macOS Settings and enable the /playground/* HTTP endpoints for exercising compaction conditions. Dev-only; default off.`,defaultEnabled:!1},{id:`app-control`,scope:`assistant`,key:`app-control`,label:`App Control`,description:`Enable the app-control skill (per-app screenshot + raw input bypassing AX tree)`,defaultEnabled:!1},{id:`velvet-theme`,scope:`client`,key:`velvet-theme`,label:`Velvet Theme`,description:`Show the Velvet theme option in the macOS appearance settings. Velvet is a dark-mode variant with red/pink accent colors.`,defaultEnabled:!1},{id:`queue-steering`,scope:`assistant`,key:`queue-steering`,label:`Queue Steering`,description:`Enable the 'Push to agent' button on queued messages, allowing users to steer the assistant to a specific queued message by aborting the current generation and promoting the message to the head of the queue.`,defaultEnabled:!1},{id:`chat-pull-to-refresh-enabled`,scope:`client`,key:`chat-pull-to-refresh-enabled`,label:`Chat Pull to Refresh`,description:`Enable pull-to-refresh gesture in the chat view.`,defaultEnabled:!1},{id:`platform-notifications`,scope:`client`,key:`platform-notifications`,label:`Platform Notifications`,description:`Enable the Notifications tab in settings.`,defaultEnabled:!1},{id:`centralized-assistant-status`,scope:`client`,key:`centralized-assistant-status`,label:`Centralized Assistant Status`,description:`Enable client polling of the centralized assistant operational status endpoint.`,defaultEnabled:!1},{id:`preview-channel`,scope:`client`,key:`preview-channel`,label:`Preview Channel`,description:`Enable user-facing Preview release channel controls in assistant settings.`,defaultEnabled:!1},{id:`rollback-enabled`,scope:`assistant`,key:`rollback-enabled`,label:`Rollback Enabled`,description:`Show older versions in the version picker, allowing rollback to previous releases.`,defaultEnabled:!1},{id:`self-hosted-assistant`,scope:`client`,key:`self-hosted-assistant`,label:`Self-Hosted Assistant`,description:`Enable self-hosted assistant configuration.`,defaultEnabled:!1},{id:`web-remote-ingress`,scope:`assistant`,key:`web-remote-ingress`,label:`Web Remote Ingress`,description:`Serve the web client over a public tunnel and enable browser pairing for self-hosted assistants.`,defaultEnabled:!1},{id:`settings-sleep-policy`,scope:`assistant`,key:`settings-sleep-policy`,label:`Settings Sleep Policy`,description:`Enable sleep policy settings.`,defaultEnabled:!1},{id:`velvet`,scope:`client`,key:`velvet`,label:`Velvet`,description:`Enable the Velvet design theme.`,defaultEnabled:!1},{id:`memory-router-playground`,scope:`client`,key:`memory-router-playground`,label:`Memory Router Playground`,description:`Expose the developer-only Memory Router Playground tab in macOS Settings and the /assistant/memory-router-playground web page for dry-running v4 router config overrides against the live page index. Dev-only; default off.`,defaultEnabled:!1},{id:`memory-v3-injection-gate`,scope:`assistant`,key:`memory-v3-injection-gate`,label:`Memory v3 injection gate`,description:`Per-turn injection gate for memory v3: after the BM25F needle + dense cosine finder lanes run, skip the selectPool LLM call (inject nothing) when finder-lane scores fall below the configured thresholds (memory.v3.gate). Default on (flipped remotely July 2026); this registry value is the fallback when no platform snapshot is available.`,defaultEnabled:!0},{id:`self-intro-greeting`,scope:`both`,key:`self-intro-greeting`,label:`Self-intro first message`,description:`On the first conversation, send a natural self-introduction (e.g. "Hi Vela, I'm alex. Nice to meet you.") on the user's behalf and route it through real LLM inference, instead of serving the canned first greeting. Names come from the onboarding context; falls back to the canned greeting when no name is known. Exposed to clients so pre-hatch onboarding can compute the source-of-truth initial message, and to the assistant so older clients can still be gated server-side. See assistant/src/daemon/first-greeting.ts (buildSelfIntroMessage).`,defaultEnabled:!1},{id:`channel-trust-floors`,scope:`assistant`,key:`channel-trust-floors`,label:`Channel Trust Floors`,description:`Expose the Channel Trust Floors settings card (per-channel inbound admission policy) on the Privacy settings page. When off, the card is hidden and channels fall back to their default admission floors. On by default; disable to hide the card.`,defaultEnabled:!0},{id:`mcp-add-server`,scope:`assistant`,key:`mcp-add-server`,label:`MCP Add Server`,description:`Show the Add Server action on the MCP settings page. The MCP page itself remains visible; this flag gates only creating new Model Context Protocol server connections.`,defaultEnabled:!1},{id:`os-beta`,scope:`assistant`,key:`os-beta`,label:`OS Beta`,description:`Enable the OS Beta model profile (MiniMax M3 / Together) in the assistant's model profile selection.`,defaultEnabled:!1},{id:`new-thread-suggestions`,scope:`client`,key:`new-thread-suggestions`,label:`New-thread suggestions library`,description:`Replace the empty-state conversation-starter chips with the scrollable, categorized suggestions library and detail drawer (currently mocked data).`,defaultEnabled:!1},{id:`account-mfa`,scope:`client`,key:`account-mfa`,label:`Account MFA`,description:`Surface the Security settings page where users enroll and manage TOTP two-factor authentication for their Vellum (WorkOS) account. Applies to email/password sign-in only.`,defaultEnabled:!1},{id:`credentials-settings`,scope:`assistant`,key:`credentials-settings`,label:`Credentials settings page`,description:`Show the Credentials page in web settings for listing, adding, and deleting stored credentials.`,defaultEnabled:!1},{id:`credential-requests`,scope:`assistant`,key:`credential-requests`,label:`One-time credential request links`,description:`Enable one-time credential-request links: the generate-link action in settings, the public credential entry page, and assistant-initiated links on channels without secure input.`,defaultEnabled:!1},{id:`chat-credential-reveal`,scope:`assistant`,key:`chat-credential-reveal`,label:`Chat Credential Reveal`,description:"Persist chat secret redactions as sentinel markers instead of the legacy HTML marker, enriched with the vault identity when the value byte-matches a credential revealed this turn. Also gates the `credentials reveal --for-chat` channel and the live-stream swap that replaces an echoed reveal plaintext with its sentinel before emission. Redaction itself is NOT gated: a route-proven reveal plaintext stays out of persisted rows in both modes. Client chip rendering is gated on daemon version, not on this flag.",defaultEnabled:!1}]};function t(e,t){return e===t||e===`both`}var n=e.flags,r={};function i(e){return r[e]||e.split(`-`).map((e,t)=>e===`ui`?`UI`:t===0?e:e[0].toUpperCase()+e.slice(1)).join(``)}function a(e){let r={};for(let a of n)typeof a.defaultEnabled==`boolean`&&t(a.scope,e)&&(r[i(a.key)]=a.defaultEnabled);return r}function o(e){let r={};for(let a of n)typeof a.defaultEnabled==`string`&&t(a.scope,e)&&(r[i(a.key)]=a.defaultEnabled);return r}var s=a(`client`),c=a(`assistant`),l=o(`client`),u=o(`assistant`),d=new Map;for(let e of n)d.set(i(e.key),e);var f=new Map;for(let e of n)f.set(i(e.key),e.key);function p(e){return i(e)}function m(e){return f.get(e)}function h(e){return d.get(e)}var g=`VITE_VELLUM_FLAG_`;function _(e){return e.toLowerCase().replace(/_/g,`-`)}var v=new Set([`true`,`1`,`yes`,`on`]),y=new Set([`false`,`0`,`no`,`off`]),b=new Map;for(let e of n)b.set(e.key,e);function x(e){return typeof e?.defaultEnabled==`string`}function S(e,t){let n=b.get(e),r=t.toLowerCase();return x(n)?n?.values?n.values.find(e=>e.toLowerCase()===r):t:v.has(r)?!0:y.has(r)?!1:t}function C(){if(typeof window<`u`&&window.__VELLUM_FLAG_OVERRIDES__!=null)return{...window.__VELLUM_FLAG_OVERRIDES__};let e={},t={BASE_URL:`/assistant/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_PLATFORM_MODE:`false`};for(let n of Object.keys(t))if(n.startsWith(g)){let r=_(n.slice(17)),i=t[n];if(i!=null){let t=S(r,i);t!==void 0&&(e[r]=t)}}return e}var w=null;function T(){return w===null&&(w=C()),w}function E(e){let n=T(),r={},i={};for(let[a,o]of Object.entries(n)){let n=b.get(a);if(!n||!t(n.scope,e))continue;let s=p(a);if(x(n)){let e=typeof o==`string`?o:o?`on`:`off`;(typeof o==`string`||n.values?.includes(e))&&(i[s]=e)}else typeof o==`boolean`?r[s]=o:i[s]=o}return{bool:r,str:i}}export{p as a,h as c,l as i,t as l,u as n,n as o,s as r,E as s,c as t,m as u};
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{P as n,t as r}from"./button-BQVYX8n_.js";import{l as i,u as a}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{n as o}from"./QueryClientProvider-DKhXIxGb.js";import{t as s}from"./useQuery-B45lW1Kk.js";import{t as c}from"./jsx-runtime-CVSDxk6A.js";import{t as l}from"./typography-Cqi8q9o7.js";import{t as u}from"./arrow-left-C2re-gYj.js";import{t as d}from"./bell-V9BYKY__.js";import{n as f}from"./settings-wSv59mkN.js";import{r as p}from"./panel-item-An-BBeyL.js";import{t as m}from"./x-CswtfvgS.js";import{d as h,h as g,i as _}from"./src-BNYQ8guL.js";import{t as v}from"./tag-B6WeUtBW.js";import{R as y,z as b}from"./react-query.gen-DfzfX_Jv.js";import{u as x}from"./routes-D4ff4ONd.js";import{$n as S,Ba as C,J as w,Oa as T,Qn as E,Va as D,Xo as O,Zn as k,_ as ee,a as A,c as j,cs as M,d as N,f as P,g as F,h as I,i as L,jt as R,l as z,ls as B,n as te,o as ne,p as re,r as ie,rr as V,s as H,u as U,zo as W}from"./index-D5iUyXUl.js";import{t as G}from"./page-shell-CAoXXReY.js";import{l as K,s as q,t as J,u as ae}from"./page-empty-state-Co5e7lOF.js";var Y=e(t(),1),X=c(),oe={p:({children:e})=>(0,X.jsx)(`p`,{className:`mb-2 text-body-medium-default last:mb-0`,style:{color:`var(--content-secondary)`},children:e}),strong:({children:e})=>(0,X.jsx)(`strong`,{style:{color:`var(--content-default)`},children:e}),em:({children:e})=>(0,X.jsx)(`em`,{style:{color:`var(--content-default)`},children:e}),a:({href:e,children:t})=>(0,X.jsx)(`a`,{href:e,className:`underline`,style:{color:`var(--content-link)`},target:`_blank`,rel:`noopener noreferrer`,onClick:t=>R(t,e),children:t}),ul:({children:e})=>(0,X.jsx)(`ul`,{className:`mb-2 list-disc pl-5 text-body-medium-default`,style:{color:`var(--content-secondary)`},children:e}),ol:({children:e})=>(0,X.jsx)(`ol`,{className:`mb-2 list-decimal pl-5 text-body-medium-default`,style:{color:`var(--content-secondary)`},children:e}),li:({children:e})=>(0,X.jsx)(`li`,{className:`mb-0.5`,children:e}),code:({children:e})=>(0,X.jsx)(`code`,{className:`rounded px-1 py-0.5 font-mono text-[0.85em]`,style:{backgroundColor:`color-mix(in oklab, var(--content-default) 8%, transparent)`,color:`var(--content-default)`},children:e}),pre:({children:e})=>(0,X.jsx)(`pre`,{className:`mb-2 overflow-x-auto rounded p-3 font-mono text-[0.85em]`,style:{backgroundColor:`color-mix(in oklab, var(--content-default) 6%, transparent)`,color:`var(--content-default)`},children:e}),h1:({children:e})=>(0,X.jsx)(`h1`,{className:`mb-2 text-title-medium first:mt-0`,style:{color:`var(--content-default)`},children:e}),h2:({children:e})=>(0,X.jsx)(`h2`,{className:`mb-2 text-title-small first:mt-0`,style:{color:`var(--content-default)`},children:e}),h3:({children:e})=>(0,X.jsx)(`h3`,{className:`mb-1 text-body-medium-default first:mt-0`,style:{color:`var(--content-default)`},children:e}),blockquote:({children:e})=>(0,X.jsx)(`blockquote`,{className:`mb-2 border-l-2 pl-3 text-body-medium-default`,style:{borderColor:`var(--border-base)`,color:`var(--content-tertiary)`},children:e}),table:({children:e})=>(0,X.jsx)(`div`,{className:`mb-2 overflow-x-auto`,children:(0,X.jsx)(`table`,{className:`w-full border-collapse text-body-small-default`,style:{color:`var(--content-secondary)`},children:e})}),thead:({children:e})=>(0,X.jsx)(`thead`,{style:{backgroundColor:`var(--surface-lift)`},children:e}),tbody:({children:e})=>(0,X.jsx)(`tbody`,{children:e}),tr:({children:e})=>(0,X.jsx)(`tr`,{style:{borderBottom:`1px solid var(--border-base)`},children:e}),th:({children:e})=>(0,X.jsx)(`th`,{className:`px-2 py-1.5 text-left font-semibold`,style:{color:`var(--content-default)`},children:e}),td:({children:e})=>(0,X.jsx)(`td`,{className:`px-2 py-1.5 align-top`,children:e})};function se({content:e,className:t}){return(0,X.jsx)(`div`,{className:n(`text-body-medium-default`,t),children:(0,X.jsx)(g,{remarkPlugins:[h],components:oe,children:e})})}function Z({item:e}){return(0,X.jsx)(se,{content:e.summary})}function ce(e){switch(e){case`revoked`:case`expired`:return`var(--system-negative-strong)`;case`missing_scopes`:case`missing_token`:case`ping_failed`:return`var(--system-mid-strong)`;default:return`var(--content-disabled)`}}function le(e){return e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Q({item:e}){let t=e.metadata,n=t?.provider;if(!n)return(0,X.jsx)(l,{variant:`body-medium-default`,className:`text-[var(--content-secondary)]`,children:e.title??e.summary});let r=t?.accountInfo??null,i=t?.status??`unreachable`,a=t?.details??``,o=Array.isArray(t?.missingScopes)?t.missingScopes:[];return(0,X.jsxs)(`div`,{className:`flex flex-col gap-[var(--app-spacing-md)]`,children:[(0,X.jsx)(l,{variant:`title-small`,as:`h3`,children:n}),r?(0,X.jsx)(l,{variant:`body-medium-lighter`,className:`text-[var(--content-secondary)]`,children:r}):null,(0,X.jsxs)(`div`,{className:`flex items-center gap-[var(--app-spacing-sm)]`,children:[(0,X.jsx)(`span`,{className:`inline-block shrink-0 rounded-full`,style:{width:8,height:8,backgroundColor:ce(i)},"aria-hidden":`true`}),(0,X.jsx)(l,{variant:`body-medium-default`,className:`text-[var(--content-default)]`,children:le(i)})]}),a?(0,X.jsx)(l,{variant:`body-medium-lighter`,className:`text-[var(--content-secondary)]`,children:a}):null,o.length>0?(0,X.jsxs)(`div`,{className:`flex flex-col gap-[var(--app-spacing-xs)]`,children:[(0,X.jsx)(l,{variant:`body-small-emphasised`,className:`text-[var(--content-secondary)]`,children:`Missing scopes`}),(0,X.jsx)(`ul`,{className:`m-0 flex list-disc flex-col gap-[var(--app-spacing-xxs)] pl-[var(--app-spacing-lg)]`,children:o.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsx)(l,{variant:`body-small-default`,className:`text-[var(--content-tertiary)]`,children:e})},e))})]}):null]})}function ue(e){return e&&P[e]?P[e]:P.system}function de(e){return e.title?e.title:e.category?e.category.charAt(0).toUpperCase()+e.category.slice(1):`Notification`}function fe({item:e,isMobile:t,validConversationIds:n,onClose:i,onGoToThread:a,onUpdateStatus:o,onDismiss:s,onViewSchedule:c}){if(!e)return null;let d=e.detailPanel?.kind,p=de(e),h=ue(e.category),g=h.icon,_=e.status===`new`,y=e.status===`dismissed`,b=!!e.conversationId&&n.has(e.conversationId);return t?(0,X.jsxs)(`div`,{className:`flex h-full flex-col bg-[var(--surface-overlay)]`,children:[(0,X.jsxs)(`div`,{className:`relative flex shrink-0 items-center px-3 py-2`,children:[(0,X.jsx)(r,{variant:`ghost`,iconOnly:(0,X.jsx)(u,{}),onClick:i,"aria-label":`Back`,tooltip:`Back`}),(0,X.jsx)(l,{variant:`body-medium-default`,className:`pointer-events-none absolute inset-x-0 text-center text-[var(--content-secondary)]`,children:`Details`}),(0,X.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,X.jsx)(r,{variant:`ghost`,iconOnly:_?(0,X.jsx)(B,{}):(0,X.jsx)(M,{}),onClick:()=>o(e.id,_?`seen`:`new`),"aria-label":_?`Mark as read`:`Mark as unread`,tooltip:_?`Mark as read`:`Mark as unread`}),y?(0,X.jsx)(r,{variant:`ghost`,iconOnly:(0,X.jsx)(O,{}),onClick:()=>o(e.id,`seen`),"aria-label":`Restore`,tooltip:`Restore`}):(0,X.jsx)(r,{variant:`ghost`,iconOnly:(0,X.jsx)(W,{}),onClick:()=>s(e.id),"aria-label":`Dismiss`,tooltip:`Dismiss`})]})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3`,children:[(0,X.jsx)(`span`,{className:`flex shrink-0 items-center justify-center rounded-full`,style:{width:40,height:40,backgroundColor:h.weak},"aria-hidden":`true`,children:(0,X.jsx)(g,{width:18,height:18,style:{color:h.strong}})}),(0,X.jsx)(l,{variant:`title-small`,className:`min-w-0 text-[var(--content-default)]`,children:p}),(0,X.jsx)(v,{tone:`neutral`,className:`shrink-0`,title:I(e.timestamp),children:F(e.timestamp)})]}),(0,X.jsx)(`div`,{className:`mx-4 border-b border-[var(--border-disabled)]`}),(0,X.jsx)(`div`,{className:`flex-1 overflow-y-auto p-4`,children:d===`toolPermission`?(0,X.jsx)(Q,{item:e}):(0,X.jsx)(Z,{item:e})}),b||c?(0,X.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 px-4 pb-4 pt-2`,children:[c?(0,X.jsx)(r,{variant:`outlined`,fullWidth:!0,leftIcon:(0,X.jsx)(f,{className:`size-4`}),onClick:c,children:`View schedule`}):null,b?(0,X.jsx)(r,{variant:`primary`,fullWidth:!0,onClick:()=>a(e.conversationId),children:`Go to Conversation`}):null]}):null]}):(0,X.jsxs)(`div`,{className:`flex h-full flex-col rounded-[var(--radius-xl)] border border-[var(--border-base)] bg-[var(--surface-overlay)]`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-[var(--app-spacing-sm)] border-b border-[var(--border-base)] p-[var(--app-spacing-lg)]`,children:[(0,X.jsx)(`span`,{className:`flex shrink-0 items-center justify-center rounded-full`,style:{width:28,height:28,backgroundColor:h.weak},"aria-hidden":`true`,children:(0,X.jsx)(g,{width:14,height:14,style:{color:h.strong}})}),(0,X.jsx)(l,{variant:`title-small`,className:`min-w-0 flex-1 truncate text-[var(--content-default)]`,children:p}),b?(0,X.jsx)(r,{variant:`outlined`,onClick:()=>a(e.conversationId),children:`Go to Convo`}):null,(0,X.jsx)(r,{variant:`outlined`,iconOnly:(0,X.jsx)(m,{}),onClick:i,"aria-label":`Close detail panel`,tooltip:`Close`})]}),(0,X.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-[var(--app-spacing-lg)]`,children:[d===`toolPermission`?(0,X.jsx)(Q,{item:e}):(0,X.jsx)(Z,{item:e}),(0,X.jsx)(`div`,{className:`mt-[var(--app-spacing-md)]`,children:(0,X.jsx)(v,{tone:`neutral`,title:I(e.timestamp),children:F(e.timestamp)})})]}),(0,X.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-[var(--app-spacing-sm)] border-t border-[var(--border-base)] p-[var(--app-spacing-lg)]`,children:[(0,X.jsx)(`div`,{children:c?(0,X.jsx)(r,{variant:`outlined`,leftIcon:(0,X.jsx)(f,{className:`size-4`}),onClick:c,children:`View schedule`}):null}),(0,X.jsx)(`div`,{className:`flex items-center gap-[var(--app-spacing-sm)]`,children:y?(0,X.jsx)(r,{variant:`primary`,onClick:()=>o(e.id,`seen`),children:`Restore`}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(r,{variant:`outlined`,onClick:()=>o(e.id,_?`seen`:`new`),children:_?`Mark as read`:`Mark as unread`}),(0,X.jsx)(r,{variant:`primary`,onClick:()=>s(e.id),children:`Dismiss`})]})})]})]})}var pe={today:`Today`,yesterday:`Yesterday`,older:`Older`},me=10080*60*1e3;function $(e,t){return e.status===`new`||e.status===`dismissed`?!1:t-new Date(e.createdAt).getTime()>me}function he({items:e,selectedItemId:t,validConversationIds:n,onSelectItem:r,onDismissItem:i,onRestoreItem:a,onToggleRead:o,onGoToThread:s,archivedOpen:c,onArchivedOpenChange:u,dismissedOpen:f,onDismissedOpenChange:m}){let[h,g]=(0,Y.useState)(null),[v]=(0,Y.useState)(()=>Date.now()),y=ie(e.filter(e=>e.status!==`dismissed`)),b=y.filter(e=>!$(e,v)),x=z(y.filter(e=>$(e,v))),S=A(b),C=h&&S.includes(h)?h:null;h!==C&&g(C);let w=H(z(L(b,C))),T=e.filter(e=>e.status===`dismissed`).sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime());return(0,X.jsxs)(`div`,{className:`flex flex-col gap-[var(--app-spacing-lg)]`,children:[(0,X.jsx)(re,{categories:S,activeFilter:C,onFilterChange:g}),w.size===0?C?(0,X.jsx)(l,{variant:`body-medium-lighter`,className:`py-[var(--app-spacing-xl)] text-center text-[var(--content-disabled)]`,children:`No items match the selected filter.`}):(0,X.jsx)(J,{icon:d,title:`No notifications yet`,description:`Updates and activity from your assistant will appear here.`}):[...w.entries()].map(([e,a])=>(0,X.jsxs)(`section`,{className:`flex flex-col gap-[var(--app-spacing-md)]`,children:[(0,X.jsx)(l,{variant:`body-small-default`,as:`h3`,className:`text-[var(--content-tertiary)]`,children:pe[e]}),(0,X.jsx)(`div`,{className:`flex flex-col gap-[var(--app-spacing-xs)]`,children:a.map(e=>(0,X.jsx)(N,{item:e,isActive:e.id===t,validConversationIds:n,onSelect:r,onDismiss:i,onToggleRead:o,onGoToThread:s},e.id))})]},e)),x.length>0&&(0,X.jsx)(_.Root,{type:`single`,collapsible:!0,value:c?`archived-read`:``,onValueChange:e=>u?.(e===`archived-read`),children:(0,X.jsxs)(_.Item,{value:`archived-read`,children:[(0,X.jsxs)(_.Trigger,{className:`group gap-[var(--app-spacing-xs)] text-body-small-default text-[var(--content-tertiary)]`,children:[(0,X.jsx)(p,{size:14,"aria-hidden":!0,className:`shrink-0 transition-transform group-data-[state=open]:rotate-90`}),(0,X.jsxs)(`span`,{children:[`Earlier (`,x.length,`)`]})]}),(0,X.jsx)(_.Content,{children:(0,X.jsx)(`div`,{className:`flex flex-col gap-[var(--app-spacing-xs)] pt-[var(--app-spacing-sm)]`,children:x.map(e=>(0,X.jsx)(N,{item:e,isActive:e.id===t,validConversationIds:n,onSelect:r,onDismiss:i,onToggleRead:o,onGoToThread:s},e.id))})})]})}),T.length>0&&(0,X.jsx)(_.Root,{type:`single`,collapsible:!0,value:f?`dismissed`:``,onValueChange:e=>m?.(e===`dismissed`),children:(0,X.jsxs)(_.Item,{value:`dismissed`,children:[(0,X.jsxs)(_.Trigger,{className:`group gap-[var(--app-spacing-xs)] text-body-small-default text-[var(--content-tertiary)]`,children:[(0,X.jsx)(p,{size:14,"aria-hidden":!0,className:`shrink-0 transition-transform group-data-[state=open]:rotate-90`}),(0,X.jsxs)(`span`,{children:[`Dismissed (`,T.length,`)`]})]}),(0,X.jsx)(_.Content,{children:(0,X.jsx)(`div`,{className:`flex flex-col gap-[var(--app-spacing-xs)] pt-[var(--app-spacing-sm)]`,children:T.map(e=>(0,X.jsx)(N,{item:e,onSelect:r,onDismiss:a,trailingAction:`restore`},e.id))})})]})})]})}function ge(){return(0,X.jsx)(`h1`,{className:`shrink-0 text-title-large text-[var(--content-default)]`,children:`Activity`})}function _e(e){let t=o(),n=(0,Y.useMemo)(()=>b({path:{assistant_id:e??``}}),[e]),r=s({...y({path:{assistant_id:e}}),enabled:!!e,staleTime:6e4}),i=(0,Y.useCallback)(()=>{e&&t.invalidateQueries({queryKey:n})},[e,t,n]);return{...r,invalidate:i}}function ve(){return(0,X.jsxs)(`div`,{className:`flex flex-col gap-[var(--app-spacing-xl)]`,children:[(0,X.jsx)(`div`,{className:`h-7 w-64 animate-pulse rounded-md bg-[var(--surface-lift)]`}),(0,X.jsx)(`div`,{className:`flex flex-col gap-[var(--app-spacing-sm)]`,children:Array.from({length:4},(e,t)=>(0,X.jsx)(`div`,{className:`h-16 animate-pulse rounded-md bg-[var(--surface-lift)]`},t))})]})}function ye(e){let t=e?.metadata?.scheduleId;return typeof t==`string`&&t.length>0?t:null}function be({assistantId:e,validConversationIds:t,onOpenConversation:n,onViewSchedule:i,initialFeedItemId:a,navigationKey:o,onInitialFeedItemConsumed:c}){let l=C(),u=U(e);_e(e);let{data:d}=s(q(e)),[f,p]=(0,Y.useState)(null),[m,h]=(0,Y.useState)(!1),[g,_]=(0,Y.useState)(!1),v=(0,Y.useCallback)(e=>{e.status===`new`?(p({...e,status:`seen`}),u.updateStatus.mutate({itemId:e.id,status:`seen`})):p(e)},[u.updateStatus]),y=(0,Y.useCallback)(()=>{p(null)},[]),b=(0,Y.useCallback)(e=>{u.updateStatus.mutate({itemId:e,status:`dismissed`}),f?.id===e&&p(null)},[u.updateStatus,f?.id]),x=(0,Y.useCallback)(e=>{u.updateStatus.mutate({itemId:e,status:`seen`}),p(t=>t?.id===e?{...t,status:`seen`}:t)},[u.updateStatus]),S=(0,Y.useCallback)((e,t)=>{u.updateStatus.mutate({itemId:e,status:t}),p(n=>n?.id===e?{...n,status:t}:n)},[u.updateStatus]),w=(0,Y.useCallback)(e=>{p(null),n(e)},[n]),T=u.data?.items??[],[E,D]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{if(!a||o===E||u.isLoading)return;D(o??null);let e=T.find(e=>e.id===a);e&&e.status!==`dismissed`&&v(e),c?.()},[a,o,E,u.isLoading,T,v,c]);let O=ne(T),k=O.filter(e=>e.status===`new`).length,A=O.length,M=ee(),N=(0,Y.useCallback)(()=>{u.markAll.mutate(j(O))},[u.markAll,O]),P=(0,Y.useCallback)(()=>{u.markAll.mutate(te(O)),p(null)},[u.markAll,O]),F=ye(f),I=F!=null&&(d??[]).some(e=>e.id===F),L=f?(0,X.jsx)(fe,{item:f,isMobile:l,validConversationIds:t,onClose:y,onGoToThread:w,onUpdateStatus:S,onDismiss:b,onViewSchedule:I?()=>i(F):void 0}):null,R=(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-[var(--app-spacing-lg)] overflow-y-auto`,children:[u.isError?(0,X.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-[var(--system-negative-weak)] bg-[var(--system-negative-weak)] px-[var(--app-spacing-lg)] py-[var(--app-spacing-md)] text-[var(--system-negative-strong)]`,children:[`Couldn't load home feed`,u.error instanceof Error?`: ${u.error.message}`:`.`]}):null,M&&(k>0||A>0)&&(0,X.jsxs)(`div`,{className:`flex items-center justify-end gap-[var(--app-spacing-sm)]`,children:[k>0&&(0,X.jsx)(r,{variant:`ghost`,size:`compact`,onClick:N,disabled:u.markAll.isPending,children:`Mark all as read`}),A>0&&(0,X.jsx)(r,{variant:`ghost`,size:`compact`,onClick:P,disabled:u.markAll.isPending,children:`Clear all`})]}),(0,X.jsx)(he,{items:T,selectedItemId:f?.id,validConversationIds:t,onSelectItem:v,onDismissItem:b,onRestoreItem:x,onToggleRead:S,onGoToThread:w,archivedOpen:m,onArchivedOpenChange:h,dismissedOpen:g,onDismissedOpenChange:_})]}),z=L&&!l?(0,X.jsx)(K,{storageKey:`homeDetailDrawerWidth`,detailKey:f?.id,section:R,detail:L}):R,B=u.isLoading?(0,X.jsx)(ve,{}):(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-[var(--app-spacing-xl)]`,children:[l?null:(0,X.jsx)(ge,{}),z]});return L&&l?(0,X.jsx)(ae,{children:L}):(0,X.jsx)(G,{children:B})}function xe(){let e=a(),t=i(),n=w(),r=t.state?.feedItemId??null,o=(0,Y.useCallback)(()=>{e(t.pathname+t.search,{replace:!0})},[e,t.pathname,t.search]),s=V.use.setTopBarCenter(),c=C(),{conversations:u}=E(n),{conversations:d}=k(n,!0),{conversations:f}=S(n,!0),p=(0,Y.useMemo)(()=>new Set(T(u,d,f).map(e=>e.conversationId)),[u,d,f]);return(0,Y.useEffect)(()=>(s(c?(0,X.jsx)(l,{variant:`body-medium-default`,className:`text-[var(--content-secondary)]`,children:`Activity`}):null),()=>{s(null)}),[c,s]),(0,X.jsx)(be,{assistantId:n,validConversationIds:p,initialFeedItemId:r,navigationKey:t.key,onInitialFeedItemConsumed:o,onOpenConversation:t=>D(e,t),onViewSchedule:t=>e(x.schedules.detail(t))})}export{xe as HomePageRoute};
@@ -1,7 +0,0 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-BQVYX8n_.js";import{t as r}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{n as i}from"./QueryClientProvider-DKhXIxGb.js";import{t as a}from"./useQuery-B45lW1Kk.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{t as s}from"./card-D8zyWtZh.js";import{t as c}from"./createLucideIcon-Bjb-Kuq7.js";import{t as l}from"./brain-Ci5ws6Wl.js";import{t as u}from"./chevron-left-B_RAz34t.js";import{r as d}from"./panel-item-An-BBeyL.js";import{t as f}from"./folder-open-7DKBH5WB.js";import{t as p}from"./pencil-CsnkG5VN.js";import{t as m}from"./sparkles-BK3KXCjl.js";import{t as h}from"./users--1gWeHEq.js";import"./src-BNYQ8guL.js";import{t as g}from"./modal-BtcwNEBj.js";import{n as _}from"./toast-Be8FEQ-I.js";import{E as v,St as y,b,ht as x,ln as S,o as C,t as w}from"./react-query.gen-DfzfX_Jv.js";import{t as T}from"./assistant-identity-store-CgJwLRMd.js";import{n as E,u as D}from"./routes-D4ff4ONd.js";import{t as O}from"./assistant-feature-flag-store-DuuDCLuS.js";import{t as k}from"./proxy-BzlH_XAe.js";import{t as A}from"./use-reduced-motion-CcGT6CHV.js";import{Aa as j,Bs as M,Dn as ee,En as N,Es as P,J as F,Na as te,Ot as I,Pa as ne,Rn as re,Ro as ie,Tn as L,en as R,hs as ae,ja as oe,jo as se,yt as ce}from"./index-D5iUyXUl.js";import{t as le}from"./page-shell-CAoXXReY.js";import{a as ue,i as z,n as B,o as V}from"./latest-assistant-text-BKts4hYK.js";import{a as de,n as H,r as fe,s as pe,t as me}from"./use-assistant-identity-details-D2HgphdP.js";import{t as he}from"./schedules-CqDlgP0M.js";import{t as ge}from"./get-memory-stats-KWGzIlTp.js";var _e=c(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),U=e(t(),1),W=o();function G(e,t,n){return n===`forward`?(e+1)%t:(e-1+t)%t}function ve({open:e,onClose:t,assistantId:r,components:i,traits:a,customImageUrl:o,onSaveCharacter:s,onUploadImage:c,assistantName:l,onRenameSubmit:u,isRenaming:d=!1}){let f=(0,U.useRef)(null),[p,m]=(0,U.useState)(null),[h,_]=(0,U.useState)(!1),v=i??p,[y,b]=(0,U.useState)(0),[x,S]=(0,U.useState)(0),[C,w]=(0,U.useState)(0),[T,E]=(0,U.useState)(`character`),[D,O]=(0,U.useState)(null),[k,A]=(0,U.useState)(!1),[j,M]=(0,U.useState)(!1),[ee,N]=(0,U.useState)(l??``),F=D??o,I=!!F;(0,U.useEffect)(()=>{e&&N(l??``)},[e,l]);let re=(0,U.useRef)(!1);(0,U.useEffect)(()=>{e&&!re.current&&E(o?`custom`:`character`),re.current=e},[e,o]),(0,U.useEffect)(()=>{if(e)if(v&&a){let e=v.bodyShapes.findIndex(e=>e.id===a.bodyShape),t=v.eyeStyles.findIndex(e=>e.id===a.eyeStyle),n=v.colors.findIndex(e=>e.id===a.color);b(e>=0?e:0),S(t>=0?t:0),w(n>=0?n:0)}else b(0),S(0),w(0)},[e,v,a]),(0,U.useEffect)(()=>{if(!e||v||h)return;let t=!1;return _(!0),oe(r).then(e=>{t||(m(e),_(!1))}),()=>{t=!0}},[e,v,h,r]),(0,U.useEffect)(()=>{if(D)return()=>{URL.revokeObjectURL(D)}},[D]),(0,U.useEffect)(()=>{e||O(null)},[e]);let L=ee.trim(),R=!!u&&L.length>0&&L!==(l??``),ae=(0,U.useCallback)(()=>{v&&(E(`character`),b(Math.floor(Math.random()*v.bodyShapes.length)),S(Math.floor(Math.random()*v.eyeStyles.length)),w(Math.floor(Math.random()*v.colors.length)))},[v]),se=(0,U.useCallback)(()=>{f.current?.click()},[]),le=(0,U.useCallback)(async e=>{let t=e.target.files?.[0];if(!t)return;M(!0);let n=await ne(r,t);M(!1),n&&(c(),O(URL.createObjectURL(t)),E(`custom`)),f.current&&(f.current.value=``)},[r,c]),ue=(0,U.useCallback)(async e=>{if(e.preventDefault(),!(k||d)){if(R&&u&&u(L),v&&T===`character`){let e={bodyShape:v.bodyShapes[y].id,eyeStyle:v.eyeStyles[x].id,color:v.colors[C].id};A(!0);try{await te(r,e),O(null),s(e)}finally{A(!1)}}t()}},[k,d,R,u,L,v,T,y,x,C,r,s,t]),z=v?.bodyShapes[y],B=v?.eyeStyles[x],V=v?.colors[C],de=T===`custom`&&I,H=l!==void 0&&u?(0,W.jsx)(ye,{value:ee,onChange:N,disabled:d}):null;return(0,W.jsx)(g.Root,{open:e,onOpenChange:e=>!e&&t(),children:(0,W.jsxs)(g.Content,{size:`sm`,children:[(0,W.jsx)(g.Header,{children:(0,W.jsx)(g.Title,{children:`Update Avatar`})}),(0,W.jsxs)(`form`,{className:`flex min-h-0 flex-1 flex-col`,onSubmit:ue,children:[(0,W.jsx)(g.Body,{className:`space-y-4`,children:de?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`flex justify-center`,children:(0,W.jsx)(`div`,{className:`rounded-2xl bg-[var(--surface-sunken)] p-6`,children:(0,W.jsx)(`img`,{src:F,alt:`Uploaded avatar`,className:`h-40 w-40 rounded-xl object-cover`})})}),(0,W.jsxs)(`div`,{className:`space-y-3`,children:[H,(0,W.jsx)(be,{label:`Use a character instead`,description:`Pick from our built-in avatars`,onClick:()=>E(`character`),thumbnail:v&&z&&B&&V?(0,W.jsx)(ce,{components:v,bodyShapeId:z.id,eyeStyleId:B.id,colorId:V.id,size:32}):(0,W.jsx)(P,{className:`h-4 w-4`,style:{color:`var(--content-secondary)`}})})]})]}):v?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`flex justify-center`,children:(0,W.jsx)(`div`,{className:`rounded-2xl bg-[var(--surface-sunken)] p-6`,children:(0,W.jsx)(ce,{components:v,bodyShapeId:z.id,eyeStyleId:B.id,colorId:V.id,size:160})})}),(0,W.jsxs)(`div`,{className:`space-y-3`,children:[H,(0,W.jsx)(xe,{label:`Body`,value:z.id,onPrev:()=>b(G(y,v.bodyShapes.length,`backward`)),onNext:()=>b(G(y,v.bodyShapes.length,`forward`))}),(0,W.jsx)(xe,{label:`Eyes`,value:B.id,onPrev:()=>S(G(x,v.eyeStyles.length,`backward`)),onNext:()=>S(G(x,v.eyeStyles.length,`forward`))}),(0,W.jsx)(xe,{label:`Color`,value:V.id,colorHex:V.hex,onPrev:()=>w(G(C,v.colors.length,`backward`)),onNext:()=>w(G(C,v.colors.length,`forward`))})]}),I&&(0,W.jsx)(be,{label:`Keep your uploaded image`,description:`Saving the character replaces it`,onClick:()=>E(`custom`),thumbnail:(0,W.jsx)(`img`,{src:F,alt:``,className:`h-8 w-8 rounded-md object-cover`})})]}):(0,W.jsxs)(W.Fragment,{children:[H,h?(0,W.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,W.jsx)(`div`,{className:`h-6 w-6 animate-spin rounded-full border-2 border-[var(--border-element)] border-t-[var(--content-tertiary)]`})}):(0,W.jsx)(`div`,{className:`py-8 text-center text-body-medium-lighter text-[var(--content-quiet)]`,children:`Unable to load avatar components. Make sure your assistant is running.`})]})}),(0,W.jsxs)(g.Footer,{className:`justify-between`,children:[(0,W.jsxs)(`div`,{className:`flex gap-2`,children:[(0,W.jsx)(n,{type:`button`,variant:`outlined`,iconOnly:(0,W.jsx)(P,{}),"aria-label":`Randomize`,tooltip:`Randomize`,onClick:ae,disabled:!v}),(0,W.jsx)(n,{type:`button`,variant:`outlined`,iconOnly:(0,W.jsx)(ie,{}),"aria-label":`Upload image`,tooltip:`Upload image`,onClick:se,disabled:j})]}),(0,W.jsx)(n,{type:`submit`,variant:`primary`,disabled:k||d||j,children:k||d?`Saving…`:`Save`})]})]}),(0,W.jsx)(`input`,{ref:f,type:`file`,accept:`image/png,image/jpeg,image/webp,image/gif`,className:`hidden`,onChange:le})]})})}function ye({value:e,onChange:t,disabled:n}){return(0,W.jsxs)(`label`,{className:`flex items-center justify-between gap-3 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-lift)] px-3 py-2`,children:[(0,W.jsx)(`span`,{className:`text-body-small-default uppercase tracking-wider text-[var(--content-quiet)]`,children:`Name`}),(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,W.jsx)(`div`,{className:`flex min-w-[80px] items-center justify-center`,children:(0,W.jsx)(`input`,{value:e,onChange:e=>t(e.target.value),disabled:n,maxLength:40,size:8,placeholder:`Name`,"aria-label":`Name`,className:`h-7 min-w-0 field-sizing-content bg-transparent text-center text-body-medium-default text-[var(--content-strong)] outline-none placeholder:text-[var(--content-tertiary)] disabled:cursor-not-allowed disabled:opacity-60`})}),(0,W.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-7 shrink-0`})]})]})}function be({label:e,description:t,thumbnail:n,onClick:r}){return(0,W.jsxs)(`button`,{type:`button`,onClick:r,className:`flex w-full cursor-pointer items-center gap-3 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-lift)] px-3 py-2 text-left transition-colors hover:bg-[var(--surface-hover)]`,children:[(0,W.jsx)(`span`,{className:`flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-md bg-[var(--surface-sunken)]`,children:n}),(0,W.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,W.jsx)(`span`,{className:`block truncate text-body-medium-default text-[var(--content-strong)]`,children:e}),(0,W.jsx)(`span`,{className:`block truncate text-body-small-default text-[var(--content-quiet)]`,children:t})]}),(0,W.jsx)(d,{className:`h-4 w-4 shrink-0 text-[var(--content-quiet)]`})]})}function xe({label:e,value:t,colorHex:n,onPrev:r,onNext:i}){return(0,W.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-lift)] px-3 py-2`,children:[(0,W.jsx)(`span`,{className:`text-body-small-default uppercase tracking-wider text-[var(--content-quiet)]`,children:e}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Previous ${e.toLowerCase()}`,className:`flex h-7 w-7 cursor-pointer items-center justify-center rounded-md text-[var(--content-quiet)] transition-colors hover:bg-[var(--surface-active)]`,children:(0,W.jsx)(u,{className:`h-4 w-4`})}),(0,W.jsxs)(`div`,{className:`flex min-w-[80px] items-center justify-center gap-2`,children:[n&&(0,W.jsx)(`div`,{className:`h-4 w-4 rounded-full border border-[var(--border-element)]`,style:{backgroundColor:n}}),(0,W.jsx)(`span`,{className:`text-body-medium-default capitalize text-[var(--content-strong)]`,children:t})]}),(0,W.jsx)(`button`,{type:`button`,onClick:i,"aria-label":`Next ${e.toLowerCase()}`,className:`flex h-7 w-7 cursor-pointer items-center justify-center rounded-md text-[var(--content-quiet)] transition-colors hover:bg-[var(--surface-active)]`,children:(0,W.jsx)(d,{className:`h-4 w-4`})})]})]})}function Se(e){let t=e.trim();return`<system-message>
2
- The user renamed you: your name is now ${t}.
3
-
4
- Update IDENTITY.md so its name line reads exactly \`- **Name:** ${t}\`. This is a rename only — keep everything else in IDENTITY.md and SOUL.md exactly as it is, and do not touch users/ (that is your user's profile, not your identity). If your name appears elsewhere in those files, update those mentions to ${t} too.
5
-
6
- Reply with a single short sentence acknowledging your new name.
7
- </system-message>`}async function Ce(e,t){return fe({assistantId:e,content:Se(t),title:`Updating name`,context:`identity_overview_rename`})}var we=6e4,Te=3;function K(e,t,n){return e===1?t:n}function Ee(e,{supportsPlugins:t,showChannels:n}){let r={assistant_id:e},i={staleTime:we,retry:!1,enabled:!0},o=a({...y({path:r,query:{kind:`installed`}}),select:e=>e.skills.length,...i}),s=a({...I(e),select:e=>e.plugins.length,enabled:t}),c=a({...w({path:r}),select:e=>e.apps.length,...i}),l=a({...v({path:r}),select:e=>e.documents.length,...i}),u=a({...S({path:r}),select:e=>e.entries.length,...i}),d=a({...b({path:r}),select:e=>e.contacts.length,...i}),f=a({...C({path:r}),select:e=>e.snapshots.filter(e=>e.ready).length,...i,enabled:n}),p=a({queryKey:x({path:r}),queryFn:()=>he(e),select:e=>{let t=e.filter(e=>e.enabled).sort((e,t)=>e.nextRunAt-t.nextRunAt);return{count:t.length,items:t.slice(0,Te).map(e=>({id:e.id,name:e.name,cadence:e.cadenceDescription,nextRunAt:e.nextRunAt}))}},...i}),m=a({queryKey:V(e),queryFn:()=>ue(e),...i});return{personality:{radar:m.data===void 0?void 0:z(m.data??{})},superpowers:o.data===void 0?void 0:{text:[`${o.data} ${K(o.data,`skill`,`skills`)}`,...s.data===void 0?[]:[`${s.data} ${K(s.data,`plugin`,`plugins`)}`]].join(` · `)},library:c.data===void 0?void 0:{text:[`${c.data} ${K(c.data,`app`,`apps`)}`,...l.data===void 0?[]:[`${l.data} ${K(l.data,`doc`,`docs`)}`]].join(` · `)},workspace:u.data===void 0?void 0:{value:u.data,label:K(u.data,`item`,`items`)},contacts:d.data===void 0?void 0:{value:d.data,label:K(d.data,`person`,`people`)},channels:f.data===void 0?void 0:{value:f.data,label:`connected`},schedules:p.data===void 0?void 0:p.data.count===0?{text:`Nothing scheduled yet`}:{value:p.data.count,label:`active`,schedules:{items:p.data.items,more:p.data.count-p.data.items.length}}}}var q=96,J=150,De=36,Oe=46,ke=58,Ae=(e,t,n)=>Math.max(t,Math.min(n,e));function je(e,t,n){let r=Ae(n.x-e.left,q,e.width-q),i=Ae(n.y-e.top,q,e.height-q);return{rect:e,facing:t,peek:t===`top`?{x:r,y:0}:t===`bottom`?{x:r,y:e.height}:t===`left`?{x:0,y:i}:{x:e.width,y:i}}}var Me={top:{x:0,y:-1},bottom:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0}},Ne={type:`spring`,stiffness:150,damping:19},Pe=.22,Fe=.15;function Ie({hex:e,components:t,traits:n,target:r}){let i=r!==null,[a,o]=(0,U.useState)(null);r&&r!==a&&o(r);let s=r??a,[c,l]=(0,U.useState)(!1);(0,U.useEffect)(()=>{let e=!1,t,n=()=>{t=setTimeout(()=>{e||(l(!0),t=setTimeout(()=>{e||(l(!1),n())},140))},2500+Math.random()*4e3)};return n(),()=>{e=!0,clearTimeout(t)}},[]);let u=(0,U.useMemo)(()=>{let e=t.eyeStyles.find(e=>e.id===n.eyeStyle);return e?{paths:e.paths,bbox:N(e.paths.map(e=>L(e.svgPath)))}:null},[t,n.eyeStyle]);if(!u||!s)return null;let{rect:d,facing:f,peek:p}=s,m={x:d.left+p.x,y:d.top+p.y},h=Me[f],g=u.bbox.h/u.bbox.w,_=ke,v=_*g,y={x:m.x+h.x*De,y:m.y+h.y*De},b={x:-h.x*Oe,y:-h.y*Oe},x=u.bbox.x+u.bbox.w/2,S=u.bbox.y+u.bbox.h/2,C=i?{...Ne,delay:Pe,opacity:{duration:.15,delay:Pe}}:{duration:Fe};return(0,W.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-0`,children:[(0,W.jsx)(k.div,{className:`absolute top-0 left-0 rounded-full`,style:{backgroundColor:e,width:J,height:J},initial:!1,animate:{x:m.x-J/2+(i?0:b.x),y:m.y-J/2+(i?0:b.y),opacity:+!!i},transition:C}),(0,W.jsx)(k.div,{className:`absolute top-0 left-0`,initial:!1,animate:{x:y.x-_/2+(i?0:b.x),y:y.y-v/2+(i?0:b.y),width:_,height:v,opacity:+!!i},transition:C,children:(0,W.jsx)(`svg`,{viewBox:`${u.bbox.x} ${u.bbox.y} ${u.bbox.w} ${u.bbox.h}`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`,style:{overflow:`visible`,display:`block`},children:(0,W.jsx)(`g`,{style:{transform:c?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${x}px ${S}px`,transition:`transform 0.14s ease-in-out`},children:u.paths.map((e,t)=>(0,W.jsx)(`path`,{d:e.svgPath,fill:e.color},t))})})})]})}var Le=65,Re=26;function ze(e,t){let n=A(),[r,i]=(0,U.useState)(n?e.length:0);return(0,U.useEffect)(()=>{if(n){i(e.length);return}i(0);let r=setInterval(()=>{i(t=>t>=e.length?(clearInterval(r),t):t+1)},t);return()=>clearInterval(r)},[e,t,n]),{typed:e.slice(0,r),typing:r<e.length}}function Be({name:e,isRenaming:t,overrideText:n=null}){let r=n??`Hi, I’m ${e}`,{typed:i,typing:a}=ze(r,n?Re:Le);return(0,W.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,W.jsxs)(`h1`,{"aria-label":r,className:`relative leading-none whitespace-nowrap text-[var(--content-strong)] ${n?`text-[2.1rem] max-sm:text-[1.4rem]`:`text-[3.25rem] max-sm:text-[2rem]`}`,style:{fontFamily:`var(--font-serif)`},children:[(0,W.jsx)(`span`,{className:`invisible`,"aria-hidden":`true`,children:r}),(0,W.jsxs)(`span`,{className:`absolute inset-0`,"aria-hidden":`true`,children:[i,a&&(0,W.jsx)(`span`,{className:`animate-pulse`,children:`▎`})]})]}),!n&&t&&(0,W.jsx)(`div`,{"aria-label":`Renaming in progress`,className:`h-5 w-5 shrink-0 animate-spin rounded-full border-2 border-[var(--border-base)]`,style:{borderTopColor:`var(--content-default)`}})]})}function Y(e,t){let{label:n,to:r}=E(e);return{key:e,label:n,description:t,to:r}}function Ve({showChannels:e,showMemory:t}){let n=[{key:`personality`,label:`Personality`,description:`Tune how I talk`,to:D.personality},Y(`schedules`,`My routines`),Y(`superpowers`,`What I can do`)];return t&&n.push(Y(`memory`,`What I remember`)),n.push(Y(`library`,`My apps & docs`),Y(`workspace`,`My files`),Y(`contacts`,`People I know`)),e&&n.push(Y(`channels`,`Where I listen`)),n}var X=[{label:`Coworker`,sub:`vs. companion`,value:e=>Z(e,`companion-coworker`)},{label:`Baby Boomer`,sub:`vs. Gen Z`,value:e=>Z(e,`genz-boomer`)},{label:`Collaborative`,sub:`vs. independent`,value:e=>Z(e,`execute-collaborate`)},{label:`Serious`,sub:`vs. playful`,value:e=>Z(e,`playful-serious`)},{label:`Unfiltered`,sub:`vs. polite`,value:e=>Z(e,`polite-unfiltered`)}];function Z(e,t){let n=e[t]??de;return Math.max(0,Math.min(100,n))}var He=356,Ue=246,We=He/2,Q=132,$=100,Ge=.1,Ke=[.25,.5,.75,1],qe=[{anchor:`middle`,dx:0,dy:-18},{anchor:`start`,dx:9,dy:-2},{anchor:`start`,dx:-10,dy:17},{anchor:`end`,dx:10,dy:17},{anchor:`end`,dx:-9,dy:-2}];function Je(e,t){let n=-Math.PI/2+e*2*Math.PI/X.length;return{x:We+t*Math.cos(n),y:Q+t*Math.sin(n)}}function Ye(e){return X.map((t,n)=>{let r=Je(n,e(n));return`${r.x.toFixed(1)},${r.y.toFixed(1)}`}).join(` `)}function Xe({values:e,className:t}){let n=X.map(t=>`${t.label} ${Math.round(t.value(e))}`).join(`, `);return(0,W.jsxs)(`svg`,{viewBox:`0 0 ${He} ${Ue}`,role:`img`,"aria-label":`Personality: ${n}`,className:t,children:[Ke.map(e=>(0,W.jsx)(`polygon`,{points:Ye(()=>$*e),fill:`none`,stroke:`currentColor`,strokeOpacity:.25,strokeWidth:1,strokeLinejoin:`round`},e)),X.map((e,t)=>{let n=Je(t,$);return(0,W.jsx)(`line`,{x1:We,y1:Q,x2:n.x,y2:n.y,stroke:`currentColor`,strokeOpacity:.25,strokeWidth:1},t)}),(0,W.jsx)(k.g,{initial:{scale:.4,opacity:0},animate:{scale:1,opacity:1},transition:{type:`spring`,stiffness:140,damping:16},style:{transformOrigin:`${We}px ${Q}px`},children:(0,W.jsx)(`polygon`,{points:Ye(t=>$*Math.max(Ge,X[t].value(e)/100)),fill:`var(--card-accent)`,fillOpacity:.25,stroke:`var(--card-accent)`,strokeWidth:2,strokeLinejoin:`round`})}),X.map((e,t)=>{let n=qe[t],r=Je(t,$),i=r.x+n.dx;return(0,W.jsxs)(`text`,{x:i,y:r.y+n.dy,textAnchor:n.anchor,children:[(0,W.jsx)(`tspan`,{x:i,fontSize:11.5,fontWeight:500,fill:`currentColor`,children:e.label}),(0,W.jsx)(`tspan`,{x:i,dy:12.5,fontSize:10,fill:`currentColor`,fillOpacity:.8,children:e.sub})]},e.label)})]})}var Ze={personality:m,schedules:M,superpowers:se,memory:l,library:ae,workspace:f,contacts:h,channels:_e},Qe={personality:`rounded-3xl`,schedules:`rounded-3xl`,superpowers:`rounded-[1.25rem_2.75rem_1.25rem_2.5rem]`,channels:`rounded-[2.25rem_1rem_2.5rem_1.25rem]`,contacts:`rounded-[1rem_2.5rem_1.25rem_2.75rem]`,workspace:`rounded-[1.25rem_2.5rem_1rem_2.5rem]`},$e=720,et=480,tt=[`superpowers`,`memory`,`library`,`workspace`,`contacts`,`channels`],nt={personality:`Go ahead — tweak my soul`,superpowers:`Everything I know how to do`,memory:`Everything I remember`,library:`The apps and docs I've made for you`,schedules:`What I do on repeat`,workspace:`All the files that power me`,contacts:`The people I know and trust`,channels:`All the places you can reach me`};function rt(e){return!Number.isFinite(e)||e<=0?`—`:new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}var it=280,at=140,ot=.44,st=1118,ct=300,lt=.09,ut=14,dt=5,ft=22;function pt({assistantId:e}){let t=i(),{components:n,traits:r,customImageUrl:o,isLoading:s,invalidate:c}=j(e),l=H(e),u=re(),d=O.use.channelTrustFloors(),f=Ee(e,{supportsPlugins:u,showChannels:d}),p=a(ge(e)),m=p.data?.kind===`ready`&&p.data.graphSupported,h={...f,memory:p.data?.kind===`ready`?{value:p.data.concepts,label:p.data.concepts===1?`memory`:`memories`}:void 0},[g,v]=(0,U.useState)(!1),[y,b]=(0,U.useState)(!1),x=(0,U.useCallback)(n=>{b(!0),Ce(e,n).then(r=>{if(b(!1),r){t.invalidateQueries({queryKey:me(e)});let{version:r,setIdentity:i}=T.getState();i(n,r),_.success(`Say hi to ${n}!`)}else _.error(`The rename didn't go through. Please try again.`)})},[e,t]),S=(0,U.useCallback)(()=>{c()},[c]),C=Ve({showChannels:d,showMemory:m}),w=s||l.isLoading,E=pe(n,r);return(0,W.jsxs)(le,{style:E?{backgroundColor:`color-mix(in srgb, ${E} ${ut}%, var(--surface-overlay))`}:void 0,children:[w?(0,W.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,W.jsx)(`div`,{className:`h-6 w-6 animate-spin rounded-full border-2`,style:{borderColor:`var(--border-base)`,borderTopColor:`var(--content-tertiary)`}})}):(0,W.jsx)(gt,{components:n,traits:r,customImageUrl:o,name:l.data?.identity?.name||`Assistant`,sections:C,stats:h,avatarHex:E,isRenaming:y,onOpenAvatarModal:()=>v(!0)}),(0,W.jsx)(ve,{open:g,onClose:()=>v(!1),assistantId:e,components:n,traits:r,customImageUrl:o,onSaveCharacter:S,onUploadImage:S,assistantName:l.data?.identity?.name||`Assistant`,onRenameSubmit:x,isRenaming:y})]})}function mt({section:e,stat:t,gridArea:n,cardStyle:i,hoverFill:a,mini:o,stacked:c,flooded:l=!1,floodOrigin:u,linkRef:d,onHoverChange:f}){let p=Ze[e.key]??m,[h,g]=(0,U.useState)({x:50,y:100});u&&u!==h&&g(u);let _=l?`text-[var(--card-flood-fg)]`:`text-[var(--content-default)]`,v=l?`text-[var(--card-flood-fg)]`:`text-[var(--content-strong)]`,y=l?`text-[var(--card-flood-fg)] opacity-75`:`text-[var(--content-secondary)]`,b=(0,W.jsx)(k.span,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0`,style:{backgroundColor:`var(--card-accent)`},initial:!1,animate:{clipPath:l?`circle(141% at ${h.x}% ${h.y}%)`:`circle(0% at ${h.x}% ${h.y}%)`},transition:l?{duration:.5,ease:`easeOut`}:{duration:.35,ease:`easeIn`}});if(c){let n=t?.value===void 0?t?.text:`${t.value} ${t.label??``}`.trim();return(0,W.jsx)(s.Root,{asChild:!0,bordered:!0,elevated:!0,clipContents:!0,className:`rounded-2xl bg-[var(--card-bg)]`,children:(0,W.jsxs)(r,{to:e.to,className:`relative flex h-full w-full cursor-pointer flex-col gap-1 p-4 text-left transition-all duration-150 hover:bg-[var(--card-hover)] active:scale-[0.98]`,children:[(0,W.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(p,{className:`h-5 w-5 shrink-0 text-[var(--content-default)]`,"aria-hidden":!0}),(0,W.jsx)(`span`,{className:`truncate text-body-medium-default text-[var(--content-default)]`,children:e.label})]}),(0,W.jsx)(`span`,{className:`text-[13px] text-[var(--content-secondary)]`,children:e.description}),n&&(0,W.jsx)(`span`,{className:`mt-auto truncate pt-1 text-[12px] font-medium text-[var(--content-tertiary)]`,children:n})]})})}if(o){let n=t?.value===void 0?t?.text:`${t.value} ${t.label}`;return(0,W.jsx)(s.Root,{asChild:!0,bordered:!1,elevated:!0,clipContents:!0,className:`rounded-[12px] border-0 bg-[var(--card-bg)]`,children:(0,W.jsxs)(r,{to:e.to,ref:d,onMouseEnter:()=>f?.(!0),onMouseLeave:()=>f?.(!1),className:`relative flex h-full flex-1 cursor-pointer items-center gap-2 px-4 py-2.5 transition-all duration-150 active:scale-[0.98] ${a?`hover:bg-[var(--card-hover)]`:``}`,children:[b,(0,W.jsx)(`span`,{className:`relative flex h-10 w-10 shrink-0 items-center justify-center`,children:(0,W.jsx)(p,{className:`h-5 w-5 transition-colors duration-300 ${y}`,"aria-hidden":!0})}),(0,W.jsxs)(`span`,{className:`relative flex min-w-0 flex-col gap-0`,children:[(0,W.jsx)(`span`,{className:`truncate text-title-small leading-normal transition-colors duration-300 ${v}`,children:e.label}),n&&(0,W.jsx)(`span`,{className:`truncate text-[11px] leading-normal font-medium transition-colors duration-300 ${l?`text-[var(--card-flood-fg)] opacity-75`:`text-[var(--content-tertiary)]`}`,children:n})]})]})})}let x=e.key===`personality`||e.key===`schedules`;return(0,W.jsx)(s.Root,{asChild:!0,bordered:!x,elevated:!x,className:`${Qe[e.key]??``} ${x?`border border-[var(--border-base)] bg-[var(--card-feature-bg,var(--card-bg))]`:`bg-[var(--card-bg)]`}`,style:{...n?{gridArea:n}:{},...i},children:(0,W.jsxs)(r,{to:e.to,ref:d,onMouseEnter:()=>f?.(!0),onMouseLeave:()=>f?.(!1),className:`relative flex h-full w-full cursor-pointer flex-col justify-between gap-3 overflow-hidden p-5 text-left transition-all duration-150 active:scale-[0.98] ${a?`hover:bg-[var(--card-hover)]`:``}`,children:[b,n&&t?.radar&&(0,W.jsx)(`span`,{className:`absolute inset-x-5 top-14 bottom-4 flex items-center justify-center transition-colors duration-300 ${l?`text-[var(--card-flood-fg)]`:`text-[var(--content-secondary)]`}`,style:l?{"--card-accent":`var(--card-flood-fg)`}:void 0,children:(0,W.jsx)(Xe,{values:t.radar,className:`h-auto w-full`})}),x?(0,W.jsxs)(`span`,{className:`relative flex items-center gap-2`,children:[(0,W.jsx)(p,{className:`h-5 w-5 transition-colors duration-300 ${_}`,"aria-hidden":!0}),(0,W.jsx)(`span`,{className:`text-body-medium-default transition-colors duration-300 ${_}`,children:e.label})]}):(0,W.jsxs)(`span`,{className:`relative flex flex-col items-start gap-1.5`,children:[(0,W.jsx)(p,{className:`h-6 w-6 transition-colors duration-300 ${_}`,"aria-hidden":!0}),(0,W.jsxs)(`span`,{className:`flex flex-col`,children:[(0,W.jsx)(`span`,{className:`text-body-medium-default transition-colors duration-300 ${_}`,children:e.label}),(0,W.jsx)(`span`,{className:`text-[13px] transition-colors duration-300 ${y}`,children:e.description})]})]}),n&&t?.schedules&&t.schedules.items.length>0&&(0,W.jsxs)(`span`,{className:`relative flex min-h-0 flex-1 flex-col justify-start gap-2 overflow-hidden py-2`,children:[t.schedules.items.map(e=>(0,W.jsxs)(`span`,{className:`flex flex-col gap-0.5 rounded-xl px-3 py-2 transition-colors duration-300`,style:{backgroundColor:l?`color-mix(in srgb, var(--card-flood-fg) 12%, transparent)`:`color-mix(in srgb, var(--content-default) 5%, transparent)`},children:[(0,W.jsx)(`span`,{className:`truncate text-[13px] font-medium transition-colors duration-300 ${_}`,children:e.name}),(0,W.jsxs)(`span`,{className:`truncate text-[12px] transition-colors duration-300 ${y}`,children:[e.cadence,` · next `,rt(e.nextRunAt)]})]},e.id)),t.schedules.more>0&&(0,W.jsxs)(`span`,{className:`text-[12px] font-medium transition-colors duration-300 ${y}`,children:[`View `,t.schedules.more,` more…`]})]}),t?.value===void 0?t?.text?(0,W.jsx)(`span`,{className:`relative text-[14px] font-medium italic transition-colors duration-300 ${_}`,children:t.text}):null:(0,W.jsxs)(`span`,{className:`relative flex flex-col leading-none`,children:[(0,W.jsx)(`span`,{className:`text-[3.25rem] transition-colors duration-300 max-lg:text-[2.5rem] ${v}`,style:{fontFamily:`var(--font-serif)`},children:t.value}),(0,W.jsx)(`span`,{className:`mt-1 text-[13px] transition-colors duration-300 ${y}`,children:t.label})]})]})})}function ht({components:e,traits:t,customImageUrl:n,name:r,avatarSize:i,isRenaming:a,onEdit:o}){return(0,W.jsxs)(`div`,{className:`relative z-[1] flex flex-col items-center justify-center gap-5`,children:[(0,W.jsx)(Be,{name:r,isRenaming:a}),(0,W.jsx)(`button`,{type:`button`,"aria-label":`Update avatar and name`,title:`Update avatar and name`,onClick:o,className:`avatar-edit-cursor outline-none keyboard-focus:ring-2 keyboard-focus:ring-[var(--ring)]`,children:n&&!t?(0,W.jsx)(`img`,{src:n,alt:``,width:i,height:i,className:`rounded-full object-cover`,style:{width:i,height:i}}):(0,W.jsx)(R,{components:e,traits:t,customImageUrl:n,size:i,interactive:!0})})]})}function gt({components:e,traits:t,customImageUrl:n,name:r,sections:i,stats:a,avatarHex:o,isRenaming:s,onOpenAvatarModal:c}){let{ref:l,size:u}=B(),d=A(),f=u.w>=$e&&u.h>=et,m=Math.round(Math.min(it,Math.max(at,Math.min(u.w,u.h)*.32))),h=!!(o&&e&&t),g=f&&!d&&h,_=(0,U.useRef)(null),v=(0,U.useRef)({}),[y,b]=(0,U.useState)(null),x=(0,U.useCallback)(e=>{_.current=e,l(e)},[l]),S=(0,U.useCallback)((e,t)=>{if(!g)return;if(!t){b(null);return}let n=_.current,r=v.current[e];if(!n||!r)return;let i=n.getBoundingClientRect(),a=r.getBoundingClientRect(),o={left:a.left-i.left,top:a.top-i.top,width:a.width,height:a.height},s=(o.left+o.width/2-i.width/2)/(i.width/2),c=(o.top+o.height/2-i.height/2)/(i.height/2),l=je(o,Math.abs(s)>Math.abs(c)?s<0?`right`:`left`:c<0?`bottom`:`top`,{x:i.width/2,y:i.height/2});b({key:e,target:l,origin:{x:l.peek.x/o.width*100,y:l.peek.y/o.height*100}})},[g]),C=g?y:null,w=C?nt[C.key]??null:null,T={"--card-bg":o?`color-mix(in srgb, ${o} var(--card-tint-pct, ${dt}%), var(--card-surface, var(--surface-lift)))`:`var(--surface-lift)`,"--card-feature-bg":o?`color-mix(in srgb, var(--card-accent) 28%, var(--card-surface, var(--surface-lift)))`:`var(--surface-lift)`,"--card-hover":o?`color-mix(in srgb, ${o} ${ft}%, var(--card-surface, var(--surface-lift)))`:`var(--surface-hover)`,"--card-accent":o??`var(--content-default)`,"--card-flood-fg":o?ee(o):`var(--content-default)`},E=(u.h-8)/(1-lt),D=Math.round(Math.min(st,E,Math.max(ct,u.w*ot))),O=Math.round(D*lt),j=(0,W.jsx)(ht,{components:e,traits:t,customImageUrl:n,name:r,avatarSize:m,isRenaming:s,onEdit:c});if(!f)return(0,W.jsxs)(`div`,{ref:x,className:`identity-bento flex min-h-0 flex-1 flex-col items-center gap-6 overflow-y-auto px-2 py-4`,style:T,children:[j,(0,W.jsx)(`div`,{className:`grid w-full max-w-md shrink-0 grid-cols-2 gap-3`,children:i.map(e=>(0,W.jsx)(mt,{section:e,stat:a[e.key],hoverFill:!0,stacked:!0},e.key))})]});let M=i.filter(e=>!tt.includes(e.key)),N=i.filter(e=>tt.includes(e.key)),P=[1.15,1,.45,.3],F=(u.h-(P.length-1)*12)/P.reduce((e,t)=>e+t,0),te=Math.round(F*P[0]),I=(h?[`"personality greeting greeting greeting schedules"`,`". . . . schedules"`,`". . . . ."`,`"smalls smalls smalls smalls smalls"`]:[`"personality greeting greeting greeting schedules"`,`". avatar avatar avatar schedules"`,`". avatar avatar avatar ."`,`"smalls smalls smalls smalls smalls"`]).join(` `),ne=e=>({section:e,stat:a[e.key],hoverFill:!g,flooded:C?.key===e.key,floodOrigin:C?.key===e.key?C.origin:void 0,linkRef:t=>{v.current[e.key]=t},onHoverChange:t=>S(e.key,t)});return(0,W.jsxs)(`div`,{ref:x,className:`identity-bento relative grid min-h-0 flex-1 gap-3 overflow-hidden`,style:{...T,gridTemplateColumns:`1.55fr 1fr 1fr 1fr 1.55fr`,gridTemplateRows:P.map(e=>`${e}fr`).join(` `),gridTemplateAreas:I},children:[h?(0,W.jsx)(k.div,{className:`pointer-events-none absolute left-1/2 z-0`,style:{width:D,height:D,bottom:-O,x:`-50%`},initial:!1,animate:C?{scale:.4,opacity:0}:{scale:1,opacity:1},transition:C?{duration:.15}:{delay:.25,type:`spring`,stiffness:210,damping:18},children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-label":`Update avatar and name`,title:`Update avatar and name`,onClick:c,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),c())},className:`avatar-edit-cursor group pointer-events-auto relative h-full w-full scale-100 outline-none transition-transform duration-200 ease-out hover:scale-105 keyboard-focus:ring-2 keyboard-focus:ring-[var(--ring)]`,children:[(0,W.jsx)(R,{components:e,traits:t,customImageUrl:n,size:D,interactive:!0}),(0,W.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 flex items-center justify-center opacity-0 transition-opacity duration-150 group-hover:opacity-100`,children:(0,W.jsx)(`span`,{className:`flex h-11 w-11 items-center justify-center rounded-full bg-black/40`,children:(0,W.jsx)(p,{className:`h-5 w-5 text-white`})})})]})}):(0,W.jsx)(`div`,{className:`relative z-[1] flex items-start justify-center`,style:{gridArea:`avatar`},children:(0,W.jsx)(`button`,{type:`button`,"aria-label":`Update avatar and name`,title:`Update avatar and name`,onClick:c,className:`avatar-edit-cursor rounded-full outline-none keyboard-focus:ring-2 keyboard-focus:ring-[var(--ring)]`,children:n?(0,W.jsx)(`img`,{src:n,alt:``,width:m,height:m,className:`rounded-full object-cover`,style:{width:m,height:m}}):(0,W.jsx)(R,{components:e,traits:t,customImageUrl:null,size:m})})}),(0,W.jsx)(`div`,{className:`relative z-[1] flex items-center justify-center`,style:{gridArea:`greeting`},children:(0,W.jsx)(Be,{name:r,isRenaming:s,overrideText:w})}),g&&o&&e&&t&&(0,W.jsx)(Ie,{hex:o,components:e,traits:t,target:C?.target??null}),M.map(e=>(0,W.jsx)(mt,{...ne(e),gridArea:e.key,cardStyle:e.key===`schedules`?{alignSelf:`start`,height:`auto`,minHeight:te}:void 0},e.key)),(0,W.jsx)(`div`,{className:`flex min-h-0 items-stretch gap-3`,style:{gridArea:`smalls`},children:N.map(e=>(0,W.jsx)(mt,{...ne(e),mini:!0},e.key))})]})}function _t(){return(0,W.jsx)(pt,{assistantId:F()})}function vt(){return(0,W.jsx)(_t,{},F())}export{vt as IdentityPageRoute};