@vellumai/web 0.12.2-dev.202609182015.188de8a → 0.12.2-dev.202609182114.335fa56
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/{a2a-invite-BkJsiMCk.js → a2a-invite-Ci3O-UuB.js} +1 -1
- package/dist/assets/{about-page-DKz6hc6m.js → about-page-B-7lyYEB.js} +1 -1
- package/dist/assets/{account-page-D2086vlm.js → account-page-CGtIVDfJ.js} +1 -1
- package/dist/assets/{account-shell-BzbAvUcW.js → account-shell-DLy0Ad5J.js} +1 -1
- package/dist/assets/{acp-run-detail-panel-D1q28OPn.js → acp-run-detail-panel-D1WXDwZ3.js} +1 -1
- package/dist/assets/{activation-list-route-CymK18w2.js → activation-list-route-B5Ewg5yz.js} +1 -1
- package/dist/assets/{activity-redirect-page-DCcfRUi_.js → activity-redirect-page-2lUB6VgV.js} +1 -1
- package/dist/assets/{activity-steps-panel-BYjkiE5D.js → activity-steps-panel-Ba9xwFXj.js} +1 -1
- package/dist/assets/add-credits-modal-DqL2PtAm.js +1 -0
- package/dist/assets/{add-credits-modal-4Etl1PAt.js → add-credits-modal-xD_fI3hc.js} +1 -1
- package/dist/assets/{ai-page-CkrearYq.js → ai-page-BBz-BfyC.js} +1 -1
- package/dist/assets/{android-billing-handoff-B_bu7Rr8.js → android-billing-handoff-BBh13NBZ.js} +1 -1
- package/dist/assets/{api-key-screen-STe5cIxn.js → api-key-screen-DLdU9-qN.js} +1 -1
- package/dist/assets/{app-BfK0IQIk.js → app-BBUxTj9g.js} +65 -65
- package/dist/assets/{app-info-mmyV2q32.js → app-info-CtXHTQ8I.js} +1 -1
- package/dist/assets/{archive-redirect-page-BB3zYu05.js → archive-redirect-page-CR1hXS8u.js} +1 -1
- package/dist/assets/{assistant-handle-modal-CgnaRG-5.js → assistant-handle-modal-BAfB5jfI.js} +1 -1
- package/dist/assets/{assistant-inbox-page-route-CZEp6qpH.js → assistant-inbox-page-route-BCzsw_dR.js} +1 -1
- package/dist/assets/{assistant-inbox-upgrade-body-gHf4cLXK.js → assistant-inbox-upgrade-body-DqRg_E8P.js} +1 -1
- package/dist/assets/{assistant-status-panel-BTvZ573v.js → assistant-status-panel-CXtpB-3s.js} +1 -1
- package/dist/assets/auth-store-VfQBlZjf.js +1 -0
- package/dist/assets/{auth-welcome-screen-BTwCPZYQ.js → auth-welcome-screen-eEmmCa7a.js} +1 -1
- package/dist/assets/avatar-bundled-components-CBxBRJHT.js +1 -0
- package/dist/assets/{avatar-random-Bu1JUc-m.js → avatar-random-CmFgdVYy.js} +2 -2
- package/dist/assets/{await-org-header-settled-DIoy1_Jd.js → await-org-header-settled-rFkQnSY1.js} +1 -1
- package/dist/assets/{background-task-detail-panel-DJsB3oAn.js → background-task-detail-panel-CujUAl64.js} +1 -1
- package/dist/assets/{billing-page-KdEbDnk2.js → billing-page-C3fvhOOQ.js} +3 -3
- package/dist/assets/{billing-redirect-page-B0JXbuDV.js → billing-redirect-page-CKl8d4sb.js} +1 -1
- package/dist/assets/{bookmarks-page-VALGfihg.js → bookmarks-page-B2YSfE6-.js} +1 -1
- package/dist/assets/{bundle-confirm-page-CaLFi7ku.js → bundle-confirm-page-gJCzHRKr.js} +1 -1
- package/dist/assets/{channel-transcript-panel-D4KVRmwh.js → channel-transcript-panel-D5L38TzO.js} +1 -1
- package/dist/assets/{channels-page-route-COc0hysG.js → channels-page-route-afqHw3N0.js} +1 -1
- package/dist/assets/{chat-info-panel-pW2_d9mO.js → chat-info-panel-DTA_-olk.js} +1 -1
- package/dist/assets/{checkout-continuation-9qrV5c78.js → checkout-continuation-5Jtm_JrA.js} +1 -1
- package/dist/assets/{checkout-page-DxpEqYIc.js → checkout-page-DULnZwd9.js} +1 -1
- package/dist/assets/checkout-return-target-DWik-led.js +1 -0
- package/dist/assets/{command-palette-E9QrPenm.js → command-palette-BD0yvfbb.js} +1 -1
- package/dist/assets/command-palette-CVX6w4zo.js +1 -0
- package/dist/assets/{command-palette-window-page-CZXCfB57.js → command-palette-window-page-Bk5U7P1e.js} +1 -1
- package/dist/assets/common-2tBLDaGA.js +1 -0
- package/dist/assets/common-BbH8TVsn.js +1 -0
- package/dist/assets/common-CLiCbaO-.js +1 -0
- package/dist/assets/{common-c9S--s7Z.js → common-WxNH1jIH.js} +1 -1
- package/dist/assets/{community-page-Cj2Wd0lm.js → community-page-CUQ3qu-V.js} +1 -1
- package/dist/assets/{companion-accent-DDGqoGt7.js → companion-accent-BYoVCdU1.js} +1 -1
- package/dist/assets/{companion-dock-zones-page-DTi3NZqD.js → companion-dock-zones-page-sX6B3NE_.js} +1 -1
- package/dist/assets/{companion-layout-oDK2JvY4.js → companion-layout-33AE1gia.js} +1 -1
- package/dist/assets/{companion-popover-DbIXR8Bk.js → companion-popover-TujVt-Ar.js} +1 -1
- package/dist/assets/{companion-popover-page-BSLD45sw.js → companion-popover-page-ByBb4sHd.js} +1 -1
- package/dist/assets/{companion-surface-page-BO8ktCPi.js → companion-surface-page-BbWzCHgm.js} +1 -1
- package/dist/assets/{companion-watch-frame-page-DFn5w5vu.js → companion-watch-frame-page-BIETd4hp.js} +1 -1
- package/dist/assets/{connect-page-Do1DxTJR.js → connect-page-BO1XQJwf.js} +1 -1
- package/dist/assets/{consent-controls-D99GwSSN.js → consent-controls-DZjKfsjW.js} +1 -1
- package/dist/assets/{contacts-gateway-BC6WaVFg.js → contacts-gateway-B5O7Ne74.js} +1 -1
- package/dist/assets/{contacts-page-route-CXW0fKwC.js → contacts-page-route-CWQ8xq2e.js} +1 -1
- package/dist/assets/{copy-button-CmwoARVB.js → copy-button-BIeybJYd.js} +1 -1
- package/dist/assets/{credential-entry-page-DfXFeMIN.js → credential-entry-page-BRvUcU5-.js} +1 -1
- package/dist/assets/{credentials-page-DRVB3E60.js → credentials-page-BCpKSirx.js} +1 -1
- package/dist/assets/{csv-preview-CiaeYC20.js → csv-preview-sSdnMx-6.js} +1 -1
- package/dist/assets/{danger-zone-redirect-page-B4c2l_0r.js → danger-zone-redirect-page-521j5Kuo.js} +1 -1
- package/dist/assets/{debug-page-CvyE149B.js → debug-page-Ci2myxA0.js} +1 -1
- package/dist/assets/deploy-dialogs-pkluahDA.js +1 -0
- package/dist/assets/{deploy-dialogs-mEenw05v.js → deploy-dialogs-u3yfw8HJ.js} +1 -1
- package/dist/assets/{desktop-preview-content-DWlmtZ40.js → desktop-preview-content-DYVVZr2w.js} +2 -2
- package/dist/assets/{desktop-status-u4hV53HS.js → desktop-status-B4ofrNCE.js} +1 -1
- package/dist/assets/{desktop-viewer-CFOGac24.js → desktop-viewer-CxxkXSPF.js} +1 -1
- package/dist/assets/{detail-card-CZVSMSNs.js → detail-card-BhMBZjzu.js} +1 -1
- package/dist/assets/{detail-panel-stop-button-CoA_583J.js → detail-panel-stop-button-BXvuwM0g.js} +1 -1
- package/dist/assets/detail-primitives-Bh6NmCv7.js +1 -0
- package/dist/assets/{developer-page-Co9T6jqJ.js → developer-page-CC5VjRqN.js} +1 -1
- package/dist/assets/{devices-redirect-page-CbXvqz4V.js → devices-redirect-page-sytJWmif.js} +1 -1
- package/dist/assets/{dictation-overlay-page-DohFzjtT.js → dictation-overlay-page-wEGaipQM.js} +1 -1
- package/dist/assets/document-load-C91qCZur.js +1 -0
- package/dist/assets/{document-load-DGt33NFw.js → document-load-Cxy5V3Q3.js} +1 -1
- package/dist/assets/{document-viewer-page-DMRNTqY7.js → document-viewer-page-CF5Qsyn0.js} +1 -1
- package/dist/assets/{emails-page-CgbmlG_-.js → emails-page-CF5E8gMK.js} +1 -1
- package/dist/assets/{file-diff-view-D0X_TuVO.js → file-diff-view-DeCwZxAs.js} +1 -1
- package/dist/assets/{file-editor-vMWOc28f.js → file-editor-kOM9p3-b.js} +1 -1
- package/dist/assets/{general-page-DRoY1Iej.js → general-page-CHuT-gI-.js} +1 -1
- package/dist/assets/{hatching-screen-BNJtdwkK.js → hatching-screen-CRUvQYM3.js} +1 -1
- package/dist/assets/{hosting-screen-BZRT7l7I.js → hosting-screen-cKl8LkVn.js} +1 -1
- package/dist/assets/{identity-page-route-CFrCh_KE.js → identity-page-route-A6PcJJKj.js} +1 -1
- package/dist/assets/{inspect-page-BHkl8Ibk.js → inspect-page-C98uAPdc.js} +3 -3
- package/dist/assets/{integrations-page-BYqa4ZWD.js → integrations-page-C8x-gkb9.js} +1 -1
- package/dist/assets/{intelligence-layout-eis9JaHj.js → intelligence-layout-ChW1oIoj.js} +1 -1
- package/dist/assets/intelligence-layout-slots-store-D8qMofvo.js +1 -0
- package/dist/assets/{keyboard-shortcuts-redirect-page-Lb1SQwRg.js → keyboard-shortcuts-redirect-page-BYcDZHs7.js} +1 -1
- package/dist/assets/{latest-assistant-text-T4hNgVuv.js → latest-assistant-text-Dnh6k0g4.js} +1 -1
- package/dist/assets/{library-detail-page-CWDBsQis.js → library-detail-page-DRUffaFd.js} +1 -1
- package/dist/assets/{library-page-Mg60THux.js → library-page-dNnf_D2k.js} +1 -1
- package/dist/assets/local-mode-DI-seN56.js +1 -0
- package/dist/assets/{login-page-DQCXCIr1.js → login-page-BPkEvkFD.js} +1 -1
- package/dist/assets/{logout-page-7dYOYnPb.js → logout-page-D3opSUZI.js} +1 -1
- package/dist/assets/{logs-layout-CY2j2fvO.js → logs-layout-ZkvUiVsu.js} +1 -1
- package/dist/assets/{markdown-preview-CfEjiWNm.js → markdown-preview-MnyvCMa3.js} +1 -1
- package/dist/assets/{media-preview-BaQUTRiQ.js → media-preview-BQxdPaMe.js} +1 -1
- package/dist/assets/{memory-page-route-C03izhfJ.js → memory-page-route-6Xr4vUpi.js} +1 -1
- package/dist/assets/{memory-router-playground-page-DdjGQ-b9.js → memory-router-playground-page-CaTWoBrm.js} +1 -1
- package/dist/assets/{message-files-panel-DCFWS80s.js → message-files-panel-CL8oaeEs.js} +1 -1
- package/dist/assets/{metric-card-BPdD5GIY.js → metric-card-Bk5HVUSj.js} +1 -1
- package/dist/assets/native-attachment-pickers-DSMoNnpj.js +1 -0
- package/dist/assets/native-file-BsIX0824.js +1 -0
- package/dist/assets/{notifications-page-BrufA0ep.js → notifications-page-BwawEEVb.js} +1 -1
- package/dist/assets/{oauth-complete-page-CU0ZFKgo.js → oauth-complete-page-E8VFzbV8.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-CWV5_KjG.js → oauth-popup-complete-page-BPruZqf-.js} +1 -1
- package/dist/assets/paired-platform-identity-DC-PSt-z.js +1 -0
- package/dist/assets/{pairing-page-BWvSec2z.js → pairing-page-pUxc_Q6w.js} +1 -1
- package/dist/assets/password-reset-page-D_XJ_720.js +1 -0
- package/dist/assets/{pdf-file-preview-BDNFrYwL.js → pdf-file-preview-CcYLZEEX.js} +1 -1
- package/dist/assets/{personality-page-BeDOP0Yx.js → personality-page-D7ltEpyD.js} +1 -1
- package/dist/assets/{personality-page-BgCVuORF.js → personality-page-DJ8ZQNex.js} +1 -1
- package/dist/assets/{personality-sliders-DPrI9-Un.js → personality-sliders-B_qi0jNr.js} +1 -1
- package/dist/assets/{plans-page-Dulw9Q1k.js → plans-page-DjMkYu8P.js} +1 -1
- package/dist/assets/{platform-loopback-page-SyOClPdC.js → platform-loopback-page-B7YadjAM.js} +1 -1
- package/dist/assets/{plugin-detail-page-ycy32YsM.js → plugin-detail-page-DJHgAPt-.js} +1 -1
- package/dist/assets/{plugins-page-6VvPNQ_q.js → plugins-page-t9j6WJsi.js} +1 -1
- package/dist/assets/plugins-surface-DY7rojgP.js +1 -0
- package/dist/assets/{preview-error-CYKkv16g.js → preview-error-CTmJUZ1U.js} +1 -1
- package/dist/assets/{privacy-page-CFrLoQuJ.js → privacy-page-CcVYTYFw.js} +1 -1
- package/dist/assets/{privacy-screen-BuIFw79d.js → privacy-screen-D6KWda_d.js} +1 -1
- package/dist/assets/{profile-card-DOKegb-a.js → profile-card-B0q-4VDK.js} +1 -1
- package/dist/assets/{provider-callback-page-CPnDutdc.js → provider-callback-page-DUPzWdsn.js} +1 -1
- package/dist/assets/{provider-key-AVs0qMXM.js → provider-key-Bt_1m-Ip.js} +1 -1
- package/dist/assets/{provider-signup-page-DTPzoL0u.js → provider-signup-page-Dyube2uE.js} +1 -1
- package/dist/assets/{quick-input-page-B0ICyEgU.js → quick-input-page-phOYFcWE.js} +1 -1
- package/dist/assets/{referral-modal-1zPoMtxP.js → referral-modal-BpEe6RfT.js} +1 -1
- package/dist/assets/referral-modal-YlLIteDB.js +1 -0
- package/dist/assets/{research-mock-page-D-e9x0aU.js → research-mock-page-3sH3Ojod.js} +1 -1
- package/dist/assets/{research-onboarding-route-DtHB29VX.js → research-onboarding-route-W8ZOplPi.js} +1 -1
- package/dist/assets/{review-terms-screen-BbXyCCa7.js → review-terms-screen-p7rIoNoi.js} +1 -1
- package/dist/assets/routes-vi064rNI.js +1 -0
- package/dist/assets/{schedules-DfRCZ1RP.js → schedules-G-fQS88Z.js} +1 -1
- package/dist/assets/{schedules-page-Dcpdy1n1.js → schedules-page-Bz8dQuZ9.js} +1 -1
- package/dist/assets/{security-redirect-page-BqN7nDmC.js → security-redirect-page-nqyQ-l9I.js} +1 -1
- package/dist/assets/{select-assistant-screen-D7lOSn8K.js → select-assistant-screen-DTbgqPJ8.js} +1 -1
- package/dist/assets/{self-hosted-servers-mfRYC3V6.js → self-hosted-servers-TGCgx_Zl.js} +1 -1
- package/dist/assets/{service-form-controls-yfiFapqu.js → service-form-controls-BYas0Fj1.js} +1 -1
- package/dist/assets/{setting-row-hz10CsiO.js → setting-row-DeKbamTb.js} +1 -1
- package/dist/assets/{settings-divider-BTsvGg8f.js → settings-divider-fX1al4v0.js} +1 -1
- package/dist/assets/{settings-layout-CJfkUjGu.js → settings-layout-_uQXbZvN.js} +1 -1
- package/dist/assets/share-feedback-modal-BbfX56Tb.js +1 -0
- package/dist/assets/{share-feedback-modal-CxxySevk.js → share-feedback-modal-Bgjk4m6g.js} +1 -1
- package/dist/assets/{sidebar-tree-Bu-uVPbk.js → sidebar-tree-BxII4vqO.js} +1 -1
- package/dist/assets/{signup-page-NLKt0-kE.js → signup-page--iXCz-aP.js} +1 -1
- package/dist/assets/{signup-shell-DU-HQ4Is.js → signup-shell-D2m_KGDx.js} +1 -1
- package/dist/assets/{skill-detail-page-D2ynj5TG.js → skill-detail-page-DApsFagl.js} +1 -1
- package/dist/assets/{skill-detail-panel-CkzKPc65.js → skill-detail-panel-D2ghwCqP.js} +1 -1
- package/dist/assets/{skill-removal-dialog-Cf4V-l2v.js → skill-removal-dialog-C3KKFPCH.js} +1 -1
- package/dist/assets/{skills-page-q_IVfLb3.js → skills-page-CMueiEEK.js} +1 -1
- package/dist/assets/{sounds-page-CtaSO0c4.js → sounds-page-CaRGElXh.js} +1 -1
- package/dist/assets/{start-screen-DeowChgG.js → start-screen-C380uTIT.js} +1 -1
- package/dist/assets/{stt-language-picker-modal-MgMG4vnJ.js → stt-language-picker-modal-wNybXxLn.js} +1 -1
- package/dist/assets/{subagent-detail-panel-CkE-6d0V.js → subagent-detail-panel--lLPuYen.js} +1 -1
- package/dist/assets/{superpowers-page-11wxZ3sf.js → superpowers-page-CwGBMECu.js} +1 -1
- package/dist/assets/{system-events-page-NUG1UJD3.js → system-events-page-CbQnTv1L.js} +1 -1
- package/dist/assets/{system-events-redirect-page-DbsB8RE5.js → system-events-redirect-page-DRZUqIqZ.js} +1 -1
- package/dist/assets/{text-preview-qkNRFUQt.js → text-preview-CYUN4rc9.js} +1 -1
- package/dist/assets/{theme-stage-page-Vy0XYtTa.js → theme-stage-page-ic-Boi69.js} +1 -1
- package/dist/assets/{tiptap-document-editor-D3VgM1Ce.js → tiptap-document-editor-SsIwSFSZ.js} +1 -1
- package/dist/assets/tool-detail-panel-CKZ_M0Qj.js +1 -0
- package/dist/assets/{tool-detail-panel-kkHVCqRn.js → tool-detail-panel-XwRKFU13.js} +3 -3
- package/dist/assets/{trait-cycle-row-BlgCseYI.js → trait-cycle-row-DNn4F74m.js} +1 -1
- package/dist/assets/{upgrade-cancel-page-s6e4nG1l.js → upgrade-cancel-page-DqQHOlQ0.js} +1 -1
- package/dist/assets/{upgrade-success-page-D6SM1pxp.js → upgrade-success-page-tVasRCy_.js} +1 -1
- package/dist/assets/{usage-redirect-page-BNYnnsnf.js → usage-redirect-page-D3aVssCL.js} +1 -1
- package/dist/assets/{use-app-delete-CQbN9rtt.js → use-app-delete-DtftSu08.js} +1 -1
- package/dist/assets/{use-assistant-identity-details-CrhYb7qF.js → use-assistant-identity-details-BHojBIzM.js} +1 -1
- package/dist/assets/{use-checkout-dismiss-refresh-q4n835g5.js → use-checkout-dismiss-refresh-DbSG9nq4.js} +1 -1
- package/dist/assets/{use-edge-swipe-back-CeKk6gy9.js → use-edge-swipe-back-Dx2dMUF5.js} +1 -1
- package/dist/assets/{use-hotkey-recorder-BA2YaGIX.js → use-hotkey-recorder-DHnuMF6T.js} +1 -1
- package/dist/assets/{use-invite-link-dialog-6IXyqacJ.js → use-invite-link-dialog-DNFvVMTr.js} +1 -1
- package/dist/assets/{use-plugins-list-CHpcMGs_.js → use-plugins-list-D0KJteNK.js} +1 -1
- package/dist/assets/{use-return-to-short-circuit-2kdbf5Q4.js → use-return-to-short-circuit-CFPNKSTK.js} +1 -1
- package/dist/assets/{use-side-list-room-BhFIS5Le.js → use-side-list-room-BEt4nE6h.js} +1 -1
- package/dist/assets/{use-skill-actions-Kdf5x1HU.js → use-skill-actions-C7qa2xLE.js} +1 -1
- package/dist/assets/{use-skill-detail-files-DAyyrFN5.js → use-skill-detail-files-_1GQxDTx.js} +1 -1
- package/dist/assets/use-supports-credentials-settings-ChozdHJ0.js +1 -0
- package/dist/assets/{use-transcript-message-by-id-D3l5WRCF.js → use-transcript-message-by-id-BaIMdiwS.js} +1 -1
- package/dist/assets/{voice-page-faAl_Nti.js → voice-page-BJ51XPpw.js} +1 -1
- package/dist/assets/{wake-detail-panel-WzSOhew8.js → wake-detail-panel-DkAaJeZE.js} +1 -1
- package/dist/assets/{weather-forecast-display-DIwophHB.js → weather-forecast-display-ty6o7LuP.js} +1 -1
- package/dist/assets/{welcome-screen-DCDAeMA9.js → welcome-screen-B9BqQr5N.js} +1 -1
- package/dist/assets/{workflow-detail-panel-CtBcOGfQ.js → workflow-detail-panel--kczknYa.js} +1 -1
- package/dist/assets/{workspace-page-DBInjaOS.js → workspace-page-G1xUhgr7.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/add-credits-modal-DNsSoNjD.js +0 -1
- package/dist/assets/auth-store-EAev0DJN.js +0 -1
- package/dist/assets/avatar-bundled-components-DhB1DyLm.js +0 -1
- package/dist/assets/checkout-return-target-CI8LVYVE.js +0 -1
- package/dist/assets/command-palette-Cmcx1U8W.js +0 -1
- package/dist/assets/common-B1Nsu-f_.js +0 -1
- package/dist/assets/common-BOcNovqr.js +0 -1
- package/dist/assets/common-B_WI9sIg.js +0 -1
- package/dist/assets/deploy-dialogs-DCxRLpl7.js +0 -1
- package/dist/assets/detail-primitives-f9ovBHes.js +0 -1
- package/dist/assets/document-load-D5E61ZgQ.js +0 -1
- package/dist/assets/intelligence-layout-slots-store-Cg1S2hhY.js +0 -1
- package/dist/assets/local-mode-C2LpbCQF.js +0 -1
- package/dist/assets/native-attachment-pickers-CenfaGLR.js +0 -1
- package/dist/assets/native-file-L8dxZeiL.js +0 -1
- package/dist/assets/paired-platform-identity-6K-FDEvo.js +0 -1
- package/dist/assets/password-reset-page-GkXM4m0d.js +0 -1
- package/dist/assets/plugins-surface-BKEqqJBL.js +0 -1
- package/dist/assets/referral-modal-C-PDjzho.js +0 -1
- package/dist/assets/routes-PhQIek7i.js +0 -1
- package/dist/assets/share-feedback-modal-yqSXIF2c.js +0 -1
- package/dist/assets/tool-detail-panel-DSA9JyHJ.js +0 -1
- package/dist/assets/use-supports-credentials-settings-CRzbQVNd.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{An as t,Bs as n,CS as r,Ex as i,J_ as a,Ls as o,NS as s,Ox as c,Pd as l,Tx as u,Uc as d,Z_ as f,aS as p,as as m,et as h,fx as g,iS as _,mS as v,om as y,sS as b,vs as x,zs as S}from"./app-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{An as t,Bs as n,CS as r,Ex as i,J_ as a,Ls as o,NS as s,Ox as c,Pd as l,Tx as u,Uc as d,Z_ as f,aS as p,as as m,et as h,fx as g,iS as _,mS as v,om as y,sS as b,vs as x,zs as S}from"./app-BBUxTj9g.js";import{I as C,Xn as w,Zn as T,er as E,j as D}from"./vendor-ajttH1pP.js";import{f as O,t as ee,x as k}from"./react-B9IgSVeK.js";import{$ as A,At as j,Cn as te,Et as ne,Ki as re,Ln as M,Lt as ie,Mn as N,Wi as P,Yn as F,gt as I,i as ae,n as L,qi as oe,t as se,vt as R}from"./icons-C0wyat6T.js";var z=e(k(),1),B={x:600,y:450},ce=`memory_tab_v1`,le=crypto.randomUUID();function V(e){typeof window>`u`||y()&&m([{type:`onboarding`,daemon_event_id:crypto.randomUUID(),recorded_at:Date.now(),screen:`memory`,session_id:le,step_name:e,funnel_version:ce}])}var H=Math.PI*(3-Math.sqrt(5)),U=7,W=2.4,G=34,ue=10;function K(e){return Math.min(G,U+W*Math.sqrt(e))}function de(e){return e===`concept`||e===`skill`||e===`capability`||e===`pending`?e:`other`}function q(e){return e===`link`||e===`learned`?e:`other`}function fe(e,t={}){let n=t.center??B,r=e.nodes,i=r.length;if(i===0)return{nodes:[],edges:[]};let a=new Map;r.forEach((e,t)=>a.set(e.id,t));let o=e.edges.filter(e=>e.source!==e.target&&a.has(e.source)&&a.has(e.target)),s=Array(i).fill(0),c=[];for(let e of o){let t=a.get(e.source),n=a.get(e.target);s[t]++,s[n]++,c.push([t,n])}let l=r.map((e,t)=>K(s[t])),u=70+26*Math.sqrt(i),d=r.map((e,t)=>{let r=(t+.5)/i,a=Math.acos(1-2*r),o=t*H,s=u*Math.cbrt(r),c=Math.sin(a);return{x:n.x+s*c*Math.cos(o),y:n.y+s*c*Math.sin(o),z:s*Math.cos(a),vx:0,vy:0,vz:0}}),f=t.iterations??Math.max(90,Math.min(340,Math.round(46e3/i))),p=.011,m=.82,h=.5,g=1,_=1-.001**(1/f);for(let e=0;e<f;e++){for(let e=0;e<i;e++){let t=d[e];for(let n=e+1;n<i;n++){let r=d[n],i=t.x-r.x,a=t.y-r.y,o=t.z-r.z,s=i*i+a*a+o*o;s<.01&&(i=(e-n)*.1+.1,a=.1,o=.05,s=i*i+a*a+o*o);let c=Math.sqrt(s),l=6400/s,u=i/c*l,f=a/c*l,p=o/c*l;t.vx+=u,t.vy+=f,t.vz+=p,r.vx-=u,r.vy-=f,r.vz-=p}}for(let[e,t]of c){let n=d[e],r=d[t],i=r.x-n.x,a=r.y-n.y,o=r.z-n.z,s=Math.sqrt(i*i+a*a+o*o)||.01,c=.05*(s-140),l=i/s*c,u=a/s*c,f=o/s*c;n.vx+=l,n.vy+=u,n.vz+=f,r.vx-=l,r.vy-=u,r.vz-=f}for(let e=0;e<i;e++){let t=d[e];t.vx+=(n.x-t.x)*p,t.vy+=(n.y-t.y)*p,t.vz+=(0-t.z)*p,t.x+=t.vx*g*h,t.y+=t.vy*g*h,t.z+=t.vz*g*h,t.vx*=m,t.vy*=m,t.vz*=m}g*=1-_}for(let e=0;e<10;e++){let e=!1;for(let t=0;t<i;t++){let n=d[t];for(let r=t+1;r<i;r++){let i=d[r],a=i.x-n.x,o=i.y-n.y,s=i.z-n.z,c=Math.sqrt(a*a+o*o+s*s),u=l[t]+l[r]+ue;if(c>=u)continue;c<.01&&(a=(r-t)*.1+.1,o=.1,s=.05,c=Math.sqrt(a*a+o*o+s*s));let f=(u-c)/2,p=a/c*f,m=o/c*f,h=s/c*f;n.x-=p,n.y-=m,n.z-=h,i.x+=p,i.y+=m,i.z+=h,e=!0}}if(!e)break}return{nodes:r.map((e,t)=>{let n={id:e.id,x:d[t].x,y:d[t].y,z:d[t].z,radius:l[t],label:e.label,kind:de(e.kind),degree:s[t]};return e.summary&&(n.summary=e.summary),e.updatedAtMs!==void 0&&(n.updatedAtMs=e.updatedAtMs),n}),edges:o.map((e,t)=>{let n={id:`${e.source}__${e.target}__${t}`,fromId:e.source,toId:e.target,kind:q(e.kind),directed:e.directed??!1};return e.description&&(n.description=e.description),n})}}var J=ee();function pe({title:e,detail:t,action:n}){return(0,J.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-2 px-6 text-center`,children:[(0,J.jsx)(`p`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e}),t?(0,J.jsx)(`p`,{className:`max-w-sm text-body-small-default`,style:{color:`var(--content-tertiary)`},children:t}):null,n?(0,J.jsx)(`div`,{className:`mt-2`,children:n}):null]})}function me(){return C(`getMemoryGraphNode.failureMessage`,{ns:`intelligence`})}function he(e,t){return w({queryKey:[`memory-graph-node`,e,t],enabled:!!(e&&t),queryFn:async()=>{let{data:n,error:r,response:a}=await f({path:{assistant_id:e},query:{id:t??``},throwOnError:!1});if(i(a,r,me()),!a.ok)throw new u(a.status,c(r,a,me()));return n??{found:!1}}})}var ge={concept:`#467CC8`,skill:`#DB4B77`,capability:`#0E9B8B`,pending:`#F1B21E`,other:`#8D99A5`},_e=[`#467CC8`,`#E86B40`,`#7A5AF5`,`#22B8CF`,`#3DB85E`,`#E9C91A`,`#E83F5B`,`#6ECF87`,`#F39B74`,`#F5C94E`],Y={concept:`conceptGraphConstants.nodeKind.concept`,skill:`conceptGraphConstants.nodeKind.skill`,capability:`conceptGraphConstants.nodeKind.capability`,pending:`conceptGraphConstants.nodeKind.pending`,other:`conceptGraphConstants.nodeKind.other`};function ve(e){return C(Y[e],{ns:`intelligence`})}var ye=`#F1B21E`;function be(e){if(e.length<=4)return e.map((e,t)=>({node:e,index:t}));let t=e.slice(-3).map((t,n)=>({node:t,index:e.length-3+n}));return[{node:e[0],index:0},`ellipsis`,...t]}function xe(e){return e?new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`}):null}var X=600;function Se(e){let t=e.slice(0,X),n=t.lastIndexOf(`
|
|
2
2
|
`);return n>X/2?e.slice(0,n):t}function Ce({content:e}){let[n,r]=(0,z.useState)(!1),{t:i}=D(`intelligence`);return e.length<=X?(0,J.jsx)(t,{content:e}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(t,{content:n?e:Se(e)}),(0,J.jsx)(s,{variant:`ghost`,size:`compact`,className:`-ml-2 mt-1`,onClick:()=>r(e=>!e),rightIcon:n?(0,J.jsx)(P,{size:16,"aria-hidden":!0}):(0,J.jsx)(oe,{size:16,"aria-hidden":!0}),children:i(n?`conceptDetailPanel.showLess`:`conceptDetailPanel.readFullNote`)})]})}function we({assistantId:e,node:t,trail:n,neighbors:r,onTravel:i,onCrumb:a,onClose:o,onOpenThread:c}){let{t:l}=D(`intelligence`),u=T(he(e,t.id)),d=u.data,f=xe(t.updatedAtMs),p=d?.title??t.label,m=be(n);return(0,z.useEffect)(()=>{let e=e=>{e.key===`Escape`&&!e.defaultPrevented&&(e.preventDefault(),o())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o]),(0,J.jsxs)(`div`,{"data-graph-panel":!0,className:`absolute inset-0 z-20 flex justify-end`,onPointerDown:e=>e.stopPropagation(),onPointerMove:e=>e.stopPropagation(),onPointerUp:e=>e.stopPropagation(),children:[(0,J.jsx)(`div`,{className:`absolute inset-0`,style:{backgroundColor:`color-mix(in srgb, var(--surface-base) 16%, transparent)`},onClick:o}),(0,J.jsxs)(`aside`,{className:`relative flex h-full min-h-0 w-full max-w-md flex-col overflow-hidden`,style:{backgroundColor:`var(--surface-lift)`,borderLeft:`1px solid var(--border-base)`},children:[n.length>1?(0,J.jsxs)(`nav`,{"aria-label":l(`conceptDetailPanel.trailAriaLabel`),className:`flex shrink-0 items-center gap-1 overflow-hidden border-b px-5 py-2 text-body-small-default`,style:{borderColor:`var(--border-base)`,color:`var(--content-tertiary)`},children:[(0,J.jsx)(`button`,{type:`button`,onClick:()=>a(n.length-2),"aria-label":l(`conceptDetailPanel.backAriaLabel`),className:`-ml-1 mr-0.5 flex shrink-0 items-center rounded p-0.5 hover:bg-[color-mix(in_srgb,var(--content-tertiary)_14%,transparent)]`,style:{color:`var(--content-tertiary)`},children:(0,J.jsx)(re,{size:16,"aria-hidden":!0})}),m.map((e,t)=>(0,J.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,children:[t>0?(0,J.jsx)(`span`,{"aria-hidden":!0,children:`›`}):null,e===`ellipsis`?(0,J.jsx)(`span`,{"aria-hidden":!0,children:`…`}):e.index===n.length-1?(0,J.jsx)(`span`,{"aria-current":`page`,className:`max-w-[9rem] truncate`,style:{color:`var(--content-default)`},children:e.node.label}):(0,J.jsx)(`button`,{type:`button`,onClick:()=>a(e.index),className:`max-w-[8rem] truncate rounded hover:underline`,style:{color:`var(--content-tertiary)`},children:e.node.label})]},e===`ellipsis`?`ellipsis`:e.index))]}):null,(0,J.jsxs)(`header`,{className:`flex shrink-0 items-start justify-between gap-3 border-b px-5 py-4`,style:{borderColor:`var(--border-base)`},children:[(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsx)(`h2`,{className:`truncate text-title-small`,style:{color:`var(--content-default)`},title:d?.title??t.label,children:d?.title??t.label}),f?(0,J.jsx)(`p`,{className:`mt-0.5 text-body-small-default`,style:{color:`var(--content-tertiary)`},children:l(`conceptDetailPanel.updated`,{date:f})}):null]}),(0,J.jsx)(s,{variant:`ghost`,iconOnly:(0,J.jsx)(ae,{"aria-hidden":!0}),onClick:o,"aria-label":l(`conceptDetailPanel.closeAriaLabel`),tintColor:`var(--content-tertiary)`})]}),(0,J.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4`,style:{touchAction:`pan-y`},children:[u.isLoading?(0,J.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,J.jsx)(`div`,{className:`h-5 w-5 animate-spin rounded-full border-2`,style:{borderColor:`var(--border-base)`,borderTopColor:`var(--content-tertiary)`}})}):u.isError?(0,J.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:l(`conceptDetailPanel.loadError`)}):d?.found&&d.content?.trim()?(0,J.jsx)(Ce,{content:d.content},t.id):(0,J.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:l(`conceptDetailPanel.emptyContent`)}),r.length>0?(0,J.jsxs)(`section`,{className:`mt-6 border-t pt-4`,style:{borderColor:`var(--border-base)`},children:[(0,J.jsxs)(`div`,{className:`mb-2 flex items-baseline justify-between gap-2`,children:[(0,J.jsx)(`h3`,{className:`text-body-small-default uppercase tracking-wide`,style:{color:`var(--content-tertiary)`},children:l(`conceptDetailPanel.wiredTo`)}),(0,J.jsx)(`span`,{className:`text-body-small-default tabular-nums`,style:{color:`var(--content-tertiary)`},children:l(`conceptDetailPanel.connectionCount`,{count:r.length})})]}),(0,J.jsx)(`ul`,{className:`flex list-none flex-col gap-0.5`,children:r.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(`button`,{type:`button`,onClick:()=>i({id:e.id,label:e.label}),className:`flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-body-medium-default hover:bg-[color-mix(in_srgb,var(--content-tertiary)_12%,transparent)]`,style:{color:`var(--content-default)`},children:[(0,J.jsx)(`span`,{"aria-hidden":!0,className:`h-1.5 w-1.5 shrink-0 rounded-full`,style:{backgroundColor:e.kind===`learned`?ye:`var(--content-tertiary)`}}),(0,J.jsx)(`span`,{className:`truncate`,children:e.label})]})},e.id))})]}):null]}),c?(0,J.jsxs)(`footer`,{className:`flex shrink-0 gap-2 border-t px-5 py-3`,style:{borderColor:`var(--border-base)`},children:[(0,J.jsx)(s,{variant:`outlined`,size:`regular`,className:`flex-1`,leftIcon:(0,J.jsx)(N,{size:16,"aria-hidden":!0}),onClick:()=>c(l(`conceptDetailPanel.askPrompt`,{title:p})),children:l(`conceptDetailPanel.askAboutThis`)}),(0,J.jsx)(s,{variant:`primary`,size:`regular`,className:`flex-1`,leftIcon:(0,J.jsx)(A,{size:16,"aria-hidden":!0}),onClick:()=>c(l(`conceptDetailPanel.refinePrompt`,{title:p})),children:l(`conceptDetailPanel.refine`)})]}):null]})]})}function Te({onDismiss:e}){let{t}=D(`intelligence`);return(0,J.jsxs)(`div`,{"data-graph-control":!0,className:`pointer-events-auto absolute left-1/2 top-4 z-10 flex w-[min(30rem,calc(100%-6rem))] -translate-x-1/2 items-start gap-3 rounded-xl px-4 py-3`,style:{backgroundColor:`var(--surface-lift)`,border:`1px solid var(--border-base)`,boxShadow:`0 4px 12px rgba(0, 0, 0, 0.25)`},children:[(0,J.jsx)(`span`,{className:`mt-0.5 shrink-0`,style:{color:`var(--primary-base)`},"aria-hidden":!0,children:(0,J.jsx)(A,{size:18})}),(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`p`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:t(`conceptGraphIntroBanner.title`)}),(0,J.jsx)(`p`,{className:`mt-0.5 text-body-small-lighter`,style:{color:`var(--content-tertiary)`},children:t(`conceptGraphIntroBanner.description`)})]}),(0,J.jsx)(s,{variant:`ghost`,iconOnly:(0,J.jsx)(ae,{"aria-hidden":!0}),onClick:e,"aria-label":t(`conceptGraphIntroBanner.dismissAriaLabel`),tintColor:`var(--content-tertiary)`})]})}var Ee=8;function De({nodeKinds:e,coloredByTheme:t,themes:n,hasLinks:r,hasLearned:i,onToggleLink:a,onToggleLearned:o,linkActive:s,learnedActive:c}){let{t:l}=D(`intelligence`);return(0,J.jsxs)(`div`,{"data-graph-control":!0,className:`pointer-events-none absolute bottom-4 left-4 flex flex-col gap-1.5 rounded-lg px-3 py-2`,style:{backgroundColor:`color-mix(in srgb, var(--surface-base) 78%, transparent)`,border:`1px solid var(--border-base)`},children:[e.map(e=>(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 rounded-full`,style:{backgroundColor:ge[e]}}),(0,J.jsx)(`span`,{className:`text-[11px]`,style:{color:`var(--content-tertiary)`},children:ve(e)})]},e)),t&&(n&&n.length>0?(0,J.jsxs)(J.Fragment,{children:[n.slice(0,Ee).map((e,t)=>(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 shrink-0 rounded-full`,style:{backgroundColor:e.color}}),(0,J.jsx)(`span`,{className:`max-w-[9rem] truncate text-[11px]`,style:{color:`var(--content-tertiary)`},title:e.concepts?.join(` · `)??e.name,children:e.name})]},t)),n.length>Ee&&(0,J.jsx)(`span`,{className:`text-[11px]`,style:{color:`var(--content-tertiary)`},children:l(`conceptGraphLegend.moreThemes`,{count:n.length-Ee})})]}):(0,J.jsx)(`span`,{className:`text-[11px]`,style:{color:`var(--content-tertiary)`},children:l(`conceptGraphLegend.coloredByTheme`)})),(e.length>0||t)&&(r||i)&&(0,J.jsx)(`div`,{className:`mt-0.5 border-t pt-1.5`,style:{borderColor:`var(--border-base)`}}),r&&(0,J.jsx)(Oe,{swatchStyle:{borderTop:`2px solid var(--content-tertiary)`},label:l(`conceptGraphLegend.link`),onToggle:a,active:s}),i&&(0,J.jsx)(Oe,{swatchStyle:{borderTop:`2px dashed #F1B21E`},label:l(`conceptGraphLegend.learned`),onToggle:o,active:c})]})}function Oe({swatchStyle:e,label:t,onToggle:n,active:r}){let i=(0,J.jsx)(`span`,{className:`inline-block h-0 w-4`,style:e}),a=(0,J.jsx)(`span`,{className:`text-[11px]`,style:{color:`var(--content-tertiary)`},children:t});return n?(0,J.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":r,className:`pointer-events-auto flex cursor-pointer items-center gap-2 border-0 bg-transparent p-0 transition-opacity`,style:{opacity:r===!1?.4:1},children:[i,a]}):(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i,a]})}var Z=8;function ke(e,t){let n=e.length;if(n===0)return new Map;let r=new Map;e.forEach((e,t)=>r.set(e.id,t));let i=e.map(()=>[]);for(let e of t){let t=r.get(e.fromId),n=r.get(e.toId);t===void 0||n===void 0||t===n||(i[t].push(n),i[n].push(t))}let a=e.map((e,t)=>t);for(let e=0;e<Z;e++)for(let e=0;e<n;e++){let t=i[e];if(t.length===0)continue;let n=new Map;for(let e of t)n.set(a[e],(n.get(a[e])??0)+1);let r=a[e],o=-1;for(let[e,t]of n)(t>o||t===o&&e<r)&&(r=e,o=t);a[e]=r}let o=new Map,s=new Map;return e.forEach((e,t)=>{let n=a[t],r=o.get(n);r===void 0&&(r=o.size,o.set(n,r)),s.set(e.id,r)}),s}function Q(){return C(`memoryUnavailable.prompts.v2`,{ns:`intelligence`})}function Ae(){return C(`memoryUnavailable.prompts.v1`,{ns:`intelligence`})}function je(){return C(`memoryUnavailable.prompts.enable`,{ns:`intelligence`})}function Me(){return{title:C(`memoryUnavailable.statusError.title`,{ns:`intelligence`}),detail:C(`memoryUnavailable.statusError.detail`,{ns:`intelligence`}),action:`retry`}}function Ne(e){return e===`off`?{title:C(`memoryUnavailable.off.title`,{ns:`intelligence`}),detail:C(`memoryUnavailable.off.detail`,{ns:`intelligence`}),action:`settings`,prompt:je()}:e===`v1`||e===`v2`?{title:C(`memoryUnavailable.legacy.title`,{ns:`intelligence`}),detail:C(`memoryUnavailable.legacy.detail`,{ns:`intelligence`}),action:`upgrade`,prompt:e===`v1`?Ae():Q()}:{title:C(`memoryUnavailable.unknown.title`,{ns:`intelligence`}),detail:C(`memoryUnavailable.unknown.detail`,{ns:`intelligence`}),action:`none`}}function Pe({assistantId:e,onOpenThread:t}){let{t:n}=D(`intelligence`),r=O(),i=E(),a=T(S(e));(0,z.useEffect)(()=>{o(i,e)},[i,e]);let c=x(`memoryOptOut`),u=l.use.settingsDeveloperNav(),d=c&&u===!0;if(a.isLoading)return null;let f=a.data?.kind===`ready`?a.data.tier:void 0,p=a.isError?Me():Ne(f),m=p.prompt,h=null;return p.action===`upgrade`&&t&&m?h=(0,J.jsx)(s,{variant:`primary`,size:`compact`,leftIcon:(0,J.jsx)(A,{}),onClick:()=>{V(`upgrade_v3_clicked`),t(m)},children:n(`memoryUpgradePrompt.upgradeMemory`)}):p.action===`retry`?h=(0,J.jsx)(s,{variant:`outlined`,size:`compact`,leftIcon:(0,J.jsx)(j,{}),onClick:()=>{a.refetch()},children:n(`memoryUpgradePrompt.tryAgain`)}):p.action===`settings`&&d?h=(0,J.jsx)(s,{variant:`outlined`,size:`compact`,leftIcon:(0,J.jsx)(I,{}),onClick:()=>r(`${g.settings.developer}?tab=memory`),children:n(`memoryUpgradePrompt.memorySettings`)}):p.action===`settings`&&t&&m&&(h=(0,J.jsx)(s,{variant:`primary`,size:`compact`,leftIcon:(0,J.jsx)(A,{}),onClick:()=>{V(`enable_memory_clicked`),t(m)},children:n(`memoryUpgradePrompt.turnMemoryOn`)})),(0,J.jsx)(pe,{title:p.title,detail:p.detail,action:h})}function Fe({value:e,onChange:t}){let{t:n}=D(`intelligence`),r=[{value:`all`,label:n(`recencyLens.all`)},{value:`month`,label:n(`recencyLens.month`)},{value:`week`,label:n(`recencyLens.week`)}];return(0,J.jsx)(b,{ariaLabel:n(`recencyLens.ariaLabel`),items:r,value:e,onChange:t,className:`!w-auto [&>*]:!flex-none`})}var Ie=`vellum:memoryGraph:introDismissed:`;function Le(e){return`${Ie}${e}`}function $(e){if(!e)return!0;try{return window.localStorage.getItem(Le(e))===`1`}catch{return!0}}function Re(e){let[t,n]=(0,z.useState)(()=>$(e));return(0,z.useEffect)(()=>{n($(e))},[e]),[t,(0,z.useCallback)(()=>{n(!0);try{window.localStorage.setItem(Le(e),`1`)}catch{}},[e])]}var ze=[`concept`,`skill`,`capability`,`pending`,`other`],Be=.13,Ve=2600,He=.006,Ue=1.15,We=3,Ge=.32,Ke=.45,qe=3,Je=4,Ye=1440*60*1e3,Xe=14*Ye,Ze=12,Qe=2*Ye,$e=80,et=340,tt=.12,nt=.05,rt=.03,it=12,at=2600;function ot(e){let t=getComputedStyle(e);return{content:t.getPropertyValue(`--content-default`).trim()||`#e5e7eb`,tertiary:t.getPropertyValue(`--content-tertiary`).trim()||`#8792a0`}}function st(e){return e.kind===`learned`?`Learned association`:e.description??`Linked concepts`}function ct(e,t,n){return t==null?!1:e==null||n-e>t}function lt(e,t){let n=t?e.get(t):void 0;return e=>t!=null&&(e===t||(n?.has(e)??!1))}function ut({assistantId:e,className:t,isFullscreen:r,onToggleFullscreen:i,onOpenThread:a,headerAction:o,handleRef:c}){let{t:l}=D(`intelligence`),u=(0,z.useRef)(null),d=(0,z.useRef)(null),f=T(n(e)),p=f.data?.kind===`ready`?f.data.graph:null,m=(0,z.useMemo)(()=>p?fe(p):{nodes:[],edges:[]},[p]),h=f.data?.kind===`ready`&&m.nodes.length>0,g=(0,z.useMemo)(()=>ke(m.nodes,m.edges),[m.nodes,m.edges]),_=(0,z.useMemo)(()=>{let e=new Map;for(let t of m.nodes){let n=g.get(t.id);if(n==null||t.degree===0)continue;let r=e.get(n);r?r.push(t):e.set(n,[t])}return[...e.entries()].map(([e,t])=>{let n=[...t].sort((e,t)=>t.degree-e.degree||(e.id<t.id?-1:1)).slice(0,3);return{hubId:n[0].id,color:_e[e%_e.length],name:n[0].label,concepts:n.map(e=>e.label),size:t.length}}).sort((e,t)=>t.size-e.size)},[g,m.nodes]),v=(0,z.useMemo)(()=>new Set(_.map(e=>e.hubId)),[_]),y=(0,z.useMemo)(()=>{let e=new Map,t=(t,n)=>{let r=e.get(t);r||(r=new Set,e.set(t,r)),r.add(n)};for(let e of m.edges)t(e.fromId,e.toId),t(e.toId,e.fromId);return e},[m.edges]),b=(0,z.useMemo)(()=>{if(m.nodes.length===0)return 1;let e=m.nodes.map(e=>{let t=e.x-B.x,n=e.y-B.y;return Math.sqrt(t*t+n*n+e.z*e.z)+e.radius}).sort((e,t)=>e-t),t=Math.min(e.length-1,Math.floor(e.length*.92));return Math.max(1,e[t])},[m.nodes]),x=(0,z.useRef)({yaw:.5,pitch:.32,zoom:1,hoveredId:null,dragging:!1,moved:!1,lastX:0,lastY:0,lastInteractAt:-1/0,dirty:!0}),S=(0,z.useRef)([]),C=(0,z.useRef)([]),w=(0,z.useRef)({content:`#e5e7eb`,tertiary:`#8792a0`}),E=(0,z.useRef)(null),O=(0,z.useRef)(!1),ee=(0,z.useRef)(null),k=(0,z.useRef)(null),[A,j]=(0,z.useState)(null),[re,ie]=(0,z.useState)(null),[N,P]=(0,z.useState)([]),F=N.at(-1)??null,I=(0,z.useCallback)(e=>{V(`node_opened`),P(t=>[...t,e])},[]),oe=(0,z.useRef)(null);(0,z.useEffect)(()=>{oe.current=F?.id??null,x.current.dirty=!0},[F?.id]);let[ce,le]=Re(e),[H,U]=(0,z.useState)(``),[W,G]=(0,z.useState)(!1),ue=(0,z.useRef)(null);(0,z.useEffect)(()=>{W&&ue.current?.focus()},[W]);let K=(0,z.useRef)(!1),de=H.trim().toLowerCase(),q=(0,z.useMemo)(()=>{if(!de)return null;let e=new Set;for(let t of m.nodes)t.label.toLowerCase().includes(de)&&e.add(t.id);return e},[de,m.nodes]),me=(0,z.useRef)({active:!1,matches:null});(0,z.useEffect)(()=>{me.current={active:!!q,matches:q},x.current.dirty=!0},[q]),(0,z.useEffect)(()=>{H.trim()||(K.current=!1)},[H]);let he=(0,z.useMemo)(()=>!q||q.size===0?[]:m.nodes.filter(e=>q.has(e.id)).sort((e,t)=>t.degree-e.degree).slice(0,8),[q,m.nodes]),[Y,ve]=(0,z.useState)(`all`),be=(0,z.useRef)(null);(0,z.useEffect)(()=>{be.current=Y===`week`?7*Ye:Y===`month`?30*Ye:null,x.current.dirty=!0},[Y]);let xe=(0,z.useMemo)(()=>m.nodes.some(e=>e.updatedAtMs!=null),[m.nodes]);(0,z.useEffect)(()=>{!xe&&Y!==`all`&&ve(`all`)},[xe,Y]);let[X,Se]=(0,z.useState)({link:!0,learned:!0}),Ce=(0,z.useRef)(X);(0,z.useEffect)(()=>{Ce.current=X,x.current.dirty=!0},[X]),(0,z.useEffect)(()=>{U(``),ve(`all`),Se({link:!0,learned:!0}),P([]),K.current=!1},[e]);let Ee=(0,z.useCallback)(()=>{let e=x.current;e.yaw=.5,e.pitch=.32,e.zoom=1,e.lastInteractAt=-1/0,e.dirty=!0,j(null)},[]),Oe=(0,z.useCallback)(e=>{let t=x.current;t.zoom=Math.max(Ke,Math.min(qe,t.zoom*e)),t.lastInteractAt=performance.now(),t.dirty=!0},[]),Z=(0,z.useCallback)(e=>{E.current=e,x.current.lastInteractAt=performance.now(),x.current.dirty=!0},[]),Q=(0,z.useCallback)(e=>{I(e),Z(e.id)},[I,Z]),Ae=(0,z.useCallback)(e=>{ee.current={id:e,start:performance.now()},Z(e),window.setTimeout(()=>{x.current.dirty=!0},at+60)},[Z]),je=(0,z.useCallback)(e=>{m.nodes.some(t=>t.id===e)?Ae(e):k.current=e},[m.nodes,Ae]);(0,z.useEffect)(()=>{let e=k.current;e&&m.nodes.some(t=>t.id===e)&&(k.current=null,Ae(e))},[m.nodes,Ae]),(0,z.useImperativeHandle)(c,()=>({focusNode:je}),[je]);let Me=(0,z.useCallback)(()=>{P([]),U(``),j(null),E.current=null,O.current=!0},[]),Ne=(0,z.useCallback)(e=>{U(``);let t=N.slice(0,e+1);P(t);let n=t.at(-1);n?Z(n.id):j(null)},[N,Z]),Ie=(0,z.useCallback)(e=>{U(``),Q(e)},[Q]),Le=(0,z.useMemo)(()=>{let e=F?.id;if(!e)return[];let t=y.get(e);if(!t||t.size===0)return[];let n=new Map(m.nodes.map(e=>[e.id,e.label])),r=new Map;for(let t of m.edges)t.fromId===e?r.set(t.toId,t.kind):t.toId===e&&r.set(t.fromId,t.kind);let i=[];for(let e of t){let t=n.get(e);t!=null&&i.push({id:e,label:t,kind:r.get(e)})}return i.sort((e,t)=>e.label.localeCompare(t.label)),i},[F?.id,y,m.nodes,m.edges]);(0,z.useEffect)(()=>{if(!h)return;let e=d.current,t=u.current;if(!e||!t)return;let n=e.getContext(`2d`);if(!n)return;let r=m.nodes,i=m.edges,a=g,o=v,s=y,c=new Set(r.map(e=>e.id)),l=b,f=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;w.current=ot(t);let p=Math.min(window.devicePixelRatio||1,2),_=0,T=0,D=()=>{let n=t.getBoundingClientRect();_=n.width,T=n.height,p=Math.min(window.devicePixelRatio||1,2),e.width=Math.max(1,Math.round(_*p)),e.height=Math.max(1,Math.round(T*p)),e.style.width=`${_}px`,e.style.height=`${T}px`,w.current=ot(t),x.current.dirty=!0};D();let k=new ResizeObserver(D);k.observe(t);let A=new MutationObserver(()=>{w.current=ot(t),x.current.dirty=!0});A.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`,`class`,`style`]});let j=0,te=0,ne=e=>{let t=te?Math.min(.05,(e-te)/1e3):0;te=e;let u=x.current,d=w.current,m=Date.now(),h=E.current;if(!u.dragging&&e-u.lastInteractAt>Ve&&!f&&!h&&(u.yaw+=Be*t),h){let e=r.find(e=>e.id===h);if(!e)E.current=null;else{let t=e.x-B.x,n=e.y-B.y,r=e.z,i=-Math.atan2(t,r),a=Math.hypot(t,r),o=Math.max(-Ue,Math.min(Ue,Math.atan2(n,a))),s=Math.min(qe,1.6),c=f?1:.15,l=i-u.yaw;l=Math.atan2(Math.sin(l),Math.cos(l)),u.yaw+=l*c,u.pitch+=(o-u.pitch)*c,u.zoom+=(s-u.zoom)*c,u.dirty=!0,Math.abs(l)<.01&&Math.abs(o-u.pitch)<.01&&Math.abs(s-u.zoom)<.02&&(E.current=null)}}if(O.current&&!u.dragging){let e=f?1:.15;u.pitch+=(.32-u.pitch)*e,u.zoom+=(1-u.zoom)*e,u.dirty=!0,Math.abs(.32-u.pitch)<.01&&Math.abs(1-u.zoom)<.02&&(O.current=!1)}if(f&&!u.dirty){j=requestAnimationFrame(ne);return}u.dirty=!1;let g=Math.cos(u.yaw),v=Math.sin(u.yaw),y=Math.cos(u.pitch),b=Math.sin(u.pitch),D=We*l,k=Math.min(_,T)*.88/(2*l)*u.zoom,A=_/2,re=T/2;n.setTransform(p,0,0,p,0,0),n.clearRect(0,0,_,T);let M=u.hoveredId,ie=M?s.get(M):void 0,N=e=>!M||e===M||(ie?.has(e)??!1),P=me.current,F=P.active,I=e=>!F||(P.matches?.has(e)??!1),ae=be.current,L=e=>ct(e.updatedAtMs,ae,m),se=Ce.current,R=oe.current,z=R!=null&&c.has(R),ce=lt(s,z?R:null),le=r.length<=$e?1:Math.max(tt,1-(r.length-$e)/(et-$e)*(1-tt)),V=Array(r.length);for(let e=0;e<r.length;e++){let t=r[e],n=t.x-B.x,i=t.y-B.y,a=t.z,o=n*g+a*v,s=-n*v+a*g,c=i*y-s*b,u=i*b+s*y,d=D/(D-u);V[e]={node:t,sx:A+o*k*d,sy:re+c*k*d,sr:Math.max(1.2,t.radius*k*d),depth:Math.max(0,Math.min(1,(u+l)/(2*l)))}}let H=V.map((e,t)=>t).sort((e,t)=>V[e].depth-V[t].depth),U=new Map;for(let e of V)U.set(e.node.id,e);let W=[];n.lineCap=`round`;for(let e of i){let t=U.get(e.fromId),r=U.get(e.toId);if(!t||!r)continue;let i=e.kind===`learned`,a=R!=null&&(e.fromId===R||e.toId===R);if(!a&&(i?!se.learned:!se.link))continue;let o=F&&(!I(e.fromId)||!I(e.toId))||!a&&(L(t.node)||L(r.node)),s=M!=null&&(e.fromId===M||e.toId===M),c=(t.depth+r.depth)/2;!o&&(!z||a)&&W.push({ax:t.sx,ay:t.sy,bx:r.sx,by:r.sy,kind:e.kind,description:e.description,depth:c});let l=(i?.34:.28)*(.4+.6*c),u=i?l*le:l,f;f=o?.03:z?a?.9:rt:M==null?u:s?.9:N(e.fromId)&&N(e.toId)?l:.05,n.globalAlpha=f,n.strokeStyle=i?ye:d.tertiary,n.lineWidth=(s||z&&a?2:1)*(.6+.6*c),n.setLineDash(i?[4,4]:[]),n.beginPath(),n.moveTo(t.sx,t.sy),n.lineTo(r.sx,r.sy),n.stroke()}n.setLineDash([]);for(let t of H){let r=V[t],i=r.node,o=i.kind===`concept`?_e[(a.get(i.id)??0)%_e.length]:ge[i.kind],s=F&&!I(i.id),c=ce(i.id),l=s||L(i)&&!c,u=z?c&&!l:!l&&N(i.id),d=i.id===M,p=Ge+(1-Ge)*r.depth,h=z&&!c?p*nt:l?p*.08:u?p:p*.18,g=(d?16:i.degree>=Je?8:4)*r.depth,_=i.updatedAtMs;if(_){let n=m-_,i=Math.max(0,1-n/Xe);if(i>0){let a=i*Ze;!f&&n<Qe&&(a*=.55+.45*Math.sin(e/420+t*1.7)),g+=a*r.depth}}n.shadowColor=o,n.shadowBlur=u?g:0;let v=i.kind===`pending`;n.globalAlpha=h*(v?.3:.55),n.fillStyle=o,n.beginPath(),n.arc(r.sx,r.sy,r.sr,0,Math.PI*2),n.fill(),n.shadowBlur=0,n.globalAlpha=h,n.lineWidth=d?2.5:1.4,n.strokeStyle=o,n.setLineDash(v?[3,3]:[]),n.stroke(),n.setLineDash([]);let y=ee.current;if(y&&y.id===i.id){let t=e-y.start;if(t>at)ee.current=null;else if(f)n.globalAlpha=.7,n.lineWidth=1.5,n.beginPath(),n.arc(r.sx,r.sy,r.sr+7,0,Math.PI*2),n.stroke();else for(let e=0;e<3;e++){let i=(t-e*320)/1100;i<=0||i>=1||(n.globalAlpha=(1-i)*.8,n.lineWidth=1.5,n.beginPath(),n.arc(r.sx,r.sy,r.sr+i*46*r.depth,0,Math.PI*2),n.stroke())}}}n.shadowBlur=0,n.textAlign=`center`,n.textBaseline=`top`,n.font=`11px ui-sans-serif, system-ui, sans-serif`;for(let e of H){let t=V[e],r=t.node,i=ce(r.id);if(F&&!I(r.id)||L(r)&&!i||!(z?i:F?t.depth>.3:M==null?o.has(r.id)||r.degree>=Je&&t.depth>.55:N(r.id)))continue;n.globalAlpha=(r.id===M||r.id===R?1:.85)*(.4+.6*t.depth),n.fillStyle=d.content;let a=r.label.length>22?`${r.label.slice(0,21)}…`:r.label;n.fillText(a,t.sx,t.sy+t.sr+3)}n.globalAlpha=1,S.current=V.map(e=>({id:e.node.id,sx:e.sx,sy:e.sy,sr:e.sr,depth:e.depth,updatedAtMs:e.node.updatedAtMs})),C.current=W,j=requestAnimationFrame(ne)};return j=requestAnimationFrame(ne),()=>{cancelAnimationFrame(j),k.disconnect(),A.disconnect()}},[h,m,y,b,g,v]);let $=(0,z.useCallback)((e,t)=>{let n=me.current,r=be.current,i=lt(y,oe.current),a=Date.now(),o=null,s=-1;for(let c of S.current){if(n.active&&!(n.matches?.has(c.id)??!1)||!i(c.id)&&ct(c.updatedAtMs,r,a))continue;let l=e-c.sx,u=t-c.sy;l*l+u*u<=(c.sr+5)*(c.sr+5)&&c.depth>s&&(o=c.id,s=c.depth)}return o},[y]),ut=(0,z.useCallback)((e,t)=>{let n=null,r=1/0,i=-1;for(let a of C.current){let o=a.bx-a.ax,s=a.by-a.ay,c=o*o+s*s,l=0;c>0&&(l=((e-a.ax)*o+(t-a.ay)*s)/c,l=Math.max(0,Math.min(1,l)));let u=e-(a.ax+l*o),d=t-(a.ay+l*s),f=Math.sqrt(u*u+d*d);f>5||(f<r||f===r&&a.depth>i)&&(n={kind:a.kind,description:a.description},r=f,i=a.depth)}return n},[]),dt=e=>{let t=u.current.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},ft=(0,z.useCallback)(e=>{if(e.button!==0||e.target.closest(`[data-graph-control]`))return;let t=x.current;E.current=null,t.dragging=!0,t.moved=!1,t.lastX=e.clientX,t.lastY=e.clientY,t.lastInteractAt=performance.now(),e.currentTarget.setPointerCapture(e.pointerId)},[]),pt=(0,z.useCallback)(e=>{let t=x.current;if(t.dragging){let n=e.clientX-t.lastX,r=e.clientY-t.lastY;(Math.abs(n)>2||Math.abs(r)>2)&&(t.moved=!0),t.yaw+=n*He,t.pitch=Math.max(-Ue,Math.min(Ue,t.pitch+r*He)),t.lastX=e.clientX,t.lastY=e.clientY,t.lastInteractAt=performance.now(),t.dirty=!0;return}let{x:n,y:r}=dt(e),i=$(n,r);if(i!==t.hoveredId&&(t.hoveredId=i,t.dirty=!0),i)ie(null);else{let e=ut(n,r);ie(e?st(e):null)}},[$,ut]),mt=(0,z.useCallback)(e=>{let t=x.current;if(!t.dragging)return;t.dragging=!1,t.lastInteractAt=performance.now(),t.dirty=!0;let n=e.currentTarget;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),!t.moved){let{x:t,y:n}=dt(e),r=$(t,n);if(r){let e=m.nodes.find(e=>e.id===r);e&&Q({id:e.id,label:e.label,updatedAtMs:e.updatedAtMs})}else j(null)}},[$,m.nodes,Q]),ht=(0,z.useCallback)(()=>{let e=x.current;ie(null),!(e.dragging||e.hoveredId==null)&&(e.hoveredId=null,e.dirty=!0,j(null))},[]);(0,z.useEffect)(()=>{let e=u.current;if(!e||!h)return;let t=e=>{if(e.target.closest?.(`[data-graph-panel]`))return;e.preventDefault();let t=x.current;t.zoom=Math.max(Ke,Math.min(qe,t.zoom*(1-e.deltaY/500))),t.lastInteractAt=performance.now(),t.dirty=!0};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[h]);let gt=(0,z.useMemo)(()=>{let e=new Set(m.nodes.map(e=>e.kind));return ze.filter(t=>e.has(t))},[m.nodes]),_t=(0,z.useMemo)(()=>m.edges.some(e=>e.kind===`learned`),[m.edges]),vt=(0,z.useMemo)(()=>m.edges.some(e=>e.kind!==`learned`),[m.edges]);(0,z.useEffect)(()=>{!(vt&&_t)&&(!X.link||!X.learned)&&Se({link:!0,learned:!0})},[vt,_t,X]);let yt=f.data?.kind===`ready`&&!ce,bt=m.nodes.length,xt=m.edges.length,St=new Set(g.values()).size,Ct=(e,t)=>`${e} ${t}${e===1?``:`s`}`,wt=yt?null:A??re,Tt=h&&(m.nodes.length>it||!!H),Et=!!(i||o)||h,Dt;return Dt=f.isLoading?(0,J.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,J.jsx)(`div`,{className:`h-6 w-6 animate-spin rounded-full border-2`,style:{borderColor:`var(--border-base)`,borderTopColor:`var(--content-tertiary)`}})}):f.isError?(0,J.jsx)(pe,{title:l(`conceptGraphView.loadErrorTitle`),detail:l(`conceptGraphView.loadErrorDetail`)}):f.data?.kind===`unsupported`?(0,J.jsx)(Pe,{assistantId:e,onOpenThread:a}):h?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`canvas`,{ref:d,className:`absolute inset-0 h-full w-full`}),(m.nodes.length>it||Y!==`all`)&&xe?(0,J.jsx)(`div`,{"data-graph-control":!0,className:`absolute left-4 top-4 z-10`,children:(0,J.jsx)(Fe,{value:Y,onChange:ve})}):null,(0,J.jsx)(De,{nodeKinds:gt.filter(e=>e!==`concept`),coloredByTheme:gt.includes(`concept`),themes:_,hasLinks:vt,hasLearned:_t,...vt&&_t?{onToggleLink:()=>Se(e=>({...e,link:!e.link})),onToggleLearned:()=>Se(e=>({...e,learned:!e.learned})),linkActive:X.link,learnedActive:X.learned}:{}}),(0,J.jsx)(`div`,{className:`pointer-events-none absolute bottom-4 right-4 text-[11px]`,style:{color:`var(--content-tertiary)`},children:l(`conceptGraphView.dragToRotateHint`)}),p?.truncated?(0,J.jsx)(`div`,{className:`pointer-events-none absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full px-3 py-1 text-[11px]`,style:{backgroundColor:`color-mix(in srgb, var(--surface-base) 82%, transparent)`,border:`1px solid var(--border-base)`,color:`var(--content-tertiary)`},children:l(`conceptGraphView.truncatedNotice`,{count:m.nodes.length})}):null,(0,J.jsxs)(`div`,{"data-graph-control":!0,className:`absolute right-4 top-4 flex flex-col gap-1`,children:[(0,J.jsx)(s,{variant:`ghost`,iconOnly:(0,J.jsx)(se,{}),onClick:()=>Oe(1.25),"aria-label":l(`conceptGraphView.zoomInAriaLabel`),tooltip:l(`conceptGraphView.zoomInAriaLabel`)}),(0,J.jsx)(s,{variant:`ghost`,iconOnly:(0,J.jsx)(L,{}),onClick:()=>Oe(.8),"aria-label":l(`conceptGraphView.zoomOutAriaLabel`),tooltip:l(`conceptGraphView.zoomOutAriaLabel`)}),(0,J.jsx)(s,{variant:`ghost`,iconOnly:(0,J.jsx)(ne,{}),onClick:Ee,"aria-label":l(`conceptGraphView.resetViewAriaLabel`),tooltip:l(`conceptGraphView.resetViewAriaLabel`)})]})]}):(0,J.jsx)(pe,{title:l(`conceptGraphView.emptyTitle`),detail:l(`conceptGraphView.emptyDetail`)}),(0,J.jsxs)(`div`,{className:`@container flex select-none flex-col overflow-hidden rounded-xl ${t??``}`,style:{backgroundColor:`var(--surface-base)`},children:[Et?(0,J.jsxs)(`div`,{className:`flex h-12 flex-none items-center gap-2 px-3`,style:{borderBottom:`1px solid var(--border-base)`},children:[i?(0,J.jsx)(s,{variant:`ghost`,iconOnly:r?(0,J.jsx)(te,{}):(0,J.jsx)(M,{}),onClick:i,"aria-label":l(r?`conceptGraphView.exitFullscreenAriaLabel`:`conceptGraphView.enterFullscreenAriaLabel`),tooltip:l(r?`conceptGraphView.exitFullscreenAriaLabel`:`conceptGraphView.enterFullscreenAriaLabel`)}):null,Tt?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(s,{variant:`ghost`,iconOnly:(0,J.jsx)(R,{}),onClick:()=>G(!0),"aria-label":l(`conceptGraphView.searchConceptsAriaLabel`),tooltip:l(`conceptGraphView.searchConceptsAriaLabel`),className:W?`hidden`:`@2xl:hidden`}),(0,J.jsxs)(`div`,{className:`relative ${W?``:`hidden @2xl:block`}`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-full px-2.5 py-1`,style:{backgroundColor:`color-mix(in srgb, var(--surface-base) 82%, transparent)`,border:`1px solid var(--border-base)`},children:[(0,J.jsx)(R,{size:14,"aria-hidden":!0,style:{color:`var(--content-tertiary)`}}),(0,J.jsx)(`input`,{ref:ue,type:`text`,value:H,onChange:e=>{let t=e.target.value;t.trim()&&!K.current&&(V(`search`),K.current=!0),U(t)},onKeyDown:e=>{e.key===`Escape`?(H||W)&&(e.preventDefault(),e.stopPropagation(),U(``),G(!1)):e.key===`Enter`&&he.length>0&&(e.preventDefault(),Z(he[0].id))},placeholder:l(`conceptGraphView.searchConceptsPlaceholder`),"aria-label":l(`conceptGraphView.searchConceptsAriaLabel`),className:`w-36 bg-transparent text-[12px] outline-none placeholder:text-[var(--content-tertiary)]`,style:{color:`var(--content-default)`}}),H?(0,J.jsx)(`span`,{className:`text-[11px] tabular-nums`,style:{color:`var(--content-tertiary)`},children:q?.size??0}):null,H||W?(0,J.jsx)(`button`,{type:`button`,onClick:()=>{U(``),G(!1)},"aria-label":l(`conceptGraphView.clearSearchAriaLabel`),className:`flex items-center`,style:{color:`var(--content-tertiary)`},children:(0,J.jsx)(ae,{size:13})}):null]}),H&&he.length>0?(0,J.jsx)(`ul`,{className:`absolute left-0 top-full z-30 mt-1.5 flex max-h-56 w-52 list-none flex-col overflow-y-auto rounded-xl py-1`,style:{backgroundColor:`color-mix(in srgb, var(--surface-base) 92%, transparent)`,border:`1px solid var(--border-base)`},children:he.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsx)(`button`,{type:`button`,onClick:()=>{Q({id:e.id,label:e.label,updatedAtMs:e.updatedAtMs}),U(``),G(!1)},className:`block w-full truncate px-3 py-1 text-left text-[12px] hover:bg-[color-mix(in_srgb,var(--content-tertiary)_14%,transparent)]`,style:{color:`var(--content-default)`},children:e.label})},e.id))}):null]})]}):null,(0,J.jsx)(`div`,{className:`pointer-events-none mx-auto min-w-0`,children:wt?(0,J.jsx)(`div`,{className:`truncate rounded-full px-3 py-1 text-[12px]`,style:{backgroundColor:`color-mix(in srgb, var(--surface-base) 82%, transparent)`,border:`1px solid var(--border-base)`,color:`var(--content-default)`},children:wt}):h&&!yt&&!W?(0,J.jsxs)(`div`,{className:`rounded-full px-3 py-1 text-[11px] tabular-nums`,style:{backgroundColor:`color-mix(in srgb, var(--surface-base) 82%, transparent)`,border:`1px solid var(--border-base)`,color:`var(--content-tertiary)`},children:[(0,J.jsxs)(`span`,{className:`@max-md:hidden`,children:[Ct(bt,`neuron`),` · `,Ct(xt,`synapse`),` ·`,` `,Ct(St,`lobe`)]}),(0,J.jsxs)(`span`,{className:`hidden @max-md:inline`,children:[bt,` · `,xt,` · `,St]})]}):null}),o?(0,J.jsx)(`div`,{className:`flex-none`,children:o}):null]}):null,(0,J.jsxs)(`div`,{ref:u,className:`relative min-h-0 flex-1`,style:{backgroundImage:`radial-gradient(circle at center, color-mix(in srgb, var(--content-tertiary) 8%, transparent), transparent 62%)`,touchAction:`none`,cursor:h?`grab`:`default`},onPointerDown:h?ft:void 0,onPointerMove:h?pt:void 0,onPointerUp:h?mt:void 0,onPointerCancel:h?mt:void 0,onPointerLeave:h?ht:void 0,children:[yt?(0,J.jsx)(Te,{onDismiss:le}):null,Dt,h&&F?(0,J.jsx)(we,{assistantId:e,node:F,trail:N,neighbors:Le,onTravel:Ie,onCrumb:Ne,onClose:Me,onOpenThread:a}):null]})]})}async function dt(e,t){let{data:n}=await a({path:{assistant_id:e},body:{content:t},throwOnError:!0});return n}function ft({open:e,onOpenChange:t,assistantId:i,onCreated:a}){let{t:o}=D(`intelligence`),c=E(),[l,u]=(0,z.useState)(``),[d,f]=(0,z.useState)(!1),m=(0,z.useCallback)(async()=>{let e=l.trim();if(e){f(!0);try{let r=await dt(i,e);if(!r.success){_.error(r.message||o(`createMemoryModal.saveError`));return}_.success(r.pendingNodeId?o(`createMemoryModal.savedFoundToast`):o(`createMemoryModal.savedPendingToast`)),u(``),t(!1),a?.(r.pendingNodeId),await Promise.all([c.invalidateQueries({queryKey:n(i).queryKey}),c.invalidateQueries({queryKey:S(i).queryKey})])}catch(e){let t=e instanceof Error?e.message:o(`createMemoryModal.createError`);_.error(t)}finally{f(!1)}}},[i,l,t,a,c,o]);return(0,J.jsx)(p.Root,{open:e,onOpenChange:t,children:(0,J.jsxs)(p.Content,{size:`sm`,children:[(0,J.jsx)(p.Header,{children:(0,J.jsx)(p.Title,{children:o(`createMemoryModal.title`)})}),(0,J.jsx)(p.Body,{children:(0,J.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,J.jsx)(v,{label:o(`createMemoryModal.contentLabel`),placeholder:o(`createMemoryModal.contentPlaceholder`),value:l,onChange:e=>u(e.target.value),disabled:d,rows:3,fullWidth:!0}),(0,J.jsx)(r,{as:`p`,variant:`body-medium-lighter`,className:`text-(--content-secondary)`,children:o(`createMemoryModal.helperText`)})]})}),(0,J.jsxs)(p.Footer,{children:[(0,J.jsx)(p.Close,{asChild:!0,children:(0,J.jsx)(s,{variant:`outlined`,disabled:d,children:o(`createMemoryModal.cancel`)})}),(0,J.jsx)(s,{variant:`primary`,onClick:m,disabled:d||!l.trim(),leftIcon:d?(0,J.jsx)(F,{className:`animate-spin`}):void 0,children:o(d?`createMemoryModal.creating`:`createMemoryModal.create`)})]})]})})}function pt({onOpenThread:e}){let{t}=D(`intelligence`),r=h(),[i,a]=(0,z.useState)(!1),o=(0,z.useRef)(null),c=T(n(r)),l=T(S(r)),u=c.data?.kind===`ready`&&l.data?.kind===`ready`,d=(0,z.useRef)(!1);return(0,z.useEffect)(()=>{d.current||(d.current=!0,V(`opened`))},[]),(0,J.jsxs)(`div`,{className:`relative flex h-full min-h-0 flex-col`,children:[(0,J.jsx)(ut,{assistantId:r,className:`h-full w-full`,onOpenThread:e,handleRef:o,headerAction:u?(0,J.jsx)(s,{variant:`primary`,size:`compact`,leftIcon:(0,J.jsx)(ie,{}),onClick:()=>a(!0),children:t(`memoryPage.createMemory`)}):void 0}),u?(0,J.jsx)(ft,{open:i,onOpenChange:a,assistantId:r,onCreated:e=>{e&&o.current?.focusNode(e)}}):null]})}function mt(){let e=O();return(0,J.jsx)(pt,{onOpenThread:t=>{V(`chat_from_node`),d(e,{prompt:t})}},h())}export{mt as MemoryPageRoute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Nf as t,Pf as n,SS as r,X_ as i,et as a,im as o,m_ as s,oa as c,sf as l}from"./app-BfK0IQIk.js";import{I as u,Jn as d,N as f,Zn as p,j as m}from"./vendor-ajttH1pP.js";import{t as h,x as g}from"./react-B9IgSVeK.js";var _=e(g(),1),v=class extends Error{status;constructor(e,t){super(t),this.name=`SimulateMemoryRouterError`,this.status=e}};async function y(e,t,n){let{data:r,response:a}=await i({path:{assistant_id:e},body:t,signal:n,throwOnError:!1}),o=a?await a.clone().text().catch(()=>``):``;if(!a||!a.ok)throw new v(a?.status??0,o||a?.statusText||`Failed to simulate memory router`);if(!r)throw new v(a.status,`Empty response from memory router simulator endpoint`);return{response:r,rawRequest:JSON.stringify(t,null,2),rawResponse:b(o)}}function b(e){if(e.length===0)return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function x(e){return d({mutationFn:async t=>{if(!e)throw new v(0,`Missing assistantId`);return y(e,t)}})}function S(e){return p({...l({path:{assistant_id:e}}),enabled:!!e,staleTime:6e4})}function C(e){return p({...n({path:{assistant_id:e}}),enabled:!!e,staleTime:1440*60*1e3})}function ee(e){return p({...t({path:{assistant_id:e}}),enabled:!!e,staleTime:1/0})}var w=h();function T(){let{t:e}=m(`chat`),t=c(),n=o(),r=s.use.memoryRouterPlayground();return n?(0,w.jsx)($,{children:e(`memoryRouterPlaygroundPage.loading`)}):!t||!r?(0,w.jsx)($,{children:e(`memoryRouterPlaygroundPage.notAvailable`)}):(0,w.jsx)(D,{})}var E={tier1:``,tier2:``,batch:``,profile:``,customPrompt:``};function D(){let{t:e}=m(`chat`),t=a(),n=x(t),r=x(t),i=S(t),o=C(t),s=ee(t),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)([{assistantMessage:``,userMessage:``}]),[f,p]=(0,_.useState)(!1);(0,_.useEffect)(()=>{if(f)return;let e=s.data?.nowText;typeof e==`string`&&c===``&&l(e)},[s.data?.nowText,c,f]);let[h,g]=(0,_.useState)(E),[v,y]=(0,_.useState)(E),[b,T]=(0,_.useState)(null),[D,k]=(0,_.useState)(null),M=u[u.length-1].userMessage,P=t=>{let i=t===`A`?h:v,a=t===`A`?T:k,o=t===`A`?n:r;a(null);let s;try{s=O(i)}catch(t){a(t instanceof Error?t.message:e(`memoryRouterPlaygroundPage.invalidOverrideInput`));return}let l=i.profile.trim().length>0?i.profile:void 0,d=i.customPrompt.trim().length>0?i.customPrompt:void 0,f=u.map((e,t)=>t===u.length-1?{...e,userMessage:e.userMessage.trim()}:e);o.mutate({recentTurnPairs:f,nowText:c,...s?{configOverrides:s}:{},...l===void 0?{}:{profileOverride:l},...d===void 0?{}:{routerPromptOverride:d}})},F=()=>{P(`A`),P(`B`)},I=M.trim().length>0,L=I&&!n.isPending,z=I&&!r.isPending;return(0,w.jsx)(`div`,{className:`flex h-full min-h-0 flex-col overflow-y-auto`,children:(0,w.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[1280px] flex-col gap-6 p-6`,children:[(0,w.jsx)(A,{}),(0,w.jsx)(j,{nowText:c,onNowTextChange:e=>{p(!0),l(e)},onReloadNowText:()=>{let e=s.data?.nowText;typeof e==`string`&&(l(e),p(!1))},nowTextLoading:s.isLoading,pairs:u,onPairsChange:d}),(0,w.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 lg:grid-cols-2`,children:[(0,w.jsx)(N,{paneId:`A`,overrides:h,onChange:g,onRun:()=>P(`A`),canRun:L,isRunning:n.isPending,profiles:i.data?.profiles??[],activeProfile:i.data?.activeProfile??null,defaultPromptTemplate:o.data?.template??``}),(0,w.jsx)(N,{paneId:`B`,overrides:v,onChange:y,onRun:()=>P(`B`),canRun:z,isRunning:r.isPending,profiles:i.data?.profiles??[],activeProfile:i.data?.activeProfile??null,defaultPromptTemplate:o.data?.template??``})]}),(0,w.jsx)(`div`,{className:`flex justify-end`,children:(0,w.jsx)(te,{onClick:F,disabled:!I||n.isPending||r.isPending,isRunning:n.isPending||r.isPending})}),(0,w.jsx)(ne,{visible:n.data!==void 0&&r.data!==void 0}),(0,w.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 lg:grid-cols-2`,children:[(0,w.jsx)(R,{paneId:`A`,userMessage:M,mutation:n,otherResult:r.data?.response,validation:b}),(0,w.jsx)(R,{paneId:`B`,userMessage:M,mutation:r,otherResult:n.data?.response,validation:D})]})]})})}function O(e){let t={...k(`tier1_size`,e.tier1),...k(`tier2_size`,e.tier2),...k(`batch_size`,e.batch)};return Object.keys(t).length===0?void 0:t}function k(e,t){let n=t.trim();if(n===``)return{};if(n===`null`)return{[e]:null};let r=Number(n);if(!Number.isInteger(r)||r<1)throw Error(u(`chat:memoryRouterPlaygroundPage.overrideMustBePositiveInteger`,{fieldName:e,value:n}));return{[e]:r}}function A(){let{t:e}=m(`chat`);return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsx)(`h1`,{className:`text-body-large-default`,style:{color:`var(--content-default)`},children:e(`memoryRouterPlaygroundPage.title`)}),(0,w.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-secondary)`},children:(0,w.jsx)(f,{ns:`chat`,i18nKey:`memoryRouterPlaygroundPage.description`,components:{code:(0,w.jsx)(`code`,{})}})})]})}function j({nowText:e,onNowTextChange:t,onReloadNowText:n,nowTextLoading:i,pairs:a,onPairsChange:o}){let{t:s}=m(`chat`),c=(e,t)=>{o(a.map((n,r)=>r===e?{...n,...t}:n))},l=()=>{o([{assistantMessage:``,userMessage:``},...a])},u=e=>{e!==a.length-1&&o(a.filter((t,n)=>n!==e))};return(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,w.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:s(`memoryRouterPlaygroundPage.conversationalContextTitle`)}),(0,w.jsx)(M,{id:`memory-router-playground-now`,label:s(`memoryRouterPlaygroundPage.nowBlockLabel`),value:e,onChange:t,rows:6,monospace:!0,placeholder:s(i?`memoryRouterPlaygroundPage.nowLoadingPlaceholder`:`memoryRouterPlaygroundPage.nowDefaultPlaceholder`),trailing:(0,w.jsx)(`button`,{type:`button`,onClick:n,disabled:i,className:`rounded px-2 py-1 text-label-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--content-secondary)`,border:`none`,cursor:i?`not-allowed`:`pointer`},children:s(`memoryRouterPlaygroundPage.reloadNowButton`)})}),(0,w.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,w.jsx)(`span`,{className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:s(`memoryRouterPlaygroundPage.recentPairsLabel`)}),(0,w.jsx)(`button`,{type:`button`,onClick:l,className:`rounded px-2 py-1 text-label-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--content-secondary)`,border:`none`,cursor:`pointer`},children:s(`memoryRouterPlaygroundPage.addOlderPairButton`)})]}),a.map((e,t)=>{let n=t===a.length-1;return(0,w.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-md border p-3`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`},children:[(0,w.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,w.jsxs)(`span`,{className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:[s(`memoryRouterPlaygroundPage.pairLabel`,{index:t+1,total:a.length}),n?s(`memoryRouterPlaygroundPage.pairMostRecentSuffix`):``]}),!n&&(0,w.jsx)(`button`,{type:`button`,onClick:()=>u(t),className:`rounded px-2 py-1 text-label-medium-default`,style:{background:`transparent`,color:`var(--system-negative-strong)`,border:`none`,cursor:`pointer`},children:s(`memoryRouterPlaygroundPage.removeButton`)})]}),(0,w.jsx)(M,{id:`memory-router-playground-pair-${t}-assistant`,label:s(`memoryRouterPlaygroundPage.assistantReplyLabel`),value:e.assistantMessage,onChange:e=>c(t,{assistantMessage:e}),rows:3,placeholder:t===0&&a.length===1?s(`memoryRouterPlaygroundPage.firstTurnAssistantPlaceholder`):s(`memoryRouterPlaygroundPage.assistantReplyPlaceholder`)}),(0,w.jsx)(M,{id:`memory-router-playground-pair-${t}-user`,label:s(n?`memoryRouterPlaygroundPage.justArrivedUserLabel`:`memoryRouterPlaygroundPage.userMessageLabel`),value:e.userMessage,onChange:e=>c(t,{userMessage:e}),rows:3,placeholder:s(n?`memoryRouterPlaygroundPage.lastUserPlaceholder`:`memoryRouterPlaygroundPage.userMessagePlaceholder`),required:n})]},t)})]})})}function M({id:e,label:t,value:n,onChange:r,rows:i,placeholder:a,monospace:o,trailing:s,required:c}){return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsxs)(`label`,{htmlFor:e,className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:[t,c?` *`:``]}),s]}),(0,w.jsx)(`textarea`,{id:e,value:n,onChange:e=>r(e.target.value),rows:i,placeholder:a,className:`rounded-md border px-3 py-2 text-body-medium-default`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`,color:`var(--content-default)`,resize:`vertical`,...o?{fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`}:{}}})]})}function N({paneId:e,overrides:t,onChange:n,onRun:i,canRun:a,isRunning:o,profiles:s,activeProfile:c,defaultPromptTemplate:l}){let{t:u}=m(`chat`);return(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,w.jsx)(`div`,{className:`text-body-medium-default`,style:{color:X(e)},children:u(`memoryRouterPlaygroundPage.configTitle`,{paneId:e})}),(0,w.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-3`,children:[(0,w.jsx)(I,{paneId:e,label:`tier1_size`,value:t.tier1,onChange:e=>n({...t,tier1:e})}),(0,w.jsx)(I,{paneId:e,label:`tier2_size`,value:t.tier2,onChange:e=>n({...t,tier2:e})}),(0,w.jsx)(I,{paneId:e,label:`batch_size`,value:t.batch,onChange:e=>n({...t,batch:e})})]}),(0,w.jsx)(F,{paneId:e,value:t.profile,onChange:e=>n({...t,profile:e}),profiles:s,activeProfile:c}),(0,w.jsx)(P,{paneId:e,value:t.customPrompt,onChange:e=>n({...t,customPrompt:e}),defaultTemplate:l}),(0,w.jsx)(`div`,{className:`flex justify-end`,children:(0,w.jsx)(`button`,{type:`button`,onClick:i,disabled:!a,className:`rounded-md px-4 py-2 text-body-medium-default transition-colors`,style:{background:a?`var(--system-positive-strong)`:`var(--surface-overlay)`,color:a?`var(--content-on-positive)`:`var(--content-disabled)`,border:`none`,cursor:a?`pointer`:`not-allowed`},children:o?u(`memoryRouterPlaygroundPage.running`):u(`memoryRouterPlaygroundPage.runPane`,{paneId:e})})})]})})}function P({paneId:e,value:t,onChange:n,defaultTemplate:r}){let{t:i}=m(`chat`),[a,o]=(0,_.useState)(!1),s=`memory-router-playground-${e}-prompt`,c=t.trim().length>0;return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`text-label-medium-default`,style:{color:`var(--content-secondary)`,background:`transparent`,border:`none`,padding:0,cursor:`pointer`,textAlign:`left`},children:[a?`▾`:`▸`,` `,i(`memoryRouterPlaygroundPage.systemPrompt`),` `,(0,w.jsxs)(`span`,{style:{color:`var(--content-tertiary)`},children:[`(`,i(c?`memoryRouterPlaygroundPage.promptModeCustom`:`memoryRouterPlaygroundPage.promptModeBundled`),`)`]})]}),a&&(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,onClick:()=>n(r),disabled:r.length===0,className:`rounded px-2 py-1 text-label-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--content-secondary)`,border:`none`,cursor:r.length===0?`not-allowed`:`pointer`},children:i(`memoryRouterPlaygroundPage.loadDefault`)}),(0,w.jsx)(`button`,{type:`button`,onClick:()=>n(``),disabled:!c,className:`rounded px-2 py-1 text-label-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--content-secondary)`,border:`none`,cursor:c?`pointer`:`not-allowed`},children:i(`memoryRouterPlaygroundPage.reset`)})]})]}),a&&(0,w.jsx)(`textarea`,{id:s,value:t,onChange:e=>n(e.target.value),rows:12,placeholder:i(`memoryRouterPlaygroundPage.customPromptPlaceholder`),className:`rounded-md border px-3 py-2 text-body-small-default`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`,color:`var(--content-default)`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,resize:`vertical`,minHeight:`120px`}})]})}function F({paneId:e,value:t,onChange:n,profiles:r,activeProfile:i}){let{t:a}=m(`chat`),o=`memory-router-playground-${e}-profile`,s=i!==null&&i.length>0?a(`memoryRouterPlaygroundPage.inheritActiveWithProfile`,{profile:i}):a(`memoryRouterPlaygroundPage.inheritActive`);return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsx)(`label`,{htmlFor:o,className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:a(`memoryRouterPlaygroundPage.llmProfilesOverride`)}),(0,w.jsxs)(`select`,{id:o,value:t,onChange:e=>n(e.target.value),className:`rounded-md border px-3 py-2 text-body-medium-default`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`,color:`var(--content-default)`},children:[(0,w.jsx)(`option`,{value:``,children:s}),r.map(e=>(0,w.jsx)(`option`,{value:e,children:e},e))]})]})}function I({paneId:e,label:t,value:n,onChange:r}){let{t:i}=m(`chat`),a=`memory-router-playground-${e}-${t}`;return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsx)(`label`,{htmlFor:a,className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:t}),(0,w.jsx)(`input`,{id:a,value:n,onChange:e=>r(e.target.value),placeholder:i(`memoryRouterPlaygroundPage.inheritPlaceholder`),className:`rounded-md border px-3 py-2 text-body-medium-default`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`,color:`var(--content-default)`}})]})}function te({onClick:e,disabled:t,isRunning:n}){let{t:r}=m(`chat`);return(0,w.jsx)(`button`,{type:`button`,onClick:e,disabled:t,className:`rounded-md px-4 py-2 text-body-medium-default transition-colors`,style:{background:t?`var(--surface-overlay)`:`var(--primary-base)`,color:t?`var(--content-disabled)`:`var(--content-on-primary)`,border:`none`,cursor:t?`not-allowed`:`pointer`},children:r(n?`memoryRouterPlaygroundPage.running`:`memoryRouterPlaygroundPage.runBoth`)})}function ne({visible:e}){let{t}=m(`chat`);return e?(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4 rounded-md px-4 py-2 text-label-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--content-secondary)`},children:[(0,w.jsx)(L,{marker:`●`,markerColor:`var(--content-default)`,label:t(`memoryRouterPlaygroundPage.legendInBoth`)}),(0,w.jsx)(L,{marker:`◆`,markerColor:X(`A`),label:t(`memoryRouterPlaygroundPage.legendAOnly`)}),(0,w.jsx)(L,{marker:`◇`,markerColor:X(`B`),label:t(`memoryRouterPlaygroundPage.legendBOnly`)})]}):null}function L({marker:e,markerColor:t,label:n}){return(0,w.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,w.jsx)(`span`,{style:{color:t},children:e}),(0,w.jsx)(`span`,{children:n})]})}function R({paneId:e,userMessage:t,mutation:n,otherResult:r,validation:i}){let{t:a}=m(`chat`),o=n.data;return(0,w.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,w.jsx)(V,{paneId:e}),i!==null&&(0,w.jsx)(Q,{message:i}),n.isError&&(0,w.jsx)(Q,{message:n.error instanceof Error?n.error.message:a(`memoryRouterPlaygroundPage.failedToRunSimulation`)}),o!==void 0&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(H,{paneId:e,userMessage:t,result:o.response,otherResult:r}),(0,w.jsx)(z,{paneId:e,rawRequest:o.rawRequest,rawResponse:o.rawResponse})]})]})}function z({paneId:e,rawRequest:t,rawResponse:n}){let{t:i}=m(`chat`),[a,o]=(0,_.useState)(!1);return(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`text-label-medium-default`,style:{color:`var(--content-secondary)`,background:`transparent`,border:`none`,padding:0,cursor:`pointer`,textAlign:`left`},children:[a?`▾`:`▸`,` `,i(`memoryRouterPlaygroundPage.rawApiExchange`)]}),a&&(0,w.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,w.jsx)(B,{label:i(`memoryRouterPlaygroundPage.requestLabel`,{paneId:e}),body:t}),(0,w.jsx)(B,{label:i(`memoryRouterPlaygroundPage.responseLabel`,{paneId:e}),body:n})]})]})})}function B({label:e,body:t}){let{t:n}=m(`chat`);return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsx)(`span`,{className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:e}),(0,w.jsx)(`pre`,{className:`overflow-auto rounded-md border px-3 py-2 text-body-small-default`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`,color:`var(--content-default)`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,maxHeight:`320px`,whiteSpace:`pre`},children:t.length===0?n(`memoryRouterPlaygroundPage.empty`):t})]})}function V({paneId:e}){let{t}=m(`chat`);return(0,w.jsx)(`div`,{className:`text-body-medium-default`,style:{color:X(e)},children:t(`memoryRouterPlaygroundPage.paneTitle`,{paneId:e})})}function H({paneId:e,userMessage:t,result:n,otherResult:r}){let{t:i}=m(`chat`),a=(0,_.useMemo)(()=>U(n,r),[n,r]),o=(0,_.useMemo)(()=>q(n),[n]);return(0,w.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,w.jsx)(G,{result:n,userMessage:t,otherResult:r,counts:(0,_.useMemo)(()=>W(a),[a])}),(0,w.jsx)(K,{result:n}),n.failureReason!==null&&(0,w.jsx)(Q,{message:i(`memoryRouterPlaygroundPage.routerFailure`,{reason:n.failureReason})}),o.length===0?(0,w.jsx)(ae,{}):o.map(t=>(0,w.jsx)(ie,{paneId:e,source:t.source,slugs:t.slugs,scores:n.scores,diff:a},t.source))]})}function U(e,t){let n=new Map;if(t===void 0){for(let t of e.selectedSlugs)n.set(t,`both`);return n}let r=new Set(t.selectedSlugs);for(let t of e.selectedSlugs)n.set(t,r.has(t)?`both`:`only-here`);return n}function W(e){let t=0,n=0;for(let r of e.values())r===`both`?t++:n++;return{total:e.size,shared:t,unique:n}}function G({result:e,userMessage:t,otherResult:n,counts:i}){let{t:a}=m(`chat`),o=[{label:a(`memoryRouterPlaygroundPage.summaryUserMessageLabel`),value:t},{label:a(`memoryRouterPlaygroundPage.totalCandidatePagesLabel`),value:e.totalCandidatePages.toLocaleString()},{label:a(`memoryRouterPlaygroundPage.selectedLabel`),value:a(`memoryRouterPlaygroundPage.selectedValue`,{count:e.selectedSlugs.length,maxPageIds:e.effectiveConfig.max_page_ids})}];return n!==void 0&&o.push({label:a(`memoryRouterPlaygroundPage.diffLabel`),value:a(`memoryRouterPlaygroundPage.diffValue`,{shared:i.shared,unique:i.unique})}),(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,w.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:a(`memoryRouterPlaygroundPage.summary`)}),(0,w.jsx)(Z,{rows:o})]})})}function K({result:e}){let{t}=m(`chat`),n=[`tier1_size`,`tier2_size`,`batch_size`,`max_page_ids`].map(n=>{let r=e.effectiveConfig[n],i=e.overrides[n];return{label:n,value:`${r===null?t(`memoryRouterPlaygroundPage.nullValue`):String(r)}${i===void 0?``:t(`memoryRouterPlaygroundPage.overrideSuffix`)}`}});return n.push({label:t(`memoryRouterPlaygroundPage.llmProfilesOverride`),value:e.profileOverride===null?t(`memoryRouterPlaygroundPage.inheritActive`):`${e.profileOverride}${t(`memoryRouterPlaygroundPage.overrideSuffix`)}`}),n.push({label:t(`memoryRouterPlaygroundPage.systemPromptConfigLabel`),value:e.routerPromptOverridden?t(`memoryRouterPlaygroundPage.promptModeCustom`):t(`memoryRouterPlaygroundPage.promptModeBundled`)}),(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,w.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:t(`memoryRouterPlaygroundPage.effectiveConfig`)}),(0,w.jsx)(Z,{rows:n})]})})}function q(e){let t=new Map;for(let n of e.selectedSlugs){let r=e.sourceBySlug[n];if(r===void 0)continue;let i=t.get(r)??[];i.push(n),t.set(r,i)}return[...t.keys()].sort((e,t)=>J(e)-J(t)).map(e=>({source:e,slugs:t.get(e)}))}function J(e){return e===`tier1`?0:e===`tier2`?1:e.startsWith(`tier3:`)?2+Number(e.slice(6)):2**53-1}function Y(e,t){return e===`tier1`?t(`memoryRouterPlaygroundPage.tier1Label`):e===`tier2`?t(`memoryRouterPlaygroundPage.tier2Label`):e.startsWith(`tier3:`)?t(`memoryRouterPlaygroundPage.tier3Label`,{batch:e.slice(6)}):e}function X(e){return e===`A`?`var(--system-mid-strong)`:`var(--primary-base)`}function re(e,t){return t===`both`?{color:`var(--content-default)`,marker:`●`}:{color:X(e),marker:e===`A`?`◆`:`◇`}}function ie({paneId:e,source:t,slugs:n,scores:i,diff:a}){let{t:o}=m(`chat`);return(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,w.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,w.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:Y(t,o)}),(0,w.jsx)(`span`,{className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:o(`memoryRouterPlaygroundPage.pageCount`,{count:n.length})})]}),(0,w.jsx)(`ul`,{className:`flex flex-col gap-1`,children:n.map(n=>{let{color:r,marker:s}=re(e,a.get(n)??`only-here`);return(0,w.jsxs)(`li`,{className:`flex items-baseline justify-between gap-3`,children:[(0,w.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,w.jsx)(`span`,{style:{color:r},children:s}),(0,w.jsx)(`code`,{className:`text-body-medium-default`,style:{color:r},children:n})]}),t===`tier2`&&(0,w.jsx)(`span`,{className:`tabular-nums text-label-medium-default`,style:{color:`var(--content-secondary)`},children:o(`memoryRouterPlaygroundPage.emaScore`,{score:(i[n]??0).toFixed(3)})})]},n)})})]})})}function ae(){let{t:e}=m(`chat`);return(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,w.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e(`memoryRouterPlaygroundPage.noPagesSelected`)}),(0,w.jsx)(`span`,{className:`text-body-small-lighter`,style:{color:`var(--content-secondary)`},children:e(`memoryRouterPlaygroundPage.emptySelectionHint`)})]})})}function Z({rows:e}){return(0,w.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map(({label:e,value:t})=>(0,w.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,w.jsx)(`span`,{className:`shrink-0 text-label-medium-default`,style:{color:`var(--content-secondary)`},children:e}),(0,w.jsx)(`span`,{className:`text-right text-body-medium-lighter`,style:{color:`var(--content-default)`},children:t})]},e))})}function Q({message:e}){return(0,w.jsx)(`div`,{className:`rounded-md px-4 py-3 text-body-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--system-negative-strong)`},children:e})}function $({children:e}){return(0,w.jsx)(`div`,{className:`flex h-full w-full items-center justify-center p-8 text-label-medium-default`,style:{color:`var(--content-tertiary)`},children:e})}export{T as MemoryRouterPlaygroundPage};
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Nf as t,Pf as n,SS as r,X_ as i,et as a,im as o,m_ as s,oa as c,sf as l}from"./app-BBUxTj9g.js";import{I as u,Jn as d,N as f,Zn as p,j as m}from"./vendor-ajttH1pP.js";import{t as h,x as g}from"./react-B9IgSVeK.js";var _=e(g(),1),v=class extends Error{status;constructor(e,t){super(t),this.name=`SimulateMemoryRouterError`,this.status=e}};async function y(e,t,n){let{data:r,response:a}=await i({path:{assistant_id:e},body:t,signal:n,throwOnError:!1}),o=a?await a.clone().text().catch(()=>``):``;if(!a||!a.ok)throw new v(a?.status??0,o||a?.statusText||`Failed to simulate memory router`);if(!r)throw new v(a.status,`Empty response from memory router simulator endpoint`);return{response:r,rawRequest:JSON.stringify(t,null,2),rawResponse:b(o)}}function b(e){if(e.length===0)return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function x(e){return d({mutationFn:async t=>{if(!e)throw new v(0,`Missing assistantId`);return y(e,t)}})}function S(e){return p({...l({path:{assistant_id:e}}),enabled:!!e,staleTime:6e4})}function C(e){return p({...n({path:{assistant_id:e}}),enabled:!!e,staleTime:1440*60*1e3})}function ee(e){return p({...t({path:{assistant_id:e}}),enabled:!!e,staleTime:1/0})}var w=h();function T(){let{t:e}=m(`chat`),t=c(),n=o(),r=s.use.memoryRouterPlayground();return n?(0,w.jsx)($,{children:e(`memoryRouterPlaygroundPage.loading`)}):!t||!r?(0,w.jsx)($,{children:e(`memoryRouterPlaygroundPage.notAvailable`)}):(0,w.jsx)(D,{})}var E={tier1:``,tier2:``,batch:``,profile:``,customPrompt:``};function D(){let{t:e}=m(`chat`),t=a(),n=x(t),r=x(t),i=S(t),o=C(t),s=ee(t),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)([{assistantMessage:``,userMessage:``}]),[f,p]=(0,_.useState)(!1);(0,_.useEffect)(()=>{if(f)return;let e=s.data?.nowText;typeof e==`string`&&c===``&&l(e)},[s.data?.nowText,c,f]);let[h,g]=(0,_.useState)(E),[v,y]=(0,_.useState)(E),[b,T]=(0,_.useState)(null),[D,k]=(0,_.useState)(null),M=u[u.length-1].userMessage,P=t=>{let i=t===`A`?h:v,a=t===`A`?T:k,o=t===`A`?n:r;a(null);let s;try{s=O(i)}catch(t){a(t instanceof Error?t.message:e(`memoryRouterPlaygroundPage.invalidOverrideInput`));return}let l=i.profile.trim().length>0?i.profile:void 0,d=i.customPrompt.trim().length>0?i.customPrompt:void 0,f=u.map((e,t)=>t===u.length-1?{...e,userMessage:e.userMessage.trim()}:e);o.mutate({recentTurnPairs:f,nowText:c,...s?{configOverrides:s}:{},...l===void 0?{}:{profileOverride:l},...d===void 0?{}:{routerPromptOverride:d}})},F=()=>{P(`A`),P(`B`)},I=M.trim().length>0,L=I&&!n.isPending,z=I&&!r.isPending;return(0,w.jsx)(`div`,{className:`flex h-full min-h-0 flex-col overflow-y-auto`,children:(0,w.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[1280px] flex-col gap-6 p-6`,children:[(0,w.jsx)(A,{}),(0,w.jsx)(j,{nowText:c,onNowTextChange:e=>{p(!0),l(e)},onReloadNowText:()=>{let e=s.data?.nowText;typeof e==`string`&&(l(e),p(!1))},nowTextLoading:s.isLoading,pairs:u,onPairsChange:d}),(0,w.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 lg:grid-cols-2`,children:[(0,w.jsx)(N,{paneId:`A`,overrides:h,onChange:g,onRun:()=>P(`A`),canRun:L,isRunning:n.isPending,profiles:i.data?.profiles??[],activeProfile:i.data?.activeProfile??null,defaultPromptTemplate:o.data?.template??``}),(0,w.jsx)(N,{paneId:`B`,overrides:v,onChange:y,onRun:()=>P(`B`),canRun:z,isRunning:r.isPending,profiles:i.data?.profiles??[],activeProfile:i.data?.activeProfile??null,defaultPromptTemplate:o.data?.template??``})]}),(0,w.jsx)(`div`,{className:`flex justify-end`,children:(0,w.jsx)(te,{onClick:F,disabled:!I||n.isPending||r.isPending,isRunning:n.isPending||r.isPending})}),(0,w.jsx)(ne,{visible:n.data!==void 0&&r.data!==void 0}),(0,w.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 lg:grid-cols-2`,children:[(0,w.jsx)(R,{paneId:`A`,userMessage:M,mutation:n,otherResult:r.data?.response,validation:b}),(0,w.jsx)(R,{paneId:`B`,userMessage:M,mutation:r,otherResult:n.data?.response,validation:D})]})]})})}function O(e){let t={...k(`tier1_size`,e.tier1),...k(`tier2_size`,e.tier2),...k(`batch_size`,e.batch)};return Object.keys(t).length===0?void 0:t}function k(e,t){let n=t.trim();if(n===``)return{};if(n===`null`)return{[e]:null};let r=Number(n);if(!Number.isInteger(r)||r<1)throw Error(u(`chat:memoryRouterPlaygroundPage.overrideMustBePositiveInteger`,{fieldName:e,value:n}));return{[e]:r}}function A(){let{t:e}=m(`chat`);return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsx)(`h1`,{className:`text-body-large-default`,style:{color:`var(--content-default)`},children:e(`memoryRouterPlaygroundPage.title`)}),(0,w.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-secondary)`},children:(0,w.jsx)(f,{ns:`chat`,i18nKey:`memoryRouterPlaygroundPage.description`,components:{code:(0,w.jsx)(`code`,{})}})})]})}function j({nowText:e,onNowTextChange:t,onReloadNowText:n,nowTextLoading:i,pairs:a,onPairsChange:o}){let{t:s}=m(`chat`),c=(e,t)=>{o(a.map((n,r)=>r===e?{...n,...t}:n))},l=()=>{o([{assistantMessage:``,userMessage:``},...a])},u=e=>{e!==a.length-1&&o(a.filter((t,n)=>n!==e))};return(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,w.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:s(`memoryRouterPlaygroundPage.conversationalContextTitle`)}),(0,w.jsx)(M,{id:`memory-router-playground-now`,label:s(`memoryRouterPlaygroundPage.nowBlockLabel`),value:e,onChange:t,rows:6,monospace:!0,placeholder:s(i?`memoryRouterPlaygroundPage.nowLoadingPlaceholder`:`memoryRouterPlaygroundPage.nowDefaultPlaceholder`),trailing:(0,w.jsx)(`button`,{type:`button`,onClick:n,disabled:i,className:`rounded px-2 py-1 text-label-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--content-secondary)`,border:`none`,cursor:i?`not-allowed`:`pointer`},children:s(`memoryRouterPlaygroundPage.reloadNowButton`)})}),(0,w.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,w.jsx)(`span`,{className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:s(`memoryRouterPlaygroundPage.recentPairsLabel`)}),(0,w.jsx)(`button`,{type:`button`,onClick:l,className:`rounded px-2 py-1 text-label-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--content-secondary)`,border:`none`,cursor:`pointer`},children:s(`memoryRouterPlaygroundPage.addOlderPairButton`)})]}),a.map((e,t)=>{let n=t===a.length-1;return(0,w.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-md border p-3`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`},children:[(0,w.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,w.jsxs)(`span`,{className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:[s(`memoryRouterPlaygroundPage.pairLabel`,{index:t+1,total:a.length}),n?s(`memoryRouterPlaygroundPage.pairMostRecentSuffix`):``]}),!n&&(0,w.jsx)(`button`,{type:`button`,onClick:()=>u(t),className:`rounded px-2 py-1 text-label-medium-default`,style:{background:`transparent`,color:`var(--system-negative-strong)`,border:`none`,cursor:`pointer`},children:s(`memoryRouterPlaygroundPage.removeButton`)})]}),(0,w.jsx)(M,{id:`memory-router-playground-pair-${t}-assistant`,label:s(`memoryRouterPlaygroundPage.assistantReplyLabel`),value:e.assistantMessage,onChange:e=>c(t,{assistantMessage:e}),rows:3,placeholder:t===0&&a.length===1?s(`memoryRouterPlaygroundPage.firstTurnAssistantPlaceholder`):s(`memoryRouterPlaygroundPage.assistantReplyPlaceholder`)}),(0,w.jsx)(M,{id:`memory-router-playground-pair-${t}-user`,label:s(n?`memoryRouterPlaygroundPage.justArrivedUserLabel`:`memoryRouterPlaygroundPage.userMessageLabel`),value:e.userMessage,onChange:e=>c(t,{userMessage:e}),rows:3,placeholder:s(n?`memoryRouterPlaygroundPage.lastUserPlaceholder`:`memoryRouterPlaygroundPage.userMessagePlaceholder`),required:n})]},t)})]})})}function M({id:e,label:t,value:n,onChange:r,rows:i,placeholder:a,monospace:o,trailing:s,required:c}){return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsxs)(`label`,{htmlFor:e,className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:[t,c?` *`:``]}),s]}),(0,w.jsx)(`textarea`,{id:e,value:n,onChange:e=>r(e.target.value),rows:i,placeholder:a,className:`rounded-md border px-3 py-2 text-body-medium-default`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`,color:`var(--content-default)`,resize:`vertical`,...o?{fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`}:{}}})]})}function N({paneId:e,overrides:t,onChange:n,onRun:i,canRun:a,isRunning:o,profiles:s,activeProfile:c,defaultPromptTemplate:l}){let{t:u}=m(`chat`);return(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,w.jsx)(`div`,{className:`text-body-medium-default`,style:{color:X(e)},children:u(`memoryRouterPlaygroundPage.configTitle`,{paneId:e})}),(0,w.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-3`,children:[(0,w.jsx)(I,{paneId:e,label:`tier1_size`,value:t.tier1,onChange:e=>n({...t,tier1:e})}),(0,w.jsx)(I,{paneId:e,label:`tier2_size`,value:t.tier2,onChange:e=>n({...t,tier2:e})}),(0,w.jsx)(I,{paneId:e,label:`batch_size`,value:t.batch,onChange:e=>n({...t,batch:e})})]}),(0,w.jsx)(F,{paneId:e,value:t.profile,onChange:e=>n({...t,profile:e}),profiles:s,activeProfile:c}),(0,w.jsx)(P,{paneId:e,value:t.customPrompt,onChange:e=>n({...t,customPrompt:e}),defaultTemplate:l}),(0,w.jsx)(`div`,{className:`flex justify-end`,children:(0,w.jsx)(`button`,{type:`button`,onClick:i,disabled:!a,className:`rounded-md px-4 py-2 text-body-medium-default transition-colors`,style:{background:a?`var(--system-positive-strong)`:`var(--surface-overlay)`,color:a?`var(--content-on-positive)`:`var(--content-disabled)`,border:`none`,cursor:a?`pointer`:`not-allowed`},children:o?u(`memoryRouterPlaygroundPage.running`):u(`memoryRouterPlaygroundPage.runPane`,{paneId:e})})})]})})}function P({paneId:e,value:t,onChange:n,defaultTemplate:r}){let{t:i}=m(`chat`),[a,o]=(0,_.useState)(!1),s=`memory-router-playground-${e}-prompt`,c=t.trim().length>0;return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`text-label-medium-default`,style:{color:`var(--content-secondary)`,background:`transparent`,border:`none`,padding:0,cursor:`pointer`,textAlign:`left`},children:[a?`▾`:`▸`,` `,i(`memoryRouterPlaygroundPage.systemPrompt`),` `,(0,w.jsxs)(`span`,{style:{color:`var(--content-tertiary)`},children:[`(`,i(c?`memoryRouterPlaygroundPage.promptModeCustom`:`memoryRouterPlaygroundPage.promptModeBundled`),`)`]})]}),a&&(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,onClick:()=>n(r),disabled:r.length===0,className:`rounded px-2 py-1 text-label-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--content-secondary)`,border:`none`,cursor:r.length===0?`not-allowed`:`pointer`},children:i(`memoryRouterPlaygroundPage.loadDefault`)}),(0,w.jsx)(`button`,{type:`button`,onClick:()=>n(``),disabled:!c,className:`rounded px-2 py-1 text-label-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--content-secondary)`,border:`none`,cursor:c?`pointer`:`not-allowed`},children:i(`memoryRouterPlaygroundPage.reset`)})]})]}),a&&(0,w.jsx)(`textarea`,{id:s,value:t,onChange:e=>n(e.target.value),rows:12,placeholder:i(`memoryRouterPlaygroundPage.customPromptPlaceholder`),className:`rounded-md border px-3 py-2 text-body-small-default`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`,color:`var(--content-default)`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,resize:`vertical`,minHeight:`120px`}})]})}function F({paneId:e,value:t,onChange:n,profiles:r,activeProfile:i}){let{t:a}=m(`chat`),o=`memory-router-playground-${e}-profile`,s=i!==null&&i.length>0?a(`memoryRouterPlaygroundPage.inheritActiveWithProfile`,{profile:i}):a(`memoryRouterPlaygroundPage.inheritActive`);return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsx)(`label`,{htmlFor:o,className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:a(`memoryRouterPlaygroundPage.llmProfilesOverride`)}),(0,w.jsxs)(`select`,{id:o,value:t,onChange:e=>n(e.target.value),className:`rounded-md border px-3 py-2 text-body-medium-default`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`,color:`var(--content-default)`},children:[(0,w.jsx)(`option`,{value:``,children:s}),r.map(e=>(0,w.jsx)(`option`,{value:e,children:e},e))]})]})}function I({paneId:e,label:t,value:n,onChange:r}){let{t:i}=m(`chat`),a=`memory-router-playground-${e}-${t}`;return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsx)(`label`,{htmlFor:a,className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:t}),(0,w.jsx)(`input`,{id:a,value:n,onChange:e=>r(e.target.value),placeholder:i(`memoryRouterPlaygroundPage.inheritPlaceholder`),className:`rounded-md border px-3 py-2 text-body-medium-default`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`,color:`var(--content-default)`}})]})}function te({onClick:e,disabled:t,isRunning:n}){let{t:r}=m(`chat`);return(0,w.jsx)(`button`,{type:`button`,onClick:e,disabled:t,className:`rounded-md px-4 py-2 text-body-medium-default transition-colors`,style:{background:t?`var(--surface-overlay)`:`var(--primary-base)`,color:t?`var(--content-disabled)`:`var(--content-on-primary)`,border:`none`,cursor:t?`not-allowed`:`pointer`},children:r(n?`memoryRouterPlaygroundPage.running`:`memoryRouterPlaygroundPage.runBoth`)})}function ne({visible:e}){let{t}=m(`chat`);return e?(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4 rounded-md px-4 py-2 text-label-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--content-secondary)`},children:[(0,w.jsx)(L,{marker:`●`,markerColor:`var(--content-default)`,label:t(`memoryRouterPlaygroundPage.legendInBoth`)}),(0,w.jsx)(L,{marker:`◆`,markerColor:X(`A`),label:t(`memoryRouterPlaygroundPage.legendAOnly`)}),(0,w.jsx)(L,{marker:`◇`,markerColor:X(`B`),label:t(`memoryRouterPlaygroundPage.legendBOnly`)})]}):null}function L({marker:e,markerColor:t,label:n}){return(0,w.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,w.jsx)(`span`,{style:{color:t},children:e}),(0,w.jsx)(`span`,{children:n})]})}function R({paneId:e,userMessage:t,mutation:n,otherResult:r,validation:i}){let{t:a}=m(`chat`),o=n.data;return(0,w.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,w.jsx)(V,{paneId:e}),i!==null&&(0,w.jsx)(Q,{message:i}),n.isError&&(0,w.jsx)(Q,{message:n.error instanceof Error?n.error.message:a(`memoryRouterPlaygroundPage.failedToRunSimulation`)}),o!==void 0&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(H,{paneId:e,userMessage:t,result:o.response,otherResult:r}),(0,w.jsx)(z,{paneId:e,rawRequest:o.rawRequest,rawResponse:o.rawResponse})]})]})}function z({paneId:e,rawRequest:t,rawResponse:n}){let{t:i}=m(`chat`),[a,o]=(0,_.useState)(!1);return(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`text-label-medium-default`,style:{color:`var(--content-secondary)`,background:`transparent`,border:`none`,padding:0,cursor:`pointer`,textAlign:`left`},children:[a?`▾`:`▸`,` `,i(`memoryRouterPlaygroundPage.rawApiExchange`)]}),a&&(0,w.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,w.jsx)(B,{label:i(`memoryRouterPlaygroundPage.requestLabel`,{paneId:e}),body:t}),(0,w.jsx)(B,{label:i(`memoryRouterPlaygroundPage.responseLabel`,{paneId:e}),body:n})]})]})})}function B({label:e,body:t}){let{t:n}=m(`chat`);return(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsx)(`span`,{className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:e}),(0,w.jsx)(`pre`,{className:`overflow-auto rounded-md border px-3 py-2 text-body-small-default`,style:{borderColor:`var(--border-base)`,background:`var(--surface-base)`,color:`var(--content-default)`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,maxHeight:`320px`,whiteSpace:`pre`},children:t.length===0?n(`memoryRouterPlaygroundPage.empty`):t})]})}function V({paneId:e}){let{t}=m(`chat`);return(0,w.jsx)(`div`,{className:`text-body-medium-default`,style:{color:X(e)},children:t(`memoryRouterPlaygroundPage.paneTitle`,{paneId:e})})}function H({paneId:e,userMessage:t,result:n,otherResult:r}){let{t:i}=m(`chat`),a=(0,_.useMemo)(()=>U(n,r),[n,r]),o=(0,_.useMemo)(()=>q(n),[n]);return(0,w.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,w.jsx)(G,{result:n,userMessage:t,otherResult:r,counts:(0,_.useMemo)(()=>W(a),[a])}),(0,w.jsx)(K,{result:n}),n.failureReason!==null&&(0,w.jsx)(Q,{message:i(`memoryRouterPlaygroundPage.routerFailure`,{reason:n.failureReason})}),o.length===0?(0,w.jsx)(ae,{}):o.map(t=>(0,w.jsx)(ie,{paneId:e,source:t.source,slugs:t.slugs,scores:n.scores,diff:a},t.source))]})}function U(e,t){let n=new Map;if(t===void 0){for(let t of e.selectedSlugs)n.set(t,`both`);return n}let r=new Set(t.selectedSlugs);for(let t of e.selectedSlugs)n.set(t,r.has(t)?`both`:`only-here`);return n}function W(e){let t=0,n=0;for(let r of e.values())r===`both`?t++:n++;return{total:e.size,shared:t,unique:n}}function G({result:e,userMessage:t,otherResult:n,counts:i}){let{t:a}=m(`chat`),o=[{label:a(`memoryRouterPlaygroundPage.summaryUserMessageLabel`),value:t},{label:a(`memoryRouterPlaygroundPage.totalCandidatePagesLabel`),value:e.totalCandidatePages.toLocaleString()},{label:a(`memoryRouterPlaygroundPage.selectedLabel`),value:a(`memoryRouterPlaygroundPage.selectedValue`,{count:e.selectedSlugs.length,maxPageIds:e.effectiveConfig.max_page_ids})}];return n!==void 0&&o.push({label:a(`memoryRouterPlaygroundPage.diffLabel`),value:a(`memoryRouterPlaygroundPage.diffValue`,{shared:i.shared,unique:i.unique})}),(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,w.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:a(`memoryRouterPlaygroundPage.summary`)}),(0,w.jsx)(Z,{rows:o})]})})}function K({result:e}){let{t}=m(`chat`),n=[`tier1_size`,`tier2_size`,`batch_size`,`max_page_ids`].map(n=>{let r=e.effectiveConfig[n],i=e.overrides[n];return{label:n,value:`${r===null?t(`memoryRouterPlaygroundPage.nullValue`):String(r)}${i===void 0?``:t(`memoryRouterPlaygroundPage.overrideSuffix`)}`}});return n.push({label:t(`memoryRouterPlaygroundPage.llmProfilesOverride`),value:e.profileOverride===null?t(`memoryRouterPlaygroundPage.inheritActive`):`${e.profileOverride}${t(`memoryRouterPlaygroundPage.overrideSuffix`)}`}),n.push({label:t(`memoryRouterPlaygroundPage.systemPromptConfigLabel`),value:e.routerPromptOverridden?t(`memoryRouterPlaygroundPage.promptModeCustom`):t(`memoryRouterPlaygroundPage.promptModeBundled`)}),(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,w.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:t(`memoryRouterPlaygroundPage.effectiveConfig`)}),(0,w.jsx)(Z,{rows:n})]})})}function q(e){let t=new Map;for(let n of e.selectedSlugs){let r=e.sourceBySlug[n];if(r===void 0)continue;let i=t.get(r)??[];i.push(n),t.set(r,i)}return[...t.keys()].sort((e,t)=>J(e)-J(t)).map(e=>({source:e,slugs:t.get(e)}))}function J(e){return e===`tier1`?0:e===`tier2`?1:e.startsWith(`tier3:`)?2+Number(e.slice(6)):2**53-1}function Y(e,t){return e===`tier1`?t(`memoryRouterPlaygroundPage.tier1Label`):e===`tier2`?t(`memoryRouterPlaygroundPage.tier2Label`):e.startsWith(`tier3:`)?t(`memoryRouterPlaygroundPage.tier3Label`,{batch:e.slice(6)}):e}function X(e){return e===`A`?`var(--system-mid-strong)`:`var(--primary-base)`}function re(e,t){return t===`both`?{color:`var(--content-default)`,marker:`●`}:{color:X(e),marker:e===`A`?`◆`:`◇`}}function ie({paneId:e,source:t,slugs:n,scores:i,diff:a}){let{t:o}=m(`chat`);return(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,w.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,w.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:Y(t,o)}),(0,w.jsx)(`span`,{className:`text-label-medium-default`,style:{color:`var(--content-secondary)`},children:o(`memoryRouterPlaygroundPage.pageCount`,{count:n.length})})]}),(0,w.jsx)(`ul`,{className:`flex flex-col gap-1`,children:n.map(n=>{let{color:r,marker:s}=re(e,a.get(n)??`only-here`);return(0,w.jsxs)(`li`,{className:`flex items-baseline justify-between gap-3`,children:[(0,w.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,w.jsx)(`span`,{style:{color:r},children:s}),(0,w.jsx)(`code`,{className:`text-body-medium-default`,style:{color:r},children:n})]}),t===`tier2`&&(0,w.jsx)(`span`,{className:`tabular-nums text-label-medium-default`,style:{color:`var(--content-secondary)`},children:o(`memoryRouterPlaygroundPage.emaScore`,{score:(i[n]??0).toFixed(3)})})]},n)})})]})})}function ae(){let{t:e}=m(`chat`);return(0,w.jsx)(r,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,w.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e(`memoryRouterPlaygroundPage.noPagesSelected`)}),(0,w.jsx)(`span`,{className:`text-body-small-lighter`,style:{color:`var(--content-secondary)`},children:e(`memoryRouterPlaygroundPage.emptySelectionHint`)})]})})}function Z({rows:e}){return(0,w.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map(({label:e,value:t})=>(0,w.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,w.jsx)(`span`,{className:`shrink-0 text-label-medium-default`,style:{color:`var(--content-secondary)`},children:e}),(0,w.jsx)(`span`,{className:`text-right text-body-medium-lighter`,style:{color:`var(--content-default)`},children:t})]},e))})}function Q({message:e}){return(0,w.jsx)(`div`,{className:`rounded-md px-4 py-3 text-body-medium-default`,style:{background:`var(--surface-overlay)`,color:`var(--system-negative-strong)`},children:e})}function $({children:e}){return(0,w.jsx)(`div`,{className:`flex h-full w-full items-center justify-center p-8 text-label-medium-default`,style:{color:`var(--content-tertiary)`},children:e})}export{T as MemoryRouterPlaygroundPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Bt as e,er as t,nr as n,rr as r}from"./app-
|
|
1
|
+
import{Bt as e,er as t,nr as n,rr as r}from"./app-BBUxTj9g.js";import{j as i}from"./vendor-ajttH1pP.js";import{t as a}from"./react-B9IgSVeK.js";import{in as o}from"./icons-C0wyat6T.js";import{t as s}from"./use-transcript-message-by-id-BaIMdiwS.js";var c=[];function l(e){let t=s(e);return t?t.attachments??c:null}var u=a();function d({payload:a,onClose:s}){let{t:c}=i(`chat`),{displayAttachments:d,renderSquare:f,previewModal:p}=e({attachments:l(a.messageId)??a.attachments,assistantId:a.assistantId});return(0,u.jsxs)(t,{Glyph:o,titleNode:(0,u.jsx)(r,{title:c(`messageFilesPanel.title`),count:d.length}),closeLabel:c(`messageFilesPanel.closeAria`),onClose:s,children:[d.length===0?(0,u.jsx)(n,{children:c(`messageFilesPanel.empty`)}):(0,u.jsx)(`div`,{className:`flex flex-wrap items-start gap-3`,children:d.map((e,t)=>f(e,t))}),p]})}export{d as MessageFilesPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{CS as t,IS as n}from"./app-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{CS as t,IS as n}from"./app-BBUxTj9g.js";import{f as r}from"./vendor-ajttH1pP.js";import{t as i,x as a}from"./react-B9IgSVeK.js";import{Ya as o}from"./icons-C0wyat6T.js";var s=o(`arrow-up-from-line`,[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),c=e(a(),1),l=i();function u(e){if(e>=1e6){let t=e/1e6;return`${t%1==0?t.toFixed(0):t.toFixed(1)}M`}if(e>=1e3){let t=e/1e3;return`${t%1==0?t.toFixed(0):t.toFixed(1)}K`}return e.toLocaleString()}function d(e){let t=r(),[n,i]=(0,c.useState)(e),a=(0,c.useRef)(e),o=(0,c.useRef)(e),s=(0,c.useRef)(0);return(0,c.useEffect)(()=>{if(o.current=e,t){cancelAnimationFrame(s.current),s.current=0,a.current=e,i(e);return}if(a.current===e||s.current)return;let n=performance.now(),r=a.current,c=e=>{let t=o.current,l=Math.min((e-n)/300,1),u=1-(1-l)**3;a.current=l>=1?t:r+(t-r)*u,i(a.current),l<1?s.current=requestAnimationFrame(c):s.current=0};s.current=requestAnimationFrame(c)},[e,t]),(0,c.useEffect)(()=>()=>cancelAnimationFrame(s.current),[]),n}function f({icon:e,value:r,label:i,valueTitle:a}){return(0,l.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] px-3 py-3`,children:[(0,l.jsx)(`div`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[var(--surface-base)]`,children:e}),(0,l.jsxs)(`div`,{className:`min-w-0`,children:[(0,l.jsx)(t,{variant:`title-small`,title:a||void 0,className:n(`block text-[var(--content-default)]`,a&&`-mb-1 truncate pb-1`),children:r}),(0,l.jsx)(t,{variant:`body-small-default`,className:`block text-[var(--content-secondary)]`,children:i})]})]})}function p({icon:e,label:t,target:n,format:r}){return(0,l.jsx)(f,{icon:e,label:t,value:r(d(n))})}export{s as i,f as n,u as r,p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{st as e}from"./app-BBUxTj9g.js";export{e as filesFromNativePaths};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fr as e}from"./app-BBUxTj9g.js";export{e as saveFile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{As as t,Mh as n,NS as r,SS as i,Th as a,ed as o,fx as s,gS as c,js as l,xx as u}from"./app-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{As as t,Mh as n,NS as r,SS as i,Th as a,ed as o,fx as s,gS as c,js as l,xx as u}from"./app-BBUxTj9g.js";import{E as d,j as f,k as p}from"./vendor-ajttH1pP.js";import{r as m,t as h,x as g}from"./react-B9IgSVeK.js";import{Ta as _,Zr as v}from"./icons-C0wyat6T.js";var y=e(g(),1),b=p(`AndroidNotificationSettings`);function x(){return a()&&d.isPluginAvailable(`AndroidNotificationSettings`)}async function S(){if(x())try{await b.open()}catch(e){u(e,{context:`android_notification_settings_open`,level:`warning`})}}var C=h();function w(){let{t:e}=f(`settings`),n=x(),[a,s]=(0,y.useState)(null);(0,y.useEffect)(()=>{t().then(s)},[]),o(`app.resume`,({signal:e})=>{e!==`online`&&l().then(s)});let u;switch(a){case`granted`:u={description:e(`androidNotificationSettingsCard.grantedDescription`),label:e(`androidNotificationSettingsCard.grantedLabel`),tone:`positive`};break;case`denied`:u={description:e(`androidNotificationSettingsCard.deniedDescription`),label:e(`androidNotificationSettingsCard.deniedLabel`),tone:`negative`};break;case`prompt`:u={description:e(`androidNotificationSettingsCard.promptDescription`),label:e(`androidNotificationSettingsCard.promptLabel`),tone:`warning`};break;case`unsupported`:u={description:e(`androidNotificationSettingsCard.unsupportedDescription`),label:e(`androidNotificationSettingsCard.unsupportedLabel`),tone:`neutral`};break;default:u={description:e(`androidNotificationSettingsCard.checkingDescription`),label:e(`androidNotificationSettingsCard.checkingLabel`),tone:`neutral`};break}return(0,C.jsx)(i,{padding:`lg`,children:(0,C.jsxs)(`div`,{className:`flex flex-col gap-5 sm:flex-row sm:items-center sm:justify-between`,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 items-start gap-4`,children:[(0,C.jsx)(`span`,{className:`flex size-11 shrink-0 items-center justify-center rounded-xl bg-[var(--surface-base)] text-[var(--content-secondary)]`,children:(0,C.jsx)(_,{className:`size-5`,"aria-hidden":!0})}),(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,C.jsx)(`h2`,{className:`text-title-small text-[var(--content-default)]`,children:e(`androidNotificationSettingsCard.title`)}),(0,C.jsx)(c,{tone:u.tone,children:u.label})]}),(0,C.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-secondary)]`,children:u.description})]})]}),n&&(0,C.jsx)(r,{variant:`outlined`,onClick:()=>void S(),disabled:a===null,rightIcon:(0,C.jsx)(v,{"aria-hidden":!0}),className:`self-start sm:self-auto`,children:e(`androidNotificationSettingsCard.openSettings`)})]})})}function T(){let{t:e}=f(`settings`);return n()?(0,C.jsxs)(`div`,{className:`mx-auto w-full max-w-2xl space-y-6`,children:[(0,C.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,C.jsx)(`span`,{className:`flex size-10 shrink-0 items-center justify-center rounded-xl bg-[var(--surface-lift)] text-[var(--content-secondary)]`,children:(0,C.jsx)(_,{className:`size-5`,"aria-hidden":!0})}),(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`h1`,{className:`text-title-medium text-[var(--content-emphasised)]`,children:e(`notificationsPage.title`)}),(0,C.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-secondary)]`,children:e(`notificationsPage.description`)})]})]}),(0,C.jsx)(w,{})]}):(0,C.jsx)(m,{replace:!0,to:s.settings.general})}export{T as NotificationsPage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{ci as t}from"./app-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{ci as t}from"./app-BBUxTj9g.js";import{j as n}from"./vendor-ajttH1pP.js";import{_ as r,t as i,x as a}from"./react-B9IgSVeK.js";var o=e(a(),1),s=i();function c(){return(0,s.jsxs)(`svg`,{className:`oauth-icon`,viewBox:`0 0 56 56`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,s.jsx)(`circle`,{cx:`28`,cy:`28`,r:`28`,fill:`var(--oauth-positive-bg)`}),(0,s.jsx)(`path`,{className:`oauth-check`,d:`M17 28.5L24.5 36L39 21`,stroke:`var(--oauth-positive-fg)`,strokeWidth:`3.5`,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`})]})}function l(){return(0,s.jsxs)(`svg`,{className:`oauth-icon`,viewBox:`0 0 56 56`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,s.jsx)(`circle`,{cx:`28`,cy:`28`,r:`28`,fill:`var(--oauth-negative-bg)`}),(0,s.jsx)(`path`,{className:`oauth-cross oauth-cross-1`,d:`M20 20L36 36`,stroke:`var(--oauth-negative-fg)`,strokeWidth:`3.5`,strokeLinecap:`round`,fill:`none`}),(0,s.jsx)(`path`,{className:`oauth-cross oauth-cross-2`,d:`M36 20L20 36`,stroke:`var(--oauth-negative-fg)`,strokeWidth:`3.5`,strokeLinecap:`round`,fill:`none`})]})}var u=`
|
|
2
2
|
:root {
|
|
3
3
|
--oauth-surface: #F5F3EB;
|
|
4
4
|
--oauth-surface-card: #FFFFFF;
|
package/dist/assets/{oauth-popup-complete-page-CWV5_KjG.js → oauth-popup-complete-page-BPruZqf-.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Jv as t,Yv as n,ci as r}from"./app-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Jv as t,Yv as n,ci as r}from"./app-BBUxTj9g.js";import{j as i}from"./vendor-ajttH1pP.js";import{_ as a,t as o,x as s}from"./react-B9IgSVeK.js";var c=e(s(),1),l=o();function u(){return(0,l.jsxs)(`svg`,{className:`oauth-icon`,viewBox:`0 0 56 56`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,l.jsx)(`circle`,{cx:`28`,cy:`28`,r:`28`,fill:`var(--oauth-positive-bg)`}),(0,l.jsx)(`path`,{className:`oauth-check`,d:`M17 28.5L24.5 36L39 21`,stroke:`var(--oauth-positive-fg)`,strokeWidth:`3.5`,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`})]})}function d(){return(0,l.jsxs)(`svg`,{className:`oauth-icon`,viewBox:`0 0 56 56`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,l.jsx)(`circle`,{cx:`28`,cy:`28`,r:`28`,fill:`var(--oauth-negative-bg)`}),(0,l.jsx)(`path`,{className:`oauth-cross oauth-cross-1`,d:`M20 20L36 36`,stroke:`var(--oauth-negative-fg)`,strokeWidth:`3.5`,strokeLinecap:`round`,fill:`none`}),(0,l.jsx)(`path`,{className:`oauth-cross oauth-cross-2`,d:`M36 20L20 36`,stroke:`var(--oauth-negative-fg)`,strokeWidth:`3.5`,strokeLinecap:`round`,fill:`none`})]})}var f=`
|
|
2
2
|
:root {
|
|
3
3
|
--oauth-surface: #F5F3EB;
|
|
4
4
|
--oauth-surface-card: #FFFFFF;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_h as e}from"./app-BBUxTj9g.js";export{e as resolvePairedAssistantPlatformId};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ch as t,NS as n,Sh as r,_g as i,bb as a,bg as o,fx as s,gg as c,gy as l,hg as u,i as d,lb as f,ub as p,vg as m,zv as h,zx as g}from"./app-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ch as t,NS as n,Sh as r,_g as i,bb as a,bg as o,fx as s,gg as c,gy as l,hg as u,i as d,lb as f,ub as p,vg as m,zv as h,zx as g}from"./app-BBUxTj9g.js";import{j as _}from"./vendor-ajttH1pP.js";import{d as v,f as y,t as b,x}from"./react-B9IgSVeK.js";import{Ui as S,Yn as C,rt as w,zi as T}from"./icons-C0wyat6T.js";import{r as E}from"./self-hosted-servers-TGCgx_Zl.js";var D=e(x(),1),O=b();function k(e){switch(e.kind){case`starting`:return{title:`Starting pairing`,body:`Creating a code for this browser.`};case`handoff_choice`:return{title:`Open in the Vellum app`,body:`Scanning from a phone with the Vellum app installed? Hand this pairing to the app.`};case`verifying`:return{title:`Pairing`,body:`Connecting this device to your assistant.`};case`approved`:return{title:`Connected`,body:`Opening your assistant.`};case`expired`:return{title:`Pairing expired`,body:`This pairing code is invalid or expired. Run vellum pair on the machine running your assistant to get a new one.`};case`error`:return{title:`Pairing failed`,body:e.message};case`polling`:return{title:`Waiting for approval`,body:`Confirm this code on the machine running your assistant.`}}}function A({state:e}){return e.kind===`approved`?(0,O.jsx)(T,{className:`h-5 w-5 text-[var(--system-positive-strong)]`,"aria-hidden":!0}):e.kind===`handoff_choice`?(0,O.jsx)(w,{className:`h-5 w-5 text-[var(--system-info-strong)]`,"aria-hidden":!0}):e.kind===`starting`||e.kind===`verifying`||e.kind===`polling`?(0,O.jsx)(C,{className:`h-5 w-5 animate-spin text-[var(--system-info-strong)]`,"aria-hidden":!0}):(0,O.jsx)(S,{className:`h-5 w-5 text-[var(--system-negative-strong)]`,"aria-hidden":!0})}function j(){try{let e=new URL(window.location.href);for(let t of[`deviceCode`,`device_code`,`userCode`,`user_code`])e.searchParams.delete(t);e.hash=``,window.history.replaceState(null,``,`${e.pathname}${e.search}`)}catch{}}var M=`vellum-assistant`,N=`ai.vellum.assistant`;function P(e,t){let n=new URLSearchParams({url:o(),code:e}),r=f();r&&n.set(`name`,r);let i=n.toString().replace(/\+/g,`%20`);return t===`ios`?`${M}://connect?${i}`:`intent://connect?${i}#Intent;scheme=${M};package=${N};S.browser_fallback_url=${encodeURIComponent(window.location.href)};end`}function F(){let e=p();if(!e)return null;try{return`${new URL(e).origin}${s.selectAssistant}?noAutoSkip=1`}catch{return null}}function I({deviceCode:e,platform:t,onContinueInBrowser:r}){let{t:i}=_(`remote-web`);return(0,O.jsxs)(`div`,{className:`mt-6 flex flex-col gap-3`,children:[(0,O.jsx)(n,{variant:`primary`,fullWidth:!0,asChild:!0,children:(0,O.jsx)(`a`,{href:(0,D.useMemo)(()=>P(e,t),[e,t]),children:i(`pairingPage.openInApp`)})}),(0,O.jsx)(n,{variant:`outlined`,fullWidth:!0,onClick:r,children:i(`pairingPage.continueInBrowser`)})]})}function L(){let{t:e}=_(`remote-web`),o=v(),f=y(),p=a(),b=(0,D.useMemo)(()=>l(new URLSearchParams(o.search).get(`returnTo`),s.assistant),[o.search]),x=(0,D.useMemo)(()=>g(`${o.pathname}${o.search}${o.hash}`),[o.pathname,o.search,o.hash]),S=(0,D.useMemo)(()=>!x.deviceCode||h()?null:r()?`android`:t()?`ios`:null,[x.deviceCode]),[C,w]=(0,D.useState)(()=>x.deviceCode?{deviceCode:x.deviceCode,userCode:x.userCode}:null),[T,M]=(0,D.useState)(()=>!S),[N,P]=(0,D.useState)(()=>S?{kind:`handoff_choice`}:x.deviceCode?{kind:`verifying`}:{kind:`starting`});(0,D.useEffect)(()=>{if(!p||C)return;let e=new AbortController;return(async()=>{try{let t=await i(e.signal);w({deviceCode:t.deviceCode,userCode:t.userCode}),P({kind:`polling`,expiresAt:t.expiresAt})}catch{if(e.signal.aborted)return;P({kind:`error`,message:`The assistant could not start pairing. Refresh the page to try again.`})}})(),()=>{e.abort()}},[p,C]),(0,D.useEffect)(()=>{if(!p||!C?.deviceCode||!T)return;let e=new AbortController,t=null,n=async()=>{try{let r=await m(C.deviceCode,e.signal);if(r.status===`pending`){P({kind:`polling`,expiresAt:r.expiresAt||null}),t=setTimeout(()=>void n(),Math.max(1,r.intervalSeconds)*1e3);return}c(r),j(),P({kind:`approved`}),t=setTimeout(()=>f(b,{replace:!0}),250)}catch(t){if(e.signal.aborted)return;if(t instanceof u&&t.status===401){P({kind:`expired`});return}if(t instanceof u&&t.code===`GUARDIAN_REPAIR_REQUIRED`){P({kind:`error`,message:`The assistant's trust database needs repair. Run guardian repair on the machine hosting the assistant, then retry this same pairing link — the code stays valid.`});return}P({kind:`error`,message:`The assistant could not complete pairing. Try starting a new pairing.`})}};return n(),()=>{e.abort(),t&&clearTimeout(t)}},[p,C?.deviceCode,T,f,b]);let L=(0,D.useCallback)(()=>{M(!0),P({kind:`verifying`})},[]),R=(0,D.useMemo)(()=>F(),[]),z=(0,D.useCallback)(()=>{E(null,`select-assistant?noAutoSkip=1`).then(e=>{!e&&R&&window.location.assign(R)})},[R]);if(!p)return(0,O.jsx)(d,{});let B=k(N);return(0,O.jsx)(`main`,{className:`flex min-h-svh items-center justify-center bg-[var(--surface-base)] px-6 py-10 text-[var(--content-default)]`,children:(0,O.jsxs)(`section`,{className:`w-full max-w-md rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-lift)] p-8 shadow-[var(--shadow-sm)]`,children:[(0,O.jsxs)(`div`,{className:`mb-5 flex items-center gap-3`,children:[(0,O.jsx)(A,{state:N}),(0,O.jsx)(`h1`,{className:`text-title-medium text-[var(--content-emphasised)]`,children:B.title})]}),N.kind===`polling`&&C?.userCode?(0,O.jsxs)(`div`,{className:`mb-5 rounded-md border border-[var(--border-subtle)] bg-[var(--surface-sunken)] p-4 text-center`,children:[(0,O.jsx)(`div`,{className:`text-label-small-default uppercase tracking-wide text-[var(--content-tertiary)]`,children:e(`pairingPage.pairingCode`)}),(0,O.jsx)(`div`,{className:`mt-2 font-mono text-3xl font-semibold tracking-[0.18em] text-[var(--content-emphasised)]`,children:C.userCode})]}):null,(0,O.jsx)(`p`,{className:`text-body-medium-lighter leading-6 text-[var(--content-secondary)]`,children:B.body}),N.kind===`handoff_choice`&&C&&S?(0,O.jsx)(I,{deviceCode:C.deviceCode,platform:S,onContinueInBrowser:L}):null,N.kind===`polling`&&N.expiresAt?(0,O.jsx)(`p`,{className:`text-body-small-lighter mt-4 text-[var(--content-tertiary)]`,children:e(`pairingPage.expiresAt`,{time:new Date(N.expiresAt).toLocaleTimeString()})}):null,N.kind===`polling`&&R?(0,O.jsx)(n,{variant:`outlined`,fullWidth:!0,className:`mt-6`,onClick:z,children:e(`pairingPage.cancel`)}):null]})})}export{L as RemoteWebPairingPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{fx as e}from"./app-BBUxTj9g.js";import{r as t,t as n}from"./react-B9IgSVeK.js";var r=n();function i(){return(0,r.jsx)(t,{to:e.account.login,replace:!0})}export{i as PasswordResetPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Mn as e,fr as t,mr as n}from"./app-
|
|
1
|
+
import{Mn as e,fr as t,mr as n}from"./app-BBUxTj9g.js";import{t as r}from"./react-B9IgSVeK.js";import{t as i}from"./preview-error-CTmJUZ1U.js";var a=r();function o({blob:r,filename:o}){let s=t(r,`application/pdf`);return s===null?(0,a.jsx)(n,{}):(0,a.jsx)(`span`,{className:`block w-full [&_[data-slot=skeleton]]:w-full! [&_canvas]:w-full!`,children:(0,a.jsx)(e,{url:s,errorFallback:(0,a.jsx)(i,{filename:o})})})}export{o as PdfFilePreview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{NS as t,Pd as n,c_ as r,et as i,fx as a,iS as o,oS as s}from"./app-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{NS as t,Pd as n,c_ as r,et as i,fx as a,iS as o,oS as s}from"./app-BBUxTj9g.js";import{Zn as c,er as l,j as u}from"./vendor-ajttH1pP.js";import{r as d,t as f,x as p}from"./react-B9IgSVeK.js";import{t as m}from"./detail-card-BhMBZjzu.js";import{i as h,n as g,r as _,t as v}from"./personality-sliders-B_qi0jNr.js";var y=e(p(),1),b=f(),x=[{id:r.companionCoworker,leftKey:`personalityPage.axes.companionCoworker.left`,rightKey:`personalityPage.axes.companionCoworker.right`},{id:r.genzBoomer,leftKey:`personalityPage.axes.genzBoomer.left`,rightKey:`personalityPage.axes.genzBoomer.right`},{id:r.executeCollaborate,leftKey:`personalityPage.axes.executeCollaborate.left`,rightKey:`personalityPage.axes.executeCollaborate.right`},{id:r.playfulSerious,leftKey:`personalityPage.axes.playfulSerious.left`,rightKey:`personalityPage.axes.playfulSerious.right`},{id:r.politeUnfiltered,leftKey:`personalityPage.axes.politeUnfiltered.left`,rightKey:`personalityPage.axes.politeUnfiltered.right`}];function S(){let{t:e}=u(`settings`),r=i(),f=l(),p=n.use.vellumHostedInference(),S=n.use.hasHydrated(),C=c({queryKey:_(r),queryFn:()=>g(r)}),[w,T]=(0,y.useState)(null),[E,D]=(0,y.useState)(!1),O=w??C.data??{};if(S&&!p)return(0,b.jsx)(d,{replace:!0,to:a.settings.general});let k=()=>{D(!0),h(r,v(O)).then(t=>{D(!1),t?(f.invalidateQueries({queryKey:_(r)}),o.success(e(`personalityPage.saveSuccessToast`))):o.error(e(`personalityPage.saveErrorToast`))})},A=E||C.isLoading;return(0,b.jsxs)(`div`,{"data-slot":`personality-page`,className:`space-y-6`,children:[(0,b.jsx)(m,{title:e(`personalityPage.title`),subtitle:e(`personalityPage.subtitle`),children:C.isError?(0,b.jsx)(`p`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:e(`personalityPage.loadError`)}):(0,b.jsx)(`div`,{className:`flex flex-col gap-6`,children:x.map(t=>{let n=e(t.leftKey),r=e(t.rightKey);return(0,b.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,b.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,b.jsx)(`span`,{children:n}),(0,b.jsx)(`span`,{children:r})]}),(0,b.jsx)(s,{value:O[t.id]??50,onValueChange:e=>{typeof e==`number`&&T({...O,[t.id]:e})},min:0,max:100,step:1,disabled:A,"aria-label":e(`personalityPage.rangeAriaLabel`,{left:n,right:r})})]},t.id)})})}),(0,b.jsx)(t,{onClick:k,disabled:A||C.isError,children:e(E?`personalityPage.saving`:`personalityPage.save`)})]})}export{S as SettingsPersonalityPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Gm as t,IS as n,Qi as r,Yi as i,Zi as a,et as o,fx as s,hs as c,iS as l,ss as u}from"./app-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Gm as t,IS as n,Qi as r,Yi as i,Zi as a,et as o,fx as s,hs as c,iS as l,ss as u}from"./app-BBUxTj9g.js";import{I as d,Ut as f,Vt as p,Wt as m,Zn as h,er as g,j as _}from"./vendor-ajttH1pP.js";import{f as v,t as y,x as b}from"./react-B9IgSVeK.js";import{$ as x,za as S}from"./icons-C0wyat6T.js";import{i as C,n as w,r as T,t as E}from"./personality-sliders-B_qi0jNr.js";import{n as D,t as O}from"./peeking-eyes-mOU-kg71.js";import{a as k,i as A,n as j,r as M,t as N}from"./use-assistant-identity-details-BHojBIzM.js";import{r as P}from"./latest-assistant-text-Dnh6k0g4.js";var F=e(b(),1),I=y();function L({components:e,traits:t,stage:n,entrance:r=!1,entranceDelay:o=0}){let s=(0,F.useMemo)(()=>{let n=e.eyeStyles.find(e=>e.id===t.eyeStyle);return n?{paths:n.paths,bbox:a(n.paths.map(e=>i(e.svgPath)))}:null},[e,t.eyeStyle]);return s?(0,I.jsx)(D,{art:s,stage:n,entrance:r,entranceDelay:o}):null}var R=`#17191C`,z=24,B=.2,V=96,H=160,U=(0,F.createContext)(null);function W(){let e=(0,F.useContext)(U);if(!e)throw Error(`useAssistantStage must be used inside <AssistantStage>`);return e}function G({components:e,traits:t,customImageUrl:i,accentHex:a,entrance:o=!1,children:s,className:l}){let{ref:d,size:f}=r(),p=a??R,m=c(p),h=u.use.setSurface();(0,F.useLayoutEffect)(()=>(h(p),()=>{h(null)}),[p,h]);let g=!!(e&&t),_=!g&&!!i,v=Math.round(Math.min(H,Math.max(V,Math.min(f.w,f.h)*B))),y=f.h-v-z,b=g?Math.round(O*Math.min(f.w,f.h))+16:_?v+z+16:24;return(0,I.jsxs)(`div`,{ref:d,className:n(`relative flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-[var(--border-base)]`,`native-mobile:rounded-none native-mobile:border-0`,l),style:{backgroundColor:p,color:m.fg},children:[g&&e&&t&&(0,I.jsx)(L,{components:e,traits:t,stage:f,entrance:o}),_&&i&&(0,I.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[2] overflow-hidden rounded-full ring-4 ring-white/25`,style:{left:(f.w-v)/2,top:y,width:v,height:v},children:(0,I.jsx)(`img`,{src:i,alt:``,className:`h-full w-full object-cover`,draggable:!1})}),(0,I.jsx)(U.Provider,{value:{stage:f,tone:m,bottomReserve:b},children:(0,I.jsx)(`div`,{className:`relative z-10 flex min-h-0 flex-1 flex-col`,children:s})})]})}var K=`rgba(36, 41, 46, 0.25)`,q=`#FDFDFC`;function J({axis:e,value:t,onValueChange:n,tone:r,disabled:i}){let{t:a}=_(`intelligence`),o=a(e.leftKey),s=a(e.rightKey);return(0,I.jsxs)(`div`,{className:`flex w-full shrink-0 flex-wrap items-center gap-x-5 gap-y-1.5 sm:flex-nowrap`,style:{opacity:i?.7:1},children:[(0,I.jsx)(`span`,{className:`order-1 flex-1 text-left text-sm sm:w-32 sm:flex-none sm:text-right sm:text-[17px]`,style:{color:r.fg},children:o}),(0,I.jsx)(`span`,{className:`order-2 flex-1 text-right text-sm sm:order-3 sm:w-32 sm:flex-none sm:text-left sm:text-[17px]`,style:{color:r.fg},children:s}),(0,I.jsxs)(p,{"data-owns-horizontal-drag":``,className:`relative order-3 flex h-6 w-full touch-none items-center select-none sm:order-2 sm:w-auto sm:flex-1`,value:[t],onValueChange:e=>n(e[0]??k),disabled:i,min:0,max:100,step:1,"aria-label":a(`personalitySliderRow.rangeAriaLabel`,{left:o,right:s}),children:[(0,I.jsx)(m,{className:`relative h-2 w-full grow rounded-full sm:h-3`,style:{backgroundColor:K}}),(0,I.jsx)(f,{className:`block h-5 w-5 cursor-grab rounded-full shadow-sm transition-transform active:scale-95 active:cursor-grabbing keyboard-focus:outline-none keyboard-focus:ring-2 keyboard-focus:ring-white/70 data-[disabled]:cursor-not-allowed data-[disabled]:active:scale-100 sm:h-6 sm:w-6`,style:{backgroundColor:q}})]})]})}async function Y({assistantId:e,values:t,assistantName:n}){return M({assistantId:e,content:P(t,void 0,n),title:d(`applyPersonalityUpdate.conversationTitle`,{ns:`intelligence`}),context:`identity_personality_update`})}function X(){let{t:e}=_(`intelligence`),n=o(),r=v(),i=g(),{components:a,traits:c,customImageUrl:u,accentHex:d}=t(n),f=j(n),p=h({queryKey:T(n),queryFn:()=>w(n)}),[m,y]=(0,F.useState)(null),[b,x]=(0,F.useState)(!1),S=m??p.data??{},D=f.data?.identity?.name||e(`identityOverview.defaultAssistantName`);return(0,I.jsx)(G,{components:a,traits:c,customImageUrl:u,accentHex:d,entrance:!0,children:(0,I.jsx)(Z,{assistantName:D,values:S,onValueChange:(e,t)=>y({...S,[e]:t}),applying:b,onUpdate:()=>{x(!0);let t=E(S);Y({assistantId:n,values:t,assistantName:f.data?.identity?.name}).then(async a=>{x(!1),a?(await C(n,t),i.invalidateQueries({queryKey:T(n)}),i.invalidateQueries({queryKey:N(n)}),l.success(e(`personalityPage.updateSuccessToast`)),r(s.identity)):l.error(e(`personalityPage.updateErrorToast`))})},onBack:()=>void r(s.identity)})})}function Z({assistantName:e,values:t,onValueChange:n,applying:r,onUpdate:i,onBack:a}){let{t:o}=_(`intelligence`),{tone:s,bottomReserve:c}=W();return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{type:`button`,onClick:a,className:`absolute top-4 left-4 z-20 flex cursor-pointer items-center gap-1.5 rounded-full py-2 pr-4 pl-3 text-body-medium-default backdrop-blur-sm transition-all duration-150 active:scale-[0.97] ${s.isLight?`bg-black/10 hover:bg-black/20`:`bg-white/10 hover:bg-white/20`}`,style:{color:s.fg},children:[(0,I.jsx)(S,{className:`h-4 w-4`,"aria-hidden":!0}),o(`personalityPage.back`)]}),(0,I.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center overflow-y-auto px-6`,style:{paddingBottom:c},children:[(0,I.jsx)(`div`,{className:`w-full min-h-14 shrink-[4]`,style:{flexBasis:`12%`}}),(0,I.jsxs)(`div`,{className:`flex shrink-0 flex-col items-center gap-2 text-center`,children:[(0,I.jsx)(`h1`,{className:`text-[2.6rem] leading-none max-sm:text-[2rem]`,style:{fontFamily:`var(--font-serif)`},children:o(`personalityPage.title`)}),(0,I.jsx)(`p`,{className:`max-w-md text-[15px]`,style:{color:s.fgMuted},children:o(`personalityPage.subtitle`)})]}),(0,I.jsx)(`div`,{className:`w-full min-h-3 shrink-[2] basis-10`}),(0,I.jsx)(`div`,{className:`flex w-full max-w-2xl shrink-0 flex-col`,children:A.map((e,i)=>(0,I.jsxs)(F.Fragment,{children:[i>0&&(0,I.jsx)(`div`,{className:`w-full min-h-2.5 shrink basis-8 sm:basis-11`}),(0,I.jsx)(J,{axis:e,value:t[e.id]??k,onValueChange:t=>n(e.id,t),tone:s,disabled:r})]},e.id))}),(0,I.jsx)(`div`,{className:`w-full min-h-3 shrink-[2] basis-12`}),(0,I.jsx)(`button`,{type:`button`,onClick:i,disabled:r,className:`flex min-h-11 min-w-[240px] max-w-full shrink-0 cursor-pointer items-center justify-center gap-2 rounded-[10px] px-6 py-2 text-body-medium-default transition-transform duration-150 active:scale-[0.97] disabled:cursor-default disabled:opacity-80 disabled:active:scale-100`,style:{backgroundColor:s.isLight?`#1A1A1A`:`#FFFFFF`,color:s.isLight?`#FFFFFF`:`#1A1A1A`},children:r?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`h-4 w-4 shrink-0 animate-spin rounded-full border-2 border-transparent`,style:{borderTopColor:s.isLight?`#FFFFFF`:`#1A1A1A`,borderRightColor:s.isLight?`#FFFFFF`:`#1A1A1A`}}),(0,I.jsx)(`span`,{className:`min-w-0 text-center`,children:o(`personalityPage.updatingPersonality`,{name:e})})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(x,{className:`h-4 w-4`,"aria-hidden":!0}),o(`personalityPage.updatePersonality`)]})})]})]})}export{X as PersonalityPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ex as e,Ov as t,c_ as n,l_ as r,wv as i}from"./app-
|
|
1
|
+
import{Ex as e,Ov as t,c_ as n,l_ as r,wv as i}from"./app-BBUxTj9g.js";function a(e){return[`personality-sliders`,e]}function o(e){return typeof e!=`object`||!e||Array.isArray(e)?!1:Object.values(e).every(e=>typeof e==`number`)}function s(e){return Object.fromEntries(Object.values(n).map(t=>[t,e[t]??50]))}async function c(t){let{data:n,error:a,response:s}=await i({path:{assistant_id:t},query:{path:r},throwOnError:!1});if(e(s,a,`Failed to fetch personality sliders`),s.status===404)return null;if(!s.ok||!n)throw Error(`Failed to fetch personality sliders`);let c=JSON.parse(n.content);if(!o(c))throw Error(`Personality sliders sidecar is malformed`);return c}async function l(n,i){try{let{error:a,response:o}=await t({path:{assistant_id:n},body:{path:r,content:JSON.stringify(i,null,2),encoding:`utf-8`},throwOnError:!1});return e(o,a,`Failed to save personality sliders`),o.ok}catch{return!1}}export{l as i,c as n,a as r,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{$m as t,CS as n,Iv as r,Jp as i,Lm as a,Mh as o,NS as s,Pv as c,Xp as l,Yp as u,aS as d,bu as f,di as p,du as m,fu as h,fx as g,gS as _,iS as v,ny as y,px as b,sx as x,tS as S,vu as C,yu as w}from"./app-BfK0IQIk.js";import{Jn as T,N as ee,Zn as E,er as te,j as D}from"./vendor-ajttH1pP.js";import{_ as ne,f as O,t as re,x as ie}from"./react-B9IgSVeK.js";import{D as k,Yn as ae,it as oe,pi as A,xr as se,za as ce,zi as le}from"./icons-C0wyat6T.js";import{A as ue,B as de,E as j,F as M,I as N,K as fe,L as P,M as F,N as pe,O as I,P as me,R as he,S as ge,U as _e,W as ve,_ as ye,f as be,g as xe,h as Se,i as Ce,j as we,k as Te,n as Ee,o as De,q as Oe,r as ke,s as Ae,t as je,w as L,z as Me}from"./use-checkout-dismiss-refresh-q4n835g5.js";import{t as Ne}from"./android-billing-handoff-B_bu7Rr8.js";import{t as Pe}from"./checkout-return-target-CI8LVYVE.js";import{i as Fe,r as R,s as Ie,t as z}from"./machine-sizes-3x95p4n1.js";var B=e(ie(),1),V=`__none__`,Le=`__baseline__`,H=`${Fe[z]} machine (${R[z]})`;function Re(e){let{proPlan:t,seed:n,machineTier:r,storageTier:i,creditChoice:a,noBundleLabel:o}=e,s=t.machine_tiers,c=t.storage_tiers,l=t.credit_tiers??[],u=r===Le,d=u?null:s.find(e=>e.tier===r)??null,f=u?H:d?.description??null,p=c.find(e=>e.tier===i)??null,m=a&&a!==`__none__`?l.find(e=>e.tier===a)??null:null,h=n!=null&&n.machineTier!=null?s.find(e=>e.tier===n.machineTier)??null:null,g=n==null?null:n.machineTier??`__baseline__`,_=n==null?void 0:n.machineTier==null?H:h?.description,v=n==null?null:c.find(e=>e.tier===n.storageTier)??null,y=n!=null&&n.creditTier!=null?l.find(e=>e.tier===n.creditTier)??null:null,b=n!=null&&n.machineTier!=null&&h==null,x=n!=null&&v==null,S=n!=null&&n.hasPlatformFee===!1,C=[{key:`base`,label:`Platform fee: ${ue(t.base_price_cents)}`,changed:S}];if(f!=null){let e=n!=null&&!b&&g!==r;C.push({key:`machine`,label:f,previousLabel:e?_:void 0,changed:e})}if(p!=null){let e=n!=null&&!x&&v?.tier!==p.tier;C.push({key:`storage`,label:F(p.storage_gib),previousLabel:e&&v!=null?F(v.storage_gib):void 0,changed:e})}let w=a===`__none__`?o:m==null?null:m.label;if(w!=null){let e=n!=null&&(n.creditTier??`__none__`)!==a,t=n?.creditTier==null?o:y?.label;C.push({key:`credit`,label:w,previousLabel:e?t:void 0,changed:e})}let T=t.base_price_cents+(d?.price_cents??0)+(p?.price_cents??0)+(m?.price_cents??0),ee=b||x||n!=null&&n.creditTier!=null&&y==null;if(n==null||ee)return{totalCents:T,previousTotalCents:null,deltaCents:null,rows:C};let E=(S?0:t.base_price_cents)+(h?.price_cents??0)+(v?.price_cents??0)+(y?.price_cents??0);return{totalCents:T,previousTotalCents:E,deltaCents:T-E,rows:C}}var ze=`https://www.vellum.ai/docs/pricing`,U=`${ze}#machine-sizes`,Be=`${ze}#storage`,Ve=`${ze}#credit-bundles`,W=re();function G(e){return(0,W.jsxs)(`span`,{className:`text-[12px] font-medium text-[var(--content-disabled)]`,children:[`+`,ue(e)]})}function K({label:e,docsUrl:t,docsLabel:n,learnMore:r}){return(0,W.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,W.jsx)(`span`,{className:`text-[11px] font-medium text-[var(--content-secondary)]`,children:e}),(0,W.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,"aria-label":n,onClick:e=>c(e,t),className:`text-[11px] font-medium text-[var(--content-tertiary)] underline hover:text-[var(--content-default)]`,children:r})]})}function He({open:e,proPlan:t,pending:n,currentStorageGib:r,initialSelection:i,onClose:a,onContinue:o}){let{t:c}=D(`settings`),l=c(`customPlanModal.noExtraUsage`),u=e?i??null:null,[f,p]=(0,B.useState)(()=>u?u.machineTier??`__baseline__`:``),[m,h]=(0,B.useState)(()=>u?.storageTier??``),[g,_]=(0,B.useState)(()=>u?u.creditTier??`__none__`:``),[v,y]=(0,B.useState)({open:e,initialSelection:i});(v.open!==e||v.initialSelection!==i)&&(y({open:e,initialSelection:i}),p(u?u.machineTier??`__baseline__`:``),h(u?.storageTier??``),_(u?u.creditTier??`__none__`:``));let b=t.machine_tiers,x=(0,B.useMemo)(()=>t.storage_tiers.filter(e=>!e.legacy||e.tier===i?.storageTier),[t.storage_tiers,i?.storageTier]),C=t.credit_tiers??[],w=(0,B.useMemo)(()=>(t.credit_tiers??[]).filter(e=>!e.legacy),[t.credit_tiers]),T=e=>ge(e)||e.legacy&&e.tier!==i?.storageTier||r!=null&&e.storage_gib<r,ee=i!=null&&i.machineTier==null,E=[...ee?[{value:Le,label:H,icon:(0,W.jsx)(Oe,{className:`h-4 w-4`,"aria-hidden":!0}),disabled:!0}]:[],...b.map(e=>({value:e.tier,label:e.description,icon:(0,W.jsx)(Oe,{className:`h-4 w-4`,"aria-hidden":!0}),suffix:G(e.price_cents),disabled:ge(e)}))],te=x.map(e=>({value:e.tier,label:e.label,icon:(0,W.jsx)(se,{className:`h-4 w-4`,"aria-hidden":!0}),suffix:G(e.price_cents),disabled:T(e)})),ne=g&&g!==`__none__`?C.find(e=>e.tier===g)??null:null,O=ne?.legacy?ne:null,re=[{value:V,label:l,icon:(0,W.jsx)(A,{className:`h-4 w-4`,"aria-hidden":!0})},...w.map(e=>({value:e.tier,label:e.label,icon:(0,W.jsx)(A,{className:`h-4 w-4`,"aria-hidden":!0}),suffix:G(e.price_cents)})),...O?[{value:O.tier,label:O.label,icon:(0,W.jsx)(A,{className:`h-4 w-4`,"aria-hidden":!0}),suffix:G(O.price_cents),disabled:!0}]:[]],ie=f===Le,k=ie?null:b.find(e=>e.tier===f)??null,ae=ie?ee?{tier:null}:null:k==null?null:{tier:k.tier},ce=m!==``&&m===i?.storageTier,de=x.find(e=>e.tier===m&&(ce||!T(e)))??null,j=g===`__none__`||g===i?.creditTier||w.some(e=>e.tier===g),M=g!==``&&j?g:null,N=ae!=null&&de!=null&&M!=null,fe=i!=null&&i.hasPlatformFee!==!1&&f===(i.machineTier??`__baseline__`)&&m===i.storageTier&&g===(i.creditTier??`__none__`),P=(0,B.useMemo)(()=>Re({proPlan:t,seed:i??null,machineTier:f,storageTier:m,creditChoice:g,noBundleLabel:l}),[t,i,f,m,g,l]);return(0,W.jsx)(d.Root,{open:e,onOpenChange:e=>{e||a()},children:(0,W.jsx)(d.Content,{size:`lg`,"data-theme":`light`,hideCloseButton:!0,overlayClassName:`backdrop-blur-[2px]`,className:`max-w-[820px] md:min-h-[min(608px,calc(100vh-4rem))]`,children:(0,W.jsx)(d.Body,{className:`p-4`,children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-8 md:flex-row md:gap-12`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-6 md:flex-1`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,W.jsx)(`div`,{className:`flex shrink-0 items-center justify-center rounded-xl bg-[var(--surface-active)] p-[14px]`,children:(0,W.jsx)(oe,{className:`h-6 w-6 text-[var(--content-emphasised)]`,"aria-hidden":!0})}),(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(d.Title,{className:`text-[16px] font-medium text-[var(--content-emphasised)]`,children:c(`customPlanModal.title`)}),(0,W.jsx)(d.Description,{className:`mt-0 text-[14px] font-medium leading-[18px] text-[var(--content-tertiary)]`,children:c(`customPlanModal.subtitle`)})]})]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(K,{label:c(`customPlanModal.machineSizeLabel`),docsUrl:U,docsLabel:c(`customPlanModal.machineSizeDocsAriaLabel`),learnMore:c(`customPlanModal.learnMore`)}),(0,W.jsx)(S,{"aria-label":c(`customPlanModal.machineSizeAriaLabel`),placeholder:c(`customPlanModal.machineSizePlaceholder`),value:f,onChange:p,options:E})]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(K,{label:c(`customPlanModal.storageLabel`),docsUrl:Be,docsLabel:c(`customPlanModal.storageDocsAriaLabel`),learnMore:c(`customPlanModal.learnMore`)}),(0,W.jsx)(S,{"aria-label":c(`customPlanModal.storageAriaLabel`),placeholder:c(`customPlanModal.storagePlaceholder`),value:m,onChange:h,options:te})]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(K,{label:c(`customPlanModal.usageBundleLabel`),docsUrl:Ve,docsLabel:c(`customPlanModal.usageBundleDocsAriaLabel`),learnMore:c(`customPlanModal.learnMore`)}),(0,W.jsx)(S,{"aria-label":c(`customPlanModal.usageBundleAriaLabel`),placeholder:c(`customPlanModal.usageBundlePlaceholder`),value:g,onChange:_,options:re})]})]}),(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-16 md:pt-[5px]`,children:[(0,W.jsx)(`span`,{className:`text-[16px] font-medium text-[var(--content-emphasised)]`,children:c(`customPlanModal.recap`)}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`span`,{className:`text-[24px] font-medium text-[var(--content-default)]`,children:ue(P.totalCents)}),P.deltaCents!=null&&P.deltaCents!==0&&P.previousTotalCents!=null&&(0,W.jsx)(`span`,{className:`text-[12px] font-medium ${P.deltaCents>0?`text-[var(--system-positive-strong)]`:`text-[var(--system-negative-strong)]`}`,children:c(`customPlanModal.comparedToPrevious`,{delta:I(P.deltaCents),previous:Te(P.previousTotalCents)})}),(0,W.jsx)(`span`,{className:`text-[11px] font-medium text-[var(--content-tertiary)]`,children:c(`customPlanModal.totalBilledMonthly`)})]}),(0,W.jsx)(`div`,{className:`h-px w-full bg-[var(--border-hover)]`}),(0,W.jsx)(`span`,{className:`text-[12px] font-medium text-[var(--content-tertiary)]`,children:c(`customPlanModal.yourSelection`)}),(0,W.jsx)(`ul`,{className:`flex flex-col gap-2`,children:P.rows.map(e=>(0,W.jsxs)(`li`,{className:`flex flex-col gap-2`,children:[e.previousLabel!=null&&(0,W.jsxs)(`div`,{className:`relative flex w-fit items-start gap-2`,children:[(0,W.jsx)(le,{className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-disabled)]`,"aria-hidden":!0}),(0,W.jsx)(`s`,{className:`text-[14px] font-medium leading-[18px] text-[var(--content-disabled)] no-underline`,children:e.previousLabel}),(0,W.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute -left-1 right-0 top-[9px] h-px bg-[var(--content-disabled)]`})]}),(0,W.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,W.jsx)(le,{className:`mt-0.5 h-4 w-4 shrink-0 ${e.changed?`text-[var(--system-positive-strong)]`:`text-[var(--content-secondary)]`}`,"aria-hidden":!0}),(0,W.jsx)(`span`,{className:`text-[14px] font-medium leading-[18px] text-[var(--content-secondary)]`,children:e.label})]})]},e.key))}),(0,W.jsx)(s,{variant:`primary`,fullWidth:!0,disabled:!N||fe||n,onClick:()=>{!N||fe||n||o({machineTier:ae.tier,storageTier:de.tier,creditTier:M===`__none__`?null:M})},children:c(`customPlanModal.continue`)}),(0,W.jsx)(s,{variant:`ghost`,fullWidth:!0,disabled:n,onClick:a,children:c(`customPlanModal.cancel`)})]})]})]})})})})}function Ue({className:e,onConfigure:t,configureDisabled:n,isCurrent:r=!1,currentSummary:i}){let{t:a}=D(`settings`);return(0,W.jsxs)(`div`,{className:`flex w-full flex-col items-center gap-8 ${e??``}`,children:[(0,W.jsx)(`p`,{className:`text-center text-[20px] font-medium text-[var(--content-tertiary)]`,children:a(`customPlanRow.prompt`)}),(0,W.jsxs)(`div`,{className:`flex w-[840px] max-w-full flex-col items-start gap-4 rounded-2xl bg-[var(--surface-lift)] p-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-4`,children:[(0,W.jsx)(`div`,{className:`flex shrink-0 items-center justify-center rounded-xl bg-[var(--content-disabled)] p-[14px]`,children:(0,W.jsx)(oe,{className:`h-6 w-6 text-[var(--aux-white)]`,"aria-hidden":!0})}),(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`text-[16px] font-medium text-[var(--content-emphasised)]`,children:a(`customPlanRow.title`)}),r?(0,W.jsx)(_,{className:`bg-[var(--feed-digest-weak)] text-[var(--content-default)]`,children:a(`customPlanRow.currentPlanTag`)}):null]}),(0,W.jsx)(`span`,{className:`text-[14px] font-medium text-[var(--content-tertiary)]`,children:i??a(`customPlanRow.genericDescriptor`)})]})]}),(0,W.jsx)(`div`,{className:`flex shrink-0 items-center gap-3`,children:(0,W.jsx)(s,{variant:`outlined`,onClick:t,disabled:n,children:a(`customPlanRow.configure`)})})]})]})}function We({open:e,pending:t,onCancel:n,...r}){return(0,W.jsx)(d.Root,{open:e,onOpenChange:e=>{!e&&!t&&n()},children:(0,W.jsx)(d.Content,{size:`md`,hideCloseButton:!0,children:(0,W.jsx)(Ge,{pending:t,onCancel:n,...r})})})}function Ge({lostFeatures:e,viaPortal:t,pending:r,onCancel:i,onConfirm:a}){let{t:o}=D(`settings`),c=e.length>0,[l,u]=(0,B.useState)(N),f=t||P(l);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(d.Header,{icon:k,children:(0,W.jsx)(d.Title,{children:o(`freeDowngradeConfirmModal.title`)})}),(0,W.jsxs)(d.Body,{children:[(0,W.jsx)(n,{as:`p`,variant:`body-medium-default`,className:`text-(--content-secondary)`,children:o(t?c?`freeDowngradeConfirmModal.bodyWithFeaturesPortal`:`freeDowngradeConfirmModal.bodyCancelOnlyPortal`:c?`freeDowngradeConfirmModal.bodyWithFeatures`:`freeDowngradeConfirmModal.bodyCancelOnly`)}),c?(0,W.jsx)(`ul`,{className:`mt-4 list-disc space-y-2 pl-5`,children:e.map(e=>(0,W.jsx)(`li`,{children:(0,W.jsx)(n,{as:`span`,variant:`body-medium-default`,children:e})},e))}):null,t?null:(0,W.jsx)(M,{value:l,onChange:u,disabled:r})]}),(0,W.jsxs)(d.Footer,{children:[(0,W.jsx)(s,{variant:`outlined`,onClick:i,disabled:r,children:o(`freeDowngradeConfirmModal.cancel`)}),(0,W.jsx)(s,{variant:`danger`,onClick:()=>a(l),disabled:r||!f,"data-testid":`confirm-free-downgrade-button`,children:o(`freeDowngradeConfirmModal.confirm`)})]})]})}function Ke({tierKey:e,name:t,tagline:n,priceLabel:r,priceCaption:i,ctaLabel:a,features:o,recommended:c=!1,tone:l=`dark`,isCurrent:u,intent:d=`upgrade`,pending:f,onCta:p}){let{t:m}=D(`settings`),h=d===`downgrade`&&!u;return(0,W.jsxs)(`div`,{"data-theme":l,className:`flex w-full flex-col gap-3 rounded-2xl bg-[var(--surface-lift)] p-3 sm:gap-4 sm:p-4`,children:[(0,W.jsx)(me,{tier:e,size:50}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,W.jsxs)(`div`,{className:`flex h-8 items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`text-[20px] font-medium text-[var(--content-emphasised)]`,children:t}),c&&!h&&!u?(0,W.jsx)(_,{className:`bg-[var(--feed-digest-weak)] text-[12px] font-semibold uppercase text-[var(--credits-accent)]`,children:m(`planColumnCard.recommended`)}):null]}),(0,W.jsx)(`p`,{className:`overflow-hidden text-[14px] font-medium leading-[18px] text-[var(--content-tertiary)] sm:h-9`,children:n})]}),(0,W.jsx)(`div`,{className:`h-px w-full bg-[var(--border-hover)]`}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`span`,{className:`text-[24px] font-medium text-[var(--content-default)]`,children:r}),(0,W.jsx)(`span`,{className:`text-[11px] font-medium text-[var(--content-tertiary)]`,children:i})]}),(0,W.jsx)(s,{variant:h?`outlined`:`primary`,fullWidth:!0,disabled:u||f,onClick:p,children:u?m(`planColumnCard.currentPlan`):a}),(0,W.jsx)(`div`,{className:`h-px w-full bg-[var(--border-hover)]`}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-2 sm:gap-4`,children:[(0,W.jsx)(`span`,{className:`text-[12px] font-medium text-[var(--content-tertiary)]`,children:m(`planColumnCard.includes`)}),(0,W.jsx)(`ul`,{className:`flex flex-col gap-2`,children:o.map(e=>(0,W.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,W.jsx)(le,{className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-secondary)]`,"aria-hidden":!0}),(0,W.jsx)(`span`,{className:`text-[14px] font-medium text-[var(--content-secondary)]`,children:e})]},e))})]})]})}function qe(e,t){return t(`plansPage.featureComputer`,{machine:j(e)})}function Je(e,t,n){return[qe(e,n),n(`plansPage.featureStorage`,{gib:e.storage_gib}),n(`plansPage.featureUsage`,{name:e.name}),...t]}function Ye(e){return[e(`plansPage.freeFeatureSmallComputer`),e(`plansPage.freeFeatureStorage`,{gib:4}),e(`plansPage.freeFeaturePayAsYouGo`)]}var Xe=`#0A0A0B`,Ze=8e3,Qe={upgrade:`upgrade`,downgrade:`downgrade`,switch:`change`};p();function $e(e,t){return L(e,t).join(` · `)}function q(){let{t:e}=D(`settings`),n=O(),[c,d]=ne(),p=te(),_=b(),S=l({platformHostedOnly:!0}),re=i(),ie=u(),k=S===`full`&&re,oe=S===`full`&&ie,A=E({...C(),enabled:k}),se=E({...m(),enabled:k}),le=T(f()),{changePackage:ue,isPending:j}=ke(),{changeTiers:M,isPending:N,current:P,currentReady:F,currentKnown:I,primaryAssistantId:me}=Ce({enabled:k});je();let[ge,Te]=(0,B.useState)(!1),[Oe,L]=(0,B.useState)(!1),[Fe,R]=(0,B.useState)(!1),[z,V]=(0,B.useState)(null),[Le,H]=(0,B.useState)(!1),[Re,U]=(0,B.useState)(void 0),Be=(0,B.useRef)(!1),[Ve,G]=(0,B.useState)(!1),K=(0,B.useRef)(!1),[Ge,qe]=(0,B.useState)(null),q=A.data,J=se.data?.plans.find(e=>e.id===`pro`),et=J?.packages??[],tt=et.length>0,Y=q?.plan_id===`pro`,nt=t(),rt=fe(me,k&&nt&&Y&&I),it=I?rt:void 0,X=q?q.plan_id===`base`?`free`:de(q.package)?q.package.key:null:null,{cancelSubscription:at,isPending:ot}=De(),st=xe(q),ct=be(Ae(q)),lt=o(),ut=new Set(se.data?.plans.find(e=>e.id===`base`)?.included_features??[]),dt=(J?.included_features??[]).filter(e=>!ut.has(e)),Z=ge||j||ot||ct.isPending,ft=(0,B.useMemo)(()=>!Y||P.storageTier==null?null:{machineTier:P.machineTier,storageTier:P.storageTier,creditTier:P.creditTier,hasPlatformFee:P.hasPlatformFee},[Y,P.machineTier,P.storageTier,P.creditTier,P.hasPlatformFee]),Q=c.get(x),pt=!k&&!oe,mt=k&&!se.isLoading&&!tt,$=pt||!(Q!=null&&!Ve)&&(A.isError||mt);(0,B.useEffect)(()=>{$&&n(pt?g.settings.usageBilling:`${g.settings.usageBilling}&adjust_plan`,{replace:!0})},[$,pt,n]);let ht=()=>{(window.history.state?.idx??0)>0?n(-1):n(g.settings.usageBilling)},gt=async t=>{Te(!0);try{let e=await le.mutateAsync({body:{...t,return_target:Pe()}});e.status===`redirect`&&e.checkout_url?(y(t.package?{kind:`package`,packageKey:t.package}:{kind:`custom`,machineTier:t.machine_tier??null,storageTier:t.storage_tier??null,creditTier:t.credit_tier??null}),a(p),r(e.checkout_url)):(await p.invalidateQueries({queryKey:w()}),await p.invalidateQueries({queryKey:h()}))}catch(t){v.error(Se(t,e(`plansPage.checkoutFailedToast`)))}finally{Te(!1)}},_t=(e,t)=>{if(q&&!Z){if(lt){Ne(g.plans);return}if(Y){if(e===`free`){R(!0);return}let r=et.find(t=>t.key===e);if(!r||_e(X,r.key)===`current`)return;if(!ye(q)){n(`${g.settings.usageBilling}&adjust_plan`,{replace:t?.replaceOnBail===!0});return}V(r);return}e!==`free`&>({target_plan_id:`pro`,package:e,confirm:!0})}},vt=(0,B.useRef)(_t);(0,B.useEffect)(()=>{vt.current=_t}),(0,B.useEffect)(()=>{if(Q==null||Be.current||$||!k||K.current)return;K.current=!0;let e=setTimeout(()=>{G(!0)},Ze),t=()=>{clearTimeout(e),G(!0)};Promise.all([p.refetchQueries({queryKey:w()}),p.refetchQueries({queryKey:h()})]).then(t,t)},[$,Q,k,p]),(0,B.useEffect)(()=>{Q==null||Be.current||$||!k||!Ve||(Be.current=!0,Y&&Q!==`free`&&qe(Q),d(e=>{let t=new URLSearchParams(e);return t.delete(x),t},{replace:!0}))},[Ve,$,Q,k,Y,d]),(0,B.useEffect)(()=>{Ge==null||Q!=null||(qe(null),vt.current(Ge,{replaceOnBail:!0}))},[Q,Ge]);let yt;if(q&&J&&tt){let t=Y&&X===null&&F&&P.storageGib!=null,r=t?$e(P,J):void 0,i=async e=>{if(!st){R(!1),ct.mutate({});return}await at(he(e))&&(R(!1),n(g.settings.usageBilling,{replace:!0}))},a=()=>({creditTier:P.creditTier,fromSnapshot:{machineSize:it?.machine_size??null,storageGib:it?.provisioned_storage_gib??null}}),o=z?X===null?`switch`:_e(X,z.key)===`downgrade`?`downgrade`:`upgrade`:`upgrade`,s=async()=>{if(!z)return;let t=z,n=a(),r=X===null||!F||!I||Ie(P.machineTier,t.machine_tier),i=await ue(t.key);if(!i)return;if(V(null),i.status===`no_op`){v.success(e(`plansPage.alreadyOnPlanToast`));return}let s=t.credit_tier??null;U({fromSnapshot:n.fromSnapshot,credits:s===n.creditTier?null:{fromTier:n.creditTier,toTier:s},direction:Qe[o],canLowerResources:r}),H(!0)},c=e=>gt({target_plan_id:`pro`,confirm:!0,machine_tier:e.machineTier,storage_tier:e.storageTier,credit_tier:e.creditTier}),l=async t=>{let n=a(),r=!I||Ie(P.machineTier,t.machineTier),i=await M(t,ft??void 0);i&&(L(!1),i.needsResize||i.creditChanged?(U({fromSnapshot:n.fromSnapshot,credits:i.creditChanged?{fromTier:n.creditTier,toTier:t.creditTier}:null,direction:`change`,canLowerResources:r}),H(!0)):v.success(e(`plansPage.planUpdatedToast`)))},u=()=>{if(!Z){if(lt){Ne(g.plans);return}Y&&!F||L(!0)}},d=[...et].sort((e,t)=>Me.indexOf(e.key)-Me.indexOf(t.key)),f=pe(`free`),p=Y?`downgrade`:_e(X,`free`),m=Ye(e);yt=(0,W.jsxs)(`div`,{className:`my-auto flex w-full flex-col items-center`,children:[(0,W.jsxs)(`header`,{className:`flex flex-col items-center gap-2 text-center`,children:[(0,W.jsx)(`h1`,{className:`text-[40px] text-[var(--content-emphasised)] sm:text-[60px]`,style:{fontFamily:`var(--font-serif)`,fontWeight:400,lineHeight:1.2,letterSpacing:`1.2px`},children:e(`plansPage.heading`)}),(0,W.jsx)(`p`,{className:`text-[20px] font-medium text-[var(--content-tertiary)]`,children:e(`plansPage.subheading`)})]}),(0,W.jsxs)(`div`,{className:`mt-6 grid w-full max-w-[1312px] grid-cols-1 gap-4 sm:mt-10 sm:grid-cols-2 sm:gap-6 lg:grid-cols-4`,children:[(0,W.jsx)(Ke,{tierKey:`free`,name:`Base`,tagline:f?.tagline??``,priceLabel:e(`plansPage.freePriceLabel`),priceCaption:f?.priceCaption??e(`plansPage.foreverCaption`),ctaLabel:p===`downgrade`?e(`plansPage.downgradeTo`,{name:`Base`}):f?.cta??e(`plansPage.startFreeCta`),features:m,tone:`dark`,isCurrent:X===`free`,intent:p,pending:Z,onCta:()=>_t(`free`)}),d.map(t=>{let n=pe(t.key),r=_e(X,t.key);return(0,W.jsx)(Ke,{tierKey:t.key,name:t.name,tagline:n?.tagline??``,priceLabel:we(t.total_price_cents),priceCaption:n?.priceCaption??e(`plansPage.billedMonthlyCaption`),ctaLabel:r===`downgrade`?e(`plansPage.downgradeTo`,{name:t.name}):n?.cta??t.name,features:Je(t,n?.extraFeatures??[],e),recommended:n?.recommended,tone:n?.recommended?`light`:`dark`,isCurrent:X===t.key,intent:r,pending:Z,onCta:()=>_t(t.key)},t.key)})]}),(0,W.jsx)(Ue,{className:`mt-6 sm:mt-10`,onConfigure:u,configureDisabled:Y&&!F||Z,isCurrent:t,currentSummary:r}),(0,W.jsx)(He,{open:Oe,proPlan:J,pending:ge||N,currentStorageGib:Y?P.storageGib:null,initialSelection:ft,onClose:()=>L(!1),onContinue:e=>{Y?l(e):c(e)}}),(0,W.jsx)(Ee,{open:z!==null,relation:o,packageName:z?.name??``,targetPackage:z,pending:j,onCancel:()=>V(null),onConfirm:()=>void s()}),(0,W.jsx)(We,{open:Fe,lostFeatures:dt,viaPortal:!st,pending:ot||ct.isPending,onCancel:()=>R(!1),onConfirm:e=>void i(e)}),(0,W.jsx)(ve,{mode:`resize`,open:Le,onClose:()=>{H(!1),U(void 0)},resizeContext:Re}),(0,W.jsx)(`p`,{className:`mt-6 text-center text-[12px] font-medium text-[var(--content-tertiary)] sm:mt-10`,children:(0,W.jsx)(ee,{ns:`settings`,i18nKey:`plansPage.cancelAnytimeFooter`,components:{docsLink:(0,W.jsx)(`a`,{href:ze,target:`_blank`,rel:`noopener noreferrer`,className:`text-[var(--content-default)] underline`})}})})]})}else yt=(0,W.jsx)(`div`,{className:`my-auto flex items-center justify-center`,children:(0,W.jsx)(ae,{className:`h-6 w-6 animate-spin text-[var(--content-tertiary)]`,"aria-label":e(`plansPage.loadingPlansAriaLabel`)})});return(0,W.jsxs)(`div`,{"data-theme":`dark`,className:`plans-takeover-canvas-enter relative h-full w-full overflow-y-auto`,style:{backgroundColor:Xe},children:[(0,W.jsx)(`div`,{className:`absolute left-8 z-10 [-webkit-app-region:no-drag]`,style:{top:_?`3rem`:`2rem`},children:(0,W.jsx)(s,{variant:`outlined`,leftIcon:(0,W.jsx)(ce,{className:`h-4 w-4`,"aria-hidden":!0}),onClick:ht,className:`[-webkit-app-region:no-drag]`,children:e(`plansPage.back`)})}),(0,W.jsx)(`div`,{className:`plans-takeover-content-enter flex min-h-full flex-col items-center px-4 pb-8 sm:px-6`,style:{paddingTop:_?`5rem`:`4rem`},children:yt})]})}function J(){return(0,W.jsx)(q,{})}export{J as PlansPage};
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{$m as t,CS as n,Iv as r,Jp as i,Lm as a,Mh as o,NS as s,Pv as c,Xp as l,Yp as u,aS as d,bu as f,di as p,du as m,fu as h,fx as g,gS as _,iS as v,ny as y,px as b,sx as x,tS as S,vu as C,yu as w}from"./app-BBUxTj9g.js";import{Jn as T,N as ee,Zn as E,er as te,j as D}from"./vendor-ajttH1pP.js";import{_ as ne,f as O,t as re,x as ie}from"./react-B9IgSVeK.js";import{D as k,Yn as ae,it as oe,pi as A,xr as se,za as ce,zi as le}from"./icons-C0wyat6T.js";import{A as ue,B as de,E as j,F as M,I as N,K as fe,L as P,M as F,N as pe,O as I,P as me,R as he,S as ge,U as _e,W as ve,_ as ye,f as be,g as xe,h as Se,i as Ce,j as we,k as Te,n as Ee,o as De,q as Oe,r as ke,s as Ae,t as je,w as L,z as Me}from"./use-checkout-dismiss-refresh-DbSG9nq4.js";import{t as Ne}from"./android-billing-handoff-BBh13NBZ.js";import{t as Pe}from"./checkout-return-target-DWik-led.js";import{i as Fe,r as R,s as Ie,t as z}from"./machine-sizes-3x95p4n1.js";var B=e(ie(),1),V=`__none__`,Le=`__baseline__`,H=`${Fe[z]} machine (${R[z]})`;function Re(e){let{proPlan:t,seed:n,machineTier:r,storageTier:i,creditChoice:a,noBundleLabel:o}=e,s=t.machine_tiers,c=t.storage_tiers,l=t.credit_tiers??[],u=r===Le,d=u?null:s.find(e=>e.tier===r)??null,f=u?H:d?.description??null,p=c.find(e=>e.tier===i)??null,m=a&&a!==`__none__`?l.find(e=>e.tier===a)??null:null,h=n!=null&&n.machineTier!=null?s.find(e=>e.tier===n.machineTier)??null:null,g=n==null?null:n.machineTier??`__baseline__`,_=n==null?void 0:n.machineTier==null?H:h?.description,v=n==null?null:c.find(e=>e.tier===n.storageTier)??null,y=n!=null&&n.creditTier!=null?l.find(e=>e.tier===n.creditTier)??null:null,b=n!=null&&n.machineTier!=null&&h==null,x=n!=null&&v==null,S=n!=null&&n.hasPlatformFee===!1,C=[{key:`base`,label:`Platform fee: ${ue(t.base_price_cents)}`,changed:S}];if(f!=null){let e=n!=null&&!b&&g!==r;C.push({key:`machine`,label:f,previousLabel:e?_:void 0,changed:e})}if(p!=null){let e=n!=null&&!x&&v?.tier!==p.tier;C.push({key:`storage`,label:F(p.storage_gib),previousLabel:e&&v!=null?F(v.storage_gib):void 0,changed:e})}let w=a===`__none__`?o:m==null?null:m.label;if(w!=null){let e=n!=null&&(n.creditTier??`__none__`)!==a,t=n?.creditTier==null?o:y?.label;C.push({key:`credit`,label:w,previousLabel:e?t:void 0,changed:e})}let T=t.base_price_cents+(d?.price_cents??0)+(p?.price_cents??0)+(m?.price_cents??0),ee=b||x||n!=null&&n.creditTier!=null&&y==null;if(n==null||ee)return{totalCents:T,previousTotalCents:null,deltaCents:null,rows:C};let E=(S?0:t.base_price_cents)+(h?.price_cents??0)+(v?.price_cents??0)+(y?.price_cents??0);return{totalCents:T,previousTotalCents:E,deltaCents:T-E,rows:C}}var ze=`https://www.vellum.ai/docs/pricing`,U=`${ze}#machine-sizes`,Be=`${ze}#storage`,Ve=`${ze}#credit-bundles`,W=re();function G(e){return(0,W.jsxs)(`span`,{className:`text-[12px] font-medium text-[var(--content-disabled)]`,children:[`+`,ue(e)]})}function K({label:e,docsUrl:t,docsLabel:n,learnMore:r}){return(0,W.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,W.jsx)(`span`,{className:`text-[11px] font-medium text-[var(--content-secondary)]`,children:e}),(0,W.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,"aria-label":n,onClick:e=>c(e,t),className:`text-[11px] font-medium text-[var(--content-tertiary)] underline hover:text-[var(--content-default)]`,children:r})]})}function He({open:e,proPlan:t,pending:n,currentStorageGib:r,initialSelection:i,onClose:a,onContinue:o}){let{t:c}=D(`settings`),l=c(`customPlanModal.noExtraUsage`),u=e?i??null:null,[f,p]=(0,B.useState)(()=>u?u.machineTier??`__baseline__`:``),[m,h]=(0,B.useState)(()=>u?.storageTier??``),[g,_]=(0,B.useState)(()=>u?u.creditTier??`__none__`:``),[v,y]=(0,B.useState)({open:e,initialSelection:i});(v.open!==e||v.initialSelection!==i)&&(y({open:e,initialSelection:i}),p(u?u.machineTier??`__baseline__`:``),h(u?.storageTier??``),_(u?u.creditTier??`__none__`:``));let b=t.machine_tiers,x=(0,B.useMemo)(()=>t.storage_tiers.filter(e=>!e.legacy||e.tier===i?.storageTier),[t.storage_tiers,i?.storageTier]),C=t.credit_tiers??[],w=(0,B.useMemo)(()=>(t.credit_tiers??[]).filter(e=>!e.legacy),[t.credit_tiers]),T=e=>ge(e)||e.legacy&&e.tier!==i?.storageTier||r!=null&&e.storage_gib<r,ee=i!=null&&i.machineTier==null,E=[...ee?[{value:Le,label:H,icon:(0,W.jsx)(Oe,{className:`h-4 w-4`,"aria-hidden":!0}),disabled:!0}]:[],...b.map(e=>({value:e.tier,label:e.description,icon:(0,W.jsx)(Oe,{className:`h-4 w-4`,"aria-hidden":!0}),suffix:G(e.price_cents),disabled:ge(e)}))],te=x.map(e=>({value:e.tier,label:e.label,icon:(0,W.jsx)(se,{className:`h-4 w-4`,"aria-hidden":!0}),suffix:G(e.price_cents),disabled:T(e)})),ne=g&&g!==`__none__`?C.find(e=>e.tier===g)??null:null,O=ne?.legacy?ne:null,re=[{value:V,label:l,icon:(0,W.jsx)(A,{className:`h-4 w-4`,"aria-hidden":!0})},...w.map(e=>({value:e.tier,label:e.label,icon:(0,W.jsx)(A,{className:`h-4 w-4`,"aria-hidden":!0}),suffix:G(e.price_cents)})),...O?[{value:O.tier,label:O.label,icon:(0,W.jsx)(A,{className:`h-4 w-4`,"aria-hidden":!0}),suffix:G(O.price_cents),disabled:!0}]:[]],ie=f===Le,k=ie?null:b.find(e=>e.tier===f)??null,ae=ie?ee?{tier:null}:null:k==null?null:{tier:k.tier},ce=m!==``&&m===i?.storageTier,de=x.find(e=>e.tier===m&&(ce||!T(e)))??null,j=g===`__none__`||g===i?.creditTier||w.some(e=>e.tier===g),M=g!==``&&j?g:null,N=ae!=null&&de!=null&&M!=null,fe=i!=null&&i.hasPlatformFee!==!1&&f===(i.machineTier??`__baseline__`)&&m===i.storageTier&&g===(i.creditTier??`__none__`),P=(0,B.useMemo)(()=>Re({proPlan:t,seed:i??null,machineTier:f,storageTier:m,creditChoice:g,noBundleLabel:l}),[t,i,f,m,g,l]);return(0,W.jsx)(d.Root,{open:e,onOpenChange:e=>{e||a()},children:(0,W.jsx)(d.Content,{size:`lg`,"data-theme":`light`,hideCloseButton:!0,overlayClassName:`backdrop-blur-[2px]`,className:`max-w-[820px] md:min-h-[min(608px,calc(100vh-4rem))]`,children:(0,W.jsx)(d.Body,{className:`p-4`,children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-8 md:flex-row md:gap-12`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-6 md:flex-1`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,W.jsx)(`div`,{className:`flex shrink-0 items-center justify-center rounded-xl bg-[var(--surface-active)] p-[14px]`,children:(0,W.jsx)(oe,{className:`h-6 w-6 text-[var(--content-emphasised)]`,"aria-hidden":!0})}),(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(d.Title,{className:`text-[16px] font-medium text-[var(--content-emphasised)]`,children:c(`customPlanModal.title`)}),(0,W.jsx)(d.Description,{className:`mt-0 text-[14px] font-medium leading-[18px] text-[var(--content-tertiary)]`,children:c(`customPlanModal.subtitle`)})]})]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(K,{label:c(`customPlanModal.machineSizeLabel`),docsUrl:U,docsLabel:c(`customPlanModal.machineSizeDocsAriaLabel`),learnMore:c(`customPlanModal.learnMore`)}),(0,W.jsx)(S,{"aria-label":c(`customPlanModal.machineSizeAriaLabel`),placeholder:c(`customPlanModal.machineSizePlaceholder`),value:f,onChange:p,options:E})]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(K,{label:c(`customPlanModal.storageLabel`),docsUrl:Be,docsLabel:c(`customPlanModal.storageDocsAriaLabel`),learnMore:c(`customPlanModal.learnMore`)}),(0,W.jsx)(S,{"aria-label":c(`customPlanModal.storageAriaLabel`),placeholder:c(`customPlanModal.storagePlaceholder`),value:m,onChange:h,options:te})]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(K,{label:c(`customPlanModal.usageBundleLabel`),docsUrl:Ve,docsLabel:c(`customPlanModal.usageBundleDocsAriaLabel`),learnMore:c(`customPlanModal.learnMore`)}),(0,W.jsx)(S,{"aria-label":c(`customPlanModal.usageBundleAriaLabel`),placeholder:c(`customPlanModal.usageBundlePlaceholder`),value:g,onChange:_,options:re})]})]}),(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-16 md:pt-[5px]`,children:[(0,W.jsx)(`span`,{className:`text-[16px] font-medium text-[var(--content-emphasised)]`,children:c(`customPlanModal.recap`)}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`span`,{className:`text-[24px] font-medium text-[var(--content-default)]`,children:ue(P.totalCents)}),P.deltaCents!=null&&P.deltaCents!==0&&P.previousTotalCents!=null&&(0,W.jsx)(`span`,{className:`text-[12px] font-medium ${P.deltaCents>0?`text-[var(--system-positive-strong)]`:`text-[var(--system-negative-strong)]`}`,children:c(`customPlanModal.comparedToPrevious`,{delta:I(P.deltaCents),previous:Te(P.previousTotalCents)})}),(0,W.jsx)(`span`,{className:`text-[11px] font-medium text-[var(--content-tertiary)]`,children:c(`customPlanModal.totalBilledMonthly`)})]}),(0,W.jsx)(`div`,{className:`h-px w-full bg-[var(--border-hover)]`}),(0,W.jsx)(`span`,{className:`text-[12px] font-medium text-[var(--content-tertiary)]`,children:c(`customPlanModal.yourSelection`)}),(0,W.jsx)(`ul`,{className:`flex flex-col gap-2`,children:P.rows.map(e=>(0,W.jsxs)(`li`,{className:`flex flex-col gap-2`,children:[e.previousLabel!=null&&(0,W.jsxs)(`div`,{className:`relative flex w-fit items-start gap-2`,children:[(0,W.jsx)(le,{className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-disabled)]`,"aria-hidden":!0}),(0,W.jsx)(`s`,{className:`text-[14px] font-medium leading-[18px] text-[var(--content-disabled)] no-underline`,children:e.previousLabel}),(0,W.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute -left-1 right-0 top-[9px] h-px bg-[var(--content-disabled)]`})]}),(0,W.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,W.jsx)(le,{className:`mt-0.5 h-4 w-4 shrink-0 ${e.changed?`text-[var(--system-positive-strong)]`:`text-[var(--content-secondary)]`}`,"aria-hidden":!0}),(0,W.jsx)(`span`,{className:`text-[14px] font-medium leading-[18px] text-[var(--content-secondary)]`,children:e.label})]})]},e.key))}),(0,W.jsx)(s,{variant:`primary`,fullWidth:!0,disabled:!N||fe||n,onClick:()=>{!N||fe||n||o({machineTier:ae.tier,storageTier:de.tier,creditTier:M===`__none__`?null:M})},children:c(`customPlanModal.continue`)}),(0,W.jsx)(s,{variant:`ghost`,fullWidth:!0,disabled:n,onClick:a,children:c(`customPlanModal.cancel`)})]})]})]})})})})}function Ue({className:e,onConfigure:t,configureDisabled:n,isCurrent:r=!1,currentSummary:i}){let{t:a}=D(`settings`);return(0,W.jsxs)(`div`,{className:`flex w-full flex-col items-center gap-8 ${e??``}`,children:[(0,W.jsx)(`p`,{className:`text-center text-[20px] font-medium text-[var(--content-tertiary)]`,children:a(`customPlanRow.prompt`)}),(0,W.jsxs)(`div`,{className:`flex w-[840px] max-w-full flex-col items-start gap-4 rounded-2xl bg-[var(--surface-lift)] p-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-4`,children:[(0,W.jsx)(`div`,{className:`flex shrink-0 items-center justify-center rounded-xl bg-[var(--content-disabled)] p-[14px]`,children:(0,W.jsx)(oe,{className:`h-6 w-6 text-[var(--aux-white)]`,"aria-hidden":!0})}),(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`text-[16px] font-medium text-[var(--content-emphasised)]`,children:a(`customPlanRow.title`)}),r?(0,W.jsx)(_,{className:`bg-[var(--feed-digest-weak)] text-[var(--content-default)]`,children:a(`customPlanRow.currentPlanTag`)}):null]}),(0,W.jsx)(`span`,{className:`text-[14px] font-medium text-[var(--content-tertiary)]`,children:i??a(`customPlanRow.genericDescriptor`)})]})]}),(0,W.jsx)(`div`,{className:`flex shrink-0 items-center gap-3`,children:(0,W.jsx)(s,{variant:`outlined`,onClick:t,disabled:n,children:a(`customPlanRow.configure`)})})]})]})}function We({open:e,pending:t,onCancel:n,...r}){return(0,W.jsx)(d.Root,{open:e,onOpenChange:e=>{!e&&!t&&n()},children:(0,W.jsx)(d.Content,{size:`md`,hideCloseButton:!0,children:(0,W.jsx)(Ge,{pending:t,onCancel:n,...r})})})}function Ge({lostFeatures:e,viaPortal:t,pending:r,onCancel:i,onConfirm:a}){let{t:o}=D(`settings`),c=e.length>0,[l,u]=(0,B.useState)(N),f=t||P(l);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(d.Header,{icon:k,children:(0,W.jsx)(d.Title,{children:o(`freeDowngradeConfirmModal.title`)})}),(0,W.jsxs)(d.Body,{children:[(0,W.jsx)(n,{as:`p`,variant:`body-medium-default`,className:`text-(--content-secondary)`,children:o(t?c?`freeDowngradeConfirmModal.bodyWithFeaturesPortal`:`freeDowngradeConfirmModal.bodyCancelOnlyPortal`:c?`freeDowngradeConfirmModal.bodyWithFeatures`:`freeDowngradeConfirmModal.bodyCancelOnly`)}),c?(0,W.jsx)(`ul`,{className:`mt-4 list-disc space-y-2 pl-5`,children:e.map(e=>(0,W.jsx)(`li`,{children:(0,W.jsx)(n,{as:`span`,variant:`body-medium-default`,children:e})},e))}):null,t?null:(0,W.jsx)(M,{value:l,onChange:u,disabled:r})]}),(0,W.jsxs)(d.Footer,{children:[(0,W.jsx)(s,{variant:`outlined`,onClick:i,disabled:r,children:o(`freeDowngradeConfirmModal.cancel`)}),(0,W.jsx)(s,{variant:`danger`,onClick:()=>a(l),disabled:r||!f,"data-testid":`confirm-free-downgrade-button`,children:o(`freeDowngradeConfirmModal.confirm`)})]})]})}function Ke({tierKey:e,name:t,tagline:n,priceLabel:r,priceCaption:i,ctaLabel:a,features:o,recommended:c=!1,tone:l=`dark`,isCurrent:u,intent:d=`upgrade`,pending:f,onCta:p}){let{t:m}=D(`settings`),h=d===`downgrade`&&!u;return(0,W.jsxs)(`div`,{"data-theme":l,className:`flex w-full flex-col gap-3 rounded-2xl bg-[var(--surface-lift)] p-3 sm:gap-4 sm:p-4`,children:[(0,W.jsx)(me,{tier:e,size:50}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,W.jsxs)(`div`,{className:`flex h-8 items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`text-[20px] font-medium text-[var(--content-emphasised)]`,children:t}),c&&!h&&!u?(0,W.jsx)(_,{className:`bg-[var(--feed-digest-weak)] text-[12px] font-semibold uppercase text-[var(--credits-accent)]`,children:m(`planColumnCard.recommended`)}):null]}),(0,W.jsx)(`p`,{className:`overflow-hidden text-[14px] font-medium leading-[18px] text-[var(--content-tertiary)] sm:h-9`,children:n})]}),(0,W.jsx)(`div`,{className:`h-px w-full bg-[var(--border-hover)]`}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`span`,{className:`text-[24px] font-medium text-[var(--content-default)]`,children:r}),(0,W.jsx)(`span`,{className:`text-[11px] font-medium text-[var(--content-tertiary)]`,children:i})]}),(0,W.jsx)(s,{variant:h?`outlined`:`primary`,fullWidth:!0,disabled:u||f,onClick:p,children:u?m(`planColumnCard.currentPlan`):a}),(0,W.jsx)(`div`,{className:`h-px w-full bg-[var(--border-hover)]`}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-2 sm:gap-4`,children:[(0,W.jsx)(`span`,{className:`text-[12px] font-medium text-[var(--content-tertiary)]`,children:m(`planColumnCard.includes`)}),(0,W.jsx)(`ul`,{className:`flex flex-col gap-2`,children:o.map(e=>(0,W.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,W.jsx)(le,{className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-secondary)]`,"aria-hidden":!0}),(0,W.jsx)(`span`,{className:`text-[14px] font-medium text-[var(--content-secondary)]`,children:e})]},e))})]})]})}function qe(e,t){return t(`plansPage.featureComputer`,{machine:j(e)})}function Je(e,t,n){return[qe(e,n),n(`plansPage.featureStorage`,{gib:e.storage_gib}),n(`plansPage.featureUsage`,{name:e.name}),...t]}function Ye(e){return[e(`plansPage.freeFeatureSmallComputer`),e(`plansPage.freeFeatureStorage`,{gib:4}),e(`plansPage.freeFeaturePayAsYouGo`)]}var Xe=`#0A0A0B`,Ze=8e3,Qe={upgrade:`upgrade`,downgrade:`downgrade`,switch:`change`};p();function $e(e,t){return L(e,t).join(` · `)}function q(){let{t:e}=D(`settings`),n=O(),[c,d]=ne(),p=te(),_=b(),S=l({platformHostedOnly:!0}),re=i(),ie=u(),k=S===`full`&&re,oe=S===`full`&&ie,A=E({...C(),enabled:k}),se=E({...m(),enabled:k}),le=T(f()),{changePackage:ue,isPending:j}=ke(),{changeTiers:M,isPending:N,current:P,currentReady:F,currentKnown:I,primaryAssistantId:me}=Ce({enabled:k});je();let[ge,Te]=(0,B.useState)(!1),[Oe,L]=(0,B.useState)(!1),[Fe,R]=(0,B.useState)(!1),[z,V]=(0,B.useState)(null),[Le,H]=(0,B.useState)(!1),[Re,U]=(0,B.useState)(void 0),Be=(0,B.useRef)(!1),[Ve,G]=(0,B.useState)(!1),K=(0,B.useRef)(!1),[Ge,qe]=(0,B.useState)(null),q=A.data,J=se.data?.plans.find(e=>e.id===`pro`),et=J?.packages??[],tt=et.length>0,Y=q?.plan_id===`pro`,nt=t(),rt=fe(me,k&&nt&&Y&&I),it=I?rt:void 0,X=q?q.plan_id===`base`?`free`:de(q.package)?q.package.key:null:null,{cancelSubscription:at,isPending:ot}=De(),st=xe(q),ct=be(Ae(q)),lt=o(),ut=new Set(se.data?.plans.find(e=>e.id===`base`)?.included_features??[]),dt=(J?.included_features??[]).filter(e=>!ut.has(e)),Z=ge||j||ot||ct.isPending,ft=(0,B.useMemo)(()=>!Y||P.storageTier==null?null:{machineTier:P.machineTier,storageTier:P.storageTier,creditTier:P.creditTier,hasPlatformFee:P.hasPlatformFee},[Y,P.machineTier,P.storageTier,P.creditTier,P.hasPlatformFee]),Q=c.get(x),pt=!k&&!oe,mt=k&&!se.isLoading&&!tt,$=pt||!(Q!=null&&!Ve)&&(A.isError||mt);(0,B.useEffect)(()=>{$&&n(pt?g.settings.usageBilling:`${g.settings.usageBilling}&adjust_plan`,{replace:!0})},[$,pt,n]);let ht=()=>{(window.history.state?.idx??0)>0?n(-1):n(g.settings.usageBilling)},gt=async t=>{Te(!0);try{let e=await le.mutateAsync({body:{...t,return_target:Pe()}});e.status===`redirect`&&e.checkout_url?(y(t.package?{kind:`package`,packageKey:t.package}:{kind:`custom`,machineTier:t.machine_tier??null,storageTier:t.storage_tier??null,creditTier:t.credit_tier??null}),a(p),r(e.checkout_url)):(await p.invalidateQueries({queryKey:w()}),await p.invalidateQueries({queryKey:h()}))}catch(t){v.error(Se(t,e(`plansPage.checkoutFailedToast`)))}finally{Te(!1)}},_t=(e,t)=>{if(q&&!Z){if(lt){Ne(g.plans);return}if(Y){if(e===`free`){R(!0);return}let r=et.find(t=>t.key===e);if(!r||_e(X,r.key)===`current`)return;if(!ye(q)){n(`${g.settings.usageBilling}&adjust_plan`,{replace:t?.replaceOnBail===!0});return}V(r);return}e!==`free`&>({target_plan_id:`pro`,package:e,confirm:!0})}},vt=(0,B.useRef)(_t);(0,B.useEffect)(()=>{vt.current=_t}),(0,B.useEffect)(()=>{if(Q==null||Be.current||$||!k||K.current)return;K.current=!0;let e=setTimeout(()=>{G(!0)},Ze),t=()=>{clearTimeout(e),G(!0)};Promise.all([p.refetchQueries({queryKey:w()}),p.refetchQueries({queryKey:h()})]).then(t,t)},[$,Q,k,p]),(0,B.useEffect)(()=>{Q==null||Be.current||$||!k||!Ve||(Be.current=!0,Y&&Q!==`free`&&qe(Q),d(e=>{let t=new URLSearchParams(e);return t.delete(x),t},{replace:!0}))},[Ve,$,Q,k,Y,d]),(0,B.useEffect)(()=>{Ge==null||Q!=null||(qe(null),vt.current(Ge,{replaceOnBail:!0}))},[Q,Ge]);let yt;if(q&&J&&tt){let t=Y&&X===null&&F&&P.storageGib!=null,r=t?$e(P,J):void 0,i=async e=>{if(!st){R(!1),ct.mutate({});return}await at(he(e))&&(R(!1),n(g.settings.usageBilling,{replace:!0}))},a=()=>({creditTier:P.creditTier,fromSnapshot:{machineSize:it?.machine_size??null,storageGib:it?.provisioned_storage_gib??null}}),o=z?X===null?`switch`:_e(X,z.key)===`downgrade`?`downgrade`:`upgrade`:`upgrade`,s=async()=>{if(!z)return;let t=z,n=a(),r=X===null||!F||!I||Ie(P.machineTier,t.machine_tier),i=await ue(t.key);if(!i)return;if(V(null),i.status===`no_op`){v.success(e(`plansPage.alreadyOnPlanToast`));return}let s=t.credit_tier??null;U({fromSnapshot:n.fromSnapshot,credits:s===n.creditTier?null:{fromTier:n.creditTier,toTier:s},direction:Qe[o],canLowerResources:r}),H(!0)},c=e=>gt({target_plan_id:`pro`,confirm:!0,machine_tier:e.machineTier,storage_tier:e.storageTier,credit_tier:e.creditTier}),l=async t=>{let n=a(),r=!I||Ie(P.machineTier,t.machineTier),i=await M(t,ft??void 0);i&&(L(!1),i.needsResize||i.creditChanged?(U({fromSnapshot:n.fromSnapshot,credits:i.creditChanged?{fromTier:n.creditTier,toTier:t.creditTier}:null,direction:`change`,canLowerResources:r}),H(!0)):v.success(e(`plansPage.planUpdatedToast`)))},u=()=>{if(!Z){if(lt){Ne(g.plans);return}Y&&!F||L(!0)}},d=[...et].sort((e,t)=>Me.indexOf(e.key)-Me.indexOf(t.key)),f=pe(`free`),p=Y?`downgrade`:_e(X,`free`),m=Ye(e);yt=(0,W.jsxs)(`div`,{className:`my-auto flex w-full flex-col items-center`,children:[(0,W.jsxs)(`header`,{className:`flex flex-col items-center gap-2 text-center`,children:[(0,W.jsx)(`h1`,{className:`text-[40px] text-[var(--content-emphasised)] sm:text-[60px]`,style:{fontFamily:`var(--font-serif)`,fontWeight:400,lineHeight:1.2,letterSpacing:`1.2px`},children:e(`plansPage.heading`)}),(0,W.jsx)(`p`,{className:`text-[20px] font-medium text-[var(--content-tertiary)]`,children:e(`plansPage.subheading`)})]}),(0,W.jsxs)(`div`,{className:`mt-6 grid w-full max-w-[1312px] grid-cols-1 gap-4 sm:mt-10 sm:grid-cols-2 sm:gap-6 lg:grid-cols-4`,children:[(0,W.jsx)(Ke,{tierKey:`free`,name:`Base`,tagline:f?.tagline??``,priceLabel:e(`plansPage.freePriceLabel`),priceCaption:f?.priceCaption??e(`plansPage.foreverCaption`),ctaLabel:p===`downgrade`?e(`plansPage.downgradeTo`,{name:`Base`}):f?.cta??e(`plansPage.startFreeCta`),features:m,tone:`dark`,isCurrent:X===`free`,intent:p,pending:Z,onCta:()=>_t(`free`)}),d.map(t=>{let n=pe(t.key),r=_e(X,t.key);return(0,W.jsx)(Ke,{tierKey:t.key,name:t.name,tagline:n?.tagline??``,priceLabel:we(t.total_price_cents),priceCaption:n?.priceCaption??e(`plansPage.billedMonthlyCaption`),ctaLabel:r===`downgrade`?e(`plansPage.downgradeTo`,{name:t.name}):n?.cta??t.name,features:Je(t,n?.extraFeatures??[],e),recommended:n?.recommended,tone:n?.recommended?`light`:`dark`,isCurrent:X===t.key,intent:r,pending:Z,onCta:()=>_t(t.key)},t.key)})]}),(0,W.jsx)(Ue,{className:`mt-6 sm:mt-10`,onConfigure:u,configureDisabled:Y&&!F||Z,isCurrent:t,currentSummary:r}),(0,W.jsx)(He,{open:Oe,proPlan:J,pending:ge||N,currentStorageGib:Y?P.storageGib:null,initialSelection:ft,onClose:()=>L(!1),onContinue:e=>{Y?l(e):c(e)}}),(0,W.jsx)(Ee,{open:z!==null,relation:o,packageName:z?.name??``,targetPackage:z,pending:j,onCancel:()=>V(null),onConfirm:()=>void s()}),(0,W.jsx)(We,{open:Fe,lostFeatures:dt,viaPortal:!st,pending:ot||ct.isPending,onCancel:()=>R(!1),onConfirm:e=>void i(e)}),(0,W.jsx)(ve,{mode:`resize`,open:Le,onClose:()=>{H(!1),U(void 0)},resizeContext:Re}),(0,W.jsx)(`p`,{className:`mt-6 text-center text-[12px] font-medium text-[var(--content-tertiary)] sm:mt-10`,children:(0,W.jsx)(ee,{ns:`settings`,i18nKey:`plansPage.cancelAnytimeFooter`,components:{docsLink:(0,W.jsx)(`a`,{href:ze,target:`_blank`,rel:`noopener noreferrer`,className:`text-[var(--content-default)] underline`})}})})]})}else yt=(0,W.jsx)(`div`,{className:`my-auto flex items-center justify-center`,children:(0,W.jsx)(ae,{className:`h-6 w-6 animate-spin text-[var(--content-tertiary)]`,"aria-label":e(`plansPage.loadingPlansAriaLabel`)})});return(0,W.jsxs)(`div`,{"data-theme":`dark`,className:`plans-takeover-canvas-enter relative h-full w-full overflow-y-auto`,style:{backgroundColor:Xe},children:[(0,W.jsx)(`div`,{className:`absolute left-8 z-10 [-webkit-app-region:no-drag]`,style:{top:_?`3rem`:`2rem`},children:(0,W.jsx)(s,{variant:`outlined`,leftIcon:(0,W.jsx)(ce,{className:`h-4 w-4`,"aria-hidden":!0}),onClick:ht,className:`[-webkit-app-region:no-drag]`,children:e(`plansPage.back`)})}),(0,W.jsx)(`div`,{className:`plans-takeover-content-enter flex min-h-full flex-col items-center px-4 pb-8 sm:px-6`,style:{paddingTop:_?`5rem`:`4rem`},children:yt})]})}function J(){return(0,W.jsx)(q,{})}export{J as PlansPage};
|
package/dist/assets/{platform-loopback-page-SyOClPdC.js → platform-loopback-page-B7YadjAM.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{$p as t,Ag as n,Gb as r,Rb as i,Xv as a,fx as o,ug as s}from"./app-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{$p as t,Ag as n,Gb as r,Rb as i,Xv as a,fx as o,ug as s}from"./app-BBUxTj9g.js";import{j as c}from"./vendor-ajttH1pP.js";import{_ as l,f as u,t as d,x as f}from"./react-B9IgSVeK.js";var p=e(f(),1),m=d(),h=`vellum:loopback:state`,g=`vellum:loopback:returnTo`;function _(){let{t:e}=c(`account`),[d]=l(),f=u(),[_,v]=(0,p.useState)(null);return(0,p.useEffect)(()=>{let c=d.get(`state`),l=d.get(`session_token`),u=sessionStorage.getItem(h),p=sessionStorage.getItem(g)||o.assistant;if(sessionStorage.removeItem(h),sessionStorage.removeItem(g),!c||c!==u){v(e(`authErrors.loopbackStateMismatch`));return}if(!l){v(e(`authErrors.loopbackNoToken`));return}if(!/^[a-zA-Z0-9]+$/.test(l)){v(e(`authErrors.loopbackInvalidToken`));return}(async()=>{if(!await r(l)){v(`Login failed: couldn't reach the local Vellum server to store the session. Please try again.`);return}await t.getState().initSession(),await a(!0);try{let e=await n();if(e.ok&&e.data.length>0){await i(e.data,s.getState().currentOrganizationId??void 0),f(o.assistant,{replace:!0});return}}catch{}f(p,{replace:!0})})()},[d,f,e]),_?(0,m.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-[var(--surface-base)] text-[var(--content-default)]`,children:(0,m.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,m.jsx)(`p`,{className:`text-body-medium-default`,children:_}),(0,m.jsx)(`button`,{type:`button`,className:`mt-4 rounded-lg border border-[var(--border-disabled)] px-4 py-2 text-sm hover:bg-[var(--surface-lift)]`,onClick:()=>void f(o.welcome),children:e(`platformLoopbackPage.backToWelcome`)})]})}):(0,m.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-[var(--surface-base)] text-[var(--content-default)]`,children:(0,m.jsx)(`p`,{className:`text-body-medium-default`,children:e(`platformLoopbackPage.completing`)})})}export{_ as PlatformLoopbackPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Xb as e,fx as t}from"./app-
|
|
1
|
+
import{Xb as e,fx as t}from"./app-BBUxTj9g.js";import{h as n,r,t as i}from"./react-B9IgSVeK.js";import{t as a}from"./plugins-surface-DY7rojgP.js";var o=i();function s(){let i=e.use.version(),s=a(),{name:c}=n();return i===null?null:!s||!c?(0,o.jsx)(r,{to:t.superpowers,replace:!0}):(0,o.jsx)(r,{to:`${t.superpowers}?plugin=${encodeURIComponent(c)}`,replace:!0})}export{s as PluginDetailPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fx as e}from"./app-
|
|
1
|
+
import{fx as e}from"./app-BBUxTj9g.js";import{_ as t,r as n,t as r}from"./react-B9IgSVeK.js";var i=r();function a(){let[r]=t(),a=r.toString();return(0,i.jsx)(n,{to:`${e.superpowers}${a?`?${a}`:``}`,replace:!0})}export{a as PluginsPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Rh as e}from"./app-BBUxTj9g.js";var t=`0.10.3`;function n(){return e(t)}export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CS as e}from"./app-
|
|
1
|
+
import{CS as e}from"./app-BBUxTj9g.js";import{j as t}from"./vendor-ajttH1pP.js";import{t as n}from"./react-B9IgSVeK.js";import{Ya as r}from"./icons-C0wyat6T.js";var i=r(`file-exclamation-point`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),a=n();function o({filename:n}){let{t:r}=t(`chat`);return(0,a.jsxs)(`div`,{role:`status`,className:`flex items-center gap-2.5 rounded-lg border border-[var(--border-element)] bg-[var(--surface-lift)] p-3`,children:[(0,a.jsx)(i,{"aria-hidden":`true`,className:`h-4 w-4 shrink-0 text-[var(--content-tertiary)]`}),(0,a.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,a.jsx)(e,{as:`span`,variant:`body-small-default`,className:`text-[var(--content-default)]`,children:r(`previewError.cannotPreview`)}),(0,a.jsx)(e,{as:`span`,variant:`label-small-default`,className:`truncate text-[var(--content-tertiary)]`,children:n})]})]})}export{o as t};
|