@vellumai/web 0.10.2 → 0.10.3-dev.202606252046.9075fd5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AnimatePresence-CLUzO79c.js +9 -0
- package/dist/assets/{BundleConfirmPage-B1RL5CT5.js → BundleConfirmPage-DpfvIcwl.js} +1 -1
- package/dist/assets/{Combination-CDqVzelh.js → Combination-4Qc3vrtW.js} +1 -1
- package/dist/assets/about-page-TvZeB1h8.js +1 -0
- package/dist/assets/{account-page-CHiDb1yX.js → account-page-B9-nXeIt.js} +1 -1
- package/dist/assets/{account-shell-BBL0HqTX.js → account-shell-DwNlgySJ.js} +1 -1
- package/dist/assets/{add-credits-modal-GSsxaybq.js → add-credits-modal-JV9bRykb.js} +1 -1
- package/dist/assets/{advanced-page-9dJbjOiT.js → advanced-page-CumCyGWm.js} +1 -1
- package/dist/assets/ai-page-CBKFUYW7.js +1 -0
- package/dist/assets/{api-CjVG_nMi.js → api-2kc3MHRz.js} +1 -1
- package/dist/assets/{api-key-screen-BBajxzG8.js → api-key-screen-CRx6w8CW.js} +1 -1
- package/dist/assets/app-info-DENEBxVU.js +1 -0
- package/dist/assets/archive-page-BRwnijFf.js +1 -0
- package/dist/assets/assistant-api-DROTS3Y9.js +1 -0
- package/dist/assets/{assistant-feature-flag-store-BD9zTDcP.js → assistant-feature-flag-store-Dl92XRsM.js} +1 -1
- package/dist/assets/{assistant-identity-store-DaDnhbxy.js → assistant-identity-store-CKjnoLSp.js} +1 -1
- package/dist/assets/{assistant-status-panel-CFhkAfJY.js → assistant-status-panel-CDbekzi5.js} +1 -1
- package/dist/assets/auth-store-ChW9SzI9.js +7 -0
- package/dist/assets/billing-page-DHqXm_8g.js +3 -0
- package/dist/assets/{bookmarks-page-DyjSZPPW.js → bookmarks-page-BZGCN6hi.js} +1 -1
- package/dist/assets/brain-Bs6LnfHO.js +1 -0
- package/dist/assets/browser-CcFF_rkO.js +2 -0
- package/dist/assets/build-state-D0kdTS6F.js +1 -0
- package/dist/assets/{capture-error-AoUURkgi.js → capture-error-Hr1Yo2kx.js} +1 -1
- package/dist/assets/check-D6WkI0gF.js +1 -0
- package/dist/assets/{checkbox-ChtGq7OI.js → checkbox-BqCzUvXM.js} +1 -1
- package/dist/assets/{client-feature-flag-store-DjN8fxHA.js → client-feature-flag-store-C1kdd1EO.js} +1 -1
- package/dist/assets/{command-palette-DJgHXop1.js → command-palette-3tkJdNTe.js} +1 -1
- package/dist/assets/command-palette-window-page-WE3wTFlP.js +1 -0
- package/dist/assets/community-page-Fi2VKtgf.js +1 -0
- package/dist/assets/{confirm-dialog-SpCsmAdG.js → confirm-dialog-CfOXCE1N.js} +1 -1
- package/dist/assets/{connect-page-B0Pym3dJ.js → connect-page-BQzNnPDo.js} +1 -1
- package/dist/assets/{consent-controls-o06cSwWt.js → consent-controls-BSZV4rW3.js} +1 -1
- package/dist/assets/{contacts-gateway-11r4y5pQ.js → contacts-gateway-BUGZkpwV.js} +1 -1
- package/dist/assets/contacts-page-route-DFt7nKh0.js +9 -0
- package/dist/assets/conversation-list-fetchers-UPVZq_6O.js +1 -0
- package/dist/assets/{danger-zone-redirect-page-iCmRnyei.js → danger-zone-redirect-page-CjqUKhk9.js} +1 -1
- package/dist/assets/debug-page-hdqp_HRW.js +4 -0
- package/dist/assets/{deploy-dialogs-DygUf1og.js → deploy-dialogs-Brotm8L5.js} +1 -1
- package/dist/assets/{detail-card-QPVpO5cj.js → detail-card-C5Y8BJ-M.js} +1 -1
- package/dist/assets/{developer-page-C5desNav.js → developer-page-CuPxQV4l.js} +1 -1
- package/dist/assets/devices-page-CZH4QM_k.js +1 -0
- package/dist/assets/diagnostics-BEB4VPwC.js +1 -0
- package/dist/assets/dictation-overlay-page-Cqxeh6r7.js +1 -0
- package/dist/assets/{dist-cZPU9ZZL.js → dist-B0Gf-knw.js} +1 -1
- package/dist/assets/document-viewer-page-USfZvtF6.js +1 -0
- package/dist/assets/dropdown-CL8VmqrY.js +1 -0
- package/dist/assets/earn-credits-modal-CBXXAMnn.js +1 -0
- package/dist/assets/{emails-page-Duy9jhr6.js → emails-page-DbEpgXB8.js} +1 -1
- package/dist/assets/esm-5gU3bjzq.js +2 -0
- package/dist/assets/esm-BCyLKT7G.js +2 -0
- package/dist/assets/{esm-B9FuN3Io.js → esm-DLfKHBEV.js} +2 -2
- package/dist/assets/esm-DjoRMdid.js +2 -0
- package/dist/assets/esm-THPAbEDt.js +1 -0
- package/dist/assets/esm-hCttZxWP.js +2 -0
- package/dist/assets/feature-flag-catalog-RK3_Ckyw.js +1 -0
- package/dist/assets/file-editor-or8tUWGd.js +1 -0
- package/dist/assets/file-text-CmK9LY1p.js +1 -0
- package/dist/assets/funnel-events-B3MqPADI.js +1 -0
- package/dist/assets/general-page-DLmd1Eub.js +1 -0
- package/dist/assets/hatching-screen-D47G1NSW.js +1 -0
- package/dist/assets/home-page-route-zUu-DbI-.js +1 -0
- package/dist/assets/hosting-screen-XRkAMN5n.js +1 -0
- package/dist/assets/identity-page-route-3nEt039g.js +1 -0
- package/dist/assets/index-ClC1ULPL.js +132 -0
- package/dist/assets/index-Hcyzmz_5.css +2 -0
- package/dist/assets/inspect-page-BMr0kyir.js +7 -0
- package/dist/assets/install-CbYtzbY3.js +1 -0
- package/dist/assets/integrations-page-BIPflp2l.js +1 -0
- package/dist/assets/{intelligence-layout-DgkmPrJl.js → intelligence-layout-Da9BJaKI.js} +1 -1
- package/dist/assets/{keyboard-shortcuts-page-waVolRQN.js → keyboard-shortcuts-page-QI7OycIm.js} +1 -1
- package/dist/assets/{library-detail-page-eMzOqx_B.js → library-detail-page-hPfYHjCC.js} +1 -1
- package/dist/assets/library-page-DXMbjNma.js +1 -0
- package/dist/assets/list-row-Cw9JYESP.js +1 -0
- package/dist/assets/{local-mode-BD2zqd9I.js → local-mode-CvrNMtPF.js} +3 -3
- package/dist/assets/{login-flow-DVsR7fEC.js → login-flow-bkSOloXg.js} +1 -1
- package/dist/assets/login-page-Bja2DzZh.js +1 -0
- package/dist/assets/{logout-page-DRRS14hP.js → logout-page-7Oe3wbP9.js} +1 -1
- package/dist/assets/{logs-layout-CSvew4_d.js → logs-layout-CCfnXujW.js} +1 -1
- package/dist/assets/{memory-router-playground-page-A2zlGskJ.js → memory-router-playground-page-DjnFCorF.js} +1 -1
- package/dist/assets/menu-C_97pis4.js +1 -0
- package/dist/assets/messages-DHDZ32NT.js +13 -0
- package/dist/assets/{mobile-sidebar-drawer-R6nyuXZ1.js → mobile-sidebar-drawer-CnBiKIXv.js} +1 -1
- package/dist/assets/{modal-CHuPOsJJ.js → modal-D0Q3UWD0.js} +1 -1
- package/dist/assets/monitor-D2okHi8o.js +1 -0
- package/dist/assets/mutation-error-CAcai9_z.js +1 -0
- package/dist/assets/{native-file-LJQTmnKy.js → native-file-CiaHiLEO.js} +2 -2
- package/dist/assets/{notice-CynJKEow.js → notice-CqRgVmeL.js} +1 -1
- package/dist/assets/notifications-page-DTCOKVj_.js +1 -0
- package/dist/assets/{oauth-complete-page-BJudfLeY.js → oauth-complete-page-DvU0o29v.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-HRhzTWe_.js → oauth-popup-complete-page-CsrAizjT.js} +1 -1
- package/dist/assets/{page-shell-W5IMIXQq.js → page-shell-Cjnz9wcY.js} +1 -1
- package/dist/assets/{pairing-page-DS3k_UyF.js → pairing-page-CZpUmntV.js} +1 -1
- package/dist/assets/panel-item-nGTDevWP.js +1 -0
- package/dist/assets/{password-reset-page-CDvLTa8S.js → password-reset-page-0JJf9uQW.js} +1 -1
- package/dist/assets/{platform-loopback-page-CKI-92-q.js → platform-loopback-page-D8RQIDDa.js} +1 -1
- package/dist/assets/plugin-detail-page-C_oRG3pL.js +1 -0
- package/dist/assets/{plugins-page-BxfKs2Np.js → plugins-page-Cr6ZpnWa.js} +1 -1
- package/dist/assets/{popover-BsF65jZY.js → popover-CL-JL6vG.js} +1 -1
- package/dist/assets/prechat-B28Vzu55.js +1 -0
- package/dist/assets/prechat-route-3Qvt2hhO.js +1 -0
- package/dist/assets/{prefs-DP4g-Qgi.js → prefs-CQMgJd_q.js} +1 -1
- package/dist/assets/privacy-page-BPFyA8iz.js +1 -0
- package/dist/assets/privacy-screen-CgqEActd.js +1 -0
- package/dist/assets/{provider-callback-page-tWLMyImI.js → provider-callback-page-BOAni8yJ.js} +1 -1
- package/dist/assets/{provider-key-g87caUSW.js → provider-key-CQHnRygW.js} +1 -1
- package/dist/assets/{provider-signup-page-CBPV-1Ih.js → provider-signup-page-CWMhVP8s.js} +1 -1
- package/dist/assets/proxy-BigbiDP1.js +1 -0
- package/dist/assets/{quick-input-page-CEPPTVs7.js → quick-input-page-DM-2Bywe.js} +1 -1
- package/dist/assets/react-query.gen-CQLyoqYk.js +1 -0
- package/dist/assets/{react-query.gen-CRARj4mG.js → react-query.gen-rp6Krcco.js} +1 -1
- package/dist/assets/{research-mock-page-Dln6TeKV.js → research-mock-page-CnWnfAmD.js} +1 -1
- package/dist/assets/research-onboarding-route-Mqg1RKEf.js +35 -0
- package/dist/assets/{resize-errors-CXz-pd2h.js → resize-errors-DnJEbHn4.js} +1 -1
- package/dist/assets/{resolved-assistants-store-DLNFVaZL.js → resolved-assistants-store-Cp4J43BK.js} +1 -1
- package/dist/assets/return-to-ByvaXBKr.js +1 -0
- package/dist/assets/{review-terms-screen-DuORfqOE.js → review-terms-screen-CZAs4_M8.js} +1 -1
- package/dist/assets/risk-badge-6lK01djG.js +1 -0
- package/dist/assets/{schedules-MF0cMAPX.js → schedules-BrM_F49t.js} +1 -1
- package/dist/assets/sdk.gen-1aYqVbMj.js +6 -0
- package/dist/assets/{sdk.gen-0RzHFsEa.js → sdk.gen-D-_js_oC.js} +1 -1
- package/dist/assets/select-assistant-screen-op6EkLQj.js +1 -0
- package/dist/assets/{setting-row-BHlMSre_.js → setting-row-o44aWwYt.js} +1 -1
- package/dist/assets/settings-layout-bfcLNyf6.js +1 -0
- package/dist/assets/share-feedback-modal-DpMFG9Pb.js +1 -0
- package/dist/assets/{sidebar-tree-D0lNnpA6.js → sidebar-tree-B7wZynGE.js} +1 -1
- package/dist/assets/signup-page-Czj1OK4W.js +1 -0
- package/dist/assets/{signup-shell-CEJE1QSw.js → signup-shell-BsVVoj4U.js} +1 -1
- package/dist/assets/skills-page-D9bLw9fM.js +1 -0
- package/dist/assets/{sound-manager-RQj5g2kL.js → sound-manager-CzslfzDO.js} +1 -1
- package/dist/assets/{sounds-page-DFXhvf_o.js → sounds-page-BKGTyNWW.js} +1 -1
- package/dist/assets/{src-BJj2O5XB.js → src-CK6bncSg.js} +39 -39
- package/dist/assets/{metric-card-CgO1F06f.js → status-badge-pill-DbFy7rqp.js} +1 -1
- package/dist/assets/step-indicator-dots-CHroyD_f.js +1 -0
- package/dist/assets/subagent-detail-panel-B6sagWSD.js +4 -0
- package/dist/assets/subagent-store-BLHGkTJR.js +3 -0
- package/dist/assets/{system-events-page-BJJteZri.js → system-events-page-DI9o7xCI.js} +1 -1
- package/dist/assets/{system-events-redirect-page-CheSz42h.js → system-events-redirect-page-C1hGE6n5.js} +1 -1
- package/dist/assets/{tag-CE_o2aao.js → tag-B_-QAvJF.js} +1 -1
- package/dist/assets/three-dot-indicator-DMSk1hLX.js +1 -0
- package/dist/assets/{tiptap-document-editor-C8FlNAsc.js → tiptap-document-editor-dGIhjBeA.js} +2 -2
- package/dist/assets/{toast-CxaZ5f1d.js → toast-2TW5tj1Y.js} +1 -1
- package/dist/assets/tool-call-status-DTV5jmaU.js +1 -0
- package/dist/assets/tool-detail-panel-DCNeyuSR.js +2 -0
- package/dist/assets/trace-page-BlzzMfhB.js +1 -0
- package/dist/assets/{upgrade-cancel-page-BQJOrigy.js → upgrade-cancel-page-aPRq6Aok.js} +1 -1
- package/dist/assets/{upgrade-success-page-BPRZMLDu.js → upgrade-success-page-BIT_ilWx.js} +1 -1
- package/dist/assets/{usage-page-DU36h2RZ.js → usage-page-DyxmY3TL.js} +1 -1
- package/dist/assets/{use-active-assistant-id-BlwRimQH.js → use-active-assistant-id-Dyfjqq4l.js} +1 -1
- package/dist/assets/{use-bus-subscription-D-1qIPnj.js → use-bus-subscription-BbiZXm1u.js} +1 -1
- package/dist/assets/use-is-org-ready-nrr2EQDs.js +1 -0
- package/dist/assets/{use-onboarding-login-BZ4ismb6.js → use-onboarding-login-CSv0w3ZW.js} +1 -1
- package/dist/assets/{use-plugin-drift-C3gz_rng.js → use-plugin-drift-BozvaLNX.js} +1 -1
- package/dist/assets/use-reduced-motion-D-u6Drm_.js +1 -0
- package/dist/assets/user-plus-C0OyQU83.js +1 -0
- package/dist/assets/{utils-DugRzWBW.js → utils-IBnUZTqY.js} +1 -1
- package/dist/assets/{viewer-store-9Ag85lFC.js → viewer-store-Dead64xY.js} +1 -1
- package/dist/assets/{voice-page-DB2h9uqJ.js → voice-page-K-y3hK_F.js} +1 -1
- package/dist/assets/{weather-forecast-display-DoCG5fqI.js → weather-forecast-display-Dm8dLY4b.js} +1 -1
- package/dist/assets/{web-DTFLfPeG.js → web-DU1iYtUx.js} +1 -1
- package/dist/assets/{web-CUTiBnsF.js → web-DbJBgRfO.js} +1 -1
- package/dist/assets/{web-B4ULoQq5.js → web-Dd6cS3PL.js} +1 -1
- package/dist/assets/{web-ByMNu3A_.js → web-DfbsgY66.js} +1 -1
- package/dist/assets/{web-DuA0h7oK.js → web-Drsd2-VM.js} +1 -1
- package/dist/assets/{web-CvCsdCeT.js → web-Dy2Asku5.js} +1 -1
- package/dist/assets/{web-CyTCBnAZ.js → web-vUgUvidH.js} +1 -1
- package/dist/assets/{welcome-screen-z3RULgvo.js → welcome-screen-CQKiJNkD.js} +1 -1
- package/dist/assets/workflow-detail-panel-uq9qYtn1.js +1 -0
- package/dist/assets/workflow-status-DmbjJPT4.js +1 -0
- package/dist/assets/workspace-page-CgSrCIQ7.js +1 -0
- package/dist/index.html +112 -102
- package/package.json +1 -1
- package/dist/assets/about-page-B-yNJBih.js +0 -1
- package/dist/assets/ai-page-Du6k7XV_.js +0 -1
- package/dist/assets/archive-page-DDar_tND.js +0 -1
- package/dist/assets/assistant-api-BX_B1xSC.js +0 -1
- package/dist/assets/auth-store-CbVvQiBR.js +0 -7
- package/dist/assets/billing-page-BByuYpJa.js +0 -3
- package/dist/assets/build-state-CMpEWWjf.js +0 -1
- package/dist/assets/cable-C0pEWbc5.js +0 -1
- package/dist/assets/client.gen-0CkwJ2Ya.js +0 -6
- package/dist/assets/command-palette-window-page-CSaRzD87.js +0 -1
- package/dist/assets/community-page-BuuYKT7i.js +0 -1
- package/dist/assets/contacts-page-route-YQf7Dxxo.js +0 -1
- package/dist/assets/conversation-queries-DF1Lujnm.js +0 -1
- package/dist/assets/debug-page-CXi6rNhS.js +0 -2
- package/dist/assets/devices-page-mF5RECdQ.js +0 -1
- package/dist/assets/dictation-overlay-page-DL5K7HYW.js +0 -1
- package/dist/assets/document-viewer-page-C2oFS1wI.js +0 -1
- package/dist/assets/dollar-sign-D_XmiHA-.js +0 -1
- package/dist/assets/dropdown-yOV5eJnU.js +0 -1
- package/dist/assets/earn-credits-modal-DsuqrJTY.js +0 -1
- package/dist/assets/esm-BIUrrGWd.js +0 -2
- package/dist/assets/esm-BT7uz_mC.js +0 -2
- package/dist/assets/esm-BU45yXtJ.js +0 -2
- package/dist/assets/esm-D51SsTmc.js +0 -2
- package/dist/assets/esm-KT7CwnAY.js +0 -1
- package/dist/assets/feature-flag-catalog-RZLmDa1F.js +0 -1
- package/dist/assets/file-editor-n2sYGdD-.js +0 -1
- package/dist/assets/general-page-BSdbq26O.js +0 -1
- package/dist/assets/google-logo-DNkI-jCf.js +0 -1
- package/dist/assets/hatching-screen-BRgjqSLd.js +0 -1
- package/dist/assets/home-page-route-CV_mh2wJ.js +0 -1
- package/dist/assets/hosting-screen--kBc2JgZ.js +0 -1
- package/dist/assets/identity-page-route-CDcFNfWw.js +0 -1
- package/dist/assets/index-BvIwFdLE.css +0 -2
- package/dist/assets/index-Cx6vyW7T.js +0 -155
- package/dist/assets/inspect-page-D03CXXMs.js +0 -7
- package/dist/assets/install-JGbHHiCV.js +0 -1
- package/dist/assets/integrations-page-BFPmyQdR.js +0 -1
- package/dist/assets/library-page-BwoQ9K34.js +0 -1
- package/dist/assets/login-page-DYLjbG5w.js +0 -1
- package/dist/assets/mcp-page-CUehr_wQ.js +0 -1
- package/dist/assets/menu-CdoNX1qx.js +0 -1
- package/dist/assets/mutation-error-BjiE6W0q.js +0 -1
- package/dist/assets/notifications-page-DcIQm_jh.js +0 -1
- package/dist/assets/panel-item-BLQE_l-g.js +0 -1
- package/dist/assets/plugin-detail-page-THfWbuJx.js +0 -1
- package/dist/assets/prechat-route-uavNUOzg.js +0 -1
- package/dist/assets/privacy-page-Vq50i0Wv.js +0 -1
- package/dist/assets/privacy-screen-1ITDKJ6D.js +0 -1
- package/dist/assets/proxy-l3iqYpig.js +0 -1
- package/dist/assets/react-query.gen-4ZMhZ-fj.js +0 -1
- package/dist/assets/reduced-motion-8QnGN6lg.js +0 -1
- package/dist/assets/research-onboarding-route-HWXEnr-H.js +0 -30
- package/dist/assets/return-to-DxTXKF-C.js +0 -1
- package/dist/assets/sdk.gen-DtKkd6hs.js +0 -1
- package/dist/assets/select-assistant-screen-C2pCQCeh.js +0 -1
- package/dist/assets/settings-layout-Co57Zw8f.js +0 -1
- package/dist/assets/share-feedback-modal-C4yo471J.js +0 -1
- package/dist/assets/signup-page-P4juei29.js +0 -1
- package/dist/assets/skill-row-DDoJmniT.js +0 -1
- package/dist/assets/skills-page-KI_k-igb.js +0 -1
- package/dist/assets/step-indicator-dots-Bx_0xTIr.js +0 -1
- package/dist/assets/subagent-detail-panel-eXMmoVu4.js +0 -4
- package/dist/assets/subagent-status-DOJQZKTk.js +0 -1
- package/dist/assets/tool-detail-panel-DgVn-kKw.js +0 -2
- package/dist/assets/trace-page-CZICq31J.js +0 -1
- package/dist/assets/use-is-org-ready-CRkh60tU.js +0 -1
- package/dist/assets/use-reduced-motion-DgX4o6QR.js +0 -1
- package/dist/assets/workflow-detail-panel-uiydoHie.js +0 -1
- package/dist/assets/workspace-page-9B98Z90n.js +0 -1
- /package/dist/assets/{api-errors-D3EsNrwn.js → api-errors-CveHbhgb.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-f4-fradg.js → avatar-bundled-components-DQodAnJD.js} +0 -0
- /package/dist/assets/{avatar-svg-compositor-DMT4wmUm.js → avatar-svg-compositor-CEmN7KGI.js} +0 -0
- /package/dist/assets/{bookmark-C8arQ3wm.js → bookmark-C3S-p0MQ.js} +0 -0
- /package/dist/assets/{bug-BuL3O3_2.js → bug-DDcuQ3au.js} +0 -0
- /package/dist/assets/{build.umd-CPG-O6Se.js → build.umd-BrOC7S1V.js} +0 -0
- /package/dist/assets/{calendar-BCNBN7PC.js → calendar-CpgH8CqM.js} +0 -0
- /package/dist/assets/{chevron-left-o_oJAd6A.js → chevron-left-DghyKSEE.js} +0 -0
- /package/dist/assets/{chevron-right-BNHlGCTg.js → chevron-right-B6vEpVY0.js} +0 -0
- /package/dist/assets/{chevron-up-BnW-hcOL.js → chevron-up-BRZN6p_l.js} +0 -0
- /package/dist/assets/{circle-alert-bz1ccYRI.js → circle-alert-DvNg50UK.js} +0 -0
- /package/dist/assets/{circle-check-DBzb54Kz.js → circle-check-DzlJxj_M.js} +0 -0
- /package/dist/assets/{client.gen-DzaL5PKF.js → client.gen-Cs6pCK0s.js} +0 -0
- /package/dist/assets/{cloud-off-BWmMU3G-.js → cloud-off-rAv4OHmv.js} +0 -0
- /package/dist/assets/{code-Bju_p7d-.js → code-aMX9iMYa.js} +0 -0
- /package/dist/assets/{composer-focus-D-P0cGAF.js → composer-focus-Bp1AiP29.js} +0 -0
- /package/dist/assets/{conversation-selection-CrdMTnwx.js → conversation-selection-CtKjA5Ni.js} +0 -0
- /package/dist/assets/{conversation-store-I2d3A6Tv.js → conversation-store-DK-7gFAt.js} +0 -0
- /package/dist/assets/{cpu-DpzMm9_m.js → cpu-CiHv3fhs.js} +0 -0
- /package/dist/assets/{credit-card-CN7yFHhB.js → credit-card-BKRB1ZIi.js} +0 -0
- /package/dist/assets/{definitions-B4RRVbRh.js → definitions-BVEXXekp.js} +0 -0
- /package/dist/assets/{dist-3i_EPbLt.js → dist-BTp54SIT.js} +0 -0
- /package/dist/assets/{dist-BQHdyjQ3.js → dist-cApvLul2.js} +0 -0
- /package/dist/assets/{domain-field-ChoXVdlk.js → domain-field-DYwuCpup.js} +0 -0
- /package/dist/assets/{edit-chat-session-DXSCprPw.js → edit-chat-session-DJpqkkos.js} +0 -0
- /package/dist/assets/{effective-timezone-DBaPUyaX.js → effective-timezone-DrYGH2Lb.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-C0EjtsOi.js → emoji-catalog-data-D9cXGKYH.js} +0 -0
- /package/dist/assets/{environment-store-DoO5ZqXZ.js → environment-store-CvH3J6fT.js} +0 -0
- /package/dist/assets/{event-bus-CFhOgvB8.js → event-bus-Dl7-I4aL.js} +0 -0
- /package/dist/assets/{external-link-DAovIsxF.js → external-link-DPAtkBJ2.js} +0 -0
- /package/dist/assets/{format-B2A6k4bb.js → format-0qTDTDhA.js} +0 -0
- /package/dist/assets/{format-date-Cx9GZ7-D.js → format-date-C-eCaBOj.js} +0 -0
- /package/dist/assets/{format-file-size-Br1LCKQi.js → format-file-size-BfZOpPdu.js} +0 -0
- /package/dist/assets/{globe-CfKniRIP.js → globe-DYF_lSGm.js} +0 -0
- /package/dist/assets/{haptics-BCTVEX6s.js → haptics-CXHZxyAg.js} +0 -0
- /package/dist/assets/{hard-drive-DggmyfjR.js → hard-drive-D7_5VMhi.js} +0 -0
- /package/dist/assets/{impersonate-version-flag-BksY65Mo.js → impersonate-version-flag-n-4oNLiO.js} +0 -0
- /package/dist/assets/{info-DXbzDupm.js → info-_OtUK1cX.js} +0 -0
- /package/dist/assets/{input-Ch7OC6ME.js → input-C8kfrq9r.js} +0 -0
- /package/dist/assets/{lib-BVvJNDCQ.js → lib-CqoczjxJ.js} +0 -0
- /package/dist/assets/{link-2-Dmka5LJV.js → link-2-CaszbD7P.js} +0 -0
- /package/dist/assets/{llm-dimension-ovOt_D6t.js → llm-dimension-Db-cwepb.js} +0 -0
- /package/dist/assets/{loader-circle-Cw1KvvLK.js → loader-circle-IIzBGiwm.js} +0 -0
- /package/dist/assets/{log-in-CUDpYpYW.js → log-in-2iOsufxq.js} +0 -0
- /package/dist/assets/{minimize-2-CPmn1RIm.js → minimize-2-JE_UHZlJ.js} +0 -0
- /package/dist/assets/{misc-Dm72afTZ.js → misc-BN2o2MEB.js} +0 -0
- /package/dist/assets/{moon-Be4Pgk5X.js → moon-CK8MXzOo.js} +0 -0
- /package/dist/assets/{native-deep-link-CYaeyOfj.js → native-deep-link-BYNI6pkW.js} +0 -0
- /package/dist/assets/{pdf-DhvXjkis.js → pdf-BJGZkYgE.js} +0 -0
- /package/dist/assets/{pencil-Dm2eFMe3.js → pencil-DbB9rxpY.js} +0 -0
- /package/dist/assets/{prechat-names-CkLrL-Jh.js → prechat-names-De-dVGbT.js} +0 -0
- /package/dist/assets/{progress-bar-DFH5aT1D.js → progress-bar-DIFlWPPg.js} +0 -0
- /package/dist/assets/{public-asset-CH9GPeL_.js → public-asset-Fx_laYnf.js} +0 -0
- /package/dist/assets/{refresh-cw-YXbpNg95.js → refresh-cw-Bf6LV0kG.js} +0 -0
- /package/dist/assets/{routes-B9xcBuuC.js → routes-DVqkwUEe.js} +0 -0
- /package/dist/assets/{save-CQ2-kSlv.js → save-DEBQ_gbb.js} +0 -0
- /package/dist/assets/{semver-aan9RUyA.js → semver-yC_Iq9co.js} +0 -0
- /package/dist/assets/{sparkles-C8hCShdb.js → sparkles-BICoewVE.js} +0 -0
- /package/dist/assets/{stat-square-CraPxMcl.js → stat-square-B0S3fO7O.js} +0 -0
- /package/dist/assets/{toggle-95p73HGd.js → toggle-X_kQW5my.js} +0 -0
- /package/dist/assets/{triangle-alert-DnZC45c-.js → triangle-alert-Bz1PpciW.js} +0 -0
- /package/dist/assets/{triangle-alert-AqQQTwUZ.js → triangle-alert-DKOyShqD.js} +0 -0
- /package/dist/assets/{typed-storage-qVehRaS3.js → typed-storage-Dctd_K9F.js} +0 -0
- /package/dist/assets/{usage-window-DbWHZkbr.js → usage-window-FKG0JDAT.js} +0 -0
- /package/dist/assets/{use-is-mobile-D_0cze0t.js → use-is-mobile-Cy10kl9u.js} +0 -0
- /package/dist/assets/{x-DE8JhiDZ.js → x-C8bCmIhD.js} +0 -0
- /package/dist/assets/{x-BeVbiDS2.js → x-KVxA2ZL0.js} +0 -0
- /package/dist/assets/{xterm-B74sC241.js → xterm-7Iq3jX3h.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-By7PlC-c.js → xterm-addon-fit-XFgHFTPw.js} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{t as i}from"./typography-BscuIPxA.js";import"./src-CK6bncSg.js";import{C as a,H as o,U as s,W as c,c as l,p as u,s as d,t as f,v as p}from"./risk-badge-6lK01djG.js";import{t as m}from"./brain-Bs6LnfHO.js";import{t as h}from"./check-D6WkI0gF.js";import{t as g}from"./code-aMX9iMYa.js";import{t as _}from"./file-text-CmK9LY1p.js";import{t as v}from"./globe-DYF_lSGm.js";import{t as y}from"./monitor-D2okHi8o.js";import{t as b}from"./sparkles-BICoewVE.js";import{t as x}from"./user-plus-C0OyQU83.js";import{t as S}from"./x-KVxA2ZL0.js";import{n as C}from"./tool-call-status-DTV5jmaU.js";import{Li as w}from"./index-ClC1ULPL.js";var T=e(t(),1);function E(e,t,n){return a(r=>{if(!e||t==null)return null;let i=r.liveTurn.find(t=>t.id===e||t.mergedMessageIds?.includes(e));if(!i)return null;let a=l(i.contentBlocks??[],{splitInlineThinking:i.role!==`user`})[t];if(!a||a.type!==`activity`)return null;let o=a.items.flatMap(e=>e.type===`thinking`&&e.thinking?[e.thinking]:[]);return n==null?o.join(`
|
|
2
|
+
`):o[n]??null})}function D(e){return a(t=>{if(!e)return null;for(let n of t.liveTurn){let t=n.toolCalls?.find(t=>t.id===e);if(t)return t}return null})}var O=r(),k={code:g,file:_,globe:v,pen:s,monitor:y,plug:o,sparkle:b,"user-plus":x,bolt:c,brain:m},A=1500;function j({text:e}){let[t,n]=(0,T.useState)(!1),r=(0,T.useRef)(null);return(0,T.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>{navigator.clipboard.writeText(e),n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>n(!1),A)},"aria-label":t?`Copied`:`Copy`,className:`absolute right-2 top-2 flex items-center gap-1 rounded p-1 text-label-small-default text-[var(--content-tertiary)] transition-colors hover:bg-[var(--ghost-hover)] hover:text-[var(--content-default)]`,children:[t?(0,O.jsx)(h,{className:`h-3.5 w-3.5`}):(0,O.jsx)(w,{className:`h-3.5 w-3.5`}),t?`Copied`:null]})}function M({text:e}){return(0,O.jsxs)(`div`,{className:`relative`,children:[(0,O.jsx)(`pre`,{className:`rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] p-3 font-mono text-xs whitespace-pre-wrap break-words text-[var(--content-default)]`,children:e}),(0,O.jsx)(j,{text:e})]})}function N({children:e}){return(0,O.jsx)(i,{variant:`label-small-default`,as:`div`,className:`mb-1.5 uppercase tracking-wider text-[var(--content-tertiary)]`,children:e})}function P({Glyph:e,title:t,headerTrailing:r,onClose:a,children:o}){return(0,O.jsxs)(`div`,{className:`flex h-full flex-col overflow-hidden rounded-xl bg-[var(--surface-lift)]`,children:[(0,O.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 border-b border-[var(--border-base)] px-5 py-4`,children:[(0,O.jsx)(e,{className:`h-5 w-5 shrink-0 text-[var(--content-secondary)]`,"aria-hidden":!0}),(0,O.jsx)(i,{variant:`title-medium`,className:`min-w-0 shrink truncate py-0.5 leading-snug text-[var(--content-default)]`,children:t}),r,(0,O.jsx)(`span`,{className:`flex-1`}),(0,O.jsx)(n,{variant:`ghost`,iconOnly:(0,O.jsx)(S,{}),onClick:a,"aria-label":`Close tool details`,tooltip:`Close`,className:`shrink-0`})]}),(0,O.jsx)(`div`,{className:`flex-1 overflow-y-auto px-5 py-5`,children:o})]})}function F({detail:e,onClose:t}){let n=E(e.messageId,e.thinkingGroupIndex,e.thinkingItemIndex);return(0,O.jsx)(P,{Glyph:m,title:e.title,onClose:t,children:(0,O.jsx)(d,{content:n??e.thinkingText??``,hardLineBreaks:!0})})}function I({detail:e,showTechnicalDetailsLabel:t=!0}){let n=D(e.toolCallId),r=n?.result??e.result,a=n?.streamedOutput??e.streamedOutput,o=r!==void 0&&r!==``,s=n?C(n):e.status===`running`,c=!!a,l=JSON.stringify(e.input,null,2);return(0,O.jsxs)(O.Fragment,{children:[e.riskReason&&(0,O.jsx)(i,{variant:`body-small-default`,as:`p`,className:`mb-4 text-[var(--content-tertiary)]`,children:e.riskReason}),(0,O.jsxs)(`div`,{children:[t&&(0,O.jsx)(N,{children:`Technical details`}),(0,O.jsx)(i,{variant:`body-medium-default`,as:`div`,className:`text-[var(--content-default)]`,children:p(e.toolName)}),e.activity&&(0,O.jsx)(i,{variant:`body-small-default`,as:`p`,className:`mt-0.5 text-[var(--content-secondary)]`,children:e.activity}),(0,O.jsx)(`div`,{className:`mt-2`,children:(0,O.jsx)(M,{text:l})})]}),(o||s)&&(0,O.jsxs)(`div`,{className:`mt-5`,children:[(0,O.jsx)(N,{children:`Output`}),o?(0,O.jsx)(M,{text:r}):c?(0,O.jsx)(M,{text:a}):(0,O.jsx)(i,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:`Running…`})]})]})}function L({detail:e,onClose:t,onRiskBadgeClick:n}){if(e.kind===`thinking`)return(0,O.jsx)(F,{detail:e,onClose:t});let{iconName:r}=u(e.toolName,e.input);return(0,O.jsx)(P,{Glyph:k[r]??c,title:e.activity||e.title,onClose:t,headerTrailing:(0,O.jsx)(f,{level:e.riskLevel,onClick:n}),children:(0,O.jsx)(I,{detail:e})})}export{M as CodeBlock,I as ToolDetailBody,L as ToolDetailPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./useQuery-B45lW1Kk.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{t as i}from"./dropdown-CL8VmqrY.js";import"./src-CK6bncSg.js";import{t as a}from"./brain-Bs6LnfHO.js";import{t as o}from"./chevron-up-BRZN6p_l.js";import{t as s}from"./circle-alert-DvNg50UK.js";import{t as c}from"./circle-check-DzlJxj_M.js";import{t as l}from"./loader-circle-IIzBGiwm.js";import{t as u}from"./refresh-cw-Bf6LV0kG.js";import{t as d}from"./triangle-alert-DKOyShqD.js";import{$n as f}from"./sdk.gen-1aYqVbMj.js";import{$i as p,An as m,Jt as h,Ki as g,Si as _,Wr as v,Yi as y,Yr as b,Yt as x,di as S,hi as C,kr as w,mt as T,pt as E,qi as D,qt as O,ra as ee}from"./index-ClC1ULPL.js";import{t as te}from"./use-active-assistant-id-Dyfjqq4l.js";import{a as k,i as A,n as j,r as M}from"./format-0qTDTDhA.js";var N=e(t(),1),P={requestCount:0,llmCallCount:0,totalInputTokens:0,totalOutputTokens:0,averageLlmLatencyMs:0,toolFailureCount:0};function F(e,t){let n=e.attributes?.[t];if(typeof n==`number`&&Number.isFinite(n))return n;if(typeof n==`string`){let e=Number(n);if(Number.isFinite(e))return e}}function I(e){if(e.length===0)return P;let t=new Set,n=0,r=0,i=0,a=0,o=0,s=0;for(let c of e)switch(c.requestId&&t.add(c.requestId),c.kind){case`llm_call_finished`:{n+=1,r+=F(c,`inputTokens`)??0,i+=F(c,`outputTokens`)??0;let e=F(c,`latencyMs`);e!==void 0&&(a+=e,o+=1);break}case`tool_failed`:s+=1;break;default:break}return{requestCount:t.size,llmCallCount:n,totalInputTokens:r,totalOutputTokens:i,averageLlmLatencyMs:o>0?a/o:0,toolFailureCount:s}}function L(e){for(let t of e)switch(t.kind){case`generation_cancelled`:return`cancelled`;case`generation_handoff`:return`handedOff`;case`request_error`:return`error`;case`message_complete`:return`completed`;default:break}return e.some(e=>e.status===`error`)?`error`:`active`}function R(e){let t=new Map;for(let n of e){let e=n.requestId??``,r=t.get(e);r?(r.events.push(n),n.sequence<r.firstSequence&&(r.firstSequence=n.sequence)):t.set(e,{requestId:e,firstSequence:n.sequence,events:[n]})}for(let e of t.values())e.events.sort((e,t)=>e.sequence-t.sequence);return[...t.values()].sort((e,t)=>e.firstSequence-t.firstSequence)}function z(e){switch(e){case`request_received`:return y;case`request_queued`:case`request_dequeued`:return _;case`llm_call_started`:case`llm_call_finished`:return a;case`assistant_message`:return S;case`tool_started`:case`tool_finished`:return w;case`tool_permission_requested`:return v;case`tool_permission_decided`:return C;case`tool_failed`:return d;case`generation_handoff`:return u;case`message_complete`:return c;case`generation_cancelled`:return D;case`request_error`:return s;default:return g}}function B(e){switch(e){case`error`:return`var(--system-negative-strong)`;case`warning`:return`var(--system-mid-strong)`;case`success`:return`var(--system-positive-strong)`;default:return`var(--content-tertiary)`}}function V(e){switch(e){case`active`:return{Icon:ee,color:`var(--system-positive-strong)`};case`completed`:return{Icon:c,color:`var(--system-positive-strong)`};case`cancelled`:return{Icon:D,color:`var(--system-mid-strong)`};case`handedOff`:return{Icon:u,color:`var(--system-positive-strong)`};case`error`:return{Icon:d,color:`var(--system-negative-strong)`}}}function H(e){return e==null?`—`:typeof e==`string`?e:String(e)}var U=class extends Error{status;constructor(e,t){super(t),this.name=`TraceEventsRequestError`,this.status=e}};async function W(e,t){let{data:n,response:r}=await f({path:{assistant_id:e},query:{conversationId:t.conversationId,limit:t.limit,afterSequence:t.afterSequence},throwOnError:!1});if(!r?.ok){let e=await r?.clone().text().catch(()=>``);throw new U(r?.status??0,e||r?.statusText||`Failed to load trace events`)}return n??{events:[]}}var G=r(),K=500;function q({assistantId:e}){let[t,r]=(0,N.useState)(null),{conversations:i,isLoading:a,isError:o,error:s}=h(e),{conversations:c}=O(e,!0),{conversations:u}=x(e,!0),d=(0,N.useMemo)(()=>m(i,c,u).filter(e=>e.archivedAt==null),[i,c,u]),f=(0,N.useMemo)(()=>{if(t){let e=d.find(e=>e.conversationId===t);if(e)return e.conversationId}let n=E(e);if(n){let e=d.find(e=>e.conversationId===n);if(e)return e.conversationId}return d[0]?.conversationId??``},[e,d,t]),p=(0,N.useCallback)(t=>{r(t),T(e,t)},[e]),{data:g,isLoading:_,isError:v,error:y}=n({queryKey:[`trace-events`,e,f],queryFn:()=>W(e,{conversationId:f,limit:K}),enabled:f.length>0}),b=(0,N.useMemo)(()=>g?.events??[],[g]),S=(0,N.useMemo)(()=>I(b),[b]),C=(0,N.useMemo)(()=>R(b),[b]),w=d.length>0;return(0,G.jsx)(`div`,{className:`flex flex-col gap-6`,children:a?(0,G.jsx)(`div`,{className:`flex items-center justify-center py-16`,children:(0,G.jsx)(l,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-secondary)`}})}):o?(0,G.jsx)($,{message:s instanceof Error?s.message:`Failed to load conversations.`}):w?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(J,{conversations:d,selectedConversationId:f,onSelect:p}),_?(0,G.jsx)(`div`,{className:`flex items-center justify-center py-16`,children:(0,G.jsx)(l,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-secondary)`}})}):v?(0,G.jsx)($,{message:y instanceof Error?y.message:`Failed to load trace events.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(X,{metrics:S}),b.length===0?(0,G.jsx)(Q,{title:`No trace events yet`,subtitle:`Events will appear as the session runs.`}):(0,G.jsx)(ne,{groups:C})]})]}):(0,G.jsx)(Q,{title:`No conversations yet`,subtitle:`Start a conversation to generate trace events.`})})}function J({conversations:e,selectedConversationId:t,onSelect:n}){return(0,G.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,G.jsx)(`label`,{htmlFor:`logs-conversation-picker`,className:`text-body-small-default`,style:{color:`var(--content-secondary)`},children:`Conversation`}),(0,G.jsx)(i,{id:`logs-conversation-picker`,value:t,onChange:n,options:e.map(e=>({value:e.conversationId,label:Y(e)}))})]})}function Y(e){return e.title?.trim()||`Conversation ${e.conversationId.slice(0,8)}`}function X({metrics:e}){let t=e.toolFailureCount>0;return(0,G.jsxs)(`section`,{className:`flex flex-col gap-3 rounded-lg border p-4`,style:{background:`var(--surface-lift)`,borderColor:`var(--border-base)`},children:[(0,G.jsx)(`h3`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:`Session Metrics`}),(0,G.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,G.jsx)(Z,{label:`Requests`,value:A(e.requestCount)}),(0,G.jsx)(Z,{label:`LLM Calls`,value:A(e.llmCallCount)}),(0,G.jsx)(Z,{label:`Tokens`,value:k(e.totalInputTokens,e.totalOutputTokens)}),(0,G.jsx)(Z,{label:`Avg Latency`,value:j(e.averageLlmLatencyMs)}),t?(0,G.jsx)(Z,{label:`Failures`,value:A(e.toolFailureCount),valueColor:`var(--system-negative-strong)`}):null]})]})}function Z({label:e,value:t,valueColor:n}){return(0,G.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-md px-3 py-2`,style:{background:`color-mix(in srgb, var(--border-base) 15%, transparent)`},children:[(0,G.jsx)(`span`,{className:`text-body-medium-default`,style:{color:n??`var(--content-default)`},children:t}),(0,G.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:e})]})}function ne({groups:e}){return(0,G.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,G.jsx)(`h3`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:`Timeline`}),(0,G.jsx)(`div`,{className:`flex flex-col gap-5`,children:e.map(e=>(0,G.jsx)(re,{requestId:e.requestId,events:e.events},e.requestId||`__system__`))})]})}function re({requestId:e,events:t}){let n=V((0,N.useMemo)(()=>L(t),[t])),r=e?`Request ${e.slice(0,8)}`:`System`;return(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.createElement)(n.Icon,{className:`h-3 w-3 shrink-0`,style:{color:n.color}}),(0,G.jsx)(`span`,{className:`text-body-small-default select-text`,style:{color:`var(--content-secondary)`},children:r}),(0,G.jsx)(`div`,{className:`h-px flex-1`,style:{background:`var(--border-base)`},"aria-hidden":!0})]}),(0,G.jsx)(`ol`,{className:`flex flex-col`,style:{listStyle:`none`},children:t.map(e=>(0,G.jsx)(`li`,{children:(0,G.jsx)(ie,{event:e})},e.eventId))})]})}function ie({event:e}){let[t,n]=(0,N.useState)(!1),r=(0,N.useMemo)(()=>e.attributes?Object.entries(e.attributes).sort(([e],[t])=>e.localeCompare(t)):[],[e.attributes]),i=r.length>0,a=z(e.kind),s=B(e.status);return(0,G.jsxs)(`div`,{className:`flex flex-col`,children:[(0,G.jsxs)(`button`,{type:`button`,onClick:()=>{i&&n(e=>!e)},className:`flex w-full items-start gap-2 rounded-sm px-1 py-1.5 text-left transition-colors`,style:{cursor:i?`pointer`:`default`},disabled:!i,"aria-expanded":i?t:void 0,children:[(0,N.createElement)(a,{className:`mt-0.5 h-3.5 w-3.5 shrink-0`,style:{color:s}}),(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-lighter break-words`,style:{color:`var(--content-default)`},children:e.summary}),(0,G.jsx)(`span`,{className:`font-mono text-body-small-default`,style:{color:`var(--content-tertiary)`},children:M(e.timestampMs)})]}),i?t?(0,G.jsx)(o,{className:`mt-1 h-3 w-3 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,G.jsx)(p,{className:`mt-1 h-3 w-3 shrink-0`,style:{color:`var(--content-tertiary)`}}):null]}),t&&i?(0,G.jsx)(`div`,{className:`mb-1 ml-6 mr-2 rounded-md px-3 py-2`,style:{background:`var(--surface-base)`},children:(0,G.jsx)(`dl`,{className:`flex flex-col gap-1`,children:r.map(([e,t])=>(0,G.jsxs)(`div`,{className:`flex flex-col gap-0.5 sm:flex-row sm:gap-3`,children:[(0,G.jsx)(`dt`,{className:`shrink-0 font-mono text-body-small-default`,style:{color:`var(--content-tertiary)`},children:e}),(0,G.jsx)(`dd`,{className:`font-mono text-body-small-default break-all`,style:{color:`var(--content-secondary)`},children:H(t)})]},e))})}):null]})}function Q({title:e,subtitle:t}){return(0,G.jsxs)(`div`,{className:`flex flex-col items-center justify-center rounded-md border border-dashed px-6 py-16 text-center`,style:{borderColor:`var(--border-base)`,color:`var(--content-secondary)`},children:[(0,G.jsx)(b,{className:`mb-3 h-8 w-8`}),(0,G.jsx)(`p`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e}),(0,G.jsx)(`p`,{className:`mt-1 text-body-small-default`,children:t})]})}function $({message:e}){return(0,G.jsxs)(`div`,{className:`text-body-medium-lighter flex items-start gap-3 rounded-md border px-4 py-3`,style:{background:`var(--surface-lift)`,borderColor:`var(--border-base)`,color:`var(--content-default)`},children:[(0,G.jsx)(d,{className:`h-5 w-5 shrink-0`,style:{color:`var(--system-negative-strong)`}}),(0,G.jsx)(`span`,{children:e})]})}function ae(){return(0,G.jsx)(q,{assistantId:te()})}export{ae as TracePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,r as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./typography-BscuIPxA.js";import{t as s}from"./card-BibIM9x3.js";import{t as c}from"./notice-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,r as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./typography-BscuIPxA.js";import{t as s}from"./card-BibIM9x3.js";import{t as c}from"./notice-CqRgVmeL.js";import{n as l}from"./toast-2TW5tj1Y.js";import{a as u}from"./routes-DVqkwUEe.js";import{an as d,in as f,rn as p,x as m}from"./index-ClC1ULPL.js";var h=e(t(),1),g=a();function _(){let e=d({platformHostedOnly:!0}),t=p(),a=f(),_=r();return(0,h.useEffect)(()=>{t&&(l.info(`Upgrade canceled. No changes to your plan.`,{id:`pro-upgrade-cancel`}),_(u.settings.billing,{replace:!0}))},[_,t]),e===`gated`?(0,g.jsx)(i,{replace:!0,to:u.settings.general}):e===`disabled`?(0,g.jsx)(`div`,{className:`max-w-4xl space-y-6`,children:(0,g.jsx)(m,{children:`Log in to the Vellum platform to manage billing and usage.`})}):!t&&!a?(0,g.jsxs)(`div`,{className:`max-w-4xl space-y-6`,children:[(0,g.jsx)(c,{tone:`warning`,children:`Billing isn't available for the current assistant state.`}),(0,g.jsx)(`div`,{className:`flex justify-end`,children:(0,g.jsx)(n,{variant:`primary`,onClick:()=>_(u.settings.billing,{replace:!0}),children:`Return to billing`})})]}):(0,g.jsx)(`div`,{className:`max-w-4xl space-y-6`,children:(0,g.jsxs)(s,{padding:`lg`,children:[(0,g.jsx)(o,{as:`h1`,variant:`title-large`,children:`Upgrade canceled`}),(0,g.jsx)(o,{as:`p`,variant:`body-medium-default`,className:`mt-2`,children:`Returning you to billing settings…`})]})})}export{_ as UpgradeCancelPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,r as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as a}from"./QueryClientProvider-DKhXIxGb.js";import{t as o}from"./useQuery-B45lW1Kk.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./typography-BscuIPxA.js";import{t as l}from"./card-BibIM9x3.js";import{t as u}from"./notice-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,r as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as a}from"./QueryClientProvider-DKhXIxGb.js";import{t as o}from"./useQuery-B45lW1Kk.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./typography-BscuIPxA.js";import{t as l}from"./card-BibIM9x3.js";import{t as u}from"./notice-CqRgVmeL.js";import{t as d}from"./circle-alert-DvNg50UK.js";import{t as f}from"./circle-check-DzlJxj_M.js";import{t as p}from"./loader-circle-IIzBGiwm.js";import{a as m}from"./routes-DVqkwUEe.js";import{et as h,tt as g}from"./react-query.gen-rp6Krcco.js";import{an as _,in as v,rn as y,x as b}from"./index-ClC1ULPL.js";var x=e(t(),1),S=s(),C=1e3,w=1e4,T=2500;function E(){let e=_({platformHostedOnly:!0}),t=y(),s=v(),c=e===`full`&&t,d=r(),f=a(),[p,E]=(0,x.useState)(!1);(0,x.useEffect)(()=>{f.invalidateQueries({queryKey:g()})},[f]);let{data:j,isError:M}=o({...h(),enabled:c,refetchInterval:e=>e.state.data?.plan_id===`pro`||p?!1:C,refetchIntervalInBackground:!1}),N=c?j:void 0,P=c?M:!1;(0,x.useEffect)(()=>{if(!c)return;let e=setTimeout(()=>E(!0),w);return()=>clearTimeout(e)},[c]);let F=N?.plan_id===`pro`;(0,x.useEffect)(()=>{if(!F)return;let e=setTimeout(()=>{d(m.settings.billing,{replace:!0})},T);return()=>clearTimeout(e)},[F,d]);let I=()=>d(m.settings.billing,{replace:!0});return e===`gated`?(0,S.jsx)(i,{replace:!0,to:m.settings.general}):e===`disabled`?(0,S.jsx)(`div`,{className:`max-w-4xl space-y-6`,children:(0,S.jsx)(b,{children:`Log in to the Vellum platform to manage billing and usage.`})}):!c&&!s?(0,S.jsxs)(`div`,{className:`max-w-4xl space-y-6`,children:[(0,S.jsx)(u,{tone:`warning`,children:`We can't confirm your upgrade for the current assistant. Return to billing to retry.`}),(0,S.jsx)(`div`,{className:`flex justify-end`,children:(0,S.jsx)(n,{variant:`primary`,"data-testid":`upgrade-success-go-to-billing`,onClick:I,children:`Go to billing`})})]}):(0,S.jsx)(`div`,{className:`max-w-4xl space-y-6`,children:(0,S.jsxs)(l,{padding:`lg`,children:[F?(0,S.jsx)(O,{}):P?(0,S.jsx)(A,{}):p?(0,S.jsx)(k,{}):(0,S.jsx)(D,{}),(F||P||p)&&(0,S.jsx)(`div`,{className:`mt-4 flex justify-end`,children:(0,S.jsx)(n,{variant:F||P?`primary`:`outlined`,"data-testid":`upgrade-success-go-to-billing`,onClick:I,children:`Go to billing`})})]})})}function D(){return(0,S.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-6 text-center`,children:[(0,S.jsx)(p,{className:`h-6 w-6 animate-spin text-[var(--content-secondary)]`,"aria-hidden":`true`}),(0,S.jsx)(c,{variant:`title-small`,as:`h1`,children:`Finalizing your upgrade…`}),(0,S.jsx)(c,{variant:`body-medium-lighter`,as:`p`,className:`text-[var(--content-secondary)]`,children:`Stripe is confirming your subscription. This usually takes a few seconds.`})]})}function O(){return(0,S.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-6 text-center`,children:[(0,S.jsx)(f,{className:`h-8 w-8 text-[var(--system-positive-strong)]`,"aria-hidden":`true`}),(0,S.jsx)(c,{variant:`title-small`,as:`h1`,children:`Welcome to Pro`}),(0,S.jsx)(c,{variant:`body-medium-lighter`,as:`p`,className:`text-[var(--content-secondary)]`,children:`Your Pro plan is active. You'll be redirected back to billing in a moment.`})]})}function k(){return(0,S.jsx)(u,{tone:`warning`,children:`We're processing your upgrade — refresh in a moment to see your new plan.`})}function A(){return(0,S.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-6 text-center`,children:[(0,S.jsx)(d,{className:`h-8 w-8 text-[var(--system-negative-strong)]`,"aria-hidden":`true`}),(0,S.jsx)(c,{variant:`title-small`,as:`h1`,children:`Couldn't reach billing`}),(0,S.jsx)(c,{variant:`body-medium-lighter`,as:`p`,className:`text-[var(--content-secondary)]`,children:`We hit a problem checking your subscription. Your upgrade may still be processing — return to billing to refresh.`})]})}export{E as UpgradeSuccessPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./useQuery-B45lW1Kk.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{t as s}from"./dropdown-yOV5eJnU.js";import"./src-BJj2O5XB.js";import{t as c}from"./sparkles-C8hCShdb.js";import{t as l}from"./triangle-alert-AqQQTwUZ.js";import{er as u}from"./sdk.gen-DtKkd6hs.js";import{Dt as d,Et as f,Ot as ee,Tt as te,c as ne,d as re,ut as ie}from"./react-query.gen-4ZMhZ-fj.js";import{t as p}from"./api-errors-D3EsNrwn.js";import{Mt as m,Yt as ae}from"./index-Cx6vyW7T.js";import{t as h}from"./use-active-assistant-id-BlwRimQH.js";import{i as g,t as _}from"./format-B2A6k4bb.js";import{i as v,o as y,r as b}from"./llm-dimension-ovOt_D6t.js";import{n as x}from"./usage-window-DbWHZkbr.js";import{n as oe,t as se}from"./schedules-MF0cMAPX.js";var S=e(t(),1);function ce(e){if(!e)return{};let t={};for(let n of e.callSites)!n.id||!n.displayName||(t[n.id]={id:n.id,displayName:n.displayName,description:n.description,domain:n.domain});return t}function C(e,t,n){if(e===`task`){let e=t.groupKey;return e?n.callSites?.[e]?.displayName??t.group:t.group}if(e===`profile`){let e=t.groupKey;return e?n.profiles?.[e]?.displayName??t.group:t.group||`Default / Unset`}return t.group}function le(e,t,n){return!e||e.length===0?[]:e.map(e=>{let r=C(t,e,n);return r===e.group?e:{...e,group:r}})}var w=6,T=`value:`,E=`null:`;function D(e,t=`schedule`){return e===null?`${E}${v(t)?y(t):t}`:`${T}${e}`}function O(e){return[...e].sort((e,t)=>{if(e.date!==t.date)return e.date<t.date?-1:1;let n=j(e.bucketId),r=j(t.bucketId);return n===r?e.bucketId===t.bucketId?0:e.bucketId<t.bucketId?-1:1:n-r})}function ue(e){return e.map(e=>({bucketId:e.bucketId,date:e.date,displayLabel:e.displayLabel,totalInputTokens:e.totalInputTokens,totalOutputTokens:e.totalOutputTokens,totalEstimatedCostUsd:e.totalEstimatedCostUsd,eventCount:e.eventCount,groups:{}}))}function de(e,t,n){return t!==`task`&&t!==`profile`?[...e]:e.map(e=>{let r=!1,i={};for(let[a,o]of Object.entries(e.groups)){let e=C(t,A(o),n);e===o.group?i[a]=o:(r=!0,i[a]={...o,group:e})}return r?{...e,groups:i}:e})}function k(e){let t=new Map;for(let n of e)for(let[e,r]of Object.entries(n.groups)){let n=t.get(e);t.set(e,{label:n?.label??r.group,totalEstimatedCostUsd:(n?.totalEstimatedCostUsd??0)+r.totalEstimatedCostUsd})}let n=Array.from(t.entries()).sort(([e,t],[n,r])=>t.totalEstimatedCostUsd===r.totalEstimatedCostUsd?t.label===r.label?e===n?0:e<n?-1:1:t.label<r.label?-1:1:r.totalEstimatedCostUsd-t.totalEstimatedCostUsd).map(([e,t],n)=>({seriesKey:e,label:t.label,totalEstimatedCostUsd:t.totalEstimatedCostUsd,colorIndex:n}));return{items:n,visibleItems:n.slice(0,w)}}function A(e){return{group:e.group,groupId:e.groupKey,groupKey:e.groupKey,totalInputTokens:e.totalInputTokens,totalOutputTokens:e.totalOutputTokens,totalCacheCreationTokens:0,totalCacheReadTokens:0,totalEstimatedCostUsd:e.totalEstimatedCostUsd,eventCount:e.eventCount,turnCount:null}}function j(e){let t=e.lastIndexOf(`|`);if(t<0)return 0;let n=Number(e.slice(t+1));return Number.isFinite(n)?n:0}var M=o(),N=140,P=40,F=28,fe=2,pe=2,me=1e-6,I=12,L=220,R=56,he=[40,80,60,100,50,70,30],ge=[18,24,28,35,42,50,64,78,92,106,118,96,84,74,68,80,88,72,56,48,40,34,26,20],z=[`var(--usage-trend-stack-positive, var(--system-positive-strong, #10b981))`,`var(--usage-trend-stack-info, var(--system-info-strong, #3b82f6))`,`var(--usage-trend-stack-mid, var(--system-mid-strong, #f59e0b))`,`var(--usage-trend-stack-secondary, var(--content-secondary, #6b7280))`,`var(--usage-trend-stack-negative, var(--system-negative-strong, #f87171))`,`var(--usage-trend-stack-tertiary, var(--content-tertiary, #9ca3af))`];function B(e){return z[e%z.length]}function V(e){return e.displayLabel?e.displayLabel:e.date}function _e(e,t){let n=e+I,r=t+I;return n+L>window.innerWidth&&(n=e-L-I),r+R>window.innerHeight&&(r=t-R-I),{x:n,y:r}}function ve({buckets:e,isHourly:t,legendItems:n}){let[r,i]=(0,S.useState)(null),a=(0,S.useMemo)(()=>O(e),[e]),o=(0,S.useMemo)(()=>k(e),[e]),s=n??o.items,c=n??o.visibleItems,l=(0,S.useMemo)(()=>a.reduce((e,t)=>Math.max(e,t.totalEstimatedCostUsd),0),[a]),u=(0,S.useCallback)((e,t)=>{let n=_e(e.clientX,e.clientY);i({...t,x:n.x,y:n.y})},[]),d=(0,S.useCallback)(()=>i(null),[]);if(a.length===0){let e=(0,M.jsx)(Se,{title:t?`No hourly data`:`No daily data`,subtitle:`No usage recorded in this time range`});return c.length===0?e:(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e,(0,M.jsx)(H,{items:c})]})}let f=t?F:P;return(0,M.jsxs)(`div`,{className:`overflow-x-auto`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,M.jsx)(`div`,{className:`flex items-end gap-2`,style:{height:`${N}px`},"aria-hidden":`true`,children:a.map(e=>{let t=l>0?e.totalEstimatedCostUsd/l:0,r=Math.max(fe,N*t);return(0,M.jsx)(`div`,{className:`flex items-end`,style:{width:`${f}px`,minWidth:`${f}px`,height:`${r}px`,opacity:e.totalEstimatedCostUsd>0?1:.3},title:`${V(e)}: ${_(e.totalEstimatedCostUsd)}`,"data-usage-series-bar":e.bucketId,children:(0,M.jsx)(be,{bucket:e,height:r,legendItems:s,hasLegendOverride:n!=null,onSegmentHover:u,onSegmentLeave:d})},e.bucketId)})}),(0,M.jsx)(`div`,{className:`flex items-start gap-2`,children:a.map(e=>(0,M.jsxs)(`div`,{className:`flex flex-col items-center gap-0.5`,style:{width:`${f}px`,minWidth:`${f}px`},children:[(0,M.jsx)(`span`,{className:`truncate text-[10px]`,style:{color:`var(--content-secondary)`},children:_(e.totalEstimatedCostUsd)}),(0,M.jsx)(`span`,{className:`truncate text-[10px]`,style:{color:`var(--content-tertiary)`},children:V(e)})]},e.bucketId))}),c.length>0?(0,M.jsx)(H,{items:c}):null]}),r?(0,M.jsx)(xe,{tooltip:r}):null]})}function ye({isHourly:e}){let t=e?ge:he,n=e?F:P;return(0,M.jsx)(`div`,{className:`flex items-end gap-2`,style:{height:`${N}px`},"aria-hidden":`true`,children:t.map((e,t)=>(0,M.jsx)(`div`,{className:`rounded-sm`,style:{width:`${n}px`,height:`${e}px`,background:`color-mix(in srgb, var(--border-base) 40%, transparent)`}},t))})}function be({bucket:e,height:t,legendItems:n,hasLegendOverride:r,onSegmentHover:i,onSegmentLeave:a}){let o=Object.keys(e.groups).length>0,s=n.filter(e=>(e.state??`active`)===`active`).flatMap(t=>{let n=e.groups[t.seriesKey];return!n||n.totalEstimatedCostUsd<=0?[]:[{item:t,value:n}]});if(s.length===0&&!o&&!r){let n={label:`Total`,bucketLabel:V(e),cost:_(e.totalEstimatedCostUsd)};return(0,M.jsx)(`div`,{className:`w-full rounded-sm`,title:`${n.label}: ${n.cost}`,onMouseEnter:e=>i(e,n),onMouseMove:e=>i(e,n),onMouseLeave:a,style:{height:`${t}px`,background:B(0)},"data-usage-series-segment-label":n.label,"data-usage-fallback-segment":`true`})}return s.length===0?null:(0,M.jsx)(`div`,{className:`flex w-full flex-col-reverse overflow-hidden rounded-sm`,style:{height:`${t}px`},"data-usage-series-stack":e.bucketId,children:s.map(({item:n,value:r})=>{let o={label:n.label,bucketLabel:V(e),cost:_(r.totalEstimatedCostUsd)};return(0,M.jsx)(`div`,{title:`${o.label}: ${o.cost}`,onMouseEnter:e=>i(e,o),onMouseMove:e=>i(e,o),onMouseLeave:a,style:{height:`${Math.max(pe,t*r.totalEstimatedCostUsd/Math.max(e.totalEstimatedCostUsd,me))}px`,background:B(n.colorIndex)},"data-usage-series-segment":n.seriesKey,"data-usage-series-segment-label":n.label,"data-usage-series-color-index":n.colorIndex},n.seriesKey)})})}function xe({tooltip:e}){return(0,M.jsxs)(`div`,{className:`pointer-events-none fixed z-50 max-w-[220px] rounded-md border px-2 py-1 shadow-xl`,style:{left:`${e.x}px`,top:`${e.y}px`,background:`var(--surface-overlay, var(--surface-lift))`,borderColor:`var(--border-base)`},"aria-hidden":`true`,children:[(0,M.jsx)(`div`,{className:`truncate text-body-small-default`,style:{color:`var(--content-default)`},children:e.label}),(0,M.jsxs)(`div`,{className:`truncate text-body-small-default`,style:{color:`var(--content-tertiary)`},children:[e.bucketLabel,` · `,e.cost]})]})}function H({items:e}){return(0,M.jsx)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 pt-1`,children:e.map(e=>{let t=e.state??`active`,n=t===`inactive`;return(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,"data-usage-legend-state":t,children:[(0,M.jsx)(`span`,{className:`h-[7px] w-[7px] shrink-0 rounded-full`,style:{background:n?`var(--content-tertiary)`:B(e.colorIndex),opacity:n?.45:1},"aria-hidden":`true`,"data-usage-series-color-index":e.colorIndex}),(0,M.jsx)(`span`,{className:n?`truncate text-[10px] line-through`:`truncate text-[10px]`,style:{color:`var(--content-tertiary)`,opacity:n?.65:1},children:e.label})]},e.seriesKey)})})}function Se({title:e,subtitle:t}){return(0,M.jsxs)(`div`,{className:`flex flex-col items-center justify-center rounded-md py-12 text-center`,style:{color:`var(--content-tertiary)`},children:[(0,M.jsx)(`p`,{className:`text-body-medium-default`,style:{color:`var(--content-secondary)`},children:e}),(0,M.jsx)(`p`,{className:`mt-1 text-body-small-default`,children:t})]})}function U(e){return v(e)?y(e):e}function Ce(e){return G({from:e.from,to:e.to},e.scheduleId)}function we(e){return G({from:e.from,to:e.to,...e.granularity?{granularity:e.granularity}:{},...e.tz?{tz:e.tz}:{}},e.scheduleId)}function W(e){return G({from:e.from,to:e.to,groupBy:U(e.groupBy)},e.scheduleId)}function Te(e){return G({from:e.from,to:e.to,granularity:e.granularity,groupBy:U(e.groupBy),...e.tz?{tz:e.tz}:{}},e.scheduleId)}function G(e,t){return t?{...e,scheduleId:t}:e}function Ee(e){return[`${g(e.totalInputTokens)} direct`,`${g(e.totalCacheCreationTokens)} cache created`,`${g(e.totalCacheReadTokens)} cache read`,`${g(e.totalOutputTokens)} out`].join(` / `)}function K(e){return!Number.isFinite(e)||e===0?`0`:e>=1e6||e>=999950&&e<1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:e.toLocaleString()}function De(e){return`${K(e.totalInputTokens+e.totalCacheCreationTokens+e.totalCacheReadTokens)} in / ${K(e.totalOutputTokens)} out`}var Oe=`task`,q=`model`,ke=new Set([400,404,422]),Ae=3,je=new Set([`today`,`yesterday`,`7d`,`30d`,`90d`,`all`]),Me=new Set([`actor`,`provider`,`model`,`conversation`,`task`,`profile`,`schedule`]),J={task:b.task,profile:b.profile,model:b.model,provider:`Provider`,actor:`Actor`,conversation:`Conversation`,schedule:`Schedule`},Ne=[{value:`task`,label:J.task},{value:`profile`,label:J.profile},{value:`model`,label:J.model},{value:`provider`,label:J.provider},{value:`schedule`,label:J.schedule},{value:`conversation`,label:J.conversation}];function Pe(e){let t=e.get(`range`),n=e.get(`groupBy`),r=Re(n)?n:Oe;return{range:Le(t)?t:`7d`,groupBy:r,scheduleId:r===`schedule`?Fe(e):void 0}}function Fe(e){let t=e.get(`scheduleId`);if(!(!t||t.trim().length===0))return t}function Ie(e,t){let n=new URLSearchParams(e);return t.range!==void 0&&n.set(`range`,t.range),t.groupBy!==void 0&&n.set(`groupBy`,t.groupBy),t.scheduleId!==void 0&&(t.scheduleId===null||t.scheduleId.trim().length===0?n.delete(`scheduleId`):n.set(`scheduleId`,t.scheduleId)),n.get(`groupBy`)!==`schedule`&&n.delete(`scheduleId`),n}function Le(e){return e!=null&&je.has(e)}function Re(e){return e!=null&&Me.has(e)}function ze(e){return e!==`conversation`}function Be(e,t){return e!==`task`&&e!==`profile`?!1:He(t)}function Ve(e,t){return!He(t)&&e<Ae}function He(e){return e instanceof p&&ke.has(e.status)}function Ue(e,t){let n=e===`hourly`?`Hourly Trend`:`Daily Trend`;return!t||t===`conversation`?n:`${n} by ${J[t]}`}function We({requestedGranularity:e,isLoading:t,buckets:n}){return e===`hourly`&&(t||!n||n.length===0||n.some(Ge))?`hourly`:`daily`}function Ge(e){return e.bucketId.includes(`|`)||Ke(e.date)}function Ke(e){return/^\d{4}-\d{2}-\d{2} ([01]\d|2[0-3]):00$/.test(e)}function qe(e,t,n=Date.now()){return x(e,t,n)}function Je(e){return e===`today`||e===`yesterday`?`hourly`:`daily`}function Ye({prompt:e,children:t,variant:i=`outlined`,size:a=`regular`,className:o}){let s=r(),l=(0,S.useCallback)(()=>{m(s,{prompt:e})},[s,e]);return(0,M.jsx)(n,{variant:i,size:a,leftIcon:(0,M.jsx)(c,{}),onClick:l,className:o,children:t})}var Xe=[{value:`today`,label:`Today`},{value:`yesterday`,label:`Yesterday`},{value:`7d`,label:`Last 7 days`},{value:`30d`,label:`Last 30 days`},{value:`90d`,label:`Last 90 days`},{value:`all`,label:`All time`}],Ze=300*1e3,Qe=[`Please load the llm-cost-optimizer skill.`,`Analyze my recent LLM usage and explain the biggest cost contributors by call site, model, and profile.`,`Check my current llm.default, llm.callSites, and llm.profiles.`,`Give me a concise summary of what is driving cost and what you would optimize first.`,`Do not change config yet.`].join(` `),$e=[`Please load the llm-cost-optimizer skill.`,`Analyze my recent LLM usage and current LLM config, then recommend the safest cost-optimization changes.`,`If changes are clearly safe, show me the exact config commands you would run and ask for confirmation before applying them.`].join(` `);function et({assistantId:e}){let[t,n]=i(),{range:r,groupBy:o,scheduleId:s}=(0,S.useMemo)(()=>Pe(t),[t]),c=ae(),l=(0,S.useCallback)(e=>{n(t=>Ie(t,e),{replace:!0})},[n]),p=(0,S.useMemo)(()=>qe(r,c),[r,c]),m=(0,S.useMemo)(()=>Je(r),[r]),h=a({queryKey:ie({path:{assistant_id:e}}),queryFn:()=>se(e),staleTime:1e4}),g=(0,S.useCallback)(e=>{l({range:e})},[l]),_=a({...ee({path:{assistant_id:e},query:Ce({from:p.from,to:p.to,scheduleId:s})})}),v=a({queryKey:te({path:{assistant_id:e},query:W({from:p.from,to:p.to,groupBy:o,scheduleId:s})}),queryFn:async({signal:t})=>{try{let{data:n}=await u({path:{assistant_id:e},query:W({from:p.from,to:p.to,groupBy:o,scheduleId:s}),signal:t,throwOnError:!0});return{groupBy:o,response:n}}catch(n){if(!Be(o,n))throw n;let{data:r}=await u({path:{assistant_id:e},query:W({from:p.from,to:p.to,groupBy:q,scheduleId:s}),signal:t,throwOnError:!0});return{groupBy:q,response:r}}},retry:Ve}),y=v.data?.groupBy??o,b=ze(y)?y:void 0,x=a({...d({path:{assistant_id:e},query:Te({from:p.from,to:p.to,granularity:m,groupBy:b??`actor`,tz:c,scheduleId:s})}),enabled:!!b,retry:Ve}),C=a({...f({path:{assistant_id:e},query:we({from:p.from,to:p.to,granularity:m,tz:c,scheduleId:s})}),enabled:!b||x.isError}),w=a({...re({path:{assistant_id:e}}),enabled:y===`task`,staleTime:1/0}),T=a({...ne({path:{assistant_id:e}}),select:oe,enabled:y===`profile`,staleTime:Ze}),E=(0,S.useMemo)(()=>({callSites:ce(w.data),profiles:T.data??{}}),[w.data,T.data]),D=(0,S.useMemo)(()=>{let e=v.data;if(e)return le(e.response.breakdown,e.groupBy,E)},[v.data,E]),O=(0,S.useMemo)(()=>{if(!(!b||!x.data))return de(x.data.buckets,b,E)},[x.data,b,E]),k=(0,S.useMemo)(()=>{if(C.data)return ue(C.data.buckets)},[C.data]),A=(0,S.useMemo)(()=>b?x.error?k?{isLoading:!1,error:null,data:k,refetch:C.refetch}:{isLoading:C.isLoading||!k&&!C.error,error:C.error??x.error,data:void 0,refetch:C.error?C.refetch:x.refetch}:{isLoading:x.isLoading,error:x.error,data:O,refetch:x.refetch}:{isLoading:C.isLoading,error:C.error,data:k,refetch:C.refetch},[k,C.error,C.isLoading,C.refetch,O,b,x.error,x.isLoading,x.refetch]),j=We({requestedGranularity:m,isLoading:A.isLoading,buckets:A.data}),N=j===`hourly`,P=b&&x.error?void 0:y,F=(0,S.useMemo)(()=>{if(!(y!==`schedule`||!s))return tt(h.data,s)},[y,s,h.data]);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,M.jsx)(`h3`,{className:`text-title-small`,style:{color:`var(--content-default)`},children:`Usage`}),(0,M.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:(0,M.jsx)(it,{range:r,onChange:g})})]}),(0,M.jsx)(`section`,{"aria-label":`Totals`,children:(0,M.jsx)(X,{query:_,skeleton:(0,M.jsx)(ot,{}),render:e=>(0,M.jsx)(at,{totals:e})})}),(0,M.jsx)(Y,{title:`Inference Usage`,children:(0,M.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,M.jsx)(`h4`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:Ue(j,P)}),(0,M.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:(0,M.jsx)(st,{value:y,onChange:e=>{e===o&&y!==o&&(v.refetch(),x.refetch()),l({groupBy:e,scheduleId:e===`schedule`?void 0:null})}})})]}),(0,M.jsx)(X,{query:A,skeleton:(0,M.jsx)(ye,{isHourly:N}),render:e=>(0,M.jsx)(ve,{buckets:e,isHourly:N,legendItems:F})})]})}),(0,M.jsx)(ct,{query:v,groups:D}),(0,M.jsx)(rt,{})]})}function tt(e,t){let n=e??[];return[...n.some(e=>e.id===t)?[]:[{id:t,label:nt(t)}],...n.map(e=>({id:e.id,label:e.name||e.id}))].map((e,n)=>({seriesKey:D(e.id,`schedule`),label:e.label,colorIndex:n,state:e.id===t?`active`:`inactive`}))}function nt(e){return`Unknown schedule (${e})`}function rt(){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,M.jsx)(`div`,{className:`h-px w-full`,style:{background:`linear-gradient(to right, transparent, var(--border-base), transparent)`}}),(0,M.jsx)(Y,{title:`Cost assistant`,subtitle:`Review recent spend and tune model profile choices.`,children:(0,M.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-md px-3 py-3 sm:flex-row sm:items-center`,children:[(0,M.jsx)(Ye,{prompt:Qe,children:`Analyze costs with assistant`}),(0,M.jsx)(Ye,{prompt:$e,variant:`ghost`,children:`Optimize settings`})]})})]})}function it({range:e,onChange:t}){return(0,M.jsx)(`div`,{className:`flex items-center`,children:(0,M.jsx)(s,{value:e,onChange:t,options:Xe.map(e=>({value:e.value,label:e.label}))})})}function Y({title:e,subtitle:t,children:n}){return(0,M.jsxs)(`section`,{className:`flex flex-col gap-3 rounded-md border px-4 py-4`,style:{background:`var(--surface-lift)`,borderColor:`var(--border-base)`},children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`h3`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e}),t?(0,M.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:t}):null]}),n]})}function X({query:e,skeleton:t,render:n}){return e.isLoading?(0,M.jsx)(M.Fragment,{children:t}):e.error?(0,M.jsx)(ft,{message:e.error instanceof Error?e.error.message:`Failed to load usage.`,onRetry:()=>e.refetch()}):e.data?(0,M.jsx)(M.Fragment,{children:n(e.data)}):(0,M.jsx)(M.Fragment,{children:t})}function at({totals:e}){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-4`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`span`,{style:{fontSize:`30px`,fontWeight:600,lineHeight:1,color:`var(--content-default)`},children:_(e.totalEstimatedCostUsd)}),(0,M.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-secondary)`},children:`Cost`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`span`,{className:`text-title-small`,style:{color:`var(--content-default)`},children:g(e.eventCount)}),(0,M.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-secondary)`},children:`LLM Calls`})]})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:[(0,M.jsx)(Z,{label:`Direct Input Tokens`,value:g(e.totalInputTokens)}),(0,M.jsx)(Z,{label:`Output Tokens`,value:g(e.totalOutputTokens)}),(0,M.jsx)(Z,{label:`Cache Created`,value:g(e.totalCacheCreationTokens)}),(0,M.jsx)(Z,{label:`Cache Read`,value:g(e.totalCacheReadTokens)})]})]})}function Z({label:e,value:t}){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-md px-3 py-2`,style:{background:`color-mix(in srgb, var(--border-base) 15%, transparent)`},children:[(0,M.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-default)`},children:t}),(0,M.jsx)(`span`,{className:`text-label-medium-default`,style:{color:`var(--content-tertiary)`},children:e})]})}function ot(){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-4`,"aria-hidden":`true`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-4`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)($,{width:140,height:30}),(0,M.jsx)($,{width:90,height:12})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)($,{width:60,height:16}),(0,M.jsx)($,{width:60,height:12})]})]}),(0,M.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:Array.from({length:4}).map((e,t)=>(0,M.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-md px-3 py-2`,style:{background:`color-mix(in srgb, var(--border-base) 15%, transparent)`},children:[(0,M.jsx)($,{width:`50%`,height:12}),(0,M.jsx)($,{width:`70%`,height:11})]},t))})]})}function st({value:e,onChange:t}){return(0,M.jsx)(`div`,{className:`flex items-center`,children:(0,M.jsx)(s,{value:e,onChange:t,menuAlign:`end`,menuMinWidth:196,options:Ne.map(e=>({value:e.value,label:e.label}))})})}function ct({query:e,groups:t}){let[n,r]=(0,S.useState)(new Set),i=e=>{r(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,M.jsx)(Y,{title:`Breakdown`,children:(0,M.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(Q,{label:`% of total`,active:n.has(`pct`),onClick:()=>i(`pct`)}),(0,M.jsx)(Q,{label:`Tokens`,active:n.has(`tokens`),onClick:()=>i(`tokens`)}),(0,M.jsx)(Q,{label:`Turns`,active:n.has(`turns`),onClick:()=>i(`turns`)})]}),(0,M.jsx)(X,{query:e,skeleton:(0,M.jsx)(ut,{}),render:e=>(0,M.jsx)(lt,{groups:t??e.response.breakdown,showPct:n.has(`pct`),showTokens:n.has(`tokens`),showTurns:n.has(`turns`)})})]})})}function Q({label:e,active:t,onClick:n}){return(0,M.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-full border px-2.5 py-1 text-label-medium-default`,style:{borderColor:t?`var(--content-secondary)`:`var(--border-base)`,background:t?`color-mix(in srgb, var(--content-secondary) 15%, transparent)`:`transparent`,color:t?`var(--content-default)`:`var(--content-tertiary)`},children:e})}function lt({groups:e,showPct:t,showTokens:n,showTurns:r}){if(e.length===0)return(0,M.jsx)(dt,{title:`No breakdown data`,subtitle:`No usage recorded for this grouping`});let i=e.reduce((e,t)=>e+t.totalEstimatedCostUsd,0);return(0,M.jsx)(`div`,{className:`overflow-hidden rounded-md`,children:(0,M.jsxs)(`table`,{className:`w-full table-fixed`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{style:{borderBottom:`1px solid var(--border-base)`},children:[(0,M.jsx)(`th`,{className:`px-3 py-2.5 text-left text-label-medium-default`,style:{color:`var(--content-tertiary)`},children:`Group`}),n?(0,M.jsx)(`th`,{className:`px-3 py-2.5 text-left text-label-medium-default`,style:{color:`var(--content-tertiary)`,width:`35%`},children:`Tokens`}):null,r?(0,M.jsx)(`th`,{className:`px-3 py-2.5 text-right text-label-medium-default`,style:{color:`var(--content-tertiary)`,width:`72px`},children:`Turns`}):null,t?(0,M.jsx)(`th`,{className:`px-3 py-2.5 text-right text-label-medium-default`,style:{color:`var(--content-tertiary)`,width:`64px`},children:`%`}):null,(0,M.jsx)(`th`,{className:`px-3 py-2.5 text-right text-label-medium-default`,style:{color:`var(--content-tertiary)`,width:`100px`},children:`Cost`})]})}),(0,M.jsx)(`tbody`,{children:e.map((e,a)=>{let o=Ee(e),s=De(e),c=i>0?Math.round(e.totalEstimatedCostUsd/i*100):0;return(0,M.jsxs)(`tr`,{style:{borderTop:a===0?`none`:`1px solid var(--border-base)`},children:[(0,M.jsx)(`td`,{className:`min-w-0 px-3 py-2`,style:{color:`var(--content-default)`},children:(0,M.jsx)(`span`,{className:`block truncate text-body-medium-lighter`,title:e.group,children:e.group})}),n?(0,M.jsx)(`td`,{className:`min-w-0 px-3 py-2`,style:{color:`var(--content-secondary)`},children:(0,M.jsx)(`span`,{className:`block truncate text-body-small-default`,title:o,children:s})}):null,r?(0,M.jsx)(`td`,{className:`whitespace-nowrap px-3 py-2 text-right`,children:(0,M.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:e.turnCount==null?`—`:e.turnCount.toLocaleString()})}):null,t?(0,M.jsx)(`td`,{className:`whitespace-nowrap px-3 py-2 text-right`,children:(0,M.jsxs)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:[c,`%`]})}):null,(0,M.jsx)(`td`,{className:`whitespace-nowrap px-3 py-2 text-right`,children:(0,M.jsx)(`span`,{className:`text-body-medium-lighter`,style:{color:`var(--content-default)`},children:_(e.totalEstimatedCostUsd)})})]},e.groupKey??e.groupId??`${e.group}-${a}`)})})]})})}function ut(){return(0,M.jsx)(`div`,{className:`flex flex-col gap-2`,"aria-hidden":`true`,children:Array.from({length:4}).map((e,t)=>(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)($,{width:100,height:14}),(0,M.jsx)($,{width:`60%`,height:12}),(0,M.jsx)($,{width:50,height:14})]},t))})}function $({width:e,height:t}){return(0,M.jsx)(`div`,{className:`rounded-sm`,style:{width:typeof e==`number`?`${e}px`:e,height:`${t}px`,background:`color-mix(in srgb, var(--border-base) 40%, transparent)`}})}function dt({title:e,subtitle:t}){return(0,M.jsxs)(`div`,{className:`flex flex-col items-center gap-1 py-8 text-center`,children:[(0,M.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e}),(0,M.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:t})]})}function ft({message:e,onRetry:t}){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2 py-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(l,{className:`h-4 w-4 shrink-0`,style:{color:`var(--system-negative-strong, #f87171)`}}),(0,M.jsx)(`span`,{className:`text-body-medium-lighter`,style:{color:`var(--content-default)`},children:e})]}),t?(0,M.jsx)(`button`,{type:`button`,onClick:t,className:`self-start rounded-md border px-3 py-1 text-body-small-default`,style:{background:`var(--surface-lift)`,borderColor:`var(--border-base)`,color:`var(--content-default)`},children:`Retry`}):null]})}function pt(){return(0,M.jsx)(et,{assistantId:h()})}export{pt as UsagePage};
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./useQuery-B45lW1Kk.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{t as s}from"./dropdown-CL8VmqrY.js";import"./src-CK6bncSg.js";import{t as c}from"./sparkles-BICoewVE.js";import{t as l}from"./triangle-alert-DKOyShqD.js";import{tr as u}from"./sdk.gen-1aYqVbMj.js";import{Dt as d,Et as f,Ot as ee,Tt as te,c as ne,d as re,ut as ie}from"./react-query.gen-CQLyoqYk.js";import{t as p}from"./api-errors-CveHbhgb.js";import{Ht as m,on as ae}from"./index-ClC1ULPL.js";import{t as h}from"./use-active-assistant-id-Dyfjqq4l.js";import{i as g,t as _}from"./format-0qTDTDhA.js";import{i as v,o as y,r as b}from"./llm-dimension-Db-cwepb.js";import{n as x}from"./usage-window-FKG0JDAT.js";import{n as oe,t as se}from"./schedules-BrM_F49t.js";var S=e(t(),1);function ce(e){if(!e)return{};let t={};for(let n of e.callSites)!n.id||!n.displayName||(t[n.id]={id:n.id,displayName:n.displayName,description:n.description,domain:n.domain});return t}function C(e,t,n){if(e===`task`){let e=t.groupKey;return e?n.callSites?.[e]?.displayName??t.group:t.group}if(e===`profile`){let e=t.groupKey;return e?n.profiles?.[e]?.displayName??t.group:t.group||`Default / Unset`}return t.group}function le(e,t,n){return!e||e.length===0?[]:e.map(e=>{let r=C(t,e,n);return r===e.group?e:{...e,group:r}})}var w=6,T=`value:`,E=`null:`;function D(e,t=`schedule`){return e===null?`${E}${v(t)?y(t):t}`:`${T}${e}`}function O(e){return[...e].sort((e,t)=>{if(e.date!==t.date)return e.date<t.date?-1:1;let n=j(e.bucketId),r=j(t.bucketId);return n===r?e.bucketId===t.bucketId?0:e.bucketId<t.bucketId?-1:1:n-r})}function ue(e){return e.map(e=>({bucketId:e.bucketId,date:e.date,displayLabel:e.displayLabel,totalInputTokens:e.totalInputTokens,totalOutputTokens:e.totalOutputTokens,totalEstimatedCostUsd:e.totalEstimatedCostUsd,eventCount:e.eventCount,groups:{}}))}function de(e,t,n){return t!==`task`&&t!==`profile`?[...e]:e.map(e=>{let r=!1,i={};for(let[a,o]of Object.entries(e.groups)){let e=C(t,A(o),n);e===o.group?i[a]=o:(r=!0,i[a]={...o,group:e})}return r?{...e,groups:i}:e})}function k(e){let t=new Map;for(let n of e)for(let[e,r]of Object.entries(n.groups)){let n=t.get(e);t.set(e,{label:n?.label??r.group,totalEstimatedCostUsd:(n?.totalEstimatedCostUsd??0)+r.totalEstimatedCostUsd})}let n=Array.from(t.entries()).sort(([e,t],[n,r])=>t.totalEstimatedCostUsd===r.totalEstimatedCostUsd?t.label===r.label?e===n?0:e<n?-1:1:t.label<r.label?-1:1:r.totalEstimatedCostUsd-t.totalEstimatedCostUsd).map(([e,t],n)=>({seriesKey:e,label:t.label,totalEstimatedCostUsd:t.totalEstimatedCostUsd,colorIndex:n}));return{items:n,visibleItems:n.slice(0,w)}}function A(e){return{group:e.group,groupId:e.groupKey,groupKey:e.groupKey,totalInputTokens:e.totalInputTokens,totalOutputTokens:e.totalOutputTokens,totalCacheCreationTokens:0,totalCacheReadTokens:0,totalEstimatedCostUsd:e.totalEstimatedCostUsd,eventCount:e.eventCount,turnCount:null}}function j(e){let t=e.lastIndexOf(`|`);if(t<0)return 0;let n=Number(e.slice(t+1));return Number.isFinite(n)?n:0}var M=o(),N=140,P=40,F=28,fe=2,pe=2,me=1e-6,I=12,L=220,R=56,he=[40,80,60,100,50,70,30],ge=[18,24,28,35,42,50,64,78,92,106,118,96,84,74,68,80,88,72,56,48,40,34,26,20],z=[`var(--usage-trend-stack-positive, var(--system-positive-strong, #10b981))`,`var(--usage-trend-stack-info, var(--system-info-strong, #3b82f6))`,`var(--usage-trend-stack-mid, var(--system-mid-strong, #f59e0b))`,`var(--usage-trend-stack-secondary, var(--content-secondary, #6b7280))`,`var(--usage-trend-stack-negative, var(--system-negative-strong, #f87171))`,`var(--usage-trend-stack-tertiary, var(--content-tertiary, #9ca3af))`];function B(e){return z[e%z.length]}function V(e){return e.displayLabel?e.displayLabel:e.date}function _e(e,t){let n=e+I,r=t+I;return n+L>window.innerWidth&&(n=e-L-I),r+R>window.innerHeight&&(r=t-R-I),{x:n,y:r}}function ve({buckets:e,isHourly:t,legendItems:n}){let[r,i]=(0,S.useState)(null),a=(0,S.useMemo)(()=>O(e),[e]),o=(0,S.useMemo)(()=>k(e),[e]),s=n??o.items,c=n??o.visibleItems,l=(0,S.useMemo)(()=>a.reduce((e,t)=>Math.max(e,t.totalEstimatedCostUsd),0),[a]),u=(0,S.useCallback)((e,t)=>{let n=_e(e.clientX,e.clientY);i({...t,x:n.x,y:n.y})},[]),d=(0,S.useCallback)(()=>i(null),[]);if(a.length===0){let e=(0,M.jsx)(Se,{title:t?`No hourly data`:`No daily data`,subtitle:`No usage recorded in this time range`});return c.length===0?e:(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e,(0,M.jsx)(H,{items:c})]})}let f=t?F:P;return(0,M.jsxs)(`div`,{className:`overflow-x-auto`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,M.jsx)(`div`,{className:`flex items-end gap-2`,style:{height:`${N}px`},"aria-hidden":`true`,children:a.map(e=>{let t=l>0?e.totalEstimatedCostUsd/l:0,r=Math.max(fe,N*t);return(0,M.jsx)(`div`,{className:`flex items-end`,style:{width:`${f}px`,minWidth:`${f}px`,height:`${r}px`,opacity:e.totalEstimatedCostUsd>0?1:.3},title:`${V(e)}: ${_(e.totalEstimatedCostUsd)}`,"data-usage-series-bar":e.bucketId,children:(0,M.jsx)(be,{bucket:e,height:r,legendItems:s,hasLegendOverride:n!=null,onSegmentHover:u,onSegmentLeave:d})},e.bucketId)})}),(0,M.jsx)(`div`,{className:`flex items-start gap-2`,children:a.map(e=>(0,M.jsxs)(`div`,{className:`flex flex-col items-center gap-0.5`,style:{width:`${f}px`,minWidth:`${f}px`},children:[(0,M.jsx)(`span`,{className:`truncate text-[10px]`,style:{color:`var(--content-secondary)`},children:_(e.totalEstimatedCostUsd)}),(0,M.jsx)(`span`,{className:`truncate text-[10px]`,style:{color:`var(--content-tertiary)`},children:V(e)})]},e.bucketId))}),c.length>0?(0,M.jsx)(H,{items:c}):null]}),r?(0,M.jsx)(xe,{tooltip:r}):null]})}function ye({isHourly:e}){let t=e?ge:he,n=e?F:P;return(0,M.jsx)(`div`,{className:`flex items-end gap-2`,style:{height:`${N}px`},"aria-hidden":`true`,children:t.map((e,t)=>(0,M.jsx)(`div`,{className:`rounded-sm`,style:{width:`${n}px`,height:`${e}px`,background:`color-mix(in srgb, var(--border-base) 40%, transparent)`}},t))})}function be({bucket:e,height:t,legendItems:n,hasLegendOverride:r,onSegmentHover:i,onSegmentLeave:a}){let o=Object.keys(e.groups).length>0,s=n.filter(e=>(e.state??`active`)===`active`).flatMap(t=>{let n=e.groups[t.seriesKey];return!n||n.totalEstimatedCostUsd<=0?[]:[{item:t,value:n}]});if(s.length===0&&!o&&!r){let n={label:`Total`,bucketLabel:V(e),cost:_(e.totalEstimatedCostUsd)};return(0,M.jsx)(`div`,{className:`w-full rounded-sm`,title:`${n.label}: ${n.cost}`,onMouseEnter:e=>i(e,n),onMouseMove:e=>i(e,n),onMouseLeave:a,style:{height:`${t}px`,background:B(0)},"data-usage-series-segment-label":n.label,"data-usage-fallback-segment":`true`})}return s.length===0?null:(0,M.jsx)(`div`,{className:`flex w-full flex-col-reverse overflow-hidden rounded-sm`,style:{height:`${t}px`},"data-usage-series-stack":e.bucketId,children:s.map(({item:n,value:r})=>{let o={label:n.label,bucketLabel:V(e),cost:_(r.totalEstimatedCostUsd)};return(0,M.jsx)(`div`,{title:`${o.label}: ${o.cost}`,onMouseEnter:e=>i(e,o),onMouseMove:e=>i(e,o),onMouseLeave:a,style:{height:`${Math.max(pe,t*r.totalEstimatedCostUsd/Math.max(e.totalEstimatedCostUsd,me))}px`,background:B(n.colorIndex)},"data-usage-series-segment":n.seriesKey,"data-usage-series-segment-label":n.label,"data-usage-series-color-index":n.colorIndex},n.seriesKey)})})}function xe({tooltip:e}){return(0,M.jsxs)(`div`,{className:`pointer-events-none fixed z-50 max-w-[220px] rounded-md border px-2 py-1 shadow-xl`,style:{left:`${e.x}px`,top:`${e.y}px`,background:`var(--surface-overlay, var(--surface-lift))`,borderColor:`var(--border-base)`},"aria-hidden":`true`,children:[(0,M.jsx)(`div`,{className:`truncate text-body-small-default`,style:{color:`var(--content-default)`},children:e.label}),(0,M.jsxs)(`div`,{className:`truncate text-body-small-default`,style:{color:`var(--content-tertiary)`},children:[e.bucketLabel,` · `,e.cost]})]})}function H({items:e}){return(0,M.jsx)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 pt-1`,children:e.map(e=>{let t=e.state??`active`,n=t===`inactive`;return(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,"data-usage-legend-state":t,children:[(0,M.jsx)(`span`,{className:`h-[7px] w-[7px] shrink-0 rounded-full`,style:{background:n?`var(--content-tertiary)`:B(e.colorIndex),opacity:n?.45:1},"aria-hidden":`true`,"data-usage-series-color-index":e.colorIndex}),(0,M.jsx)(`span`,{className:n?`truncate text-[10px] line-through`:`truncate text-[10px]`,style:{color:`var(--content-tertiary)`,opacity:n?.65:1},children:e.label})]},e.seriesKey)})})}function Se({title:e,subtitle:t}){return(0,M.jsxs)(`div`,{className:`flex flex-col items-center justify-center rounded-md py-12 text-center`,style:{color:`var(--content-tertiary)`},children:[(0,M.jsx)(`p`,{className:`text-body-medium-default`,style:{color:`var(--content-secondary)`},children:e}),(0,M.jsx)(`p`,{className:`mt-1 text-body-small-default`,children:t})]})}function U(e){return v(e)?y(e):e}function Ce(e){return G({from:e.from,to:e.to},e.scheduleId)}function we(e){return G({from:e.from,to:e.to,...e.granularity?{granularity:e.granularity}:{},...e.tz?{tz:e.tz}:{}},e.scheduleId)}function W(e){return G({from:e.from,to:e.to,groupBy:U(e.groupBy)},e.scheduleId)}function Te(e){return G({from:e.from,to:e.to,granularity:e.granularity,groupBy:U(e.groupBy),...e.tz?{tz:e.tz}:{}},e.scheduleId)}function G(e,t){return t?{...e,scheduleId:t}:e}function Ee(e){return[`${g(e.totalInputTokens)} direct`,`${g(e.totalCacheCreationTokens)} cache created`,`${g(e.totalCacheReadTokens)} cache read`,`${g(e.totalOutputTokens)} out`].join(` / `)}function K(e){return!Number.isFinite(e)||e===0?`0`:e>=1e6||e>=999950&&e<1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:e.toLocaleString()}function De(e){return`${K(e.totalInputTokens+e.totalCacheCreationTokens+e.totalCacheReadTokens)} in / ${K(e.totalOutputTokens)} out`}var Oe=`task`,q=`model`,ke=new Set([400,404,422]),Ae=3,je=new Set([`today`,`yesterday`,`7d`,`30d`,`90d`,`all`]),Me=new Set([`actor`,`provider`,`model`,`conversation`,`task`,`profile`,`schedule`]),J={task:b.task,profile:b.profile,model:b.model,provider:`Provider`,actor:`Actor`,conversation:`Conversation`,schedule:`Schedule`},Ne=[{value:`task`,label:J.task},{value:`profile`,label:J.profile},{value:`model`,label:J.model},{value:`provider`,label:J.provider},{value:`schedule`,label:J.schedule},{value:`conversation`,label:J.conversation}];function Pe(e){let t=e.get(`range`),n=e.get(`groupBy`),r=Re(n)?n:Oe;return{range:Le(t)?t:`7d`,groupBy:r,scheduleId:r===`schedule`?Fe(e):void 0}}function Fe(e){let t=e.get(`scheduleId`);if(!(!t||t.trim().length===0))return t}function Ie(e,t){let n=new URLSearchParams(e);return t.range!==void 0&&n.set(`range`,t.range),t.groupBy!==void 0&&n.set(`groupBy`,t.groupBy),t.scheduleId!==void 0&&(t.scheduleId===null||t.scheduleId.trim().length===0?n.delete(`scheduleId`):n.set(`scheduleId`,t.scheduleId)),n.get(`groupBy`)!==`schedule`&&n.delete(`scheduleId`),n}function Le(e){return e!=null&&je.has(e)}function Re(e){return e!=null&&Me.has(e)}function ze(e){return e!==`conversation`}function Be(e,t){return e!==`task`&&e!==`profile`?!1:He(t)}function Ve(e,t){return!He(t)&&e<Ae}function He(e){return e instanceof p&&ke.has(e.status)}function Ue(e,t){let n=e===`hourly`?`Hourly Trend`:`Daily Trend`;return!t||t===`conversation`?n:`${n} by ${J[t]}`}function We({requestedGranularity:e,isLoading:t,buckets:n}){return e===`hourly`&&(t||!n||n.length===0||n.some(Ge))?`hourly`:`daily`}function Ge(e){return e.bucketId.includes(`|`)||Ke(e.date)}function Ke(e){return/^\d{4}-\d{2}-\d{2} ([01]\d|2[0-3]):00$/.test(e)}function qe(e,t,n=Date.now()){return x(e,t,n)}function Je(e){return e===`today`||e===`yesterday`?`hourly`:`daily`}function Ye({prompt:e,children:t,variant:i=`outlined`,size:a=`regular`,className:o}){let s=r(),l=(0,S.useCallback)(()=>{m(s,{prompt:e})},[s,e]);return(0,M.jsx)(n,{variant:i,size:a,leftIcon:(0,M.jsx)(c,{}),onClick:l,className:o,children:t})}var Xe=[{value:`today`,label:`Today`},{value:`yesterday`,label:`Yesterday`},{value:`7d`,label:`Last 7 days`},{value:`30d`,label:`Last 30 days`},{value:`90d`,label:`Last 90 days`},{value:`all`,label:`All time`}],Ze=300*1e3,Qe=[`Please load the llm-cost-optimizer skill.`,`Analyze my recent LLM usage and explain the biggest cost contributors by call site, model, and profile.`,`Check my current llm.default, llm.callSites, and llm.profiles.`,`Give me a concise summary of what is driving cost and what you would optimize first.`,`Do not change config yet.`].join(` `),$e=[`Please load the llm-cost-optimizer skill.`,`Analyze my recent LLM usage and current LLM config, then recommend the safest cost-optimization changes.`,`If changes are clearly safe, show me the exact config commands you would run and ask for confirmation before applying them.`].join(` `);function et({assistantId:e}){let[t,n]=i(),{range:r,groupBy:o,scheduleId:s}=(0,S.useMemo)(()=>Pe(t),[t]),c=ae(),l=(0,S.useCallback)(e=>{n(t=>Ie(t,e),{replace:!0})},[n]),p=(0,S.useMemo)(()=>qe(r,c),[r,c]),m=(0,S.useMemo)(()=>Je(r),[r]),h=a({queryKey:ie({path:{assistant_id:e}}),queryFn:()=>se(e),staleTime:1e4}),g=(0,S.useCallback)(e=>{l({range:e})},[l]),_=a({...ee({path:{assistant_id:e},query:Ce({from:p.from,to:p.to,scheduleId:s})})}),v=a({queryKey:te({path:{assistant_id:e},query:W({from:p.from,to:p.to,groupBy:o,scheduleId:s})}),queryFn:async({signal:t})=>{try{let{data:n}=await u({path:{assistant_id:e},query:W({from:p.from,to:p.to,groupBy:o,scheduleId:s}),signal:t,throwOnError:!0});return{groupBy:o,response:n}}catch(n){if(!Be(o,n))throw n;let{data:r}=await u({path:{assistant_id:e},query:W({from:p.from,to:p.to,groupBy:q,scheduleId:s}),signal:t,throwOnError:!0});return{groupBy:q,response:r}}},retry:Ve}),y=v.data?.groupBy??o,b=ze(y)?y:void 0,x=a({...d({path:{assistant_id:e},query:Te({from:p.from,to:p.to,granularity:m,groupBy:b??`actor`,tz:c,scheduleId:s})}),enabled:!!b,retry:Ve}),C=a({...f({path:{assistant_id:e},query:we({from:p.from,to:p.to,granularity:m,tz:c,scheduleId:s})}),enabled:!b||x.isError}),w=a({...re({path:{assistant_id:e}}),enabled:y===`task`,staleTime:1/0}),T=a({...ne({path:{assistant_id:e}}),select:oe,enabled:y===`profile`,staleTime:Ze}),E=(0,S.useMemo)(()=>({callSites:ce(w.data),profiles:T.data??{}}),[w.data,T.data]),D=(0,S.useMemo)(()=>{let e=v.data;if(e)return le(e.response.breakdown,e.groupBy,E)},[v.data,E]),O=(0,S.useMemo)(()=>{if(!(!b||!x.data))return de(x.data.buckets,b,E)},[x.data,b,E]),k=(0,S.useMemo)(()=>{if(C.data)return ue(C.data.buckets)},[C.data]),A=(0,S.useMemo)(()=>b?x.error?k?{isLoading:!1,error:null,data:k,refetch:C.refetch}:{isLoading:C.isLoading||!k&&!C.error,error:C.error??x.error,data:void 0,refetch:C.error?C.refetch:x.refetch}:{isLoading:x.isLoading,error:x.error,data:O,refetch:x.refetch}:{isLoading:C.isLoading,error:C.error,data:k,refetch:C.refetch},[k,C.error,C.isLoading,C.refetch,O,b,x.error,x.isLoading,x.refetch]),j=We({requestedGranularity:m,isLoading:A.isLoading,buckets:A.data}),N=j===`hourly`,P=b&&x.error?void 0:y,F=(0,S.useMemo)(()=>{if(!(y!==`schedule`||!s))return tt(h.data,s)},[y,s,h.data]);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,M.jsx)(`h3`,{className:`text-title-small`,style:{color:`var(--content-default)`},children:`Usage`}),(0,M.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:(0,M.jsx)(it,{range:r,onChange:g})})]}),(0,M.jsx)(`section`,{"aria-label":`Totals`,children:(0,M.jsx)(X,{query:_,skeleton:(0,M.jsx)(ot,{}),render:e=>(0,M.jsx)(at,{totals:e})})}),(0,M.jsx)(Y,{title:`Inference Usage`,children:(0,M.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,M.jsx)(`h4`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:Ue(j,P)}),(0,M.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:(0,M.jsx)(st,{value:y,onChange:e=>{e===o&&y!==o&&(v.refetch(),x.refetch()),l({groupBy:e,scheduleId:e===`schedule`?void 0:null})}})})]}),(0,M.jsx)(X,{query:A,skeleton:(0,M.jsx)(ye,{isHourly:N}),render:e=>(0,M.jsx)(ve,{buckets:e,isHourly:N,legendItems:F})})]})}),(0,M.jsx)(ct,{query:v,groups:D}),(0,M.jsx)(rt,{})]})}function tt(e,t){let n=e??[];return[...n.some(e=>e.id===t)?[]:[{id:t,label:nt(t)}],...n.map(e=>({id:e.id,label:e.name||e.id}))].map((e,n)=>({seriesKey:D(e.id,`schedule`),label:e.label,colorIndex:n,state:e.id===t?`active`:`inactive`}))}function nt(e){return`Unknown schedule (${e})`}function rt(){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,M.jsx)(`div`,{className:`h-px w-full`,style:{background:`linear-gradient(to right, transparent, var(--border-base), transparent)`}}),(0,M.jsx)(Y,{title:`Cost assistant`,subtitle:`Review recent spend and tune model profile choices.`,children:(0,M.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-md px-3 py-3 sm:flex-row sm:items-center`,children:[(0,M.jsx)(Ye,{prompt:Qe,children:`Analyze costs with assistant`}),(0,M.jsx)(Ye,{prompt:$e,variant:`ghost`,children:`Optimize settings`})]})})]})}function it({range:e,onChange:t}){return(0,M.jsx)(`div`,{className:`flex items-center`,children:(0,M.jsx)(s,{value:e,onChange:t,options:Xe.map(e=>({value:e.value,label:e.label}))})})}function Y({title:e,subtitle:t,children:n}){return(0,M.jsxs)(`section`,{className:`flex flex-col gap-3 rounded-md border px-4 py-4`,style:{background:`var(--surface-lift)`,borderColor:`var(--border-base)`},children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`h3`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e}),t?(0,M.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:t}):null]}),n]})}function X({query:e,skeleton:t,render:n}){return e.isLoading?(0,M.jsx)(M.Fragment,{children:t}):e.error?(0,M.jsx)(ft,{message:e.error instanceof Error?e.error.message:`Failed to load usage.`,onRetry:()=>e.refetch()}):e.data?(0,M.jsx)(M.Fragment,{children:n(e.data)}):(0,M.jsx)(M.Fragment,{children:t})}function at({totals:e}){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-4`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`span`,{style:{fontSize:`30px`,fontWeight:600,lineHeight:1,color:`var(--content-default)`},children:_(e.totalEstimatedCostUsd)}),(0,M.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-secondary)`},children:`Cost`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`span`,{className:`text-title-small`,style:{color:`var(--content-default)`},children:g(e.eventCount)}),(0,M.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-secondary)`},children:`LLM Calls`})]})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:[(0,M.jsx)(Z,{label:`Direct Input Tokens`,value:g(e.totalInputTokens)}),(0,M.jsx)(Z,{label:`Output Tokens`,value:g(e.totalOutputTokens)}),(0,M.jsx)(Z,{label:`Cache Created`,value:g(e.totalCacheCreationTokens)}),(0,M.jsx)(Z,{label:`Cache Read`,value:g(e.totalCacheReadTokens)})]})]})}function Z({label:e,value:t}){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-md px-3 py-2`,style:{background:`color-mix(in srgb, var(--border-base) 15%, transparent)`},children:[(0,M.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-default)`},children:t}),(0,M.jsx)(`span`,{className:`text-label-medium-default`,style:{color:`var(--content-tertiary)`},children:e})]})}function ot(){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-4`,"aria-hidden":`true`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-4`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)($,{width:140,height:30}),(0,M.jsx)($,{width:90,height:12})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)($,{width:60,height:16}),(0,M.jsx)($,{width:60,height:12})]})]}),(0,M.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:Array.from({length:4}).map((e,t)=>(0,M.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-md px-3 py-2`,style:{background:`color-mix(in srgb, var(--border-base) 15%, transparent)`},children:[(0,M.jsx)($,{width:`50%`,height:12}),(0,M.jsx)($,{width:`70%`,height:11})]},t))})]})}function st({value:e,onChange:t}){return(0,M.jsx)(`div`,{className:`flex items-center`,children:(0,M.jsx)(s,{value:e,onChange:t,menuAlign:`end`,menuMinWidth:196,options:Ne.map(e=>({value:e.value,label:e.label}))})})}function ct({query:e,groups:t}){let[n,r]=(0,S.useState)(new Set),i=e=>{r(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,M.jsx)(Y,{title:`Breakdown`,children:(0,M.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(Q,{label:`% of total`,active:n.has(`pct`),onClick:()=>i(`pct`)}),(0,M.jsx)(Q,{label:`Tokens`,active:n.has(`tokens`),onClick:()=>i(`tokens`)}),(0,M.jsx)(Q,{label:`Turns`,active:n.has(`turns`),onClick:()=>i(`turns`)})]}),(0,M.jsx)(X,{query:e,skeleton:(0,M.jsx)(ut,{}),render:e=>(0,M.jsx)(lt,{groups:t??e.response.breakdown,showPct:n.has(`pct`),showTokens:n.has(`tokens`),showTurns:n.has(`turns`)})})]})})}function Q({label:e,active:t,onClick:n}){return(0,M.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-full border px-2.5 py-1 text-label-medium-default`,style:{borderColor:t?`var(--content-secondary)`:`var(--border-base)`,background:t?`color-mix(in srgb, var(--content-secondary) 15%, transparent)`:`transparent`,color:t?`var(--content-default)`:`var(--content-tertiary)`},children:e})}function lt({groups:e,showPct:t,showTokens:n,showTurns:r}){if(e.length===0)return(0,M.jsx)(dt,{title:`No breakdown data`,subtitle:`No usage recorded for this grouping`});let i=e.reduce((e,t)=>e+t.totalEstimatedCostUsd,0);return(0,M.jsx)(`div`,{className:`overflow-hidden rounded-md`,children:(0,M.jsxs)(`table`,{className:`w-full table-fixed`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{style:{borderBottom:`1px solid var(--border-base)`},children:[(0,M.jsx)(`th`,{className:`px-3 py-2.5 text-left text-label-medium-default`,style:{color:`var(--content-tertiary)`},children:`Group`}),n?(0,M.jsx)(`th`,{className:`px-3 py-2.5 text-left text-label-medium-default`,style:{color:`var(--content-tertiary)`,width:`35%`},children:`Tokens`}):null,r?(0,M.jsx)(`th`,{className:`px-3 py-2.5 text-right text-label-medium-default`,style:{color:`var(--content-tertiary)`,width:`72px`},children:`Turns`}):null,t?(0,M.jsx)(`th`,{className:`px-3 py-2.5 text-right text-label-medium-default`,style:{color:`var(--content-tertiary)`,width:`64px`},children:`%`}):null,(0,M.jsx)(`th`,{className:`px-3 py-2.5 text-right text-label-medium-default`,style:{color:`var(--content-tertiary)`,width:`100px`},children:`Cost`})]})}),(0,M.jsx)(`tbody`,{children:e.map((e,a)=>{let o=Ee(e),s=De(e),c=i>0?Math.round(e.totalEstimatedCostUsd/i*100):0;return(0,M.jsxs)(`tr`,{style:{borderTop:a===0?`none`:`1px solid var(--border-base)`},children:[(0,M.jsx)(`td`,{className:`min-w-0 px-3 py-2`,style:{color:`var(--content-default)`},children:(0,M.jsx)(`span`,{className:`block truncate text-body-medium-lighter`,title:e.group,children:e.group})}),n?(0,M.jsx)(`td`,{className:`min-w-0 px-3 py-2`,style:{color:`var(--content-secondary)`},children:(0,M.jsx)(`span`,{className:`block truncate text-body-small-default`,title:o,children:s})}):null,r?(0,M.jsx)(`td`,{className:`whitespace-nowrap px-3 py-2 text-right`,children:(0,M.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:e.turnCount==null?`—`:e.turnCount.toLocaleString()})}):null,t?(0,M.jsx)(`td`,{className:`whitespace-nowrap px-3 py-2 text-right`,children:(0,M.jsxs)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:[c,`%`]})}):null,(0,M.jsx)(`td`,{className:`whitespace-nowrap px-3 py-2 text-right`,children:(0,M.jsx)(`span`,{className:`text-body-medium-lighter`,style:{color:`var(--content-default)`},children:_(e.totalEstimatedCostUsd)})})]},e.groupKey??e.groupId??`${e.group}-${a}`)})})]})})}function ut(){return(0,M.jsx)(`div`,{className:`flex flex-col gap-2`,"aria-hidden":`true`,children:Array.from({length:4}).map((e,t)=>(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)($,{width:100,height:14}),(0,M.jsx)($,{width:`60%`,height:12}),(0,M.jsx)($,{width:50,height:14})]},t))})}function $({width:e,height:t}){return(0,M.jsx)(`div`,{className:`rounded-sm`,style:{width:typeof e==`number`?`${e}px`:e,height:`${t}px`,background:`color-mix(in srgb, var(--border-base) 40%, transparent)`}})}function dt({title:e,subtitle:t}){return(0,M.jsxs)(`div`,{className:`flex flex-col items-center gap-1 py-8 text-center`,children:[(0,M.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e}),(0,M.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:t})]})}function ft({message:e,onRetry:t}){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2 py-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(l,{className:`h-4 w-4 shrink-0`,style:{color:`var(--system-negative-strong, #f87171)`}}),(0,M.jsx)(`span`,{className:`text-body-medium-lighter`,style:{color:`var(--content-default)`},children:e})]}),t?(0,M.jsx)(`button`,{type:`button`,onClick:t,className:`self-start rounded-md border px-3 py-1 text-body-small-default`,style:{background:`var(--surface-lift)`,borderColor:`var(--border-base)`,color:`var(--content-default)`},children:`Retry`}):null]})}function pt(){return(0,M.jsx)(et,{assistantId:h()})}export{pt as UsagePage};
|
package/dist/assets/{use-active-assistant-id-BlwRimQH.js → use-active-assistant-id-Dyfjqq4l.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./resolved-assistants-store-
|
|
1
|
+
import{n as e}from"./resolved-assistants-store-Cp4J43BK.js";function t(){let t=e.use.activeAssistantId();if(!t)throw Error(`useActiveAssistantId() called outside ActiveAssistantGate — either mount the route under <ActiveAssistantGate> or read the raw store via useResolvedAssistantsStore.use.activeAssistantId().`);return t}export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{n}from"./event-bus-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{n}from"./event-bus-Dl7-I4aL.js";var r=e(t(),1);function i(e,t){let i=(0,r.useRef)(t);(0,r.useLayoutEffect)(()=>{i.current=t}),(0,r.useEffect)(()=>n(e,e=>{i.current(e)}),[e])}export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{V as e,i as t}from"./auth-store-ChW9SzI9.js";function n(){let n=e.use.currentOrganizationId();return!t()||n!=null}export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{d as n,u as r}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{f as i}from"./local-mode-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{d as n,u as r}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{f as i}from"./local-mode-CvrNMtPF.js";import{t as a}from"./is-electron-C_ZTVhv8.js";import{A as o,P as s}from"./auth-store-ChW9SzI9.js";import{a as c}from"./routes-DVqkwUEe.js";import{n as l,t as u}from"./build-state-D0kdTS6F.js";import{n as d}from"./login-flow-bkSOloXg.js";var f=e(t(),1);function p(e){let t=n(),p=r(),[m,h]=(0,f.useState)(!1),[g,_]=(0,f.useState)(null),v=(0,f.useRef)(0);return{loading:m,error:g,login:async()=>{let n=e??l(u({sessionSettled:!0,isAuthenticated:!0}),p.pathname);if(i()&&s()){t(`${c.account.login}?returnTo=${encodeURIComponent(n)}`);return}let r=++v.current;_(null),h(!0);try{await o(d,`${c.account.providerCallback}?returnTo=${encodeURIComponent(n)}`,{returnTo:n})}catch{if(r!==v.current)return;_(`Something went wrong. Please try again.`),h(!1)}},cancel:()=>{v.current++,h(!1),_(null),a()&&window.vellum?.auth?.cancelOAuth()}}}export{p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQuery-B45lW1Kk.js";import{t}from"./jsx-runtime-CVSDxk6A.js";import{et as n}from"./react-query.gen-
|
|
1
|
+
import{t as e}from"./useQuery-B45lW1Kk.js";import{t}from"./jsx-runtime-CVSDxk6A.js";import{et as n}from"./react-query.gen-CQLyoqYk.js";var r=t();function i(){return(0,r.jsx)(`span`,{className:`shrink-0 rounded px-1.5 py-0.5 text-body-small-default`,style:{backgroundColor:`var(--surface-info, var(--surface-secondary))`,color:`var(--content-info, var(--primary-base, #60a5fa))`},children:`Update available`})}var a=300*1e3;function o({assistantId:t,name:r,enabled:i=!0}){return e({...n({path:{assistant_id:t,name:r}}),enabled:!!t&&!!r&&i,staleTime:a,retry:!1})}function s(e){let t=e?.local?.localChanges;return!!t&&t?.clean===!1}export{o as n,i as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{c as n,l as r,u as i}from"./proxy-BigbiDP1.js";var a=e(t(),1);function o(){!r.current&&n();let[e]=(0,a.useState)(i.current);return e}export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-BlMXrA59.js";var t=e(`user-plus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./assistant-identity-store-
|
|
1
|
+
import{t as e}from"./assistant-identity-store-CKjnoLSp.js";import{n as t,r as n,t as r}from"./semver-yC_Iq9co.js";function i(e,t,n={}){return t(e.getState())?Promise.resolve():new Promise(r=>{let i,a=()=>{i!==void 0&&clearTimeout(i),o(),r()},o=e.subscribe(e=>{t(e)&&a()});n.timeoutMs!==void 0&&(i=setTimeout(a,n.timeoutMs))})}function a(t){return s(e.use.version(),t)}function o(t){let n=e.getState().version;return s(n,t)}function s(e,i){if(!e)return!1;let a=n(e),o=n(i);if(!a||!o)return!1;let s=r({...a,pre:null},{...o,pre:null});if(s!==0)return s>0;let c=a.pre!==null&&a.pre.startsWith(`dev`),l=o.pre!==null&&o.pre.startsWith(`dev`);return c&&l?t(a.pre,o.pre)>=0:c===l?!0:c}var c=5e3;function l(t=c){return i(e,e=>!!e.version,{timeoutMs:t})}export{i,a as n,l as r,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./capture-error-
|
|
1
|
+
import{t as e}from"./capture-error-Hr1Yo2kx.js";import{n as t,t as n}from"./create-selectors-BE0_e_Ed.js";import{dt as r,n as i}from"./sdk.gen-1aYqVbMj.js";var a=new Map;function o(e,t){return`${e}::${t}`}function s(e,t){let n=o(e,t),r=a.get(n);return r??(r=i({path:{assistant_id:e,id:t},throwOnError:!0}).then(e=>e.data.html).catch(e=>{throw a.delete(n),e}),a.set(n,r)),r}function c(e,t,n){a.set(o(e,t),Promise.resolve(n))}function l(e,t){a.delete(o(e,t))}function u(e){if(typeof e!=`object`||!e)return!1;let t=e.error;if(typeof t!=`object`||!t||t.code!==`NOT_FOUND`)return!1;let n=t.message;return typeof n==`string`&&n.startsWith(`App not found`)}function d(e,t){let n=e.mainView;return n===`document`||n===`subagent-detail`||n===`tool-detail`||n===`workflow-detail`?e[t]:n}function f(e,t){return t.messageId==null?e.thinkingText===t.thinkingText:e.messageId===t.messageId&&e.thinkingGroupIndex===t.thinkingGroupIndex&&e.thinkingItemIndex===t.thinkingItemIndex}var p={mainView:`chat`,activeAppId:null,openedAppState:null,activeDocumentSurfaceId:null,openedDocumentState:null,isAppMinimized:!1,intelligenceTab:`identity`,assetsRefreshKey:0,viewBeforeDocument:`chat`,activeSubagentId:null,viewBeforeSubagentDetail:`chat`,activeToolDetail:null,viewBeforeToolDetail:`chat`,activeWorkflowRunId:null,viewBeforeWorkflowDetail:`chat`,ruleEditorRequestSeq:0},m=n(t()((t,n)=>({...p,setMainView:e=>{n().mainView!==e&&t({mainView:e})},setIntelligenceTab:e=>{n().intelligenceTab!==e&&t({intelligenceTab:e})},openApp:e=>{t({mainView:`app`,activeAppId:e,openedAppState:null,isAppMinimized:!1})},loadApp:async(r,a)=>{t({mainView:`app`,activeAppId:a,openedAppState:null,isAppMinimized:!1});try{let{data:e}=await i({path:{assistant_id:r,id:a},throwOnError:!0});if(n().activeAppId!==a)return;t({openedAppState:{appId:e.appId,dirName:e.dirName,name:e.name,html:e.html}}),c(r,e.appId,e.html)}catch(r){if(n().activeAppId!==a)return;u(r)||e(r,{context:`openApp`}),t({mainView:`chat`,activeAppId:null,openedAppState:null})}},setLoadedApp:e=>{t({openedAppState:e})},handleAppLoadFailed:()=>{t({mainView:`chat`,activeAppId:null,openedAppState:null})},closeApp:()=>{t({mainView:`chat`,activeAppId:null,openedAppState:null,isAppMinimized:!1})},toggleAppMinimized:()=>{t({isAppMinimized:!n().isAppMinimized})},handleAppUnpinned:e=>{let t=n();return t.activeAppId!==e||t.mainView!==`app`&&t.mainView!==`app-editing`?!1:(n().closeApp(),!0)},enterAppEditing:()=>{t({mainView:`app-editing`})},exitAppEditing:()=>{t({mainView:`app`})},openSubagentDetail:e=>{t({mainView:`subagent-detail`,activeSubagentId:e,viewBeforeSubagentDetail:d(n(),`viewBeforeSubagentDetail`)})},closeSubagentDetail:()=>{t({mainView:n().viewBeforeSubagentDetail,activeSubagentId:null})},openWorkflowDetail:e=>{t({mainView:`workflow-detail`,activeWorkflowRunId:e,viewBeforeWorkflowDetail:d(n(),`viewBeforeWorkflowDetail`)})},closeWorkflowDetail:()=>{t({mainView:n().viewBeforeWorkflowDetail,activeWorkflowRunId:null})},openToolDetail:e=>{t({mainView:`tool-detail`,activeToolDetail:e,viewBeforeToolDetail:d(n(),`viewBeforeToolDetail`)})},toggleToolDetail:e=>{let t=n(),r=t.activeToolDetail;t.mainView===`tool-detail`&&r!=null&&(e.kind===`thinking`?r.kind===`thinking`&&f(r,e):r.kind!==`thinking`&&r.toolCallId===e.toolCallId)?n().closeToolDetail():n().openToolDetail(e)},closeToolDetail:()=>{t({mainView:n().viewBeforeToolDetail,activeToolDetail:null})},requestRuleEditorForActiveTool:()=>{n().activeToolDetail&&t(e=>({ruleEditorRequestSeq:e.ruleEditorRequestSeq+1}))},openDocument:()=>{t({mainView:`document`,openedDocumentState:null,viewBeforeDocument:d(n(),`viewBeforeDocument`)})},loadDocument:async(e,i)=>{let a=d(n(),`viewBeforeDocument`);t({mainView:`document`,activeDocumentSurfaceId:i,openedDocumentState:null,viewBeforeDocument:a});try{let{data:o}=await r({path:{assistant_id:e,id:i},throwOnError:!0});if(n().activeDocumentSurfaceId!==i)return;if(!o){t({mainView:a,activeDocumentSurfaceId:null,openedDocumentState:null});return}t({openedDocumentState:{surfaceId:o.surfaceId,conversationId:o.conversationId,documentName:o.title??`Untitled`,content:o.content??``}})}catch{if(n().activeDocumentSurfaceId!==i)return;t({mainView:a,activeDocumentSurfaceId:null,openedDocumentState:null})}},setLoadedDocument:e=>{t({openedDocumentState:e})},updateDocumentContent:(e,r,i)=>{let a=n();if(!a.openedDocumentState||a.openedDocumentState.surfaceId!==e)return;let o=a.openedDocumentState,s=i===`append`?o.content+r:r;t({openedDocumentState:{...o,content:s}})},handleDocumentLoadFailed:()=>{t({mainView:n().viewBeforeDocument,activeDocumentSurfaceId:null,openedDocumentState:null})},closeDocument:()=>{t({mainView:n().viewBeforeDocument,activeDocumentSurfaceId:null,openedDocumentState:null})},refreshAssets:()=>{t({assetsRefreshKey:n().assetsRefreshKey+1})},reset:()=>t({...p})})));export{c as a,s as i,m as n,l as r,f as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{i as t,r as n,s as r}from"./local-settings-lVNyIOJ_.js";import{t as i}from"./react-DJZBPgpf.js";import{t as a}from"./button-D7s2Q_uG.js";import{t as o}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./dropdown-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{i as t,r as n,s as r}from"./local-settings-lVNyIOJ_.js";import{t as i}from"./react-DJZBPgpf.js";import{t as a}from"./button-D7s2Q_uG.js";import{t as o}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./dropdown-CL8VmqrY.js";import{t as l}from"./toggle-X_kQW5my.js";import{t as u}from"./info-_OtUK1cX.js";import{a as d}from"./routes-DVqkwUEe.js";import{Dn as f,En as p,_n as m,dn as h,fn as g,gn as _,hn as v,mn as y,na as b,pn as x,un as S,vn as C,yn as w}from"./index-ClC1ULPL.js";import{t as T}from"./detail-card-C5Y8BJ-M.js";var E=e(i(),1),D=s(),O=`vellum:voice:conversationTimeoutSeconds`,k=[{label:`Ctrl`,activator:{kind:`modifierOnly`,modifiers:[`control`]}},{label:`Alt`,activator:{kind:`modifierOnly`,modifiers:[`option`]}},{label:`Ctrl+Shift`,activator:{kind:`modifierOnly`,modifiers:[`control`,`shift`]}}],A={label:`Fn`,activator:g},j=[{label:`5 seconds`,value:`5`},{label:`10 seconds`,value:`10`},{label:`15 seconds`,value:`15`},{label:`30 seconds`,value:`30`},{label:`60 seconds`,value:`60`}],M=`30`,N=`text-body-small-default text-[var(--content-tertiary)]`;function P(){return(0,D.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,D.jsx)(F,{}),(0,D.jsx)(L,{}),(0,D.jsx)(R,{}),(0,D.jsx)(B,{})]})}function F(){return(0,D.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-[var(--border-subtle)] bg-[var(--field-bg)] px-3 py-2`,children:[(0,D.jsx)(u,{className:`h-3.5 w-3.5 shrink-0 text-[var(--primary-base)]`}),(0,D.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Looking to configure Speech-to-Text or Text-to-Speech models?`}),(0,D.jsxs)(o,{to:d.settings.ai,className:`inline-flex items-center gap-1 text-body-medium-lighter text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[`Go to Models & Services`,(0,D.jsx)(b,{className:`h-3 w-3`})]})]})}var I=``;function L(){let[e,n]=(0,E.useState)([]),[i,o]=(0,E.useState)(!1),[s,l]=(0,E.useState)(()=>f()),u=(0,E.useCallback)(async()=>{if(navigator.mediaDevices?.enumerateDevices)try{let e=(await navigator.mediaDevices.enumerateDevices()).filter(e=>e.kind===`audioinput`);o(e.length>0&&e.every(e=>!e.label)),n(e.filter(e=>e.deviceId!==``&&e.deviceId!==`default`&&e.deviceId!==`communications`))}catch{n([]),o(!1)}},[]),d=(0,E.useCallback)(async()=>{try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});for(let t of e.getTracks())t.stop()}catch{}u()},[u]);(0,E.useEffect)(()=>{u();let e=navigator.mediaDevices;if(!e?.addEventListener)return;let t=()=>void u();return e.addEventListener(`devicechange`,t),()=>e.removeEventListener(`devicechange`,t)},[u]);let m=(0,E.useMemo)(()=>[{value:I,label:`System Default`},...e.map((e,t)=>({value:e.deviceId,label:e.label||`Microphone ${t+1}`}))],[e]),h=(0,E.useCallback)(e=>{l(e),e===I?t(p):r(p,e)},[]);return(0,D.jsx)(T,{title:`Microphone`,subtitle:`Which input device is used for dictation and voice conversations.`,children:(0,D.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,D.jsx)(`div`,{className:`max-w-xs`,children:(0,D.jsx)(c,{options:m,value:m.some(e=>e.value===s)?s:I,onChange:h,"aria-label":`Microphone`})}),i&&(0,D.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,D.jsx)(a,{variant:`outlined`,onClick:d,children:`Allow Microphone Access`}),(0,D.jsx)(`span`,{className:N,children:`Grant microphone access to list your available input devices.`})]})]})})}function R(){let e=S(),[t,i]=(0,E.useState)(()=>{let t=n(x,``);return t?m(t,{preserveFunction:e}):e?A.activator:{kind:`off`}}),[a,o]=(0,E.useState)(!1),[s,c]=(0,E.useState)([]),d=(0,E.useRef)(null),f=(0,E.useRef)(!1),p=(0,E.useMemo)(()=>e?[A,...k]:k,[e]),b=t.kind!==`off`,O=b&&!e,j=(0,E.useCallback)(e=>{i(e),r(x,C(e)),o(!1),c([])},[]),M=(0,E.useCallback)(()=>{o(!0),c([]),f.current=!1,requestAnimationFrame(()=>{d.current?.focus()})},[]),P=(0,E.useCallback)(()=>{o(!1),c([]),f.current=!1},[]),F=(0,E.useCallback)(t=>{let n=[];return e&&t.getModifierState(`Fn`)&&n.push(`function`),t.ctrlKey&&n.push(`control`),t.altKey&&n.push(`option`),t.shiftKey&&n.push(`shift`),t.metaKey&&n.push(`command`),n},[e]),I=(0,E.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){P();return}let t=F(e),n=e.key;if(n===`Control`||n===`Alt`||n===`Shift`||n===`Meta`||n===`Fn`){c(t.includes(`function`)?g.modifiers:w(t));return}if(t.includes(`function`)){j(g);return}f.current=!0,j({kind:`key`,label:n.length===1?n.toUpperCase():n,modifiers:t})},[P,F,j]),L=(0,E.useCallback)(e=>{if(!a)return;e.preventDefault(),e.stopPropagation();let t=e.key;if(t===`Control`||t===`Alt`||t===`Shift`||t===`Meta`||t===`Fn`){if(f.current){f.current=!1,c([]);return}F(e).length===0&&s.length>0&&j({kind:`modifierOnly`,modifiers:s})}},[F,a,s,j]);(0,E.useEffect)(()=>{if(!a)return;let e=e=>{d.current&&!d.current.contains(e.target)&&P()};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[P,a]);let R=b&&!p.some(e=>v(e.activator,t));return(0,D.jsx)(T,{title:`Push to Talk`,subtitle:`Hold the activation key to dictate text or start a voice conversation.`,children:(0,D.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,D.jsx)(l,{checked:b,onChange:n=>{n?t.kind===`off`&&j(e?A.activator:h):j({kind:`off`})},label:`Enable Push to Talk`}),b&&(0,D.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,D.jsx)(`span`,{className:N,children:`Activation Key:`}),(0,D.jsxs)(`div`,{ref:d,tabIndex:a?0:-1,onKeyDown:a?I:void 0,onKeyUp:a?L:void 0,className:`flex flex-wrap items-center gap-2 focus:outline-none`,children:[p.map(e=>{let n=v(e.activator,t);return(0,D.jsx)(z,{label:e.label,selected:n,onClick:()=>j(e.activator)},e.label)}),a?(0,D.jsx)(z,{label:s.length>0?_(s):`Press any key…`,selected:!0,recording:!0,onClick:P}):(0,D.jsx)(z,{label:R?y(t):`Custom`,selected:R,onClick:M})]}),O&&(0,D.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-default text-[var(--content-quiet)]`,children:[(0,D.jsx)(u,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,D.jsx)(`span`,{children:`Push-to-Talk only works while this tab is focused, and browsers may intercept some shortcuts (e.g. Ctrl+T) before the page can see them. For always-on PTT, use the Vellum desktop app.`})]})]})]})})}function z({label:e,selected:t,recording:n=!1,onClick:r}){return(0,D.jsxs)(`button`,{type:`button`,onClick:r,className:[`inline-flex items-center gap-2 rounded-lg border px-3 py-1.5 text-body-medium-lighter transition-colors`,`border-[var(--border-subtle)]`,t?`bg-[var(--surface-active)]`:`bg-[var(--surface-lift)] hover:bg-[var(--surface-hover)]`,n?`animate-pulse`:``].filter(Boolean).join(` `),children:[(0,D.jsx)(`span`,{className:[`inline-block h-2.5 w-2.5 rounded-full border`,t?`border-[var(--primary-base)] bg-[var(--primary-base)]`:`border-[var(--border-element)]`].join(` `)}),(0,D.jsx)(`span`,{className:`text-[var(--content-default)]`,children:e})]})}function B(){let[e,t]=(0,E.useState)(()=>{let e=n(O,M);return j.find(t=>t.value===e)?.value??M});return(0,D.jsx)(T,{title:`Conversation Timeout`,subtitle:`How long the assistant waits for you to start speaking before ending a voice conversation turn.`,children:(0,D.jsx)(`div`,{className:`max-w-xs`,children:(0,D.jsx)(c,{options:j,value:e,onChange:(0,E.useCallback)(e=>{t(e),r(O,e)},[]),"aria-label":`Conversation timeout`})})})}export{P as VoicePage};
|
package/dist/assets/{weather-forecast-display-DoCG5fqI.js → weather-forecast-display-Dm8dLY4b.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./moon-Be4Pgk5X.js";import{B as i,Dr as a,Fr as o,Gi as s,Hi as c,Ii as l,Ki as u,L as d,R as f,Rr as p,Ui as m,Vi as h,Wi as g,z as _}from"./index-Cx6vyW7T.js";var v=e(t(),1),y={"sun.max.fill":{icon:o,className:`text-orange-500`},"cloud.sun.fill":{icon:c,className:`text-amber-400`},"moon.fill":{icon:r,className:`text-blue-400`},"cloud.moon.fill":{icon:g,className:`text-blue-400`},"cloud.fill":{icon:h,className:`text-stone-400`},"cloud.rain.fill":{icon:m,className:`text-blue-400`},snowflake:{icon:p,className:`text-blue-300`},"cloud.bolt.fill":{icon:s,className:`text-orange-500`},"cloud.fog.fill":{icon:u,className:`text-stone-400`}},b={sunny:{icon:o,className:`text-orange-500`},clear:{icon:o,className:`text-orange-500`},"partly cloudy":{icon:c,className:`text-amber-400`},"mostly sunny":{icon:c,className:`text-amber-400`},cloudy:{icon:h,className:`text-stone-400`},overcast:{icon:h,className:`text-stone-400`},rainy:{icon:m,className:`text-blue-400`},rain:{icon:m,className:`text-blue-400`},drizzle:{icon:m,className:`text-blue-400`},snow:{icon:p,className:`text-blue-300`},snowy:{icon:p,className:`text-blue-300`},thunderstorm:{icon:s,className:`text-orange-500`},thunder:{icon:s,className:`text-orange-500`},foggy:{icon:u,className:`text-stone-400`},fog:{icon:u,className:`text-stone-400`},mist:{icon:u,className:`text-stone-400`},hazy:{icon:u,className:`text-stone-400`},night:{icon:r,className:`text-blue-400`},"mainly clear":{icon:o,className:`text-orange-500`},"mostly cloudy":{icon:h,className:`text-stone-400`},breezy:{icon:a,className:`text-stone-400`},windy:{icon:a,className:`text-stone-400`},cool:{icon:h,className:`text-stone-400`},warm:{icon:o,className:`text-orange-500`},hot:{icon:o,className:`text-orange-500`},cold:{icon:p,className:`text-blue-300`},"cold snap":{icon:p,className:`text-blue-300`},"warm, mostly sunny":{icon:c,className:`text-amber-400`},"cooler, breezy":{icon:a,className:`text-stone-400`}},x={icon:h,className:`text-stone-400`};function S(e){let t=y[e];if(t)return t;let n=e.toLowerCase(),r=b[n];if(r)return r;for(let[e,t]of Object.entries(b))if(n.includes(e))return t;return x}function C(e){if(typeof e==`string`){let t=e.match(/^(\d+)\s*mph\s*(.*)/i);if(t)return{speed:Number(t[1]),direction:t[2]?.trim()||void 0}}return{}}function w(e){let t;if(typeof e.location==`string`)t=e.location;else{let n=_(e.location);n&&typeof n.name==`string`&&(t=n.name)}if(!t)return null;let n=_(e.current),r=f(n?.temp)??f(e.currentTemp)??f(e.temperature)??f(e.temp),a=f(n?.feelsLike)??f(n?.feels_like)??f(n?.apparentTemperature)??f(e.feelsLike)??f(e.feels_like)??f(e.apparentTemperature),o=i(n?.condition)??i(e.condition),s=f(n?.humidity)??f(e.humidity),c=C(n?.wind??e.wind),l=f(n?.windSpeed)??f(n?.wind_speed)??f(e.windSpeed)??f(e.wind_speed)??c.speed,u=i(n?.windDirection)??i(n?.wind_direction)??i(e.windDirection)??i(e.wind_direction)??c.direction,p=_(e.units),m=i(p?.temperature)??i(n?.unit)??i(e.unit)??`F`,h=i(p?.speed)??i(e.windUnit)??i(e.wind_unit),g=d(e.hourly).map((e,t)=>({id:i(e.id)??String(t),time:i(e.time)??``,icon:i(e.icon)??i(e.condition)??`cloud.fill`,temp:f(e.tempC)??f(e.temp)??f(e.temperature),tempC:f(e.tempC)})),v=d([e.forecast,e.daily,e.days].find(Array.isArray)).map((e,t)=>({id:i(e.id)??String(t),day:i(e.day)??i(e.date),dayLabel:i(e.dayLabel)??i(e.date),icon:i(e.icon)??i(e.condition)??`cloud.fill`,low:f(e.low),high:f(e.high),lowC:f(e.lowC),highC:f(e.highC),precip:f(e.precip)??f(e.precipitation)??f(e.precipitationProbability),condition:i(e.condition)}));return{location:t,currentTemp:r,feelsLike:a,condition:o,humidity:s,windSpeed:l,windDirection:u,windUnit:h,unit:m,hourly:g.length>0?g:void 0,forecast:v.length>0?v:void 0}}function T(e){return e*9/5+32}function E(e){return(e-32)*5/9}function D(e,t,n){if(e===void 0)return null;let r=e;return t&&!n&&(r=E(e)),!t&&n&&(r=T(e)),`${Math.round(r)}`}function O(e,t,n){return e.tempC===void 0?e.temp===void 0?null:D(e.temp,t,n):D(e.tempC,!1,n)}function k(e,t,n){return e.lowC===void 0?D(e.low,t,n):D(e.lowC,!1,n)}function A(e,t,n){return e.highC===void 0?D(e.high,t,n):D(e.highC,!1,n)}var j=n();function M({icon:e,size:t=20}){let{icon:n,className:r}=S(e);return(0,j.jsx)(n,{width:t,height:t,className:r})}function N({useFahrenheit:e,onToggle:t}){return(0,j.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border border-[var(--border-element)]`,children:[(0,j.jsx)(`button`,{type:`button`,onClick:()=>t(!0),className:`px-2 py-0.5 text-body-small-default transition-colors ${e?`bg-[var(--primary-base)] text-[var(--content-inset)]`:`bg-transparent text-[var(--content-quiet)]`}`,children:`°F`}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>t(!1),className:`px-2 py-0.5 text-body-small-default transition-colors ${e?`bg-transparent text-[var(--content-quiet)]`:`bg-[var(--primary-base)] text-[var(--content-inset)]`}`,children:`°C`})]})}function P({data:e,sourceIsFahrenheit:t,useFahrenheit:n,onToggle:r}){let i=e.location,o=D(e.currentTemp,t,n),s=D(e.feelsLike,t,n),c=n?`F`:`C`,u=e.forecast?.[0],d=u?A(u,t,n):null,f=u?k(u,t,n):null,p=null;return e.windSpeed!==void 0&&(p=`${Math.round(e.windSpeed)} ${e.windUnit??`mph`}`,e.windDirection&&(p=`${e.windDirection} ${p}`)),(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:i}),o!==null&&(0,j.jsxs)(`div`,{className:`mt-1 text-4xl font-light text-[var(--content-default)]`,children:[o,`°`,c]}),e.condition&&(0,j.jsx)(`div`,{className:`mt-0.5 text-body-small-default text-[var(--content-quiet)]`,children:e.condition})]}),(0,j.jsx)(N,{useFahrenheit:n,onToggle:r})]}),(0,j.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[s!==null&&(0,j.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:[`Feels like `,s,`°`]}),d!==null&&f!==null&&(0,j.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:[`H:`,d,`° L:`,f,`°`]}),p&&(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,j.jsx)(a,{width:12,height:12}),p]}),e.humidity!==void 0&&(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,j.jsx)(l,{width:12,height:12}),e.humidity,`%`]})]})]})}function F({hourly:e,sourceIsFahrenheit:t,useFahrenheit:n}){return(0,j.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,j.jsx)(`div`,{className:`flex gap-3 overflow-x-auto`,children:e.map((e,r)=>{let i=e.time.toLowerCase()===`now`,a=O(e,t,n);return(0,j.jsxs)(`div`,{className:`flex min-w-[3rem] shrink-0 flex-col items-center gap-1`,children:[(0,j.jsx)(`span`,{className:i?`text-body-small-emphasised text-[var(--content-default)]`:`text-label-medium-default text-[var(--content-quiet)]`,children:i?`Now`:e.time}),(0,j.jsx)(M,{icon:e.icon,size:18}),a!==null&&(0,j.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-default)]`,children:[a,`°`]})]},e.id??r)})})})}function I({forecast:e,currentTemp:t,sourceIsFahrenheit:n,useFahrenheit:r}){let{globalMin:i,globalMax:a}=(0,v.useMemo)(()=>{let t=1/0,n=-1/0;for(let r of e){let e=r.lowC??r.low,i=r.highC??r.high;e!==void 0&&e<t&&(t=e),i!==void 0&&i>n&&(n=i)}return{globalMin:t===1/0?0:t,globalMax:n===-1/0?100:n}},[e]),o=a-i||1;return(0,j.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,j.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map((e,s)=>{let c=e.dayLabel??e.day??`Day ${s+1}`,l=c.toLowerCase()===`today`,u=k(e,n,r),d=A(e,n,r),f=e.precip,p=e.lowC??e.low??i,m=e.highC??e.high??a,h=(p-i)/o*100,g=(m-i)/o*100,_=Math.max(g-h,2),v=null;if(l&&t!==void 0){let r=(e.lowC!==void 0||e.highC!==void 0)&&n?(t-32)*5/9:t;v=m===p?50:(Math.max(p,Math.min(m,r))-p)/(m-p)*100}return(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`w-12 shrink-0 truncate text-body-small-default ${l?`text-[var(--content-default)]`:`text-[var(--content-quiet)]`}`,children:c}),(0,j.jsxs)(`div`,{className:`flex w-10 shrink-0 items-center justify-center gap-0.5`,children:[(0,j.jsx)(M,{icon:e.icon,size:16}),f!==void 0&&f>0&&(0,j.jsxs)(`span`,{className:`text-label-small-default text-blue-400`,children:[Math.round(f),`%`]})]}),(0,j.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-faint)]`,children:u===null?`--`:`${u}°`}),(0,j.jsxs)(`div`,{className:`relative h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--border-subtle)]`,children:[(0,j.jsx)(`div`,{className:`absolute top-0 h-full rounded-full bg-[var(--primary-base)]`,style:{left:`${h}%`,width:`${_}%`}}),v!==null&&(0,j.jsx)(`div`,{className:`absolute top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-[var(--aux-white)] bg-[var(--aux-white)] shadow-sm`,style:{left:`${h+v/100*_}%`}})]}),(0,j.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-default)]`,children:d===null?`--`:`${d}°`})]},e.id??s)})})})}function L({templateData:e,fallback:t}){let n=(0,v.useMemo)(()=>w(e),[e]),r=n?.unit?.toUpperCase()===`F`||n?.unit?.toLowerCase()===`fahrenheit`,[i,a]=(0,v.useState)(null),o=i??r;return!n||n.currentTemp===void 0&&!n.forecast?.length?t??null:(0,j.jsxs)(`div`,{className:`mt-3`,children:[(0,j.jsx)(P,{data:n,sourceIsFahrenheit:r,useFahrenheit:o,onToggle:a}),n.hourly&&n.hourly.length>0&&(0,j.jsx)(F,{hourly:n.hourly,sourceIsFahrenheit:r,useFahrenheit:o}),n.forecast&&n.forecast.length>0&&(0,j.jsx)(I,{forecast:n.forecast,currentTemp:n.currentTemp,sourceIsFahrenheit:r,useFahrenheit:o})]})}export{L as WeatherForecastDisplay};
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./moon-CK8MXzOo.js";import{Bi as i,G as a,Hi as o,K as s,Pi as c,Rr as l,U as u,Ui as d,Vi as f,Vr as p,W as m,Wi as h,jr as g,zi as _}from"./index-ClC1ULPL.js";var v=e(t(),1),y={"sun.max.fill":{icon:l,className:`text-orange-500`},"cloud.sun.fill":{icon:i,className:`text-amber-400`},"moon.fill":{icon:r,className:`text-blue-400`},"cloud.moon.fill":{icon:o,className:`text-blue-400`},"cloud.fill":{icon:_,className:`text-stone-400`},"cloud.rain.fill":{icon:f,className:`text-blue-400`},snowflake:{icon:p,className:`text-blue-300`},"cloud.bolt.fill":{icon:d,className:`text-orange-500`},"cloud.fog.fill":{icon:h,className:`text-stone-400`}},b={sunny:{icon:l,className:`text-orange-500`},clear:{icon:l,className:`text-orange-500`},"partly cloudy":{icon:i,className:`text-amber-400`},"mostly sunny":{icon:i,className:`text-amber-400`},cloudy:{icon:_,className:`text-stone-400`},overcast:{icon:_,className:`text-stone-400`},rainy:{icon:f,className:`text-blue-400`},rain:{icon:f,className:`text-blue-400`},drizzle:{icon:f,className:`text-blue-400`},snow:{icon:p,className:`text-blue-300`},snowy:{icon:p,className:`text-blue-300`},thunderstorm:{icon:d,className:`text-orange-500`},thunder:{icon:d,className:`text-orange-500`},foggy:{icon:h,className:`text-stone-400`},fog:{icon:h,className:`text-stone-400`},mist:{icon:h,className:`text-stone-400`},hazy:{icon:h,className:`text-stone-400`},night:{icon:r,className:`text-blue-400`},"mainly clear":{icon:l,className:`text-orange-500`},"mostly cloudy":{icon:_,className:`text-stone-400`},breezy:{icon:g,className:`text-stone-400`},windy:{icon:g,className:`text-stone-400`},cool:{icon:_,className:`text-stone-400`},warm:{icon:l,className:`text-orange-500`},hot:{icon:l,className:`text-orange-500`},cold:{icon:p,className:`text-blue-300`},"cold snap":{icon:p,className:`text-blue-300`},"warm, mostly sunny":{icon:i,className:`text-amber-400`},"cooler, breezy":{icon:g,className:`text-stone-400`}},x={icon:_,className:`text-stone-400`};function S(e){let t=y[e];if(t)return t;let n=e.toLowerCase(),r=b[n];if(r)return r;for(let[e,t]of Object.entries(b))if(n.includes(e))return t;return x}function C(e){if(typeof e==`string`){let t=e.match(/^(\d+)\s*mph\s*(.*)/i);if(t)return{speed:Number(t[1]),direction:t[2]?.trim()||void 0}}return{}}function w(e){let t;if(typeof e.location==`string`)t=e.location;else{let n=a(e.location);n&&typeof n.name==`string`&&(t=n.name)}if(!t)return null;let n=a(e.current),r=m(n?.temp)??m(e.currentTemp)??m(e.temperature)??m(e.temp),i=m(n?.feelsLike)??m(n?.feels_like)??m(n?.apparentTemperature)??m(e.feelsLike)??m(e.feels_like)??m(e.apparentTemperature),o=s(n?.condition)??s(e.condition),c=m(n?.humidity)??m(e.humidity),l=C(n?.wind??e.wind),d=m(n?.windSpeed)??m(n?.wind_speed)??m(e.windSpeed)??m(e.wind_speed)??l.speed,f=s(n?.windDirection)??s(n?.wind_direction)??s(e.windDirection)??s(e.wind_direction)??l.direction,p=a(e.units),h=s(p?.temperature)??s(n?.unit)??s(e.unit)??`F`,g=s(p?.speed)??s(e.windUnit)??s(e.wind_unit),_=u(e.hourly).map((e,t)=>({id:s(e.id)??String(t),time:s(e.time)??``,icon:s(e.icon)??s(e.condition)??`cloud.fill`,temp:m(e.tempC)??m(e.temp)??m(e.temperature),tempC:m(e.tempC)})),v=u([e.forecast,e.daily,e.days].find(Array.isArray)).map((e,t)=>({id:s(e.id)??String(t),day:s(e.day)??s(e.date),dayLabel:s(e.dayLabel)??s(e.date),icon:s(e.icon)??s(e.condition)??`cloud.fill`,low:m(e.low),high:m(e.high),lowC:m(e.lowC),highC:m(e.highC),precip:m(e.precip)??m(e.precipitation)??m(e.precipitationProbability),condition:s(e.condition)}));return{location:t,currentTemp:r,feelsLike:i,condition:o,humidity:c,windSpeed:d,windDirection:f,windUnit:g,unit:h,hourly:_.length>0?_:void 0,forecast:v.length>0?v:void 0}}function T(e){return e*9/5+32}function E(e){return(e-32)*5/9}function D(e,t,n){if(e===void 0)return null;let r=e;return t&&!n&&(r=E(e)),!t&&n&&(r=T(e)),`${Math.round(r)}`}function O(e,t,n){return e.tempC===void 0?e.temp===void 0?null:D(e.temp,t,n):D(e.tempC,!1,n)}function k(e,t,n){return e.lowC===void 0?D(e.low,t,n):D(e.lowC,!1,n)}function A(e,t,n){return e.highC===void 0?D(e.high,t,n):D(e.highC,!1,n)}var j=n();function M({icon:e,size:t=20}){let{icon:n,className:r}=S(e);return(0,j.jsx)(n,{width:t,height:t,className:r})}function N({useFahrenheit:e,onToggle:t}){return(0,j.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border border-[var(--border-element)]`,children:[(0,j.jsx)(`button`,{type:`button`,onClick:()=>t(!0),className:`px-2 py-0.5 text-body-small-default transition-colors ${e?`bg-[var(--primary-base)] text-[var(--content-inset)]`:`bg-transparent text-[var(--content-quiet)]`}`,children:`°F`}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>t(!1),className:`px-2 py-0.5 text-body-small-default transition-colors ${e?`bg-transparent text-[var(--content-quiet)]`:`bg-[var(--primary-base)] text-[var(--content-inset)]`}`,children:`°C`})]})}function P({data:e,sourceIsFahrenheit:t,useFahrenheit:n,onToggle:r}){let i=e.location,a=D(e.currentTemp,t,n),o=D(e.feelsLike,t,n),s=n?`F`:`C`,l=e.forecast?.[0],u=l?A(l,t,n):null,d=l?k(l,t,n):null,f=null;return e.windSpeed!==void 0&&(f=`${Math.round(e.windSpeed)} ${e.windUnit??`mph`}`,e.windDirection&&(f=`${e.windDirection} ${f}`)),(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:i}),a!==null&&(0,j.jsxs)(`div`,{className:`mt-1 text-4xl font-light text-[var(--content-default)]`,children:[a,`°`,s]}),e.condition&&(0,j.jsx)(`div`,{className:`mt-0.5 text-body-small-default text-[var(--content-quiet)]`,children:e.condition})]}),(0,j.jsx)(N,{useFahrenheit:n,onToggle:r})]}),(0,j.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[o!==null&&(0,j.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:[`Feels like `,o,`°`]}),u!==null&&d!==null&&(0,j.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:[`H:`,u,`° L:`,d,`°`]}),f&&(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,j.jsx)(g,{width:12,height:12}),f]}),e.humidity!==void 0&&(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,j.jsx)(c,{width:12,height:12}),e.humidity,`%`]})]})]})}function F({hourly:e,sourceIsFahrenheit:t,useFahrenheit:n}){return(0,j.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,j.jsx)(`div`,{className:`flex gap-3 overflow-x-auto`,children:e.map((e,r)=>{let i=e.time.toLowerCase()===`now`,a=O(e,t,n);return(0,j.jsxs)(`div`,{className:`flex min-w-[3rem] shrink-0 flex-col items-center gap-1`,children:[(0,j.jsx)(`span`,{className:i?`text-body-small-emphasised text-[var(--content-default)]`:`text-label-medium-default text-[var(--content-quiet)]`,children:i?`Now`:e.time}),(0,j.jsx)(M,{icon:e.icon,size:18}),a!==null&&(0,j.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-default)]`,children:[a,`°`]})]},e.id??r)})})})}function I({forecast:e,currentTemp:t,sourceIsFahrenheit:n,useFahrenheit:r}){let{globalMin:i,globalMax:a}=(0,v.useMemo)(()=>{let t=1/0,n=-1/0;for(let r of e){let e=r.lowC??r.low,i=r.highC??r.high;e!==void 0&&e<t&&(t=e),i!==void 0&&i>n&&(n=i)}return{globalMin:t===1/0?0:t,globalMax:n===-1/0?100:n}},[e]),o=a-i||1;return(0,j.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,j.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map((e,s)=>{let c=e.dayLabel??e.day??`Day ${s+1}`,l=c.toLowerCase()===`today`,u=k(e,n,r),d=A(e,n,r),f=e.precip,p=e.lowC??e.low??i,m=e.highC??e.high??a,h=(p-i)/o*100,g=(m-i)/o*100,_=Math.max(g-h,2),v=null;if(l&&t!==void 0){let r=(e.lowC!==void 0||e.highC!==void 0)&&n?(t-32)*5/9:t;v=m===p?50:(Math.max(p,Math.min(m,r))-p)/(m-p)*100}return(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`w-12 shrink-0 truncate text-body-small-default ${l?`text-[var(--content-default)]`:`text-[var(--content-quiet)]`}`,children:c}),(0,j.jsxs)(`div`,{className:`flex w-10 shrink-0 items-center justify-center gap-0.5`,children:[(0,j.jsx)(M,{icon:e.icon,size:16}),f!==void 0&&f>0&&(0,j.jsxs)(`span`,{className:`text-label-small-default text-blue-400`,children:[Math.round(f),`%`]})]}),(0,j.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-faint)]`,children:u===null?`--`:`${u}°`}),(0,j.jsxs)(`div`,{className:`relative h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--border-subtle)]`,children:[(0,j.jsx)(`div`,{className:`absolute top-0 h-full rounded-full bg-[var(--primary-base)]`,style:{left:`${h}%`,width:`${_}%`}}),v!==null&&(0,j.jsx)(`div`,{className:`absolute top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-[var(--aux-white)] bg-[var(--aux-white)] shadow-sm`,style:{left:`${h+v/100*_}%`}})]}),(0,j.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-default)]`,children:d===null?`--`:`${d}°`})]},e.id??s)})})})}function L({templateData:e,fallback:t}){let n=(0,v.useMemo)(()=>w(e),[e]),r=n?.unit?.toUpperCase()===`F`||n?.unit?.toLowerCase()===`fahrenheit`,[i,a]=(0,v.useState)(null),o=i??r;return!n||n.currentTemp===void 0&&!n.forecast?.length?t??null:(0,j.jsxs)(`div`,{className:`mt-3`,children:[(0,j.jsx)(P,{data:n,sourceIsFahrenheit:r,useFahrenheit:o,onToggle:a}),n.hourly&&n.hourly.length>0&&(0,j.jsx)(F,{hourly:n.hourly,sourceIsFahrenheit:r,useFahrenheit:o}),n.forecast&&n.forecast.length>0&&(0,j.jsx)(I,{forecast:n.forecast,currentTemp:n.currentTemp,sourceIsFahrenheit:r,useFahrenheit:o})]})}export{L as WeatherForecastDisplay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./dist-
|
|
1
|
+
import{n as e}from"./dist-BTp54SIT.js";var t=class extends e{constructor(){super(...arguments),this.pending=[],this.deliveredNotifications=[],this.hasNotificationSupport=()=>{if(!(`Notification`in window)||!Notification.requestPermission)return!1;if(Notification.permission!==`granted`)try{new Notification(``)}catch(e){if(e instanceof Error&&e.name===`TypeError`)return!1}return!0}}async getDeliveredNotifications(){let e=[];for(let t of this.deliveredNotifications){let n={title:t.title,id:parseInt(t.tag),body:t.body};e.push(n)}return{notifications:e}}async removeDeliveredNotifications(e){for(let t of e.notifications){let e=this.deliveredNotifications.find(e=>e.tag===String(t.id));e?.close(),this.deliveredNotifications=this.deliveredNotifications.filter(()=>!e)}}async removeAllDeliveredNotifications(){for(let e of this.deliveredNotifications)e.close();this.deliveredNotifications=[]}async createChannel(){throw this.unimplemented(`Not implemented on web.`)}async deleteChannel(){throw this.unimplemented(`Not implemented on web.`)}async listChannels(){throw this.unimplemented(`Not implemented on web.`)}async schedule(e){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);for(let t of e.notifications)this.sendNotification(t);return{notifications:e.notifications.map(e=>({id:e.id}))}}async getPending(){return{notifications:this.pending}}async registerActionTypes(){throw this.unimplemented(`Not implemented on web.`)}async cancel(e){this.pending=this.pending.filter(t=>!e.notifications.find(e=>e.id===t.id))}async areEnabled(){let{display:e}=await this.checkPermissions();return{value:e===`granted`}}async changeExactNotificationSetting(){throw this.unimplemented(`Not implemented on web.`)}async checkExactNotificationSetting(){throw this.unimplemented(`Not implemented on web.`)}async requestPermissions(){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);return{display:this.transformNotificationPermission(await Notification.requestPermission())}}async checkPermissions(){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);return{display:this.transformNotificationPermission(Notification.permission)}}transformNotificationPermission(e){switch(e){case`granted`:return`granted`;case`denied`:return`denied`;default:return`prompt`}}sendPending(){let e=[],t=new Date().getTime();for(let n of this.pending)n.schedule?.at&&n.schedule.at.getTime()<=t&&(this.buildNotification(n),e.push(n));this.pending=this.pending.filter(t=>!e.find(e=>e===t))}sendNotification(e){if(e.schedule?.at){let t=e.schedule.at.getTime()-new Date().getTime();this.pending.push(e),setTimeout(()=>{this.sendPending()},t);return}this.buildNotification(e)}buildNotification(e){let t=new Notification(e.title,{body:e.body,tag:String(e.id)});return t.addEventListener(`click`,this.onClick.bind(this,e),!1),t.addEventListener(`show`,this.onShow.bind(this,e),!1),t.addEventListener(`close`,()=>{this.deliveredNotifications=this.deliveredNotifications.filter(()=>!this)},!1),this.deliveredNotifications.push(t),t}onClick(e){let t={actionId:`tap`,notification:e};this.notifyListeners(`localNotificationActionPerformed`,t)}onShow(e){this.notifyListeners(`localNotificationReceived`,e)}};export{t as LocalNotificationsWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./dist-
|
|
1
|
+
import{n as e}from"./dist-BTp54SIT.js";function t(){let e=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,t=`unknown`,n=e?e.type||e.effectiveType:null;if(n&&typeof n==`string`)switch(n){case`bluetooth`:case`cellular`:t=`cellular`;break;case`none`:t=`none`;break;case`ethernet`:case`wifi`:case`wimax`:t=`wifi`;break;case`other`:case`unknown`:t=`unknown`;break;case`slow-2g`:case`2g`:case`3g`:t=`cellular`;break;case`4g`:t=`wifi`;break;default:break}return t}var n=class extends e{constructor(){super(),this.handleOnline=()=>{let e={connected:!0,connectionType:t()};this.notifyListeners(`networkStatusChange`,e)},this.handleOffline=()=>{this.notifyListeners(`networkStatusChange`,{connected:!1,connectionType:`none`})},typeof window<`u`&&(window.addEventListener(`online`,this.handleOnline),window.addEventListener(`offline`,this.handleOffline))}async getStatus(){if(!window.navigator)throw this.unavailable(`Browser does not support the Network Information API`);let e=window.navigator.onLine,n=t();return{connected:e,connectionType:e?n:`none`}}};new n;export{n as NetworkWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./dist-
|
|
1
|
+
import{n as e}from"./dist-BTp54SIT.js";var t=class extends e{constructor(){super(),this._lastWindow=null}async open(e){this._lastWindow=window.open(e.url,e.windowName||`_blank`)}async close(){return new Promise((e,t)=>{this._lastWindow==null?t(`No active window to close!`):(this._lastWindow.close(),this._lastWindow=null,e())})}};new t;export{t as BrowserWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t}from"./dist-
|
|
1
|
+
import{n as e,r as t}from"./dist-BTp54SIT.js";import{n}from"./definitions-BVEXXekp.js";function r(e){let t=e.split(`/`).filter(e=>e!==`.`),n=[];return t.forEach(e=>{e===`..`&&n.length>0&&n[n.length-1]!==`..`?n.pop():n.push(e)}),n.join(`/`)}function i(e,t){e=r(e),t=r(t);let n=e.split(`/`),i=t.split(`/`);return e!==t&&n.every((e,t)=>e===i[t])}var a=class r extends e{constructor(){super(...arguments),this.DB_VERSION=1,this.DB_NAME=`Disc`,this._writeCmds=[`add`,`put`,`delete`],this.downloadFile=async e=>{let n=t(e,e.webFetchExtra),r=await fetch(e.url,n),i;if(!e.progress)i=await r.blob();else if(!r?.body)i=new Blob;else{let t=r.body.getReader(),n=0,a=[],o=r.headers.get(`content-type`),s=parseInt(r.headers.get(`content-length`)||`0`,10);for(;;){let{done:r,value:i}=await t.read();if(r)break;a.push(i),n+=i?.length||0;let o={url:e.url,bytes:n,contentLength:s};this.notifyListeners(`progress`,o)}let c=new Uint8Array(n),l=0;for(let e of a)e!==void 0&&(c.set(e,l),l+=e.length);i=new Blob([c.buffer],{type:o||void 0})}return{path:(await this.writeFile({path:e.path,directory:e.directory??void 0,recursive:e.recursive??!1,data:i})).uri,blob:i}}}readFileInChunks(e,t){throw this.unavailable(`Method not implemented.`)}async initDb(){if(this._db!==void 0)return this._db;if(!(`indexedDB`in window))throw this.unavailable(`This browser doesn't support IndexedDB`);return new Promise((e,t)=>{let n=indexedDB.open(this.DB_NAME,this.DB_VERSION);n.onupgradeneeded=r.doUpgrade,n.onsuccess=()=>{this._db=n.result,e(n.result)},n.onerror=()=>t(n.error),n.onblocked=()=>{console.warn(`db blocked`)}})}static doUpgrade(e){let t=e.target.result;switch(e.oldVersion){default:t.objectStoreNames.contains(`FileStorage`)&&t.deleteObjectStore(`FileStorage`),t.createObjectStore(`FileStorage`,{keyPath:`path`}).createIndex(`by_folder`,`folder`)}}async dbRequest(e,t){let n=this._writeCmds.indexOf(e)===-1?`readonly`:`readwrite`;return this.initDb().then(r=>new Promise((i,a)=>{let o=r.transaction([`FileStorage`],n).objectStore(`FileStorage`)[e](...t);o.onsuccess=()=>i(o.result),o.onerror=()=>a(o.error)}))}async dbIndexRequest(e,t,n){let r=this._writeCmds.indexOf(t)===-1?`readonly`:`readwrite`;return this.initDb().then(i=>new Promise((a,o)=>{let s=i.transaction([`FileStorage`],r).objectStore(`FileStorage`).index(e)[t](...n);s.onsuccess=()=>a(s.result),s.onerror=()=>o(s.error)}))}getPath(e,t){let n=t===void 0?``:t.replace(/^[/]+|[/]+$/g,``),r=``;return e!==void 0&&(r+=`/`+e),t!==``&&(r+=`/`+n),r}async clear(){(await this.initDb()).transaction([`FileStorage`],`readwrite`).objectStore(`FileStorage`).clear()}async readFile(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(n===void 0)throw Error(`File does not exist.`);return{data:n.content?n.content:``}}async writeFile(e){let t=this.getPath(e.directory,e.path),n=e.data,r=e.encoding,i=e.recursive,a=await this.dbRequest(`get`,[t]);if(a&&a.type===`directory`)throw Error(`The supplied path is a directory.`);let o=t.substr(0,t.lastIndexOf(`/`));if(await this.dbRequest(`get`,[o])===void 0){let t=o.indexOf(`/`,1);if(t!==-1){let n=o.substr(t);await this.mkdir({path:n,directory:e.directory,recursive:i})}}if(!r&&!(n instanceof Blob)&&(n=n.indexOf(`,`)>=0?n.split(`,`)[1]:n,!this.isBase64String(n)))throw Error(`The supplied data is not valid base64 content.`);let s=Date.now(),c={path:t,folder:o,type:`file`,size:n instanceof Blob?n.size:n.length,ctime:s,mtime:s,content:n};return await this.dbRequest(`put`,[c]),{uri:c.path}}async appendFile(e){let t=this.getPath(e.directory,e.path),n=e.data,r=e.encoding,i=t.substr(0,t.lastIndexOf(`/`)),a=Date.now(),o=a,s=await this.dbRequest(`get`,[t]);if(s&&s.type===`directory`)throw Error(`The supplied path is a directory.`);if(await this.dbRequest(`get`,[i])===void 0){let t=i.indexOf(`/`,1);if(t!==-1){let n=i.substr(t);await this.mkdir({path:n,directory:e.directory,recursive:!0})}}if(!r&&!this.isBase64String(n))throw Error(`The supplied data is not valid base64 content.`);if(s!==void 0){if(s.content instanceof Blob)throw Error(`The occupied entry contains a Blob object which cannot be appended to.`);n=s.content!==void 0&&!r?btoa(atob(s.content)+atob(n)):s.content+n,o=s.ctime}let c={path:t,folder:i,type:`file`,size:n.length,ctime:o,mtime:a,content:n};await this.dbRequest(`put`,[c])}async deleteFile(e){let t=this.getPath(e.directory,e.path);if(await this.dbRequest(`get`,[t])===void 0)throw Error(`File does not exist.`);if((await this.dbIndexRequest(`by_folder`,`getAllKeys`,[IDBKeyRange.only(t)])).length!==0)throw Error(`Folder is not empty.`);await this.dbRequest(`delete`,[t])}async mkdir(e){let t=this.getPath(e.directory,e.path),n=e.recursive,r=t.substr(0,t.lastIndexOf(`/`)),i=(t.match(/\//g)||[]).length,a=await this.dbRequest(`get`,[r]),o=await this.dbRequest(`get`,[t]);if(i===1)throw Error(`Cannot create Root directory`);if(o!==void 0)throw Error(`Current directory does already exist.`);if(!n&&i!==2&&a===void 0)throw Error(`Parent directory must exist`);if(n&&i!==2&&a===void 0){let t=r.substr(r.indexOf(`/`,1));await this.mkdir({path:t,directory:e.directory,recursive:n})}let s=Date.now(),c={path:t,folder:r,type:`directory`,size:0,ctime:s,mtime:s};await this.dbRequest(`put`,[c])}async rmdir(e){let{path:t,directory:n,recursive:r}=e,i=this.getPath(n,t),a=await this.dbRequest(`get`,[i]);if(a===void 0)throw Error(`Folder does not exist.`);if(a.type!==`directory`)throw Error(`Requested path is not a directory`);let o=await this.readdir({path:t,directory:n});if(o.files.length!==0&&!r)throw Error(`Folder is not empty`);for(let e of o.files){let i=`${t}/${e.name}`;(await this.stat({path:i,directory:n})).type===`file`?await this.deleteFile({path:i,directory:n}):await this.rmdir({path:i,directory:n,recursive:r})}await this.dbRequest(`delete`,[i])}async readdir(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(e.path!==``&&n===void 0)throw Error(`Folder does not exist.`);let r=await this.dbIndexRequest(`by_folder`,`getAllKeys`,[IDBKeyRange.only(t)]);return{files:await Promise.all(r.map(async e=>{let n=await this.dbRequest(`get`,[e]);return n===void 0&&(n=await this.dbRequest(`get`,[e+`/`])),{name:e.substring(t.length+1),type:n.type,size:n.size,ctime:n.ctime,mtime:n.mtime,uri:n.path}}))}}async getUri(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);return n===void 0&&(n=await this.dbRequest(`get`,[t+`/`])),{uri:n?.path||t}}async stat(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(n===void 0&&(n=await this.dbRequest(`get`,[t+`/`])),n===void 0)throw Error(`Entry does not exist.`);return{name:n.path.substring(t.length+1),type:n.type,size:n.size,ctime:n.ctime,mtime:n.mtime,uri:n.path}}async rename(e){await this._copy(e,!0)}async copy(e){return this._copy(e,!1)}async requestPermissions(){return{publicStorage:`granted`}}async checkPermissions(){return{publicStorage:`granted`}}async _copy(e,t=!1){let{toDirectory:r}=e,{to:a,from:o,directory:s}=e;if(!a||!o)throw Error(`Both to and from must be provided`);r||=s;let c=this.getPath(s,o),l=this.getPath(r,a);if(c===l)return{uri:l};if(i(c,l))throw Error(`To path cannot contain the from path`);let u;try{u=await this.stat({path:a,directory:r})}catch{let e=a.split(`/`);e.pop();let t=e.join(`/`);if(e.length>0&&(await this.stat({path:t,directory:r})).type!==`directory`)throw Error(`Parent directory of the to path is a file`)}if(u&&u.type===`directory`)throw Error(`Cannot overwrite a directory with a file`);let d=await this.stat({path:o,directory:s}),f=async(e,t,n)=>{let i=this.getPath(r,e),a=await this.dbRequest(`get`,[i]);a.ctime=t,a.mtime=n,await this.dbRequest(`put`,[a])},p=d.ctime?d.ctime:Date.now();switch(d.type){case`file`:{let e=await this.readFile({path:o,directory:s});t&&await this.deleteFile({path:o,directory:s});let i;!(e.data instanceof Blob)&&!this.isBase64String(e.data)&&(i=n.UTF8);let c=await this.writeFile({path:a,directory:r,data:e.data,encoding:i});return t&&await f(a,p,d.mtime),c}case`directory`:{if(u)throw Error(`Cannot move a directory over an existing object`);try{await this.mkdir({path:a,directory:r,recursive:!1}),t&&await f(a,p,d.mtime)}catch{}let e=(await this.readdir({path:o,directory:s})).files;for(let n of e)await this._copy({from:`${o}/${n.name}`,to:`${a}/${n.name}`,directory:s,toDirectory:r},t);t&&await this.rmdir({path:o,directory:s})}}return{uri:l}}isBase64String(e){try{return btoa(atob(e))==e}catch{return!1}}};a._debug=!0;export{a as FilesystemWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./dist-
|
|
1
|
+
import{n as e}from"./dist-BTp54SIT.js";var t=class extends e{async getSafeAreaInsets(){return{insets:{top:0,left:0,right:0,bottom:0}}}async getStatusBarHeight(){return{statusBarHeight:0}}setImmersiveNavigationBar(){throw this.unimplemented(`Method not supported on Web.`)}unsetImmersiveNavigationBar(){throw this.unimplemented(`Method not supported on Web.`)}};export{t as SafeAreaWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./dist-
|
|
1
|
+
import{n as e}from"./dist-BTp54SIT.js";var t=class extends e{constructor(){super(),this.handleVisibilityChange=()=>{let e={isActive:document.hidden!==!0};this.notifyListeners(`appStateChange`,e),document.hidden?this.notifyListeners(`pause`,null):this.notifyListeners(`resume`,null)},document.addEventListener(`visibilitychange`,this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented(`Not implemented on web.`)}async getInfo(){throw this.unimplemented(`Not implemented on web.`)}async getLaunchUrl(){return{url:``}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented(`Not implemented on web.`)}async toggleBackButtonHandler(){throw this.unimplemented(`Not implemented on web.`)}async getAppLanguage(){return{value:navigator.language.split(`-`)[0].toLowerCase()}}};export{t as AppWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./dist-
|
|
1
|
+
import{n as e}from"./dist-BTp54SIT.js";var t=class extends e{async canShare(){return typeof navigator>`u`||!navigator.share?{value:!1}:{value:!0}}async share(e){if(typeof navigator>`u`||!navigator.share)throw this.unavailable(`Share API not available in this browser`);return await navigator.share({title:e.title,text:e.text,url:e.url}),{}}};export{t as ShareWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./button-D7s2Q_uG.js";import{d as t}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{l as r}from"./local-mode-
|
|
1
|
+
import{t as e}from"./button-D7s2Q_uG.js";import{d as t}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{l as r}from"./local-mode-CvrNMtPF.js";import{a as i}from"./routes-DVqkwUEe.js";import{t as a}from"./use-onboarding-login-CSv0w3ZW.js";import{kt as o}from"./index-ClC1ULPL.js";var s=n();function c(){let n=t(),{loading:c,error:l,login:u,cancel:d}=a();return(0,s.jsx)(o,{children:(0,s.jsx)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-xl flex-col items-center px-6 pb-40 text-[var(--content-default)]`,children:(0,s.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center`,children:[(0,s.jsx)(`h1`,{className:`text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.5s ease-out 0.1s both`},children:`Welcome to Vellum`}),(0,s.jsx)(`p`,{className:`mt-3 text-body-medium-lighter text-[var(--content-tertiary)]`,style:{animation:`fadeInUp 0.5s ease-out 0.3s both`},children:`Your own personal intelligence is just a step away.`}),l&&(0,s.jsx)(`p`,{className:`mt-4 text-body-small-default text-[var(--system-negative-strong)]`,children:l}),(0,s.jsxs)(`div`,{className:`mt-10 flex w-full max-w-sm flex-col gap-3`,style:{animation:`fadeInUp 0.5s ease-out 0.5s both`},children:[(0,s.jsx)(e,{variant:`primary`,size:`regular`,fullWidth:!0,className:`h-11 text-base`,onClick:c?d:()=>void u(),children:c?`Cancel`:`Log In`}),(0,s.jsx)(e,{variant:`ghost`,size:`regular`,fullWidth:!0,className:`h-11 text-base`,onClick:()=>{c&&d(),r()?n(i.selectAssistant):n(i.onboarding.hosting)},children:`Continue without account`})]})]})})})}export{c as WelcomeScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{t as r}from"./jsx-runtime-CVSDxk6A.js";import{t as i}from"./typography-BscuIPxA.js";import"./src-CK6bncSg.js";import{t as a}from"./arrow-left-CP-EhDNF.js";import{i as o,n as s,r as c,t as l}from"./status-badge-pill-DbFy7rqp.js";import{t as u}from"./ban-BpBuRCKI.js";import{t as d}from"./chevron-right-B6vEpVY0.js";import{t as f}from"./circle-check-DzlJxj_M.js";import{t as p}from"./triangle-alert-DKOyShqD.js";import{t as m}from"./x-KVxA2ZL0.js";import{n as h,r as g,t as _}from"./workflow-status-DmbjJPT4.js";import{t as v}from"./proxy-BigbiDP1.js";import{t as y}from"./AnimatePresence-CLUzO79c.js";import{t as b}from"./use-reduced-motion-D-u6Drm_.js";import{n as x,t as S}from"./three-dot-indicator-DMSk1hLX.js";import{Ar as C,Br as w,Nr as T,ia as E,it as D,rt as O}from"./index-ClC1ULPL.js";var k=e(t(),1),A=r();function j({onClick:e,ariaLabel:t}){return(0,A.jsxs)(`button`,{type:`button`,"aria-label":t,onClick:e,className:`flex h-8 shrink-0 cursor-pointer items-center gap-1.5 rounded-lg border border-[var(--system-negative-strong)] bg-transparent px-2.5 py-1.5 text-[var(--system-negative-strong)] transition-colors hover:bg-[var(--system-negative-weak)]`,children:[(0,A.jsx)(w,{className:`h-3 w-3`,fill:`currentColor`}),(0,A.jsx)(i,{variant:`label-small-default`,children:`Stop`})]})}function M({title:e,body:t,emptyText:n}){return(0,A.jsxs)(`div`,{className:`mb-5`,children:[(0,A.jsx)(i,{variant:`body-medium-default`,as:`h3`,className:`mb-2 text-[var(--content-emphasised)]`,children:e}),t?(0,A.jsx)(i,{variant:`body-medium-lighter`,as:`p`,className:`whitespace-pre-wrap break-words leading-relaxed text-[var(--content-default)]`,children:t}):(0,A.jsx)(i,{variant:`body-medium-lighter`,as:`p`,className:`text-[var(--content-tertiary)]`,children:n})]})}function N({leaf:e}){let t=e.status===`running`?`Running…`:`No result summary`;return(0,A.jsxs)(`div`,{children:[(0,A.jsxs)(`div`,{className:`mb-5 grid grid-cols-2 gap-3`,children:[(0,A.jsx)(s,{icon:(0,A.jsx)(E,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.inputTokens??0,format:e=>c(Math.round(e)),label:`Input`}),(0,A.jsx)(s,{icon:(0,A.jsx)(o,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.outputTokens??0,format:e=>c(Math.round(e)),label:`Output`})]}),(0,A.jsx)(M,{title:`Prompt`,body:e.promptSummary,emptyText:`No prompt summary`}),(0,A.jsx)(M,{title:`Result`,body:e.resultSummary,emptyText:t})]})}function P({status:e}){return(0,A.jsx)(l,{color:h(e),label:g(e)})}function F(e){switch(e){case`completed`:return`var(--system-positive-strong)`;case`failed`:return`var(--system-negative-strong)`;case`cancelled`:return`var(--content-secondary)`;default:return`var(--primary-base)`}}function I(e){switch(e){case`completed`:return`Completed`;case`failed`:return`Failed`;case`cancelled`:return`Cancelled`;default:return`Running`}}function L({status:e}){return(0,A.jsx)(l,{color:F(e),label:I(e)})}function R({status:e}){let t=b(),n=`h-3.5 w-3.5 shrink-0`,r;return r=e===`running`?(0,A.jsx)(S,{className:`shrink-0`,dotSize:4,gap:2}):e===`completed`?(0,A.jsx)(f,{className:n,style:{color:`var(--system-positive-strong)`}}):e===`failed`?(0,A.jsx)(p,{className:n,style:{color:`var(--system-negative-strong)`}}):(0,A.jsx)(u,{className:n,style:{color:`var(--content-secondary)`},role:`img`,"aria-label":`Cancelled`}),(0,A.jsx)(y,{mode:`wait`,initial:!1,children:(0,A.jsx)(v.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:t?{duration:0}:{duration:.15,ease:[.16,1,.3,1]},className:`flex shrink-0 items-center`,children:r},e)})}function z({runId:e,leaf:t,components:n,onSelect:r}){let a=t.label??`Subagent ${t.seq}`,o=t.promptSummary,s=x(`${e}:${t.seq}`);return(0,A.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Open ${a} details`,className:`flex w-full cursor-pointer items-center justify-between gap-2 rounded-[6px] px-2 py-1.5 text-left transition-colors hover:bg-[var(--surface-overlay)]`,children:(0,A.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,A.jsx)(R,{status:t.status}),n?(0,A.jsx)(D,{components:n,bodyShapeId:s.bodyShape,eyeStyleId:s.eyeStyle,colorId:s.color,size:16}):(0,A.jsx)(`div`,{style:{width:16,height:16,flexShrink:0},"aria-hidden":!0}),(0,A.jsx)(i,{variant:`body-medium-default`,title:a,className:`max-w-[60%] shrink-0 truncate text-[var(--content-default)]`,children:a}),o&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 text-[var(--content-tertiary)] opacity-10`,children:`|`}),(0,A.jsx)(i,{variant:`body-medium-lighter`,title:o,className:`min-w-0 truncate text-[var(--content-tertiary)]`,children:o})]})]})})}function B({entry:e,onClose:t,onStop:r,onRequestJournal:l}){let u=_(e.status),f=b(),p=e.label??e.runId,h=e.agentsSpawned||e.leaves.size,g=O(),y=[...e.leaves.values()].sort((e,t)=>e.seq-t.seq),[S,w]=(0,k.useState)(null),[M,F]=(0,k.useState)(e.runId);M!==e.runId&&(F(e.runId),w(null));let I=S==null?void 0:e.leaves.get(S),R=I?x(`${e.runId}:${I.seq}`):void 0,B=(0,k.useCallback)(()=>w(null),[]),V=I?I.label??`Subagent ${I.seq}`:``,H=I?V:p,U=u?`live`:`final`;return(0,k.useEffect)(()=>{l?.(e.runId)},[e.runId,U,l]),(0,A.jsxs)(`div`,{className:`flex h-full flex-col overflow-hidden rounded-xl bg-[var(--surface-lift)]`,children:[I&&(0,A.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-[var(--border-hover)] px-5 py-3`,children:[(0,A.jsx)(`button`,{type:`button`,onClick:B,title:p,className:`min-w-0 shrink cursor-pointer truncate text-left text-[var(--content-default)] hover:underline`,children:(0,A.jsx)(i,{variant:`body-small-default`,as:`span`,children:p})}),(0,A.jsx)(d,{className:`h-2.5 w-2.5 shrink-0 text-[var(--content-tertiary)]`,"aria-hidden":!0}),(0,A.jsx)(i,{variant:`body-small-default`,as:`span`,title:V,className:`min-w-0 shrink truncate text-[var(--content-secondary)]`,children:V})]}),(0,A.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 border-b border-[var(--border-hover)] px-5 py-4`,children:[I&&(0,A.jsx)(n,{variant:`outlined`,iconOnly:(0,A.jsx)(a,{}),onClick:B,"aria-label":`Back to subagents`,tooltip:`Back`,className:`shrink-0 rounded-lg`}),I?g&&R?(0,A.jsx)(D,{components:g,bodyShapeId:R.bodyShape,eyeStyleId:R.eyeStyle,colorId:R.color,size:32}):(0,A.jsx)(`div`,{style:{width:32,height:32,flexShrink:0},"aria-hidden":!0}):(0,A.jsx)(`div`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-[6px] bg-[var(--surface-overlay)]`,children:(0,A.jsx)(C,{className:`h-4 w-4`,style:{color:`var(--content-secondary)`}})}),(0,A.jsx)(i,{variant:`title-medium`,title:H,className:`min-w-0 shrink truncate text-[var(--content-default)]`,children:H}),I?(0,A.jsx)(L,{status:I.status}):(0,A.jsx)(P,{status:e.status}),(0,A.jsx)(`span`,{className:`flex-1`}),u&&r&&(0,A.jsx)(j,{onClick:()=>r(e.runId),ariaLabel:`Stop workflow`}),(0,A.jsx)(n,{variant:`outlined`,iconOnly:(0,A.jsx)(m,{}),onClick:t,"aria-label":`Close workflow detail`,tooltip:`Close`,className:`shrink-0 rounded-lg`})]}),(0,A.jsx)(`div`,{className:`flex-1 overflow-y-auto px-5 py-5`,children:(0,A.jsx)(v.div,{initial:{opacity:0},animate:{opacity:1},transition:f?{duration:0}:{duration:.18,ease:[.16,1,.3,1]},children:I?(0,A.jsx)(N,{leaf:I}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`div`,{className:`mb-5 grid grid-cols-3 gap-3`,children:[(0,A.jsx)(s,{icon:(0,A.jsx)(E,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.inputTokens,format:e=>c(Math.round(e)),label:`Input`}),(0,A.jsx)(s,{icon:(0,A.jsx)(o,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.outputTokens,format:e=>c(Math.round(e)),label:`Output`}),(0,A.jsx)(s,{icon:(0,A.jsx)(T,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:h,format:e=>c(Math.round(e)),label:`Agents`})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(i,{variant:`body-medium-default`,as:`h3`,className:`mb-4 text-[var(--content-emphasised)]`,children:`Subagents`}),y.length===0?(0,A.jsx)(i,{variant:`body-small-default`,className:`py-4 text-center text-[var(--content-tertiary)]`,children:`No subagents yet`}):(0,A.jsx)(`div`,{className:`flex flex-col gap-1`,children:y.map(t=>(0,A.jsx)(z,{runId:e.runId,leaf:t,components:g,onSelect:()=>w(t.seq)},t.seq))})]})]})},I?String(I.seq):`list`)})]})}export{B as WorkflowDetailPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return e===`running`}function t(e){switch(e){case`completed`:return`var(--system-positive-strong)`;case`failed`:case`cap_exceeded`:return`var(--system-negative-strong)`;case`aborted`:case`interrupted`:return`var(--content-secondary)`;default:return`var(--primary-base)`}}function n(e){switch(e){case`running`:return`Running`;case`completed`:return`Completed`;case`failed`:return`Failed`;case`aborted`:return`Aborted`;case`cap_exceeded`:return`Cap Exceeded`;case`interrupted`:return`Interrupted`;default:return`Unknown`}}export{t as n,n as r,e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{h as r}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as i}from"./QueryClientProvider-DKhXIxGb.js";import{t as a}from"./useQuery-B45lW1Kk.js";import{t as o}from"./useMutation-Lj4VunQV.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./queryOptions-BtNi-_9H.js";import{n as l,t as u}from"./panel-item-nGTDevWP.js";import{t as d}from"./menu-C_97pis4.js";import{a as f}from"./src-CK6bncSg.js";import{t as p}from"./confirm-dialog-CfOXCE1N.js";import{t as m}from"./input-C8kfrq9r.js";import{t as h}from"./modal-D0Q3UWD0.js";import{t as g}from"./createLucideIcon-BlMXrA59.js";import{t as _}from"./chevron-right-B6vEpVY0.js";import{t as v}from"./file-text-CmK9LY1p.js";import{t as y}from"./loader-circle-IIzBGiwm.js";import{t as b}from"./pencil-DbB9rxpY.js";import{t as x}from"./x-KVxA2ZL0.js";import{cr as S,dr as C,fr as w,lr as T,mr as E,pr as D,ur as O}from"./sdk.gen-1aYqVbMj.js";import{n as k}from"./use-is-mobile-Cy10kl9u.js";import{$i as A,Ci as j,Di as M,Ir as N,Jr as P,L as F,Mi as ee,Mr as I,Oi as L,R,ji as te,ki as z,ti as B}from"./index-ClC1ULPL.js";import{t as V}from"./use-active-assistant-id-Dyfjqq4l.js";import{n as ne,t as H}from"./mobile-sidebar-drawer-CnBiKIXv.js";import{i as U,n as W,r as G,t as K}from"./file-editor-or8tUWGd.js";import{t as q}from"./format-file-size-BfZOpPdu.js";var re=g(`arrow-down-a-z`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M20 8h-5`,key:`1vsyxs`}],[`path`,{d:`M15 10V6.5a2.5 2.5 0 0 1 5 0V10`,key:`ag13bf`}],[`path`,{d:`M15 14h5l-5 6h5`,key:`ur5jdg`}]]),ie=g(`arrow-down-wide-narrow`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M11 4h10`,key:`1w87gc`}],[`path`,{d:`M11 8h7`,key:`djye34`}],[`path`,{d:`M11 12h4`,key:`q8tih4`}]]),ae=g(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),J=g(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Y=e(t(),1);function oe(e){if(!e)return``;let t=e.indexOf(`;`);return(t===-1?e:e.slice(0,t)).trim()}function se(e,t){return oe(t)===`application/json`?!0:(e??``).toLowerCase().endsWith(`.json`)}function ce(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function X(e){return e.split(`/`).some(e=>e.startsWith(`.`))}var Z=s();function le(e){return c({queryFn:async()=>{let{data:t,error:n}=await O({path:e.path,query:{path:e.query.path,...e.query.showHidden?{showHidden:`true`}:{}}});if(n)throw n;return t},queryKey:[`assistantsWorkspaceFileRetrieve`,e]})}function ue({mimeType:e}){let t=e.indexOf(`;`),n=(t===-1?e:e.slice(0,t)).trim(),r=v;return n.startsWith(`image/`)?r=j:n.startsWith(`video/`)?r=I:!n.startsWith(`text/`)&&n!==`application/json`&&n!==`application/octet-stream`&&(r=L),(0,Z.jsx)(`span`,{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded`,style:{backgroundColor:`color-mix(in oklab, var(--content-default) 10%, transparent)`},children:(0,Z.jsx)(r,{className:`h-3.5 w-3.5`,style:{color:`var(--content-default)`}})})}function Q({viewMode:e,onChange:t}){return(0,Z.jsx)(`div`,{className:`inline-flex rounded-md p-0.5`,style:{backgroundColor:`color-mix(in oklab, var(--content-default) 6%, transparent)`},children:[`preview`,`source`].map(r=>{let i=e===r;return(0,Z.jsx)(n,{variant:`ghost`,onClick:()=>t(r),className:`h-auto rounded border-0 px-2.5 py-1 text-body-small-default hover:bg-transparent`,style:{backgroundColor:i?`var(--surface-lift)`:`transparent`,color:i?`var(--content-default)`:`var(--content-tertiary)`,boxShadow:i?`0 1px 2px rgba(0,0,0,0.15)`:void 0},children:r===`preview`?`Preview`:`Source`},r)})})}function $({name:e,mimeType:t,size:n,rightContent:r}){return(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b px-3 py-2.5`,style:{borderColor:`var(--border-element)`},children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Z.jsx)(ue,{mimeType:t}),(0,Z.jsx)(`span`,{className:`truncate text-body-medium-default`,style:{color:`var(--content-default)`},children:e}),n!=null&&(0,Z.jsx)(`span`,{className:`shrink-0 text-body-small-default`,style:{color:`var(--content-tertiary)`},children:q(n)})]}),r]})}function de({assistantId:e,path:t,mimeType:n,showHidden:r}){let{data:i,isLoading:o}=a({queryFn:async()=>{let n=await T({path:{assistant_id:e},query:{path:t,...r?{showHidden:`true`}:{}},parseAs:`blob`});if(n.error)throw n.error;return n.data},queryKey:[`assistantsWorkspaceFileContentRetrieve`,{assistantId:e,path:t,showHidden:r}],enabled:!!t}),[s,c]=(0,Y.useState)(null);return(0,Y.useEffect)(()=>{if(!i)return;let e=URL.createObjectURL(i);return c(e),()=>{URL.revokeObjectURL(e),c(null)}},[i]),o?(0,Z.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,Z.jsx)(y,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})}):s?n.startsWith(`image/`)?(0,Z.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Z.jsx)(`img`,{src:s,alt:t.split(`/`).pop()??`image`,className:`max-h-[70vh] max-w-full rounded object-contain`})}):n.startsWith(`video/`)?(0,Z.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Z.jsx)(`video`,{src:s,controls:!0,className:`max-h-[70vh] max-w-full rounded`})}):null:null}function fe({assistantId:e,selectedPath:t,showHidden:r,viewMode:s,onChangeViewMode:c,onBrowse:l,pathRename:u,pathDelete:d}){let f=i(),{data:p,isLoading:m}=a({...le({path:{assistant_id:e},query:{path:t??``,showHidden:r}}),enabled:!!t}),[h,g]=(0,Y.useState)(null),[_,v]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{if(!u)return;let{from:e,to:t}=u,n=n=>n===e?t:n.startsWith(`${e}/`)?t+n.slice(e.length):n;g(e=>e==null?e:n(e)),v(e=>e==null?e:{...e,path:n(e.path)})},[u]),(0,Y.useEffect)(()=>{if(!d)return;let{path:e}=d,t=t=>t===e||t.startsWith(`${e}/`);g(e=>e!=null&&t(e)?null:e),v(e=>e!=null&&t(e.path)?null:e)},[d]);let b=h!=null&&h===t,x=p?.content??``,S=_?.path===t?_.content:x,C=()=>{g(null),v(null)},w=o({mutationFn:async({path:t,content:n})=>{let{error:r,response:i}=await E({path:{assistant_id:e},body:{path:t,content:n,encoding:`utf8`},throwOnError:!1});if(!i?.ok||r)throw Error(`Failed to save file`)},onSuccess:(e,t)=>{g(e=>e===t.path?null:e),v(e=>e?.path===t.path?null:e),f.invalidateQueries({queryKey:[`assistantsWorkspaceFileRetrieve`]})}}),T=S!==x,D=(0,Y.useCallback)(()=>{t&&T&&!w.isPending&&w.mutate({path:t,content:S})},[t,T,w,S]);if(!t)return(0,Z.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3`,children:[(0,Z.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`Select a file to view`}),l&&(0,Z.jsx)(n,{type:`button`,onClick:l,leftIcon:(0,Z.jsx)(ae,{"aria-hidden":!0}),className:`sm:hidden`,children:`Browse files`})]});if(m)return(0,Z.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Z.jsx)(y,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})});if(!p)return(0,Z.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Z.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`File not found`})});let O=p.mimeType??`application/octet-stream`,k=p.name??t.split(`/`).pop()??t,A=R(k,O),j=se(k,O),M=p.content!=null&&!A&&!j,N=t?X(t):!0,P=b&&(0,Z.jsx)(W,{isDirty:T,isSaving:w.isPending,error:w.isError?`Save failed`:null,onSave:D,onDiscard:C});if(A&&p.content!=null){let e=b?S:p.content;return(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Z.jsx)($,{name:k,mimeType:O,rightContent:(0,Z.jsx)(Q,{viewMode:s,onChange:e=>{b&&C(),c(e)}})}),(0,Z.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Z.jsx)(K,{content:e,fileName:k,mimeType:O,showEdit:!N&&s===`source`,isEditing:b,onToggleEdit:()=>b?C():g(t)}),s===`preview`?(0,Z.jsx)(`div`,{className:`h-full overflow-auto px-6 py-4`,style:{color:`var(--content-default)`},children:(0,Z.jsx)(F,{content:e})}):b?(0,Z.jsx)(G,{value:S,onChange:e=>v({path:t,content:e}),onSave:D}):(0,Z.jsx)(U,{content:p.content,readOnly:N,onStartEdit:()=>g(t)})]}),P]})}if(j&&p.content!=null){let e=b?S:p.content,n=ce(e);return(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Z.jsx)($,{name:k,mimeType:O,rightContent:(0,Z.jsx)(Q,{viewMode:s,onChange:e=>{b&&C(),c(e)}})}),(0,Z.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Z.jsx)(K,{content:s===`preview`?n:e,downloadContent:e,fileName:k,mimeType:O,showEdit:!N&&s===`source`,isEditing:b,onToggleEdit:()=>b?C():g(t)}),s===`preview`?(0,Z.jsx)(U,{content:n,readOnly:!0,whiteSpace:`pre`}):b?(0,Z.jsx)(G,{value:S,onChange:e=>v({path:t,content:e}),onSave:D}):(0,Z.jsx)(U,{content:p.content,readOnly:N,onStartEdit:()=>g(t)})]}),P]})}return M?(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Z.jsx)($,{name:k,mimeType:O,size:p.size}),(0,Z.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Z.jsx)(K,{content:b?S:p.content??``,fileName:k,mimeType:O,showEdit:!N,isEditing:b,onToggleEdit:()=>b?C():g(t)}),b?(0,Z.jsx)(G,{value:S,onChange:e=>v({path:t,content:e}),onSave:D}):(0,Z.jsx)(U,{content:p.content??``,readOnly:N,onStartEdit:()=>g(t)})]}),P]}):O.startsWith(`image/`)||O.startsWith(`video/`)?(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Z.jsx)($,{name:k,mimeType:O,size:p.size}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,Z.jsx)(de,{assistantId:e,path:t,mimeType:O,showHidden:r})})]}):(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Z.jsx)($,{name:k,mimeType:O,size:p.size}),(0,Z.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,Z.jsxs)(`div`,{className:`w-full max-w-sm rounded-lg border p-6 text-center`,style:{borderColor:`var(--border-base)`,backgroundColor:`var(--surface-lift)`},children:[(0,Z.jsx)(L,{className:`mx-auto h-10 w-10`,style:{color:`var(--content-tertiary)`}}),(0,Z.jsx)(`p`,{className:`mt-3 text-body-medium-default`,style:{color:`var(--content-default)`},children:k}),(0,Z.jsxs)(`div`,{className:`mt-2 space-y-1`,children:[(0,Z.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:O}),(0,Z.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:q(p.size,`Unknown size`)}),p.modifiedAt&&(0,Z.jsxs)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:[`Modified: `,new Date(p.modifiedAt).toLocaleString()]})]})]})})]})}function pe(e,t){if(t===`name`)return e;let n=e.slice();return n.sort((e,t)=>{let n=e.size??null,r=t.size??null;return n===null&&r===null?(e.name??``).localeCompare(t.name??``):n===null?1:r===null?-1:n===r?(e.name??``).localeCompare(t.name??``):r-n}),n}function me(e){return c({queryFn:async()=>{let t={};e.query?.path&&(t.path=e.query.path),e.query?.showHidden&&(t.showHidden=`true`),e.query?.includeDirSizes&&(t.includeDirSizes=`true`);let{data:n,error:r}=await D({path:e.path,query:t});if(r)throw r;if(!n)throw Error(`Failed to load workspace tree`);return n},queryKey:[`assistantsWorkspaceTreeRetrieve`,e]})}async function he(e,t,n,r){let i=n.toLowerCase(),a=r?.toLowerCase(),{data:o}=await D({path:{assistant_id:e},query:t?{path:t}:{}});if(o?.entries?.some(e=>{let t=(e.name??``).toLowerCase();return t===i&&t!==a}))throw Error(`"${n}" already exists here.`)}function ge({entry:e}){return e.type===`directory`?(0,Z.jsx)(M,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):e.mimeType?.startsWith(`image/`)?(0,Z.jsx)(j,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):e.mimeType?.startsWith(`video/`)?(0,Z.jsx)(I,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Z.jsx)(v,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}})}function _e({entry:e,assistantId:t,expandedPaths:n,selectedPath:r,showHidden:i,sortMode:o,searchLower:s,onToggleExpand:c,onSelectPath:l,onRequestDelete:u,onRequestRename:d,onRequestCreate:p,depth:m}){let h=e.path??``,g=e.name??``,v=e.type===`directory`,y=n.has(h),x=r===h,S=g.startsWith(`.`),C=!X(h),w=v&&(y||s.length>0),{data:T}=a({...me({path:{assistant_id:t},query:{path:h,showHidden:i,includeDirSizes:o===`size`}}),enabled:v&&w}),E=(0,Y.useMemo)(()=>pe(T?.entries??[],o),[T?.entries,o]),D=s===``||g.toLowerCase().includes(s);if(s!==``&&!v&&!D)return null;let O=(0,Z.jsxs)(`button`,{onClick:()=>{v?c(h):l(h)},className:`flex w-full items-center gap-1.5 px-2 py-1 text-left text-body-medium-lighter transition-colors hover:bg-[var(--surface-hover)]`,style:{paddingLeft:`${m*14+8}px`,paddingRight:`8px`,color:x?`var(--content-default)`:S?`var(--content-tertiary)`:`var(--content-default)`,backgroundColor:x?`color-mix(in oklab, var(--primary-base) 12%, transparent)`:void 0,opacity:S&&!x?.7:1},children:[v?w?(0,Z.jsx)(A,{className:`h-3 w-3 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Z.jsx)(_,{className:`h-3 w-3 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Z.jsx)(`span`,{className:`h-3 w-3 shrink-0`}),(0,Z.jsx)(ge,{entry:e}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:g}),e.size!=null&&(0,Z.jsx)(`span`,{className:`shrink-0 text-label-medium-default tabular-nums`,style:{color:`var(--content-tertiary)`},children:q(e.size)})]});return(0,Z.jsxs)(`div`,{children:[C?(0,Z.jsxs)(f.Root,{children:[(0,Z.jsx)(f.Trigger,{children:O}),(0,Z.jsxs)(f.Content,{children:[v&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(f.Item,{leftIcon:(0,Z.jsx)(z,{className:`h-3.5 w-3.5`}),onSelect:()=>p({kind:`file`,parentPath:h}),children:`New File`}),(0,Z.jsx)(f.Item,{leftIcon:(0,Z.jsx)(J,{className:`h-3.5 w-3.5`}),onSelect:()=>p({kind:`folder`,parentPath:h}),children:`New Folder`}),(0,Z.jsx)(f.Separator,{})]}),(0,Z.jsx)(f.Item,{leftIcon:(0,Z.jsx)(N,{className:`h-3.5 w-3.5`}),onSelect:()=>u({path:h,name:g,isDirectory:v}),children:`Delete`}),(0,Z.jsx)(f.Item,{leftIcon:(0,Z.jsx)(b,{className:`h-3.5 w-3.5`}),onSelect:()=>d({path:h,name:g,isDirectory:v}),children:`Rename`})]})]}):O,v&&w&&E.length>0&&(0,Z.jsx)(`div`,{children:E.map(e=>(0,Z.jsx)(_e,{entry:e,assistantId:t,expandedPaths:n,selectedPath:r,showHidden:i,sortMode:o,searchLower:s,onToggleExpand:c,onSelectPath:l,onRequestDelete:u,onRequestRename:d,onRequestCreate:p,depth:m+1},e.path))})]})}function ve({title:e,placeholder:t,confirmLabel:r,pendingLabel:i,initialName:a,onCancel:o,onConfirm:s,pending:c,error:l}){let u=(0,Y.useRef)(null),[d,f]=(0,Y.useState)(a??``),p=d.trim(),g=p.length>0&&(/[/\\]/.test(p)||p===`.`||p===`..`),_=p.length>0&&!g&&!c;return(0,Z.jsx)(h.Root,{open:!0,onOpenChange:e=>{!e&&!c&&o()},children:(0,Z.jsx)(h.Content,{size:`sm`,hideCloseButton:!0,"aria-describedby":void 0,onOpenAutoFocus:e=>{e.preventDefault();let t=u.current;t&&(t.focus(),requestAnimationFrame(()=>{t.setSelectionRange(0,t.value.length)}))},onEscapeKeyDown:e=>{e.preventDefault(),e.stopPropagation(),c||o()},children:(0,Z.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),_&&s(p)},children:[(0,Z.jsx)(h.Header,{children:(0,Z.jsx)(h.Title,{children:e})}),(0,Z.jsx)(h.Body,{children:(0,Z.jsx)(m,{ref:u,label:`Name`,value:d,onChange:e=>f(e.target.value),placeholder:t,errorText:l??(g?`Enter a single file or folder name without slashes.`:void 0),autoComplete:`off`,spellCheck:!1,fullWidth:!0})}),(0,Z.jsxs)(h.Footer,{children:[(0,Z.jsx)(n,{type:`button`,variant:`outlined`,onClick:o,disabled:c,children:`Cancel`}),(0,Z.jsx)(n,{type:`submit`,variant:`primary`,disabled:!_,children:c?i:r})]})]})})})}function ye({assistantId:e,expandedPaths:t,selectedPath:r,showHidden:s,sortMode:c,onToggleExpand:l,onExpandPath:u,onSelectPath:d,onToggleShowHidden:f,onChangeSortMode:h,onPathDeleted:g,onPathRenamed:_}){let v=i(),[y,b]=(0,Y.useState)(``),T=y.trim().toLowerCase(),[D,O]=(0,Y.useState)(!1),[k,A]=(0,Y.useState)(null),[j,M]=(0,Y.useState)(null),N=(0,Y.useCallback)(()=>{A(null),M(null)},[]),{data:F,isLoading:I}=a(me({path:{assistant_id:e},query:{showHidden:s,includeDirSizes:c===`size`}})),L=(0,Y.useMemo)(()=>pe(F?.entries??[],c),[F?.entries,c]),R=(0,Y.useCallback)(()=>{for(let e of[`assistantsWorkspaceTreeRetrieve`,`assistantsWorkspaceFileRetrieve`,`assistantsWorkspaceFileContentRetrieve`])v.invalidateQueries({queryKey:[e]})},[v]),z=o({mutationFn:async t=>{let n=t.parentPath?`${t.parentPath}/${t.name}`:t.name;await he(e,t.parentPath,t.name);let{error:r,response:i}=t.kind===`file`?await E({path:{assistant_id:e},body:{path:n,content:``,encoding:`utf8`},throwOnError:!1}):await C({path:{assistant_id:e},body:{path:n},throwOnError:!1});if(r||!i?.ok)throw Error(typeof r==`string`?r:`Failed to create — check the name and try again.`);return{...t,path:n}},onSuccess:e=>{N(),R(),e.parentPath&&u(e.parentPath),e.kind===`file`?d(e.path):u(e.path)},onError:e=>{M(e instanceof Error?e.message:`Failed to create.`)}}),B=o({mutationFn:async t=>{let n=t.oldPath.lastIndexOf(`/`),r=n===-1?``:t.oldPath.slice(0,n),i=t.oldPath.slice(n+1),a=r?`${r}/${t.newName}`:t.newName;await he(e,r,t.newName,i);let{error:o,response:s}=await w({path:{assistant_id:e},body:{oldPath:t.oldPath,newPath:a},throwOnError:!1});if(o||!s?.ok)throw Error(typeof o==`string`?o:`Failed to rename — check the name and try again.`);return{oldPath:t.oldPath,newPath:a}},onSuccess:({oldPath:e,newPath:t})=>{N(),R(),_(e,t)},onError:e=>{M(e instanceof Error?e.message:`Failed to rename.`)}}),V=(0,Y.useCallback)(e=>{M(null),A({type:`create`,...e})},[]),ne=(0,Y.useCallback)(e=>{M(null),A({type:`rename`,path:e.path,name:e.name})},[]),[H,U]=(0,Y.useState)(null),W=o({mutationFn:async t=>{let{error:n,response:r}=await S({path:{assistant_id:e},body:{path:t.path},throwOnError:!1});if(n||!r?.ok)throw Error(typeof n==`string`?n:`Failed to delete — try again.`);return t},onSuccess:e=>{U(null),R(),g(e.path)}}),G=(0,Y.useCallback)(e=>{W.reset(),U(e)},[W]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between border-b px-3 py-2.5`,style:{borderColor:`var(--border-element)`},children:[(0,Z.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-secondary)`},children:`Files`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,Z.jsx)(n,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:c===`size`?(0,Z.jsx)(ie,{"aria-hidden":!0}):(0,Z.jsx)(re,{"aria-hidden":!0}),onClick:()=>h(c===`size`?`name`:`size`),"aria-label":c===`size`?`Sort by name`:`Sort by size`,title:c===`size`?`Sorted by size — switch to name`:`Sorted by name — switch to size`,tintColor:c===`size`?`var(--content-default)`:`var(--content-tertiary)`}),(0,Z.jsx)(n,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:s?(0,Z.jsx)(te,{"aria-hidden":!0}):(0,Z.jsx)(ee,{"aria-hidden":!0}),onClick:f,"aria-label":s?`Hide hidden files`:`Show hidden files`,title:s?`Hide hidden files`:`Show hidden files`,tintColor:s?`var(--content-default)`:`var(--content-tertiary)`}),(0,Z.jsx)(be,{open:D,onOpenChange:O,onSelectKind:e=>{O(!1),V({kind:e,parentPath:``})}})]})]}),(0,Z.jsx)(`div`,{className:`px-3 py-2`,children:(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(m,{type:`text`,value:y,onChange:e=>b(e.target.value),placeholder:`Search files`,leftIcon:(0,Z.jsx)(P,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),fullWidth:!0,spellCheck:!1,autoComplete:`off`}),y&&(0,Z.jsx)(n,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Z.jsx)(x,{"aria-hidden":!0}),onClick:()=>b(``),"aria-label":`Clear search`,className:`absolute right-1.5 top-1/2 -translate-y-1/2`,tintColor:`var(--content-tertiary)`})]})}),(0,Z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto py-1`,children:I?(0,Z.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,Z.jsx)(`div`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent`,style:{color:`var(--content-tertiary)`}})}):L.length?L.map(n=>(0,Z.jsx)(_e,{entry:n,assistantId:e,expandedPaths:t,selectedPath:r,showHidden:s,sortMode:c,searchLower:T,onToggleExpand:l,onSelectPath:d,onRequestDelete:G,onRequestRename:ne,onRequestCreate:V,depth:0},n.path)):(0,Z.jsx)(`p`,{className:`px-3 py-4 text-center text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`No files found`})}),k?.type===`create`&&(0,Z.jsx)(ve,{title:k.kind===`file`?`New File`:`New Folder`,placeholder:k.kind===`file`?`filename.md`:`folder-name`,confirmLabel:`Create`,pendingLabel:`Creating…`,onCancel:N,onConfirm:e=>{M(null),z.mutate({kind:k.kind,parentPath:k.parentPath,name:e})},pending:z.isPending,error:j},`create-${k.kind}-${k.parentPath}`),k?.type===`rename`&&(0,Z.jsx)(ve,{title:`Rename`,placeholder:k.name,confirmLabel:`Rename`,pendingLabel:`Renaming…`,initialName:k.name,onCancel:N,onConfirm:e=>{if(e===k.name){N();return}M(null),B.mutate({oldPath:k.path,newName:e})},pending:B.isPending,error:j},`rename-${k.path}`),(0,Z.jsx)(p,{open:H!==null,title:H?.isDirectory?`Delete Folder`:`Delete File`,message:(0,Z.jsxs)(Z.Fragment,{children:[`Are you sure you want to delete`,` `,(0,Z.jsx)(`span`,{style:{color:`var(--content-default)`},children:H?.name}),H?.isDirectory?` and all of its contents`:``,`? This cannot be undone.`,W.error&&(0,Z.jsx)(`span`,{className:`mt-2 block`,style:{color:`var(--system-negative-strong)`},children:W.error.message})]}),confirmLabel:W.isPending?`Deleting…`:`Delete`,destructive:!0,isPending:W.isPending,onConfirm:()=>{H&&W.mutate(H)},onCancel:()=>U(null)})]})}function be({open:e,onOpenChange:t,onSelectKind:r}){return k()?(0,Z.jsxs)(l.Root,{open:e,onOpenChange:t,children:[(0,Z.jsx)(l.Trigger,{asChild:!0,children:(0,Z.jsx)(n,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Z.jsx)(B,{"aria-hidden":!0}),"aria-label":`Create new file or folder`,title:`New file or folder`,tintColor:`var(--content-tertiary)`})}),(0,Z.jsxs)(l.Content,{children:[(0,Z.jsx)(l.Header,{className:`sr-only`,children:(0,Z.jsx)(l.Title,{children:`Create new`})}),(0,Z.jsxs)(l.Body,{className:`pt-0`,children:[(0,Z.jsx)(u,{icon:z,label:`New File`,onSelect:()=>r(`file`)}),(0,Z.jsx)(u,{icon:J,label:`New Folder`,onSelect:()=>r(`folder`)})]})]})]}):(0,Z.jsxs)(d.Root,{open:e,onOpenChange:t,children:[(0,Z.jsx)(d.Trigger,{asChild:!0,children:(0,Z.jsx)(n,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Z.jsx)(B,{"aria-hidden":!0}),"aria-label":`Create new file or folder`,title:`New file or folder`,tintColor:`var(--content-tertiary)`})}),(0,Z.jsxs)(d.Content,{align:`end`,sideOffset:4,children:[(0,Z.jsx)(d.Item,{leftIcon:(0,Z.jsx)(z,{className:`h-3.5 w-3.5`}),onSelect:()=>r(`file`),children:`New File`}),(0,Z.jsx)(d.Item,{leftIcon:(0,Z.jsx)(J,{className:`h-3.5 w-3.5`}),onSelect:()=>r(`folder`),children:`New Folder`})]})]})}function xe(e){let t=e.split(`/`),n=new Set;for(let e=1;e<t.length;e++)n.add(t.slice(0,e).join(`/`));return n}function Se({assistantId:e}){let[t,n]=r(),[i,a]=(0,Y.useState)(()=>{let e=t.get(`file`);return e?xe(e):new Set}),[o,s]=(0,Y.useState)(()=>t.get(`file`)),[c,l]=(0,Y.useState)(!1),[u,d]=(0,Y.useState)(()=>t.get(`sort`)===`size`?`size`:`name`),[f,p]=(0,Y.useState)(`preview`);(0,Y.useEffect)(()=>{t.get(`file`)&&n(e=>{let t=new URLSearchParams(e);return t.delete(`file`),t},{replace:!0})},[]);let m=(0,Y.useCallback)(e=>{a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),h=(0,Y.useCallback)(e=>{a(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})},[]),[g,_]=(0,Y.useState)(!1),v=(0,Y.useCallback)(e=>{s(e),_(!1)},[]),[y,b]=(0,Y.useState)(null),x=(0,Y.useCallback)(e=>{let t=t=>t===e||t.startsWith(`${e}/`);s(e=>e!==null&&t(e)?null:e),a(e=>{let n=new Set([...e].filter(e=>!t(e)));return n.size===e.size?e:n}),b({path:e})},[]),[S,C]=(0,Y.useState)(null),w={assistantId:e,expandedPaths:i,selectedPath:o,showHidden:c,sortMode:u,onToggleExpand:m,onExpandPath:h,onSelectPath:v,onToggleShowHidden:()=>l(e=>!e),onChangeSortMode:d,onPathDeleted:x,onPathRenamed:(0,Y.useCallback)((e,t)=>{let n=n=>n===e?t:n.startsWith(`${e}/`)?t+n.slice(e.length):n;s(e=>e===null?e:n(e)),a(e=>{let t=!1,r=new Set;for(let i of e){let e=n(i);e!==i&&(t=!0),r.add(e)}return t?r:e}),C({from:e,to:t})},[])};return(0,Z.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-4`,children:[(0,Z.jsx)(`div`,{className:`flex items-center sm:hidden`,children:(0,Z.jsx)(ne,{onClick:()=>_(!0)})}),(0,Z.jsx)(H,{open:g,onClose:()=>_(!1),title:`Files`,children:(0,Z.jsx)(ye,{...w})}),(0,Z.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-1 gap-4 sm:grid-cols-[320px_1fr]`,children:[(0,Z.jsx)(`div`,{className:`hidden min-h-0 min-w-0 flex-col overflow-hidden rounded-xl border sm:flex`,style:{backgroundColor:`var(--surface-overlay)`,borderColor:`var(--border-base)`},children:(0,Z.jsx)(ye,{...w})}),(0,Z.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden rounded-xl border`,style:{backgroundColor:`var(--surface-overlay)`,borderColor:`var(--border-base)`},children:(0,Z.jsx)(fe,{assistantId:e,selectedPath:o,showHidden:c,viewMode:f,onChangeViewMode:p,onBrowse:()=>_(!0),pathRename:S,pathDelete:y})})]})]})}function Ce(){return(0,Z.jsx)(Se,{assistantId:V()})}export{Ce as WorkspacePage};
|