@vellumai/web 0.11.4 → 0.11.5-staging.2
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-CxaKvfs9.js → AnimatePresence-DkZYJl3q.js} +1 -1
- package/dist/assets/{Trans-FBE1EuwL.js → Trans-CM5UUgDt.js} +1 -1
- package/dist/assets/{a2a-invite-lHsf93YX.js → a2a-invite-CduLLtki.js} +1 -1
- package/dist/assets/{about-page-ByfiFQot.js → about-page-c1mqdjOr.js} +1 -1
- package/dist/assets/{account-page-Df1VB34_.js → account-page-CSJOSKzD.js} +1 -1
- package/dist/assets/{account-shell-Dk4m-iaE.js → account-shell-WRaiE1O8.js} +1 -1
- package/dist/assets/{acp-run-actions-FLArlHEs.js → acp-run-actions-DNNBiPfr.js} +1 -1
- package/dist/assets/{acp-run-detail-panel-DsqMAPE4.js → acp-run-detail-panel-gR77X6Xm.js} +1 -1
- package/dist/assets/{acp-run-store-De5GuSFn.js → acp-run-store-BUcMP80V.js} +1 -1
- package/dist/assets/activity-steps-panel-BglLu7wx.js +1 -0
- package/dist/assets/{add-credential-modal-vRe51ERD.js → add-credential-modal-DgoBqgwB.js} +1 -1
- package/dist/assets/add-credits-modal-BNab_7H9.js +1 -0
- package/dist/assets/ai-page-CLAFnWl5.js +1 -0
- package/dist/assets/{animate-BhosXxi-.js → animate-1rkqw0bf.js} +1 -1
- package/dist/assets/{animated-avatar-DsEiCrtA.js → animated-avatar-Bk5J30oP.js} +1 -1
- package/dist/assets/api-ByKY0Cbt.js +1 -0
- package/dist/assets/api-DBKgmyno.js +1 -0
- package/dist/assets/{api-errors-CASENJGT.js → api-errors-DYGVb-Sh.js} +1 -1
- package/dist/assets/api-key-screen-CS0KZgP6.js +1 -0
- package/dist/assets/{app-card-CjRGDYCX.js → app-card-C7c3c4l4.js} +1 -1
- package/dist/assets/{app-info-CvBesesf.js → app-info-CEe_jK5S.js} +1 -1
- package/dist/assets/{archive-redirect-page-LFqfq3Zx.js → archive-redirect-page-DZkHnLmA.js} +1 -1
- package/dist/assets/{assistant-feature-flag-store-CNWz-RMv.js → assistant-feature-flag-store-CdXRp9pV.js} +1 -1
- package/dist/assets/{assistant-status-panel-BkLYzQAL.js → assistant-status-panel-BogBdYLj.js} +1 -1
- package/dist/assets/auth-store-iNnDaLgR.js +2 -0
- package/dist/assets/auth-welcome-screen-BoiE47Sg.js +1 -0
- package/dist/assets/{avatar-random-B5F8Cp2E.js → avatar-random-C7t2cN3Y.js} +1 -1
- package/dist/assets/{avatar-renderer-DSa5eaH2.js → avatar-renderer-DvM-sFyU.js} +1 -1
- package/dist/assets/{background-task-actions-rGTNVeqo.js → background-task-actions-D-C9wSSf.js} +1 -1
- package/dist/assets/{background-task-detail-panel-DtJ1ZolD.js → background-task-detail-panel-BeXbhHLZ.js} +1 -1
- package/dist/assets/{background-task-store-svLgwmNn.js → background-task-store-D3W6TX_2.js} +1 -1
- package/dist/assets/billing-page-PuFxEptl.js +3 -0
- package/dist/assets/{billing-redirect-page-B6zuKMxb.js → billing-redirect-page-BFDitQeE.js} +1 -1
- package/dist/assets/bookmarks-page-DY_CJ4I3.js +1 -0
- package/dist/assets/{browser-Ca2R8csw.js → browser--x9YKXWo.js} +2 -2
- package/dist/assets/{build-state-laR44jYU.js → build-state-Dtia1Hnq.js} +1 -1
- package/dist/assets/{bundle-confirm-page-D7_j_7v3.js → bundle-confirm-page-9Jl2oXni.js} +1 -1
- package/dist/assets/{button-VkxVX0DM.js → button-C8CGr0T0.js} +1 -1
- package/dist/assets/{capture-error-DiNp24s6.js → capture-error-VBsIaC5d.js} +1 -1
- package/dist/assets/{channels-page-route-sLLh-p2k.js → channels-page-route-WZWPUfRo.js} +1 -1
- package/dist/assets/chat-QLQLsbFK.js +3 -0
- package/dist/assets/{chat-avatar-D7ZBWcZy.js → chat-avatar-DInCdP5z.js} +1 -1
- package/dist/assets/chat-markdown-message-JeYI9m3i.js +1 -0
- package/dist/assets/chat-z1gK656n.js +1 -0
- package/dist/assets/{checkbox-CyG1nZhR.js → checkbox-BWX_Dnge.js} +1 -1
- package/dist/assets/checkout-continuation-B-A9SoHt.js +1 -0
- package/dist/assets/checkout-page-BYHPD7UJ.js +1 -0
- package/dist/assets/checkout-return-target-DnT91-Y_.js +1 -0
- package/dist/assets/{client-feature-flag-store-CT2T_Fg7.js → client-feature-flag-store-DuVzcD-V.js} +1 -1
- package/dist/assets/{client-perf-BZu5XQCP.js → client-perf-Bg-CBIVj.js} +1 -1
- package/dist/assets/{command-palette-B6PZe9A0.js → command-palette-C8JWMyiC.js} +1 -1
- package/dist/assets/{command-palette-window-page-BYkkAV88.js → command-palette-window-page-C8vw0yIO.js} +1 -1
- package/dist/assets/common-gaw6OefS.js +1 -0
- package/dist/assets/community-page-DvR4X6k9.js +1 -0
- package/dist/assets/{companion-surface-CZHv2avR.js → companion-surface-Cnmjk-6O.js} +1 -1
- package/dist/assets/companion-surface-page-iknPQRTu.js +1 -0
- package/dist/assets/composer-settings-B84-FOM1.js +1 -0
- package/dist/assets/{confirm-dialog-Drw1adml.js → confirm-dialog-DYmL6FRe.js} +1 -1
- package/dist/assets/{connect-page-DiO1EqEC.js → connect-page-CKAizrWr.js} +1 -1
- package/dist/assets/{consent-controls-B_zCicqo.js → consent-controls-V9Wca6TV.js} +1 -1
- package/dist/assets/{contacts-gateway-CZNNXLeD.js → contacts-gateway-CoPOXTzi.js} +1 -1
- package/dist/assets/{contacts-page-route-fUfbhwZ5.js → contacts-page-route-BceswcoE.js} +1 -1
- package/dist/assets/conversation-cache-CuEQRyqi.js +1 -0
- package/dist/assets/conversation-navigation-CfOyMc6W.js +1 -0
- package/dist/assets/conversation-queries-CtAFZgFP.js +1 -0
- package/dist/assets/{conversation-selection-4ubh2ui-.js → conversation-selection-ZuF7NVBR.js} +1 -1
- package/dist/assets/{copy-to-clipboard-D76_3Coc.js → copy-to-clipboard-yufQqRBL.js} +1 -1
- package/dist/assets/{credential-entry-page--HYBfvoW.js → credential-entry-page-B0NYTomQ.js} +1 -1
- package/dist/assets/credentials-page-DfOet7SI.js +1 -0
- package/dist/assets/{use-avatar-accent-var-DN_cfh4V.js → credit-tiers-Bc9xxLBK.js} +1 -1
- package/dist/assets/{csv-preview-T_KT_vef.js → csv-preview-QUU-h2MX.js} +1 -1
- package/dist/assets/{danger-zone-redirect-page-BuIG9f9S.js → danger-zone-redirect-page-B_ZMX7ns.js} +1 -1
- package/dist/assets/debug-page-DXvFlnqh.js +4 -0
- package/dist/assets/{deploy-dialogs-CgicOESj.js → deploy-dialogs-ilUtMpvf.js} +1 -1
- package/dist/assets/{deploy-store-dyN183E8.js → deploy-store-C_y0BvwK.js} +1 -1
- package/dist/assets/{desktop-voice-activity-D1BSf0I-.js → desktop-voice-activity-B0dHlUep.js} +1 -1
- package/dist/assets/{detail-card-Bqnvs6YE.js → detail-card-DwBporBs.js} +1 -1
- package/dist/assets/{detail-drawer-j2jaITAL.js → detail-drawer-Di5V_iLf.js} +1 -1
- package/dist/assets/{detail-shell-D1UEZCzz.js → detail-shell-CcrQic9y.js} +1 -1
- package/dist/assets/developer-page-B_LQmpH7.js +1 -0
- package/dist/assets/{devices-redirect-page-BoKYF1E9.js → devices-redirect-page-BD0VY17t.js} +1 -1
- package/dist/assets/{diagnostics-CwFqcLv_.js → diagnostics-BcQgahbk.js} +1 -1
- package/dist/assets/{dictation-overlay-xS8BRhPs.js → dictation-overlay-BrXujvAw.js} +1 -1
- package/dist/assets/dictation-overlay-page-CfGmex7E.js +1 -0
- package/dist/assets/dist-BFOJNO7w.js +1 -0
- package/dist/assets/{dist-D94ZMew1.js → dist-BsGO-mS7.js} +1 -1
- package/dist/assets/{dist-CzN28mbE.js → dist-DN2Wju98.js} +1 -1
- package/dist/assets/{dist--4Bbb2u3.js → dist-eCSUXDGk.js} +1 -1
- package/dist/assets/{doctor-handoff-store-Cy96Na-O.js → doctor-handoff-store-B_RlFFKC.js} +1 -1
- package/dist/assets/{document-viewer-container-BMmSidmj.js → document-viewer-container-D3aPjnj8.js} +2 -2
- package/dist/assets/document-viewer-page-CvQXX7Mp.js +1 -0
- package/dist/assets/effective-timezone-CrnImpLf.js +1 -0
- package/dist/assets/{emails-page-CJM4OS94.js → emails-page-DbAVQ_jC.js} +1 -1
- package/dist/assets/{esm-BD6nxr-q.js → esm-4Bnaz5rU.js} +2 -2
- package/dist/assets/esm-C4VoH46A.js +1 -0
- package/dist/assets/{esm-nl105Ya0.js → esm-CrXbhSov.js} +2 -2
- package/dist/assets/{esm-BaEdQNCe.js → esm-DXPZZih3.js} +2 -2
- package/dist/assets/esm-DcJxSeV0.js +2 -0
- package/dist/assets/{esm-kYXyJ2zw.js → esm-Ddv_MyHw.js} +2 -2
- package/dist/assets/{esm-DTIJZw37.js → esm-Do2zrCWJ.js} +2 -2
- package/dist/assets/{esm-FpGTFn5W.js → esm-DrXV9mo-.js} +2 -2
- package/dist/assets/{external-anchor-CLy6d_za.js → external-anchor-owoORewf.js} +1 -1
- package/dist/assets/{eye-bbox-DoGcAx4c.js → eye-bbox-BpNolORP.js} +1 -1
- package/dist/assets/feature-flag-catalog-C1y2RUth.js +1 -0
- package/dist/assets/feed-item-status-actions-C3JfFvZc.js +1 -0
- package/dist/assets/{file-editor-BwdObVSu.js → file-editor-CeYfWNBz.js} +1 -1
- package/dist/assets/{file-markdown-C1rEGVrN.js → file-markdown-B9G_TXX-.js} +1 -1
- package/dist/assets/{first-run-scope-DdSaiULx.js → first-run-scope-MD-rEgje.js} +1 -1
- package/dist/assets/format-usd-BYzA1eMJ.js +1 -0
- package/dist/assets/{funnel-events-BP3XPaB5.js → funnel-events-ClGpFDNM.js} +1 -1
- package/dist/assets/general-page-CzDlVoNx.js +1 -0
- package/dist/assets/{get-memory-stats-SquVhZnd.js → get-memory-stats-U9zVanzc.js} +1 -1
- package/dist/assets/{haptics-D3hzTCtH.js → haptics-F-nvqKYf.js} +2 -2
- package/dist/assets/hatching-screen-FgNbjXOt.js +1 -0
- package/dist/assets/{home-page-route-BSoWksW0.js → home-page-route-C7Aeo-Mg.js} +1 -1
- package/dist/assets/hosting-screen-CLVRdDiX.js +1 -0
- package/dist/assets/{i18n-C9hRT4Lf.js → i18n-C3bX3mTs.js} +4 -4
- package/dist/assets/identity-DyjQj_xm.js +1 -0
- package/dist/assets/identity-page-route-CHncFua2.js +7 -0
- package/dist/assets/index-C7hCfQpd.css +2 -0
- package/dist/assets/index-DS0PEdhO.js +11 -0
- package/dist/assets/{ingest-DXklElaR.js → ingest-C1wiUm1l.js} +1 -1
- package/dist/assets/{input-DkgpMeG9.js → input-DlkBtbxm.js} +1 -1
- package/dist/assets/{inspect-page-naqIziez.js → inspect-page-CNLiZXRt.js} +3 -3
- package/dist/assets/{installed-plugins-query-CZLdpwnL.js → installed-plugins-query-DQKwv-Iz.js} +1 -1
- package/dist/assets/{integration-icon-DbmKvxqf.js → integration-icon-BxfDs-Ud.js} +1 -1
- package/dist/assets/integrations-page-B9SHiomg.js +1 -0
- package/dist/assets/intelligence-C7DYXerF.js +5 -0
- package/dist/assets/{intelligence-layout-CXzIl0Vl.js → intelligence-layout-BoW8JbDc.js} +1 -1
- package/dist/assets/internal-thread-actions-C0S_b7cx.js +1 -0
- package/dist/assets/{invalidate-memory-queries-C4-KSsdB.js → invalidate-memory-queries-uk2gV1m0.js} +1 -1
- package/dist/assets/{invalidate-plugin-queries-DxagFqKP.js → invalidate-plugin-queries-CI1Cseau.js} +1 -1
- package/dist/assets/keyboard-shortcuts-redirect-page-BY3Va4w9.js +1 -0
- package/dist/assets/{latest-assistant-text-JCjtByys.js → latest-assistant-text-fXT5Jkt8.js} +2 -2
- package/dist/assets/library-Da5KVeDF.js +1 -0
- package/dist/assets/{library-detail-page-CyWiXwb9.js → library-detail-page-CX92FKAK.js} +1 -1
- package/dist/assets/{library-page-CzcvMljL.js → library-page-D2v2j-WU.js} +1 -1
- package/dist/assets/{list-row-CDwzGT9g.js → list-row-6uedKE84.js} +1 -1
- package/dist/assets/llm-model-catalog-BxTXG4Cg.js +1 -0
- package/dist/assets/local-mode-DzIUFjhf.js +1 -0
- package/dist/assets/{local-runtime-upgrade-BkoG5uVr.js → local-runtime-upgrade-BpvLk3HN.js} +1 -1
- package/dist/assets/{login-flow-D6ivg6PM.js → login-flow-BYBqjDap.js} +1 -1
- package/dist/assets/{login-page-Dmpz0GgT.js → login-page-fl8rgXFq.js} +1 -1
- package/dist/assets/{logout-page-CI3LDcqG.js → logout-page-DLjLy7Hp.js} +1 -1
- package/dist/assets/{logs-layout-BHP-ADUq.js → logs-layout-Du4o-HeH.js} +1 -1
- package/dist/assets/{markdown-preview-Dx8E021p.js → markdown-preview-ukYPAksc.js} +1 -1
- package/dist/assets/media-preview-Ds0Jo4hk.js +1 -0
- package/dist/assets/{memory-page-route-qvBEERTa.js → memory-page-route-CvKjQ2FE.js} +1 -1
- package/dist/assets/memory-router-playground-page-Dh8zVze9.js +1 -0
- package/dist/assets/{menu-ubIBmfUh.js → menu-Ci8JeI2H.js} +1 -1
- package/dist/assets/message-content-C1CZhGIc.js +1 -0
- package/dist/assets/{message-files-panel-ZPa7eZHc.js → message-files-panel-DEAC2iCY.js} +1 -1
- package/dist/assets/messages-D5oI1yRV.js +13 -0
- package/dist/assets/{metric-card-bXd-f58c.js → metric-card-YqtdN5uX.js} +1 -1
- package/dist/assets/mime-sniff-BeXhZEXw.js +1 -0
- package/dist/assets/{modal-UYNawsIu.js → modal-DN_Uwwkg.js} +1 -1
- package/dist/assets/native-anchor-C13W_dF5.js +1 -0
- package/dist/assets/native-biometric-DzQYY-Z2.js +6 -0
- package/dist/assets/{native-file-BpFW1c_c.js → native-file-qM32rSz7.js} +2 -2
- package/dist/assets/navigation-resolver-B6QxHAa5.js +1 -0
- package/dist/assets/{not-found-ui-gcXqK.js → not-found-DXwfp4Yf.js} +1 -1
- package/dist/assets/{notice-BlYF-xU3.js → notice-C_AsX_o9.js} +1 -1
- package/dist/assets/{notifications-DK6b8YVI.js → notifications-DMNpr3pt.js} +1 -1
- package/dist/assets/notifications-page-DD-175gq.js +1 -0
- package/dist/assets/{oauth-complete-page-7NZZRVcj.js → oauth-complete-page-DBDWL3aD.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-Ci39YXpe.js → oauth-popup-complete-page-Dv0482xp.js} +1 -1
- package/dist/assets/onboarding-DwRWKhM_.js +1 -0
- package/dist/assets/onboarding-layout-CYgAi-S1.js +1 -0
- package/dist/assets/open-workspace-file-Ca9gUjoQ.js +2 -0
- package/dist/assets/{operational-status-CMN32PL8.js → operational-status-DVK3_kD_.js} +1 -1
- package/dist/assets/{page-shell-C3ZmdIop.js → page-shell-nVp2ogSk.js} +1 -1
- package/dist/assets/{pairing-page-YPN7ISIr.js → pairing-page-CLNSXQ7A.js} +1 -1
- package/dist/assets/{password-reset-page-D8ONrPU-.js → password-reset-page-BNw-K6vZ.js} +1 -1
- package/dist/assets/pdf-file-preview-DvhlIAI5.js +1 -0
- package/dist/assets/pdf-preview-BpUxb6wy.js +2 -0
- package/dist/assets/{personality-page-CLsRq5L2.js → personality-page-axIG9Tu_.js} +1 -1
- package/dist/assets/plans-page-DQu9C86N.js +1 -0
- package/dist/assets/{platform-detection-zth6eCY8.js → platform-detection-C-a_Mru0.js} +1 -1
- package/dist/assets/{platform-login-notice-CvFpWLJY.js → platform-login-notice-Dmq_2Akt.js} +1 -1
- package/dist/assets/{platform-loopback-page-B8cGk07e.js → platform-loopback-page-B0UOR3ct.js} +1 -1
- package/dist/assets/{plugin-detail-page--CvX0OXv.js → plugin-detail-page-2ySPND3h.js} +1 -1
- package/dist/assets/{plugins-page-CZ16U_6n.js → plugins-page-D7jLWtXv.js} +1 -1
- package/dist/assets/plugins-surface-CLatmeTO.js +1 -0
- package/dist/assets/pointer-Cxac45y6.js +1 -0
- package/dist/assets/popover-B_nY8VYI.js +1 -0
- package/dist/assets/{prefs-BLTugIFN.js → prefs-BFDWWNwd.js} +1 -1
- package/dist/assets/{preview-error-gCViZZRw.js → preview-error-B7qHC1Y4.js} +1 -1
- package/dist/assets/privacy-page-B-FaZv9p.js +1 -0
- package/dist/assets/privacy-screen-Ng4c4whW.js +1 -0
- package/dist/assets/profile-pickers-BE4eyfmO.js +1 -0
- package/dist/assets/{provider-callback-page-BPp1TM7J.js → provider-callback-page-CwYFxjk3.js} +1 -1
- package/dist/assets/{provider-key-DpdSx5gG.js → provider-key-D0kB_zjf.js} +1 -1
- package/dist/assets/{provider-signup-page-Cv9_b_58.js → provider-signup-page-BORU3SZe.js} +1 -1
- package/dist/assets/{provisioning-targets-DDUZDQ_a.js → provisioning-targets-D1mqFL8i.js} +1 -1
- package/dist/assets/{proxy-CT_qJI1K.js → proxy-C_GXGfwL.js} +1 -1
- package/dist/assets/{push-registration-CH_t0mI8.js → push-registration-CyLSsbG5.js} +2 -2
- package/dist/assets/{quick-input-page-LqfQdZFU.js → quick-input-page-D7nJMXNi.js} +1 -1
- package/dist/assets/react-query.gen-CYP-Tn4K.js +1 -0
- package/dist/assets/react-query.gen-D3r2fwXH.js +1 -0
- package/dist/assets/remote-gateway-session-B4C6b4Sx.js +1 -0
- package/dist/assets/remove-from-device-dialog-Bpy0yOG4.js +1 -0
- package/dist/assets/{research-facts-C2cY_gU2.js → research-facts-DzELMLzK.js} +1 -1
- package/dist/assets/{research-mock-page-CB1_bEoa.js → research-mock-page-BkcbRMpS.js} +1 -1
- package/dist/assets/{research-onboarding-persistence-Bx5cdkas.js → research-onboarding-persistence-BFdNebXL.js} +1 -1
- package/dist/assets/research-onboarding-route-BlBSSOiI.js +50 -0
- package/dist/assets/{research-results-view-BcQs2Zh9.js → research-results-view-D1hOhfTP.js} +1 -1
- package/dist/assets/{resolved-assistants-store-BNadgXqb.js → resolved-assistants-store-D57qRwKv.js} +1 -1
- package/dist/assets/retire-confirm-dialog-Zwo-Sjrc.js +1 -0
- package/dist/assets/{review-terms-screen-CI_29cnc.js → review-terms-screen-DmNdg_zJ.js} +1 -1
- package/dist/assets/routes-BaPyKuTq.js +24 -0
- package/dist/assets/routes-yNhBxUSb.js +1 -0
- package/dist/assets/runtime-upgrade-banner-bHSGkzwB.js +2 -0
- package/dist/assets/{sandbox-bridge-Dj1pIOXJ.js → sandbox-bridge-BcJiBmUR.js} +1 -1
- package/dist/assets/{schedules-C2Tr1zNV.js → schedules-CgwiGq3x.js} +1 -1
- package/dist/assets/schedules-DaGS9wMX.js +1 -0
- package/dist/assets/{schedules-page-0V6ECw0t.js → schedules-page-Ca_u2KkZ.js} +1 -1
- package/dist/assets/schemas-CwBN1MUL.js +39 -0
- package/dist/assets/{sdk.gen-DWvuzSBW.js → sdk.gen-DXPJc8Xk.js} +1 -1
- package/dist/assets/{sdk.gen-CiE6cMi0.js → sdk.gen-hZs6YBR0.js} +1 -1
- package/dist/assets/section-membership-CJlFrKoM.js +1 -0
- package/dist/assets/{security-redirect-page-D6x3MANY.js → security-redirect-page-eZ_C_Wf0.js} +1 -1
- package/dist/assets/{select-BKyejRky.js → select-DJDG9pwU.js} +1 -1
- package/dist/assets/select-assistant-screen-DSLQRer8.js +1 -0
- package/dist/assets/{self-hosted-servers-BviPyNnl.js → self-hosted-servers-DJIKPu90.js} +1 -1
- package/dist/assets/settings-BY8t4asx.js +1 -0
- package/dist/assets/{settings-divider-C0NZsB-L.js → settings-divider-BCyO1zmM.js} +1 -1
- package/dist/assets/settings-layout-Cv8u2dv7.js +1 -0
- package/dist/assets/settings-navigation-R6E3Weed.js +1 -0
- package/dist/assets/{share-feedback-modal-PlN6X3Pm.js → share-feedback-modal-COH8zwku.js} +2 -2
- package/dist/assets/{sidebar-tree-Bp0eeKf2.js → sidebar-tree-Bfvk_uAR.js} +1 -1
- package/dist/assets/{signup-page-gqz5_wG1.js → signup-page-BsMK6h9P.js} +1 -1
- package/dist/assets/{signup-shell-DW976E_0.js → signup-shell-OkpQCRuO.js} +1 -1
- package/dist/assets/{site-favicon-Cu07pwc9.js → site-favicon-Bu9L02gb.js} +1 -1
- package/dist/assets/{skill-detail-page-c0s3w3K3.js → skill-detail-page-D9WBRKuf.js} +1 -1
- package/dist/assets/{skill-detail-panel-NYXq557_.js → skill-detail-panel-kCMadngl.js} +1 -1
- package/dist/assets/{skills-5MnTu98B.js → skills-C3-ibGUo.js} +1 -1
- package/dist/assets/{skills-page-B_VTCiN2.js → skills-page-BMYP4Xi0.js} +1 -1
- package/dist/assets/sound-manager-CCbiDOQN.js +1 -0
- package/dist/assets/sounds-page-Du1t_S8A.js +1 -0
- package/dist/assets/{src-CImIAPTd.js → src-DMnnfLrU.js} +2 -2
- package/dist/assets/start-screen-I5HBKHT6.js +1 -0
- package/dist/assets/{status-badge-pill-D8m98tJa.js → status-badge-pill-w-ULYfRy.js} +1 -1
- package/dist/assets/{stt-language-picker-modal-BXLEBM7b.js → stt-language-picker-modal-Cq76JJex.js} +1 -1
- package/dist/assets/{subagent-detail-panel-CrbpQRzW.js → subagent-detail-panel-DP4dB-Dz.js} +1 -1
- package/dist/assets/{subagent-store-DqKEBlAM.js → subagent-store-Bn8k7JMr.js} +2 -2
- package/dist/assets/{superpowers-page-B5WGXphq.js → superpowers-page-COTkr31c.js} +1 -1
- package/dist/assets/{swipe-action-reveal-Ai9lRgUU.js → swipe-action-reveal-CQY9DSup.js} +1 -1
- package/dist/assets/{system-events-page-_aap_0av.js → system-events-page-CvoSQs7q.js} +1 -1
- package/dist/assets/{system-events-redirect-page-DbyqOqe_.js → system-events-redirect-page-BjnwAn9h.js} +1 -1
- package/dist/assets/{tag-Ddzwz3ij.js → tag-D2QYCm1p.js} +1 -1
- package/dist/assets/{telegram-setup-wizard-BENKNAuh.js → telegram-setup-wizard-6UP2MTrh.js} +1 -1
- package/dist/assets/{text-preview-DUlKYC4u.js → text-preview-BG__pDe7.js} +1 -1
- package/dist/assets/{theme-stage-page-CbGuxQ23.js → theme-stage-page-YfsM529J.js} +1 -1
- package/dist/assets/{threshold-presets-DN0_JIJQ.js → threshold-presets-BJubRlKn.js} +1 -1
- package/dist/assets/{tiptap-document-editor-0vqw7hch.js → tiptap-document-editor-BM6zL6R7.js} +2 -2
- package/dist/assets/{toast-DqqWkjsh.js → toast-CHtrY-GO.js} +1 -1
- package/dist/assets/{tool-detail-panel-C2wUYsf2.js → tool-detail-panel-_LC-zFuo.js} +3 -3
- package/dist/assets/transcript-message-body-shared-D8cmJP1C.js +1 -0
- package/dist/assets/{trust-rules-api-DRJ1qP-y.js → trust-rules-api-CE_KJOp2.js} +1 -1
- package/dist/assets/upgrade-cancel-page-DyLSvLsm.js +1 -0
- package/dist/assets/upgrade-success-page-BRPyFCq4.js +1 -0
- package/dist/assets/upload-Bilfs1g8.js +1 -0
- package/dist/assets/{usage-redirect-page-DyTnwv4x.js → usage-redirect-page-C4O5a5QM.js} +1 -1
- package/dist/assets/{use-active-assistant-id-BADYKVyx.js → use-active-assistant-id-BFE4r9Rp.js} +1 -1
- package/dist/assets/use-app-theme-BMyUWfBR.js +1 -0
- package/dist/assets/use-assistant-avatar-adekIS8v.js +1 -0
- package/dist/assets/{use-assistant-capability-C-yHcMH4.js → use-assistant-capability-Cjd57j4I.js} +1 -1
- package/dist/assets/{use-assistant-identity-details-u9sG9ip2.js → use-assistant-identity-details-C3sH1daz.js} +1 -1
- package/dist/assets/{use-attachment-preview-Cq_IWTdT.js → use-attachment-preview-BUJ9CHqr.js} +2 -2
- package/dist/assets/{use-attachment-squares-BKi30wmg.js → use-attachment-squares-CFAezuph.js} +1 -1
- package/dist/assets/use-bookmarks--Hn0Ty3s.js +1 -0
- package/dist/assets/{use-bundled-avatar-components-C_6xUsW1.js → use-bundled-avatar-components-Bhvvz-bQ.js} +2 -2
- package/dist/assets/{use-bus-subscription-BuhDYgS1.js → use-bus-subscription-BmtCG3i6.js} +1 -1
- package/dist/assets/use-checkout-dismiss-refresh-CTdb-p9h.js +1 -0
- package/dist/assets/{use-command-palette-sections-CvNjev8s.js → use-command-palette-sections-_F3pQkoi.js} +1 -1
- package/dist/assets/{use-copy-to-clipboard-B7Yrgm0s.js → use-copy-to-clipboard-BPX7B4SE.js} +1 -1
- package/dist/assets/use-edge-swipe-CJYjm94h.js +1 -0
- package/dist/assets/use-edge-swipe-back-L6kJ84LI.js +2 -0
- package/dist/assets/use-edit-app-C0wNLJT8.js +1 -0
- package/dist/assets/{use-effective-timezone-vox0__xI.js → use-effective-timezone-DaNOF607.js} +1 -1
- package/dist/assets/use-hotkey-recorder-BgB8ju9u.js +1 -0
- package/dist/assets/{use-invite-link-dialog-Chhnymz9.js → use-invite-link-dialog-B1oz9iwD.js} +1 -1
- package/dist/assets/use-is-mobile-BwSS15lq.js +1 -0
- package/dist/assets/{use-is-org-ready-GDBxqujc.js → use-is-org-ready-CEB5IRpO.js} +1 -1
- package/dist/assets/use-local-file-info-y_wvTOqp.js +1 -0
- package/dist/assets/{use-onboarding-login-BdVTfZ3o.js → use-onboarding-login-DSP8WCFe.js} +1 -1
- package/dist/assets/{use-platform-assistant-id-B7TrEBmf.js → use-platform-assistant-id-n0Yl5uUG.js} +1 -1
- package/dist/assets/{use-platform-gate-DG9Xg3Hs.js → use-platform-gate-DNfLk9Xd.js} +1 -1
- package/dist/assets/{use-reduced-motion-CU3dPXKf.js → use-reduced-motion-DzXyVFAi.js} +1 -1
- package/dist/assets/{use-return-to-short-circuit-EtY8cSC7.js → use-return-to-short-circuit-CY3AuCF9.js} +1 -1
- package/dist/assets/use-save-twilio-credentials-BWaLXE4J.js +1 -0
- package/dist/assets/use-side-list-room-CO7nxluQ.js +1 -0
- package/dist/assets/{use-skill-actions-CdbZjq6a.js → use-skill-actions-D7CK9Jhy.js} +1 -1
- package/dist/assets/{use-skill-detail-files-Bg4G44J3.js → use-skill-detail-files-Cop9LnVd.js} +1 -1
- package/dist/assets/use-sticky-profiles-D3ybBRfX.js +1 -0
- package/dist/assets/{use-stt-language-selection-CK6bUfVS.js → use-stt-language-selection-Dkm4Uq69.js} +1 -1
- package/dist/assets/{use-subagent-card-data-DlVOBxXw.js → use-subagent-card-data-DbKFX1Jc.js} +1 -1
- package/dist/assets/{use-supports-bookmarks-B4cgbKXV.js → use-supports-bookmarks-stTgDlyW.js} +1 -1
- package/dist/assets/use-supports-credentials-settings-DK8TsliJ.js +1 -0
- package/dist/assets/use-supports-inference-profiles-C0dU3VLS.js +1 -0
- package/dist/assets/use-swipe-horizontal-BwZ0yvoM.js +1 -0
- package/dist/assets/use-touch-mobile-CaIiM-us.js +1 -0
- package/dist/assets/use-transcript-message-by-id-BbJqGOYZ.js +1 -0
- package/dist/assets/use-transcript-messages-Bp4Jsfks.js +3 -0
- package/dist/assets/{use-voice-sample-preview-CZoWWEeH.js → use-voice-sample-preview-4vpwPGNW.js} +1 -1
- package/dist/assets/{useTranslation-D9pPv-bA.js → useTranslation-CCDbxnME.js} +1 -1
- package/dist/assets/{utils-BEkyAhbA.js → utils-wDLoxcBZ.js} +1 -1
- package/dist/assets/viewer-store-BbaMH35y.js +1 -0
- package/dist/assets/voice-page--99ik4mV.js +1 -0
- package/dist/assets/voice-providers-note-7m0LvxmN.js +1 -0
- package/dist/assets/{weather-forecast-display-D3IBgGHv.js → weather-forecast-display-BbD0N8C0.js} +1 -1
- package/dist/assets/{web-CxX3pST-.js → web-Do_X9zWq.js} +1 -1
- package/dist/assets/{web-D1mJSG8v.js → web-UN0kX9ic.js} +1 -1
- package/dist/assets/welcome-screen-Drdb1oS6.js +1 -0
- package/dist/assets/{workflow-detail-panel-C0kN-iH3.js → workflow-detail-panel-DS9_MRNg.js} +1 -1
- package/dist/assets/{workflow-store-BXqyb8CL.js → workflow-store-BYbfirJj.js} +1 -1
- package/dist/assets/workspace-page-CPDwYVlW.js +1 -0
- package/dist/assets/{workspace-tree-query-Dyls8wmV.js → workspace-tree-query-DzYz0-QE.js} +1 -1
- package/dist/index.html +284 -280
- package/package.json +1 -1
- package/dist/assets/access-D0krXly2.js +0 -1
- package/dist/assets/activity-steps-panel-C9z9FMmK.js +0 -1
- package/dist/assets/add-credits-modal-RIAYgbOT.js +0 -1
- package/dist/assets/ai-page-CI4LZXTY.js +0 -1
- package/dist/assets/api-BjYAXdCk.js +0 -1
- package/dist/assets/api-Cx3i50oG.js +0 -1
- package/dist/assets/api-key-screen-BKFAcyqU.js +0 -1
- package/dist/assets/auth-store-CVtcHK0b.js +0 -2
- package/dist/assets/auth-welcome-screen-Pw3qXxi5.js +0 -1
- package/dist/assets/billing-page-CmVjD4bw.js +0 -3
- package/dist/assets/bookmarks-page-DUbnEAgS.js +0 -1
- package/dist/assets/chat-1xy90pMn.js +0 -3
- package/dist/assets/chat-CHVUM3s0.js +0 -1
- package/dist/assets/chat-markdown-message-CtLdsT2K.js +0 -1
- package/dist/assets/checkout-continuation-BvY4Kjz7.js +0 -1
- package/dist/assets/checkout-page-CWRkiEj1.js +0 -1
- package/dist/assets/checkout-return-target-_Y86sfo0.js +0 -1
- package/dist/assets/common-EmSgsWNa.js +0 -1
- package/dist/assets/community-page-Dd84pjdI.js +0 -1
- package/dist/assets/companion-surface-page-BvDSOFVH.js +0 -1
- package/dist/assets/composer-settings-DBAb6W2i.js +0 -1
- package/dist/assets/conversation-cache-qk0nNm6Q.js +0 -1
- package/dist/assets/conversation-navigation-B_4jZ9Z2.js +0 -1
- package/dist/assets/conversation-queries-M4Inozp_.js +0 -1
- package/dist/assets/credentials-page-C-e4DqWt.js +0 -1
- package/dist/assets/debug-page-Be5Y5TVM.js +0 -4
- package/dist/assets/developer-page-DD8xa8mQ.js +0 -1
- package/dist/assets/dictation-overlay-page-DZiwww1V.js +0 -1
- package/dist/assets/dist-DMYOKN8y.js +0 -1
- package/dist/assets/document-viewer-page-tTTco75r.js +0 -1
- package/dist/assets/effective-timezone-CHJnU8kZ.js +0 -1
- package/dist/assets/esm-CtKndoc9.js +0 -2
- package/dist/assets/feature-flag-catalog-Cyqf6Ns7.js +0 -1
- package/dist/assets/feed-item-status-actions--CCeCtuw.js +0 -1
- package/dist/assets/format-usd-tespTIex.js +0 -1
- package/dist/assets/general-page-Bi87XguF.js +0 -1
- package/dist/assets/hatching-screen-DA0yyXD1.js +0 -1
- package/dist/assets/hosting-screen-cfhZ-ct7.js +0 -1
- package/dist/assets/identity-CqCxB9QW.js +0 -1
- package/dist/assets/identity-page-route-BjSsi8PM.js +0 -7
- package/dist/assets/index-BmDctEOW.css +0 -2
- package/dist/assets/index-I9kwAKzY.js +0 -11
- package/dist/assets/integrations-page-zrUmh2xn.js +0 -1
- package/dist/assets/intelligence-DXpXyKbw.js +0 -5
- package/dist/assets/keyboard-shortcuts-redirect-page-DSnux9sJ.js +0 -1
- package/dist/assets/library-CuKVNDEp.js +0 -1
- package/dist/assets/local-mode-BNr2MrWI.js +0 -39
- package/dist/assets/media-preview-HgLvcAQ9.js +0 -1
- package/dist/assets/memory-router-playground-page-Bnxf4hzQ.js +0 -1
- package/dist/assets/message-content-weXJNNKO.js +0 -1
- package/dist/assets/messages-CPTfRZA4.js +0 -13
- package/dist/assets/multi-activity-group-AECQlBbV.js +0 -1
- package/dist/assets/native-anchor-Bn22ZLay.js +0 -1
- package/dist/assets/native-biometric-D9IxNvJM.js +0 -6
- package/dist/assets/navigation-resolver-jIQ5B6JB.js +0 -1
- package/dist/assets/notifications-page-GRXZE_lL.js +0 -1
- package/dist/assets/onboarding-DK0I_g8T.js +0 -1
- package/dist/assets/onboarding-layout-GTzgLPSo.js +0 -1
- package/dist/assets/open-workspace-file-CYf_Tqw3.js +0 -2
- package/dist/assets/pdf-file-preview-udA0Apx_.js +0 -1
- package/dist/assets/pdf-preview-6Xfl1tO1.js +0 -2
- package/dist/assets/plans-page-DkVXE0Jv.js +0 -1
- package/dist/assets/plugins-surface-C4Cvus3n.js +0 -1
- package/dist/assets/pointer-BMK9brNn.js +0 -1
- package/dist/assets/popover-D3A6cIyW.js +0 -1
- package/dist/assets/privacy-page-BxJ2Cuev.js +0 -1
- package/dist/assets/privacy-screen-DlSj_9FT.js +0 -1
- package/dist/assets/profile-pickers-B0hfDNt-.js +0 -1
- package/dist/assets/react-query.gen-Bbh5MII3.js +0 -1
- package/dist/assets/react-query.gen-CwRPAiHT.js +0 -1
- package/dist/assets/remote-gateway-session-CzPLaXuT.js +0 -1
- package/dist/assets/remove-from-device-dialog-DeJ_gAmf.js +0 -1
- package/dist/assets/research-onboarding-route-BY3X_d2-.js +0 -50
- package/dist/assets/retire-confirm-dialog-f-A5OVYj.js +0 -1
- package/dist/assets/routes-B7wRw3UT.js +0 -1
- package/dist/assets/routes-OwGjl0BS.js +0 -24
- package/dist/assets/runtime-upgrade-banner-Cj9E7kWP.js +0 -2
- package/dist/assets/schedules-C3wE8OML.js +0 -1
- package/dist/assets/section-membership-vg-XaMPS.js +0 -1
- package/dist/assets/select-assistant-screen-BZxPQqe4.js +0 -1
- package/dist/assets/settings-CEQzAg2m.js +0 -1
- package/dist/assets/settings-layout-DgNBNUT7.js +0 -1
- package/dist/assets/settings-navigation-CVw10LL_.js +0 -1
- package/dist/assets/sound-manager-lHaiHTCh.js +0 -1
- package/dist/assets/sounds-page-BdSO1UIf.js +0 -1
- package/dist/assets/start-screen-CHO19RCi.js +0 -1
- package/dist/assets/upgrade-cancel-page-Dbd3VJdm.js +0 -1
- package/dist/assets/upgrade-success-page-CHbEmpjg.js +0 -1
- package/dist/assets/upload-DwkuEWSz.js +0 -1
- package/dist/assets/use-app-theme-Z0l8oiAF.js +0 -1
- package/dist/assets/use-assistant-avatar-rPqMHOma.js +0 -1
- package/dist/assets/use-bookmarks-Bl4tx8xK.js +0 -1
- package/dist/assets/use-checkout-dismiss-refresh-BHuxVDUc.js +0 -1
- package/dist/assets/use-edge-swipe-C4IrskOL.js +0 -1
- package/dist/assets/use-edge-swipe-back-CiO9raEw.js +0 -2
- package/dist/assets/use-edit-app-ByAfCYIL.js +0 -1
- package/dist/assets/use-is-mobile-q9Lr7beO.js +0 -1
- package/dist/assets/use-local-file-info-DxY8jZ8F.js +0 -1
- package/dist/assets/use-save-twilio-credentials-Bs9sThtb.js +0 -1
- package/dist/assets/use-side-list-room-CUXPQyjw.js +0 -1
- package/dist/assets/use-sticky-profiles-vQLFyEh0.js +0 -1
- package/dist/assets/use-supports-credentials-settings-Cj-Py42f.js +0 -1
- package/dist/assets/use-swipe-engine-b1fkDAV8.js +0 -1
- package/dist/assets/use-touch-mobile-CnqGLpCj.js +0 -1
- package/dist/assets/use-transcript-message-by-id-FmIIrRsf.js +0 -1
- package/dist/assets/use-transcript-messages-Q1PBxvSF.js +0 -3
- package/dist/assets/viewer-store-CwlLnf-k.js +0 -1
- package/dist/assets/voice-page-B1mJ2hkc.js +0 -1
- package/dist/assets/voice-providers-note-TDQxSwUj.js +0 -1
- package/dist/assets/welcome-screen-DPXQU47t.js +0 -1
- package/dist/assets/workspace-page-Mj_A1eeR.js +0 -1
- /package/dist/assets/{account-DEWe1CJv.js → account-BuiU7DuB.js} +0 -0
- /package/dist/assets/{android-consumption-only-4ku7vpy4.js → android-consumption-only-DDbN5hxd.js} +0 -0
- /package/dist/assets/{app-types-DET4dder.js → app-types-Dslgu6TG.js} +0 -0
- /package/dist/assets/{apple-logo-C_J-Nv61.js → apple-logo-DE1DXFS4.js} +0 -0
- /package/dist/assets/{assistant-identity-store-DhAqaifK.js → assistant-identity-store-DrQJhZh3.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-C8vOxkFj.js → avatar-bundled-components-CAE0CJ9e.js} +0 -0
- /package/dist/assets/{avatar-subagent-BnaYyPQQ.js → avatar-subagent-pDrk_xWL.js} +0 -0
- /package/dist/assets/{avatar-svg-compositor-e_lhkR9P.js → avatar-svg-compositor-tf4h3-SV.js} +0 -0
- /package/dist/assets/{avatar-tone-BVUtTeGn.js → avatar-tone-Dp4coAkE.js} +0 -0
- /package/dist/assets/{browser-timezone-BOrwtFs2.js → browser-timezone-DYYSCLn2.js} +0 -0
- /package/dist/assets/{build.umd-CwkQd6wk.js → build.umd-CpV9Yjhm.js} +0 -0
- /package/dist/assets/{by-tool-use-id-index-C1T3QA5-.js → by-tool-use-id-index-BP1pAJzI.js} +0 -0
- /package/dist/assets/{calendar-5ZUL5438.js → calendar-DUfSq9XY.js} +0 -0
- /package/dist/assets/{channels-CXuBInAc.js → channels-DFBLDFWh.js} +0 -0
- /package/dist/assets/{chart-column-Bd2tG_o1.js → chart-column-nt6xAz18.js} +0 -0
- /package/dist/assets/{chat-layout-slots-store-CE2p0OE9.js → chat-layout-slots-store-c4ig5vXx.js} +0 -0
- /package/dist/assets/{check-pgeLaeXx.js → check-NGUguBHp.js} +0 -0
- /package/dist/assets/{chevron-down-CmQCCo_x.js → chevron-down-D1ho6wFA.js} +0 -0
- /package/dist/assets/{chevron-left-02Er54z-.js → chevron-left-D29BeQ4x.js} +0 -0
- /package/dist/assets/{chevron-right-Dwr_Sx98.js → chevron-right-DTpkwA4e.js} +0 -0
- /package/dist/assets/{chevron-up-DHhqG14M.js → chevron-up-bJ8SGTC_.js} +0 -0
- /package/dist/assets/{circle-alert-DvkPmyIg.js → circle-alert-B-Zu9T9V.js} +0 -0
- /package/dist/assets/{circle-check-BlOeCme9.js → circle-check-BQyrCkaB.js} +0 -0
- /package/dist/assets/{circle-check-big-BDMPSnMn.js → circle-check-big-C9sLhbGa.js} +0 -0
- /package/dist/assets/{circle-minus-B5yKBO54.js → circle-minus-DgUiTTwX.js} +0 -0
- /package/dist/assets/{circle-x-CEXUbdoO.js → circle-x-qsWcnNwx.js} +0 -0
- /package/dist/assets/{client.gen-CxTOBLiH.js → client.gen-C1nf2AIs.js} +0 -0
- /package/dist/assets/{clipboard-copy-CEczonMF.js → clipboard-copy-D6VpELQ4.js} +0 -0
- /package/dist/assets/{clock-1REtpnlM.js → clock-CNSYP9nm.js} +0 -0
- /package/dist/assets/{cloud-dqL-JBKK.js → cloud-ByHaCF-x.js} +0 -0
- /package/dist/assets/{cloud-off-CB9uhEDu.js → cloud-off-DioliYf9.js} +0 -0
- /package/dist/assets/{code-u4Wi5zSA.js → code-B7TA1KYq.js} +0 -0
- /package/dist/assets/{coins-CveNnhLe.js → coins-WH-N-3B8.js} +0 -0
- /package/dist/assets/{consent-mbj_kMXO.js → consent-DgQeejGe.js} +0 -0
- /package/dist/assets/{contacts-BRU7ohw2.js → contacts-BQcl-1XL.js} +0 -0
- /package/dist/assets/{conversation-store-DKBwV4bc.js → conversation-store-DdBAApt6.js} +0 -0
- /package/dist/assets/{cpu-BG0rQrMj.js → cpu-CNmn352B.js} +0 -0
- /package/dist/assets/{credential-requests-BbBZKJHx.js → credential-requests-CpHxMIMS.js} +0 -0
- /package/dist/assets/{definitions-Co0yLSy_.js → definitions-BRiVhEtI.js} +0 -0
- /package/dist/assets/{definitions-Yz8Uao4u.js → definitions-I6-Jh5-j.js} +0 -0
- /package/dist/assets/{diff-rows-BrFK496i.js → diff-rows-BVvdLrrS.js} +0 -0
- /package/dist/assets/{download-DnnvWjPo.js → download-C7_XK23s.js} +0 -0
- /package/dist/assets/{edge-swipe-arbiter-store-BGBvaPTd.js → edge-swipe-arbiter-store-Cgt2wsOY.js} +0 -0
- /package/dist/assets/{edit-chat-session-CiXnUJPh.js → edit-chat-session-BUx2LvCf.js} +0 -0
- /package/dist/assets/{ellipsis-4L6z7PhT.js → ellipsis-DLgXzWgN.js} +0 -0
- /package/dist/assets/{ellipsis-vertical-CJX4FZlb.js → ellipsis-vertical-D3SJdQ4P.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-BIIBfSqk.js → emoji-catalog-data-DXFYOvKt.js} +0 -0
- /package/dist/assets/{environment-store-C4So_j-o.js → environment-store-rZ0hkMHt.js} +0 -0
- /package/dist/assets/{esm-CPFvOH-c.js → esm-Cz8_Dotd.js} +0 -0
- /package/dist/assets/{esm-BJhqsukI.js → esm-DBGqhIh5.js} +0 -0
- /package/dist/assets/{event-bus-B-wwSVzo.js → event-bus-QJe_MFOc.js} +0 -0
- /package/dist/assets/{external-link-B-pfCiUo.js → external-link-DCA91uI6.js} +0 -0
- /package/dist/assets/{external-urls-Bg18AU4S.js → external-urls-DWYQKJEq.js} +0 -0
- /package/dist/assets/{eye-CHlTF_ct.js → eye-C5DUd2Vd.js} +0 -0
- /package/dist/assets/{eye-off-0lRvXR9p.js → eye-off-8cYeidA6.js} +0 -0
- /package/dist/assets/{file-DVQXh8CW.js → file-BgKbUJNS.js} +0 -0
- /package/dist/assets/{file-code-A080HCxh.js → file-code-CS8NbZbG.js} +0 -0
- /package/dist/assets/{file-plus-C_Iw4p49.js → file-plus-DLtgfqcS.js} +0 -0
- /package/dist/assets/{file-text-DpdlyCly.js → file-text-BEpL7wIA.js} +0 -0
- /package/dist/assets/{folder-B0UQA6jd.js → folder-6DGJLMuE.js} +0 -0
- /package/dist/assets/{folder-open-BU6EPS8G.js → folder-open-Cz-3FN-E.js} +0 -0
- /package/dist/assets/{format-date-B_oQDqU9.js → format-date-DEIFj6w3.js} +0 -0
- /package/dist/assets/{format-file-size-ByNX0dQR.js → format-file-size-CaQu4Lyo.js} +0 -0
- /package/dist/assets/{globe-COrlg99x.js → globe-BJuNFSn-.js} +0 -0
- /package/dist/assets/{hard-drive-BV9-fN_J.js → hard-drive-zWkzTs9d.js} +0 -0
- /package/dist/assets/{hard-navigate-CNxvVrtC.js → hard-navigate-D1rxKLPg.js} +0 -0
- /package/dist/assets/{heart-Bd-pnn1X.js → heart-DBsRPrRH.js} +0 -0
- /package/dist/assets/{home-BwSxL4rM.js → home-ySv5rBLy.js} +0 -0
- /package/dist/assets/{image-DsrjUDQh.js → image-DntHMHHo.js} +0 -0
- /package/dist/assets/{inbox-BcZU66Rf.js → inbox-Qye1DBie.js} +0 -0
- /package/dist/assets/{info-Bn2hbIVl.js → info-D0qquAkS.js} +0 -0
- /package/dist/assets/{interactive-target-CXv5tgJB.js → interactive-target-DT1VQruY.js} +0 -0
- /package/dist/assets/{is-electron-wgAC5Mzb.js → is-electron-C9-jl_HE.js} +0 -0
- /package/dist/assets/{key-round-C51ZTEMu.js → key-round-DcfNNfNG.js} +0 -0
- /package/dist/assets/{laptop-DoAUvmjX.js → laptop-C9BtnRjX.js} +0 -0
- /package/dist/assets/{layout-grid-lHmG2izK.js → layout-grid-CBeP_IMO.js} +0 -0
- /package/dist/assets/{lightbulb-moe9FubK.js → lightbulb-DIV0FA-e.js} +0 -0
- /package/dist/assets/{link-2-BBS4SmE3.js → link-2-CTrfUFQw.js} +0 -0
- /package/dist/assets/{link-V2w-GAhr.js → link-Dpgek1RH.js} +0 -0
- /package/dist/assets/{link-click-BsxbQxDe.js → link-click-DxspyBl6.js} +0 -0
- /package/dist/assets/{list-6yken9qv.js → list-Dn1NSBlc.js} +0 -0
- /package/dist/assets/{loader-circle-DYe85z3g.js → loader-circle-C9QjVTuc.js} +0 -0
- /package/dist/assets/{log-in-BsEhSW6v.js → log-in-DQ2oMzUv.js} +0 -0
- /package/dist/assets/{log-out-Dvz6dWwJ.js → log-out-nq6T7R9r.js} +0 -0
- /package/dist/assets/{logs-Blq4k473.js → logs-BsCB67bq.js} +0 -0
- /package/dist/assets/{machine-sizes-DzJ0TVYS.js → machine-sizes-Wnvi4rGR.js} +0 -0
- /package/dist/assets/{mail-9qQtaWSe.js → mail-BFnJM9hP.js} +0 -0
- /package/dist/assets/{message-circle-CQpMnPIR.js → message-circle-Cbwq_S7o.js} +0 -0
- /package/dist/assets/{message-square-ameAY_Gq.js → message-square-CENNR7tf.js} +0 -0
- /package/dist/assets/{message-square-text-C0iNfHuJ.js → message-square-text-Cnv84xQi.js} +0 -0
- /package/dist/assets/{mic-yJxjqdDR.js → mic-W9IfxqWv.js} +0 -0
- /package/dist/assets/{minimize-2-dhLse52Y.js → minimize-2-CcBLJXor.js} +0 -0
- /package/dist/assets/{misc-B24X-saO.js → misc-giJA2hbh.js} +0 -0
- /package/dist/assets/{monitor-BHYV5XBf.js → monitor-C7Po319a.js} +0 -0
- /package/dist/assets/{moon-CZZGDGLY.js → moon-D2HTb8zV.js} +0 -0
- /package/dist/assets/{oauth-connection-utils-19Tfw-lp.js → oauth-connection-utils-dPIUOXze.js} +0 -0
- /package/dist/assets/{oauth-popup-CrXEFWPi.js → oauth-popup-DIeDxfkO.js} +0 -0
- /package/dist/assets/{onboarding-navigation-C-Kk3_ll.js → onboarding-navigation-CUL0t0Am.js} +0 -0
- /package/dist/assets/{onboarding-step-layout-2G2ptxpI.js → onboarding-step-layout-00YhfBar.js} +0 -0
- /package/dist/assets/{optimistic-lifecycle-D1yMW3VK.js → optimistic-lifecycle-gXn1rGfw.js} +0 -0
- /package/dist/assets/{page-empty-state-CzHxZkBR.js → page-empty-state-CpkB0rZ_.js} +0 -0
- /package/dist/assets/{page-surface-store-DJLLsNFC.js → page-surface-store-BvbPgWRr.js} +0 -0
- /package/dist/assets/{paperclip-T-MRlqdF.js → paperclip-CF2Q8ys8.js} +0 -0
- /package/dist/assets/{pdf-UON6A_nT.js → pdf-BdZA1URW.js} +0 -0
- /package/dist/assets/{pencil-Ba0D7tjH.js → pencil-RFB2IyLT.js} +0 -0
- /package/dist/assets/{play-dZ2h3AT7.js → play-DTmq7Qfg.js} +0 -0
- /package/dist/assets/{plug-sTs_y01k.js → plug-CVzxWCFR.js} +0 -0
- /package/dist/assets/{plugin-attribution-C0u-eDRH.js → plugin-attribution-rEWhA-PP.js} +0 -0
- /package/dist/assets/{plus-CWkbiq1y.js → plus-BDSluxb4.js} +0 -0
- /package/dist/assets/{prechat-CHD2UKHx.js → prechat-CGdKFXs3.js} +0 -0
- /package/dist/assets/{preview-skeleton-Be9eHMn9.js → preview-skeleton-BStSegQN.js} +0 -0
- /package/dist/assets/{profile-metadata-D9zzZn4_.js → profile-metadata-B1fA1_W5.js} +0 -0
- /package/dist/assets/{public-asset-CNgVJ7i4.js → public-asset-Du947SLt.js} +0 -0
- /package/dist/assets/{puzzle-DHy-ePUL.js → puzzle-C5CgkzuA.js} +0 -0
- /package/dist/assets/{radio-card-nav-CrM7VJUk.js → radio-card-nav-hVd-im6E.js} +0 -0
- /package/dist/assets/{reduced-motion-D8oweJF_.js → reduced-motion-Cste44pe.js} +0 -0
- /package/dist/assets/{refresh-cw-p138DTtp.js → refresh-cw-DwfKxRXV.js} +0 -0
- /package/dist/assets/{remote-web-DBCYTF2P.js → remote-web-BX-aNmAz.js} +0 -0
- /package/dist/assets/{repeat-BL0WDPMw.js → repeat-ORyt0N0E.js} +0 -0
- /package/dist/assets/{rotate-ccw-Cs7aCSL9.js → rotate-ccw-Cc2yZNdm.js} +0 -0
- /package/dist/assets/{schedules-Co4-ymK5.js → schedules-BXXSRQs5.js} +0 -0
- /package/dist/assets/{sdk.gen-CoXhzo__.js → sdk.gen-bruWelSm.js} +0 -0
- /package/dist/assets/{search-D_t5oHhF.js → search-FGnzWjRX.js} +0 -0
- /package/dist/assets/{semver-C2-EZfiR.js → semver-D1eVfLWz.js} +0 -0
- /package/dist/assets/{send-Dwk9mFMC.js → send-CnqSHaqf.js} +0 -0
- /package/dist/assets/{setting-row-BvQpFvtr.js → setting-row-CqyX0EBz.js} +0 -0
- /package/dist/assets/{settings-B-74NxzZ.js → settings-CyYRtP_K.js} +0 -0
- /package/dist/assets/{shield-Sw65VSPa.js → shield-CKMzW_Un.js} +0 -0
- /package/dist/assets/{shield-check-B-3lr0Uj.js → shield-check-B5eUPC8R.js} +0 -0
- /package/dist/assets/{shim-CcP58yVZ.js → shim-BE9ID8Pw.js} +0 -0
- /package/dist/assets/{skill-icon-yVnZg-J1.js → skill-icon-CSLUbHBD.js} +0 -0
- /package/dist/assets/{sliders-horizontal-CQIT2VGH.js → sliders-horizontal-GQpDB0wo.js} +0 -0
- /package/dist/assets/{smartphone-AcA2Q0mQ.js → smartphone-CWnipfJ7.js} +0 -0
- /package/dist/assets/{sparkles-Bhr0JiLM.js → sparkles-DvB22tVW.js} +0 -0
- /package/dist/assets/{square-rBIWdRdF.js → square-CLyLyc89.js} +0 -0
- /package/dist/assets/{sun-BzqYfTxT.js → sun-sLCgv7zn.js} +0 -0
- /package/dist/assets/{surface-parse-helpers-X2hFvbHP.js → surface-parse-helpers-DrfM4_wl.js} +0 -0
- /package/dist/assets/{terminal-CttH6-2_.js → terminal-CIR8bWcg.js} +0 -0
- /package/dist/assets/{terminal-_tzbWcM4.js → terminal-Dily8RM4.js} +0 -0
- /package/dist/assets/{three-dot-indicator-CYYJ1RDJ.js → three-dot-indicator-BUucQBI1.js} +0 -0
- /package/dist/assets/{trash-2-V2WT_DbX.js → trash-2-DnajdgJS.js} +0 -0
- /package/dist/assets/{triangle-alert-43gIbLca.js → triangle-alert-B-18Pims.js} +0 -0
- /package/dist/assets/{use-body-scroll-lock-DmT5-Tka.js → use-body-scroll-lock-CMCNMYPC.js} +0 -0
- /package/dist/assets/{use-discord-nudge-C5OzjNEk.js → use-discord-nudge-B-qg81ow.js} +0 -0
- /package/dist/assets/{use-element-size-B_jzGsxt.js → use-element-size-Cgo4THI9.js} +0 -0
- /package/dist/assets/{use-media-query-oO6k9fDB.js → use-media-query-DSngkas0.js} +0 -0
- /package/dist/assets/{use-truncated-blob-text-BYAPiP8I.js → use-truncated-blob-text-DYvFk3Fv.js} +0 -0
- /package/dist/assets/{web-Cpz2h_dP.js → web-0-rqi4je.js} +0 -0
- /package/dist/assets/{web-CXad-fWd.js → web-8fcyoNsL.js} +0 -0
- /package/dist/assets/{web-B60tNeyj.js → web-DCamMnI1.js} +0 -0
- /package/dist/assets/{web-Nd-L7NoL.js → web-DIlEhBsT.js} +0 -0
- /package/dist/assets/{web-W2HEHjFb.js → web-DsVO-tkH.js} +0 -0
- /package/dist/assets/{web-Cr238HhI.js → web-aW1scjmM.js} +0 -0
- /package/dist/assets/{web-BSizndvP.js → web-eVpCzMlE.js} +0 -0
- /package/dist/assets/{workflow-status-CGIYm2p7.js → workflow-status-notSUy4k.js} +0 -0
- /package/dist/assets/{workspace-BFa6JWKe.js → workspace-Ch5zHBn1.js} +0 -0
- /package/dist/assets/{workspace-path-links-CWERAV56.js → workspace-path-links-BVdQi6RQ.js} +0 -0
- /package/dist/assets/{workspace-theme-tokens-CJpxBUQ3.js → workspace-theme-tokens-Dae42Dzg.js} +0 -0
- /package/dist/assets/{xterm-DFQikp5h.js → xterm-Ds08b1dp.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-B04vX_IV.js → xterm-addon-fit-DAq2qzya.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{r as t}from"./capture-error-DiNp24s6.js";import{t as n}from"./react-BFJW0bSv.js";import{W as r,t as i}from"./button-VkxVX0DM.js";import{n as a}from"./QueryClientProvider-EuRl-wrW.js";import{t as o}from"./useQuery-CTSuec5b.js";import{t as s}from"./jsx-runtime-BJ8jcmzB.js";import{t as c}from"./cn-Cf8SmgbR.js";import{t as l}from"./typography-DekrYXvs.js";import{o as u}from"./list-row-CDwzGT9g.js";import{t as d}from"./chevron-down-CmQCCo_x.js";import{t as f}from"./chevron-right-Dwr_Sx98.js";import{t as p}from"./loader-circle-DYe85z3g.js";import{R as m}from"./src-CImIAPTd.js";import{n as h,t as g}from"./input-DkgpMeG9.js";import{t as _}from"./toggle-0qt1e_3r.js";import{t as v}from"./modal-UYNawsIu.js";import{n as y}from"./toast-DqqWkjsh.js";import{t as b}from"./select-BKyejRky.js";import{t as x}from"./assistant-identity-store-DhAqaifK.js";import{t as S}from"./is-electron-wgAC5Mzb.js";import{s as C}from"./i18n-C9hRT4Lf.js";import{t as w}from"./Trans-FBE1EuwL.js";import{t as T}from"./useTranslation-D9pPv-bA.js";import{r as E}from"./api-errors-CASENJGT.js";import{A as D,B as ee,D as O,E as k,F as A,N as j,O as M,P as N,R as P,d as F,j as I,k as L,s as R,u as z,w as B,z as V}from"./profile-pickers-B0hfDNt-.js";import{i as te,n as ne,o as H}from"./utils-BEkyAhbA.js";import{Gt as re,Wt as ie,Xt as ae,Yt as oe,dr as se,fr as ce}from"./sdk.gen-CiE6cMi0.js";import{n as U}from"./use-platform-gate-DG9Xg3Hs.js";import{r as le}from"./use-is-org-ready-GDBxqujc.js";import{Dt as ue,Et as de,Z as fe,u as pe}from"./react-query.gen-Bbh5MII3.js";var W=e(n(),1),me={maxTokens:!1,contextWindow:!1,effort:!1,speed:!1,verbosity:!1,temperature:!1,topP:!1,thinking:!1,thinkingLevel:!1};function G(e){return e===`gpt-5`||e.startsWith(`gpt-5.`)||e.startsWith(`gpt-5-`)}function K(e){return e.startsWith(`anthropic/`)}function he(e,t){let n=t.toLowerCase();return V(e).find(e=>e.id.toLowerCase()===n)}function q(e,t){return he(e,t)?.adaptiveThinkingOnly===!0}function ge(e){return K(e)||e.startsWith(`x-ai/grok-4`)||e.startsWith(`deepseek/deepseek-r1`)||e===`qwen/qwen3.5-plus-02-15`||e===`qwen/qwen3.5-397b-a17b`||e===`moonshotai/kimi-k2.6`}var J=[`minimal`,`low`,`medium`,`high`],_e=[`low`,`medium`,`high`];function ve(e){return/^gemini-3.*pro/.test(e)}var Y=new Set(J);function ye(e){return typeof e==`string`&&Y.has(e)}function be(e){return ve(e.toLowerCase())?_e:J}function xe(e,t){let n=he(e,t);return n?.supportsThinking===void 0?e===`anthropic`?!0:e===`openrouter`?ge(t):e===`vercel-ai-gateway`?K(t):!1:n.supportsThinking}function Se(e,t,n){return e===`anthropic`?!t.includes(`haiku`)&&n:e===`openai`?G(t):e===`openrouter`||e===`vercel-ai-gateway`?K(t)?!t.includes(`haiku`)&&n:n:e===`fireworks`||e===`together`||e===`baseten`?n:!1}var Ce=new Set([`openai-compatible`,`fireworks`,`minimax`,`atlascloud`,`baseten`,`ollama`,`openrouter`,`together`,`vercel-ai-gateway`]);function X(e,t){return t||Ce.has(e)}function we(e,t){if(!e||!t)return me;let n=e.toLowerCase(),r=n===`chatgpt`?`openai`:n,i=t.toLowerCase(),a=r===`anthropic`||(r===`openrouter`||r===`vercel-ai-gateway`)&&K(i),o=xe(r,i);return{maxTokens:!0,contextWindow:!0,effort:Se(r,i,o),speed:r===`anthropic`&&i.includes(`opus`),verbosity:r===`openai`&&G(i),temperature:a,topP:X(r,a),thinking:(r===`anthropic`||r===`openrouter`||r===`vercel-ai-gateway`&&K(i))&&o&&!q(r,i),thinkingLevel:r===`gemini`&&o}}var Z=s(),Q=[`inherit`,`none`,`low`,`medium`,`high`,`xhigh`,`max`],Te=[`standard`,`fast`],Ee=[`low`,`medium`,`high`],De=`default`,Oe=64e3;function ke({label:e,value:t,onChange:n,defaultValue:r,max:a,disabled:o}){let{t:s}=T(`settings`),c=t===null,l=t??r,[u,d]=(0,W.useState)(c?``:String(t)),[f,p]=(0,W.useState)(t);t!==f&&(p(t),d(t===null?``:String(t)));function h(e){d(e);let t=e.trim();if(t===``){n(null);return}let r=Number(t);Number.isFinite(r)&&r>=1e3&&r<=a&&n(r)}function _(e){let r=e.trim();if(r===``){n(null);return}let i=Number(r);if(!Number.isFinite(i)){d(t===null?``:String(t));return}let o=z(i,a);d(String(o)),n(o)}return(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:e}),c?(0,Z.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:s(`profileAdvancedParams.defaultValueLabel`,{value:F(r)})}):null]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`div`,{className:`flex-1`,children:(0,Z.jsx)(m,{value:l,onValueChange:e=>n(typeof e==`number`?e:e[0]),min:L,max:a,step:D,disabled:o,"aria-label":e})}),(0,Z.jsx)(g,{type:`number`,inputMode:`numeric`,value:u,placeholder:String(r),onChange:e=>h(e.target.value),onBlur:e=>_(e.target.value),onKeyDown:e=>{e.key===`Enter`&&_(e.currentTarget.value)},min:L,max:a,step:D,disabled:o,"aria-label":s(`profileAdvancedParams.tokensAriaLabel`,{label:e}),wrapperClassName:`w-32 shrink-0`,className:`text-right tabular-nums`}),(0,Z.jsx)(i,{variant:`ghost`,size:`compact`,onClick:()=>n(null),disabled:o||c,children:s(`profileAdvancedParams.reset`)})]})]})}function Ae({visibility:e,isReadOnly:t,model:n,selectedModel:r,defaultMaxOutputTokens:i,defaultContextWindowMaxInputTokens:a,maxTokens:o,onMaxTokensChange:s,contextWindowMaxInputTokens:c,onContextWindowChange:l,effort:d,onEffortChange:f,speed:p,onSpeedChange:h,verbosity:g,onVerbosityChange:v,temperatureEnabled:y,onTemperatureEnabledChange:b,temperature:x,onTemperatureChange:S,topPEnabled:C,onTopPEnabledChange:w,topP:E,onTopPChange:D,thinkingEnabled:ee,onThinkingEnabledChange:O,thinkingStreamThinking:k,onThinkingStreamThinkingChange:A,thinkingLevel:j,onThinkingLevelChange:M}){let{t:N}=T(`settings`),P=R(),F=r?.maxOutputTokens??Oe,I=r?.contextWindowTokens??2e5,L=Math.min(i??Oe,F),z=Math.min(a??2e5,I);return(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[!t&&P&&(0,Z.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:N(`profileAdvancedParams.snapshotsHint`)}),e.maxTokens&&(0,Z.jsx)(ke,{label:N(`profileAdvancedParams.maxOutputTokensLabel`),value:o,onChange:s,defaultValue:L,max:F,disabled:t}),e.contextWindow&&(0,Z.jsx)(ke,{label:N(`profileAdvancedParams.contextWindowLabel`),value:c,onChange:l,defaultValue:z,max:I,disabled:t||!r}),e.effort&&(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:N(`profileAdvancedParams.effortLabel`)}),(0,Z.jsx)(u,{items:Q.map(e=>({value:e,label:e===`inherit`?N(`profileAdvancedParams.effortSegmentDefault`):e,disabled:t})),value:d,onChange:e=>f(e),ariaLabel:N(`profileAdvancedParams.effortLabel`)})]}),e.speed&&(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:N(`profileAdvancedParams.speedLabel`)}),(0,Z.jsx)(u,{items:Te.map(e=>({value:e,label:e,disabled:t})),value:p,onChange:e=>h(e),ariaLabel:N(`profileAdvancedParams.speedLabel`)})]}),e.verbosity&&(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:N(`profileAdvancedParams.verbosityLabel`)}),(0,Z.jsx)(u,{items:Ee.map(e=>({value:e,label:e,disabled:t})),value:g,onChange:e=>v(e),ariaLabel:N(`profileAdvancedParams.verbosityLabel`)})]}),e.temperature&&(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(_,{checked:y,onChange:e=>b(e),label:N(`profileAdvancedParams.temperatureLabel`),disabled:t}),y&&(0,Z.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,Z.jsx)(`div`,{className:`flex-1`,children:(0,Z.jsx)(m,{value:x,onValueChange:e=>S(typeof e==`number`?e:e[0]),min:0,max:2,step:.01,disabled:t,showValue:!0,formatValue:e=>typeof e==`number`?e.toFixed(2):String(e)})})})]}),e.topP&&(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(_,{checked:C,onChange:e=>w(e),label:N(`profileAdvancedParams.topPLabel`),disabled:t}),C&&(0,Z.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,Z.jsx)(`div`,{className:`flex-1`,children:(0,Z.jsx)(m,{value:E,onValueChange:e=>D(typeof e==`number`?e:e[0]),min:0,max:1,step:.01,disabled:t,showValue:!0,formatValue:e=>typeof e==`number`?e.toFixed(2):String(e)})})})]}),e.thinking&&(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsx)(_,{checked:ee,onChange:e=>{O(e),e||A(!1)},label:N(`profileAdvancedParams.enableExtendedThinkingLabel`),disabled:t}),ee&&(0,Z.jsx)(`div`,{className:`pl-4`,children:(0,Z.jsx)(_,{checked:k,onChange:e=>A(e),label:N(`profileAdvancedParams.streamThinkingTokensLabel`),disabled:t})})]}),e.thinkingLevel&&(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsxs)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:[N(`profileAdvancedParams.thinkingLevelLabel`),` `,(0,Z.jsx)(`span`,{className:`text-[var(--content-disabled)]`,children:N(`profileAdvancedParams.thinkingLevelInheritHint`)})]}),(0,Z.jsx)(u,{items:[`default`,...be(n)].map(e=>({value:e,label:`${e}`,disabled:t})),value:j,onChange:M,ariaLabel:N(`profileAdvancedParams.thinkingLevelLabel`)})]})]})}function je(e){return V(e).filter(e=>j.has(e.id))}function Me(e,t,n){return!e||V(e).length===0?!1:(t?n.find(e=>e.name===t):void 0)?.auth.type===`oauth_subscription`?!0:!t&&n.length>0&&n.every(e=>e.auth.type===`oauth_subscription`)}var Ne=[`anthropic`,`openai`,`gemini`,`ollama`,`fireworks`,`together`,`openrouter`,`vercel-ai-gateway`,`minimax`,`atlascloud`,`litellm`,`baseten`,`poolside`,`openai-compatible`];function Pe(e){return e===`ollama`?`none`:`api_key`}function Fe(e){let t=e.split(`/`);return t.length<3||t[0]!==`credential`?null:{service:t[1],field:t.slice(2).join(`/`)}}function Ie(e){switch(e){case 409:return`A provider with these settings already exists.`;case 404:return`Provider not found. It may have been removed.`;case 400:return`Invalid configuration. Check the provider settings.`;default:return`Failed to save provider. Please try again.`}}function Le(e,t){if(e!==400)return;let n=t?.error?.message;return typeof n==`string`&&n.length>0?n:void 0}function Re(e){return e.label?e.label:e.auth.type===`oauth_subscription`?A.chatgpt:A[e.provider]??e.provider}var ze=new Set([`ollama`]);function Be(e,t){return e===t?!0:e===`vellum`&&O.has(t)}function Ve(e,t){return!ze.has(e)||t}function He(e){return k.filter(t=>Ve(t,e))}function Ue(e){return Ne.filter(t=>Ve(t,e))}function We(e){return Object.keys(N).filter(t=>Ve(t,e))}function Ge(){return He(U())}function Ke(){return Ue(U())}function qe(){return We(U())}function Je(e,t){let n=[...new Set(e.map(e=>e.provider))].filter(e=>Ve(e,t)),r=[];return n.includes(`vellum`)&&r.push(I),n.includes(`chatgpt`)&&r.push(B),r.push(...Ne.filter(e=>n.includes(e)),...n.filter(e=>e!==`vellum`&&e!==`chatgpt`&&!Ne.includes(e))),r}function Ye(e,t){let n=new Set(e.map(e=>e.provider));return Ue(t).filter(e=>e!==`openai-compatible`&&!n.has(e))}var Xe=`::`;function $(e,t){return`${e}${Xe}${t}`}function Ze(e){let t=e.indexOf(Xe);return t<=0?null:{provider:e.slice(0,t),connectionName:e.slice(t+2)}}var Qe=new Set([I,B]);function $e(e){let t=new Map;for(let n of e)Qe.has(n.provider)||n.provider===`openai-compatible`||t.set(n.provider,(t.get(n.provider)??0)+1);return new Set([...t.entries()].filter(([,e])=>e>=2).map(([e])=>e))}function et(e,t,n,r=`Default`){let i=$e(t),a=[];for(let o of e){if(o===`vellum`){a.push({value:o,label:n(o),meta:`Managed`});continue}if(o===`openai-compatible`){for(let e of t)e.provider===`openai-compatible`&&a.push({value:$(o,e.name),label:e.label&&e.label.trim()!==``?e.label:e.name,meta:`Custom`});continue}if(!i.has(o)){a.push({value:o,label:n(o)});continue}a.push({value:o,label:n(o),meta:r});for(let e of t)e.provider===o&&a.push({value:$(o,e.name),label:e.label&&e.label.trim()!==``?e.label:e.name,meta:n(o)})}return a}function tt(e){return(e??[]).map(e=>({id:e.id,displayName:e.displayName??e.id}))}var nt=`__custom-model-id__`;function rt({text:e}){return(0,Z.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:e})}function it({provider:e,model:t,providerConnection:n,onProviderChange:r,onModelChange:a,onConnectionChange:o,connections:s,isReadOnly:c,availableConnectionsForProvider:u,connectionNotFound:d,hideProviderField:f=!1,providerError:p=null}){let m=e.length>0&&t.length===0,{t:h}=T(`settings`),[_,v]=(0,W.useState)(!1),y=Me(e,n,u),x=e!==``&&e!==`chatgpt`&&!y;(0,W.useEffect)(()=>{x||v(!1)},[e,x]);function S(e){if(e===nt){v(!0),a(``);return}a(e)}let C=qe(),w=U(),E=(0,W.useMemo)(()=>{let t=Je(s??[],w);return e&&!t.includes(e)?[...t,e]:t},[s,e,w]),D=s===void 0?C:E,ee=D.length===0&&!c,O=e===`openai`&&!c&&u.length===0&&(s??[]).some(e=>e.provider===`chatgpt`||e.auth.type===`oauth_subscription`)?h(`profileEditor.subscriptionSteeringHint`):void 0,k=(0,W.useMemo)(()=>{if(!e)return[];let t=V(e);if(t.length>0)return Me(e,n,u)?je(e):t;if(n){let e=u.find(e=>e.name===n);return e?tt(e.models):[]}let r=new Set,i=[];for(let e of u)for(let t of e.models??[])r.has(t.id)||(r.add(t.id),i.push({id:t.id,displayName:t.displayName??t.id}));return i},[e,n,u]),j=(0,W.useMemo)(()=>{if(!t||k.some(e=>e.id===t))return k;let n=V(e).find(e=>e.id===t),r=u.flatMap(e=>e.models??[]).find(e=>e.id===t),i=n?.displayName??r?.displayName??t;return[...k,{id:t,displayName:i}]},[t,k,e,u]),N=e?k.length===0?e===`openai-compatible`?`configure-connection`:`unknown-to-catalog`:null:`no-provider`,P=(0,W.useMemo)(()=>{switch(N){case`no-provider`:return{placeholder:h(`profileEditorProviderSection.modelEmptyNoProviderPlaceholder`),hint:null};case`configure-connection`:return{placeholder:h(`profileEditorProviderSection.modelEmptyConfigureConnectionPlaceholder`),hint:h(`profileEditorProviderSection.modelEmptyConfigureConnectionHint`)};case`unknown-to-catalog`:return{placeholder:h(`profileEditorProviderSection.modelEmptyUnknownPlaceholder`),hint:h(`profileEditorProviderSection.modelEmptyUnknownHint`)};default:return null}},[N,h]);(0,W.useEffect)(()=>{if(!e||_)return;let n=V(e);n.length>0&&!n.some(e=>e.id===t)||t&&k.length>0&&!k.some(e=>e.id===t)&&a(``)},[t,k,a,e,_]);let F=h(`aiProviderPicker.defaultEntryMeta`),I=(0,W.useMemo)(()=>{let t=et(D,s??[],e=>A[e]??e,F).map(({value:e,label:t,meta:n})=>({value:e,label:t,suffix:n?(0,Z.jsx)(rt,{text:n}):void 0}));return d&&e===`openai-compatible`&&n&&t.push({value:$(M,n),label:`${n} ${h(`profileEditorProviderSection.providerNotFoundSuffix`)}`,suffix:void 0}),e===`openai-compatible`&&!n&&t.push({value:M,label:A[`openai-compatible`]??`openai-compatible`,suffix:void 0}),t},[D,s,d,e,n,F,h]),L=e&&n?$(e,n):null,R=(()=>{if(!n)return null;let e=s?.find(e=>e.name===n);return e&&(e.provider===`vellum`||e.provider===`chatgpt`)?e.provider:null})(),z=e=>I.some(t=>t.value===e),B=L!==null&&z(L)?L:R!==null&&z(R)?R:e;return(0,Z.jsxs)(Z.Fragment,{children:[!f&&(0,Z.jsx)(b,{id:`profile-editor-provider`,label:h(`profileEditorProviderSection.providerLabel`),errorText:p&&ee?h(`profileEditorProviderSection.noProviderConnectionsHint`):p,helperText:ee&&!p?h(`profileEditorProviderSection.noProviderConnectionsHint`):O,value:B,onChange:t=>{let n=Ze(t);if(n){r(n.provider),o(n.connectionName);return}r(t),t===e&&o(``)},disabled:c,placeholder:h(`profileEditorProviderSection.selectProviderPlaceholder`),options:I}),d&&!c&&(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:h(`profileEditorProviderSection.connectionNotFound`)}),(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:h(`profileEditorProviderSection.modelLabel`)}),_?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(g,{value:t,onChange:e=>a(e.target.value),disabled:c,placeholder:h(`profileEditorProviderSection.customModelPlaceholder`),"aria-label":h(`profileEditorProviderSection.customModelAriaLabel`),fullWidth:!0,autoFocus:!0}),(0,Z.jsx)(i,{variant:`link`,size:`compact`,disabled:c,onClick:()=>v(!1),children:h(`profileEditorProviderSection.chooseFromList`)})]}):(0,Z.jsx)(b,{value:t,onChange:S,disabled:c||!e,"aria-label":h(`profileEditorProviderSection.modelAriaLabel`),placeholder:P?.placeholder??h(`profileEditorProviderSection.selectModelPlaceholder`),options:[...j.map(e=>({value:e.id,label:e.displayName})),...x?[{value:nt,label:h(`profileEditorProviderSection.enterCustomModelIdOption`)}]:[]]}),_?(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:h(`profileEditorProviderSection.enterCustomModelIdHint`)}):m&&!c?(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:P?.hint??h(`profileEditorProviderSection.selectModelError`)}):null]})]})}var at=e(r(),1);function ot(e,t,n){return[`credentialPresence`,e,t,n]}function st({assistantId:e,credentialKind:n,credentialName:r,enabled:i=!0}){let a=le(),s=o({queryKey:ot(e??``,n,r),queryFn:async()=>{let{data:t}=await ce({path:{assistant_id:e},body:{type:n,name:r},throwOnError:!0});return t.found},enabled:!!e&&i&&a,retry:t,staleTime:3e4});return{hasStoredCredential:s.data??!1,isLoading:s.isLoading}}function ct({assistantId:e,onConnected:t}){let{t:n}=T(`settings`),[r,a]=(0,W.useState)(`idle`),[o,s]=(0,W.useState)(``),[c,u]=(0,W.useState)(null);async function d(){a(`starting`),u(null);let t=window.open(`about:blank`,`_blank`);try{let{data:{authorize_url:n}}=await re({path:{assistant_id:e},throwOnError:!0});t?(t.opener=null,t.location.href=n):window.open(n,`_blank`,`noopener`),a(`paste_url`)}catch{t?.close(),a(`failed`),u(C(`settings:chatgptOauthSection.startFailed`))}}async function f(){u(null);let n=o.trim();if(!n){u(C(`settings:chatgptOauthSection.pasteUrlError`));return}let r;try{r=new URL(n)}catch{u(C(`settings:chatgptOauthSection.invalidUrl`));return}let i=r.searchParams.get(`code`),s=r.searchParams.get(`state`);if(!i){u(C(`settings:chatgptOauthSection.missingCode`));return}if(!s){u(C(`settings:chatgptOauthSection.missingState`));return}a(`exchanging`);try{await ie({path:{assistant_id:e},body:{code:i,state:s},throwOnError:!0}),a(`completed`);let{data:n}=await oe({path:{assistant_id:e},throwOnError:!0});t(n.connections.find(e=>e.name===`chatgpt-subscription`||e.name===`openai-chatgpt`)||{name:`chatgpt-subscription`,provider:`chatgpt`,auth:{type:`oauth_subscription`,credential:`credential/openai/chatgpt-subscription`},label:`ChatGPT Subscription`,createdAt:Date.now(),updatedAt:Date.now(),baseUrl:null,models:null,isManaged:!1})}catch{a(`failed`),u(C(`settings:chatgptOauthSection.completeFailed`))}}function m(){a(`idle`),s(``),u(null)}return(0,Z.jsxs)(`div`,{className:`space-y-3 rounded-lg border border-[var(--border-base)] p-4`,children:[(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:n(`chatgptOauthSection.intro`)}),r===`idle`||r===`paste_url`?(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:r===`paste_url`?`text-[var(--content-tertiary)] line-through`:`text-[var(--content-secondary)]`,children:n(r===`idle`?`chatgptOauthSection.step1Idle`:`chatgptOauthSection.step1PasteUrl`)}),(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-secondary)]`,children:n(`chatgptOauthSection.step2`)}),(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-secondary)]`,children:n(`chatgptOauthSection.step3`)})]}),r===`idle`?(0,Z.jsx)(i,{variant:`outlined`,size:`compact`,onClick:()=>void d(),children:n(`chatgptOauthSection.signInButton`)}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(g,{value:o,onChange:e=>{s(e.target.value),u(null)},placeholder:n(`chatgptOauthSection.urlPlaceholder`),fullWidth:!0}),(0,Z.jsx)(`div`,{className:`flex justify-end`,children:(0,Z.jsx)(i,{variant:`primary`,size:`compact`,disabled:!o.trim(),onClick:()=>void f(),children:n(`chatgptOauthSection.completeSignIn`)})})]})]}):null,r===`starting`?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(p,{className:`h-4 w-4 animate-spin text-[var(--content-tertiary)]`}),(0,Z.jsx)(l,{variant:`body-small-default`,className:`text-[var(--content-tertiary)]`,children:n(`chatgptOauthSection.startingSignIn`)})]}):null,r===`exchanging`?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(p,{className:`h-4 w-4 animate-spin text-[var(--content-tertiary)]`}),(0,Z.jsx)(l,{variant:`body-small-default`,className:`text-[var(--content-tertiary)]`,children:n(`chatgptOauthSection.completingSignIn`)})]}):null,r===`completed`?(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-[var(--system-positive-strong)]`,children:n(`chatgptOauthSection.connected`)}):null,c?(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:c}):null,r===`failed`?(0,Z.jsx)(i,{variant:`outlined`,size:`compact`,onClick:m,children:n(`chatgptOauthSection.tryAgain`)}):null]})}var lt=new Set(Object.entries(A).flatMap(([e,t])=>[e.toLowerCase(),t.toLowerCase()])),ut={reserved:`That name belongs to a built-in provider. Pick another.`,duplicate:`A custom provider with this name already exists.`};function dt(e,t,n){let r=e.trim().toLowerCase();return r?lt.has(r)?`reserved`:(t??[]).some(e=>e.provider===`openai-compatible`&&e.name!==n&&(e.label?.trim()||e.name).toLowerCase()===r)?`duplicate`:null:null}function ft(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join(`-`)}function pt(e){return ft(e)}function mt(e,t){let n=new Set(t.map(e=>e.toLowerCase()));if(!n.has(e.toLowerCase()))return e;let r=2,i=`${e}-${r}`;for(;n.has(i.toLowerCase());)r+=1,i=`${e}-${r}`;return i}function ht(e,t){return{name:A[e]??e,key:mt(`${pt(e)}-personal`,t)}}function gt(e,t){return{name:e,key:mt(pt(e),t)}}function _t({apiKeyValue:e,onApiKeyChange:t,credential:n,onCredentialChange:r,isLoadingCredential:a,apiKeyPlaceholder:o,provider:s,providerCredentials:c,showAdvancedSection:u,onError:d}){let{t:m}=T(`settings`),[h,_]=(0,W.useState)(!1),[v,y]=(0,W.useState)(!1),[x,S]=(0,W.useState)(``);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:m(`providerEditorApiKeySection.apiKeyLabel`)}),a?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 h-8`,children:[(0,Z.jsx)(p,{className:`h-4 w-4 animate-spin text-[var(--content-tertiary)]`}),(0,Z.jsx)(l,{variant:`body-small-default`,className:`text-[var(--content-tertiary)]`,children:m(`providerEditorApiKeySection.loading`)})]}):(0,Z.jsx)(g,{type:`password`,value:e,onChange:e=>{t(e.target.value),d(null)},placeholder:o,fullWidth:!0})]}),u&&(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":h,onClick:()=>_(e=>!e),className:`flex items-center gap-1 text-body-small-default text-[var(--content-secondary)] w-full text-left`,children:[(0,Z.jsx)(f,{className:`h-4 w-4 transition-transform ${h?`rotate-90`:``}`}),(0,Z.jsx)(`span`,{children:m(`providerEditorApiKeySection.advanced`)}),(0,Z.jsx)(`span`,{className:`text-[var(--content-tertiary)] ml-1`,children:m(`providerEditorApiKeySection.credentialReferenceSuffix`)})]}),h&&(0,Z.jsxs)(`div`,{className:`mt-2 space-y-3`,children:[(()=>{let e=c.map(e=>{let t=`credential/${e.service}/${e.field}`;return{label:t,value:t}}),t=e.some(e=>e.value===n),i=n&&!t?[{label:n,value:n},...e]:e;return i.length===0?null:(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:m(`providerEditorApiKeySection.credentialReferenceLabel`)}),(0,Z.jsx)(b,{"aria-label":m(`providerEditorApiKeySection.credentialReferenceAriaLabel`),value:n,onChange:e=>{r(e)},options:i})]})})(),v&&(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:m(`providerEditorApiKeySection.newCredentialNameLabel`)}),(0,Z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Z.jsx)(g,{value:x,onChange:e=>S(e.target.value),placeholder:m(`providerEditorApiKeySection.newCredentialPlaceholder`),fullWidth:!0}),(0,Z.jsx)(i,{variant:`primary`,size:`compact`,disabled:!x.trim(),onClick:()=>{let e=x.trim();e&&(r(`credential/${s}/${e}`),y(!1),S(``))},children:m(`providerEditorApiKeySection.use`)})]})]}),(0,Z.jsx)(`div`,{className:`flex justify-start`,children:(0,Z.jsx)(i,{variant:`ghost`,onClick:()=>{v?(y(!1),S(``)):y(!0)},children:m(v?`providerEditorApiKeySection.cancel`:`providerEditorApiKeySection.newCredential`)})})]})]})]})}var vt=`•`.repeat(8);function yt(e,t){return t?vt:e}function bt(e){let t=[];for(let n of e)if(n.type===`api_key`)t.push({service:n.name,field:`api_key`});else if(n.type===`credential`){let e=n.name.lastIndexOf(`:`);if(e>=0){let r=n.name.slice(0,e),i=n.name.slice(e+1);r&&i&&t.push({service:r,field:i})}}return t}function xt({assistantId:e,enabled:n=!0}){let r=le(),i=o({...de({path:{assistant_id:e}}),enabled:!!e&&n&&r,select:e=>bt(e.secrets),retry:t,staleTime:3e4});return{credentials:i.data??[],isLoading:i.isLoading}}function St({assistantId:e,existingNames:t,connections:n,defaultProviderType:r,hideProviderSelect:o=!1,onCreated:s,onCancel:c,variant:u=`modal`,actionsSlot:d}){let{t:p}=T(`settings`),m=Ke(),h=r&&m.includes(r)?r:m[0]??`anthropic`,_=ht(h,t),[x,S]=(0,W.useState)(h===`openai-compatible`?``:_.name),[C,E]=(0,W.useState)(_.key),[D,ee]=(0,W.useState)(h),O=D===`chatgpt`,k=O?`openai`:D,j=O?`oauth_subscription`:Pe(k),[M,N]=(0,W.useState)(()=>h===`ollama`?``:h===`openai-compatible`?`credential/${_.key}/api_key`:`credential/${h}/api_key`),[P,F]=(0,W.useState)(``),[I,L]=(0,W.useState)(``),[R,z]=(0,W.useState)(!1),[B,V]=(0,W.useState)(null),[te,ne]=(0,W.useState)(!1),H=k===`openai-compatible`,re=(0,W.useMemo)(()=>{let e=!O&&!m.includes(k)?[...m,k]:[...m],t=e.indexOf(`openai`);return t>=0&&e.splice(t+1,0,`chatgpt`),e},[O,k,m]),ie=(0,W.useRef)(!1);function oe(e){ie.current=!0,S(e)}let[ce,U]=(0,W.useState)(``),[le,de]=(0,W.useState)(!1),fe=a(),pe=(0,W.useMemo)(()=>Fe(M),[M]),me=j===`api_key`&&pe!==null,{hasStoredCredential:G,isLoading:K}=st({assistantId:e,credentialKind:`credential`,credentialName:pe?`${pe.service}:${pe.field}`:``,enabled:me}),{credentials:he}=xt({assistantId:e,enabled:!0}),q=H?dt(x,n):null,ge=C.trim().length>0&&(!H||x.trim().length>0)&&q===null;async function J(){if(ge){z(!0),V(null);try{let t;if(j===`api_key`){let n=M.trim()||`credential/${H?C:k}/api_key`,r=ce.trim();if(r){de(!0);try{let t=Fe(n);await se({path:{assistant_id:e},body:t?{type:`credential`,name:`${t.service}:${t.field}`,value:r}:{type:`api_key`,name:k,value:r},throwOnError:!0});let i=ot(e,`credential`,t?`${t.service}:${t.field}`:``);fe.setQueryData(i,!0),fe.invalidateQueries({queryKey:ue({path:{assistant_id:e}})})}catch{V(p(`providerCreateForm.failedSaveApiKey`));return}finally{de(!1)}t={type:`api_key`,credential:n}}else if(G)t={type:`api_key`,credential:n};else if(H)t={type:`none`};else{V(p(`providerCreateForm.enterApiKeyOrCredential`));return}}else if(j===`oauth_subscription`){V(p(`providerCreateForm.useChatgptSignIn`));return}else t={type:`none`};let n=x.trim()||null,r={name:C.trim(),provider:k,auth:t,...n!==null&&{label:n},...H&&{base_url:P.trim()||null,models:I.trim()?I.split(`,`).map(e=>({id:e.trim()})).filter(e=>e.id):null}},{data:i,error:a,response:o}=await ae({path:{assistant_id:e},body:r});if(!o?.ok){V(Le(o?.status,a)??Ie(o?.status));return}if(!i){V(p(`providerCreateForm.emptyServerResponse`));return}y.success(p(`providerCreateForm.providerConnectedToast`)),s(i)}catch{V(p(`providerCreateForm.failedSaveProvider`))}finally{z(!1)}}}let _e=he.filter(e=>e.service===k),ve=_e.length>0,Y=yt(p(`providerCreateForm.apiKeyPlaceholder`),G),ye=te,be=(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":ye,onClick:()=>ne(e=>!e),className:`flex items-center gap-1 text-body-small-default text-[var(--content-secondary)] w-full text-left`,children:[(0,Z.jsx)(f,{className:`h-4 w-4 transition-transform ${ye?`rotate-90`:``}`}),(0,Z.jsx)(`span`,{children:p(`providerCreateForm.advanced`)})]}),ye&&(0,Z.jsx)(`div`,{className:`mt-2 space-y-4`,children:(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:(0,Z.jsx)(w,{i18nKey:`providerCreateForm.displayNameLabel`,ns:`settings`,components:{optional:(0,Z.jsx)(`span`,{className:`text-[var(--content-disabled)]`})}})}),(0,Z.jsx)(g,{value:x,onChange:e=>oe(e.target.value),placeholder:p(`providerCreateForm.displayNamePlaceholder`),fullWidth:!0})]})})]}),xe=(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[!o&&(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:p(`providerCreateForm.providerLabel`)}),(0,Z.jsx)(b,{"aria-label":p(`providerCreateForm.providerAriaLabel`),value:D,onChange:e=>{if(ee(e),V(null),e===`chatgpt`)return;let{name:n,key:r}=ht(e,t);ie.current||S(e===`openai-compatible`?``:n),E(r),N(e===`ollama`?``:e===`openai-compatible`?`credential/${r}/api_key`:`credential/${e}/api_key`)},options:[...re.filter(e=>e!==`openai-compatible`).map(e=>({value:e,label:A[e]})),...re.includes(`openai-compatible`)?[{value:`openai-compatible`,label:p(`providerCreateForm.customProviderOption`)}]:[]]}),H?(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:p(`providerCreateForm.customProviderHint`)}):null]}),H&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:p(`providerCreateForm.nameLabel`)}),(0,Z.jsx)(g,{value:x,onChange:e=>oe(e.target.value),placeholder:p(`providerCreateForm.namePlaceholder`),fullWidth:!0}),q?(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:ut[q]}):null]}),(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:p(`providerCreateForm.baseUrlLabel`)}),(0,Z.jsx)(g,{value:P,onChange:e=>F(e.target.value),placeholder:p(`providerCreateForm.baseUrlPlaceholder`),fullWidth:!0})]}),(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:p(`providerCreateForm.modelsLabel`)}),(0,Z.jsx)(g,{value:I,onChange:e=>L(e.target.value),placeholder:p(`providerCreateForm.modelsPlaceholder`),fullWidth:!0}),(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:p(`providerCreateForm.modelsHint`)})]})]}),j===`api_key`&&(0,Z.jsx)(_t,{apiKeyValue:ce,onApiKeyChange:U,credential:M,onCredentialChange:N,isLoadingCredential:K,apiKeyPlaceholder:Y,provider:k,providerCredentials:_e,showAdvancedSection:ve,onError:V}),H&&j===`api_key`?(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:p(`providerCreateForm.localEndpointHint`)}):null,j===`oauth_subscription`&&(0,Z.jsx)(ct,{assistantId:e,onConnected:s}),!O&&!H&&be,B&&(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:B})]}),Se=(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(i,{variant:`ghost`,onClick:c,children:p(`providerCreateForm.cancel`)}),!O&&(0,Z.jsx)(i,{variant:`primary`,disabled:!ge||R||le,onClick:()=>void J(),children:R?p(`providerCreateForm.saving`):H&&x.trim()?p(`providerCreateForm.addNamed`,{name:x.trim()}):p(`providerCreateForm.add`)})]});return u===`inline`?(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[xe,d===void 0?(0,Z.jsx)(`div`,{className:`flex justify-end gap-2`,children:Se}):d&&(0,at.createPortal)(Se,d)]}):(0,Z.jsxs)(v.Content,{size:`md`,children:[(0,Z.jsxs)(v.Header,{children:[(0,Z.jsx)(v.Title,{children:p(`providerCreateForm.addProviderTitle`)}),(0,Z.jsx)(v.Description,{children:p(`providerCreateForm.addProviderDescription`)})]}),(0,Z.jsx)(v.Body,{children:xe}),(0,Z.jsx)(v.Footer,{children:Se})]})}var Ct=`__create_new_provider__`;function wt({editor:e,assistantId:t,connections:n,variant:r}){let{t:i}=T(`settings`),a=U(),o=e.effectiveMode===`create`,s=r===`panel`,[c,u]=(0,W.useState)(!1),d=c||!!e.keyError&&e.getDirty(),p=(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:i(o?`profileEditorFields.nameLabel`:`profileEditorFields.displayNameLabel`)}),(0,Z.jsx)(g,{type:`text`,value:e.label,onChange:t=>e.handleLabelChange(t.target.value),placeholder:i(`profileEditorFields.displayNamePlaceholder`),disabled:e.isReadOnly,fullWidth:!0})]}),m=(0,Z.jsx)(h,{label:(0,Z.jsx)(w,{i18nKey:`profileEditorFields.descriptionLabel`,ns:`settings`,components:{optional:(0,Z.jsx)(`span`,{className:`text-[var(--content-disabled)]`})}}),value:e.description,onChange:t=>e.setDescription(t.target.value),placeholder:i(`profileEditorFields.descriptionPlaceholder`),disabled:e.isReadOnly,rows:2,fullWidth:!0,className:`resize-none`}),v=(0,Z.jsx)(g,{label:i(`profileEditorFields.keyLabel`),type:`text`,value:e.key,onChange:t=>e.handleKeyChange(t.target.value),placeholder:i(`profileEditorFields.keyPlaceholder`),disabled:e.isReadOnly||e.effectiveMode===`edit`,errorText:e.isReadOnly?void 0:e.keyError,fullWidth:!0}),y=!s&&(!e.isReadOnly||e.status!==`active`)?(0,Z.jsx)(_,{checked:e.status===`active`,onChange:t=>e.setStatus(t?`active`:`disabled`),label:i(`profileEditorFields.activeLabel`),className:`touch-mobile:mt-2 touch-mobile:[&_button]:h-7 touch-mobile:[&_button]:w-10 touch-mobile:[&_button>span]:h-6 touch-mobile:[&_button>span]:w-6`}):null,x=(0,Z.jsx)(Ae,{visibility:e.visibility,isReadOnly:e.isReadOnly,model:e.model,selectedModel:e.selectedModel,defaultMaxOutputTokens:e.defaultMaxOutputTokens,defaultContextWindowMaxInputTokens:e.defaultContextWindowMaxInputTokens,maxTokens:e.maxTokens,onMaxTokensChange:e.setMaxTokens,contextWindowMaxInputTokens:e.contextWindowMaxInputTokens,onContextWindowChange:e.setContextWindowMaxInputTokens,effort:e.effort,onEffortChange:e.setEffort,speed:e.speed,onSpeedChange:e.setSpeed,verbosity:e.verbosity,onVerbosityChange:e.setVerbosity,temperatureEnabled:e.temperatureEnabled,onTemperatureEnabledChange:e.setTemperatureEnabled,temperature:e.temperature,onTemperatureChange:e.setTemperature,topPEnabled:e.topPEnabled,onTopPEnabledChange:e.setTopPEnabled,topP:e.topP,onTopPChange:e.setTopP,thinkingEnabled:e.thinkingEnabled,onThinkingEnabledChange:e.setThinkingEnabled,thinkingStreamThinking:e.thinkingStreamThinking,onThinkingStreamThinkingChange:e.setThinkingStreamThinking,thinkingLevel:e.thinkingLevel,onThinkingLevelChange:e.setThinkingLevel}),S=e.saveError?(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:e.saveError}):null,C=(0,W.useMemo)(()=>Ye(e.effectiveConnections,a),[e.effectiveConnections,a]),E=(0,W.useMemo)(()=>{let t=et(Je(e.effectiveConnections,a),e.effectiveConnections,e=>A[e]??e,i(`aiProviderPicker.defaultEntryMeta`)).map(({value:e,label:t,meta:n})=>({value:e,label:t,suffix:n?(0,Z.jsx)(rt,{text:n}):void 0}));for(let e of C){let n=Pe(e)===`api_key`?i(`profileEditorFields.addApiKey`):i(`profileEditorFields.setUp`);t.push({value:e,label:A[e]??e,suffix:(0,Z.jsx)(rt,{text:n})})}return t.push({value:Ct,label:i(`profileEditorFields.createNewProvider`)}),t},[a,e.effectiveConnections,C,i]),D=(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`label`,{id:`profile-editor-provider-label`,className:`block text-body-small-default text-[var(--content-tertiary)]`,children:i(`profileEditorFields.providerLabel`)}),(0,Z.jsx)(b,{value:e.creatingProvider?e.pendingCreateProvider??Ct:e.provider&&e.providerConnection&&E.some(t=>t.value===$(e.provider,e.providerConnection))?$(e.provider,e.providerConnection):e.provider,onChange:t=>{if(t===Ct){e.setCreatingProvider(!0),e.setPendingCreateProvider(null),e.setNewProviderNote(!1);return}if(!t)return;let n=Ze(t);if(n){e.setCreatingProvider(!1),e.setPendingCreateProvider(null),e.provider===n.provider?n.provider===`openai-compatible`&&e.setModel(``):e.handleProviderChange(n.provider),e.setProviderConnection(n.connectionName);return}let r=t;if(C.includes(r)){e.setCreatingProvider(!0),e.setPendingCreateProvider(r),e.setNewProviderNote(!1);return}e.setCreatingProvider(!1),e.setPendingCreateProvider(null),e.handleProviderChange(r),r===e.provider&&e.setProviderConnection(``)},placeholder:i(`profileEditorFields.selectProviderPlaceholder`),"aria-labelledby":`profile-editor-provider-label`,options:E}),e.newProviderNote?(0,Z.jsx)(l,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:i(`profileEditorFields.newProviderNote`)}):null]}),e.creatingProvider?(0,Z.jsx)(St,{variant:`inline`,assistantId:t,existingNames:e.effectiveConnections.map(e=>e.name),connections:e.effectiveConnections,defaultProviderType:(e.pendingCreateProvider??e.provider)||void 0,hideProviderSelect:e.pendingCreateProvider!==null,onCreated:e.handleProviderCreated,onCancel:()=>{e.setCreatingProvider(!1),e.setPendingCreateProvider(null)}},e.pendingCreateProvider??`any`):(0,Z.jsx)(it,{provider:e.provider,model:e.model,providerConnection:e.providerConnection,onProviderChange:e.handleProviderChange,onModelChange:e.handleModelChange,onConnectionChange:e.handleConnectionChange,connections:e.effectiveConnections,isReadOnly:e.isReadOnly,availableConnectionsForProvider:e.availableConnectionsForProvider,connectionNotFound:e.connectionNotFound,hideProviderField:!0})]});if(o){let t=e.model!==``;return(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[p,D,m,y,s?t&&(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[v,x]}):t&&(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":d,onClick:()=>u(e=>!e),className:`flex items-center gap-1 text-body-small-default text-[var(--content-secondary)] w-full text-left`,children:[(0,Z.jsx)(f,{className:`h-4 w-4 transition-transform ${d?`rotate-90`:``}`}),(0,Z.jsx)(`span`,{children:i(`profileEditorFields.advanced`)})]}),d?(0,Z.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[v,x]}):null]}),S]})}return(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[p,m,v,y,(0,Z.jsx)(it,{provider:e.provider,model:e.model,providerConnection:e.providerConnection,onProviderChange:e.handleProviderChange,onModelChange:e.handleModelChange,onConnectionChange:e.handleConnectionChange,connections:n,isReadOnly:e.isReadOnly,availableConnectionsForProvider:e.availableConnectionsForProvider,connectionNotFound:e.connectionNotFound,providerError:e.providerError}),x,S]})}function Tt(e,t,n){if(e){let n=V(e).find(e=>e.id===t);if(n)return n.displayName}for(let e of n??[]){let n=(e.models??[]).find(e=>e.id===t);if(n)return n.displayName??n.id}let r=t.lastIndexOf(`/`);return r>=0?t.slice(r+1):t}function Et(e,t,n){let r=(0,W.useRef)(!1),i=(0,W.useRef)(!1);return{handleLabelChange:(0,W.useCallback)(a=>{i.current=!0,t(a),e===`create`&&!r.current&&n(ft(a))},[e,t,n]),handleKeyChange:(0,W.useCallback)(e=>{r.current=!0,i.current=!0,n(e)},[n]),resetDirty:(0,W.useCallback)(()=>{r.current=!1,i.current=!1},[]),getDirty:(0,W.useCallback)(()=>i.current,[])}}var Dt=`0.11.3-dev.202608102358.ef1568c`;async function Ot(e,t){await H(t);let n=x.getState().assistantId;return e!=null&&n!==e?!1:ne(Dt)}var kt=`0.10.12`;async function At(e,t){await H(t);let n=x.getState().assistantId;return e!=null&&n!==e?!1:ne(kt)}function jt({mode:e,profileName:t,initialValues:n,existingNames:r,connections:i,assistantId:s,onSave:c}){let[l,u]=(0,W.useState)(e),d=n?.invariant===!0&&l!==`create`,f=l===`view`||d,p=n?.status??`active`,[m,h]=(0,W.useState)(n?.label??``),[g,_]=(0,W.useState)(n?.description??``),[v,y]=(0,W.useState)(e===`create`?``:t??``),[b,x]=(0,W.useState)(n?.provider?n.provider:``),[S,C]=(0,W.useState)(n?.model??``),[w,T]=(0,W.useState)(n?.provider_connection??``),[D,O]=(0,W.useState)(n?.status??`active`),[k,A]=(0,W.useState)([]),[j,M]=(0,W.useState)(!1),[N,F]=(0,W.useState)(null),[L,R]=(0,W.useState)(n?.maxTokens??null),[z,B]=(0,W.useState)(n?.contextWindow?.maxInputTokens??null),[te,ne]=(0,W.useState)(n?.effort??`inherit`),[H,re]=(0,W.useState)(n?.speed??`standard`),[ie,ae]=(0,W.useState)(n?.verbosity??`medium`),[oe,se]=(0,W.useState)(typeof n?.temperature==`number`),[ce,U]=(0,W.useState)(typeof n?.temperature==`number`?n.temperature:.7),[le,ue]=(0,W.useState)(typeof n?.topP==`number`),[de,me]=(0,W.useState)(typeof n?.topP==`number`?n.topP:.95),G=f&&D!==p,[K,he]=(0,W.useState)(n?.thinking?.enabled??!1),[q,ge]=(0,W.useState)(n?.thinking?.streamThinking??!1),[J,_e]=(0,W.useState)(ye(n?.thinking?.level)?n.thinking.level:De),ve=(0,W.useMemo)(()=>b===`vellum`?ee(S):null,[b,S]),Y=ve?.model??S,be=(0,W.useMemo)(()=>b?V(b).find(e=>e.id===Y)??null:null,[b,Y]),{data:xe}=o({...pe({path:{assistant_id:s}}),staleTime:3e4}),Se=xe?.llm?.default?.maxTokens,Ce=xe?.llm?.default?.contextWindow?.maxInputTokens,X=(0,W.useMemo)(()=>we(b===`vellum`?ve?.provider??P(S)??n?.provider??``:b,Y),[b,S,Y,ve,n?.provider]),Z=(0,W.useMemo)(()=>{let e=i??[];if(k.length===0)return e;let t=new Set(e.map(e=>e.name));return[...e,...k.filter(e=>!t.has(e.name))]},[i,k]),Q=(0,W.useMemo)(()=>b?Z.filter(e=>Be(e.provider,b)||b===`openai`&&e.name===w&&e.provider===`chatgpt`):[],[b,Z,w]),Te=w!==``&&!Q.some(e=>e.name===w),{handleLabelChange:Ee,handleKeyChange:Oe,resetDirty:ke,getDirty:Ae}=Et(l,h,y),je=a(),[Me,Pe]=(0,W.useState)(!1),[Fe,Ie]=(0,W.useState)(null),[Le,Re]=(0,W.useState)(!1);(0,W.useEffect)(()=>{n?.provider_connection===`vellum`&&b===(n?.provider??``)&&i?.find(e=>e.name===n.provider_connection)?.provider===`vellum`&&x(I)},[i,b,n]),(0,W.useEffect)(()=>{let e=n?.provider;if(!e||b!==e||Ne.includes(e)||e===`vellum`||e===`chatgpt`)return;let t=i?.find(t=>t.name===e);!t||t.provider===`vellum`||t.provider===`chatgpt`||(x(t.provider),w===``&&T(t.name))},[i,b,w,n]),(0,W.useEffect)(()=>{ke(),Pe(!1),Ie(null),Re(!1),A([])},[t,e,ke]);function ze(e){if(e===b)return;x(e),C(``);let t=e===`chatgpt`?[]:Z.filter(t=>Be(t.provider,e));T(t.length===1?t[0].name:``),R(null),B(null),ne(`inherit`),re(`standard`),ae(`medium`),se(!1),U(.7),ue(!1),me(.95),he(!1),ge(!1),_e(De)}function Ve(e){if(T(e),b&&V(b).length===0&&S)if(e===``)new Set(Q.flatMap(e=>(e.models??[]).map(e=>e.id))).has(S)||C(``);else{let t=Q.find(t=>t.name===e);new Set((t?.models??[]).map(e=>e.id)).has(S)||C(``)}}function He(e){if(e!==S&&(C(e),R(null),B(null),l===`create`&&e&&!Ae())){let{name:t,key:n}=gt(Tt(b||void 0,e,Q),r);h(t),y(n)}}function Ue(e){let t=e.provider;t!==`vellum`&&(A(t=>t.some(t=>t.name===e.name)?t:[...t,e]),x(t),T(e.name),C(``),Pe(!1),Ie(null),Re(!0),je.invalidateQueries({queryKey:fe({path:{assistant_id:s}})}))}let We=v.trim(),Ge=We.length===0,Ke=/\s/.test(v),qe=l===`create`?r.includes(We):r.filter(e=>e!==t).includes(We),Je=b.length===0,Ye=b.length>0&&S.length===0,Xe=Ge||Ke||qe||Je||Ye,$=Ge?`Key is required`:Ke?`Key cannot contain whitespace`:qe?`A profile with this key already exists`:null,Ze=!f&&(l===`edit`||Ae())&&Je?`Select a provider`:null;async function Qe(){if(!(Xe&&!f)){if(f){if(!G)return;M(!0),F(null);try{await c(We,{status:`active`},{mode:`merge`})}catch(e){F(E(e)??`Failed to save profile. Please try again.`)}finally{M(!1)}return}M(!0),F(null);try{let e={},t=w===``&&Q.length===1?Q[0].name:w,r=Te?``:t,i=b===`chatgpt`||b===`vellum`&&await At(s),a=b===`vellum`?i?I:ve?.provider??P(S)??n?.provider??``:b,o=Y,u=i?``:r,d=r===``?void 0:Z.find(e=>e.name===r),f=d!==void 0&&(d.provider===`vellum`||d.provider===`chatgpt`||d.name===`vellum`||d.name===`chatgpt`||Ne.includes(d.name)),p=a;if(!i&&b!==``&&b!==`vellum`&&!f&&await Ot(s)){let e=Z.filter(e=>e.provider===b).length;p=d!==void 0&&(b===`openai-compatible`||e>=2)?d.name:b,u=``}l===`edit`?(e.label=m.trim()||null,e.description=g.trim()||null,e.provider=p||null,e.model=o||null,e.provider_connection=u||null):(m.trim()&&(e.label=m.trim()),g.trim()&&(e.description=g.trim()),p&&(e.provider=p),o&&(e.model=o),u&&(e.provider_connection=u)),X.maxTokens&&L!==null&&(e.maxTokens=L),X.contextWindow&&z!==null&&(e.contextWindow={maxInputTokens:z}),X.effort&&te!==`inherit`&&(e.effort=te),X.speed&&H!==`standard`&&(e.speed=H),X.verbosity&&(e.verbosity=ie),X.temperature&&(oe?e.temperature=ce:l===`edit`&&(e.temperature=null)),X.topP&&(le?e.topP=de:l===`edit`&&(e.topP=null)),X.thinking&&(e.thinking={enabled:K,...K?{streamThinking:q}:{}}),X.thinkingLevel&&J!==`default`&&(e.thinking={enabled:!0,level:J}),(l===`edit`||D!==`active`)&&(e.status=D),await c(We,e)}catch(e){F(E(e)??`Failed to save profile. Please try again.`)}finally{M(!1)}}}function $e(){u(`create`),y(``),ke()}return{effectiveMode:l,isReadOnly:f,isInvariant:d,hasViewModeChanges:G,label:m,description:g,key:v,provider:b,model:S,providerConnection:w,status:D,saving:j,saveError:N,keyError:$,providerError:Ze,isInvalid:Xe,maxTokens:L,contextWindowMaxInputTokens:z,effort:te,speed:H,verbosity:ie,temperatureEnabled:oe,temperature:ce,topPEnabled:le,topP:de,thinkingEnabled:K,thinkingStreamThinking:q,thinkingLevel:J,visibility:X,selectedModel:be,defaultMaxOutputTokens:Se,defaultContextWindowMaxInputTokens:Ce,effectiveConnections:Z,availableConnectionsForProvider:Q,connectionNotFound:Te,creatingProvider:Me,pendingCreateProvider:Fe,newProviderNote:Le,setDescription:_,setStatus:O,setMaxTokens:R,setContextWindowMaxInputTokens:B,setEffort:ne,setSpeed:re,setVerbosity:ae,setTemperatureEnabled:se,setTemperature:U,setTopPEnabled:ue,setTopP:me,setThinkingEnabled:he,setThinkingStreamThinking:ge,setThinkingLevel:_e,setCreatingProvider:Pe,setPendingCreateProvider:Ie,setNewProviderNote:Re,handleLabelChange:Ee,handleKeyChange:Oe,getDirty:Ae,handleProviderChange:ze,handleConnectionChange:Ve,handleModelChange:He,handleProviderCreated:Ue,setProviderConnection:T,setModel:C,handleSave:Qe,switchToSaveAsNew:$e}}var Mt=`/assistant/assets/pcm-downsample-worklet-CwNZrVLe.js`;function Nt(){if(!(typeof window>`u`))return window.AudioContext??window.webkitAudioContext}function Pt(e){let t=Nt();if(!t)throw Error(`Web Audio API is not available in this environment`);return new t(e)}var Ft=`pcm-downsample`,It=1600,Lt=16e3;function Rt(){return S()?window.vellum?.helper?.dictation:void 0}function zt(){let e=Rt();return!!e?.transcribe&&!!e.onTranscribed}var Bt=null,Vt=null;async function Ht(){return Bt||(Bt=Pt(),Vt=Bt.audioWorklet.addModule(Mt)),Bt.state!==`running`&&await Bt.resume(),await Vt,Bt}async function Ut(e,t){try{let n=await Ht(),r=n.createMediaStreamSource(e),i=new AudioWorkletNode(n,Ft,{numberOfInputs:1,numberOfOutputs:0,channelCount:1}),a=[],o=0,s=0;return i.port.onmessage=e=>{let r=new Int16Array(e.data);if(r.length===0||(a.push(r),o+=r.length,o<It))return;let i=new Int16Array(o),c=0;for(let e of a)i.set(e,c),c+=e.length;a=[],o=0,s+=1,(s===1||s%50==0)&&console.info(`dictation: pushed audio chunk #${s} (${i.byteLength} bytes, context=${n.state})`),t(i.buffer)},r.connect(i),console.info(`dictation: audio pump started (context=${n.state})`),()=>{i.port.onmessage=null,i.disconnect(),r.disconnect()}}catch(e){return console.warn(`native-dictation-partials: audio pump failed`,e),null}}var Wt=8e3;async function Gt(e){let t=Rt();if(!t?.transcribe||!t.onTranscribed)return null;let n;try{n=await Kt(e)}catch(e){let t=e instanceof DOMException?`${e.name}: ${e.message}`:e;return console.warn(`dictation: blob decode for native transcribe failed`,t),null}if(n.byteLength===0)return null;let r=null,i=t.onTranscribed(e=>{r?.(e.text||null)});try{let e=await t.transcribe(n);if(!e.ok)return console.info(`dictation: native transcribe unavailable:`,e.reason),null;let i=await new Promise(e=>{r=e,setTimeout(()=>e(null),Wt)});return console.info(`dictation: native transcribe ${i?`chars=${i.length}`:`produced no text`}`),i}catch(e){return console.warn(`dictation: native transcribe failed`,e),null}finally{i()}}async function Kt(e){let t=await e.arrayBuffer(),n=await new OfflineAudioContext(1,1,Lt).decodeAudioData(t),r=n.numberOfChannels,i=n.length,a=n.getChannelData(0);if(r>1){let e=new Float32Array(i);for(let t=0;t<r;t++){let a=n.getChannelData(t);for(let t=0;t<i;t++)e[t]+=a[t]/r}a=e}let o=new Int16Array(i);for(let e=0;e<i;e++){let t=a[e],n=t<-1?-1:t>1?1:t;o[e]=n<0?n*32768:n*32767}return o.buffer}var qt=4e3;async function Jt(e,t){let n=Rt();if(!n)return null;let r=n.pushAudioChunk?.bind(n),i=t?.stream,a=!!i&&!!r,o=n.onPartial(t=>{e(t.text)}),s=null,c=null,l=n.onFinalized?.(e=>{s=e.text||null,c?.(s)})??null,u=()=>{l?.(),o()};try{let e=await n.setPartials(!0,void 0,a);if(!e.ok)return console.info(`native-dictation-partials: unavailable:`,e.reason),u(),null}catch(e){return console.warn(`native-dictation-partials: setPartials failed`,e),u(),null}let d=null;if(a&&(d=await Ut(i,e=>r(e)),!d))return u(),n.setPartials(!1).catch(()=>{}),null;let f=null;return()=>f||(d?.(),o(),n.setPartials(!1).catch(()=>{}),f=(async()=>{let e=s;return!e&&l&&(e=await new Promise(e=>{c=e,setTimeout(()=>e(null),qt)})),l?.(),console.info(e===null?`dictation: native finalized not received`:`dictation: native finalized chars=${e.length}`),e})(),f)}var Yt=[{id:`vellum`,displayName:`Vellum`,subtitle:`Text-to-speech through your Vellum account — billed to Vellum credits, no separate API key needed.`,supportsVoiceSelection:!1,apiKeyPlaceholder:`Connected via your Vellum account`,credentialsGuide:{description:`Connect this assistant to your Vellum account; managed speech uses that connection instead of a provider API key.`,url:`https://platform.vellum.ai/`,linkLabel:`Open Vellum Platform`}},{id:`elevenlabs`,displayName:`ElevenLabs`,subtitle:`High-quality voice synthesis for conversations and read-aloud. Requires an ElevenLabs API key.`,supportsVoiceSelection:!0,apiKeyPlaceholder:`sk_…`,credentialsGuide:{description:`Sign in to ElevenLabs, go to your Profile, and copy your API key.`,url:`https://elevenlabs.io/app/settings/api-keys`,linkLabel:`Open ElevenLabs API Keys`}},{id:`fish-audio`,displayName:`Fish Audio`,subtitle:`Natural-sounding voice synthesis with custom voice cloning. Requires a Fish Audio API key and voice reference ID.`,supportsVoiceSelection:!0,apiKeyPlaceholder:`Enter your Fish Audio API key`,credentialsGuide:{description:`Sign in to Fish Audio, navigate to API Keys in your dashboard, and create a new key.`,url:`https://fish.audio/app/api-keys/`,linkLabel:`Open Fish Audio API Keys`}},{id:`deepgram`,displayName:`Deepgram`,subtitle:`Fast, accurate text-to-speech synthesis. Uses the same API key as Deepgram speech-to-text.`,supportsVoiceSelection:!1,apiKeyPlaceholder:`Enter your Deepgram API key`,credentialsGuide:{description:`Sign in to Deepgram, navigate to your API Keys page, and create or copy an existing key. This is the same key used for speech-to-text.`,url:`https://console.deepgram.com/`,linkLabel:`Open Deepgram Console`}},{id:`xai`,displayName:`xAI`,subtitle:`Text-to-speech from xAI with expressive voices (eve, ara, rex, sal, leo). Requires an xAI API key.`,supportsVoiceSelection:!1,apiKeyPlaceholder:`Enter your xAI API key`,credentialsGuide:{description:`Sign in to the xAI console, navigate to API Keys, and create a new key.`,url:`https://console.x.ai/`,linkLabel:`Open xAI Console`}}],Xt=`macos-native`,Zt=[{id:`vellum`,displayName:`Vellum`,subtitle:`Transcription through your Vellum account — billed to Vellum credits, no separate API key needed.`},{id:`deepgram`,displayName:`Deepgram`,subtitle:`Fast, accurate speech-to-text transcription. Uses the same API key as Deepgram text-to-speech.`,apiKeyPlaceholder:`Enter your Deepgram API key`,credentialsGuide:{description:`Sign in to Deepgram, navigate to your API Keys page, and create or copy an existing key. This is the same key used for text-to-speech.`,url:`https://console.deepgram.com/`,linkLabel:`Open Deepgram Console`}},{id:`openai`,displayName:`OpenAI`,subtitle:`OpenAI Whisper transcription. Requires an OpenAI API key.`,apiKeyPlaceholder:`sk-…`,credentialsGuide:{description:`Sign in to the OpenAI platform, navigate to API Keys, and create a new secret key.`,url:`https://platform.openai.com/api-keys`,linkLabel:`Open OpenAI API Keys`}},{id:Xt,displayName:`macOS Native Dictation`,subtitle:`Apple's on-device speech recognition, running locally through the macOS helper. Works offline and needs no API key.`,requiresNativeDictation:!0,setupWarning:`Requires macOS Dictation to be turned on: open System Settings → Keyboard, then enable Dictation. macOS downloads the on-device speech model the first time Dictation is enabled — without it, voice input produces no transcript.`}],Qt=[{id:`mailgun`,displayName:`Mailgun`,setupSkill:`mailgun-setup`,docsUrl:`https://www.mailgun.com/`},{id:`resend`,displayName:`Resend`,setupSkill:`resend-setup`,docsUrl:`https://resend.com/`}],$t=[`gemini-3.1-flash-image-preview`,`gemini-3-pro-image-preview`,`gpt-image-2`],en={"gemini-3.1-flash-image-preview":`Nano Banana 2`,"gemini-3-pro-image-preview":`Nano Banana Pro`,"gpt-image-2":`GPT Image 2`},tn=[`vellum`,`gemini`,`openai`],nn={vellum:`Vellum`,gemini:`Gemini`,openai:`OpenAI`};function rn(e){return e===`vellum`?[...$t]:$t.filter(t=>an(t)===e)}function an(e){return e.startsWith(`gpt-`)||e.startsWith(`dall-e-`)?`openai`:(e.startsWith(`gemini-`),`gemini`)}var on=`vellum:ai:imageGenProvider`,sn=`vellum:ai:imageGenModel`,cn=`vellum:ai:webSearchProvider`,ln=`vellum:ai:webFetchProvider`,un=`vellum:ai:emailMode`,dn=`vellum:ai:emailByoProvider`,fn=`vellum:voice:ttsProvider`,pn=`vellum:voice:ttsApiKey:`,mn=`vellum:voice:ttsVoiceId:`,hn=`vellum:voice:sttProvider`,gn=`vellum:voice:sttApiKey:`,_n=`0.10.8`;function vn(){return te(_n)}var yn=`0.11.0`;function bn(){return te(yn)}function xn({value:e,size:t=`default`,className:n,...r}){let i=t===`compact`;return(0,Z.jsxs)(`button`,{type:`button`,className:c(`flex items-center gap-2 rounded-md border border-[var(--field-border)] bg-[var(--field-bg)] text-left text-[var(--content-default)] transition-colors focus:outline-none data-[state=open]:border-[var(--border-active)]`,i?`h-7 min-w-44 px-2.5 text-body-small-default`:`h-9 w-full px-3 text-body-medium-lighter`,n),...r,children:[(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e}),(0,Z.jsx)(d,{"aria-hidden":!0,className:c(`shrink-0 text-[var(--content-tertiary)]`,i?`h-3 w-3`:`h-3.5 w-3.5`)})]})}var Sn={profiles:{},profileOrder:[]};function Cn(e,t){let n=e?.profiles,r=e?.profileOrder,i=!!n&&Object.keys(n).length>0,[a,o]=(0,W.useState)(Sn),[s,c]=(0,W.useState)(t);return t!==s&&(c(t),o(Sn)),(0,W.useEffect)(()=>{i&&o({profiles:n,profileOrder:r??[]})},[i,n,r]),i?{profiles:n,profileOrder:r??[]}:t===s?a:Sn}export{Mt as A,ct as B,rn as C,Gt as D,Jt as E,xt as F,Ie as G,st as H,yt as I,Le as J,Fe as K,_t as L,Tt as M,wt as N,Pt as O,St as P,ut as R,Yt as S,zt as T,Be as U,ot as V,Ge as W,Me as X,je as Y,en as _,dn as a,Xt as b,on as c,pn as d,fn as f,Qt as g,cn as h,vn as i,jt as j,Nt as k,gn as l,ln as m,xn as n,un as o,mn as p,Re as q,bn as r,sn as s,Cn as t,hn as u,tn as v,an as w,Zt as x,nn as y,dt as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./utils-BEkyAhbA.js";var t=`0.10.8`;function n(n){return e(t,n)}export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{t as n}from"./createLucideIcon-B-ZPaMbU.js";import{t as r}from"./pointer-BMK9brNn.js";var i=n(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),a=n(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),o=e(t(),1),s=80,c=8,l=.8,u=.35;function d({enabled:e,axis:t,commitThresholdPx:n=s,deadzonePx:i=c,escapeRatio:a=l,overdragDamping:d=u,touchOnly:f=!0,onCommit:p,onMove:m,onReset:h}){let[g,_]=(0,o.useState)(0),[v,y]=(0,o.useState)(!1),[b]=(0,o.useState)(()=>r()),x=(0,o.useRef)(null),S=(0,o.useCallback)(()=>{x.current=null,_(0),y(!1),h?.()},[h]);return{dragOffset:g,isDragging:v,onTouchStart:(0,o.useCallback)(t=>{if(!e||f&&!b)return;if(t.touches.length!==1){S();return}let n=t.touches[0];x.current={touchId:n.identifier,startX:n.clientX,startY:n.clientY,resolved:`undecided`,lastDelta:0,lastEscape:0}},[e,f,b,S]),onTouchMove:(0,o.useCallback)(e=>{let r=x.current;if(!r)return;if(e.touches.length!==1){S();return}let o=e.touches[0];if(o.identifier!==r.touchId)return;let s=o.clientX-r.startX,c=o.clientY-r.startY,l=t===`horizontal`?s:c,u=t===`horizontal`?c:s;if(r.lastDelta=l,r.lastEscape=u,r.resolved===`undecided`){if(Math.abs(l)<i&&Math.abs(u)<i)return;if(Math.abs(u)>Math.abs(l)*a){x.current=null;return}r.resolved=`primary`,y(!0)}if(r.resolved!==`primary`)return;if(Math.abs(l)<n&&Math.abs(u)>Math.abs(l)*a){S();return}let f=Math.sign(l),p=Math.abs(l),h=f*(p<=n?p:n+(p-n)*d);_(h),m?.(h)},[t,i,a,n,d,m,S]),onTouchEnd:(0,o.useCallback)(e=>{let r=x.current;if(!r||r.resolved!==`primary`){S();return}if(e.touches.length>0){S();return}let i=Array.from(e.changedTouches).find(e=>e.identifier===r.touchId),o=i?i.clientX-r.startX:null,s=i?i.clientY-r.startY:null,c=o!==null&&s!==null?t===`horizontal`?o:s:r.lastDelta,l=o!==null&&s!==null?t===`horizontal`?s:o:r.lastEscape;!(Math.abs(l)>Math.abs(c)*a)&&Math.abs(c)>=n&&p?.(c),S()},[t,n,a,p,S]),onTouchCancel:S}}export{a as n,i as r,d as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./list-row-CDwzGT9g.js";function t(){return e()}export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{L as n,t as r}from"./use-transcript-messages-Q1PBxvSF.js";var i=e(t(),1);function a(e){let t=r();return(0,i.useMemo)(()=>{if(e)return t.find(t=>n(t).includes(e))},[t,e])}export{a as t};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{i as t,l as n}from"./local-settings-Bx7FsNo5.js";import{t as r}from"./react-BFJW0bSv.js";import{i}from"./use-attachment-preview-Cq_IWTdT.js";import{n as a,t as o}from"./create-selectors-CmDroXTn.js";import{n as s}from"./event-bus-B-wwSVzo.js";import{r as c}from"./typed-storage-BNw603jr.js";import{t as l}from"./client-perf-BZu5XQCP.js";import{a as u}from"./diagnostics-CwFqcLv_.js";import{t as ee}from"./conversation-store-DKBwV4bc.js";import{s as te,u as d}from"./messages-CPTfRZA4.js";import{C as f,D as p,n as ne,t as re,w as ie,x as ae}from"./chat-CHVUM3s0.js";var m=e(r(),1),h=1e3,oe=15,se=0,g=new Map,_=[],v=new Map,ce=20;function le(e){let t=`sse-${++se}`,n={id:t,abortSignal:e,initiatedAt:Date.now(),establishedAt:null,lastTrafficAt:null,lastDataAt:null,dataFrames:0,keepalives:0,firstFrameAt:null,interKeepaliveMs:null,endedAt:null,endReason:null};g.set(t,n),xe();let r=()=>{be(t,`aborted`)};return e.aborted?r():e.addEventListener(`abort`,r,{once:!0}),t}function ue(e){let t=g.get(e);t&&t.establishedAt===null&&(t.establishedAt=Date.now())}function de(e,t){let n=g.get(e);if(!n)return;let r=Date.now();n.lastTrafficAt=r,n.firstFrameAt===null&&(n.firstFrameAt=r),t?(n.lastDataAt=r,n.dataFrames++):(n.keepalives++,fe(n,r))}function fe(e,t){let n=v.get(e.id);if(!n){v.set(e.id,{lastKeepaliveAt:t,gaps:[]});return}n.gaps.push(t-n.lastKeepaliveAt),n.lastKeepaliveAt=t,n.gaps.length>ce&&n.gaps.shift(),n.gaps.length>=2&&(e.interKeepaliveMs=Math.round(pe(n.gaps)))}function pe(e){let t=[...e].sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2==1?t[n]:(t[n-1]+t[n])/2}function me(e,t){_.push({clientId:e,receivedAt:new Date().toISOString(),...t}),_.length>h&&_.shift()}var he=`events-tail`;function ge(e){if(e.length===0)return;let t=new Set;for(let e of _)typeof e.seq==`number`&&t.add(e.seq);for(let n of e)typeof n.seq==`number`&&t.has(n.seq)||_.push({clientId:he,receivedAt:new Date().toISOString(),...n});for(;_.length>h;)_.shift()}function _e(){return Array.from(g.values())}function ve(e=h){let t=Math.max(0,_.length-e);return _.slice(t)}function ye(e,t){if(t===null)return null;let n=1/0;for(let e of _)typeof e.seq==`number`&&(n=Math.min(n,e.seq));return n!==1/0&&n>t+1?null:_.filter(n=>n.conversationId===e&&typeof n.seq==`number`&&n.seq>t).sort((e,t)=>e.seq-t.seq)}function be(e,t){let n=g.get(e);n&&(n.endedAt===null?(n.endedAt=Date.now(),n.endReason=t):n.endReason===`aborted`&&t!==`aborted`&&(n.endReason=t),v.delete(e),xe())}function xe(){let e=0;for(let t of g.values())t.endedAt!==null&&e++;if(!(e<=oe))for(let[t,n]of g){if(e<=oe)break;n.endedAt!==null&&(g.delete(t),v.delete(t),e--)}}var Se=15e3,y=null;function b(){y!==null&&(clearTimeout(y.timer),y=null)}function x(e){if(y===null)return;let t=performance.now()-y.at;b(),l(`client_switch.abandoned`,t,{reason:e})}function Ce(e){x(`superseded`),y={conversationId:e,at:performance.now(),timer:setTimeout(()=>{y=null,l(`client_switch.stalled`,Se,{reason:`timeout`})},Se)}}function we(e,t){if(y===null||y.conversationId!==e)return;let n=performance.now()-y.at;b(),l(`client_switch.transcript_painted`,n,{had_history:t.hadHistory})}function Te({conversationId:e,historyLoadFailed:t,transcriptPainted:n,hadHistory:r}){(0,m.useEffect)(()=>{if(e!==null){if(t){x(`history_error`);return}n&&we(e,{hadHistory:r})}}),(0,m.useEffect)(()=>()=>{x(`unmount`)},[])}function Ee(){let e=s(`app.hidden`,()=>{x(`hidden`)});return()=>{e(),b()}}var S={phase:`idle`,pendingQueuedCount:0,activeToolCallCount:0,activeTurnId:null,lastTerminalReason:null,statusText:null,liveWebActivity:{}};function De(e){return e===`queued`||e===`thinking`||e===`streaming`||e===`awaiting_user_input`}function Oe(e){return e===`thinking`}function C(e){return(e.phase===`idle`||e.phase===`errored`)&&!e.activeTurnId}var ke=o(a()((e,t)=>({...S,requestSend:t=>e(e=>({phase:`thinking`,activeTurnId:t??e.activeTurnId,lastTerminalReason:null,activeToolCallCount:0,statusText:null})),acceptSend:t=>e(e=>({activeTurnId:t,...e.phase===`idle`||e.phase===`errored`?{phase:`thinking`,lastTerminalReason:null}:null})),onTextDelta:()=>{let n=t();if(n.phase===`idle`||n.phase===`errored`){if(!n.activeTurnId)return;e({phase:`streaming`});return}(n.phase===`thinking`||n.phase===`queued`)&&e({phase:`streaming`})},onToolUseStart:()=>{let n=t();C(n)||e({phase:n.phase===`idle`||n.phase===`errored`||n.phase===`queued`?`thinking`:n.phase,activeToolCallCount:n.activeToolCallCount+1})},onToolResult:()=>e(e=>({activeToolCallCount:Math.max(0,e.activeToolCallCount-1)})),onToolActivityMetadata:(n,r)=>{let i=t();C(i)||e({liveWebActivity:{...i.liveWebActivity,[n]:r}})},onActivityThinking:(n,r)=>{let i=t();if(C(i)){if(!r?.canStartFromIdle)return;e({phase:`thinking`,statusText:n??null,lastTerminalReason:null});return}i.phase!==`awaiting_user_input`&&e({phase:`thinking`,statusText:n??null})},recoverFromAwaitingUserInput:()=>{t().phase===`awaiting_user_input`&&e({phase:`thinking`})},showSurface:n=>{C(t())||n&&e({phase:`awaiting_user_input`})},updateSurface:()=>{},dismissSurface:()=>{let n=t();n.phase===`awaiting_user_input`&&n.activeToolCallCount===0&&e({phase:`thinking`})},completeSurface:()=>{let n=t();n.phase===`awaiting_user_input`&&n.activeToolCallCount===0&&e({phase:`thinking`})},onSecretRequest:()=>{C(t())||e({phase:`awaiting_user_input`})},onConfirmationRequest:()=>{C(t())||e({phase:`awaiting_user_input`})},onQuestionRequest:()=>{C(t())||e({phase:`awaiting_user_input`})},onContactRequest:()=>{C(t())||e({phase:`awaiting_user_input`})},completeTurn:()=>{e({phase:t().pendingQueuedCount>0?`queued`:`idle`,activeTurnId:null,activeToolCallCount:0,lastTerminalReason:`complete`,statusText:null,liveWebActivity:{}})},handoffGeneration:()=>{C(t())||e({phase:`thinking`,activeToolCallCount:0,statusText:null})},cancelGeneration:()=>{e({phase:t().pendingQueuedCount>0?`queued`:`idle`,activeTurnId:null,activeToolCallCount:0,lastTerminalReason:`cancelled`,statusText:null,liveWebActivity:{}})},onStreamError:()=>e({phase:`idle`,activeTurnId:null,activeToolCallCount:0,pendingQueuedCount:0,lastTerminalReason:`error`,statusText:null,liveWebActivity:{}}),onSessionError:()=>e({phase:`idle`,activeTurnId:null,activeToolCallCount:0,pendingQueuedCount:0,lastTerminalReason:`session_error`,statusText:null,liveWebActivity:{}}),onTurnTimeout:()=>e({phase:`idle`,activeTurnId:null,activeToolCallCount:0,pendingQueuedCount:0,lastTerminalReason:`timeout`,statusText:null,liveWebActivity:{}}),onPollReconciled:n=>{let r=t();n&&n!==r.activeTurnId||De(r.phase)&&e({phase:`idle`,activeTurnId:null,activeToolCallCount:0,lastTerminalReason:`complete`,statusText:null,liveWebActivity:{}})},resetTurn:()=>e({...S}),clearStaleTurn:()=>{let n=t();n.activeTurnId&&De(n.phase)||e({...S})},enqueueMessage:()=>e(e=>({pendingQueuedCount:e.pendingQueuedCount+1})),dequeueMessage:()=>{let n=t(),r=Math.max(0,n.pendingQueuedCount-1);if(C(n)){e({pendingQueuedCount:r});return}e({phase:`thinking`,pendingQueuedCount:r})},deleteQueuedMessage:()=>{let n=t(),r=Math.max(0,n.pendingQueuedCount-1);if(r===0&&n.phase===`queued`){e({phase:`idle`,pendingQueuedCount:0,activeTurnId:null,lastTerminalReason:`complete`,statusText:null,liveWebActivity:{}});return}e({pendingQueuedCount:r})}})));function Ae(e){if(e.length===0)return``;let t=e[0]??``;for(let n=1;n<e.length;n++){let r=t[t.length-1],i=e[n][0];r&&i&&r!==` `&&r!==`
|
|
2
|
-
`&&r!==` `&&i!==` `&&i!==`
|
|
3
|
-
`&&i!==` `&&(t+=` `),t+=e[n]}return t}function je(e){let t=[];for(let n of e?.contentBlocks??[])n.type===`text`&&t.push(n.text);return Ae(t)}function Me(e){return[...new Set([e.id,...e.mergedMessageIds??[]].filter(e=>typeof e==`string`&&e.length>0))]}function w(e){let t=Me(e);return e.clientMessageId&&!t.includes(e.clientMessageId)?[...t,e.clientMessageId]:t}function T(e,t){return e.id===t||e.clientMessageId===t||(e.mergedMessageIds?.includes(t)??!1)}function Ne(e,t){if(t.length===0)return e;let n=new Map;for(let e of t)for(let t of w(e))n.has(t)||n.set(t,e);let r=[],i=new Set;for(let t of e){let e;for(let r of w(t)){let t=n.get(r);if(t){e=t;break}}if(e){i.has(e)||(r.push(e),i.add(e));continue}r.push(t)}for(let e of t)i.has(e)||r.push(e);return r}function E(e,t){let n=[...e??[]],r=n.findIndex(e=>e.type===`surface`&&e.surface.surfaceId===t.surfaceId);return r===-1?n.push({type:`surface`,surface:t}):n[r]={type:`surface`,surface:t},n}function Pe(e,t){return e?.filter(e=>!(e.type===`surface`&&e.surface.surfaceId===t))}function Fe(e,t){if(!e.surfaces?.length)return e;let n=!1,r=e.contentBlocks,i=e.surfaces.map(e=>{let i=t(e);return i!==e&&(n=!0,r=E(r,i)),i});return n?{...e,surfaces:i,contentBlocks:r}:e}function Ie(e,t){if(!e.surfaces?.length)return e;let n=e.surfaces.filter(t);if(n.length===e.surfaces.length)return e;let r=new Set(e.surfaces.filter(e=>!t(e)).map(e=>e.surfaceId));return{...e,surfaces:n,contentOrder:e.contentOrder?.filter(e=>!(e.type===`surface`&&r.has(e.id))),contentBlocks:e.contentBlocks?.filter(e=>!(e.type===`surface`&&r.has(e.surface.surfaceId)))}}function Le(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function Re(e){let t=JSON.parse(e);return Le(t)?t:null}var ze=500,Be=c({keyFn:e=>`vellum:dismissed-surfaces:${e}`,scope:`user`,parseValue:e=>Le(e)?e:null,fallback:{},maxEntries:200});function Ve(e,t){let n=Be.get(e,t);return n?new Set(n):new Set}function He(e,t,n){let r=Array.from(n);r.length>ze&&(r=r.slice(r.length-ze)),Be.set(e,t,r)}var Ue=[];function We(e,t){if(!e)return Ue;if(t.size===0)return e;let n=!1,r=e.map(e=>{let r=Ie(e,e=>!t.has(e.surfaceId));return r!==e&&(n=!0),r});return n?r:e}function Ge(e){if(!e||typeof e!=`object`)return!1;let t=e;return!(typeof t.tokens!=`number`||!Number.isFinite(t.tokens)||t.maxTokens!==null&&(typeof t.maxTokens!=`number`||!Number.isFinite(t.maxTokens))||t.fillRatio!==null&&(typeof t.fillRatio!=`number`||!Number.isFinite(t.fillRatio)))}var Ke=c({keyFn:e=>`vellum:ctxwindow:${e}`,scope:`user`,parseValue:e=>Ge(e)?e:null,fallback:{},maxEntries:200});function qe(e){return new Map(Object.entries(Ke.load(e)))}function Je(e,t,n){Ke.set(e,t,n)}var Ye=`PROVIDER_BILLING`,Xe=`PROVIDER_NOT_CONFIGURED`,Ze=`MANAGED_KEY_INVALID`,Qe=`credits_exhausted`,$e=`provider_billing`,et=`daily_limit_reached`;function tt(e){return e?e.category?e.category.endsWith(Qe):e.code===Ye:!1}function nt(e){return e?tt({code:e.code,category:e.errorCategory}):!1}function rt(e){return e?.errorCategory?e.errorCategory.endsWith($e):!1}function it(e){return e?.errorCategory?e.errorCategory.endsWith(et):!1}function at(e){return it(e)?`daily_limit`:nt(e)?`managed_credits`:rt(e)?`provider_billing`:null}function ot(e){let t=e.dailyLimitSnoozed!==!0;return e.billingBannerDecision===`daily_limit`&&t?`daily_limit`:e.billingBannerDecision===`provider_billing`?`provider_billing`:e.billingBannerDecision===`managed_credits`?null:e.dailyLimitReached===!0&&t?`daily_limit`:e.isLowBalance&&!e.dismissed?`low_balance`:null}function D(e){return at(e)!==null||e?.code===Xe||e?.displayAs===`modal`}function st(e){return!!e&&!D(e)}function ct(e){return e?.code===Ze}var lt={pendingSecret:null,isSubmittingSecret:!1,secretSaved:!1,pendingConfirmation:null,isSubmittingConfirmation:!1,pendingContactRequest:null,isSubmittingContactRequest:!1,contactRequestAccepted:!1,pendingQuestion:null,isSubmittingQuestion:!1,isQuestionCardDismissed:!1,inlineConfirmationToolCallId:null,pendingAcpConnect:null,dismissedAcpConnectToolUseIds:new Set,pendingAcpContinue:!1,unknownNudgeToolCallIds:new Set},O=o(a()((e,t)=>({...lt,showSecret:n=>{let{pendingSecret:r}=t();if(r&&r.requestId===n.requestId){let t={};for(let e of Object.keys(n))n[e]!==void 0&&(t[e]=n[e]);e({pendingSecret:{...r,...t}});return}e({pendingSecret:n,isSubmittingSecret:!1,secretSaved:!1})},submitSecretStart:()=>e({isSubmittingSecret:!0}),submitSecretEnd:t=>e({isSubmittingSecret:!1,secretSaved:t??!1}),dismissSecret:()=>e({pendingSecret:null,isSubmittingSecret:!1}),updateSecret:(n,r)=>{let{pendingSecret:i}=t();!i||i.requestId!==n||e({pendingSecret:{...i,...r}})},showConfirmation:t=>e({pendingConfirmation:t,isSubmittingConfirmation:!1}),submitConfirmationStart:()=>e({isSubmittingConfirmation:!0}),submitConfirmationEnd:()=>e({isSubmittingConfirmation:!1}),dismissConfirmation:()=>e({pendingConfirmation:null,isSubmittingConfirmation:!1}),dismissConfirmationIfMatches:n=>{let{pendingConfirmation:r}=t();!r||r.requestId!==n||e({pendingConfirmation:null,isSubmittingConfirmation:!1})},updateConfirmation:(n,r)=>{let{pendingConfirmation:i}=t();!i||i.requestId!==n||e({pendingConfirmation:{...i,...r}})},setInlineConfirmationToolCallId:t=>e({inlineConfirmationToolCallId:t}),showContactRequest:t=>e({pendingContactRequest:t,isSubmittingContactRequest:!1,contactRequestAccepted:!1}),submitContactRequestStart:()=>e({isSubmittingContactRequest:!0}),submitContactRequestEnd:()=>e({isSubmittingContactRequest:!1}),dismissContactRequest:()=>e({pendingContactRequest:null,isSubmittingContactRequest:!1}),acceptContactRequest:()=>e({contactRequestAccepted:!0}),showQuestion:t=>e({pendingQuestion:t,isSubmittingQuestion:!1,isQuestionCardDismissed:!1}),submitQuestionStart:()=>e({isSubmittingQuestion:!0}),submitQuestionEnd:()=>e({isSubmittingQuestion:!1}),dismissQuestion:()=>e({pendingQuestion:null,isSubmittingQuestion:!1,isQuestionCardDismissed:!1}),dismissQuestionIfMatches:n=>{let{pendingQuestion:r}=t();!r||r.requestId!==n||e({pendingQuestion:null,isSubmittingQuestion:!1,isQuestionCardDismissed:!1})},dismissQuestionCard:()=>e({isQuestionCardDismissed:!0}),resetSecretAndConfirmation:()=>e({pendingSecret:null,isSubmittingSecret:!1,secretSaved:!1,pendingConfirmation:null,isSubmittingConfirmation:!1,inlineConfirmationToolCallId:null}),showAcpConnect:t=>e(e=>e.dismissedAcpConnectToolUseIds.has(t.toolUseId)?{}:{pendingAcpConnect:t}),dismissAcpConnect:()=>e(e=>({pendingAcpConnect:null,dismissedAcpConnectToolUseIds:e.pendingAcpConnect?new Set(e.dismissedAcpConnectToolUseIds).add(e.pendingAcpConnect.toolUseId):e.dismissedAcpConnectToolUseIds})),requestAcpContinue:()=>e({pendingAcpContinue:!0}),clearAcpContinue:()=>e({pendingAcpContinue:!1}),addUnknownNudgeToolCallId:n=>{let r=t().unknownNudgeToolCallIds;r.has(n)||e({unknownNudgeToolCallIds:new Set([...r,n])})},removeUnknownNudgeToolCallId:n=>{let r=t().unknownNudgeToolCallIds;if(!r.has(n))return;let i=new Set(r);i.delete(n),e({unknownNudgeToolCallIds:i})},resetAll:()=>e(e=>({...lt,pendingAcpConnect:e.pendingAcpConnect}))}))),ut=3670016,dt=[.85,.75,.65,.5],ft=2e7,pt=new Set([`image/jpeg`,`image/jpg`,`image/png`,`image/webp`,`image/heic`,`image/heif`,`image/bmp`,`image/tiff`]),mt=new Set([`jpg`,`jpeg`,`png`,`webp`,`heic`,`heif`,`bmp`,`tif`,`tiff`]);function k(e){let t=e.type.trim().toLowerCase();if(pt.has(t))return!0;let n=e.name.split(`.`).pop()?.trim().toLowerCase();return n?mt.has(n):!1}function ht(e){return k(e)&&e.size>3670016}function gt(e){let t=e.type.trim().toLowerCase();if(t===`image/heic`||t===`image/heif`)return!0;let n=e.name.split(`.`).pop()?.trim().toLowerCase();return n===`heic`||n===`heif`}function _t(e){return ht(e)||gt(e)}function vt(e){if(/^image\/jpe?g$/i.test(e))return`jpg`;let t=e.slice(6).toLowerCase();return/^[a-z0-9]+$/.test(t)?t:`jpg`}function yt(e,t=`image/jpeg`){let n=`attachment`,r=e.trim()||n,i=vt(t),a=r.match(/\.([^./\\]+)$/)?.[1]?.toLowerCase();return a===i||i===`jpg`&&a===`jpeg`?r:`${r.replace(/\.[^./\\]+$/,``)||n}.${i}`}async function bt(e){if(!_t(e)||await St(e))return{status:`unchanged`,file:e};if(e.size>104857600)return{status:`failed`,error:`This image is too large to process safely. Please choose a smaller image.`};let t;try{t=await xt(e)}catch{return{status:`failed`,error:`Couldn't resize this image for upload. Try a smaller image.`}}try{let n;try{n=await wt(t,e.size)}catch{n=null}if(!n||!gt(e)&&n.size>=e.size)return{status:`failed`,error:`Couldn't resize this image for upload. Try a smaller image.`};let r=n.type.startsWith(`image/`)?n.type:`image/jpeg`;return{status:`resized`,file:new File([n],yt(e.name,r),{type:r,lastModified:e.lastModified})}}finally{t.close()}}async function xt(e){if(typeof createImageBitmap==`function`)try{let t=await createImageBitmap(e,{imageOrientation:`from-image`});return{source:t,width:t.width,height:t.height,close:()=>t.close()}}catch{}if(typeof Image>`u`)throw Error(`No browser image decoder is available.`);let t=URL.createObjectURL(e);return await new Promise((e,n)=>{let r=new Image;r.onload=()=>{e({source:r,width:r.naturalWidth||r.width,height:r.naturalHeight||r.height,close:()=>URL.revokeObjectURL(t)})},r.onerror=()=>{URL.revokeObjectURL(t),n(Error(`Image decode failed.`))},r.src=t})}async function St(e){if(!Ct(e))return!1;let t;try{t=new Uint8Array(await e.slice(0,Math.min(e.size,1024*1024)).arrayBuffer())}catch{return!0}if(!j(t,0,`RIFF`)||!j(t,8,`WEBP`))return!1;let n=A(t,`VP8X`);return n>=0&&(t[n+8]??0)&2?!0:A(t,`ANIM`)>=0||A(t,`ANMF`)>=0}function Ct(e){return e.type.trim().toLowerCase()===`image/webp`||/\.webp$/i.test(e.name)}function A(e,t){for(let n=0;n<=e.length-t.length;n+=1)if(j(e,n,t))return n;return-1}function j(e,t,n){if(t+n.length>e.length)return!1;for(let r=0;r<n.length;r+=1)if(e[t+r]!==n.charCodeAt(r))return!1;return!0}async function wt(e,t){let n=e.width*e.height,r=null;if(n<=ft)for(let t of dt){let n=await Tt(e.source,e.width,e.height,t);if(r=M(r,n),n&&n.size<=3670016)return n}let i=r?.size??t,a=Math.min(Math.sqrt(ut/i*.9),.95);for(let t=0;t<4;t+=1){let t=Math.max(Math.floor(e.width*a),1),n=Math.max(Math.floor(e.height*a),1),o=null;for(let i of dt){let a=await Tt(e.source,t,n,i);if(r=M(r,a),o=M(o,a),a&&a.size<=3670016)return a}i=o?.size??i,a*=Math.min(Math.sqrt(ut/i*.9),.9)}return null}function M(e,t){return t&&(!e||t.size<e.size)?t:e}async function Tt(e,t,n,r){if(typeof document>`u`)return null;let i=document.createElement(`canvas`);i.width=t,i.height=n;let a=i.getContext(`2d`);if(!a||typeof i.toBlob!=`function`)return null;a.fillStyle=`#fff`,a.fillRect(0,0,t,n),a.drawImage(e,0,0,t,n);try{return await new Promise(e=>{i.toBlob(t=>e(t),`image/jpeg`,r)})}finally{i.width=0,i.height=0}}var Et=`vellum:chatDrafts:`;function Dt(e){return`${Et}${e}`}function Ot(e){let n=t(Dt(e),``);if(!n)return new Map;try{let e=JSON.parse(n);return typeof e!=`object`||!e||Array.isArray(e)?new Map:new Map(Object.entries(e).filter(e=>typeof e[1]==`string`))}catch{return new Map}}function N(e,t){n(Dt(e),JSON.stringify(Object.fromEntries(t)))}function kt(){return`att-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function At(e){return k(e)?`100 MB`:`50 MB`}function jt(e){return e.size<=52428800?!0:k(e)&&e.size<=104857600}function Mt(e){let t=e.replace(/[/\\]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return n===-1?t:t.slice(n+1)}var P=new Map,F=null,I=new Map,L=new Set,Nt=a()((e,t)=>({input:``,restoredDraftConversationId:null,attachments:[],attachmentLastError:null,setInput:t=>{e(e=>({input:typeof t==`function`?t(e.input):t}))},saveDraft:(e,t)=>{t.trim()?P.set(e,t):P.delete(e),F&&N(F,P)},clearDraft:e=>{P.delete(e),F&&N(F,P)},handleConversationSwitch:({previousKey:n,nextKey:r})=>{if(!(n!==null&&n!==r)||!n)return;let i=t().input;i.trim()?P.set(n,i):P.delete(n);let a=(r&&P.get(r))??``;e({input:a,restoredDraftConversationId:a.length>0&&r?r:null}),F&&N(F,P)},loadAssistantDrafts:(n,r)=>{if(F&&F!==n){let n=t().input;r&&(n.trim()?P.set(r,n):P.delete(r)),N(F,P),e({input:``,restoredDraftConversationId:null})}P=Ot(n),F=n},clearRestoredDraftNotice:()=>{e({restoredDraftConversationId:null})},restoreDraftIfEmpty:n=>{let r=P.get(n);r&&r.trim()&&!t().input.trim()&&e({input:r,restoredDraftConversationId:n})},addFiles:(t,n)=>{let r=Array.from(t);if(r.length===0)return;if(!n){e({attachmentLastError:`No active assistant. Please try again.`});return}let a=[],o=[];for(let e of r)jt(e)?o.push(e):a.push(e);let s=a[0];if(e(s?{attachmentLastError:a.length===1?`${s.name} is larger than ${At(s)} and can't be attached.`:`${a.length} files are too large and can't be attached.`}:{attachmentLastError:null}),o.length===0)return;let c=o.map(e=>({pending:{kind:`uploading`,localId:kt(),filename:e.name||`attachment`,mimeType:e.type||`application/octet-stream`,sizeBytes:e.size},file:e}));e(e=>({attachments:[...e.attachments,...c.map(e=>e.pending)]}));for(let{pending:t,file:r}of c)(async()=>{try{let a=await bt(r);if(L.has(t.localId)){L.delete(t.localId);return}if(a.status===`failed`&&r.size>52428800){R(e,t.localId,a.error);return}let o=a.status===`failed`?r:a.file;if(o.size>52428800){R(e,t.localId,`This attachment is still larger than 50 MB after resizing. Try a smaller image.`);return}a.status===`resized`&&e(e=>({attachments:e.attachments.map(e=>e.localId===t.localId&&e.kind===`uploading`?{...e,filename:o.name||`attachment`,mimeType:o.type||`application/octet-stream`,sizeBytes:o.size}:e)}));let s=await te(n,o);if(L.has(t.localId)){L.delete(t.localId);return}if(!s.ok){R(e,t.localId,s.error.detail??`Upload failed`);return}let c=o.type||`application/octet-stream`,l=s.filename??(o.name||`attachment`),u=s.mimeType??c,ee=s.sizeBytes??o.size,d=o;if(u.startsWith(`image/`)&&u!==c){let e=await i(n,s.id);if(L.has(t.localId)){L.delete(t.localId);return}e&&(d=e)}let f=null;try{f=URL.createObjectURL(d),I.set(t.localId,f)}catch{f=null}e(e=>({attachments:e.attachments.map(e=>e.localId===t.localId?{kind:`uploaded`,localId:t.localId,id:s.id,filename:l,mimeType:u,sizeBytes:ee,previewUrl:f,thumbnailUrl:null}:e)}))}catch{if(L.has(t.localId)){L.delete(t.localId);return}R(e,t.localId,`Upload failed`)}})()},addPathReferences:t=>{let n=[];for(let e of t){let t=e.trim();t&&n.push({kind:`path-reference`,localId:kt(),path:t,filename:Mt(t)||t})}n.length!==0&&e(e=>({attachments:[...e.attachments,...n],attachmentLastError:null}))},removeAttachment:t=>{e(e=>{let n=e.attachments.find(e=>e.localId===t);return n&&n.kind===`uploading`&&L.add(t),{attachments:e.attachments.filter(e=>e.localId!==t)}}),Pt(t)},resetAttachments:()=>{e(e=>{for(let t of e.attachments)t.kind===`uploading`&&L.add(t.localId);return{attachments:[],attachmentLastError:null}})},fullReset:()=>{e(e=>{for(let t of e.attachments)t.kind===`uploading`&&L.add(t.localId);return{attachments:[],attachmentLastError:null}}),I.forEach(e=>URL.revokeObjectURL(e)),I.clear()},dismissAttachmentError:()=>{e({attachmentLastError:null})}}));function R(e,t,n){e(e=>({attachments:e.attachments.map(e=>e.localId!==t||e.kind!==`uploading`?e:{kind:`failed`,localId:t,filename:e.filename,mimeType:e.mimeType,sizeBytes:e.sizeBytes,error:n})}))}function Pt(e){let t=I.get(e);t&&(URL.revokeObjectURL(t),I.delete(e))}function Ft(e){return e.reduce((e,t)=>t.kind===`uploading`?e+1:e,0)}function It(e){return e.filter(e=>e.kind===`uploaded`).map(e=>e.id)}function Lt(e){return e.filter(e=>e.kind===`path-reference`).map(e=>e.path)}var z=o(Nt);function Rt(e){if(!(!e||e.length===0))return e.map(e=>{let{previewUrl:t,thumbnailUrl:n}=d(e.mimeType,e.data,e.thumbnailData,e.id!=null);return{id:e.id??e.filename,filename:e.filename,mimeType:e.mimeType,sizeBytes:e.sizeBytes??(e.data?Math.floor(e.data.length*3/4):0),previewUrl:t,thumbnailUrl:n}})}function B(e){let t=e[e.length-1];return!!t&&t.role===`assistant`}function zt(e,t){if(!t)return null;let n=e.length-1;for(;n>=0&&e[n].role===`user`&&e[n].queueStatus===`queued`;)n--;let r=e[n];return!r||r.role!==`assistant`?null:r.id}function V(e,t){return e.findIndex(e=>e.role===`assistant`&&(e.id===t||!!e.mergedMessageIds?.includes(t)))}function H(e,t){if(t){let n=V(e,t);if(n!==-1)return n}let n=e.findLastIndex(e=>e.role===`user`&&e.queueStatus!==`queued`)+1;for(let t=e.length-1;t>=n;t--)if(e[t]?.role===`assistant`)return t;return-1}function U(e,t){if(!t||e.id===t)return e;let n=e.mergedMessageIds??[];return n.includes(t)?e:{...e,mergedMessageIds:[...n,t]}}function W(e,t=Date.now()){if(!e.toolCalls?.some(e=>p(e)))return null;let n=t;return{toolCalls:e.toolCalls.map(e=>p(e)?{...e,completedAt:n}:e),contentBlocks:e.contentBlocks?.map(e=>e.type===`tool_use`&&p(e.toolCall)?{type:`tool_use`,toolCall:{...e.toolCall,completedAt:n}}:e)}}function Bt(e,t,n){return e.map(e=>e.id===t?{...e,queuePosition:n}:e)}function Vt(e,t){return e.map(e=>T(e,t)?{...e,queueStatus:void 0,queuePosition:void 0}:e)}function Ht(e,t){return e.map(e=>T(e,t)?{...e,...e.clientMessageId?{}:{isOptimistic:!0},queueStatus:void 0,queuePosition:void 0}:e)}function Ut(e,t,n){return e.map(e=>T(e,t)?{...e,queueStatus:`queued`,queuePosition:n}:e)}function Wt(e,t){return e.filter(e=>!T(e,t))}function Gt(e,t,n,r=Date.now()){return[...e,{id:n??crypto.randomUUID(),...n?{}:{isOptimistic:!0},role:`assistant`,textSegments:[t],contentOrder:[{type:`text`,id:`0`}],contentBlocks:[{type:`text`,text:t}],timestamp:r}]}function Kt(e,t,n){n&&e[e.length-1]?.type===t.type?e[e.length-1]=t:e.push(t)}function G(e,t,n,r){let i=U(e[t],r),a=[...i.textSegments??[]],o=[...i.contentOrder??[]],s=[...i.contentBlocks??[]],c=o[o.length-1]?.type===`text`&&a.length>0;c?a[a.length-1]=a[a.length-1]+n:(o.push({type:`text`,id:String(a.length)}),a.push(n)),Kt(s,{type:`text`,text:a[a.length-1]},c);let l=[...e];return l[t]={...i,textSegments:a,contentOrder:o,contentBlocks:s},l}function K(e,t,n,r){let i=U(e[t],r),a=[...i.thinkingSegments??[]],o=[...i.contentOrder??[]],s=[...i.contentBlocks??[]],c=o[o.length-1]?.type===`thinking`&&a.length>0;c?a[a.length-1]=a[a.length-1]+n:(o.push({type:`thinking`,id:String(a.length)}),a.push(n)),Kt(s,{type:`thinking`,thinking:a[a.length-1]},c);let l=[...e];return l[t]={...i,thinkingSegments:a,contentOrder:o,contentBlocks:s},l}function qt(e,t,n,r,i=Date.now()){if(n){let a=V(e,n);if(a>=0)return G(e,a,t,n);if(B(e))return G(e,e.length-1,t,n);let o=r?.();return o?G([...e,o],e.length,t,n):Gt(e,t,n,i)}return B(e)?G(e,e.length-1,t,void 0):Gt(e,t,n,i)}function Jt(e,t,n,r=Date.now()){return[...e,{id:n??crypto.randomUUID(),...n?{}:{isOptimistic:!0},role:`assistant`,thinkingSegments:[t],contentOrder:[{type:`thinking`,id:`0`}],contentBlocks:[{type:`thinking`,thinking:t}],timestamp:r}]}function Yt(e,t,n,r,i=Date.now()){if(n){let a=V(e,n);if(a>=0)return K(e,a,t,n);if(B(e))return K(e,e.length-1,t,n);let o=r?.();return o?K([...e,o],e.length,t,n):Jt(e,t,n,i)}return B(e)?K(e,e.length-1,t,void 0):Jt(e,t,n,i)}function Xt(e,t=Date.now()){let n=!1,r=e.map(e=>{if(e.role!==`assistant`)return e;let r=W(e,t);return r?(n=!0,{...e,...r}):e});return n?r:e}function Zt(e,t,n=Date.now()){let r=e[e.length-1],i=Rt(t.attachments);if(r?.role!==`assistant`)return i?[...e,{id:t.messageId??crypto.randomUUID(),...t.messageId?{}:{isOptimistic:!0},role:`assistant`,timestamp:n,attachments:i}]:e;let a=W(r,n),o=r.isOptimistic===!0&&!!t.messageId;return[...e.slice(0,-1),{...r,...o?{id:t.messageId,isOptimistic:!1}:{},...i?{attachments:i}:{},...a??{}}]}function Qt(e,t){if(t!==void 0)return e.findIndex(e=>e.role===`user`&&e.clientMessageId===t);let n=-1;for(let t=e.length-1;t>=0;t--){let r=e[t];if(r&&r.role===`user`&&r.isOptimistic===!0){if(!r.clientMessageId)return t;n===-1&&(n=t)}}return n}function $t(e,t,n=Date.now()){let r=t.messageId;if(r!==void 0&&e.some(e=>e.role===`user`&&(e.id===r||e.mergedMessageIds?.includes(r))))return e;let i=Qt(e,t.clientMessageId);if(i!==-1){if(r===void 0)return e;let t=[...e];return t[i]={...t[i],id:r,isOptimistic:!1,queueStatus:void 0,queuePosition:void 0},t}return[...e,{id:r??crypto.randomUUID(),...r===void 0?{isOptimistic:!0}:{},...t.clientMessageId?{clientMessageId:t.clientMessageId}:{},role:`user`,textSegments:[t.text],contentOrder:[{type:`text`,id:`0`}],contentBlocks:[{type:`text`,text:t.text}],timestamp:n}]}function en(e,t=Date.now()){let n=e.length-1,r=e[n];if(!r||r.role!==`assistant`)return e;let i=W(r,t);if(!(je(r).trim().length>0||r.thinkingSegments!=null&&r.thinkingSegments.length>0||r.toolCalls!=null&&r.toolCalls.length>0||r.surfaces!=null&&r.surfaces.length>0))return e.slice(0,-1);let a=[...e];return a[n]={...r,...i??{}},a}function q(e,t){let n=[...e??[]],r=n.findIndex(e=>e.type===`tool_use`&&e.toolCall.id===t.id);return r===-1?n.push({type:`tool_use`,toolCall:t}):n[r]={type:`tool_use`,toolCall:t},n}function J(e,t,n,r){let i=U(e[t],r),a=i.toolCalls?.findIndex(e=>e.id===n.id)??-1,o=[...e];if(a!==-1){let e=[...i.toolCalls??[]],r={...e[a],...n};return e[a]=r,o[t]={...i,toolCalls:e,contentBlocks:q(i.contentBlocks,r)},o}return o[t]={...i,toolCalls:[...i.toolCalls??[],n],contentOrder:[...i.contentOrder??[],{type:`toolCall`,id:n.id}],contentBlocks:q(i.contentBlocks,n)},o}function tn(e,t,n,r=Date.now()){if(n){let r=V(e,n);if(r>=0)return J(e,r,t,n);if(B(e))return J(e,e.length-1,t,n)}else if(B(e))return J(e,e.length-1,t);return[...e,{id:n??crypto.randomUUID(),...n?{}:{isOptimistic:!0},role:`assistant`,toolCalls:[t],contentOrder:[{type:`toolCall`,id:t.id}],contentBlocks:[{type:`tool_use`,toolCall:t}],timestamp:r}]}function nn(e,t){let n=-1,r=-1;if(t.toolUseId)for(let i=e.length-1;i>=0;i--){let a=e[i];if(a?.role!==`assistant`||!a.toolCalls?.length)continue;let o=a.toolCalls.findIndex(e=>e.id===t.toolUseId);if(o!==-1){n=i,r=o;break}}if(n===-1){if(n=e.findLastIndex(e=>e.role===`assistant`&&e.toolCalls&&e.toolCalls.length>0),n===-1)return e;let t=e[n];if(!t?.toolCalls)return e;r=t.toolCalls.findLastIndex(e=>p(e))}if(r===-1)return e;let i=e[n],a=i.toolCalls[r];if(!a)return e;let o=t.imageDataList===void 0?t.imageData===void 0?void 0:[t.imageData]:t.imageDataList,s=t.imageData===void 0?o?.[0]:t.imageData,c=[...i.toolCalls],l={...a,result:t.result,isError:t.isError,riskLevel:t.riskLevel,riskReason:t.riskReason,matchedTrustRuleId:t.matchedTrustRuleId,approvalMode:t.approvalMode,approvalReason:t.approvalReason,riskThreshold:t.riskThreshold,riskAllowlistOptions:t.riskAllowlistOptions,riskScopeOptions:t.riskScopeOptions,riskDirectoryScopeOptions:t.riskDirectoryScopeOptions,...s===void 0?{}:{imageData:s},...o===void 0?{}:{imageDataList:o},...t.activityMetadata===void 0?{}:{activityMetadata:t.activityMetadata},...t.answeredQuestion===void 0?{}:{answeredQuestion:t.answeredQuestion},...t.errorCode===void 0?{}:{errorCode:t.errorCode},completedAt:t.completedAt??Date.now(),streamedOutput:void 0};c[r]=l;let u=[...e];return u[n]={...i,toolCalls:c,contentBlocks:q(i.contentBlocks,l)},u}var rn=16384;function an(e){return e.length<=16384?e:e.slice(e.length-rn)}function on(e,t){if(!t.chunk)return e;let n=-1,r=-1;if(t.toolUseId){if(t.messageId){let i=V(e,t.messageId);if(i>=0){let a=e[i].toolCalls?.findIndex(e=>e.id===t.toolUseId)??-1;a!==-1&&(n=i,r=a)}}if(n===-1)for(let i=e.length-1;i>=0;i--){let a=e[i];if(a?.role!==`assistant`||!a.toolCalls?.length)continue;let o=a.toolCalls.findIndex(e=>e.id===t.toolUseId);if(o!==-1){n=i,r=o;break}}}else{if(n=e.findLastIndex(e=>e.role===`assistant`&&e.toolCalls&&e.toolCalls.length>0),n===-1)return e;let t=e[n];if(!t?.toolCalls)return e;r=t.toolCalls.findLastIndex(e=>p(e))}if(n===-1||r===-1)return e;let i=e[n],a=i.toolCalls[r];if(!a)return e;let o={...a,streamedOutput:an((a.streamedOutput??``)+t.chunk)},s=[...i.toolCalls];s[r]=o;let c=[...e];return c[n]={...i,toolCalls:s,contentBlocks:q(i.contentBlocks,o)},c}function sn(e,t,n,r=Date.now()){let i=H(e,n),a=[...e];if(i===-1)a.push({id:n??crypto.randomUUID(),...n?{}:{isOptimistic:!0},role:`assistant`,surfaces:[t],contentOrder:[{type:`surface`,id:t.surfaceId}],contentBlocks:[{type:`surface`,surface:t}],timestamp:r});else{let r=U(e[i],n);if(r.contentOrder?.some(e=>e.type===`surface`&&e.id===t.surfaceId)||r.surfaces?.some(e=>e.surfaceId===t.surfaceId))return e;a[i]={...r,surfaces:[...r.surfaces??[],t],contentOrder:[...r.contentOrder??[],{type:`surface`,id:t.surfaceId}],contentBlocks:E(r.contentBlocks,t)}}return a}function cn(e,t,n){let r=H(e,n);if(r===-1)return e;let i=e[r];if(i.pendingVisualToolUseIds?.includes(t))return e;let a=[...e];return a[r]={...U(i,n),pendingVisualToolUseIds:[...i.pendingVisualToolUseIds??[],t]},a}function Y(e,t={}){let n=t.toolUseId===void 0&&t.messageId!==void 0?H(e,t.messageId):void 0,r=!1,i=e.map((e,i)=>{let a=e.pendingVisualToolUseIds;if(!a||a.length===0||n!==void 0&&i!==n)return e;let o=t.toolUseId===void 0?[]:a.filter(e=>e!==t.toolUseId);if(o.length===a.length)return e;r=!0;let s={...e};return o.length===0?delete s.pendingVisualToolUseIds:s.pendingVisualToolUseIds=o,s});return r?i:e}function ln(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r],a=i.surfaces?.findIndex(e=>e.surfaceId===t)??-1;if(a===-1)continue;let o=i.surfaces[a],s={...o.data,...n};o.data.templateData&&n.templateData&&typeof o.data.templateData==`object`&&typeof n.templateData==`object`&&(s.templateData={...o.data.templateData,...n.templateData});let c={...o,data:s},l=[...e],u=[...i.surfaces];return u[a]=c,l[r]={...i,surfaces:u,contentBlocks:E(i.contentBlocks,c)},l}return e}function un(e,t){for(let n=e.length-1;n>=0;n--){if(!e[n].surfaces?.some(e=>e.surfaceId===t))continue;let r=[...e];return r[n]={...e[n],surfaces:e[n].surfaces?.filter(e=>e.surfaceId!==t),contentOrder:e[n].contentOrder?.filter(e=>!(e.type===`surface`&&e.id===t)),contentBlocks:Pe(e[n].contentBlocks,t)},r}return e}function dn(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r].surfaces?.find(e=>e.surfaceId===t);if(!i)continue;let a={...i,completed:!0,completionSummary:n},o=[...e];return o[r]={...e[r],surfaces:e[r].surfaces?.map(e=>e.surfaceId===t?a:e),contentBlocks:E(e[r].contentBlocks,a)},o}return e}var fn=[`choice`,`oauth_connect`,`form`,`confirmation`,`file_upload`,`card`,`list`,`table`,`browser_view`,`task_preferences`];function pn(e){return e==null||e.hasPendingConfirmation||e.hasUncompletedVisibleSurface}function mn(e,t){let n=!1,r=e.map(e=>{let r=ae(e,e=>e.pendingConfirmation?.requestId===t?{...e,pendingConfirmation:void 0}:e);return r!==e&&(n=!0),r});return n?r:e}function hn(e){let t=!1,n=e.map(e=>{let n=ae(e,e=>e.pendingConfirmation?{...e,pendingConfirmation:void 0}:e);return n!==e&&(t=!0),n});return t?n:e}function gn(e,t){let n=new Set;for(let e of t)if(e.surfaces)for(let t of e.surfaces)ie(t)&&n.add(t.surfaceId);return n.size===0?{updatedMessages:e,dismissedIds:n}:{updatedMessages:e.map(e=>Ie(e,e=>!n.has(e.surfaceId))),dismissedIds:n}}function _n(e,t,n,r,i){for(let a=e.length-1;a>=0;a--){let o=e[a].surfaces?.find(e=>e.surfaceId===t);if(!o)continue;if(!fn.includes(o.surfaceType)||o.completed)return e;let s=o.actions?.find(e=>e.id===n),c=n===`cancel`||n===`dismiss`,l=[...e];return l[a]=Fe(e[a],e=>e.surfaceId===t?{...e,completed:!0,completionSummary:c?`Cancelled`:r??s?.label??void 0,...i?.tone?{completionTone:i.tone}:{}}:e),l}return e}function vn(e,t,n){return e&&re[e]||t||n}function X(e){return typeof e==`string`?e:void 0}function yn(e){return typeof e==`boolean`?e:void 0}function bn(e){return Array.isArray(e)?e:void 0}function xn(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function Z(e){return Array.isArray(e)?e:void 0}function Sn(e){return{requestId:typeof e.requestId==`string`?e.requestId:``,label:X(e.label),service:X(e.service),field:X(e.field),description:X(e.description),placeholder:X(e.placeholder),allowOneTimeSend:yn(e.allowOneTimeSend),allowedTools:bn(e.allowedTools),allowedDomains:bn(e.allowedDomains),purpose:X(e.purpose)}}function Cn(e){return{requestId:typeof e.requestId==`string`?e.requestId:``,title:X(e.title),description:X(e.description),toolName:X(e.toolName),riskLevel:X(e.riskLevel),riskReason:X(e.riskReason),allowlistOptions:Z(e.allowlistOptions),scopeOptions:Z(e.scopeOptions),directoryScopeOptions:Z(e.directoryScopeOptions),persistentDecisionsAllowed:yn(e.persistentDecisionsAllowed),input:xn(e.input),toolUseId:X(e.toolUseId)}}function wn(){return`turn-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}function Tn(e,t){let n=Date.parse(e);return Number.isFinite(n)?n:typeof t==`number`?t:0}function En(e,t,n){switch(t.type){case`assistant_text_delta`:return qt(e,t.text,t.messageId,void 0,n);case`assistant_thinking_delta`:return Yt(e,t.thinking,t.messageId,void 0,n);case`message_complete`:return Y(Zt(e,t,n));case`user_message_echo`:return $t(e,{text:t.text,messageId:t.messageId,clientMessageId:t.clientMessageId},n);case`message_dequeued`:return Ht(e,t.requestId);case`message_requeued`:return Ut(e,t.requestId,t.position);case`message_queued_deleted`:return Wt(e,t.requestId);case`assistant_activity_state`:return t.phase===`idle`?Y(Xt(e,n)):e;case`conversation_error`:return Y(en(e,n));case`tool_use_preview_start`:return tn(e,{id:t.toolUseId,name:t.toolName,input:{},previewStartedAt:typeof t.previewStartedAt==`number`?t.previewStartedAt:n},t.messageId,n);case`tool_use_start`:return tn(e,{id:t.toolUseId??`tool-${n}`,name:t.toolName,input:t.input,startedAt:`startedAt`in t&&typeof t.startedAt==`number`?t.startedAt:n,...`previewStartedAt`in t&&typeof t.previewStartedAt==`number`?{previewStartedAt:t.previewStartedAt}:{}},t.messageId,n);case`tool_result`:return nn(Y(e,{toolUseId:t.toolUseId}),{toolUseId:t.toolUseId,result:t.result,isError:t.isError,riskLevel:t.riskLevel,riskReason:t.riskReason,matchedTrustRuleId:t.matchedTrustRuleId,approvalMode:t.approvalMode,approvalReason:t.approvalReason,riskThreshold:t.riskThreshold,riskAllowlistOptions:t.riskAllowlistOptions,riskScopeOptions:t.riskScopeOptions,riskDirectoryScopeOptions:t.riskDirectoryScopeOptions,imageData:t.imageData,imageDataList:t.imageDataList,activityMetadata:t.activityMetadata,answeredQuestion:t.answeredQuestion,errorCode:t.errorCode,completedAt:`completedAt`in t&&typeof t.completedAt==`number`?t.completedAt:n});case`tool_output_chunk`:return t.chunk?on(e,{chunk:t.chunk,toolUseId:t.toolUseId,messageId:t.messageId}):e;case`ui_surface_pending`:return cn(e,t.toolUseId,t.messageId);case`ui_surface_show`:{let r={surfaceId:t.surfaceId,surfaceType:t.surfaceType,title:t.title,data:t.data,actions:t.actions,display:t.display};return r.display=f(r),sn(r.surfaceType===`visual`?Y(e,t.toolCallId?{toolUseId:t.toolCallId}:{messageId:t.messageId}):e,r,t.messageId,n)}case`ui_surface_update`:return ln(e,t.surfaceId,t.data);case`ui_surface_dismiss`:return un(e,t.surfaceId);case`ui_surface_complete`:return dn(e,t.surfaceId,t.summary);case`confirmation_request`:return ne(e,{requestId:t.requestId,toolName:t.toolName,riskLevel:t.riskLevel,riskReason:t.riskReason,allowlistOptions:t.allowlistOptions,scopeOptions:t.scopeOptions,directoryScopeOptions:t.directoryScopeOptions,persistentDecisionsAllowed:t.persistentDecisionsAllowed,input:t.input,toolUseId:t.toolUseId}).updatedMessages;case`interaction_resolved`:return t.kind===`confirmation`||t.kind===`acp_confirmation`?mn(e,t.requestId):e;default:return e}}function Dn(e,t,n){if(e!==void 0){if(typeof n!=`number`)return e;switch(t.type){case`assistant_turn_start`:case`assistant_text_delta`:case`assistant_thinking_delta`:return!0;case`assistant_activity_state`:return t.phase!==`idle`;case`message_complete`:return!1;default:return e}}}function On(e,t){let{seq:n}=t;if(typeof n==`number`&&typeof e.seq==`number`&&n<=e.seq)return e;let r=Tn(t.emittedAt,n),i=En(e.messages,t.message,r),a=typeof n==`number`?Math.max(e.seq??-1,n):e.seq??null,o=Dn(e.processing,t.message,n);return{...e,messages:i,seq:a,processing:o}}function kn(e,t){return t.reduce(On,e)}function An(e,t){return t===null?e:kn(e,t)}var jn={hasMore:!1,oldestTimestamp:null,isLoadingOlder:!1};function Mn(){return{snapshot:null,optimisticSends:[],error:null,notice:null,isLoadingHistory:!0,transcriptPagination:{...jn},contextWindowUsage:null,ephemeralMetaResults:[],compactionCircuitOpenUntil:null,dismissedSurfaceIds:new Set,streamingMessageIds:new Set,pendingQueuedMessageIds:[],requestIdToMessageId:new Map,pendingLocalDeletions:new Set,confirmationToolCallMap:new Map,expandedToolCallIds:new Set,expandedCardIds:new Map,contextWindowUsageByConversation:new Map,previousConversationId:null,previousAssistantId:null,draftConversationIdResolution:!1}}function Q(e,t){return typeof t==`function`?t(e):t}function Nn(e,t){if(e.length===0)return e;let n=new Map;for(let e of t)for(let t of w(e))n.has(t)||n.set(t,e);let r=e.filter(e=>{let t;for(let r of w(e))if(t=n.get(r),t)break;return t?!!e.attachments?.length&&!t.attachments?.length:!0});return r.length===e.length?e:r}var $=o(a()((e,t)=>({...Mn(),seedSnapshot:(n,r)=>{let i=t().snapshot;if(r.seq==null&&i!==null&&typeof i.seq==`number`){u(`history_seed_skipped_anchorless`,{conversationId:n,liveSeq:i.seq});return}let a=ye(n,r.seq??null);if(a===null&&i!==null&&typeof i.seq==`number`&&typeof r.seq==`number`&&r.seq<i.seq){u(`history_seed_skipped_stale_anchor`,{conversationId:n,liveSeq:i.seq,fetchedSeq:r.seq});return}let o=An(r,a);e(e=>({snapshot:o,optimisticSends:Nn(e.optimisticSends,o.messages)}))},applyEnvelopeToSnapshot:t=>e(e=>e.snapshot?{snapshot:On(e.snapshot,t)}:{}),addOptimisticSend:t=>e(e=>({optimisticSends:[...e.optimisticSends,t]})),setOptimisticSends:t=>e(e=>({optimisticSends:Q(e.optimisticSends,t)})),patchSnapshotMessages:t=>e(e=>e.snapshot?{snapshot:{...e.snapshot,messages:t(e.snapshot.messages)}}:{}),setError:t=>e(e=>({error:Q(e.error,t)})),setNotice:t=>e(e=>({notice:Q(e.notice,t)})),setIsLoadingHistory:t=>e({isLoadingHistory:t}),setTranscriptPagination:t=>e(e=>({transcriptPagination:Q(e.transcriptPagination,t)})),setContextWindowUsage:t=>e(e=>({contextWindowUsage:Q(e.contextWindowUsage,t)})),setCompactionCircuitOpenUntil:t=>e(e=>({compactionCircuitOpenUntil:Q(e.compactionCircuitOpenUntil,t)})),switchToConversation:({assistantId:n,activeConversationId:r})=>{let i=t();if(i.draftConversationIdResolution){x(`draft_resolution`),e({draftConversationIdResolution:!1});return}let a=i.previousConversationId,o=!!(a&&a!==r);if(o&&a){let e=O.getState();(e.pendingSecret||e.pendingConfirmation)&&ee.getState().addAttentionConversationId(a)}let s=i.previousAssistantId!==null&&i.previousAssistantId!==n,c=s||i.previousAssistantId===null;u(`conversation_switch_reset`,{assistantId:n,conversationId:r,outgoingConversationId:a??null}),z.getState().handleConversationSwitch({previousKey:a??null,nextKey:r}),ke.getState().resetTurn(),O.getState().resetAll(),s?z.getState().fullReset():z.getState().resetAttachments();let l=c?qe(n):i.contextWindowUsageByConversation;o&&!s?Ce(r):x(`context_change`),e({snapshot:null,optimisticSends:[],ephemeralMetaResults:[],error:D(i.error)?i.error:null,notice:null,isLoadingHistory:!0,transcriptPagination:{...jn},contextWindowUsage:l.get(r)??null,compactionCircuitOpenUntil:null,dismissedSurfaceIds:Ve(n,r),streamingMessageIds:new Set,pendingQueuedMessageIds:[],requestIdToMessageId:new Map,pendingLocalDeletions:new Set,confirmationToolCallMap:new Map,expandedToolCallIds:new Set,expandedCardIds:new Map,contextWindowUsageByConversation:l,previousConversationId:r,previousAssistantId:n,draftConversationIdResolution:!1})},markDraftResolution:()=>e({draftConversationIdResolution:!0}),setConfirmationToolCall:(t,n)=>e(e=>{let r=new Map(e.confirmationToolCallMap);return r.set(t,n),{confirmationToolCallMap:r}}),deleteConfirmationToolCall:t=>e(e=>{let n=new Map(e.confirmationToolCallMap);return n.delete(t),{confirmationToolCallMap:n}}),clearConfirmationToolCallMap:()=>e({confirmationToolCallMap:new Map}),addDismissedSurfaceId:t=>e(e=>{let n=new Set(e.dismissedSurfaceIds);return n.add(t),{dismissedSurfaceIds:n}}),addDismissedSurfaceIds:t=>e(e=>{let n=new Set(e.dismissedSurfaceIds);for(let e of t)n.add(e);return{dismissedSurfaceIds:n}}),batchUpdateStreamingMessageIds:(t,n)=>e(e=>{let r=new Set(e.streamingMessageIds);for(let e of t)r.add(e);for(let e of n)r.delete(e);return{streamingMessageIds:r}}),pushPendingQueuedMessageId:t=>e(e=>({pendingQueuedMessageIds:[...e.pendingQueuedMessageIds,t]})),shiftPendingQueuedMessageId:()=>{let n=t().pendingQueuedMessageIds;if(n.length===0)return;let[r,...i]=n;return e({pendingQueuedMessageIds:i}),r},takePendingQueuedMessageId:n=>{let r=t().pendingQueuedMessageIds;if(r.includes(n))return e({pendingQueuedMessageIds:r.filter(e=>e!==n)}),n},setRequestIdMapping:(t,n)=>e(e=>{let r=new Map(e.requestIdToMessageId);return r.set(t,n),{requestIdToMessageId:r}}),popRequestIdMapping:n=>{let r=t().requestIdToMessageId,i=r.get(n);if(i!==void 0){let t=new Map(r);t.delete(n),e({requestIdToMessageId:t})}return i},addPendingLocalDeletion:t=>e(e=>{let n=new Set(e.pendingLocalDeletions);return n.add(t),{pendingLocalDeletions:n}}),consumePendingLocalDeletion:n=>{let r=t().pendingLocalDeletions;if(!r.has(n))return!1;let i=new Set(r);return i.delete(n),e({pendingLocalDeletions:i}),!0},setExpandedToolCallId:(t,n)=>e(e=>{let r=new Set(e.expandedToolCallIds);return n?r.add(t):r.delete(t),{expandedToolCallIds:r}}),setExpandedCardId:(t,n)=>e(e=>{let r=new Map(e.expandedCardIds);return r.set(t,n),{expandedCardIds:r}}),setContextWindowUsageForConversation:(t,n)=>e(e=>{let r=new Map(e.contextWindowUsageByConversation);return r.set(t,n),{contextWindowUsageByConversation:r}}),addEphemeralMetaResult:t=>e(e=>({ephemeralMetaResults:[...e.ephemeralMetaResults,t]})),clearEphemeralMetaResults:()=>e(e=>e.ephemeralMetaResults.length===0?e:{ephemeralMetaResults:[]})})));function Pn(){let e=$.use.snapshot()?.messages,t=$.use.optimisticSends(),n=$.use.dismissedSurfaceIds();return(0,m.useMemo)(()=>Ne(We(e,n),t),[e,t,n])}export{D as A,De as B,bt as C,ct as D,tt as E,Ne as F,be as G,ke as H,Me as I,ge as J,_e as K,w as L,He as M,Re as N,ot as O,Fe as P,le as Q,T as R,z as S,at as T,Ee as U,Oe as V,Te as W,me as X,ue as Y,de as Z,Bt as _,_n as a,It as b,Cn as c,pn as d,Ht as f,Wt as g,Ut as h,hn as i,Je as j,st as k,Sn as l,zt as m,$ as n,gn as o,Vt as p,ve as q,mn as r,wn as s,Pn as t,vn as u,B as v,O as w,Ft as x,Lt as y,je as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./capture-error-DiNp24s6.js";import{n as t,t as n}from"./create-selectors-CmDroXTn.js";import{Ct as r,n as i}from"./sdk.gen-CiE6cMi0.js";import{o as a}from"./workspace-path-links-CWERAV56.js";var o=new Map;function s(e,t){return`${e}::${t}`}function c(e,t){let n=s(e,t),r=o.get(n);return r??(r=i({path:{assistant_id:e,id:t},throwOnError:!0}).then(e=>e.data.html).catch(e=>{throw o.delete(n),e}),o.set(n,r)),r}function l(e,t,n){o.set(s(e,t),Promise.resolve(n))}function u(e,t){o.delete(s(e,t))}var d=n(t()(e=>({changedDocuments:{},markDocumentChanged:(t,n)=>{e(e=>{let r=e.changedDocuments[t];if(r?.has(n))return e;let i=new Set(r);return i.add(n),{changedDocuments:{...e.changedDocuments,[t]:i}}})},clearDocument:(t,n)=>{e(e=>{let r=e.changedDocuments[t];if(!r?.has(n))return e;let i=new Set(r);i.delete(n);let a={...e.changedDocuments};return i.size===0?delete a[t]:a[t]=i,{changedDocuments:a}})},clearDocumentEverywhere:t=>{e(e=>{let n={},r=!1;for(let[i,a]of Object.entries(e.changedDocuments)){if(!a.has(t)){n[i]=a;continue}r=!0;let e=new Set(a);e.delete(t),e.size>0&&(n[i]=e)}return r?{changedDocuments:n}:e})},clearConversation:t=>{e(e=>{if(e.changedDocuments[t]===void 0)return e;let n={...e.changedDocuments};return delete n[t],{changedDocuments:n}})}})));function f(e,t){return t===null?!1:(e.changedDocuments[t]?.size??0)>0}function p(e){return f({changedDocuments:d.use.changedDocuments()},e)}function m(e){if(typeof e!=`object`||!e)return!1;let t=e.error;if(typeof t!=`object`||!t||t.code!==`NOT_FOUND`)return!1;let n=t.message;return typeof n==`string`&&n.startsWith(`App not found`)}function h(e,t){let n=e.mainView;return n===`document`||n===`subagent-detail`||n===`tool-detail`||n===`activity-steps`||n===`message-files`||n===`workflow-detail`||n===`acp-run-detail`||n===`background-task-detail`||n===`skill-detail`||n===`channel-setup`?e[t]:n}function g(e,t){return e===null||e.source!==t.source?!1:e.source===`document`&&t.source===`document`?e.surfaceId===t.surfaceId:e.source===`workspace-file-preview`&&t.source===`workspace-file-preview`&&e.workspacePath===t.workspacePath}function _(e,t){return e.messageId!=null||t.messageId!=null?e.messageId===t.messageId&&e.groupIndex===t.groupIndex:e.toolCalls[0]?.id===t.toolCalls[0]?.id}function v(e,t){return e.messageId===t.messageId}function y(e,t){return t.messageId==null?e.thinkingText===t.thinkingText:e.messageId===t.messageId&&e.thinkingGroupIndex===t.thinkingGroupIndex&&e.thinkingItemIndex===t.thinkingItemIndex}var b={mainView:`chat`,activeAppId:null,openedAppState:null,activeDocumentTarget:null,openedDocumentState:null,isAppMinimized:!1,intelligenceTab:`identity`,viewBeforeDocument:`chat`,activeSubagentId:null,viewBeforeSubagentDetail:`chat`,activeToolDetail:null,viewBeforeToolDetail:`chat`,activeActivitySteps:null,viewBeforeActivitySteps:`chat`,activeMessageFiles:null,viewBeforeMessageFiles:`chat`,activeWorkflowRunId:null,viewBeforeWorkflowDetail:`chat`,activeAcpRunId:null,viewBeforeAcpRunDetail:`chat`,activeBackgroundTaskId:null,viewBeforeBackgroundTaskDetail:`chat`,activeSkillDetailId:null,viewBeforeSkillDetail:`chat`,activeChannelSetup:null,viewBeforeChannelSetup:`chat`,ruleEditorRequestSeq:0,ruleEditorRequestToolCallId:null},x=n(t()((t,n)=>({...b,setMainView:e=>{n().mainView!==e&&t({mainView:e})},setIntelligenceTab:e=>{n().intelligenceTab!==e&&t({intelligenceTab:e})},openApp:e=>{t({mainView:`app`,activeAppId:e,openedAppState:null,isAppMinimized:!1})},loadApp:async(r,a)=>{t({mainView:`app`,activeAppId:a,openedAppState:null,isAppMinimized:!1});try{let{data:e}=await i({path:{assistant_id:r,id:a},throwOnError:!0});if(n().activeAppId!==a)return;t({openedAppState:{appId:e.appId,dirName:e.dirName,name:e.name,html:e.html}}),l(r,e.appId,e.html)}catch(r){if(n().activeAppId!==a)return;m(r)||e(r,{context:`openApp`}),t({mainView:`chat`,activeAppId:null,openedAppState:null})}},setLoadedApp:e=>{t({openedAppState:e})},handleAppLoadFailed:()=>{t({mainView:`chat`,activeAppId:null,openedAppState:null})},closeApp:()=>{t({mainView:`chat`,activeAppId:null,openedAppState:null,isAppMinimized:!1})},toggleAppMinimized:()=>{t({isAppMinimized:!n().isAppMinimized})},minimizeApp:()=>{t({isAppMinimized:!0})},handleAppUnpinned:e=>{let t=n();return t.activeAppId!==e||t.mainView!==`app`&&t.mainView!==`app-editing`?!1:(n().closeApp(),!0)},enterAppEditing:()=>{t({mainView:`app-editing`})},exitAppEditing:()=>{t({mainView:`app`})},openSubagentDetail:e=>{t({mainView:`subagent-detail`,activeSubagentId:e,viewBeforeSubagentDetail:h(n(),`viewBeforeSubagentDetail`)})},closeSubagentDetail:()=>{t({mainView:n().viewBeforeSubagentDetail,activeSubagentId:null})},openWorkflowDetail:e=>{t({mainView:`workflow-detail`,activeWorkflowRunId:e,viewBeforeWorkflowDetail:h(n(),`viewBeforeWorkflowDetail`)})},closeWorkflowDetail:()=>{t({mainView:n().viewBeforeWorkflowDetail,activeWorkflowRunId:null})},openAcpRunDetail:e=>{t({mainView:`acp-run-detail`,activeAcpRunId:e,viewBeforeAcpRunDetail:h(n(),`viewBeforeAcpRunDetail`)})},closeAcpRunDetail:()=>{t({mainView:n().viewBeforeAcpRunDetail,activeAcpRunId:null})},openBackgroundTaskDetail:e=>{t({mainView:`background-task-detail`,activeBackgroundTaskId:e,viewBeforeBackgroundTaskDetail:h(n(),`viewBeforeBackgroundTaskDetail`)})},closeBackgroundTaskDetail:()=>{t({mainView:n().viewBeforeBackgroundTaskDetail,activeBackgroundTaskId:null})},openSkillDetail:e=>{t({mainView:`skill-detail`,activeSkillDetailId:e,viewBeforeSkillDetail:h(n(),`viewBeforeSkillDetail`)})},closeSkillDetail:()=>{t({mainView:n().viewBeforeSkillDetail,activeSkillDetailId:null})},openProcessDetail:({kind:e,id:t})=>{switch(e){case`subagent`:n().openSubagentDetail(t);return;case`workflow`:n().openWorkflowDetail(t);return;case`acp-run`:n().openAcpRunDetail(t);return;case`background-task`:n().openBackgroundTaskDetail(t);return;default:}},closeActiveOverlay:()=>{switch(n().mainView){case`document`:return n().closeDocument(),!0;case`subagent-detail`:return n().closeSubagentDetail(),!0;case`tool-detail`:return n().closeToolDetail(),!0;case`activity-steps`:return n().closeActivitySteps(),!0;case`message-files`:return n().closeMessageFiles(),!0;case`workflow-detail`:return n().closeWorkflowDetail(),!0;case`acp-run-detail`:return n().closeAcpRunDetail(),!0;case`background-task-detail`:return n().closeBackgroundTaskDetail(),!0;case`skill-detail`:return n().closeSkillDetail(),!0;case`channel-setup`:return n().closeChannelSetup(),!0;default:return!1}},openChannelSetup:e=>{t({mainView:`channel-setup`,activeChannelSetup:e,viewBeforeChannelSetup:h(n(),`viewBeforeChannelSetup`)})},closeChannelSetup:()=>{t({mainView:n().viewBeforeChannelSetup,activeChannelSetup:null})},openToolDetail:e=>{t({mainView:`tool-detail`,activeToolDetail:e,viewBeforeToolDetail:h(n(),`viewBeforeToolDetail`)})},toggleToolDetail:e=>{let t=n(),r=t.activeToolDetail;t.mainView===`tool-detail`&&r!=null&&(e.kind===`thinking`?r.kind===`thinking`&&y(r,e):r.kind!==`thinking`&&r.toolCallId===e.toolCallId)?n().closeToolDetail():n().openToolDetail(e)},closeToolDetail:()=>{t({mainView:n().viewBeforeToolDetail,activeToolDetail:null})},requestRuleEditor:e=>{e&&t(t=>({ruleEditorRequestSeq:t.ruleEditorRequestSeq+1,ruleEditorRequestToolCallId:e}))},openActivitySteps:e=>{t({mainView:`activity-steps`,activeActivitySteps:e,viewBeforeActivitySteps:h(n(),`viewBeforeActivitySteps`)})},toggleActivitySteps:e=>{let t=n(),r=t.activeActivitySteps;t.mainView===`activity-steps`&&r!=null&&_(r,e)?n().closeActivitySteps():n().openActivitySteps(e)},closeActivitySteps:()=>{t({mainView:n().viewBeforeActivitySteps,activeActivitySteps:null})},openMessageFiles:e=>{t({mainView:`message-files`,activeMessageFiles:e,viewBeforeMessageFiles:h(n(),`viewBeforeMessageFiles`)})},toggleMessageFiles:e=>{let t=n(),r=t.activeMessageFiles;t.mainView===`message-files`&&r!=null&&v(r,e)?n().closeMessageFiles():n().openMessageFiles(e)},closeMessageFiles:()=>{t({mainView:n().viewBeforeMessageFiles,activeMessageFiles:null})},clearTranscriptPanelPayloads:()=>{t({activeMessageFiles:null,activeActivitySteps:null,activeToolDetail:null})},openDocument:()=>{t({mainView:`document`,openedDocumentState:null,viewBeforeDocument:h(n(),`viewBeforeDocument`)})},loadDocument:async(e,i)=>{let a=h(n(),`viewBeforeDocument`),o={source:`document`,surfaceId:i};t({mainView:`document`,activeDocumentTarget:o,openedDocumentState:null,viewBeforeDocument:a});try{let{data:s}=await r({path:{assistant_id:e,id:i},throwOnError:!0});if(!g(n().activeDocumentTarget,o))return;if(!s){t({mainView:a,activeDocumentTarget:null,openedDocumentState:null});return}t({openedDocumentState:{source:`document`,surfaceId:s.surfaceId,conversationId:s.conversationId,documentName:s.title??`Untitled`,content:s.content??``}}),d.getState().clearDocumentEverywhere(s.surfaceId)}catch{if(!g(n().activeDocumentTarget,o))return;t({mainView:a,activeDocumentTarget:null,openedDocumentState:null})}},openWorkspaceFilePreview:(e,r)=>{t({mainView:`document`,activeDocumentTarget:{source:`workspace-file-preview`,workspacePath:e},openedDocumentState:{source:`workspace-file-preview`,workspacePath:e,documentName:a(e),previewKind:r},viewBeforeDocument:h(n(),`viewBeforeDocument`)})},setLoadedDocument:e=>{t({openedDocumentState:e})},updateDocumentContent:(e,r,i)=>{let a=n().openedDocumentState;if(!a||a.source!==`document`||a.surfaceId!==e)return;let o=i===`append`?a.content+r:r;t({openedDocumentState:{...a,content:o}})},handleDocumentLoadFailed:()=>{t({mainView:n().viewBeforeDocument,activeDocumentTarget:null,openedDocumentState:null})},closeDocument:()=>{t({mainView:n().viewBeforeDocument,activeDocumentTarget:null,openedDocumentState:null})},reset:()=>t({...b})})));export{p as a,c,x as i,l,v as n,d as o,y as r,u as s,_ as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{i as t,l as n,o as r}from"./local-settings-Bx7FsNo5.js";import{t as i}from"./react-BFJW0bSv.js";import{t as a}from"./button-VkxVX0DM.js";import{h as o,n as s,t as c}from"./chunk-5KNZJZUH-BUqIilZr.js";import{t as l}from"./jsx-runtime-BJ8jcmzB.js";import{o as u}from"./list-row-CDwzGT9g.js";import{r as d}from"./middleware-DbQtrfxY.js";import{t as f}from"./info-Bn2hbIVl.js";import{R as p}from"./src-CImIAPTd.js";import{t as m}from"./toggle-0qt1e_3r.js";import{t as h}from"./modal-UYNawsIu.js";import{t as g}from"./select-BKyejRky.js";import{t as _}from"./assistant-identity-store-DhAqaifK.js";import{d as v}from"./routes-B7wRw3UT.js";import{C as y,S as b,T as x,a as S,b as ee,c as te,f as ne,g as C,h as w,m as T,n as E,p as D,s as O,t as re,w as k,x as A}from"./voice-providers-note-TDQxSwUj.js";import{a as ie,l as j,o as ae,r as oe,s as se,t as M}from"./use-stt-language-selection-CK6bUfVS.js";import{t as N}from"./use-active-assistant-id-BADYKVyx.js";import{t as P}from"./detail-card-Bqnvs6YE.js";import{t as F}from"./stt-language-picker-modal-BXLEBM7b.js";var I=e(i(),1),L=l();function R(){let{available:e,currentCode:t,configuredProviderId:n,selectLanguage:r,selecting:i}=M(N()),[o,s]=(0,I.useState)(!1);return e?(0,L.jsxs)(P,{title:`Listening language`,subtitle:`The language you speak to your assistant. Applies from your next spoken turn.`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(`span`,{className:`min-w-0 text-body-medium-lighter text-[var(--content-default)]`,children:oe(t,n)}),(0,L.jsx)(a,{variant:`outlined`,onClick:()=>s(!0),className:`shrink-0`,children:`Change`})]}),(0,L.jsx)(F,{open:o,onOpenChange:s,title:`Listening language`,currentCode:t,configuredProviderId:n,selectLanguage:r,selecting:i})]}):null}function z({assistantId:e,open:t,onOpenChange:n}){return(0,L.jsx)(h.Root,{open:t,onOpenChange:n,children:(0,L.jsx)(h.Content,{size:`md`,children:(0,L.jsx)(B,{assistantId:e,onDone:()=>n(!1)})})})}function B({assistantId:e,onDone:t}){let{available:n,currentModel:r,selectModel:i,selecting:o}=j(e);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(h.Header,{children:[(0,L.jsx)(h.Title,{children:`Voices`}),n&&(0,L.jsx)(h.Description,{children:`Uses Vellum credits, through providers like ElevenLabs and Deepgram.`})]}),(0,L.jsx)(h.Body,{children:(0,L.jsx)(ae,{assistantId:e,filterBySource:!0,value:r,onChange:i,autoScrollToSelected:!0})}),(0,L.jsxs)(h.Footer,{className:`items-center justify-between gap-3`,children:[(0,L.jsx)(re,{}),(0,L.jsx)(a,{variant:`primary`,onClick:t,disabled:o,className:`shrink-0`,children:`Done`})]})]})}function V(){let e=N(),{available:t,voices:n,currentModel:r}=j(e),i=n.find(e=>e.model===r)??n[0],[o,s]=(0,I.useState)(!1),c=_.use.name(),l=c?`${c}’s Voice`:`Voice`;return t&&i?(0,L.jsxs)(P,{title:l,subtitle:se,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(ie,{description:i.description,className:`min-w-0 text-body-medium-lighter text-[var(--content-default)]`}),(0,L.jsx)(a,{variant:`outlined`,onClick:()=>s(!0),className:`shrink-0`,children:`Change`})]}),(0,L.jsx)(z,{assistantId:e,open:o,onOpenChange:s})]}):(0,L.jsx)(P,{title:l,children:(0,L.jsx)(E,{})})}var H=[{prefKey:`showUserTranscript`,label:`Show the words you say`,description:`Live transcription while you speak.`},{prefKey:`showAssistantTranscript`,label:`Show the words the assistant says`,description:`Text alongside the spoken response.`}],U=`We recommend keeping both off to start. It feels more like a real conversation.`;function W(){return(0,L.jsx)(`span`,{className:`shrink-0 rounded-full bg-[var(--surface-active)] px-2 py-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:`Recommended off`})}function G({label:e,description:t,showBadge:n,checked:r,onChange:i}){return(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3 py-1`,children:[(0,L.jsxs)(`div`,{className:`min-w-0`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`truncate text-body-medium-lighter text-[var(--content-default)]`,children:e}),n?(0,L.jsx)(W,{}):null]}),t?(0,L.jsx)(`div`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:t}):null]}),(0,L.jsx)(m,{checked:r,onChange:i,"aria-label":e})]})}function ce({showDescription:e=!1,showRecommendedBadge:t=!1}){let n=O.use.showUserTranscript(),r=O.use.showAssistantTranscript(),i=O.use.setShowUserTranscript(),a=O.use.setShowAssistantTranscript(),o={showUserTranscript:{checked:n,onChange:i},showAssistantTranscript:{checked:r,onChange:a}};return(0,L.jsx)(L.Fragment,{children:H.map(n=>{let r=o[n.prefKey];return(0,L.jsx)(G,{label:n.label,description:e?n.description:void 0,showBadge:t,checked:r.checked,onChange:r.onChange},n.prefKey)})})}var K=[{label:`Ctrl`,activator:{kind:`modifierOnly`,modifiers:[`control`]}},{label:`Alt`,activator:{kind:`modifierOnly`,modifiers:[`option`]}},{label:`Ctrl+Shift`,activator:{kind:`modifierOnly`,modifiers:[`control`,`shift`]}}],q={label:`Fn`,activator:D},J=`text-body-small-default text-[var(--content-tertiary)]`;function le(){let[e]=o(),t=e.get(`tab`);return t===`sounds`?(0,L.jsx)(s,{replace:!0,to:v.settings.sounds}):t===`services`?(0,L.jsx)(s,{replace:!0,to:v.settings.ai}):(0,L.jsx)(ue,{})}function ue(){return(0,L.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[(0,L.jsxs)(X,{heading:`Output`,description:`How your assistant sounds.`,children:[(0,L.jsx)(V,{}),(0,L.jsx)(Y,{})]}),(0,L.jsxs)(X,{heading:`Input`,description:`How you talk to your assistant.`,children:[(0,L.jsx)(fe,{}),(0,L.jsx)(R,{}),(0,L.jsx)(pe,{}),(0,L.jsx)(he,{})]}),(0,L.jsx)(X,{heading:`Captions`,children:(0,L.jsx)(de,{})})]})}function Y(){let{available:e}=j(N());return e?(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 px-1 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,L.jsx)(f,{className:`h-3.5 w-3.5 shrink-0 text-[var(--content-quiet)]`}),(0,L.jsx)(`span`,{children:`Want to use your own API key for STT or TTS, or set a custom voice?`}),(0,L.jsxs)(c,{to:`${v.settings.ai}#text-to-speech`,className:`inline-flex items-center gap-1 text-[var(--content-secondary)] underline decoration-[var(--border-element)] underline-offset-2 hover:text-[var(--content-default)]`,children:[`Set it up in Models & Services`,(0,L.jsx)(d,{className:`h-3 w-3`})]})]}):null}function X({heading:e,description:t,children:n}){return(0,L.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`h2`,{className:`text-label-medium-default uppercase tracking-wide text-[var(--content-tertiary)]`,children:e}),t&&(0,L.jsx)(`p`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:t})]}),n]})}function de(){return(0,L.jsx)(P,{title:`Captions`,subtitle:`Show live text of what you and the assistant say during a voice conversation.`,children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(ce,{showDescription:!0}),(0,L.jsx)(`p`,{className:`${J} pt-1`,children:U})]})})}var Z=``;function fe(){let[e,t]=(0,I.useState)([]),[i,o]=(0,I.useState)(!1),[s,c]=(0,I.useState)(!1),[l,u]=(0,I.useState)(()=>x()),d=(0,I.useCallback)(async()=>{if(navigator.mediaDevices?.enumerateDevices)try{let e=(await navigator.mediaDevices.enumerateDevices()).filter(e=>e.kind===`audioinput`);o(e.length>0&&e.every(e=>!e.label)),t(e.filter(e=>e.deviceId!==``&&e.deviceId!==`default`&&e.deviceId!==`communications`)),c(e.length===0||e.some(e=>!!e.label))}catch{t([]),o(!1),c(!1)}},[]),f=(0,I.useCallback)(async()=>{try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});for(let t of e.getTracks())t.stop()}catch{}d()},[d]);(0,I.useEffect)(()=>{d();let e=navigator.mediaDevices;if(!e?.addEventListener)return;let t=()=>void d();return e.addEventListener(`devicechange`,t),()=>e.removeEventListener(`devicechange`,t)},[d]);let p=(0,I.useMemo)(()=>{let t=e.map((e,t)=>({value:e.deviceId,label:e.label||`Microphone ${t+1}`})),n=l!==Z&&!t.some(e=>e.value===l);return[{value:null,label:`System Default`},...t,...n?[{value:l,label:s?`Saved microphone (not connected)`:`Saved microphone`}]:[]]},[e,l,s]),m=(0,I.useCallback)(e=>{u(e),e===Z?r(k):n(k,e)},[]);return(0,L.jsx)(P,{title:`Microphone`,subtitle:`Which input device is used for dictation and voice conversations.`,children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,L.jsx)(`div`,{className:`max-w-xs`,children:(0,L.jsx)(g,{options:p,value:l===Z?null:l,onChange:m,onSelectNone:()=>m(Z),"aria-label":`Microphone`})}),i&&(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsx)(a,{variant:`outlined`,onClick:f,children:`Allow Microphone Access`}),(0,L.jsx)(`span`,{className:J,children:`Grant microphone access to list your available input devices.`})]})]})})}function pe(){let e=te(),[r,i]=(0,I.useState)(()=>{let n=t(T,``);return n?A(n,{preserveFunction:e}):e?q.activator:{kind:`off`}}),[a,o]=(0,I.useState)(!1),[s,c]=(0,I.useState)([]),l=(0,I.useRef)(null),u=(0,I.useRef)(!1),d=(0,I.useMemo)(()=>e?[q,...K]:K,[e]),p=r.kind!==`off`,h=p&&!e,g=(0,I.useCallback)(e=>{i(e),n(T,b(e)),o(!1),c([])},[]),_=(0,I.useCallback)(()=>{o(!0),c([]),u.current=!1,requestAnimationFrame(()=>{l.current?.focus()})},[]),v=(0,I.useCallback)(()=>{o(!1),c([]),u.current=!1},[]),x=(0,I.useCallback)(t=>{let n=[];return e&&t.getModifierState(`Fn`)&&n.push(`function`),t.ctrlKey&&n.push(`control`),t.altKey&&n.push(`option`),t.shiftKey&&n.push(`shift`),t.metaKey&&n.push(`command`),n},[e]),S=(0,I.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){v();return}let t=x(e),n=e.key;if(n===`Control`||n===`Alt`||n===`Shift`||n===`Meta`||n===`Fn`){c(t.includes(`function`)?D.modifiers:y(t));return}if(t.includes(`function`)){g(D);return}u.current=!0,g({kind:`key`,label:n.length===1?n.toUpperCase():n,modifiers:t})},[v,x,g]),E=(0,I.useCallback)(e=>{if(!a)return;e.preventDefault(),e.stopPropagation();let t=e.key;if(t===`Control`||t===`Alt`||t===`Shift`||t===`Meta`||t===`Fn`){if(u.current){u.current=!1,c([]);return}x(e).length===0&&s.length>0&&g({kind:`modifierOnly`,modifiers:s})}},[x,a,s,g]);(0,I.useEffect)(()=>{if(!a)return;let e=e=>{l.current&&!l.current.contains(e.target)&&v()};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[v,a]);let O=p&&!d.some(e=>C(e.activator,r));return(0,L.jsx)(P,{title:`Push to Talk`,subtitle:`Hold the activation key to dictate text or start a voice conversation.`,children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,L.jsx)(m,{checked:p,onChange:t=>{t?r.kind===`off`&&g(e?q.activator:ne):g({kind:`off`})},label:`Enable Push to Talk`}),p&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`span`,{className:J,children:`Activation Key:`}),(0,L.jsxs)(`div`,{ref:l,tabIndex:a?0:-1,onKeyDown:a?S:void 0,onKeyUp:a?E:void 0,className:`flex flex-wrap items-center gap-2 focus:outline-none`,children:[d.map(e=>{let t=C(e.activator,r);return(0,L.jsx)(Q,{label:e.label,selected:t,onClick:()=>g(e.activator)},e.label)}),a?(0,L.jsx)(Q,{label:s.length>0?ee(s):`Press any key…`,selected:!0,recording:!0,onClick:v}):(0,L.jsx)(Q,{label:O?w(r):`Custom`,selected:O,onClick:_})]}),h&&(0,L.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-default text-[var(--content-quiet)]`,children:[(0,L.jsx)(f,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,L.jsx)(`span`,{children:`Push-to-Talk only works while this tab is focused, and browsers may intercept some shortcuts (e.g. Ctrl+T) before the page can see them. For always-on PTT, use the Vellum desktop app.`})]})]})]})})}function Q({label:e,selected:t,recording:n=!1,onClick:r}){return(0,L.jsxs)(`button`,{type:`button`,onClick:r,className:[`inline-flex items-center gap-2 rounded-lg border px-3 py-1.5 text-body-medium-lighter transition-colors`,`border-[var(--border-subtle)]`,t?`bg-[var(--surface-active)]`:`bg-[var(--surface-lift)] hover:bg-[var(--surface-hover)]`,n?`animate-pulse`:``].filter(Boolean).join(` `),children:[(0,L.jsx)(`span`,{className:[`inline-block h-2.5 w-2.5 rounded-full border`,t?`border-[var(--primary-base)] bg-[var(--primary-base)]`:`border-[var(--border-element)]`].join(` `)}),(0,L.jsx)(`span`,{className:`text-[var(--content-default)]`,children:e})]})}var me=[{value:`low`,label:`Low`},{value:`medium`,label:`Medium`},{value:`high`,label:`High`}];function he(){let e=O.use.pauseBeforeReplyMs(),t=O.use.setPauseBeforeReplyMs(),n=O.use.interruptSensitivity(),r=O.use.setInterruptSensitivity(),i=e!==null||n!==null;return(0,L.jsx)(P,{title:`Turn taking`,subtitle:`Where your turn ends and the assistant's begins. Applies to hands-free conversations — under push to talk, the key decides.`,children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,L.jsx)($,{label:`Pause before reply`,description:`How long the assistant waits after you stop speaking before it replies. A longer pause lets you gather your thoughts mid-sentence without being cut off.`,isDefault:e===null,children:(0,L.jsx)(`div`,{className:`max-w-xs`,children:(0,L.jsx)(p,{value:(e??1200)/1e3,onValueChange:e=>{typeof e==`number`&&t(Math.round(e*1e3))},min:500/1e3,max:S/1e3,step:.1,showValue:!0,formatValue:e=>`${(typeof e==`number`?e:e[0]).toFixed(1)}s`,"aria-label":`Pause before reply`})})}),(0,L.jsx)($,{label:`Interrupt sensitivity`,description:`How easily talking over the assistant interrupts it. Lower it if the assistant cuts itself off on background noise or filler words; raise it to interrupt more quickly.`,isDefault:n===null,children:(0,L.jsx)(`div`,{className:`max-w-xs`,children:(0,L.jsx)(u,{items:me,value:n??`medium`,onChange:r,ariaLabel:`Interrupt sensitivity`})})}),i&&(0,L.jsx)(`div`,{children:(0,L.jsx)(a,{variant:`outlined`,onClick:()=>{t(null),r(null)},children:`Reset to defaults`})})]})})}function $({label:e,description:t,isDefault:n,children:r}){return(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e}),n&&(0,L.jsx)(`span`,{className:`shrink-0 rounded-full bg-[var(--surface-active)] px-2 py-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:`Default`})]}),(0,L.jsx)(`p`,{className:J,children:t}),r]})}export{le as VoicePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./local-settings-Bx7FsNo5.js";import{t}from"./chunk-5KNZJZUH-BUqIilZr.js";import{t as n}from"./jsx-runtime-BJ8jcmzB.js";import{t as r}from"./cn-Cf8SmgbR.js";import{n as i,t as a}from"./middleware-DbQtrfxY.js";import"./src-CImIAPTd.js";import{n as o,t as s}from"./create-selectors-CmDroXTn.js";import{t as c}from"./is-electron-wgAC5Mzb.js";import{d as l}from"./routes-B7wRw3UT.js";var u=`vellum:voice:inputDeviceId`;function d(){return e(u,``)}function f(){let e=d();return{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,...e?{deviceId:{exact:e}}:{}}}async function p(){let e=f();try{return await navigator.mediaDevices.getUserMedia({audio:e})}catch(t){if(e.deviceId&&t instanceof DOMException&&t.name===`OverconstrainedError`){let{deviceId:t,...n}=e;return navigator.mediaDevices.getUserMedia({audio:n})}throw t}}var m=`vellum:voice:activationKey`,h={kind:`modifierOnly`,modifiers:[`control`]},g={kind:`modifierOnly`,modifiers:[`function`]},_=[`function`,`control`,`option`,`shift`,`command`],v={function:`Fn`,control:`Ctrl`,option:`Alt`,shift:`Shift`,command:`Cmd`};function y(e){return Array.from(new Set(e)).sort((e,t)=>_.indexOf(e)-_.indexOf(t))}function b(e){return y(e).map(e=>v[e]).join(`+`)}function x(e){if(e.kind===`off`)return`Off`;if(e.kind===`modifierOnly`)return b(e.modifiers);let t=b(e.modifiers);return t?`${t}+${e.label}`:e.label}function S(e,t){if(e.kind!==t.kind)return!1;if(e.kind===`off`||t.kind===`off`)return!0;let n=y(e.modifiers),r=y(t.modifiers);return n.length!==r.length||n.some((e,t)=>e!==r[t])?!1:e.kind===`key`&&t.kind===`key`?e.label===t.label:!0}function C(e){return JSON.stringify(e)}function w(e){return e.kind===`modifierOnly`&&e.modifiers.length===1&&e.modifiers[0]===`function`}function T(e){return typeof e==`string`&&_.includes(e)}function E(e,t){let n=e.filter(T);return t.preserveFunction&&n.includes(`function`)?g.modifiers:y(t.preserveFunction?n:n.filter(e=>e!==`function`))}function D(e,t={}){if(!e)return h;if(e===`fn`)return{kind:`modifierOnly`,modifiers:t.preserveFunction?g.modifiers:h.modifiers};if(e===`ctrl`)return h;if(e===`fn_shift`)return{kind:`modifierOnly`,modifiers:t.preserveFunction?g.modifiers:[`shift`]};if(e===`off`)return{kind:`off`};try{let n=JSON.parse(e);if(n.kind===`off`)return{kind:`off`};if(n.kind===`modifierOnly`&&Array.isArray(n.modifiers)){let e=E(n.modifiers,t);return e.length===0?h:{kind:`modifierOnly`,modifiers:e}}if(n.kind===`key`&&typeof n.label==`string`&&Array.isArray(n.modifiers))return{kind:`key`,label:n.label,modifiers:E(n.modifiers,t)}}catch{}return h}function O(e){let t=[];return e.ctrlKey&&t.push(`control`),e.altKey&&t.push(`option`),e.shiftKey&&t.push(`shift`),e.metaKey&&t.push(`command`),t}function k(e){return e===`Control`||e===`Alt`||e===`Shift`||e===`Meta`||e===`Fn`}function A(e,t){if(e.length!==t.length)return!1;let n=y(e),r=y(t);return n.every((e,t)=>e===r[t])}function j(e,t){if(t.kind===`off`||t.modifiers.includes(`function`))return!1;let n=O(e),r=t.modifiers.filter(e=>e!==`function`);return t.kind===`modifierOnly`?k(e.key)?A(n,r):!1:(e.key.length===1?e.key.toUpperCase():e.key)===t.label?A(n,r):!1}function M(e,t){if(t.kind===`off`||t.modifiers.includes(`function`))return!1;let n=t.modifiers.filter(e=>e!==`function`);return t.kind===`modifierOnly`?!!(e.key===`Control`&&n.includes(`control`)||e.key===`Alt`&&n.includes(`option`)||e.key===`Shift`&&n.includes(`shift`)||e.key===`Meta`&&n.includes(`command`)):(e.key.length===1?e.key.toUpperCase():e.key)===t.label}function N(){return c()}function P(){return c()&&typeof window.vellum?.helper?.hotkey?.fnPushToTalk==`function`&&typeof window.vellum?.helper?.hotkey?.onEvent==`function`}async function F(e){if(!P())return!1;try{return(await window.vellum.helper.hotkey.fnPushToTalk(e)).ok}catch{return!1}}function I(e){return P()?window.vellum.helper.hotkey.onEvent(e):()=>void 0}var L=1200,R=3e3,z=`medium`,B={high:100,medium:250,low:600};function V(e){return B[e]}function H(e){return Number.isFinite(e)?Math.round(Math.min(R,Math.max(500,e))):L}var U={showUserTranscript:!1,showAssistantTranscript:!1,firstRunSeen:!1,pauseBeforeReplyMs:null,interruptSensitivity:null},W=`vellum:voice-prefs`,G=o()(i((e,t)=>({...U,setShowUserTranscript:t=>e({showUserTranscript:t}),setShowAssistantTranscript:t=>e({showAssistantTranscript:t}),markFirstRunSeen:()=>{t().firstRunSeen||e({firstRunSeen:!0})},setPauseBeforeReplyMs:t=>e({pauseBeforeReplyMs:t===null?null:H(t)}),setInterruptSensitivity:t=>e({interruptSensitivity:t})}),{name:W,storage:a(()=>localStorage),partialize:e=>({showUserTranscript:e.showUserTranscript,showAssistantTranscript:e.showAssistantTranscript,firstRunSeen:e.firstRunSeen,pauseBeforeReplyMs:e.pauseBeforeReplyMs,interruptSensitivity:e.interruptSensitivity})})),K=s(G);typeof window<`u`&&window.addEventListener(`storage`,e=>{e.key===W&&G.persist.rehydrate()});var q=n();function J(){return(0,q.jsxs)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:[`Your assistant speaks through a provider you configured yourself. Set its voice on`,` `,(0,q.jsx)(t,{to:`${l.settings.ai}#text-to-speech`,className:`text-[var(--primary-base)] hover:underline`,children:`Models & Services`}),`.`]})}function Y({className:e}){return(0,q.jsxs)(`p`,{className:r(`text-label-small-default text-[var(--content-tertiary)]`,e),children:[`Speech providers, transcription, and API keys live in`,` `,(0,q.jsx)(t,{to:`${l.settings.ai}#text-to-speech`,className:`text-[var(--content-secondary)] underline decoration-[var(--border-element)] underline-offset-2 hover:text-[var(--content-default)]`,children:`Models & Services`}),`.`]})}export{y as C,p as E,C as S,d as T,j as _,R as a,b,N as c,P as d,h as f,S as g,x as h,L as i,F as l,m,J as n,V as o,g as p,z as r,K as s,Y as t,I as u,M as v,u as w,D as x,w as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e}from"./chunk-5KNZJZUH-BUqIilZr.js";import{t}from"./jsx-runtime-BJ8jcmzB.js";import{m as n}from"./local-mode-BNr2MrWI.js";import"./i18n-C9hRT4Lf.js";import{t as r}from"./useTranslation-D9pPv-bA.js";import{d as i}from"./routes-B7wRw3UT.js";import{t as a}from"./onboarding-navigation-C-Kk3_ll.js";import{t as o}from"./auth-welcome-screen-Pw3qXxi5.js";var s=t();function c(){let{t}=r(`onboarding`),c=e();return(0,s.jsx)(o,{secondary:{label:t(`welcome.continueWithoutAccount`),onSelect:()=>{n()?c(i.selectAssistant,a):c(i.onboarding.hosting,a)}}})}export{c as WelcomeScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{t as n}from"./button-VkxVX0DM.js";import{h as r}from"./chunk-5KNZJZUH-BUqIilZr.js";import{n as i}from"./QueryClientProvider-EuRl-wrW.js";import{t as a}from"./useQuery-CTSuec5b.js";import{t as o}from"./useMutation-D2YPyfEH.js";import{t as s}from"./jsx-runtime-BJ8jcmzB.js";import{t as c}from"./queryOptions-DbnOXI51.js";import{a as l,n as u}from"./list-row-CDwzGT9g.js";import{t as d}from"./createLucideIcon-B-ZPaMbU.js";import{t as f}from"./chevron-down-CmQCCo_x.js";import{t as p}from"./chevron-right-Dwr_Sx98.js";import{t as m}from"./menu-ubIBmfUh.js";import{t as h}from"./download-DnnvWjPo.js";import{t as g}from"./eye-off-0lRvXR9p.js";import{t as _}from"./eye-CHlTF_ct.js";import{t as v}from"./file-plus-C_Iw4p49.js";import{t as y}from"./file-text-DpdlyCly.js";import{t as b}from"./file-DVQXh8CW.js";import{t as x}from"./folder-open-BU6EPS8G.js";import{n as S,t as C}from"./image-DsrjUDQh.js";import{t as w}from"./folder-B0UQA6jd.js";import{t as T}from"./loader-circle-DYe85z3g.js";import{n as E}from"./use-swipe-engine-b1fkDAV8.js";import{t as D}from"./pencil-Ba0D7tjH.js";import{t as O}from"./plus-CWkbiq1y.js";import{t as k}from"./search-D_t5oHhF.js";import{t as A}from"./trash-2-V2WT_DbX.js";import{t as j}from"./x-zfSDUG5z.js";import{I as M}from"./src-CImIAPTd.js";import{t as N}from"./input-DkgpMeG9.js";import{t as P}from"./modal-UYNawsIu.js";import{t as F}from"./confirm-dialog-Drw1adml.js";import{n as I,t as L}from"./file-markdown-C1rEGVrN.js";import"./i18n-C9hRT4Lf.js";import{t as ee}from"./Trans-FBE1EuwL.js";import{t as R}from"./useTranslation-D9pPv-bA.js";import{Gr as z,Jr as te,Kr as B,Wr as ne,Xr as V,Zr as re,qr as ie}from"./sdk.gen-CiE6cMi0.js";import{t as ae}from"./use-touch-mobile-CnqGLpCj.js";import{n as oe,r as H,t as se}from"./workspace-tree-query-Dyls8wmV.js";import{t as U}from"./use-active-assistant-id-BADYKVyx.js";import{n as W,r as ce,t as le}from"./use-side-list-room-CUXPQyjw.js";import{t as G}from"./format-file-size-ByNX0dQR.js";import{i as K,n as ue,r as q,t as J}from"./file-editor-BwdObVSu.js";var de=d(`arrow-down-a-z`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M20 8h-5`,key:`1vsyxs`}],[`path`,{d:`M15 10V6.5a2.5 2.5 0 0 1 5 0V10`,key:`ag13bf`}],[`path`,{d:`M15 14h5l-5 6h5`,key:`ur5jdg`}]]),fe=d(`arrow-down-wide-narrow`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M11 4h10`,key:`1w87gc`}],[`path`,{d:`M11 8h7`,key:`djye34`}],[`path`,{d:`M11 12h4`,key:`q8tih4`}]]),Y=e(t(),1);function pe(e){if(!e)return``;let t=e.indexOf(`;`);return(t===-1?e:e.slice(0,t)).trim()}function me(e,t){return pe(t)===`application/json`?!0:(e??``).toLowerCase().endsWith(`.json`)}function he(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function X(e){return e.split(`/`).some(e=>e.startsWith(`.`))}var Z=s();function ge(e){let{assistantId:t,path:n,name:r,showHidden:i}=e,[a,o]=(0,Y.useState)(!1),[s,c]=(0,Y.useState)(!1);return{isDownloading:a,error:s,download:(0,Y.useCallback)(async()=>{c(!1),o(!0);try{await H({assistantId:t,path:n,filename:r,showHidden:i})}catch{c(!0)}finally{o(!1)}},[t,n,r,i])}}function _e({assistantId:e,path:t,name:r,showHidden:i}){let{t:a}=R(`workspace`),{isDownloading:o,error:s,download:c}=ge({assistantId:e,path:t,name:r,showHidden:i});return(0,Z.jsx)(n,{variant:`ghost`,size:`regular`,iconOnly:o?(0,Z.jsx)(T,{className:`animate-spin`,"aria-hidden":!0}):(0,Z.jsx)(h,{"aria-hidden":!0}),onClick:()=>void c(),disabled:o,"aria-label":a(`workspaceFileViewer.downloadAria`,{name:r}),tooltip:a(s?`workspaceFileViewer.downloadFailed`:`workspaceFileViewer.download`)})}function ve(e){return c({queryFn:async()=>{let{data:t,error:n}=await B({path:e.path,query:{path:e.query.path,...e.query.showHidden?{showHidden:`true`}:{}}});if(n)throw n;return t},queryKey:[`assistantsWorkspaceFileRetrieve`,e]})}function ye({mimeType:e}){let t=e.indexOf(`;`),n=(t===-1?e:e.slice(0,t)).trim(),r=y;return n.startsWith(`image/`)?r=C:n.startsWith(`video/`)?r=E:!n.startsWith(`text/`)&&n!==`application/json`&&n!==`application/octet-stream`&&(r=b),(0,Z.jsx)(`span`,{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded`,style:{backgroundColor:`color-mix(in oklab, var(--content-default) 10%, transparent)`},children:(0,Z.jsx)(r,{className:`h-3.5 w-3.5`,style:{color:`var(--content-default)`}})})}function be({viewMode:e,onChange:t}){let{t:r}=R(`workspace`);return(0,Z.jsx)(`div`,{className:`inline-flex rounded-md p-0.5`,style:{backgroundColor:`color-mix(in oklab, var(--content-default) 6%, transparent)`},children:[`preview`,`source`].map(i=>{let a=e===i;return(0,Z.jsx)(n,{variant:`ghost`,onClick:()=>t(i),className:`h-auto rounded border-0 px-2.5 py-1 text-body-small-default hover:bg-transparent`,style:{backgroundColor:a?`var(--surface-lift)`:`transparent`,color:a?`var(--content-default)`:`var(--content-tertiary)`,boxShadow:a?`0 1px 2px rgba(0,0,0,0.15)`:void 0},children:r(i===`preview`?`workspaceFileViewer.preview`:`workspaceFileViewer.source`)},i)})})}function Q({name:e,mimeType:t,size:n,rightContent:r}){return(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b px-3 py-2.5`,style:{borderColor:`var(--border-element)`},children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Z.jsx)(ye,{mimeType:t}),(0,Z.jsx)(`span`,{className:`truncate text-body-medium-default`,style:{color:`var(--content-default)`},children:e}),n!=null&&(0,Z.jsx)(`span`,{className:`shrink-0 text-body-small-default`,style:{color:`var(--content-tertiary)`},children:G(n)})]}),r]})}function xe({assistantId:e,path:t,mimeType:n,showHidden:r}){let{data:i,isLoading:o}=a({queryFn:async()=>{let n=await z({path:{assistant_id:e},query:{path:t,...r?{showHidden:`true`}:{}},parseAs:`blob`});if(n.error)throw n.error;return n.data},queryKey:[`assistantsWorkspaceFileContentRetrieve`,{assistantId:e,path:t,showHidden:r}],enabled:!!t}),[s,c]=(0,Y.useState)(null);return(0,Y.useEffect)(()=>{if(!i)return;let e=URL.createObjectURL(i);return c(e),()=>{URL.revokeObjectURL(e),c(null)}},[i]),o?(0,Z.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,Z.jsx)(T,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})}):s?n.startsWith(`image/`)?(0,Z.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Z.jsx)(`img`,{src:s,alt:t.split(`/`).pop()??`image`,className:`max-h-[70vh] max-w-full rounded object-contain`})}):n.startsWith(`video/`)?(0,Z.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Z.jsx)(`video`,{src:s,controls:!0,className:`max-h-[70vh] max-w-full rounded`})}):null:null}function Se({assistantId:e,path:t,name:r,mimeType:i,size:a,modifiedAt:o,showHidden:s}){let{t:c}=R(`workspace`),{isDownloading:l,error:u,download:d}=ge({assistantId:e,path:t,name:r,showHidden:s});return(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Z.jsx)(Q,{name:r,mimeType:i,size:a}),(0,Z.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,Z.jsxs)(`div`,{className:`w-full max-w-sm rounded-lg border p-6 text-center`,style:{borderColor:`var(--border-base)`,backgroundColor:`var(--surface-lift)`},children:[(0,Z.jsx)(b,{className:`mx-auto h-10 w-10`,style:{color:`var(--content-tertiary)`}}),(0,Z.jsx)(`p`,{className:`mt-3 text-body-medium-default`,style:{color:`var(--content-default)`},children:r}),(0,Z.jsxs)(`div`,{className:`mt-2 space-y-1`,children:[(0,Z.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:i}),(0,Z.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:G(a,`Unknown size`)}),o&&(0,Z.jsxs)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:[c(`workspaceFileViewer.modifiedLabel`),` `,new Date(o).toLocaleString()]})]}),(0,Z.jsx)(n,{variant:`outlined`,size:`compact`,leftIcon:l?(0,Z.jsx)(T,{className:`animate-spin`,"aria-hidden":!0}):(0,Z.jsx)(h,{"aria-hidden":!0}),onClick:d,disabled:l,"aria-label":c(`workspaceFileViewer.downloadAria`,{name:r}),className:`mt-4`,children:c(l?`workspaceFileViewer.downloading`:`workspaceFileViewer.download`)}),u&&(0,Z.jsx)(`p`,{className:`mt-2 text-body-small-default`,style:{color:`var(--system-error)`},children:c(`workspaceFileViewer.downloadFailed`)})]})})]})}function Ce({assistantId:e,selectedPath:t,showHidden:r,viewMode:s,onChangeViewMode:c,onBrowse:l,pathRename:u,pathDelete:d}){let{t:f}=R(`workspace`),p=i(),{data:m,isLoading:h}=a({...ve({path:{assistant_id:e},query:{path:t??``,showHidden:r}}),enabled:!!t}),[g,_]=(0,Y.useState)(null),[v,y]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{if(!u)return;let{from:e,to:t}=u,n=n=>n===e?t:n.startsWith(`${e}/`)?t+n.slice(e.length):n;_(e=>e==null?e:n(e)),y(e=>e==null?e:{...e,path:n(e.path)})},[u]),(0,Y.useEffect)(()=>{if(!d)return;let{path:e}=d,t=t=>t===e||t.startsWith(`${e}/`);_(e=>e!=null&&t(e)?null:e),y(e=>e!=null&&t(e.path)?null:e)},[d]);let b=g!=null&&g===t,S=m?.content??``,C=v?.path===t?v.content:S,w=()=>{_(null),y(null)},E=o({mutationFn:async({path:t,content:n})=>{let{error:r,response:i}=await re({path:{assistant_id:e},body:{path:t,content:n,encoding:`utf8`},throwOnError:!1});if(!i?.ok||r)throw Error(`Failed to save file`)},onSuccess:(e,t)=>{_(e=>e===t.path?null:e),y(e=>e?.path===t.path?null:e),p.invalidateQueries({queryKey:[`assistantsWorkspaceFileRetrieve`]})}}),D=C!==S,O=(0,Y.useCallback)(()=>{t&&D&&!E.isPending&&E.mutate({path:t,content:C})},[t,D,E,C]);if(!t)return(0,Z.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3`,children:[(0,Z.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:f(`workspaceFileViewer.selectAFile`)}),l&&(0,Z.jsx)(n,{type:`button`,onClick:l,leftIcon:(0,Z.jsx)(x,{"aria-hidden":!0}),children:f(`workspaceFileViewer.browseFiles`)})]});if(h)return(0,Z.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Z.jsx)(T,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})});if(!m)return(0,Z.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Z.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:f(`workspaceFileViewer.fileNotFound`)})});let k=m.mimeType??`application/octet-stream`,A=m.name??t.split(`/`).pop()??t,j=I(A,k),M=me(A,k),N=m.content!=null&&!j&&!M,P=t?X(t):!0,F=b&&(0,Z.jsx)(ue,{isDirty:D,isSaving:E.isPending,error:E.isError?f(`workspaceFileViewer.saveFailed`):null,onSave:O,onDiscard:w});if(j&&m.content!=null){let e=b?C:m.content;return(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Z.jsx)(Q,{name:A,mimeType:k,rightContent:(0,Z.jsx)(be,{viewMode:s,onChange:e=>{b&&w(),c(e)}})}),(0,Z.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Z.jsx)(J,{content:e,fileName:A,mimeType:k,showEdit:!P&&s===`source`,isEditing:b,onToggleEdit:()=>b?w():_(t)}),s===`preview`?(0,Z.jsx)(`div`,{className:`h-full overflow-auto px-6 py-4`,style:{color:`var(--content-default)`},children:(0,Z.jsx)(L,{content:e})}):b?(0,Z.jsx)(q,{value:C,onChange:e=>y({path:t,content:e}),onSave:O}):(0,Z.jsx)(K,{content:m.content,readOnly:P,onStartEdit:()=>_(t)})]}),F]})}if(M&&m.content!=null){let e=b?C:m.content,n=he(e);return(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Z.jsx)(Q,{name:A,mimeType:k,rightContent:(0,Z.jsx)(be,{viewMode:s,onChange:e=>{b&&w(),c(e)}})}),(0,Z.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Z.jsx)(J,{content:s===`preview`?n:e,downloadContent:e,fileName:A,mimeType:k,showEdit:!P&&s===`source`,isEditing:b,onToggleEdit:()=>b?w():_(t)}),s===`preview`?(0,Z.jsx)(K,{content:n,readOnly:!0,whiteSpace:`pre`}):b?(0,Z.jsx)(q,{value:C,onChange:e=>y({path:t,content:e}),onSave:O}):(0,Z.jsx)(K,{content:m.content,readOnly:P,onStartEdit:()=>_(t)})]}),F]})}return N?(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Z.jsx)(Q,{name:A,mimeType:k,size:m.size}),(0,Z.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Z.jsx)(J,{content:b?C:m.content??``,fileName:A,mimeType:k,showEdit:!P,isEditing:b,onToggleEdit:()=>b?w():_(t)}),b?(0,Z.jsx)(q,{value:C,onChange:e=>y({path:t,content:e}),onSave:O}):(0,Z.jsx)(K,{content:m.content??``,readOnly:P,onStartEdit:()=>_(t)})]}),F]}):k.startsWith(`image/`)||k.startsWith(`video/`)?(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Z.jsx)(Q,{name:A,mimeType:k,size:m.size,rightContent:(0,Z.jsx)(_e,{assistantId:e,path:t,name:A,showHidden:r})}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,Z.jsx)(xe,{assistantId:e,path:t,mimeType:k,showHidden:r})})]}):(0,Z.jsx)(Se,{assistantId:e,path:t,name:A,mimeType:k,size:m.size,modifiedAt:m.modifiedAt,showHidden:r})}function we(e,t){if(t===`name`)return e;let n=e.slice();return n.sort((e,t)=>{let n=e.size??null,r=t.size??null;return n===null&&r===null?(e.name??``).localeCompare(t.name??``):n===null?1:r===null?-1:n===r?(e.name??``).localeCompare(t.name??``):r-n}),n}async function Te(e,t,n,r){let i=n.toLowerCase(),a=r?.toLowerCase(),{data:o}=await V({path:{assistant_id:e},query:t?{path:t}:{}});if(o?.entries?.some(e=>{let t=(e.name??``).toLowerCase();return t===i&&t!==a}))throw Error(`"${n}" already exists here.`)}function Ee({entry:e}){return e.type===`directory`?(0,Z.jsx)(w,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):e.mimeType?.startsWith(`image/`)?(0,Z.jsx)(C,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):e.mimeType?.startsWith(`video/`)?(0,Z.jsx)(E,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Z.jsx)(y,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}})}function De({entry:e,assistantId:t,expandedPaths:n,selectedPath:r,showHidden:i,sortMode:o,searchLower:s,onToggleExpand:c,onSelectPath:l,onRequestDelete:u,onRequestRename:d,onRequestCreate:m,depth:h}){let{t:g}=R(`workspace`),_=e.path??``,y=e.name??``,b=e.type===`directory`,x=n.has(_),C=r===_,w=y.startsWith(`.`),T=!X(_),E=b&&(x||s.length>0),{data:O}=a({...oe({assistantId:t,path:_,showHidden:i,includeDirSizes:o===`size`}),enabled:b&&E}),k=(0,Y.useMemo)(()=>we(O?.entries??[],o),[O?.entries,o]),j=s===``||y.toLowerCase().includes(s);if(s!==``&&!b&&!j)return null;let N=(0,Z.jsxs)(`button`,{onClick:()=>{b?c(_):l(_)},className:`flex w-full items-center gap-1.5 px-2 py-1 text-left text-body-medium-lighter transition-colors hover:bg-[var(--surface-hover)]`,style:{paddingLeft:`${h*14+8}px`,paddingRight:`8px`,color:C?`var(--content-default)`:w?`var(--content-tertiary)`:`var(--content-default)`,backgroundColor:C?`color-mix(in oklab, var(--primary-base) 12%, transparent)`:void 0,opacity:w&&!C?.7:1},children:[b?E?(0,Z.jsx)(f,{className:`h-3 w-3 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Z.jsx)(p,{className:`h-3 w-3 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Z.jsx)(`span`,{className:`h-3 w-3 shrink-0`}),(0,Z.jsx)(Ee,{entry:e}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:y}),e.size!=null&&(0,Z.jsx)(`span`,{className:`shrink-0 text-label-medium-default tabular-nums`,style:{color:`var(--content-tertiary)`},children:G(e.size)})]});return(0,Z.jsxs)(`div`,{children:[T?(0,Z.jsxs)(M.Root,{children:[(0,Z.jsx)(M.Trigger,{children:N}),(0,Z.jsxs)(M.Content,{children:[b&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(M.Item,{leftIcon:(0,Z.jsx)(v,{className:`h-3.5 w-3.5`}),onSelect:()=>m({kind:`file`,parentPath:_}),children:g(`workspaceTree.newFile`)}),(0,Z.jsx)(M.Item,{leftIcon:(0,Z.jsx)(S,{className:`h-3.5 w-3.5`}),onSelect:()=>m({kind:`folder`,parentPath:_}),children:g(`workspaceTree.newFolder`)}),(0,Z.jsx)(M.Separator,{})]}),(0,Z.jsx)(M.Item,{leftIcon:(0,Z.jsx)(A,{className:`h-3.5 w-3.5`}),onSelect:()=>u({path:_,name:y,isDirectory:b}),children:g(`workspaceTree.delete`)}),(0,Z.jsx)(M.Item,{leftIcon:(0,Z.jsx)(D,{className:`h-3.5 w-3.5`}),onSelect:()=>d({path:_,name:y,isDirectory:b}),children:g(`workspaceTree.rename`)})]})]}):N,b&&E&&k.length>0&&(0,Z.jsx)(`div`,{children:k.map(e=>(0,Z.jsx)(De,{entry:e,assistantId:t,expandedPaths:n,selectedPath:r,showHidden:i,sortMode:o,searchLower:s,onToggleExpand:c,onSelectPath:l,onRequestDelete:u,onRequestRename:d,onRequestCreate:m,depth:h+1},e.path))})]})}function Oe({title:e,placeholder:t,confirmLabel:r,pendingLabel:i,initialName:a,onCancel:o,onConfirm:s,pending:c,error:l}){let{t:u}=R(`workspace`),d=(0,Y.useRef)(null),[f,p]=(0,Y.useState)(a??``),m=f.trim(),h=m.length>0&&(/[/\\]/.test(m)||m===`.`||m===`..`),g=m.length>0&&!h&&!c;return(0,Z.jsx)(P.Root,{open:!0,onOpenChange:e=>{!e&&!c&&o()},children:(0,Z.jsx)(P.Content,{size:`sm`,hideCloseButton:!0,"aria-describedby":void 0,onOpenAutoFocus:e=>{e.preventDefault();let t=d.current;t&&(t.focus(),requestAnimationFrame(()=>{t.setSelectionRange(0,t.value.length)}))},onEscapeKeyDown:e=>{e.preventDefault(),e.stopPropagation(),c||o()},children:(0,Z.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),g&&s(m)},children:[(0,Z.jsx)(P.Header,{children:(0,Z.jsx)(P.Title,{children:e})}),(0,Z.jsx)(P.Body,{children:(0,Z.jsx)(N,{ref:d,label:u(`workspaceTree.nameLabel`),value:f,onChange:e=>p(e.target.value),placeholder:t,errorText:l??(h?u(`workspaceTree.nameError`):void 0),autoComplete:`off`,spellCheck:!1,fullWidth:!0})}),(0,Z.jsxs)(P.Footer,{children:[(0,Z.jsx)(n,{type:`button`,variant:`outlined`,onClick:o,disabled:c,children:u(`workspaceTree.cancel`)}),(0,Z.jsx)(n,{type:`submit`,variant:`primary`,disabled:!g,children:c?i:r})]})]})})})}function ke({assistantId:e,expandedPaths:t,selectedPath:r,showHidden:s,sortMode:c,onToggleExpand:l,onExpandPath:u,onSelectPath:d,onToggleShowHidden:f,onChangeSortMode:p,onPathDeleted:m,onPathRenamed:h,search:v,onSearchChange:y}){let{t:b}=R(`workspace`),x=i(),S=v.trim().toLowerCase(),[C,w]=(0,Y.useState)(!1),[T,E]=(0,Y.useState)(null),[D,O]=(0,Y.useState)(null),A=(0,Y.useCallback)(()=>{E(null),O(null)},[]),{data:M,isLoading:P}=a(oe({assistantId:e,showHidden:s,includeDirSizes:c===`size`})),I=(0,Y.useMemo)(()=>we(M?.entries??[],c),[M?.entries,c]),L=(0,Y.useCallback)(()=>{for(let e of[se,`assistantsWorkspaceFileRetrieve`,`assistantsWorkspaceFileContentRetrieve`])x.invalidateQueries({queryKey:[e]})},[x]),z=o({mutationFn:async t=>{let n=t.parentPath?`${t.parentPath}/${t.name}`:t.name;await Te(e,t.parentPath,t.name);let{error:r,response:i}=t.kind===`file`?await re({path:{assistant_id:e},body:{path:n,content:``,encoding:`utf8`},throwOnError:!1}):await ie({path:{assistant_id:e},body:{path:n},throwOnError:!1});if(r||!i?.ok)throw Error(typeof r==`string`?r:`Failed to create — check the name and try again.`);return{...t,path:n}},onSuccess:e=>{A(),L(),e.parentPath&&u(e.parentPath),e.kind===`file`?d(e.path):u(e.path)},onError:e=>{O(e instanceof Error?e.message:`Failed to create.`)}}),B=o({mutationFn:async t=>{let n=t.oldPath.lastIndexOf(`/`),r=n===-1?``:t.oldPath.slice(0,n),i=t.oldPath.slice(n+1),a=r?`${r}/${t.newName}`:t.newName;await Te(e,r,t.newName,i);let{error:o,response:s}=await te({path:{assistant_id:e},body:{oldPath:t.oldPath,newPath:a},throwOnError:!1});if(o||!s?.ok)throw Error(typeof o==`string`?o:`Failed to rename — check the name and try again.`);return{oldPath:t.oldPath,newPath:a}},onSuccess:({oldPath:e,newPath:t})=>{A(),L(),h(e,t)},onError:e=>{O(e instanceof Error?e.message:`Failed to rename.`)}}),V=(0,Y.useCallback)(e=>{O(null),E({type:`create`,...e})},[]),ae=(0,Y.useCallback)(e=>{O(null),E({type:`rename`,path:e.path,name:e.name})},[]),[H,U]=(0,Y.useState)(null),W=o({mutationFn:async t=>{let{error:n,response:r}=await ne({path:{assistant_id:e},body:{path:t.path},throwOnError:!1});if(n||!r?.ok)throw Error(typeof n==`string`?n:`Failed to delete — try again.`);return t},onSuccess:e=>{U(null),L(),m(e.path)}}),ce=(0,Y.useCallback)(e=>{W.reset(),U(e)},[W]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between border-b px-3 py-2.5`,style:{borderColor:`var(--border-element)`},children:[(0,Z.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-secondary)`},children:b(`workspaceTree.heading`)}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,Z.jsx)(n,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:c===`size`?(0,Z.jsx)(fe,{"aria-hidden":!0}):(0,Z.jsx)(de,{"aria-hidden":!0}),onClick:()=>p(c===`size`?`name`:`size`),"aria-label":b(c===`size`?`workspaceTree.sortByNameAria`:`workspaceTree.sortBySizeAria`),title:b(c===`size`?`workspaceTree.sortedBySizeTitle`:`workspaceTree.sortedByNameTitle`),tintColor:c===`size`?`var(--content-default)`:`var(--content-tertiary)`}),(0,Z.jsx)(n,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:s?(0,Z.jsx)(_,{"aria-hidden":!0}):(0,Z.jsx)(g,{"aria-hidden":!0}),onClick:f,"aria-label":b(s?`workspaceTree.hideHiddenAria`:`workspaceTree.showHiddenAria`),title:b(s?`workspaceTree.hideHiddenAria`:`workspaceTree.showHiddenAria`),tintColor:s?`var(--content-default)`:`var(--content-tertiary)`}),(0,Z.jsx)(Ae,{open:C,onOpenChange:w,onSelectKind:e=>{w(!1),V({kind:e,parentPath:``})}})]})]}),(0,Z.jsx)(`div`,{className:`px-3 py-2`,children:(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(N,{type:`text`,value:v,onChange:e=>y(e.target.value),placeholder:b(`workspaceTree.searchPlaceholder`),leftIcon:(0,Z.jsx)(k,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),fullWidth:!0,spellCheck:!1,autoComplete:`off`}),v&&(0,Z.jsx)(n,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Z.jsx)(j,{"aria-hidden":!0}),onClick:()=>y(``),"aria-label":b(`workspaceTree.clearSearchAria`),className:`absolute right-1.5 top-1/2 -translate-y-1/2`,tintColor:`var(--content-tertiary)`})]})}),(0,Z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto py-1`,children:P?(0,Z.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,Z.jsx)(`div`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent`,style:{color:`var(--content-tertiary)`}})}):I.length?I.map(n=>(0,Z.jsx)(De,{entry:n,assistantId:e,expandedPaths:t,selectedPath:r,showHidden:s,sortMode:c,searchLower:S,onToggleExpand:l,onSelectPath:d,onRequestDelete:ce,onRequestRename:ae,onRequestCreate:V,depth:0},n.path)):(0,Z.jsx)(`p`,{className:`px-3 py-4 text-center text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:b(`workspaceTree.noFilesFound`)})}),T?.type===`create`&&(0,Z.jsx)(Oe,{title:T.kind===`file`?b(`workspaceTree.newFile`):b(`workspaceTree.newFolder`),placeholder:T.kind===`file`?`filename.md`:`folder-name`,confirmLabel:b(`workspaceTree.create`),pendingLabel:b(`workspaceTree.creating`),onCancel:A,onConfirm:e=>{O(null),z.mutate({kind:T.kind,parentPath:T.parentPath,name:e})},pending:z.isPending,error:D},`create-${T.kind}-${T.parentPath}`),T?.type===`rename`&&(0,Z.jsx)(Oe,{title:b(`workspaceTree.rename`),placeholder:T.name,confirmLabel:b(`workspaceTree.rename`),pendingLabel:b(`workspaceTree.renaming`),initialName:T.name,onCancel:A,onConfirm:e=>{if(e===T.name){A();return}O(null),B.mutate({oldPath:T.path,newName:e})},pending:B.isPending,error:D},`rename-${T.path}`),(0,Z.jsx)(F,{open:H!==null,title:H?.isDirectory?b(`workspaceTree.deleteFolderTitle`):b(`workspaceTree.deleteFileTitle`),message:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ee,{i18nKey:H?.isDirectory?`workspaceTree.deleteFolderMessage`:`workspaceTree.deleteFileMessage`,ns:`workspace`,values:{name:H?.name??``},components:{name:(0,Z.jsx)(`span`,{style:{color:`var(--content-default)`}})}}),W.error&&(0,Z.jsx)(`span`,{className:`mt-2 block`,style:{color:`var(--system-negative-strong)`},children:W.error.message})]}),confirmLabel:W.isPending?b(`workspaceTree.deleting`):b(`workspaceTree.delete`),destructive:!0,isPending:W.isPending,onConfirm:()=>{H&&W.mutate(H)},onCancel:()=>U(null)})]})}function Ae({open:e,onOpenChange:t,onSelectKind:r}){let{t:i}=R(`workspace`);return ae()?(0,Z.jsxs)(l.Root,{open:e,onOpenChange:t,children:[(0,Z.jsx)(l.Trigger,{asChild:!0,children:(0,Z.jsx)(n,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Z.jsx)(O,{"aria-hidden":!0}),"aria-label":i(`workspaceTree.createTriggerAria`),title:i(`workspaceTree.createTriggerTitle`),tintColor:`var(--content-tertiary)`})}),(0,Z.jsxs)(l.Content,{children:[(0,Z.jsx)(l.Header,{className:`sr-only`,children:(0,Z.jsx)(l.Title,{children:i(`workspaceTree.creatingHeading`)})}),(0,Z.jsxs)(l.Body,{className:`pt-0`,children:[(0,Z.jsx)(u,{icon:v,label:i(`workspaceTree.newFile`),onSelect:()=>r(`file`)}),(0,Z.jsx)(u,{icon:S,label:i(`workspaceTree.newFolder`),onSelect:()=>r(`folder`)})]})]})]}):(0,Z.jsxs)(m.Root,{open:e,onOpenChange:t,children:[(0,Z.jsx)(m.Trigger,{asChild:!0,children:(0,Z.jsx)(n,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Z.jsx)(O,{"aria-hidden":!0}),"aria-label":i(`workspaceTree.createTriggerAria`),title:i(`workspaceTree.createTriggerTitle`),tintColor:`var(--content-tertiary)`})}),(0,Z.jsxs)(m.Content,{align:`end`,sideOffset:4,children:[(0,Z.jsx)(m.Item,{leftIcon:(0,Z.jsx)(v,{className:`h-3.5 w-3.5`}),onSelect:()=>r(`file`),children:i(`workspaceTree.newFile`)}),(0,Z.jsx)(m.Item,{leftIcon:(0,Z.jsx)(S,{className:`h-3.5 w-3.5`}),onSelect:()=>r(`folder`),children:i(`workspaceTree.newFolder`)})]})]})}function $(e){let t=e.split(`/`),n=new Set;for(let e=1;e<t.length;e++)n.add(t.slice(0,e).join(`/`));return n}function je({assistantId:e}){let{t}=R(`workspace`),[n,i]=r(),[a,o]=(0,Y.useState)(()=>{let e=n.get(`file`);return e?$(e):new Set}),[s,c]=(0,Y.useState)(()=>n.get(`file`)),[l,u]=(0,Y.useState)(!1),[d,f]=(0,Y.useState)(()=>n.get(`sort`)===`size`?`size`:`name`),[p,m]=(0,Y.useState)(`preview`);(0,Y.useEffect)(()=>{let e=n.get(`file`);e&&(c(e),o(t=>{let n=new Set(t);for(let t of $(e))n.add(t);return n.size===t.size?t:n}),i(e=>{let t=new URLSearchParams(e);return t.delete(`file`),t},{replace:!0}))},[n,i]);let h=(0,Y.useCallback)(e=>{o(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),g=(0,Y.useCallback)(e=>{o(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})},[]),{paneRef:_,hasRoomForList:v,drawerOpen:y,openDrawer:b,closeDrawer:x}=le(),[S,C]=(0,Y.useState)(``),w=(0,Y.useCallback)(e=>{c(e),x()},[x]),[T,E]=(0,Y.useState)(null),D=(0,Y.useCallback)(e=>{let t=t=>t===e||t.startsWith(`${e}/`);c(e=>e!==null&&t(e)?null:e),o(e=>{let n=new Set([...e].filter(e=>!t(e)));return n.size===e.size?e:n}),E({path:e})},[]),[O,k]=(0,Y.useState)(null),A={assistantId:e,expandedPaths:a,selectedPath:s,showHidden:l,sortMode:d,onToggleExpand:h,onExpandPath:g,onSelectPath:w,onToggleShowHidden:()=>u(e=>!e),onChangeSortMode:f,onPathDeleted:D,onPathRenamed:(0,Y.useCallback)((e,t)=>{let n=n=>n===e?t:n.startsWith(`${e}/`)?t+n.slice(e.length):n;c(e=>e===null?e:n(e)),o(e=>{let t=!1,r=new Set;for(let i of e){let e=n(i);e!==i&&(t=!0),r.add(e)}return t?r:e}),k({from:e,to:t})},[]),search:S,onSearchChange:C};return(0,Z.jsxs)(`div`,{ref:_,className:`flex h-full min-h-0 flex-col gap-4`,children:[v?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex items-center`,children:(0,Z.jsx)(ce,{onClick:b})}),(0,Z.jsx)(W,{open:y,onClose:x,title:t(`workspaceBrowser.drawerTitle`),children:(0,Z.jsx)(ke,{...A})})]}),(0,Z.jsxs)(`div`,{className:`grid min-h-0 flex-1 gap-4 ${v?`grid-cols-[320px_1fr]`:`grid-cols-1`}`,children:[v?(0,Z.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden rounded-xl border`,style:{backgroundColor:`var(--surface-overlay)`,borderColor:`var(--border-base)`},children:(0,Z.jsx)(ke,{...A})}):null,(0,Z.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden rounded-xl border`,style:{backgroundColor:`var(--surface-overlay)`,borderColor:`var(--border-base)`},children:(0,Z.jsx)(Ce,{assistantId:e,selectedPath:s,showHidden:l,viewMode:p,onChangeViewMode:m,onBrowse:v?void 0:b,pathRename:O,pathDelete:T})})]})]})}function Me(){return(0,Z.jsx)(je,{assistantId:U()})}export{Me as WorkspacePage};
|
|
File without changes
|
/package/dist/assets/{android-consumption-only-4ku7vpy4.js → android-consumption-only-DDbN5hxd.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/assets/{assistant-identity-store-DhAqaifK.js → assistant-identity-store-DrQJhZh3.js}
RENAMED
|
File without changes
|
/package/dist/assets/{avatar-bundled-components-C8vOxkFj.js → avatar-bundled-components-CAE0CJ9e.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/assets/{avatar-svg-compositor-e_lhkR9P.js → avatar-svg-compositor-tf4h3-SV.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/assets/{chat-layout-slots-store-CE2p0OE9.js → chat-layout-slots-store-c4ig5vXx.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/assets/{edge-swipe-arbiter-store-BGBvaPTd.js → edge-swipe-arbiter-store-Cgt2wsOY.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|