decocms 3.25.0 → 3.26.1
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/client/assets/{AlertCircle-Bqe9viNc.js → AlertCircle-BDfUS-lh.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DSJTBxm2.js → ArrowUpRight-8daK_Mrm.js} +1 -1
- package/dist/client/assets/{Check-BnJpSMJo.js → Check-C9-fsV6-.js} +1 -1
- package/dist/client/assets/{CheckCircle-BX_gETYO.js → CheckCircle-B_rVd_l8.js} +1 -1
- package/dist/client/assets/{ChevronDown-BppEhMel.js → ChevronDown--2U1gfXf.js} +1 -1
- package/dist/client/assets/{ChevronLeft-DFMCd-a0.js → ChevronLeft-TttN4toV.js} +1 -1
- package/dist/client/assets/{ChevronRight-D3aPPa0h.js → ChevronRight-BVEygGVH.js} +1 -1
- package/dist/client/assets/{ChevronUp-CFAV8eH4.js → ChevronUp-C-xaVM7d.js} +1 -1
- package/dist/client/assets/{Container-BxiofVLO.js → Container-Bso4WS0x.js} +1 -1
- package/dist/client/assets/{DotsVertical-MvF5BRo4.js → DotsVertical-Q3F6UWC_.js} +1 -1
- package/dist/client/assets/{Eye-C2_wkHsS.js → Eye-CKz6zS_m.js} +1 -1
- package/dist/client/assets/{FilterLines-zpFRWfW1.js → FilterLines-SKQT-eWL.js} +1 -1
- package/dist/client/assets/{Globe01-7yTOqooU.js → Globe01-iupU5eqh.js} +1 -1
- package/dist/client/assets/{HardDrive-BqhrNwPc.js → HardDrive-DpuvbJvr.js} +1 -1
- package/dist/client/assets/{Key01-CZ1WE5u9.js → Key01-6eW9IRFT.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CkKuDYxX.js → LayoutLeft-BkxKKkMX.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Bv1R0txp.js → LinkExternal01-BXhdtlT7.js} +1 -1
- package/dist/client/assets/{Monitor01-CjEFZhoQ.js → Monitor01-DUICZH5i.js} +1 -1
- package/dist/client/assets/{Palette-C0YKHo-H.js → Palette-CS36Icvl.js} +1 -1
- package/dist/client/assets/{Play-Bnk3nlrR.js → Play-CbbqvWPd.js} +1 -1
- package/dist/client/assets/{Plus-bJ4eCWMb.js → Plus-CSNkL1o7.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-AFHENUb2.js → RefreshCcw01-Dncu-kYd.js} +1 -1
- package/dist/client/assets/{SearchMd-P44Pa_Ws.js → SearchMd-B-q2EsGW.js} +1 -1
- package/dist/client/assets/{Settings02-CjUx5kgh.js → Settings02-CdJ0CKrL.js} +1 -1
- package/dist/client/assets/{Shield01-AMtJFXTs.js → Shield01-Crgp73nV.js} +1 -1
- package/dist/client/assets/{Star01-D08HvSzg.js → Star01-CN33xE6w.js} +1 -1
- package/dist/client/assets/{Stars01-BtHUDu3d.js → Stars01-BXO9Nc4-.js} +1 -1
- package/dist/client/assets/{Stars02-j2QyerFd.js → Stars02-B4CoQ82E.js} +1 -1
- package/dist/client/assets/{Sun-BCMNGCUL.js → Sun-CEzPQTAJ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CTqaEL16.js → SwitchHorizontal01-BI_yHGXL.js} +1 -1
- package/dist/client/assets/{Tool01-LBGr-o2L.js → Tool01-R6WyaXsu.js} +1 -1
- package/dist/client/assets/{Trash01-GIxhGpdM.js → Trash01-C3pnsiws.js} +1 -1
- package/dist/client/assets/{Upload01-HJMOrbdA.js → Upload01-BHsRhr7X.js} +1 -1
- package/dist/client/assets/{User01-Ba6C8JiT.js → User01-JuGE_kA7.js} +1 -1
- package/dist/client/assets/{Users01-JA2IEd8Z.js → Users01-BVUwP6xk.js} +1 -1
- package/dist/client/assets/{Users03-VgU2nGrS.js → Users03-Bek4Ag3W.js} +1 -1
- package/dist/client/assets/{X-CWOXhugP.js → X-BdwzFded.js} +1 -1
- package/dist/client/assets/{XCircle-DXxtO-hk.js → XCircle-D_3MYOn4.js} +1 -1
- package/dist/client/assets/{XClose-DipFToCd.js → XClose-Da5LgJSi.js} +1 -1
- package/dist/client/assets/{Zap-gGoaPzAk.js → Zap-DHBAOmqP.js} +1 -1
- package/dist/client/assets/{ZapSquare-RS_iGKj9.js → ZapSquare-CP91cLS8.js} +1 -1
- package/dist/client/assets/{ZoomOut-DEJOu-nF.js → ZoomOut-CaG3Pd1Z.js} +1 -1
- package/dist/client/assets/{access-gate-Cum4q9T4.js → access-gate-AjUY-gkn.js} +1 -1
- package/dist/client/assets/{accordion-BGZU3zsj.js → accordion-JZC0q2Q6.js} +1 -1
- package/dist/client/assets/{add-section-modal-hVJoRdC3.js → add-section-modal-B5en9ngD.js} +1 -1
- package/dist/client/assets/{agent-capabilities-B2p6Iq1c.js → agent-capabilities-gx2lqG9R.js} +2 -2
- package/dist/client/assets/{agent-icon-C3EOHwyt.js → agent-icon-DAPplz1A.js} +1 -1
- package/dist/client/assets/{agent-icons-DoaIG1Og.js → agent-icons-Dk-aO0GI.js} +1 -1
- package/dist/client/assets/{agents-list-k6Vpppqq.js → agents-list-Cqp5uusD.js} +1 -1
- package/dist/client/assets/{ai-providers-Dt6XNXQt.js → ai-providers-DLs4iaPF.js} +1 -1
- package/dist/client/assets/{alert-CfLQWKTN.js → alert-C04qeSRO.js} +1 -1
- package/dist/client/assets/{alert-dialog-DJkWj_YQ.js → alert-dialog-Q8M8ngFf.js} +2 -2
- package/dist/client/assets/app-editor-CNA09iLR.js +1 -0
- package/dist/client/assets/{auth-catchall-D7TtPVhr.js → auth-catchall-BbuGVKd9.js} +1 -1
- package/dist/client/assets/{auth-split-layout-B5Cqv_Zb.js → auth-split-layout-sY7FyVQz.js} +1 -1
- package/dist/client/assets/{automation-list-row-C75G9IZd.js → automation-list-row-BRsSmcOA.js} +1 -1
- package/dist/client/assets/{automation-runs-BbrT_sbh.js → automation-runs-gdpRnoA6.js} +1 -1
- package/dist/client/assets/{automations-Dk8hBXFu.js → automations-zDSrpko2.js} +1 -1
- package/dist/client/assets/{avatar-Dfbf1Fnl.js → avatar-BqNGZrFg.js} +1 -1
- package/dist/client/assets/{badge-DmYlNLqB.js → badge-BBLSXFe0.js} +1 -1
- package/dist/client/assets/{brand-context-Bqt85Kan.js → brand-context-Be4M-ZZ_.js} +1 -1
- package/dist/client/assets/{buckets-2go2DgZu.js → buckets-D-k7xX4_.js} +1 -1
- package/dist/client/assets/{calendar-CbQPL3PN.js → calendar-CfY7gp-n.js} +1 -1
- package/dist/client/assets/{capability-load-error-B1lEaqFi.js → capability-load-error-CjE005FF.js} +1 -1
- package/dist/client/assets/{card-D1lqBJ4_.js → card-D41ULrnf.js} +1 -1
- package/dist/client/assets/{chat-context-Bq0R1rsi.js → chat-context-BFmJRDzy.js} +1 -1
- package/dist/client/assets/{checkbox-DN2qTA4b.js → checkbox-CBmcFqoh.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DLu7o-Q1.js → cli-auth-success-BcBQhgvD.js} +1 -1
- package/dist/client/assets/{collection-detail-DKEI7Sjg.js → collection-detail-kkp2noDH.js} +1 -1
- package/dist/client/assets/{collection-display-button-BDAT0a4w.js → collection-display-button-BNfKMIgL.js} +1 -1
- package/dist/client/assets/{collection-search-Bgc7wDNW.js → collection-search-CDLcWLfd.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B3cugJnk.js → collection-table-wrapper-DrTvLn6R.js} +1 -1
- package/dist/client/assets/{collection-tabs-W1wumDmu.js → collection-tabs-CbZbTMYY.js} +1 -1
- package/dist/client/assets/{collections-BhVZMUxl.js → collections-BxDJ4z3g.js} +1 -1
- package/dist/client/assets/{command-DQohn3xq.js → command-B8qtKAnE.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CIUi-8P6.js → connect-desktop-dialog-CDUh5Otr.js} +1 -1
- package/dist/client/assets/{connection-card-DbfCQCjU.js → connection-card-CSsbMtfE.js} +1 -1
- package/dist/client/assets/{connection-detail-9PJ4jMVe.js → connection-detail-E_AC0EPN.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-ByQWXd9g.js → connection-form-helpers-BonOFyzw.js} +1 -1
- package/dist/client/assets/{connections-TQXObTI0.js → connections-Ca9YMoFm.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DVc5wWE5.js → decopilot-sse-pool-BHhoQKaF.js} +1 -1
- package/dist/client/assets/{dialog-BjBvO_RE.js → dialog-Cwf6uY_y.js} +1 -1
- package/dist/client/assets/{domain-settings-Co_7-8MU.js → domain-settings-oLlPZ4Z3.js} +1 -1
- package/dist/client/assets/{drawer-xRy0PfXv.js → drawer-CF0b7Dg3.js} +1 -1
- package/dist/client/assets/{dropdown-menu-41clH4_2.js → dropdown-menu-UGlYpK18.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-Dt37NwH5.js → dynamic-plugin-layout-V_3blVro.js} +1 -1
- package/dist/client/assets/{empty-state-Byo8XhHL.js → empty-state-CoXt5rYF.js} +1 -1
- package/dist/client/assets/{empty-state-CLEsbaRV.js → empty-state-h_qXtgbw.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CW-yl44E.js → extract-connection-data-BKeaLULt.js} +1 -1
- package/dist/client/assets/{features-BH4ydQ5Y.js → features-u4e9ViPZ.js} +1 -1
- package/dist/client/assets/{file-explorer-BxCKHziq.js → file-explorer-BHKOSo2p.js} +1 -1
- package/dist/client/assets/{file-type-icon-OHIV6XfY.js → file-type-icon-7TqtrpuQ.js} +1 -1
- package/dist/client/assets/{files-OdVS0D1Q.js → files-C9p4yssc.js} +1 -1
- package/dist/client/assets/{form-DnC3aZLe.js → form-Bbpyf2N_.js} +1 -1
- package/dist/client/assets/{general-P_bTyfQ4.js → general-DqO6G3WI.js} +1 -1
- package/dist/client/assets/generate-id-BHe5yw90.js +1 -0
- package/dist/client/assets/{github-repo-picker-eEjdCzr6.js → github-repo-picker-CVG2zsbh.js} +1 -1
- package/dist/client/assets/{header-tab-button-B6jIYo3h.js → header-tab-button-t5WNjrVG.js} +1 -1
- package/dist/client/assets/{hover-card-CmFc_zSW.js → hover-card-Azyk5Kxa.js} +1 -1
- package/dist/client/assets/{image-field-BwqDweYz.js → image-field-CXkzTwa7.js} +1 -1
- package/dist/client/assets/{index-Bf325NPB.js → index-B_tO_wVS.js} +1 -1
- package/dist/client/assets/{index-DEch32me.js → index-Bjie-Vum.js} +1 -1
- package/dist/client/assets/{index-C3hJb0ZV.js → index-CAs8iq4o.js} +1 -1
- package/dist/client/assets/{index-B_nawhey.js → index-CiRQNPVt.js} +30 -30
- package/dist/client/assets/{index-m5HVp-zM.js → index-Co-NpkaC.js} +1 -1
- package/dist/client/assets/{index-KRfgd_mw.js → index-CwyiLbkO.js} +1 -1
- package/dist/client/assets/{index-cf8DF4P4.js → index-DCeOX6CY.js} +1 -1
- package/dist/client/assets/{index-CBRCa04d.js → index-DJTEqPXf.js} +1 -1
- package/dist/client/assets/{index-CXSe86w1.js → index-DbpajCnQ.js} +1 -1
- package/dist/client/assets/{index-bV9dH20x.js → index-DcI1sEv_.js} +1 -1
- package/dist/client/assets/{index-D78ayl48.js → index-Dci2MWs9.js} +1 -1
- package/dist/client/assets/{index-CpcMawMi.js → index-DkWynf6r.js} +4 -4
- package/dist/client/assets/{index-C0QzQWES.js → index-f0X8ef8k.js} +1 -1
- package/dist/client/assets/{index-redirect-C3wiHCdS.js → index-redirect-D6d28r6b.js} +1 -1
- package/dist/client/assets/{index-0gNnK46r.js → index-skFG1_ns.js} +1 -1
- package/dist/client/assets/{index-BsnDDKqQ.js → index-sqqDCA0K.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C2JPBb8M.js → infiniteQueryObserver-BND7fiNU.js} +1 -1
- package/dist/client/assets/{input-BQYvQQmK.js → input-D3E6n6la.js} +1 -1
- package/dist/client/assets/{integration-icon-BM7kbpro.js → integration-icon-vaGvNHHz.js} +1 -1
- package/dist/client/assets/{label-y0QhV7ts.js → label-DLUhXNk7.js} +1 -1
- package/dist/client/assets/{layout-D7P0jQsp.js → layout-PdamBSR0.js} +1 -1
- package/dist/client/assets/{login-B9Y8jUEx.js → login-CX7WJC_U.js} +1 -1
- package/dist/client/assets/{members-DqPGTe_-.js → members-Bw9vSm5N.js} +1 -1
- package/dist/client/assets/{monaco-editor-BDrxLbvA.js → monaco-editor-Bgzj9gt4.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CWT4G01g.js → monitoring-stats-row-DOXVZiRZ.js} +1 -1
- package/dist/client/assets/{oauth-callback-CSxAEiUN.js → oauth-callback-Cfp_JeoH.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-pUHbjwnp.js → oauth-callback-ai-provider-DOmF-VOd.js} +1 -1
- package/dist/client/assets/{onboarding-BsB2nJJs.js → onboarding-C4KH1uOA.js} +1 -1
- package/dist/client/assets/{org-install-D8AVJ3Gx.js → org-install-CrBGOT0T.js} +1 -1
- package/dist/client/assets/{org-layout-C68fADIM.js → org-layout-BCdmD1Ye.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-DVp9fjGI.js → org-plugin-layout-shv3-lWc.js} +1 -1
- package/dist/client/assets/{page-seo-form-DYfTnJJU.js → page-seo-form-qANN0Bj1.js} +1 -1
- package/dist/client/assets/page-seo-sheet-D4wNk0RY.js +1 -0
- package/dist/client/assets/{pair-D81m9l4c.js → pair-CpEuUIpQ.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CoBuu-O-.js → plugin-empty-state-CrO1kZyK.js} +1 -1
- package/dist/client/assets/{plugin-header-BdhTYuym.js → plugin-header-DTTyXwvF.js} +1 -1
- package/dist/client/assets/{plugin-layout-BvBBtcxt.js → plugin-layout-CXygrV9H.js} +1 -1
- package/dist/client/assets/{popover-ClBabfjo.js → popover-C1MgHMHU.js} +1 -1
- package/dist/client/assets/{post-editor-DMqQLray.js → post-editor-aLUVDKW-.js} +1 -1
- package/dist/client/assets/{primitives-BcrelvwD.js → primitives-BBsQqWkR.js} +1 -1
- package/dist/client/assets/{profile-pNtu72fH.js → profile-CjQ0lj2q.js} +1 -1
- package/dist/client/assets/{project-app-view-BJpmAQlI.js → project-app-view-Br1j175t.js} +1 -1
- package/dist/client/assets/record-editor-QHa9iaw5.js +1 -0
- package/dist/client/assets/registry-BkLh6mX8.js +2 -0
- package/dist/client/assets/{registry-layout-DrdJK7fh.js → registry-layout-CHn-aQtX.js} +1 -1
- package/dist/client/assets/{require-capability-DEQ8z8TG.js → require-capability-vzDtNqMc.js} +1 -1
- package/dist/client/assets/{required-auth-layout-GCCMKqzE.js → required-auth-layout-BE5eceMw.js} +1 -1
- package/dist/client/assets/{reset-password-Cdhj9Xqc.js → reset-password-8Qbe0fKB.js} +1 -1
- package/dist/client/assets/{resizable-0IcT3C2W.js → resizable-CrMJy22o.js} +1 -1
- package/dist/client/assets/{roles-Jku8Z7fc.js → roles-BRTHcf_Y.js} +1 -1
- package/dist/client/assets/save-referenced-block-CBTtXYiM.js +1 -0
- package/dist/client/assets/{save-status-Bx4NQo-s.js → save-status-BZf4M3tc.js} +1 -1
- package/dist/client/assets/{schema-form-DOwHW4Rx.js → schema-form-DNuUk0WJ.js} +1 -1
- package/dist/client/assets/{scroll-area-DGnRnGOq.js → scroll-area-verb-Y8E.js} +1 -1
- package/dist/client/assets/{search-input-Bj5q8eRS.js → search-input-CZKc9XZR.js} +1 -1
- package/dist/client/assets/{secrets-DLZuwT5f.js → secrets-ScbIQJha.js} +1 -1
- package/dist/client/assets/{sections-editor-20GBd0_V.js → sections-editor-CysGozit.js} +1 -1
- package/dist/client/assets/{select-BY9dWtN2.js → select-BMX9jvQG.js} +1 -1
- package/dist/client/assets/{select-model-BlM2XcDg.js → select-model-BB2-8k_v.js} +1 -1
- package/dist/client/assets/{seo-editor-C79bc77c.js → seo-editor-gLS5nwCw.js} +1 -1
- package/dist/client/assets/{settings-layout-D8Jzsms_.js → settings-layout-EdgjO8iZ.js} +1 -1
- package/dist/client/assets/{settings-section-DXGZWaeI.js → settings-section-CQW36fJV.js} +1 -1
- package/dist/client/assets/{sheet-CB7vtAPo.js → sheet-Utq51ofH.js} +1 -1
- package/dist/client/assets/{shell-controls-Dvnep6B4.js → shell-controls-CXM2LvTp.js} +1 -1
- package/dist/client/assets/shell-layout-3b4NfWya.js +1 -0
- package/dist/client/assets/{shell-route-loading-2LkVR3tm.js → shell-route-loading-DSfyT3dO.js} +1 -1
- package/dist/client/assets/{sidebar-PzlYMcQE.js → sidebar-BBqRosV0.js} +1 -1
- package/dist/client/assets/{skeleton-CFjcOYm0.js → skeleton-dQOYuNlQ.js} +1 -1
- package/dist/client/assets/{sortable.esm-DG614r2i.js → sortable.esm-D7AgS_lX.js} +1 -1
- package/dist/client/assets/{spinner-Btb8jTA0.js → spinner-_hqWpG0c.js} +1 -1
- package/dist/client/assets/{sso-ByUtBKFo.js → sso-Cg_UsaPg.js} +1 -1
- package/dist/client/assets/{store-jATXNsAl.js → store-BIRCadh0.js} +1 -1
- package/dist/client/assets/store-registry-Duulq-Qg.js +2 -0
- package/dist/client/assets/{switch-g6aqZqU3.js → switch-CTAzWsjZ.js} +1 -1
- package/dist/client/assets/{tab-id-9JO9-egr.js → tab-id-C7unjelb.js} +1 -1
- package/dist/client/assets/{table-D2cg-KVI.js → table-BuLHtfTA.js} +1 -1
- package/dist/client/assets/{tabs-BI9x307Z.js → tabs-DVd_y6YL.js} +1 -1
- package/dist/client/assets/{task-status-BZSQv5kk.js → task-status-5oHTrkjV.js} +1 -1
- package/dist/client/assets/{textarea-BsPxrCug.js → textarea-D1h5iq3D.js} +1 -1
- package/dist/client/assets/{toggle-group-CJaT_Vnh.js → toggle-group-vA7ktrP-.js} +1 -1
- package/dist/client/assets/{toolbar-CbvmZJ4C.js → toolbar-D3G0G9U8.js} +1 -1
- package/dist/client/assets/{tools-list-Cm3GXtuv.js → tools-list-BL4u8QMN.js} +1 -1
- package/dist/client/assets/{tooltip-bsaPK7gB.js → tooltip-C47QSg8i.js} +1 -1
- package/dist/client/assets/{types-DttTrJQW.js → types-Df_Z2FUK.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BiBg5CM1.js → use-ai-providers-Bwbur0GT.js} +1 -1
- package/dist/client/assets/{use-automations-e3JyM0ax.js → use-automations-B9mdkXiu.js} +1 -1
- package/dist/client/assets/{use-capability-AcV6adZX.js → use-capability-1uxC8-oZ.js} +1 -1
- package/dist/client/assets/{use-collections-D0Mhj1aL.js → use-collections-B1Mg9Y32.js} +1 -1
- package/dist/client/assets/{use-connection-Bj9rnrdo.js → use-connection-DpxWBF4Y.js} +1 -1
- package/dist/client/assets/{use-copy-KGjJlCff.js → use-copy-B_uLjrw6.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-eQDp981K.js → use-create-virtual-mcp-BBxov1Li.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DDVm7mBb.js → use-debounced-autosave-DDZnxori.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DZTkduyg.js → use-delete-connection-eQCNxdaR.js} +1 -1
- package/dist/client/assets/{use-file-configs-Cdxeg5wu.js → use-file-configs-o-LP0Blk.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CJ7jIcHc.js → use-infinite-scroll-D8iZFAEQ.js} +1 -1
- package/dist/client/assets/{use-list-state-CcoIMeA1.js → use-list-state-BkETzhj1.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BKIu0HJG.js → use-mcp-client-D0A6RZFw.js} +4 -4
- package/dist/client/assets/{use-mcp-prompts-g6zS7_Ms.js → use-mcp-prompts-BuV5LRNr.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CxpOcIgL.js → use-mcp-tools-BTzw-W77.js} +1 -1
- package/dist/client/assets/{use-members-BudVf6Ne.js → use-members-DDVaE5yQ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Ce7HkwaN.js → use-navigate-to-agent-Drh7z3D_.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-zsZCCnQZ.js → use-org-auth-client-BlGBETGB.js} +1 -1
- package/dist/client/assets/{use-org-sso-ZUPasYDO.js → use-org-sso-nq4qWMpD.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C8619txJ.js → use-organization-roles-i1o2TOl8.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BjiafnfB.js → use-organization-settings-PADdytdf.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BW4fbNrw.js → use-registry-connections-C0VEE_YX.js} +1 -1
- package/dist/client/assets/{use-secrets-Dh3xnwwI.js → use-secrets-DZDUsUGC.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Cq5xnCap.js → use-status-sounds-DR8WA3PU.js} +1 -1
- package/dist/client/assets/{use-view-mode-CcmdNF5a.js → use-view-mode-BpduDYTq.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-aknX9Mk2.js → use-virtual-mcp-DciRKx1X.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C1jLiRqA.js +1 -0
- package/dist/client/assets/{useRouterState-C0h4Q9bW.js → useRouterState-BXwm4DCl.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CHLM-3cW.js +1 -0
- package/dist/client/assets/{user-R8lbEkl7.js → user-DaO6RYsc.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BUn6mIJL.js → view-mode-toggle-B-ZBNJWV.js} +1 -1
- package/dist/client/assets/{workflow-d32R8JBw.js → workflow-C3zNP9N8.js} +1 -1
- package/dist/client/assets/workflow-detail-CFwJ5L9v.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +129 -103
- package/dist/server/server.js +91 -91
- package/package.json +1 -1
- package/dist/client/assets/app-editor-Bfo_GWpe.js +0 -1
- package/dist/client/assets/generate-id-BeS6ETIJ.js +0 -1
- package/dist/client/assets/page-seo-sheet-DnK64voV.js +0 -1
- package/dist/client/assets/record-editor-DFbMFtaU.js +0 -1
- package/dist/client/assets/registry-DqQxLqpx.js +0 -2
- package/dist/client/assets/save-referenced-block-DGpRvAAs.js +0 -1
- package/dist/client/assets/shell-layout-D7Deazyc.js +0 -1
- package/dist/client/assets/store-registry-Ce368v29.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BbB0NaH6.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DmwdwiHd.js +0 -1
- package/dist/client/assets/workflow-detail-BjCwIEbs.js +0 -1
package/dist/client/assets/{decopilot-sse-pool-DVc5wWE5.js → decopilot-sse-pool-BHhoQKaF.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-CiRQNPVt.js";import{c as s}from"./create-sse-subscription-BS5983N4.js";const c={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},t=Object.values(c),n=s({buildUrl:o=>{const e=t.join(",");return`/api/${encodeURIComponent(o)}/watch?types=${e}`},eventTypes:[...t]});export{c as D,n as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,j as i,
|
|
1
|
+
import{e as n,j as i,cz as u,c,bE as m,de as x,df as j,cA as N,cB as b,dg as p,dh as h}from"./index-CiRQNPVt.js";import{i as D}from"./X-BdwzFded.js";function _(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(h,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(p,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(D,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(p,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let g;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(g=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=g):g=e[14],g}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{_ as D,T as a,B as b,R as c,E as d,O as e,w as f,v as g,y as h,k as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as B,q as U,b as $,G as Y,K as J,n as H,a as G,j as s,B as L,t as p,o as A}from"./index-
|
|
1
|
+
import{e as B,q as U,b as $,G as Y,K as J,n as H,a as G,j as s,B as L,t as p,o as A}from"./index-CiRQNPVt.js";import{u as M}from"./unwrap-tool-result-BYXdCQMg.js";import{S as V,u as W}from"./use-mcp-client-D0A6RZFw.js";import{S as X}from"./switch-CTAzWsjZ.js";import{S as ii,a as k,b as P}from"./settings-section-CQW36fJV.js";function si(){const i=B.c(62),{org:t}=U(),{data:K}=$.useSession(),R=Y();let z;i[0]!==t.id||i[1]!==t.slug?(z={connectionId:V,orgId:t.id,orgSlug:t.slug},i[0]=t.id,i[1]=t.slug,i[2]=z):z=i[2];const a=W(z);let r;i[3]!==t.id?(r=J.organizationDomain(t.id),i[3]=t.id,i[4]=r):r=i[4];let d;i[5]!==a?(d=async()=>{const e=await a.callTool({name:"ORGANIZATION_DOMAIN_GET",arguments:{}});return M(e)},i[5]=a,i[6]=d):d=i[6];let h;i[7]!==r||i[8]!==d?(h={queryKey:r,queryFn:d},i[7]=r,i[8]=d,i[9]=h):h=i[9];const{data:q,isPending:Z}=H(h),b=K?.user?.email??"";let I;i[10]!==b?(I=b.split("@")[1]?.toLowerCase()??"",i[10]=b,i[11]=I):I=i[11];const o=I,n=q?.domain??null,F=q?.autoJoinEnabled??!1,v=o&&o!==n;let x;i[12]!==t.id||i[13]!==R?(x=()=>R.invalidateQueries({queryKey:J.organizationDomain(t.id)}),i[12]=t.id,i[13]=R,i[14]=x):x=i[14];const l=x;let c;i[15]!==a||i[16]!==o?(c=async()=>{const e=await a.callTool({name:"ORGANIZATION_DOMAIN_SET",arguments:{domain:o,autoJoinEnabled:!1}});return M(e)},i[15]=a,i[16]=o,i[17]=c):c=i[17];let m;i[18]!==l||i[19]!==t.id||i[20]!==o?(m=()=>{p("organization_domain_claimed",{organization_id:t.id,email_domain:o}),l(),A.success("Domain claimed")},i[18]=l,i[19]=t.id,i[20]=o,i[21]=m):m=i[21];let u;i[22]!==t.id||i[23]!==o?(u=e=>{p("organization_domain_claim_failed",{organization_id:t.id,email_domain:o,error:e instanceof Error?e.message:String(e)}),A.error(e instanceof Error?e.message:"Failed to claim domain")},i[22]=t.id,i[23]=o,i[24]=u):u=i[24];let D;i[25]!==c||i[26]!==m||i[27]!==u?(D={mutationFn:c,onSuccess:m,onError:u},i[25]=c,i[26]=m,i[27]=u,i[28]=D):D=i[28];const C=G(D);let g;i[29]!==a?(g=async()=>{const e=await a.callTool({name:"ORGANIZATION_DOMAIN_CLEAR",arguments:{}});return M(e)},i[29]=a,i[30]=g):g=i[30];let f;i[31]!==n||i[32]!==l||i[33]!==t.id?(f=()=>{p("organization_domain_cleared",{organization_id:t.id,email_domain:n}),l(),A.success("Domain removed")},i[31]=n,i[32]=l,i[33]=t.id,i[34]=f):f=i[34];let _;i[35]!==n||i[36]!==t.id?(_=e=>{p("organization_domain_clear_failed",{organization_id:t.id,email_domain:n,error:e instanceof Error?e.message:String(e)}),A.error(e instanceof Error?e.message:"Failed to remove domain")},i[35]=n,i[36]=t.id,i[37]=_):_=i[37];let y;i[38]!==g||i[39]!==f||i[40]!==_?(y={mutationFn:g,onSuccess:f,onError:_},i[38]=g,i[39]=f,i[40]=_,i[41]=y):y=i[41];const N=G(y);let E;i[42]!==a||i[43]!==n||i[44]!==t.id?(E=async e=>{if(!n)return;p("organization_auto_join_toggled",{organization_id:t.id,enabled:e});const Q=await a.callTool({name:"ORGANIZATION_DOMAIN_UPDATE",arguments:{autoJoinEnabled:e}});return M(Q)},i[42]=a,i[43]=n,i[44]=t.id,i[45]=E):E=i[45];let S;i[46]!==l?(S=()=>{l(),A.success("Auto-join setting updated")},i[46]=l,i[47]=S):S=i[47];let j;i[48]!==t.id?(j=e=>{p("organization_auto_join_toggle_failed",{organization_id:t.id,error:e instanceof Error?e.message:String(e)}),A.error(e instanceof Error?e.message:"Failed to update auto-join")},i[48]=t.id,i[49]=j):j=i[49];let w;i[50]!==E||i[51]!==S||i[52]!==j?(w={mutationFn:E,onSuccess:S,onError:j},i[50]=E,i[51]=S,i[52]=j,i[53]=w):w=i[53];const O=G(w);if(Z)return null;let T;return i[54]!==F||i[55]!==v||i[56]!==N||i[57]!==n||i[58]!==C||i[59]!==O||i[60]!==o?(T=s.jsx(ii,{title:"Email domain",children:n?s.jsxs(k,{children:[s.jsx(P,{title:n,description:"Claimed domain",action:s.jsx(L,{variant:"outline",size:"sm",onClick:()=>N.mutate(),disabled:N.isPending,children:"Remove"})}),s.jsx(P,{title:"Auto-join",description:`Users with @${n} emails will automatically join this organization on signup.`,action:s.jsx(X,{checked:F,onCheckedChange:e=>O.mutate(e),disabled:O.isPending})})]}):v?s.jsx(k,{children:s.jsx(P,{title:o,description:"Let new users with matching emails auto-join this org.",action:s.jsx(L,{size:"sm",onClick:()=>C.mutate(),disabled:C.isPending,children:C.isPending?"Claiming...":"Claim domain"})})}):s.jsx(k,{children:s.jsx(P,{title:"No domain detected",description:"Sign in with a corporate email to claim a domain for your organization."})})}),i[54]=F,i[55]=v,i[56]=N,i[57]=n,i[58]=C,i[59]=O,i[60]=o,i[61]=T):T=i[61],T}export{si as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as d,j as s,
|
|
1
|
+
import{e as d,j as s,co as i,c}from"./index-CiRQNPVt.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{D,g as a,x as b,h as c,N as d,b as e,j as f,v as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,j as i,
|
|
1
|
+
import{e as c,j as i,dI as f,dJ as m,c as u,dK as g,dL as x,dM as v,dN as b,dO as h,dP as w,dQ as j,dR as N,dS as z,dT as _,dU as y,dV as p}from"./index-CiRQNPVt.js";import{i as $}from"./Check-C9-fsV6-.js";import{i as D}from"./ChevronRight-BVEygGVH.js";import{a as M}from"./DotsVertical-Q3F6UWC_.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function L(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function O(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function E(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function G(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function J(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function K(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function Q(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function U(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function V(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{C as D,T as a,L as b,O as c,K as d,Q as e,U as f,V as g,G as h,P as i,J as j,E as k};
|
package/dist/client/assets/{dynamic-plugin-layout-Dt37NwH5.js → dynamic-plugin-layout-V_3blVro.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as d,g as p,
|
|
1
|
+
import{e as d,g as p,cm as l,j as s,O as u}from"./index-CiRQNPVt.js";import{P as c}from"./plugin-layout-CXygrV9H.js";import"./use-connection-DpxWBF4Y.js";import"./use-collections-B1Mg9Y32.js";import"./use-mcp-client-D0A6RZFw.js";import"./Settings02-CdJ0CKrL.js";import"./index-Dci2MWs9.js";import"./sidebar-BBqRosV0.js";import"./LayoutLeft-BkxKKkMX.js";import"./tooltip-C47QSg8i.js";import"./sheet-Utq51ofH.js";import"./X-BdwzFded.js";function _(){const e=d.c(10);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/$taskId/$pluginId"},e[0]=n):n=e[0];const{pluginId:a}=p(n);let i;e[1]!==a?(i=l.find(r=>r.id===a),e[1]=a,e[2]=i):i=e[2];const t=i;if(t?.renderHeader&&t?.renderEmptyState&&t?.bindingName){let r;return e[3]!==t.bindingName||e[4]!==t.renderEmptyState||e[5]!==t.renderHeader?(r=s.jsx(c,{bindingName:t.bindingName,renderHeader:t.renderHeader,renderEmptyState:t.renderEmptyState}),e[3]=t.bindingName,e[4]=t.renderEmptyState,e[5]=t.renderHeader,e[6]=r):r=e[6],r}const o=t?.LayoutComponent;if(!o){let r;return e[7]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(u,{}),e[7]=r):r=e[7],r}let m;return e[8]!==o?(m=s.jsx(o,{}),e[8]=o,e[9]=m):m=e[9],m}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as v,c as N,j as t}from"./index-
|
|
1
|
+
import{e as v,c as N,j as t}from"./index-CiRQNPVt.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as b,c as h,j as t,B as g}from"./index-
|
|
1
|
+
import{e as b,c as h,j as t,B as g}from"./index-CiRQNPVt.js";function y(N){const e=b.c(21),{icon:o,illustration:a,title:u,description:d,buttonProps:s,buttonComponent:x,className:j,children:p}=N;let l;e[0]!==j?(l=h("flex flex-col items-center justify-center py-16 text-center",j),e[0]=j,e[1]=l):l=e[1];let i;e[2]!==o||e[3]!==a?(i=a?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:a}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=a,e[4]=i):i=e[4];let n;e[5]!==u?(n=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[5]=u,e[6]=n):n=e[6];let c;e[7]!==d?(c=d&&t.jsx("div",{className:"text-sm text-muted-foreground",children:d}),e[7]=d,e[8]=c):c=e[8];let r;e[9]!==n||e[10]!==c?(r=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[n,c]}),e[9]=n,e[10]=c,e[11]=r):r=e[11];let m;e[12]!==x||e[13]!==s?(m=(x??s)&&t.jsx("div",{className:"mt-4",children:x??(s&&t.jsx(g,{size:"sm",className:h(s?.className),...s}))}),e[12]=x,e[13]=s,e[14]=m):m=e[14];let f;return e[15]!==p||e[16]!==l||e[17]!==i||e[18]!==r||e[19]!==m?(f=t.jsxs("div",{className:l,children:[i,r,m,p]}),e[15]=p,e[16]=l,e[17]=i,e[18]=r,e[19]=m,e[20]=f):f=e[20],f}export{y as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as O}from"./generate-id-
|
|
1
|
+
import{g as O}from"./generate-id-BHe5yw90.js";import"./index-CiRQNPVt.js";import{W as T,c as x}from"./use-mcp-client-D0A6RZFw.js";const U="mcp.mesh";function H(e){if(!e)return null;const t=typeof e=="string"?e:e.url;if(!t)return null;const n=t.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function L(e){const t=H(e);if(!t)return null;const n=`https://github.com/${t.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function Y(e,t){return e===T.REGISTRY(t)||e===T.COMMUNITY_REGISTRY(t)}function F(e,t){return Y(e,t)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function q(e){if(!e)return[];const t=[];for(const n of e){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}t.push(...a)}return t}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function G(e){return e?D[e]??e.toUpperCase():null}function B(e){if(!e)return[];if(Array.isArray(e))return e;if(typeof e=="object"&&e!==null){const t=Object.keys(e).find(n=>Array.isArray(e[n]));if(t)return e[t]}return[]}async function J(e,t,n,a,r){const o=await x({connectionId:e,orgId:t,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}function j(e){return e._meta?.["mcp.mesh"]?.appName||e.server?.name||null}function K(e){if(!e?.url)return"Unknown";try{return new URL(e.url).hostname}catch{return e.url}}function $(e){const t=e?.identifier||e?.name;return t?t.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function Q(e,t,n,a){const r=e.server,o=e._meta?.[U],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||e.title||r?.title||r?.name||"Unnamed MCP Server",k=r?.description||null,C=r?.icons?.[0]?.src||L(r?.repository)||null,i=o?.oauth_config,R=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,P=o?.configuration_state,v=o?.configuration_scopes,w=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],d=r?.remotes??[],A=a?.packageIndex??0,S=a?.remoteIndex??0,y=p.length>0&&a?.packageIndex!==void 0,c=y?p[A]:null,l=y?null:d[S];let u,f,h=null;if(c){const _=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");h={command:"npx",args:_?["-y",_]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=G(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const N=d.length>1,M=p.length>1;let g="";c&&M?g=` (${$(c)})`:l&&N&&(g=` (${K(l)})`);const E=I+g;return{id:O("conn"),title:E,description:k,icon:C,app_name:j(e),app_id:o?.id||e.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:h,oauth_config:R,configuration_state:P??null,configuration_scopes:v??null,metadata:{source:"store",registry_item_id:e.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:w},created_at:s,updated_at:s,created_by:n,organization_id:t,tools:null,bindings:null,status:"inactive"}}export{L as a,B as b,J as c,Q as e,q as f,j as g,F as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as b,q as k,G as q,
|
|
1
|
+
import{e as b,q as k,G as q,cm as P,j as n,cn as E,b7 as R,K as S,o as K}from"./index-CiRQNPVt.js";import{P as j}from"./index-Dci2MWs9.js";import{d as _}from"./use-organization-settings-PADdytdf.js";import{S as I}from"./switch-CTAzWsjZ.js";import{n as Q}from"./Container-Bso4WS0x.js";import{b as w,S as z,a as F,c as N}from"./settings-section-CQW36fJV.js";import{R as T}from"./require-capability-vzDtNqMc.js";import"./sidebar-BBqRosV0.js";import"./LayoutLeft-BkxKKkMX.js";import"./tooltip-C47QSg8i.js";import"./sheet-Utq51ofH.js";import"./X-BdwzFded.js";import"./use-mcp-client-D0A6RZFw.js";import"./card-D41ULrnf.js";import"./ArrowUpRight-8daK_Mrm.js";import"./use-capability-1uxC8-oZ.js";import"./access-gate-AjUY-gkn.js";import"./capability-load-error-CjE005FF.js";function U(){const e=b.c(17),{org:t,project:s}=k(),r=q();let d;e[0]!==s.enabledPlugins?(d=s.enabledPlugins??[],e[0]=s.enabledPlugins,e[1]=d):d=e[1];const a=d,l=_();let m;e[2]!==t||e[3]!==s.slug||e[4]!==r?(m=()=>{r.invalidateQueries({queryKey:S.project(t.id,s.slug)}),r.invalidateQueries({queryKey:S.projects(t.id)}),r.invalidateQueries({predicate:i=>{const o=i.queryKey;return o[1]===t.id&&o[3]==="collection"&&o[4]==="VIRTUAL_MCP"}})},e[2]=t,e[3]=s.slug,e[4]=r,e[5]=m):m=e[5];const x=m;let p;e[6]!==x||e[7]!==l||e[8]!==a?(p=(i,o)=>{const u=new Set(a);o?u.add(i):u.delete(i),l.mutate({enabled_plugins:Array.from(u)},{onSuccess:x,onError:G})},e[6]=x,e[7]=l,e[8]=a,e[9]=p):p=e[9];const g=p,y=D,C=A;if(P.length===0){let i;return e[10]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}),e[10]=i):i=e[10],i}let c;e[11]!==g||e[12]!==l||e[13]!==a?(c=P.map(i=>{const o=y(i.id),u=C(i.id),h=a.includes(i.id);return n.jsx(w,{title:o?.label??i.id,description:u??void 0,icon:n.jsx("span",{className:"text-muted-foreground [&>svg]:size-4",children:o?.icon??n.jsx(Q,{size:14})}),onClick:()=>!l.isPending&&g(i.id,!h),action:n.jsx(I,{checked:h,onCheckedChange:v=>g(i.id,v),disabled:l.isPending,onClick:$})},i.id)}),e[11]=g,e[12]=l,e[13]=a,e[14]=c):c=e[14];let f;return e[15]!==c?(f=n.jsx(z,{children:n.jsx(F,{children:c})}),e[15]=c,e[16]=f):f=e[16],f}function $(e){return e.stopPropagation()}function A(e){return P.find(s=>s.id===e)?.description??null}function D(e){const t=E.find(r=>r.pluginId===e);if(t)return{label:t.label,icon:t.items[0]?.icon};const s=R.find(r=>r.pluginId===e);return s?{label:s.label,icon:s.icon}:null}function G(e){K.error("Failed to update plugin: "+(e instanceof Error?e.message:"Unknown error"))}function M(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(j,{children:n.jsx(j.Content,{children:n.jsx(j.Body,{children:n.jsxs(N,{children:[n.jsx(j.Title,{children:"Plugins"}),n.jsx(U,{})]})})})}),e[0]=t):t=e[0],t}function ae(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(T,{capability:"org:manage",area:"plugins",children:n.jsx(M,{})}),e[0]=t):t=e[0],t}export{ae as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as Ke,r as l,j as i,l as re,B as fe,c as Ve,G as ut,o as $,K as Te}from"./index-B_nawhey.js";import{F as mt,l as pt}from"./index-C0QzQWES.js";import{Z as ht,aq as xt,ar as gt,as as ae,at as yt,G as $e}from"./agent-icon-C3EOHwyt.js";import{a as wt}from"./Tool01-LBGr-o2L.js";import{s as jt}from"./XClose-DipFToCd.js";import{S as bt}from"./scroll-area-DGnRnGOq.js";import{b as Re,T as Oe,a as ze}from"./tooltip-bsaPK7gB.js";import{A as vt,a as Ct,b as Nt,c as St,d as Dt,e as kt,f as Ft,g as Lt}from"./alert-dialog-DJkWj_YQ.js";import{a as Et}from"./chat-context-Bq0R1rsi.js";import{u as Pt}from"./shell-layout-D7Deazyc.js";import{a7 as le,a8 as Ae,a9 as Tt}from"./index-CpcMawMi.js";import{c as $t,e as Rt,b as Ot,d as zt,a as At,D as Wt}from"./dialog-BjBvO_RE.js";import{I as We}from"./input-BQYvQQmK.js";import{C as It,c as _,d as Ie,e as Mt,f as Kt}from"./shell-route-loading-2LkVR3tm.js";import{t as Vt}from"./ChevronDown-BppEhMel.js";import{i as Bt}from"./ChevronRight-D3aPPa0h.js";import{a as Gt}from"./ZoomOut-DEJOu-nF.js";import{E as qt,p as Me,q as he,r as Qt,s as Ut,t as Ht,v as M,w as ce,g as xe,x as ge,y as Jt,z as Xt,A as ye,B as de,C as we,D as Yt,G as Zt}from"./header-tab-button-B6jIYo3h.js";import"./AlertCircle-Bqe9viNc.js";import"./SwitchHorizontal01-CTqaEL16.js";import"./RefreshCcw01-AFHENUb2.js";import"./XCircle-DXxtO-hk.js";import"./ArrowUpRight-DSJTBxm2.js";import"./ZapSquare-RS_iGKj9.js";import"./Users03-VgU2nGrS.js";import"./CheckCircle-BX_gETYO.js";import"./Check-BnJpSMJo.js";import"./ChevronLeft-DFMCd-a0.js";import"./ChevronUp-CFAV8eH4.js";import"./DotsVertical-MvF5BRo4.js";import"./Container-BxiofVLO.js";import"./Eye-C2_wkHsS.js";import"./Globe01-7yTOqooU.js";import"./FilterLines-zpFRWfW1.js";import"./Star01-D08HvSzg.js";import"./Palette-C0YKHo-H.js";import"./HardDrive-BqhrNwPc.js";import"./Stars02-j2QyerFd.js";import"./Key01-CZ1WE5u9.js";import"./LayoutLeft-CkKuDYxX.js";import"./LinkExternal01-Bv1R0txp.js";import"./Monitor01-CjEFZhoQ.js";import"./Sun-BCMNGCUL.js";import"./Play-Bnk3nlrR.js";import"./Plus-bJ4eCWMb.js";import"./SearchMd-P44Pa_Ws.js";import"./Settings02-CjUx5kgh.js";import"./Shield01-AMtJFXTs.js";import"./Stars01-BtHUDu3d.js";import"./Trash01-GIxhGpdM.js";import"./Upload01-HJMOrbdA.js";import"./User01-Ba6C8JiT.js";import"./Users01-JA2IEd8Z.js";import"./X-CWOXhugP.js";import"./Zap-gGoaPzAk.js";import"./select-BY9dWtN2.js";import"./tab-id-9JO9-egr.js";import"./use-mcp-client-BKIu0HJG.js";import"./decopilot-sse-pool-DVc5wWE5.js";import"./create-sse-subscription-BS5983N4.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-virtual-mcp-aknX9Mk2.js";import"./use-collections-D0Mhj1aL.js";import"./use-ai-providers-BiBg5CM1.js";import"./use-organization-settings-BjiafnfB.js";import"./avatar-Dfbf1Fnl.js";import"./required-auth-layout-GCCMKqzE.js";import"./useRouterState-C0h4Q9bW.js";import"./use-org-sso-ZUPasYDO.js";import"./agent-capabilities-B2p6Iq1c.js";import"./pair-D81m9l4c.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-KGjJlCff.js";import"./file-type-icon-OHIV6XfY.js";import"./content-blocks-o63cs2vh.js";import"./types-DttTrJQW.js";import"./integration-icon-BM7kbpro.js";import"./use-navigate-to-agent-Ce7HkwaN.js";import"./use-connection-Bj9rnrdo.js";import"./use-mcp-prompts-g6zS7_Ms.js";import"./form-DnC3aZLe.js";import"./label-y0QhV7ts.js";import"./spinner-Btb8jTA0.js";import"./drawer-xRy0PfXv.js";import"./collection-search-Bgc7wDNW.js";import"./tabs-BI9x307Z.js";import"./toggle-group-CJaT_Vnh.js";import"./connect-desktop-dialog-CIUi-8P6.js";import"./agent-icons-DoaIG1Og.js";import"./checkbox-DN2qTA4b.js";import"./skeleton-CFjcOYm0.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DXGZWaeI.js";import"./card-D1lqBJ4_.js";import"./popover-ClBabfjo.js";import"./command-DQohn3xq.js";import"./index-CBRCa04d.js";import"./useInfiniteQuery-BbB0NaH6.js";import"./infiniteQueryObserver-C2JPBb8M.js";import"./sortable.esm-DG614r2i.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DbfCQCjU.js";import"./use-registry-connections-BW4fbNrw.js";import"./extract-connection-data-CW-yl44E.js";import"./generate-id-BeS6ETIJ.js";import"./collections-BhVZMUxl.js";import"./collection-tabs-W1wumDmu.js";import"./badge-DmYlNLqB.js";import"./textarea-BsPxrCug.js";import"./connection-form-helpers-ByQWXd9g.js";import"./use-infinite-scroll-CJ7jIcHc.js";import"./useSuspenseInfiniteQuery-DmwdwiHd.js";import"./index-m5HVp-zM.js";import"./dropdown-menu-41clH4_2.js";import"./question-004-sINsf4GQ.js";import"./sidebar-PzlYMcQE.js";import"./sheet-CB7vtAPo.js";import"./use-status-sounds-Cq5xnCap.js";import"./empty-state-Byo8XhHL.js";import"./toolbar-CbvmZJ4C.js";import"./resizable-0IcT3C2W.js";import"./use-mcp-tools-CxpOcIgL.js";import"./use-capability-AcV6adZX.js";import"./user-R8lbEkl7.js";import"./tools-list-Cm3GXtuv.js";import"./switch-g6aqZqU3.js";import"./use-debounced-autosave-DDVm7mBb.js";import"./index-D78ayl48.js";import"./search-input-Bj5q8eRS.js";import"./use-secrets-Dh3xnwwI.js";import"./github-repo-picker-eEjdCzr6.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-BGZU3zsj.js";import"./view-mode-toggle-BUn6mIJL.js";import"./select-model-BlM2XcDg.js";import"./use-automations-e3JyM0ax.js";import"./monaco-editor-BDrxLbvA.js";import"./automation-runs-BbrT_sbh.js";import"./table-D2cg-KVI.js";import"./use-members-BudVf6Ne.js";import"./use-org-auth-client-zsZCCnQZ.js";import"./task-status-BZSQv5kk.js";import"./automation-list-row-C75G9IZd.js";import"./use-create-virtual-mcp-eQDp981K.js";import"./index-BsnDDKqQ.js";import"./hover-card-CmFc_zSW.js";const _t={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function en(y){const e=Ke.c(51),{open:c,mode:K,initialName:X,parentLabel:Q,isPending:A,onSubmit:V,onOpenChange:P}=y,W=X===void 0?"":X,o=A===void 0?!1:A,[p,R]=l.useState(W),[I,B]=l.useState(c),f=_t[K];c!==I&&(B(c),c&&R(W));let F;e[0]!==o||e[1]!==P?(F=E=>{!E&&!o&&P(!1)},e[0]=o,e[1]=P,e[2]=F):F=e[2];const U=F;let G;e[3]!==o||e[4]!==p||e[5]!==V?(G=async E=>{E.preventDefault();const z=p.trim();!z||o||await V(z)},e[3]=o,e[4]=p,e[5]=V,e[6]=G):G=e[6];const q=G;let L;e[7]!==f.title?(L=i.jsx($t,{children:f.title}),e[7]=f.title,e[8]=L):L=e[8];let N;e[9]!==f.description?(N=i.jsx(Rt,{children:f.description}),e[9]=f.description,e[10]=N):N=e[10];let O;e[11]!==L||e[12]!==N?(O=i.jsxs(Ot,{children:[L,N]}),e[11]=L,e[12]=N,e[13]=O):O=e[13];let S;e[14]!==Q?(S=Q&&i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),i.jsx(We,{value:Q,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=Q,e[15]=S):S=e[15];let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=D):D=e[16];let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=E=>R(E.target.value),e[17]=j):j=e[17];let b;e[18]!==f.placeholder||e[19]!==o||e[20]!==p?(b=i.jsxs("div",{className:"space-y-1.5",children:[D,i.jsx(We,{id:"file-explorer-name",value:p,onChange:j,placeholder:f.placeholder,autoFocus:!0,disabled:o})]}),e[18]=f.placeholder,e[19]=o,e[20]=p,e[21]=b):b=e[21];let h;e[22]!==b||e[23]!==S?(h=i.jsxs("div",{className:"space-y-4 py-4",children:[S,b]}),e[22]=b,e[23]=S,e[24]=h):h=e[24];let x;e[25]!==P?(x=()=>P(!1),e[25]=P,e[26]=x):x=e[26];let v;e[27]!==o||e[28]!==x?(v=i.jsx(fe,{type:"button",variant:"outline",onClick:x,disabled:o,children:"Cancel"}),e[27]=o,e[28]=x,e[29]=v):v=e[29];let C;e[30]!==o||e[31]!==p?(C=!p.trim()||o,e[30]=o,e[31]=p,e[32]=C):C=e[32];let u;e[33]!==f.submit||e[34]!==o?(u=o?i.jsxs(i.Fragment,{children:[i.jsx(re,{size:14,className:"animate-spin"}),"Saving…"]}):f.submit,e[33]=f.submit,e[34]=o,e[35]=u):u=e[35];let k;e[36]!==C||e[37]!==u?(k=i.jsx(fe,{type:"submit",disabled:C,children:u}),e[36]=C,e[37]=u,e[38]=k):k=e[38];let m;e[39]!==v||e[40]!==k?(m=i.jsxs(zt,{children:[v,k]}),e[39]=v,e[40]=k,e[41]=m):m=e[41];let g;e[42]!==q||e[43]!==h||e[44]!==m||e[45]!==O?(g=i.jsx(At,{className:"sm:max-w-md",children:i.jsxs("form",{onSubmit:q,children:[O,h,m]})}),e[42]=q,e[43]=h,e[44]=m,e[45]=O,e[46]=g):g=e[46];let T;return e[47]!==U||e[48]!==c||e[49]!==g?(T=i.jsx(Wt,{open:c,onOpenChange:U,children:g}),e[47]=U,e[48]=c,e[49]=g,e[50]=T):T=e[50],T}const tn="#d9a441";function nn(y){const e=Ke.c(45),{node:c,depth:K,isExpanded:X,isSelected:Q,isLoading:A,fileVisual:V,onOpen:P,onSelect:W,onNewFile:o,onNewFolder:p,onCopyPath:R,onCopyRelativePath:I,onRename:B,onDelete:f}=y,F=A===void 0?!1:A,U=c.kind==="directory",{Icon:G,color:q}=V,L=Q&&"bg-accent";let N;e[0]!==L?(N=Ve("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",L),e[0]=L,e[1]=N):N=e[1];const O=`${K*14+8}px`;let S;e[2]!==O?(S={paddingLeft:O},e[2]=O,e[3]=S):S=e[3];let D;e[4]!==P||e[5]!==W?(D=()=>{W(),P()},e[4]=P,e[5]=W,e[6]=D):D=e[6];let j;e[7]!==G||e[8]!==q||e[9]!==U||e[10]!==X||e[11]!==F?(j=U?i.jsxs(i.Fragment,{children:[F?i.jsx(re,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):X?i.jsx(Vt,{size:14,className:"shrink-0 text-muted-foreground"}):i.jsx(Bt,{size:14,className:"shrink-0 text-muted-foreground"}),i.jsx(Gt,{size:16,className:"shrink-0",style:{color:tn}})]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"w-3.5 shrink-0"}),i.jsx(G,{size:16,className:"shrink-0",style:{color:q}})]}),e[7]=G,e[8]=q,e[9]=U,e[10]=X,e[11]=F,e[12]=j):j=e[12];let b;e[13]!==c.name?(b=i.jsx("span",{className:"truncate",children:c.name}),e[13]=c.name,e[14]=b):b=e[14];let h;e[15]!==N||e[16]!==S||e[17]!==D||e[18]!==j||e[19]!==b?(h=i.jsx(It,{asChild:!0,children:i.jsxs("button",{type:"button",className:N,style:S,onClick:D,children:[j,b]})}),e[15]=N,e[16]=S,e[17]=D,e[18]=j,e[19]=b,e[20]=h):h=e[20];let x;e[21]!==o?(x=i.jsx(_,{onSelect:o,children:"New File"}),e[21]=o,e[22]=x):x=e[22];let v;e[23]!==p?(v=i.jsx(_,{onSelect:p,children:"New Folder"}),e[23]=p,e[24]=v):v=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(Ie,{}),e[25]=C):C=e[25];let u;e[26]!==R?(u=i.jsx(_,{onSelect:R,children:"Copy Path"}),e[26]=R,e[27]=u):u=e[27];let k;e[28]!==I?(k=i.jsx(_,{onSelect:I,children:"Copy Relative Path"}),e[28]=I,e[29]=k):k=e[29];let m;e[30]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ie,{}),e[30]=m):m=e[30];let g;e[31]!==B?(g=i.jsx(_,{onSelect:B,children:"Rename"}),e[31]=B,e[32]=g):g=e[32];let T;e[33]!==f?(T=i.jsx(_,{variant:"destructive",onSelect:f,children:"Delete"}),e[33]=f,e[34]=T):T=e[34];let E;e[35]!==x||e[36]!==v||e[37]!==u||e[38]!==k||e[39]!==g||e[40]!==T?(E=i.jsxs(Mt,{className:"w-52",children:[x,v,C,u,k,m,g,T]}),e[35]=x,e[36]=v,e[37]=u,e[38]=k,e[39]=g,e[40]=T,e[41]=E):E=e[41];let z;return e[42]!==E||e[43]!==h?(z=i.jsxs(Kt,{children:[h,E]}),e[42]=E,e[43]=h,e[44]=z):z=e[44],z}pt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function je(y,e,c,K){return`/api/${y}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(c)}/${K}`}function rn(y){const e=M(y);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const sn="#94a3b8";function on(y){const e=y.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ae,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ae,color:"#d9a441"}:e.endsWith(".json")?{Icon:yt,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ae,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ae,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:wt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:$e,color:"#64748b"}:{Icon:$e,color:sn}}function Qi({orgSlug:y,virtualMcpId:e,branch:c,openPath:K}){const[X,Q]=l.useState({files:[],directories:[],truncated:!1}),{files:A,directories:V}=X,[P,W]=l.useState(new Set),[o,p]=l.useState(null),[R,I]=l.useState(null),[B,f]=l.useState([]),[F,U]=l.useState(""),[G,q]=l.useState(!1),[L,N]=l.useState(!1),[,O]=l.useState(new Set),[S,D]=l.useState(new Set),j=l.useRef(0),b=l.useRef(null),h=l.useRef(new Set),x=l.useRef(new Map);function v(t){O(n=>{const r=typeof t=="function"?t(n):t;return h.current=r,r})}const[C,u]=l.useState(new Map),k=l.useRef(null),[m,g]=l.useState(null),{sendMessage:T}=Et(),{setChatOpen:E}=Pt(),z=ut(),[w,H]=l.useState(null),[J,ue]=l.useState(null),[ee,ie]=l.useState(!1);async function te(t,n){const r=await fetch(je(y,e,c,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const s=await r.json().catch(()=>({}));throw new Error(s.error??`Request failed (${r.status})`)}return r.json()}async function se(){z.invalidateQueries({queryKey:Ae(y,e,c)})}function be(t,n){navigator.clipboard.writeText(n).then(()=>$.success(`${t} copied`),()=>$.error(`Failed to copy ${t.toLowerCase()}`))}function Be(t){const n=Yt(t);if(!n)return;const r=`${y}/${e}/${c}`;z.setQueryData(Te.decofile(r),s=>{if(!s)return s;const{[n]:a,...d}=s;return d}),z.invalidateQueries({queryKey:Te.liveMeta(r)})}function Ge(t){const n=t.kind==="file"?[t.path]:A.filter(r=>r.startsWith(".deco/blocks/")).map(r=>ce(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)Be(r)}function qe(t){const n=ce(t);return B.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const s=C.get(r);return!!(s?.loaded&&s.editorValue!==s.savedContent)})}function ve(t){f(n=>n.map(r=>t(r)).filter(r=>r!==null)),p(n=>n&&t(n)),u(n=>{const r=new Map;for(const[s,a]of n){const d=t(s);d&&r.set(d,a)}return r}),I(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function Qe(t){const n=ce(t);I(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),ve(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function Ue(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);await te("write",{path:M(n),content:""}),await ne(),await se(),H(null),me(n)}async function He(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);const r=M(n);await te("mkdir",{path:r}),Q(s=>({...s,directories:s.directories.includes(r)?s.directories:[...s.directories,r]})),await ne(),await se(),H(null),W(s=>{const a=new Set(s);for(const d of he(n))a.add(d);return a.add(n),a}),I({name:t,path:n,kind:"directory",children:[]})}async function Je(t){if(!w)return;const n=w.node.path,r=ye(n),s=de(r,t);if(s===n){H(null);return}if(we(s,A,V))throw new Error(`"${t}" already exists`);await te("rename",{from:M(n),to:M(s)}),ve(a=>a===n?s:a.startsWith(`${n}/`)?de(s,a.slice(n.length+1)):a),await ne(),await se(),H(null)}async function Xe(t){ie(!0);try{await te("unlink",{path:M(t.path),recursive:t.kind==="directory"}),Ge(t),Qe(t.path),await ne(),await se(),ue(null),$.success(`Deleted "${t.name}"`)}catch(n){$.error(n instanceof Error?n.message:"Delete failed")}finally{ie(!1)}}async function Ye(t){const n=Xt(t);if(n){$.error(n);return}ie(!0);try{w?.mode==="new-file"?(await Ue(t),$.success(`Created "${t}"`)):w?.mode==="new-folder"?(await He(t),$.success(`Created folder "${t}"`)):w?.mode==="rename"&&(await Je(t),$.success(`Renamed to "${t}"`))}catch(r){$.error(r instanceof Error?r.message:"Operation failed")}finally{ie(!1)}}const Ce=l.useRef(!1);Ce.current||(Ce.current=!0,b.current=ne());const[Ze,_e]=l.useState(null);if(K&&K!==Ze){_e(K);const t=K;queueMicrotask(()=>{rn(t)&&me(t).catch(n=>{$.error(n instanceof Error?n.message:"Failed to open file")})})}async function Ne(t){const n=await te("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Se(t,n,r){if(r!==j.current)return!1;let s=!1;return Q(a=>{const d=n?Zt(a.files,a.directories,t,a.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return s=!!d.truncated,{files:d.files,directories:d.directories,truncated:s}}),s&&$.warning("File list truncated — some files may be hidden"),s}async function et(t){const n=x.current.get(t);if(n)return n;const r=j.current,s=(async()=>{const a=await Ne({pattern:"**/*",path:M(t),limit:Me}),d=Se(a,!0,r);return!d&&r===j.current&&v(Y=>{const oe=new Set(Y);return oe.add(t),oe}),d})();x.current.set(t,s);try{return await s}finally{x.current.delete(t)}}async function De(t){if(!ge(t,h.current))return!1;D(n=>new Set(n).add(t));try{return await et(t)}finally{D(n=>{const r=new Set(n);return r.delete(t),r})}}async function tt(t){const n=new Set(h.current);for(const r of he(t)){if(!ge(r,n))continue;if(await De(r))throw new Error("Folder listing truncated — expand again to load more");n.add(r)}}async function ne(){const t=++j.current;x.current.clear(),q(!0),v(new Set),W(new Set),D(new Set);try{const n=await Ne({pattern:"**/*",limit:Me,maxDepth:qt});Se(n,!1,t),N(!0)}catch{L&&$.error("Failed to refresh file tree")}finally{q(!1)}}async function ke(t){if(!C.get(t)?.loaded){u(r=>{const s=new Map(r);return s.set(t,{savedContent:"",editorValue:"",loaded:!1}),s});try{const r=await fetch(je(y,e,c,"read"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),full:!0})});if(!r.ok)return;const s=await r.json(),a=Jt(s.content??"");u(d=>{const Y=new Map(d);return Y.set(t,{savedContent:a,editorValue:a,loaded:!0}),Y})}catch{}}}async function nt(t,n){try{const r=await fetch(je(y,e,c,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),content:n})});if(!r.ok){le("file save failed",{path:t,status:r.status});return}le("file saved via sandbox /write",{path:t}),z.invalidateQueries({queryKey:Ae(y,e,c)});try{const s=await Tt(y,e,c);le("git status after save",s)}catch(s){le("git status after save failed",{path:t,error:s instanceof Error?s.message:String(s)})}u(s=>{const a=new Map(s),d=a.get(t);return d&&a.set(t,{...d,savedContent:n}),a})}catch{}}function rt(t){p(t),I({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),g(null),B.includes(t)||f(n=>[...n,t]),ke(t)}function it(t){f(n=>{const r=n.filter(s=>s!==t);return o===t&&p(r[r.length-1]??null),r}),u(n=>{const r=new Map(n);return r.delete(t),r})}function Fe(t){W(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function st(t){if(ge(t,h.current))try{if(await De(t))return}catch(n){$.error(n instanceof Error?n.message:"Failed to load folder");return}Fe(t)}async function ot(t,n){if(n){Fe(t);return}await st(t)}async function me(t){await b.current,await tt(t);const n=he(t);W(r=>{const s=new Set(r);for(const a of n)s.add(a);return s}),rt(t)}function at(){return R?.kind==="directory"?R.path:R?.kind==="file"?ye(R.path):o?ye(o):"/"}function Le(t){const n=at();H({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const lt=Qt(A,V),Ee=Ut(lt,P),Pe=F?Ee.filter(t=>t.node.name.toLowerCase().includes(F.toLowerCase())):Ee,Z=o?C.get(o):null,ct=Z?.loaded&&Z.editorValue!==Z.savedContent,pe=J?qe(J.path):[],dt=(t,n)=>{k.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await nt(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),s=t.getModel();if(!r||!s||!o)return;const a=s.getValueInRange(r);g({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:a})})};function ft(t){if(!m)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${m.filePath}\``,`**Lines:** ${m.lineStart}–${m.lineEnd}`];if(m.selectedCode){const r=xe(m.filePath),s=m.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,s,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),E(!0),T({parts:[{type:"text",text:n.join(`
|
|
1
|
+
import{e as Ke,r as l,j as i,l as re,B as fe,c as Ve,G as ut,o as $,K as Te}from"./index-CiRQNPVt.js";import{F as mt,l as pt}from"./index-f0X8ef8k.js";import{Z as ht,aq as xt,ar as gt,as as ae,at as yt,G as $e}from"./agent-icon-DAPplz1A.js";import{a as wt}from"./Tool01-R6WyaXsu.js";import{s as jt}from"./XClose-Da5LgJSi.js";import{S as bt}from"./scroll-area-verb-Y8E.js";import{b as Re,T as Oe,a as ze}from"./tooltip-C47QSg8i.js";import{A as vt,a as Ct,b as Nt,c as St,d as Dt,e as kt,f as Ft,g as Lt}from"./alert-dialog-Q8M8ngFf.js";import{a as Et}from"./chat-context-BFmJRDzy.js";import{u as Pt}from"./shell-layout-3b4NfWya.js";import{a7 as le,a8 as Ae,a9 as Tt}from"./index-DkWynf6r.js";import{c as $t,e as Rt,b as Ot,d as zt,a as At,D as Wt}from"./dialog-Cwf6uY_y.js";import{I as We}from"./input-D3E6n6la.js";import{C as It,c as _,d as Ie,e as Mt,f as Kt}from"./shell-route-loading-DSfyT3dO.js";import{t as Vt}from"./ChevronDown--2U1gfXf.js";import{i as Bt}from"./ChevronRight-BVEygGVH.js";import{a as Gt}from"./ZoomOut-CaG3Pd1Z.js";import{E as qt,p as Me,q as he,r as Qt,s as Ut,t as Ht,v as M,w as ce,g as xe,x as ge,y as Jt,z as Xt,A as ye,B as de,C as we,D as Yt,G as Zt}from"./header-tab-button-t5WNjrVG.js";import"./AlertCircle-BDfUS-lh.js";import"./SwitchHorizontal01-BI_yHGXL.js";import"./RefreshCcw01-Dncu-kYd.js";import"./XCircle-D_3MYOn4.js";import"./ArrowUpRight-8daK_Mrm.js";import"./ZapSquare-CP91cLS8.js";import"./Users03-Bek4Ag3W.js";import"./CheckCircle-B_rVd_l8.js";import"./Check-C9-fsV6-.js";import"./ChevronLeft-TttN4toV.js";import"./ChevronUp-C-xaVM7d.js";import"./DotsVertical-Q3F6UWC_.js";import"./Container-Bso4WS0x.js";import"./Eye-CKz6zS_m.js";import"./Globe01-iupU5eqh.js";import"./FilterLines-SKQT-eWL.js";import"./Star01-CN33xE6w.js";import"./Palette-CS36Icvl.js";import"./HardDrive-DpuvbJvr.js";import"./Stars02-B4CoQ82E.js";import"./Key01-6eW9IRFT.js";import"./LayoutLeft-BkxKKkMX.js";import"./LinkExternal01-BXhdtlT7.js";import"./Monitor01-DUICZH5i.js";import"./Sun-CEzPQTAJ.js";import"./Play-CbbqvWPd.js";import"./Plus-CSNkL1o7.js";import"./SearchMd-B-q2EsGW.js";import"./Settings02-CdJ0CKrL.js";import"./Shield01-Crgp73nV.js";import"./Stars01-BXO9Nc4-.js";import"./Trash01-C3pnsiws.js";import"./Upload01-BHsRhr7X.js";import"./User01-JuGE_kA7.js";import"./Users01-BVUwP6xk.js";import"./X-BdwzFded.js";import"./Zap-DHBAOmqP.js";import"./select-BMX9jvQG.js";import"./tab-id-C7unjelb.js";import"./use-mcp-client-D0A6RZFw.js";import"./decopilot-sse-pool-BHhoQKaF.js";import"./create-sse-subscription-BS5983N4.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-virtual-mcp-DciRKx1X.js";import"./use-collections-B1Mg9Y32.js";import"./use-ai-providers-Bwbur0GT.js";import"./use-organization-settings-PADdytdf.js";import"./avatar-BqNGZrFg.js";import"./required-auth-layout-BE5eceMw.js";import"./useRouterState-BXwm4DCl.js";import"./use-org-sso-nq4qWMpD.js";import"./agent-capabilities-gx2lqG9R.js";import"./pair-CpEuUIpQ.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B_uLjrw6.js";import"./file-type-icon-7TqtrpuQ.js";import"./content-blocks-o63cs2vh.js";import"./types-Df_Z2FUK.js";import"./integration-icon-vaGvNHHz.js";import"./use-navigate-to-agent-Drh7z3D_.js";import"./use-connection-DpxWBF4Y.js";import"./use-mcp-prompts-BuV5LRNr.js";import"./form-Bbpyf2N_.js";import"./label-DLUhXNk7.js";import"./spinner-_hqWpG0c.js";import"./drawer-CF0b7Dg3.js";import"./collection-search-CDLcWLfd.js";import"./tabs-DVd_y6YL.js";import"./toggle-group-vA7ktrP-.js";import"./connect-desktop-dialog-CDUh5Otr.js";import"./agent-icons-Dk-aO0GI.js";import"./checkbox-CBmcFqoh.js";import"./skeleton-dQOYuNlQ.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CQW36fJV.js";import"./card-D41ULrnf.js";import"./popover-C1MgHMHU.js";import"./command-B8qtKAnE.js";import"./index-DJTEqPXf.js";import"./useInfiniteQuery-C1jLiRqA.js";import"./infiniteQueryObserver-BND7fiNU.js";import"./sortable.esm-D7AgS_lX.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CSsbMtfE.js";import"./use-registry-connections-C0VEE_YX.js";import"./extract-connection-data-BKeaLULt.js";import"./generate-id-BHe5yw90.js";import"./collections-BxDJ4z3g.js";import"./collection-tabs-CbZbTMYY.js";import"./badge-BBLSXFe0.js";import"./textarea-D1h5iq3D.js";import"./connection-form-helpers-BonOFyzw.js";import"./use-infinite-scroll-D8iZFAEQ.js";import"./useSuspenseInfiniteQuery-CHLM-3cW.js";import"./index-Co-NpkaC.js";import"./dropdown-menu-UGlYpK18.js";import"./question-004-sINsf4GQ.js";import"./sidebar-BBqRosV0.js";import"./sheet-Utq51ofH.js";import"./use-status-sounds-DR8WA3PU.js";import"./empty-state-CoXt5rYF.js";import"./toolbar-D3G0G9U8.js";import"./resizable-CrMJy22o.js";import"./use-mcp-tools-BTzw-W77.js";import"./use-capability-1uxC8-oZ.js";import"./user-DaO6RYsc.js";import"./tools-list-BL4u8QMN.js";import"./switch-CTAzWsjZ.js";import"./use-debounced-autosave-DDZnxori.js";import"./index-Dci2MWs9.js";import"./search-input-CZKc9XZR.js";import"./use-secrets-DZDUsUGC.js";import"./github-repo-picker-CVG2zsbh.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-JZC0q2Q6.js";import"./view-mode-toggle-B-ZBNJWV.js";import"./select-model-BB2-8k_v.js";import"./use-automations-B9mdkXiu.js";import"./monaco-editor-Bgzj9gt4.js";import"./automation-runs-gdpRnoA6.js";import"./table-BuLHtfTA.js";import"./use-members-DDVaE5yQ.js";import"./use-org-auth-client-BlGBETGB.js";import"./task-status-5oHTrkjV.js";import"./automation-list-row-BRsSmcOA.js";import"./use-create-virtual-mcp-BBxov1Li.js";import"./index-sqqDCA0K.js";import"./hover-card-Azyk5Kxa.js";const _t={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function en(y){const e=Ke.c(51),{open:c,mode:K,initialName:X,parentLabel:Q,isPending:A,onSubmit:V,onOpenChange:P}=y,W=X===void 0?"":X,o=A===void 0?!1:A,[p,R]=l.useState(W),[I,B]=l.useState(c),f=_t[K];c!==I&&(B(c),c&&R(W));let F;e[0]!==o||e[1]!==P?(F=E=>{!E&&!o&&P(!1)},e[0]=o,e[1]=P,e[2]=F):F=e[2];const U=F;let G;e[3]!==o||e[4]!==p||e[5]!==V?(G=async E=>{E.preventDefault();const z=p.trim();!z||o||await V(z)},e[3]=o,e[4]=p,e[5]=V,e[6]=G):G=e[6];const q=G;let L;e[7]!==f.title?(L=i.jsx($t,{children:f.title}),e[7]=f.title,e[8]=L):L=e[8];let N;e[9]!==f.description?(N=i.jsx(Rt,{children:f.description}),e[9]=f.description,e[10]=N):N=e[10];let O;e[11]!==L||e[12]!==N?(O=i.jsxs(Ot,{children:[L,N]}),e[11]=L,e[12]=N,e[13]=O):O=e[13];let S;e[14]!==Q?(S=Q&&i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),i.jsx(We,{value:Q,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=Q,e[15]=S):S=e[15];let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=D):D=e[16];let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=E=>R(E.target.value),e[17]=j):j=e[17];let b;e[18]!==f.placeholder||e[19]!==o||e[20]!==p?(b=i.jsxs("div",{className:"space-y-1.5",children:[D,i.jsx(We,{id:"file-explorer-name",value:p,onChange:j,placeholder:f.placeholder,autoFocus:!0,disabled:o})]}),e[18]=f.placeholder,e[19]=o,e[20]=p,e[21]=b):b=e[21];let h;e[22]!==b||e[23]!==S?(h=i.jsxs("div",{className:"space-y-4 py-4",children:[S,b]}),e[22]=b,e[23]=S,e[24]=h):h=e[24];let x;e[25]!==P?(x=()=>P(!1),e[25]=P,e[26]=x):x=e[26];let v;e[27]!==o||e[28]!==x?(v=i.jsx(fe,{type:"button",variant:"outline",onClick:x,disabled:o,children:"Cancel"}),e[27]=o,e[28]=x,e[29]=v):v=e[29];let C;e[30]!==o||e[31]!==p?(C=!p.trim()||o,e[30]=o,e[31]=p,e[32]=C):C=e[32];let u;e[33]!==f.submit||e[34]!==o?(u=o?i.jsxs(i.Fragment,{children:[i.jsx(re,{size:14,className:"animate-spin"}),"Saving…"]}):f.submit,e[33]=f.submit,e[34]=o,e[35]=u):u=e[35];let k;e[36]!==C||e[37]!==u?(k=i.jsx(fe,{type:"submit",disabled:C,children:u}),e[36]=C,e[37]=u,e[38]=k):k=e[38];let m;e[39]!==v||e[40]!==k?(m=i.jsxs(zt,{children:[v,k]}),e[39]=v,e[40]=k,e[41]=m):m=e[41];let g;e[42]!==q||e[43]!==h||e[44]!==m||e[45]!==O?(g=i.jsx(At,{className:"sm:max-w-md",children:i.jsxs("form",{onSubmit:q,children:[O,h,m]})}),e[42]=q,e[43]=h,e[44]=m,e[45]=O,e[46]=g):g=e[46];let T;return e[47]!==U||e[48]!==c||e[49]!==g?(T=i.jsx(Wt,{open:c,onOpenChange:U,children:g}),e[47]=U,e[48]=c,e[49]=g,e[50]=T):T=e[50],T}const tn="#d9a441";function nn(y){const e=Ke.c(45),{node:c,depth:K,isExpanded:X,isSelected:Q,isLoading:A,fileVisual:V,onOpen:P,onSelect:W,onNewFile:o,onNewFolder:p,onCopyPath:R,onCopyRelativePath:I,onRename:B,onDelete:f}=y,F=A===void 0?!1:A,U=c.kind==="directory",{Icon:G,color:q}=V,L=Q&&"bg-accent";let N;e[0]!==L?(N=Ve("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",L),e[0]=L,e[1]=N):N=e[1];const O=`${K*14+8}px`;let S;e[2]!==O?(S={paddingLeft:O},e[2]=O,e[3]=S):S=e[3];let D;e[4]!==P||e[5]!==W?(D=()=>{W(),P()},e[4]=P,e[5]=W,e[6]=D):D=e[6];let j;e[7]!==G||e[8]!==q||e[9]!==U||e[10]!==X||e[11]!==F?(j=U?i.jsxs(i.Fragment,{children:[F?i.jsx(re,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):X?i.jsx(Vt,{size:14,className:"shrink-0 text-muted-foreground"}):i.jsx(Bt,{size:14,className:"shrink-0 text-muted-foreground"}),i.jsx(Gt,{size:16,className:"shrink-0",style:{color:tn}})]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"w-3.5 shrink-0"}),i.jsx(G,{size:16,className:"shrink-0",style:{color:q}})]}),e[7]=G,e[8]=q,e[9]=U,e[10]=X,e[11]=F,e[12]=j):j=e[12];let b;e[13]!==c.name?(b=i.jsx("span",{className:"truncate",children:c.name}),e[13]=c.name,e[14]=b):b=e[14];let h;e[15]!==N||e[16]!==S||e[17]!==D||e[18]!==j||e[19]!==b?(h=i.jsx(It,{asChild:!0,children:i.jsxs("button",{type:"button",className:N,style:S,onClick:D,children:[j,b]})}),e[15]=N,e[16]=S,e[17]=D,e[18]=j,e[19]=b,e[20]=h):h=e[20];let x;e[21]!==o?(x=i.jsx(_,{onSelect:o,children:"New File"}),e[21]=o,e[22]=x):x=e[22];let v;e[23]!==p?(v=i.jsx(_,{onSelect:p,children:"New Folder"}),e[23]=p,e[24]=v):v=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(Ie,{}),e[25]=C):C=e[25];let u;e[26]!==R?(u=i.jsx(_,{onSelect:R,children:"Copy Path"}),e[26]=R,e[27]=u):u=e[27];let k;e[28]!==I?(k=i.jsx(_,{onSelect:I,children:"Copy Relative Path"}),e[28]=I,e[29]=k):k=e[29];let m;e[30]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ie,{}),e[30]=m):m=e[30];let g;e[31]!==B?(g=i.jsx(_,{onSelect:B,children:"Rename"}),e[31]=B,e[32]=g):g=e[32];let T;e[33]!==f?(T=i.jsx(_,{variant:"destructive",onSelect:f,children:"Delete"}),e[33]=f,e[34]=T):T=e[34];let E;e[35]!==x||e[36]!==v||e[37]!==u||e[38]!==k||e[39]!==g||e[40]!==T?(E=i.jsxs(Mt,{className:"w-52",children:[x,v,C,u,k,m,g,T]}),e[35]=x,e[36]=v,e[37]=u,e[38]=k,e[39]=g,e[40]=T,e[41]=E):E=e[41];let z;return e[42]!==E||e[43]!==h?(z=i.jsxs(Kt,{children:[h,E]}),e[42]=E,e[43]=h,e[44]=z):z=e[44],z}pt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function je(y,e,c,K){return`/api/${y}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(c)}/${K}`}function rn(y){const e=M(y);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const sn="#94a3b8";function on(y){const e=y.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ae,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ae,color:"#d9a441"}:e.endsWith(".json")?{Icon:yt,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ae,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ae,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:wt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:$e,color:"#64748b"}:{Icon:$e,color:sn}}function Qi({orgSlug:y,virtualMcpId:e,branch:c,openPath:K}){const[X,Q]=l.useState({files:[],directories:[],truncated:!1}),{files:A,directories:V}=X,[P,W]=l.useState(new Set),[o,p]=l.useState(null),[R,I]=l.useState(null),[B,f]=l.useState([]),[F,U]=l.useState(""),[G,q]=l.useState(!1),[L,N]=l.useState(!1),[,O]=l.useState(new Set),[S,D]=l.useState(new Set),j=l.useRef(0),b=l.useRef(null),h=l.useRef(new Set),x=l.useRef(new Map);function v(t){O(n=>{const r=typeof t=="function"?t(n):t;return h.current=r,r})}const[C,u]=l.useState(new Map),k=l.useRef(null),[m,g]=l.useState(null),{sendMessage:T}=Et(),{setChatOpen:E}=Pt(),z=ut(),[w,H]=l.useState(null),[J,ue]=l.useState(null),[ee,ie]=l.useState(!1);async function te(t,n){const r=await fetch(je(y,e,c,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const s=await r.json().catch(()=>({}));throw new Error(s.error??`Request failed (${r.status})`)}return r.json()}async function se(){z.invalidateQueries({queryKey:Ae(y,e,c)})}function be(t,n){navigator.clipboard.writeText(n).then(()=>$.success(`${t} copied`),()=>$.error(`Failed to copy ${t.toLowerCase()}`))}function Be(t){const n=Yt(t);if(!n)return;const r=`${y}/${e}/${c}`;z.setQueryData(Te.decofile(r),s=>{if(!s)return s;const{[n]:a,...d}=s;return d}),z.invalidateQueries({queryKey:Te.liveMeta(r)})}function Ge(t){const n=t.kind==="file"?[t.path]:A.filter(r=>r.startsWith(".deco/blocks/")).map(r=>ce(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)Be(r)}function qe(t){const n=ce(t);return B.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const s=C.get(r);return!!(s?.loaded&&s.editorValue!==s.savedContent)})}function ve(t){f(n=>n.map(r=>t(r)).filter(r=>r!==null)),p(n=>n&&t(n)),u(n=>{const r=new Map;for(const[s,a]of n){const d=t(s);d&&r.set(d,a)}return r}),I(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function Qe(t){const n=ce(t);I(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),ve(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function Ue(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);await te("write",{path:M(n),content:""}),await ne(),await se(),H(null),me(n)}async function He(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);const r=M(n);await te("mkdir",{path:r}),Q(s=>({...s,directories:s.directories.includes(r)?s.directories:[...s.directories,r]})),await ne(),await se(),H(null),W(s=>{const a=new Set(s);for(const d of he(n))a.add(d);return a.add(n),a}),I({name:t,path:n,kind:"directory",children:[]})}async function Je(t){if(!w)return;const n=w.node.path,r=ye(n),s=de(r,t);if(s===n){H(null);return}if(we(s,A,V))throw new Error(`"${t}" already exists`);await te("rename",{from:M(n),to:M(s)}),ve(a=>a===n?s:a.startsWith(`${n}/`)?de(s,a.slice(n.length+1)):a),await ne(),await se(),H(null)}async function Xe(t){ie(!0);try{await te("unlink",{path:M(t.path),recursive:t.kind==="directory"}),Ge(t),Qe(t.path),await ne(),await se(),ue(null),$.success(`Deleted "${t.name}"`)}catch(n){$.error(n instanceof Error?n.message:"Delete failed")}finally{ie(!1)}}async function Ye(t){const n=Xt(t);if(n){$.error(n);return}ie(!0);try{w?.mode==="new-file"?(await Ue(t),$.success(`Created "${t}"`)):w?.mode==="new-folder"?(await He(t),$.success(`Created folder "${t}"`)):w?.mode==="rename"&&(await Je(t),$.success(`Renamed to "${t}"`))}catch(r){$.error(r instanceof Error?r.message:"Operation failed")}finally{ie(!1)}}const Ce=l.useRef(!1);Ce.current||(Ce.current=!0,b.current=ne());const[Ze,_e]=l.useState(null);if(K&&K!==Ze){_e(K);const t=K;queueMicrotask(()=>{rn(t)&&me(t).catch(n=>{$.error(n instanceof Error?n.message:"Failed to open file")})})}async function Ne(t){const n=await te("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Se(t,n,r){if(r!==j.current)return!1;let s=!1;return Q(a=>{const d=n?Zt(a.files,a.directories,t,a.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return s=!!d.truncated,{files:d.files,directories:d.directories,truncated:s}}),s&&$.warning("File list truncated — some files may be hidden"),s}async function et(t){const n=x.current.get(t);if(n)return n;const r=j.current,s=(async()=>{const a=await Ne({pattern:"**/*",path:M(t),limit:Me}),d=Se(a,!0,r);return!d&&r===j.current&&v(Y=>{const oe=new Set(Y);return oe.add(t),oe}),d})();x.current.set(t,s);try{return await s}finally{x.current.delete(t)}}async function De(t){if(!ge(t,h.current))return!1;D(n=>new Set(n).add(t));try{return await et(t)}finally{D(n=>{const r=new Set(n);return r.delete(t),r})}}async function tt(t){const n=new Set(h.current);for(const r of he(t)){if(!ge(r,n))continue;if(await De(r))throw new Error("Folder listing truncated — expand again to load more");n.add(r)}}async function ne(){const t=++j.current;x.current.clear(),q(!0),v(new Set),W(new Set),D(new Set);try{const n=await Ne({pattern:"**/*",limit:Me,maxDepth:qt});Se(n,!1,t),N(!0)}catch{L&&$.error("Failed to refresh file tree")}finally{q(!1)}}async function ke(t){if(!C.get(t)?.loaded){u(r=>{const s=new Map(r);return s.set(t,{savedContent:"",editorValue:"",loaded:!1}),s});try{const r=await fetch(je(y,e,c,"read"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),full:!0})});if(!r.ok)return;const s=await r.json(),a=Jt(s.content??"");u(d=>{const Y=new Map(d);return Y.set(t,{savedContent:a,editorValue:a,loaded:!0}),Y})}catch{}}}async function nt(t,n){try{const r=await fetch(je(y,e,c,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),content:n})});if(!r.ok){le("file save failed",{path:t,status:r.status});return}le("file saved via sandbox /write",{path:t}),z.invalidateQueries({queryKey:Ae(y,e,c)});try{const s=await Tt(y,e,c);le("git status after save",s)}catch(s){le("git status after save failed",{path:t,error:s instanceof Error?s.message:String(s)})}u(s=>{const a=new Map(s),d=a.get(t);return d&&a.set(t,{...d,savedContent:n}),a})}catch{}}function rt(t){p(t),I({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),g(null),B.includes(t)||f(n=>[...n,t]),ke(t)}function it(t){f(n=>{const r=n.filter(s=>s!==t);return o===t&&p(r[r.length-1]??null),r}),u(n=>{const r=new Map(n);return r.delete(t),r})}function Fe(t){W(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function st(t){if(ge(t,h.current))try{if(await De(t))return}catch(n){$.error(n instanceof Error?n.message:"Failed to load folder");return}Fe(t)}async function ot(t,n){if(n){Fe(t);return}await st(t)}async function me(t){await b.current,await tt(t);const n=he(t);W(r=>{const s=new Set(r);for(const a of n)s.add(a);return s}),rt(t)}function at(){return R?.kind==="directory"?R.path:R?.kind==="file"?ye(R.path):o?ye(o):"/"}function Le(t){const n=at();H({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const lt=Qt(A,V),Ee=Ut(lt,P),Pe=F?Ee.filter(t=>t.node.name.toLowerCase().includes(F.toLowerCase())):Ee,Z=o?C.get(o):null,ct=Z?.loaded&&Z.editorValue!==Z.savedContent,pe=J?qe(J.path):[],dt=(t,n)=>{k.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await nt(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),s=t.getModel();if(!r||!s||!o)return;const a=s.getValueInRange(r);g({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:a})})};function ft(t){if(!m)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${m.filePath}\``,`**Lines:** ${m.lineStart}–${m.lineEnd}`];if(m.selectedCode){const r=xe(m.filePath),s=m.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,s,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),E(!0),T({parts:[{type:"text",text:n.join(`
|
|
2
2
|
`)}]}),g(null)}return G&&!L?i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}):i.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[i.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[i.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[i.jsxs("div",{className:"relative min-w-0 flex-1",children:[i.jsx(ht,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),i.jsx("input",{type:"text",value:F,onChange:t=>U(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),i.jsxs(Re,{children:[i.jsx(Oe,{asChild:!0,children:i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Le("new-file"),children:i.jsx(xt,{size:14})})}),i.jsx(ze,{side:"bottom",children:"New file"})]}),i.jsxs(Re,{children:[i.jsx(Oe,{asChild:!0,children:i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Le("new-folder"),children:i.jsx(gt,{size:14})})}),i.jsx(ze,{side:"bottom",children:"New folder"})]})]}),i.jsx(bt,{className:"flex-1",children:i.jsxs("div",{className:"py-1",children:[Pe.map(t=>{const{node:n,depth:r}=t,s=n.kind==="directory",a=P.has(n.path),d=R?.path===n.path,Y=Ht(n.path,n.kind),oe=s&&S.has(n.path);return i.jsx(nn,{node:n,depth:r,isExpanded:a,isSelected:d,isLoading:oe,fileVisual:on(n.name),onSelect:()=>I(n),onOpen:()=>{s?ot(n.path,a):me(n.path)},onNewFile:()=>H({mode:"new-file",node:n,parentDir:Y}),onNewFolder:()=>H({mode:"new-folder",node:n,parentDir:Y}),onCopyPath:()=>be("Path",ce(n.path)),onCopyRelativePath:()=>be("Relative path",M(n.path)),onRename:()=>H({mode:"rename",node:n,parentDir:Y}),onDelete:()=>ue(n)},n.path)}),L&&Pe.length===0&&i.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:F?`No files match "${F}"`:"No files found"})]})})]}),i.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[B.length>0&&i.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:B.map(t=>{const n=C.get(t),r=n?.loaded&&n.editorValue!==n.savedContent,s=o===t,a=t.split("/").pop()??t;return i.jsxs("div",{className:Ve("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",s?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{p(t),ke(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":s,children:[i.jsx("span",{className:"truncate max-w-32",children:a}),r&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),i.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:d=>{d.stopPropagation(),it(t)},children:i.jsx(jt,{size:12})})]},t)})}),m&&i.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:i.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const r=t.currentTarget.elements.namedItem("askAiInput");r.value.trim()&&ft(r.value)},children:[i.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&g(null)}}),i.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:i.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[i.jsx("title",{children:"Send"}),i.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),i.jsx("div",{className:"flex-1 overflow-hidden",children:o&&Z?.loaded?i.jsx(mt,{language:xe(o),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:Z.editorValue,path:o,onChange:t=>{const n=o;n&&u(r=>{const s=new Map(r),a=s.get(n);return a&&s.set(n,{...a,editorValue:t??""}),s})},onMount:dt,loading:i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},o):o&&!Z?.loaded?i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}):i.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),o&&i.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[i.jsx("span",{className:"truncate",children:o}),i.jsxs("span",{children:[ct?"Modified":"Saved"," ·"," ",xe(o)]})]})]}),i.jsx(en,{open:w!==null,mode:w?.mode??"new-file",initialName:w?.mode==="rename"?w.node.name:"",parentLabel:w&&w.mode!=="rename"?w.parentDir==="/"?"/":M(w.parentDir):void 0,isPending:ee,onSubmit:Ye,onOpenChange:t=>{!t&&!ee&&H(null)}}),i.jsx(vt,{open:J!==null,onOpenChange:t=>{!t&&!ee&&ue(null)},children:i.jsxs(Ct,{children:[i.jsxs(Nt,{children:[i.jsxs(St,{children:["Delete ",J?.kind==="directory"?"folder":"file","?"]}),i.jsxs(Dt,{children:["This will permanently delete"," ",i.jsx("span",{className:"font-mono",children:J?.name}),J?.kind==="directory"?" and everything inside it.":".",pe.length>0&&i.jsxs(i.Fragment,{children:[" ",pe.length===1?"One open file has unsaved changes that will be lost.":`${pe.length} open files have unsaved changes that will be lost.`]})]})]}),i.jsxs(kt,{children:[i.jsx(Ft,{disabled:ee,children:"Cancel"}),i.jsx(Lt,{disabled:ee||!J,onClick:t=>{t.preventDefault(),J&&Xe(J)},children:"Delete"})]})]})})]})}export{Qi as FileExplorer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bC as zl,j as $,b5 as st,bD as zn,r as ut,bE as p0,c as f0,e as Tt,B as Hb}from"./index-
|
|
1
|
+
import{bC as zl,j as $,b5 as st,bD as zn,r as ut,bE as p0,c as f0,e as Tt,B as Hb}from"./index-CiRQNPVt.js";import{i as qb}from"./Check-C9-fsV6-.js";import{a as Gb}from"./Eye-CKz6zS_m.js";import{D as g0,g as m0,h as h0,c as b0}from"./dialog-Cwf6uY_y.js";import{n as E0}from"./Globe01-iupU5eqh.js";import{g as T0,n as S0}from"./ZoomOut-CaG3Pd1Z.js";function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=jl();function $b(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},y0=/^(?:[ \t]*(?:\n|$))+/,A0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_n=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,I0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,zb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,jb=le(zb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),k0=le(zb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,R0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,N0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),C0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vl).getRegex(),er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,v0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kl).replace("tag",er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Vb=le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),w0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Vb).getRegex(),Xl={blockquote:w0,code:A0,def:N0,fences:_0,heading:I0,hr:_n,html:v0,lheading:jb,list:C0,newline:y0,paragraph:Vb,table:ln,text:R0},Dc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),x0={...Xl,lheading:k0,table:Dc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex()},O0={...Xl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Yl).replace("hr",_n).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",jb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},L0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,D0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Yb=/^( {2,}|\\)\n(?!\s*$)/,M0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tr=/[\p{P}\p{S}]/u,Zl=/[\s\p{P}\p{S}]/u,Wb=/[^\s\p{P}\p{S}]/u,P0=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zl).getRegex(),Kb=/(?!~)[\p{P}\p{S}]/u,F0=/(?!~)[\s\p{P}\p{S}]/u,B0=/(?:[^\s\p{P}\p{S}]|~)/u,U0=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Xb=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,H0=le(Xb,"u").replace(/punct/g,tr).getRegex(),q0=le(Xb,"u").replace(/punct/g,Kb).getRegex(),Zb="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",G0=le(Zb,"gu").replace(/notPunctSpace/g,Wb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),$0=le(Zb,"gu").replace(/notPunctSpace/g,B0).replace(/punctSpace/g,F0).replace(/punct/g,Kb).getRegex(),z0=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Wb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),j0=le(/\\(punct)/,"gu").replace(/punct/g,tr).getRegex(),V0=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Y0=le(Kl).replace("(?:-->|$)","-->").getRegex(),W0=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Y0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jn=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,K0=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",jn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qb=le(/^!?\[(label)\]\[(ref)\]/).replace("label",jn).replace("ref",Wl).getRegex(),Jb=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wl).getRegex(),X0=le("reflink|nolink(?!\\()","g").replace("reflink",Qb).replace("nolink",Jb).getRegex(),Ql={_backpedal:ln,anyPunctuation:j0,autolink:V0,blockSkip:U0,br:Yb,code:D0,del:ln,emStrongLDelim:H0,emStrongRDelimAst:G0,emStrongRDelimUnd:z0,escape:L0,link:K0,nolink:Jb,punctuation:P0,reflink:Qb,reflinkSearch:X0,tag:W0,text:M0,url:ln},Z0={...Ql,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",jn).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jn).getRegex()},_l={...Ql,emStrongRDelimAst:$0,emStrongLDelim:q0,url:le(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Q0={..._l,br:le(Yb).replace("{2,}","*").getRegex(),text:le(_l.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xn={normal:Xl,gfm:x0,pedantic:O0},Jt={normal:Ql,gfm:_l,breaks:Q0,pedantic:Z0},J0={"&":"&","<":"<",">":">",'"':""","'":"'"},Mc=e=>J0[e];function Ze(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,Mc)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,Mc);return e}function Pc(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function Fc(e,t){const n=e.replace(xe.findPipe,(i,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),r=n.split(xe.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(xe.slashPipe,"|");return r}function en(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function eS(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Bc(e,t,n,r,a){const i=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,u}function tS(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
|
|
3
3
|
`).map(i=>{const o=i.match(n.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=a.length?i.slice(a.length):i}).join(`
|
|
4
4
|
`)}var Vn=class{options;rules;lexer;constructor(e){this.options=e||Nt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:en(n,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,g as o,j as i,N as l}from"./index-
|
|
1
|
+
import{e as a,g as o,j as i,N as l}from"./index-CiRQNPVt.js";function m(){const e=a.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{org:r}=o(t);let s;return e[1]!==r?(s=i.jsx(l,{to:"/$org/files",params:{org:r},replace:!0}),e[1]=r,e[2]=s):s=e[2],s}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cD as C,e as f,j as c,D as j,r as d,c as p,bn as b,cE as v,cF as h}from"./index-CiRQNPVt.js";import{L as N}from"./label-DLUhXNk7.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as H,q as V,G as Y,H as Z,I as W,a as M,t as L,o as D,K as q,j as n,D as B,T as J,W as k,e as I,r as T,B as X,L as $,a4 as ee}from"./index-
|
|
1
|
+
import{f as H,q as V,G as Y,H as Z,I as W,a as M,t as L,o as D,K as q,j as n,D as B,T as J,W as k,e as I,r as T,B as X,L as $,a4 as ee}from"./index-CiRQNPVt.js";import{P as E}from"./index-Dci2MWs9.js";import{u as te}from"./use-org-auth-client-BlGBETGB.js";import{u as ne}from"./use-debounced-autosave-DDZnxori.js";import{A as ae}from"./avatar-BqNGZrFg.js";import{I as G}from"./input-D3E6n6la.js";import{S as K,a as U,b as F,c as se}from"./settings-section-CQW36fJV.js";import{D as oe}from"./domain-settings-oLlPZ4Z3.js";import{S as ie,u as re}from"./use-mcp-client-D0A6RZFw.js";import{c as le,b as ce,d as ue,f as de,e as me,g as ge,a as fe,A as pe}from"./alert-dialog-Q8M8ngFf.js";import{R as he}from"./require-capability-vzDtNqMc.js";import"./sidebar-BBqRosV0.js";import"./LayoutLeft-BkxKKkMX.js";import"./tooltip-C47QSg8i.js";import"./sheet-Utq51ofH.js";import"./X-BdwzFded.js";import"./User01-JuGE_kA7.js";import"./card-D41ULrnf.js";import"./ArrowUpRight-8daK_Mrm.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./switch-CTAzWsjZ.js";import"./use-capability-1uxC8-oZ.js";import"./access-gate-AjUY-gkn.js";import"./capability-load-error-CjE005FF.js";const xe=J({name:k().min(1,"Name is required").max(255,"Name is too long"),slug:k().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:k().optional()});function je(e){const t=I.c(13),{value:y,onChange:h,name:o,disabled:m}=e,c=T.useRef(null);let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c.current?.click(),t[0]=u):u=t[0];const i=u;let l;t[1]!==h?(l=j=>{const f=j.target.files?.[0];if(!f)return;if(f.size>2097152){D.error("Image must be smaller than 2MB");return}const p=new FileReader;p.onerror=ye,p.onloadend=()=>{p.result&&h(p.result),c.current&&(c.current.value="")},p.readAsDataURL(f)},t[1]=h,t[2]=l):l=t[2];const a=l;let s;t[3]!==m||t[4]!==a?(s=n.jsx("input",{ref:c,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:m}),t[3]=m,t[4]=a,t[5]=s):s=t[5];const r=y||void 0,d=o??"?";let g;t[6]!==r||t[7]!==d?(g=n.jsx(ae,{url:r,fallback:d,shape:"square",size:"base"}),t[6]=r,t[7]=d,t[8]=g):g=t[8];let x;return t[9]!==m||t[10]!==s||t[11]!==g?(x=n.jsxs("button",{type:"button",onClick:i,disabled:m,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[s,g]}),t[9]=m,t[10]=s,t[11]=g,t[12]=x):x=t[12],x}function ye(){return D.error("Failed to read image")}function ve(){const e=H(),{org:t}=V(),y=te(),h=Y(),o=Z({resolver:W(xe),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),m=M({mutationFn:async a=>{const s={name:a.name,slug:a.slug};a.logo&&(s.logo=a.logo);const r=await y.organization.update({data:s});if(r?.error)throw new Error(r.error.message||"Failed to update organization");return r},onSuccess:(a,s)=>{L("organization_settings_updated",{organization_id:t.id,fields:Object.keys(s)}),h.invalidateQueries({queryKey:q.organizations()}),h.invalidateQueries({queryKey:q.activeOrganization(t.slug)}),D.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,s)=>{L("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(s),error:a instanceof Error?a.message:String(a)}),D.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:c,flush:u}=ne({save:async()=>{const a=o.control._formState.dirtyFields;if(Object.keys(a).length===0||!await o.trigger())return;const r=o.getValues(),d=o.control._defaultValues;o.reset(r,{keepValues:!0});try{await m.mutateAsync(r)}catch{o.reset(d,{keepValues:!0})}}}),i=o.formState.errors,l=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(K,{children:n.jsxs(U,{children:[n.jsx(F,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(je,{value:o.watch("logo"),onChange:a=>{o.setValue("logo",a??"",{shouldDirty:!0}),u()},name:o.watch("name")})}),n.jsx(F,{title:"Name",action:n.jsx(B,{control:o.control,name:"name",render:({field:a})=>n.jsx(G,{id:"org-name",...a,onChange:s=>{a.onChange(s),c()},onBlur:()=>{a.onBlur(),u()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(F,{title:"URL",action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[l&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:l}),n.jsx(B,{control:o.control,name:"slug",render:({field:a})=>n.jsx("input",{id:"org-slug",value:a.value??"",name:a.name,ref:a.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:s=>{const r=s.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");o.setValue("slug",r,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),c()},onBlur:()=>{a.onBlur(),u()}})})]})}),(i.name||i.slug||i.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[i.name&&n.jsx("p",{className:"text-xs text-destructive",children:i.name.message}),i.slug&&n.jsx("p",{className:"text-xs text-destructive",children:i.slug.message}),i.logo&&n.jsx("p",{className:"text-xs text-destructive",children:i.logo.message})]})]})})}function be(){const e=I.c(45),{org:t}=V(),[y,h]=T.useState(!1),[o,m]=T.useState("");let c;e[0]!==t.id||e[1]!==t.slug?(c={connectionId:ie,orgSlug:t.slug,orgId:t.id},e[0]=t.id,e[1]=t.slug,e[2]=c):c=e[2];const u=re(c);let i;e[3]!==t.id||e[4]!==u?(i=async()=>{const v=await u.callTool({name:"ORGANIZATION_DELETE",arguments:{id:t.id}});if(v.isError){const N=v.content,Q=Array.isArray(N)&&N[0]?.type==="text"&&typeof N[0].text=="string"?N[0].text:"Failed to delete organization";throw new Error(Q)}},e[3]=t.id,e[4]=u,e[5]=i):i=e[5];let l;e[6]!==t.id||e[7]!==t.slug?(l=()=>{L("organization_deleted",{organization_id:t.id}),localStorage.getItem($.lastOrgSlug())===t.slug&&localStorage.removeItem($.lastOrgSlug()),ee(),D.success("Organization deleted"),window.location.href="/"},e[6]=t.id,e[7]=t.slug,e[8]=l):l=e[8];let a;e[9]!==i||e[10]!==l?(a={mutationFn:i,onSuccess:l,onError:Se},e[9]=i,e[10]=l,e[11]=a):a=e[11];const s=M(a);let r;e[12]===Symbol.for("react.memo_cache_sentinel")?(r=()=>h(!0),e[12]=r):r=e[12];let d;e[13]!==s.isPending?(d=n.jsx(K,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(U,{className:"border-destructive/40",children:n.jsx(F,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(X,{variant:"destructive",size:"sm",onClick:r,disabled:s.isPending,children:"Delete"})})})}),e[13]=s.isPending,e[14]=d):d=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=v=>{h(v),v||m("")},e[15]=g):g=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(le,{children:"Delete Organization?"}),e[16]=x):x=e[16];let j;e[17]!==t.name?(j=n.jsxs("p",{children:["This will permanently delete all data associated with"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name}),". This action cannot be undone."]}),e[17]=t.name,e[18]=j):j=e[18];let f;e[19]!==t.name?(f=n.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name})," ","to confirm:"]}),e[19]=t.name,e[20]=f):f=e[20];let p;e[21]===Symbol.for("react.memo_cache_sentinel")?(p=v=>m(v.target.value),e[21]=p):p=e[21];let b;e[22]!==o||e[23]!==t.name?(b=n.jsx(G,{value:o,onChange:p,placeholder:t.name,autoFocus:!0}),e[22]=o,e[23]=t.name,e[24]=b):b=e[24];let S;e[25]!==b||e[26]!==j||e[27]!==f?(S=n.jsxs(ce,{children:[x,n.jsx(ue,{asChild:!0,children:n.jsxs("div",{children:[j,f,b]})})]}),e[25]=b,e[26]=j,e[27]=f,e[28]=S):S=e[28];let A;e[29]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(de,{children:"Cancel"}),e[29]=A):A=e[29];let z;e[30]!==s?(z=()=>s.mutate(),e[30]=s,e[31]=z):z=e[31];const P=o!==t.name||s.isPending,R=s.isPending?"Deleting…":"Delete organization";let C;e[32]!==z||e[33]!==P||e[34]!==R?(C=n.jsxs(me,{children:[A,n.jsx(ge,{onClick:z,disabled:P,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:R})]}),e[32]=z,e[33]=P,e[34]=R,e[35]=C):C=e[35];let _;e[36]!==S||e[37]!==C?(_=n.jsxs(fe,{children:[S,C]}),e[36]=S,e[37]=C,e[38]=_):_=e[38];let w;e[39]!==y||e[40]!==_?(w=n.jsx(pe,{open:y,onOpenChange:g,children:_}),e[39]=y,e[40]=_,e[41]=w):w=e[41];let O;return e[42]!==w||e[43]!==d?(O=n.jsxs(n.Fragment,{children:[d,w]}),e[42]=w,e[43]=d,e[44]=O):O=e[44],O}function Se(e){D.error(e instanceof Error?e.message:"Failed to delete organization")}function ze(){const e=I.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(E,{children:n.jsx(E.Content,{children:n.jsx(E.Body,{children:n.jsxs(se,{children:[n.jsx(E.Title,{children:"Organization"}),n.jsx(ve,{}),n.jsx(oe,{}),n.jsx(be,{})]})})})}),e[0]=t):t=e[0],t}function He(){const e=I.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(he,{capability:"org:manage",area:"general settings",children:n.jsx(ze,{})}),e[0]=t):t=e[0],t}export{He as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as a}from"./collections-BxDJ4z3g.js";import{cr as o}from"./index-CiRQNPVt.js";const m=o(a,{target:"draft-7"});let n="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",l=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=n[r[t]&63];return e};function s(t){return`${t}_${l()}`}export{m as B,s as g};
|