@vellumai/web 0.10.0-dev.202606232234.a0ec2ee → 0.10.0-dev.202606232330.324e2b5
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.
- package/dist/assets/AnimatePresence-iz8Br0FI.js +9 -0
- package/dist/assets/{BundleConfirmPage-B1RL5CT5.js → BundleConfirmPage-BTA9TT5I.js} +1 -1
- package/dist/assets/{account-page-R8a5fBBh.js → account-page-DGwgAVyX.js} +1 -1
- package/dist/assets/{add-credits-modal-CEUrMoQj.js → add-credits-modal-Cy7ki3-t.js} +1 -1
- package/dist/assets/{advanced-page-DnjewDHv.js → advanced-page-j2RGA2Fz.js} +1 -1
- package/dist/assets/ai-page-BaejddPz.js +1 -0
- package/dist/assets/{api-3c19ug52.js → api-cAuUFz5w.js} +1 -1
- package/dist/assets/{api-key-screen-BIODnYkk.js → api-key-screen-Dnb_7XNv.js} +1 -1
- package/dist/assets/{archive-page-CR3fN0Wv.js → archive-page-iAsxS3hS.js} +1 -1
- package/dist/assets/{assistant-api-vSnIa3sZ.js → assistant-api-avRsRyfr.js} +1 -1
- package/dist/assets/{assistant-feature-flag-store-Dsy4oKrD.js → assistant-feature-flag-store-D9TvI9CG.js} +1 -1
- package/dist/assets/{assistant-identity-store-DaDnhbxy.js → assistant-identity-store-ADxStqSC.js} +1 -1
- package/dist/assets/{assistant-status-panel-Z97k6cfb.js → assistant-status-panel-CpyT-RWH.js} +1 -1
- package/dist/assets/{auth-store-C4RzAHYb.js → auth-store-DpyBV62g.js} +3 -3
- package/dist/assets/billing-page-Dq2HFELe.js +3 -0
- package/dist/assets/{bookmarks-page-BQiJcnLS.js → bookmarks-page-BuO9APN2.js} +1 -1
- package/dist/assets/brain-Dr-g1okf.js +1 -0
- package/dist/assets/browser-BGPcRLZJ.js +2 -0
- package/dist/assets/{build-state-DuIK2fOL.js → build-state-BaRV2QJp.js} +1 -1
- package/dist/assets/{capture-error-CN7ObyIk.js → capture-error-B1FKkx-w.js} +1 -1
- package/dist/assets/check--ppxmAB0.js +1 -0
- package/dist/assets/{client-feature-flag-store-BBZuNvNR.js → client-feature-flag-store-COQ42u-J.js} +1 -1
- package/dist/assets/{command-palette-BxHmFiji.js → command-palette-YJLl81TB.js} +1 -1
- package/dist/assets/{command-palette-window-page-DaZGYMiU.js → command-palette-window-page-C9cevpx3.js} +1 -1
- package/dist/assets/community-page-C_d3XUPV.js +1 -0
- package/dist/assets/{connect-page-BgPgIb-F.js → connect-page-Bx5bKl8A.js} +1 -1
- package/dist/assets/{consent-controls-Bk8etO5C.js → consent-controls-B4ZaRtSK.js} +1 -1
- package/dist/assets/{contacts-gateway-CZMULd7Z.js → contacts-gateway-oDQlajvE.js} +1 -1
- package/dist/assets/contacts-page-route-B-rrNKEj.js +1 -0
- package/dist/assets/{conversation-queries-UJw8TeCM.js → conversation-queries-CZRpIKsl.js} +1 -1
- package/dist/assets/{danger-zone-redirect-page-BsyYvQrZ.js → danger-zone-redirect-page-BCF1SY2f.js} +1 -1
- package/dist/assets/debug-page-DVTpfPtI.js +2 -0
- package/dist/assets/{deploy-dialogs-BgLsH4e3.js → deploy-dialogs-gTXXoxyi.js} +1 -1
- package/dist/assets/{developer-page-Dd1Kp8t3.js → developer-page-CAkTGK7m.js} +1 -1
- package/dist/assets/devices-page-DVC_KaD5.js +1 -0
- package/dist/assets/diagnostics-D5xXiLo-.js +1 -0
- package/dist/assets/dictation-overlay-page-DXATz-eV.js +1 -0
- package/dist/assets/document-viewer-page--LlDb0a6.js +1 -0
- package/dist/assets/earn-credits-modal-Hs8HTdIg.js +1 -0
- package/dist/assets/{emails-page-CLoCy3Gy.js → emails-page-BC4_QcO6.js} +1 -1
- package/dist/assets/esm-5V2_V7Ao.js +1 -0
- package/dist/assets/{esm-B9FuN3Io.js → esm-CJjEymow.js} +2 -2
- package/dist/assets/esm-CYrzAUNH.js +2 -0
- package/dist/assets/esm-ClC_4zcn.js +2 -0
- package/dist/assets/esm-CxEFp02j.js +2 -0
- package/dist/assets/esm-_pMRHia8.js +2 -0
- package/dist/assets/file-editor-6oGaaz5I.js +1 -0
- package/dist/assets/file-text-T9tdNL_S.js +1 -0
- package/dist/assets/general-page-Dln7SiLm.js +1 -0
- package/dist/assets/hatching-screen-BDzpKhV-.js +1 -0
- package/dist/assets/home-page-route-BeJEZUZE.js +1 -0
- package/dist/assets/{hosting-screen-zpKUZOtB.js → hosting-screen-0LfEO1Tx.js} +1 -1
- package/dist/assets/identity-page-route-DuG0Mw13.js +1 -0
- package/dist/assets/index-DvO8QWYd.css +2 -0
- package/dist/assets/index-zW00zfbZ.js +133 -0
- package/dist/assets/{inspect-page-C1HctBKK.js → inspect-page-lC22g25c.js} +4 -4
- package/dist/assets/install-d8ZTWR3V.js +1 -0
- package/dist/assets/integrations-page-DQwKNqxh.js +1 -0
- package/dist/assets/{intelligence-layout-D8p8C9xZ.js → intelligence-layout-DrtVPJGv.js} +1 -1
- package/dist/assets/{keyboard-shortcuts-page-RbG5LIND.js → keyboard-shortcuts-page-Mbj52hwO.js} +1 -1
- package/dist/assets/{library-detail-page-Cyqb0usY.js → library-detail-page-D7CInxvU.js} +1 -1
- package/dist/assets/library-page-Bvh4IDk2.js +1 -0
- package/dist/assets/{login-flow-BOS-pVHv.js → login-flow-DZA-nnkz.js} +1 -1
- package/dist/assets/login-page-Mzli0BX1.js +1 -0
- package/dist/assets/{logout-page-BeU5NGj9.js → logout-page-BaKwubjf.js} +1 -1
- package/dist/assets/{logs-layout-B4B3__y2.js → logs-layout-DvVYR2Nm.js} +1 -1
- package/dist/assets/{mcp-page-Cv3W_8gc.js → mcp-page-D1esF_33.js} +1 -1
- package/dist/assets/{memory-router-playground-page-D4DwzvKk.js → memory-router-playground-page-Cj8PGNe4.js} +1 -1
- package/dist/assets/messages-DzwhgOrZ.js +13 -0
- package/dist/assets/{metric-card-DxrlxUKS.js → metric-card-B9lrkqMn.js} +1 -1
- package/dist/assets/{mobile-sidebar-drawer-CoXN62Oe.js → mobile-sidebar-drawer-s2z-O_Mg.js} +1 -1
- package/dist/assets/monitor-C4H0YmtY.js +1 -0
- package/dist/assets/{native-file-LJQTmnKy.js → native-file-CI0ZuErz.js} +2 -2
- package/dist/assets/notifications-page-DOeVoqTx.js +1 -0
- package/dist/assets/{oauth-complete-page-Czdpa7o1.js → oauth-complete-page-DV24fYn6.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-DF6YMT5v.js → oauth-popup-complete-page-BBXNBXRb.js} +1 -1
- package/dist/assets/{pairing-page-BzoZ1QAP.js → pairing-page-DdxLXLGE.js} +1 -1
- package/dist/assets/{password-reset-page-BD2oysNq.js → password-reset-page-hgKX8TkA.js} +1 -1
- package/dist/assets/{platform-loopback-page-CFpjngdV.js → platform-loopback-page-BBkLlXku.js} +1 -1
- package/dist/assets/{plugin-detail-page-BHlZB2KE.js → plugin-detail-page-BmsmYYuw.js} +1 -1
- package/dist/assets/{plugins-page-CD45bGaG.js → plugins-page-CXHGGLqI.js} +1 -1
- package/dist/assets/prechat-CHU0E2N5.js +1 -0
- package/dist/assets/prechat-route-BQw36WWd.js +1 -0
- package/dist/assets/{prefs-Bfl4CYVc.js → prefs-C_bZT2s6.js} +1 -1
- package/dist/assets/privacy-page-DtAkQa7J.js +1 -0
- package/dist/assets/{privacy-screen-D7QieRZ_.js → privacy-screen-YoHhisk5.js} +1 -1
- package/dist/assets/{provider-callback-page-BTKDPTsY.js → provider-callback-page-BTeIblx3.js} +1 -1
- package/dist/assets/{provider-key-CK_U6Kex.js → provider-key-D0LokE4r.js} +1 -1
- package/dist/assets/{provider-signup-page-pRba2ZSX.js → provider-signup-page-D3RYgJWb.js} +1 -1
- package/dist/assets/{proxy-BIinmo3T.js → proxy-BMd4CkvC.js} +1 -1
- package/dist/assets/{quick-input-page-B8bRJhco.js → quick-input-page-D6m4Cz6t.js} +1 -1
- package/dist/assets/{react-query.gen-CRARj4mG.js → react-query.gen-B0Od5MEZ.js} +1 -1
- package/dist/assets/{react-query.gen-DfnbKPpc.js → react-query.gen-UxQpJSKv.js} +1 -1
- package/dist/assets/{research-mock-page-CYSDOcQQ.js → research-mock-page-DmTVd2G5.js} +1 -1
- package/dist/assets/{research-onboarding-route-CsaTpyde.js → research-onboarding-route-CM7Qy4m6.js} +2 -2
- package/dist/assets/{resize-errors-D0YsLvoI.js → resize-errors-Cwhknbdt.js} +1 -1
- package/dist/assets/{review-terms-screen-C0LJLbjD.js → review-terms-screen-D1fpq4VM.js} +1 -1
- package/dist/assets/risk-badge-99_sim2V.js +1 -0
- package/dist/assets/{schedules-Dbclu3k6.js → schedules-Bq3n9-h4.js} +1 -1
- package/dist/assets/{sdk.gen-W0KlW-sG.js → sdk.gen-CpbzVVcg.js} +1 -1
- package/dist/assets/{sdk.gen-0RzHFsEa.js → sdk.gen-DSjI3deY.js} +1 -1
- package/dist/assets/select-assistant-screen-gKodXP1f.js +1 -0
- package/dist/assets/{settings-layout-Dy-gXdku.js → settings-layout-Bsis_AmI.js} +1 -1
- package/dist/assets/share-feedback-modal-BdyO9mLm.js +1 -0
- package/dist/assets/{sidebar-tree-fqfE1SOK.js → sidebar-tree-CBPLk84i.js} +1 -1
- package/dist/assets/signup-page-CokCjjAn.js +1 -0
- package/dist/assets/{signup-shell-sX9e7j0s.js → signup-shell-BaFbh88c.js} +1 -1
- package/dist/assets/skills-page-m43_-Q3A.js +1 -0
- package/dist/assets/{sound-manager-BJ26N0gf.js → sound-manager-CK5IxnGd.js} +1 -1
- package/dist/assets/{sounds-page-Cfs-obvd.js → sounds-page-BwUzXh5n.js} +1 -1
- package/dist/assets/{step-indicator-dots-BBfCIYjP.js → step-indicator-dots-D59Jabkb.js} +1 -1
- package/dist/assets/subagent-detail-panel-NU_X8OLl.js +4 -0
- package/dist/assets/subagent-store-DZ6NLAsv.js +3 -0
- package/dist/assets/{system-events-page-BGNpqJOh.js → system-events-page-BlW8RXQy.js} +1 -1
- package/dist/assets/{system-events-redirect-page-DygqxqRr.js → system-events-redirect-page-Do-Frthq.js} +1 -1
- package/dist/assets/{tiptap-document-editor-DRhL4JxL.js → tiptap-document-editor-BQ8qJzEb.js} +1 -1
- package/dist/assets/tool-call-status-DNS6Y_vi.js +1 -0
- package/dist/assets/tool-detail-panel-Cd5D13Ia.js +2 -0
- package/dist/assets/trace-page-CI-jDbiw.js +1 -0
- package/dist/assets/{upgrade-cancel-page-Cj7YI3kj.js → upgrade-cancel-page-BVcoLAej.js} +1 -1
- package/dist/assets/{upgrade-success-page-hVr6IkMF.js → upgrade-success-page-DCeChep8.js} +1 -1
- package/dist/assets/{usage-page-BrQkgwqa.js → usage-page-B9HkVb2M.js} +1 -1
- package/dist/assets/{use-bus-subscription-D-1qIPnj.js → use-bus-subscription-CKWguMzy.js} +1 -1
- package/dist/assets/use-is-org-ready-Bl2ATsDD.js +1 -0
- package/dist/assets/{use-onboarding-login-DNoOGKo1.js → use-onboarding-login-DYAP8BZ8.js} +1 -1
- package/dist/assets/{use-plugin-drift-B5uLDuHi.js → use-plugin-drift-CG8A-2Os.js} +1 -1
- package/dist/assets/{use-reduced-motion-DgX4o6QR.js → use-reduced-motion-DomgCP7o.js} +1 -1
- package/dist/assets/user-plus-GD_iwAWy.js +1 -0
- package/dist/assets/{utils-DugRzWBW.js → utils-eWxz_g-8.js} +1 -1
- package/dist/assets/{viewer-store-CTNS5BCs.js → viewer-store-CPjUKgV0.js} +1 -1
- package/dist/assets/{voice-page-BTV_xGUz.js → voice-page-CI_qUA_q.js} +1 -1
- package/dist/assets/weather-forecast-display-CxgG1DJM.js +1 -0
- package/dist/assets/{web-DuA0h7oK.js → web-B426K90I.js} +1 -1
- package/dist/assets/{web-ByMNu3A_.js → web-BDmMa2Ah.js} +1 -1
- package/dist/assets/{web-CUTiBnsF.js → web-BI7Og_dq.js} +1 -1
- package/dist/assets/{web-CyTCBnAZ.js → web-BjJEIboG.js} +1 -1
- package/dist/assets/{web-B4ULoQq5.js → web-BsjDq2-Z.js} +1 -1
- package/dist/assets/{web-CvCsdCeT.js → web-C5TKmyZ7.js} +1 -1
- package/dist/assets/{web-DTFLfPeG.js → web-CkqagAoR.js} +1 -1
- package/dist/assets/{welcome-screen-DyQcHXd8.js → welcome-screen-BTKpXIjj.js} +1 -1
- package/dist/assets/workflow-detail-panel-j9Wr8dVj.js +1 -0
- package/dist/assets/workflow-status-B53qU9DS.js +1 -0
- package/dist/assets/workspace-page-kBCtYK8q.js +1 -0
- package/dist/index.html +92 -79
- package/package.json +1 -1
- package/dist/assets/ai-page-DKDJHsG3.js +0 -1
- package/dist/assets/billing-page-DfQRqyTM.js +0 -3
- package/dist/assets/community-page-CHbHLJjY.js +0 -1
- package/dist/assets/contacts-page-route-DTbwmQqJ.js +0 -1
- package/dist/assets/debug-page-DAVGKtzn.js +0 -2
- package/dist/assets/devices-page-J7dGjusx.js +0 -1
- package/dist/assets/dictation-overlay-page-fZloHm_P.js +0 -1
- package/dist/assets/document-viewer-page-sjuFPEcp.js +0 -1
- package/dist/assets/dollar-sign-Bi1OUcqU.js +0 -1
- package/dist/assets/earn-credits-modal-BITskmHR.js +0 -1
- package/dist/assets/esm-BIUrrGWd.js +0 -2
- package/dist/assets/esm-BT7uz_mC.js +0 -2
- package/dist/assets/esm-BU45yXtJ.js +0 -2
- package/dist/assets/esm-D51SsTmc.js +0 -2
- package/dist/assets/esm-KT7CwnAY.js +0 -1
- package/dist/assets/file-editor-B4j7HFWX.js +0 -1
- package/dist/assets/general-page-CC4lAm3N.js +0 -1
- package/dist/assets/hatching-screen--jLesq1U.js +0 -1
- package/dist/assets/home-page-route-ZHcjE7XW.js +0 -1
- package/dist/assets/identity-page-route-88w2927-.js +0 -1
- package/dist/assets/index-BISBDag8.css +0 -2
- package/dist/assets/index-BMzt4IK0.js +0 -155
- package/dist/assets/install-BBV47nBh.js +0 -1
- package/dist/assets/integrations-page-Dd4Vp7n2.js +0 -1
- package/dist/assets/library-page-CxnECBcm.js +0 -1
- package/dist/assets/login-page-BnA-CA0R.js +0 -1
- package/dist/assets/notifications-page-BHcIVnmv.js +0 -1
- package/dist/assets/prechat-route-EckH9RGZ.js +0 -1
- package/dist/assets/privacy-page-BNTfg3Qg.js +0 -1
- package/dist/assets/select-assistant-screen-CNOxwQcY.js +0 -1
- package/dist/assets/share-feedback-modal-BZdCuu1S.js +0 -1
- package/dist/assets/signup-page-Dt0w9zUF.js +0 -1
- package/dist/assets/skills-page-BtTRlmnZ.js +0 -1
- package/dist/assets/subagent-detail-panel-2T72H5aP.js +0 -4
- package/dist/assets/subagent-status-DOJQZKTk.js +0 -1
- package/dist/assets/tool-detail-panel-BydfD62I.js +0 -2
- package/dist/assets/trace-page-BCyPAwPb.js +0 -1
- package/dist/assets/use-is-org-ready-CZmqWppb.js +0 -1
- package/dist/assets/weather-forecast-display-BwpAH09L.js +0 -1
- package/dist/assets/workflow-detail-panel-B4chWV66.js +0 -1
- package/dist/assets/workspace-page-BOfsCDnS.js +0 -1
- /package/dist/assets/{about-page-CW4mH7w7.js → about-page-DaPYiKWO.js} +0 -0
- /package/dist/assets/{account-shell-BBL0HqTX.js → account-shell-f2__fVz3.js} +0 -0
- /package/dist/assets/{api-errors-C3sAdlZQ.js → api-errors-0Nc54XoL.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-f4-fradg.js → avatar-bundled-components-DoxUXsZB.js} +0 -0
- /package/dist/assets/{avatar-svg-compositor-DMT4wmUm.js → avatar-svg-compositor-CZqTxX-j.js} +0 -0
- /package/dist/assets/{bookmark-Bw04OiC7.js → bookmark-4-_yZlIc.js} +0 -0
- /package/dist/assets/{bug-Dyqld0Aa.js → bug-CMW9IjPs.js} +0 -0
- /package/dist/assets/{build.umd-CPG-O6Se.js → build.umd-C-9hxmJK.js} +0 -0
- /package/dist/assets/{cable-CYB4K1nY.js → cable-BiOA4X3s.js} +0 -0
- /package/dist/assets/{calendar-DUv7hzHD.js → calendar-dQ-XyCCt.js} +0 -0
- /package/dist/assets/{chevron-left-BFX62ERI.js → chevron-left-ClCJWSFJ.js} +0 -0
- /package/dist/assets/{chevron-right-Cc3NZhAF.js → chevron-right-tE0cNIPR.js} +0 -0
- /package/dist/assets/{chevron-up-BT6xIbCo.js → chevron-up-BKRBtzG6.js} +0 -0
- /package/dist/assets/{circle-alert-D58pfVBz.js → circle-alert-DQGuXP1U.js} +0 -0
- /package/dist/assets/{circle-check-BKkxjdE1.js → circle-check-DTQwtuba.js} +0 -0
- /package/dist/assets/{client.gen-Bx3pJMXa.js → client.gen-BNxIEois.js} +0 -0
- /package/dist/assets/{client.gen-DzaL5PKF.js → client.gen-BnoNy2w0.js} +0 -0
- /package/dist/assets/{cloud-off-DfVAWu4D.js → cloud-off-DvFsW6NR.js} +0 -0
- /package/dist/assets/{code-CfKv4BKJ.js → code-BS9l0ZqL.js} +0 -0
- /package/dist/assets/{composer-focus-D-P0cGAF.js → composer-focus-BZr63Cvs.js} +0 -0
- /package/dist/assets/{conversation-selection-CrdMTnwx.js → conversation-selection-CNu7j2Xb.js} +0 -0
- /package/dist/assets/{conversation-store-I2d3A6Tv.js → conversation-store-nVJwhymp.js} +0 -0
- /package/dist/assets/{cpu-fIfNq834.js → cpu-DguWxw2B.js} +0 -0
- /package/dist/assets/{credit-card-CcU-1-nT.js → credit-card-D36YQXB8.js} +0 -0
- /package/dist/assets/{definitions-B4RRVbRh.js → definitions--qkv65-s.js} +0 -0
- /package/dist/assets/{detail-card-QPVpO5cj.js → detail-card-BnPZuM3e.js} +0 -0
- /package/dist/assets/{dist-3i_EPbLt.js → dist-CzyDxYAs.js} +0 -0
- /package/dist/assets/{domain-field-BqCbfaBb.js → domain-field-95x0MXna.js} +0 -0
- /package/dist/assets/{edit-chat-session-DXSCprPw.js → edit-chat-session-BYvbyTwd.js} +0 -0
- /package/dist/assets/{effective-timezone-DBaPUyaX.js → effective-timezone-DAkNzd21.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-C0EjtsOi.js → emoji-catalog-data-B_lm6Crq.js} +0 -0
- /package/dist/assets/{environment-store-DoO5ZqXZ.js → environment-store-C_XwUYTL.js} +0 -0
- /package/dist/assets/{event-bus-CFhOgvB8.js → event-bus-CBil9JQT.js} +0 -0
- /package/dist/assets/{external-link-CyRCaWBE.js → external-link-DfOdZztV.js} +0 -0
- /package/dist/assets/{feature-flag-catalog-DA3Oxvet.js → feature-flag-catalog-CgnyKvoS.js} +0 -0
- /package/dist/assets/{format-B2A6k4bb.js → format-HKnibeVj.js} +0 -0
- /package/dist/assets/{format-date-Cx9GZ7-D.js → format-date-DyMQp2_m.js} +0 -0
- /package/dist/assets/{format-file-size-Br1LCKQi.js → format-file-size-DOcXaUaE.js} +0 -0
- /package/dist/assets/{globe-CiNEZj-J.js → globe-Cn8KO1Gw.js} +0 -0
- /package/dist/assets/{google-logo-DNkI-jCf.js → google-logo-C0Ye7zqf.js} +0 -0
- /package/dist/assets/{haptics-BCTVEX6s.js → haptics-CKwMH4eq.js} +0 -0
- /package/dist/assets/{hard-drive-BbaHN7Gp.js → hard-drive-C6rwmPUP.js} +0 -0
- /package/dist/assets/{impersonate-version-flag-BksY65Mo.js → impersonate-version-flag-Caig8rhF.js} +0 -0
- /package/dist/assets/{info-CUuJWmsF.js → info-CAHMkXVD.js} +0 -0
- /package/dist/assets/{lib-BVvJNDCQ.js → lib-Ck-V6pPR.js} +0 -0
- /package/dist/assets/{link-2-C6BJ3RH_.js → link-2-JAgAspf6.js} +0 -0
- /package/dist/assets/{llm-dimension-ovOt_D6t.js → llm-dimension-Dx3xIzPP.js} +0 -0
- /package/dist/assets/{loader-circle-YAV9sMh_.js → loader-circle-Bwz4b6EM.js} +0 -0
- /package/dist/assets/{log-in-BPJxI98d.js → log-in-CMiO2UQ2.js} +0 -0
- /package/dist/assets/{minimize-2-BFkjQhB_.js → minimize-2-ZvHTTgPw.js} +0 -0
- /package/dist/assets/{misc-Dm72afTZ.js → misc-CBD9JJCY.js} +0 -0
- /package/dist/assets/{moon-D-eeNLvA.js → moon-CCfINVi9.js} +0 -0
- /package/dist/assets/{mutation-error-BjiE6W0q.js → mutation-error-CYNKNnwE.js} +0 -0
- /package/dist/assets/{native-deep-link-CYaeyOfj.js → native-deep-link-DmJ7Ty6z.js} +0 -0
- /package/dist/assets/{page-shell-W5IMIXQq.js → page-shell-R_mNcK6L.js} +0 -0
- /package/dist/assets/{pdf-DhvXjkis.js → pdf-Bi0PDaJC.js} +0 -0
- /package/dist/assets/{pencil-Cyrr5VNX.js → pencil-Cj2JZpt1.js} +0 -0
- /package/dist/assets/{prechat-names-CkLrL-Jh.js → prechat-names-Bo5bdzfH.js} +0 -0
- /package/dist/assets/{public-asset-CH9GPeL_.js → public-asset-BTisO-cB.js} +0 -0
- /package/dist/assets/{reduced-motion-8QnGN6lg.js → reduced-motion-BZH7waJ6.js} +0 -0
- /package/dist/assets/{refresh-cw-C7wug6Q3.js → refresh-cw-0jli_g4B.js} +0 -0
- /package/dist/assets/{return-to-BcgKmS7W.js → return-to-wmSt1cLz.js} +0 -0
- /package/dist/assets/{routes-BLyehs4B.js → routes-DNIOvC8p.js} +0 -0
- /package/dist/assets/{save-DdguSDQ1.js → save-CRKNVxDS.js} +0 -0
- /package/dist/assets/{semver-aan9RUyA.js → semver-DpUibCte.js} +0 -0
- /package/dist/assets/{setting-row-BHlMSre_.js → setting-row-DuHadCFy.js} +0 -0
- /package/dist/assets/{sparkles-BoIJjAXt.js → sparkles-u4oREtTu.js} +0 -0
- /package/dist/assets/{triangle-alert-CoIDviBm.js → triangle-alert-BbtZB9Cv.js} +0 -0
- /package/dist/assets/{typed-storage-qVehRaS3.js → typed-storage-Chj38wph.js} +0 -0
- /package/dist/assets/{usage-window-DbWHZkbr.js → usage-window-dm_mRqGo.js} +0 -0
- /package/dist/assets/{use-active-assistant-id-DTsVl8b7.js → use-active-assistant-id-C0jnbSsu.js} +0 -0
- /package/dist/assets/{use-is-mobile-D_0cze0t.js → use-is-mobile-BF5x8sr8.js} +0 -0
- /package/dist/assets/{x-b3o2p6YU.js → x-DvDhIMRD.js} +0 -0
- /package/dist/assets/{xterm-B74sC241.js → xterm-BJTDHDUK.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-By7PlC-c.js → xterm-addon-fit-Ba7bgpoc.js} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{I as r,L as i,R as a,f as o,n as s,r as c,z as l}from"./proxy-BMd4CkvC.js";var u=n(),d=e(t(),1);function f(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function p(...e){return t=>{let n=!1,r=e.map(e=>{let r=f(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():f(e[t],null)}}}}function m(...e){return d.useCallback(p(...e),e)}var h=class extends d.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(o(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=o(e)&&e.offsetWidth||0,r=o(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function g({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,d.useId)(),s=(0,d.useRef)(null),l=(0,d.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:f}=(0,d.useContext)(c),p=m(s,e.props?.ref??e?.ref);return(0,d.useInsertionEffect)(()=>{let{width:e,height:c,top:u,left:d,right:p,bottom:m,direction:h}=l.current;if(t||a===!1||!s.current||!e||!c)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${d}`:g?`left: ${d}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${u}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);f&&(y.nonce=f);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
2
|
+
[data-motion-pop-id="${o}"] {
|
|
3
|
+
position: absolute !important;
|
|
4
|
+
width: ${e}px !important;
|
|
5
|
+
height: ${c}px !important;
|
|
6
|
+
${_}px !important;
|
|
7
|
+
${v}px !important;
|
|
8
|
+
}
|
|
9
|
+
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,u.jsx)(h,{isPresent:t,childRef:s,sizeRef:l,pop:a,children:a===!1?e:d.cloneElement(e,{ref:p})})}var _=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:o,presenceAffectsLayout:s,mode:c,anchorX:l,anchorY:f,root:p})=>{let m=a(v),h=(0,d.useId)(),_=!0,y=(0,d.useMemo)(()=>(_=!1,{id:h,initial:t,isPresent:n,custom:o,onExitComplete:e=>{m.set(e,!0);for(let e of m.values())if(!e)return;i&&i()},register:e=>(m.set(e,!1),()=>m.delete(e))}),[n,m,i]);return s&&_&&(y={...y}),(0,d.useMemo)(()=>{m.forEach((e,t)=>m.set(t,!1))},[n]),d.useEffect(()=>{!n&&!m.size&&i&&i()},[n]),e=(0,u.jsx)(g,{pop:c===`popLayout`,isPresent:n,anchorX:l,anchorY:f,root:p,children:e}),(0,u.jsx)(r.Provider,{value:y,children:e})};function v(){return new Map}var y=e=>e.key||``;function b(e){let t=[];return d.Children.forEach(e,e=>{(0,d.isValidElement)(e)&&t.push(e)}),t}var x=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:c=`sync`,propagate:f=!1,anchorX:p=`left`,anchorY:m=`top`,root:h})=>{let[g,v]=s(f),x=(0,d.useMemo)(()=>b(e),[e]),S=f&&!g?[]:x.map(y),C=(0,d.useRef)(!0),w=(0,d.useRef)(x),T=a(()=>new Map),E=(0,d.useRef)(new Set),[D,O]=(0,d.useState)(x),[k,A]=(0,d.useState)(x);i(()=>{C.current=!1,w.current=x;for(let e=0;e<k.length;e++){let t=y(k[e]);S.includes(t)?(T.delete(t),E.current.delete(t)):T.get(t)!==!0&&T.set(t,!1)}},[k,S.length,S.join(`-`)]);let j=[];if(x!==D){let e=[...x];for(let t=0;t<k.length;t++){let n=k[t],r=y(n);S.includes(r)||(e.splice(t,0,n),j.push(n))}return c===`wait`&&j.length&&(e=j),A(b(e)),O(x),null}let{forceRender:M}=(0,d.useContext)(l);return(0,u.jsx)(u.Fragment,{children:k.map(e=>{let i=y(e),a=f&&!g?!1:x===k||S.includes(i);return(0,u.jsx)(_,{isPresent:a,initial:!C.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:c,root:h,onExitComplete:a?void 0:()=>{if(E.current.has(i))return;if(T.has(i))E.current.add(i),T.set(i,!0);else return;let e=!0;T.forEach(t=>{t||(e=!1)}),e&&(M?.(),A(w.current),f&&v?.(),r&&r())},anchorX:p,anchorY:m,children:e},i)})})};export{x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./misc-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./misc-CBD9JJCY.js";import{t as i}from"./format-file-size-DOcXaUaE.js";var a=e(t(),1),o=n(),s={verified:{label:`Verified`,className:`bg-[var(--system-positive-weak)] text-[var(--system-positive-strong)]`},signed:{label:`Signed`,className:`bg-[var(--system-info-weak)] text-[var(--system-info-strong)]`},unsigned:{label:`Unsigned`,className:`bg-[var(--surface-active)] text-[var(--content-secondary)]`},tampered:{label:`Tampered — signature invalid`,className:`bg-[var(--system-negative-weak)] text-[var(--system-negative-strong)]`}};function c(){let[e,t]=(0,a.useState)(null),[n,c]=(0,a.useState)(!1);if((0,a.useEffect)(()=>{window.vellum?.bundleConfirm?.getData().then(e=>{e&&t(e)})},[]),!e)return(0,o.jsx)(`div`,{className:`flex h-svh w-screen items-center justify-center bg-background text-muted-foreground select-none`,children:`Loading...`});let{manifest:l,scanResult:u,signatureResult:d,bundleSizeBytes:f}=e,p=s[d.trustTier],m=d.trustTier===`tampered`,h=u.warnings;return(0,o.jsxs)(`div`,{className:`flex h-svh w-screen flex-col bg-background px-6 pt-14 pb-6 text-foreground select-none`,children:[(0,o.jsxs)(`div`,{className:`flex items-start gap-3`,children:[l.icon?(0,o.jsx)(`span`,{className:`text-5xl leading-none`,children:l.icon}):(0,o.jsx)(`span`,{className:`text-5xl leading-none`,children:`📦`}),(0,o.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,o.jsx)(`h1`,{className:`truncate text-lg font-semibold`,children:l.name}),l.description&&(0,o.jsx)(`p`,{className:`text-muted-foreground mt-0.5 text-sm leading-snug`,children:l.description})]})]}),(0,o.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,o.jsx)(`span`,{className:r(`inline-block rounded-full px-2.5 py-0.5 text-xs font-medium`,p.className),children:p.label}),d.trustTier===`signed`&&d.signerDisplayName&&(0,o.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`by `,d.signerDisplayName]})]}),(0,o.jsxs)(`dl`,{className:`mt-4 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5 text-sm`,children:[(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Size`}),(0,o.jsx)(`dd`,{children:i(f)}),(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Created by`}),(0,o.jsx)(`dd`,{className:`truncate`,children:l.created_by}),l.capabilities.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Capabilities`}),(0,o.jsx)(`dd`,{className:`truncate`,children:l.capabilities.join(`, `)})]})]}),h.length>0&&(0,o.jsxs)(`div`,{className:`mt-4`,children:[(0,o.jsxs)(`button`,{type:`button`,className:`text-muted-foreground text-xs font-medium hover:underline`,onClick:()=>c(e=>!e),children:[n?`Hide`:`Show`,` Warnings (`,h.length,`)`]}),n&&(0,o.jsx)(`ul`,{className:`mt-1.5 space-y-1 text-xs`,children:h.map((e,t)=>(0,o.jsx)(`li`,{className:`rounded bg-[var(--system-mid-weak)] px-2 py-1 text-[var(--system-mid-strong)]`,children:e},t))})]}),(0,o.jsxs)(`div`,{className:`mt-auto flex items-center justify-end gap-3 pt-4`,children:[(0,o.jsx)(`button`,{type:`button`,className:`rounded-md border border-border px-4 py-1.5 text-sm font-medium text-foreground hover:bg-muted`,onClick:()=>window.vellum?.bundleConfirm?.respond(!1),children:`Cancel`}),(0,o.jsx)(`button`,{type:`button`,className:r(`rounded-md px-4 py-1.5 text-sm font-medium text-white`,m?`bg-red-600 hover:bg-red-700`:`bg-primary hover:bg-primary/90`),onClick:()=>window.vellum?.bundleConfirm?.respond(!0),children:m?`Install Anyway`:`Install`})]})]})}export{c as BundleConfirmPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{N as i,a,n as o,o as s}from"./auth-store-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{N as i,a,n as o,o as s}from"./auth-store-DpyBV62g.js";import{a as c}from"./routes-DNIOvC8p.js";import{n as l,t as u}from"./login-flow-DZA-nnkz.js";import{Pn as d}from"./index-zW00zfbZ.js";import{r as f,t as p}from"./account-shell-f2__fVz3.js";var m=e(t(),1),h=r();function g(){let e=a(),t=s(),r=o.use.user(),g=o.use.logout(),[_,v]=(0,m.useState)(null),[y,b]=(0,m.useState)(!1),x=async()=>{v(null),b(!0);try{await i(l,u)}catch(e){console.error(`[account] auth flow failed:`,e),v(`Something went wrong. Please try again.`),b(!1)}};return t?(0,h.jsx)(p,{children:(0,h.jsx)(f,{title:`Loading...`})}):e?(0,h.jsxs)(p,{children:[(0,h.jsx)(f,{title:`Welcome${r?.username?`, ${r.username}`:``}!`,subtitle:`You are signed in.`}),(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,h.jsx)(n,{to:c.assistant,className:`inline-flex w-full items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] no-underline transition-colors hover:bg-[var(--primary-hover)]`,children:`Go to your assistant`}),(0,h.jsx)(`button`,{type:`button`,onClick:async()=>{await g(),d(c.account.login)},className:`cursor-pointer bg-transparent text-sm font-normal text-[var(--content-secondary)] transition-colors hover:text-[var(--content-default)]`,children:`Sign out`})]})]}):(0,h.jsxs)(p,{children:[(0,h.jsx)(f,{title:`Welcome to Vellum`,subtitle:`Sign in to get started.`}),_&&(0,h.jsx)(`p`,{className:`text-center text-sm text-[var(--system-negative-strong)]`,children:_}),(0,h.jsx)(`div`,{className:`flex flex-col items-center gap-4`,children:(0,h.jsx)(`button`,{type:`button`,onClick:()=>void x(),disabled:y,className:`inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] transition-colors hover:bg-[var(--primary-hover)] disabled:opacity-50`,children:`Sign in`})})]})}export{g as AccountPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,r as t}from"./chunk-jRWAZmH_.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-D7s2Q_uG.js";import{h as i,t as a,u as o}from"./chunk-5KNZJZUH-DdS6bb-3.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"./dropdown-yOV5eJnU.js";import{t as f}from"./modal-CHuPOsJJ.js";import{t as p}from"./circle-alert-
|
|
1
|
+
import{o as e,r as t}from"./chunk-jRWAZmH_.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-D7s2Q_uG.js";import{h as i,t as a,u as o}from"./chunk-5KNZJZUH-DdS6bb-3.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"./dropdown-yOV5eJnU.js";import{t as f}from"./modal-CHuPOsJJ.js";import{t as p}from"./circle-alert-DQGuXP1U.js";import{t as m}from"./credit-card-D36YQXB8.js";import{t as h}from"./loader-circle-Bwz4b6EM.js";import{at as g,rt as _}from"./react-query.gen-B0Od5MEZ.js";import{n as v,t as y}from"./browser-BGPcRLZJ.js";var b=t({AddCreditsModal:()=>E}),x=e(n(),1),S=u(),C=[`10.00`,`20.00`,`30.00`,`40.00`,`50.00`,`60.00`,`70.00`,`80.00`,`90.00`,`100.00`];function w(e){let t=parseFloat(e);if(Number.isNaN(t))return`0 credits`;let n=t.toLocaleString(`en-US`,{minimumFractionDigits:2,maximumFractionDigits:2});return`${n.endsWith(`.00`)?n.slice(0,-3):n} credits`}function T(e){if(e&&typeof e==`object`){let t=e.amount;if(Array.isArray(t)&&typeof t[0]==`string`)return t[0]}return`Failed to create checkout session. Please try again.`}function E({open:e,onOpenChange:t}){let n=s(),{pathname:u}=o(),[b]=i(),E=b.toString()?`${u}?${b.toString()}`:u,{data:D,isLoading:O}=c(_()),k=D?.allowed_top_up_amounts?.length?D.allowed_top_up_amounts:C,[A,j]=(0,x.useState)(null),M=A&&k.includes(A)?A:k[0]??C[0],N=l(g());return(0,x.useEffect)(()=>v(()=>{t(!1),n.invalidateQueries(_())}),[t,n]),(0,S.jsx)(f.Root,{open:e,onOpenChange:t,children:(0,S.jsxs)(f.Content,{size:`sm`,children:[(0,S.jsxs)(f.Header,{children:[(0,S.jsx)(f.Title,{icon:m,children:`Add Credits`}),(0,S.jsx)(f.Description,{children:`Purchase credits to continue using the assistant. You'll be redirected to Stripe to complete the payment.`})]}),(0,S.jsx)(f.Body,{children:(0,S.jsxs)(`div`,{className:`space-y-4`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`label`,{htmlFor:`add-credits-amount`,className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Amount`}),(0,S.jsx)(d,{id:`add-credits-amount`,value:M,onChange:e=>{j(e),N.isError&&N.reset()},disabled:O||!D,options:k.map(e=>({value:e,label:w(e)}))})]}),N.isError&&(0,S.jsxs)(`div`,{className:`flex items-center gap-2 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,S.jsx)(p,{className:`h-3.5 w-3.5 shrink-0`}),T(N.error)]}),(0,S.jsx)(a,{to:`/assistant/settings/billing`,className:`text-body-small-default text-[var(--content-tertiary)] underline hover:text-[var(--content-secondary)]`,onClick:()=>t(!1),children:`Configure Automatic Top-Ups →`})]})}),(0,S.jsxs)(f.Footer,{children:[(0,S.jsx)(f.Close,{asChild:!0,children:(0,S.jsx)(r,{variant:`outlined`,children:`Cancel`})}),(0,S.jsx)(r,{variant:`primary`,leftIcon:N.isPending?(0,S.jsx)(h,{className:`animate-spin`}):void 0,onClick:()=>{N.isPending||N.mutate({body:{amount:M,return_path:E}},{onSuccess:e=>{y(e.checkout_url)}})},disabled:N.isPending||O||!D,children:`Add credits`})]})]})})}export{b as n,E as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-B1FKkx-w.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-D7s2Q_uG.js";import{n as i}from"./QueryClientProvider-DKhXIxGb.js";import{t as a}from"./useQuery-B45lW1Kk.js";import{t as o}from"./useMutation-Lj4VunQV.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./input-Ch7OC6ME.js";import{t as l}from"./toggle-95p73HGd.js";import{n as u}from"./stat-square-CraPxMcl.js";import{n as d}from"./toast-CxaZ5f1d.js";import{t as f}from"./loader-circle-Bwz4b6EM.js";import{c as p,kt as m,u as h}from"./react-query.gen-UxQpJSKv.js";import{X as g}from"./sdk.gen-DSjI3deY.js";import{F as _,P as v}from"./react-query.gen-B0Od5MEZ.js";import{tn as y,x as b}from"./index-zW00zfbZ.js";import{t as x}from"./use-active-assistant-id-C0jnbSsu.js";import{t as S}from"./detail-card-BnPZuM3e.js";import{r as C}from"./assistant-status-panel-CpyT-RWH.js";var w=e(n(),1),T=s(),E=[[`Mon`,0],[`Tue`,1],[`Wed`,2],[`Thu`,3],[`Fri`,4],[`Sat`,5],[`Sun`,6]];function D(e){let[t,n]=e.split(`:`).map(Number),r=new Date,i=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),t,n));return`${i.getHours().toString().padStart(2,`0`)}:${i.getMinutes().toString().padStart(2,`0`)}`}function O(e){let[t,n]=e.split(`:`).map(Number),r=new Date,i=new Date(r.getFullYear(),r.getMonth(),r.getDate(),t,n);return`${i.getUTCHours().toString().padStart(2,`0`)}:${i.getUTCMinutes().toString().padStart(2,`0`)}`}function k(){return Intl.DateTimeFormat(void 0,{timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??``}function A(e){let t=e?.schedule?.window.start??`06:00`,n=e?.schedule?.window.end??`08:00`;return{enabled:e?.enabled??!0,timezone:`UTC`,frequency:e?.schedule?.frequency??`weekly`,daysOfWeek:e?.schedule?.days_of_week??[0],daysOfMonth:e?.schedule?.days_of_month??[],windowStart:D(t),windowEnd:D(n)}}function j({assistantId:e}){let t=i(),{data:n,isLoading:s,isError:p}=a(v({path:{id:e}})),m=(0,w.useMemo)(()=>A(n),[n]),[h,y]=(0,w.useState)(null),b=h??m,x=h!==null,S=(0,w.useMemo)(()=>k(),[]),[C,D]=(0,w.useState)(null),j=C??b.daysOfMonth.join(`, `),M=o({mutationFn:async t=>{let{data:n}=await g({path:{id:e},body:t,throwOnError:!0});return n}}),N=e=>{y(t=>({...t??m,...e}))},P=e=>{N({daysOfWeek:b.daysOfWeek.includes(e)?b.daysOfWeek.filter(t=>t!==e):[...b.daysOfWeek,e].sort((e,t)=>e-t)})},F=e=>e.split(`,`).map(e=>parseInt(e.trim(),10)).filter(e=>!isNaN(e)&&e>=1&&e<=31);return s?(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-body-medium-lighter text-[var(--content-tertiary)]`,children:[(0,T.jsx)(f,{className:`h-4 w-4 animate-spin`}),`Loading update window settings...`]}):p?(0,T.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--system-negative-strong)]`,children:`Failed to load update window policy. Refresh the page to try again.`}):(0,T.jsxs)(`div`,{className:`space-y-6`,children:[(0,T.jsx)(l,{checked:b.enabled,onChange:e=>N({enabled:e}),label:`Automatic updates`,helperText:`Update automatically during a configured time window`}),b.enabled&&(0,T.jsxs)(`div`,{className:`space-y-5`,children:[(0,T.jsxs)(`div`,{className:`space-y-2`,children:[(0,T.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-secondary)]`,children:`Frequency`}),(0,T.jsx)(`div`,{className:`max-w-[400px]`,children:(0,T.jsx)(u,{ariaLabel:`Frequency`,value:b.frequency,onChange:e=>{e!==`monthly`&&D(null),N({frequency:e})},items:[{value:`daily`,label:`Daily`},{value:`weekly`,label:`Weekly`},{value:`monthly`,label:`Monthly`}]})})]}),b.frequency===`weekly`&&(0,T.jsxs)(`div`,{className:`space-y-2`,children:[(0,T.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-secondary)]`,children:`Day(s) of week`}),(0,T.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:E.map(([e,t])=>(0,T.jsx)(r,{variant:`outlined`,size:`compact`,active:b.daysOfWeek.includes(t),onClick:()=>P(t),children:e},t))})]}),b.frequency===`monthly`&&(0,T.jsx)(c,{label:`Day(s) of month`,type:`text`,value:j,onChange:e=>D(e.target.value),onBlur:e=>{let t=F(e.target.value);N({daysOfMonth:t}),D(t.join(`, `))},placeholder:`e.g. 1, 15`,helperText:`Comma-separated day numbers (1–31)`,className:`w-48`}),(0,T.jsxs)(`div`,{className:`space-y-2`,children:[(0,T.jsxs)(`label`,{className:`block text-body-small-default text-[var(--content-secondary)]`,children:[`Update window`,S?` (${S})`:``]}),(0,T.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,T.jsx)(c,{type:`time`,value:b.windowStart,onChange:e=>N({windowStart:e.target.value})}),(0,T.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`to`}),(0,T.jsx)(c,{type:`time`,value:b.windowEnd,onChange:e=>N({windowEnd:e.target.value})})]})]})]}),(0,T.jsx)(r,{variant:`primary`,leftIcon:M.isPending?(0,T.jsx)(f,{className:`animate-spin`}):void 0,onClick:async()=>{let n=b.frequency===`monthly`&&C!==null?F(C):b.daysOfMonth;try{await M.mutateAsync({enabled:b.enabled,timezone:`UTC`,schedule:{frequency:b.frequency,days_of_week:b.frequency===`weekly`?b.daysOfWeek:[],days_of_month:b.frequency===`monthly`?n:[],window:{start:O(b.windowStart),end:O(b.windowEnd)}}}),d.success(`Auto-update policy saved.`),y(null),D(null),t.invalidateQueries({queryKey:_({path:{id:e}})})}catch{d.error(`Failed to save policy. Please try again.`)}},disabled:M.isPending||!x,children:`Save policy`})]})}function M(){let{assistant:e,healthz:n}=C(),r=y({platformHostedOnly:!0}),o=e?.is_local?null:e,s=x(),c=i(),u=n?.capabilities?.memoryOptOut===!0,{data:f}=a({...p({path:{assistant_id:s}}),staleTime:3e4,enabled:u}),g=m({onSuccess:e=>{h(c,{path:{assistant_id:s}},e)}}),_=f?.memory?.enabled!==!1,v=async e=>{try{await g.mutateAsync({path:{assistant_id:s},body:{memory:{enabled:e}}}),d.success(e?`Memory enabled.`:`Memory disabled.`)}catch(e){t(e,{context:`settings-memory-toggle`}),d.error(`Failed to update memory setting.`)}};return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[r===`full`&&o&&(0,T.jsx)(S,{title:`Update Window`,subtitle:`Configure when automatic updates are applied.`,children:(0,T.jsx)(j,{assistantId:o.id})}),r===`disabled`&&(0,T.jsx)(S,{title:`Update Window`,subtitle:`Configure when automatic updates are applied.`,children:(0,T.jsx)(b,{children:`Log in to the Vellum platform to manage update window policy.`})}),u?(0,T.jsx)(S,{title:`Memory`,subtitle:`Let your assistant remember information from past conversations. Turning this off also pauses memory consolidation.`,accessory:(0,T.jsx)(l,{checked:_,onChange:e=>void v(e),"aria-label":`Enable memory`,disabled:g.isPending}),compactAccessory:!0}):null]})}export{M as AdvancedPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{i as t,r as n,s as r}from"./local-settings-lVNyIOJ_.js";import{r as i,t as a}from"./capture-error-B1FKkx-w.js";import{t as o}from"./react-DJZBPgpf.js";import{t as s}from"./button-D7s2Q_uG.js";import{d as c,h as l}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as u}from"./QueryClientProvider-DKhXIxGb.js";import{t as d}from"./useQuery-B45lW1Kk.js";import{t as f}from"./useMutation-Lj4VunQV.js";import{t as p}from"./jsx-runtime-CVSDxk6A.js";import{t as m}from"./typography-BscuIPxA.js";import{t as h}from"./dropdown-yOV5eJnU.js";import{t as g}from"./confirm-dialog-SpCsmAdG.js";import{t as _}from"./notice-CynJKEow.js";import{t as v}from"./tag-CE_o2aao.js";import{t as y}from"./input-Ch7OC6ME.js";import{t as b}from"./toggle-95p73HGd.js";import{n as x}from"./stat-square-CraPxMcl.js";import{t as S}from"./modal-CHuPOsJJ.js";import{n as C}from"./toast-CxaZ5f1d.js";import{t as w}from"./createLucideIcon-KBgJOpms.js";import{t as T}from"./check--ppxmAB0.js";import{t as E}from"./circle-alert-DQGuXP1U.js";import{t as D}from"./circle-check-DTQwtuba.js";import{n as O,t as k}from"./domain-field-95x0MXna.js";import{t as A}from"./external-link-DfOdZztV.js";import{t as j}from"./info-CAHMkXVD.js";import{t as M}from"./loader-circle-Bwz4b6EM.js";import{t as N}from"./triangle-alert-BbtZB9Cv.js";import{Fn as P,Mt as F,in as I,jt as L,nt as R}from"./sdk.gen-CpbzVVcg.js";import{R as z,c as B,d as ee,ft as te,kt as V,l as H,u as U,wt as W,z as G}from"./react-query.gen-UxQpJSKv.js";import{r as K}from"./api-errors-0Nc54XoL.js";import{a as ne}from"./routes-DNIOvC8p.js";import{t as q}from"./use-is-org-ready-Bl2ATsDD.js";import{t as J}from"./assistant-identity-store-ADxStqSC.js";import{t as re}from"./assistant-feature-flag-store-D9TvI9CG.js";import{c as ie,d as ae,et as oe,f as se,g as ce,h as le,l as ue,m as de,o as fe,p as pe,s as me,u as he,v as ge,y as _e}from"./react-query.gen-B0Od5MEZ.js";import{$n as ve,Gn as Y,Gr as ye,Hi as be,Jn as xe,Kn as Se,Mr as Ce,Qn as we,Xn as Te,Yn as Ee,Zn as De,_ as Oe,_r as ke,ar as Ae,b as je,br as Me,cr as Ne,dr as Pe,er as Fe,fr as Ie,gr as Le,hr as Re,ir as ze,lr as Be,mr as Ve,nr as He,or as Ue,pr as We,qn as Ge,rr as Ke,sr as qe,tn as Je,tr as Ye,ur as Xe,v as Ze,vr as Qe,x as $e,xn as et,xr as tt,y as nt,yr as rt}from"./index-zW00zfbZ.js";import{t as X}from"./use-active-assistant-id-C0jnbSsu.js";import{t as it}from"./detail-card-BnPZuM3e.js";import{t as at}from"./environment-store-C_XwUYTL.js";var ot=w(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Z=e(o(),1),Q=p();function st({mode:e,onChange:t}){return(0,Q.jsx)(`div`,{className:`max-w-[280px]`,children:(0,Q.jsx)(x,{ariaLabel:`Service mode`,value:e,onChange:t,items:[{value:`managed`,label:`Managed`},{value:`your-own`,label:`Your Own`}]})})}function ct({id:e,title:t,subtitle:n,mode:r,onModeChange:i,children:a}){return(0,Q.jsxs)(it,{id:e,title:t,subtitle:n,accessory:(0,Q.jsx)(st,{mode:r,onChange:i}),children:[(0,Q.jsx)(`div`,{className:`h-px bg-[var(--surface-active)]`}),(0,Q.jsx)(`div`,{className:`mt-4`,children:a})]})}function $({onClick:e,disabled:t}){return(0,Q.jsx)(s,{onClick:e,disabled:t,children:`Save`})}function lt({onClick:e,filled:t=!1}){return(0,Q.jsx)(s,{variant:t?`danger`:`dangerGhost`,onClick:e,children:`Reset`})}function ut({id:e,title:t,subtitle:n,children:r}){return(0,Q.jsxs)(it,{id:e,title:t,subtitle:n,children:[(0,Q.jsx)(`div`,{className:`h-px bg-[var(--surface-active)]`}),(0,Q.jsx)(`div`,{className:`mt-4`,children:r})]})}function dt({guide:e}){return(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-sunken)] p-3 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,Q.jsx)(j,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--system-positive-strong)]`}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Q.jsx)(`span`,{children:e.description}),(0,Q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[e.linkLabel,(0,Q.jsx)(A,{className:`h-3 w-3`})]})]})]})}function ft({status:e,message:t,isLoading:n}){return n?(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2.5 py-0.5 text-body-small-default text-[var(--content-quiet)]`,children:[(0,Q.jsx)(M,{className:`h-3 w-3 animate-spin`}),`Checking domain…`]}):e?e===`verified`?(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--system-positive-weak)] px-2.5 py-0.5 text-body-small-default text-[var(--system-positive-strong)]`,title:`DNS records have been verified. Your domain is ready to send and receive email.`,children:[(0,Q.jsx)(T,{className:`h-3 w-3`}),`Domain verified`]}):e===`pending`||e===`not_started`?(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--system-mid-weak)] px-2.5 py-0.5 text-body-small-default text-[var(--system-mid-strong)]`,title:`DNS records have been provisioned. Waiting for the email provider to verify them — this usually takes a few minutes.`,children:[(0,Q.jsx)(be,{className:`h-3 w-3`}),`Verifying domain…`]}):(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--system-negative-weak)] px-2.5 py-0.5 text-body-small-default text-[var(--system-negative-strong)]`,title:`Domain verification failed. DNS records may not have propagated correctly. You could try releasing and re-registering the domain.`,children:[(0,Q.jsx)(E,{className:`h-3 w-3`}),`Verification failed`]}):(0,Q.jsx)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2.5 py-0.5 text-body-small-default text-[var(--content-quiet)]`,title:`Unable to retrieve domain verification status.`,children:`Unknown status`})}var pt=`__custom__`;function mt(e){return e?!!(e.profile||e.provider||e.model):!1}function ht(e,t){let n=mt(e);return n===mt(t)?n?(e?.profile??null)===(t?.profile??null)&&(e?.provider??null)===(t?.provider??null)&&(e?.model??null)===(t?.model??null):!0:!1}function gt({id:e,displayName:t,description:n,defaultProfileLabel:r,draft:i,profileOptions:a,onDraftChange:o,onToggle:s}){let c=mt(i),l=!i||!c?``:i.provider||i.model?pt:i.profile??``,u=l===pt,d=ke.find(e=>e===i?.provider)??ke[0],f=Me(d).map(e=>({value:e.id,label:e.displayName})),p=!!i?.provider&&!i?.model;function m(t){if(t===`__custom__`){let t=ke[0];o(e,{profile:null,provider:t,model:rt(t)??``})}else t===``?o(e,null):o(e,{profile:t,provider:null,model:null})}function g(t){let n=rt(t)??``;o(e,{...i??{},profile:null,provider:t,model:n})}function _(t){o(e,{...i??{},model:t})}return(0,Q.jsxs)(`div`,{className:`rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)] p-3`,children:[(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`p`,{className:`text-body-medium-default font-medium text-[var(--content-default)]`,children:t}),n&&(0,Q.jsxs)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:[n,r&&(0,Q.jsxs)(`span`,{className:`ml-1.5 text-body-small-default text-[var(--content-tertiary)] opacity-60`,children:[`· Default: `,r]})]})]}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[c&&(0,Q.jsx)(h,{value:l,onChange:m,options:a,className:`w-44`,menuMinWidth:280,menuAlign:`end`}),(0,Q.jsx)(b,{checked:c,onChange:t=>s(e,t),"aria-label":`Override ${t}`})]})]}),c&&u&&(0,Q.jsxs)(`div`,{className:`mt-3 space-y-2 border-t border-[var(--border-base)] pt-3`,children:[(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Q.jsxs)(`div`,{className:`flex-1`,children:[(0,Q.jsx)(`label`,{className:`mb-1 block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:d??``,onChange:g,options:ke.map(e=>({value:e,label:Qe[e]??e}))})]}),(0,Q.jsxs)(`div`,{className:`flex-1`,children:[(0,Q.jsx)(`label`,{className:`mb-1 block text-body-small-default text-[var(--content-tertiary)]`,children:`Model`}),(0,Q.jsx)(h,{value:i?.model??``,onChange:_,options:f})]})]}),p&&(0,Q.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:`Pick a model`})]})]})}function _t({isOpen:e,onClose:t,assistantId:n}){let r=(0,Z.useRef)(!1);return(0,Q.jsx)(S.Root,{open:e,onOpenChange:e=>{!e&&!r.current&&t()},children:e?(0,Q.jsx)(vt,{assistantId:n,onClose:t,onSavingChange:e=>{r.current=e}}):null})}function vt({assistantId:e,onClose:t,onSavingChange:n}){let r=u(),{data:i}=d({...B({path:{assistant_id:e}}),staleTime:3e4}),o=(0,Z.useMemo)(()=>i?.llm?.profiles??{},[i?.llm?.profiles]),c=(0,Z.useMemo)(()=>i?.llm?.profileOrder??[],[i?.llm?.profileOrder]),l=(0,Z.useMemo)(()=>i?.llm?.callSites??{},[i?.llm?.callSites]),f=(0,Z.useMemo)(()=>Ae(o,c),[o,c]),p=V({onSuccess:t=>{U(r,{path:{assistant_id:e}},t)}}),[m,h]=(0,Z.useState)(``),[_,v]=(0,Z.useState)({}),[b,x]=(0,Z.useState)(!1),[w,T]=(0,Z.useState)(!1),E=re.use.analyzeConversation(),{data:D,isLoading:O,isError:k,refetch:A}=d({...ee({path:{assistant_id:e}}),enabled:!!e,staleTime:6e4,refetchOnWindowFocus:!1}),j=(0,Z.useMemo)(()=>{let e=(D?.callSites??[]).filter(e=>e.id!==`mainAgent`);return E||(e=e.filter(e=>e.id!==`analyzeConversation`)),e},[D,E]),N=!O&&!k&&!!D&&!!i,P=(0,Z.useMemo)(()=>j.map(e=>e.id),[j]),F=(0,Z.useMemo)(()=>{if(!N)return{};let e={};for(let t of P)if(t in _)e[t]=_[t];else{let n=l[t];e[t]=n?{...n}:{}}return e},[N,P,l,_]),I=(0,Z.useMemo)(()=>new Set(P),[P]),L=(0,Z.useMemo)(()=>Object.entries(l).some(([e,t])=>I.has(e)&&(t?.profile!=null||t?.provider!=null||t?.model!=null)),[l,I]),R=(0,Z.useMemo)(()=>{if(!N)return!1;for(let e of Object.keys(F))if(!ht(F[e],l[e]))return!0;return!1},[N,F,l]),z=(0,Z.useMemo)(()=>Object.values(F).some(e=>mt(e)&&!!e?.provider&&!e?.model),[F]),te=(0,Z.useCallback)(e=>[...je(f,[e]).map(e=>({value:e.name,label:Ze(e)})),{value:pt,label:`Custom`}],[f]),H=(0,Z.useMemo)(()=>{if(!m.trim())return j;let e=m.toLowerCase();return j.filter(t=>(t.displayName??``).toLowerCase().includes(e)||(t.description??``).toLowerCase().includes(e)||(t.domain??``).toLowerCase().includes(e))},[j,m]),W=(0,Z.useMemo)(()=>{if(!D)return[];let e=D.domains.map(e=>e.id),t=new Map(D.domains.map(e=>[e.id,e])),n=[];for(let r of e){let e=H.filter(e=>e.domain===r);e.length>0&&n.push({domain:t.get(r),sites:e})}let r=new Set(e),i=H.filter(e=>!r.has(e.domain));return i.length>0&&n.push({domain:{id:`other`,displayName:`Other`},sites:i}),n},[D,H]),G=(0,Z.useCallback)((e,t)=>{v(n=>({...n,[e]:t}))},[]),K=(0,Z.useCallback)((e,t)=>{if(!t){v(t=>({...t,[e]:null}));return}let n=nt(f,j.find(t=>t.id===e)?.defaultProfile);if(n)v(t=>({...t,[e]:{profile:n}}));else{let t=ke[0],n=rt(t)??``;v(r=>({...r,[e]:{provider:t,model:n}}))}},[j,f]),ne=(0,Z.useCallback)(async()=>{x(!0),n?.(!0);try{let n={};for(let e of Object.keys(F)){let t=F[e]??null;n[e]=mt(t)?{profile:t?.profile??null,provider:t?.provider??null,model:t?.model??null}:null}await p.mutateAsync({path:{assistant_id:e},body:{llm:{callSites:n}}}),t(),C.success(`Overrides saved.`)}catch(e){C.error(`Failed to save overrides. Please try again.`),a(e,{context:`call_site_overrides_save`})}finally{x(!1),n?.(!1)}},[F,t,p,n,e]),q=(0,Z.useCallback)(async()=>{x(!0),n?.(!0);try{let n={};for(let e of Object.keys(F))n[e]=null;await p.mutateAsync({path:{assistant_id:e},body:{llm:{callSites:n}}}),t(),C.success(`Overrides reset.`)}catch(e){C.error(`Failed to reset overrides. Please try again.`),a(e,{context:`call_site_overrides_reset`})}finally{x(!1),n?.(!1)}},[F,t,p,n,e]);return(0,Q.jsxs)(S.Content,{size:`lg`,hideCloseButton:!0,children:[(0,Q.jsxs)(S.Header,{children:[(0,Q.jsx)(S.Title,{children:`Action Overrides`}),(0,Q.jsx)(S.Description,{children:`Customize which model profile specific actions should use. Uses your default profile if no override is set.`})]}),(0,Q.jsxs)(S.Body,{children:[(0,Q.jsx)(`div`,{className:`mb-4`,children:(0,Q.jsx)(y,{type:`search`,value:m,onChange:e=>h(e.target.value),placeholder:`Search actions…`,leftIcon:(0,Q.jsx)(ye,{className:`h-4 w-4`}),fullWidth:!0})}),O&&(0,Q.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,Q.jsx)(M,{className:`h-6 w-6 animate-spin text-[var(--content-tertiary)]`})}),k&&(0,Q.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-12 text-center`,children:[(0,Q.jsx)(`p`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Couldn't load actions`}),(0,Q.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Make sure your assistant is running`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>void A(),children:`Retry`})]}),!O&&!k&&D&&(0,Q.jsx)(`div`,{className:`space-y-4`,children:W.length===0?(0,Q.jsx)(`p`,{className:`py-8 text-center text-body-medium-lighter text-[var(--content-tertiary)]`,children:`No actions match your search.`}):W.map(({domain:e,sites:t})=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`p`,{className:`mb-2 text-body-small-default font-semibold uppercase tracking-wider text-[var(--content-tertiary)]`,children:e.displayName}),(0,Q.jsx)(`div`,{className:`space-y-1`,children:t.map(e=>{let t=(()=>{let t=F[e.id]??null;return!t||!mt(t)?``:t.provider||t.model?`__custom__`:t.profile??``})(),n=e.defaultProfile?f.find(t=>t.name===e.defaultProfile)?.label??e.defaultProfile:null;return(0,Q.jsx)(gt,{id:e.id,displayName:e.displayName,description:e.description,defaultProfileLabel:n,draft:F[e.id]??null,profileOptions:te(t===``||t===`__custom__`?null:t),onDraftChange:G,onToggle:K},e.id)})})]},e.id))})]}),(0,Q.jsxs)(S.Footer,{children:[L&&(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>T(!0),disabled:b||!N,tintColor:`var(--system-negative-strong)`,className:`mr-auto`,children:`Reset to Defaults`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:t,disabled:b,children:`Cancel`}),(0,Q.jsx)(s,{variant:`primary`,size:`compact`,onClick:()=>void ne(),disabled:!R||z||b,children:b?(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin`}):`Save`})]}),(0,Q.jsx)(g,{open:w,title:`Reset to Defaults`,message:`Every task override will be reset and will follow your active profile. This cannot be undone.`,confirmLabel:`Reset to Defaults`,destructive:!0,onConfirm:()=>{T(!1),q()},onCancel:()=>T(!1)})]})}function yt({blocked:e,availableReplacements:t,replacement:n,onReplacementChange:r,error:i,saving:a,onClose:o,onConfirm:c}){let l=``;if(e){let t=e.label||e.name;l=e.isActive&&e.callSiteIds.length>0?`"${t}" is the active profile and is used by ${e.callSiteIds.length} call site(s). Pick a replacement profile.`:e.isActive?`"${t}" is the active profile. Pick a different active profile before deleting, or select a replacement below.`:`"${t}" is used by ${e.callSiteIds.length} call site(s). Select a replacement profile to reassign them before deleting.`}return(0,Q.jsx)(S.Root,{open:e!==null,onOpenChange:e=>{e||o()},children:(0,Q.jsxs)(S.Content,{size:`sm`,children:[(0,Q.jsx)(S.Header,{children:(0,Q.jsx)(S.Title,{children:`Can't Delete Profile`})}),(0,Q.jsxs)(S.Body,{className:`space-y-4`,children:[(0,Q.jsx)(m,{variant:`body-medium-default`,as:`p`,children:l}),e&&e.callSiteIds.length>0&&(0,Q.jsx)(`ul`,{className:`space-y-1 pl-1`,children:e.callSiteIds.map(e=>(0,Q.jsxs)(`li`,{className:`text-body-small-default text-(--content-secondary)`,children:[`• `,(0,Q.jsx)(`code`,{children:e})]},e))}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Replacement profile`}),(0,Q.jsx)(h,{"aria-label":`Replacement profile`,value:n,onChange:r,options:[{value:``,label:`Select a replacement…`},...t.map(e=>({value:e.name,label:e.label??e.name}))]})]}),i&&(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:i})]}),(0,Q.jsxs)(S.Footer,{children:[(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,onClick:o,children:`Cancel`}),(0,Q.jsx)(s,{variant:`primary`,size:`compact`,disabled:!n||a,onClick:c,children:a?`Saving…`:`Reassign and Delete`})]})]})})}function bt(e,t){if(e){let n=Me(e).find(e=>e.id===t);if(n)return n.displayName}let n=t.lastIndexOf(`/`);return n>=0?t.slice(n+1):t}function xt(e){let t=[];e.description&&t.push(e.description);let n=[];if(e.model&&n.push(bt(e.provider,e.model)),e.provider){let t=Qe[e.provider]??e.provider;n.push(`hosted by ${t}`)}return n.length>0&&t.push(n.join(` `)),t.join(` – `)}function St({profile:e,isDragging:t,dropTarget:n,isDeleting:r,deleteError:i,isToggling:a,onDragStart:o,onDragEnd:c,onDragOver:l,onDragLeave:u,onDrop:d,onEditClick:f,onDeleteClick:p,onStatusToggle:h}){let g=e.source===`managed`,_=e.status!==`disabled`;return(0,Q.jsxs)(`div`,{className:`relative`,children:[n?.name===e.name&&!n.after&&(0,Q.jsx)(`div`,{className:`mx-0 h-0.5 rounded-full bg-[var(--border-active)]`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg pr-2 py-2${t?` opacity-50`:``}`,draggable:!g,onDragStart:o,onDragEnd:c,onDragOver:l,onDragLeave:u,onDrop:d,children:[(0,Q.jsx)(ot,{className:`h-4 w-4 shrink-0 ${g?`invisible`:`cursor-grab text-[var(--content-tertiary)]`}`}),(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1${_?``:` opacity-55`}`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(m,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:e.label??e.name}),g&&(0,Q.jsx)(v,{tone:`positive`,title:`Managed by Platform — auth is locked, but you can rename or disable this profile.`,children:`Platform`})]}),e.description||e.model||e.provider?(0,Q.jsx)(m,{variant:`body-medium-lighter`,as:`p`,className:`mt-0.5 text-(--content-tertiary)`,children:xt(e)}):null]}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,Q.jsx)(`div`,{className:`flex shrink-0 items-center`,title:_?`Active — toggle to hide from pickers`:`Disabled — toggle to show in pickers`,children:(0,Q.jsx)(b,{checked:_,onChange:e=>h(e),disabled:a,"aria-label":`${_?`Disable`:`Enable`} ${e.label??e.name}`})}),(0,Q.jsxs)(`div`,{className:`flex w-[92px] items-center justify-end gap-2`,children:[(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,onClick:f,children:g?`View`:`Edit`}),(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(Ce,{}),"aria-label":`Delete ${e.label??e.name}`,disabled:g||r,title:g?`Managed profiles cannot be deleted`:void 0,onClick:p,tintColor:`var(--system-negative-strong)`})]})]})]}),n?.name===e.name&&n.after&&(0,Q.jsx)(`div`,{className:`mx-0 h-0.5 rounded-full bg-[var(--border-active)]`}),i?(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:i}):null]})}function Ct({isOpen:e,assistantId:t,onClose:n}){let r=u(),{data:i}=d({...B({path:{assistant_id:t}}),staleTime:3e4}),o=(0,Z.useMemo)(()=>i?.llm?.profiles??{},[i?.llm?.profiles]),s=(0,Z.useMemo)(()=>i?.llm?.profileOrder??[],[i?.llm?.profileOrder]),c=i?.llm?.activeProfile??null,l=i?.llm?.callSites??{},f=(0,Z.useMemo)(()=>Ae(o,s),[o,s]),p=V({onSuccess:e=>{U(r,{path:{assistant_id:t}},e)}}),[m,h]=(0,Z.useState)(!1),[g,_]=(0,Z.useState)(null),{data:v}=d({...z({path:{assistant_id:t}}),enabled:e}),y=v?.connections,b=Object.keys(o);async function x(e,n,r){let i=r?.mode??`replace`,c=!(e in o);if(i===`merge`&&!c){await p.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:n}}}}),h(!1),_(null);return}let l={profiles:{[e]:n}};if(c&&(l.profileOrder=s.includes(e)?s:[...s,e]),c)await p.mutateAsync({path:{assistant_id:t},body:{llm:l}});else{let n=o[e];await p.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:null}}}});try{await p.mutateAsync({path:{assistant_id:t},body:{llm:l}})}catch(r){throw a(r,{context:`settings-ai-profile-edit-recreate`}),n!=null&&await p.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:n}}}}).catch(()=>{}),r}}c&&C.success(`Profile "${n.label??e}" created`),h(!1),_(null)}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(S.Root,{open:e,onOpenChange:e=>{e||n()},children:e?(0,Q.jsx)(wt,{assistantId:t,profiles:o,profileOrder:s,orderedProfiles:f,activeProfile:c,callSiteOverrides:l,onClose:n,onEditClick:e=>{_(e),h(!0)},onNewClick:()=>{_(null),h(!0)}}):null}),(0,Q.jsx)(Y,{isOpen:m,mode:g?g.source===`managed`?`view`:`edit`:`create`,profileName:g?.name,initialValues:g??void 0,existingNames:b,connections:y,assistantId:t,onSave:x,onCancel:()=>{h(!1),_(null)}})]})}function wt({assistantId:e,profiles:t,profileOrder:n,orderedProfiles:r,activeProfile:i,callSiteOverrides:o,onClose:c,onEditClick:l,onNewClick:d}){let f=u(),p=V({onSuccess:t=>{U(f,{path:{assistant_id:e}},t)}}),[h,g]=(0,Z.useState)({}),[_,v]=(0,Z.useState)({}),[y,b]=(0,Z.useState)(new Set),[x,C]=(0,Z.useState)(null),[w,T]=(0,Z.useState)(null),[E,D]=(0,Z.useState)(null),[O,k]=(0,Z.useState)(null),A=(0,Z.useRef)(null),j=(0,Z.useRef)(null),[M,N]=(0,Z.useState)(null),[P,F]=(0,Z.useState)(null),[I,L]=(0,Z.useState)(``),[R,z]=(0,Z.useState)(!1),B=(0,Z.useMemo)(()=>r,[r]);async function ee(n,r){if(y.has(n.name))return!1;b(e=>new Set(e).add(n.name)),C(null);let i=r?`active`:`disabled`;if(!t[n.name])return b(e=>{let t=new Set(e);return t.delete(n.name),t}),!1;try{return await p.mutateAsync({path:{assistant_id:e},body:{llm:{profiles:{[n.name]:{status:i}}}}}),!0}catch(e){return a(e,{context:`settings-ai-profile-toggle`}),C(`Couldn't update "${n.label??n.name}". Please try again.`),!1}finally{b(e=>{let t=new Set(e);return t.delete(n.name),t})}}async function te(t){v(e=>({...e,[t]:!0})),g(e=>{let n={...e};return delete n[t],n});try{let r=n.filter(e=>e!==t);await p.mutateAsync({path:{assistant_id:e},body:{llm:{profiles:{[t]:null},profileOrder:r}}})}catch(e){a(e,{context:`settings-ai-profile-delete`}),g(e=>({...e,[t]:`Failed to delete profile. Please try again.`}))}finally{v(e=>{let n={...e};return delete n[t],n})}}function H(e){let t=B.find(t=>t.name===e)?.label??e,n=e===i,r=Object.entries(o).filter(([t,n])=>t!==`mainAgent`&&n?.profile===e).map(([e])=>e);if(n||r.length>0){N({name:e,label:t,isActive:n,callSiteIds:r}),L(``),F(null);return}te(e)}async function W(){if(!M||!I)return;z(!0),F(null);let t={};if(M.isActive&&(t.activeProfile=I),M.callSiteIds.length>0){let e={};for(let t of M.callSiteIds)e[t]={profile:I};t.callSites=e}if(Object.keys(t).length>0)try{await p.mutateAsync({path:{assistant_id:e},body:{llm:t}})}catch(e){a(e,{context:`settings-ai-profile-reassign-delete`}),F(`Failed to reassign references. Please try again.`),z(!1);return}let n=M.name;N(null),z(!1),te(n)}async function G(t,r){if(t===r.name)return;k(null);let i=n.filter(e=>e!==t),o=i.indexOf(r.name);if(o===-1)return;r.after&&(o+=1);let s=[...i.slice(0,o),t,...i.slice(o)];try{await p.mutateAsync({path:{assistant_id:e},body:{llm:{profileOrder:s}}})}catch(e){a(e,{context:`settings-ai-profile-reorder`}),k(`Failed to reorder profiles. Please try again.`)}}let K=B.filter(e=>e.name!==M?.name&&e.source!==`managed`),ne=K.length>0?K:B.filter(e=>e.name!==M?.name);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(S.Content,{size:`md`,children:[(0,Q.jsxs)(S.Header,{children:[(0,Q.jsx)(S.Title,{children:`Model Profiles`}),(0,Q.jsx)(S.Description,{children:`Bundle a provider and model into a named profile. Assign profiles to specific actions or swap between them when chatting.`})]}),(0,Q.jsxs)(S.Body,{children:[B.length===0?(0,Q.jsx)(m,{variant:`body-medium-lighter`,as:`p`,className:`py-4 text-center text-(--content-tertiary)`,children:`No profiles yet. Create one to get started.`}):(0,Q.jsx)(`div`,{className:`space-y-1`,children:B.map(e=>(0,Q.jsx)(St,{profile:e,isDragging:w===e.name,dropTarget:E,isDeleting:_[e.name]??!1,deleteError:h[e.name],isToggling:y.has(e.name),onDragStart:t=>{A.current=e.name,T(e.name),t.dataTransfer&&(t.dataTransfer.effectAllowed=`move`)},onDragEnd:()=>{A.current=null,j.current=null,T(null),D(null)},onDragOver:t=>{t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=t.clientY>n.top+n.height/2,i={name:e.name,after:r};j.current=i,D(i)},onDragLeave:t=>{t.currentTarget.contains(t.relatedTarget)||(j.current=null,D(t=>t?.name===e.name?null:t))},onDrop:e=>{e.preventDefault();let t=A.current,n=j.current;A.current=null,j.current=null,T(null),D(null),t&&n&&G(t,n)},onEditClick:()=>l(e),onDeleteClick:()=>H(e.name),onStatusToggle:t=>void ee(e,t)},e.name))}),O&&(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:O}),x&&(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:x})]}),(0,Q.jsxs)(S.Footer,{className:`justify-between`,children:[(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:d,children:`+ New Profile`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:c,children:`Done`})]})]}),(0,Q.jsx)(yt,{blocked:M,availableReplacements:ne,replacement:I,onReplacementChange:L,error:P,saving:R,onClose:()=>{N(null),F(null)},onConfirm:()=>void W()})]})}function Tt({mode:e,connection:t,assistantId:n,existingNames:r,onSave:i,onCancel:a}){let[o,c]=(0,Z.useState)(e),[l,d]=(0,Z.useState)(void 0),f=o===`managed-edit`,[p,g]=(0,Z.useState)(t?.label??``),[_,v]=(0,Z.useState)(t?.name??``),[b,x]=(0,Z.useState)(t?.provider??`anthropic`),[C,w]=(0,Z.useState)(()=>t?t.auth.type:`platform`),[T,E]=(0,Z.useState)(()=>t?.auth.type===`api_key`?t.auth.credential:t?``:`credential/anthropic/api_key`),[D,O]=(0,Z.useState)(t?.baseUrl??``),[k,A]=(0,Z.useState)(()=>t?.models?t.models.map(e=>e.id).join(`, `):``),[j,M]=(0,Z.useState)(!1),[N,I]=(0,Z.useState)(null),L=b===`openai-compatible`,R=(0,Z.useMemo)(()=>b&&!De.includes(b)?[...De,b]:De,[b]),{handleLabelChange:z,resetDirty:B}=xe(o,g,v),[ee,V]=(0,Z.useState)(``),[H,U]=(0,Z.useState)(!1),W=u(),G=(0,Z.useMemo)(()=>ve(T),[T]),K=C===`api_key`&&G!==null,{hasStoredCredential:ne,isLoading:q}=Ke({assistantId:n,credentialKind:`credential`,credentialName:G?`${G.service}:${G.field}`:``,enabled:K}),{credentials:J}=Ge({assistantId:n,enabled:C===`api_key`});(0,Z.useEffect)(()=>{let e=t?.provider??`anthropic`;g(t?.label??``),v(t?.name??``),x(e),w(t?t.auth.type:`platform`),t?.auth.type===`api_key`?E(t.auth.credential):E(t?``:`credential/${e}/api_key`),B(),I(null),O(t?.baseUrl??``),A(t?.models?t.models.map(e=>e.id).join(`, `):``),V(``),U(!1)},[t,B]);function re(){c(`create`),d(b===`ollama`?`none`:`api_key`)}let ie=_.trim().length>0;async function ae(){if(ie){M(!0),I(null);try{let e;if(C===`api_key`){let t=T.trim()||`credential/${b}/api_key`,r=ee.trim();if(r){U(!0);try{let e=ve(t);await P({path:{assistant_id:n},body:e?{type:`credential`,name:`${e.service}:${e.field}`,value:r}:{type:`api_key`,name:b,value:r},throwOnError:!0});let i=He(n,`credential`,e?`${e.service}:${e.field}`:``);W.setQueryData(i,!0),W.invalidateQueries({queryKey:te({path:{assistant_id:n}})})}catch{I(`Failed to save API key. Please try again.`);return}finally{U(!1)}}e={type:`api_key`,credential:t}}else if(C===`oauth_subscription`)if(t?.auth.type===`oauth_subscription`)e=t.auth;else{I(`Use the "Sign in with ChatGPT" button to connect your subscription.`);return}else if(C===`service_account`)if(t?.auth.type===`service_account`)e=t.auth;else{I(`Service account connections cannot be created through this form.`);return}else e=C===`none`?{type:`none`}:{type:`platform`};let r=p.trim()||null,a={auth:e,label:r,...L&&{base_url:D.trim()||null,models:k.trim()?k.split(`,`).map(e=>({id:e.trim()})).filter(e=>e.id):null}},{data:o,response:s}=await F({path:{assistant_id:n,name:t?.name??_.trim()},body:a});if(!s?.ok){I(we(s?.status,_.trim()));return}if(!o){I(`Server returned an empty response. Please try again.`);return}i(o)}catch{I(`Failed to save connection. Please try again.`)}finally{M(!1)}}}let oe=J.filter(e=>e.service===b),se=o!==`create`&&t?.auth.type===`api_key`,ce=oe.length>0||se,le=Ee(`Enter your API key`,ne);return o===`create`?(0,Q.jsx)(Se,{variant:`modal`,assistantId:n,existingNames:r,defaultProviderType:b,defaultAuthType:l,onCreated:i,onCancel:a},b):(0,Q.jsxs)(S.Content,{size:`md`,children:[(0,Q.jsxs)(S.Header,{children:[(0,Q.jsx)(S.Title,{children:`Edit Connection`}),(0,Q.jsx)(S.Description,{children:f?`Managed by Vellum — auth is locked, but you can rename "${t?.name}".`:`Editing "${t?.name}".`})]}),(0,Q.jsxs)(S.Body,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsxs)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:[`Display Name`,` `,(0,Q.jsx)(`span`,{className:`text-[var(--content-disabled)]`,children:`(optional)`})]}),(0,Q.jsx)(y,{value:p,onChange:e=>z(e.target.value),placeholder:`e.g. My Anthropic Key`,fullWidth:!0})]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Key`}),(0,Q.jsx)(y,{value:_,placeholder:`e.g. anthropic-personal`,disabled:!0,fullWidth:!0})]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{"aria-label":`Provider`,value:b,onChange:x,disabled:!0,options:R.map(e=>({value:e,label:Qe[e]}))})]}),L&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Base URL`}),(0,Q.jsx)(y,{value:D,onChange:e=>O(e.target.value),placeholder:`https://api.example.com/v1`,disabled:f,fullWidth:!0})]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Models`}),(0,Q.jsx)(y,{value:k,onChange:e=>A(e.target.value),placeholder:`model-1, model-2`,disabled:f,fullWidth:!0}),(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:`Comma-separated model identifiers exposed by your endpoint.`})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Auth Type`}),(0,Q.jsx)(h,{"aria-label":`Auth type`,value:C,onChange:e=>{w(e),I(null)},disabled:f||b===`ollama`,options:(()=>{let e;return e=b===`ollama`?[`none`]:tt(b)?[`api_key`,`platform`]:[`api_key`],C&&!e.includes(C)&&e.push(C),e.map(e=>({value:e,label:Te[e]}))})()})]}),C===`api_key`&&(0,Q.jsx)(Fe,{apiKeyValue:ee,onApiKeyChange:V,credential:T,onCredentialChange:E,isAuthLocked:f,isLoadingCredential:q,apiKeyPlaceholder:le,provider:b,providerCredentials:oe,showAdvancedSection:ce,onError:I}),C===`oauth_subscription`&&(0,Q.jsx)(Ye,{assistantId:n,onConnected:i}),N&&(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:N})]}),(0,Q.jsxs)(S.Footer,{children:[(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,onClick:a,children:`Cancel`}),o===`managed-edit`&&(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:re,disabled:j||H,children:`Save as New`}),(0,Q.jsx)(s,{variant:`primary`,size:`compact`,disabled:!ie||j||H,onClick:()=>void ae(),children:j?`Saving…`:`Save`})]})]})}function Et(e){switch(e.type){case`api_key`:return`API key · ${e.credential}`;case`oauth_subscription`:return`ChatGPT Subscription`;case`platform`:return`Managed proxy`;case`none`:return`None (local)`;default:return e.type}}function Dt({isOpen:e,assistantId:t,onClose:n}){let[r,i]=(0,Z.useState)(!1),[a,o]=(0,Z.useState)(null),s=u(),{data:c,isLoading:l,isError:f}=d({...z({path:{assistant_id:t}}),enabled:e}),p=(0,Z.useMemo)(()=>c?.connections??[],[c]);function m(e){s.invalidateQueries({queryKey:G({path:{assistant_id:t}})}),i(!1),o(null)}let h=p.map(e=>e.name),g=()=>{i(!1),o(null)};return(0,Q.jsx)(S.Root,{open:e,onOpenChange:e=>{e||(r?g():n())},children:e?r?(0,Q.jsx)(Tt,{mode:a?a.isManaged?`managed-edit`:`edit`:`create`,connection:a??void 0,assistantId:t,existingNames:h,onSave:m,onCancel:g}):(0,Q.jsx)(Ot,{connections:p,loading:l,isError:f,assistantId:t,onClose:n,onEditClick:e=>{o(e),i(!0)},onNewClick:()=>{o(null),i(!0)},onConnectionDeleted:()=>{s.invalidateQueries({queryKey:G({path:{assistant_id:t}})})}}):null})}function Ot({connections:e,loading:t,isError:n,assistantId:r,onClose:i,onEditClick:a,onNewClick:o,onConnectionDeleted:c}){let[l,u]=(0,Z.useState)({}),[d,f]=(0,Z.useState)({});async function p(e){f(t=>({...t,[e]:!0})),u(t=>{let n={...t};return delete n[e],n});try{let{response:t}=await L({path:{assistant_id:r,name:e}});t?.ok||t?.status===404?c(e):t?.status===409?u(t=>({...t,[e]:`Connection is in use by one or more profiles. Remove those references first.`})):u(t=>({...t,[e]:`Failed to delete connection. Please try again.`}))}catch{u(t=>({...t,[e]:`Failed to delete connection. Please try again.`}))}finally{f(t=>{let n={...t};return delete n[e],n})}}return(0,Q.jsxs)(S.Content,{size:`md`,children:[(0,Q.jsxs)(S.Header,{children:[(0,Q.jsx)(S.Title,{children:`Provider Connections`}),(0,Q.jsx)(S.Description,{children:`Manage inference provider connections. Each connection binds a name to a provider and auth configuration.`})]}),(0,Q.jsx)(S.Body,{children:t?(0,Q.jsx)(`div`,{className:`space-y-2 py-2`,children:[1,2,3].map(e=>(0,Q.jsx)(`div`,{className:`h-10 animate-pulse rounded-lg bg-[var(--surface-active)]`},e))}):n?(0,Q.jsx)(m,{variant:`body-medium-default`,as:`p`,className:`py-4 text-center text-(--system-negative-strong)`,children:`Failed to load connections. Please try again.`}):e.length===0?(0,Q.jsx)(m,{variant:`body-medium-lighter`,as:`p`,className:`py-4 text-center text-(--content-tertiary)`,children:`No connections yet. Create one to get started.`}):(0,Q.jsx)(`div`,{className:`space-y-1`,children:e.map(e=>{let t=d[e.name]??!1,n=l[e.name],r=e.isManaged??!1;return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg px-2 py-2`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(m,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:e.label??e.name}),r&&(0,Q.jsx)(v,{tone:`positive`,title:`Managed by Platform — auth is locked, but you can rename this connection.`,children:`Platform`})]}),(0,Q.jsxs)(m,{variant:`body-medium-lighter`,as:`p`,className:`mt-0.5 text-(--content-tertiary)`,children:[e.label?`${e.name} · `:``,Qe[e.provider]??e.provider,` · `,Et(e.auth)]})]}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,onClick:()=>a(e),children:`Edit`}),(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(Ce,{}),"aria-label":`Delete ${e.name}`,disabled:r||t,title:r?`Managed connections cannot be deleted`:void 0,onClick:()=>void p(e.name),tintColor:`var(--system-negative-strong)`})]})]}),n?(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:n}):null]},e.name)})})}),(0,Q.jsxs)(S.Footer,{className:`justify-between`,children:[(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:o,children:`+ New Connection`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:i,children:`Done`})]})]})}function kt(e){let[t,n]=(0,Z.useState)(void 0);return(0,Z.useEffect)(()=>{t!==void 0&&e===t.value&&n(void 0)},[e,t]),[t===void 0?e:t.value,(0,Z.useCallback)(e=>n(e===void 0?void 0:{value:e}),[])]}function At(){let e=X(),t=u(),{data:n}=d({...B({path:{assistant_id:e}}),staleTime:3e4}),r=n?.llm?.activeProfile??null,i=n?.llm?.advisorProfile??null,o=n?.llm?.callSites??{},{profiles:c,profileOrder:l}=Oe(n?.llm,e),f=(0,Z.useMemo)(()=>Ae(c,l),[c,l]),p=V({onSuccess:n=>{U(t,{path:{assistant_id:e}},n)}}),[g,_]=kt(r),[v,y]=kt(i),[b,x]=(0,Z.useState)(!1),[S,w]=(0,Z.useState)(!1),[T,E]=(0,Z.useState)(!1),D=(0,Z.useMemo)(()=>je(f,[g]),[f,g]),O=(0,Z.useMemo)(()=>je(f,[v]),[f,v]),k=Object.entries(o).filter(([e,t])=>e!==`mainAgent`&&(t?.profile!=null||t?.provider!=null||t?.model!=null)).length,A=k===1?`1 Override`:k>0?`${k} Overrides`:`Overrides`,j=g!==r,N=v!==i,P=(0,Z.useCallback)(async()=>{try{let t={};j&&(t.activeProfile=g),N&&(t.advisorProfile=v),await p.mutateAsync({path:{assistant_id:e},body:{llm:t}}),C.success(`Saved.`)}catch(e){C.error(`Failed to save. Please try again.`),a(e,{context:`settings-ai-language-model-save`})}},[j,N,g,v,p,e]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ut,{title:`Language Model`,subtitle:`Configure the LLMs that power your assistant`,children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Default Profile`}),(0,Q.jsx)(h,{value:g??``,onChange:e=>{_(e===``?null:e)},placeholder:`Select a default profile…`,options:D.map(e=>({value:e.name,label:Ze(e)}))}),D.length===0?(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-1 text-(--content-tertiary)`,children:`No profiles yet. Click Profiles below to create one.`}):null]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Advisor Profile`}),(0,Q.jsx)(h,{value:v??``,onChange:e=>{y(e===``?null:e)},placeholder:`Select an advisor profile…`,options:O.map(e=>({value:e.name,label:Ze(e)}))}),(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-1 text-(--content-tertiary)`,children:`Which model your assistant consults for a second opinion`})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>E(!0),children:`Providers`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>x(!0),children:`Profiles`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>w(!0),children:A})]}),(j||N)&&(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:P,disabled:p.isPending}),p.isPending&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]})}),e&&(0,Q.jsx)(Ct,{isOpen:b,assistantId:e,onClose:()=>x(!1)}),e&&(0,Q.jsx)(_t,{isOpen:S,onClose:()=>w(!1),assistantId:e}),e&&(0,Q.jsx)(Dt,{isOpen:T,assistantId:e,onClose:()=>E(!1)})]})}var jt=`vellum:ai:imageGenMode`,Mt=`vellum:ai:imageGenModel`,Nt=`vellum:ai:webSearchMode`,Pt=`vellum:ai:webSearchProvider`,Ft=`vellum:ai:webFetchProvider`,It=`vellum:ai:emailMode`,Lt=`vellum:ai:emailByoProvider`,Rt=`vellum:voice:ttsProvider`,zt=`vellum:voice:ttsApiKey:`,Bt=`vellum:voice:ttsVoiceId:`,Vt=`vellum:voice:sttProvider`,Ht=`vellum:voice:sttApiKey:`;function Ut(){let e=X();return(0,Z.useCallback)(async(t,n)=>{try{let{data:r}=await P({path:{assistant_id:e},body:{value:n,type:`api_key`,name:t},throwOnError:!0});ze(r)}catch(e){throw e instanceof Error&&e.message===`No assistant found`?C.error(`Assistant not ready. Please try again.`):C.error(`Failed to save ${t} API key. Please try again.`),a(e,{context:`provision_provider_key`}),e}},[e])}function Wt(){let e=X(),i=u(),{data:o}=d({...B({path:{assistant_id:e}}),staleTime:3e4}),s=V({onSuccess:t=>{U(i,{path:{assistant_id:e}},t)}}),c=Ut(),{serverWebSearchMode:l,serverWebSearchProvider:f}=(0,Z.useMemo)(()=>{if(!o)return{serverWebSearchMode:Ne(n(Nt,`your-own`),`your-own`),serverWebSearchProvider:n(Pt,`inference-provider-native`)};let e=o.services?.[`web-search`];return{serverWebSearchMode:Ne(e?.mode??n(`vellum:ai:webSearchMode`,`your-own`),`your-own`),serverWebSearchProvider:e?.provider||n(`vellum:ai:webSearchProvider`,`inference-provider-native`)}},[o]),[p,m]=(0,Z.useState)(!1),[g,_]=kt(l),[v,b]=kt(f),[x,S]=(0,Z.useState)(``),w=Be.has(v),{hasStoredCredential:T}=Ke({assistantId:e,credentialKind:`api_key`,credentialName:v,enabled:w}),E=x.trim().length>0,D=p||g===`your-own`&&w&&!T&&!E||!(g!==l||(g===`managed`?`inference-provider-native`:v)!==f)&&!E,O=Ee(Ie[v]??`Enter your API key`,T),k=(0,Z.useCallback)(async()=>{m(!0);let t=x.trim(),n=g===`managed`?`inference-provider-native`:v,o=qe(n),l=g===`your-own`&&w&&t.length>0;try{l&&await c(n,t),await s.mutateAsync({path:{assistant_id:e},body:{services:{"web-search":{mode:g,provider:n}}}}).catch(e=>{throw C.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e})}catch{m(!1);return}m(!1);try{if(r(Nt,g),r(Pt,n),l){o&&r(o,t);let n=He(e,`api_key`,v);i.setQueryData(n,!0),i.invalidateQueries({queryKey:n}),S(``)}C.success(`Web search settings saved.`)}catch(e){a(e,{context:`settings-ai-web-search-persist-local`}),C.error(`Saved, but local preferences could not be written.`)}},[w,s,c,i,e,x,g,v]),A=(0,Z.useCallback)(()=>{let e=qe(v);e&&t(e),S(``),b(`inference-provider-native`),r(Pt,`inference-provider-native`)},[v,b]);return(0,Q.jsx)(ct,{title:`Web Search`,subtitle:`Configure how your assistant should search the web`,mode:g,onModeChange:e=>_(e),children:g===`managed`?(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Web search is included with managed inference.`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:k,disabled:D}),p&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]}):(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:v,onChange:b,options:Pe.map(e=>({value:e,label:Xe[e]??e}))})]}),w&&(0,Q.jsx)(y,{label:`API Key`,type:`password`,value:x,onChange:e=>S(e.target.value),placeholder:O,fullWidth:!0}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:k,disabled:D}),p&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),w&&(0,Q.jsx)(lt,{onClick:A,filled:!0})]})]})})}var Gt=`default`;function Kt(){let e=X(),i=u(),{data:o}=d({...B({path:{assistant_id:e}}),staleTime:3e4}),s=V({onSuccess:t=>{U(i,{path:{assistant_id:e}},t)}}),c=Ut(),l=(0,Z.useMemo)(()=>o?o.services?.[`web-fetch`]?.provider||n(`vellum:ai:webFetchProvider`,Gt):n(Ft,Gt),[o]),[f,p]=(0,Z.useState)(!1),[m,g]=kt(l),[_,v]=(0,Z.useState)(``),b=We.has(m),{hasStoredCredential:x}=Ke({assistantId:e,credentialKind:`api_key`,credentialName:m,enabled:b}),S=_.trim().length>0,w=f||b&&!x&&!S||m===l&&!S,T=Ee(Le[m]??`Enter your API key`,x),E=(0,Z.useCallback)(async()=>{p(!0);let t=_.trim(),n=b&&t.length>0;try{n&&await c(m,t),await s.mutateAsync({path:{assistant_id:e},body:{services:{"web-fetch":{provider:m}}}}).catch(e=>{throw C.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e})}catch{p(!1);return}p(!1);try{if(r(Ft,m),n){let n=Ue(m);n&&r(n,t);let a=He(e,`api_key`,m);i.setQueryData(a,!0),i.invalidateQueries({queryKey:a}),v(``)}C.success(`Web fetch settings saved.`)}catch(e){a(e,{context:`settings-ai-web-fetch-persist-local`}),C.error(`Saved, but local preferences could not be written.`)}},[b,s,c,i,e,_,m]),D=(0,Z.useCallback)(()=>{let e=Ue(m);e&&t(e),v(``),g(Gt),r(Ft,Gt)},[m,g]);return(0,Q.jsx)(ut,{id:`web-fetch`,title:`Web Fetch`,subtitle:`Configure how your assistant reads individual web pages`,children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:m,onChange:g,options:Re.map(e=>({value:e,label:Ve[e]??e}))})]}),b&&(0,Q.jsx)(y,{label:`API Key`,type:`password`,value:_,onChange:e=>v(e.target.value),placeholder:T,fullWidth:!0}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:E,disabled:w}),f&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),b&&(0,Q.jsx)(lt,{onClick:D,filled:!0})]})]})})}var qt=[{id:`elevenlabs`,displayName:`ElevenLabs`,subtitle:`High-quality voice synthesis for conversations and read-aloud. Requires an ElevenLabs API key.`,supportsVoiceSelection:!0,apiKeyPlaceholder:`sk_…`,credentialsGuide:{description:`Sign in to ElevenLabs, go to your Profile, and copy your API key.`,url:`https://elevenlabs.io/app/settings/api-keys`,linkLabel:`Open ElevenLabs API Keys`}},{id:`fish-audio`,displayName:`Fish Audio`,subtitle:`Natural-sounding voice synthesis with custom voice cloning. Requires a Fish Audio API key and voice reference ID.`,supportsVoiceSelection:!0,apiKeyPlaceholder:`Enter your Fish Audio API key`,credentialsGuide:{description:`Sign in to Fish Audio, navigate to API Keys in your dashboard, and create a new key.`,url:`https://fish.audio/app/api-keys/`,linkLabel:`Open Fish Audio API Keys`}},{id:`deepgram`,displayName:`Deepgram`,subtitle:`Fast, accurate text-to-speech synthesis. Uses the same API key as Deepgram speech-to-text.`,supportsVoiceSelection:!1,apiKeyPlaceholder:`Enter your Deepgram API key`,credentialsGuide:{description:`Sign in to Deepgram, navigate to your API Keys page, and create or copy an existing key. This is the same key used for speech-to-text.`,url:`https://console.deepgram.com/`,linkLabel:`Open Deepgram Console`}},{id:`xai`,displayName:`xAI`,subtitle:`Text-to-speech from xAI with expressive voices (eve, ara, rex, sal, leo). Requires an xAI API key.`,supportsVoiceSelection:!1,apiKeyPlaceholder:`Enter your xAI API key`,credentialsGuide:{description:`Sign in to the xAI console, navigate to API Keys, and create a new key.`,url:`https://console.x.ai/`,linkLabel:`Open xAI Console`}}],Jt=[{id:`deepgram`,displayName:`Deepgram`,subtitle:`Fast, accurate speech-to-text transcription. Uses the same API key as Deepgram text-to-speech.`,apiKeyPlaceholder:`Enter your Deepgram API key`,credentialsGuide:{description:`Sign in to Deepgram, navigate to your API Keys page, and create or copy an existing key. This is the same key used for text-to-speech.`,url:`https://console.deepgram.com/`,linkLabel:`Open Deepgram Console`}},{id:`openai`,displayName:`OpenAI`,subtitle:`OpenAI Whisper transcription. Requires an OpenAI API key.`,apiKeyPlaceholder:`sk-…`,credentialsGuide:{description:`Sign in to the OpenAI platform, navigate to API Keys, and create a new secret key.`,url:`https://platform.openai.com/api-keys`,linkLabel:`Open OpenAI API Keys`}},{id:`macos-native`,displayName:`macOS Native Dictation`,subtitle:`Apple's on-device speech recognition, running locally through the macOS helper. Works offline and needs no API key.`,requiresNativeDictation:!0,setupWarning:`Requires macOS Dictation to be turned on: open System Settings → Keyboard, then enable Dictation. macOS downloads the on-device speech model the first time Dictation is enabled — without it, voice input produces no transcript.`}],Yt=[{id:`mailgun`,displayName:`Mailgun`,setupSkill:`mailgun-setup`,docsUrl:`https://www.mailgun.com/`},{id:`resend`,displayName:`Resend`,setupSkill:`resend-setup`,docsUrl:`https://resend.com/`}],Xt=[`gemini-3.1-flash-image-preview`,`gemini-3-pro-image-preview`],Zt={"gemini-3.1-flash-image-preview":`Nano Banana 2`,"gemini-3-pro-image-preview":`Nano Banana Pro`};function Qt({assistantId:e,assistantHandle:t,emailRootDomain:n}){let r=u(),i=c(),[o,p]=l(),[m,h]=(0,Z.useState)(``),[v,y]=(0,Z.useState)(!1),[b,x]=(0,Z.useState)(null),[S,w]=(0,Z.useState)(``),[T,E]=(0,Z.useState)(null),[D,A]=(0,Z.useState)(!1),[j,N]=(0,Z.useState)(!1),[P,F]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{v||!t||m||(h(t),y(!0))},[t,v,m]);let I=d({...oe(),enabled:!0}),L=I.data,R=L?.entitlements,z=R?.managed_email===!0,B=!!R&&!z,ee=!L&&I.isError&&!I.isFetching,te=d({...ie({path:{assistant_id:e}}),enabled:!B}),V=d({...pe({path:{assistant_id:e}}),enabled:!B}),H=te.data?.results?.[0],U=V.data?.results?.[0],W=H?`${H.subdomain}.${n}`:null,G=d({...le({path:{assistant_id:e,id:U?.id??``}}),enabled:!!U?.id,refetchOnWindowFocus:!1}),q=d({...he({path:{assistant_id:e,id:H?.id??``}}),enabled:!!H?.id,refetchInterval:e=>{let t=e.state.data?.status;return t===`verified`||t===`failed`?!1:1e4},refetchOnWindowFocus:!0});(0,Z.useEffect)(()=>{o.get(`release`)!==`1`||!H||U||(N(!0),p(e=>{let t=new URLSearchParams(e);return t.delete(`release`),t},{replace:!0}))},[U,H,o,p]);let J=f(fe()),re=f(me()),ge=f(ae()),ve=f(se()),Y=(0,Z.useCallback)(()=>{let t={assistant_id:e};r.invalidateQueries({queryKey:ue({path:t})}),r.invalidateQueries({queryKey:de({path:t})}),U?.id&&r.invalidateQueries({queryKey:ce({path:{...t,id:U.id}})}),r.invalidateQueries({queryKey:_e()})},[U?.id,e,r]),ye=(0,Z.useCallback)(async()=>{let t=m.trim().toLowerCase();if(!t){x(`Enter a subdomain.`);return}A(!1);try{await J.mutateAsync({path:{assistant_id:e},body:{subdomain:t}}),h(``),x(null),Y(),C.success(`Domain ${t}.${n} registered.`)}catch(e){x(K(e,void 0,`Failed to register domain.`))}},[e,n,Y,J,m]),be=(0,Z.useCallback)(async()=>{let t=S.trim().toLowerCase();if(!t){E(`Enter an email username.`);return}try{await ge.mutateAsync({path:{assistant_id:e},body:{username:t}}),w(``),E(null),Y(),C.success(`Email address created.`)}catch(e){E(K(e,void 0,`Failed to create email address.`))}},[e,Y,ge,S]),xe=(0,Z.useCallback)(async()=>{if(U?.id){F(!1);try{await ve.mutateAsync({path:{assistant_id:e,id:U.id}}),Y(),C.success(`Email address removed.`)}catch(e){a(e,{context:`email_address_delete`}),C.error(`Failed to remove email address.`)}}},[U?.id,e,ve,Y]),Se=(0,Z.useCallback)(async()=>{if(!H?.id)return;if(U){C.error(`Remove the email address first.`);return}N(!1);let t=H.subdomain;try{await re.mutateAsync({path:{assistant_id:e,id:H.id}}),h(t),Y(),C.success(`Domain released.`)}catch(e){a(e,{context:`email_domain_release`}),C.error(`Failed to release domain.`)}},[U,e,re,H?.id,H?.subdomain,Y]);if(I.isLoading)return(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin`}),`Checking subscription…`]});if(B)return(0,Q.jsxs)(_,{tone:`info`,icon:(0,Q.jsx)(O,{className:`h-4 w-4`,"aria-hidden":!0}),title:`Get a dedicated email address for your assistant`,actions:(0,Q.jsx)(s,{size:`compact`,onClick:()=>i(`${ne.settings.billing}?adjust_plan`),children:`Upgrade to Pro`}),children:[`Pro plans include a managed`,` `,`<your-subdomain>.${n}`,` inbox — no provider setup required. Or switch to `,(0,Q.jsx)(`strong`,{children:`Your Own`}),` to bring an existing provider.`]});let we=ee?(0,Q.jsx)(_,{tone:`warning`,title:`Couldn't verify subscription status`,actions:(0,Q.jsx)(s,{size:`compact`,variant:`outlined`,onClick:()=>I.refetch(),children:`Retry`}),children:`We couldn't reach the billing service. The form below assumes managed email is enabled for your org — if it isn't, registering a domain will fail.`}):null;return H?U?(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[we,(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Address`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-body-small-default text-[var(--content-default)]`,children:U.address}),(0,Q.jsx)(ft,{status:q.data?.status,message:q.data?.message,isLoading:q.isLoading}),(0,Q.jsx)(s,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,Q.jsx)(Ce,{}),onClick:()=>F(!0),disabled:ve.isPending,"aria-label":`Remove email address`})]}),(0,Q.jsx)(g,{open:P,title:`Remove Email Address`,message:(0,Q.jsxs)(Q.Fragment,{children:[`Are you sure you want to remove `,(0,Q.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 font-mono text-[0.9em]`,children:U.address}),`? Your assistant will no longer be able to send or receive email at this address.`]}),confirmLabel:`Remove`,destructive:!0,onConfirm:xe,onCancel:()=>F(!1)})]}),G.data?.usage&&(0,Q.jsxs)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:[G.data.usage.sent_today,` /`,` `,G.data.usage.daily_limit,` sent today ·`,` `,G.data.usage.received_today,` received`]})]}):(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[we,(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Domain`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsxs)(`span`,{className:`font-mono text-body-small-default text-[var(--content-default)]`,children:[H.subdomain,`.`,n]}),(0,Q.jsx)(ft,{status:q.data?.status,message:q.data?.message,isLoading:q.isLoading}),(0,Q.jsx)(s,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,Q.jsx)(Ce,{}),onClick:()=>N(!0),disabled:re.isPending,"aria-label":`Release domain`})]}),(0,Q.jsx)(g,{open:j,title:`Release Domain`,message:(0,Q.jsxs)(Q.Fragment,{children:[`Are you sure you want to release `,(0,Q.jsxs)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 font-mono text-[0.9em]`,children:[H.subdomain,`.`,n]}),`? The subdomain will become available for others to claim.`]}),confirmLabel:`Release`,destructive:!0,onConfirm:Se,onCancel:()=>N(!1)})]}),(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Email address`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsxs)(`div`,{className:`flex h-9 min-w-0 flex-1 items-center rounded-md border bg-[var(--field-bg)] text-body-medium-lighter transition-[border-color] duration-150 ${T?`border-[var(--system-negative-strong)]`:`border-[var(--field-border)] focus-within:border-[var(--border-active)]`}`,children:[(0,Q.jsx)(`input`,{value:S,onChange:e=>{w(e.target.value.toLowerCase()),T&&E(null)},placeholder:`hi`,"aria-label":`Email username`,"aria-invalid":!!T,className:`h-full min-w-0 flex-1 bg-transparent pl-3 pr-1 text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none`}),(0,Q.jsxs)(`span`,{className:`shrink-0 pr-3 font-mono text-[var(--content-secondary)]`,children:[`@`,W]})]}),(0,Q.jsx)(s,{onClick:be,disabled:ge.isPending||!S.trim(),children:ge.isPending?`Creating…`:`Create`})]}),T&&(0,Q.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:T})]})]}):(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[we,(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Subdomain`}),(0,Q.jsx)(k,{subdomain:m,onSubdomainChange:e=>{h(e),b&&x(null)},domainSuffix:n,subdomainPlaceholder:`my-assistant`,error:b}),(0,Q.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Each assistant gets its own subdomain. Lowercase letters, numbers, and hyphens only.`}),(0,Q.jsx)(s,{onClick:()=>A(!0),disabled:J.isPending||!m.trim(),children:J.isPending?`Registering…`:`Register`}),(0,Q.jsx)(g,{open:D,title:`Set Subdomain`,message:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 font-mono text-[0.9em]`,children:m.trim().toLowerCase()||`subdomain`}),` will also become your assistant's public handle. You won't be able to change it once set.`]}),confirmLabel:`Confirm`,onConfirm:ye,onCancel:()=>A(!1)})]})}function $t(){let e=X(),t=q(),{data:o}=d({...ge(),enabled:t}),s=o?.results?.[0]?.handle,c=at.use.emailRootDomain(),l=Je(),[u,f]=(0,Z.useState)(()=>l===`gated`?`your-own`:Ne(n(It,`managed`),`managed`)),[p,m]=(0,Z.useState)(()=>{let e=n(Lt,`resend`);return e===`mailgun`||e===`resend`?e:`resend`}),g=d({queryKey:[`byoEmailCredential`,e,p],queryFn:async()=>{let{data:t}=await R({path:{assistant_id:e},body:{service:p,field:`api_key`},throwOnError:!0});return t},enabled:u===`your-own`||l===`gated`,staleTime:6e4,retry:i,meta:{errorContext:`byo_email_credential_check`}});(0,Z.useEffect)(()=>{g.error&&a(g.error,{context:`byo_email_credential_check`,bestEffort:!0})},[g.error]);let _=g.data?.hasSecret===!0,v=(0,Z.useCallback)(e=>{f(e),r(It,e)},[]),y=(0,Z.useCallback)(()=>{r(Lt,p),C.success(`Email settings saved.`)},[p]),b=(0,Z.useMemo)(()=>Yt.find(e=>e.id===p)??Yt[0],[p]),x=(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-sunken)] p-3 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,Q.jsx)(j,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--system-positive-strong)]`}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Q.jsxs)(`span`,{children:[`Configure `,b.displayName,` via the assistant CLI: ask the assistant to run the`,` `,(0,Q.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 text-[12px]`,children:b.setupSkill}),` `,`skill. It walks you through storing the API key, detecting the domain, and (optionally) wiring up an inbound webhook.`]}),(0,Q.jsxs)(`a`,{href:b.docsUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[`Open `,b.displayName,(0,Q.jsx)(A,{className:`h-3 w-3`})]})]})]}),S=(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:p,onChange:e=>{(e===`mailgun`||e===`resend`)&&m(e)},options:Yt.map(e=>({value:e.id,label:e.displayName}))})]}),_?(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-[var(--system-positive-subtle)] bg-[var(--surface-sunken)] p-3 text-body-small-default text-[var(--content-default)]`,children:[(0,Q.jsx)(D,{className:`h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}),(0,Q.jsxs)(`span`,{children:[b.displayName,` API key configured. To reconfigure, run the`,` `,(0,Q.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 text-[12px]`,children:b.setupSkill}),` `,`skill.`]})]}),(0,Q.jsxs)(`a`,{href:b.docsUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-body-small-default text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[`Open `,b.displayName,(0,Q.jsx)(A,{className:`h-3 w-3`})]})]}):x,(0,Q.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,Q.jsx)($,{onClick:y,disabled:!1})})]});return l===`gated`?(0,Q.jsx)(ut,{id:`email`,title:`Email`,subtitle:`Configure how your assistant sends and receives email`,children:S}):(0,Q.jsx)(ct,{id:`email`,title:`Email`,subtitle:`Configure how your assistant sends and receives email`,mode:u,onModeChange:v,children:u===`managed`?(0,Q.jsx)(`div`,{className:`space-y-4`,children:l===`disabled`?(0,Q.jsx)($e,{children:`Log in to the Vellum platform to manage email settings.`}):(0,Q.jsx)(Qt,{assistantId:e,assistantHandle:s,emailRootDomain:c})}):S})}function en(){let e=X(),t=u(),{data:i}=d({...B({path:{assistant_id:e}}),staleTime:3e4}),o=V({onSuccess:n=>{U(t,{path:{assistant_id:e}},n)}}),s=Ut(),[c,l]=kt((0,Z.useMemo)(()=>Ne(i?i.services?.[`image-generation`]?.mode??n(`vellum:ai:imageGenMode`,`your-own`):n(jt,`your-own`),`your-own`),[i])),[f,p]=(0,Z.useState)(()=>n(Mt,`gemini-3.1-flash-image-preview`)),[m,g]=(0,Z.useState)(``),[_,v]=(0,Z.useState)(!1),b=(0,Z.useCallback)(async()=>{v(!0);let n=m.trim(),i=c===`your-own`&&n.length>0;try{i&&await s(`gemini`,n),await o.mutateAsync({path:{assistant_id:e},body:{services:{"image-generation":{mode:c}}}}).catch(e=>{throw C.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e});try{await I({path:{assistant_id:e},body:{modelId:f},throwOnError:!0})}catch(e){throw C.error(`Failed to update image generation model. Please try again.`),a(e,{context:`set_image_gen_model`}),e}finally{t.invalidateQueries({queryKey:H({path:{assistant_id:e}})})}}catch{v(!1);return}v(!1);try{r(jt,c),r(Mt,f),i&&g(``),C.success(`Image generation settings saved.`)}catch(e){a(e,{context:`settings-ai-image-gen-persist-local`}),C.error(`Saved, but local preferences could not be written.`)}},[m,c,f,e,o,s,t]),x=(0,Z.useCallback)(()=>{g(``),p(`gemini-3.1-flash-image-preview`),r(Mt,`gemini-3.1-flash-image-preview`)},[]);return(0,Q.jsx)(ct,{title:`Image Generation`,subtitle:`Configure which model your assistant uses to generate images`,mode:c,onModeChange:e=>l(e),children:c===`managed`?(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Active Model`}),(0,Q.jsxs)(`div`,{className:`flex items-end gap-3`,children:[(0,Q.jsx)(h,{className:`flex-1`,value:f,onChange:p,options:Xt.map(e=>({value:e,label:Zt[e]??e}))}),(0,Q.jsx)($,{onClick:b,disabled:_}),_&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]}):(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsx)(y,{label:`API Key`,type:`password`,value:m,onChange:e=>g(e.target.value),placeholder:`Enter your Gemini API key`,fullWidth:!0}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Active Model`}),(0,Q.jsx)(h,{value:f,onChange:p,options:Xt.map(e=>({value:e,label:Zt[e]??e}))})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:b,disabled:_}),_&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),(0,Q.jsx)(lt,{onClick:x})]})]})})}async function tn(e){let{provider:t,apiKey:n,voiceId:r,text:i}=e;if(n.trim().length===0)return{kind:`error`,message:`Save an API key for this provider first.`};try{return t===`elevenlabs`?await nn(n,r,i):t===`deepgram`?await rn(n,i):t===`fish-audio`?{kind:`unsupported`,message:`Fish Audio TTS is only supported in the desktop app today. Use ElevenLabs or Deepgram to test from the browser.`}:t===`xai`?{kind:`unsupported`,message:`xAI TTS is only supported in the desktop app today. Use ElevenLabs or Deepgram to test from the browser.`}:{kind:`unsupported`,message:`TTS testing for "${t}" is not supported from the browser yet.`}}catch(e){return{kind:`error`,message:e instanceof Error?e.message:`Failed to reach the TTS provider.`}}}async function nn(e,t,n){let r=t.trim();if(r.length===0)return{kind:`error`,message:`Enter and save a Voice ID before testing ElevenLabs.`};let i=await fetch(`https://api.elevenlabs.io/v1/text-to-speech/${encodeURIComponent(r)}?output_format=mp3_44100_128`,{method:`POST`,headers:{"xi-api-key":e,"Content-Type":`application/json`,Accept:`audio/mpeg`},body:JSON.stringify({text:n,model_id:`eleven_turbo_v2_5`})});return i.ok?{kind:`audio`,blob:await i.blob()}:{kind:`error`,message:await an(i,`ElevenLabs rejected the request.`)}}async function rn(e,t){let n=await fetch(`https://api.deepgram.com/v1/speak?model=aura-2-thalia-en`,{method:`POST`,headers:{Authorization:`Token ${e}`,"Content-Type":`application/json`,Accept:`audio/mpeg`},body:JSON.stringify({text:t})});return n.ok?{kind:`audio`,blob:await n.blob()}:{kind:`error`,message:await an(n,`Deepgram rejected the request.`)}}async function an(e,t){try{let n=await e.text();if(n.length===0)return`${t} (HTTP ${e.status})`;try{let e=JSON.parse(n);if(e&&typeof e==`object`&&`detail`in e&&typeof e.detail==`string`)return e.detail;if(e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`)return e.message}catch{}return n.slice(0,200)}catch{return`${t} (HTTP ${e.status})`}}function on(){let e=X(),t=J.use.name()??`your assistant`,i=q(),{data:a}=d({...W({path:{assistant_id:e}}),enabled:i,staleTime:1/0}),o=a?.providers??qt,c=o[0]?.id??`elevenlabs`,[l,u]=(0,Z.useState)(()=>n(Rt,c)),[f,p]=(0,Z.useState)(l),[m,g]=(0,Z.useState)(``),[_,v]=(0,Z.useState)(``),[b,x]=(0,Z.useState)(``),[S,w]=(0,Z.useState)(!1),[T,E]=(0,Z.useState)(!1),D=(0,Z.useMemo)(()=>o.find(e=>e.id===l)??o[0],[l,o]),O=(0,Z.useCallback)(e=>{let t=n(zt+e,``),r=n(Bt+e,``);w(t.length>0),v(r),x(r),g(``)},[]);(0,Z.useEffect)(()=>{O(l)},[l,O]);let k=(0,Z.useMemo)(()=>{let e=l!==f,t=m.trim().length>0,n=_.trim()!==b;return e||t||n},[l,f,m,_,b]),A=(0,Z.useCallback)(()=>{r(Rt,l);let e=m.trim();e.length>0&&(r(zt+l,e),w(!0));let t=_.trim();r(Bt+l,t),p(l),x(t),g(``)},[l,m,_]),j=(0,Z.useCallback)(()=>{r(zt+l,``),w(!1),g(``)},[l]),M=(0,Z.useCallback)(async()=>{E(!0);try{let e=n(zt+l,``),r=m.trim(),i=r.length>0?r:e;if(i.length===0){C.error(`Save an API key for this provider before testing.`);return}let a=n(Bt+l,``),o=_.trim(),s=await tn({provider:l,apiKey:i,voiceId:o.length>0?o:a,text:`Hey! It's ${t}. How does this sound?`});if(s.kind!==`audio`){C.error(s.message);return}let c=URL.createObjectURL(s.blob);try{let e=new Audio(c);await e.play(),await new Promise(t=>{e.onended=()=>t(),e.onerror=()=>t()})}finally{URL.revokeObjectURL(c)}}finally{E(!1)}},[t,m,l,_]),N=S?`•••••••• (Enter a new key to replace)`:D.apiKeyPlaceholder;return(0,Q.jsx)(ut,{title:`Text-to-Speech`,subtitle:D.subtitle,children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:l,onChange:u,options:o.map(e=>({value:e.id,label:e.displayName})),"aria-label":`TTS provider`})]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`API Key`}),(0,Q.jsx)(y,{type:`password`,value:m,onChange:e=>g(e.target.value),placeholder:N,fullWidth:!0})]}),D.supportsVoiceSelection&&(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Voice ID`}),(0,Q.jsx)(y,{type:`text`,value:_,onChange:e=>v(e.target.value),placeholder:`Enter a voice ID`,fullWidth:!0})]}),(0,Q.jsx)(dt,{guide:D.credentialsGuide}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(s,{variant:`outlined`,onClick:M,disabled:T,children:T?`Testing…`:`Test`}),(0,Q.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:A,disabled:!k}),S&&(0,Q.jsx)(lt,{onClick:j})]})]})]})})}function sn(){let[e]=(0,Z.useState)(()=>Jt.filter(e=>!e.requiresNativeDictation||et())),t=e[0]?.id??`deepgram`,[i,a]=(0,Z.useState)(()=>{let r=n(Vt,t);return e.some(e=>e.id===r)?r:t}),[o,s]=(0,Z.useState)(i),[c,l]=(0,Z.useState)(``),[u,d]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{let i=n(Vt,t);i===`macos-native`&&!e.some(e=>e.id===i)&&r(Vt,t)},[e,t]);let f=(0,Z.useMemo)(()=>e.find(e=>e.id===i)??e[0],[e,i]),p=f.apiKeyPlaceholder!==void 0;(0,Z.useEffect)(()=>{d(n(Ht+i,``).length>0),l(``)},[i]);let m=(0,Z.useMemo)(()=>{let e=i!==o,t=c.trim().length>0;return e||t},[i,o,c]),g=(0,Z.useCallback)(()=>{r(Vt,i);let e=c.trim();e.length>0&&(r(Ht+i,e),d(!0)),s(i),l(``)},[i,c]),_=(0,Z.useCallback)(()=>{r(Ht+i,``),d(!1),l(``)},[i]),v=u?`•••••••• (Enter a new key to replace)`:f.apiKeyPlaceholder;return(0,Q.jsx)(ut,{title:`Speech-to-Text`,subtitle:f.subtitle,children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:i,onChange:a,options:e.map(e=>({value:e.id,label:e.displayName})),"aria-label":`STT provider`})]}),p&&(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`API Key`}),(0,Q.jsx)(y,{type:`password`,value:c,onChange:e=>l(e.target.value),placeholder:v,fullWidth:!0})]}),f.setupWarning&&(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-sunken)] p-3 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,Q.jsx)(N,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--system-mid-strong)]`}),(0,Q.jsx)(`span`,{children:f.setupWarning})]}),f.credentialsGuide&&(0,Q.jsx)(dt,{guide:f.credentialsGuide}),(0,Q.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,Q.jsx)($,{onClick:g,disabled:!m}),u&&(0,Q.jsx)(lt,{onClick:_})]})]})})}function cn(){return(0,Z.useEffect)(()=>{let e=window.location.hash.slice(1);e&&requestAnimationFrame(()=>{document.getElementById(e)?.scrollIntoView({block:`start`})})},[]),(0,Q.jsxs)(`div`,{className:`space-y-5`,children:[(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)] px-4 py-2.5`,children:[(0,Q.jsx)(j,{className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-tertiary)]`}),(0,Q.jsxs)(`p`,{className:`text-body-medium-lighter text-[var(--content-secondary)]`,children:[`Managed services are metered and deducted from your Vellum account balance.`,` `,(0,Q.jsxs)(`a`,{href:`https://www.vellum.ai/docs/pricing`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--primary-base)] hover:underline`,children:[`View pricing`,(0,Q.jsx)(A,{className:`h-3.5 w-3.5`})]})]})]}),(0,Q.jsx)(At,{}),(0,Q.jsx)(Wt,{}),(0,Q.jsx)(Kt,{}),(0,Q.jsx)($t,{}),(0,Q.jsx)(en,{}),(0,Q.jsx)(on,{}),(0,Q.jsx)(sn,{})]})}export{cn as AiPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,K as t,c as n}from"./local-mode-Bg6wpc5q.js";import{_ as r,at as i,g as a,h as o,it as s,yt as c}from"./sdk.gen-
|
|
1
|
+
import{$ as e,K as t,c as n}from"./local-mode-Bg6wpc5q.js";import{_ as r,at as i,g as a,h as o,it as s,yt as c}from"./sdk.gen-CpbzVVcg.js";import{i as l,n as u}from"./api-errors-0Nc54XoL.js";import{o as d}from"./assistant-api-avRsRyfr.js";import{B as f,C as p,R as m,a as h,i as g,o as _,w as v,z as y}from"./sdk.gen-DSjI3deY.js";async function b(e,t){let{data:n,error:r,response:i}=await p({body:e??{},query:t?{mode:t}:void 0,throwOnError:!1});return u(i,r,`Failed to hatch assistant.`),i.ok?{ok:!0,status:i.status,data:n}:{ok:!1,status:i.status,error:l(r,i)}}async function x(t){if(e()){let e=n();if(e)return{ok:!0,status:200,data:{id:e.assistantId,name:e.name??e.assistantId,status:`active`,is_local:!0,created:e.hatchedAt??``}}}if(t){let{data:e,error:n,response:r}=await f({path:{id:t},throwOnError:!1});return u(r,n,`Failed to get assistant.`),r.ok?{ok:!0,status:r.status,data:e}:{ok:!1,status:r.status,error:l(n,r)}}let r=await v({query:{hosting:`platform`},throwOnError:!1});if(u(r.response,r.error,`Failed to get assistant.`),!r.response.ok)return{ok:!1,status:r.response.status,error:l(r.error,r.response)};let i=r.data?.results??[];if(i.length>0)return{ok:!0,status:r.response.status,data:i[0]};let a=await v({query:{hosting:`local`},throwOnError:!1});if(u(a.response,a.error,`Failed to get assistant.`),a.response.ok){let e=a.data?.results??[];if(e.length>0)return{ok:!0,status:a.response.status,data:e[0]}}return a.response.ok?{ok:!1,status:404,error:{detail:`No assistants found`}}:{ok:!1,status:a.response.status,error:l(a.error,a.response)}}async function S(e){let{data:t,error:n,response:r}=await c({path:{assistant_id:e},throwOnError:!1});return u(r,n,`Failed to get assistant healthz.`),r.ok&&t?{ok:!0,status:r.status,data:t}:{ok:!1,status:r.status,error:l(n,r)}}async function C(e){let{data:t,error:n,response:r}=await i({path:{assistant_id:e},throwOnError:!1});if(u(r,n,`Failed to get assistant disk pressure status.`),r.ok){let e=d.safeParse(t);return e.success?{ok:!0,status:r.status,data:e.data}:{ok:!1,status:r.status,error:l(e.error.message,r)}}return{ok:!1,status:r.status,error:l(n,r)}}async function w(e){let{data:t,error:n,response:r}=await s({path:{assistant_id:e},throwOnError:!1});if(u(r,n,`Failed to acknowledge assistant disk pressure.`),r.ok){let e=d.safeParse(t);return e.success?{ok:!0,status:r.status,data:e.data}:{ok:!1,status:r.status,error:l(e.error.message,r)}}return{ok:!1,status:r.status,error:l(n,r)}}function T(e){let t=e&&typeof e==`object`&&!Array.isArray(e)?e:{};if(Array.isArray(t.backups))return t.backups;let n=t,r=[],i=n.local?.snapshots;if(Array.isArray(i))for(let e of i)r.push({snapshot_name:e.filename,pvc:``,created_at:e.created_at,ready_to_use:!0,backup_type:`scheduled`,path:e.path});if(Array.isArray(n.offsite)){for(let e of n.offsite)if(Array.isArray(e.snapshots))for(let t of e.snapshots)r.push({snapshot_name:t.filename,pvc:``,created_at:t.created_at,ready_to_use:!t.encrypted,backup_type:`scheduled`,path:t.path})}return r}function E(e){let t=e&&typeof e==`object`&&!Array.isArray(e)?e:{};return Array.isArray(t.backups)?t.backups:[]}async function D(e){let n=!t(),[r,i]=await Promise.all([a({path:{assistant_id:e},throwOnError:!1}),n?_({path:{assistant_id:e},throwOnError:!1}):null]);if(u(r.response,r.error,`Failed to list assistant backups.`),!r.response.ok)return{ok:!1,status:r.response.status,error:l(r.error,r.response)};let o=T(r.data);if(i){if(i.response?.ok){let e=E(i.data);return{ok:!0,status:r.response.status,data:[...e,...o]}}if(o.length===0&&i.response)return{ok:!1,status:i.response.status,error:l(i.error,i.response)}}return{ok:!0,status:r.response.status,data:o}}async function O(e){let{data:n,error:r,response:i}=t()?await o({path:{assistant_id:e},throwOnError:!1}):await g({path:{assistant_id:e},throwOnError:!1});if(u(i,r,`Failed to create assistant backup.`),i.ok){let e=n&&typeof n==`object`&&!Array.isArray(n)?n:{};return{ok:!0,status:i.status,data:e}}return{ok:!1,status:i.status,error:l(r,i)}}async function k(e,n){let{data:i,error:a,response:o}=t()?await r({path:{assistant_id:e},body:{path:n.path??n.snapshot_name},throwOnError:!1}):await h({path:{assistant_id:e,snapshot_name:n.snapshot_name},throwOnError:!1});if(u(o,a,`Failed to restore assistant backup.`),o.ok){let e=i&&typeof i==`object`&&!Array.isArray(i)?i:{};return{ok:!0,status:o.status,data:e}}return{ok:!1,status:o.status,error:l(a,o)}}async function A(e){let{data:t,error:n,response:r}=await m({path:{id:e},throwOnError:!1});return u(r,n,`Failed to restart assistant.`),r.ok?{ok:!0,data:t&&typeof t==`object`&&!Array.isArray(t)?t:{}}:{ok:!1,status:r.status,error:l(n,r)}}async function j(e){let{error:t,response:n}=await y({path:{id:e},throwOnError:!1});return u(n,t,`Failed to retire assistant.`),n.ok?{ok:!0}:{ok:!1,status:n.status,error:l(t,n)}}async function M(){let{data:e,error:t,response:n}=await v({query:{hosting:`all`},throwOnError:!1});return u(n,t,`Failed to list assistants.`),n.ok?{ok:!0,status:n.status,data:e?.results??[]}:{ok:!1,status:n.status,error:l(t,n)}}export{S as a,M as c,j as d,C as i,A as l,O as n,b as o,x as r,D as s,w as t,k as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./dropdown-yOV5eJnU.js";import{t as s}from"./input-Ch7OC6ME.js";import{t as c}from"./is-electron-CcgCla1v.js";import{a as l}from"./routes-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./dropdown-yOV5eJnU.js";import{t as s}from"./input-Ch7OC6ME.js";import{t as c}from"./is-electron-CcgCla1v.js";import{a as l}from"./routes-DNIOvC8p.js";import{kt as u}from"./index-zW00zfbZ.js";import{n as d,r as f}from"./provider-key-D0LokE4r.js";var p=e(t(),1),m=[{id:`anthropic`,displayName:`Anthropic`,apiKeyPlaceholder:`sk-ant-api03-...`,docsUrl:`https://console.anthropic.com/settings/keys`,requiresKey:!0},{id:`openai`,displayName:`OpenAI`,apiKeyPlaceholder:`sk-proj-...`,docsUrl:`https://platform.openai.com/api-keys`,requiresKey:!0},{id:`gemini`,displayName:`Google Gemini`,apiKeyPlaceholder:`AIza...`,docsUrl:`https://aistudio.google.com/apikey`,requiresKey:!0},{id:`ollama`,displayName:`Ollama`,apiKeyPlaceholder:null,docsUrl:`https://ollama.com/download`,requiresKey:!1},{id:`fireworks`,displayName:`Fireworks`,apiKeyPlaceholder:`fw_...`,docsUrl:`https://fireworks.ai/account/api-keys`,requiresKey:!0},{id:`openrouter`,displayName:`OpenRouter`,apiKeyPlaceholder:`sk-or-v1-...`,docsUrl:`https://openrouter.ai/keys`,requiresKey:!0},{id:`openai-compatible`,displayName:`OpenAI-compatible`,apiKeyPlaceholder:`Your provider's API key`,docsUrl:null,requiresKey:!0}],h=m[0];function g(e){return m.find(t=>t.id===e)}var _=a();function v(){let e=r(),[t]=i(),a=t.get(`hosting`),v=c(),[y,b]=(0,p.useState)(()=>d()?.provider??h.id),[x,S]=(0,p.useState)(()=>d()?.key??``),C=g(y)??h,w=C.requiresKey,T=!w||x.trim().length>0;return(0,_.jsx)(u,{children:(0,_.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${v?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`px-6 py-16`} text-[var(--content-default)]`,children:[(0,_.jsx)(`h1`,{className:v?`text-title-large`:`text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.5s ease-out 0.1s both`},children:`Connect a Model Provider`}),(0,_.jsx)(`p`,{className:`text-center text-body-medium-lighter text-[var(--content-tertiary)] ${v?`mt-3.5`:`mt-3`}`,style:{animation:`fadeInUp 0.5s ease-out 0.3s both`},children:`Enter an API key to connect your model provider.`}),(0,_.jsxs)(`div`,{className:`flex w-full flex-col gap-4 ${v?`mt-8`:`mt-10`}`,style:{animation:`fadeInUp 0.5s ease-out 0.4s both`},children:[(0,_.jsxs)(`div`,{className:`flex flex-col ${v?`gap-2`:`gap-1`}`,children:[(0,_.jsx)(`label`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,_.jsx)(o,{"aria-label":`Provider`,value:y,onChange:e=>{let t=g(e);t&&(b(t.id),S(``))},options:m.map(e=>({value:e.id,label:e.displayName}))})]}),w&&(0,_.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,_.jsx)(s,{type:`password`,label:`${C.displayName} API Key`,placeholder:C.apiKeyPlaceholder??`Enter your API key`,value:x,onChange:e=>S(e.target.value),fullWidth:!0}),C.docsUrl&&(0,_.jsxs)(`p`,{className:`self-start text-body-medium-lighter text-[var(--content-tertiary)]`,children:[`Don't have it?`,` `,(0,_.jsx)(`a`,{href:C.docsUrl,target:`_blank`,rel:`noreferrer`,className:`text-[var(--content-default)] underline`,children:`Get an API key here`})]})]})]}),(0,_.jsxs)(`div`,{className:`mt-8 flex w-full flex-col ${v?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.5s both`},children:[(0,_.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:!T,onClick:()=>{T&&(f({provider:y,key:w?x.trim():``}),e(a?`${l.onboarding.privacy}?hosting=${a}`:l.onboarding.privacy))},className:v?void 0:`h-11 text-base`,children:`Continue`}),(0,_.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,onClick:()=>{e(l.onboarding.hosting)},className:v?void 0:`h-11 text-base`,children:`Back`})]})]})})}export{v as ApiKeyScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-B1FKkx-w.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-D7s2Q_uG.js";import{n as i}from"./QueryClientProvider-DKhXIxGb.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./card-BibIM9x3.js";import"./src-BJj2O5XB.js";import{n as s}from"./toast-CxaZ5f1d.js";import{t as c}from"./archive-D-fnxeQf.js";import{t as l}from"./loader-circle-Bwz4b6EM.js";import{t as u}from"./triangle-alert-BbtZB9Cv.js";import{G as d}from"./sdk.gen-CpbzVVcg.js";import{t as f}from"./conversation-queries-CZRpIKsl.js";import{Jr as p,Tn as m}from"./index-zW00zfbZ.js";import{t as h}from"./use-active-assistant-id-C0jnbSsu.js";var g=e(n(),1),_=a();function v(e){if(e==null)return``;let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}function y(){return(0,_.jsx)(o,{children:(0,_.jsxs)(`div`,{className:`flex min-h-[400px] flex-col items-center justify-center px-6 py-16 text-center`,children:[(0,_.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full bg-[var(--surface-base)]`,children:(0,_.jsx)(c,{className:`h-6 w-6 text-[var(--content-disabled)] dark:text-[var(--content-default)]`})}),(0,_.jsx)(`h2`,{className:`mt-4 text-title-small text-[var(--content-default)]`,children:`No archived conversations`}),(0,_.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Conversations you archive will appear here.`})]})})}function b({conversation:e,isFirst:t,onUnarchive:n,isPending:i}){let a=[v(e.createdAt),e.source??`vellum-assistant`].filter(Boolean).join(` · `),o=e.title&&e.title.trim().length>0?e.title:`Untitled conversation`;return(0,_.jsxs)(`div`,{className:`flex items-center gap-3 py-3 ${t?``:`border-t border-[var(--border-base)]`}`,children:[(0,_.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,_.jsx)(`div`,{className:`truncate text-body-medium-default text-[var(--content-default)]`,children:o}),(0,_.jsx)(`p`,{className:`mt-0.5 truncate text-body-small-default text-[var(--content-tertiary)]`,children:a})]}),(0,_.jsx)(r,{variant:`outlined`,onClick:n,disabled:i,className:`shrink-0`,children:i?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(l,{className:`h-4 w-4 animate-spin`}),`Unarchiving`]}):`Unarchive`})]})}function x(){let e=i(),n=h(),{conversations:a,isLoading:c,isError:v,refetch:x}=f(n),[S,C]=(0,g.useState)(null),w=(0,g.useCallback)(async r=>{if(n){C(r);try{await d({path:{assistant_id:n,id:r},throwOnError:!0}),m(e,n)}catch(e){t(e,{context:`archive_settings_unarchive_conversation`}),s.error(`Failed to unarchive conversation.`)}finally{C(null)}}},[n,e]);return c?(0,_.jsx)(`div`,{className:`w-full`,children:(0,_.jsx)(`div`,{className:`flex min-h-[400px] items-center justify-center`,children:(0,_.jsx)(l,{className:`h-6 w-6 animate-spin text-[var(--content-disabled)]`})})}):v?(0,_.jsx)(`div`,{className:`w-full`,children:(0,_.jsx)(o,{children:(0,_.jsxs)(`div`,{className:`flex min-h-[400px] flex-col items-center justify-center px-6 py-16 text-center`,children:[(0,_.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full bg-[var(--system-error-lighter)]`,children:(0,_.jsx)(u,{className:`h-6 w-6 text-[var(--system-error-default)]`})}),(0,_.jsx)(`h2`,{className:`mt-4 text-title-small text-[var(--content-default)]`,children:`Failed to load archived conversations`}),(0,_.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Something went wrong. Please try again.`}),(0,_.jsxs)(r,{variant:`outlined`,onClick:x,className:`mt-4`,children:[(0,_.jsx)(p,{className:`h-4 w-4`}),`Retry`]})]})})}):a.length===0?(0,_.jsx)(`div`,{className:`w-full`,children:(0,_.jsx)(y,{})}):(0,_.jsx)(`div`,{className:`w-full`,children:(0,_.jsx)(o,{noPadding:!0,className:`px-4`,children:a.map((e,t)=>(0,_.jsx)(b,{conversation:e,isFirst:t===0,onUnarchive:()=>{w(e.conversationId)},isPending:S===e.conversationId},e.conversationId))})})}export{x as ArchivePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as ee}from"./chunk-jRWAZmH_.js";import{B as e,F as t,H as te,I as ne,L as n,M as r,N as i,P as a,R as o,U as s,V as c,z as l}from"./local-mode-Bg6wpc5q.js";var re=r([`idle`,`thinking`,`streaming`,`tool_running`,`awaiting_confirmation`]),ie=r([`assistant_turn`,`user_turn`,`global`]),u=r([`message_dequeued`,`thinking_delta`,`first_text_delta`,`tool_use_start`,`preview_start`,`tool_result_received`,`confirmation_requested`,`confirmation_resolved`,`context_compacting`,`message_complete`,`generation_cancelled`,`error_terminal`]),d=l({type:n(`assistant_activity_state`),conversationId:c(),activityVersion:o(),phase:re,anchor:ie,reason:u,requestId:c().optional(),statusText:c().optional()}),ae=l({type:n(`assistant_text_delta`),text:c(),messageId:c().optional(),conversationId:c().optional()}),oe=l({type:n(`assistant_thinking_delta`),thinking:c(),messageId:c().optional(),conversationId:c().optional(),timestampMs:o().optional()}),se=l({type:n(`assistant_turn_start`),messageId:c(),conversationId:c().optional()}),ce=l({type:n(`avatar_updated`),avatarPath:c()}),le=l({type:n(`compaction_circuit_closed`),conversationId:c()}),ue=l({type:n(`compaction_circuit_open`),conversationId:c(),reason:n(`3_consecutive_failures`),openUntil:o()}),f=l({label:c(),description:c(),pattern:c()}),p=l({label:c(),scope:c()}),m=l({label:c(),scope:c()}),h=l({filePath:c(),oldContent:c(),newContent:c(),isNewFile:t()}),de=r([`allow_once`,`allow_always`,`reject_once`,`reject_always`]),fe=l({optionId:c(),name:c(),kind:de}),pe=r([`sandbox`,`host`]),g=l({type:n(`confirmation_request`),requestId:c(),toolName:c(),input:e(c(),s()),riskLevel:c(),riskReason:c().optional(),isContainerized:t().optional(),executionTarget:pe.optional(),allowlistOptions:a(f),scopeOptions:a(p),directoryScopeOptions:a(m).optional(),diff:h.optional(),conversationId:c().optional(),persistentDecisionsAllowed:t().optional(),toolUseId:c().optional(),acpToolKind:c().optional(),acpOptions:a(fe).optional()}),_=l({type:n(`contact_request`),requestId:c(),channel:c().optional(),placeholder:c().optional(),label:c().optional(),description:c().optional(),role:c().optional()}),v=r([`PROVIDER_NETWORK`,`PROVIDER_RATE_LIMIT`,`MANAGED_USAGE_LIMIT`,`PROVIDER_OVERLOADED`,`PROVIDER_API`,`IMAGE_TOO_LARGE`,`PROVIDER_BILLING`,`PROVIDER_ORDERING`,`PROVIDER_WEB_SEARCH`,`PROVIDER_NOT_CONFIGURED`,`PROVIDER_INVALID_KEY`,`MANAGED_KEY_INVALID`,`CONTEXT_TOO_LARGE`,`BUDGET_YIELD_UNRECOVERED`,`MAX_TOKENS_REACHED`,`CONVERSATION_ABORTED`,`CONVERSATION_PROCESSING_FAILED`,`DISK_SPACE_CRITICAL`,`REGENERATE_FAILED`,`UNKNOWN`]),y=l({type:n(`conversation_error`),conversationId:c(),code:v,userMessage:c(),retryable:t(),debugDetails:c().optional(),errorCategory:c().optional(),connectionName:c().optional(),profileName:c().optional()}),b=r([`created`,`renamed`,`deleted`,`reordered`,`seen_changed`]),x=l({type:n(`conversation_list_invalidated`),reason:b}),S=l({type:n(`conversation_title_updated`),conversationId:c(),title:c()}),C=r([`disabled`,`ok`,`warning`,`critical`,`unknown`]),w=r([`agent-turns`,`background-work`,`remote-ingress`]),T=l({enabled:t(),state:C,locked:t(),acknowledged:t(),overrideActive:t(),effectivelyLocked:t(),lockId:c().nullable(),usagePercent:o().nullable(),thresholdPercent:o(),path:c().nullable(),lastCheckedAt:c().nullable(),blockedCapabilities:a(w),error:c().nullable()}),E=l({type:n(`disk_pressure_status_changed`),status:T}),me=l({id:c(),surfaceId:c(),author:c(),content:c(),anchorStart:o().optional(),anchorEnd:o().optional(),anchorText:c().optional(),parentCommentId:c().optional(),status:c(),createdAt:o(),updatedAt:o()}),D=l({type:n(`document_comment_created`),conversationId:c(),surfaceId:c(),comment:me}),O=l({type:n(`document_comment_deleted`),conversationId:c(),surfaceId:c(),commentId:c()}),k=l({type:n(`document_comment_reopened`),conversationId:c(),surfaceId:c(),commentId:c()}),A=l({type:n(`document_comment_resolved`),conversationId:c(),surfaceId:c(),commentId:c(),resolvedBy:c()}),j=l({type:n(`document_editor_update`),conversationId:c(),surfaceId:c(),markdown:c(),mode:c()}),M=l({type:n(`error`),message:c(),code:c().optional(),category:c().optional(),errorCategory:c().optional(),requestId:c().optional(),conversationId:c().optional()}),N=l({type:n(`generation_cancelled`),conversationId:c().optional()}),P=l({id:c().optional(),filename:c(),mimeType:c(),data:c(),sourceType:r([`sandbox_file`,`host_file`,`tool_block`]).optional(),sizeBytes:o().optional(),thumbnailData:c().optional(),fileBacked:t().optional(),filePath:c().optional()}),F=l({type:n(`generation_handoff`),conversationId:c().optional(),requestId:c().optional(),queuedCount:o(),messageId:c().optional(),attachments:a(P).optional(),attachmentWarnings:a(c()).optional()}),I=l({type:n(`home_feed_updated`),updatedAt:c(),newItemCount:o()}),L=l({type:n(`identity_changed`),name:c(),role:c(),personality:c(),emoji:c(),home:c()}),R=r([`approved`,`rejected`,`answered`,`cancelled`,`superseded`]),z=l({type:n(`interaction_resolved`),requestId:c(),conversationId:c(),state:R,kind:c()}),B=l({type:n(`message_complete`),messageId:c().optional(),conversationId:c().optional(),source:r([`main`,`aux`]).optional(),attachments:a(P).optional(),attachmentWarnings:a(c()).optional()}),he=l({type:n(`message_dequeued`),conversationId:c(),requestId:c()}),ge=l({type:n(`message_queued`),conversationId:c(),requestId:c(),position:o()}),_e=l({type:n(`message_queued_deleted`),conversationId:c(),requestId:c()}),ve=l({type:n(`message_request_complete`),conversationId:c(),requestId:c(),runStillActive:t().optional()}),ye=l({type:n(`navigate_settings`),tab:c()}),be=l({type:n(`notification_intent`),sourceEventName:c(),title:c(),body:c(),deliveryId:c().optional(),deepLinkMetadata:e(c(),s()).optional(),targetGuardianPrincipalId:c().optional(),silent:t().optional()}),xe=l({type:n(`open_url`),url:c().min(1),title:c().optional(),conversationId:c().optional()}),V=l({id:c(),label:c(),description:c().optional()}),H=l({id:c(),question:c(),description:c().optional(),options:a(V),freeTextPlaceholder:c().optional()}),Se=l({type:n(`question_request`),requestId:c(),questions:a(H),question:c(),description:c().optional(),options:a(V),freeTextPlaceholder:c().optional(),conversationId:c().optional(),toolUseId:c().optional()}),Ce=l({type:n(`relationship_state_updated`),updatedAt:c()}),we=l({type:n(`secret_request`),requestId:c(),service:c(),field:c(),label:c(),description:c().optional(),placeholder:c().optional(),conversationId:c().optional(),purpose:c().optional(),allowedTools:a(c()).optional(),allowedDomains:a(c()).optional(),allowOneTimeSend:t().optional()}),Te=l({type:c(),content:c().optional(),text:c().optional(),result:c().optional(),input:e(c(),s()).optional(),toolName:c().optional(),isError:t().optional(),toolUseId:c().optional()}).passthrough(),Ee=l({type:n(`subagent_event`),conversationId:c(),subagentId:c(),event:Te}).strict(),De=l({type:n(`subagent_spawned`),subagentId:c(),parentConversationId:c(),label:c(),objective:c(),isFork:t().optional(),parentToolUseId:c().optional()}).strict(),U=r([`pending`,`running`,`awaiting_input`,`completed`,`failed`,`aborted`]),W=l({inputTokens:o(),outputTokens:o(),estimatedCost:o()}).strict(),Oe=l({type:n(`subagent_status_changed`),subagentId:c(),status:U,error:c().optional(),usage:W.optional()}).strict(),ke=l({type:n(`sync_changed`),tags:a(c().min(1)).min(1),originClientId:c().min(1).optional()}),Ae=r([`tool_start`,`tool_complete`,`status`]),je=l({type:n(`tool_output_chunk`),chunk:c(),conversationId:c().optional(),toolUseId:c().optional(),subType:Ae.optional(),subToolName:c().optional(),subToolInput:c().optional(),subToolIsError:t().optional(),subToolId:c().optional(),messageId:c().optional()}),Me=l({pattern:c(),label:c()}),Ne=r([`anthropic-native`,`brave`,`perplexity`,`tavily`,`firecrawl`]),Pe=r([`default`,`firecrawl`]),Fe=l({rank:o(),title:c(),url:c(),domain:c(),faviconUrl:c().optional(),snippet:c().optional(),age:c().optional(),score:o().optional()}),Ie=l({query:c(),provider:Ne,resultCount:o(),durationMs:o(),results:a(Fe),errorMessage:c().optional()}),Le=l({url:c(),finalUrl:c(),provider:Pe.optional(),status:o(),contentType:c().optional(),byteCount:o(),charCount:o(),truncated:t(),title:c().optional(),domain:c(),faviconUrl:c().optional(),redirectCount:o(),durationMs:o(),errorMessage:c().optional(),mayRequireJavaScript:t().optional()}),G=l({webSearch:Ie.optional(),webFetch:Le.optional()}),Re=l({type:n(`tool_result`),toolName:c(),result:c(),isError:t().optional(),diff:h.optional(),status:c().optional(),conversationId:c().optional(),imageData:c().optional(),imageDataList:a(c()).optional(),toolUseId:c().optional(),messageId:c().optional(),riskLevel:c().optional(),riskReason:c().optional(),matchedTrustRuleId:c().optional(),isContainerized:t().optional(),riskScopeOptions:a(Me).optional(),riskAllowlistOptions:a(f).optional(),riskDirectoryScopeOptions:a(m).optional(),approvalMode:c().optional(),approvalReason:c().optional(),riskThreshold:c().optional(),activityMetadata:G.optional(),completedAt:o().optional()}),ze=l({type:n(`tool_use_preview_start`),toolUseId:c(),toolName:c(),conversationId:c().optional(),messageId:c().optional()}),Be=l({type:n(`tool_use_start`),toolName:c(),input:e(c(),s()),toolUseId:c().optional(),messageId:c().optional(),conversationId:c().optional(),startedAt:o().optional()}),Ve=r([`request_received`,`request_queued`,`request_dequeued`,`llm_call_started`,`llm_call_finished`,`assistant_message`,`tool_started`,`tool_permission_requested`,`tool_permission_decided`,`tool_finished`,`tool_failed`,`generation_handoff`,`message_complete`,`generation_cancelled`,`request_error`,`tool_profiling_summary`]),K=r([`info`,`success`,`warning`,`error`]),He=l({type:n(`trace_event`),eventId:c(),conversationId:c(),requestId:c().optional(),timestampMs:o(),sequence:o(),kind:Ve,status:K.optional(),summary:c(),attributes:e(c(),te([c(),o(),t(),i()])).optional()}),Ue=l({type:n(`ui_surface_complete`),conversationId:c(),surfaceId:c(),summary:c(),submittedData:e(c(),s()).optional()}),We=l({type:n(`ui_surface_dismiss`),conversationId:c(),surfaceId:c()}),Ge=l({id:c(),label:c(),style:r([`primary`,`secondary`,`destructive`]).optional(),data:e(c(),s()).optional()}),Ke=l({type:n(`ui_surface_show`),conversationId:c(),surfaceId:c(),surfaceType:c(),title:c().optional(),data:e(c(),s()),actions:a(Ge).optional(),display:r([`inline`,`panel`]).optional(),messageId:c().optional(),persistent:t().optional(),toolCallId:c().optional()}),qe=l({type:n(`ui_surface_update`),conversationId:c(),surfaceId:c(),data:e(c(),s())}),q=l({type:n(`usage_progress`),conversationId:c(),inputTokens:o(),outputTokens:o(),estimatedCost:o(),model:c()}),Je=l({type:n(`usage_update`),conversationId:c(),inputTokens:o(),outputTokens:o(),cacheCreationInputTokens:o().optional(),cacheReadInputTokens:o().optional(),totalInputTokens:o(),totalOutputTokens:o(),estimatedCost:o(),model:c(),contextWindowTokens:o().optional(),contextWindowMaxTokens:o().optional()}),Ye=l({type:n(`user_message_echo`),text:c(),conversationId:c().optional(),messageId:c().optional(),requestId:c().optional(),clientMessageId:c().optional()}).strict(),J=r([`running`,`completed`,`failed`,`aborted`,`cap_exceeded`,`interrupted`]),Xe=l({type:n(`workflow_completed`),runId:c(),conversationId:c().optional(),status:J,agentsSpawned:o(),inputTokens:o(),outputTokens:o(),summary:c().optional()}).strict(),Ze=l({type:n(`workflow_leaf_finished`),runId:c(),conversationId:c(),seq:o().int(),status:r([`completed`,`failed`]),label:c().optional(),inputTokens:o().optional(),outputTokens:o().optional(),resultSummary:c().optional()}).strict(),Qe=l({type:n(`workflow_leaf_started`),runId:c(),conversationId:c(),seq:o().int(),label:c().optional(),phase:c().optional(),promptSummary:c().optional()}).strict(),$e=l({type:n(`workflow_progress`),runId:c(),conversationId:c().optional(),agentsSpawned:o(),phase:c().optional(),label:c().optional(),message:c().optional()}).strict(),et=l({type:n(`workflow_started`),runId:c(),conversationId:c(),toolUseId:c().optional(),label:c().optional()}).strict(),tt=`syntheticAgentErrorMessage`,nt=`compactionAgent`,rt=3e4,it=l({cursorInTextField:t().optional().describe(`Whether the cursor is in an editable text field when dictation started`)}).passthrough().describe(`Dictation context (app name, window title, bundle ID, cursor state, selected text)`),at=l({transcription:c().describe(`Raw speech transcription`),context:it,profileId:c().describe(`Optional dictation profile ID`).optional()}),Y=l({id:c(),filename:c(),mimeType:c(),sizeBytes:o(),kind:c(),data:c().optional(),thumbnailData:c().optional(),fileBacked:t().optional()}),ot=l({pattern:c(),label:c()}),st=l({label:c(),description:c(),pattern:c()}),ct=l({scope:c(),label:c()}),lt=l({requestId:c(),title:c().optional(),description:c().optional(),toolName:c().optional(),riskLevel:c().optional(),riskReason:c().optional(),input:e(c(),s()).optional(),allowlistOptions:a(f).optional(),scopeOptions:a(p).optional(),directoryScopeOptions:a(m).optional(),persistentDecisionsAllowed:t().optional()}),ut=l({requestId:c(),entries:a(H)}),dt=r([`approved`,`denied`,`timed_out`]),X=l({id:c().optional(),name:c(),input:e(c(),s()),result:c().optional(),isError:t().optional(),imageData:c().optional(),imageDataList:a(c()).optional(),startedAt:o().optional(),completedAt:o().optional(),confirmationDecision:dt.optional(),confirmationLabel:c().optional(),riskLevel:c().optional(),riskReason:c().optional(),matchedTrustRuleId:c().optional(),autoApproved:t().optional(),approvalMode:c().optional(),approvalReason:c().optional(),riskThreshold:c().optional(),riskScopeOptions:a(ot).optional(),riskAllowlistOptions:a(st).optional(),riskDirectoryScopeOptions:a(ct).optional(),activityMetadata:G.optional(),scopeOptions:a(p).optional(),pendingConfirmation:lt.optional(),pendingQuestion:ut.optional()}),ft=l({id:c(),label:c(),style:c().optional(),data:e(c(),s()).optional()}),Z=l({surfaceId:c(),surfaceType:c(),title:c().optional(),data:e(c(),s()),actions:a(ft).optional(),display:c().optional(),persistent:t().optional(),completed:t().optional(),completionSummary:c().optional(),toolCallId:c().optional()}),pt=l({subagentId:c(),label:c(),status:c(),error:c().optional(),conversationId:c().optional(),objective:c().optional()}),mt=l({appUrl:c().optional(),webUrl:c().optional()}),ht=l({channelId:c(),channelName:c().optional(),channelTs:c(),threadTs:c().optional(),sender:l({displayName:c().optional(),externalUserId:c().optional()}).optional(),messageLink:mt.optional(),threadLink:mt.optional()}),gt=l({type:n(`text`),text:c()}),_t=l({type:n(`thinking`),thinking:c(),startedAt:o().optional(),completedAt:o().optional()}),vt=l({type:n(`tool_use`),toolCall:X}),yt=l({type:n(`surface`),surface:Z}),bt=l({type:n(`attachment`),attachment:Y}),xt=ne(`type`,[gt,_t,vt,yt,bt]),St=l({id:c(),mergedMessageIds:a(c()).optional(),clientMessageId:c().optional(),role:r([`user`,`assistant`]),content:c().meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Flat plain-text body (joined text segments).`}).optional(),timestamp:c(),attachments:a(Y),toolCalls:a(X).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks (the tool_use variant). Flat list of tool calls.`}).optional(),surfaces:a(Z).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks (the surface variant). Flat list of surfaces.`}).optional(),textSegments:a(c()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Text segments split by tool-call boundaries.`}).optional(),thinkingSegments:a(c()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Reasoning text extracted from thinking blocks.`}).optional(),contentOrder:a(c()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Positional "<type>:<index>" content ordering (e.g. "text:0", "thinking:1").`}).optional(),contentBlocks:a(xt).optional(),subagentNotification:pt.optional(),slackMessage:ht.optional()}),Ct=l({status:T}),wt=n(`notification`),Tt=r([`new`,`seen`,`acted_on`,`dismissed`]),Et=r([`low`,`medium`,`high`,`critical`]),Dt=r([`security`,`scheduling`,`background`,`email`,`system`]),Ot=r([`heartbeat`,`memory_consolidation`,`schedule`,`auto_analysis`,`user`,`other`]),kt=l({id:c(),label:c(),prompt:c()}),At=r([`emailDraft`,`documentPreview`,`permissionChat`,`paymentAuth`,`toolPermission`,`updatesList`]),jt=l({kind:At}),Mt=l({id:c(),type:wt,priority:o().int().min(0).max(100),title:c().optional(),summary:c(),timestamp:c(),status:Tt.default(`new`),expiresAt:c().optional(),actions:a(kt).optional(),urgency:Et.optional(),conversationId:c().optional(),detailPanel:jt.optional(),category:Dt.optional(),noteworthy:t().optional(),fromAssistant:t().optional(),metadata:e(c(),s()).optional(),sourceType:Ot.optional(),sourceKey:c().optional(),sourceLabel:c().optional(),createdAt:c()}),Nt=r([`deterministic`,`assistant`]),Pt=l({id:c(),label:c(),icon:c().optional(),prompt:c(),source:Nt}),Ft=l({greeting:c(),timeAwayLabel:c(),newCount:o().int().min(0)}),It=l({items:a(Mt),updatedAt:c(),contextBanner:Ft,suggestedPrompts:a(Pt)}),Lt=l({id:c(),category:r([`voice`,`world`,`priorities`]),text:c(),confidence:r([`strong`,`uncertain`]),source:r([`onboarding`,`inferred`])}),Rt=l({id:c(),name:c(),description:c(),tier:r([`unlocked`,`next-up`,`earned`]),gate:c(),unlockHint:c().optional(),ctaLabel:c().optional()}),zt=l({version:n(1),assistantId:c(),tier:te([n(1),n(2),n(3),n(4)]),progressPercent:o(),facts:a(Lt),capabilities:a(Rt),conversationCount:o(),hatchedDate:c(),assistantName:c(),userName:c().optional(),updatedAt:c()}),Bt=l({provider:c().nullish(),model:c().nullish(),status:c().nullish(),inputTokens:o().nullish(),outputTokens:o().nullish(),cacheCreationInputTokens:o().nullish(),cacheReadInputTokens:o().nullish(),stopReason:c().nullish(),requestMessageCount:o().nullish(),requestToolCount:o().nullish(),responseMessageCount:o().nullish(),responseToolCallCount:o().nullish(),responsePreview:c().nullish(),toolCallNames:a(c()).nullish(),estimatedCostUsd:o().nullish(),durationMs:o().nullish()}),Q=l({kind:c(),label:c().nullish(),role:c().nullish(),text:c().nullish(),toolName:c().nullish(),data:s().optional(),language:c().nullish()}),Vt=l({name:c().nullish(),message:c().nullish(),code:c().nullish(),provider:c().nullish(),statusCode:o().nullish(),retryAfterMs:o().nullish()}),Ht=l({id:c(),createdAt:o(),requestPayload:i(),responsePayload:i(),provider:c().nullish(),summary:Bt.nullish(),requestSections:a(Q).nullish(),responseSections:a(Q).nullish(),agentLoopExitReason:c().nullish(),callSite:c().nullish(),error:Vt.nullish()}),Ut=l({nodeId:c(),score:o(),semanticSimilarity:o(),recencyBoost:o(),type:c().optional()}),Wt=l({reason:c(),semanticUnavailable:t(),fallbackSources:a(c())}),Gt=l({enabled:t(),degraded:t(),provider:c().nullable(),model:c().nullable(),degradation:Wt.nullable(),semanticHits:o().nullish(),mergedCount:o().nullish(),selectedCount:o().nullish(),tier1Count:o().nullish(),tier2Count:o().nullish(),hybridSearchLatencyMs:o().nullish(),sparseVectorUsed:t().nullish(),injectedTokens:o().nullish(),latencyMs:o().nullish(),topCandidates:a(Ut),injectedText:c().nullable(),reason:c().nullable(),queryContext:c().nullable()}),Kt=l({slug:c(),finalActivation:o(),ownActivation:o(),priorActivation:o(),simUser:o(),simAssistant:o(),simNow:o(),simUserRerankBoost:o().optional(),simAssistantRerankBoost:o().optional(),inRerankPool:t().optional(),spreadContribution:o(),source:c(),status:c()}),qt=l({d:o(),c_user:o(),c_assistant:o(),c_now:o(),k:o(),hops:o(),top_k:o(),epsilon:o()}),Jt=l({turn:o(),mode:c(),concepts:a(Kt),config:qt}),Yt=l({slug:c(),source:c(),pinned:t(),sectionOrdinal:o().nullable().optional(),sectionHeading:c().nullable().optional()}),Xt=l({turn:o(),live:t(),shadow:t(),selections:a(Yt),injectedText:c()}),Zt=l({messageId:c().nullish(),conversationKey:c().nullish(),conversationId:c().nullish(),conversationKind:c(),conversationTotalEstimatedCostUsd:o().nullish(),logs:a(Ht),memoryRecall:Gt.nullable(),memoryV2Activation:Jt.nullable(),memoryV3Selection:Xt.nullish()}),Qt=l({type:c(),content:c(),toolName:c().optional(),isError:t().optional(),messageId:c().optional()}),$t=l({subagentId:c(),objective:c().optional(),status:U.optional(),usage:W.optional(),events:a(Qt)}),en=l({seq:o().int(),kind:r([`agent`,`workflow`]),label:c().optional(),phase:c().optional(),promptSummary:c().optional(),status:c(),resultSummary:c().optional(),inputTokens:o().optional(),outputTokens:o().optional(),createdAt:o().nullable()}),tn=l({runId:c(),status:J.optional(),agentsSpawned:o().optional(),inputTokens:o().optional(),outputTokens:o().optional(),phase:c().optional(),leaves:a(en)}),nn=ee({ACPOptionKindSchema:()=>de,ACPOptionSchema:()=>fe,AllowlistOptionSchema:()=>f,AssistantActivityAnchorSchema:()=>ie,AssistantActivityPhaseSchema:()=>re,AssistantActivityReasonSchema:()=>u,AssistantActivityStateEventSchema:()=>d,AssistantEventEnvelopeSchema:()=>rn,AssistantEventSchema:()=>$,AssistantOutboundAttachmentSchema:()=>P,AssistantTextDeltaEventSchema:()=>ae,AssistantThinkingDeltaEventSchema:()=>oe,AssistantTurnStartEventSchema:()=>se,AvatarUpdatedEventSchema:()=>ce,CALL_SITE_COMPACTION_AGENT:()=>nt,CALL_SITE_SYNTHETIC_AGENT_ERROR_MESSAGE:()=>tt,CapabilitySchema:()=>Rt,CompactionCircuitClosedEventSchema:()=>le,CompactionCircuitOpenEventSchema:()=>ue,ConfirmationDiffSchema:()=>h,ConfirmationExecutionTargetSchema:()=>pe,ConfirmationRequestEventSchema:()=>g,ContactRequestEventSchema:()=>_,ContextBannerSchema:()=>Ft,ConversationAttachmentBlockSchema:()=>bt,ConversationContentBlockSchema:()=>xt,ConversationErrorCodeSchema:()=>v,ConversationErrorEventSchema:()=>y,ConversationListInvalidatedEventSchema:()=>x,ConversationListInvalidatedReasonSchema:()=>b,ConversationMessageAttachmentSchema:()=>Y,ConversationMessageSchema:()=>St,ConversationMessageSurfaceSchema:()=>Z,ConversationMessageToolCallSchema:()=>X,ConversationSlackMessageSchema:()=>ht,ConversationSubagentNotificationSchema:()=>pt,ConversationSurfaceBlockSchema:()=>yt,ConversationTextBlockSchema:()=>gt,ConversationThinkingBlockSchema:()=>_t,ConversationTitleUpdatedEventSchema:()=>S,ConversationToolUseBlockSchema:()=>vt,DEFAULT_TOOL_EXECUTION_TIMEOUT_SEC:()=>120,DictationContextSchema:()=>it,DictationRequestSchema:()=>at,DirectoryScopeOptionSchema:()=>m,DiskPressureBlockedCapabilitySchema:()=>w,DiskPressureStateSchema:()=>C,DiskPressureStatusChangedEventSchema:()=>E,DiskPressureStatusResponseSchema:()=>Ct,DiskPressureStatusSchema:()=>T,DocumentCommentCreatedEventSchema:()=>D,DocumentCommentDeletedEventSchema:()=>O,DocumentCommentReopenedEventSchema:()=>k,DocumentCommentResolvedEventSchema:()=>A,DocumentEditorUpdateEventSchema:()=>j,ErrorEventSchema:()=>M,FactSchema:()=>Lt,FeedActionSchema:()=>kt,FeedItemCategorySchema:()=>Dt,FeedItemDetailPanelKindSchema:()=>At,FeedItemDetailPanelSchema:()=>jt,FeedItemSchema:()=>Mt,FeedItemSourceTypeSchema:()=>Ot,FeedItemStatusSchema:()=>Tt,FeedItemTypeSchema:()=>wt,FeedItemUrgencySchema:()=>Et,GenerationCancelledEventSchema:()=>N,GenerationHandoffEventSchema:()=>F,HomeFeedResponseSchema:()=>It,HomeFeedUpdatedEventSchema:()=>I,IdentityChangedEventSchema:()=>L,InteractionResolutionStateSchema:()=>R,InteractionResolvedEventSchema:()=>z,LLMCallErrorSchema:()=>Vt,LLMCallSummarySchema:()=>Bt,LLMContextSectionSchema:()=>Q,LLMRequestLogEntrySchema:()=>Ht,LlmContextResponseSchema:()=>Zt,MemoryCandidateSchema:()=>Ut,MemoryDegradationSchema:()=>Wt,MemoryRecallLogSchema:()=>Gt,MemoryV2ActivationLogSchema:()=>Jt,MemoryV2ConceptRowSchema:()=>Kt,MemoryV2ConfigSnapshotSchema:()=>qt,MemoryV3SelectionLogSchema:()=>Xt,MemoryV3SelectionRowSchema:()=>Yt,MessageCompleteEventSchema:()=>B,MessageDequeuedEventSchema:()=>he,MessageQueuedDeletedEventSchema:()=>_e,MessageQueuedEventSchema:()=>ge,MessageRequestCompleteEventSchema:()=>ve,NavigateSettingsEventSchema:()=>ye,NotificationIntentEventSchema:()=>be,OpenUrlEventSchema:()=>xe,PendingToolConfirmationSchema:()=>lt,QuestionEntrySchema:()=>H,QuestionOptionSchema:()=>V,QuestionRequestEventSchema:()=>Se,RelationshipStateSchema:()=>zt,RelationshipStateUpdatedEventSchema:()=>Ce,RiskScopeOptionSchema:()=>Me,SSE_REPLAY_RING_AGE_LIMIT_MS:()=>rt,SSE_REPLAY_RING_COUNT_LIMIT:()=>200,ScopeOptionSchema:()=>p,SecretRequestEventSchema:()=>we,SubagentDetailEventSchema:()=>Qt,SubagentDetailResponseSchema:()=>$t,SubagentEventEventSchema:()=>Ee,SubagentInnerEventSchema:()=>Te,SubagentSpawnedEventSchema:()=>De,SubagentStatusChangedEventSchema:()=>Oe,SubagentStatusSchema:()=>U,SubagentUsageStatsSchema:()=>W,SuggestedPromptSchema:()=>Pt,SuggestedPromptSourceSchema:()=>Nt,SurfaceActionSchema:()=>Ge,SyncChangedEventSchema:()=>ke,ToolActivityMetadataSchema:()=>G,ToolOutputChunkEventSchema:()=>je,ToolOutputChunkSubTypeSchema:()=>Ae,ToolResultEventSchema:()=>Re,ToolUsePreviewStartEventSchema:()=>ze,ToolUseStartEventSchema:()=>Be,TraceEventKindSchema:()=>Ve,TraceEventSchema:()=>He,TraceEventStatusSchema:()=>K,UISurfaceCompleteEventSchema:()=>Ue,UISurfaceDismissEventSchema:()=>We,UISurfaceShowEventSchema:()=>Ke,UISurfaceUpdateEventSchema:()=>qe,UsageProgressEventSchema:()=>q,UsageUpdateEventSchema:()=>Je,UserMessageEchoEventSchema:()=>Ye,WebFetchMetadataSchema:()=>Le,WebSearchMetadataSchema:()=>Ie,WebSearchProviderIdSchema:()=>Ne,WebSearchResultItemSchema:()=>Fe,WorkflowCompletedEventSchema:()=>Xe,WorkflowJournalResponseSchema:()=>tn,WorkflowLeafFinishedEventSchema:()=>Ze,WorkflowLeafSchema:()=>en,WorkflowLeafStartedEventSchema:()=>Qe,WorkflowProgressEventSchema:()=>$e,WorkflowRunStatusSchema:()=>J,WorkflowStartedEventSchema:()=>et}),$=ne(`type`,[d,ae,oe,se,ce,le,ue,g,_,y,x,S,E,D,O,k,A,j,M,N,F,I,L,z,B,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Ee,De,Oe,ke,je,Re,ze,Be,He,Ue,We,Ke,qe,q,Je,Ye,Xe,Ze,Qe,$e,et]),rn=l({id:c(),conversationId:c().optional(),seq:o().int().optional(),emittedAt:c(),message:$});export{$t as a,nt as c,tn as i,tt as l,$ as n,Ct as o,nn as r,rt as s,rn as t,q as u};
|
|
1
|
+
import{r as ee}from"./chunk-jRWAZmH_.js";import{B as e,F as t,H as te,I as ne,L as n,M as r,N as i,P as a,R as o,U as s,V as c,z as l}from"./local-mode-Bg6wpc5q.js";var re=r([`idle`,`thinking`,`streaming`,`tool_running`,`awaiting_confirmation`]),ie=r([`assistant_turn`,`user_turn`,`global`]),u=r([`message_dequeued`,`thinking_delta`,`first_text_delta`,`tool_use_start`,`preview_start`,`tool_result_received`,`confirmation_requested`,`confirmation_resolved`,`context_compacting`,`message_complete`,`generation_cancelled`,`error_terminal`]),d=l({type:n(`assistant_activity_state`),conversationId:c(),activityVersion:o(),phase:re,anchor:ie,reason:u,requestId:c().optional(),statusText:c().optional()}),ae=l({type:n(`assistant_text_delta`),text:c(),messageId:c().optional(),conversationId:c().optional()}),oe=l({type:n(`assistant_thinking_delta`),thinking:c(),messageId:c().optional(),conversationId:c().optional(),timestampMs:o().optional()}),se=l({type:n(`assistant_turn_start`),messageId:c(),conversationId:c().optional()}),ce=l({type:n(`avatar_updated`),avatarPath:c()}),le=l({type:n(`compaction_circuit_closed`),conversationId:c()}),ue=l({type:n(`compaction_circuit_open`),conversationId:c(),reason:n(`3_consecutive_failures`),openUntil:o()}),f=l({label:c(),description:c(),pattern:c()}),p=l({label:c(),scope:c()}),m=l({label:c(),scope:c()}),h=l({filePath:c(),oldContent:c(),newContent:c(),isNewFile:t()}),de=r([`allow_once`,`allow_always`,`reject_once`,`reject_always`]),fe=l({optionId:c(),name:c(),kind:de}),pe=r([`sandbox`,`host`]),g=l({type:n(`confirmation_request`),requestId:c(),toolName:c(),input:e(c(),s()),riskLevel:c(),riskReason:c().optional(),isContainerized:t().optional(),executionTarget:pe.optional(),allowlistOptions:a(f),scopeOptions:a(p),directoryScopeOptions:a(m).optional(),diff:h.optional(),conversationId:c().optional(),persistentDecisionsAllowed:t().optional(),toolUseId:c().optional(),acpToolKind:c().optional(),acpOptions:a(fe).optional()}),_=l({type:n(`contact_request`),requestId:c(),channel:c().optional(),placeholder:c().optional(),label:c().optional(),description:c().optional(),role:c().optional()}),v=r([`PROVIDER_NETWORK`,`PROVIDER_RATE_LIMIT`,`MANAGED_USAGE_LIMIT`,`PROVIDER_OVERLOADED`,`PROVIDER_API`,`IMAGE_TOO_LARGE`,`PROVIDER_BILLING`,`PROVIDER_ORDERING`,`PROVIDER_WEB_SEARCH`,`PROVIDER_NOT_CONFIGURED`,`PROVIDER_INVALID_KEY`,`MANAGED_KEY_INVALID`,`CONTEXT_TOO_LARGE`,`BUDGET_YIELD_UNRECOVERED`,`MAX_TOKENS_REACHED`,`CONVERSATION_ABORTED`,`CONVERSATION_PROCESSING_FAILED`,`DISK_SPACE_CRITICAL`,`REGENERATE_FAILED`,`UNKNOWN`]),y=l({type:n(`conversation_error`),conversationId:c(),code:v,userMessage:c(),retryable:t(),debugDetails:c().optional(),errorCategory:c().optional(),connectionName:c().optional(),profileName:c().optional()}),b=r([`created`,`renamed`,`deleted`,`reordered`,`seen_changed`]),x=l({type:n(`conversation_list_invalidated`),reason:b}),S=l({type:n(`conversation_title_updated`),conversationId:c(),title:c()}),C=r([`disabled`,`ok`,`warning`,`critical`,`unknown`]),w=r([`agent-turns`,`background-work`,`remote-ingress`]),T=l({enabled:t(),state:C,locked:t(),acknowledged:t(),overrideActive:t(),effectivelyLocked:t(),lockId:c().nullable(),usagePercent:o().nullable(),thresholdPercent:o(),path:c().nullable(),lastCheckedAt:c().nullable(),blockedCapabilities:a(w),error:c().nullable()}),E=l({type:n(`disk_pressure_status_changed`),status:T}),me=l({id:c(),surfaceId:c(),author:c(),content:c(),anchorStart:o().optional(),anchorEnd:o().optional(),anchorText:c().optional(),parentCommentId:c().optional(),status:c(),createdAt:o(),updatedAt:o()}),D=l({type:n(`document_comment_created`),conversationId:c(),surfaceId:c(),comment:me}),O=l({type:n(`document_comment_deleted`),conversationId:c(),surfaceId:c(),commentId:c()}),k=l({type:n(`document_comment_reopened`),conversationId:c(),surfaceId:c(),commentId:c()}),A=l({type:n(`document_comment_resolved`),conversationId:c(),surfaceId:c(),commentId:c(),resolvedBy:c()}),j=l({type:n(`document_editor_update`),conversationId:c(),surfaceId:c(),markdown:c(),mode:c()}),M=l({type:n(`error`),message:c(),code:c().optional(),category:c().optional(),errorCategory:c().optional(),requestId:c().optional(),conversationId:c().optional()}),N=l({type:n(`generation_cancelled`),conversationId:c().optional()}),P=l({id:c().optional(),filename:c(),mimeType:c(),data:c(),sourceType:r([`sandbox_file`,`host_file`,`tool_block`]).optional(),sizeBytes:o().optional(),thumbnailData:c().optional(),fileBacked:t().optional(),filePath:c().optional()}),F=l({type:n(`generation_handoff`),conversationId:c().optional(),requestId:c().optional(),queuedCount:o(),messageId:c().optional(),attachments:a(P).optional(),attachmentWarnings:a(c()).optional()}),I=l({type:n(`home_feed_updated`),updatedAt:c(),newItemCount:o()}),L=l({type:n(`identity_changed`),name:c(),role:c(),personality:c(),emoji:c(),home:c()}),R=r([`approved`,`rejected`,`answered`,`cancelled`,`superseded`]),z=l({type:n(`interaction_resolved`),requestId:c(),conversationId:c(),state:R,kind:c()}),B=l({type:n(`message_complete`),messageId:c().optional(),conversationId:c().optional(),source:r([`main`,`aux`]).optional(),attachments:a(P).optional(),attachmentWarnings:a(c()).optional()}),he=l({type:n(`message_dequeued`),conversationId:c(),requestId:c()}),ge=l({type:n(`message_queued`),conversationId:c(),requestId:c(),position:o()}),_e=l({type:n(`message_queued_deleted`),conversationId:c(),requestId:c()}),ve=l({type:n(`message_request_complete`),conversationId:c(),requestId:c(),runStillActive:t().optional()}),ye=l({type:n(`navigate_settings`),tab:c()}),be=l({type:n(`notification_intent`),sourceEventName:c(),title:c(),body:c(),deliveryId:c().optional(),deepLinkMetadata:e(c(),s()).optional(),targetGuardianPrincipalId:c().optional(),silent:t().optional()}),xe=l({type:n(`open_url`),url:c().min(1),title:c().optional(),conversationId:c().optional()}),V=l({id:c(),label:c(),description:c().optional()}),H=l({id:c(),question:c(),description:c().optional(),options:a(V),freeTextPlaceholder:c().optional()}),Se=l({type:n(`question_request`),requestId:c(),questions:a(H),question:c(),description:c().optional(),options:a(V),freeTextPlaceholder:c().optional(),conversationId:c().optional(),toolUseId:c().optional()}),Ce=l({type:n(`relationship_state_updated`),updatedAt:c()}),we=l({type:n(`secret_request`),requestId:c(),service:c(),field:c(),label:c(),description:c().optional(),placeholder:c().optional(),conversationId:c().optional(),purpose:c().optional(),allowedTools:a(c()).optional(),allowedDomains:a(c()).optional(),allowOneTimeSend:t().optional()}),Te=l({type:c(),content:c().optional(),text:c().optional(),result:c().optional(),input:e(c(),s()).optional(),toolName:c().optional(),isError:t().optional(),toolUseId:c().optional()}).passthrough(),Ee=l({type:n(`subagent_event`),conversationId:c(),subagentId:c(),event:Te}).strict(),De=l({type:n(`subagent_spawned`),subagentId:c(),parentConversationId:c(),label:c(),objective:c(),isFork:t().optional(),parentToolUseId:c().optional()}).strict(),U=r([`pending`,`running`,`awaiting_input`,`completed`,`failed`,`aborted`]),W=l({inputTokens:o(),outputTokens:o(),estimatedCost:o()}).strict(),Oe=l({type:n(`subagent_status_changed`),subagentId:c(),status:U,error:c().optional(),usage:W.optional()}).strict(),ke=l({type:n(`sync_changed`),tags:a(c().min(1)).min(1),originClientId:c().min(1).optional()}),Ae=r([`tool_start`,`tool_complete`,`status`]),je=l({type:n(`tool_output_chunk`),chunk:c(),conversationId:c().optional(),toolUseId:c().optional(),subType:Ae.optional(),subToolName:c().optional(),subToolInput:c().optional(),subToolIsError:t().optional(),subToolId:c().optional(),messageId:c().optional()}),Me=l({pattern:c(),label:c()}),Ne=r([`anthropic-native`,`brave`,`perplexity`,`tavily`,`firecrawl`]),Pe=r([`default`,`firecrawl`]),Fe=l({rank:o(),title:c(),url:c(),domain:c(),faviconUrl:c().optional(),snippet:c().optional(),age:c().optional(),score:o().optional()}),Ie=l({query:c(),provider:Ne,resultCount:o(),durationMs:o(),results:a(Fe),errorMessage:c().optional()}),Le=l({url:c(),finalUrl:c(),provider:Pe.optional(),status:o(),contentType:c().optional(),byteCount:o(),charCount:o(),truncated:t(),title:c().optional(),domain:c(),faviconUrl:c().optional(),redirectCount:o(),durationMs:o(),errorMessage:c().optional(),mayRequireJavaScript:t().optional()}),G=l({webSearch:Ie.optional(),webFetch:Le.optional()}),Re=l({type:n(`tool_result`),toolName:c(),result:c(),isError:t().optional(),diff:h.optional(),status:c().optional(),conversationId:c().optional(),imageData:c().optional(),imageDataList:a(c()).optional(),toolUseId:c().optional(),messageId:c().optional(),riskLevel:c().optional(),riskReason:c().optional(),matchedTrustRuleId:c().optional(),isContainerized:t().optional(),riskScopeOptions:a(Me).optional(),riskAllowlistOptions:a(f).optional(),riskDirectoryScopeOptions:a(m).optional(),approvalMode:c().optional(),approvalReason:c().optional(),riskThreshold:c().optional(),activityMetadata:G.optional(),completedAt:o().optional()}),ze=l({type:n(`tool_use_preview_start`),toolUseId:c(),toolName:c(),conversationId:c().optional(),messageId:c().optional()}),Be=l({type:n(`tool_use_start`),toolName:c(),input:e(c(),s()),toolUseId:c().optional(),messageId:c().optional(),conversationId:c().optional(),startedAt:o().optional()}),Ve=r([`request_received`,`request_queued`,`request_dequeued`,`llm_call_started`,`llm_call_finished`,`assistant_message`,`tool_started`,`tool_permission_requested`,`tool_permission_decided`,`tool_finished`,`tool_failed`,`generation_handoff`,`message_complete`,`generation_cancelled`,`request_error`,`tool_profiling_summary`]),K=r([`info`,`success`,`warning`,`error`]),He=l({type:n(`trace_event`),eventId:c(),conversationId:c(),requestId:c().optional(),timestampMs:o(),sequence:o(),kind:Ve,status:K.optional(),summary:c(),attributes:e(c(),te([c(),o(),t(),i()])).optional()}),Ue=l({type:n(`ui_surface_complete`),conversationId:c(),surfaceId:c(),summary:c(),submittedData:e(c(),s()).optional()}),We=l({type:n(`ui_surface_dismiss`),conversationId:c(),surfaceId:c()}),Ge=l({id:c(),label:c(),style:r([`primary`,`secondary`,`destructive`]).optional(),data:e(c(),s()).optional()}),Ke=l({type:n(`ui_surface_show`),conversationId:c(),surfaceId:c(),surfaceType:c(),title:c().optional(),data:e(c(),s()),actions:a(Ge).optional(),display:r([`inline`,`panel`]).optional(),messageId:c().optional(),persistent:t().optional(),toolCallId:c().optional()}),qe=l({type:n(`ui_surface_update`),conversationId:c(),surfaceId:c(),data:e(c(),s())}),q=l({type:n(`usage_progress`),conversationId:c(),inputTokens:o(),outputTokens:o(),estimatedCost:o(),model:c()}),Je=l({type:n(`usage_update`),conversationId:c(),inputTokens:o(),outputTokens:o(),cacheCreationInputTokens:o().optional(),cacheReadInputTokens:o().optional(),totalInputTokens:o(),totalOutputTokens:o(),estimatedCost:o(),model:c(),contextWindowTokens:o().optional(),contextWindowMaxTokens:o().optional()}),Ye=l({type:n(`user_message_echo`),text:c(),conversationId:c().optional(),messageId:c().optional(),requestId:c().optional(),clientMessageId:c().optional()}).strict(),J=r([`running`,`completed`,`failed`,`aborted`,`cap_exceeded`,`interrupted`]),Xe=l({type:n(`workflow_completed`),runId:c(),conversationId:c().optional(),status:J,agentsSpawned:o(),inputTokens:o(),outputTokens:o(),summary:c().optional()}).strict(),Ze=l({type:n(`workflow_leaf_finished`),runId:c(),conversationId:c(),seq:o().int(),status:r([`completed`,`failed`]),label:c().optional(),inputTokens:o().optional(),outputTokens:o().optional(),resultSummary:c().optional()}).strict(),Qe=l({type:n(`workflow_leaf_started`),runId:c(),conversationId:c(),seq:o().int(),label:c().optional(),phase:c().optional(),promptSummary:c().optional()}).strict(),$e=l({type:n(`workflow_progress`),runId:c(),conversationId:c().optional(),agentsSpawned:o(),phase:c().optional(),label:c().optional(),message:c().optional()}).strict(),et=l({type:n(`workflow_started`),runId:c(),conversationId:c(),toolUseId:c().optional(),label:c().optional()}).strict(),tt=`syntheticAgentErrorMessage`,nt=`compactionAgent`,rt=3e4,it=l({cursorInTextField:t().optional().describe(`Whether the cursor is in an editable text field when dictation started`)}).passthrough().describe(`Dictation context (app name, window title, bundle ID, cursor state, selected text)`),at=l({transcription:c().describe(`Raw speech transcription`),context:it,profileId:c().describe(`Optional dictation profile ID`).optional()}),Y=l({id:c(),filename:c(),mimeType:c(),sizeBytes:o(),kind:c(),data:c().optional(),thumbnailData:c().optional(),fileBacked:t().optional()}),ot=l({pattern:c(),label:c()}),st=l({label:c(),description:c(),pattern:c()}),ct=l({scope:c(),label:c()}),lt=l({requestId:c(),title:c().optional(),description:c().optional(),toolName:c().optional(),riskLevel:c().optional(),riskReason:c().optional(),input:e(c(),s()).optional(),allowlistOptions:a(f).optional(),scopeOptions:a(p).optional(),directoryScopeOptions:a(m).optional(),persistentDecisionsAllowed:t().optional()}),ut=l({requestId:c(),entries:a(H)}),dt=r([`approved`,`denied`,`timed_out`]),X=l({id:c().optional(),name:c(),input:e(c(),s()),result:c().optional(),isError:t().optional(),imageData:c().optional(),imageDataList:a(c()).optional(),startedAt:o().optional(),completedAt:o().optional(),confirmationDecision:dt.optional(),confirmationLabel:c().optional(),riskLevel:c().optional(),riskReason:c().optional(),matchedTrustRuleId:c().optional(),autoApproved:t().optional(),approvalMode:c().optional(),approvalReason:c().optional(),riskThreshold:c().optional(),riskScopeOptions:a(ot).optional(),riskAllowlistOptions:a(st).optional(),riskDirectoryScopeOptions:a(ct).optional(),activityMetadata:G.optional(),scopeOptions:a(p).optional(),pendingConfirmation:lt.optional(),pendingQuestion:ut.optional()}),ft=l({id:c(),label:c(),style:c().optional(),data:e(c(),s()).optional()}),Z=l({surfaceId:c(),surfaceType:c(),title:c().optional(),data:e(c(),s()),actions:a(ft).optional(),display:c().optional(),persistent:t().optional(),completed:t().optional(),completionSummary:c().optional(),toolCallId:c().optional()}),pt=l({subagentId:c(),label:c(),status:c(),error:c().optional(),conversationId:c().optional(),objective:c().optional()}),mt=l({appUrl:c().optional(),webUrl:c().optional()}),ht=l({channelId:c(),channelName:c().optional(),channelTs:c(),threadTs:c().optional(),sender:l({displayName:c().optional(),externalUserId:c().optional()}).optional(),messageLink:mt.optional(),threadLink:mt.optional()}),gt=l({type:n(`text`),text:c()}),_t=l({type:n(`thinking`),thinking:c(),startedAt:o().optional(),completedAt:o().optional()}),vt=l({type:n(`tool_use`),toolCall:X}),yt=l({type:n(`surface`),surface:Z}),bt=l({type:n(`attachment`),attachment:Y}),xt=ne(`type`,[gt,_t,vt,yt,bt]),St=l({id:c(),mergedMessageIds:a(c()).optional(),clientMessageId:c().optional(),role:r([`user`,`assistant`]),content:c().meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Flat plain-text body (joined text segments).`}).optional(),timestamp:c(),attachments:a(Y),toolCalls:a(X).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks (the tool_use variant). Flat list of tool calls.`}).optional(),surfaces:a(Z).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks (the surface variant). Flat list of surfaces.`}).optional(),textSegments:a(c()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Text segments split by tool-call boundaries.`}).optional(),thinkingSegments:a(c()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Reasoning text extracted from thinking blocks.`}).optional(),contentOrder:a(c()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Positional "<type>:<index>" content ordering (e.g. "text:0", "thinking:1").`}).optional(),contentBlocks:a(xt).optional(),subagentNotification:pt.optional(),slackMessage:ht.optional()}),Ct=l({status:T}),wt=n(`notification`),Tt=r([`new`,`seen`,`acted_on`,`dismissed`]),Et=r([`low`,`medium`,`high`,`critical`]),Dt=r([`security`,`scheduling`,`background`,`email`,`system`]),Ot=r([`heartbeat`,`memory_consolidation`,`schedule`,`auto_analysis`,`user`,`other`]),kt=l({id:c(),label:c(),prompt:c()}),At=r([`emailDraft`,`documentPreview`,`permissionChat`,`paymentAuth`,`toolPermission`,`updatesList`]),jt=l({kind:At}),Mt=l({id:c(),type:wt,priority:o().int().min(0).max(100),title:c().optional(),summary:c(),timestamp:c(),status:Tt.default(`new`),expiresAt:c().optional(),actions:a(kt).optional(),urgency:Et.optional(),conversationId:c().optional(),detailPanel:jt.optional(),category:Dt.optional(),noteworthy:t().optional(),fromAssistant:t().optional(),metadata:e(c(),s()).optional(),sourceType:Ot.optional(),sourceKey:c().optional(),sourceLabel:c().optional(),createdAt:c()}),Nt=r([`deterministic`,`assistant`]),Pt=l({id:c(),label:c(),icon:c().optional(),prompt:c(),source:Nt}),Ft=l({greeting:c(),timeAwayLabel:c(),newCount:o().int().min(0)}),It=l({items:a(Mt),updatedAt:c(),contextBanner:Ft,suggestedPrompts:a(Pt)}),Lt=l({id:c(),category:r([`voice`,`world`,`priorities`]),text:c(),confidence:r([`strong`,`uncertain`]),source:r([`onboarding`,`inferred`])}),Rt=l({id:c(),name:c(),description:c(),tier:r([`unlocked`,`next-up`,`earned`]),gate:c(),unlockHint:c().optional(),ctaLabel:c().optional()}),zt=l({version:n(1),assistantId:c(),tier:te([n(1),n(2),n(3),n(4)]),progressPercent:o(),facts:a(Lt),capabilities:a(Rt),conversationCount:o(),hatchedDate:c(),assistantName:c(),userName:c().optional(),updatedAt:c()}),Bt=l({provider:c().nullish(),model:c().nullish(),status:c().nullish(),inputTokens:o().nullish(),outputTokens:o().nullish(),cacheCreationInputTokens:o().nullish(),cacheReadInputTokens:o().nullish(),stopReason:c().nullish(),requestMessageCount:o().nullish(),requestToolCount:o().nullish(),responseMessageCount:o().nullish(),responseToolCallCount:o().nullish(),responsePreview:c().nullish(),toolCallNames:a(c()).nullish(),estimatedCostUsd:o().nullish(),durationMs:o().nullish()}),Q=l({kind:c(),label:c().nullish(),role:c().nullish(),text:c().nullish(),toolName:c().nullish(),data:s().optional(),language:c().nullish()}),Vt=l({name:c().nullish(),message:c().nullish(),code:c().nullish(),provider:c().nullish(),statusCode:o().nullish(),retryAfterMs:o().nullish()}),Ht=l({id:c(),createdAt:o(),requestPayload:i(),responsePayload:i(),provider:c().nullish(),summary:Bt.nullish(),requestSections:a(Q).nullish(),responseSections:a(Q).nullish(),agentLoopExitReason:c().nullish(),callSite:c().nullish(),error:Vt.nullish()}),Ut=l({nodeId:c(),score:o(),semanticSimilarity:o(),recencyBoost:o(),type:c().optional()}),Wt=l({reason:c(),semanticUnavailable:t(),fallbackSources:a(c())}),Gt=l({enabled:t(),degraded:t(),provider:c().nullable(),model:c().nullable(),degradation:Wt.nullable(),semanticHits:o().nullish(),mergedCount:o().nullish(),selectedCount:o().nullish(),tier1Count:o().nullish(),tier2Count:o().nullish(),hybridSearchLatencyMs:o().nullish(),sparseVectorUsed:t().nullish(),injectedTokens:o().nullish(),latencyMs:o().nullish(),topCandidates:a(Ut),injectedText:c().nullable(),reason:c().nullable(),queryContext:c().nullable()}),Kt=l({slug:c(),finalActivation:o(),ownActivation:o(),priorActivation:o(),simUser:o(),simAssistant:o(),simNow:o(),simUserRerankBoost:o().optional(),simAssistantRerankBoost:o().optional(),inRerankPool:t().optional(),spreadContribution:o(),source:c(),status:c()}),qt=l({d:o(),c_user:o(),c_assistant:o(),c_now:o(),k:o(),hops:o(),top_k:o(),epsilon:o()}),Jt=l({turn:o(),mode:c(),concepts:a(Kt),config:qt}),Yt=l({slug:c(),source:c(),pinned:t(),sectionOrdinal:o().nullable().optional(),sectionHeading:c().nullable().optional()}),Xt=l({turn:o(),live:t(),shadow:t(),selections:a(Yt),injectedText:c()}),Zt=l({messageId:c().nullish(),conversationKey:c().nullish(),conversationId:c().nullish(),conversationKind:c(),conversationTotalEstimatedCostUsd:o().nullish(),logs:a(Ht),memoryRecall:Gt.nullable(),memoryV2Activation:Jt.nullable(),memoryV3Selection:Xt.nullish()}),Qt=l({type:c(),content:c(),toolName:c().optional(),isError:t().optional(),messageId:c().optional(),toolUseId:c().optional(),input:e(c(),s()).optional()}),$t=l({subagentId:c(),objective:c().optional(),status:U.optional(),usage:W.optional(),events:a(Qt)}),en=l({seq:o().int(),kind:r([`agent`,`workflow`]),label:c().optional(),phase:c().optional(),promptSummary:c().optional(),status:c(),resultSummary:c().optional(),inputTokens:o().optional(),outputTokens:o().optional(),createdAt:o().nullable()}),tn=l({runId:c(),status:J.optional(),agentsSpawned:o().optional(),inputTokens:o().optional(),outputTokens:o().optional(),phase:c().optional(),leaves:a(en)}),nn=ee({ACPOptionKindSchema:()=>de,ACPOptionSchema:()=>fe,AllowlistOptionSchema:()=>f,AssistantActivityAnchorSchema:()=>ie,AssistantActivityPhaseSchema:()=>re,AssistantActivityReasonSchema:()=>u,AssistantActivityStateEventSchema:()=>d,AssistantEventEnvelopeSchema:()=>rn,AssistantEventSchema:()=>$,AssistantOutboundAttachmentSchema:()=>P,AssistantTextDeltaEventSchema:()=>ae,AssistantThinkingDeltaEventSchema:()=>oe,AssistantTurnStartEventSchema:()=>se,AvatarUpdatedEventSchema:()=>ce,CALL_SITE_COMPACTION_AGENT:()=>nt,CALL_SITE_SYNTHETIC_AGENT_ERROR_MESSAGE:()=>tt,CapabilitySchema:()=>Rt,CompactionCircuitClosedEventSchema:()=>le,CompactionCircuitOpenEventSchema:()=>ue,ConfirmationDiffSchema:()=>h,ConfirmationExecutionTargetSchema:()=>pe,ConfirmationRequestEventSchema:()=>g,ContactRequestEventSchema:()=>_,ContextBannerSchema:()=>Ft,ConversationAttachmentBlockSchema:()=>bt,ConversationContentBlockSchema:()=>xt,ConversationErrorCodeSchema:()=>v,ConversationErrorEventSchema:()=>y,ConversationListInvalidatedEventSchema:()=>x,ConversationListInvalidatedReasonSchema:()=>b,ConversationMessageAttachmentSchema:()=>Y,ConversationMessageSchema:()=>St,ConversationMessageSurfaceSchema:()=>Z,ConversationMessageToolCallSchema:()=>X,ConversationSlackMessageSchema:()=>ht,ConversationSubagentNotificationSchema:()=>pt,ConversationSurfaceBlockSchema:()=>yt,ConversationTextBlockSchema:()=>gt,ConversationThinkingBlockSchema:()=>_t,ConversationTitleUpdatedEventSchema:()=>S,ConversationToolUseBlockSchema:()=>vt,DEFAULT_TOOL_EXECUTION_TIMEOUT_SEC:()=>120,DictationContextSchema:()=>it,DictationRequestSchema:()=>at,DirectoryScopeOptionSchema:()=>m,DiskPressureBlockedCapabilitySchema:()=>w,DiskPressureStateSchema:()=>C,DiskPressureStatusChangedEventSchema:()=>E,DiskPressureStatusResponseSchema:()=>Ct,DiskPressureStatusSchema:()=>T,DocumentCommentCreatedEventSchema:()=>D,DocumentCommentDeletedEventSchema:()=>O,DocumentCommentReopenedEventSchema:()=>k,DocumentCommentResolvedEventSchema:()=>A,DocumentEditorUpdateEventSchema:()=>j,ErrorEventSchema:()=>M,FactSchema:()=>Lt,FeedActionSchema:()=>kt,FeedItemCategorySchema:()=>Dt,FeedItemDetailPanelKindSchema:()=>At,FeedItemDetailPanelSchema:()=>jt,FeedItemSchema:()=>Mt,FeedItemSourceTypeSchema:()=>Ot,FeedItemStatusSchema:()=>Tt,FeedItemTypeSchema:()=>wt,FeedItemUrgencySchema:()=>Et,GenerationCancelledEventSchema:()=>N,GenerationHandoffEventSchema:()=>F,HomeFeedResponseSchema:()=>It,HomeFeedUpdatedEventSchema:()=>I,IdentityChangedEventSchema:()=>L,InteractionResolutionStateSchema:()=>R,InteractionResolvedEventSchema:()=>z,LLMCallErrorSchema:()=>Vt,LLMCallSummarySchema:()=>Bt,LLMContextSectionSchema:()=>Q,LLMRequestLogEntrySchema:()=>Ht,LlmContextResponseSchema:()=>Zt,MemoryCandidateSchema:()=>Ut,MemoryDegradationSchema:()=>Wt,MemoryRecallLogSchema:()=>Gt,MemoryV2ActivationLogSchema:()=>Jt,MemoryV2ConceptRowSchema:()=>Kt,MemoryV2ConfigSnapshotSchema:()=>qt,MemoryV3SelectionLogSchema:()=>Xt,MemoryV3SelectionRowSchema:()=>Yt,MessageCompleteEventSchema:()=>B,MessageDequeuedEventSchema:()=>he,MessageQueuedDeletedEventSchema:()=>_e,MessageQueuedEventSchema:()=>ge,MessageRequestCompleteEventSchema:()=>ve,NavigateSettingsEventSchema:()=>ye,NotificationIntentEventSchema:()=>be,OpenUrlEventSchema:()=>xe,PendingToolConfirmationSchema:()=>lt,QuestionEntrySchema:()=>H,QuestionOptionSchema:()=>V,QuestionRequestEventSchema:()=>Se,RelationshipStateSchema:()=>zt,RelationshipStateUpdatedEventSchema:()=>Ce,RiskScopeOptionSchema:()=>Me,SSE_REPLAY_RING_AGE_LIMIT_MS:()=>rt,SSE_REPLAY_RING_COUNT_LIMIT:()=>200,ScopeOptionSchema:()=>p,SecretRequestEventSchema:()=>we,SubagentDetailEventSchema:()=>Qt,SubagentDetailResponseSchema:()=>$t,SubagentEventEventSchema:()=>Ee,SubagentInnerEventSchema:()=>Te,SubagentSpawnedEventSchema:()=>De,SubagentStatusChangedEventSchema:()=>Oe,SubagentStatusSchema:()=>U,SubagentUsageStatsSchema:()=>W,SuggestedPromptSchema:()=>Pt,SuggestedPromptSourceSchema:()=>Nt,SurfaceActionSchema:()=>Ge,SyncChangedEventSchema:()=>ke,ToolActivityMetadataSchema:()=>G,ToolOutputChunkEventSchema:()=>je,ToolOutputChunkSubTypeSchema:()=>Ae,ToolResultEventSchema:()=>Re,ToolUsePreviewStartEventSchema:()=>ze,ToolUseStartEventSchema:()=>Be,TraceEventKindSchema:()=>Ve,TraceEventSchema:()=>He,TraceEventStatusSchema:()=>K,UISurfaceCompleteEventSchema:()=>Ue,UISurfaceDismissEventSchema:()=>We,UISurfaceShowEventSchema:()=>Ke,UISurfaceUpdateEventSchema:()=>qe,UsageProgressEventSchema:()=>q,UsageUpdateEventSchema:()=>Je,UserMessageEchoEventSchema:()=>Ye,WebFetchMetadataSchema:()=>Le,WebSearchMetadataSchema:()=>Ie,WebSearchProviderIdSchema:()=>Ne,WebSearchResultItemSchema:()=>Fe,WorkflowCompletedEventSchema:()=>Xe,WorkflowJournalResponseSchema:()=>tn,WorkflowLeafFinishedEventSchema:()=>Ze,WorkflowLeafSchema:()=>en,WorkflowLeafStartedEventSchema:()=>Qe,WorkflowProgressEventSchema:()=>$e,WorkflowRunStatusSchema:()=>J,WorkflowStartedEventSchema:()=>et}),$=ne(`type`,[d,ae,oe,se,ce,le,ue,g,_,y,x,S,E,D,O,k,A,j,M,N,F,I,L,z,B,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Ee,De,Oe,ke,je,Re,ze,Be,He,Ue,We,Ke,qe,q,Je,Ye,Xe,Ze,Qe,$e,et]),rn=l({id:c(),conversationId:c().optional(),seq:o().int().optional(),emittedAt:c(),message:$});export{$t as a,nt as c,tn as i,tt as l,$ as n,Ct as o,nn as r,rt as s,rn as t,q as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./toast-CxaZ5f1d.js";import{n as t,t as n}from"./create-selectors-BE0_e_Ed.js";import{c as r,n as i,s as a,t as o,u as s}from"./feature-flag-catalog-
|
|
1
|
+
import{n as e}from"./toast-CxaZ5f1d.js";import{n as t,t as n}from"./create-selectors-BE0_e_Ed.js";import{c as r,n as i,s as a,t as o,u as s}from"./feature-flag-catalog-CgnyKvoS.js";var c={bodySerializer:e=>JSON.stringify(e,(e,t)=>typeof t==`bigint`?t.toString():t)};Object.entries({$body_:`body`,$headers_:`headers`,$path_:`path`,$query_:`query`});function l({onRequest:e,onSseError:t,onSseEvent:n,responseTransformer:r,responseValidator:i,sseDefaultRetryDelay:a,sseMaxRetryAttempts:o,sseMaxRetryDelay:s,sseSleepFn:c,url:l,...u}){let d,f=c??(e=>new Promise(t=>setTimeout(t,e)));return{stream:async function*(){let c=a??3e3,p=0,m=u.signal??new AbortController().signal;for(;!m.aborted;){p++;let a=u.headers instanceof Headers?u.headers:new Headers(u.headers);d!==void 0&&a.set(`Last-Event-ID`,d);try{let t={redirect:`follow`,...u,body:u.serializedBody,headers:a,signal:m},o=new Request(l,t);e&&(o=await e(l,t));let s=await(u.fetch??globalThis.fetch)(o);if(!s.ok)throw Error(`SSE failed: ${s.status} ${s.statusText}`);if(!s.body)throw Error(`No body in SSE response`);let f=s.body.pipeThrough(new TextDecoderStream).getReader(),p=``,h=()=>{try{f.cancel()}catch{}};m.addEventListener(`abort`,h);try{for(;;){let{done:e,value:t}=await f.read();if(e)break;p+=t,p=p.replace(/\r\n?/g,`
|
|
2
2
|
`);let a=p.split(`
|
|
3
3
|
|
|
4
4
|
`);p=a.pop()??``;for(let e of a){let t=e.split(`
|
package/dist/assets/{assistant-identity-store-DaDnhbxy.js → assistant-identity-store-ADxStqSC.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./create-selectors-BE0_e_Ed.js";import{t as n}from"./impersonate-version-flag-
|
|
1
|
+
import{n as e,t}from"./create-selectors-BE0_e_Ed.js";import{t as n}from"./impersonate-version-flag-Caig8rhF.js";var r=t(e(e=>({name:null,version:null,setIdentity:(t,r)=>{e({name:t,version:n()??r})},clearIdentity:()=>e({name:null,version:null})})));export{r as t};
|
package/dist/assets/{assistant-status-panel-Z97k6cfb.js → assistant-status-panel-CpyT-RWH.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{n as t,t as n}from"./capture-error-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{n as t,t as n}from"./capture-error-B1FKkx-w.js";import{t as r}from"./react-DJZBPgpf.js";import{t as i}from"./useQuery-B45lW1Kk.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import"./src-BJj2O5XB.js";import{t as o}from"./tag-CE_o2aao.js";import{n as s}from"./toast-CxaZ5f1d.js";import{t as c}from"./loader-circle-Bwz4b6EM.js";import{n as l}from"./auth-store-DpyBV62g.js";import{a as u,r as d}from"./api-cAuUFz5w.js";import{t as f}from"./assistant-feature-flag-store-D9TvI9CG.js";import{t as p}from"./use-active-assistant-id-C0jnbSsu.js";import{t as m}from"./environment-store-C_XwUYTL.js";var h=e(r(),1),g=a();function _({value:e,max:t,caption:n}){let r=t>0?Math.max(0,Math.min(e/t*100,100)):0,i=r>90;return(0,g.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,g.jsx)(`div`,{className:`h-2 w-full overflow-hidden rounded-full bg-[var(--surface-active)]`,children:(0,g.jsx)(`div`,{className:`h-full rounded-full transition-[width] duration-200`,style:{width:`${r}%`,backgroundColor:i?`var(--system-negative-strong)`:`var(--system-positive-strong)`}})}),n&&(0,g.jsx)(`span`,{className:`text-label-medium-default text-[var(--content-tertiary)]`,children:n})]})}var v=7,y=2e3;function b({version:e,loading:t,assistantId:n}){let r=(0,h.useRef)(0),i=(0,h.useRef)(null),[a,o]=(0,h.useState)(null),s=(0,h.useCallback)(()=>{if(r.current+=1,r.current>=v){r.current=0;let e=f.getState(),t=!e.settingsDeveloperNav;e.setFlag(`settingsDeveloperNav`,t,n),o(t?`Developer mode enabled`:`Developer mode disabled`),i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>{o(null),i.current=null},y)}},[n]);return(0,h.useEffect)(()=>()=>{i.current!==null&&clearTimeout(i.current)},[]),t?(0,g.jsxs)(`span`,{className:`flex items-center gap-2 text-body-medium-lighter text-[var(--content-tertiary)]`,children:[(0,g.jsx)(c,{className:`h-4 w-4 animate-spin`}),`Loading version...`]}):e?(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`button`,{type:`button`,className:`break-all text-left text-body-medium-lighter text-[var(--content-default)]`,onClick:s,children:e}),a&&(0,g.jsx)(`p`,{className:`mt-1 text-body-small-default text-[var(--content-accent)]`,children:a})]}):(0,g.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`—`})}var x=`currentAssistant`,S=4e3,C=9e4;function w(e,t){return(e.memory?.maxMb??null)!==(t.memory?.maxMb??null)||(e.cpu?.maxCores??null)!==(t.cpu?.maxCores??null)}function T(){let e=p(),{data:r=null,isLoading:a,refetch:o}=i({queryKey:[x,e],queryFn:async()=>{let t=await d(e);return t.ok?t.data:null},retry:!1}),c=r?.id,[l,f]=(0,h.useState)(null),[m,g]=(0,h.useState)(!1),[_,v]=(0,h.useState)(!1),y=(0,h.useRef)(0),b=(0,h.useRef)(0),T=(0,h.useCallback)(async e=>{if(!c)return f(null),g(!1),null;y.current+=1;let r=y.current;g(!0);try{let t=await u(c);return r===y.current?t.ok?(f(t.data),t.data):(e?.keepStaleOnError||f(null),null):null}catch(i){return r===y.current?(e?.keepStaleOnError||f(null),!t(i)&&!e?.keepStaleOnError&&(n(i,{context:`fetch_assistant_healthz`}),s.error(`Failed to load assistant info`)),null):null}finally{r===y.current&&g(!1)}},[c]);return(0,h.useEffect)(()=>{T()},[T]),(0,h.useEffect)(()=>()=>{b.current+=1,v(!1),f(null)},[c]),{assistant:r,assistantLoading:a,healthz:l,healthzLoading:m,healthzPolling:_,refetch:(0,h.useCallback)(async()=>{await o(),await T()},[o,T]),refetchUntilResized:(0,h.useCallback)(async e=>{let t=++b.current,n=Date.now()+C;v(!0);let r=e;try{for(o();Date.now()<n&&t===b.current;){if(await new Promise(e=>setTimeout(e,S)),t!==b.current)return;let e=await T({keepStaleOnError:!0});if(t!==b.current)return;if(e){if(r==null){r=e;continue}if(w(e,r))return}}}finally{t===b.current&&v(!1)}},[T,o])}}function E({assistant:e,assistantLoading:t,healthz:n,healthzLoading:r}){let i=m.use.isNonProduction(),a=l.use.user()?.email;if(t)return(0,g.jsxs)(`div`,{className:`flex items-center gap-2 text-body-medium-lighter text-[var(--content-tertiary)]`,children:[(0,g.jsx)(c,{className:`h-4 w-4 animate-spin`}),`Loading assistant info...`]});if(!e)return(0,g.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`No assistant found. Hatch an assistant to get started.`});let s=n?.version??e.current_release_version;return(0,g.jsxs)(`div`,{className:`grid grid-cols-[140px_minmax(0,1fr)] gap-y-3`,children:[a&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(O,{children:`Account`}),(0,g.jsx)(k,{children:a})]}),(0,g.jsx)(O,{children:`Name`}),(0,g.jsx)(k,{children:e.name}),e.description&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(O,{children:`Description`}),(0,g.jsx)(k,{children:e.description})]}),(0,g.jsx)(O,{children:`Status`}),(0,g.jsx)(`div`,{children:(0,g.jsx)(o,{tone:e.status===`active`?`positive`:`neutral`,children:e.status})}),(0,g.jsx)(O,{children:`Assistant ID`}),(0,g.jsx)(`span`,{className:`break-all font-mono text-body-small-default text-[var(--content-tertiary)]`,children:e.id}),i&&e.machine_id&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(O,{children:`Machine ID`}),(0,g.jsx)(`span`,{className:`break-all font-mono text-body-small-default text-[var(--content-tertiary)]`,children:e.machine_id})]}),(0,g.jsx)(O,{children:`Created`}),(0,g.jsx)(k,{children:e.created?new Date(e.created).toLocaleDateString():`Unknown`}),(0,g.jsx)(O,{children:`Version`}),(0,g.jsx)(b,{version:s??null,loading:r&&!e.current_release_version,assistantId:e.id??null})]})}function D(e){return e>=1024?`${(e/1024).toFixed(1)} GB`:`${e.toFixed(0)} MB`}function O({children:e}){return(0,g.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:e})}function k({children:e}){return(0,g.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e})}export{_ as i,D as n,T as r,E as t};
|