decocms 4.83.8 → 4.84.0
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-D1bKy2S7.js → AlertCircle-DLF4X63O.js} +1 -1
- package/dist/client/assets/{AreaChart-C_NcJizC.js → AreaChart-DF6HCadL.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cc7nmwZR.js → ArrowUp-DpC0OL3v.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-kD1crTCL.js → ArrowUpRight-DAqa4GMV.js} +1 -1
- package/dist/client/assets/{CheckCircle-BwSRlYzu.js → CheckCircle-D4R3pCU9.js} +1 -1
- package/dist/client/assets/{ChevronDown-Cgucuz_g.js → ChevronDown-Bok1b6fK.js} +1 -1
- package/dist/client/assets/{ChevronRight-CpX16f-S.js → ChevronRight-COKmdxXp.js} +1 -1
- package/dist/client/assets/{ChevronUp-GfeloKit.js → ChevronUp-BXYPfZy1.js} +1 -1
- package/dist/client/assets/{Copy01-5uxmItmh.js → Copy01-Dhc1Bhgj.js} +1 -1
- package/dist/client/assets/{DotsVertical-C212bOoG.js → DotsVertical-D85MCx71.js} +1 -1
- package/dist/client/assets/{Eye-DqzmD1kb.js → Eye-BVzIJRcU.js} +1 -1
- package/dist/client/assets/{FilterLines-Bo4t5M26.js → FilterLines-C6FzseaI.js} +1 -1
- package/dist/client/assets/{Globe01-CG2tCUFh.js → Globe01-ksihujx5.js} +1 -1
- package/dist/client/assets/{Globe04-DyQm-JaM.js → Globe04-CaSf-QRR.js} +1 -1
- package/dist/client/assets/{HardDrive-CCTtqP8p.js → HardDrive-DIe8Ne1Z.js} +1 -1
- package/dist/client/assets/{Image01-BH0jS70O.js → Image01-Ccewaegj.js} +1 -1
- package/dist/client/assets/{Key01-2slfiBye.js → Key01-BiCc3hdL.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Te-fp_8S.js → LayoutLeft-GINu9IMu.js} +1 -1
- package/dist/client/assets/{LinkExternal01-IXwjBiyj.js → LinkExternal01-C9DwRXbp.js} +1 -1
- package/dist/client/assets/{Monitor01-BIrySHW4.js → Monitor01-gE3VwlQL.js} +1 -1
- package/dist/client/assets/{Package-q8jsblba.js → Package-B6LB-sQv.js} +1 -1
- package/dist/client/assets/{Palette-B4N2Lh4I.js → Palette-BIOy8_Zm.js} +1 -1
- package/dist/client/assets/{Play-BsWqYJrA.js → Play-B5Q42UL7.js} +1 -1
- package/dist/client/assets/{Plus-CaXcYr2A.js → Plus-DmqCxzmY.js} +1 -1
- package/dist/client/assets/{SearchLg-BQraE8Xe.js → SearchLg-BTzuwZbq.js} +1 -1
- package/dist/client/assets/{SearchMd-D4P-dsiI.js → SearchMd-1Ebwnoie.js} +1 -1
- package/dist/client/assets/{Settings02-CbZwTwjv.js → Settings02-CPjIYmr2.js} +1 -1
- package/dist/client/assets/{Shield01-5UU6xKtM.js → Shield01-DAhkMcsw.js} +1 -1
- package/dist/client/assets/{Star01-BP2UWuD3.js → Star01-BkoTbcVJ.js} +1 -1
- package/dist/client/assets/{Stars01-BUDdEic_.js → Stars01-DcX49kXL.js} +1 -1
- package/dist/client/assets/{Stars02-C2BfJbMs.js → Stars02-DXKdVJgF.js} +1 -1
- package/dist/client/assets/{Sun-DhXO7UYs.js → Sun-B1MH1CG7.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Cykddf1V.js → SwitchHorizontal01-CJL-Kkre.js} +1 -1
- package/dist/client/assets/{Tool01-DvZKR3xT.js → Tool01-n89xrVWh.js} +1 -1
- package/dist/client/assets/{Tool02-C5s2vHQ-.js → Tool02-BN5cOAPX.js} +1 -1
- package/dist/client/assets/{Trash01-CjXnKfLl.js → Trash01-ULf3vZzd.js} +1 -1
- package/dist/client/assets/{TrendUp01-CaupVoX_.js → TrendUp01-XCWOu_lE.js} +1 -1
- package/dist/client/assets/{Upload01-XX86V2tf.js → Upload01-Bo0C8nNy.js} +1 -1
- package/dist/client/assets/{User01-Dv6ObnLt.js → User01-C0pb1kSr.js} +1 -1
- package/dist/client/assets/{Users01-CbNJtpnC.js → Users01-p50e1nB1.js} +1 -1
- package/dist/client/assets/{Users03-BnGYfZVJ.js → Users03-BylB8oEb.js} +1 -1
- package/dist/client/assets/{X-2EPOmOgB.js → X-7k914DVb.js} +1 -1
- package/dist/client/assets/{XCircle-Cw6Je6uu.js → XCircle-CLp7MrPd.js} +1 -1
- package/dist/client/assets/{XClose-BToLKBfU.js → XClose-CyrQ7jxo.js} +1 -1
- package/dist/client/assets/{Zap-RgPPnqY6.js → Zap-DReyn9Vk.js} +1 -1
- package/dist/client/assets/{ZapSquare-B05wsQrT.js → ZapSquare-DYCkdvXC.js} +1 -1
- package/dist/client/assets/{ZoomOut-D28iYwMh.js → ZoomOut-B6Ae7_Rx.js} +1 -1
- package/dist/client/assets/{access-gate-C2qU6IVQ.js → access-gate-C4uPZD7a.js} +1 -1
- package/dist/client/assets/{add-section-modal-CTvnBMIp.js → add-section-modal-Defsn-AG.js} +1 -1
- package/dist/client/assets/{agent-icon-aZ0ttVTI.js → agent-icon-CiMMolqb.js} +1 -1
- package/dist/client/assets/{agents-list-Dqc4RZ8Z.js → agents-list-DRYua75l.js} +1 -1
- package/dist/client/assets/{ai-providers-fhgGlgYt.js → ai-providers-n7Z9CoAC.js} +1 -1
- package/dist/client/assets/{alert-DNm9ImK8.js → alert-CVXBhSb7.js} +1 -1
- package/dist/client/assets/{alert-dialog-_aQlViTO.js → alert-dialog-CyfZzRRb.js} +1 -1
- package/dist/client/assets/{app-editor-Cwi9z9F4.js → app-editor-B7YHX2ao.js} +1 -1
- package/dist/client/assets/{auth-DuSPHHT9.js → auth-C2BzEd6_.js} +1 -1
- package/dist/client/assets/{auth-catchall-BN1qG37x.js → auth-catchall-DioBOazG.js} +1 -1
- package/dist/client/assets/{auth-entry-DfhwoI5q.js → auth-entry-CvApFZ8v.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Dy6JC7Fa.js → auth-split-layout-0StEs_fh.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DMiwiAXs.js → authenticate-and-persist-oauth-C-xqjPS1.js} +1 -1
- package/dist/client/assets/{automation-list-row-C7bq_ceX.js → automation-list-row-EFpL9A_U.js} +1 -1
- package/dist/client/assets/{automation-runs-pBvdymFZ.js → automation-runs-B1dIJBx7.js} +1 -1
- package/dist/client/assets/{automations-Dt3HLWPT.js → automations-o7PmfSaL.js} +1 -1
- package/dist/client/assets/{autosend-CzDnxYJb.js → autosend-BCywkWdO.js} +1 -1
- package/dist/client/assets/{avatar-0OBNOMUZ.js → avatar-Bn5SQjrH.js} +1 -1
- package/dist/client/assets/{badge-Soyz5pn1.js → badge-DnmJAMhi.js} +1 -1
- package/dist/client/assets/{block-document-CZlJEnSb.js → block-document-CXqZGY_4.js} +1 -1
- package/dist/client/assets/{brand-context-CjaGEXDm.js → brand-context-COY-j3tz.js} +1 -1
- package/dist/client/assets/{buckets-CdO9H5yi.js → buckets-7XF8s0lH.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CwO2rUyD.js → bulk-category-panel-dkk9gO1A.js} +1 -1
- package/dist/client/assets/{calendar-DX9K-vzu.js → calendar-C7sTJNfv.js} +1 -1
- package/dist/client/assets/{capability-load-error-D3oFP-fy.js → capability-load-error-eP-F8ilX.js} +1 -1
- package/dist/client/assets/{card-btDFv8vd.js → card-BUDVioew.js} +1 -1
- package/dist/client/assets/{category-editor-Cz3alA36.js → category-editor-Ctod1En0.js} +1 -1
- package/dist/client/assets/{chat-context-BD1LcxTJ.js → chat-context-BiCX8sda.js} +1 -1
- package/dist/client/assets/{checkbox-BKPu0Hbd.js → checkbox-de4F7aIk.js} +1 -1
- package/dist/client/assets/{cli-auth-success-D4RuWBVk.js → cli-auth-success-BnZMeC-h.js} +1 -1
- package/dist/client/assets/{collection-detail-EHU2DLLS.js → collection-detail-ct_kdAP5.js} +1 -1
- package/dist/client/assets/{collection-display-button-Bs8vuk9W.js → collection-display-button-DmYM_XRL.js} +1 -1
- package/dist/client/assets/{collection-search-p4lrVXL4.js → collection-search-r3OonCNB.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DJJ2HlQC.js → collection-table-wrapper-cIJFlP90.js} +1 -1
- package/dist/client/assets/{collection-tabs-CkltesYs.js → collection-tabs-28MgV69P.js} +1 -1
- package/dist/client/assets/{command-DNWolGKQ.js → command-BqK4kSdN.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-KgEmZrgV.js → commerce-onboarding-BTzlwcaQ.js} +1 -1
- package/dist/client/assets/{companions-core-CJJcnK7t.js → companions-core-E9U1yCTI.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CX6teMLo.js → connect-desktop-dialog-B4YTN7xf.js} +1 -1
- package/dist/client/assets/{connection-card-B1Vo1G9p.js → connection-card-DYz4tBIg.js} +1 -1
- package/dist/client/assets/{connection-detail-yDFXUklt.js → connection-detail-BtPfX0Cz.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-mkg9UagP.js → connection-form-helpers-w_7UChvB.js} +1 -1
- package/dist/client/assets/{connections-CqThGYBQ.js → connections-C8IoOW-p.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DLEHEP4h.js → decopilot-sse-pool-Dep8yHYX.js} +1 -1
- package/dist/client/assets/{dialog-BTEMEut8.js → dialog-Cau5Is8O.js} +1 -1
- package/dist/client/assets/{domain-settings-CvfHRmwm.js → domain-settings-BccLKguM.js} +1 -1
- package/dist/client/assets/{drawer-B3qgH5S8.js → drawer-h8KYC7oq.js} +1 -1
- package/dist/client/assets/{dropdown-menu-D6I60eM1.js → dropdown-menu-yDpF9IVC.js} +1 -1
- package/dist/client/assets/{empty-state-CIzKhbZ-.js → empty-state-C82AWte6.js} +1 -1
- package/dist/client/assets/{extract-connection-data-nZ_Xsysx.js → extract-connection-data-BPEqz1oy.js} +1 -1
- package/dist/client/assets/file-explorer-CRatsxFK.js +2 -0
- package/dist/client/assets/{file-type-icon-5z9EMjnv.js → file-type-icon-3n8CPWjS.js} +1 -1
- package/dist/client/assets/{files-DhsG6Zza.js → files-ClwU-qP5.js} +1 -1
- package/dist/client/assets/{form-D92rhaf-.js → form-DvkTstBT.js} +1 -1
- package/dist/client/assets/{general-rAmjhRRh.js → general-BtW1twX4.js} +1 -1
- package/dist/client/assets/{github-repo-picker-lNnkzc73.js → github-repo-picker-xzofSvXi.js} +1 -1
- package/dist/client/assets/{hooks-jQmls4EP.js → hooks-DtNSJUfY.js} +1 -1
- package/dist/client/assets/{index-BkLBznCc.js → index-BNP1US2z.js} +1 -1
- package/dist/client/assets/{index-DA2ZFpRE.js → index-Bg9ik4pt.js} +1 -1
- package/dist/client/assets/{index-CSay5-iH.js → index-CC4iVWms.js} +5 -5
- package/dist/client/assets/{index-D8_v966N.js → index-CUfkP4EN.js} +1 -1
- package/dist/client/assets/{index-zmU4_7eG.js → index-CXcizl-a.js} +1 -1
- package/dist/client/assets/{index-DP7q2sf-.js → index-ChVU-OyZ.js} +3 -3
- package/dist/client/assets/{index-ja_VrDWS.js → index-CrNufW_s.js} +1 -1
- package/dist/client/assets/{index-CB6j2P5o.js → index-CtLUYohi.js} +1 -1
- package/dist/client/assets/{index-D3ilR3fB.js → index-DAvDfw5P.js} +2 -2
- package/dist/client/assets/{index-C74yvGnz.js → index-DErTSdGh.js} +10 -9
- package/dist/client/assets/{index--x7uJGgo.js → index-DO1jIDGs.js} +1 -1
- package/dist/client/assets/{index-kzi2Dhg5.js → index-DopvbFX2.js} +1 -1
- package/dist/client/assets/{index-tx5gRe0k.js → index-RX77aNcL.js} +1 -1
- package/dist/client/assets/{index-DSznidAj.js → index-g7-OlEFb.js} +1 -1
- package/dist/client/assets/{index-redirect-aCz_Cayi.js → index-redirect-Di4lLXh3.js} +1 -1
- package/dist/client/assets/index-uQHpzHcR.css +1 -0
- package/dist/client/assets/{input-Bl-0izCS.js → input-uZBz0Ae6.js} +1 -1
- package/dist/client/assets/{integration-icon-_NNS3fdQ.js → integration-icon-B_K9OIJt.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C1h7TCyn.js → invite-member-dialog-DFhkT5SJ.js} +1 -1
- package/dist/client/assets/{label-r_5xsko-.js → label-B0y8QCDV.js} +1 -1
- package/dist/client/assets/{layout-CHQkueXk.js → layout-ChvTQN9o.js} +1 -1
- package/dist/client/assets/{login-WylRZMZD.js → login-CiSh9eb2.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CC-HSrt3.js → mcp-oauth-DBv7Wx_F.js} +1 -1
- package/dist/client/assets/{members-D4O0HE-B.js → members-BZt8Ms3G.js} +1 -1
- package/dist/client/assets/{monaco-editor-B77vOluw.js → monaco-editor-BEoqOg8b.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CA0DyVuv.js → monitoring-stats-row-lN_pEks5.js} +1 -1
- package/dist/client/assets/{multi-select-BOFumCOd.js → multi-select-DzaOKjaI.js} +1 -1
- package/dist/client/assets/{oauth-callback-BzzncyJD.js → oauth-callback-CDzsF-fn.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DIelYVRP.js → oauth-callback-ai-provider-C-Z2m5op.js} +1 -1
- package/dist/client/assets/{onboarding-DMl9vd9C.js → onboarding-C6ZY80Ie.js} +1 -1
- package/dist/client/assets/{org-install-Cn_IGlna.js → org-install-DQiIdeZ4.js} +1 -1
- package/dist/client/assets/{org-layout-CRMldrmA.js → org-layout-DjJEnqTL.js} +1 -1
- package/dist/client/assets/{organization-choice-CwsRF74K.js → organization-choice-89ZRPSJL.js} +1 -1
- package/dist/client/assets/{orgs-ClTfouo9.js → orgs-9nys10qv.js} +1 -1
- package/dist/client/assets/{page-seo-form-C7dxTzQ9.js → page-seo-form-BCZPKEQr.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CzS--PJO.js +1 -0
- package/dist/client/assets/{popover-DKp6WlS2.js → popover-EmD-Y3Mr.js} +1 -1
- package/dist/client/assets/{post-editor-D0U5-rmZ.js → post-editor-DOXXN_ym.js} +1 -1
- package/dist/client/assets/{primitives-BvsooIoQ.js → primitives-CqM3XHY7.js} +1 -1
- package/dist/client/assets/{profile-DObC2DvA.js → profile-CA7Qq4HZ.js} +1 -1
- package/dist/client/assets/project-app-view-pZVK7RmL.js +1 -0
- package/dist/client/assets/record-editor-C1RJ_hgj.js +1 -0
- package/dist/client/assets/redirect-editor-CSnE9LAM.js +1 -0
- package/dist/client/assets/registry-C-1r9vTu.js +2 -0
- package/dist/client/assets/{registry-layout-BRaj4EiT.js → registry-layout--px0oMO5.js} +1 -1
- package/dist/client/assets/{reports-Bl5sOoJK.js → reports-BI9iiqrG.js} +1 -1
- package/dist/client/assets/{require-capability-FRJ4xa5j.js → require-capability-CwO8nG54.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BHDvLgvF.js → required-auth-layout-C22HqPdm.js} +1 -1
- package/dist/client/assets/{reset-password-CDKuxxZp.js → reset-password-BED88L2j.js} +1 -1
- package/dist/client/assets/{roles-DHTMAbjq.js → roles-DBpB-VSz.js} +1 -1
- package/dist/client/assets/{search-input-f3nZqtaH.js → search-input-uY2t4C6P.js} +1 -1
- package/dist/client/assets/{secrets-DMF6d6gg.js → secrets-C7TsPUoZ.js} +1 -1
- package/dist/client/assets/{sections-editor-DKyPXoLi.js → sections-editor-CdNnC5EW.js} +1 -1
- package/dist/client/assets/{select-CA_iWPfT.js → select-Clq5_oBS.js} +1 -1
- package/dist/client/assets/{select-model-Bi5B-oXJ.js → select-model-DuXrXrth.js} +1 -1
- package/dist/client/assets/{self-tool-result-DDgS8phO.js → self-tool-result-WteaAc6I.js} +1 -1
- package/dist/client/assets/{seo-editor-Aor-MGn0.js → seo-editor-DzwF1gCF.js} +1 -1
- package/dist/client/assets/{settings-layout-Drt37pLB.js → settings-layout-PPclpdOL.js} +1 -1
- package/dist/client/assets/{settings-section-Dj5WmVSj.js → settings-section-BgqCOJdo.js} +1 -1
- package/dist/client/assets/{shell-controls-Bep9d3Cn.js → shell-controls-D8EyZ8cM.js} +1 -1
- package/dist/client/assets/{shell-layout-Di2sZvyw.js → shell-layout-CZLCUvFZ.js} +1 -1
- package/dist/client/assets/{sidebar-eIXjd9Yw.js → sidebar-DLKRS-NI.js} +1 -1
- package/dist/client/assets/{skeleton-BWYrLQQT.js → skeleton-JJdKSZSl.js} +1 -1
- package/dist/client/assets/{sso-COrgXmO0.js → sso-sQLDe89S.js} +1 -1
- package/dist/client/assets/{store-CRj3twJY.js → store-D-9p5zt3.js} +1 -1
- package/dist/client/assets/store-registry-DrtjTk3T.js +2 -0
- package/dist/client/assets/{studio-tools-zNP7cFLT.js → studio-tools-qnNLvfkT.js} +1 -1
- package/dist/client/assets/{switch-4_oZw7lF.js → switch-CxsR_kVM.js} +1 -1
- package/dist/client/assets/{table-DkLz1K8N.js → table-BS2rkdLG.js} +1 -1
- package/dist/client/assets/{tabs-hRCf5QB1.js → tabs-CZIbnCfT.js} +1 -1
- package/dist/client/assets/{textarea-DnZMoeow.js → textarea-C_j9ta7P.js} +1 -1
- package/dist/client/assets/{toggle-group-BRG3DviV.js → toggle-group-CjKqf76B.js} +1 -1
- package/dist/client/assets/{toolbar-Z6lpCKht.js → toolbar-GM0qStTv.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CFIHOtWM.js → toolbar-icon-button-C-iPAjkF.js} +1 -1
- package/dist/client/assets/{tooltip-wMxYpE3E.js → tooltip-3rRAGxxZ.js} +1 -1
- package/dist/client/assets/{use-ai-providers-f7vD-by7.js → use-ai-providers-DXdkjiJl.js} +1 -1
- package/dist/client/assets/{use-automations-5uMYusfJ.js → use-automations-G7sBwgjZ.js} +1 -1
- package/dist/client/assets/{use-autosave-bLWKJq_x.js → use-autosave-BORxGsDM.js} +1 -1
- package/dist/client/assets/{use-capability-BL8GknWI.js → use-capability-Cvcdi48t.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BVnAAq3x.js → use-clock-tick-BM4pXwuc.js} +1 -1
- package/dist/client/assets/{use-collections-CsnsxjZz.js → use-collections-CsuJ3Ghi.js} +1 -1
- package/dist/client/assets/{use-connection-DCYnbXZ5.js → use-connection-DvcdB9qs.js} +1 -1
- package/dist/client/assets/{use-copy-DEMoxj7m.js → use-copy-BStSgN7j.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-AmrhrB-J.js → use-create-virtual-mcp-DxO07v5C.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CjRKpnT1.js → use-debounced-autosave-DHuzBJDR.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DkIFgDw4.js → use-debounced-value-mZ3MWG36.js} +1 -1
- package/dist/client/assets/{use-deco-credits-dHjN8M_Y.js → use-deco-credits-BztMZVaB.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CceHvPOW.js → use-decopilot-events-Dt7TMGy2.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C3DZBU2c.js → use-delete-connection-CckeKZtQ.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BD-dGZP5.js → use-deployment-admin-CzvcmFlz.js} +1 -1
- package/dist/client/assets/{use-file-configs-C5UYjMYo.js → use-file-configs-DvwylMPx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-hq7jzeCt.js → use-infinite-scroll-DT69qW9N.js} +1 -1
- package/dist/client/assets/{use-join-requests-BpOefh6v.js → use-join-requests-Ct04aC_N.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CSx5OOcY.js → use-mcp-auth-status-CK0Pp3bR.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CP7vVNI8.js → use-mcp-client-BBxkfM4k.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BOL45SnA.js → use-mcp-tools-dM3wldJ7.js} +1 -1
- package/dist/client/assets/{use-members-CXFKNsqF.js → use-members-z0S_Lmiu.js} +1 -1
- package/dist/client/assets/{use-mobile-UfyzXMuE.js → use-mobile-Ct_iG84O.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CxF1WPIb.js → use-navigate-to-agent-ncsERhWf.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CX6wMigR.js → use-org-auth-client-D56uCvOP.js} +1 -1
- package/dist/client/assets/{use-org-sso-B4vK5HKn.js → use-org-sso-Dk_xozQ1.js} +1 -1
- package/dist/client/assets/{use-organization-roles-mbBqmzsZ.js → use-organization-roles-CWSn79IW.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CJs5nMrg.js → use-organization-settings-B2CvO6KM.js} +1 -1
- package/dist/client/assets/{use-registry-app-CKPn88US.js → use-registry-app-CFJHFEvB.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CHNF8ouS.js → use-registry-connections-RMgcCWcQ.js} +1 -1
- package/dist/client/assets/{use-secrets-CUfDdHCD.js → use-secrets-Bljtafv1.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DGg2Vl_c.js → use-status-sounds-DVsfNgb_.js} +1 -1
- package/dist/client/assets/{use-view-mode-EwNuqNL7.js → use-view-mode-CqQBFSDi.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CPlibyUl.js → use-virtual-mcp-BJ8c4qQT.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-SdCJnHnX.js +1 -0
- package/dist/client/assets/{useRouterState-C7uQ8-Sn.js → useRouterState-B6VnUJ39.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BJEWddVh.js +1 -0
- package/dist/client/assets/{users-BQokyds1.js → users-BWkQQbRV.js} +1 -1
- package/dist/client/assets/{variant-calendar-C0R1i83E.js → variant-calendar-DWhhhlMU.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Ch7KmZg4.js → view-mode-toggle-DSwEKsCP.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +216 -195
- package/dist/server/server.js +152 -152
- package/package.json +1 -1
- package/dist/client/assets/file-explorer-D1I3-mOX.js +0 -2
- package/dist/client/assets/index-ZCgbryrZ.css +0 -1
- package/dist/client/assets/page-seo-sheet-CIH9UvM_.js +0 -1
- package/dist/client/assets/project-app-view-CQOfr-EK.js +0 -1
- package/dist/client/assets/record-editor-LUdXHOc2.js +0 -1
- package/dist/client/assets/redirect-editor-Df4kkuAe.js +0 -1
- package/dist/client/assets/registry-CkIL_JLS.js +0 -2
- package/dist/client/assets/store-registry-BXgv6s1-.js +0 -2
- package/dist/client/assets/useInfiniteQuery-C8m4JJfS.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-LInN5z0q.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,j as s,cr as i,l as c}from"./index-
|
|
1
|
+
import{c as d,j as s,cr as i,l as c}from"./index-ChVU-OyZ.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{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-
|
|
1
|
+
import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-ChVU-OyZ.js";import{i as $}from"./ChevronUp-BXYPfZy1.js";import{i as D}from"./ChevronRight-COKmdxXp.js";import{a as M}from"./DotsVertical-D85MCx71.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 O(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 E(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 G(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 L(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 Q(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 U(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 V(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 W(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 X(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,Q as b,O as c,E as d,V as e,W as f,X as g,L as h,P as i,U as j,G as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as N,j as t}from"./index-
|
|
1
|
+
import{c as v,l as N,j as t}from"./index-ChVU-OyZ.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-center 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"./index-
|
|
1
|
+
import"./index-ChVU-OyZ.js";import{W as T,h as O}from"./use-mcp-client-BBxkfM4k.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function q(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function B(t){if(!t)return[];const e=[];for(const n of t){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])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function J(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function Q(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let G="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=G[n[t]&63];return e};function j(t){return`${t}_${$()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function X(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=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,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];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=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:j("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:h,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,Q as c,J as d,X as e,B as f,j as g,q as i};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as J,r as u,j as r,i as se,B as Ne,d$ as Qt,aO as Xt,aU as ue,e0 as Jt,e1 as Yt,e2 as Zt,e3 as en,bL as tn,e4 as nn,e5 as at,aQ as rn,e6 as on,e7 as sn,e8 as an,e9 as ln,ea as cn,eb as dn,ec as un,ed as fn,ee as mn,l as ee,n as pn,t as W,K as Je}from"./index-ChVU-OyZ.js";import{F as xn,l as hn}from"./index-CrNufW_s.js";import{e as gn,aJ as vn,aK as yn}from"./agent-icon-CiMMolqb.js";import{s as Cn}from"./XClose-CyrQ7jxo.js";import{m as wn}from"./automation-runs-B1dIJBx7.js";import{b as Ye,T as Ze,a as et}from"./tooltip-3rRAGxxZ.js";import{b as jn}from"./chat-context-BiCX8sda.js";import{u as Nn}from"./shell-layout-CZLCUvFZ.js";import{s as ve,a as tt,f as bn}from"./index-CC4iVWms.js";import{a as Sn,h as Mn,D as Rn,c as Dn,d as Pn,e as En}from"./dialog-Cau5Is8O.js";import{I as nt}from"./input-uZBz0Ae6.js";import{c as kn,d as Tn,b as An,A as On,g as Fn,e as In,a as Ln,f as $n}from"./alert-dialog-CyfZzRRb.js";import{t as _n}from"./ChevronDown-Bok1b6fK.js";import{i as zn}from"./ChevronRight-COKmdxXp.js";import{a as Gn}from"./ZoomOut-B6Ae7_Rx.js";import{v as Kn,E as Bn,w as ke,x as Te,y as Un,z as Vn,A as Hn,C as Wn,D as Q,G as ye,I as Ae,J as Ce,g as Oe,K as Fe,M as qn,N as Qn,O as Xn,P as we,Q as Ie,U as Jn,V as Yn,W as Zn,X as er}from"./index-DErTSdGh.js";import"./AlertCircle-DLF4X63O.js";import"./Tool01-n89xrVWh.js";import"./ArrowUp-DpC0OL3v.js";import"./Settings02-CPjIYmr2.js";import"./Tool02-BN5cOAPX.js";import"./XCircle-CLp7MrPd.js";import"./ArrowUpRight-DAqa4GMV.js";import"./TrendUp01-XCWOu_lE.js";import"./ZapSquare-DYCkdvXC.js";import"./Users03-BylB8oEb.js";import"./CheckCircle-D4R3pCU9.js";import"./ChevronUp-BXYPfZy1.js";import"./DotsVertical-D85MCx71.js";import"./Stars02-DXKdVJgF.js";import"./Copy01-Dhc1Bhgj.js";import"./Globe01-ksihujx5.js";import"./Eye-BVzIJRcU.js";import"./FilterLines-C6FzseaI.js";import"./Star01-BkoTbcVJ.js";import"./Globe04-CaSf-QRR.js";import"./SwitchHorizontal01-CJL-Kkre.js";import"./HardDrive-DIe8Ne1Z.js";import"./Image01-Ccewaegj.js";import"./Key01-BiCc3hdL.js";import"./LayoutLeft-GINu9IMu.js";import"./LinkExternal01-C9DwRXbp.js";import"./Monitor01-gE3VwlQL.js";import"./Sun-B1MH1CG7.js";import"./Package-B6LB-sQv.js";import"./Palette-BIOy8_Zm.js";import"./Play-B5Q42UL7.js";import"./Plus-DmqCxzmY.js";import"./SearchLg-BTzuwZbq.js";import"./SearchMd-1Ebwnoie.js";import"./Shield01-DAhkMcsw.js";import"./Stars01-DcX49kXL.js";import"./Trash01-ULf3vZzd.js";import"./Upload01-Bo0C8nNy.js";import"./User01-C0pb1kSr.js";import"./Users01-p50e1nB1.js";import"./X-7k914DVb.js";import"./Zap-DReyn9Vk.js";import"./select-Clq5_oBS.js";import"./useInfiniteQuery-SdCJnHnX.js";import"./use-infinite-scroll-DT69qW9N.js";import"./use-connection-DvcdB9qs.js";import"./use-collections-CsuJ3Ghi.js";import"./use-mcp-client-BBxkfM4k.js";import"./auth-C2BzEd6_.js";import"./use-virtual-mcp-BJ8c4qQT.js";import"./card-BUDVioew.js";import"./sidebar-DLKRS-NI.js";import"./use-mobile-Ct_iG84O.js";import"./table-BS2rkdLG.js";import"./empty-state-C82AWte6.js";import"./use-members-z0S_Lmiu.js";import"./use-org-auth-client-D56uCvOP.js";import"./use-clock-tick-BM4pXwuc.js";import"./use-automations-G7sBwgjZ.js";import"./studio-tools-qnNLvfkT.js";import"./useSuspenseInfiniteQuery-BJEWddVh.js";import"./avatar-Bn5SQjrH.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BStSgN7j.js";import"./file-type-icon-3n8CPWjS.js";import"./tab-id-BijBBRwE.js";import"./hooks-DtNSJUfY.js";import"./decopilot-sse-pool-Dep8yHYX.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-BEoqOg8b.js";import"./index-DopvbFX2.js";import"./calendar-C7sTJNfv.js";import"./integration-icon-B_K9OIJt.js";import"./use-navigate-to-agent-ncsERhWf.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-DF6HCadL.js";import"./form-DvkTstBT.js";import"./label-B0y8QCDV.js";import"./autosend-BCywkWdO.js";import"./use-ai-providers-DXdkjiJl.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-Dt7TMGy2.js";import"./use-organization-settings-B2CvO6KM.js";import"./required-auth-layout-C22HqPdm.js";import"./use-org-sso-Dk_xozQ1.js";import"./drawer-h8KYC7oq.js";import"./collection-search-r3OonCNB.js";import"./index-DAvDfw5P.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-CFJHFEvB.js";import"./use-mcp-tools-dM3wldJ7.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-C-xqjPS1.js";import"./mcp-oauth-DBv7Wx_F.js";import"./extract-connection-data-BPEqz1oy.js";import"./dropdown-menu-yDpF9IVC.js";import"./popover-EmD-Y3Mr.js";import"./command-BqK4kSdN.js";import"./index-CUfkP4EN.js";import"./tabs-CZIbnCfT.js";import"./toggle-group-CjKqf76B.js";import"./use-deco-credits-BztMZVaB.js";import"./connection-card-DYz4tBIg.js";import"./use-registry-connections-RMgcCWcQ.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-C_j9ta7P.js";import"./connection-form-helpers-w_7UChvB.js";import"./collection-tabs-28MgV69P.js";import"./badge-DnmJAMhi.js";import"./connect-desktop-dialog-B4YTN7xf.js";import"./select-model-DuXrXrth.js";import"./checkbox-de4F7aIk.js";import"./skeleton-JJdKSZSl.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BgqCOJdo.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DVsfNgb_.js";import"./toolbar-GM0qStTv.js";import"./use-capability-Cvcdi48t.js";import"./toolbar-icon-button-C-iPAjkF.js";import"./use-debounced-autosave-DHuzBJDR.js";import"./index-g7-OlEFb.js";import"./search-input-uY2t4C6P.js";import"./use-mcp-auth-status-CK0Pp3bR.js";import"./switch-CxsR_kVM.js";import"./github-repo-picker-xzofSvXi.js";import"./use-debounced-value-mZ3MWG36.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-Bljtafv1.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-E9U1yCTI.js";import"./use-file-configs-DvwylMPx.js";import"./automation-list-row-EFpL9A_U.js";const tr={"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 nr(i){const e=J.c(51),{open:s,mode:a,initialName:c,parentLabel:m,isPending:x,onSubmit:p,onOpenChange:g}=i,y=c===void 0?"":c,d=x===void 0?!1:x,[h,w]=u.useState(y),[R,k]=u.useState(s),v=tr[a];s!==R&&(k(s),s&&w(y));let j;e[0]!==d||e[1]!==g?(j=O=>{!O&&!d&&g(!1)},e[0]=d,e[1]=g,e[2]=j):j=e[2];const U=j;let S;e[3]!==d||e[4]!==h||e[5]!==p?(S=async O=>{O.preventDefault();const q=h.trim();!q||d||await p(q)},e[3]=d,e[4]=h,e[5]=p,e[6]=S):S=e[6];const D=S;let b;e[7]!==v.title?(b=r.jsx(Sn,{children:v.title}),e[7]=v.title,e[8]=b):b=e[8];let C;e[9]!==v.description?(C=r.jsx(Mn,{children:v.description}),e[9]=v.description,e[10]=C):C=e[10];let P;e[11]!==b||e[12]!==C?(P=r.jsxs(Rn,{children:[b,C]}),e[11]=b,e[12]=C,e[13]=P):P=e[13];let M;e[14]!==m?(M=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(nt,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=m,e[15]=M):M=e[15];let V;e[16]===Symbol.for("react.memo_cache_sentinel")?(V=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=V):V=e[16];let I;e[17]===Symbol.for("react.memo_cache_sentinel")?(I=O=>w(O.target.value),e[17]=I):I=e[17];let z;e[18]!==v.placeholder||e[19]!==d||e[20]!==h?(z=r.jsxs("div",{className:"space-y-1.5",children:[V,r.jsx(nt,{id:"file-explorer-name",value:h,onChange:I,placeholder:v.placeholder,autoFocus:!0,disabled:d})]}),e[18]=v.placeholder,e[19]=d,e[20]=h,e[21]=z):z=e[21];let L;e[22]!==z||e[23]!==M?(L=r.jsxs("div",{className:"space-y-4 py-4",children:[M,z]}),e[22]=z,e[23]=M,e[24]=L):L=e[24];let T;e[25]!==g?(T=()=>g(!1),e[25]=g,e[26]=T):T=e[26];let G;e[27]!==d||e[28]!==T?(G=r.jsx(Ne,{type:"button",variant:"outline",onClick:T,disabled:d,children:"Cancel"}),e[27]=d,e[28]=T,e[29]=G):G=e[29];let H;e[30]!==d||e[31]!==h?(H=!h.trim()||d,e[30]=d,e[31]=h,e[32]=H):H=e[32];let K;e[33]!==v.submit||e[34]!==d?(K=d?r.jsxs(r.Fragment,{children:[r.jsx(se,{size:14,className:"animate-spin"}),"Saving…"]}):v.submit,e[33]=v.submit,e[34]=d,e[35]=K):K=e[35];let A;e[36]!==H||e[37]!==K?(A=r.jsx(Ne,{type:"submit",disabled:H,children:K}),e[36]=H,e[37]=K,e[38]=A):A=e[38];let E;e[39]!==G||e[40]!==A?(E=r.jsxs(Dn,{children:[G,A]}),e[39]=G,e[40]=A,e[41]=E):E=e[41];let $;e[42]!==D||e[43]!==L||e[44]!==E||e[45]!==P?($=r.jsx(Pn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:D,children:[P,L,E]})}),e[42]=D,e[43]=L,e[44]=E,e[45]=P,e[46]=$):$=e[46];let _;return e[47]!==U||e[48]!==s||e[49]!==$?(_=r.jsx(En,{open:s,onOpenChange:U,children:$}),e[47]=U,e[48]=s,e[49]=$,e[50]=_):_=e[50],_}function rr(i){const e=J.c(31),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:c,onOpenChange:m,onConfirm:x}=i,p=s!==null,g=s?.kind==="directory"?"folder":"file";let y;e[0]!==g?(y=r.jsxs(kn,{children:["Delete ",g,"?"]}),e[0]=g,e[1]=y):y=e[1];const d=s?.name;let h;e[2]!==d?(h=r.jsx("span",{className:"font-mono",children:d}),e[2]=d,e[3]=h):h=e[3];const w=s?.kind==="directory"?" and everything inside it.":".";let R;e[4]!==a.length?(R=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?"One open file has unsaved changes that will be lost.":`${a.length} open files have unsaved changes that will be lost.`]}),e[4]=a.length,e[5]=R):R=e[5];let k;e[6]!==h||e[7]!==w||e[8]!==R?(k=r.jsxs(Tn,{children:["This will permanently delete"," ",h,w,R]}),e[6]=h,e[7]=w,e[8]=R,e[9]=k):k=e[9];let v;e[10]!==y||e[11]!==k?(v=r.jsxs(An,{children:[y,k]}),e[10]=y,e[11]=k,e[12]=v):v=e[12];let j;e[13]!==c?(j=r.jsx(On,{disabled:c,children:"Cancel"}),e[13]=c,e[14]=j):j=e[14];const U=c||!s;let S;e[15]!==s||e[16]!==x?(S=M=>{M.preventDefault(),s&&x(s)},e[15]=s,e[16]=x,e[17]=S):S=e[17];let D;e[18]!==U||e[19]!==S?(D=r.jsx(Fn,{disabled:U,onClick:S,children:"Delete"}),e[18]=U,e[19]=S,e[20]=D):D=e[20];let b;e[21]!==j||e[22]!==D?(b=r.jsxs(In,{children:[j,D]}),e[21]=j,e[22]=D,e[23]=b):b=e[23];let C;e[24]!==b||e[25]!==v?(C=r.jsxs(Ln,{children:[v,b]}),e[24]=b,e[25]=v,e[26]=C):C=e[26];let P;return e[27]!==m||e[28]!==p||e[29]!==C?(P=r.jsx($n,{open:p,onOpenChange:m,children:C}),e[27]=m,e[28]=p,e[29]=C,e[30]=P):P=e[30],P}var Le="ContextMenu",[or]=rn(Le,[at]),B=at(),[sr,it]=or(Le),lt=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:c,modal:m=!0}=i,[x,p]=u.useState(!1),g=B(e),y=tn(a),d=u.useCallback(h=>{p(h),y(h)},[y]);return r.jsx(sr,{scope:e,open:x,onOpenChange:d,modal:m,children:r.jsx(nn,{...g,dir:c,open:x,onOpenChange:d,modal:m,children:s})})};lt.displayName=Le;var ct="ContextMenuTrigger",dt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...c}=i,m=it(ct,s),x=B(s),p=u.useRef({x:0,y:0}),g=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),y=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(y.current),[]),h=w=>{p.current={x:w.clientX,y:w.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Qt,{...x,virtualRef:g}),r.jsx(Xt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:ue(i.onContextMenu,w=>{d(),h(w),w.preventDefault()}),onPointerDown:a?i.onPointerDown:ue(i.onPointerDown,je(w=>{d(),y.current=window.setTimeout(()=>h(w),700)})),onPointerMove:a?i.onPointerMove:ue(i.onPointerMove,je(d)),onPointerCancel:a?i.onPointerCancel:ue(i.onPointerCancel,je(d)),onPointerUp:a?i.onPointerUp:ue(i.onPointerUp,je(d))})]})});dt.displayName=ct;var ar="ContextMenuPortal",ut=i=>{const{__scopeContextMenu:e,...s}=i,a=B(e);return r.jsx(Zt,{...a,...s})};ut.displayName=ar;var ft="ContextMenuContent",mt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=it(ft,s),m=B(s),x=u.useRef(!1);return r.jsx(en,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{i.onCloseAutoFocus?.(p),!p.defaultPrevented&&x.current&&p.preventDefault(),x.current=!1},onInteractOutside:p=>{i.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(x.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mt.displayName=ft;var ir="ContextMenuGroup",lr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(on,{...c,...a,ref:e})});lr.displayName=ir;var cr="ContextMenuLabel",dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(sn,{...c,...a,ref:e})});dr.displayName=cr;var ur="ContextMenuItem",pt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(Jt,{...c,...a,ref:e})});pt.displayName=ur;var fr="ContextMenuCheckboxItem",mr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(an,{...c,...a,ref:e})});mr.displayName=fr;var pr="ContextMenuRadioGroup",xr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(ln,{...c,...a,ref:e})});xr.displayName=pr;var hr="ContextMenuRadioItem",gr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(cn,{...c,...a,ref:e})});gr.displayName=hr;var vr="ContextMenuItemIndicator",yr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(dn,{...c,...a,ref:e})});yr.displayName=vr;var Cr="ContextMenuSeparator",xt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(Yt,{...c,...a,ref:e})});xt.displayName=Cr;var wr="ContextMenuArrow",jr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(un,{...c,...a,ref:e})});jr.displayName=wr;var Nr="ContextMenuSubTrigger",br=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(fn,{...c,...a,ref:e})});br.displayName=Nr;var Sr="ContextMenuSubContent",Mr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(mn,{...c,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Mr.displayName=Sr;function je(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var Rr=lt,Dr=dt,Pr=ut,Er=mt,kr=pt,Tr=xt;function Ar(i){const e=J.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Rr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function Or(i){const e=J.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Dr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Fr(i){const e=J.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let c;e[3]!==s?(c=ee("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-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(Pr,{children:r.jsx(Er,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}function oe(i){const e=J.c(12);let s,a,c,m;e[0]!==i?({className:s,inset:a,variant:m,...c}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=c,e[4]=m):(s=e[1],a=e[2],c=e[3],m=e[4]);const x=m===void 0?"default":m;let p;e[5]!==s?(p=ee("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-default items-center gap-2 rounded-sm 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",s),e[5]=s,e[6]=p):p=e[6];let g;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==x?(g=r.jsx(kr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":x,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=x,e[11]=g):g=e[11],g}function rt(i){const e=J.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let c;e[3]!==s?(c=ee("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(Tr,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}const Ir="#d9a441";function Lr(i){const e=J.c(45),{node:s,depth:a,isExpanded:c,isSelected:m,isLoading:x,fileVisual:p,onOpen:g,onSelect:y,onNewFile:d,onNewFolder:h,onCopyPath:w,onCopyRelativePath:R,onRename:k,onDelete:v}=i,j=x===void 0?!1:x,U=s.kind==="directory",{Icon:S,color:D}=p,b=m&&"bg-accent";let C;e[0]!==b?(C=ee("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",b),e[0]=b,e[1]=C):C=e[1];const P=`${a*14+8}px`;let M;e[2]!==P?(M={paddingLeft:P},e[2]=P,e[3]=M):M=e[3];let V;e[4]!==g||e[5]!==y?(V=()=>{y(),g()},e[4]=g,e[5]=y,e[6]=V):V=e[6];let I;e[7]!==S||e[8]!==D||e[9]!==U||e[10]!==c||e[11]!==j?(I=U?r.jsxs(r.Fragment,{children:[j?r.jsx(se,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(_n,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(zn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Gn,{size:16,className:"shrink-0",style:{color:Ir}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(S,{size:16,className:"shrink-0",style:{color:D}})]}),e[7]=S,e[8]=D,e[9]=U,e[10]=c,e[11]=j,e[12]=I):I=e[12];let z;e[13]!==s.name?(z=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=z):z=e[14];let L;e[15]!==C||e[16]!==M||e[17]!==V||e[18]!==I||e[19]!==z?(L=r.jsx(Or,{asChild:!0,children:r.jsxs("button",{type:"button",className:C,style:M,onClick:V,children:[I,z]})}),e[15]=C,e[16]=M,e[17]=V,e[18]=I,e[19]=z,e[20]=L):L=e[20];let T;e[21]!==d?(T=r.jsx(oe,{onSelect:d,children:"New File"}),e[21]=d,e[22]=T):T=e[22];let G;e[23]!==h?(G=r.jsx(oe,{onSelect:h,children:"New Folder"}),e[23]=h,e[24]=G):G=e[24];let H;e[25]===Symbol.for("react.memo_cache_sentinel")?(H=r.jsx(rt,{}),e[25]=H):H=e[25];let K;e[26]!==w?(K=r.jsx(oe,{onSelect:w,children:"Copy Path"}),e[26]=w,e[27]=K):K=e[27];let A;e[28]!==R?(A=r.jsx(oe,{onSelect:R,children:"Copy Relative Path"}),e[28]=R,e[29]=A):A=e[29];let E;e[30]===Symbol.for("react.memo_cache_sentinel")?(E=r.jsx(rt,{}),e[30]=E):E=e[30];let $;e[31]!==k?($=r.jsx(oe,{onSelect:k,children:"Rename"}),e[31]=k,e[32]=$):$=e[32];let _;e[33]!==v?(_=r.jsx(oe,{variant:"destructive",onSelect:v,children:"Delete"}),e[33]=v,e[34]=_):_=e[34];let O;e[35]!==T||e[36]!==G||e[37]!==K||e[38]!==A||e[39]!==$||e[40]!==_?(O=r.jsxs(Fr,{className:"w-52",children:[T,G,H,K,A,E,$,_]}),e[35]=T,e[36]=G,e[37]=K,e[38]=A,e[39]=$,e[40]=_,e[41]=O):O=e[41];let q;return e[42]!==O||e[43]!==L?(q=r.jsxs(Ar,{children:[L,O]}),e[42]=O,e[43]=L,e[44]=q):q=e[44],q}hn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const ot=200,$r=2,_r=250,st=200;function zr(i,e,s,a){return`/api/${i}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${a}`}function Gr(i){const e=J.c(9),{text:s,query:a}=i;let c,m,x;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:g,segments:y}=qn(s,a);c="truncate font-mono text-muted-foreground",m=g&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),x=y.map(Kr),e[0]=a,e[1]=s,e[2]=c,e[3]=m,e[4]=x}else c=e[2],m=e[3],x=e[4];let p;return e[5]!==c||e[6]!==m||e[7]!==x?(p=r.jsxs("span",{className:c,children:[m,x]}),e[5]=c,e[6]=m,e[7]=x,e[8]=p):p=e[8],p}function Kr(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function Oa({orgSlug:i,virtualMcpId:e,branch:s,openPath:a}){const[c,m]=u.useState({files:[],directories:[],truncated:!1}),{files:x,directories:p}=c,[g,y]=u.useState(new Set),[d,h]=u.useState(null),[w,R]=u.useState(null),[k,v]=u.useState([]),[j,U]=u.useState(""),[S,D]=u.useState(null),[b,C]=u.useState(null),[P,M]=u.useState(!1),[V,I]=u.useState(!1),[z,L]=u.useState(!1),[T,G]=u.useState(!1),[,H]=u.useState(new Set),[K,A]=u.useState(new Set),E=u.useRef(0),$=u.useRef(null),_=u.useRef(new Set),O=u.useRef(new Map),q=u.useRef(null),te=u.useRef(0),be=u.useRef(null),ae=u.useRef(null),Se=u.useRef(null);function $e(t){H(n=>{const o=typeof t=="function"?t(n):t;return _.current=o,o})}const[ie,ne]=u.useState(new Map),Me=u.useRef(null),[Y,fe]=u.useState(null),{sendMessage:ht}=jn(),{openSidePanel:gt}=Nn(),me=pn(),[F,X]=u.useState(null),[Re,De]=u.useState(null),[pe,xe]=u.useState(!1);async function Z(t,n){const o=await fetch(zr(i,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function he(){me.invalidateQueries({queryKey:tt(i,e,s)})}function _e(t,n){navigator.clipboard.writeText(n).then(()=>W.success(`${t} copied`),()=>W.error(`Failed to copy ${t.toLowerCase()}`))}function vt(t){const n=Zn(t);if(!n)return;const o=`${i}/${e}/${s}`;me.setQueryData(Je.decofile(o),l=>{if(!l)return l;const{[n]:f,...N}=l;return N}),me.invalidateQueries({queryKey:Je.liveMeta(i,e,s)})}function yt(t){const n=t.kind==="file"?[t.path]:x.filter(o=>o.startsWith(".deco/blocks/")).map(o=>ye(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)vt(o)}function Ct(t){const n=ye(t);return k.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=ie.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function ze(t){v(n=>n.map(o=>t(o)).filter(o=>o!==null)),h(n=>n&&t(n)),ne(n=>{const o=new Map;for(const[l,f]of n){const N=t(l);N&&o.set(N,f)}return o}),R(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function wt(t){const n=ye(t);R(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),ze(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t){if(!F)return;const n=we(F.parentDir,t);if(Ie(n,x,p))throw new Error(`"${t}" already exists`);await Z("write",{path:Q(n),content:""}),await le(),await he(),X(null),ce(n)}async function Nt(t){if(!F)return;const n=we(F.parentDir,t);if(Ie(n,x,p))throw new Error(`"${t}" already exists`);const o=Q(n);await Z("mkdir",{path:o}),m(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await le(),await he(),X(null),y(l=>{const f=new Set(l);for(const N of Te(n))f.add(N);return f.add(n),f}),R({name:t,path:n,kind:"directory",children:[]})}async function bt(t){if(!F)return;const n=F.node.path,o=Ce(n),l=we(o,t);if(l===n){X(null);return}if(Ie(l,x,p))throw new Error(`"${t}" already exists`);await Z("rename",{from:Q(n),to:Q(l)}),ze(f=>f===n?l:f.startsWith(`${n}/`)?we(l,f.slice(n.length+1)):f),await le(),await he(),X(null)}async function St(t){xe(!0);try{await Z("unlink",{path:Q(t.path),recursive:t.kind==="directory"}),yt(t),wt(t.path),await le(),await he(),De(null),W.success(`Deleted "${t.name}"`)}catch(n){W.error(n instanceof Error?n.message:"Delete failed")}finally{xe(!1)}}async function Mt(t){const n=Xn(t);if(n){W.error(n);return}xe(!0);try{F?.mode==="new-file"?(await jt(t),W.success(`Created "${t}"`)):F?.mode==="new-folder"?(await Nt(t),W.success(`Created folder "${t}"`)):F?.mode==="rename"&&(await bt(t),W.success(`Renamed to "${t}"`))}catch(o){W.error(o instanceof Error?o.message:"Operation failed")}finally{xe(!1)}}const Ge=u.useRef(!1);Ge.current||(Ge.current=!0,$.current=le());const[Rt,Dt]=u.useState(null);if(a&&a!==Rt){Dt(a);const t=a;queueMicrotask(()=>{Kn(t)&&ce(t).catch(n=>{W.error(n instanceof Error?n.message:"Failed to open file")})})}async function Pe(t){const n=await Z("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ke(t,n,o){if(o!==E.current)return!1;let l=!1;return m(f=>{const N=n?er(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!N.truncated,{files:N.files,directories:N.directories,truncated:l}}),l&&W.warning("File list truncated — some files may be hidden"),l}async function Pt(t){const n=O.current.get(t);if(n)return n;const o=E.current,l=(async()=>{const f=await Pe({pattern:"**/*",path:Q(t),limit:ke}),N=Ke(f,!0,o);return!N&&o===E.current&&$e(de=>{const ge=new Set(de);return ge.add(t),ge}),N})();O.current.set(t,l);try{return await l}finally{O.current.delete(t)}}async function Be(t){if(!Fe(t,_.current))return!1;A(n=>new Set(n).add(t));try{return await Pt(t)}finally{A(n=>{const o=new Set(n);return o.delete(t),o})}}async function Et(t){const n=new Set(_.current);for(const o of Te(t)){if(!Fe(o,n))continue;if(await Be(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function le(){const t=++E.current;be.current=null,ae.current=null,O.current.clear(),L(!0),$e(new Set),y(new Set),A(new Set);try{const n=await Pe({pattern:"**/*",limit:ke,maxDepth:Bn});Ke(n,!1,t),G(!0)}catch{T&&W.error("Failed to refresh file tree")}finally{L(!1)}}async function Ue(t){if(!ie.get(t)?.loaded){ne(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await Z("read",{path:Q(t),full:!0}),l=Qn(o.content??"");ne(f=>{const N=new Map(f);return N.set(t,{savedContent:l,editorValue:l,loaded:!0}),N})}catch{}}}function kt(){te.current++,D(null),C(null),M(!1),I(!1)}async function Tt(){const t=E.current,n=be.current;if(n&&n.generation===t)return n.files;const o=ae.current;if(o&&o.generation===t)return o.promise;const l=(async()=>{const f=await Pe({pattern:"**/*",limit:ke});return E.current===t&&(be.current={generation:t,files:f.files}),f.files})();ae.current={generation:t,promise:l};try{return await l}finally{ae.current?.generation===t&&(ae.current=null)}}async function At(t,n){try{const o=await Tt();if(n!==te.current)return;D(Jn(o,t,st))}catch{if(n!==te.current)return;D([])}}async function Ot(t,n){M(!0);try{const o=await Z("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:ot});if(n!==te.current)return;C(Yn(o.results??"")),I((o.matchCount??0)>=ot)}catch{if(n!==te.current)return;C([]),I(!1)}finally{n===te.current&&M(!1)}}function Ft(t){const n=t.trim(),o=++te.current;At(n,o),n.length<$r?(C(null),M(!1),I(!1)):Ot(n,o)}function It(t){if(U(t),q.current&&clearTimeout(q.current),!t.trim()){kt();return}q.current=setTimeout(()=>{Ft(t)},_r)}function Ve(t){const n=Se.current;if(!n||n.path!==d)return;Se.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function Lt(t){Se.current={path:t.path,line:t.line};const n=d===t.path&&ie.get(t.path)?.loaded;ce(t.path),n&&Me.current&&Ve(Me.current)}async function $t(t,n){try{await Z("write",{path:Q(t),content:n}),ve("file saved via sandbox /write",{path:t}),me.invalidateQueries({queryKey:tt(i,e,s)});try{const o=await bn(i,e,s);ve("git status after save",o)}catch(o){ve("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}ne(o=>{const l=new Map(o),f=l.get(t);return f&&l.set(t,{...f,savedContent:n}),l})}catch(o){ve("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){h(t),R({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),fe(null),k.includes(t)||v(n=>[...n,t]),Ue(t)}function zt(t){v(n=>{const o=n.filter(l=>l!==t);return d===t&&h(o[o.length-1]??null),o}),ne(n=>{const o=new Map(n);return o.delete(t),o})}function He(t){y(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Gt(t){if(Fe(t,_.current))try{if(await Be(t))return}catch(n){W.error(n instanceof Error?n.message:"Failed to load folder");return}He(t)}async function Kt(t,n){if(n){He(t);return}await Gt(t)}async function ce(t){await $.current,await Et(t);const n=Te(t);y(o=>{const l=new Set(o);for(const f of n)l.add(f);return l}),_t(t)}function Bt(){return w?.kind==="directory"?w.path:w?.kind==="file"?Ce(w.path):d?Ce(d):"/"}function We(t){const n=Bt();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Ut=Un(x,p),qe=Vn(Ut,g),Ee=S?.length??0,Qe=Hn(b??[]),Xe=b?.length??0,re=d?ie.get(d):null,Vt=re?.loaded&&re.editorValue!==re.savedContent,Ht=Re?Ct(Re.path):[],Wt=(t,n)=>{Me.current=t,Ve(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await $t(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const f=l.getValueInRange(o);fe({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function qt(t){if(!Y)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${Y.filePath}\``,`**Lines:** ${Y.lineStart}–${Y.lineEnd}`];if(Y.selectedCode){const o=Oe(Y.filePath),l=Y.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),gt("chat"),ht({parts:[{type:"text",text:n.join(`
|
|
2
|
+
`)}]}),fe(null)}return z&&!T?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(gn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:j,onChange:t=>It(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"})]}),r.jsxs(Ye,{children:[r.jsx(Ze,{asChild:!0,children:r.jsx(Ne,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>We("new-file"),children:r.jsx(vn,{size:14})})}),r.jsx(et,{side:"bottom",children:"New file"})]}),r.jsxs(Ye,{children:[r.jsx(Ze,{asChild:!0,children:r.jsx(Ne,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>We("new-folder"),children:r.jsx(yn,{size:14})})}),r.jsx(et,{side:"bottom",children:"New folder"})]})]}),r.jsx(wn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!j&&qe.map(t=>{const{node:n,depth:o}=t,l=n.kind==="directory",f=g.has(n.path),N=w?.path===n.path,de=Wn(n.path,n.kind),ge=l&&K.has(n.path);return r.jsx(Lr,{node:n,depth:o,isExpanded:f,isSelected:N,isLoading:ge,fileVisual:Ae(n.name),onSelect:()=>R(n),onOpen:()=>{l?Kt(n.path,f):ce(n.path)},onNewFile:()=>X({mode:"new-file",node:n,parentDir:de}),onNewFolder:()=>X({mode:"new-folder",node:n,parentDir:de}),onCopyPath:()=>_e("Path",ye(n.path)),onCopyRelativePath:()=>_e("Relative path",Q(n.path)),onRename:()=>X({mode:"rename",node:n,parentDir:de}),onDelete:()=>De(n)},n.path)}),!j&&T&&qe.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"No files found"}),j&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:"Files"}),Ee>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Ee,Ee>=st?"+":""]})]}),S!==null&&S.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"No file names match"}),S?.map(t=>{const n=t.split("/").pop()??t,o=Ce(t),{Icon:l,color:f}=Ae(n),N=d===t;return r.jsxs("button",{type:"button",onClick:()=>{ce(t)},title:t,className:ee("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",N&&"bg-accent"),children:[r.jsx(l,{size:14,className:ee("shrink-0",f)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),j&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:"In files"}),Xe>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Xe,V?"+":""]}),P&&r.jsx(se,{size:10,className:"animate-spin"})]}),!P&&b!==null&&Qe.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"No matches in file contents"}),Qe.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:l}=Ae(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:ee("shrink-0",l)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(f=>r.jsxs("button",{type:"button",onClick:()=>Lt(f),title:`${t.path}:${f.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:f.line}),r.jsx(Gr,{text:f.text,query:j})]},`${t.path}:${f.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[k.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:k.map(t=>{const n=ie.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,l=d===t,f=t.split("/").pop()??t;return r.jsxs("div",{className:ee("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",l?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{h(t),Ue(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":l,children:[r.jsx("span",{className:"truncate max-w-32",children:f}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:N=>{N.stopPropagation(),zt(t)},children:r.jsx(Cn,{size:12})})]},t)})}),Y&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.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 o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&qt(o.value)},children:[r.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"&&fe(null)}}),r.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:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:"Send"}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&re?.loaded?r.jsx(xn,{language:Oe(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:re.editorValue,path:d,onChange:t=>{const n=d;n&&ne(o=>{const l=new Map(o),f=l.get(n);return f&&l.set(n,{...f,editorValue:t??""}),l})},onMount:Wt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{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}}},d):d&&!re?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[Vt?"Modified":"Saved"," ·"," ",Oe(d)]})]})]}),r.jsx(nr,{open:F!==null,mode:F?.mode??"new-file",initialName:F?.mode==="rename"?F.node.name:"",parentLabel:F&&F.mode!=="rename"?F.parentDir==="/"?"/":Q(F.parentDir):void 0,isPending:pe,onSubmit:Mt,onOpenChange:t=>{!t&&!pe&&X(null)}}),r.jsx(rr,{deleteTarget:Re,deleteDirtyPaths:Ht,fsActionPending:pe,onOpenChange:t=>{!t&&!pe&&De(null)},onConfirm:t=>{St(t)}})]})}export{Oa as FileExplorer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bx as zl,j as q,aM as lt,bM as zn,r as Ve,F as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-
|
|
1
|
+
import{bx as zl,j as q,aM as lt,bM as zn,r as Ve,F as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-ChVU-OyZ.js";import{i as zb}from"./ChevronUp-BXYPfZy1.js";import{a as jb}from"./Copy01-Dhc1Bhgj.js";import{e as S0,g as y0,f as A0,a as _0}from"./dialog-Cau5Is8O.js";import{n as I0}from"./Globe01-ksihujx5.js";import{k as k0,n as R0}from"./ZoomOut-B6Ae7_Rx.js";import{u as N0}from"./use-mobile-Ct_iG84O.js";import{h as C0}from"./tab-id-BijBBRwE.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 Vb(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")},v0=/^(?:[ \t]*(?:\n|$))+/,w0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x0=/^ {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+|$)/,O0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,Yb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wb=le(Yb).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(),L0=le(Yb).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]+)*)/,D0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P0=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]*?(?:-->|$))/,F0=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(),Kb=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(),B0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kb).getRegex(),Xl={blockquote:B0,code:w0,def:M0,fences:x0,heading:O0,hr:_n,html:F0,lheading:Wb,list:P0,newline:v0,paragraph:Kb,table:ln,text:D0},Mc=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(),U0={...Xl,lheading:L0,table:Mc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mc).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()},H0={...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",Wb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},q0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,G0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xb=/^( {2,}|\\)\n(?!\s*$)/,$0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tr=/[\p{P}\p{S}]/u,Zl=/[\s\p{P}\p{S}]/u,Zb=/[^\s\p{P}\p{S}]/u,z0=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zl).getRegex(),Qb=/(?!~)[\p{P}\p{S}]/u,j0=/(?!~)[\s\p{P}\p{S}]/u,V0=/(?:[^\s\p{P}\p{S}]|~)/u,Y0=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Jb=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,W0=le(Jb,"u").replace(/punct/g,tr).getRegex(),K0=le(Jb,"u").replace(/punct/g,Qb).getRegex(),eE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",X0=le(eE,"gu").replace(/notPunctSpace/g,Zb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),Z0=le(eE,"gu").replace(/notPunctSpace/g,V0).replace(/punctSpace/g,j0).replace(/punct/g,Qb).getRegex(),Q0=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Zb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),J0=le(/\\(punct)/,"gu").replace(/punct/g,tr).getRegex(),eS=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(),tS=le(Kl).replace("(?:-->|$)","-->").getRegex(),nS=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",tS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jn=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rS=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",jn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tE=le(/^!?\[(label)\]\[(ref)\]/).replace("label",jn).replace("ref",Wl).getRegex(),nE=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wl).getRegex(),aS=le("reflink|nolink(?!\\()","g").replace("reflink",tE).replace("nolink",nE).getRegex(),Ql={_backpedal:ln,anyPunctuation:J0,autolink:eS,blockSkip:Y0,br:Xb,code:G0,del:ln,emStrongLDelim:W0,emStrongRDelimAst:X0,emStrongRDelimUnd:Q0,escape:q0,link:rS,nolink:nE,punctuation:z0,reflink:tE,reflinkSearch:aS,tag:nS,text:$0,url:ln},iS={...Ql,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",jn).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jn).getRegex()},_l={...Ql,emStrongRDelimAst:Z0,emStrongLDelim:K0,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.!#$%&'*+\/=?_`{\|}~-]+@)))/},oS={..._l,br:le(Xb).replace("{2,}","*").getRegex(),text:le(_l.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xn={normal:Xl,gfm:U0,pedantic:H0},Jt={normal:Ql,gfm:_l,breaks:oS,pedantic:iS},sS={"&":"&","<":"<",">":">",'"':""","'":"'"},Pc=e=>sS[e];function Je(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,Pc)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,Pc);return e}function Fc(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function Bc(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 uS(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 Uc(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 lS(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{c as a,e as o,j as i,N as l}from"./index-
|
|
1
|
+
import{c as a,e as o,j as i,N as l}from"./index-ChVU-OyZ.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{dC as C,c as d,j as c,ah as j,r as f,l as p,bd as b,dD as h,dE as v}from"./index-
|
|
1
|
+
import{dC as C,c as d,j as c,ah as j,r as f,l as p,bd as b,dD as h,dE as v}from"./index-ChVU-OyZ.js";import{L as N}from"./label-B0y8QCDV.js";const E=C,g=f.createContext({}),M=t=>{const e=d.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=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=h();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=v(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},$=f.createContext({});function w(t){const e=d.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=f.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=d.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=d.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=d.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=d.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{b as K,C as B,n as M,M as Q,J as Z,d as V,p as T,t as w,K as L,j as n,ah as P,H,I as k,c as E,r as I,B as Y,D as q,s as J}from"./index-
|
|
1
|
+
import{b as K,C as B,n as M,M as Q,J as Z,d as V,p as T,t as w,K as L,j as n,ah as P,H,I as k,c as E,r as I,B as Y,D as q,s as J}from"./index-ChVU-OyZ.js";import{P as N}from"./index-g7-OlEFb.js";import{u as W}from"./use-org-auth-client-D56uCvOP.js";import{u as X}from"./use-debounced-autosave-DHuzBJDR.js";import{A as ee}from"./avatar-Bn5SQjrH.js";import{I as $}from"./input-uZBz0Ae6.js";import{S as G,a as U,b as A,c as te}from"./settings-section-BgqCOJdo.js";import{D as ne}from"./domain-settings-BccLKguM.js";import{u as ae}from"./studio-tools-qnNLvfkT.js";import{c as oe,b as se,d as ie,A as re,e as le,g as ce,a as ue,f as de}from"./alert-dialog-CyfZzRRb.js";import{R as me}from"./require-capability-CwO8nG54.js";import"./sidebar-DLKRS-NI.js";import"./LayoutLeft-GINu9IMu.js";import"./use-mobile-Ct_iG84O.js";import"./X-7k914DVb.js";import"./tooltip-3rRAGxxZ.js";import"./User01-C0pb1kSr.js";import"./card-BUDVioew.js";import"./ArrowUpRight-DAqa4GMV.js";import"./badge-DnmJAMhi.js";import"./select-Clq5_oBS.js";import"./ChevronUp-BXYPfZy1.js";import"./ChevronDown-Bok1b6fK.js";import"./use-capability-Cvcdi48t.js";import"./access-gate-C4uPZD7a.js";import"./capability-load-error-eP-F8ilX.js";const ge=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function fe(e){return typeof e=="string"&&ge.has(e.trim().toLowerCase())}const pe=H({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").refine(e=>!fe(e),"This organization URL is reserved by Studio"),logo:k().optional()});function he(e){const t=E.c(13),{value:v,onChange:h,name:s,disabled:d}=e,m=I.useRef(null);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>m.current?.click(),t[0]=l):l=t[0];const r=l;let c;t[1]!==h?(c=x=>{const j=x.target.files?.[0];if(!j)return;if(j.size>2097152){w.error("Image must be smaller than 2MB");return}const u=new FileReader;u.onerror=xe,u.onloadend=()=>{u.result&&h(u.result),m.current&&(m.current.value="")},u.readAsDataURL(j)},t[1]=h,t[2]=c):c=t[2];const a=c;let o;t[3]!==d||t[4]!==a?(o=n.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:d}),t[3]=d,t[4]=a,t[5]=o):o=t[5];const i=v||void 0,p=s??"?";let g;t[6]!==i||t[7]!==p?(g=n.jsx(ee,{url:i,fallback:p,shape:"square",size:"base"}),t[6]=i,t[7]=p,t[8]=g):g=t[8];let f;return t[9]!==d||t[10]!==o||t[11]!==g?(f=n.jsxs("button",{type:"button",onClick:r,disabled:d,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[o,g]}),t[9]=d,t[10]=o,t[11]=g,t[12]=f):f=t[12],f}function xe(){return w.error("Failed to read image")}function je(){const e=K(),{org:t}=B(),v=W(),h=M(),s=Q({resolver:Z(pe),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),d=V({mutationFn:async a=>{const o={name:a.name,slug:a.slug};a.logo&&(o.logo=a.logo);const i=await v.organization.update({data:o});if(i?.error)throw new Error(i.error.message||"Failed to update organization");return i},onSuccess:(a,o)=>{T("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),h.invalidateQueries({queryKey:L.organizations()}),h.invalidateQueries({queryKey:L.activeOrganization(t.slug)}),w.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,o)=>{T("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:a instanceof Error?a.message:String(a)}),w.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:m,flush:l}=X({save:async()=>{const a=s.control._formState.dirtyFields;if(Object.keys(a).length===0||!await s.trigger())return;const i=s.getValues(),p=s.control._defaultValues;s.reset(i,{keepValues:!0});try{await d.mutateAsync(i)}catch{s.reset(p,{keepValues:!0})}}}),r=s.formState.errors,c=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(G,{children:n.jsxs(U,{children:[n.jsx(A,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(he,{value:s.watch("logo"),onChange:a=>{s.setValue("logo",a??"",{shouldDirty:!0}),l()},name:s.watch("name")})}),n.jsx(A,{title:"Name",action:n.jsx(P,{control:s.control,name:"name",render:({field:a})=>n.jsx($,{id:"org-name",...a,onChange:o=>{a.onChange(o),m()},onBlur:()=>{a.onBlur(),l()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(A,{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:[c&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:c}),n.jsx(P,{control:s.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:o=>{const i=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");s.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),m()},onBlur:()=>{a.onBlur(),l()}})})]})}),(r.name||r.slug||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&n.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function ve(){const e=E.c(42),{org:t}=B(),[v,h]=I.useState(!1),[s,d]=I.useState(""),m=ae();let l;e[0]!==t.id||e[1]!==m?(l=async()=>{await m.call("ORGANIZATION_DELETE",{id:t.id})},e[0]=t.id,e[1]=m,e[2]=l):l=e[2];let r;e[3]!==t.id||e[4]!==t.slug?(r=()=>{T("organization_deleted",{organization_id:t.id}),localStorage.getItem(q.lastOrgSlug())===t.slug&&localStorage.removeItem(q.lastOrgSlug()),J(),w.success("Organization deleted"),window.location.href="/"},e[3]=t.id,e[4]=t.slug,e[5]=r):r=e[5];let c;e[6]!==l||e[7]!==r?(c={mutationFn:l,onSuccess:r,onError:be},e[6]=l,e[7]=r,e[8]=c):c=e[8];const a=V(c);let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=()=>h(!0),e[9]=o):o=e[9];let i;e[10]!==a.isPending?(i=n.jsx(G,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(U,{className:"border-destructive/40",children:n.jsx(A,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(Y,{variant:"destructive",size:"sm",onClick:o,disabled:a.isPending,children:"Delete"})})})}),e[10]=a.isPending,e[11]=i):i=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=O=>{h(O),O||d("")},e[12]=p):p=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(oe,{children:"Delete Organization?"}),e[13]=g):g=e[13];let f;e[14]!==t.name?(f=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[14]=t.name,e[15]=f):f=e[15];let x;e[16]!==t.name?(x=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[16]=t.name,e[17]=x):x=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=O=>d(O.target.value),e[18]=j):j=e[18];let u;e[19]!==s||e[20]!==t.name?(u=n.jsx($,{value:s,onChange:j,placeholder:t.name,autoFocus:!0}),e[19]=s,e[20]=t.name,e[21]=u):u=e[21];let b;e[22]!==u||e[23]!==f||e[24]!==x?(b=n.jsxs(se,{children:[g,n.jsx(ie,{asChild:!0,children:n.jsxs("div",{children:[f,x,u]})})]}),e[22]=u,e[23]=f,e[24]=x,e[25]=b):b=e[25];let _;e[26]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(re,{children:"Cancel"}),e[26]=_):_=e[26];let y;e[27]!==a?(y=()=>a.mutate(),e[27]=a,e[28]=y):y=e[28];const R=s!==t.name||a.isPending,F=a.isPending?"Deleting…":"Delete organization";let S;e[29]!==y||e[30]!==R||e[31]!==F?(S=n.jsxs(le,{children:[_,n.jsx(ce,{onClick:y,disabled:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:F})]}),e[29]=y,e[30]=R,e[31]=F,e[32]=S):S=e[32];let z;e[33]!==b||e[34]!==S?(z=n.jsxs(ue,{children:[b,S]}),e[33]=b,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==v||e[37]!==z?(C=n.jsx(de,{open:v,onOpenChange:p,children:z}),e[36]=v,e[37]=z,e[38]=C):C=e[38];let D;return e[39]!==C||e[40]!==i?(D=n.jsxs(n.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=D):D=e[41],D}function be(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function ye(){const e=E.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(N,{children:n.jsx(N.Content,{children:n.jsx(N.Body,{children:n.jsxs(te,{children:[n.jsx(N.Title,{children:"Organization"}),n.jsx(je,{}),n.jsx(ne,{}),n.jsx(ve,{})]})})})}),e[0]=t):t=e[0],t}function Ze(){const e=E.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(me,{capability:"org:manage",area:"general settings",children:n.jsx(ye,{})}),e[0]=t):t=e[0],t}export{Ze as default};
|
package/dist/client/assets/{github-repo-picker-lNnkzc73.js → github-repo-picker-xzofSvXi.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as B,a as Y,n as $,r as T,ac as H,c as R,j as t,i as z,d as Q,t as O,dF as W,K as G,m as X,B as Z,l as F,v as ee,w as te}from"./index-DP7q2sf-.js";import{D as ne,a as se,d as oe,e as ie}from"./dialog-BTEMEut8.js";import{C as re}from"./collection-search-p4lrVXL4.js";import{u as le}from"./use-debounced-value-DkIFgDw4.js";import{b as M,u as ae}from"./use-connection-DCYnbXZ5.js";import{u as U,S as V}from"./use-mcp-client-CP7vVNI8.js";import{a as K}from"./authenticate-and-persist-oauth-DMiwiAXs.js";import{b as J}from"./Settings02-CbZwTwjv.js";import{L as ce}from"./agent-icon-aZ0ttVTI.js";import{u as ue,G as P}from"./use-registry-app-CKPn88US.js";import{e as de}from"./extract-connection-data-nZ_Xsysx.js";import{c as me}from"./use-navigate-to-agent-CxF1WPIb.js";import{p as q,f as fe}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as xe}from"./github-repo-scope-DjMZbiKa.js";const ge="deco/mcp-github";function he(N){const{org:e}=B(),{data:i}=Y.useSession(),f=M(),v=$(),[g,s]=T.useState("idle"),[h,x]=T.useState(null),[p,C]=T.useState(null),{data:b,isLoading:l}=ue(ge,{enabled:N.enabled}),o=T.useRef(!1);N.enabled&&b&&!l&&!o.current&&i?.user?.id&&g==="idle"&&(o.current=!0,a());async function a(){if(!(!b||!i?.user?.id||!e))try{s("installing"),x(null);const r=de(b,e.id,i.user.id,{remoteIndex:0});if(!r.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:y}=await f.create.mutateAsync(r);s("authenticating");const d=await K({connectionId:y,orgId:e.id,orgSlug:e.slug,persistFallback:n=>f.update.mutateAsync({id:y,data:{connection_token:n}}).then(()=>{})});if(d.ran&&!d.ok){try{await f.delete.mutateAsync(y)}catch{}throw new Error(d.error&&d.error!=="no token received"?d.error:"No token received from GitHub")}H(v,e.id),C(r),s("ready")}catch(r){x(r instanceof Error?r.message:String(r)),s("error")}}function c(){s("idle"),x(null),C(null),o.current=!1}return N.enabled&&l&&g==="idle"?{status:"installing",error:null,connection:null,retry:c}:{status:g,error:h,connection:p,retry:c}}function Oe(N){const e=R.c(22),{open:i,onOpenChange:f,title:v,onImportComplete:g,mode:s}=N,h=s===void 0?"agent":s,x=v??(h==="connection"?"Add repo":"Import from GitHub"),[p,C]=T.useState(null);let b;e[0]!==x?(b=t.jsx(ne,{className:"sr-only",children:t.jsx(se,{children:x})}),e[0]=x,e[1]=b):b=e[1];let l;e[2]!==x||e[3]!==p?(l=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:p?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(J,{size:16})}),t.jsx("img",{src:p.avatarUrl,alt:p.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:p.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(P,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:x})]})}),e[2]=x,e[3]=p,e[4]=l):l=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=o):o=e[5];let a;e[6]!==f?(a=()=>f(!1),e[6]=f,e[7]=a):a=e[7];let c;e[8]!==h||e[9]!==g||e[10]!==i||e[11]!==p||e[12]!==a?(c=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:o,children:t.jsx(pe,{open:i,onComplete:a,selectedInstallation:p,onSelectInstallation:C,onImportComplete:g,mode:h})})}),e[8]=h,e[9]=g,e[10]=i,e[11]=p,e[12]=a,e[13]=c):c=e[13];let r;e[14]!==b||e[15]!==l||e[16]!==c?(r=t.jsxs(oe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[b,l,c]}),e[14]=b,e[15]=l,e[16]=c,e[17]=r):r=e[17];let u;return e[18]!==f||e[19]!==i||e[20]!==r?(u=t.jsx(ie,{open:i,onOpenChange:f,children:r}),e[18]=f,e[19]=i,e[20]=r,e[21]=u):u=e[21],u}function pe({open:N,onComplete:e,selectedInstallation:i,onSelectInstallation:f,onImportComplete:v,mode:g="agent"}){const{org:s}=B(),h=$(),x=me(),[p,C]=T.useState(null),b=ae({slug:"mcp-github"}),l=xe(b),o=he({enabled:N&&l.length===0}),a=l.length===1?l[0]??null:p,c=U({connectionId:a?.id??"",orgId:s.id,orgSlug:s.slug}),r=U({connectionId:V,orgId:s.id,orgSlug:s.slug}),u=async(n,j)=>{try{const k=await c.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:j}});if(k.isError)return null;const I=k.content?.find(m=>m.type==="resource")?.resource?.text;if(!I)return null;try{const m=JSON.parse(I);return typeof m=="string"?m:JSON.stringify(m)}catch{return I}}catch{return null}},y=(n,j)=>{Promise.all([u(j,"AGENTS.md"),u(j,"CLAUDE.md")]).then(async([S,k])=>{const w=S??k??null;w&&(await r.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:w}}}}),H(h,s.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},d=Q({mutationFn:async n=>{if(!a||!i)throw new Error("No GitHub connection or installation");const j=i.installationId;if(g==="connection"){const{childConnectionId:w}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:I=>c.callTool(I),selfCallTool:I=>r.callTool(I),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:w,item:null}}const{childConnectionId:S}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>r.callTool(w)});let k=null;try{const w=await r.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:j,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),I=w.structuredContent??w,m=I.item?.id;if(!I.item||!m)throw new Error("Failed to create the imported agent");return k=m,{virtualMcpId:m,repo:n,connectionId:S,item:I.item}}catch(w){throw k&&await r.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:k}}).catch(()=>{}),await r.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),w}},onSuccess:({virtualMcpId:n,repo:j,connectionId:S,item:k})=>{if(g==="connection"||!n||!k){H(h,s.id),W(h,s.id),O.success(`Added ${j.name}`),e();return}if(h.setQueryData(G.collectionItem(r,s.id,"","VIRTUAL_MCP",n),{item:k}),H(h,s.id),y(n,j),v){v({virtualMcpId:n,repo:j,connectionId:S});return}O.success(`Imported ${j.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),x(n)},onError:n=>{O.error("Failed to import repo: "+(n instanceof Error?n.message:"Unknown error"))}});return o.status==="installing"||o.status==="authenticating"?t.jsx(D,{status:o.status,error:null,retry:o.retry}):o.status==="error"?t.jsx(D,{status:"error",error:o.error,retry:o.retry}):l.length===0&&o.status==="idle"?t.jsx(D,{status:"installing",error:null,retry:o.retry}):l.length>1&&!a?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),l.map(n=>t.jsxs("button",{type:"button",onClick:()=>C(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(P,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):a?i?t.jsx(Ne,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,installation:i,onSelectRepo:n=>d.mutate(n),isSaving:d.isPending}):t.jsx(be,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,onSelect:f,showBackButton:l.length>1,onBack:()=>C(null)}):null}function be(N){const e=R.c(47),{connectionId:i,orgId:f,orgSlug:v,onSelect:g,showBackButton:s,onBack:h}=N;let x;e[0]!==f||e[1]!==v?(x={connectionId:V,orgId:f,orgSlug:v},e[0]=f,e[1]=v,e[2]=x):x=e[2];const p=U(x),C=$(),b=M();let l;e[3]!==i||e[4]!==f?(l=G.githubUserOrgs(f,i),e[3]=i,e[4]=f,e[5]=l):l=e[5];let o;e[6]!==i||e[7]!==p?(o=()=>fe(m=>p.callTool(m),i),e[6]=i,e[7]=p,e[8]=o):o=e[8];let a;e[9]!==l||e[10]!==o?(a={queryKey:l,queryFn:o},e[9]=l,e[10]=o,e[11]=a):a=e[11];const c=X(a);let r;e[12]!==b||e[13]!==i||e[14]!==c||e[15]!==f||e[16]!==v||e[17]!==C?(r={mutationFn:async()=>{const m=await K({connectionId:i,orgId:f,orgSlug:v,persistFallback:E=>b.update.mutateAsync({id:i,data:{connection_token:E}}).then(je)});if(m.ran&&!m.ok)throw new Error(m.error??"no token received");const _=new URL(`/api/${v}/mcp/${i}`,window.location.origin);await C.invalidateQueries({queryKey:G.isMCPAuthenticated(_.href,null)}),await C.invalidateQueries({queryKey:G.mcpClientPrefix()}),await c.refetch()},onError:ye},e[12]=b,e[13]=i,e[14]=c,e[15]=f,e[16]=v,e[17]=C,e[18]=r):r=e[18];const u=Q(r);if(c.isLoading){let m;return e[19]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=m):m=e[19],m}if(c.isError){let m,_;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),_=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=m,e[21]=_):(m=e[20],_=e[21]);let E;e[22]!==u?(E=()=>u.mutate(),e[22]=u,e[23]=E):E=e[23];let A;e[24]!==u.isPending?(A=u.isPending?t.jsx(z,{size:14,className:"animate-spin"}):t.jsx(P,{className:"size-3.5"}),e[24]=u.isPending,e[25]=A):A=e[25];let L;return e[26]!==u.isPending||e[27]!==E||e[28]!==A?(L=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[m,_,t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:E,disabled:u.isPending,children:[A,"Reconnect GitHub"]})]}),e[26]=u.isPending,e[27]=E,e[28]=A,e[29]=L):L=e[29],L}const y=c.data;if(!y)return null;let d;e[30]!==h||e[31]!==s?(d=s&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:h,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(J,{size:12}),"Change connection"]})}),e[30]=h,e[31]=s,e[32]=d):d=e[32];let n;if(e[33]!==y.installations||e[34]!==g){let m;e[36]!==g?(m=_=>t.jsxs("button",{type:"button",onClick:()=>g(_),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:_.avatarUrl,alt:_.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},_.installationId),e[36]=g,e[37]=m):m=e[37],n=y.installations.map(m),e[33]=y.installations,e[34]=g,e[35]=n}else n=e[35];let j;e[38]!==n?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:n}),e[38]=n,e[39]=j):j=e[39];const S=y.appSlug?`https://github.com/apps/${y.appSlug}/installations/new`:"https://github.com/settings/installations";let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=k):k=e[40];let w;e[41]!==S?(w=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",k]})}),e[41]=S,e[42]=w):w=e[42];let I;return e[43]!==w||e[44]!==d||e[45]!==j?(I=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[d,j,w]}),e[43]=w,e[44]=d,e[45]=j,e[46]=I):I=e[46],I}function ye(N){O.error("Failed to reconnect GitHub: "+(N instanceof Error?N.message:"Unknown error"))}function je(){}function Ne(N){const e=R.c(20),{connectionId:i,orgId:f,orgSlug:v,installation:g,onSelectRepo:s,isSaving:h}=N,[x,p]=T.useState(""),C=le(x,300),b=T.useDeferredValue(C),l=x!==b;let o;e[0]!==l||e[1]!==x?(o=t.jsx(re,{placeholder:"Search repositories...",value:x,onChange:p,isSearching:l}),e[0]=l,e[1]=x,e[2]=o):o=e[2];const a=l?"opacity-40":"opacity-100";let c;e[3]!==a?(c=F("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",a),e[3]=a,e[4]=c):c=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=r):r=e[5];let u;e[6]!==i||e[7]!==b||e[8]!==g||e[9]!==h||e[10]!==s||e[11]!==f||e[12]!==v?(u=t.jsx(T.Suspense,{fallback:r,children:t.jsx(ve,{connectionId:i,orgId:f,orgSlug:v,installation:g,query:b,onSelectRepo:s,isSaving:h})}),e[6]=i,e[7]=b,e[8]=g,e[9]=h,e[10]=s,e[11]=f,e[12]=v,e[13]=u):u=e[13];let y;e[14]!==c||e[15]!==u?(y=t.jsx("div",{className:c,children:u}),e[14]=c,e[15]=u,e[16]=y):y=e[16];let d;return e[17]!==o||e[18]!==y?(d=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[o,y]}),e[17]=o,e[18]=y,e[19]=d):d=e[19],d}function ve(N){const e=R.c(29),{connectionId:i,orgId:f,orgSlug:v,installation:g,query:s,onSelectRepo:h,isSaving:x}=N;let p;e[0]!==i||e[1]!==f||e[2]!==v?(p={connectionId:i,orgId:f,orgSlug:v},e[0]=i,e[1]=f,e[2]=v,e[3]=p):p=e[3];const C=U(p),b=g.type==="User"?"user":"org",l=s?`${b}:${g.login} ${s} in:name`:`${b}:${g.login}`;let o;e[4]!==i||e[5]!==g.login||e[6]!==f||e[7]!==s?(o=G.githubOrgRepos(f,i,g.login,s),e[4]=i,e[5]=g.login,e[6]=f,e[7]=s,e[8]=o):o=e[8];let a;e[9]!==C||e[10]!==l?(a=async d=>{const{signal:n}=d,S=(await C.callTool({name:"search_repositories",arguments:{query:l,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(we)},e[9]=C,e[10]=l,e[11]=a):a=e[11];let c;e[12]!==o||e[13]!==a?(c={queryKey:o,queryFn:a},e[12]=o,e[13]=a,e[14]=c):c=e[14];const{data:r}=ee(c);if(r.length===0){let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=d):d=e[15];let n;e[16]!==s?(n=s&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=s,e[17]=n):n=e[17];let j;return e[18]!==n?(j=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[d,n]}),e[18]=n,e[19]=j):j=e[19],j}let u;if(e[20]!==x||e[21]!==h||e[22]!==r){let d;e[24]!==x||e[25]!==h?(d=n=>t.jsxs("button",{type:"button",onClick:()=>h(n),disabled:x,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(P,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:n.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[n.private?t.jsx(te,{size:10}):t.jsx(ce,{size:10}),n.private?"Private":"Public"]})]},n.fullName),e[24]=x,e[25]=h,e[26]=d):d=e[26],u=r.map(d),e[20]=x,e[21]=h,e[22]=r,e[23]=u}else u=e[23];let y;return e[27]!==u?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:u}),e[27]=u,e[28]=y):y=e[28],y}function we(N){return{name:N.name,fullName:N.full_name,owner:N.full_name.split("/")[0]??"",url:N.html_url,private:N.private,description:N.description,updatedAt:N.updated_at}}function D(N){const e=R.c(33),{status:i,error:f,retry:v}=N;if(i==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let k;e[1]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=k):k=e[1];const w=f??"Something went wrong while connecting to GitHub.";let I;e[2]!==w?(I=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=I):I=e[3];let m;e[4]!==v?(m=t.jsx("button",{type:"button",onClick:v,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=v,e[5]=m):m=e[5];let _;return e[6]!==I||e[7]!==m?(_=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,I,m]}),e[6]=I,e[7]=m,e[8]=_):_=e[8],_}const g=i==="authenticating";let s;e[9]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-foreground"})}),e[9]=s):s=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{className:"relative size-10",children:[s,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=h):h=e[10];const x=g?"Authenticating with GitHub":"Setting up GitHub";let p;e[11]!==x?(p=t.jsx("p",{className:"text-sm font-medium",children:x}),e[11]=x,e[12]=p):p=e[12];const C=g?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let b;e[13]!==C?(b=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=b):b=e[14];let l;e[15]!==p||e[16]!==b?(l=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[p,b]}),e[15]=p,e[16]=b,e[17]=l):l=e[17];const o=g?"bg-muted-foreground/30":"bg-foreground animate-pulse";let a;e[18]!==o?(a=F("size-1.5 rounded-full",o),e[18]=o,e[19]=a):a=e[19];let c;e[20]!==a?(c=t.jsx("span",{className:a}),e[20]=a,e[21]=c):c=e[21];const r=g?"bg-foreground animate-pulse":"bg-muted-foreground/30";let u;e[22]!==r?(u=F("size-1.5 rounded-full",r),e[22]=r,e[23]=u):u=e[23];let y;e[24]!==u?(y=t.jsx("span",{className:u}),e[24]=u,e[25]=y):y=e[25];let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=d):d=e[26];let n;e[27]!==c||e[28]!==y?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,d]}),e[27]=c,e[28]=y,e[29]=n):n=e[29];let j;return e[30]!==n||e[31]!==l?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[h,l,n]}),e[30]=n,e[31]=l,e[32]=j):j=e[32],j}export{Oe as G,he as u};
|
|
1
|
+
import{C as B,a as Y,n as $,r as T,ac as H,c as R,j as t,i as z,d as Q,t as O,dF as W,K as G,m as X,B as Z,l as F,v as ee,w as te}from"./index-ChVU-OyZ.js";import{D as ne,a as se,d as oe,e as ie}from"./dialog-Cau5Is8O.js";import{C as re}from"./collection-search-r3OonCNB.js";import{u as le}from"./use-debounced-value-mZ3MWG36.js";import{b as M,u as ae}from"./use-connection-DvcdB9qs.js";import{u as U,S as V}from"./use-mcp-client-BBxkfM4k.js";import{a as K}from"./authenticate-and-persist-oauth-C-xqjPS1.js";import{b as J}from"./Settings02-CPjIYmr2.js";import{L as ce}from"./agent-icon-CiMMolqb.js";import{u as ue,G as P}from"./use-registry-app-CFJHFEvB.js";import{e as de}from"./extract-connection-data-BPEqz1oy.js";import{c as me}from"./use-navigate-to-agent-ncsERhWf.js";import{p as q,f as fe}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as xe}from"./github-repo-scope-DjMZbiKa.js";const ge="deco/mcp-github";function he(N){const{org:e}=B(),{data:i}=Y.useSession(),f=M(),v=$(),[g,s]=T.useState("idle"),[h,x]=T.useState(null),[p,C]=T.useState(null),{data:b,isLoading:l}=ue(ge,{enabled:N.enabled}),o=T.useRef(!1);N.enabled&&b&&!l&&!o.current&&i?.user?.id&&g==="idle"&&(o.current=!0,a());async function a(){if(!(!b||!i?.user?.id||!e))try{s("installing"),x(null);const r=de(b,e.id,i.user.id,{remoteIndex:0});if(!r.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:y}=await f.create.mutateAsync(r);s("authenticating");const d=await K({connectionId:y,orgId:e.id,orgSlug:e.slug,persistFallback:n=>f.update.mutateAsync({id:y,data:{connection_token:n}}).then(()=>{})});if(d.ran&&!d.ok){try{await f.delete.mutateAsync(y)}catch{}throw new Error(d.error&&d.error!=="no token received"?d.error:"No token received from GitHub")}H(v,e.id),C(r),s("ready")}catch(r){x(r instanceof Error?r.message:String(r)),s("error")}}function c(){s("idle"),x(null),C(null),o.current=!1}return N.enabled&&l&&g==="idle"?{status:"installing",error:null,connection:null,retry:c}:{status:g,error:h,connection:p,retry:c}}function Oe(N){const e=R.c(22),{open:i,onOpenChange:f,title:v,onImportComplete:g,mode:s}=N,h=s===void 0?"agent":s,x=v??(h==="connection"?"Add repo":"Import from GitHub"),[p,C]=T.useState(null);let b;e[0]!==x?(b=t.jsx(ne,{className:"sr-only",children:t.jsx(se,{children:x})}),e[0]=x,e[1]=b):b=e[1];let l;e[2]!==x||e[3]!==p?(l=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:p?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(J,{size:16})}),t.jsx("img",{src:p.avatarUrl,alt:p.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:p.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(P,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:x})]})}),e[2]=x,e[3]=p,e[4]=l):l=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=o):o=e[5];let a;e[6]!==f?(a=()=>f(!1),e[6]=f,e[7]=a):a=e[7];let c;e[8]!==h||e[9]!==g||e[10]!==i||e[11]!==p||e[12]!==a?(c=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:o,children:t.jsx(pe,{open:i,onComplete:a,selectedInstallation:p,onSelectInstallation:C,onImportComplete:g,mode:h})})}),e[8]=h,e[9]=g,e[10]=i,e[11]=p,e[12]=a,e[13]=c):c=e[13];let r;e[14]!==b||e[15]!==l||e[16]!==c?(r=t.jsxs(oe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[b,l,c]}),e[14]=b,e[15]=l,e[16]=c,e[17]=r):r=e[17];let u;return e[18]!==f||e[19]!==i||e[20]!==r?(u=t.jsx(ie,{open:i,onOpenChange:f,children:r}),e[18]=f,e[19]=i,e[20]=r,e[21]=u):u=e[21],u}function pe({open:N,onComplete:e,selectedInstallation:i,onSelectInstallation:f,onImportComplete:v,mode:g="agent"}){const{org:s}=B(),h=$(),x=me(),[p,C]=T.useState(null),b=ae({slug:"mcp-github"}),l=xe(b),o=he({enabled:N&&l.length===0}),a=l.length===1?l[0]??null:p,c=U({connectionId:a?.id??"",orgId:s.id,orgSlug:s.slug}),r=U({connectionId:V,orgId:s.id,orgSlug:s.slug}),u=async(n,j)=>{try{const k=await c.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:j}});if(k.isError)return null;const I=k.content?.find(m=>m.type==="resource")?.resource?.text;if(!I)return null;try{const m=JSON.parse(I);return typeof m=="string"?m:JSON.stringify(m)}catch{return I}}catch{return null}},y=(n,j)=>{Promise.all([u(j,"AGENTS.md"),u(j,"CLAUDE.md")]).then(async([S,k])=>{const w=S??k??null;w&&(await r.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:w}}}}),H(h,s.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},d=Q({mutationFn:async n=>{if(!a||!i)throw new Error("No GitHub connection or installation");const j=i.installationId;if(g==="connection"){const{childConnectionId:w}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:I=>c.callTool(I),selfCallTool:I=>r.callTool(I),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:w,item:null}}const{childConnectionId:S}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>r.callTool(w)});let k=null;try{const w=await r.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:j,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),I=w.structuredContent??w,m=I.item?.id;if(!I.item||!m)throw new Error("Failed to create the imported agent");return k=m,{virtualMcpId:m,repo:n,connectionId:S,item:I.item}}catch(w){throw k&&await r.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:k}}).catch(()=>{}),await r.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),w}},onSuccess:({virtualMcpId:n,repo:j,connectionId:S,item:k})=>{if(g==="connection"||!n||!k){H(h,s.id),W(h,s.id),O.success(`Added ${j.name}`),e();return}if(h.setQueryData(G.collectionItem(r,s.id,"","VIRTUAL_MCP",n),{item:k}),H(h,s.id),y(n,j),v){v({virtualMcpId:n,repo:j,connectionId:S});return}O.success(`Imported ${j.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),x(n)},onError:n=>{O.error("Failed to import repo: "+(n instanceof Error?n.message:"Unknown error"))}});return o.status==="installing"||o.status==="authenticating"?t.jsx(D,{status:o.status,error:null,retry:o.retry}):o.status==="error"?t.jsx(D,{status:"error",error:o.error,retry:o.retry}):l.length===0&&o.status==="idle"?t.jsx(D,{status:"installing",error:null,retry:o.retry}):l.length>1&&!a?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),l.map(n=>t.jsxs("button",{type:"button",onClick:()=>C(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(P,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):a?i?t.jsx(Ne,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,installation:i,onSelectRepo:n=>d.mutate(n),isSaving:d.isPending}):t.jsx(be,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,onSelect:f,showBackButton:l.length>1,onBack:()=>C(null)}):null}function be(N){const e=R.c(47),{connectionId:i,orgId:f,orgSlug:v,onSelect:g,showBackButton:s,onBack:h}=N;let x;e[0]!==f||e[1]!==v?(x={connectionId:V,orgId:f,orgSlug:v},e[0]=f,e[1]=v,e[2]=x):x=e[2];const p=U(x),C=$(),b=M();let l;e[3]!==i||e[4]!==f?(l=G.githubUserOrgs(f,i),e[3]=i,e[4]=f,e[5]=l):l=e[5];let o;e[6]!==i||e[7]!==p?(o=()=>fe(m=>p.callTool(m),i),e[6]=i,e[7]=p,e[8]=o):o=e[8];let a;e[9]!==l||e[10]!==o?(a={queryKey:l,queryFn:o},e[9]=l,e[10]=o,e[11]=a):a=e[11];const c=X(a);let r;e[12]!==b||e[13]!==i||e[14]!==c||e[15]!==f||e[16]!==v||e[17]!==C?(r={mutationFn:async()=>{const m=await K({connectionId:i,orgId:f,orgSlug:v,persistFallback:E=>b.update.mutateAsync({id:i,data:{connection_token:E}}).then(je)});if(m.ran&&!m.ok)throw new Error(m.error??"no token received");const _=new URL(`/api/${v}/mcp/${i}`,window.location.origin);await C.invalidateQueries({queryKey:G.isMCPAuthenticated(_.href,null)}),await C.invalidateQueries({queryKey:G.mcpClientPrefix()}),await c.refetch()},onError:ye},e[12]=b,e[13]=i,e[14]=c,e[15]=f,e[16]=v,e[17]=C,e[18]=r):r=e[18];const u=Q(r);if(c.isLoading){let m;return e[19]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=m):m=e[19],m}if(c.isError){let m,_;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),_=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=m,e[21]=_):(m=e[20],_=e[21]);let E;e[22]!==u?(E=()=>u.mutate(),e[22]=u,e[23]=E):E=e[23];let A;e[24]!==u.isPending?(A=u.isPending?t.jsx(z,{size:14,className:"animate-spin"}):t.jsx(P,{className:"size-3.5"}),e[24]=u.isPending,e[25]=A):A=e[25];let L;return e[26]!==u.isPending||e[27]!==E||e[28]!==A?(L=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[m,_,t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:E,disabled:u.isPending,children:[A,"Reconnect GitHub"]})]}),e[26]=u.isPending,e[27]=E,e[28]=A,e[29]=L):L=e[29],L}const y=c.data;if(!y)return null;let d;e[30]!==h||e[31]!==s?(d=s&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:h,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(J,{size:12}),"Change connection"]})}),e[30]=h,e[31]=s,e[32]=d):d=e[32];let n;if(e[33]!==y.installations||e[34]!==g){let m;e[36]!==g?(m=_=>t.jsxs("button",{type:"button",onClick:()=>g(_),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:_.avatarUrl,alt:_.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},_.installationId),e[36]=g,e[37]=m):m=e[37],n=y.installations.map(m),e[33]=y.installations,e[34]=g,e[35]=n}else n=e[35];let j;e[38]!==n?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:n}),e[38]=n,e[39]=j):j=e[39];const S=y.appSlug?`https://github.com/apps/${y.appSlug}/installations/new`:"https://github.com/settings/installations";let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=k):k=e[40];let w;e[41]!==S?(w=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",k]})}),e[41]=S,e[42]=w):w=e[42];let I;return e[43]!==w||e[44]!==d||e[45]!==j?(I=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[d,j,w]}),e[43]=w,e[44]=d,e[45]=j,e[46]=I):I=e[46],I}function ye(N){O.error("Failed to reconnect GitHub: "+(N instanceof Error?N.message:"Unknown error"))}function je(){}function Ne(N){const e=R.c(20),{connectionId:i,orgId:f,orgSlug:v,installation:g,onSelectRepo:s,isSaving:h}=N,[x,p]=T.useState(""),C=le(x,300),b=T.useDeferredValue(C),l=x!==b;let o;e[0]!==l||e[1]!==x?(o=t.jsx(re,{placeholder:"Search repositories...",value:x,onChange:p,isSearching:l}),e[0]=l,e[1]=x,e[2]=o):o=e[2];const a=l?"opacity-40":"opacity-100";let c;e[3]!==a?(c=F("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",a),e[3]=a,e[4]=c):c=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=r):r=e[5];let u;e[6]!==i||e[7]!==b||e[8]!==g||e[9]!==h||e[10]!==s||e[11]!==f||e[12]!==v?(u=t.jsx(T.Suspense,{fallback:r,children:t.jsx(ve,{connectionId:i,orgId:f,orgSlug:v,installation:g,query:b,onSelectRepo:s,isSaving:h})}),e[6]=i,e[7]=b,e[8]=g,e[9]=h,e[10]=s,e[11]=f,e[12]=v,e[13]=u):u=e[13];let y;e[14]!==c||e[15]!==u?(y=t.jsx("div",{className:c,children:u}),e[14]=c,e[15]=u,e[16]=y):y=e[16];let d;return e[17]!==o||e[18]!==y?(d=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[o,y]}),e[17]=o,e[18]=y,e[19]=d):d=e[19],d}function ve(N){const e=R.c(29),{connectionId:i,orgId:f,orgSlug:v,installation:g,query:s,onSelectRepo:h,isSaving:x}=N;let p;e[0]!==i||e[1]!==f||e[2]!==v?(p={connectionId:i,orgId:f,orgSlug:v},e[0]=i,e[1]=f,e[2]=v,e[3]=p):p=e[3];const C=U(p),b=g.type==="User"?"user":"org",l=s?`${b}:${g.login} ${s} in:name`:`${b}:${g.login}`;let o;e[4]!==i||e[5]!==g.login||e[6]!==f||e[7]!==s?(o=G.githubOrgRepos(f,i,g.login,s),e[4]=i,e[5]=g.login,e[6]=f,e[7]=s,e[8]=o):o=e[8];let a;e[9]!==C||e[10]!==l?(a=async d=>{const{signal:n}=d,S=(await C.callTool({name:"search_repositories",arguments:{query:l,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(we)},e[9]=C,e[10]=l,e[11]=a):a=e[11];let c;e[12]!==o||e[13]!==a?(c={queryKey:o,queryFn:a},e[12]=o,e[13]=a,e[14]=c):c=e[14];const{data:r}=ee(c);if(r.length===0){let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=d):d=e[15];let n;e[16]!==s?(n=s&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=s,e[17]=n):n=e[17];let j;return e[18]!==n?(j=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[d,n]}),e[18]=n,e[19]=j):j=e[19],j}let u;if(e[20]!==x||e[21]!==h||e[22]!==r){let d;e[24]!==x||e[25]!==h?(d=n=>t.jsxs("button",{type:"button",onClick:()=>h(n),disabled:x,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(P,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:n.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[n.private?t.jsx(te,{size:10}):t.jsx(ce,{size:10}),n.private?"Private":"Public"]})]},n.fullName),e[24]=x,e[25]=h,e[26]=d):d=e[26],u=r.map(d),e[20]=x,e[21]=h,e[22]=r,e[23]=u}else u=e[23];let y;return e[27]!==u?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:u}),e[27]=u,e[28]=y):y=e[28],y}function we(N){return{name:N.name,fullName:N.full_name,owner:N.full_name.split("/")[0]??"",url:N.html_url,private:N.private,description:N.description,updatedAt:N.updated_at}}function D(N){const e=R.c(33),{status:i,error:f,retry:v}=N;if(i==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let k;e[1]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=k):k=e[1];const w=f??"Something went wrong while connecting to GitHub.";let I;e[2]!==w?(I=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=I):I=e[3];let m;e[4]!==v?(m=t.jsx("button",{type:"button",onClick:v,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=v,e[5]=m):m=e[5];let _;return e[6]!==I||e[7]!==m?(_=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,I,m]}),e[6]=I,e[7]=m,e[8]=_):_=e[8],_}const g=i==="authenticating";let s;e[9]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-foreground"})}),e[9]=s):s=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{className:"relative size-10",children:[s,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=h):h=e[10];const x=g?"Authenticating with GitHub":"Setting up GitHub";let p;e[11]!==x?(p=t.jsx("p",{className:"text-sm font-medium",children:x}),e[11]=x,e[12]=p):p=e[12];const C=g?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let b;e[13]!==C?(b=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=b):b=e[14];let l;e[15]!==p||e[16]!==b?(l=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[p,b]}),e[15]=p,e[16]=b,e[17]=l):l=e[17];const o=g?"bg-muted-foreground/30":"bg-foreground animate-pulse";let a;e[18]!==o?(a=F("size-1.5 rounded-full",o),e[18]=o,e[19]=a):a=e[19];let c;e[20]!==a?(c=t.jsx("span",{className:a}),e[20]=a,e[21]=c):c=e[21];const r=g?"bg-foreground animate-pulse":"bg-muted-foreground/30";let u;e[22]!==r?(u=F("size-1.5 rounded-full",r),e[22]=r,e[23]=u):u=e[23];let y;e[24]!==u?(y=t.jsx("span",{className:u}),e[24]=u,e[25]=y):y=e[25];let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=d):d=e[26];let n;e[27]!==c||e[28]!==y?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,d]}),e[27]=c,e[28]=y,e[29]=n):n=e[29];let j;return e[30]!==n||e[31]!==l?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[h,l,n]}),e[30]=n,e[31]=l,e[32]=j):j=e[32],j}export{Oe as G,he as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dx as St,dy as It,bi as N,I as c,dz as de,bo as ze,bv as Et,bh as Tt,aW as wt,ag as O,af as G,ad as oe,H as _,bj as m,b3 as F,dA as Mt,dB as I,ae as At,t as ge,c as Ee,r as W,C as Ot,j as Ct}from"./index-
|
|
1
|
+
import{dx as St,dy as It,bi as N,I as c,dz as de,bo as ze,bv as Et,bh as Tt,aW as wt,ag as O,af as G,ad as oe,H as _,bj as m,b3 as F,dA as Mt,dB as I,ae as At,t as ge,c as Ee,r as W,C as Ot,j as Ct}from"./index-ChVU-OyZ.js";import{S as Nt,u as Rt}from"./use-mcp-client-BBxkfM4k.js";import{d as xt,D as Pt}from"./decopilot-sse-pool-Dep8yHYX.js";import{d as Dt}from"./delay-CnY5UFtP.js";import{e as kt}from"./backoff-CrEUbyZT.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(n=>typeof s[s[n]]!="number"),i={};for(const n of o)i[n]=s[n];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var Je="vercel.ai.error",Lt=Symbol.for(Je),Ce,Ne,Z=class We extends(Ne=Error,Ce=Lt,Ne){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return We.hasMarker(e,Je)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ge(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ye="AI_InvalidArgumentError",He=`vercel.ai.error.${Ye}`,jt=Symbol.for(He),Re,xe,Zt=class extends(xe=Z,Re=jt,xe){constructor({message:t,cause:e,argument:a}){super({name:Ye,message:t,cause:e}),this[Re]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,He)}},qe="AI_JSONParseError",Xe=`vercel.ai.error.${qe}`,$t=Symbol.for(Xe),Pe,De,ke=class extends(De=Z,Pe=$t,De){constructor({text:t,cause:e}){super({name:qe,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Ge(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Xe)}},Qe="AI_TypeValidationError",Ke=`vercel.ai.error.${Qe}`,Ut=Symbol.for(Ke),Le,je,X=class ve extends(je=Z,Le=Ut,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),s+=o.join(", "),s+=")"}super({name:Qe,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Ge(a)}`,cause:a}),this[Le]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,Ke)}static wrap({value:e,cause:a,context:r}){var s,o,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new Zt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Ft=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Bt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Ft.test(t)===!1&&Bt.test(t)===!1?e:Vt(e)}function Vt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const o=r[s];o&&typeof o=="object"&&e.push(o)}}}return t}function zt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Te(t)}var Jt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Wt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function R(){return{}}function Gt(t,e){var a,r,s;const o={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(o.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Yt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Ht(){return{type:"boolean"}}function et(t,e){return b(t.type._def,e)}var qt=(t,e)=>b(t.innerType._def,e);function tt(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,o)=>tt(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Xt(t)}}var Xt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Qt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function Kt(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):R()}function ea(t){return{type:"string",enum:Array.from(t.values)}}var ta=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function aa(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ta(s))r.push(...s.allOf);else{let o=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...n}=s;o=n}r.push(o)}}),r.length?{allOf:r}:void 0}function ra(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function at(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?na(t):t}var sa=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function na(t){let e="";for(let a=0;a<t.length;a++)sa.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,p=!1;for(let u=0;u<s.length;u++){if(i){o+=s[u],i=!1;continue}if(r.i){if(n){if(s[u].match(/[a-z]/)){p?(o+=s[u],o+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(o+=s[u],p=!0):o+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){o+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){o+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){o+=`($|(?=[\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-ChVU-OyZ.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|