@vellumai/web 0.10.11-dev.202607231450.b516b22 → 0.10.11-dev.202607231649.18b8bbb
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-BA3fB2ei.js → AnimatePresence-Za179iJL.js} +1 -1
- package/dist/assets/{BundleConfirmPage-CauU_qhn.js → BundleConfirmPage-DDJmi2mn.js} +1 -1
- package/dist/assets/{a2a-invite-cGLd10KQ.js → a2a-invite-FXcvjICk.js} +1 -1
- package/dist/assets/{about-page-DxY-GLXL.js → about-page-Dv6627H6.js} +1 -1
- package/dist/assets/{account-page-DzfSGteC.js → account-page-l8GYVoBi.js} +1 -1
- package/dist/assets/{account-shell-C7g85lC1.js → account-shell-D4kpoHNu.js} +1 -1
- package/dist/assets/{acp-run-detail-panel-BxqZBSrc.js → acp-run-detail-panel-Dyf1Edp0.js} +1 -1
- package/dist/assets/{activity-steps-panel-Dd6TxeAl.js → activity-steps-panel-CJpoaZZk.js} +1 -1
- package/dist/assets/{add-credits-modal-CUUdRibP.js → add-credits-modal-Bp4dMKVF.js} +1 -1
- package/dist/assets/ai-page-BpLJUhUW.js +1 -0
- package/dist/assets/{animated-avatar-CKx95GOp.js → animated-avatar-DHAmpfhM.js} +1 -1
- package/dist/assets/api-DizQUKoP.js +1 -0
- package/dist/assets/{api-ByqDBVa7.js → api-OAWAuUsr.js} +1 -1
- package/dist/assets/{api-key-screen-CcvJPJW8.js → api-key-screen-DByRCPXy.js} +1 -1
- package/dist/assets/{app-info-CBjmLxjK.js → app-info-VZf7WwPk.js} +1 -1
- package/dist/assets/{archive-redirect-page-B2UOo_Rd.js → archive-redirect-page-BIn92ZY2.js} +1 -1
- package/dist/assets/{assistant-feature-flag-store-DtWdHoc7.js → assistant-feature-flag-store-DZ9GWkVE.js} +1 -1
- package/dist/assets/assistant-identity-store-CcOzNTzY.js +1 -0
- package/dist/assets/{assistant-status-panel-BZdgxPvT.js → assistant-status-panel-CSci_Asl.js} +1 -1
- package/dist/assets/{auth-store-BkZh8iLE.js → auth-store-Ci4b1jeA.js} +2 -2
- package/dist/assets/{background-task-detail-panel-D-S8maWT.js → background-task-detail-panel-Cwaj9G7I.js} +1 -1
- package/dist/assets/{billing-page-BNO11gLj.js → billing-page-DvG534Q7.js} +3 -3
- package/dist/assets/{billing-redirect-page-BEZ1VREv.js → billing-redirect-page-Cjr_7JuR.js} +1 -1
- package/dist/assets/{bookmarks-page-4Dswcosy.js → bookmarks-page-DZz9pASD.js} +1 -1
- package/dist/assets/{browser-D1h4fzvz.js → browser-D6KrosAJ.js} +2 -2
- package/dist/assets/{build-state-Fv-ahUup.js → build-state-DY2zepH-.js} +1 -1
- package/dist/assets/{capture-error-TIfXqClD.js → capture-error-BwO3qoVL.js} +1 -1
- package/dist/assets/{channels-page-route-guTxAiaC.js → channels-page-route-D_xo6Mi1.js} +1 -1
- package/dist/assets/chat-BlbWE2iQ.js +1 -0
- package/dist/assets/{chat-markdown-message-BkuowO-g.js → chat-markdown-message-BMNi893o.js} +2 -2
- package/dist/assets/{checkbox-Wmxrk7Ne.js → checkbox-D1MV5awS.js} +1 -1
- package/dist/assets/{client-feature-flag-store-XF5x4WRY.js → client-feature-flag-store-BzbQ0YAJ.js} +1 -1
- package/dist/assets/{client-identity-vi8PNDLe.js → client-identity-DXW8XMU0.js} +1 -1
- package/dist/assets/{command-palette-bD9N82Zl.js → command-palette-DoY4jsHp.js} +1 -1
- package/dist/assets/{command-palette-window-page-CdrnrfGk.js → command-palette-window-page-BzyY3i-t.js} +1 -1
- package/dist/assets/{community-page-lIK1EpoK.js → community-page-DQlfsl9O.js} +1 -1
- package/dist/assets/{confirm-dialog-Ca60m3Th.js → confirm-dialog-LogFhGPZ.js} +1 -1
- package/dist/assets/{connect-page-Dduax_Xg.js → connect-page-BRRi0Zl-.js} +1 -1
- package/dist/assets/consent-CIapX2Gq.js +1 -0
- package/dist/assets/{consent-controls-BuwDMphC.js → consent-controls-Cgpqpo5q.js} +1 -1
- package/dist/assets/{contacts-gateway-CBtqc7-k.js → contacts-gateway-C7oMDoDl.js} +1 -1
- package/dist/assets/{contacts-page-route-DFhUItTa.js → contacts-page-route-CBw-wItq.js} +1 -1
- package/dist/assets/{conversation-list-fetchers-BQTdMMYw.js → conversation-list-fetchers-CK2Z1Khy.js} +1 -1
- package/dist/assets/{conversation-store-CGwVWV9r.js → conversation-store-RTKrzZpU.js} +1 -1
- package/dist/assets/{credential-entry-page-DQKjh5mE.js → credential-entry-page-DKztqlPv.js} +1 -1
- package/dist/assets/{credentials-page-CZ_9eAyL.js → credentials-page-DmYf2Wpe.js} +1 -1
- package/dist/assets/{danger-zone-redirect-page-DnfUglXc.js → danger-zone-redirect-page-CouGbWjK.js} +1 -1
- package/dist/assets/{debug-page-BpL88IiU.js → debug-page-CDp67WFP.js} +2 -2
- package/dist/assets/{deploy-dialogs-WA__-td0.js → deploy-dialogs-C0PuUajq.js} +1 -1
- package/dist/assets/{detail-card-DDyqflXI.js → detail-card-DvLLMhNf.js} +1 -1
- package/dist/assets/{detail-panel-stop-button-DwbUgrWc.js → detail-panel-stop-button--i6Loldr.js} +1 -1
- package/dist/assets/{developer-page-CEJ2QwWO.js → developer-page-CUBJQW8k.js} +1 -1
- package/dist/assets/{devices-redirect-page-BzC1Xl3w.js → devices-redirect-page-Udzr63gn.js} +1 -1
- package/dist/assets/{diagnostics-ADlglrSx.js → diagnostics-ma-XhbLR.js} +1 -1
- package/dist/assets/{dictation-overlay-page-Dybbqj8b.js → dictation-overlay-page-CDW3DCHd.js} +1 -1
- package/dist/assets/{dist-DCQZ68wG.js → dist-DOi1RSfK.js} +1 -1
- package/dist/assets/{dist-BKQxiB9U.js → dist-DOntYjnl.js} +1 -1
- package/dist/assets/{document-viewer-page-QkhWI2c4.js → document-viewer-page-DZWozYYl.js} +1 -1
- package/dist/assets/{edge-swipe-arbiter-store-DKOWYciE.js → edge-swipe-arbiter-store-DQXMiR0e.js} +1 -1
- package/dist/assets/effective-timezone-0GF618E_.js +1 -0
- package/dist/assets/{emails-page-DXtKVOC_.js → emails-page-tUe7YeKv.js} +1 -1
- package/dist/assets/{environment-store-CJm9dJIK.js → environment-store-Cs37h4c4.js} +1 -1
- package/dist/assets/esm-BW0BzEtt.js +2 -0
- package/dist/assets/esm-ByIuGzCm.js +1 -0
- package/dist/assets/esm-C9Jbm9IV.js +2 -0
- package/dist/assets/esm-CmmeOIYe.js +2 -0
- package/dist/assets/esm-Dk_6yGX8.js +2 -0
- package/dist/assets/{esm-BId8Y-2v.js → esm-DoTLAeQr.js} +2 -2
- package/dist/assets/esm-EIoyyla0.js +2 -0
- package/dist/assets/{file-editor-By7WMhZJ.js → file-editor-Zt007HGQ.js} +1 -1
- package/dist/assets/{file-markdown-Cisl4Gl8.js → file-markdown-DPyUUjzw.js} +1 -1
- package/dist/assets/{general-page-GoL7EShB.js → general-page-CEAu-3Ws.js} +1 -1
- package/dist/assets/{get-memory-stats-CgvcocQb.js → get-memory-stats-C4y5n8_1.js} +1 -1
- package/dist/assets/{haptics-Cht1dTEa.js → haptics-DE5jsotL.js} +2 -2
- package/dist/assets/{hatching-screen-DACnfeQF.js → hatching-screen-CEJlQ2rU.js} +1 -1
- package/dist/assets/{home-page-route-HLpAWLq8.js → home-page-route-Bxp5CA3H.js} +1 -1
- package/dist/assets/{hosting-screen-BzNyXmLg.js → hosting-screen-CQ3KKQYi.js} +1 -1
- package/dist/assets/{identity-page-route-BFwaKUSD.js → identity-page-route-CrVdEgJh.js} +1 -1
- package/dist/assets/{index-DDzCAEMy.js → index-cKUmWCp-.js} +16 -16
- package/dist/assets/{ingest-CHc1zI_k.js → ingest-HnEjH7j5.js} +1 -1
- package/dist/assets/{inspect-page-BamiMLI8.js → inspect-page-DCVgsNjL.js} +3 -3
- package/dist/assets/{integrations-page-C3Uglx90.js → integrations-page-FNQLm7Hi.js} +1 -1
- package/dist/assets/{intelligence-layout-CPggwmNB.js → intelligence-layout-CrQwBTuo.js} +1 -1
- package/dist/assets/{keyboard-shortcuts-redirect-page-CvIQqAte.js → keyboard-shortcuts-redirect-page-BsAzDLzA.js} +1 -1
- package/dist/assets/{latest-assistant-text-Bs58sJYD.js → latest-assistant-text-DtOF8zAg.js} +1 -1
- package/dist/assets/{library-detail-page-BB5X6kXD.js → library-detail-page-gJDyE3Ok.js} +1 -1
- package/dist/assets/{library-page-nbbYWHsl.js → library-page-DWbQ4cJv.js} +1 -1
- package/dist/assets/list-D1sxly73.js +1 -0
- package/dist/assets/{list-row-Ba2xWuBK.js → list-row-C2T2An9i.js} +1 -1
- package/dist/assets/{local-mode-B3-gNTGk.js → local-mode-Dad5eO5y.js} +1 -1
- package/dist/assets/{login-flow-raz8PdRA.js → login-flow-BTgI8XtY.js} +1 -1
- package/dist/assets/{login-page-DI4spMfk.js → login-page-BZoxUMzH.js} +1 -1
- package/dist/assets/{logout-page-BTz_JKfQ.js → logout-page-De1adDuI.js} +1 -1
- package/dist/assets/{logs-layout-DowdorGT.js → logs-layout-CNaYagVh.js} +1 -1
- package/dist/assets/{memory-page-route-BcEAlWp1.js → memory-page-route-CKV86otc.js} +1 -1
- package/dist/assets/{memory-router-playground-page-QCogn5Oo.js → memory-router-playground-page-BTjl31YO.js} +1 -1
- package/dist/assets/{menu-D6Zd1pD0.js → menu-TiRblnyW.js} +1 -1
- package/dist/assets/{messages-eSEnt1cZ.js → messages-qZ5Gs4Ws.js} +1 -1
- package/dist/assets/{metric-card-BmlEw91t.js → metric-card-DWsnW0I-.js} +1 -1
- package/dist/assets/{mobile-sidebar-drawer-DBHULxzp.js → mobile-sidebar-drawer-CaDGrPIe.js} +1 -1
- package/dist/assets/{modal-B5LIURGT.js → modal-rQEdFMrT.js} +1 -1
- package/dist/assets/mutation-error-DqcYgh5y.js +1 -0
- package/dist/assets/native-anchor--gttBUV7.js +1 -0
- package/dist/assets/{native-biometric-C77WIZgU.js → native-biometric-CfKcznEr.js} +1 -1
- package/dist/assets/{native-file-DOWRMAg4.js → native-file-DUVHQm8y.js} +2 -2
- package/dist/assets/{notice-rXKtDAyE.js → notice-CdE_bYUC.js} +1 -1
- package/dist/assets/{notifications-page-BOlbHUXw.js → notifications-page-mgt-TeDf.js} +1 -1
- package/dist/assets/{oauth-complete-page-BK3OvZyh.js → oauth-complete-page-CdY4siXD.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-h06Ps_Z9.js → oauth-popup-complete-page-KOOtNLm7.js} +1 -1
- package/dist/assets/{onboarding-store-C_c7S4PW.js → onboarding-store-M2W9-LaY.js} +1 -1
- package/dist/assets/{page-empty-state-Bmd9bsUe.js → page-empty-state-CebRmpsa.js} +1 -1
- package/dist/assets/{page-shell-DESP4OEm.js → page-shell-BQDuLn3L.js} +1 -1
- package/dist/assets/{pairing-page-DZa5tL1t.js → pairing-page-Cf1la3a7.js} +1 -1
- package/dist/assets/{panel-item-C55DV5jS.js → panel-item-Ciyir7x-.js} +1 -1
- package/dist/assets/{password-reset-page-CU7hOacp.js → password-reset-page-D5yeFdOK.js} +1 -1
- package/dist/assets/{personality-page-AAc190aW.js → personality-page-Dix8pRZb.js} +1 -1
- package/dist/assets/{plans-page-qFN-cGG_.js → plans-page-jrjYeC4F.js} +1 -1
- package/dist/assets/{platform-detection-BuN9WnU3.js → platform-detection-Cgpa1OVO.js} +1 -1
- package/dist/assets/{platform-loopback-page-C7mZ16wI.js → platform-loopback-page-BABpXcgi.js} +1 -1
- package/dist/assets/{plugin-detail-page-CxNuk-8_.js → plugin-detail-page-C-zUDndJ.js} +1 -1
- package/dist/assets/{plugins-page-C-1mpbA_.js → plugins-page-CK1zz96G.js} +1 -1
- package/dist/assets/{popover-BBHEa1a8.js → popover-B65NY395.js} +1 -1
- package/dist/assets/{prefs-BXzVpbTP.js → prefs-CIqZGUAf.js} +1 -1
- package/dist/assets/{privacy-page-CpmFlxwa.js → privacy-page-CMcu4uh9.js} +1 -1
- package/dist/assets/{privacy-screen-tV8001gb.js → privacy-screen-DmE_CsAu.js} +1 -1
- package/dist/assets/{provider-callback-page-DTGO_9FS.js → provider-callback-page-qNIGjfzl.js} +1 -1
- package/dist/assets/{provider-key-C6AXXJ13.js → provider-key-KznjccFG.js} +1 -1
- package/dist/assets/{provider-signup-page-B-GXbe5V.js → provider-signup-page-C1jqomrw.js} +1 -1
- package/dist/assets/{quick-input-page-C3fo_-1W.js → quick-input-page-BDqtFIEI.js} +1 -1
- package/dist/assets/{react-query.gen-Dx7ROyjY.js → react-query.gen-BhyBMzST.js} +1 -1
- package/dist/assets/{react-query.gen-Ckfv3u8n.js → react-query.gen-Cn6oD7Kk.js} +1 -1
- package/dist/assets/{remote-gateway-session-D-_XM8ss.js → remote-gateway-session-AviGZzBo.js} +1 -1
- package/dist/assets/{research-mock-page-BftUUCrU.js → research-mock-page-DeoZZe3M.js} +1 -1
- package/dist/assets/{research-onboarding-persistence-pmhIhd-d.js → research-onboarding-persistence-BrrKTo3p.js} +1 -1
- package/dist/assets/{research-onboarding-route-CZ1K6-Jf.js → research-onboarding-route-D-YoTNwa.js} +1 -1
- package/dist/assets/{resolved-assistants-store-D4LlwCnB.js → resolved-assistants-store-KDw2r1Lb.js} +1 -1
- package/dist/assets/{review-terms-screen-BLrcOBM1.js → review-terms-screen-Cz8lX9a5.js} +1 -1
- package/dist/assets/{risk-DSNf7mfc.js → risk-B4l1oe02.js} +1 -1
- package/dist/assets/{routes-CujiOvCG.js → routes-DzmKi8ws.js} +1 -1
- package/dist/assets/{schedules-C-Q7Xxpn.js → schedules-B1CnA7cO.js} +1 -1
- package/dist/assets/{schedules-page-CBFtQlrT.js → schedules-page-CMBqHjpc.js} +1 -1
- package/dist/assets/{sdk.gen-BWZTl2s4.js → sdk.gen-6X-SatQk.js} +1 -1
- package/dist/assets/{security-redirect-page-Da4FaO7N.js → security-redirect-page-DMViBwXp.js} +1 -1
- package/dist/assets/{select-assistant-screen-C83nm2BZ.js → select-assistant-screen-BmJsPHUQ.js} +1 -1
- package/dist/assets/{setting-row-BB4qJf19.js → setting-row-BLsF3g7M.js} +1 -1
- package/dist/assets/{settings-divider-C8AqP6uw.js → settings-divider-JlSht3ag.js} +1 -1
- package/dist/assets/{settings-layout-7mV-rlqJ.js → settings-layout-DSJiTC93.js} +1 -1
- package/dist/assets/{share-feedback-modal-CsctQUm0.js → share-feedback-modal-By7KeKhv.js} +1 -1
- package/dist/assets/{sidebar-tree-CFlLtvet.js → sidebar-tree-D8JA-CY9.js} +1 -1
- package/dist/assets/{signup-page-VPn-63hx.js → signup-page-CA5tlA6c.js} +1 -1
- package/dist/assets/{signup-shell-nLh51_AY.js → signup-shell-Dsle-nTJ.js} +1 -1
- package/dist/assets/{site-favicon-DN3OLmvn.js → site-favicon-DhF6c7Ga.js} +1 -1
- package/dist/assets/{skill-detail-page-mezVyq_m.js → skill-detail-page-DwNcD2EP.js} +1 -1
- package/dist/assets/{skill-detail-panel-B2Ww-8OE.js → skill-detail-panel-CSJb4Akp.js} +1 -1
- package/dist/assets/{skills-DP8q421k.js → skills-DDLX2htF.js} +1 -1
- package/dist/assets/{skills-page-D-O8Xrcb.js → skills-page-Df_Zbc0g.js} +1 -1
- package/dist/assets/{sound-manager-CUjq4DLM.js → sound-manager-Br26Xe_9.js} +1 -1
- package/dist/assets/{sounds-page-C8S3VOhN.js → sounds-page-CbuHcu5d.js} +1 -1
- package/dist/assets/{src-eF1GUpNZ.js → src-DGZEuT5r.js} +1 -1
- package/dist/assets/{start-screen-BH9M0BMp.js → start-screen-DFSf2eHH.js} +1 -1
- package/dist/assets/{subagent-detail-panel-Chl7DWMJ.js → subagent-detail-panel-BA4-czN9.js} +1 -1
- package/dist/assets/{subagent-store-DAsCR9Ek.js → subagent-store-DrbrdJ0N.js} +1 -1
- package/dist/assets/{superpowers-page-5N12paGo.js → superpowers-page-UcA5l7Um.js} +1 -1
- package/dist/assets/{system-events-page-B1Pp7xTR.js → system-events-page-vnMaFadt.js} +1 -1
- package/dist/assets/{system-events-redirect-page-CZdJ1Stb.js → system-events-redirect-page-CoJG7V70.js} +1 -1
- package/dist/assets/{tag-B2RIok_S.js → tag-Dw1f5QKZ.js} +1 -1
- package/dist/assets/{theme-stage-page-o8vbuTrd.js → theme-stage-page-DK1YtOAM.js} +1 -1
- package/dist/assets/{tiptap-document-editor-D-PqQzmc.js → tiptap-document-editor-D7WyM3Yo.js} +1 -1
- package/dist/assets/{toast-CWA3SxUv.js → toast-Bchq1ame.js} +1 -1
- package/dist/assets/{tool-detail-panel-DrDfkH2O.js → tool-detail-panel-lXlsNDEp.js} +1 -1
- package/dist/assets/{upgrade-cancel-page-DTX_UAhv.js → upgrade-cancel-page-BK81LMgC.js} +1 -1
- package/dist/assets/{upgrade-success-page-KxLeySPt.js → upgrade-success-page-C_HcLCan.js} +1 -1
- package/dist/assets/{usage-redirect-page-BN8e-Hl7.js → usage-redirect-page-5D0LPtBc.js} +1 -1
- package/dist/assets/{use-active-assistant-id-CNvX2Z8T.js → use-active-assistant-id-qI62oM5B.js} +1 -1
- package/dist/assets/{use-assistant-identity-details-Dt5496dv.js → use-assistant-identity-details-luhPKxX5.js} +1 -1
- package/dist/assets/{use-bus-subscription-Ccs0Qaht.js → use-bus-subscription-CnY3n8Or.js} +1 -1
- package/dist/assets/{use-checkout-dismiss-refresh-DD8JAj4q.js → use-checkout-dismiss-refresh-ExrYcZAv.js} +1 -1
- package/dist/assets/{use-edge-swipe-back-BxgzIiNS.js → use-edge-swipe-back-BsLr9H0Q.js} +1 -1
- package/dist/assets/{use-invite-link-dialog-CGAMCyqy.js → use-invite-link-dialog-Cto17N8c.js} +1 -1
- package/dist/assets/use-is-org-ready-W2o27Zxq.js +1 -0
- package/dist/assets/{use-onboarding-login-CSkop3ca.js → use-onboarding-login-BOEx5ui3.js} +1 -1
- package/dist/assets/{use-reduced-motion-CxP6vGgk.js → use-reduced-motion-BFUnQDmb.js} +1 -1
- package/dist/assets/{use-skill-actions-BsTlWBcS.js → use-skill-actions-DbrwErnP.js} +1 -1
- package/dist/assets/{use-skill-detail-files-SmAQW7Zh.js → use-skill-detail-files-CcuMcxpj.js} +1 -1
- package/dist/assets/{utils-CuX5xnER.js → utils-D4TAvmSz.js} +1 -1
- package/dist/assets/{viewer-store-C6GyeuCm.js → viewer-store-DpG5EvwH.js} +1 -1
- package/dist/assets/voice-page-DBbLC6TO.js +1 -0
- package/dist/assets/{weather-forecast-display-PBe2f8yM.js → weather-forecast-display-DIFE235h.js} +1 -1
- package/dist/assets/{web-9pGh4GZq.js → web-BEgLnavw.js} +1 -1
- package/dist/assets/{web-4APZHMYt.js → web-BtLHehG2.js} +1 -1
- package/dist/assets/{web-BaOSoBGc.js → web-Cbqzgyiw.js} +1 -1
- package/dist/assets/{web-DDsyZCMo.js → web-CyULbh9T.js} +1 -1
- package/dist/assets/{web-BXx5eD3w.js → web-DFWXL4ln.js} +1 -1
- package/dist/assets/{web-BuG_pBKP.js → web-DuYghki6.js} +1 -1
- package/dist/assets/{web-CZmqng1v.js → web-YB50EYNO.js} +1 -1
- package/dist/assets/{web-bWtpgLmd.js → web-vjg1u7uu.js} +1 -1
- package/dist/assets/{welcome-screen-DLXcR1St.js → welcome-screen-C-vDlcwn.js} +1 -1
- package/dist/assets/{workflow-detail-panel-B63260ea.js → workflow-detail-panel-CxdcV3FR.js} +1 -1
- package/dist/assets/{workspace-page-DMsbOv_J.js → workspace-page-DS9n1F05.js} +1 -1
- package/dist/index.html +118 -117
- package/dist/skills/deepgram-voice/assets/icon.svg +1 -0
- package/package.json +1 -1
- package/dist/assets/ai-page-cyrdMtZg.js +0 -1
- package/dist/assets/api-BIUM7Sfc.js +0 -1
- package/dist/assets/assistant-identity-store-BbQGi1Z8.js +0 -1
- package/dist/assets/chat-DfJUPt4h.js +0 -1
- package/dist/assets/consent-DkQodVPE.js +0 -1
- package/dist/assets/effective-timezone-DYkHWNkp.js +0 -1
- package/dist/assets/esm-BJFBHGN0.js +0 -2
- package/dist/assets/esm-CyB7vjwO.js +0 -2
- package/dist/assets/esm-D2HzZNP6.js +0 -2
- package/dist/assets/esm-DjhYoTKt.js +0 -1
- package/dist/assets/esm-Q_30tLM_.js +0 -2
- package/dist/assets/esm-SYrS8Ge3.js +0 -2
- package/dist/assets/mutation-error-CTl5_tRJ.js +0 -1
- package/dist/assets/native-anchor-BP5lOvKS.js +0 -1
- package/dist/assets/use-is-org-ready--Dn7TirJ.js +0 -1
- package/dist/assets/voice-page-BZk1WOCC.js +0 -1
- /package/dist/assets/{Combination-DVPinsP-.js → Combination-8nGFG53c.js} +0 -0
- /package/dist/assets/{api-errors-D52GcK-c.js → api-errors-BnUiuRwl.js} +0 -0
- /package/dist/assets/{app-types-BkwrqrlW.js → app-types-tZWS4htw.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-CtSJhHTe.js → avatar-bundled-components-DqaymMDA.js} +0 -0
- /package/dist/assets/{avatar-svg-compositor-BfycUW-4.js → avatar-svg-compositor-bbw1dNjP.js} +0 -0
- /package/dist/assets/{browser-timezone-Pt5zHES5.js → browser-timezone-CVTGYkOe.js} +0 -0
- /package/dist/assets/{build.umd-BQvYt2GV.js → build.umd-C-GEiBkR.js} +0 -0
- /package/dist/assets/{by-tool-use-id-index-Dbdu-8Kf.js → by-tool-use-id-index-Cv_-C3g1.js} +0 -0
- /package/dist/assets/{client.gen-BgQlZ6XT.js → client.gen-CofN6Myr.js} +0 -0
- /package/dist/assets/{create-selectors-CB3td4FB.js → create-selectors-CVKI3m11.js} +0 -0
- /package/dist/assets/{definitions-CM08vMFY.js → definitions-BFpBMk4k.js} +0 -0
- /package/dist/assets/{definitions-ybBJvS5F.js → definitions-DA3_VPSG.js} +0 -0
- /package/dist/assets/{dist-DEnAtv43.js → dist-B2rqKTnz.js} +0 -0
- /package/dist/assets/{dist-CJm2PFfi.js → dist-CJjdYxdA.js} +0 -0
- /package/dist/assets/{dist-Df-tf9-G2.js → dist-im-xGq3e2.js} +0 -0
- /package/dist/assets/{domains-CHPH2UJ5.js → domains-C8lmaEFr.js} +0 -0
- /package/dist/assets/{dropdown-CY4Pur0N.js → dropdown-Cl8NyHlL.js} +0 -0
- /package/dist/assets/{emoji-catalog-data--NL3EmUB.js → emoji-catalog-data-UOs0yJKE.js} +0 -0
- /package/dist/assets/{event-bus-C7pTeNSK.js → event-bus-q1A9A6d7.js} +0 -0
- /package/dist/assets/{feature-flag-catalog-3X9uE40T.js → feature-flag-catalog-BfdnIHib.js} +0 -0
- /package/dist/assets/{format-file-size-NlWnTYo4.js → format-file-size-wTaIDlZc.js} +0 -0
- /package/dist/assets/{impersonate-version-flag-eNRXoBN4.js → impersonate-version-flag-4U66yjF4.js} +0 -0
- /package/dist/assets/{input-CqzWbhlg.js → input-DxOyE0ZC.js} +0 -0
- /package/dist/assets/{is-electron-DfdJ73pd.js → is-electron-CSbKx5JX.js} +0 -0
- /package/dist/assets/{link-click-cOqjA8PL.js → link-click-CWB_XxKH.js} +0 -0
- /package/dist/assets/{loader-circle-DHHDfu74.js → loader-circle-Cv9PAGXe.js} +0 -0
- /package/dist/assets/{log-in-UqkLJLYd.js → log-in-3H31Ax42.js} +0 -0
- /package/dist/assets/{machine-sizes-DzQNxnM-.js → machine-sizes-CnivFLFG.js} +0 -0
- /package/dist/assets/{mic-Bt7m4Gub.js → mic-DVup4kXX.js} +0 -0
- /package/dist/assets/{minimize-2-D6r29tx3.js → minimize-2-Dkuju8j-.js} +0 -0
- /package/dist/assets/{misc-BW2SfpvH.js → misc-DksIl9AI.js} +0 -0
- /package/dist/assets/{monitor-Bg6ET6fd.js → monitor-cH8WSwKo.js} +0 -0
- /package/dist/assets/{moon-D3b6Wzk6.js → moon-DTGt89o8.js} +0 -0
- /package/dist/assets/{native-deep-link-DmClhlUR.js → native-deep-link-CwXILg9c.js} +0 -0
- /package/dist/assets/{onboarding-step-layout-kPP5JFP-.js → onboarding-step-layout-DFsxxNiz.js} +0 -0
- /package/dist/assets/{optimistic-lifecycle-BOkyBy0p.js → optimistic-lifecycle-nH6-xqeD.js} +0 -0
- /package/dist/assets/{pdf-DVb0eJxD.js → pdf-BjaXbnaz.js} +0 -0
- /package/dist/assets/{pencil-u8kUHDu1.js → pencil-zvu6VPlv.js} +0 -0
- /package/dist/assets/{plugin-attribution-Dcl7GaXq.js → plugin-attribution-Cd7F2FNP.js} +0 -0
- /package/dist/assets/{plus-Y5Y0OQo7.js → plus-CjmlSfMr.js} +0 -0
- /package/dist/assets/{pointer-BK-9IReQ.js → pointer-BzoRaNxg.js} +0 -0
- /package/dist/assets/{prechat-Zk1l58N8.js → prechat-GZmnbufd.js} +0 -0
- /package/dist/assets/{profile-metadata-Dqd8Hqos.js → profile-metadata-ZYaUcqpf.js} +0 -0
- /package/dist/assets/{progress-bar-_3mfj1nF.js → progress-bar-DQREkpqG.js} +0 -0
- /package/dist/assets/{proxy-Bmdpu1sr.js → proxy-B-Zpns8q.js} +0 -0
- /package/dist/assets/{public-asset-BuFg8E9D.js → public-asset-mLxcBVji.js} +0 -0
- /package/dist/assets/{puzzle-C23ox4Fh.js → puzzle-C3vosOtA.js} +0 -0
- /package/dist/assets/{refresh-cw-CM091oiN.js → refresh-cw-BYjQ7maV.js} +0 -0
- /package/dist/assets/{repeat-DZFBLR2c.js → repeat-DEu1W8kD.js} +0 -0
- /package/dist/assets/{sdk.gen-DKNY8Bx5.js → sdk.gen-BYiW7lcm.js} +0 -0
- /package/dist/assets/{sdk.gen-Bke-lgN6.js → sdk.gen-Bcmzg7Nc.js} +0 -0
- /package/dist/assets/{semver-BPMr6t52.js → semver-CzSv4TmI.js} +0 -0
- /package/dist/assets/{shield-check-BMJaX1V5.js → shield-check-1k8P0ttt.js} +0 -0
- /package/dist/assets/{sliders-horizontal-C3od3uct.js → sliders-horizontal-C8XA9Xcy.js} +0 -0
- /package/dist/assets/{sparkles-D2G1TC69.js → sparkles-BUe8G0Ub.js} +0 -0
- /package/dist/assets/{square-BmcTJ4Ep.js → square-Ct6mhmlV.js} +0 -0
- /package/dist/assets/{status-badge-pill-Dezqkwfk.js → status-badge-pill--8i-OF7m.js} +0 -0
- /package/dist/assets/{theme-preferences-QKcNHgRj.js → theme-preferences-Dm7wFaX8.js} +0 -0
- /package/dist/assets/{three-dot-indicator-OWxXOhjw.js → three-dot-indicator-5854llmy.js} +0 -0
- /package/dist/assets/{toggle-D0F64xtr.js → toggle-BOKaoAmA.js} +0 -0
- /package/dist/assets/{triangle-alert-BiYR_vCj.js → triangle-alert-DM5k06Dr.js} +0 -0
- /package/dist/assets/{typed-storage-CSjOkiBC.js → typed-storage-CKjMGu7i.js} +0 -0
- /package/dist/assets/{use-copy-to-clipboard-MsGbgkfV.js → use-copy-to-clipboard-BEle5mpf.js} +0 -0
- /package/dist/assets/{user-plus-BBNl6TNQ.js → user-plus-CwViG7E8.js} +0 -0
- /package/dist/assets/{users-B9OBdAo0.js → users-BdvcnAAL.js} +0 -0
- /package/dist/assets/{volume-2-CcQdY7RE.js → volume-2-4QfmnnuJ.js} +0 -0
- /package/dist/assets/{workflow-status-ByHycBJ_.js → workflow-status-icBU_5e-.js} +0 -0
- /package/dist/assets/{x-B1c_0Hpo.js → x--2TAgFdC.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-CiplDkxq.js → xterm-addon-fit-Kp1-DhUF.js} +0 -0
- /package/dist/assets/{xterm-DxbTm7XB.js → xterm-slSGU1Oj.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{B as r,H as i,U as a,V as o,h as s,n as c,r as l}from"./proxy-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{B as r,H as i,U as a,V as o,h as s,n as c,r as l}from"./proxy-B-Zpns8q.js";var u=n(),d=e(t(),1);function f(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function p(...e){return t=>{let n=!1,r=e.map(e=>{let r=f(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():f(e[t],null)}}}}function m(...e){return d.useCallback(p(...e),e)}var h=class extends d.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(s(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=s(e)&&e.offsetWidth||0,r=s(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function g({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,d.useId)(),s=(0,d.useRef)(null),c=(0,d.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:f}=(0,d.useContext)(l),p=m(s,e.props?.ref??e?.ref);return(0,d.useInsertionEffect)(()=>{let{width:e,height:l,top:u,left:d,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!l)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${d}`:g?`left: ${d}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${u}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);f&&(y.nonce=f);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
2
2
|
[data-motion-pop-id="${o}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${e}px !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-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-DksIl9AI.js";import{t as i}from"./format-file-size-wTaIDlZc.js";var a=e(t(),1),o=n(),s={verified:{label:`Verified`,className:`bg-[var(--system-positive-weak)] text-[var(--system-positive-strong)]`},signed:{label:`Signed`,className:`bg-[var(--system-info-weak)] text-[var(--system-info-strong)]`},unsigned:{label:`Unsigned`,className:`bg-[var(--surface-active)] text-[var(--content-secondary)]`},tampered:{label:`Tampered — signature invalid`,className:`bg-[var(--system-negative-weak)] text-[var(--system-negative-strong)]`}};function c(){let[e,t]=(0,a.useState)(null),[n,c]=(0,a.useState)(!1);if((0,a.useEffect)(()=>{window.vellum?.bundleConfirm?.getData().then(e=>{e&&t(e)})},[]),!e)return(0,o.jsx)(`div`,{className:`flex h-svh w-screen items-center justify-center bg-background text-muted-foreground select-none`,children:`Loading...`});let{manifest:l,scanResult:u,signatureResult:d,bundleSizeBytes:f}=e,p=s[d.trustTier],m=d.trustTier===`tampered`,h=u.warnings;return(0,o.jsxs)(`div`,{className:`flex h-svh w-screen flex-col bg-background px-6 pt-14 pb-6 text-foreground select-none`,children:[(0,o.jsxs)(`div`,{className:`flex items-start gap-3`,children:[l.icon?(0,o.jsx)(`span`,{className:`text-5xl leading-none`,children:l.icon}):(0,o.jsx)(`span`,{className:`text-5xl leading-none`,children:`📦`}),(0,o.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,o.jsx)(`h1`,{className:`truncate text-lg font-semibold`,children:l.name}),l.description&&(0,o.jsx)(`p`,{className:`text-muted-foreground mt-0.5 text-sm leading-snug`,children:l.description})]})]}),(0,o.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,o.jsx)(`span`,{className:r(`inline-block rounded-full px-2.5 py-0.5 text-xs font-medium`,p.className),children:p.label}),d.trustTier===`signed`&&d.signerDisplayName&&(0,o.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`by `,d.signerDisplayName]})]}),(0,o.jsxs)(`dl`,{className:`mt-4 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5 text-sm`,children:[(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Size`}),(0,o.jsx)(`dd`,{children:i(f)}),(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Created by`}),(0,o.jsx)(`dd`,{className:`truncate`,children:l.created_by}),l.capabilities.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Capabilities`}),(0,o.jsx)(`dd`,{className:`truncate`,children:l.capabilities.join(`, `)})]})]}),h.length>0&&(0,o.jsxs)(`div`,{className:`mt-4`,children:[(0,o.jsxs)(`button`,{type:`button`,className:`text-muted-foreground text-xs font-medium hover:underline`,onClick:()=>c(e=>!e),children:[n?`Hide`:`Show`,` Warnings (`,h.length,`)`]}),n&&(0,o.jsx)(`ul`,{className:`mt-1.5 space-y-1 text-xs`,children:h.map((e,t)=>(0,o.jsx)(`li`,{className:`rounded bg-[var(--system-mid-weak)] px-2 py-1 text-[var(--system-mid-strong)]`,children:e},t))})]}),(0,o.jsxs)(`div`,{className:`mt-auto flex items-center justify-end gap-3 pt-4`,children:[(0,o.jsx)(`button`,{type:`button`,className:`rounded-md border border-border px-4 py-1.5 text-sm font-medium text-foreground hover:bg-muted`,onClick:()=>window.vellum?.bundleConfirm?.respond(!1),children:`Cancel`}),(0,o.jsx)(`button`,{type:`button`,className:r(`rounded-md px-4 py-1.5 text-sm font-medium text-white`,m?`bg-red-600 hover:bg-red-700`:`bg-primary hover:bg-primary/90`),onClick:()=>window.vellum?.bundleConfirm?.respond(!0),children:m?`Install Anyway`:`Install`})]})]})}export{c as BundleConfirmPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e}from"./routes-
|
|
1
|
+
import{u as e}from"./routes-DzmKi8ws.js";function t(t){let n=typeof window<`u`?window.location.origin:``,r=new URLSearchParams({senderAssistantId:t.senderAssistantId,token:t.token});return`${n}${e.connect}?${r.toString()}`}function n(e){let t=e.get(`senderAssistantId`)?.trim(),n=e.get(`token`)?.trim();return!t||!n?null:{senderAssistantId:t,token:n}}export{n,t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./is-electron-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./is-electron-CSbKx5JX.js";import{n as i,t as a}from"./app-info-VZf7WwPk.js";var o=e(t(),1),s=n();function c(){let[e,t]=(0,o.useState)(null);(0,o.useEffect)(()=>{a().then(t)},[]);let n=e??l;return(0,s.jsxs)(`div`,{className:`flex h-svh w-screen flex-col items-center justify-center bg-background px-8 pt-14 pb-8 text-center text-foreground select-none`,children:[(0,s.jsx)(`h1`,{className:`mt-4 text-2xl font-semibold`,children:n.appName}),(0,s.jsx)(`p`,{className:`text-muted-foreground mt-1 mb-7 text-xs`,children:`AI assistant for your Mac`}),(0,s.jsxs)(`dl`,{className:`mb-7 grid grid-cols-[auto_auto] gap-x-4 gap-y-1.5 text-sm`,children:[(0,s.jsx)(`dt`,{className:`text-muted-foreground text-right`,children:`Version`}),(0,s.jsx)(`dd`,{className:`text-left font-mono tabular-nums select-text`,children:n.version}),(0,s.jsx)(`dt`,{className:`text-muted-foreground text-right`,children:`Build`}),(0,s.jsx)(`dd`,{className:`text-left font-mono tabular-nums select-text`,children:n.commitSha})]}),(0,s.jsx)(`a`,{href:n.website,className:`text-primary text-sm hover:underline`,onClick:e=>{r()&&(e.preventDefault(),i())},children:new URL(n.website).host}),(0,s.jsx)(`div`,{className:`text-muted-foreground mt-auto pt-6 text-[11px]`,children:n.copyright})]})}var l={appName:`Vellum`,version:`—`,commitSha:`—`,copyright:`© ${new Date().getFullYear()} Vellum`,website:`https://vellum.ai`};export{c as AboutPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{a as i,n as a,s as o}from"./auth-store-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{a as i,n as a,s as o}from"./auth-store-Ci4b1jeA.js";import{f as s}from"./native-biometric-CfKcznEr.js";import{u as c}from"./routes-DzmKi8ws.js";import{n as l,t as u}from"./login-flow-BTgI8XtY.js";import{pi as d}from"./index-cKUmWCp-.js";import{r as f,t as p}from"./account-shell-D4kpoHNu.js";var m=e(t(),1),h=r();function g(){let e=i(),t=o(),r=a.use.user(),g=a.use.logout(),[_,v]=(0,m.useState)(null),[y,b]=(0,m.useState)(!1),x=async()=>{v(null),b(!0);try{await s(l,u)}catch(e){console.error(`[account] auth flow failed:`,e),v(`Something went wrong. Please try again.`),b(!1)}};return t?(0,h.jsx)(p,{children:(0,h.jsx)(f,{title:`Loading...`})}):e?(0,h.jsxs)(p,{children:[(0,h.jsx)(f,{title:`Welcome${r?.username?`, ${r.username}`:``}!`,subtitle:`You are signed in.`}),(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,h.jsx)(n,{to:c.assistant,className:`inline-flex w-full items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] no-underline transition-colors hover:bg-[var(--primary-hover)]`,children:`Go to your assistant`}),(0,h.jsx)(`button`,{type:`button`,onClick:async()=>{await g(),d(c.account.login)},className:`cursor-pointer bg-transparent text-sm font-normal text-[var(--content-secondary)] transition-colors hover:text-[var(--content-default)]`,children:`Sign out`})]})]}):(0,h.jsxs)(p,{children:[(0,h.jsx)(f,{title:`Welcome to Vellum`,subtitle:`Sign in to get started.`}),_&&(0,h.jsx)(`p`,{className:`text-center text-sm text-[var(--system-negative-strong)]`,children:_}),(0,h.jsx)(`div`,{className:`flex flex-col items-center gap-4`,children:(0,h.jsx)(`button`,{type:`button`,onClick:()=>void x(),disabled:y,className:`inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] transition-colors hover:bg-[var(--primary-hover)] disabled:opacity-50`,children:`Sign in`})})]})}export{g as AccountPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{t}from"./notice-
|
|
1
|
+
import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{t}from"./notice-CdE_bYUC.js";import"./src-DGZEuT5r.js";var n=e(),r=(0,n.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,n.jsx)(`path`,{d:`M7.5 15L12.5 10L7.5 5`,stroke:`currentColor`,strokeWidth:`1.67`,strokeLinecap:`round`,strokeLinejoin:`round`})});function i({onSubmit:e,error:i,children:a,submitLabel:o,submittingLabel:s,isSubmitting:c,footer:l}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(`form`,{onSubmit:e,className:`flex flex-col gap-4`,children:[i&&(0,n.jsx)(t,{tone:`error`,children:i}),(0,n.jsx)(`div`,{className:`flex flex-col gap-3`,children:a}),(0,n.jsxs)(`button`,{type:`submit`,disabled:c,className:`mt-2 inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] transition-colors hover:bg-[var(--primary-hover)] disabled:cursor-wait disabled:opacity-50`,children:[c?s:o,r]})]}),l&&(0,n.jsx)(`div`,{className:`mt-8 text-center`,children:l})]})}function a(e){return(0,n.jsx)(`input`,{...e,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] px-4 py-3 text-sm text-[var(--content-default)] outline-none placeholder:text-[var(--content-tertiary)] focus:border-[var(--primary-base)]/50`})}function o({title:e,subtitle:t}){return(0,n.jsxs)(`div`,{className:`mb-8 text-center`,children:[(0,n.jsx)(`h1`,{className:`mb-2 font-serif text-[2rem] font-bold italic text-[var(--content-default)]`,children:e}),t&&(0,n.jsx)(`p`,{className:`text-sm text-[var(--content-secondary)]`,children:t})]})}function s({children:e}){return(0,n.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-[var(--surface-base)]`,children:(0,n.jsx)(`div`,{className:`w-full max-w-[480px] px-6`,children:(0,n.jsx)(`div`,{className:`flex flex-col items-center gap-10`,children:(0,n.jsx)(`div`,{className:`w-full`,children:e})})})})}export{a as i,i as n,o as r,s as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
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-BwO3qoVL.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-BxZ6HzpA.js";import{t as i}from"./jsx-runtime-CVSDxk6A.js";import{t as a}from"./typography-B_Zom8Gj.js";import{t as o}from"./createLucideIcon-IRfcSUxS.js";import{t as s}from"./arrow-left-8m8Hdw7f.js";import{t as c}from"./brain-BDL_F8de.js";import{t as l}from"./chevron-down-qD-re7AW.js";import{t as u}from"./chevron-right-DqqmezXC.js";import{t as d}from"./circle-check-VSiny8yl.js";import{w as f}from"./menu-TiRblnyW.js";import{t as p}from"./code-Dl3IekqV.js";import{t as m}from"./file-text-YQjMPDid.js";import{t as h}from"./globe-CYmqQnbY.js";import{t as g}from"./repeat-DEu1W8kD.js";import{t as _}from"./square-Ct6mhmlV.js";import{t as v}from"./triangle-alert-DM5k06Dr.js";import{t as y}from"./x--2TAgFdC.js";import"./src-DGZEuT5r.js";import{t as b}from"./tag-Dw1f5QKZ.js";import{t as x}from"./chat-markdown-message-BMNi893o.js";import{t as S}from"./three-dot-indicator-5854llmy.js";import{At as C,Mt as w,Sa as ee,_t as te,go as ne,gt as re,jt as ie,kt as T,lo as ae,ma as E,pa as oe,vt as D,xa as se,za as ce}from"./index-cKUmWCp-.js";import{t as le}from"./status-badge-pill--8i-OF7m.js";var ue=o(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),de=o(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),O=e(n(),1),k=``;function A(e,t){switch(e){case`complete`:case`completed`:return`completed`;case`failed`:case`error`:return`error`;case void 0:return t;default:return`running`}}function fe(e){return(e.messageId?.startsWith(`local-marker-`)??!1)||(e.content?.startsWith(`↻ Steering: `)??!1)}function j(e){let t=e??``;return t.startsWith(`↻ Steering: `)?t.slice(T.length):t}function M(e){let t=e[e.length-1];t&&(t.kind===`agent`||t.kind===`thinking`)&&!t.isComplete&&(e[e.length-1]={...t,isComplete:!0})}function N(e,t){if(t.updateType===`agent_message_chunk`&&fe(t)){M(e),e.push({kind:`user`,id:t.messageId??`steer-${e.length}`,content:j(t.content)});return}switch(t.updateType){case`user_message_chunk`:{let n=t.messageId??k,r=j(t.content),i=e[e.length-1];i&&i.kind===`user`&&i.id===n?e[e.length-1]={...i,content:i.content+r}:(M(e),e.push({kind:`user`,id:n,content:r}));let a=e[e.length-1].content;for(let t=0;t<e.length-1;t++){let n=e[t];if(n.kind===`user`&&n.id.startsWith(`local-marker-`)&&n.content===a){e.splice(t,1);break}}return}case`agent_message_chunk`:{let n=t.messageId??k,r=e[e.length-1];if(r&&r.kind===`agent`&&r.messageId===n){e[e.length-1]={...r,content:r.content+(t.content??``)};return}if(n!==k&&r&&r.kind===`agent`&&r.messageId===k&&!r.isComplete&&r.content===(t.content??``)){e[e.length-1]={...r,messageId:n};return}M(e),e.push({kind:`agent`,messageId:n,content:t.content??``,isComplete:!1});return}case`agent_thought_chunk`:{let n=t.messageId??k,r=e[e.length-1];if(r&&r.kind===`thinking`&&r.messageId===n){e[e.length-1]={...r,content:r.content+(t.content??``)};return}M(e),e.push({kind:`thinking`,messageId:n,content:t.content??``,isComplete:!1});return}case`tool_call`:{let n=t.toolCallId;if(n===void 0)return;M(e),e.push({kind:`tool`,toolCallId:n,title:t.toolTitle??``,toolKind:t.toolKind,status:A(t.toolStatus,`running`),content:t.content,locations:P(t),rawInput:t.rawInput,rawOutput:t.rawOutput});return}case`tool_call_update`:{let n=t.toolCallId;if(n===void 0)return;let r=e.findIndex(e=>e.kind===`tool`&&e.toolCallId===n);if(r===-1)return;let i=e[r],a=P(t);e[r]={...i,title:t.toolTitle??i.title,toolKind:t.toolKind??i.toolKind,status:A(t.toolStatus,i.status),content:t.content??i.content,locations:a??i.locations,rawInput:t.rawInput===void 0?i.rawInput:t.rawInput,rawOutput:t.rawOutput===void 0?i.rawOutput:t.rawOutput};return}case`plan`:{let n=pe(t.content);if(n===null)return;let r=e.findIndex(e=>e.kind===`plan`),i={kind:`plan`,entries:n};r===-1?(M(e),e.push(i)):e[r]=i;return}}}function P(e){let t=e.locations;if(!Array.isArray(t))return;let n=[];for(let e of t){let t=e??{};typeof t.path==`string`&&n.push(typeof t.line==`number`?{path:t.path,line:t.line}:{path:t.path})}return n}function pe(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}let n=Array.isArray(t)?t:Array.isArray(t?.entries)?t.entries:null;return n===null?null:n.map(e=>{let t=e??{},n=t.content??t.label??``;return{label:typeof n==`string`?n:String(n),checked:t.checked===!0||t.status===`completed`}})}function me(e){let t=[];for(let n of e)N(t,n);return t}function F(e,t){if(e===t)return{kind:`identity`};if(e===null)return{kind:`first`};if(t.length<e.length)return{kind:`fallback`};for(let n=0;n<e.length;n++)if(e[n]!==t[n])return n===e.length-1&&t.length===e.length?{kind:`mutate-last`}:{kind:`fallback`};return t.length===e.length?{kind:`identity`}:{kind:`append`,from:e.length}}function I(){let e=null,t=[];function n(n){return t=me(n),e=n,t}function r(r){let i=F(e,r);switch(i.kind){case`identity`:return t;case`first`:return n(r);case`append`:{let n=t.slice();for(let e=i.from;e<r.length;e++)N(n,r[e]);return e=r,t=n,t}case`mutate-last`:case`fallback`:return n(r)}}return{project:r}}function L(e){let t=(0,O.useRef)(null);return t.current??=I(),t.current.project(e)}function R(e){if(!e)return[];let t;try{t=JSON.parse(e)}catch{let t=e.trimStart();return t.startsWith(`{`)||t.startsWith(`[`)?[]:[{type:`content`,text:e}]}let n=Array.isArray(t)?t:[t],r=[];for(let e of n){let t=z(e);t&&r.push(t)}return r}function z(e){if(typeof e!=`object`||!e)return null;let t=e;switch(t.type){case`content`:return{type:`content`,text:he(t.content)};case`diff`:return typeof t.path!=`string`||typeof t.newText!=`string`?null:{type:`diff`,path:t.path,newText:t.newText,...typeof t.oldText==`string`?{oldText:t.oldText}:{}};case`terminal`:{let e=ge(t);return e===void 0?{type:`terminal`}:{type:`terminal`,text:e}}default:return null}}function he(e){if(typeof e==`string`)return e;if(typeof e==`object`&&e){let t=e.text;if(typeof t==`string`)return t}return``}function ge(e){if(typeof e.text==`string`)return e.text;if(typeof e.output==`string`)return e.output;if(typeof e.content==`string`)return e.content;if(typeof e.content==`object`&&e.content!==null){let t=e.content.text;if(typeof t==`string`)return t}}function B(e){if(typeof e!=`object`||!e)return;let t=e.command;return typeof t==`string`?t:void 0}function V(e){return R(e).filter(e=>e.type===`content`||e.type===`terminal`).map(e=>`text`in e?e.text??``:``).filter(e=>e.length>0).join(`
|
|
2
2
|
`)}function H(e){if(e!=null){if(typeof e==`string`)return e;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}}function U(e,t){let n=new Map;for(let t of e)t.type===`diff`&&n.set(t.path,{path:t.path,newText:t.newText,...t.oldText===void 0?{}:{oldText:t.oldText}});for(let e of t??[])n.has(e.path)||n.set(e.path,{path:e.path});return Array.from(n.values())}var W=i();function _e({content:e,isComplete:t}){return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-agent-message`,className:`flex w-full flex-col items-start text-chat text-[var(--content-default)]`,children:[(0,W.jsx)(x,{content:e}),!t&&(0,W.jsx)(S,{className:`mt-1`,"data-testid":`acp-chat-agent-streaming`})]})}function ve({entries:e}){return e.length===0?null:(0,W.jsxs)(`div`,{"data-testid":`acp-chat-plan-block`,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3`,children:[(0,W.jsxs)(`div`,{className:`mb-2 flex items-center gap-1.5 text-[var(--content-tertiary)]`,children:[(0,W.jsx)(ce,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(a,{variant:`body-small-emphasised`,className:`text-inherit`,children:`Plan`})]}),(0,W.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.map((e,t)=>(0,W.jsxs)(`li`,{"data-testid":`acp-chat-plan-entry`,"data-checked":e.checked,className:`flex items-start gap-2`,children:[e.checked?(0,W.jsx)(d,{"aria-hidden":!0,className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}):(0,W.jsx)(f,{"aria-hidden":!0,className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-disabled)]`}),(0,W.jsx)(`span`,{className:e.checked?`text-body-small-default text-[var(--content-tertiary)] line-through`:`text-body-small-default text-[var(--content-default)]`,children:e.label})]},t))})]})}function ye(e){switch(e){case`max_tokens`:case`max_turn_requests`:return`Stopped: limit reached`;case`refusal`:return`Refused`;case`cancelled`:return`Cancelled`;default:return`Completed`}}function be(e){return new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function G({completedAt:e}){return e===void 0?null:(0,W.jsxs)(`span`,{"data-testid":`acp-chat-terminal-time`,children:[`at `,be(e)]})}function xe({status:e,stopReason:t,error:n,completedAt:r}){if(w(e))return null;if(e===`failed`)return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`failed`,className:`flex items-start gap-2 rounded-lg bg-[var(--system-negative-weak)] px-3 py-2 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,W.jsx)(`span`,{"aria-hidden":!0,"data-testid":`acp-chat-terminal-failed-icon`,className:`flex h-[12px] w-4 shrink-0 items-center justify-center`,children:(0,W.jsx)(v,{className:`h-4 w-4`})}),(0,W.jsx)(`span`,{children:n??`Run failed`})]});if(e===`cancelled`)return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`cancelled`,className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,W.jsx)(ae,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`}),(0,W.jsx)(`span`,{children:`Cancelled`}),(0,W.jsx)(G,{completedAt:r})]});let i=ye(t);return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-terminal-block`,"data-terminal-kind":`completed`,className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,W.jsx)(d,{"aria-hidden":!0,className:`h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}),(0,W.jsx)(`span`,{children:i}),(0,W.jsx)(G,{completedAt:r})]})}function Se({showDot:e,isLast:t,children:n}){return(0,W.jsxs)(`div`,{className:`relative flex items-start gap-2${t?``:` pb-4`}`,children:[!t&&(0,W.jsx)(`div`,{"aria-hidden":!0,className:`absolute bottom-0 left-[6.5px] w-px bg-[var(--border-element)] ${e?`top-[16px]`:`top-0`}`}),e?(0,W.jsx)(`span`,{"aria-hidden":!0,"data-testid":`acp-chat-timeline-dot`,className:`flex h-[14px] w-[14px] shrink-0 items-center justify-center`,children:(0,W.jsx)(`span`,{className:`h-[5px] w-[5px] rounded-full bg-[var(--content-disabled)]`})}):(0,W.jsx)(`span`,{"aria-hidden":!0,className:`h-[14px] w-[14px] shrink-0`}),(0,W.jsx)(`div`,{className:`min-w-0 flex-1`,children:n})]})}function Ce({content:e,isComplete:t}){let[n,r]=(0,O.useState)(null),i=n??!t,a=e.trim().length>0,o=t?`Thought process`:`Thinking`,s=t?(0,W.jsx)(c,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(S,{dotSize:5,className:`shrink-0`,"data-testid":`acp-chat-thinking-streaming`});return a?(0,W.jsxs)(`div`,{"data-testid":`acp-chat-thinking-block`,className:`w-full`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-expanded":i,onClick:()=>r(!i),"data-testid":`acp-chat-thinking-toggle`,className:`flex w-full items-center gap-1.5 text-body-small-default text-[var(--content-tertiary)] transition-colors hover:text-[var(--content-secondary)]`,children:[i?(0,W.jsx)(l,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(u,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),s,(0,W.jsx)(`span`,{children:o})]}),i&&(0,W.jsx)(`div`,{"data-testid":`acp-chat-thinking-body`,className:`mt-1.5 border-l-2 border-[var(--border-base)] pl-3 text-body-small-default text-[var(--content-tertiary)]`,children:(0,W.jsx)(x,{content:e})})]}):(0,W.jsx)(`div`,{"data-testid":`acp-chat-thinking-block`,className:`w-full`,children:(0,W.jsxs)(`div`,{className:`flex w-full items-center gap-1.5 text-body-small-default text-[var(--content-tertiary)]`,children:[s,(0,W.jsx)(`span`,{children:o})]})})}var we={running:`neutral`,completed:`positive`,error:`negative`,ended:`neutral`},Te={running:`Running`,completed:`Completed`,error:`Failed`,ended:`Ended`},Ee={read:`Read file`,edit:`Edit file`,delete:`Delete file`,move:`Move file`,search:`Search`,execute:`Run command`,think:`Thinking`,fetch:`Fetch`,switch_mode:`Switch mode`},De=`Tool call`,Oe={read:m,edit:ue,delete:oe,move:de,search:ee,execute:E,think:c,fetch:h,switch_mode:g},ke=new Set([`read`,`edit`,`delete`,`move`]);function Ae({toolKind:e}){return(0,W.jsx)(e&&Oe[e]||p,{"aria-hidden":!0,className:`h-4 w-4 shrink-0 text-[var(--content-tertiary)]`})}function K({label:e,value:t,testId:n}){return(0,W.jsxs)(`div`,{"data-testid":n,children:[(0,W.jsx)(`div`,{className:`mb-1 text-body-small-default text-[var(--content-tertiary)]`,children:e}),(0,W.jsx)(`pre`,{className:`max-h-60 overflow-auto rounded-md border border-[var(--border-element)] bg-[var(--surface-base)] p-2.5 font-mono text-body-small-default text-[var(--content-secondary)]`,children:t})]})}function je({block:e,isTerminal:t=!1,onOpenDiff:n,onOpenOutput:r}){let[i,o]=(0,O.useState)(!1),s=(0,O.useMemo)(()=>R(e.content),[e.content]),c=(0,O.useMemo)(()=>V(e.content),[e.content]),d=(0,O.useMemo)(()=>c.split(`
|
|
3
3
|
`).map(e=>e.trim()).find(e=>e.length>0&&!e.startsWith("```"))||`View output`,[c]),f=(0,O.useMemo)(()=>U(s,e.locations),[s,e.locations]),p=t&&e.status===`running`?`ended`:e.status,h=p===`running`,g=e.toolKind&&Ee[e.toolKind]||De,_=B(e.rawInput)??e.title,v=_&&_!==g&&(!ke.has(e.toolKind??``)||f.length===0)?_:null,y=H(e.rawInput),x=H(e.rawOutput),C=y!==void 0||x!==void 0;return(0,W.jsxs)(`div`,{"data-testid":`acp-chat-tool-card`,"data-status":e.status,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(Ae,{toolKind:e.toolKind}),(0,W.jsx)(a,{variant:`body-small-emphasised`,className:`min-w-0 flex-1 truncate text-[var(--content-default)]`,title:e.title,children:g}),(0,W.jsx)(b,{tone:we[p],"data-testid":`acp-chat-tool-status`,children:Te[p]}),h&&(0,W.jsx)(S,{className:`shrink-0`,"data-testid":`acp-chat-tool-running`})]}),v&&(0,W.jsx)(`div`,{"data-testid":`acp-chat-tool-detail`,className:`mt-1.5 font-mono text-body-small-default whitespace-pre-wrap break-words text-[var(--content-secondary)]`,children:v}),f.length>0&&(0,W.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:f.map(t=>{let r=t.oldText!==void 0||t.newText!==void 0,i=`flex max-w-full items-center gap-1.5 rounded-md border border-[var(--border-base)] bg-[var(--surface-base)] px-2 py-1 text-body-small-default text-[var(--content-secondary)]`;return r?(0,W.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-file-chip`,onClick:()=>n(e.toolCallId,t),title:t.path,className:`${i} cursor-pointer transition-colors hover:bg-[var(--surface-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--border-focus)]`,children:[(0,W.jsx)(m,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate font-mono`,children:t.path})]},t.path):(0,W.jsxs)(`span`,{"data-testid":`acp-chat-tool-file-ref`,title:t.path,className:i,children:[(0,W.jsx)(m,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate font-mono`,children:t.path})]},t.path)})}),c.length>0&&(0,W.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-output-open`,onClick:()=>r?.(e.toolCallId),className:`mt-2 flex w-full items-center gap-2 rounded-md border border-[var(--border-element)] bg-[var(--surface-base)] px-2.5 py-2 text-left transition-colors hover:bg-[var(--surface-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--border-focus)]`,children:[(0,W.jsx)(E,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0 text-[var(--content-tertiary)]`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-body-small-default text-[var(--content-secondary)]`,children:d}),(0,W.jsx)(u,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0 text-[var(--content-tertiary)]`})]}),C&&(0,W.jsxs)(`div`,{className:`mt-2`,"data-testid":`acp-chat-tool-raw`,children:[(0,W.jsxs)(`button`,{type:`button`,"data-testid":`acp-chat-tool-raw-toggle`,"aria-expanded":i,onClick:()=>o(e=>!e),className:`flex items-center gap-1 text-body-small-default text-[var(--content-tertiary)] transition-colors hover:text-[var(--content-default)]`,children:[i?(0,W.jsx)(l,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}):(0,W.jsx)(u,{"aria-hidden":!0,className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{children:i?`Hide raw input/output`:`Show raw input/output`})]}),i&&(0,W.jsxs)(`div`,{className:`mt-1.5 flex flex-col gap-2`,children:[y!==void 0&&(0,W.jsx)(K,{label:`Raw input`,value:y,testId:`acp-chat-tool-raw-input`}),x!==void 0&&(0,W.jsx)(K,{label:`Raw output`,value:x,testId:`acp-chat-tool-raw-output`})]})]})]})}function Me({content:e}){return(0,W.jsx)(`div`,{"data-testid":`acp-chat-user-turn`,className:`flex w-full justify-end`,children:(0,W.jsx)(`div`,{className:`max-w-[80%] rounded-lg bg-[var(--surface-lift)] px-4 py-3 whitespace-pre-wrap text-chat text-[var(--content-default)]`,children:e})})}function Ne(e,t){let n=e=>new Intl.NumberFormat(void 0,{style:`currency`,currency:t}).format(e);return e>0&&e<.01?`<${n(.01)}`:n(e)}var q=new Intl.NumberFormat(`en-US`);function J({label:e,value:t}){return(0,W.jsxs)(`div`,{className:`flex items-baseline gap-1`,"data-usage-stat":e.toLowerCase(),children:[(0,W.jsx)(a,{variant:`label-small-default`,className:`text-[var(--content-tertiary)]`,children:e}),(0,W.jsx)(a,{variant:`body-small-default`,className:`text-[var(--content-secondary)] tabular-nums`,children:t})]})}function Pe({entry:e}){let{inputTokens:t,outputTokens:n,costAmount:r,costCurrency:i}=e;if(t===void 0&&n===void 0)return null;let a=t??0,o=n??0,s=r!=null&&i!=null;return(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,"data-testid":`acp-usage-meter`,children:[(0,W.jsx)(J,{label:`Input`,value:q.format(a)}),(0,W.jsx)(J,{label:`Output`,value:q.format(o)}),s&&(0,W.jsx)(J,{label:`Cost`,value:Ne(r,i)})]})}function Fe({content:e}){return(0,W.jsx)(`div`,{"data-testid":`acp-chat-command-output`,className:`rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3 [&_pre]:!max-h-none`,children:(0,W.jsx)(x,{content:V(e),hardLineBreaks:!0})})}var Y=2e3;function X(e){if(e===``)return[];let t=e.split(`
|
|
4
4
|
`);return e.endsWith(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-BxZ6HzpA.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{t as i}from"./typography-B_Zom8Gj.js";import{E as a,S as o,c as s,l as c,x as l}from"./risk-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-BxZ6HzpA.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{t as i}from"./typography-B_Zom8Gj.js";import{E as a,S as o,c as s,l as c,x as l}from"./risk-B4l1oe02.js";import{t as u}from"./chevron-left-BMF1xNfR.js";import"./src-DGZEuT5r.js";import{t as d}from"./chat-markdown-message-BMNi893o.js";import{C as f,a as p,i as m,n as h,r as g,s as _,y as v}from"./site-favicon-DhF6c7Ga.js";import{At as y,E as b,G as x,J as S,K as C,U as w,W as T,X as E,Y as D,q as O,vi as k,zt as A}from"./index-cKUmWCp-.js";import{ToolDetailBody as j,t as M}from"./tool-detail-panel-lXlsNDEp.js";var N=e(t(),1);function P(e,t,n){let r=T(t,n.workflow),i=e=>{let t=C(e,n.workflow.byToolUseId);if(t!==null&&r.has(t))return!0;let i=w(e,n.acpByToolUseId);if(i!==null&&n.acpById[i]!==void 0)return!0;let a=x(e);return a!==void 0&&n.backgroundTaskById[a]!==void 0},a=t.filter(e=>!i(e));if(a.length===t.length)return{items:e,toolCalls:t};let o=new Set(a.map(e=>e.id));return{items:e.filter(e=>e.kind!==`toolCall`||o.has(e.toolCall.id)),toolCalls:a}}function F(e,t){let n=o(),r=k.use.byId(),i=k.use.byToolUseId(),l=k.use.notFoundRunIds(),u=k.use.hydrationFailedRunIds(),d=y.use.byId(),f=y.use.byToolUseId(),p=A.use.byId();return(0,N.useMemo)(()=>{if(!e||t==null)return null;let o=n.find(t=>a(t).includes(e));if(!o)return null;let m=c(o.contentBlocks??[],{splitInlineThinking:o.role!==`user`})[t];if(!m||m.type!==`activity`)return null;let{cardItems:h,toolCalls:g}=s(m.items);return P(h,g,{workflow:{byId:r,byToolUseId:i,notFoundRunIds:l,hydrationFailedRunIds:u},acpById:d,acpByToolUseId:f,backgroundTaskById:p})},[n,e,t,r,i,l,u,d,f,p])}var I=r(),L=60;function R({payload:e,onClose:t}){let[r,a]=(0,N.useState)(null),o=F(e.messageId,e.groupIndex),s=o?.items??e.items,c=o?.toolCalls??e.toolCalls,l=E(s),d=S(l.steps),p=D(l.state,l.steps),m=p===`loading`,h=O(p,l.totalDurationLabel??``,d.failed),g=m&&l.currentStepTitle||h,v=new Map(c.map(e=>[e.id,e])),y=r?r.kind===`thinking`?`Thinking`:r.activity||r.title:``;return(0,I.jsx)(b,{titleNode:r?(0,I.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 py-0.5`,children:[(0,I.jsx)(n,{variant:`ghost`,iconOnly:(0,I.jsx)(u,{}),"aria-label":`Back to all steps`,tooltip:`All steps`,onClick:()=>a(null),className:`-ml-2.5 shrink-0`}),(0,I.jsx)(i,{variant:`title-medium`,className:`min-w-0 shrink truncate leading-snug text-[var(--content-default)]`,children:y})]}):(0,I.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 py-0.5`,children:[(0,I.jsx)(i,{variant:`title-medium`,className:`min-w-0 shrink truncate leading-snug text-[var(--content-default)]`,children:m?(0,I.jsx)(f,{children:g}):g}),l.stepCount?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{"aria-hidden":!0,className:`size-[3px] shrink-0 rounded-full bg-[var(--content-tertiary)]`}),(0,I.jsx)(i,{variant:`title-medium`,className:`shrink-0 whitespace-nowrap leading-snug text-[var(--content-secondary)]`,children:l.stepCount})]}):null]}),closeLabel:`Close steps`,onClose:t,children:r?(0,I.jsx)(B,{detail:r}):(0,I.jsx)(_,{steps:l.steps,timeline:!0,renderStep:t=>(0,I.jsx)(z,{step:t,activeDetail:r,onOpenDetail:a,lookupToolCall:e=>v.get(e),messageId:e.messageId,groupIndex:e.groupIndex})})})}function z({step:e,activeDetail:t,onOpenDetail:n,lookupToolCall:r,messageId:i,groupIndex:a}){if(e.kind===`thinking`){let t=i!=null&&e.thinkingItemIndex!=null?{messageId:i,thinkingGroupIndex:a,thinkingItemIndex:e.thinkingItemIndex}:{};return(0,I.jsx)(m,{iconName:`brain`,label:l(e.text,L),ariaLabel:`View thinking`,active:!1,onClick:()=>n({kind:`thinking`,toolCallId:``,toolName:``,title:`Thinking`,activity:``,input:{},status:`completed`,thinkingText:e.text,...t})})}if(e.kind===`web_search`)return(0,I.jsx)(g,{step:e});if(e.kind===`web_search_error`)return(0,I.jsx)(h,{step:e});if(e.kind!==`tool`)return(0,I.jsx)(p,{step:e});let o=r(e.toolCallId);return(0,I.jsx)(m,{iconName:e.iconName,label:e.activity||e.info||e.title,active:t?.toolCallId===e.toolCallId,onClick:()=>{o&&n(v(o))}})}function B({detail:e}){let t=M(e.kind===`thinking`?e.messageId:void 0,e.thinkingGroupIndex,e.thinkingItemIndex);return(0,I.jsx)(`div`,{className:`flex flex-col gap-4`,children:e.kind===`thinking`?(0,I.jsx)(d,{content:t??e.thinkingText??``,hardLineBreaks:!0}):(0,I.jsx)(j,{detail:e})})}export{R as ActivityStepsPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,r as t}from"./chunk-jRWAZmH_.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-BxZ6HzpA.js";import{l as i,m as a,t as o}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{n as s}from"./QueryClientProvider-DKhXIxGb.js";import{t as c}from"./useQuery-B45lW1Kk.js";import{t as l}from"./useMutation-Lj4VunQV.js";import{t as u}from"./jsx-runtime-CVSDxk6A.js";import{t as d}from"./chevron-right-DqqmezXC.js";import{t as f}from"./circle-alert-zOqdmf25.js";import{t as p}from"./loader-circle-
|
|
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-BxZ6HzpA.js";import{l as i,m as a,t as o}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{n as s}from"./QueryClientProvider-DKhXIxGb.js";import{t as c}from"./useQuery-B45lW1Kk.js";import{t as l}from"./useMutation-Lj4VunQV.js";import{t as u}from"./jsx-runtime-CVSDxk6A.js";import{t as d}from"./chevron-right-DqqmezXC.js";import{t as f}from"./circle-alert-zOqdmf25.js";import{t as p}from"./loader-circle-Cv9PAGXe.js";import{t as m}from"./modal-rQEdFMrT.js";import{t as h}from"./dropdown-Cl8NyHlL.js";import{u as g}from"./routes-DzmKi8ws.js";import{n as _,r as v}from"./browser-D6KrosAJ.js";import{dt as y,pt as b}from"./react-query.gen-Cn6oD7Kk.js";var x=t({AddCreditsModal:()=>D}),S=e(n(),1),C=u(),w=[`10.00`,`20.00`,`30.00`,`40.00`,`50.00`,`60.00`,`70.00`,`80.00`,`90.00`,`100.00`];function T(e){let t=parseFloat(e);if(Number.isNaN(t))return`0 credits`;let n=t.toLocaleString(`en-US`,{minimumFractionDigits:2,maximumFractionDigits:2});return`${n.endsWith(`.00`)?n.slice(0,-3):n} credits`}function E(e){if(e&&typeof e==`object`){let t=e.amount;if(Array.isArray(t)&&typeof t[0]==`string`)return t[0]}return`Failed to create checkout session. Please try again.`}function D({open:e,onOpenChange:t}){let n=s(),{pathname:u}=i(),[x]=a(),D=x.toString()?`${u}?${x.toString()}`:u,{data:O,isLoading:k}=c(y()),A=O?.allowed_top_up_amounts?.length?O.allowed_top_up_amounts:w,[j,M]=(0,S.useState)(null),N=j&&A.includes(j)?j:A[0]??w[0],P=l(b());return(0,S.useEffect)(()=>v(()=>{t(!1),n.invalidateQueries(y())}),[t,n]),(0,C.jsx)(m.Root,{open:e,onOpenChange:t,children:(0,C.jsxs)(m.Content,{size:`sm`,children:[(0,C.jsxs)(m.Header,{children:[(0,C.jsx)(m.Title,{children:`Add Credits`}),(0,C.jsx)(m.Description,{children:`You'll be redirected to Stripe to complete the payment.`})]}),(0,C.jsx)(m.Body,{children:(0,C.jsxs)(`div`,{className:`space-y-4`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`label`,{htmlFor:`add-credits-amount`,className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Amount`}),(0,C.jsx)(h,{id:`add-credits-amount`,value:N,onChange:e=>{M(e),P.isError&&P.reset()},disabled:k||!O,options:A.map(e=>({value:e,label:T(e)}))})]}),P.isError&&(0,C.jsxs)(`div`,{className:`flex items-center gap-2 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,C.jsx)(f,{className:`h-3.5 w-3.5 shrink-0`}),E(P.error)]}),(0,C.jsxs)(o,{to:g.settings.usageBilling,className:`flex items-center gap-1 text-body-small-default text-[var(--content-tertiary)] hover:text-[var(--content-secondary)]`,onClick:()=>t(!1),children:[`Configure Automatic Top-Ups`,(0,C.jsx)(d,{className:`size-4`})]}),(0,C.jsx)(`div`,{className:`h-px w-full bg-[var(--border-subtle)]`})]})}),(0,C.jsxs)(m.Footer,{children:[(0,C.jsx)(m.Close,{asChild:!0,children:(0,C.jsx)(r,{variant:`outlined`,children:`Cancel`})}),(0,C.jsx)(r,{variant:`primary`,leftIcon:P.isPending?(0,C.jsx)(p,{className:`animate-spin`}):void 0,onClick:()=>{P.isPending||P.mutate({body:{amount:N,return_path:D}},{onSuccess:e=>{_(e.checkout_url)}})},disabled:P.isPending||k||!O,children:`Continue`})]})]})})}export{x as n,D as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{a as t,c as n,i as r}from"./local-settings-C-dW2vkq.js";import{r as i,t as a}from"./capture-error-BwO3qoVL.js";import{t as o}from"./react-DJZBPgpf.js";import{t as s}from"./button-BxZ6HzpA.js";import{m as c,u as l}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{n as u}from"./QueryClientProvider-DKhXIxGb.js";import{t as d}from"./useQuery-B45lW1Kk.js";import{t as f}from"./useMutation-Lj4VunQV.js";import{t as p}from"./jsx-runtime-CVSDxk6A.js";import{t as m}from"./cn-eDwV5N77.js";import{t as h}from"./typography-B_Zom8Gj.js";import{t as g}from"./createLucideIcon-IRfcSUxS.js";import{t as _}from"./check-DFNrQERi.js";import{t as v}from"./chevron-down-qD-re7AW.js";import{t as y}from"./circle-alert-zOqdmf25.js";import{t as b}from"./circle-check-VSiny8yl.js";import{t as x}from"./clock-BfaF7UiJ.js";import{t as S}from"./crown-CbQRwy8n.js";import{t as C}from"./external-link-Dqpx9nRm.js";import{t as w}from"./info-DIYWVpY2.js";import{t as T}from"./list-D1sxly73.js";import{t as E}from"./loader-circle-Cv9PAGXe.js";import{t as D}from"./pencil-zvu6VPlv.js";import{t as O}from"./triangle-alert-DM5k06Dr.js";import{t as k}from"./notice-CdE_bYUC.js";import{j as A}from"./src-DGZEuT5r.js";import{t as j}from"./tag-Dw1f5QKZ.js";import{t as M}from"./popover-B65NY395.js";import{t as N}from"./input-DxOyE0ZC.js";import{t as P}from"./toggle-BOKaoAmA.js";import{t as F}from"./modal-rQEdFMrT.js";import{n as I}from"./toast-Bchq1ame.js";import{t as L}from"./confirm-dialog-LogFhGPZ.js";import{t as R}from"./dropdown-Cl8NyHlL.js";import{Ut as z,Wt as B,ar as V,ft as ee,j as H,lt as U,wn as te}from"./sdk.gen-BYiW7lcm.js";import{Bt as W,Ft as G,H as K,V as q,_t as ne,c as J,d as Y,f as re,l as ie,m as ae,p as oe,u as X}from"./react-query.gen-BhyBMzST.js";import{t as se}from"./assistant-identity-store-CcOzNTzY.js";import{i as ce,r as le,t as ue}from"./utils-D4TAvmSz.js";import{r as de}from"./api-errors-BnUiuRwl.js";import{u as fe}from"./routes-DzmKi8ws.js";import{t as pe}from"./use-is-org-ready-W2o27Zxq.js";import{c as me,ct as he,d as ge,f as _e,g as ve,h as ye,l as be,m as xe,o as Se,p as Ce,s as we,u as Te,v as Ee,y as De}from"./react-query.gen-Cn6oD7Kk.js";import{$i as Oe,$t as ke,Ai as Ae,Ar as je,B as Me,Bi as Ne,Br as Pe,Di as Fe,Dr as Ie,Ei as Le,Fi as Re,Fr as ze,Gi as Be,Gr as Ve,H as He,Hi as Ue,Hr as We,Ii as Ge,Ir as Ke,Ji as qe,Ki as Je,Lr as Ye,Mi as Xe,Mr as Ze,Ni as Qe,Nr as $e,Oi as et,Or as tt,Pi as nt,Pr as rt,Qi as it,Qt as at,R as ot,Rr as st,Sa as ct,Ti as lt,Ui as ut,Ur as dt,V as ft,Vi as pt,Wi as mt,Wr as ht,Xi as gt,Xt as _t,Yi as vt,Zi as yt,Zt as bt,ea as xt,ji as St,jr as Ct,ki as wt,kr as Tt,na as Et,pa as Dt,qi as Ot,ra as kt,ta as At,wi as jt,z as Mt,zi as Nt,zr as Pt}from"./index-cKUmWCp-.js";import{t as Ft}from"./use-active-assistant-id-qI62oM5B.js";import{t as It}from"./detail-card-DvLLMhNf.js";import{t as Lt}from"./environment-store-Cs37h4c4.js";var Rt=g(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Z=e(o(),1),Q=p();function zt({mode:e,onChange:t}){return(0,Q.jsx)(`div`,{className:`max-w-[280px]`,children:(0,Q.jsx)(A,{ariaLabel:`Service mode`,value:e,onChange:t,items:[{value:`managed`,label:`Managed`},{value:`your-own`,label:`Your Own`}]})})}function Bt({id:e,title:t,subtitle:n,mode:r,onModeChange:i,children:a}){return(0,Q.jsxs)(It,{id:e,title:t,subtitle:n,accessory:(0,Q.jsx)(zt,{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 Vt({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 Ht(){return(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)(w,{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)(C,{className:`h-3.5 w-3.5`})]})]})]})}function Ut({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)(E,{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)(_,{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)(x,{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)(y,{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`})}function $({onClick:e,disabled:t}){return(0,Q.jsx)(s,{onClick:e,disabled:t,children:`Save`})}function Wt({onClick:e,filled:t=!1}){return(0,Q.jsx)(s,{variant:t?`danger`:`dangerGhost`,onClick:e,children:`Reset`})}function Gt({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)(w,{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)(C,{className:`h-3 w-3`})]})]})]})}var Kt=`__custom__`;function qt(e){return e?!!(e.profile||e.provider||e.model):!1}function Jt(e,t){let n=qt(e);return n===qt(t)?n?(e?.profile??null)===(t?.profile??null)&&(e?.provider??null)===(t?.provider??null)&&(e?.model??null)===(t?.model??null):!0:!1}function Yt({id:e,displayName:t,description:n,defaultProfileLabel:r,draft:i,profileOptions:a,onDraftChange:o,onToggle:s}){let c=qt(i),l=!i||!c?``:i.provider||i.model?Kt:i.profile??``,u=l===Kt,d=Xe(),f=d[0]??Oe[0],p=d.find(e=>e===i?.provider)??f,m=kt(p).map(e=>({value:e.id,label:e.displayName})),h=!!i?.provider&&!i?.model;function g(t){t===`__custom__`?o(e,{profile:null,provider:f,model:Et(f)??``}):t===``?o(e,null):o(e,{profile:t,provider:null,model:null})}function _(t){let n=Et(t)??``;o(e,{...i??{},profile:null,provider:t,model:n})}function v(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)(R,{value:l,onChange:g,options:a,className:`w-44`,menuMinWidth:280,menuAlign:`end`}),(0,Q.jsx)(P,{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)(R,{value:p??``,onChange:_,options:d.map(e=>({value:e,label:At[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)(R,{value:i?.model??``,onChange:v,options:m})]})]}),h&&(0,Q.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:`Pick a model`})]})]})}function Xt({isOpen:e,onClose:t,assistantId:n}){let r=(0,Z.useRef)(!1);return(0,Q.jsx)(F.Root,{open:e,onOpenChange:e=>{!e&&!r.current&&t()},children:e?(0,Q.jsx)(Zt,{assistantId:n,onClose:t,onSavingChange:e=>{r.current=e}}):null})}function Zt({assistantId:e,onClose:t,onSavingChange:n}){let r=u(),{data:i}=d({...J({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)(()=>pt(o,c),[o,c]),p=Xe(),m=W({onSuccess:t=>{X(r,{path:{assistant_id:e}},t)}}),[h,g]=(0,Z.useState)(``),[_,v]=(0,Z.useState)(``),[y,b]=(0,Z.useState)({}),[x,S]=(0,Z.useState)(!1),[C,w]=(0,Z.useState)(!1),{data:T,isLoading:D,isError:O,refetch:k}=d({...Y({path:{assistant_id:e}}),enabled:!!e,staleTime:6e4,refetchOnWindowFocus:!1}),A=(0,Z.useMemo)(()=>(T?.callSites??[]).filter(e=>e.id!==`mainAgent`),[T]),j=!D&&!O&&!!T&&!!i,M=(0,Z.useMemo)(()=>A.map(e=>e.id),[A]),P=(0,Z.useMemo)(()=>{if(!j)return{};let e={};for(let t of M)if(t in y)e[t]=y[t];else{let n=l[t];e[t]=n?{...n}:{}}return e},[j,M,l,y]),z=(0,Z.useMemo)(()=>new Set(M),[M]),B=(0,Z.useMemo)(()=>Object.entries(l).some(([e,t])=>z.has(e)&&(t?.profile!=null||t?.provider!=null||t?.model!=null)),[l,z]),V=(0,Z.useMemo)(()=>{if(!j)return!1;for(let e of Object.keys(P))if(!Jt(P[e],l[e]))return!0;return!1},[j,P,l]),ee=(0,Z.useMemo)(()=>Object.values(P).some(e=>qt(e)&&!!e?.provider&&!e?.model),[P]),H=(0,Z.useMemo)(()=>ft(f,[]).map(e=>({value:e.name,label:Mt(e)})),[f]),U=(0,Z.useCallback)(()=>{if(!_)return;let e={};for(let t of M)e[t]={profile:_};b(e)},[_,M]),te=(0,Z.useCallback)(e=>[...ft(f,[e]).map(e=>({value:e.name,label:Mt(e)})),{value:Kt,label:`Custom`}],[f]),G=(0,Z.useMemo)(()=>{if(!h.trim())return A;let e=h.toLowerCase();return A.filter(t=>(t.displayName??``).toLowerCase().includes(e)||(t.description??``).toLowerCase().includes(e)||(t.domain??``).toLowerCase().includes(e))},[A,h]),K=(0,Z.useMemo)(()=>{if(!T)return[];let e=T.domains.map(e=>e.id),t=new Map(T.domains.map(e=>[e.id,e])),n=[];for(let r of e){let e=G.filter(e=>e.domain===r);e.length>0&&n.push({domain:t.get(r),sites:e})}let r=new Set(e),i=G.filter(e=>!r.has(e.domain));return i.length>0&&n.push({domain:{id:`other`,displayName:`Other`},sites:i}),n},[T,G]),q=(0,Z.useCallback)((e,t)=>{b(n=>({...n,[e]:t}))},[]),ne=(0,Z.useCallback)((e,t)=>{if(!t){b(t=>({...t,[e]:null}));return}let n=Me(f,A.find(t=>t.id===e)?.defaultProfile);if(n)b(t=>({...t,[e]:{profile:n}}));else{let t=p[0]??Oe[0],n=Et(t)??``;b(r=>({...r,[e]:{provider:t,model:n}}))}},[A,f,p]),re=(0,Z.useCallback)(async()=>{S(!0),n?.(!0);try{let n={};for(let e of Object.keys(P)){let t=P[e]??null;n[e]=qt(t)?{profile:t?.profile??null,provider:t?.provider??null,model:t?.model??null}:null}await m.mutateAsync({path:{assistant_id:e},body:{llm:{callSites:n}}}),t(),I.success(`Overrides saved.`)}catch(e){I.error(`Failed to save overrides. Please try again.`),a(e,{context:`call_site_overrides_save`})}finally{S(!1),n?.(!1)}},[P,t,m,n,e]),ie=(0,Z.useCallback)(async()=>{S(!0),n?.(!0);try{let n={};for(let e of Object.keys(P))n[e]=null;await m.mutateAsync({path:{assistant_id:e},body:{llm:{callSites:n}}}),t(),I.success(`Overrides reset.`)}catch(e){I.error(`Failed to reset overrides. Please try again.`),a(e,{context:`call_site_overrides_reset`})}finally{S(!1),n?.(!1)}},[P,t,m,n,e]);return(0,Q.jsxs)(F.Content,{size:`lg`,hideCloseButton:!0,children:[(0,Q.jsxs)(F.Header,{children:[(0,Q.jsx)(F.Title,{children:`Action Overrides`}),(0,Q.jsx)(F.Description,{children:`Customize which model profile specific actions should use. Uses your default profile if no override is set.`})]}),(0,Q.jsxs)(F.Body,{children:[(0,Q.jsx)(`div`,{className:`mb-4`,children:(0,Q.jsx)(N,{type:`search`,value:h,onChange:e=>g(e.target.value),placeholder:`Search actions…`,leftIcon:(0,Q.jsx)(ct,{className:`h-4 w-4`}),fullWidth:!0})}),H.length>0&&(0,Q.jsxs)(`div`,{className:`mb-4 flex items-center gap-2 rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)] p-3`,children:[(0,Q.jsx)(`p`,{className:`min-w-0 flex-1 text-body-medium-default text-[var(--content-default)]`,children:`Use one profile for all actions`}),(0,Q.jsx)(R,{value:_,onChange:v,options:H,placeholder:`Choose profile…`,className:`w-44`,menuMinWidth:280,menuAlign:`end`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:U,disabled:!_||!j||x,children:`Apply to all`})]}),D&&(0,Q.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,Q.jsx)(E,{className:`h-6 w-6 animate-spin text-[var(--content-tertiary)]`})}),O&&(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 k(),children:`Retry`})]}),!D&&!O&&T&&(0,Q.jsx)(`div`,{className:`space-y-4`,children:K.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.`}):K.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=P[e.id]??null;return!t||!qt(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)(Yt,{id:e.id,displayName:e.displayName,description:e.description,defaultProfileLabel:n,draft:P[e.id]??null,profileOptions:te(t===``||t===`__custom__`?null:t),onDraftChange:q,onToggle:ne},e.id)})})]},e.id))})]}),(0,Q.jsxs)(F.Footer,{children:[B&&(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>w(!0),disabled:x||!j,tintColor:`var(--system-negative-strong)`,className:`mr-auto`,children:`Reset to Defaults`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:t,disabled:x,children:`Cancel`}),(0,Q.jsx)(s,{variant:`primary`,size:`compact`,onClick:()=>void re(),disabled:!V||ee||x,children:x?(0,Q.jsx)(E,{className:`h-4 w-4 animate-spin`}):`Save`})]}),(0,Q.jsx)(L,{open:C,title:`Reset to Defaults`,message:`Every task override will be reset and will follow your active profile. This cannot be undone.`,confirmLabel:`Reset to Defaults`,destructive:!0,onConfirm:()=>{w(!1),ie()},onCancel:()=>w(!1)})]})}function Qt({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)(F.Root,{open:e!==null,onOpenChange:e=>{e||o()},children:(0,Q.jsxs)(F.Content,{size:`sm`,children:[(0,Q.jsx)(F.Header,{children:(0,Q.jsx)(F.Title,{children:`Can't Delete Profile`})}),(0,Q.jsxs)(F.Body,{className:`space-y-4`,children:[(0,Q.jsx)(h,{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)(R,{"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)(h,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:i})]}),(0,Q.jsxs)(F.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 $t(e,t){if(e){let n=kt(e).find(e=>e.id===t);if(n)return n.displayName}let n=t.lastIndexOf(`/`);return n>=0?t.slice(n+1):t}function en(e,t){let n=[];e.description&&n.push(e.description);let r=e.provider_connection===`vellum`&&t?`vellum`:e.provider,i=[];if(e.model&&i.push($t(r,e.model)),r){let e=At[r]??r;i.push(`hosted by ${e}`)}return i.length>0&&n.push(i.join(` `)),n.join(` – `)}function tn({profile:e,vellumIsManaged:t,isDragging:n,dropTarget:r,isDeleting:i,deleteError:a,isToggling:o,onDragStart:c,onDragEnd:l,onDragOver:u,onDragLeave:d,onDrop:f,onEditClick:p,onDeleteClick:m,onStatusToggle:g}){let _=e.source===`managed`,v=e.invariant===!0,y=e.status!==`disabled`;return(0,Q.jsxs)(`div`,{className:`relative`,children:[r?.name===e.name&&!r.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${n?` opacity-50`:``}`,draggable:!_,onDragStart:c,onDragEnd:l,onDragOver:u,onDragLeave:d,onDrop:f,children:[(0,Q.jsx)(Rt,{className:`h-4 w-4 shrink-0 ${_?`invisible`:`cursor-grab text-[var(--content-tertiary)]`}`}),(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1${y?``:` opacity-55`}`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(h,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:e.label??e.name}),_&&(0,Q.jsx)(j,{tone:`positive`,title:`Managed by Platform — this profile cannot be disabled, deleted, or renamed.`,children:`Platform`})]}),e.description||e.model||e.provider?(0,Q.jsx)(h,{variant:`body-medium-lighter`,as:`p`,className:`mt-0.5 text-(--content-tertiary)`,children:en(e,t)}):null]}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(!v||!y)&&(0,Q.jsx)(`div`,{className:`flex shrink-0 items-center`,title:y?`Active — toggle to hide from pickers`:`Disabled — toggle to show in pickers`,children:(0,Q.jsx)(P,{checked:y,onChange:e=>g(e),disabled:o,"aria-label":`${y?`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:p,children:_||v?`View`:`Edit`}),(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(Dt,{}),"aria-label":`Delete ${e.label??e.name}`,disabled:_||v||i,title:_||v?`Managed profiles cannot be deleted`:void 0,onClick:m,tintColor:`var(--system-negative-strong)`})]})]})]}),r?.name===e.name&&r.after&&(0,Q.jsx)(`div`,{className:`mx-0 h-0.5 rounded-full bg-[var(--border-active)]`}),a?(0,Q.jsx)(h,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:a}):null]})}function nn({isOpen:e,assistantId:t,onClose:n}){let r=u(),{data:i}=d({...J({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)(()=>pt(o,s),[o,s]),p=W({onSuccess:e=>{X(r,{path:{assistant_id:t}},e)}}),[m,h]=(0,Z.useState)(!1),[g,_]=(0,Z.useState)(null),{data:v}=d({...q({path:{assistant_id:t}}),enabled:e}),y=v?.connections,b=y?.some(e=>e.name===`vellum`&&e.provider===`vellum`)??!1,x=Object.keys(o);async function S(e,n,r){let i=r?.mode??`replace`,c=!(e in o);if(i===`merge`&&!c){await p.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:n}}}}),h(!1),_(null);return}let l={profiles:{[e]:n}};if(c&&(l.profileOrder=s.includes(e)?s:[...s,e]),c)await p.mutateAsync({path:{assistant_id:t},body:{llm:l}});else{let n=o[e];await p.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:null}}}});try{await p.mutateAsync({path:{assistant_id:t},body:{llm:l}})}catch(r){throw a(r,{context:`settings-ai-profile-edit-recreate`}),n!=null&&await p.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:n}}}}).catch(()=>{}),r}}c&&I.success(`Profile "${n.label??e}" created`),h(!1),_(null)}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(F.Root,{open:e,onOpenChange:e=>{e||n()},children:e?(0,Q.jsx)(rn,{assistantId:t,vellumIsManaged:b,profiles:o,profileOrder:s,orderedProfiles:f,activeProfile:c,callSiteOverrides:l,onClose:n,onEditClick:e=>{_(e),h(!0)},onNewClick:()=>{_(null),h(!0)}}):null}),(0,Q.jsx)(jt,{isOpen:m,mode:g?g.source===`managed`||g.invariant===!0?`view`:`edit`:`create`,profileName:g?.name,initialValues:g??void 0,existingNames:x,connections:y,assistantId:t,onSave:S,onCancel:()=>{h(!1),_(null)}})]})}function rn({assistantId:e,vellumIsManaged:t,profiles:n,profileOrder:r,orderedProfiles:i,activeProfile:o,callSiteOverrides:c,onClose:l,onEditClick:d,onNewClick:f}){let p=u(),m=W({onSuccess:t=>{X(p,{path:{assistant_id:e}},t)}}),[g,_]=(0,Z.useState)({}),[v,y]=(0,Z.useState)({}),[b,x]=(0,Z.useState)(new Set),[S,C]=(0,Z.useState)(null),[w,T]=(0,Z.useState)(null),[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,I]=(0,Z.useState)(null),[L,R]=(0,Z.useState)(``),[z,B]=(0,Z.useState)(!1),V=(0,Z.useMemo)(()=>i,[i]);async function ee(t,r){if(b.has(t.name))return!1;x(e=>new Set(e).add(t.name)),C(null);let i=r?`active`:`disabled`;if(!n[t.name])return x(e=>{let n=new Set(e);return n.delete(t.name),n}),!1;try{return await m.mutateAsync({path:{assistant_id:e},body:{llm:{profiles:{[t.name]:{status:i}}}}}),!0}catch(e){return a(e,{context:`settings-ai-profile-toggle`}),C(`Couldn't update "${t.label??t.name}". Please try again.`),!1}finally{x(e=>{let n=new Set(e);return n.delete(t.name),n})}}async function H(t){y(e=>({...e,[t]:!0})),_(e=>{let n={...e};return delete n[t],n});try{let n=r.filter(e=>e!==t);await m.mutateAsync({path:{assistant_id:e},body:{llm:{profiles:{[t]:null},profileOrder:n}}})}catch(e){a(e,{context:`settings-ai-profile-delete`}),_(e=>({...e,[t]:`Failed to delete profile. Please try again.`}))}finally{y(e=>{let n={...e};return delete n[t],n})}}function U(e){let t=V.find(t=>t.name===e)?.label??e,n=e===o,r=Object.entries(c).filter(([t,n])=>t!==`mainAgent`&&n?.profile===e).map(([e])=>e);if(n||r.length>0){N({name:e,label:t,isActive:n,callSiteIds:r}),R(``),I(null);return}H(e)}async function te(){if(!M||!L)return;B(!0),I(null);let t={};if(M.isActive&&(t.activeProfile=L),M.callSiteIds.length>0){let e={};for(let t of M.callSiteIds)e[t]={profile:L};t.callSites=e}if(Object.keys(t).length>0)try{await m.mutateAsync({path:{assistant_id:e},body:{llm:t}})}catch(e){a(e,{context:`settings-ai-profile-reassign-delete`}),I(`Failed to reassign references. Please try again.`),B(!1);return}let n=M.name;N(null),B(!1),H(n)}async function G(t,n){if(t===n.name)return;k(null);let i=r.filter(e=>e!==t),o=i.indexOf(n.name);if(o===-1)return;n.after&&(o+=1);let s=[...i.slice(0,o),t,...i.slice(o)];try{await m.mutateAsync({path:{assistant_id:e},body:{llm:{profileOrder:s}}})}catch(e){a(e,{context:`settings-ai-profile-reorder`}),k(`Failed to reorder profiles. Please try again.`)}}let K=V.filter(e=>e.name!==M?.name&&e.source!==`managed`),q=K.length>0?K:V.filter(e=>e.name!==M?.name);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(F.Content,{size:`md`,children:[(0,Q.jsxs)(F.Header,{children:[(0,Q.jsx)(F.Title,{children:`Model Profiles`}),(0,Q.jsx)(F.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)(F.Body,{children:[V.length===0?(0,Q.jsx)(h,{variant:`body-medium-lighter`,as:`p`,className:`py-4 text-center text-(--content-tertiary)`,children:`No profiles yet. Create one to get started.`}):(0,Q.jsx)(`div`,{className:`space-y-1`,children:V.map(e=>(0,Q.jsx)(tn,{profile:e,vellumIsManaged:t,isDragging:w===e.name,dropTarget:E,isDeleting:v[e.name]??!1,deleteError:g[e.name],isToggling:b.has(e.name),onDragStart:t=>{A.current=e.name,T(e.name),t.dataTransfer&&(t.dataTransfer.effectAllowed=`move`)},onDragEnd:()=>{A.current=null,j.current=null,T(null),D(null)},onDragOver:t=>{t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=t.clientY>n.top+n.height/2,i={name:e.name,after:r};j.current=i,D(i)},onDragLeave:t=>{t.currentTarget.contains(t.relatedTarget)||(j.current=null,D(t=>t?.name===e.name?null:t))},onDrop:e=>{e.preventDefault();let t=A.current,n=j.current;A.current=null,j.current=null,T(null),D(null),t&&n&&G(t,n)},onEditClick:()=>d(e),onDeleteClick:()=>U(e.name),onStatusToggle:t=>void ee(e,t)},e.name))}),O&&(0,Q.jsx)(h,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:O}),S&&(0,Q.jsx)(h,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:S})]}),(0,Q.jsxs)(F.Footer,{className:`justify-between`,children:[(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:f,children:`+ New Profile`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:l,children:`Done`})]})]}),(0,Q.jsx)(Qt,{blocked:M,availableReplacements:q,replacement:L,onReplacementChange:R,error:P,saving:z,onClose:()=>{N(null),I(null)},onConfirm:()=>void te()})]})}var an=`0.10.8`;function on(){return le(an)}function sn({mode:e,connection:t,assistantId:n,existingNames:r,onSave:i,onCancel:a}){let[o,c]=(0,Z.useState)(t?.label??``),l=t?.name??``,d=t?.provider??`anthropic`,f=t?.auth.type??`api_key`,[p,m]=(0,Z.useState)(()=>t?.auth.type===`api_key`?t.auth.credential:t?``:`credential/anthropic/api_key`),[g,_]=(0,Z.useState)(t?.baseUrl??``),[v,y]=(0,Z.useState)(()=>t?.models?t.models.map(e=>e.id).join(`, `):``),[b,x]=(0,Z.useState)(!1),[S,C]=(0,Z.useState)(null),w=d===`openai-compatible`,[T,E]=(0,Z.useState)(``),[D,O]=(0,Z.useState)(!1),k=u(),A=(0,Z.useMemo)(()=>nt(p),[p]),j=f===`api_key`&&A!==null,{hasStoredCredential:M,isLoading:P}=St({assistantId:n,credentialKind:`credential`,credentialName:A?`${A.service}:${A.field}`:``,enabled:j}),{credentials:I}=Le({assistantId:n,enabled:f===`api_key`});(0,Z.useEffect)(()=>{let e=t?.provider??`anthropic`;c(t?.label??``),t?.auth.type===`api_key`?m(t.auth.credential):m(t?``:`credential/${e}/api_key`),C(null),_(t?.baseUrl??``),y(t?.models?t.models.map(e=>e.id).join(`, `):``),E(``),O(!1)},[t]);let L=l.trim().length>0;async function R(){if(L){x(!0),C(null);try{let e;if(f===`api_key`){let t=p.trim()||`credential/${d}/api_key`,r=T.trim();if(r){O(!0);try{let e=nt(t);await V({path:{assistant_id:n},body:e?{type:`credential`,name:`${e.service}:${e.field}`,value:r}:{type:`api_key`,name:d,value:r},throwOnError:!0});let i=Ae(n,`credential`,e?`${e.service}:${e.field}`:``);k.setQueryData(i,!0),k.invalidateQueries({queryKey:ne({path:{assistant_id:n}})})}catch{C(`Failed to save API key. Please try again.`);return}finally{O(!1)}}e={type:`api_key`,credential:t}}else if(t)e=t.auth;else{C(`Nothing to edit. Close and try again.`);return}let r=o.trim()||null,a={auth:e,label:r,...w&&{base_url:g.trim()||null,models:v.trim()?v.split(`,`).map(e=>({id:e.trim()})).filter(e=>e.id):null}},{data:s,error:c,response:u}=await B({path:{assistant_id:n,name:t?.name??l.trim()},body:a});if(!u?.ok){C(Ge(u?.status,c)??Qe(u?.status));return}if(!s){C(`Server returned an empty response. Please try again.`);return}i(s)}catch{C(`Failed to save provider. Please try again.`)}finally{x(!1)}}}let z=I.filter(e=>e.service===d),ee=e!==`create`&&t?.auth.type===`api_key`,H=z.length>0||ee,U=Fe(`Enter your API key`,M);return e===`create`?(0,Q.jsx)(lt,{variant:`modal`,assistantId:n,existingNames:r,defaultProviderType:d,onCreated:i,onCancel:a}):(0,Q.jsxs)(F.Content,{size:`md`,children:[(0,Q.jsxs)(F.Header,{children:[(0,Q.jsx)(F.Title,{children:`Edit Provider`}),(0,Q.jsx)(F.Description,{children:t?`Editing ${Re(t)}.`:`Edit provider settings.`})]}),(0,Q.jsxs)(F.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)(N,{value:o,onChange:e=>c(e.target.value),placeholder:`e.g. My Anthropic Key`,fullWidth:!0})]}),w&&(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)(N,{value:g,onChange:e=>_(e.target.value),placeholder:`https://api.example.com/v1`,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)(N,{value:v,onChange:e=>y(e.target.value),placeholder:`model-1, model-2`,fullWidth:!0}),(0,Q.jsx)(h,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:`Comma-separated model identifiers exposed by your endpoint.`})]})]}),f===`api_key`&&(0,Q.jsx)(et,{apiKeyValue:T,onApiKeyChange:E,credential:p,onCredentialChange:m,isLoadingCredential:P,apiKeyPlaceholder:U,provider:d,providerCredentials:z,showAdvancedSection:H,onError:C}),f===`oauth_subscription`&&(0,Q.jsx)(wt,{assistantId:n,onConnected:i}),S&&(0,Q.jsx)(h,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:S})]}),(0,Q.jsxs)(F.Footer,{children:[(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,onClick:a,children:`Cancel`}),(0,Q.jsx)(s,{variant:`primary`,size:`compact`,disabled:!L||b||D,onClick:()=>void R(),children:b?`Saving…`:`Save`})]})]})}var cn={anthropic:!0,openai:!0,gemini:!0,fireworks:!0,openrouter:!0,vellum:!0};function ln(e){return e in cn}function un({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({...q({path:{assistant_id:t}}),enabled:e}),p=on(),{data:m}=d({...re({path:{assistant_id:t}}),enabled:e&&p}),h=(0,Z.useMemo)(()=>{let e=c?.connections??[];return[...e.filter(e=>e.provider===xt),...e.filter(e=>e.provider!==xt)]},[c]);function g(){s.invalidateQueries({queryKey:oe({path:{assistant_id:t}})}),s.invalidateQueries({queryKey:ie({path:{assistant_id:t}})})}function _(e){s.invalidateQueries({queryKey:K({path:{assistant_id:t}})}),i(!1),o(null)}let v=h.map(e=>e.name),y=()=>{i(!1),o(null)};return(0,Q.jsx)(F.Root,{open:e,onOpenChange:e=>{e||(r?y():n())},children:e?r?(0,Q.jsx)(sn,{mode:a?`edit`:`create`,connection:a??void 0,assistantId:t,existingNames:v,onSave:_,onCancel:y}):(0,Q.jsx)(dn,{connections:h,loading:l,isError:f,assistantId:t,supportsDefaultProvider:p,defaultConnectionName:p?m?.resolvedConnectionName??null:null,onDefaultChanged:g,onClose:n,onEditClick:e=>{o(e),i(!0)},onNewClick:()=>{o(null),i(!0)},onConnectionDeleted:()=>{s.invalidateQueries({queryKey:K({path:{assistant_id:t}})})}}):null})}function dn({connections:e,loading:t,isError:n,assistantId:r,supportsDefaultProvider:i,defaultConnectionName:o,onDefaultChanged:c,onClose:l,onEditClick:u,onNewClick:d,onConnectionDeleted:p}){let[m,g]=(0,Z.useState)({}),[_,v]=(0,Z.useState)({}),y=f({...ae(),onMutate:e=>{let t=e.body?.connectionName;t&&g(e=>{let n={...e};return delete n[t],n})},onSuccess:c,onError:(e,t)=>{a(e,{context:`settings-ai-set-default-provider`});let n=t.body?.connectionName;n&&g(e=>({...e,[n]:`Failed to set default provider. Please try again.`}))}});function b(e){ln(e.provider)&&y.mutate({path:{assistant_id:r},body:{provider:e.provider,connectionName:e.name}})}async function x(e){v(t=>({...t,[e]:!0})),g(t=>{let n={...t};return delete n[e],n});try{let{response:t}=await z({path:{assistant_id:r,name:e}});t?.ok||t?.status===404?p(e):t?.status===409?g(t=>({...t,[e]:`This provider is in use by a profile or as the default provider. Update those settings before deleting it.`})):g(t=>({...t,[e]:`Failed to delete provider. Please try again.`}))}catch{g(t=>({...t,[e]:`Failed to delete provider. Please try again.`}))}finally{v(t=>{let n={...t};return delete n[e],n})}}return(0,Q.jsxs)(F.Content,{size:`md`,children:[(0,Q.jsxs)(F.Header,{children:[(0,Q.jsx)(F.Title,{children:`Providers`}),(0,Q.jsx)(F.Description,{children:`Manage the model providers your assistant can use.`})]}),(0,Q.jsx)(F.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)(h,{variant:`body-medium-default`,as:`p`,className:`py-4 text-center text-(--system-negative-strong)`,children:`Failed to load providers. Please try again.`}):e.length===0?(0,Q.jsx)(h,{variant:`body-medium-lighter`,as:`p`,className:`py-4 text-center text-(--content-tertiary)`,children:`No providers yet. Add one to get started.`}):(0,Q.jsx)(`div`,{className:`space-y-1`,children:e.map(e=>{let t=_[e.name]??!1,n=m[e.name],r=e.isManaged??!1,a=e.name===o,c=ln(e.provider),l=y.isPending&&y.variables?.body?.connectionName===e.name;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.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(h,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:Re(e)}),r&&(0,Q.jsx)(j,{tone:`positive`,title:`Managed by Platform — you can rename this provider, but not edit it.`,children:`Platform`}),a&&(0,Q.jsx)(j,{tone:`info`,title:`Built-in profiles (Balanced, Quality, Speed) use this provider.`,children:`Default`})]})}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[i&&!a&&(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,disabled:!c||l,title:c?`Use this provider for the built-in profiles.`:`Built-in profiles can't run on this provider.`,onClick:()=>b(e),children:`Set as default`}),!r&&(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,onClick:()=>u(e),children:`Edit`}),(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(Dt,{}),"aria-label":`Delete ${Re(e)}`,disabled:r||a||t,title:r?`The Vellum provider cannot be removed`:a?`This is your default provider. Set another provider as default first.`:void 0,onClick:()=>void x(e.name),tintColor:`var(--system-negative-strong)`})]})]}),n?(0,Q.jsx)(h,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:n}):null]},e.name)})})}),(0,Q.jsxs)(F.Footer,{className:`justify-between`,children:[(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:d,children:`+ Add Provider`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:l,children:`Done`})]})]})}function fn(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 pn(){let e=Ft(),t=u(),{data:n}=d({...J({path:{assistant_id:e}}),staleTime:3e4}),r=on(),{data:i,refetch:o}=d({...re({path:{assistant_id:e}}),enabled:r}),c=i?.availability,l=n?.llm?.activeProfile??null,f=n?.llm?.advisorProfile??null,p=n?.llm?.callSites??{},{profiles:m,profileOrder:g}=ot(n?.llm,e),_=(0,Z.useMemo)(()=>pt(m,g),[m,g]),v=W({onSuccess:n=>{X(t,{path:{assistant_id:e}},n)}}),[y,b]=fn(l),[x,S]=fn(f),[C,w]=(0,Z.useState)(!1),[T,D]=(0,Z.useState)(!1),[O,A]=(0,Z.useState)(!1),j=(0,Z.useMemo)(()=>ft(_,[y]),[_,y]),M=(0,Z.useMemo)(()=>ft(_,[x]),[_,x]),N=Object.entries(p).filter(([e,t])=>e!==`mainAgent`&&(t?.profile!=null||t?.provider!=null||t?.model!=null)).length,P=N===1?`1 Override`:N>0?`${N} Overrides`:`Overrides`,F=y!==l,L=x!==f,z=(0,Z.useCallback)(async()=>{try{let t={};F&&(t.activeProfile=y),L&&(t.advisorProfile=x),await v.mutateAsync({path:{assistant_id:e},body:{llm:t}}),I.success(`Saved.`)}catch(e){I.error(`Failed to save. Please try again.`),a(e,{context:`settings-ai-language-model-save`})}},[F,L,y,x,v,e]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Vt,{title:`Language Model`,subtitle:`Configure the LLMs that power your assistant`,children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[c&&c.status!==`ok`&&(0,Q.jsx)(k,{tone:c.status===`unknown`?`warning`:`error`,children:c.message??`Your default provider is not available.`}),(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)(R,{value:y??``,onChange:e=>{b(e===``?null:e)},placeholder:`Select a default profile…`,options:j.map(e=>({value:e.name,label:Mt(e)}))}),j.length===0?(0,Q.jsx)(h,{variant:`body-small-default`,as:`p`,className:`mt-1 text-(--content-tertiary)`,children:`No profiles yet. Click Profiles below to create one.`}):null]}),(0,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)(R,{value:x??``,onChange:e=>{S(e===``?null:e)},placeholder:`Select an advisor profile…`,options:M.map(e=>({value:e.name,label:Mt(e)}))}),(0,Q.jsx)(h,{variant:`body-small-default`,as:`p`,className:`mt-1 text-(--content-tertiary)`,children:`Which model your assistant consults for a second opinion`})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>A(!0),children:`Providers`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>w(!0),children:`Profiles`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>D(!0),children:P})]}),(F||L)&&(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:z,disabled:v.isPending}),v.isPending&&(0,Q.jsx)(E,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]})}),e&&(0,Q.jsx)(nn,{isOpen:C,assistantId:e,onClose:()=>w(!1)}),e&&(0,Q.jsx)(Xt,{isOpen:T,onClose:()=>D(!1),assistantId:e}),e&&(0,Q.jsx)(un,{isOpen:O,assistantId:e,onClose:()=>{A(!1),r&&o()}})]})}function mn(){let e=Ft();return(0,Z.useCallback)(async(t,n)=>{try{let{data:r}=await V({path:{assistant_id:e},body:{value:n,type:`api_key`,name:t},throwOnError:!0});Ne(r)}catch(e){throw e instanceof Error&&e.message===`No assistant found`?I.error(`Assistant not ready. Please try again.`):I.error(`Failed to save ${t} API key. Please try again.`),a(e,{context:`provision_provider_key`}),e}},[e])}var hn=`0.10.12`;function gn(){return ue(hn)}function _n(){let e=Ft(),i=u(),o=pe(),{data:s}=d({...J({path:{assistant_id:e}}),enabled:o,staleTime:3e4}),c=W({onSuccess:t=>{X(i,{path:{assistant_id:e}},t)}}),l=mn(),f=(0,Z.useMemo)(()=>{if(!s)return r(Ye,`inference-provider-native`);let e=s.services?.[`web-search`];return(e?.mode===`managed`&&e?.provider!==`inference-provider-native`?`vellum`:e?.provider)||r(`vellum:ai:webSearchProvider`,`inference-provider-native`)},[s]),[p,m]=(0,Z.useState)(!1),[h,g]=fn(f),[_,v]=(0,Z.useState)(``),y=Be.has(h),{hasStoredCredential:b}=St({assistantId:e,credentialKind:`api_key`,credentialName:h,enabled:y}),x=_.trim().length>0,S=p||y&&!b&&!x||h===f&&!x,C=Fe(qe[h]??`Enter your API key`,b),w=(0,Z.useCallback)(async()=>{m(!0);let t=_.trim(),r=ut(h),o=y&&t.length>0;try{o&&await l(h,t),await ce();let n=h===`vellum`?gn()?{provider:`vellum`,mode:`managed`}:{mode:`managed`}:{provider:h,mode:`your-own`};await c.mutateAsync({path:{assistant_id:e},body:{services:{"web-search":n}}}).catch(e=>{throw I.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e})}catch{m(!1);return}m(!1);try{if(n(Ye,h),o){r&&n(r,t);let a=Ae(e,`api_key`,h);i.setQueryData(a,!0),i.invalidateQueries({queryKey:a}),v(``)}I.success(`Web search settings saved.`)}catch(e){a(e,{context:`settings-ai-web-search-persist-local`}),I.error(`Saved, but local preferences could not be written.`)}},[y,c,l,i,e,_,h]),T=(0,Z.useCallback)(()=>{let e=ut(h);e&&t(e),v(``),g(`inference-provider-native`),n(Ye,`inference-provider-native`)},[h,g]);return(0,Q.jsx)(Vt,{title:`Web Search`,subtitle:`Configure how your assistant should search the web`,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)(R,{"aria-label":`Web search provider`,value:h,onChange:g,options:Ot.map(e=>({value:e,label:Je[e]??e}))})]}),h===`vellum`&&(0,Q.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Search runs through your Vellum account.`}),y&&(0,Q.jsx)(N,{label:`API Key`,type:`password`,value:_,onChange:e=>v(e.target.value),placeholder:C,fullWidth:!0}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:w,disabled:S}),p&&(0,Q.jsx)(E,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),y&&(0,Q.jsx)(Wt,{onClick:T,filled:!0})]})]})})}var vn=`default`;function yn(){let e=Ft(),i=u(),{data:o}=d({...J({path:{assistant_id:e}}),staleTime:3e4}),s=W({onSuccess:t=>{X(i,{path:{assistant_id:e}},t)}}),c=mn(),l=(0,Z.useMemo)(()=>o?o.services?.[`web-fetch`]?.provider||r(`vellum:ai:webFetchProvider`,vn):r(Ke,vn),[o]),[f,p]=(0,Z.useState)(!1),[m,h]=fn(l),[g,_]=(0,Z.useState)(``),v=vt.has(m),{hasStoredCredential:y}=St({assistantId:e,credentialKind:`api_key`,credentialName:m,enabled:v}),b=g.trim().length>0,x=f||v&&!y&&!b||m===l&&!b,S=Fe(it[m]??`Enter your API key`,y),C=(0,Z.useCallback)(async()=>{p(!0);let t=g.trim(),r=v&&t.length>0;try{r&&await c(m,t),await s.mutateAsync({path:{assistant_id:e},body:{services:{"web-fetch":{provider:m}}}}).catch(e=>{throw I.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e})}catch{p(!1);return}p(!1);try{if(n(Ke,m),r){let r=Ue(m);r&&n(r,t);let a=Ae(e,`api_key`,m);i.setQueryData(a,!0),i.invalidateQueries({queryKey:a}),_(``)}I.success(`Web fetch settings saved.`)}catch(e){a(e,{context:`settings-ai-web-fetch-persist-local`}),I.error(`Saved, but local preferences could not be written.`)}},[v,s,c,i,e,g,m]),w=(0,Z.useCallback)(()=>{let e=Ue(m);e&&t(e),_(``),h(vn),n(Ke,vn)},[m,h]);return(0,Q.jsx)(Vt,{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)(R,{value:m,onChange:h,options:yt.map(e=>({value:e,label:gt[e]??e}))})]}),v&&(0,Q.jsx)(N,{label:`API Key`,type:`password`,value:g,onChange:e=>_(e.target.value),placeholder:S,fullWidth:!0}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:C,disabled:x}),f&&(0,Q.jsx)(E,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),v&&(0,Q.jsx)(Wt,{onClick:w,filled:!0})]})]})})}function bn({subdomain:e,onSubdomainChange:t,domainSuffix:n,subdomainPlaceholder:r=`my-assistant`,disabled:i,autoFocus:a,prefix:o,error:s,locked:c,lockedMessage:l}){return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{className:`flex h-9 w-full items-center rounded-md border bg-[var(--field-bg)] text-body-medium-lighter transition-[border-color] duration-150 ${s?`border-[var(--system-negative-strong)]`:`border-[var(--field-border)] focus-within:border-[var(--border-active)]`}`,children:[o,(0,Q.jsx)(`input`,{value:e,onChange:e=>t(e.target.value.toLowerCase().trim()),disabled:i||c,readOnly:c,autoFocus:a,placeholder:r,"aria-label":`Subdomain`,"aria-invalid":!!s,className:`h-full min-w-0 flex-1 bg-transparent ${o?`pl-1.5`:`pl-3`} pr-1 text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none disabled:cursor-not-allowed disabled:opacity-60`}),(0,Q.jsxs)(`span`,{className:`shrink-0 pr-3 font-mono text-[var(--content-secondary)]`,children:[`.`,n]})]}),s&&(0,Q.jsx)(`p`,{className:`mt-1.5 text-body-small-default text-[var(--system-negative-strong)]`,children:s}),c&&l&&(0,Q.jsx)(`p`,{className:`mt-1.5 text-body-small-default text-[var(--content-tertiary)]`,children:l})]})}function xn({assistantId:e,assistantHandle:t,emailRootDomain:n}){let r=u(),i=l(),[o,p]=c(),[m,h]=(0,Z.useState)(``),[g,_]=(0,Z.useState)(!1),[v,y]=(0,Z.useState)(null),[b,x]=(0,Z.useState)(``),[C,w]=(0,Z.useState)(null),[T,D]=(0,Z.useState)(!1),[O,A]=(0,Z.useState)(!1),[j,M]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{g||!t||m||(h(t),_(!0))},[t,g,m]);let N=d({...he(),enabled:!0}),P=N.data,F=P?.entitlements,R=F?.managed_email===!0,z=!!F&&!R,B=!P&&N.isError&&!N.isFetching,V=d({...me({path:{assistant_id:e}}),enabled:!z}),ee=d({...Ce({path:{assistant_id:e}}),enabled:!z}),H=V.data?.results?.[0],U=ee.data?.results?.[0],te=H?`${H.subdomain}.${n}`:null,W=d({...ye({path:{assistant_id:e,id:U?.id??``}}),enabled:!!U?.id,refetchOnWindowFocus:!1}),G=d({...Te({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||(A(!0),p(e=>{let t=new URLSearchParams(e);return t.delete(`release`),t},{replace:!0}))},[U,H,o,p]);let K=f(Se()),q=f(we()),ne=f(ge()),J=f(_e()),Y=(0,Z.useCallback)(()=>{let t={assistant_id:e};r.invalidateQueries({queryKey:be({path:t})}),r.invalidateQueries({queryKey:xe({path:t})}),U?.id&&r.invalidateQueries({queryKey:ve({path:{...t,id:U.id}})}),r.invalidateQueries({queryKey:De()})},[U?.id,e,r]),re=(0,Z.useCallback)(async()=>{let t=m.trim().toLowerCase();if(!t){y(`Enter a subdomain.`);return}D(!1);try{await K.mutateAsync({path:{assistant_id:e},body:{subdomain:t}}),h(``),y(null),Y(),I.success(`Domain ${t}.${n} registered.`)}catch(e){y(de(e,void 0,`Failed to register domain.`))}},[e,n,Y,K,m]),ie=(0,Z.useCallback)(async()=>{let t=b.trim().toLowerCase();if(!t){w(`Enter an email username.`);return}try{await ne.mutateAsync({path:{assistant_id:e},body:{username:t}}),x(``),w(null),Y(),I.success(`Email address created.`)}catch(e){w(de(e,void 0,`Failed to create email address.`))}},[e,Y,ne,b]),ae=(0,Z.useCallback)(async()=>{if(U?.id){M(!1);try{await J.mutateAsync({path:{assistant_id:e,id:U.id}}),Y(),I.success(`Email address removed.`)}catch(e){a(e,{context:`email_address_delete`}),I.error(`Failed to remove email address.`)}}},[U?.id,e,J,Y]),oe=(0,Z.useCallback)(async()=>{if(!H?.id)return;if(U){I.error(`Remove the email address first.`);return}A(!1);let t=H.subdomain;try{await q.mutateAsync({path:{assistant_id:e,id:H.id}}),h(t),Y(),I.success(`Domain released.`)}catch(e){a(e,{context:`email_domain_release`}),I.error(`Failed to release domain.`)}},[U,e,q,H?.id,H?.subdomain,Y]);if(N.isLoading)return(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,Q.jsx)(E,{className:`h-4 w-4 animate-spin`}),`Checking subscription…`]});if(z)return(0,Q.jsxs)(k,{tone:`info`,icon:(0,Q.jsx)(S,{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(`${fe.settings.usage}?tab=billing&adjust_plan`),children:`Upgrade to Pro`}),children:[`Pro plans include a managed`,` `,`<your-subdomain>.${n}`,` inbox — no provider setup required. Or switch to `,(0,Q.jsx)(`strong`,{children:`Your Own`}),` to bring an existing provider.`]});let X=B?(0,Q.jsx)(k,{tone:`warning`,title:`Couldn't verify subscription status`,actions:(0,Q.jsx)(s,{size:`compact`,variant:`outlined`,onClick:()=>N.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:[X,(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)(Ut,{status:G.data?.status,message:G.data?.message,isLoading:G.isLoading}),(0,Q.jsx)(s,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,Q.jsx)(Dt,{}),onClick:()=>M(!0),disabled:J.isPending,"aria-label":`Remove email address`})]}),(0,Q.jsx)(L,{open:j,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:ae,onCancel:()=>M(!1)})]}),W.data?.usage&&(0,Q.jsxs)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:[W.data.usage.sent_today,` /`,` `,W.data.usage.daily_limit,` sent today ·`,` `,W.data.usage.received_today,` received`]})]}):(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[X,(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)(Ut,{status:G.data?.status,message:G.data?.message,isLoading:G.isLoading}),(0,Q.jsx)(s,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,Q.jsx)(Dt,{}),onClick:()=>A(!0),disabled:q.isPending,"aria-label":`Release domain`})]}),(0,Q.jsx)(L,{open:O,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:oe,onCancel:()=>A(!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 ${C?`border-[var(--system-negative-strong)]`:`border-[var(--field-border)] focus-within:border-[var(--border-active)]`}`,children:[(0,Q.jsx)(`input`,{value:b,onChange:e=>{x(e.target.value.toLowerCase()),C&&w(null)},placeholder:`hi`,"aria-label":`Email username`,"aria-invalid":!!C,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:[`@`,te]})]}),(0,Q.jsx)(s,{onClick:ie,disabled:ne.isPending||!b.trim(),children:ne.isPending?`Creating…`:`Create`})]}),C&&(0,Q.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:C})]})]}):(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[X,(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Subdomain`}),(0,Q.jsx)(bn,{subdomain:m,onSubdomainChange:e=>{h(e),v&&y(null)},domainSuffix:n,subdomainPlaceholder:`my-assistant`,error:v}),(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:()=>D(!0),disabled:K.isPending||!m.trim(),children:K.isPending?`Registering…`:`Register`}),(0,Q.jsx)(L,{open:T,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:re,onCancel:()=>D(!1)})]})}function Sn(){let e=Ft(),t=pe(),{data:o}=d({...Ee(),enabled:t}),s=o?.results?.[0]?.handle,c=Lt.use.emailRootDomain(),l=Nt(),[u,f]=(0,Z.useState)(()=>l===`gated`?`your-own`:mt(r(tt,`managed`),`managed`)),[p,m]=(0,Z.useState)(()=>{let e=r(Ie,`resend`);return e===`mailgun`||e===`resend`?e:`resend`}),h=d({queryKey:[`byoEmailCredential`,e,p],queryFn:async()=>{let{data:t}=await U({path:{assistant_id:e},body:{service:p,field:`api_key`},throwOnError:!0});return t},enabled:u===`your-own`||l===`gated`,staleTime:6e4,retry:i,meta:{errorContext:`byo_email_credential_check`}});(0,Z.useEffect)(()=>{h.error&&a(h.error,{context:`byo_email_credential_check`,bestEffort:!0})},[h.error]);let g=h.data?.hasSecret===!0,_=(0,Z.useCallback)(e=>{f(e),n(tt,e)},[]),v=(0,Z.useCallback)(()=>{n(Ie,p),I.success(`Email settings saved.`)},[p]),y=(0,Z.useMemo)(()=>Pt.find(e=>e.id===p)??Pt[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)(w,{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 `,y.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:y.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:y.docsUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[`Open `,y.displayName,(0,Q.jsx)(C,{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)(R,{value:p,onChange:e=>{(e===`mailgun`||e===`resend`)&&m(e)},options:Pt.map(e=>({value:e.id,label:e.displayName}))})]}),g?(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)(b,{className:`h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}),(0,Q.jsxs)(`span`,{children:[y.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:y.setupSkill}),` `,`skill.`]})]}),(0,Q.jsxs)(`a`,{href:y.docsUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-body-small-default text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[`Open `,y.displayName,(0,Q.jsx)(C,{className:`h-3 w-3`})]})]}):x,(0,Q.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,Q.jsx)($,{onClick:v,disabled:!1})})]});return l===`gated`?(0,Q.jsx)(Vt,{id:`email`,title:`Email`,subtitle:`Configure how your assistant sends and receives email`,children:S}):(0,Q.jsx)(Bt,{id:`email`,title:`Email`,subtitle:`Configure how your assistant sends and receives email`,mode:u,onModeChange:_,children:u===`managed`?(0,Q.jsx)(`div`,{className:`space-y-4`,children:l===`disabled`?(0,Q.jsx)(He,{children:`Log in to the Vellum platform to manage email settings.`}):(0,Q.jsx)(xn,{assistantId:e,assistantHandle:s,emailRootDomain:c})}):S})}function Cn(){let e=Ft(),t=u(),{data:i}=d({...J({path:{assistant_id:e}}),staleTime:3e4}),o=W({onSuccess:n=>{X(t,{path:{assistant_id:e}},n)}}),s=mn(),[c,l]=fn((0,Z.useMemo)(()=>mt(i?i.services?.[`image-generation`]?.mode??r(`vellum:ai:imageGenMode`,`your-own`):r(Tt,`your-own`),`your-own`),[i])),[f,p]=(0,Z.useState)(()=>r(je,`gemini-3.1-flash-image-preview`)),[m,h]=(0,Z.useState)(``),[g,_]=(0,Z.useState)(!1),v=(0,Z.useCallback)(async()=>{_(!0);let r=m.trim(),i=c===`your-own`&&r.length>0;try{i&&await s(ht(f),r),await o.mutateAsync({path:{assistant_id:e},body:{services:{"image-generation":{mode:c}}}}).catch(e=>{throw I.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e});try{await te({path:{assistant_id:e},body:{modelId:f},throwOnError:!0})}catch(e){throw I.error(`Failed to update image generation model. Please try again.`),a(e,{context:`set_image_gen_model`}),e}finally{t.invalidateQueries({queryKey:ie({path:{assistant_id:e}})})}}catch{_(!1);return}_(!1);try{n(Tt,c),n(je,f),i&&h(``),I.success(`Image generation settings saved.`)}catch(e){a(e,{context:`settings-ai-image-gen-persist-local`}),I.error(`Saved, but local preferences could not be written.`)}},[m,c,f,e,o,s,t]),y=(0,Z.useCallback)(()=>{h(``),p(`gemini-3.1-flash-image-preview`),n(je,`gemini-3.1-flash-image-preview`)},[]);return(0,Q.jsx)(Bt,{title:`Image Generation`,subtitle:`Configure which model your assistant uses to generate images`,mode:c,onModeChange:e=>l(e),children:c===`managed`?(0,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)(R,{className:`flex-1`,value:f,onChange:p,options:st.map(e=>({value:e,label:Pe[e]??e}))}),(0,Q.jsx)($,{onClick:v,disabled:g}),g&&(0,Q.jsx)(E,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]}):(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsx)(N,{label:`API Key`,type:`password`,value:m,onChange:e=>h(e.target.value),placeholder:ht(f)===`openai`?`Enter your OpenAI API key`:`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)(R,{value:f,onChange:p,options:st.map(e=>({value:e,label:Pe[e]??e}))})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:v,disabled:g}),g&&(0,Q.jsx)(E,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),(0,Q.jsx)(Wt,{onClick:y})]})]})})}async function wn(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 Tn(n,r,i):t===`deepgram`?await En(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 Tn(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 Dn(i,`ElevenLabs rejected the request.`)}}async function En(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 Dn(n,`Deepgram rejected the request.`)}}async function Dn(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({assistantId:e,value:t,onChange:n,className:r}){let[i,a]=(0,Z.useState)(!1),{voices:o}=at(e);if(o.length===0)return null;let s=o.find(e=>e.model===t)??o[0];return(0,Q.jsxs)(M.Root,{open:i,onOpenChange:a,children:[(0,Q.jsx)(M.Trigger,{asChild:!0,children:(0,Q.jsxs)(`button`,{type:`button`,"aria-label":`Voice`,className:m(`flex h-9 w-full items-center gap-2 rounded-md border border-[var(--field-border)] bg-[var(--field-bg)] px-3 text-left text-body-medium-lighter text-[var(--content-default)] transition-colors focus:outline-none data-[state=open]:border-[var(--border-active)]`,r),children:[(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:s?bt(s.description):`Select a voice`}),(0,Q.jsx)(v,{className:`h-3.5 w-3.5 shrink-0 text-[var(--content-tertiary)]`,"aria-hidden":!0})]})}),(0,Q.jsx)(M.Content,{side:`bottom`,align:`start`,className:`w-[var(--radix-popover-trigger-width)] p-1`,children:(0,Q.jsx)(_t,{assistantId:e,value:t,onChange:n,onSelect:()=>a(!1),showSource:!0})})]})}var kn={elevenlabs:`voiceId`,"fish-audio":`referenceId`,xai:`voiceId`};function An({assistantId:e,hideSaveButton:t=!1,hideCredentialsGuide:i=!1,onSaveStateChange:a}={}){let o=Ft(),c=e??o,l=se.use.name()??`your assistant`,f=pe(),p=u(),{data:m}=d({...G({path:{assistant_id:c}}),enabled:f,staleTime:1/0}),h=(0,Z.useMemo)(()=>{let e=m?.providers;if(!e)return dt;if(e.some(e=>e.id===`vellum`))return e;let t=dt.find(e=>e.id===`vellum`);return t?[t,...e]:e},[m]),{data:g}=d({...J({path:{assistant_id:c}}),enabled:f,staleTime:3e4}),_=g?.services?.tts,v=_?.mode===`managed`?`vellum`:_?.provider,y=`elevenlabs`,b=(0,Z.useMemo)(()=>v??r(`vellum:voice:ttsProvider`,y),[v,y]),x=!!v,[S,C]=fn(b),[w,E]=(0,Z.useState)(``),[O,k]=(0,Z.useState)(``),[A,j]=(0,Z.useState)(``),[M,P]=(0,Z.useState)(!1),[F,L]=(0,Z.useState)(!1),[z,B]=(0,Z.useState)(!1),{voices:V,defaultModel:U,fetched:te}=ke(c,{enabled:S===`vellum`}),W=_?.providers?.vellum?.model??U??``,[K,q]=fn(W),ne=V.find(e=>e.model===K)??V[0],[Y,re]=(0,Z.useState)(null),ae=V.some(e=>e.model===W),oe=Y??(te&&W!==``&&!ae),X=(0,Z.useMemo)(()=>h.find(e=>e.id===S)??h[0],[S,h]),ce=S===`vellum`&&X.supportsVoiceSelection&&K.trim()!==``&&K.trim()!==W,le=(0,Z.useCallback)(e=>{let t=r($e+e,``),n=r(ze+e,``);P(t.length>0),k(n),j(n),E(``)},[]);(0,Z.useEffect)(()=>{le(S)},[S,le]);let ue=(0,Z.useMemo)(()=>{let e=S!==b,t=w.trim().length>0,n=O.trim()!==A;return e||t||n||ce},[S,b,w,O,A,ce]),de=(0,Z.useCallback)(async()=>{let e=w.trim(),t=O.trim(),i=X.id;n(rt,i),e.length>0&&n($e+i,e),n(ze+i,t);let a=e.length>0?e:r($e+i,``),o=kn[i];B(!0);try{if(a.length>0){let{response:e}=await ee({path:{assistant_id:c},body:{service:i,field:`api_key`,value:a,label:`${X.displayName} API Key`},throwOnError:!1});if(!e?.ok)throw Error(`Failed to store API key (HTTP ${e?.status??`?`})`)}let e={...S!==b||!x?{provider:i,mode:i===`vellum`?`managed`:`your-own`}:{},...o?{providers:{[i]:{[o]:t}}}:{},...ce?{providers:{vellum:{model:K.trim()}}}:{}};if(Object.keys(e).length>0){let{response:t}=await H({path:{assistant_id:c},body:{services:{tts:e}},throwOnError:!1});if(!t?.ok)throw Error(`Failed to save configuration (HTTP ${t?.status??`?`})`)}return P(a.length>0),j(t),E(``),p.invalidateQueries({queryKey:ie({path:{assistant_id:c}})}),I.success(`Text-to-speech settings saved`),!0}catch(e){return I.error(e instanceof Error?e.message:`Failed to save text-to-speech settings`),!1}finally{B(!1)}},[c,S,K,ce,w,O,X,b,x,p]);(0,Z.useEffect)(()=>{a?.({hasChanges:ue,saving:z,save:de})},[a,ue,z,de]);let fe=(0,Z.useCallback)(()=>{n($e+S,``),P(!1),E(``)},[S]),me=(0,Z.useCallback)(async()=>{L(!0);try{let e=r($e+S,``),t=w.trim(),n=t.length>0?t:e;if(n.length===0){I.error(`Save an API key for this provider before testing.`);return}let i=r(ze+S,``),a=O.trim(),o=await wn({provider:S,apiKey:n,voiceId:a.length>0?a:i,text:`Hey! It's ${l}. How does this sound?`});if(o.kind!==`audio`){I.error(o.message);return}let s=URL.createObjectURL(o.blob);try{let e=new Audio(s);await e.play(),await new Promise(t=>{e.onended=()=>t(),e.onerror=()=>t()})}finally{URL.revokeObjectURL(s)}}finally{L(!1)}},[l,w,S,O]),he=M?`•••••••• (Enter a new key to replace)`:X.apiKeyPlaceholder,ge=S===`vellum`,_e=ge&&X.supportsVoiceSelection,ve=(0,Q.jsxs)(s,{variant:`link`,size:`compact`,className:`inline-flex h-auto items-center gap-1 px-0 underline [--vbtn-fg:var(--content-tertiary)]`,onClick:()=>re(!0),children:[(0,Q.jsx)(D,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),`Enter a custom voice ID`]}),ye=(0,Q.jsxs)(s,{variant:`link`,size:`compact`,className:`inline-flex h-auto items-center gap-1 px-0 underline [--vbtn-fg:var(--content-tertiary)]`,onClick:()=>{re(!1),V.some(e=>e.model===K)||q(U||V[0]?.model||``)},children:[(0,Q.jsx)(T,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),`Choose from catalog`]}),be=_e?oe?V.length>0?ye:null:te?ve:null:null;return(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)(R,{value:S,onChange:C,options:h.map(e=>({value:e.id,label:e.displayName})),"aria-label":`TTS provider`})]}),!ge&&(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)(N,{type:`password`,value:w,onChange:e=>E(e.target.value),placeholder:he,fullWidth:!0})]}),_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:`Voice`}),oe?(0,Q.jsx)(N,{type:`text`,value:K,onChange:e=>q(e.target.value),placeholder:`Enter a voice ID`,"aria-label":`Custom voice ID`,fullWidth:!0}):ne?(0,Q.jsx)(On,{assistantId:c,value:K,onChange:q}):te&&(0,Q.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`No managed voices are currently available.`})]}),X.supportsVoiceSelection&&!ge&&(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)(N,{type:`text`,value:O,onChange:e=>k(e.target.value),placeholder:`Enter a voice ID`,fullWidth:!0})]}),!i&&!ge&&(0,Q.jsx)(Gt,{guide:X.credentialsGuide}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[!ge&&(0,Q.jsx)(s,{variant:`outlined`,onClick:me,disabled:F,children:F?`Testing…`:`Test`}),(0,Q.jsxs)(`div`,{className:`ml-auto flex items-center gap-3`,children:[be,!t&&(0,Q.jsx)($,{onClick:de,disabled:!ue||z}),M&&!ge&&(0,Q.jsx)(Wt,{onClick:fe})]})]})]})}function jn(){return(0,Q.jsx)(Vt,{id:`text-to-speech`,title:`Text-to-Speech`,subtitle:`Configure how your assistant speaks`,children:(0,Q.jsx)(An,{})})}var Mn={vellum:{provider:`vellum`},deepgram:{provider:`deepgram`,credentialService:`deepgram`},openai:{provider:`openai-whisper`,credentialService:`openai`}},Nn={vellum:`vellum`,deepgram:`deepgram`,"openai-whisper":`openai`},Pn=`deepgram`;function Fn({assistantId:e,hideSaveButton:t=!1,hideCredentialsGuide:i=!1,onSaveStateChange:a}={}){let o=Ft(),s=e??o,c=pe(),l=u(),[f]=(0,Z.useState)(()=>We.filter(e=>!e.requiresNativeDictation||Ve())),p=Pn,{data:m}=d({...J({path:{assistant_id:s}}),enabled:c,staleTime:3e4}),h=m?.services?.stt,g=h?.mode===`managed`?`vellum`:h?.provider,_=(0,Z.useMemo)(()=>{let e=g?Nn[g]:void 0;if(e&&f.some(t=>t.id===e))return e;let t=r(Ze,p);return f.some(e=>e.id===t)?t:p},[g,f,p]),v=!!g,[y,b]=fn(_),[x,S]=(0,Z.useState)(``),[C,w]=(0,Z.useState)(!1),[T,E]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{let e=r(Ze,p);e===`macos-native`&&!f.some(t=>t.id===e)&&n(Ze,p)},[f,p]);let D=(0,Z.useMemo)(()=>f.find(e=>e.id===y)??f[0],[f,y]),k=D.apiKeyPlaceholder!==void 0;(0,Z.useEffect)(()=>{w(r(Ct+y,``).length>0),S(``)},[y]);let A=(0,Z.useMemo)(()=>{let e=y!==_,t=x.trim().length>0;return e||t},[y,_,x]),j=(0,Z.useCallback)(async()=>{let e=x.trim();n(Ze,y),e.length>0&&n(Ct+y,e);let t=Mn[y];E(!0);try{if(t?.credentialService){let n=e.length>0?e:r(Ct+y,``);if(n.length>0){let{response:e}=await ee({path:{assistant_id:s},body:{service:t.credentialService,field:`api_key`,value:n,label:`${D.displayName} API Key`},throwOnError:!1});if(!e?.ok)throw Error(`Failed to store API key (HTTP ${e?.status??`?`})`)}}if(t&&(y!==_||!v)||g===`vellum`&&y!==`vellum`){let e=t?.provider??Pn,{response:n}=await H({path:{assistant_id:s},body:{services:{stt:{provider:e,mode:e===`vellum`?`managed`:`your-own`}}},throwOnError:!1});if(!n?.ok)throw Error(`Failed to save configuration (HTTP ${n?.status??`?`})`)}return e.length>0&&w(!0),S(``),l.invalidateQueries({queryKey:ie({path:{assistant_id:s}})}),I.success(`Speech-to-text settings saved`),!0}catch(e){return I.error(e instanceof Error?e.message:`Failed to save speech-to-text settings`),!1}finally{E(!1)}},[s,y,x,D,_,v,g,l]);(0,Z.useEffect)(()=>{a?.({hasChanges:A,saving:T,save:j})},[a,A,T,j]);let M=(0,Z.useCallback)(()=>{n(Ct+y,``),w(!1),S(``)},[y]),P=C?`•••••••• (Enter a new key to replace)`:D.apiKeyPlaceholder;return(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)(R,{value:y,onChange:b,options:f.map(e=>({value:e.id,label:e.displayName})),"aria-label":`STT provider`})]}),k&&(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)(N,{type:`password`,value:x,onChange:e=>S(e.target.value),placeholder:P,fullWidth:!0})]}),D.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)(O,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--system-mid-strong)]`}),(0,Q.jsx)(`span`,{children:D.setupWarning})]}),!i&&D.credentialsGuide&&(0,Q.jsx)(Gt,{guide:D.credentialsGuide}),y===`vellum`&&(0,Q.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Transcription runs through your Vellum account.`}),(!t||C)&&(0,Q.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[!t&&(0,Q.jsx)($,{onClick:j,disabled:!A||T}),C&&(0,Q.jsx)(Wt,{onClick:M})]})]})}function In(){return(0,Q.jsx)(Vt,{title:`Speech-to-Text`,subtitle:`Configure how your assistant transcribes speech`,children:(0,Q.jsx)(Fn,{})})}function Ln(){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.jsx)(Ht,{}),(0,Q.jsx)(pn,{}),(0,Q.jsx)(_n,{}),(0,Q.jsx)(yn,{}),(0,Q.jsx)(Sn,{}),(0,Q.jsx)(Cn,{}),(0,Q.jsx)(jn,{}),(0,Q.jsx)(In,{})]})}export{Ln as AiPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{n as r,r as i}from"./avatar-svg-compositor-
|
|
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{n as r,r as i}from"./avatar-svg-compositor-bbw1dNjP.js";import{t as a}from"./use-reduced-motion-BFUnQDmb.js";var o=e(t(),1),s=n();function c(e,t){return e+Math.random()*(t-e)}function l(e){let t=[],n=/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,r;for(;(r=n.exec(e))!==null;)t.push(parseFloat(r[0]));return t}function u(e){let t=l(e),n=0,r=0,i=0;for(let e=0;e<t.length-1;e+=2)n+=t[e],r+=t[e+1],i++;return i>0?{x:n/i,y:r/i}:{x:0,y:0}}function d(e,t,n){let r=u(e),i=t*1.1;return e.replace(/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,(t,a)=>{let o=parseFloat(t),s=e.slice(0,a).match(/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi),c=s?s.length:0,u=c%2==0,d=u?r.x:r.y,f=l(e),p=u?c+1:c-1,m=p>=0&&p<f.length?f[p]:d,h=u?o:m,g=Math.atan2((u?m:o)-r.y,h-r.x),_=1+(Math.sin(g*2+i)*.7+Math.sin(g*3-i*.5)*.3)*n;return(d+(o-d)*_).toFixed(3)})}function f(e,t,n){let r=[e];for(let i=1;i<t;i++)r.push(d(e,i,n));return r}function p({components:e,traits:t,size:n,isAssistantBusy:l=!1,breathe:u=!0}){let d=a(),{bodyShape:p,eyeStyle:m,color:h}=i(e,t.bodyShape,t.eyeStyle,t.color),{bodyTransform:g,eyeTransform:_}=r(p,m,e,n),v=m.sourceViewBox,y=p.viewBox,b=Math.min(n/y.width,n/y.height),x=(n-y.width*b)/2,S=(n-y.height*b)/2,C=Math.min(y.width/v.width,y.height/v.height),w=e.faceCenterOverrides.find(e=>e.bodyShape===p.id&&e.eyeStyle===m.id),T=w?w.faceCenter:p.faceCenter,E=T.x-m.eyeCenter.x*C,D=T.y-m.eyeCenter.y*C,O=b*(E+m.eyeCenter.x*C)+x,k=b*(D+m.eyeCenter.y*C)+S,A=(0,o.useMemo)(()=>l?f(p.svgPath,16,.06):[p.svgPath],[p.svgPath,l]),[j,M]=(0,o.useState)(!1),[N,P]=(0,o.useState)(0),[F,I]=(0,o.useState)(0),L=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(d||l){M(!1);return}let e=!1;function t(){return setTimeout(()=>{e||(M(!0),setTimeout(()=>{e||(M(!1),Math.random()<.2?setTimeout(()=>{e||(M(!0),setTimeout(()=>{e||(M(!1),t())},150))},200):t())},150))},c(3e3,7e3))}let n=t();return()=>{e=!0,clearTimeout(n)}},[d,l]),(0,o.useEffect)(()=>{if(d||l){P(0);return}let e=!1;function t(){return setTimeout(()=>{e||(P((Math.random()<.5?-1:1)*c(1,2)),setTimeout(()=>{e||(P(0),t())},200))},c(8e3,15e3))}let n=t();return()=>{e=!0,clearTimeout(n)}},[d,l]),(0,o.useEffect)(()=>{if(!l||d){I(0);return}let e=0;return L.current=setInterval(()=>{e=(e+1)%A.length,I(e)},150),()=>{L.current&&clearInterval(L.current),L.current=null}},[l,d,A.length]);let R=n/2,z=n/2,B=d?`none`:l?`avatar-morph-scale 2.4s ease-in-out infinite, avatar-morph-rotate 3s ease-in-out infinite`:u?`avatar-breathe-kf 4s ease-in-out infinite`:`none`,V=l?0:N,H=j&&!l,U=A[F]??p.svgPath;return(0,s.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:n,height:n,viewBox:`0 0 ${n} ${n}`,style:{animation:B,transformOrigin:`center`},children:[(0,s.jsx)(`g`,{style:{transform:`rotate(${V}deg)`,transformOrigin:`${R}px ${z}px`,transition:V===0?`transform 0.3s ease-out`:`transform 0.2s ease-in-out`},children:(0,s.jsx)(`path`,{d:U,fill:h.hex,transform:g,style:{transition:l?`d 0.3s ease-in-out`:`none`}})}),(0,s.jsx)(`g`,{style:{transform:H?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${O}px ${k}px`,transition:`transform 0.15s ease-in-out`},children:m.paths.map((e,t)=>(0,s.jsx)(`path`,{d:e.svgPath,fill:e.color,transform:_},t))})]})}export{p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./chunk-jRWAZmH_.js";import{B as t,F as n,G as r,H as i,I as ee,J as a,K as o,L as s,R as te,U as c,V as ne,W as l,X as re,Y as u,Z as ie,q as d,z as f}from"./local-mode-Dad5eO5y.js";function p(e){return ie(ee,e)}function ae(e){return re(n,e)}var oe=s([`end_turn`,`max_tokens`,`max_turn_requests`,`refusal`,`cancelled`]),se=l({type:i(`acp_session_completed`),acpSessionId:d(),stopReason:oe}).strict(),ce=l({type:i(`acp_session_error`),acpSessionId:d(),error:d()}).strict(),le=l({type:i(`acp_session_spawned`),acpSessionId:d(),agent:d(),parentConversationId:d(),parentToolUseId:d().optional(),task:d().optional()}).strict(),ue=s([`agent_message_chunk`,`agent_thought_chunk`,`user_message_chunk`,`tool_call`,`tool_call_update`,`plan`]),de=l({type:i(`acp_session_update`),acpSessionId:d(),updateType:ue,content:d().optional(),toolCallId:d().optional(),toolTitle:d().optional(),toolKind:d().optional(),toolStatus:d().optional(),rawInput:u().optional(),rawOutput:u().optional(),locations:f(l({path:d(),line:c().optional()})).optional(),messageId:d().optional(),seq:c().optional()}).strict(),fe=l({type:i(`acp_session_usage`),acpSessionId:d(),usedTokens:c(),contextSize:c(),inputTokens:c().optional(),outputTokens:c().optional(),costAmount:c().optional(),costCurrency:d().optional()}).strict(),pe=s([`idle`,`thinking`,`streaming`,`tool_running`,`awaiting_confirmation`]),me=s([`assistant_turn`,`user_turn`,`global`]),he=s([`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`]),ge=l({type:i(`assistant_activity_state`),conversationId:d(),activityVersion:c(),phase:pe,anchor:me,reason:he,requestId:d().optional(),statusText:d().optional()}),_e=l({type:i(`assistant_text_delta`),text:d(),messageId:d().optional(),conversationId:d().optional()}),ve=l({type:i(`assistant_thinking_delta`),thinking:d(),messageId:d().optional(),conversationId:d().optional(),timestampMs:c().optional()}),ye=l({type:i(`assistant_turn_start`),messageId:d(),conversationId:d().optional()}),be=l({type:i(`avatar_updated`),avatarPath:d()}),xe=l({type:i(`background_tool_completed`),id:d(),conversationId:d(),status:s([`completed`,`failed`,`cancelled`]),exitCode:c().nullable().optional(),output:d().optional(),completedAt:c()}),Se=l({type:i(`background_tool_started`),id:d(),toolName:d(),conversationId:d(),command:d(),startedAt:c()}),Ce=l({id:d(),messageId:d(),conversationId:d(),conversationTitle:d().nullable(),messagePreview:d(),messageRole:d(),messageCreatedAt:c(),createdAt:c()}),we=l({type:i(`bookmark.created`),bookmark:Ce}),Te=l({type:i(`bookmark.deleted`),messageId:d()}),Ee=l({type:i(`client_settings_update`),key:d(),value:d()}),De=l({type:i(`compaction_circuit_closed`),conversationId:d()}),Oe=l({type:i(`compaction_circuit_open`),conversationId:d(),reason:i(`3_consecutive_failures`),openUntil:c()}),ke=l({type:i(`config_changed`)}),m=l({label:d(),description:d(),pattern:d()}),h=l({label:d(),scope:d()}),g=l({label:d(),scope:d()}),_=l({filePath:d(),oldContent:d(),newContent:d(),isNewFile:t()}),Ae=s([`allow_once`,`allow_always`,`reject_once`,`reject_always`]),je=l({optionId:d(),name:d(),kind:Ae}),Me=s([`sandbox`,`host`]),Ne=l({type:i(`confirmation_request`),requestId:d(),toolName:d(),input:o(d(),u()),riskLevel:d(),riskReason:d().optional(),isContainerized:t().optional(),executionTarget:Me.optional(),allowlistOptions:f(m),scopeOptions:f(h),directoryScopeOptions:f(g).optional(),diff:_.optional(),conversationId:d().optional(),persistentDecisionsAllowed:t().optional(),toolUseId:d().optional(),acpToolKind:d().optional(),acpOptions:f(je).optional()}),Pe=l({type:i(`contact_request`),requestId:d(),channel:d().optional(),placeholder:d().optional(),label:d().optional(),description:d().optional(),role:d().optional()}),v=l({type:i(`contacts_changed`)}),y=s([`PROVIDER_NETWORK`,`PROVIDER_RATE_LIMIT`,`MANAGED_USAGE_LIMIT`,`PROVIDER_OVERLOADED`,`PROVIDER_API`,`IMAGE_TOO_LARGE`,`PROVIDER_BILLING`,`PROVIDER_ORDERING`,`PROVIDER_WEB_SEARCH`,`PROVIDER_NOT_CONFIGURED`,`PROVIDER_INVALID_KEY`,`MANAGED_KEY_INVALID`,`CONTEXT_TOO_LARGE`,`BUDGET_YIELD_UNRECOVERED`,`MAX_TOKENS_REACHED`,`CONVERSATION_ABORTED`,`CONVERSATION_PROCESSING_FAILED`,`DISK_SPACE_CRITICAL`,`UNKNOWN`]),b=l({type:i(`conversation_error`),conversationId:d(),code:y,userMessage:d(),retryable:t(),debugDetails:d().optional(),errorCategory:d().optional(),connectionName:d().optional(),profileName:d().optional()}),Fe=s([`created`,`renamed`,`deleted`,`reordered`,`seen_changed`]),Ie=l({type:i(`conversation_list_invalidated`),reason:Fe}),Le=s([`memory_v3`]),Re=l({type:i(`conversation_notice`),conversationId:d(),source:Le,code:y,userMessage:d(),errorCategory:d().optional()}),ze=l({type:i(`conversation_title_updated`),conversationId:d(),title:d()}),Be=s([`disabled`,`ok`,`warning`,`critical`,`unknown`]),Ve=s([`agent-turns`,`background-work`,`remote-ingress`]),x=l({enabled:t(),state:Be,locked:t(),acknowledged:t(),overrideActive:t(),effectivelyLocked:t(),lockId:d().nullable(),usagePercent:c().nullable(),thresholdPercent:c(),path:d().nullable(),lastCheckedAt:d().nullable(),blockedCapabilities:f(Ve),error:d().nullable()}),He=l({type:i(`disk_pressure_status_changed`),status:x}),Ue=l({id:d(),surfaceId:d(),author:d(),content:d(),anchorStart:c().optional(),anchorEnd:c().optional(),anchorText:d().optional(),parentCommentId:d().optional(),status:d(),createdAt:c(),updatedAt:c()}),We=l({type:i(`document_comment_created`),conversationId:d(),surfaceId:d(),comment:Ue}),Ge=l({type:i(`document_comment_deleted`),conversationId:d(),surfaceId:d(),commentId:d()}),Ke=l({type:i(`document_comment_reopened`),conversationId:d(),surfaceId:d(),commentId:d()}),qe=l({type:i(`document_comment_resolved`),conversationId:d(),surfaceId:d(),commentId:d(),resolvedBy:d()}),Je=l({type:i(`document_editor_show`),conversationId:d(),surfaceId:d(),title:d(),initialContent:d()}),Ye=l({type:i(`document_editor_update`),conversationId:d(),surfaceId:d(),markdown:d(),mode:d()}),Xe=l({type:i(`error`),message:d(),code:d().optional(),category:d().optional(),errorCategory:d().optional(),requestId:d().optional(),conversationId:d().optional()}),Ze=l({type:i(`generation_cancelled`),conversationId:d().optional()}),S=l({id:d().optional(),filename:d(),mimeType:d(),data:d(),sourceType:s([`sandbox_file`,`host_file`,`tool_block`]).optional(),sizeBytes:c().optional(),thumbnailData:d().optional(),fileBacked:t().optional(),filePath:d().optional()}),Qe=l({type:i(`generation_handoff`),conversationId:d().optional(),requestId:d().optional(),queuedCount:c(),messageId:d().optional(),attachments:f(S).optional(),attachmentWarnings:f(d()).optional()}),$e=l({type:i(`home_feed_updated`),updatedAt:d(),newItemCount:c()}),et=l({kind:s([`plugin`,`workspace`]),id:d()}),tt=l({type:i(`hook_event`),conversationId:d().optional(),hookName:d(),owner:et,detail:o(d(),u())}),nt=l({type:i(`identity_changed`),name:d(),role:d(),personality:d(),emoji:d(),home:d()}),rt=s([`approved`,`rejected`,`answered`,`cancelled`,`superseded`]),it=l({type:i(`interaction_resolved`),requestId:d(),conversationId:d(),state:rt,kind:d()}),C=l({semanticUnavailable:t(),reason:d(),fallbackSources:f(d())}),at=l({key:d(),type:d(),kind:d(),finalScore:c(),semantic:c(),recency:c()}),ot=l({type:i(`memory_recalled`),provider:d(),model:d(),degradation:C.optional(),semanticHits:c(),tier1Count:c(),tier2Count:c(),hybridSearchLatencyMs:c(),sparseVectorUsed:t(),mergedCount:c(),selectedCount:c(),injectedTokens:c(),latencyMs:c(),topCandidates:f(at)}),st=l({type:i(`memory_status`),enabled:t(),degraded:t(),degradation:C.optional(),reason:d().optional(),provider:d().optional(),model:d().optional()}),ct=l({type:i(`message_complete`),messageId:d().optional(),conversationId:d().optional(),source:s([`main`,`aux`]).optional(),attachments:f(S).optional(),attachmentWarnings:f(d()).optional()}),lt=l({type:i(`message_dequeued`),conversationId:d(),requestId:d()}),ut=l({type:i(`message_queued`),conversationId:d(),requestId:d(),position:c()}),dt=l({type:i(`message_queued_deleted`),conversationId:d(),requestId:d()}),ft=l({type:i(`message_request_complete`),conversationId:d(),requestId:d(),runStillActive:t().optional()}),pt=l({type:i(`navigate_settings`),tab:d()}),mt=l({type:i(`notification_conversation_created`),conversationId:d(),title:d(),sourceEventName:d(),targetGuardianPrincipalId:d().optional(),groupId:d().optional(),source:d().optional(),silent:t().optional()}),ht=l({type:i(`notification_intent`),sourceEventName:d(),title:d(),body:d(),deliveryId:d().optional(),deepLinkMetadata:o(d(),u()).optional(),targetGuardianPrincipalId:d().optional(),silent:t().optional()}),gt=l({type:i(`open_conversation`),conversationId:d(),title:d().optional(),anchorMessageId:d().optional(),focus:t().optional()}),_t=l({type:i(`open_panel`),panelType:d(),data:o(d(),u()).optional(),conversationId:d().optional(),surfaceId:d().optional()}),vt=l({type:i(`open_url`),url:d().min(1),title:d().optional(),conversationId:d().optional()}),w=l({id:d(),label:d(),description:d().optional()}),T=l({id:d(),question:d(),description:d().optional(),options:f(w),freeTextPlaceholder:d().optional()}),yt=l({type:i(`question_request`),requestId:d(),questions:f(T),question:d(),description:d().optional(),options:f(w),freeTextPlaceholder:d().optional(),conversationId:d().optional(),toolUseId:d().optional()}),bt=l({captureScope:s([`display`,`window`]).optional(),displayId:d().optional(),windowId:c().optional(),includeAudio:t().optional(),includeMicrophone:t().optional(),promptForSource:t().optional()}),xt=l({type:i(`recording_start`),recordingId:d(),attachToConversationId:d().optional(),options:bt.optional(),operationToken:d().optional()}),St=l({type:i(`recording_stop`),recordingId:d()}),Ct=l({type:i(`recording_pause`),recordingId:d()}),wt=l({type:i(`recording_resume`),recordingId:d()}),Tt=l({type:i(`relationship_state_updated`),updatedAt:d()}),Et=l({type:i(`secret_request`),requestId:d(),service:d(),field:d(),label:d(),description:d().optional(),placeholder:d().optional(),conversationId:d().optional(),purpose:d().optional(),allowedTools:f(d()).optional(),allowedDomains:f(d()).optional(),allowOneTimeSend:t().optional()}),Dt=l({type:i(`service_group_update_complete`),installedVersion:d(),success:t(),rolledBackToVersion:d().optional()}),Ot=l({type:i(`service_group_update_progress`),statusMessage:d()}),kt=l({type:i(`service_group_update_starting`),targetVersion:d(),expectedDowntimeSeconds:c()}),At=l({type:i(`skills_state_changed`),name:d(),state:s([`enabled`,`disabled`,`installed`,`uninstalled`])}),jt=l({type:i(`sounds_config_updated`)}),Mt=l({type:d(),content:d().optional(),text:d().optional(),result:d().optional(),input:o(d(),u()).optional(),toolName:d().optional(),isError:t().optional(),toolUseId:d().optional()}).passthrough(),Nt=l({type:i(`subagent_event`),conversationId:d(),subagentId:d(),event:Mt}).strict(),Pt=l({type:i(`subagent_spawned`),subagentId:d(),parentConversationId:d(),label:d(),objective:d(),isFork:t().optional(),parentToolUseId:d().optional()}).strict(),E=s([`pending`,`running`,`awaiting_input`,`completed`,`failed`,`aborted`,`interrupted`]),D=l({inputTokens:c(),outputTokens:c(),estimatedCost:c()}).strict(),Ft=l({type:i(`subagent_status_changed`),subagentId:d(),status:E,error:d().optional(),usage:D.optional()}).strict(),It=l({type:i(`sync_changed`),tags:f(d().min(1)).min(1),originClientId:d().min(1).optional()}),Lt=s([`tool_start`,`tool_complete`,`status`]),Rt=l({type:i(`tool_output_chunk`),chunk:d(),conversationId:d().optional(),toolUseId:d().optional(),subType:Lt.optional(),subToolName:d().optional(),subToolInput:d().optional(),subToolIsError:t().optional(),subToolId:d().optional(),messageId:d().optional()}),zt=l({pattern:d(),label:d()}),Bt=s([`anthropic-native`,`brave`,`perplexity`,`tavily`,`firecrawl`]),Vt=s([`default`,`firecrawl`]),Ht=l({rank:c(),title:d(),url:d(),domain:d(),faviconUrl:d().optional(),snippet:d().optional(),age:d().optional(),score:c().optional()}),Ut=l({query:d(),provider:Bt,resultCount:c(),durationMs:c(),results:f(Ht),errorMessage:d().optional()}),Wt=l({url:d(),finalUrl:d(),provider:Vt.optional(),status:c(),contentType:d().optional(),byteCount:c(),charCount:c(),truncated:t(),title:d().optional(),domain:d(),faviconUrl:d().optional(),redirectCount:c(),durationMs:c(),errorMessage:d().optional(),mayRequireJavaScript:t().optional()}),O=l({webSearch:Ut.optional(),webFetch:Wt.optional()}),Gt=l({type:i(`tool_result`),toolName:d(),result:d(),isError:t().optional(),diff:_.optional(),status:d().optional(),conversationId:d().optional(),imageData:d().optional(),imageDataList:f(d()).optional(),toolUseId:d().optional(),messageId:d().optional(),riskLevel:d().optional(),riskReason:d().optional(),matchedTrustRuleId:d().optional(),isContainerized:t().optional(),riskScopeOptions:f(zt).optional(),riskAllowlistOptions:f(m).optional(),riskDirectoryScopeOptions:f(g).optional(),approvalMode:d().optional(),approvalReason:d().optional(),riskThreshold:d().optional(),activityMetadata:O.optional(),errorCode:d().optional(),completedAt:c().optional()}),Kt=l({type:i(`tool_use_preview_start`),toolUseId:d(),toolName:d(),conversationId:d().optional(),messageId:d().optional(),previewStartedAt:c().optional()}),qt=l({type:i(`tool_use_start`),toolName:d(),input:o(d(),u()),toolUseId:d().optional(),messageId:d().optional(),conversationId:d().optional(),startedAt:c().optional(),previewStartedAt:c().optional()}),Jt=l({type:i(`ui_surface_complete`),conversationId:d(),surfaceId:d(),summary:d(),submittedData:o(d(),u()).optional()}),Yt=l({type:i(`ui_surface_dismiss`),conversationId:d(),surfaceId:d()}),Xt=l({id:d(),label:d(),style:s([`primary`,`secondary`,`destructive`]).optional(),data:o(d(),u()).optional()}),Zt=l({type:i(`ui_surface_show`),conversationId:d(),surfaceId:d(),surfaceType:d(),title:d().optional(),data:o(d(),u()),actions:f(Xt).optional(),display:s([`inline`,`panel`]).optional(),messageId:d().optional(),persistent:t().optional(),toolCallId:d().optional()}),Qt=l({type:i(`ui_surface_update`),conversationId:d(),surfaceId:d(),data:o(d(),u())}),k=l({type:i(`usage_progress`),conversationId:d(),inputTokens:c(),outputTokens:c(),estimatedCost:c(),model:d()}),$t=l({type:i(`usage_update`),conversationId:d(),inputTokens:c(),outputTokens:c(),cacheCreationInputTokens:c().optional(),cacheReadInputTokens:c().optional(),totalInputTokens:c(),totalOutputTokens:c(),estimatedCost:c(),model:d(),contextWindowTokens:c().optional(),contextWindowMaxTokens:c().optional()}),en=l({type:i(`user_message_echo`),text:d(),conversationId:d().optional(),messageId:d().optional(),requestId:d().optional(),clientMessageId:d().optional()}).strict(),A=s([`running`,`completed`,`failed`,`aborted`,`cap_exceeded`,`interrupted`]),tn=l({type:i(`workflow_completed`),runId:d(),conversationId:d().optional(),status:A,agentsSpawned:c(),inputTokens:c(),outputTokens:c(),summary:d().optional()}).strict(),nn=l({type:i(`workflow_leaf_finished`),runId:d(),conversationId:d(),seq:c().int(),status:s([`completed`,`failed`]),label:d().optional(),inputTokens:c().optional(),outputTokens:c().optional(),resultSummary:d().optional()}).strict(),rn=l({type:i(`workflow_leaf_started`),runId:d(),conversationId:d(),seq:c().int(),label:d().optional(),phase:d().optional(),promptSummary:d().optional()}).strict(),an=l({type:i(`workflow_progress`),runId:d(),conversationId:d().optional(),agentsSpawned:c(),phase:d().optional(),label:d().optional(),message:d().optional()}).strict(),on=l({type:i(`workflow_started`),runId:d(),conversationId:d(),toolUseId:d().optional(),label:d().optional()}).strict(),sn=`syntheticAgentErrorMessage`,cn=`compactionAgent`,ln=3e4,un=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)`),dn=l({transcription:d().describe(`Raw speech transcription`),context:un,profileId:d().describe(`Optional dictation profile ID`).optional()}),j=l({id:d(),filename:d(),mimeType:d(),sizeBytes:c(),kind:d(),data:d().optional(),thumbnailData:d().optional(),fileBacked:t().optional()}),fn=l({pattern:d(),label:d()}),pn=l({label:d(),description:d(),pattern:d()}),mn=l({scope:d(),label:d()}),hn=l({requestId:d(),title:d().optional(),description:d().optional(),toolName:d().optional(),riskLevel:d().optional(),riskReason:d().optional(),input:o(d(),u()).optional(),allowlistOptions:f(m).optional(),scopeOptions:f(h).optional(),directoryScopeOptions:f(g).optional(),persistentDecisionsAllowed:t().optional()}),gn=l({requestId:d(),entries:f(T)}),_n=s([`approved`,`denied`,`timed_out`]),M=l({id:d().optional(),name:d(),input:o(d(),u()),result:d().optional(),isError:t().optional(),errorCode:d().optional(),imageData:d().optional(),imageDataList:f(d()).optional(),imageAttachmentIds:f(d()).optional(),startedAt:c().optional(),previewStartedAt:c().optional(),completedAt:c().optional(),confirmationDecision:_n.optional(),confirmationLabel:d().optional(),riskLevel:d().optional(),riskReason:d().optional(),matchedTrustRuleId:d().optional(),autoApproved:t().optional(),approvalMode:d().optional(),approvalReason:d().optional(),riskThreshold:d().optional(),riskScopeOptions:f(fn).optional(),riskAllowlistOptions:f(pn).optional(),riskDirectoryScopeOptions:f(mn).optional(),activityMetadata:O.optional(),scopeOptions:f(h).optional(),pendingConfirmation:hn.optional(),pendingQuestion:gn.optional()}),vn=l({id:d(),label:d(),style:d().optional(),data:o(d(),u()).optional()}),N=l({surfaceId:d(),surfaceType:d(),title:d().optional(),data:o(d(),u()),actions:f(vn).optional(),display:d().optional(),persistent:t().optional(),completed:t().optional(),completionSummary:d().optional(),toolCallId:d().optional()}),yn=l({subagentId:d(),label:d(),status:d(),error:d().optional(),conversationId:d().optional(),objective:d().optional()}),bn=l({acpSessionId:d(),agent:d().optional()}),xn=l({id:d(),toolName:d(),conversationId:d(),command:d(),startedAt:c(),status:s([`completed`,`failed`,`cancelled`]),exitCode:c().nullable(),output:d(),completedAt:c()}),Sn=l({appUrl:d().optional(),webUrl:d().optional()}),Cn=l({emoji:d(),op:s([`added`,`removed`]),actorDisplayName:d().optional(),targetChannelTs:d()}),wn=l({channelId:d(),channelName:d().optional(),channelTs:d(),threadTs:d().optional(),sender:l({displayName:d().optional(),externalUserId:d().optional()}).optional(),messageLink:Sn.optional(),threadLink:Sn.optional(),eventKind:s([`message`,`reaction`]).optional(),reaction:Cn.optional()}),Tn=l({type:i(`text`),text:d()}),En=l({type:i(`thinking`),thinking:d(),startedAt:c().optional(),completedAt:c().optional()}),Dn=l({type:i(`tool_use`),toolCall:M}),On=l({type:i(`surface`),surface:N}),kn=l({type:i(`attachment`),attachment:j}),An=ne(`type`,[Tn,En,Dn,On,kn]),jn=l({id:d(),mergedMessageIds:f(d()).optional(),clientMessageId:d().optional(),role:s([`user`,`assistant`]),timestamp:d(),attachments:f(j),toolCalls:f(M).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks (the tool_use variant). Flat list of tool calls.`}).optional(),surfaces:f(N).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks (the surface variant). Flat list of surfaces.`}).optional(),textSegments:f(d()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Text segments split by tool-call boundaries.`}).optional(),thinkingSegments:f(d()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Reasoning text extracted from thinking blocks.`}).optional(),contentOrder:f(d()).meta({deprecated:!0,description:`Deprecated: superseded by contentBlocks. Positional "<type>:<index>" content ordering (e.g. "text:0", "thinking:1").`}).optional(),contentBlocks:f(An).optional(),subagentNotification:yn.optional(),acpNotification:bn.optional(),backgroundEventNotification:t().optional(),backgroundToolCompletion:xn.optional(),systemCard:t().optional(),slackMessage:wn.optional(),queueStatus:s([`queued`,`processing`]).optional(),queuePosition:c().optional()}),Mn=l({status:x}),Nn=i(`notification`),Pn=s([`new`,`seen`,`acted_on`,`dismissed`]),Fn=s([`low`,`medium`,`high`,`critical`]),In=s([`security`,`scheduling`,`background`,`email`,`system`]),Ln=s([`heartbeat`,`memory_consolidation`,`schedule`,`auto_analysis`,`user`,`other`]),Rn=l({id:d(),label:d(),prompt:d()}),zn=s([`emailDraft`,`documentPreview`,`permissionChat`,`paymentAuth`,`toolPermission`,`updatesList`]),Bn=l({kind:zn}),Vn=l({id:d(),type:Nn,priority:c().int().min(0).max(100),title:d().optional(),summary:d(),timestamp:d(),status:Pn.default(`new`),expiresAt:d().optional(),actions:f(Rn).optional(),urgency:Fn.optional(),conversationId:d().optional(),detailPanel:Bn.optional(),category:In.optional(),noteworthy:t().optional(),fromAssistant:t().optional(),metadata:o(d(),u()).optional(),sourceType:Ln.optional(),sourceKey:d().optional(),sourceLabel:d().optional(),createdAt:d()}),Hn=s([`deterministic`,`assistant`]),Un=l({id:d(),label:d(),icon:d().optional(),prompt:d(),source:Hn}),Wn=l({greeting:d(),timeAwayLabel:d(),newCount:c().int().min(0)}),Gn=l({items:f(Vn),updatedAt:d(),contextBanner:Wn,suggestedPrompts:f(Un)}),Kn=l({id:d(),category:s([`voice`,`world`,`priorities`]),text:d(),confidence:s([`strong`,`uncertain`]),source:s([`onboarding`,`inferred`])}),qn=l({id:d(),name:d(),description:d(),tier:s([`unlocked`,`next-up`,`earned`]),gate:d(),unlockHint:d().optional(),ctaLabel:d().optional()}),Jn=l({version:i(1),assistantId:d(),tier:a([i(1),i(2),i(3),i(4)]),progressPercent:c(),facts:f(Kn),capabilities:f(qn),conversationCount:c(),hatchedDate:d(),assistantName:d(),userName:d().optional(),updatedAt:d()}),Yn=l({key:d(),label:d(),ms:c()}),Xn=l({key:d(),label:d(),ms:c(),subPhases:f(Yn).optional()}),Zn=l({phases:f(Xn),ttftMs:c().nullish(),totalToFirstTokenMs:c().nullish(),providerDurationMs:c().nullish(),firstTokenKind:s([`thinking`,`text`]).nullish()}),Qn=l({provider:d().nullish(),model:d().nullish(),status:d().nullish(),inputTokens:c().nullish(),outputTokens:c().nullish(),cacheCreationInputTokens:c().nullish(),cacheReadInputTokens:c().nullish(),stopReason:d().nullish(),requestMessageCount:c().nullish(),requestToolCount:c().nullish(),responseMessageCount:c().nullish(),responseToolCallCount:c().nullish(),responsePreview:d().nullish(),toolCallNames:f(d()).nullish(),estimatedCostUsd:c().nullish(),durationMs:c().nullish()}),P=l({kind:d(),label:d().nullish(),role:d().nullish(),text:d().nullish(),toolName:d().nullish(),data:u().optional(),language:d().nullish()}),$n=l({name:d().nullish(),message:d().nullish(),code:d().nullish(),provider:d().nullish(),statusCode:c().nullish(),retryAfterMs:c().nullish(),apiErrorCode:d().nullish(),apiErrorType:d().nullish(),apiErrorParam:d().nullish(),requestId:d().nullish()}),er=l({id:d(),createdAt:c(),requestPayload:te(),responsePayload:te(),provider:d().nullish(),summary:Qn.nullish(),requestSections:f(P).nullish(),responseSections:f(P).nullish(),agentLoopExitReason:d().nullish(),callSite:d().nullish(),error:$n.nullish(),latency:Zn.nullish()}),tr=l({nodeId:d(),score:c(),semanticSimilarity:c(),recencyBoost:c(),type:d().optional()}),nr=l({reason:d(),semanticUnavailable:t(),fallbackSources:f(d())}),rr=l({enabled:t(),degraded:t(),provider:d().nullable(),model:d().nullable(),degradation:nr.nullable(),semanticHits:c().nullish(),mergedCount:c().nullish(),selectedCount:c().nullish(),tier1Count:c().nullish(),tier2Count:c().nullish(),hybridSearchLatencyMs:c().nullish(),sparseVectorUsed:t().nullish(),injectedTokens:c().nullish(),latencyMs:c().nullish(),topCandidates:f(tr),injectedText:d().nullable(),reason:d().nullable(),queryContext:d().nullable()}),ir=l({slug:d(),finalActivation:c(),ownActivation:c(),priorActivation:c(),simUser:c(),simAssistant:c(),simNow:c(),simUserRerankBoost:c().optional(),simAssistantRerankBoost:c().optional(),inRerankPool:t().optional(),spreadContribution:c(),source:d(),status:d()}),ar=l({d:c(),c_user:c(),c_assistant:c(),c_now:c(),k:c(),hops:c(),top_k:c(),epsilon:c()}),or=l({turn:c(),mode:d(),concepts:f(ir),config:ar}),sr=l({slug:d(),source:d(),pinned:t(),sectionOrdinal:c().nullable().optional(),sectionHeading:d().nullable().optional()}),cr=l({turn:c(),live:t(),selections:f(sr),injectedText:d()}),lr=l({messageId:d().nullish(),conversationKey:d().nullish(),conversationId:d().nullish(),conversationKind:d(),conversationTotalEstimatedCostUsd:c().nullish(),logs:f(er),memoryRecall:rr.nullable(),memoryV2Activation:or.nullable(),memoryV3Selection:cr.nullish()}),ur=l({type:d(),content:d(),toolName:d().optional(),isError:t().optional(),messageId:d().optional(),toolUseId:d().optional(),input:o(d(),u()).optional()}),dr=l({subagentId:d(),objective:d().optional(),status:E.optional(),usage:D.optional(),events:f(ur)}),fr=l({seq:c().int(),kind:s([`agent`,`workflow`]),label:d().optional(),phase:d().optional(),promptSummary:d().optional(),status:d(),resultSummary:d().optional(),inputTokens:c().optional(),outputTokens:c().optional(),createdAt:c().nullable()}),pr=l({runId:d(),status:A.optional(),agentsSpawned:c().optional(),inputTokens:c().optional(),outputTokens:c().optional(),phase:d().optional(),leaves:f(fr)});function F(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function mr(e){if(F(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);if(F(t))return t}catch{}return{}}var I=()=>d().optional().catch(void 0),L=()=>t().optional().catch(void 0),R=()=>c().finite().optional().catch(void 0);function z(e){return r(e=>Array.isArray(e)?e.filter(F):[],f(e))}var B=l({title:d().optional(),subtitle:d().optional(),body:d().optional(),metadata:f(l({label:p(),value:p()})).optional(),template:d().optional(),templateData:o(d(),u()).optional()}),hr=r(e=>{let t=(typeof e==`string`?e.split(`,`):Array.isArray(e)?e:[]).map(e=>typeof e==`string`||typeof e==`number`?String(e).trim():``).filter(e=>e.length>0);return t.length>0?t:void 0},f(d()).optional()),V=l({prompt:p().optional(),acceptedTypes:hr,maxFiles:ae().int().positive().optional().catch(void 0),maxSizeBytes:ae().positive().optional().catch(void 0)}),H=l({text:d().catch(``),label:I(),language:I()});function gr(e,t){let n={...t};for(let t of[`text`,`label`,`language`])typeof n[t]!=`string`&&typeof e[t]==`string`&&(n[t]=e[t]);return H.parse(n)}var _r=l({id:d(),title:d(),description:I(),recommended:L(),data:o(d(),u()).optional().catch(void 0)}),vr=r(e=>Array.isArray(e)?e.flatMap(e=>{if(!F(e))return[];let t=typeof e.id==`string`?e.id.trim():``,n=typeof e.title==`string`?e.title.trim():typeof e.label==`string`?e.label.trim():``;return!t||!n?[]:[{...e,id:t,title:n}]}):[],f(_r)),U=l({description:I(),options:vr,selectionMode:r(e=>e===`multiple`?`multiple`:`single`,s([`single`,`multiple`])),commitOnSelect:L(),submitLabel:I()}),W=l({providerKey:r(e=>typeof e==`string`?e.trim():e,d()).catch(``),displayName:I(),description:I(),logoUrl:d().nullable().optional().catch(void 0)}),G=l({id:d().catch(``),type:s([`text`,`textarea`,`select`,`toggle`,`number`,`password`]).catch(`text`),label:d().catch(``),placeholder:I(),required:L(),defaultValue:a([d(),c(),t()]).optional().catch(void 0),options:f(l({label:p(),value:p()})).optional().catch(void 0)}),yr=l({id:d().catch(``),title:d().catch(``),description:I(),fields:z(G)}),K=l({description:I(),fields:z(G),submitLabel:I(),pages:z(yr).optional().catch(void 0),pageLabels:l({next:I(),back:I(),submit:I()}).optional().catch(void 0),progressStyle:s([`bar`,`tabs`]).optional().catch(void 0)}),br=l({id:d().catch(``),title:d().catch(``),subtitle:I(),icon:I(),selected:L()}),q=l({items:z(br),selectionMode:s([`single`,`multiple`,`none`]).catch(`none`)}),xr=l({id:d().catch(``),label:d().catch(``),width:R()}),Sr=l({text:p().catch(``),icon:I(),iconColor:I()}),Cr=l({id:d().catch(``),cells:o(d(),a([d(),Sr]).catch(``)).catch({}),selectable:L(),selected:L()}),J=l({columns:z(xr),rows:z(Cr),selectionMode:s([`none`,`single`,`multiple`]).optional().catch(void 0),caption:I()}),Y=l({message:d().catch(``),detail:I(),confirmLabel:I(),confirmedLabel:I(),cancelLabel:I(),destructive:L()}),wr=l({title:d().catch(``),subtitle:I(),description:I(),icon:I(),metrics:f(l({label:p(),value:p()})).optional().catch(void 0),context:s([`app_create`,`general`]).optional().catch(void 0),previewImage:I()}),Tr=l({html:d().catch(``),width:R(),height:R(),appId:I(),dirName:I(),reloadGeneration:R(),status:I(),preview:wr.optional().catch(void 0)}),Er=l({title:d().catch(``),surfaceId:d().catch(``),subtitle:I(),content:I(),mimeType:I()}),Dr=s([`completed`,`partial`,`failed`,`in_progress`]),X=s([`neutral`,`positive`,`warning`,`negative`]),Or=s([`items`,`timeline`,`diff`,`artifacts`,`warnings`]),kr=()=>({label:p().catch(``),value:a([d(),c()]).catch(``)}),Ar=l({...kr(),detail:I(),tone:X.optional().catch(void 0)}),jr=l(kr()),Mr=l({id:I(),title:p().catch(``),description:I(),status:I(),tone:X.optional().catch(void 0),metadata:z(jr).optional().catch(void 0),href:I()}),Nr=l({label:I(),before:I(),after:I()}),Pr=l({id:I(),title:p().catch(``),description:I(),type:Or.optional().catch(void 0),items:z(Mr).optional().catch(void 0),diffs:z(Nr).optional().catch(void 0)}),Fr=l({eyebrow:I(),status:Dr.optional().catch(void 0),summary:I(),metrics:z(Ar).optional().catch(void 0),sections:z(Pr).optional().catch(void 0)}),Z=[`card`,`channel_setup`,`choice`,`copy_block`,`oauth_connect`,`form`,`list`,`table`,`confirmation`,`dynamic_page`,`file_upload`,`document_preview`,`task_preferences`,`work_result`,`skill_card`,`call_summary`],Ir=s(Z),Lr=[`skill_card`,`call_summary`],Rr=new Set(Lr);function Q(e){return Rr.has(e)}var zr=Z.filter(e=>!Q(e));new Set(Z);var Br={card:B,channel_setup:o(d(),u()),choice:U,copy_block:H,oauth_connect:W,form:K,list:q,table:J,confirmation:Y,dynamic_page:Tr,file_upload:V,document_preview:Er,task_preferences:o(d(),u()),work_result:Fr,skill_card:o(d(),u()),call_summary:o(d(),u())},Vr=e({ACPOptionKindSchema:()=>Ae,ACPOptionSchema:()=>je,AcpSessionCompletedEventSchema:()=>se,AcpSessionErrorEventSchema:()=>ce,AcpSessionSpawnedEventSchema:()=>le,AcpSessionUpdateEventSchema:()=>de,AcpSessionUpdateTypeSchema:()=>ue,AcpSessionUsageEventSchema:()=>fe,AcpStopReasonSchema:()=>oe,AllowlistOptionSchema:()=>m,AssistantActivityAnchorSchema:()=>me,AssistantActivityPhaseSchema:()=>pe,AssistantActivityReasonSchema:()=>he,AssistantActivityStateEventSchema:()=>ge,AssistantEventEnvelopeSchema:()=>Hr,AssistantEventSchema:()=>$,AssistantOutboundAttachmentSchema:()=>S,AssistantTextDeltaEventSchema:()=>_e,AssistantThinkingDeltaEventSchema:()=>ve,AssistantTurnStartEventSchema:()=>ye,AvatarUpdatedEventSchema:()=>be,BackgroundToolCompletedEventSchema:()=>xe,BackgroundToolStartedEventSchema:()=>Se,BookmarkCreatedEventSchema:()=>we,BookmarkDeletedEventSchema:()=>Te,BookmarkSummarySchema:()=>Ce,CALL_SITE_COMPACTION_AGENT:()=>cn,CALL_SITE_SYNTHETIC_AGENT_ERROR_MESSAGE:()=>sn,CapabilitySchema:()=>qn,CardSurfaceDataSchema:()=>B,ChoiceOptionSchema:()=>_r,ChoiceSurfaceDataSchema:()=>U,ClientSettingsUpdateEventSchema:()=>Ee,CompactionCircuitClosedEventSchema:()=>De,CompactionCircuitOpenEventSchema:()=>Oe,ConfigChangedEventSchema:()=>ke,ConfirmationDiffSchema:()=>_,ConfirmationExecutionTargetSchema:()=>Me,ConfirmationRequestEventSchema:()=>Ne,ConfirmationSurfaceDataSchema:()=>Y,ContactRequestEventSchema:()=>Pe,ContactsChangedEventSchema:()=>v,ContextBannerSchema:()=>Wn,ConversationAttachmentBlockSchema:()=>kn,ConversationContentBlockSchema:()=>An,ConversationErrorCodeSchema:()=>y,ConversationErrorEventSchema:()=>b,ConversationListInvalidatedEventSchema:()=>Ie,ConversationListInvalidatedReasonSchema:()=>Fe,ConversationMessageAttachmentSchema:()=>j,ConversationMessageSchema:()=>jn,ConversationMessageSurfaceSchema:()=>N,ConversationMessageToolCallSchema:()=>M,ConversationNoticeEventSchema:()=>Re,ConversationNoticeSourceSchema:()=>Le,ConversationSlackMessageSchema:()=>wn,ConversationSubagentNotificationSchema:()=>yn,ConversationSurfaceBlockSchema:()=>On,ConversationTextBlockSchema:()=>Tn,ConversationThinkingBlockSchema:()=>En,ConversationTitleUpdatedEventSchema:()=>ze,ConversationToolUseBlockSchema:()=>Dn,CopyBlockSurfaceDataSchema:()=>H,DAEMON_INTERNAL_SURFACE_TYPES:()=>Lr,DEFAULT_TOOL_EXECUTION_TIMEOUT_SEC:()=>120,DictationContextSchema:()=>un,DictationRequestSchema:()=>dn,DirectoryScopeOptionSchema:()=>g,DiskPressureBlockedCapabilitySchema:()=>Ve,DiskPressureStateSchema:()=>Be,DiskPressureStatusChangedEventSchema:()=>He,DiskPressureStatusResponseSchema:()=>Mn,DiskPressureStatusSchema:()=>x,DocumentCommentCreatedEventSchema:()=>We,DocumentCommentDeletedEventSchema:()=>Ge,DocumentCommentReopenedEventSchema:()=>Ke,DocumentCommentResolvedEventSchema:()=>qe,DocumentEditorShowEventSchema:()=>Je,DocumentEditorUpdateEventSchema:()=>Ye,DocumentPreviewSurfaceDataSchema:()=>Er,DynamicPagePreviewSchema:()=>wr,DynamicPageSurfaceDataSchema:()=>Tr,ErrorEventSchema:()=>Xe,FactSchema:()=>Kn,FeedActionSchema:()=>Rn,FeedItemCategorySchema:()=>In,FeedItemDetailPanelKindSchema:()=>zn,FeedItemDetailPanelSchema:()=>Bn,FeedItemSchema:()=>Vn,FeedItemSourceTypeSchema:()=>Ln,FeedItemStatusSchema:()=>Pn,FeedItemTypeSchema:()=>Nn,FeedItemUrgencySchema:()=>Fn,FileUploadSurfaceDataSchema:()=>V,FormFieldSchema:()=>G,FormPageSchema:()=>yr,FormSurfaceDataSchema:()=>K,GenerationCancelledEventSchema:()=>Ze,GenerationHandoffEventSchema:()=>Qe,HomeFeedResponseSchema:()=>Gn,HomeFeedUpdatedEventSchema:()=>$e,HookEventOwnerSchema:()=>et,HookEventSchema:()=>tt,IdentityChangedEventSchema:()=>nt,InteractionResolutionStateSchema:()=>rt,InteractionResolvedEventSchema:()=>it,LLMCallErrorSchema:()=>$n,LLMCallSummarySchema:()=>Qn,LLMContextSectionSchema:()=>P,LLMRequestLogEntrySchema:()=>er,LatencyBreakdownSchema:()=>Zn,LatencyPhaseSchema:()=>Xn,ListItemSchema:()=>br,ListSurfaceDataSchema:()=>q,LlmContextResponseSchema:()=>lr,MODEL_INVOKABLE_SURFACE_TYPES:()=>zr,MemoryCandidateSchema:()=>tr,MemoryDegradationSchema:()=>nr,MemoryRecallLogSchema:()=>rr,MemoryRecalledCandidateDebugSchema:()=>at,MemoryRecalledDegradationSchema:()=>C,MemoryRecalledEventSchema:()=>ot,MemoryStatusEventSchema:()=>st,MemoryV2ActivationLogSchema:()=>or,MemoryV2ConceptRowSchema:()=>ir,MemoryV2ConfigSnapshotSchema:()=>ar,MemoryV3SelectionLogSchema:()=>cr,MemoryV3SelectionRowSchema:()=>sr,MessageCompleteEventSchema:()=>ct,MessageDequeuedEventSchema:()=>lt,MessageQueuedDeletedEventSchema:()=>dt,MessageQueuedEventSchema:()=>ut,MessageRequestCompleteEventSchema:()=>ft,NavigateSettingsEventSchema:()=>pt,NotificationConversationCreatedEventSchema:()=>mt,NotificationIntentEventSchema:()=>ht,OAuthConnectSurfaceDataSchema:()=>W,OpenConversationEventSchema:()=>gt,OpenPanelEventSchema:()=>_t,OpenUrlEventSchema:()=>vt,PendingToolConfirmationSchema:()=>hn,QuestionEntrySchema:()=>T,QuestionOptionSchema:()=>w,QuestionRequestEventSchema:()=>yt,RecordingOptionsSchema:()=>bt,RecordingPauseEventSchema:()=>Ct,RecordingResumeEventSchema:()=>wt,RecordingStartEventSchema:()=>xt,RecordingStopEventSchema:()=>St,RelationshipStateSchema:()=>Jn,RelationshipStateUpdatedEventSchema:()=>Tt,RiskScopeOptionSchema:()=>zt,SSE_REPLAY_RING_AGE_LIMIT_MS:()=>ln,SSE_REPLAY_RING_COUNT_LIMIT:()=>200,SURFACE_DATA_SCHEMAS:()=>Br,SURFACE_TYPES:()=>Z,ScopeOptionSchema:()=>h,SecretRequestEventSchema:()=>Et,ServiceGroupUpdateCompleteEventSchema:()=>Dt,ServiceGroupUpdateProgressEventSchema:()=>Ot,ServiceGroupUpdateStartingEventSchema:()=>kt,SkillStateChangedEventSchema:()=>At,SoundsConfigUpdatedEventSchema:()=>jt,SubagentDetailEventSchema:()=>ur,SubagentDetailResponseSchema:()=>dr,SubagentEventEventSchema:()=>Nt,SubagentInnerEventSchema:()=>Mt,SubagentSpawnedEventSchema:()=>Pt,SubagentStatusChangedEventSchema:()=>Ft,SubagentStatusSchema:()=>E,SubagentUsageStatsSchema:()=>D,SuggestedPromptSchema:()=>Un,SuggestedPromptSourceSchema:()=>Hn,SurfaceActionSchema:()=>Xt,SurfaceTypeSchema:()=>Ir,SyncChangedEventSchema:()=>It,TableCellValueSchema:()=>Sr,TableColumnSchema:()=>xr,TableRowSchema:()=>Cr,TableSurfaceDataSchema:()=>J,ToolActivityMetadataSchema:()=>O,ToolOutputChunkEventSchema:()=>Rt,ToolOutputChunkSubTypeSchema:()=>Lt,ToolResultEventSchema:()=>Gt,ToolUsePreviewStartEventSchema:()=>Kt,ToolUseStartEventSchema:()=>qt,UISurfaceCompleteEventSchema:()=>Jt,UISurfaceDismissEventSchema:()=>Yt,UISurfaceShowEventSchema:()=>Zt,UISurfaceUpdateEventSchema:()=>Qt,UsageProgressEventSchema:()=>k,UsageUpdateEventSchema:()=>$t,UserMessageEchoEventSchema:()=>en,WebFetchMetadataSchema:()=>Wt,WebSearchMetadataSchema:()=>Ut,WebSearchProviderIdSchema:()=>Bt,WebSearchResultItemSchema:()=>Ht,WorkResultDiffSchema:()=>Nr,WorkResultItemSchema:()=>Mr,WorkResultMetadataSchema:()=>jr,WorkResultMetricSchema:()=>Ar,WorkResultSectionSchema:()=>Pr,WorkResultSectionTypeSchema:()=>Or,WorkResultStatusSchema:()=>Dr,WorkResultSurfaceDataSchema:()=>Fr,WorkResultToneSchema:()=>X,WorkflowCompletedEventSchema:()=>tn,WorkflowJournalResponseSchema:()=>pr,WorkflowLeafFinishedEventSchema:()=>nn,WorkflowLeafSchema:()=>fr,WorkflowLeafStartedEventSchema:()=>rn,WorkflowProgressEventSchema:()=>an,WorkflowRunStatusSchema:()=>A,WorkflowStartedEventSchema:()=>on,coerceSurfaceDataRecord:()=>mr,isDaemonInternalSurfaceType:()=>Q,normalizeCopyBlockShowData:()=>gr}),$=ne(`type`,[se,ce,le,de,fe,ge,_e,ve,ye,be,xe,Se,we,Te,Ee,De,Oe,ke,Ne,Pe,v,b,Ie,Re,ze,He,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,tt,nt,it,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,Ct,wt,xt,St,Tt,Et,Dt,Ot,kt,At,jt,Nt,Pt,Ft,It,Rt,Gt,Kt,qt,Jt,Yt,Zt,Qt,k,$t,en,tn,nn,rn,an,on]),Hr=l({id:d(),conversationId:d().optional(),seq:c().int().optional(),emittedAt:d(),message:$});export{cn as _,U as a,V as c,W as d,J as f,ln as g,Mn as h,B as i,K as l,dr as m,$ as n,Y as o,pr as p,Vr as r,H as s,Hr as t,q as u,sn as v,k as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,ct as t,et as n,o as r}from"./local-mode-
|
|
1
|
+
import{c as e,ct as t,et as n,o as r}from"./local-mode-Dad5eO5y.js";import{h as i}from"./api-DizQUKoP.js";import{At as a,_ as o,ht as s,mt as c,v as l,y as u}from"./sdk.gen-BYiW7lcm.js";import{a as d,n as f}from"./api-errors-BnUiuRwl.js";import{B as p,T as m,V as h,a as g,i as _,o as v,w as y,z as b}from"./sdk.gen-6X-SatQk.js";async function x(e,t){let{data:n,error:r,response:i}=await y({body:e??{},query:t?{mode:t}:void 0,throwOnError:!1});return f(i,r,`Failed to hatch assistant.`),i.ok?{ok:!0,status:i.status,data:n}:{ok:!1,status:i.status,error:d(r,i)}}async function S(n){if(t()){let t=n?r(n):e();if(t)return{ok:!0,status:200,data:{id:t.assistantId,name:t.name??t.assistantId,status:`active`,is_local:!0,created:t.hatchedAt??``}}}if(n){let{data:e,error:t,response:r}=await h({path:{id:n},throwOnError:!1});return f(r,t,`Failed to get assistant.`),r.ok?{ok:!0,status:r.status,data:e}:{ok:!1,status:r.status,error:d(t,r)}}let i=await m({query:{hosting:`platform`},throwOnError:!1});if(f(i.response,i.error,`Failed to get assistant.`),!i.response.ok)return{ok:!1,status:i.response.status,error:d(i.error,i.response)};let a=i.data?.results??[];if(a.length>0)return{ok:!0,status:i.response.status,data:a[0]};let o=await m({query:{hosting:`local`},throwOnError:!1});if(f(o.response,o.error,`Failed to get assistant.`),o.response.ok){let e=o.data?.results??[];if(e.length>0)return{ok:!0,status:o.response.status,data:e[0]}}return o.response.ok?{ok:!1,status:404,error:{detail:`No assistants found`}}:{ok:!1,status:o.response.status,error:d(o.error,o.response)}}async function C(e){let{data:t,error:n,response:r}=await a({path:{assistant_id:e},throwOnError:!1});return f(r,n,`Failed to get assistant healthz.`),r.ok&&t?{ok:!0,status:r.status,data:t}:{ok:!1,status:r.status,error:d(n,r)}}async function w(e){let{data:t,error:n,response:r}=await s({path:{assistant_id:e},throwOnError:!1});if(f(r,n,`Failed to get assistant disk pressure status.`),r.ok){let e=i.safeParse(t);return e.success?{ok:!0,status:r.status,data:e.data}:{ok:!1,status:r.status,error:d(e.error.message,r)}}return{ok:!1,status:r.status,error:d(n,r)}}async function T(e){let{data:t,error:n,response:r}=await c({path:{assistant_id:e},throwOnError:!1});if(f(r,n,`Failed to acknowledge assistant disk pressure.`),r.ok){let e=i.safeParse(t);return e.success?{ok:!0,status:r.status,data:e.data}:{ok:!1,status:r.status,error:d(e.error.message,r)}}return{ok:!1,status:r.status,error:d(n,r)}}function E(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 D(e){let t=e&&typeof e==`object`&&!Array.isArray(e)?e:{};return Array.isArray(t.backups)?t.backups:[]}async function O(e){let t=!n(),[r,i]=await Promise.all([l({path:{assistant_id:e},throwOnError:!1}),t?v({path:{assistant_id:e},throwOnError:!1}):null]);if(f(r.response,r.error,`Failed to list assistant backups.`),!r.response.ok)return{ok:!1,status:r.response.status,error:d(r.error,r.response)};let a=E(r.data);if(i){if(i.response?.ok){let e=D(i.data);return{ok:!0,status:r.response.status,data:[...e,...a]}}if(a.length===0&&i.response)return{ok:!1,status:i.response.status,error:d(i.error,i.response)}}return{ok:!0,status:r.response.status,data:a}}async function k(e){let{data:t,error:r,response:i}=n()?await o({path:{assistant_id:e},throwOnError:!1}):await _({path:{assistant_id:e},throwOnError:!1});if(f(i,r,`Failed to create assistant backup.`),i.ok){let e=t&&typeof t==`object`&&!Array.isArray(t)?t:{};return{ok:!0,status:i.status,data:e}}return{ok:!1,status:i.status,error:d(r,i)}}async function A(e,t){let{data:r,error:i,response:a}=n()?await u({path:{assistant_id:e},body:{path:t.path??t.snapshot_name},throwOnError:!1}):await g({path:{assistant_id:e,snapshot_name:t.snapshot_name},throwOnError:!1});if(f(a,i,`Failed to restore assistant backup.`),a.ok){let e=r&&typeof r==`object`&&!Array.isArray(r)?r:{};return{ok:!0,status:a.status,data:e}}return{ok:!1,status:a.status,error:d(i,a)}}async function j(e){let{data:t,error:n,response:r}=await b({path:{id:e},throwOnError:!1});return f(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:d(n,r)}}async function M(e){let{error:t,response:n}=await p({path:{id:e},throwOnError:!1});return f(n,t,`Failed to retire assistant.`),n.ok?{ok:!0}:{ok:!1,status:n.status,error:d(t,n)}}async function N(){let{data:e,error:t,response:n}=await m({query:{hosting:`all`},throwOnError:!1});return f(n,t,`Failed to list assistants.`),n.ok?{ok:!0,status:n.status,data:e?.results??[]}:{ok:!1,status:n.status,error:d(t,n)}}export{C as a,N as c,M as d,w as i,j as l,k as n,x as o,S as r,O as s,T as t,A 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-BxZ6HzpA.js";import{m as r,u as i}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./input-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-BxZ6HzpA.js";import{m as r,u as i}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./input-DxOyE0ZC.js";import{t as s}from"./dropdown-Cl8NyHlL.js";import{t as c}from"./is-electron-CSbKx5JX.js";import{u as l}from"./routes-DzmKi8ws.js";import{hn as u}from"./index-cKUmWCp-.js";import{a as d,i as f,n as p,o as m,r as h,s as g}from"./provider-key-KznjccFG.js";import"./onboarding-step-layout-DFsxxNiz.js";var _=e(t(),1),v=a();function y(){let e=i(),[t]=r(),a=t.get(`hosting`),y=c(),b=p(),[x,S]=(0,_.useState)(()=>b?.provider??f.id),[C,w]=(0,_.useState)(()=>b?.key??``),[T,E]=(0,_.useState)(()=>b?.model??m(b?.provider??f.id)??``),[D,O]=(0,_.useState)(()=>b?.baseUrl??``),[k,A]=(0,_.useState)(()=>b?.customModels??``),j=g(x)??f,M=j.models??[],N=j.requiresKey,P=M.length>0,F=x===`openai-compatible`,I=(!(N&&!F)||C.trim().length>0)&&(!P||T.trim().length>0)&&(!F||D.trim().length>0&&k.trim().length>0);return(0,v.jsx)(u,{children:(0,v.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${y?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`px-6 py-16`} text-[var(--content-default)]`,children:[(0,v.jsx)(`h1`,{className:y?`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,v.jsx)(`p`,{className:`text-center text-body-medium-lighter text-[var(--content-tertiary)] ${y?`mt-3.5`:`mt-3`}`,style:{animation:`fadeInUp 0.5s ease-out 0.3s both`},children:`Choose the model provider your assistant should use.`}),(0,v.jsxs)(`div`,{className:`flex w-full flex-col gap-4 ${y?`mt-8`:`mt-10`}`,style:{animation:`fadeInUp 0.5s ease-out 0.4s both`},children:[(0,v.jsxs)(`div`,{className:`flex flex-col ${y?`gap-2`:`gap-1`}`,children:[(0,v.jsx)(`label`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,v.jsx)(s,{"aria-label":`Provider`,value:x,onChange:e=>{let t=g(e);t&&(S(t.id),w(``),E(m(t.id)??``))},options:d.map(e=>({value:e.id,label:e.displayName}))})]}),M.length>0&&(0,v.jsxs)(`div`,{className:`flex flex-col ${y?`gap-2`:`gap-1`}`,children:[(0,v.jsx)(`label`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Model`}),(0,v.jsx)(s,{"aria-label":`Model`,value:T,onChange:E,options:M.map(e=>({value:e.id,label:e.displayName}))})]}),F&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`div`,{className:`flex flex-col ${y?`gap-2`:`gap-1`}`,children:[(0,v.jsx)(`label`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Base URL`}),(0,v.jsx)(o,{type:`text`,placeholder:`http://localhost:1234/v1`,value:D,onChange:e=>O(e.target.value),fullWidth:!0})]}),(0,v.jsxs)(`div`,{className:`flex flex-col ${y?`gap-2`:`gap-1`}`,children:[(0,v.jsx)(`label`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Models`}),(0,v.jsx)(o,{type:`text`,placeholder:`model-1, model-2`,value:k,onChange:e=>A(e.target.value),fullWidth:!0}),(0,v.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Comma-separated model identifiers exposed by your endpoint.`})]})]}),N&&(0,v.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,v.jsx)(o,{type:`password`,label:`${j.displayName} API Key`,placeholder:j.apiKeyPlaceholder??`Enter your API key`,value:C,onChange:e=>w(e.target.value),className:`touch-mobile:text-[16px]`,fullWidth:!0}),j.docsUrl&&(0,v.jsxs)(`p`,{className:`self-start text-body-medium-lighter text-[var(--content-tertiary)]`,children:[`Don't have it?`,` `,(0,v.jsx)(`a`,{href:j.docsUrl,target:`_blank`,rel:`noreferrer`,className:`text-[var(--content-default)] underline`,children:`Get an API key here`})]})]})]}),(0,v.jsxs)(`div`,{className:`mt-8 flex w-full flex-col ${y?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.5s both`},children:[(0,v.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:!I,onClick:()=>{if(!I)return;let t=T.trim()||m(x);h({provider:x,key:C.trim(),...t?{model:t}:{},...F?{baseUrl:D.trim(),customModels:k.trim()}:{}}),e(a?`${l.onboarding.privacy}?hosting=${a}`:l.onboarding.privacy)},className:y?void 0:`h-11 text-base`,children:`Continue`}),(0,v.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,onClick:()=>{e(l.onboarding.hosting)},className:y?void 0:`h-11 text-base`,children:`Back`})]})]})})}export{y as ApiKeyScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./is-electron-
|
|
1
|
+
import{t as e}from"./is-electron-CSbKx5JX.js";async function t(){return e()?await window.vellum?.app.versionInfo()??null:null}async function n(){e()&&await window.vellum?.app.openWebsite()}export{n,t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{u as n}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{u as r}from"./routes-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{u as n}from"./chunk-5KNZJZUH-SU6Q_tDT.js";import{u as r}from"./routes-DzmKi8ws.js";var i=e(t(),1);function a(){let e=n();return(0,i.useEffect)(()=>{e(`${r.settings.debug}?tab=archive`,{replace:!0})},[e]),null}export{a as ArchiveRedirectPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./toast-
|
|
1
|
+
import{n as e}from"./toast-Bchq1ame.js";import{n as t,t as n}from"./create-selectors-CVKI3m11.js";import{c as r,n as i,s as a,t as o,u as s}from"./feature-flag-catalog-BfdnIHib.js";import{h as c}from"./sdk.gen-Bcmzg7Nc.js";var l={...o},u={...i},d=0,f={};function p(e={}){l={...o,...e};for(let e of Object.keys(f))delete f[e]}function m(e={}){u={...i,...e}}function h(){p(),m()}var g=a(`assistant`);function _(e){return l[e]??o[e]??!1}function v(e){return u[e]??i[e]??``}var y=n(t()(t=>{let n=t;return{...o,...g.bool,hasHydrated:!1,stringFlags:{...i,...g.str},setFlags:e=>t(t=>{p(e);let n={...e,...g.bool};return Object.keys(n).some(e=>n[e]!==t[e])?n:t}),setFlag:(n,i,a)=>{let o=++d,u=()=>{if(f[n]!==o)return;delete f[n];let a=_(n);t(e=>e[n]===i?{[n]:a}:e),e.error(`Couldn't update "${r(n)?.label??n}" — change reverted.`)},p=s(n);!a||!p||(f[n]=o,c({path:{assistant_id:a,flag_key:p},body:{enabled:i},throwOnError:!1}).then(e=>{e.response?.ok?(l[n]=i,f[n]===o&&delete f[n]):u()}).catch(u),t({[n]:g.bool[n]??i}))},markHydrated:()=>t({hasHydrated:!0}),resetForAssistantSwitch:()=>{h(),t({...o,...g.bool,hasHydrated:!1}),n({stringFlags:{...i,...g.str}})},setStringFlags:e=>n(t=>{m(e);let n={...e,...g.str},r=t.stringFlags;return Object.keys(n).some(e=>n[e]!==r[e])?{stringFlags:n}:t}),setStringFlag:(t,i,a)=>{let o=++d,l=()=>{if(f[t]!==o)return;delete f[t];let a=v(t);n(e=>e.stringFlags[t]===i?{stringFlags:{...e.stringFlags,[t]:a}}:e),e.error(`Couldn't update "${r(t)?.label??t}" — change reverted.`)},p=s(t);!a||!p||(f[t]=o,c({path:{assistant_id:a,flag_key:p},body:{enabled:i},throwOnError:!1}).then(e=>{e.response?.ok?(u[t]=i,f[t]===o&&delete f[t]):l()}).catch(l),n(e=>({stringFlags:{...e.stringFlags,[t]:g.str[t]??i}})))}}}));export{y as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./create-selectors-CVKI3m11.js";import{t as n}from"./impersonate-version-flag-4U66yjF4.js";var r=t(e(e=>({name:null,version:null,assistantId:null,setIdentity:(t,r,i=null)=>{e({name:t,version:n()??r,assistantId:i})},clearIdentity:()=>e({name:null,version:null,assistantId:null})})));export{r as t};
|