@decocms/mesh 2.133.1 → 2.133.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-C_-Exi_n.js → AlertCircle-BIVpB2eV.js} +1 -1
- package/dist/client/assets/{AlignLeft-DU7XXs04.js → AlignLeft-DWMdThfD.js} +1 -1
- package/dist/client/assets/{ArrowDown-Ci69NI9T.js → ArrowDown-CnXnoX-V.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DiQ6H1qe.js → ArrowLeft-CvCy8CyB.js} +1 -1
- package/dist/client/assets/{ArrowUp-YaPl1lq-.js → ArrowUp-8t9O2FqG.js} +1 -1
- package/dist/client/assets/{Check-AlxQ-j2G.js → Check-Bs28PslG.js} +1 -1
- package/dist/client/assets/{CheckCircle-BQbEhLAd.js → CheckCircle-BnSsCPeL.js} +1 -1
- package/dist/client/assets/{CheckDone01-CnA5MJ5u.js → CheckDone01-GZyUwk0p.js} +1 -1
- package/dist/client/assets/{CheckVerified02-9ppFNPbL.js → CheckVerified02-CmWWqvRE.js} +1 -1
- package/dist/client/assets/{ChevronDown-Bt1ewsqh.js → ChevronDown-CIw5H_8I.js} +1 -1
- package/dist/client/assets/{ChevronLeft-ZjYcxOdo.js → ChevronLeft-fmgWXUdB.js} +1 -1
- package/dist/client/assets/{ChevronRight-sqD7LMFa.js → ChevronRight-8LnYcsyR.js} +1 -1
- package/dist/client/assets/{Clock-CGeVATg-.js → Clock-D17OAEFV.js} +1 -1
- package/dist/client/assets/{Code01-X9LTEq8d.js → Code01-C0MNem7b.js} +1 -1
- package/dist/client/assets/{Container-Dt3fts2O.js → Container-C4kCziiV.js} +1 -1
- package/dist/client/assets/{Copy01-yMwUMo5Y.js → Copy01-Czr6qLQt.js} +1 -1
- package/dist/client/assets/{Dataflow03-GEBPM69Y.js → Dataflow03-COO3w9be.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-rnia2dDb.js → DotsHorizontal-cZJVkNRf.js} +1 -1
- package/dist/client/assets/{DotsVertical-DxigKHHt.js → DotsVertical-D9CMW5-2.js} +1 -1
- package/dist/client/assets/{Download01-axlmJqAw.js → Download01-B6ed2sYF.js} +1 -1
- package/dist/client/assets/{Edit01-Cg13Y9IR.js → Edit01-DLZcWIR-.js} +1 -1
- package/dist/client/assets/{Eye-D5VDCdLP.js → Eye-DPTzoZL8.js} +1 -1
- package/dist/client/assets/{File02-DasnEozT.js → File02-Cgzx7ek0.js} +1 -1
- package/dist/client/assets/{File06-B5xn-On2.js → File06-BzbT2v0z.js} +1 -1
- package/dist/client/assets/{FilterLines-7rCsQUMC.js → FilterLines-BilIABo8.js} +1 -1
- package/dist/client/assets/{Globe01-DghE3nSS.js → Globe01-BVjXPHzv.js} +1 -1
- package/dist/client/assets/{Globe02-DsDY7_VG.js → Globe02-vxtQsT0f.js} +1 -1
- package/dist/client/assets/{Grid01-C3osH3dx.js → Grid01-CILFuUHo.js} +1 -1
- package/dist/client/assets/{Hash02-D2cqLEQA.js → Hash02-BfcBwRkC.js} +1 -1
- package/dist/client/assets/{Home02-BwxX5zad.js → Home02-rg_Tmz0p.js} +1 -1
- package/dist/client/assets/{Image01-Dk65YqxA.js → Image01-B_6vFaZi.js} +1 -1
- package/dist/client/assets/{Inbox01-kmB3TeMO.js → Inbox01-DNp0SuVa.js} +1 -1
- package/dist/client/assets/{InfoCircle-C0U8p7zQ.js → InfoCircle-D_SeJKcX.js} +1 -1
- package/dist/client/assets/{Key01-CqhHrRJL.js → Key01-BjbQkebS.js} +1 -1
- package/dist/client/assets/{LayersTwo01-BFhpnCtq.js → LayersTwo01-BexG7k2g.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CW10Mj8C.js → LayoutLeft-CN9jLsLc.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DdPfa8wq.js → LinkExternal01-DPyIyKMU.js} +1 -1
- package/dist/client/assets/{List-iHNJ390y.js → List-BcuB27Kb.js} +1 -1
- package/dist/client/assets/{Loading01-SjZGs3Wk.js → Loading01-W-w3cVps.js} +1 -1
- package/dist/client/assets/{Lock01-CryAxM1F.js → Lock01-C37ifJ66.js} +1 -1
- package/dist/client/assets/{Play-CKKDGI7M.js → Play-BVXIxZqO.js} +1 -1
- package/dist/client/assets/{Plus-DXYydVCi.js → Plus-7RI9qITc.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DT9wSPl_.js → RefreshCcw01-BM6X0J3F.js} +1 -1
- package/dist/client/assets/{Save01-w3vLU2XF.js → Save01-83pceB_J.js} +1 -1
- package/dist/client/assets/{SearchMd-CSKcblxx.js → SearchMd-BzFnoImC.js} +1 -1
- package/dist/client/assets/{Settings01-Dkx2ZoN9.js → Settings01-D3dDBLbY.js} +1 -1
- package/dist/client/assets/{Shield01-BqITe6MU.js → Shield01-qdbJX99G.js} +1 -1
- package/dist/client/assets/{Terminal-B4v75vOD.js → Terminal-DEkQfpQH.js} +1 -1
- package/dist/client/assets/{Trash01-CDDpTvNv.js → Trash01-BsNnpu_l.js} +1 -1
- package/dist/client/assets/{Upload01-DAiUnxPv.js → Upload01-Jb2KX5F9.js} +1 -1
- package/dist/client/assets/{Users03-BXHamAas.js → Users03-BY0qO7qD.js} +1 -1
- package/dist/client/assets/{X-BHBlYu74.js → X-B9LxUp5o.js} +1 -1
- package/dist/client/assets/{XCircle-Bm1DtLmf.js → XCircle-Dkkdz5ph.js} +1 -1
- package/dist/client/assets/{XClose-B0OIa3qG.js → XClose-7hYEQUhK.js} +1 -1
- package/dist/client/assets/{Zap-DYif66ZC.js → Zap-iEj-0nMA.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-131FyINm.js → agent-connections-preview-DNcTIqVr.js} +1 -1
- package/dist/client/assets/{agent-detail-BQD2V8eu.js → agent-detail-BdpmQjrg.js} +1 -1
- package/dist/client/assets/{agents-BChxlMJi.js → agents-kyg0nDcz.js} +1 -1
- package/dist/client/assets/{alert-dialog-DRnSCcWl.js → alert-dialog-DQT_qq2D.js} +1 -1
- package/dist/client/assets/{auth-catchall-qZjolz1d.js → auth-catchall--SSmWnAf.js} +1 -1
- package/dist/client/assets/{avatar-BsFgSPZd.js → avatar-CV6z8E70.js} +1 -1
- package/dist/client/assets/{badge-BZU2aZ4g.js → badge-DaJA40lr.js} +1 -1
- package/dist/client/assets/{binder-CXy7pGaI.js → binder-Bx_2YVEH.js} +1 -1
- package/dist/client/assets/{breadcrumb-CkhUU1qO.js → breadcrumb-h53M2ozZ.js} +1 -1
- package/dist/client/assets/{card-BiGYvdPr.js → card-HOT-tKY7.js} +1 -1
- package/dist/client/assets/{chart-x30PoZrw.js → chart-BIHnGavY.js} +1 -1
- package/dist/client/assets/{checkbox-DaiL5KlM.js → checkbox-C2xwBknU.js} +1 -1
- package/dist/client/assets/{circle-alert-D5aKQND0.js → circle-alert-BRVau5r5.js} +1 -1
- package/dist/client/assets/{collapsible-Bqyw5z5a.js → collapsible-DRIF4wXT.js} +1 -1
- package/dist/client/assets/{collection-detail-Bder-uOv.js → collection-detail-C8c5RTfO.js} +1 -1
- package/dist/client/assets/{collection-search-Bkt-jVWx.js → collection-search-DWb-q4sb.js} +1 -1
- package/dist/client/assets/{collection-tab-DILgyiiN.js → collection-tab-CGcalnFw.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-c85b97QJ.js → collection-table-wrapper-LUpcpQuR.js} +1 -1
- package/dist/client/assets/{collection-tabs-ywHh3L-3.js → collection-tabs-wwfnwWzq.js} +1 -1
- package/dist/client/assets/{command-BLXAYQCa.js → command-BL2WDnzB.js} +1 -1
- package/dist/client/assets/{connect-BJqi59zN.js → connect-BA2fi6ZL.js} +1 -1
- package/dist/client/assets/{connection-card-CRg7yGx3.js → connection-card-CbQYVkic.js} +1 -1
- package/dist/client/assets/{connection-detail-D1-5uzSn.js → connection-detail-CqhIu8V8.js} +1 -1
- package/dist/client/assets/{connections-D1tXy5Nn.js → connections-Bqt-ueC2.js} +1 -1
- package/dist/client/assets/{constants-2Gp-yGJ1.js → constants-Bj4b22ad.js} +1 -1
- package/dist/client/assets/constants-DTlOAYW2.js +1 -0
- package/dist/client/assets/{create-organization-dialog-CtQ-v5j4.js → create-organization-dialog-CHicv9TM.js} +1 -1
- package/dist/client/assets/{create-project-dialog-DpFucZww.js → create-project-dialog-BB0XeLGb.js} +1 -1
- package/dist/client/assets/{danger-CHhKecE7.js → danger-CYug_-FH.js} +1 -1
- package/dist/client/assets/{danger-zone-B1ksqQ3N.js → danger-zone-DJn-yaAs.js} +1 -1
- package/dist/client/assets/{decopilot-events-DlkvGkzj.js → decopilot-events-CdHUYzEf.js} +1 -1
- package/dist/client/assets/{dependencies-DO7dUDR7.js → dependencies-BQ4LI5wU.js} +1 -1
- package/dist/client/assets/{dialog-BeE7uUPn.js → dialog-DDOb23Pi.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B0Dgts11.js → dropdown-menu-BaaJ3KIr.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-ChmoTPch.js → dynamic-plugin-layout-DWZ0FIFu.js} +1 -1
- package/dist/client/assets/{editable-task-title--9hhF-R6.js → editable-task-title-nQdI1V_W.js} +1 -1
- package/dist/client/assets/{empty-state-DE4SQU5S.js → empty-state-cgNnxJVh.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CBMsqTh6.js → env-vars-editor-DIkYTN09.js} +1 -1
- package/dist/client/assets/{extract-connection-data-0trSaHAT.js → extract-connection-data-DSMZDJ4i.js} +1 -1
- package/dist/client/assets/{file-browser-0DYVKNPK.js → file-browser-B5uJssDR.js} +2 -2
- package/dist/client/assets/{form-DNs_mLgF.js → form-CZlsOGpj.js} +1 -1
- package/dist/client/assets/{general-CC_F5c1Q.js → general-BPWx4fPN.js} +1 -1
- package/dist/client/assets/{grid-view-Y6fAVOxf.js → grid-view-Bz5fCwwy.js} +1 -1
- package/dist/client/assets/{home-DXg-PZRS.js → home-DHOzeT_v.js} +1 -1
- package/dist/client/assets/{index-C_SwSaaG.js → index-B-s7dcGH.js} +1 -1
- package/dist/client/assets/{index-DTgZok4N.js → index-BiG-bBX7.js} +3 -3
- package/dist/client/assets/{index-BG6VshDR.js → index-BxikKkX5.js} +1 -1
- package/dist/client/assets/{index--9MdKIVD.js → index-CAR0mh84.js} +1 -1
- package/dist/client/assets/{index-eYcb2Cm9.js → index-CBDYR7h7.js} +1 -1
- package/dist/client/assets/{index-Gr3qtElA.js → index-D1gbzHrb.js} +1 -1
- package/dist/client/assets/{index-BMtw0aq_.js → index-ehKjC5PZ.js} +1 -1
- package/dist/client/assets/{index-C6fMaWPS.js → index-jbQKqjQl.js} +1 -1
- package/dist/client/assets/{index-DqmnWcee.js → index-mMuYpq4A.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-Dy7IOO2y.js → infiniteQueryObserver-BZCRT6X1.js} +1 -1
- package/dist/client/assets/{input-CjsuYubG.js → input-BcOk4EWn.js} +1 -1
- package/dist/client/assets/{integration-icon-BqSOA-1d.js → integration-icon-DJplt18U.js} +1 -1
- package/dist/client/assets/{label-ND6ncjGS.js → label-BLk50aKt.js} +1 -1
- package/dist/client/assets/{layout-CKzU3ZCb.js → layout-6pwn8f6O.js} +1 -1
- package/dist/client/assets/{layout-K29HidGl.js → layout-BluQBehB.js} +1 -1
- package/dist/client/assets/{localstorage-keys-Cenhbz-P.js → localstorage-keys-BS2STbF7.js} +1 -1
- package/dist/client/assets/{login-oxVPXFpk.js → login-CGh2490Y.js} +1 -1
- package/dist/client/assets/{markdown-DI_NQ3zj.js → markdown-94xyd8w7.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-D2qbe9d6.js → mcp-app-renderer-CPkL4-A0.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BGy49NaP.js → mcp-oauth-DhVZXZzz.js} +1 -1
- package/dist/client/assets/{mcp-server-card-Dn8mS4B0.js → mcp-server-card-Csi3P08i.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-BJrSdPXE.js → mcp-server-detail-DPle4t4_.js} +2 -2
- package/dist/client/assets/{members-DZd5xLHT.js → members-DdERnJEy.js} +1 -1
- package/dist/client/assets/{monitoring-DpcldHRD.js → monitoring-DljoOm7H.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-Dua9qsND.js → monitoring-dashboard-edit-CA-n4NwW.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-X9A7Dt7e.js → monitoring-dashboard-view-CA9jMLxL.js} +1 -1
- package/dist/client/assets/{oauth-callback-CsqoN40N.js → oauth-callback-BeMNWxMx.js} +1 -1
- package/dist/client/assets/{page-Cx3Xt8ip.js → page-B-g-Vlk_.js} +1 -1
- package/dist/client/assets/{page-CLamcNIQ.js → page-Dd_JJkvy.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Df_tIhim.js → plugin-empty-state-Beu1zYui.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-BV6g5sMv.js → plugin-empty-state-C3IVEK8r.js} +1 -1
- package/dist/client/assets/{plugin-header-ClbYQgeN.js → plugin-header-B0VvIolY.js} +1 -1
- package/dist/client/assets/{plugin-header-CsoLpSwS.js → plugin-header-K9IDC0OG.js} +1 -1
- package/dist/client/assets/plugins-Cw7F1EwF.js +1 -0
- package/dist/client/assets/{popover-C2X8YaiC.js → popover-Cnhlur36.js} +1 -1
- package/dist/client/assets/{project-app-view-CkhQ-sFM.js → project-app-view-DdjQoakQ.js} +1 -1
- package/dist/client/assets/{project-layout-DcmZkb79.js → project-layout-COuxbNbP.js} +1 -1
- package/dist/client/assets/{project-plugins-BxtIWCHr.js → project-plugins-DlaP9lSP.js} +1 -1
- package/dist/client/assets/{projects-list-B9ZNjsmc.js → projects-list-Cjk5rvoU.js} +1 -1
- package/dist/client/assets/{readme-viewer-DQ57Paqf.js → readme-viewer-D1PTXNQQ.js} +1 -1
- package/dist/client/assets/{registry-layout-BOuKDda5.js → registry-layout-C_3CFS9T.js} +1 -1
- package/dist/client/assets/{registry-utils-BFXjOPvi.js → registry-utils-B4prNmYa.js} +1 -1
- package/dist/client/assets/{reports-layout-_5crmBff.js → reports-layout-BTeFiemL.js} +1 -1
- package/dist/client/assets/{reset-password-Qo3jQxbB.js → reset-password-BOnVZBj0.js} +1 -1
- package/dist/client/assets/{resizable-BotMD0Ea.js → resizable-BC2aG7ea.js} +1 -1
- package/dist/client/assets/{save-actions-BGfSClkF.js → save-actions-p2U4N3h5.js} +1 -1
- package/dist/client/assets/{scroll-area-CiqOJ4_4.js → scroll-area-CrSif9aa.js} +1 -1
- package/dist/client/assets/{select-CwGh16En.js → select-DJV0GpEL.js} +1 -1
- package/dist/client/assets/{shell-layout-DOy4fAYb.js → shell-layout-DkJCvYuh.js} +2 -2
- package/dist/client/assets/{sidebar-settings-Ctg4uu33.js → sidebar-settings-C9nkZoUb.js} +1 -1
- package/dist/client/assets/{skeleton-DZ7Qc_fE.js → skeleton-DhcP44Ov.js} +1 -1
- package/dist/client/assets/{spinner-CF1sqMoC.js → spinner-DSMOMT7g.js} +1 -1
- package/dist/client/assets/{store-invite-BbaXHihy.js → store-invite-CrF5fKpc.js} +1 -1
- package/dist/client/assets/{switch-BO1AHmQl.js → switch-CR-VYNUs.js} +1 -1
- package/dist/client/assets/{table-CZRzSdcB.js → table-DxvlU5EN.js} +1 -1
- package/dist/client/assets/{tabs-DkvkxCCI.js → tabs-C-5F-MJ5.js} +1 -1
- package/dist/client/assets/tasks-KFAnwTNo.js +1 -0
- package/dist/client/assets/{tasks-panel-Bl5BMQl6.js → tasks-panel-CmBpoAsV.js} +1 -1
- package/dist/client/assets/{textarea-Cp-ThsnH.js → textarea-Bkod2qAV.js} +1 -1
- package/dist/client/assets/{time-range-picker-CXsB0sBK.js → time-range-picker-CygOsj38.js} +1 -1
- package/dist/client/assets/{toggle-group-CIpiKQbG.js → toggle-group-CwfkuVwg.js} +1 -1
- package/dist/client/assets/{tools-list-BYhjzTws.js → tools-list-CmIBKUpX.js} +1 -1
- package/dist/client/assets/{tooltip-B2vpv_WH.js → tooltip-BacoSwd7.js} +1 -1
- package/dist/client/assets/{topbar-portal-Dy36ZPgB.js → topbar-portal-Dfkwqxry.js} +1 -1
- package/dist/client/assets/{types-DeMEWRHV.js → types-C6Uddd8z.js} +1 -1
- package/dist/client/assets/{use-binding-CXeaDqWF.js → use-binding-CoVeLP6R.js} +1 -1
- package/dist/client/assets/{use-connection-Du5eRm0t.js → use-connection-CsobI-JA.js} +1 -1
- package/dist/client/assets/{use-copy-5Xu6yo2D.js → use-copy-De63ENVh.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-EqzJGE7y.js → use-create-virtual-mcp-52zuHZ4A.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-D98zOCZs.js → use-install-from-registry-BUdVd5Au.js} +1 -1
- package/dist/client/assets/{use-list-state-Dxk-n9cc.js → use-list-state-DZ0uTI_k.js} +1 -1
- package/dist/client/assets/{use-llm-B4rO8f2r.js → use-llm-DTbAtUds.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-Bf8HKw75.js → use-mcp-resources-ucs4znYI.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-v3YYc4L1.js → use-mcp-tools-nHTt7uoJ.js} +1 -1
- package/dist/client/assets/{use-members-D4kqyRbv.js → use-members-C4nvWeOW.js} +1 -1
- package/dist/client/assets/{use-mobile-II1SQS1g.js → use-mobile-BwubTGYW.js} +1 -1
- package/dist/client/assets/{use-project-DEgKISl8.js → use-project-BVlUC7fM.js} +1 -1
- package/dist/client/assets/{use-settings-modal-BJVHprSk.js → use-settings-modal-BivXkS-c.js} +1 -1
- package/dist/client/assets/{use-view-mode-D38VMwz6.js → use-view-mode-RJVvlb7k.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CS7dIIbK.js → use-virtual-mcp-r6ou4ewu.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BZXsD1Nv.js +1 -0
- package/dist/client/assets/{useMutation-B99hCaMl.js → useMutation-Cxle_Mtw.js} +1 -1
- package/dist/client/assets/useQuery-Us1whSan.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DcGj9DQ4.js +1 -0
- package/dist/client/assets/{user-BncBYJfn.js → user-DiQL4i6w.js} +1 -1
- package/dist/client/assets/{workflow-DS5DwWhu.js → workflow-CY-tfdwy.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/constants-DTNMmCfY.js +0 -1
- package/dist/client/assets/plugins-BA5p5lXm.js +0 -1
- package/dist/client/assets/tasks-BSVHqtcQ.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DvriYWG_.js +0 -1
- package/dist/client/assets/useQuery-C-DbMOQt.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CX_HgzHm.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as U,j as t,b as Ne,B as Ue,O as ge,aD as it,u as Be,c0 as Qe,aB as gt,p as jt,r as X,o as at,bI as bt,bQ as vt,s as z,aF as Ge,aG as Nt,E as ct,e as yt,a as _t,n as Ct,k as St,l as wt,i as Tt,t as ve,K as Je}from"./index-DTgZok4N.js";import{E as Z,C as ze}from"./collection-search-Bkt-jVWx.js";import{E as kt,r as Pt,e as lt}from"./env-vars-editor-CBMsqTh6.js";import{g as Ke}from"./types-DeMEWRHV.js";import{S as It}from"./save-actions-BGfSClkF.js";import{b as $t,a as At}from"./use-binding-CXeaDqWF.js";import{u as Vt,S as Mt}from"./index-C_SwSaaG.js";import{f as Dt,g as dt}from"./use-connection-Du5eRm0t.js";import{u as mt}from"./constants-2Gp-yGJ1.js";import{d as Ot}from"./use-mcp-tools-v3YYc4L1.js";import{b as Rt}from"./use-mcp-resources-Bf8HKw75.js";import{a as Et}from"./decopilot-events-DlkvGkzj.js";import{a as Lt}from"./mcp-oauth-BGy49NaP.js";import{b as Ye,c as Ut,d as Ft,e as Bt,B as zt,a as Kt}from"./breadcrumb-CkhUU1qO.js";import{C as Xt}from"./collection-tabs-ywHh3L-3.js";import{i as Oe}from"./Loading01-SjZGs3Wk.js";import{V as Xe,a as Ht}from"./layout-K29HidGl.js";import{C as Wt}from"./collection-tab-DILgyiiN.js";import{I as Re}from"./integration-icon-BqSOA-1d.js";import{B as Fe}from"./badge-BZU2aZ4g.js";import{D as qt,a as Qt,b as Gt,c as Ze}from"./dropdown-menu-B0Dgts11.js";import{F as W,a as Jt,b as q,d as K,f as Q,c as Y,e as Yt}from"./form-DNs_mLgF.js";import{I as G}from"./input-CjsuYubG.js";import{S as et,a as tt,b as st,c as nt,d as H}from"./select-CwGh16En.js";import{i as ut}from"./CheckCircle-BQbEhLAd.js";import{t as Zt}from"./ChevronDown-Bt1ewsqh.js";import{n as es}from"./Container-Dt3fts2O.js";import{s as De}from"./Globe02-DsDY7_VG.js";import{s as ts}from"./RefreshCcw01-DT9wSPl_.js";import{i as ss}from"./Terminal-B4v75vOD.js";import{s as ns}from"./Trash01-CDDpTvNv.js";import{t as He}from"./Users03-BXHamAas.js";import{s as os}from"./XClose-B0OIa3qG.js";import{U as rs}from"./user-BncBYJfn.js";import{b as is,a as as}from"./use-virtual-mcp-CS7dIIbK.js";import{i as cs}from"./ChevronRight-sqD7LMFa.js";import{s as ls}from"./Plus-DXYydVCi.js";import{f as ds}from"./formatDistanceToNow-Cb2QZZJn.js";import{a as pt,C as ft}from"./collection-table-wrapper-c85b97QJ.js";import{C as We}from"./card-BiGYvdPr.js";import{R as ms}from"./readme-viewer-DQ57Paqf.js";import{T as us,a as ps}from"./tools-list-BYhjzTws.js";import{M as fs}from"./mcp-app-renderer-D2qbe9d6.js";import"./SearchMd-CSKcblxx.js";import"./Save01-w3vLU2XF.js";import"./binder-CXy7pGaI.js";import"./File06-B5xn-On2.js";import"./Key01-CqhHrRJL.js";import"./constants-DTNMmCfY.js";import"./registry-utils-BFXjOPvi.js";import"./extract-connection-data-0trSaHAT.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-D98zOCZs.js";import"./index--9MdKIVD.js";import"./circle-alert-D5aKQND0.js";import"./index-C6fMaWPS.js";import"./index-eYcb2Cm9.js";import"./index-Gr3qtElA.js";import"./collapsible-Bqyw5z5a.js";import"./use-llm-B4rO8f2r.js";import"./useQuery-C-DbMOQt.js";import"./localstorage-keys-Cenhbz-P.js";import"./useMutation-B99hCaMl.js";import"./tabs-DkvkxCCI.js";import"./checkbox-DaiL5KlM.js";import"./Check-AlxQ-j2G.js";import"./dialog-BeE7uUPn.js";import"./X-BHBlYu74.js";import"./skeleton-DZ7Qc_fE.js";import"./AlignLeft-DU7XXs04.js";import"./ArrowLeft-DiQ6H1qe.js";import"./Image01-Dk65YqxA.js";import"./Settings01-Dkx2ZoN9.js";import"./useSuspenseInfiniteQuery-CX_HgzHm.js";import"./infiniteQueryObserver-Dy7IOO2y.js";import"./popover-C2X8YaiC.js";import"./spinner-CF1sqMoC.js";import"./tooltip-B2vpv_WH.js";import"./index-BG6VshDR.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-YaPl1lq-.js";import"./Edit01-Cg13Y9IR.js";import"./XCircle-Bm1DtLmf.js";import"./AlertCircle-C_-Exi_n.js";import"./use-copy-5Xu6yo2D.js";import"./Code01-X9LTEq8d.js";import"./use-create-virtual-mcp-EqzJGE7y.js";import"./Copy01-yMwUMo5Y.js";import"./marked.esm-BaswSlok.js";import"./markdown-DI_NQ3zj.js";import"./Eye-D5VDCdLP.js";import"./LayersTwo01-BFhpnCtq.js";import"./index-BMtw0aq_.js";import"./Clock-CGeVATg-.js";import"./DotsVertical-DxigKHHt.js";import"./empty-state-DE4SQU5S.js";import"./Inbox01-kmB3TeMO.js";import"./use-list-state-Dxk-n9cc.js";import"./use-view-mode-D38VMwz6.js";import"./use-mobile-II1SQS1g.js";import"./alert-dialog-DRnSCcWl.js";import"./label-ND6ncjGS.js";import"./avatar-BsFgSPZd.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowDown-Ci69NI9T.js";import"./Grid01-C3osH3dx.js";import"./List-iHNJ390y.js";import"./table-CZRzSdcB.js";function xs(s){const e=U.c(14),{virtualMcp:n,org:o}=s;let i;e[0]!==o||e[1]!==n.id?(i={org:o,project:ge,agentId:n.id},e[0]=o,e[1]=n.id,e[2]=i):i=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(He,{size:16}),e[3]=a):a=e[3];let l;e[4]!==n.icon||e[5]!==n.title?(l=t.jsx(Re,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:a}),e[4]=n.icon,e[5]=n.title,e[6]=l):l=e[6];let j;e[7]!==n.title?(j=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(cs,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[9]=f):f=e[9];let m;return e[10]!==i||e[11]!==l||e[12]!==j?(m=t.jsxs(it,{to:"/$org/$project/agents/$agentId",params:i,className:"flex items-center gap-3 p-2 pr-1 rounded-lg hover:bg-muted/50 transition-colors group",children:[l,j,f]}),e[10]=i,e[11]=l,e[12]=j,e[13]=m):m=e[13],m}function ot(s){const e=U.c(20),{connectionId:n,connectionTitle:o,connectionDescription:i,connectionIcon:a,org:l,hasExistingVirtualMcps:j}=s,f=Ne(),m=as();let x;e[0]!==m.create||e[1]!==i||e[2]!==a||e[3]!==n||e[4]!==o||e[5]!==f||e[6]!==l?(x=async()=>{const d=await m.create.mutateAsync({title:`${o} Agent`,description:i??null,icon:a??null,status:"active",connections:[{connection_id:n,selected_tools:null,selected_resources:null,selected_prompts:null}]});f({to:"/$org/$project/agents/$agentId",params:{org:l,project:ge,agentId:d.id}})},e[0]=m.create,e[1]=i,e[2]=a,e[3]=n,e[4]=o,e[5]=f,e[6]=l,e[7]=x):x=e[7];const c=x;if(j){let d;e[8]!==m.create.isPending?(d=m.create.isPending?t.jsx(Oe,{size:16,className:"animate-spin"}):t.jsx(ls,{size:16}),e[8]=m.create.isPending,e[9]=d):d=e[9];let u;return e[10]!==m.create.isPending||e[11]!==c||e[12]!==d?(u=t.jsx(Ue,{variant:"ghost",className:"size-6 p-0",onClick:c,disabled:m.create.isPending,children:d}),e[10]=m.create.isPending,e[11]=c,e[12]=d,e[13]=u):u=e[13],u}let r;e[14]!==m.create.isPending?(r=m.create.isPending?t.jsx(Oe,{className:"animate-spin text-muted-foreground"}):t.jsx(He,{className:"size-3 text-muted-foreground"}),e[14]=m.create.isPending,e[15]=r):r=e[15];let h;return e[16]!==m.create.isPending||e[17]!==c||e[18]!==r?(h=t.jsxs(Ue,{variant:"outline",size:"sm",onClick:c,disabled:m.create.isPending,children:[r,"Create an agent"]}),e[16]=m.create.isPending,e[17]=c,e[18]=r,e[19]=h):h=e[19],h}function hs(s){const e=U.c(26),{connectionId:n,connectionTitle:o,connectionDescription:i,connectionIcon:a,org:l}=s;let j;e[0]!==n?(j={filters:[{column:"connection_id",value:n}]},e[0]=n,e[1]=j):j=e[1];const f=is(j);if(!(f.length>0)){let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("h4",{className:"text-xs text-muted-foreground font-medium",children:"Use in your IDE"}),e[2]=u):u=e[2];let b;return e[3]!==i||e[4]!==a||e[5]!==n||e[6]!==o||e[7]!==l?(b=t.jsxs("div",{className:"p-5 flex items-center justify-between gap-3",children:[u,t.jsx(ot,{connectionId:n,connectionTitle:o,connectionDescription:i,connectionIcon:a,org:l,hasExistingVirtualMcps:!1})]}),e[3]=i,e[4]=a,e[5]=n,e[6]=o,e[7]=l,e[8]=b):b=e[8],b}let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("h4",{className:"text-xs text-muted-foreground font-medium",children:"Agents"}),e[9]=x):x=e[9];let c;e[10]!==i||e[11]!==a||e[12]!==n||e[13]!==o||e[14]!==l?(c=t.jsx("div",{className:"flex flex-col gap-1",children:t.jsxs("div",{className:"flex items-center justify-between",children:[x,t.jsx(ot,{connectionId:n,connectionTitle:o,connectionDescription:i,connectionIcon:a,org:l,hasExistingVirtualMcps:!0})]})}),e[10]=i,e[11]=a,e[12]=n,e[13]=o,e[14]=l,e[15]=c):c=e[15];let r;if(e[16]!==l||e[17]!==f){let u;e[19]!==l?(u=b=>t.jsx(xs,{virtualMcp:b,org:l},b.id),e[19]=l,e[20]=u):u=e[20],r=f.map(u),e[16]=l,e[17]=f,e[18]=r}else r=e[18];let h;e[21]!==r?(h=t.jsx("div",{className:"flex flex-col gap-2",children:r}),e[21]=r,e[22]=h):h=e[22];let d;return e[23]!==c||e[24]!==h?(d=t.jsxs("div",{className:"p-5 flex flex-col gap-3",children:[c,h]}),e[23]=c,e[24]=h,e[25]=d):d=e[25],d}function gs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:o,onRemoveOAuth:i}){const a=Qe({control:s.control,name:"ui_type"}),l=Qe({control:s.control,name:"connection_url"}),{stdioEnabled:j}=gt(),f=(()=>{if(typeof l!="string"||!l)return!1;try{const r=new URL(l);return r.hostname==="api.githubcopilot.com"&&r.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),m=j||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",c=x?jt(e.connection_url):null;return x?t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Type"}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(He,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),c&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:c})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsx(W,{control:s.control,name:"ui_type",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),a!=="NPX"&&a!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(et,{value:r.value,onValueChange:r.onChange,children:[t.jsx(K,{children:t.jsxs(tt,{className:"h-10 w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(De,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(st,{})]})}),t.jsxs(nt,{children:[t.jsx(H,{value:"HTTP",children:"HTTP"}),t.jsx(H,{value:"SSE",children:"SSE"}),t.jsx(H,{value:"Websocket",children:"Websocket"}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:"NPX Package"}),t.jsx(H,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(W,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(q,{className:"flex-1 min-w-0",children:t.jsx(K,{children:t.jsx(G,{placeholder:"https://example.com/mcp",...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(et,{value:r.value,onValueChange:r.onChange,children:[t.jsx(K,{children:t.jsx(tt,{className:"h-10",children:t.jsx(st,{})})}),t.jsxs(nt,{children:[t.jsx(H,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(De,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(H,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(De,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(H,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(De,{className:"w-4 h-4"}),"Websocket"]})}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(es,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(H,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ss,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(Q,{})]})}),a==="NPX"&&t.jsx(W,{control:s.control,name:"npx_package",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(K,{children:t.jsx(G,{placeholder:"@perplexity-ai/mcp-server",...r,value:r.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),a==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(W,{control:s.control,name:"stdio_command",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(K,{children:t.jsx(G,{placeholder:"node, bun, python...",...r,value:r.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),t.jsx(W,{control:s.control,name:"stdio_args",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(K,{children:t.jsx(G,{placeholder:"arg1 arg2 --flag value",...r,value:r.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(Q,{})]})})]}),t.jsx(W,{control:s.control,name:"stdio_cwd",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(K,{children:t.jsx(G,{placeholder:"/path/to/project (optional)",...r,value:r.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})})]}),(a==="NPX"||a==="STDIO")&&t.jsx(W,{control:s.control,name:"env_vars",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(K,{children:t.jsx(kt,{value:r.value??[],onChange:r.onChange})}),t.jsx(Q,{})]})}),a!=="NPX"&&a!=="STDIO"&&t.jsx(W,{control:s.control,name:"connection_token",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:f?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(qt,{children:[t.jsx(Qt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Fe,{variant:"success",className:"gap-1.5",children:[t.jsx(ut,{size:12}),"Authenticated via OAuth",t.jsx(Zt,{size:12})]})})}),t.jsxs(Gt,{align:"start",children:[t.jsxs(Ze,{onClick:o,children:[t.jsx(ts,{size:16}),"Re-authenticate"]}),t.jsxs(Ze,{variant:"destructive",onClick:i,children:[t.jsx(ns,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&r.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>r.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(os,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(K,{children:t.jsx(G,{type:"password",placeholder:f?"Paste your GitHub PAT":"Enter access token...",...r,value:r.value||"",className:"h-10 rounded-lg"})}),f&&t.jsxs(Yt,{children:["Create a PAT at"," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(Q,{})]})})]})}function js(s){const e=U.c(43),{form:n,connection:o,isMCPAuthenticated:i,hasOAuthToken:a,onReauthenticate:l,onRemoveOAuth:j}=s,{org:f}=Be();let m;e[0]!==o.icon||e[1]!==o.title?(m=t.jsx(Re,{icon:o.icon,name:o.title,size:"lg",className:"shadow-sm"}),e[0]=o.icon,e[1]=o.title,e[2]=m):m=e[2];let x;e[3]!==n.control?(x=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(W,{control:n.control,name:"title",render:vs}),t.jsx(W,{control:n.control,name:"description",render:bs})]}),e[3]=n.control,e[4]=x):x=e[4];let c;e[5]!==m||e[6]!==x?(c=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[m,x]}),e[5]=m,e[6]=x,e[7]=c):c=e[7];let r;e[8]!==o||e[9]!==n||e[10]!==a||e[11]!==l||e[12]!==j?(r=t.jsx(gs,{form:n,connection:o,hasOAuthToken:a,onReauthenticate:l,onRemoveOAuth:j}),e[8]=o,e[9]=n,e[10]=a,e[11]=l,e[12]=j,e[13]=r):r=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Status"}),e[14]=h):h=e[14];let d;e[15]!==i?(d=t.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[h,i?t.jsxs(Fe,{variant:"success",className:"gap-1.5 bg-success-foreground text-success",children:[t.jsx(ut,{size:12}),"Connected"]}):t.jsx(Fe,{variant:"outline",className:"text-muted-foreground",children:"Not connected"})]}),e[15]=i,e[16]=d):d=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Created by"}),e[17]=u):u=e[17];let b;e[18]!==o.created_by?(b=t.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[u,t.jsx(rs,{id:o.created_by,size:"2xs"})]}),e[18]=o.created_by,e[19]=b):b=e[19];let v;e[20]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Updated"}),e[20]=v):v=e[20];let _;e[21]!==o.updated_at?(_=o.updated_at?ds(new Date(o.updated_at),{addSuffix:!0}):"Unknown",e[21]=o.updated_at,e[22]=_):_=e[22];let S;e[23]!==_?(S=t.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[v,t.jsx("span",{className:"text-sm text-foreground",children:_})]}),e[23]=_,e[24]=S):S=e[24];let p;e[25]!==S||e[26]!==d||e[27]!==b?(p=t.jsxs("div",{className:"flex flex-col gap-2 p-5 border-b border-border",children:[d,b,S]}),e[25]=S,e[26]=d,e[27]=b,e[28]=p):p=e[28];let C;e[29]!==o.description||e[30]!==o.icon||e[31]!==o.id||e[32]!==o.title||e[33]!==f.slug?(C=t.jsx(hs,{connectionId:o.id,connectionTitle:o.title,connectionDescription:o.description,connectionIcon:o.icon,org:f.slug}),e[29]=o.description,e[30]=o.icon,e[31]=o.id,e[32]=o.title,e[33]=f.slug,e[34]=C):C=e[34];let w;e[35]!==p||e[36]!==C||e[37]!==c||e[38]!==r?(w=t.jsxs("div",{className:"flex flex-col h-full overflow-auto",children:[c,r,p,C]}),e[35]=p,e[36]=C,e[37]=c,e[38]=r,e[39]=w):w=e[39];let g;return e[40]!==n||e[41]!==w?(g=t.jsx(Jt,{...n,children:w}),e[40]=n,e[41]=w,e[42]=g):g=e[42],g}function bs(s){const{field:e}=s;return t.jsxs(q,{className:"w-full space-y-0",children:[t.jsx(K,{children:t.jsx(G,{...e,value:e.value||"",className:"h-auto py-0.5 text-base text-muted-foreground leading-6 px-2 -mx-2 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})}),t.jsx(Q,{})]})}function vs(s){const{field:e}=s;return t.jsxs(q,{className:"flex-1 space-y-0",children:[t.jsx(K,{children:t.jsx(G,{...e,className:"h-auto py-0.5 text-lg! font-medium leading-7 px-2 -mx-2 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Connection Name"})}),t.jsx(Q,{})]})}function Ns(s){const e=U.c(39),{prompts:n,connectionId:o,org:i,onPromptClick:a,showToolbar:l,emptyMessage:j}=s,f=l===void 0?!0:l,m=j===void 0?"This connection doesn't have any prompts yet.":j,x=Ne(),[c,r]=X.useState(""),[h,d]=X.useState("table"),[u,b]=X.useState("name"),[v,_]=X.useState("asc");let S;e[0]!==v||e[1]!==u?(S=T=>{u===T?(_(ws),v==="desc"&&b(void 0)):(b(T),_("asc"))},e[0]=v,e[1]=u,e[2]=S):S=e[2];const p=S;let C;e[3]!==o||e[4]!==x||e[5]!==a||e[6]!==i?(C=T=>{a?a(T):o&&i&&x({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:i,project:ge,connectionId:o,collectionName:"prompts",itemId:encodeURIComponent(T.name)}})},e[3]=o,e[4]=x,e[5]=a,e[6]=i,e[7]=C):C=e[7];const w=C;let g;if(e[8]!==n||e[9]!==c||e[10]!==v||e[11]!==u){const T=!n||n.length===0?[]:c.trim()?(()=>{const F=c.toLowerCase();return n.filter(B=>B.name.toLowerCase().includes(F)||B.description&&B.description.toLowerCase().includes(F))})():n;g=!u||!v?T:[...T].sort((F,B)=>{const je=F[u]||"",ee=B[u]||"",J=String(je).localeCompare(String(ee));return v==="asc"?J:-J}),e[8]=n,e[9]=c,e[10]=v,e[11]=u,e[12]=g}else g=e[12];const I=g;let D;e[13]===Symbol.for("react.memo_cache_sentinel")?(D=[{id:"name",header:"Name",render:Ss,sortable:!0},{id:"description",header:"Description",render:Cs,cellClassName:"flex-1",sortable:!0}],e[13]=D):D=e[13];const A=D;let V;e[14]===Symbol.for("react.memo_cache_sentinel")?(V=A.filter(_s).map(ys),e[14]=V):V=e[14];const L=V;let y;e[15]!==p||e[16]!==f||e[17]!==v||e[18]!==u||e[19]!==h?(y=f&&t.jsx(Xe,{children:t.jsx(ft,{viewMode:h,onViewModeChange:d,sortKey:u,sortDirection:v,onSort:p,sortOptions:L})}),e[15]=p,e[16]=f,e[17]=v,e[18]=u,e[19]=h,e[20]=y):y=e[20];let R;e[21]===Symbol.for("react.memo_cache_sentinel")?(R=T=>{T.key==="Escape"&&(r(""),T.target.blur())},e[21]=R):R=e[21];let M;e[22]!==c?(M=t.jsx(ze,{value:c,onChange:r,placeholder:"Search prompts...",onKeyDown:R}),e[22]=c,e[23]=M):M=e[23];let N;e[24]!==m||e[25]!==w||e[26]!==p||e[27]!==c||e[28]!==v||e[29]!==u||e[30]!==I||e[31]!==h?(N=h==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:I.length===0?t.jsx(Z,{image:null,title:c?"No prompts found":"No prompts available",description:c?"Try adjusting your search terms":m}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:I.map(T=>t.jsx(We,{className:"cursor-pointer transition-colors",onClick:()=>w(T),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(Re,{icon:null,name:T.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:T.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:T.description||"No description"})]})]})},T.name))})}):t.jsx(pt,{columns:A,data:I,isLoading:!1,sortKey:u,sortDirection:v,onSort:p,onRowClick:T=>w(T),emptyState:t.jsx(Z,{image:null,title:c?"No prompts found":"No prompts available",description:c?"Try adjusting your search terms":m})}),e[24]=m,e[25]=w,e[26]=p,e[27]=c,e[28]=v,e[29]=u,e[30]=I,e[31]=h,e[32]=N):N=e[32];let $;e[33]!==M||e[34]!==N?($=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[M,N]}),e[33]=M,e[34]=N,e[35]=$):$=e[35];let P;return e[36]!==$||e[37]!==y?(P=t.jsxs(t.Fragment,{children:[y,$]}),e[36]=$,e[37]=y,e[38]=P):P=e[38],P}function ys(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function _s(s){return s.sortable}function Cs(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function Ss(s){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:s.name})}function ws(s){return s==="asc"?"desc":s==="desc"?null:"asc"}function Ts(s){const e=U.c(4),{prompts:n,connectionId:o,org:i}=s;let a;return e[0]!==o||e[1]!==i||e[2]!==n?(a=t.jsx(Ns,{prompts:n,connectionId:o,org:i}),e[0]=o,e[1]=i,e[2]=n,e[3]=a):a=e[3],a}function ks(s){const e=U.c(2),{repository:n}=s;let o;return e[0]!==n?(o=t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(ms,{repository:n})}),e[0]=n,e[1]=o):o=e[1],o}function Ps(s){const e=U.c(36),{resources:n,onResourceClick:o,showToolbar:i,emptyMessage:a}=s,l=i===void 0?!0:i,j=a===void 0?"This connection doesn't have any resources yet.":a,[f,m]=X.useState(""),[x,c]=X.useState("table"),[r,h]=X.useState("name"),[d,u]=X.useState("asc");let b;e[0]!==d||e[1]!==r?(b=N=>{r===N?(u(Os),d==="desc"&&h(void 0)):(h(N),u("asc"))},e[0]=d,e[1]=r,e[2]=b):b=e[2];const v=b;let _;e[3]!==o?(_=N=>{o&&o(N)},e[3]=o,e[4]=_):_=e[4];const S=_;let p;if(e[5]!==n||e[6]!==f||e[7]!==d||e[8]!==r){const N=!n||n.length===0?[]:f.trim()?(()=>{const $=f.toLowerCase();return n.filter(P=>P.uri.toLowerCase().includes($)||P.name&&P.name.toLowerCase().includes($)||P.description&&P.description.toLowerCase().includes($))})():n;p=!r||!d?N:[...N].sort(($,P)=>{const T=$[r]||"",F=P[r]||"",B=String(T).localeCompare(String(F));return d==="asc"?B:-B}),e[5]=n,e[6]=f,e[7]=d,e[8]=r,e[9]=p}else p=e[9];const C=p;let w;e[10]===Symbol.for("react.memo_cache_sentinel")?(w=[{id:"name",header:"Name",render:Ds,sortable:!0},{id:"uri",header:"URI",render:Ms,sortable:!0},{id:"description",header:"Description",render:Vs,cellClassName:"flex-1",sortable:!0},{id:"mimeType",header:"Type",render:As,sortable:!0}],e[10]=w):w=e[10];const g=w;let I;e[11]===Symbol.for("react.memo_cache_sentinel")?(I=g.filter($s).map(Is),e[11]=I):I=e[11];const D=I;let A;e[12]!==v||e[13]!==l||e[14]!==d||e[15]!==r||e[16]!==x?(A=l&&t.jsx(Xe,{children:t.jsx(ft,{viewMode:x,onViewModeChange:c,sortKey:r,sortDirection:d,onSort:v,sortOptions:D})}),e[12]=v,e[13]=l,e[14]=d,e[15]=r,e[16]=x,e[17]=A):A=e[17];let V;e[18]===Symbol.for("react.memo_cache_sentinel")?(V=N=>{N.key==="Escape"&&(m(""),N.target.blur())},e[18]=V):V=e[18];let L;e[19]!==f?(L=t.jsx(ze,{value:f,onChange:m,placeholder:"Search resources...",onKeyDown:V}),e[19]=f,e[20]=L):L=e[20];let y;e[21]!==j||e[22]!==S||e[23]!==v||e[24]!==f||e[25]!==d||e[26]!==r||e[27]!==C||e[28]!==x?(y=x==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:C.length===0?t.jsx(Z,{image:null,title:f?"No resources found":"No resources available",description:f?"Try adjusting your search terms":j}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:C.map(N=>t.jsx(We,{className:"cursor-pointer transition-colors",onClick:()=>S(N),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(Re,{icon:null,name:N.name||N.uri,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:N.name||N.uri}),t.jsx("p",{className:"text-xs font-mono text-muted-foreground truncate",children:N.uri}),N.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-1",children:N.description})]})]})},N.uri))})}):t.jsx(pt,{columns:g,data:C,isLoading:!1,sortKey:r,sortDirection:d,onSort:v,onRowClick:N=>S(N),emptyState:t.jsx(Z,{image:null,title:f?"No resources found":"No resources available",description:f?"Try adjusting your search terms":j})}),e[21]=j,e[22]=S,e[23]=v,e[24]=f,e[25]=d,e[26]=r,e[27]=C,e[28]=x,e[29]=y):y=e[29];let R;e[30]!==L||e[31]!==y?(R=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[L,y]}),e[30]=L,e[31]=y,e[32]=R):R=e[32];let M;return e[33]!==R||e[34]!==A?(M=t.jsxs(t.Fragment,{children:[A,R]}),e[33]=R,e[34]=A,e[35]=M):M=e[35],M}function Is(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function $s(s){return s.sortable}function As(s){return t.jsx("span",{className:"text-sm text-muted-foreground",children:s.mimeType||"—"})}function Vs(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function Ms(s){return t.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:s.uri})}function Ds(s){return t.jsx("span",{className:"text-sm font-medium text-foreground",children:s.name||s.uri})}function Os(s){return s==="asc"?"desc":s==="desc"?null:"asc"}function Rs(s){const e=U.c(4),{resources:n,connectionId:o,org:i}=s;let a;return e[0]!==o||e[1]!==i||e[2]!==n?(a=t.jsx(Ps,{resources:n,connectionId:o,org:i}),e[0]=o,e[1]=i,e[2]=n,e[3]=a):a=e[3],a}const Es=at({key:z().min(1,"Key is required"),value:z()}),Ls=at({title:z().min(1,"Name is required"),description:z().nullable().optional(),ui_type:Nt(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:z().optional(),connection_token:z().nullable().optional(),npx_package:z().optional(),stdio_command:z().optional(),stdio_args:z().optional(),stdio_cwd:z().optional(),env_vars:Ge(Es).optional(),configuration_scopes:Ge(z()).nullable().optional(),configuration_state:bt(z(),vt()).nullable().optional()}).refine(s=>s.ui_type==="NPX"?!!s.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(s=>s.ui_type==="STDIO"?!!s.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(s=>s.ui_type==="HTTP"||s.ui_type==="SSE"||s.ui_type==="Websocket"?!!s.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function Us(s){const e=U.c(5),{tools:n,connectionId:o,org:i,isLoading:a}=s;let l;return e[0]!==o||e[1]!==a||e[2]!==i||e[3]!==n?(l=t.jsx(us,{tools:n,connectionId:o,org:i,isLoading:a}),e[0]=o,e[1]=a,e[2]=i,e[3]=n,e[4]=l):l=e[4],l}function Fs(s){const e=U.c(27),{tools:n,connectionId:o,org:i}=s,a=Ne(),{org:l}=Be();let j;e[0]!==o||e[1]!==l.id?(j={connectionId:o,orgId:l.id},e[0]=o,e[1]=l.id,e[2]=j):j=e[2];const f=mt(j),[m,x]=X.useState("");let c,r,h,d;if(e[3]!==f||e[4]!==o||e[5]!==a||e[6]!==i||e[7]!==m||e[8]!==n){const v=(n??[]).filter(Bs),_=m.toLowerCase().trim(),S=_?v.filter(g=>g.name.toLowerCase().includes(_)||g.description&&g.description.toLowerCase().includes(_)):v;let p;e[13]!==o||e[14]!==a||e[15]!==i?(p=g=>{a({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:i,project:ge,connectionId:o,collectionName:"tools",itemId:encodeURIComponent(g.name)}})},e[13]=o,e[14]=a,e[15]=i,e[16]=p):p=e[16];const C=p;h="flex flex-col h-full overflow-hidden";let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=g=>{g.key==="Escape"&&(x(""),g.target.blur())},e[17]=w):w=e[17],e[18]!==m?(d=t.jsx(ze,{value:m,onChange:x,placeholder:"Search apps...",onKeyDown:w}),e[18]=m,e[19]=d):d=e[19],c="flex-1 overflow-auto p-5",r=S.length===0?t.jsx(Z,{image:null,title:m?"No apps found":"No apps available",description:m?"Try adjusting your search terms":"This connection doesn't have any tools with interactive UIs yet."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:S.map(g=>{const I=Ke(g._meta);return t.jsxs(We,{className:"cursor-pointer transition-colors overflow-hidden",onClick:()=>C(g),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(fs,{resourceURI:I,toolName:g.name,displayMode:"inline",minHeight:200,maxHeight:200,client:f})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:g.name}),t.jsx(ps,{annotations:g.annotations,_meta:g._meta})]}),g.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:g.description})]})]},g.name)})}),e[3]=f,e[4]=o,e[5]=a,e[6]=i,e[7]=m,e[8]=n,e[9]=c,e[10]=r,e[11]=h,e[12]=d}else c=e[9],r=e[10],h=e[11],d=e[12];let u;e[20]!==c||e[21]!==r?(u=t.jsx("div",{className:c,children:r}),e[20]=c,e[21]=r,e[22]=u):u=e[22];let b;return e[23]!==h||e[24]!==d||e[25]!==u?(b=t.jsxs("div",{className:h,children:[d,u]}),e[23]=h,e[24]=d,e[25]=u,e[26]=b):b=e[26],b}function Bs(s){return!!Ke(s._meta)}function zs(s){return s.command==="npx"}function Ks(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Xs(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function Hs(s,e){const n={command:"npx",args:["-y",s]},o=lt(e);return Object.keys(o).length>0&&(n.envVars=o),n}function Ws(s,e,n,o){const i={command:s};e.trim()&&(i.args=e.trim().split(/\s+/)),n?.trim()&&(i.cwd=n.trim());const a=lt(o);return Object.keys(a).length>0&&(i.envVars=a),i}function rt(s,e){const n={title:s.title,description:s.description??"",configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Tt(s.connection_headers)){const o=s.connection_headers,i=Pt(o.envVars);if(zs(o)){const l=Ks(o);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:i}}const a=Xs(o);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:a.command,stdio_args:a.args,stdio_cwd:a.cwd,env_vars:i}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function qs(s){let e,n=null,o=null,i=null;return s.ui_type==="NPX"?(e="STDIO",n="",i=Hs(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",i=Ws(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",o=s.connection_token||null),{title:s.title,description:s.description||null,connection_type:e,connection_url:n,...o&&{connection_token:o},...i&&{connection_headers:i},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function Qs(s){const e=U.c(116),{connection:n,connectionId:o,org:i,requestedTabId:a,collections:l,onUpdate:j,isUpdating:f,prompts:m,resources:x,tools:c,isLoadingTools:r}=s;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={from:"/$org/$project/mcps/$connectionId"},e[0]=h):h=e[0];const d=Ne(h),u=Ct(),b=dt();let v;e[1]!==o?(v={connectionId:o},e[1]=o,e[2]=v):v=e[2];const _=Vt(v),p=n?.connection_type==="VIRTUAL"||_.isAuthenticated;let C;e[3]!==n?(C={connections:[n],binding:"MCP"},e[3]=n,e[4]=C):C=e[4];const g=At(C).length>0,I=n?.metadata?.repository,D=!!I?.url;let A;e[5]===Symbol.for("react.memo_cache_sentinel")?(A=St(Ls),e[5]=A):A=e[5];let V;e[6]!==n?(V=rt(n),e[6]=n,e[7]=V):V=e[7];let L;e[8]!==V?(L={resolver:A,values:V},e[8]=V,e[9]=L):L=e[9];const y=wt(L),R=y.formState.isDirty;let M;e[10]!==y||e[11]!==j?(M=async()=>{if(!await y.trigger())return;const E=y.getValues(),he=qs(E);await j(he),y.reset(E)},e[10]=y,e[11]=j,e[12]=M):M=e[12];const N=M;let $;e[13]!==n||e[14]!==y?($=()=>{y.reset(rt(n))},e[13]=n,e[14]=y,e[15]=$):$=e[15];const P=$;let T;e[16]!==n.id||e[17]!==b||e[18]!==u?(T=async()=>{const{token:k,tokenInfo:E,error:he}=await Lt({connectionId:n.id});if(he||!k){ve.error(`Authentication failed: ${he}`);return}if(E)try{const Me=await fetch(`/api/connections/${n.id}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:E.accessToken,refreshToken:E.refreshToken,expiresIn:E.expiresIn,scope:E.scope,clientId:E.clientId,clientSecret:E.clientSecret,tokenEndpoint:E.tokenEndpoint})});if(!Me.ok)console.error("Failed to save OAuth token:",await Me.text()),await b.update.mutateAsync({id:n.id,data:{connection_token:k}});else try{await b.update.mutateAsync({id:n.id,data:{}})}catch(qe){console.warn("Failed to refresh connection tools after OAuth:",qe)}}catch(Me){console.error("Error saving OAuth token:",Me),await b.update.mutateAsync({id:n.id,data:{connection_token:k}})}else await b.update.mutateAsync({id:n.id,data:{connection_token:k}});const ht=new URL(`/mcp/${n.id}`,window.location.origin);await u.invalidateQueries({queryKey:Je.isMCPAuthenticated(ht.href,null)}),ve.success("Authentication successful")},e[16]=n.id,e[17]=b,e[18]=u,e[19]=T):T=e[19];const F=T;let B;e[20]!==n.id||e[21]!==u?(B=async()=>{try{const k=await fetch(`/api/connections/${n.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!k.ok){const he=await k.text();ve.error(`Failed to remove OAuth: ${he}`);return}const E=new URL(`/mcp/${n.id}`,window.location.origin);await u.invalidateQueries({queryKey:Je.isMCPAuthenticated(E.href,null)}),ve.success("OAuth removed. You can now re-authenticate with a different account.")}catch(k){console.error("Error removing OAuth token:",k),ve.error("Failed to remove OAuth")}},e[20]=n.id,e[21]=u,e[22]=B):B=e[22];const je=B,ee=c.length,J=m.length,ye=x.length;let _e;e[23]!==c?(_e=c.filter(Ys),e[23]=c,e[24]=_e):_e=e[24];const Ce=_e.length,Ee=ee>0||r;let Se;e[25]===Symbol.for("react.memo_cache_sentinel")?(Se={id:"settings",label:"Settings"},e[25]=Se):Se=e[25];let te;e[26]!==r||e[27]!==p||e[28]!==Ee||e[29]!==ee?(te=p&&Ee?[{id:"tools",label:"Tools",count:r?void 0:ee}]:[],e[26]=r,e[27]=p,e[28]=Ee,e[29]=ee,e[30]=te):te=e[30];let se;e[31]!==p||e[32]!==J?(se=p&&J>0?[{id:"prompts",label:"Prompts",count:J}]:[],e[31]=p,e[32]=J,e[33]=se):se=e[33];let ne;e[34]!==p||e[35]!==ye?(ne=p&&ye>0?[{id:"resources",label:"Resources",count:ye}]:[],e[34]=p,e[35]=ye,e[36]=ne):ne=e[36];let oe;e[37]!==p||e[38]!==Ce?(oe=p&&Ce>0?[{id:"ui",label:"UI",count:Ce}]:[],e[37]=p,e[38]=Ce,e[39]=oe):oe=e[39];let we;if(e[40]!==l||e[41]!==D||e[42]!==p||e[43]!==te||e[44]!==se||e[45]!==ne||e[46]!==oe){let k;e[48]!==D?(k=D?[{id:"readme",label:"README"}]:[],e[48]=D,e[49]=k):k=e[49],we=[Se,...te,...se,...ne,...oe,...p?(l||[]).map(Js):[],...k],e[40]=l,e[41]=D,e[42]=p,e[43]=te,e[44]=se,e[45]=ne,e[46]=oe,e[47]=we}else we=e[47];const be=we,xt=p&&be.some(Gs)?"tools":"settings",O=be.some(k=>k.id===a)?a:xt;let Te;e[50]!==d?(Te=k=>{d({search:E=>({...E,tab:k}),replace:!0})},e[50]=d,e[51]=Te):Te=e[51];const re=Te;let ie;e[52]!==l?(ie=l||[],e[52]=l,e[53]=ie):ie=e[53];let ke;if(e[54]!==O||e[55]!==ie){let k;e[57]!==O?(k=E=>E.name===O,e[57]=O,e[58]=k):k=e[58],ke=ie.find(k),e[54]=O,e[55]=ie,e[56]=ke}else ke=e[56];const Pe=ke;let ae;e[59]!==i?(ae=t.jsx(Ye,{children:t.jsx(Ft,{asChild:!0,children:t.jsx(it,{to:"/$org/$project/mcps",params:{org:i,project:ge},children:"Connections"})})}),e[59]=i,e[60]=ae):ae=e[60];let Ie;e[61]===Symbol.for("react.memo_cache_sentinel")?(Ie=t.jsx(Bt,{}),e[61]=Ie):Ie=e[61];let ce;e[62]!==n.title?(ce=t.jsx(Ye,{children:t.jsx(Ut,{children:n.title})}),e[62]=n.title,e[63]=ce):ce=e[63];let $e;e[64]!==ae||e[65]!==ce?($e=t.jsx(zt,{children:t.jsxs(Kt,{children:[ae,Ie,ce]})}),e[64]=ae,e[65]=ce,e[66]=$e):$e=e[66];const Le=$e;let le;e[67]!==N||e[68]!==P||e[69]!==R||e[70]!==f?(le=t.jsx(Xe,{children:t.jsx(It,{onSave:N,onUndo:P,isDirty:R,isSaving:f})}),e[67]=N,e[68]=P,e[69]=R,e[70]=f,e[71]=le):le=e[71];let de;e[72]!==_.hasOAuthToken||e[73]!==n||e[74]!==y||e[75]!==F||e[76]!==je||e[77]!==p?(de=t.jsx("div",{className:"w-100 shrink-0 border-r border-border bg-background",children:t.jsx(js,{form:y,connection:n,isMCPAuthenticated:p,hasOAuthToken:_.hasOAuthToken,onReauthenticate:F,onRemoveOAuth:je})}),e[72]=_.hasOAuthToken,e[73]=n,e[74]=y,e[75]=F,e[76]=je,e[77]=p,e[78]=de):de=e[78];let me;e[79]!==O||e[80]!==re||e[81]!==be?(me=t.jsx("div",{className:"shrink-0 flex items-center gap-4 px-5 py-3 border-b border-border",children:t.jsx(Xt,{tabs:be,activeTab:O,onTabChange:re,className:"flex-1"})}),e[79]=O,e[80]=re,e[81]=be,e[82]=me):me=e[82];let Ae;e[83]===Symbol.for("react.memo_cache_sentinel")?(Ae=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[83]=Ae):Ae=e[83];let ue;e[84]!==Pe||e[85]!==O||e[86]!==_.isServerError||e[87]!==_.supportsOAuth||e[88]!==n||e[89]!==o||e[90]!==y||e[91]!==F||e[92]!==re||e[93]!==g||e[94]!==D||e[95]!==r||e[96]!==p||e[97]!==i||e[98]!==m||e[99]!==I||e[100]!==x||e[101]!==c?(ue=t.jsx(X.Suspense,{fallback:Ae,children:O==="tools"?t.jsx(Us,{tools:c,connectionId:o,org:i,isLoading:r}):O==="ui"?t.jsx(Fs,{tools:c,connectionId:o,org:i}):O==="prompts"?t.jsx(Ts,{prompts:m,connectionId:o,org:i}):O==="resources"?t.jsx(Rs,{resources:x,connectionId:o,org:i}):O==="settings"?t.jsx(Mt,{connection:n,form:y,hasMcpBinding:g,isMCPAuthenticated:p,supportsOAuth:_.supportsOAuth,isServerError:_.isServerError,onAuthenticate:F,onViewReadme:D?()=>re("readme"):void 0}):O==="readme"&&D?t.jsx(ks,{repository:I}):Pe&&p?t.jsx(Wt,{connectionId:o,org:i,activeCollection:Pe},O):t.jsx(Z,{title:"Collection not found",description:"This collection may have been deleted or you may not have access."})}),e[84]=Pe,e[85]=O,e[86]=_.isServerError,e[87]=_.supportsOAuth,e[88]=n,e[89]=o,e[90]=y,e[91]=F,e[92]=re,e[93]=g,e[94]=D,e[95]=r,e[96]=p,e[97]=i,e[98]=m,e[99]=I,e[100]=x,e[101]=c,e[102]=ue):ue=e[102];let pe;e[103]!==O||e[104]!==ue?(pe=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(ct,{children:ue},O)}),e[103]=O,e[104]=ue,e[105]=pe):pe=e[105];let fe;e[106]!==me||e[107]!==pe?(fe=t.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-hidden",children:[me,pe]}),e[106]=me,e[107]=pe,e[108]=fe):fe=e[108];let xe;e[109]!==de||e[110]!==fe?(xe=t.jsxs("div",{className:"flex h-full w-full bg-background overflow-hidden",children:[de,fe]}),e[109]=de,e[110]=fe,e[111]=xe):xe=e[111];let Ve;return e[112]!==Le||e[113]!==le||e[114]!==xe?(Ve=t.jsxs(Ht,{breadcrumb:Le,children:[le,xe]}),e[112]=Le,e[113]=le,e[114]=xe,e[115]=Ve):Ve=e[115],Ve}function Gs(s){return s.id==="tools"}function Js(s){return{id:s.name,label:s.displayName}}function Ys(s){return!!Ke(s._meta)}function Zs(){const s=U.c(43);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/$project/mcps/$connectionId"},s[0]=e):e=s[0];const n=Ne(e);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/$project/mcps/$connectionId"},s[1]=o):o=s[1];const{connectionId:i,org:a}=yt(o),{org:l}=Be();let j;s[2]===Symbol.for("react.memo_cache_sentinel")?(j={from:"/shell/$org/$project/mcps/$connectionId"},s[2]=j):j=s[2];const m=_t(j).tab??"",x=Dt(i),c=dt(),r=$t(x??void 0);let h;s[3]!==i||s[4]!==l.id?(h={connectionId:i,orgId:l.id},s[3]=i,s[4]=l.id,s[5]=h):h=s[5];const d=mt(h);let u;s[6]!==d?(u={client:d},s[6]=d,s[7]=u):u=s[7];const{data:b}=Et(u);let v;s[8]!==d?(v={client:d},s[8]=d,s[9]=v):v=s[9];const{data:_}=Rt(v),S=x?.connection_type==="VIRTUAL";let p;s[10]!==d||s[11]!==S?(p={client:d,enabled:S},s[10]=d,s[11]=S,s[12]=p):p=s[12];const{data:C,isLoading:w}=Ot(p);let g;s[13]!==b?.prompts?(g=b?.prompts??[],s[13]=b?.prompts,s[14]=g):g=s[14];let I;s[15]!==g?(I=g.map(sn),s[15]=g,s[16]=I):I=s[16];const D=I;let A;s[17]!==_?.resources?(A=_?.resources??[],s[17]=_?.resources,s[18]=A):A=s[18];let V;s[19]!==A?(V=A.map(tn),s[19]=A,s[20]=V):V=s[20];const L=V;let y;s[21]!==x?.tools||s[22]!==S||s[23]!==C?.tools?(y=S?(C?.tools??[]).map(en):x?.tools??[],s[21]=x?.tools,s[22]=S,s[23]=C?.tools,s[24]=y):y=s[24];const R=y;let M;s[25]!==c.update||s[26]!==i?(M=async P=>{await c.update.mutateAsync({id:i,data:P})},s[25]=c.update,s[26]=i,s[27]=M):M=s[27];const N=M;if(!x){let P;return s[28]!==n||s[29]!==a?(P=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Z,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(Ue,{variant:"outline",onClick:()=>n({to:"/$org/$project/mcps",params:{org:a,project:ge}}),children:"Back to connections"})})}),s[28]=n,s[29]=a,s[30]=P):P=s[30],P}let $;return s[31]!==c.update.isPending||s[32]!==r||s[33]!==x||s[34]!==i||s[35]!==N||s[36]!==w||s[37]!==a||s[38]!==D||s[39]!==m||s[40]!==L||s[41]!==R?($=t.jsx(Qs,{org:a,connection:x,connectionId:i,requestedTabId:m,collections:r,onUpdate:N,isUpdating:c.update.isPending,prompts:D,resources:L,tools:R,isLoadingTools:w}),s[31]=c.update.isPending,s[32]=r,s[33]=x,s[34]=i,s[35]=N,s[36]=w,s[37]=a,s[38]=D,s[39]=m,s[40]=L,s[41]=R,s[42]=$):$=s[42],$}function en(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,annotations:s.annotations,_meta:s._meta}}function tn(s){return{uri:s.uri,name:s.name,description:s.description}}function sn(s){return{name:s.name,description:s.description}}function nn(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ct,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Oe,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Zs,{})})}),s[0]=e):e=s[0],e}function cr(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(nn,{}),s[0]=e):e=s[0],e}export{cr as default};
|
|
1
|
+
import{c as U,j as t,b as Ne,B as Ue,O as ge,aD as it,u as Be,c0 as Qe,aB as gt,p as jt,r as X,o as at,bI as bt,bQ as vt,s as z,aF as Ge,aG as Nt,E as ct,e as yt,a as _t,n as Ct,k as St,l as wt,i as Tt,t as ve,K as Je}from"./index-BiG-bBX7.js";import{E as Z,C as ze}from"./collection-search-DWb-q4sb.js";import{E as kt,r as Pt,e as lt}from"./env-vars-editor-DIkYTN09.js";import{g as Ke}from"./types-C6Uddd8z.js";import{S as It}from"./save-actions-p2U4N3h5.js";import{b as $t,a as At}from"./use-binding-CoVeLP6R.js";import{u as Vt,S as Mt}from"./index-B-s7dcGH.js";import{f as Dt,g as dt}from"./use-connection-CsobI-JA.js";import{u as mt}from"./constants-Bj4b22ad.js";import{d as Ot}from"./use-mcp-tools-nHTt7uoJ.js";import{b as Rt}from"./use-mcp-resources-ucs4znYI.js";import{a as Et}from"./decopilot-events-CdHUYzEf.js";import{a as Lt}from"./mcp-oauth-DhVZXZzz.js";import{b as Ye,c as Ut,d as Ft,e as Bt,B as zt,a as Kt}from"./breadcrumb-h53M2ozZ.js";import{C as Xt}from"./collection-tabs-wwfnwWzq.js";import{i as Oe}from"./Loading01-W-w3cVps.js";import{V as Xe,a as Ht}from"./layout-BluQBehB.js";import{C as Wt}from"./collection-tab-CGcalnFw.js";import{I as Re}from"./integration-icon-DJplt18U.js";import{B as Fe}from"./badge-DaJA40lr.js";import{D as qt,a as Qt,b as Gt,c as Ze}from"./dropdown-menu-BaaJ3KIr.js";import{F as W,a as Jt,b as q,d as K,f as Q,c as Y,e as Yt}from"./form-CZlsOGpj.js";import{I as G}from"./input-BcOk4EWn.js";import{S as et,a as tt,b as st,c as nt,d as H}from"./select-DJV0GpEL.js";import{i as ut}from"./CheckCircle-BnSsCPeL.js";import{t as Zt}from"./ChevronDown-CIw5H_8I.js";import{n as es}from"./Container-C4kCziiV.js";import{s as De}from"./Globe02-vxtQsT0f.js";import{s as ts}from"./RefreshCcw01-BM6X0J3F.js";import{i as ss}from"./Terminal-DEkQfpQH.js";import{s as ns}from"./Trash01-BsNnpu_l.js";import{t as He}from"./Users03-BY0qO7qD.js";import{s as os}from"./XClose-7hYEQUhK.js";import{U as rs}from"./user-DiQL4i6w.js";import{b as is,a as as}from"./use-virtual-mcp-r6ou4ewu.js";import{i as cs}from"./ChevronRight-8LnYcsyR.js";import{s as ls}from"./Plus-7RI9qITc.js";import{f as ds}from"./formatDistanceToNow-Cb2QZZJn.js";import{a as pt,C as ft}from"./collection-table-wrapper-LUpcpQuR.js";import{C as We}from"./card-HOT-tKY7.js";import{R as ms}from"./readme-viewer-D1PTXNQQ.js";import{T as us,a as ps}from"./tools-list-CmIBKUpX.js";import{M as fs}from"./mcp-app-renderer-CPkL4-A0.js";import"./SearchMd-BzFnoImC.js";import"./Save01-83pceB_J.js";import"./binder-Bx_2YVEH.js";import"./File06-BzbT2v0z.js";import"./Key01-BjbQkebS.js";import"./constants-DTlOAYW2.js";import"./registry-utils-B4prNmYa.js";import"./extract-connection-data-DSMZDJ4i.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-BUdVd5Au.js";import"./index-CAR0mh84.js";import"./circle-alert-BRVau5r5.js";import"./index-jbQKqjQl.js";import"./index-CBDYR7h7.js";import"./index-D1gbzHrb.js";import"./collapsible-DRIF4wXT.js";import"./use-llm-DTbAtUds.js";import"./useQuery-Us1whSan.js";import"./localstorage-keys-BS2STbF7.js";import"./useMutation-Cxle_Mtw.js";import"./tabs-C-5F-MJ5.js";import"./checkbox-C2xwBknU.js";import"./Check-Bs28PslG.js";import"./dialog-DDOb23Pi.js";import"./X-B9LxUp5o.js";import"./skeleton-DhcP44Ov.js";import"./AlignLeft-DWMdThfD.js";import"./ArrowLeft-CvCy8CyB.js";import"./Image01-B_6vFaZi.js";import"./Settings01-D3dDBLbY.js";import"./useSuspenseInfiniteQuery-DcGj9DQ4.js";import"./infiniteQueryObserver-BZCRT6X1.js";import"./popover-Cnhlur36.js";import"./spinner-DSMOMT7g.js";import"./tooltip-BacoSwd7.js";import"./index-BxikKkX5.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-8t9O2FqG.js";import"./Edit01-DLZcWIR-.js";import"./XCircle-Dkkdz5ph.js";import"./AlertCircle-BIVpB2eV.js";import"./use-copy-De63ENVh.js";import"./Code01-C0MNem7b.js";import"./use-create-virtual-mcp-52zuHZ4A.js";import"./Copy01-Czr6qLQt.js";import"./marked.esm-BaswSlok.js";import"./markdown-94xyd8w7.js";import"./Eye-DPTzoZL8.js";import"./LayersTwo01-BexG7k2g.js";import"./index-ehKjC5PZ.js";import"./Clock-D17OAEFV.js";import"./DotsVertical-D9CMW5-2.js";import"./empty-state-cgNnxJVh.js";import"./Inbox01-DNp0SuVa.js";import"./use-list-state-DZ0uTI_k.js";import"./use-view-mode-RJVvlb7k.js";import"./use-mobile-BwubTGYW.js";import"./alert-dialog-DQT_qq2D.js";import"./label-BLk50aKt.js";import"./avatar-CV6z8E70.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowDown-CnXnoX-V.js";import"./Grid01-CILFuUHo.js";import"./List-BcuB27Kb.js";import"./table-DxvlU5EN.js";function xs(s){const e=U.c(14),{virtualMcp:n,org:o}=s;let i;e[0]!==o||e[1]!==n.id?(i={org:o,project:ge,agentId:n.id},e[0]=o,e[1]=n.id,e[2]=i):i=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(He,{size:16}),e[3]=a):a=e[3];let l;e[4]!==n.icon||e[5]!==n.title?(l=t.jsx(Re,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:a}),e[4]=n.icon,e[5]=n.title,e[6]=l):l=e[6];let j;e[7]!==n.title?(j=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(cs,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[9]=f):f=e[9];let m;return e[10]!==i||e[11]!==l||e[12]!==j?(m=t.jsxs(it,{to:"/$org/$project/agents/$agentId",params:i,className:"flex items-center gap-3 p-2 pr-1 rounded-lg hover:bg-muted/50 transition-colors group",children:[l,j,f]}),e[10]=i,e[11]=l,e[12]=j,e[13]=m):m=e[13],m}function ot(s){const e=U.c(20),{connectionId:n,connectionTitle:o,connectionDescription:i,connectionIcon:a,org:l,hasExistingVirtualMcps:j}=s,f=Ne(),m=as();let x;e[0]!==m.create||e[1]!==i||e[2]!==a||e[3]!==n||e[4]!==o||e[5]!==f||e[6]!==l?(x=async()=>{const d=await m.create.mutateAsync({title:`${o} Agent`,description:i??null,icon:a??null,status:"active",connections:[{connection_id:n,selected_tools:null,selected_resources:null,selected_prompts:null}]});f({to:"/$org/$project/agents/$agentId",params:{org:l,project:ge,agentId:d.id}})},e[0]=m.create,e[1]=i,e[2]=a,e[3]=n,e[4]=o,e[5]=f,e[6]=l,e[7]=x):x=e[7];const c=x;if(j){let d;e[8]!==m.create.isPending?(d=m.create.isPending?t.jsx(Oe,{size:16,className:"animate-spin"}):t.jsx(ls,{size:16}),e[8]=m.create.isPending,e[9]=d):d=e[9];let u;return e[10]!==m.create.isPending||e[11]!==c||e[12]!==d?(u=t.jsx(Ue,{variant:"ghost",className:"size-6 p-0",onClick:c,disabled:m.create.isPending,children:d}),e[10]=m.create.isPending,e[11]=c,e[12]=d,e[13]=u):u=e[13],u}let r;e[14]!==m.create.isPending?(r=m.create.isPending?t.jsx(Oe,{className:"animate-spin text-muted-foreground"}):t.jsx(He,{className:"size-3 text-muted-foreground"}),e[14]=m.create.isPending,e[15]=r):r=e[15];let h;return e[16]!==m.create.isPending||e[17]!==c||e[18]!==r?(h=t.jsxs(Ue,{variant:"outline",size:"sm",onClick:c,disabled:m.create.isPending,children:[r,"Create an agent"]}),e[16]=m.create.isPending,e[17]=c,e[18]=r,e[19]=h):h=e[19],h}function hs(s){const e=U.c(26),{connectionId:n,connectionTitle:o,connectionDescription:i,connectionIcon:a,org:l}=s;let j;e[0]!==n?(j={filters:[{column:"connection_id",value:n}]},e[0]=n,e[1]=j):j=e[1];const f=is(j);if(!(f.length>0)){let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("h4",{className:"text-xs text-muted-foreground font-medium",children:"Use in your IDE"}),e[2]=u):u=e[2];let b;return e[3]!==i||e[4]!==a||e[5]!==n||e[6]!==o||e[7]!==l?(b=t.jsxs("div",{className:"p-5 flex items-center justify-between gap-3",children:[u,t.jsx(ot,{connectionId:n,connectionTitle:o,connectionDescription:i,connectionIcon:a,org:l,hasExistingVirtualMcps:!1})]}),e[3]=i,e[4]=a,e[5]=n,e[6]=o,e[7]=l,e[8]=b):b=e[8],b}let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("h4",{className:"text-xs text-muted-foreground font-medium",children:"Agents"}),e[9]=x):x=e[9];let c;e[10]!==i||e[11]!==a||e[12]!==n||e[13]!==o||e[14]!==l?(c=t.jsx("div",{className:"flex flex-col gap-1",children:t.jsxs("div",{className:"flex items-center justify-between",children:[x,t.jsx(ot,{connectionId:n,connectionTitle:o,connectionDescription:i,connectionIcon:a,org:l,hasExistingVirtualMcps:!0})]})}),e[10]=i,e[11]=a,e[12]=n,e[13]=o,e[14]=l,e[15]=c):c=e[15];let r;if(e[16]!==l||e[17]!==f){let u;e[19]!==l?(u=b=>t.jsx(xs,{virtualMcp:b,org:l},b.id),e[19]=l,e[20]=u):u=e[20],r=f.map(u),e[16]=l,e[17]=f,e[18]=r}else r=e[18];let h;e[21]!==r?(h=t.jsx("div",{className:"flex flex-col gap-2",children:r}),e[21]=r,e[22]=h):h=e[22];let d;return e[23]!==c||e[24]!==h?(d=t.jsxs("div",{className:"p-5 flex flex-col gap-3",children:[c,h]}),e[23]=c,e[24]=h,e[25]=d):d=e[25],d}function gs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:o,onRemoveOAuth:i}){const a=Qe({control:s.control,name:"ui_type"}),l=Qe({control:s.control,name:"connection_url"}),{stdioEnabled:j}=gt(),f=(()=>{if(typeof l!="string"||!l)return!1;try{const r=new URL(l);return r.hostname==="api.githubcopilot.com"&&r.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),m=j||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",c=x?jt(e.connection_url):null;return x?t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Type"}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(He,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),c&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:c})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsx(W,{control:s.control,name:"ui_type",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),a!=="NPX"&&a!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(et,{value:r.value,onValueChange:r.onChange,children:[t.jsx(K,{children:t.jsxs(tt,{className:"h-10 w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(De,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(st,{})]})}),t.jsxs(nt,{children:[t.jsx(H,{value:"HTTP",children:"HTTP"}),t.jsx(H,{value:"SSE",children:"SSE"}),t.jsx(H,{value:"Websocket",children:"Websocket"}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:"NPX Package"}),t.jsx(H,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(W,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(q,{className:"flex-1 min-w-0",children:t.jsx(K,{children:t.jsx(G,{placeholder:"https://example.com/mcp",...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(et,{value:r.value,onValueChange:r.onChange,children:[t.jsx(K,{children:t.jsx(tt,{className:"h-10",children:t.jsx(st,{})})}),t.jsxs(nt,{children:[t.jsx(H,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(De,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(H,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(De,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(H,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(De,{className:"w-4 h-4"}),"Websocket"]})}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(es,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(H,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ss,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(Q,{})]})}),a==="NPX"&&t.jsx(W,{control:s.control,name:"npx_package",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(K,{children:t.jsx(G,{placeholder:"@perplexity-ai/mcp-server",...r,value:r.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),a==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(W,{control:s.control,name:"stdio_command",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(K,{children:t.jsx(G,{placeholder:"node, bun, python...",...r,value:r.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),t.jsx(W,{control:s.control,name:"stdio_args",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(K,{children:t.jsx(G,{placeholder:"arg1 arg2 --flag value",...r,value:r.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(Q,{})]})})]}),t.jsx(W,{control:s.control,name:"stdio_cwd",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(K,{children:t.jsx(G,{placeholder:"/path/to/project (optional)",...r,value:r.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})})]}),(a==="NPX"||a==="STDIO")&&t.jsx(W,{control:s.control,name:"env_vars",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(K,{children:t.jsx(kt,{value:r.value??[],onChange:r.onChange})}),t.jsx(Q,{})]})}),a!=="NPX"&&a!=="STDIO"&&t.jsx(W,{control:s.control,name:"connection_token",render:({field:r})=>t.jsxs(q,{className:"flex flex-col gap-3",children:[t.jsx(Y,{className:"text-xs text-muted-foreground font-medium",children:f?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(qt,{children:[t.jsx(Qt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Fe,{variant:"success",className:"gap-1.5",children:[t.jsx(ut,{size:12}),"Authenticated via OAuth",t.jsx(Zt,{size:12})]})})}),t.jsxs(Gt,{align:"start",children:[t.jsxs(Ze,{onClick:o,children:[t.jsx(ts,{size:16}),"Re-authenticate"]}),t.jsxs(Ze,{variant:"destructive",onClick:i,children:[t.jsx(ns,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&r.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>r.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(os,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(K,{children:t.jsx(G,{type:"password",placeholder:f?"Paste your GitHub PAT":"Enter access token...",...r,value:r.value||"",className:"h-10 rounded-lg"})}),f&&t.jsxs(Yt,{children:["Create a PAT at"," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(Q,{})]})})]})}function js(s){const e=U.c(43),{form:n,connection:o,isMCPAuthenticated:i,hasOAuthToken:a,onReauthenticate:l,onRemoveOAuth:j}=s,{org:f}=Be();let m;e[0]!==o.icon||e[1]!==o.title?(m=t.jsx(Re,{icon:o.icon,name:o.title,size:"lg",className:"shadow-sm"}),e[0]=o.icon,e[1]=o.title,e[2]=m):m=e[2];let x;e[3]!==n.control?(x=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(W,{control:n.control,name:"title",render:vs}),t.jsx(W,{control:n.control,name:"description",render:bs})]}),e[3]=n.control,e[4]=x):x=e[4];let c;e[5]!==m||e[6]!==x?(c=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[m,x]}),e[5]=m,e[6]=x,e[7]=c):c=e[7];let r;e[8]!==o||e[9]!==n||e[10]!==a||e[11]!==l||e[12]!==j?(r=t.jsx(gs,{form:n,connection:o,hasOAuthToken:a,onReauthenticate:l,onRemoveOAuth:j}),e[8]=o,e[9]=n,e[10]=a,e[11]=l,e[12]=j,e[13]=r):r=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Status"}),e[14]=h):h=e[14];let d;e[15]!==i?(d=t.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[h,i?t.jsxs(Fe,{variant:"success",className:"gap-1.5 bg-success-foreground text-success",children:[t.jsx(ut,{size:12}),"Connected"]}):t.jsx(Fe,{variant:"outline",className:"text-muted-foreground",children:"Not connected"})]}),e[15]=i,e[16]=d):d=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Created by"}),e[17]=u):u=e[17];let b;e[18]!==o.created_by?(b=t.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[u,t.jsx(rs,{id:o.created_by,size:"2xs"})]}),e[18]=o.created_by,e[19]=b):b=e[19];let v;e[20]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Updated"}),e[20]=v):v=e[20];let _;e[21]!==o.updated_at?(_=o.updated_at?ds(new Date(o.updated_at),{addSuffix:!0}):"Unknown",e[21]=o.updated_at,e[22]=_):_=e[22];let S;e[23]!==_?(S=t.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[v,t.jsx("span",{className:"text-sm text-foreground",children:_})]}),e[23]=_,e[24]=S):S=e[24];let p;e[25]!==S||e[26]!==d||e[27]!==b?(p=t.jsxs("div",{className:"flex flex-col gap-2 p-5 border-b border-border",children:[d,b,S]}),e[25]=S,e[26]=d,e[27]=b,e[28]=p):p=e[28];let C;e[29]!==o.description||e[30]!==o.icon||e[31]!==o.id||e[32]!==o.title||e[33]!==f.slug?(C=t.jsx(hs,{connectionId:o.id,connectionTitle:o.title,connectionDescription:o.description,connectionIcon:o.icon,org:f.slug}),e[29]=o.description,e[30]=o.icon,e[31]=o.id,e[32]=o.title,e[33]=f.slug,e[34]=C):C=e[34];let w;e[35]!==p||e[36]!==C||e[37]!==c||e[38]!==r?(w=t.jsxs("div",{className:"flex flex-col h-full overflow-auto",children:[c,r,p,C]}),e[35]=p,e[36]=C,e[37]=c,e[38]=r,e[39]=w):w=e[39];let g;return e[40]!==n||e[41]!==w?(g=t.jsx(Jt,{...n,children:w}),e[40]=n,e[41]=w,e[42]=g):g=e[42],g}function bs(s){const{field:e}=s;return t.jsxs(q,{className:"w-full space-y-0",children:[t.jsx(K,{children:t.jsx(G,{...e,value:e.value||"",className:"h-auto py-0.5 text-base text-muted-foreground leading-6 px-2 -mx-2 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})}),t.jsx(Q,{})]})}function vs(s){const{field:e}=s;return t.jsxs(q,{className:"flex-1 space-y-0",children:[t.jsx(K,{children:t.jsx(G,{...e,className:"h-auto py-0.5 text-lg! font-medium leading-7 px-2 -mx-2 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Connection Name"})}),t.jsx(Q,{})]})}function Ns(s){const e=U.c(39),{prompts:n,connectionId:o,org:i,onPromptClick:a,showToolbar:l,emptyMessage:j}=s,f=l===void 0?!0:l,m=j===void 0?"This connection doesn't have any prompts yet.":j,x=Ne(),[c,r]=X.useState(""),[h,d]=X.useState("table"),[u,b]=X.useState("name"),[v,_]=X.useState("asc");let S;e[0]!==v||e[1]!==u?(S=T=>{u===T?(_(ws),v==="desc"&&b(void 0)):(b(T),_("asc"))},e[0]=v,e[1]=u,e[2]=S):S=e[2];const p=S;let C;e[3]!==o||e[4]!==x||e[5]!==a||e[6]!==i?(C=T=>{a?a(T):o&&i&&x({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:i,project:ge,connectionId:o,collectionName:"prompts",itemId:encodeURIComponent(T.name)}})},e[3]=o,e[4]=x,e[5]=a,e[6]=i,e[7]=C):C=e[7];const w=C;let g;if(e[8]!==n||e[9]!==c||e[10]!==v||e[11]!==u){const T=!n||n.length===0?[]:c.trim()?(()=>{const F=c.toLowerCase();return n.filter(B=>B.name.toLowerCase().includes(F)||B.description&&B.description.toLowerCase().includes(F))})():n;g=!u||!v?T:[...T].sort((F,B)=>{const je=F[u]||"",ee=B[u]||"",J=String(je).localeCompare(String(ee));return v==="asc"?J:-J}),e[8]=n,e[9]=c,e[10]=v,e[11]=u,e[12]=g}else g=e[12];const I=g;let D;e[13]===Symbol.for("react.memo_cache_sentinel")?(D=[{id:"name",header:"Name",render:Ss,sortable:!0},{id:"description",header:"Description",render:Cs,cellClassName:"flex-1",sortable:!0}],e[13]=D):D=e[13];const A=D;let V;e[14]===Symbol.for("react.memo_cache_sentinel")?(V=A.filter(_s).map(ys),e[14]=V):V=e[14];const L=V;let y;e[15]!==p||e[16]!==f||e[17]!==v||e[18]!==u||e[19]!==h?(y=f&&t.jsx(Xe,{children:t.jsx(ft,{viewMode:h,onViewModeChange:d,sortKey:u,sortDirection:v,onSort:p,sortOptions:L})}),e[15]=p,e[16]=f,e[17]=v,e[18]=u,e[19]=h,e[20]=y):y=e[20];let R;e[21]===Symbol.for("react.memo_cache_sentinel")?(R=T=>{T.key==="Escape"&&(r(""),T.target.blur())},e[21]=R):R=e[21];let M;e[22]!==c?(M=t.jsx(ze,{value:c,onChange:r,placeholder:"Search prompts...",onKeyDown:R}),e[22]=c,e[23]=M):M=e[23];let N;e[24]!==m||e[25]!==w||e[26]!==p||e[27]!==c||e[28]!==v||e[29]!==u||e[30]!==I||e[31]!==h?(N=h==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:I.length===0?t.jsx(Z,{image:null,title:c?"No prompts found":"No prompts available",description:c?"Try adjusting your search terms":m}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:I.map(T=>t.jsx(We,{className:"cursor-pointer transition-colors",onClick:()=>w(T),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(Re,{icon:null,name:T.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:T.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:T.description||"No description"})]})]})},T.name))})}):t.jsx(pt,{columns:A,data:I,isLoading:!1,sortKey:u,sortDirection:v,onSort:p,onRowClick:T=>w(T),emptyState:t.jsx(Z,{image:null,title:c?"No prompts found":"No prompts available",description:c?"Try adjusting your search terms":m})}),e[24]=m,e[25]=w,e[26]=p,e[27]=c,e[28]=v,e[29]=u,e[30]=I,e[31]=h,e[32]=N):N=e[32];let $;e[33]!==M||e[34]!==N?($=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[M,N]}),e[33]=M,e[34]=N,e[35]=$):$=e[35];let P;return e[36]!==$||e[37]!==y?(P=t.jsxs(t.Fragment,{children:[y,$]}),e[36]=$,e[37]=y,e[38]=P):P=e[38],P}function ys(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function _s(s){return s.sortable}function Cs(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function Ss(s){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:s.name})}function ws(s){return s==="asc"?"desc":s==="desc"?null:"asc"}function Ts(s){const e=U.c(4),{prompts:n,connectionId:o,org:i}=s;let a;return e[0]!==o||e[1]!==i||e[2]!==n?(a=t.jsx(Ns,{prompts:n,connectionId:o,org:i}),e[0]=o,e[1]=i,e[2]=n,e[3]=a):a=e[3],a}function ks(s){const e=U.c(2),{repository:n}=s;let o;return e[0]!==n?(o=t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(ms,{repository:n})}),e[0]=n,e[1]=o):o=e[1],o}function Ps(s){const e=U.c(36),{resources:n,onResourceClick:o,showToolbar:i,emptyMessage:a}=s,l=i===void 0?!0:i,j=a===void 0?"This connection doesn't have any resources yet.":a,[f,m]=X.useState(""),[x,c]=X.useState("table"),[r,h]=X.useState("name"),[d,u]=X.useState("asc");let b;e[0]!==d||e[1]!==r?(b=N=>{r===N?(u(Os),d==="desc"&&h(void 0)):(h(N),u("asc"))},e[0]=d,e[1]=r,e[2]=b):b=e[2];const v=b;let _;e[3]!==o?(_=N=>{o&&o(N)},e[3]=o,e[4]=_):_=e[4];const S=_;let p;if(e[5]!==n||e[6]!==f||e[7]!==d||e[8]!==r){const N=!n||n.length===0?[]:f.trim()?(()=>{const $=f.toLowerCase();return n.filter(P=>P.uri.toLowerCase().includes($)||P.name&&P.name.toLowerCase().includes($)||P.description&&P.description.toLowerCase().includes($))})():n;p=!r||!d?N:[...N].sort(($,P)=>{const T=$[r]||"",F=P[r]||"",B=String(T).localeCompare(String(F));return d==="asc"?B:-B}),e[5]=n,e[6]=f,e[7]=d,e[8]=r,e[9]=p}else p=e[9];const C=p;let w;e[10]===Symbol.for("react.memo_cache_sentinel")?(w=[{id:"name",header:"Name",render:Ds,sortable:!0},{id:"uri",header:"URI",render:Ms,sortable:!0},{id:"description",header:"Description",render:Vs,cellClassName:"flex-1",sortable:!0},{id:"mimeType",header:"Type",render:As,sortable:!0}],e[10]=w):w=e[10];const g=w;let I;e[11]===Symbol.for("react.memo_cache_sentinel")?(I=g.filter($s).map(Is),e[11]=I):I=e[11];const D=I;let A;e[12]!==v||e[13]!==l||e[14]!==d||e[15]!==r||e[16]!==x?(A=l&&t.jsx(Xe,{children:t.jsx(ft,{viewMode:x,onViewModeChange:c,sortKey:r,sortDirection:d,onSort:v,sortOptions:D})}),e[12]=v,e[13]=l,e[14]=d,e[15]=r,e[16]=x,e[17]=A):A=e[17];let V;e[18]===Symbol.for("react.memo_cache_sentinel")?(V=N=>{N.key==="Escape"&&(m(""),N.target.blur())},e[18]=V):V=e[18];let L;e[19]!==f?(L=t.jsx(ze,{value:f,onChange:m,placeholder:"Search resources...",onKeyDown:V}),e[19]=f,e[20]=L):L=e[20];let y;e[21]!==j||e[22]!==S||e[23]!==v||e[24]!==f||e[25]!==d||e[26]!==r||e[27]!==C||e[28]!==x?(y=x==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:C.length===0?t.jsx(Z,{image:null,title:f?"No resources found":"No resources available",description:f?"Try adjusting your search terms":j}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:C.map(N=>t.jsx(We,{className:"cursor-pointer transition-colors",onClick:()=>S(N),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(Re,{icon:null,name:N.name||N.uri,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:N.name||N.uri}),t.jsx("p",{className:"text-xs font-mono text-muted-foreground truncate",children:N.uri}),N.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-1",children:N.description})]})]})},N.uri))})}):t.jsx(pt,{columns:g,data:C,isLoading:!1,sortKey:r,sortDirection:d,onSort:v,onRowClick:N=>S(N),emptyState:t.jsx(Z,{image:null,title:f?"No resources found":"No resources available",description:f?"Try adjusting your search terms":j})}),e[21]=j,e[22]=S,e[23]=v,e[24]=f,e[25]=d,e[26]=r,e[27]=C,e[28]=x,e[29]=y):y=e[29];let R;e[30]!==L||e[31]!==y?(R=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[L,y]}),e[30]=L,e[31]=y,e[32]=R):R=e[32];let M;return e[33]!==R||e[34]!==A?(M=t.jsxs(t.Fragment,{children:[A,R]}),e[33]=R,e[34]=A,e[35]=M):M=e[35],M}function Is(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function $s(s){return s.sortable}function As(s){return t.jsx("span",{className:"text-sm text-muted-foreground",children:s.mimeType||"—"})}function Vs(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function Ms(s){return t.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:s.uri})}function Ds(s){return t.jsx("span",{className:"text-sm font-medium text-foreground",children:s.name||s.uri})}function Os(s){return s==="asc"?"desc":s==="desc"?null:"asc"}function Rs(s){const e=U.c(4),{resources:n,connectionId:o,org:i}=s;let a;return e[0]!==o||e[1]!==i||e[2]!==n?(a=t.jsx(Ps,{resources:n,connectionId:o,org:i}),e[0]=o,e[1]=i,e[2]=n,e[3]=a):a=e[3],a}const Es=at({key:z().min(1,"Key is required"),value:z()}),Ls=at({title:z().min(1,"Name is required"),description:z().nullable().optional(),ui_type:Nt(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:z().optional(),connection_token:z().nullable().optional(),npx_package:z().optional(),stdio_command:z().optional(),stdio_args:z().optional(),stdio_cwd:z().optional(),env_vars:Ge(Es).optional(),configuration_scopes:Ge(z()).nullable().optional(),configuration_state:bt(z(),vt()).nullable().optional()}).refine(s=>s.ui_type==="NPX"?!!s.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(s=>s.ui_type==="STDIO"?!!s.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(s=>s.ui_type==="HTTP"||s.ui_type==="SSE"||s.ui_type==="Websocket"?!!s.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function Us(s){const e=U.c(5),{tools:n,connectionId:o,org:i,isLoading:a}=s;let l;return e[0]!==o||e[1]!==a||e[2]!==i||e[3]!==n?(l=t.jsx(us,{tools:n,connectionId:o,org:i,isLoading:a}),e[0]=o,e[1]=a,e[2]=i,e[3]=n,e[4]=l):l=e[4],l}function Fs(s){const e=U.c(27),{tools:n,connectionId:o,org:i}=s,a=Ne(),{org:l}=Be();let j;e[0]!==o||e[1]!==l.id?(j={connectionId:o,orgId:l.id},e[0]=o,e[1]=l.id,e[2]=j):j=e[2];const f=mt(j),[m,x]=X.useState("");let c,r,h,d;if(e[3]!==f||e[4]!==o||e[5]!==a||e[6]!==i||e[7]!==m||e[8]!==n){const v=(n??[]).filter(Bs),_=m.toLowerCase().trim(),S=_?v.filter(g=>g.name.toLowerCase().includes(_)||g.description&&g.description.toLowerCase().includes(_)):v;let p;e[13]!==o||e[14]!==a||e[15]!==i?(p=g=>{a({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:i,project:ge,connectionId:o,collectionName:"tools",itemId:encodeURIComponent(g.name)}})},e[13]=o,e[14]=a,e[15]=i,e[16]=p):p=e[16];const C=p;h="flex flex-col h-full overflow-hidden";let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=g=>{g.key==="Escape"&&(x(""),g.target.blur())},e[17]=w):w=e[17],e[18]!==m?(d=t.jsx(ze,{value:m,onChange:x,placeholder:"Search apps...",onKeyDown:w}),e[18]=m,e[19]=d):d=e[19],c="flex-1 overflow-auto p-5",r=S.length===0?t.jsx(Z,{image:null,title:m?"No apps found":"No apps available",description:m?"Try adjusting your search terms":"This connection doesn't have any tools with interactive UIs yet."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:S.map(g=>{const I=Ke(g._meta);return t.jsxs(We,{className:"cursor-pointer transition-colors overflow-hidden",onClick:()=>C(g),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(fs,{resourceURI:I,toolName:g.name,displayMode:"inline",minHeight:200,maxHeight:200,client:f})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:g.name}),t.jsx(ps,{annotations:g.annotations,_meta:g._meta})]}),g.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:g.description})]})]},g.name)})}),e[3]=f,e[4]=o,e[5]=a,e[6]=i,e[7]=m,e[8]=n,e[9]=c,e[10]=r,e[11]=h,e[12]=d}else c=e[9],r=e[10],h=e[11],d=e[12];let u;e[20]!==c||e[21]!==r?(u=t.jsx("div",{className:c,children:r}),e[20]=c,e[21]=r,e[22]=u):u=e[22];let b;return e[23]!==h||e[24]!==d||e[25]!==u?(b=t.jsxs("div",{className:h,children:[d,u]}),e[23]=h,e[24]=d,e[25]=u,e[26]=b):b=e[26],b}function Bs(s){return!!Ke(s._meta)}function zs(s){return s.command==="npx"}function Ks(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Xs(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function Hs(s,e){const n={command:"npx",args:["-y",s]},o=lt(e);return Object.keys(o).length>0&&(n.envVars=o),n}function Ws(s,e,n,o){const i={command:s};e.trim()&&(i.args=e.trim().split(/\s+/)),n?.trim()&&(i.cwd=n.trim());const a=lt(o);return Object.keys(a).length>0&&(i.envVars=a),i}function rt(s,e){const n={title:s.title,description:s.description??"",configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Tt(s.connection_headers)){const o=s.connection_headers,i=Pt(o.envVars);if(zs(o)){const l=Ks(o);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:i}}const a=Xs(o);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:a.command,stdio_args:a.args,stdio_cwd:a.cwd,env_vars:i}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function qs(s){let e,n=null,o=null,i=null;return s.ui_type==="NPX"?(e="STDIO",n="",i=Hs(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",i=Ws(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",o=s.connection_token||null),{title:s.title,description:s.description||null,connection_type:e,connection_url:n,...o&&{connection_token:o},...i&&{connection_headers:i},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function Qs(s){const e=U.c(116),{connection:n,connectionId:o,org:i,requestedTabId:a,collections:l,onUpdate:j,isUpdating:f,prompts:m,resources:x,tools:c,isLoadingTools:r}=s;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={from:"/$org/$project/mcps/$connectionId"},e[0]=h):h=e[0];const d=Ne(h),u=Ct(),b=dt();let v;e[1]!==o?(v={connectionId:o},e[1]=o,e[2]=v):v=e[2];const _=Vt(v),p=n?.connection_type==="VIRTUAL"||_.isAuthenticated;let C;e[3]!==n?(C={connections:[n],binding:"MCP"},e[3]=n,e[4]=C):C=e[4];const g=At(C).length>0,I=n?.metadata?.repository,D=!!I?.url;let A;e[5]===Symbol.for("react.memo_cache_sentinel")?(A=St(Ls),e[5]=A):A=e[5];let V;e[6]!==n?(V=rt(n),e[6]=n,e[7]=V):V=e[7];let L;e[8]!==V?(L={resolver:A,values:V},e[8]=V,e[9]=L):L=e[9];const y=wt(L),R=y.formState.isDirty;let M;e[10]!==y||e[11]!==j?(M=async()=>{if(!await y.trigger())return;const E=y.getValues(),he=qs(E);await j(he),y.reset(E)},e[10]=y,e[11]=j,e[12]=M):M=e[12];const N=M;let $;e[13]!==n||e[14]!==y?($=()=>{y.reset(rt(n))},e[13]=n,e[14]=y,e[15]=$):$=e[15];const P=$;let T;e[16]!==n.id||e[17]!==b||e[18]!==u?(T=async()=>{const{token:k,tokenInfo:E,error:he}=await Lt({connectionId:n.id});if(he||!k){ve.error(`Authentication failed: ${he}`);return}if(E)try{const Me=await fetch(`/api/connections/${n.id}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:E.accessToken,refreshToken:E.refreshToken,expiresIn:E.expiresIn,scope:E.scope,clientId:E.clientId,clientSecret:E.clientSecret,tokenEndpoint:E.tokenEndpoint})});if(!Me.ok)console.error("Failed to save OAuth token:",await Me.text()),await b.update.mutateAsync({id:n.id,data:{connection_token:k}});else try{await b.update.mutateAsync({id:n.id,data:{}})}catch(qe){console.warn("Failed to refresh connection tools after OAuth:",qe)}}catch(Me){console.error("Error saving OAuth token:",Me),await b.update.mutateAsync({id:n.id,data:{connection_token:k}})}else await b.update.mutateAsync({id:n.id,data:{connection_token:k}});const ht=new URL(`/mcp/${n.id}`,window.location.origin);await u.invalidateQueries({queryKey:Je.isMCPAuthenticated(ht.href,null)}),ve.success("Authentication successful")},e[16]=n.id,e[17]=b,e[18]=u,e[19]=T):T=e[19];const F=T;let B;e[20]!==n.id||e[21]!==u?(B=async()=>{try{const k=await fetch(`/api/connections/${n.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!k.ok){const he=await k.text();ve.error(`Failed to remove OAuth: ${he}`);return}const E=new URL(`/mcp/${n.id}`,window.location.origin);await u.invalidateQueries({queryKey:Je.isMCPAuthenticated(E.href,null)}),ve.success("OAuth removed. You can now re-authenticate with a different account.")}catch(k){console.error("Error removing OAuth token:",k),ve.error("Failed to remove OAuth")}},e[20]=n.id,e[21]=u,e[22]=B):B=e[22];const je=B,ee=c.length,J=m.length,ye=x.length;let _e;e[23]!==c?(_e=c.filter(Ys),e[23]=c,e[24]=_e):_e=e[24];const Ce=_e.length,Ee=ee>0||r;let Se;e[25]===Symbol.for("react.memo_cache_sentinel")?(Se={id:"settings",label:"Settings"},e[25]=Se):Se=e[25];let te;e[26]!==r||e[27]!==p||e[28]!==Ee||e[29]!==ee?(te=p&&Ee?[{id:"tools",label:"Tools",count:r?void 0:ee}]:[],e[26]=r,e[27]=p,e[28]=Ee,e[29]=ee,e[30]=te):te=e[30];let se;e[31]!==p||e[32]!==J?(se=p&&J>0?[{id:"prompts",label:"Prompts",count:J}]:[],e[31]=p,e[32]=J,e[33]=se):se=e[33];let ne;e[34]!==p||e[35]!==ye?(ne=p&&ye>0?[{id:"resources",label:"Resources",count:ye}]:[],e[34]=p,e[35]=ye,e[36]=ne):ne=e[36];let oe;e[37]!==p||e[38]!==Ce?(oe=p&&Ce>0?[{id:"ui",label:"UI",count:Ce}]:[],e[37]=p,e[38]=Ce,e[39]=oe):oe=e[39];let we;if(e[40]!==l||e[41]!==D||e[42]!==p||e[43]!==te||e[44]!==se||e[45]!==ne||e[46]!==oe){let k;e[48]!==D?(k=D?[{id:"readme",label:"README"}]:[],e[48]=D,e[49]=k):k=e[49],we=[Se,...te,...se,...ne,...oe,...p?(l||[]).map(Js):[],...k],e[40]=l,e[41]=D,e[42]=p,e[43]=te,e[44]=se,e[45]=ne,e[46]=oe,e[47]=we}else we=e[47];const be=we,xt=p&&be.some(Gs)?"tools":"settings",O=be.some(k=>k.id===a)?a:xt;let Te;e[50]!==d?(Te=k=>{d({search:E=>({...E,tab:k}),replace:!0})},e[50]=d,e[51]=Te):Te=e[51];const re=Te;let ie;e[52]!==l?(ie=l||[],e[52]=l,e[53]=ie):ie=e[53];let ke;if(e[54]!==O||e[55]!==ie){let k;e[57]!==O?(k=E=>E.name===O,e[57]=O,e[58]=k):k=e[58],ke=ie.find(k),e[54]=O,e[55]=ie,e[56]=ke}else ke=e[56];const Pe=ke;let ae;e[59]!==i?(ae=t.jsx(Ye,{children:t.jsx(Ft,{asChild:!0,children:t.jsx(it,{to:"/$org/$project/mcps",params:{org:i,project:ge},children:"Connections"})})}),e[59]=i,e[60]=ae):ae=e[60];let Ie;e[61]===Symbol.for("react.memo_cache_sentinel")?(Ie=t.jsx(Bt,{}),e[61]=Ie):Ie=e[61];let ce;e[62]!==n.title?(ce=t.jsx(Ye,{children:t.jsx(Ut,{children:n.title})}),e[62]=n.title,e[63]=ce):ce=e[63];let $e;e[64]!==ae||e[65]!==ce?($e=t.jsx(zt,{children:t.jsxs(Kt,{children:[ae,Ie,ce]})}),e[64]=ae,e[65]=ce,e[66]=$e):$e=e[66];const Le=$e;let le;e[67]!==N||e[68]!==P||e[69]!==R||e[70]!==f?(le=t.jsx(Xe,{children:t.jsx(It,{onSave:N,onUndo:P,isDirty:R,isSaving:f})}),e[67]=N,e[68]=P,e[69]=R,e[70]=f,e[71]=le):le=e[71];let de;e[72]!==_.hasOAuthToken||e[73]!==n||e[74]!==y||e[75]!==F||e[76]!==je||e[77]!==p?(de=t.jsx("div",{className:"w-100 shrink-0 border-r border-border bg-background",children:t.jsx(js,{form:y,connection:n,isMCPAuthenticated:p,hasOAuthToken:_.hasOAuthToken,onReauthenticate:F,onRemoveOAuth:je})}),e[72]=_.hasOAuthToken,e[73]=n,e[74]=y,e[75]=F,e[76]=je,e[77]=p,e[78]=de):de=e[78];let me;e[79]!==O||e[80]!==re||e[81]!==be?(me=t.jsx("div",{className:"shrink-0 flex items-center gap-4 px-5 py-3 border-b border-border",children:t.jsx(Xt,{tabs:be,activeTab:O,onTabChange:re,className:"flex-1"})}),e[79]=O,e[80]=re,e[81]=be,e[82]=me):me=e[82];let Ae;e[83]===Symbol.for("react.memo_cache_sentinel")?(Ae=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[83]=Ae):Ae=e[83];let ue;e[84]!==Pe||e[85]!==O||e[86]!==_.isServerError||e[87]!==_.supportsOAuth||e[88]!==n||e[89]!==o||e[90]!==y||e[91]!==F||e[92]!==re||e[93]!==g||e[94]!==D||e[95]!==r||e[96]!==p||e[97]!==i||e[98]!==m||e[99]!==I||e[100]!==x||e[101]!==c?(ue=t.jsx(X.Suspense,{fallback:Ae,children:O==="tools"?t.jsx(Us,{tools:c,connectionId:o,org:i,isLoading:r}):O==="ui"?t.jsx(Fs,{tools:c,connectionId:o,org:i}):O==="prompts"?t.jsx(Ts,{prompts:m,connectionId:o,org:i}):O==="resources"?t.jsx(Rs,{resources:x,connectionId:o,org:i}):O==="settings"?t.jsx(Mt,{connection:n,form:y,hasMcpBinding:g,isMCPAuthenticated:p,supportsOAuth:_.supportsOAuth,isServerError:_.isServerError,onAuthenticate:F,onViewReadme:D?()=>re("readme"):void 0}):O==="readme"&&D?t.jsx(ks,{repository:I}):Pe&&p?t.jsx(Wt,{connectionId:o,org:i,activeCollection:Pe},O):t.jsx(Z,{title:"Collection not found",description:"This collection may have been deleted or you may not have access."})}),e[84]=Pe,e[85]=O,e[86]=_.isServerError,e[87]=_.supportsOAuth,e[88]=n,e[89]=o,e[90]=y,e[91]=F,e[92]=re,e[93]=g,e[94]=D,e[95]=r,e[96]=p,e[97]=i,e[98]=m,e[99]=I,e[100]=x,e[101]=c,e[102]=ue):ue=e[102];let pe;e[103]!==O||e[104]!==ue?(pe=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(ct,{children:ue},O)}),e[103]=O,e[104]=ue,e[105]=pe):pe=e[105];let fe;e[106]!==me||e[107]!==pe?(fe=t.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-hidden",children:[me,pe]}),e[106]=me,e[107]=pe,e[108]=fe):fe=e[108];let xe;e[109]!==de||e[110]!==fe?(xe=t.jsxs("div",{className:"flex h-full w-full bg-background overflow-hidden",children:[de,fe]}),e[109]=de,e[110]=fe,e[111]=xe):xe=e[111];let Ve;return e[112]!==Le||e[113]!==le||e[114]!==xe?(Ve=t.jsxs(Ht,{breadcrumb:Le,children:[le,xe]}),e[112]=Le,e[113]=le,e[114]=xe,e[115]=Ve):Ve=e[115],Ve}function Gs(s){return s.id==="tools"}function Js(s){return{id:s.name,label:s.displayName}}function Ys(s){return!!Ke(s._meta)}function Zs(){const s=U.c(43);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/$project/mcps/$connectionId"},s[0]=e):e=s[0];const n=Ne(e);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/$project/mcps/$connectionId"},s[1]=o):o=s[1];const{connectionId:i,org:a}=yt(o),{org:l}=Be();let j;s[2]===Symbol.for("react.memo_cache_sentinel")?(j={from:"/shell/$org/$project/mcps/$connectionId"},s[2]=j):j=s[2];const m=_t(j).tab??"",x=Dt(i),c=dt(),r=$t(x??void 0);let h;s[3]!==i||s[4]!==l.id?(h={connectionId:i,orgId:l.id},s[3]=i,s[4]=l.id,s[5]=h):h=s[5];const d=mt(h);let u;s[6]!==d?(u={client:d},s[6]=d,s[7]=u):u=s[7];const{data:b}=Et(u);let v;s[8]!==d?(v={client:d},s[8]=d,s[9]=v):v=s[9];const{data:_}=Rt(v),S=x?.connection_type==="VIRTUAL";let p;s[10]!==d||s[11]!==S?(p={client:d,enabled:S},s[10]=d,s[11]=S,s[12]=p):p=s[12];const{data:C,isLoading:w}=Ot(p);let g;s[13]!==b?.prompts?(g=b?.prompts??[],s[13]=b?.prompts,s[14]=g):g=s[14];let I;s[15]!==g?(I=g.map(sn),s[15]=g,s[16]=I):I=s[16];const D=I;let A;s[17]!==_?.resources?(A=_?.resources??[],s[17]=_?.resources,s[18]=A):A=s[18];let V;s[19]!==A?(V=A.map(tn),s[19]=A,s[20]=V):V=s[20];const L=V;let y;s[21]!==x?.tools||s[22]!==S||s[23]!==C?.tools?(y=S?(C?.tools??[]).map(en):x?.tools??[],s[21]=x?.tools,s[22]=S,s[23]=C?.tools,s[24]=y):y=s[24];const R=y;let M;s[25]!==c.update||s[26]!==i?(M=async P=>{await c.update.mutateAsync({id:i,data:P})},s[25]=c.update,s[26]=i,s[27]=M):M=s[27];const N=M;if(!x){let P;return s[28]!==n||s[29]!==a?(P=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Z,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(Ue,{variant:"outline",onClick:()=>n({to:"/$org/$project/mcps",params:{org:a,project:ge}}),children:"Back to connections"})})}),s[28]=n,s[29]=a,s[30]=P):P=s[30],P}let $;return s[31]!==c.update.isPending||s[32]!==r||s[33]!==x||s[34]!==i||s[35]!==N||s[36]!==w||s[37]!==a||s[38]!==D||s[39]!==m||s[40]!==L||s[41]!==R?($=t.jsx(Qs,{org:a,connection:x,connectionId:i,requestedTabId:m,collections:r,onUpdate:N,isUpdating:c.update.isPending,prompts:D,resources:L,tools:R,isLoadingTools:w}),s[31]=c.update.isPending,s[32]=r,s[33]=x,s[34]=i,s[35]=N,s[36]=w,s[37]=a,s[38]=D,s[39]=m,s[40]=L,s[41]=R,s[42]=$):$=s[42],$}function en(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,annotations:s.annotations,_meta:s._meta}}function tn(s){return{uri:s.uri,name:s.name,description:s.description}}function sn(s){return{name:s.name,description:s.description}}function nn(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ct,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Oe,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Zs,{})})}),s[0]=e):e=s[0],e}function cr(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(nn,{}),s[0]=e):e=s[0],e}export{cr as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as be,j as e,E as Fe,r as X,u as Be,n as Ue,b as He,a as Le,d as Me,aB as ze,l as Re,k as Xe,i as We,B as S,O as g,t as D,o as ke,aF as Ke,s as C,aG as Ge}from"./index-DTgZok4N.js";import{g as qe}from"./generate-id-Dyweu44Y.js";import{C as Qe,a as Je}from"./collection-table-wrapper-c85b97QJ.js";import{C as Ye,E as L}from"./collection-search-Bkt-jVWx.js";import{C as Ze}from"./connection-card-CRg7yGx3.js";import{B as M}from"./badge-BZU2aZ4g.js";import{i as et}from"./AlertCircle-C_-Exi_n.js";import{i as tt}from"./CheckCircle-BQbEhLAd.js";import{I as nt}from"./integration-icon-BqSOA-1d.js";import{P as E}from"./index-BMtw0aq_.js";import{U as re}from"./user-BncBYJfn.js";import{u as st}from"./use-binding-CXeaDqWF.js";import{u as ot}from"./use-list-state-Dxk-n9cc.js";import{f as rt,e as it}from"./registry-utils-BFXjOPvi.js";import{f as ie,a as ae,b as ce,c as le,d as de,e as me,A as ue,h as pe}from"./alert-dialog-DRnSCcWl.js";import{B as at,a as ct,b as lt,c as dt}from"./breadcrumb-CkhUU1qO.js";import{D as mt,a as ut,b as pt,c as xt,d as ht,e as gt}from"./dialog-BeE7uUPn.js";import{D as xe,a as he,b as ge,c as F}from"./dropdown-menu-B0Dgts11.js";import{a as ft,F as f,b as j,c as y,d as v,f as _}from"./form-DNs_mLgF.js";import{I as T}from"./input-CjsuYubG.js";import{S as jt,a as yt,b as vt,c as _t,d as $}from"./select-CwGh16En.js";import{T as Ct}from"./textarea-Cp-ThsnH.js";import{g as Nt,h as bt}from"./use-connection-Du5eRm0t.js";import{u as fe,a as kt}from"./constants-2Gp-yGJ1.js";import{b as wt}from"./use-mcp-tools-v3YYc4L1.js";import{n as z}from"./Container-Dt3fts2O.js";import{i as je}from"./DotsVertical-DxigKHHt.js";import{s as ye}from"./Eye-D5VDCdLP.js";import{s as R}from"./Globe02-DsDY7_VG.js";import{i as St}from"./Loading01-SjZGs3Wk.js";import{i as Tt}from"./Terminal-B4v75vOD.js";import{s as ve}from"./Trash01-CDDpTvNv.js";import{f as _e}from"./format-time-CMKyl-GC.js";import{r as Dt,E as Pt,e as we}from"./env-vars-editor-CBMsqTh6.js";import"./ArrowDown-Ci69NI9T.js";import"./ArrowUp-YaPl1lq-.js";import"./Check-AlxQ-j2G.js";import"./Grid01-C3osH3dx.js";import"./List-iHNJ390y.js";import"./tooltip-B2vpv_WH.js";import"./index-BG6VshDR.js";import"./table-CZRzSdcB.js";import"./SearchMd-CSKcblxx.js";import"./card-BiGYvdPr.js";import"./localstorage-keys-Cenhbz-P.js";import"./useQuery-C-DbMOQt.js";import"./useMutation-B99hCaMl.js";import"./avatar-BsFgSPZd.js";import"./binder-CXy7pGaI.js";import"./use-view-mode-D38VMwz6.js";import"./use-mobile-II1SQS1g.js";import"./ChevronRight-sqD7LMFa.js";import"./X-BHBlYu74.js";import"./label-ND6ncjGS.js";import"./ChevronDown-Bt1ewsqh.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Plus-DXYydVCi.js";function Ce(s){const o=be.c(3),{status:i}=s;if(i==="active"){let c;return o[0]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsxs(M,{variant:"success",className:"gap-1.5 text-success border-success/40 bg-background",children:[e.jsx(tt,{size:12}),"Active"]}),o[0]=c):c=o[0],c}if(i==="error"){let c;return o[1]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsxs(M,{variant:"outline",className:"gap-1.5 text-destructive border-destructive/40 bg-background",children:[e.jsx(et,{size:12}),"Error"]}),o[1]=c):c=o[1],c}let d;return o[2]===Symbol.for("react.memo_cache_sentinel")?(d=e.jsx(M,{variant:"outline",className:"text-muted-foreground",children:"Inactive"}),o[2]=d):d=o[2],d}const It=ke({key:C(),value:C()}),Et=ke({title:C().min(1,"Name is required"),description:C().nullable().optional(),ui_type:Ge(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:C().optional(),connection_token:C().nullable().optional(),npx_package:C().optional(),stdio_command:C().optional(),stdio_args:C().optional(),stdio_cwd:C().optional(),env_vars:Ke(It).optional()}).refine(s=>s.ui_type==="NPX"?!!s.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(s=>s.ui_type==="STDIO"?!!s.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(s=>s.ui_type==="HTTP"||s.ui_type==="SSE"||s.ui_type==="Websocket"?!!s.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function U(s){const o=s.trim();if(!o)return"";try{const i=new URL(o),d=i.pathname.length>1?i.pathname.replace(/\/+$/,""):i.pathname;return`${i.origin}${d}`}catch{return o.replace(/\/+$/,"")}}function $t(s){const o=s.trim().split(/\s+/).filter(Boolean);if(o.length<2)return null;const i=o[0]?.toLowerCase();if(i!=="npx"&&i!=="bunx")return null;const c=o.slice(1).find(N=>!N.startsWith("-"));return c?{packageName:c}:null}function B(s){const{uiType:o}=s,i=U(s.connectionUrl??"");if((o==="HTTP"||o==="SSE"||o==="Websocket")&&i===U("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const d=(s.npxPackage??"").trim();return o==="NPX"&&d==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function Ne(s){if(s.registryItems.length===0||s.uiType!=="HTTP"&&s.uiType!=="SSE"&&s.uiType!=="Websocket")return null;const o=U(s.connectionUrl??"");if(!o)return null;const i=s.registryItems.find(N=>(N.server?.remotes??[]).some(O=>U(O.url??"")===o));if(!i)return null;const d=i.title||i.name||i.server?.title||i.server?.name||"",c=i.server?.description||i.description||i.summary||null;return d?{id:"registry",title:d,description:c}:null}function Ot(s,o){const i={command:"npx",args:["-y",s]},d=we(o);return Object.keys(d).length>0&&(i.envVars=d),i}function At(s,o,i,d){const c={command:s};o.trim()&&(c.args=o.trim().split(/\s+/)),i?.trim()&&(c.cwd=i.trim());const N=we(d);return Object.keys(N).length>0&&(c.envVars=N),c}function Vt(s){return s.command==="npx"}function Ft(s){return s.args?.find(o=>!o.startsWith("-"))??""}function Bt(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function Ut(s,o){switch(o.type){case"edit":return{mode:"editing",connection:o.connection};case"delete":return{mode:"deleting",connection:o.connection};case"force-delete":return{mode:"force-deleting",connection:o.connection,agentNames:o.agentNames};case"close":return{mode:"idle"}}}function Ht(){const{org:s}=Be(),o=Ue(),i=He(),d=Le({strict:!1}),{data:c}=Me.useSession(),{stdioEnabled:N}=ze(),l=ot({namespace:s.slug,resource:"connections"}),O=Nt(),A=bt(l),[u,b]=X.useReducer(Ut,{mode:"idle"}),W=st(A)[0],K=W?.id??"",G=rt(W?.tools),Se=fe({connectionId:K||null,orgId:s.id}),{data:Te}=wt({client:Se,toolName:G,toolArguments:{limit:200},enabled:!!(K&&G),staleTime:3600*1e3,select:t=>t.structuredContent??t}),q=it(Te??[]),Q=d.action==="create",De=()=>{i({to:"/$org/$project/mcps",params:{org:s.slug,project:g},search:{action:"create"}})},J=()=>{i({to:"/$org/$project/mcps",params:{org:s.slug,project:g},search:{}})},r=Re({resolver:Xe(Et),defaultValues:{title:"",description:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),p=r.watch("ui_type"),Y=r.watch("connection_url"),Pe=r.watch("npx_package"),P=B({uiType:p,connectionUrl:Y??"",npxPackage:Pe??""})??Ne({uiType:p,connectionUrl:Y??"",registryItems:q}),m=u.mode==="editing"?u.connection:null;X.useEffect(()=>{if(m){const t=We(m.connection_headers)?m.connection_headers:null;if(t&&m.connection_type==="STDIO"){const n=Dt(t.envVars);if(Vt(t)){const a=Ft(t);r.reset({title:m.title,description:m.description,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:a,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:n})}else{const a=Bt(t);r.reset({title:m.title,description:m.description,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:a.command,stdio_args:a.args,stdio_cwd:a.cwd,env_vars:n})}}else r.reset({title:m.title,description:m.description,ui_type:m.connection_type,connection_url:m.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})}else r.reset({title:"",description:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})},[m,r]);const Z=fe({connectionId:kt,orgId:s.id}),ee=()=>{o.invalidateQueries({predicate:t=>{const n=t.queryKey;return n[1]===s.id&&n[3]==="collection"&&n[4]==="CONNECTIONS"}})},te=t=>{const n=t.content;return Array.isArray(n)&&n[0]?.type==="text"&&typeof n[0].text=="string"?n[0].text:"Unknown error"},Ie=async()=>{if(u.mode!=="deleting")return;const t=u.connection;b({type:"close"});try{const n=await Z.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:t.id}});if(n.isError){const a=te(n),k=a.replace(/^Error:\s*/,"");try{const x=JSON.parse(k);if(x.code==="CONNECTION_IN_USE"&&x.agentNames){b({type:"force-delete",connection:t,agentNames:x.agentNames.map(w=>`"${w}"`).join(", ")});return}}catch{}D.error(`Failed to delete connection: ${a}`);return}ee(),D.success("Connection deleted successfully")}catch(n){const a=n instanceof Error?n.message:String(n);D.error(`Failed to delete connection: ${a}`)}},Ee=async()=>{if(u.mode!=="force-deleting")return;const t=u.connection.id;b({type:"close"});try{const n=await Z.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:t,force:!0}});if(n.isError){D.error(`Failed to delete connection: ${te(n)}`);return}ee(),D.success("Connection deleted successfully")}catch(n){const a=n instanceof Error?n.message:String(n);D.error(`Failed to delete connection: ${a}`)}},$e=async t=>{let n,a=null,k=null,x=null;if(t.ui_type==="NPX"?(n="STDIO",a="",x=Ot(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(n="STDIO",a="",x=At(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(n=t.ui_type,a=t.connection_url||"",k=t.connection_token||null),m){await O.update.mutateAsync({id:m.id,data:{title:t.title,description:t.description||null,connection_type:n,connection_url:a,...k&&{connection_token:k},...x&&{connection_headers:x}}}),b({type:"close"}),r.reset();return}const w=qe("conn");await O.create.mutateAsync({id:w,title:t.title,description:t.description||null,connection_type:n,connection_url:a,connection_token:k,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:c?.user?.id||"system",organization_id:s.id,icon:null,app_name:null,app_id:null,connection_headers:x,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),J(),r.reset(),i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:w}})},ne=t=>{t||(Q?J():b({type:"close"}),r.reset())},V=t=>{const n=t.trim();if(!n)return;const a=!!r.formState.dirtyFields.title,k=!!r.formState.dirtyFields.description,x=!!r.formState.dirtyFields.env_vars,w=h=>{if(h&&(!a&&!r.getValues("title").trim()&&h.title&&r.setValue("title",h.title,{shouldDirty:!1}),!k&&!(r.getValues("description")??"").trim()&&h.description&&r.setValue("description",h.description,{shouldDirty:!1}),!x&&h.envVarKeys?.length)){const se=r.getValues("env_vars")??[],Ve=new Set(se.map(I=>I.key)),oe=h.envVarKeys.filter(I=>!Ve.has(I));oe.length>0&&r.setValue("env_vars",[...se,...oe.map(I=>({key:I,value:""}))],{shouldDirty:!0})}},H=$t(n);if(H&&N){r.setValue("ui_type","NPX",{shouldDirty:!0}),r.setValue("npx_package",H.packageName,{shouldDirty:!0}),r.setValue("connection_url","",{shouldDirty:!0}),r.setValue("connection_token",null,{shouldDirty:!0}),w(B({uiType:"NPX",npxPackage:H.packageName}));return}if(n.startsWith("http://")||n.startsWith("https://")){const h=p==="HTTP"||p==="SSE"||p==="Websocket"?p:"HTTP";r.setValue("ui_type",h,{shouldDirty:!0}),r.setValue("connection_url",n,{shouldDirty:!0}),w(B({uiType:h,connectionUrl:n})??Ne({uiType:h,connectionUrl:n,registryItems:q}));return}p==="NPX"&&w(B({uiType:"NPX",npxPackage:n}))},Oe=[{id:"title",header:"Name",render:t=>e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(nt,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:e.jsx(z,{})}),e.jsx("span",{className:"text-sm font-medium text-foreground truncate block",title:t.title,children:t.title})]}),cellClassName:"w-32 min-w-0 shrink-0",sortable:!0},{id:"description",header:"Description",render:t=>e.jsx("span",{className:"text-sm text-muted-foreground truncate block",title:t.description||"",children:t.description||"—"}),cellClassName:"flex-1 min-w-0 max-w-0",wrap:!1,sortable:!0},{id:"connection_type",header:"Type",accessor:t=>e.jsx("span",{className:"text-xs font-medium",children:t.connection_type}),cellClassName:"w-16 shrink-0",sortable:!0},{id:"status",header:"Status",render:t=>e.jsx(Ce,{status:t.status}),cellClassName:"w-28 shrink-0",sortable:!1},{id:"updated_by",header:"Updated by",render:t=>e.jsx(re,{id:t.updated_by??t.created_by,size:"3xs"}),cellClassName:"w-32 shrink-0",sortable:!0},{id:"updated_at",header:"Updated",render:t=>e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:t.updated_at?_e(new Date(t.updated_at)):"—"}),cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},{id:"actions",header:"",render:t=>e.jsxs(xe,{children:[e.jsx(he,{asChild:!0,children:e.jsx(S,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:n=>n.stopPropagation(),children:e.jsx(je,{size:20})})}),e.jsxs(ge,{align:"end",onClick:n=>n.stopPropagation(),children:[e.jsxs(F,{onClick:n=>{n.stopPropagation(),i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}})},children:[e.jsx(ye,{size:16}),"Open"]}),e.jsxs(F,{variant:"destructive",onClick:n=>{n.stopPropagation(),b({type:"delete",connection:t})},children:[e.jsx(ve,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],Ae=e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(S,{variant:"outline",onClick:()=>i({to:"/$org/$project/store",params:{org:s.slug,project:g}}),size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Browse Store"}),e.jsx(S,{onClick:De,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Custom Connection"})]});return e.jsxs(E,{children:[e.jsx(mt,{open:Q||u.mode==="editing",onOpenChange:ne,children:e.jsxs(ut,{className:"sm:max-w-[525px]",children:[e.jsxs(pt,{children:[e.jsx(xt,{children:m?"Edit Connection":"Create Connection"}),e.jsx(ht,{children:m?"Update the connection details below.":"Create a custom connection in your organization. Fill in the details below."})]}),e.jsx(ft,{...r,children:e.jsxs("form",{onSubmit:r.handleSubmit($e),children:[e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsx(f,{control:r.control,name:"ui_type",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Type *"}),e.jsxs(jt,{value:t.value,onValueChange:t.onChange,children:[e.jsx(v,{children:e.jsx(yt,{children:e.jsx(vt,{})})}),e.jsxs(_t,{children:[e.jsx($,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx($,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4"}),"SSE"]})}),e.jsx($,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4"}),"Websocket"]})}),N&&e.jsxs(e.Fragment,{children:[e.jsx($,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(z,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx($,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Tt,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(_,{})]})}),p==="NPX"&&e.jsx(e.Fragment,{children:e.jsx(f,{control:r.control,name:"npx_package",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"NPM Package *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:n=>{const a=n.clipboardData.getData("text");a&&(n.preventDefault(),r.setValue("npx_package",a.trim(),{shouldDirty:!0}),V(a))},onBlur:n=>{V(n.target.value),t.onBlur()}})}),e.jsx(_,{})]})})}),p==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(f,{control:r.control,name:"stdio_command",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Command *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(_,{})]})}),e.jsx(f,{control:r.control,name:"stdio_args",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Arguments"}),e.jsx(v,{children:e.jsx(T,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(_,{})]})})]}),e.jsx(f,{control:r.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Working Directory"}),e.jsx(v,{children:e.jsx(T,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(_,{})]})})]}),(p==="NPX"||p==="STDIO")&&e.jsx(f,{control:r.control,name:"env_vars",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Environment Variables"}),e.jsx(v,{children:e.jsx(Pt,{value:t.value??[],onChange:t.onChange})}),e.jsx(_,{})]})}),p!=="NPX"&&p!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(f,{control:r.control,name:"connection_url",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"URL *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:n=>{const a=n.clipboardData.getData("text");a&&(n.preventDefault(),r.setValue("connection_url",a.trim(),{shouldDirty:!0}),V(a))},onBlur:n=>{V(n.target.value),t.onBlur()}})}),e.jsx(_,{})]})}),e.jsx(f,{control:r.control,name:"connection_token",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:P?.token?.label??"Token (optional)"}),e.jsx(v,{children:e.jsx(T,{type:"password",placeholder:P?.token?.placeholder??"Bearer token or API key",...t,value:t.value??""})}),P?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[P.token.helperText,P.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(_,{})]})})]}),e.jsx(f,{control:r.control,name:"title",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Name *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"My Connection",...t})}),e.jsx(_,{})]})}),e.jsx(f,{control:r.control,name:"description",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Description"}),e.jsx(v,{children:e.jsx(Ct,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(_,{})]})})]}),e.jsxs(gt,{children:[e.jsx(S,{type:"button",variant:"outline",onClick:()=>ne(!1),children:"Cancel"}),e.jsx(S,{type:"submit",disabled:r.formState.isSubmitting,className:"min-w-40",children:r.formState.isSubmitting?"Saving...":m?"Update Connection":"Create Connection"})]})]})})]})}),e.jsx(ie,{open:u.mode==="deleting",onOpenChange:t=>!t&&b({type:"close"}),children:e.jsxs(ae,{children:[e.jsxs(ce,{children:[e.jsx(le,{children:"Delete Connection?"}),e.jsxs(de,{children:["This action cannot be undone. This will permanently delete"," ",e.jsx("span",{className:"font-medium text-foreground",children:u.mode==="deleting"&&u.connection.title}),"."]})]}),e.jsxs(me,{children:[e.jsx(ue,{children:"Cancel"}),e.jsx(pe,{onClick:Ie,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})}),e.jsx(ie,{open:u.mode==="force-deleting",onOpenChange:t=>!t&&b({type:"close"}),children:e.jsxs(ae,{children:[e.jsxs(ce,{children:[e.jsx(le,{children:"Connection Used by Agents"}),e.jsx(de,{asChild:!0,children:e.jsxs("div",{children:[e.jsxs("p",{children:["The connection"," ",e.jsx("span",{className:"font-medium text-foreground",children:u.mode==="force-deleting"&&u.connection.title})," ","is currently used by the following agent(s):"," ",e.jsx("span",{className:"font-medium text-foreground",children:u.mode==="force-deleting"&&u.agentNames}),"."]}),e.jsx("p",{className:"mt-2",children:"Deleting this connection will remove it from those agents, which may impact existing workflows that depend on them."})]})})]}),e.jsxs(me,{children:[e.jsx(ue,{children:"Cancel"}),e.jsx(pe,{onClick:Ee,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Anyway"})]})]})}),e.jsxs(E.Header,{children:[e.jsx(E.Header.Left,{children:e.jsx(at,{children:e.jsx(ct,{children:e.jsx(lt,{children:e.jsx(dt,{children:"Connections"})})})})}),e.jsxs(E.Header.Right,{children:[e.jsx(Qe,{viewMode:l.viewMode,onViewModeChange:l.setViewMode,sortKey:l.sortKey,sortDirection:l.sortDirection,onSort:l.handleSort,sortOptions:[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"connection_type",label:"Type"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}]}),Ae]})]}),e.jsx(Ye,{value:l.search,onChange:l.setSearch,placeholder:"Search for a Connection...",onKeyDown:t=>{t.key==="Escape"&&(l.setSearch(""),t.target.blur())}}),e.jsx(E.Content,{children:l.viewMode==="cards"?e.jsx("div",{className:"flex-1 overflow-auto p-5",children:A.length===0?e.jsx(L,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:(l.search,"No Connections found"),description:l.search?`No Connections match "${l.search}"`:"Create a connection to get started.",actions:!l.search&&e.jsx(S,{variant:"outline",onClick:()=>i({to:"/$org/$project/store",params:{org:s.slug,project:g}}),children:"Browse Store"})}):e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:A.map(t=>e.jsx(Ze,{connection:t,fallbackIcon:e.jsx(z,{}),onClick:()=>i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}}),headerActions:e.jsxs(xe,{children:[e.jsx(he,{asChild:!0,children:e.jsx(S,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:n=>n.stopPropagation(),children:e.jsx(je,{size:20})})}),e.jsxs(ge,{align:"end",onClick:n=>n.stopPropagation(),children:[e.jsxs(F,{onClick:n=>{n.stopPropagation(),i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}})},children:[e.jsx(ye,{size:16}),"Open"]}),e.jsxs(F,{variant:"destructive",onClick:n=>{n.stopPropagation(),b({type:"delete",connection:t})},children:[e.jsx(ve,{size:16}),"Delete"]})]})]}),body:e.jsx(Ce,{status:t.status}),footer:e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground w-full min-w-0",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(re,{id:t.updated_by??t.created_by,size:"3xs"})}),e.jsx("span",{className:"shrink-0 ml-2",children:t.updated_at?_e(new Date(t.updated_at)):"—"})]})},t.id))})}):e.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:e.jsx("div",{className:"flex-1 overflow-auto min-w-0",children:e.jsx("div",{className:"min-w-[1000px]",children:e.jsx(Je,{columns:Oe,data:A,isLoading:!1,sortKey:l.sortKey,sortDirection:l.sortDirection,onSort:l.handleSort,onRowClick:t=>i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}}),emptyState:l.search?e.jsx(L,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:400,height:178,"aria-hidden":"true"}),title:"No Connections found",description:`No Connections match "${l.search}"`}):e.jsx(L,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:400,height:178,"aria-hidden":"true"}),title:"No Connections found",description:"Create a connection to get started.",actions:e.jsx(S,{variant:"outline",onClick:()=>i({to:"/$org/$project/store",params:{org:s.slug,project:g}}),children:"Browse Store"})})})})})})})]})}function Xn(){const s=be.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(Fe,{children:e.jsx(X.Suspense,{fallback:e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(St,{size:32,className:"animate-spin text-muted-foreground"})}),children:e.jsx(Ht,{})})}),s[0]=o):o=s[0],o}export{Xn as default};
|
|
1
|
+
import{c as be,j as e,E as Fe,r as X,u as Be,n as Ue,b as He,a as Le,d as Me,aB as ze,l as Re,k as Xe,i as We,B as S,O as g,t as D,o as ke,aF as Ke,s as C,aG as Ge}from"./index-BiG-bBX7.js";import{g as qe}from"./generate-id-Dyweu44Y.js";import{C as Qe,a as Je}from"./collection-table-wrapper-LUpcpQuR.js";import{C as Ye,E as L}from"./collection-search-DWb-q4sb.js";import{C as Ze}from"./connection-card-CbQYVkic.js";import{B as M}from"./badge-DaJA40lr.js";import{i as et}from"./AlertCircle-BIVpB2eV.js";import{i as tt}from"./CheckCircle-BnSsCPeL.js";import{I as nt}from"./integration-icon-DJplt18U.js";import{P as E}from"./index-ehKjC5PZ.js";import{U as re}from"./user-DiQL4i6w.js";import{u as st}from"./use-binding-CoVeLP6R.js";import{u as ot}from"./use-list-state-DZ0uTI_k.js";import{f as rt,e as it}from"./registry-utils-B4prNmYa.js";import{f as ie,a as ae,b as ce,c as le,d as de,e as me,A as ue,h as pe}from"./alert-dialog-DQT_qq2D.js";import{B as at,a as ct,b as lt,c as dt}from"./breadcrumb-h53M2ozZ.js";import{D as mt,a as ut,b as pt,c as xt,d as ht,e as gt}from"./dialog-DDOb23Pi.js";import{D as xe,a as he,b as ge,c as F}from"./dropdown-menu-BaaJ3KIr.js";import{a as ft,F as f,b as j,c as y,d as v,f as _}from"./form-CZlsOGpj.js";import{I as T}from"./input-BcOk4EWn.js";import{S as jt,a as yt,b as vt,c as _t,d as $}from"./select-DJV0GpEL.js";import{T as Ct}from"./textarea-Bkod2qAV.js";import{g as Nt,h as bt}from"./use-connection-CsobI-JA.js";import{u as fe,a as kt}from"./constants-Bj4b22ad.js";import{b as wt}from"./use-mcp-tools-nHTt7uoJ.js";import{n as z}from"./Container-C4kCziiV.js";import{i as je}from"./DotsVertical-D9CMW5-2.js";import{s as ye}from"./Eye-DPTzoZL8.js";import{s as R}from"./Globe02-vxtQsT0f.js";import{i as St}from"./Loading01-W-w3cVps.js";import{i as Tt}from"./Terminal-DEkQfpQH.js";import{s as ve}from"./Trash01-BsNnpu_l.js";import{f as _e}from"./format-time-CMKyl-GC.js";import{r as Dt,E as Pt,e as we}from"./env-vars-editor-DIkYTN09.js";import"./ArrowDown-CnXnoX-V.js";import"./ArrowUp-8t9O2FqG.js";import"./Check-Bs28PslG.js";import"./Grid01-CILFuUHo.js";import"./List-BcuB27Kb.js";import"./tooltip-BacoSwd7.js";import"./index-BxikKkX5.js";import"./table-DxvlU5EN.js";import"./SearchMd-BzFnoImC.js";import"./card-HOT-tKY7.js";import"./localstorage-keys-BS2STbF7.js";import"./useQuery-Us1whSan.js";import"./useMutation-Cxle_Mtw.js";import"./avatar-CV6z8E70.js";import"./binder-Bx_2YVEH.js";import"./use-view-mode-RJVvlb7k.js";import"./use-mobile-BwubTGYW.js";import"./ChevronRight-8LnYcsyR.js";import"./X-B9LxUp5o.js";import"./label-BLk50aKt.js";import"./ChevronDown-CIw5H_8I.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Plus-7RI9qITc.js";function Ce(s){const o=be.c(3),{status:i}=s;if(i==="active"){let c;return o[0]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsxs(M,{variant:"success",className:"gap-1.5 text-success border-success/40 bg-background",children:[e.jsx(tt,{size:12}),"Active"]}),o[0]=c):c=o[0],c}if(i==="error"){let c;return o[1]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsxs(M,{variant:"outline",className:"gap-1.5 text-destructive border-destructive/40 bg-background",children:[e.jsx(et,{size:12}),"Error"]}),o[1]=c):c=o[1],c}let d;return o[2]===Symbol.for("react.memo_cache_sentinel")?(d=e.jsx(M,{variant:"outline",className:"text-muted-foreground",children:"Inactive"}),o[2]=d):d=o[2],d}const It=ke({key:C(),value:C()}),Et=ke({title:C().min(1,"Name is required"),description:C().nullable().optional(),ui_type:Ge(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:C().optional(),connection_token:C().nullable().optional(),npx_package:C().optional(),stdio_command:C().optional(),stdio_args:C().optional(),stdio_cwd:C().optional(),env_vars:Ke(It).optional()}).refine(s=>s.ui_type==="NPX"?!!s.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(s=>s.ui_type==="STDIO"?!!s.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(s=>s.ui_type==="HTTP"||s.ui_type==="SSE"||s.ui_type==="Websocket"?!!s.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function U(s){const o=s.trim();if(!o)return"";try{const i=new URL(o),d=i.pathname.length>1?i.pathname.replace(/\/+$/,""):i.pathname;return`${i.origin}${d}`}catch{return o.replace(/\/+$/,"")}}function $t(s){const o=s.trim().split(/\s+/).filter(Boolean);if(o.length<2)return null;const i=o[0]?.toLowerCase();if(i!=="npx"&&i!=="bunx")return null;const c=o.slice(1).find(N=>!N.startsWith("-"));return c?{packageName:c}:null}function B(s){const{uiType:o}=s,i=U(s.connectionUrl??"");if((o==="HTTP"||o==="SSE"||o==="Websocket")&&i===U("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const d=(s.npxPackage??"").trim();return o==="NPX"&&d==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function Ne(s){if(s.registryItems.length===0||s.uiType!=="HTTP"&&s.uiType!=="SSE"&&s.uiType!=="Websocket")return null;const o=U(s.connectionUrl??"");if(!o)return null;const i=s.registryItems.find(N=>(N.server?.remotes??[]).some(O=>U(O.url??"")===o));if(!i)return null;const d=i.title||i.name||i.server?.title||i.server?.name||"",c=i.server?.description||i.description||i.summary||null;return d?{id:"registry",title:d,description:c}:null}function Ot(s,o){const i={command:"npx",args:["-y",s]},d=we(o);return Object.keys(d).length>0&&(i.envVars=d),i}function At(s,o,i,d){const c={command:s};o.trim()&&(c.args=o.trim().split(/\s+/)),i?.trim()&&(c.cwd=i.trim());const N=we(d);return Object.keys(N).length>0&&(c.envVars=N),c}function Vt(s){return s.command==="npx"}function Ft(s){return s.args?.find(o=>!o.startsWith("-"))??""}function Bt(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function Ut(s,o){switch(o.type){case"edit":return{mode:"editing",connection:o.connection};case"delete":return{mode:"deleting",connection:o.connection};case"force-delete":return{mode:"force-deleting",connection:o.connection,agentNames:o.agentNames};case"close":return{mode:"idle"}}}function Ht(){const{org:s}=Be(),o=Ue(),i=He(),d=Le({strict:!1}),{data:c}=Me.useSession(),{stdioEnabled:N}=ze(),l=ot({namespace:s.slug,resource:"connections"}),O=Nt(),A=bt(l),[u,b]=X.useReducer(Ut,{mode:"idle"}),W=st(A)[0],K=W?.id??"",G=rt(W?.tools),Se=fe({connectionId:K||null,orgId:s.id}),{data:Te}=wt({client:Se,toolName:G,toolArguments:{limit:200},enabled:!!(K&&G),staleTime:3600*1e3,select:t=>t.structuredContent??t}),q=it(Te??[]),Q=d.action==="create",De=()=>{i({to:"/$org/$project/mcps",params:{org:s.slug,project:g},search:{action:"create"}})},J=()=>{i({to:"/$org/$project/mcps",params:{org:s.slug,project:g},search:{}})},r=Re({resolver:Xe(Et),defaultValues:{title:"",description:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),p=r.watch("ui_type"),Y=r.watch("connection_url"),Pe=r.watch("npx_package"),P=B({uiType:p,connectionUrl:Y??"",npxPackage:Pe??""})??Ne({uiType:p,connectionUrl:Y??"",registryItems:q}),m=u.mode==="editing"?u.connection:null;X.useEffect(()=>{if(m){const t=We(m.connection_headers)?m.connection_headers:null;if(t&&m.connection_type==="STDIO"){const n=Dt(t.envVars);if(Vt(t)){const a=Ft(t);r.reset({title:m.title,description:m.description,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:a,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:n})}else{const a=Bt(t);r.reset({title:m.title,description:m.description,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:a.command,stdio_args:a.args,stdio_cwd:a.cwd,env_vars:n})}}else r.reset({title:m.title,description:m.description,ui_type:m.connection_type,connection_url:m.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})}else r.reset({title:"",description:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})},[m,r]);const Z=fe({connectionId:kt,orgId:s.id}),ee=()=>{o.invalidateQueries({predicate:t=>{const n=t.queryKey;return n[1]===s.id&&n[3]==="collection"&&n[4]==="CONNECTIONS"}})},te=t=>{const n=t.content;return Array.isArray(n)&&n[0]?.type==="text"&&typeof n[0].text=="string"?n[0].text:"Unknown error"},Ie=async()=>{if(u.mode!=="deleting")return;const t=u.connection;b({type:"close"});try{const n=await Z.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:t.id}});if(n.isError){const a=te(n),k=a.replace(/^Error:\s*/,"");try{const x=JSON.parse(k);if(x.code==="CONNECTION_IN_USE"&&x.agentNames){b({type:"force-delete",connection:t,agentNames:x.agentNames.map(w=>`"${w}"`).join(", ")});return}}catch{}D.error(`Failed to delete connection: ${a}`);return}ee(),D.success("Connection deleted successfully")}catch(n){const a=n instanceof Error?n.message:String(n);D.error(`Failed to delete connection: ${a}`)}},Ee=async()=>{if(u.mode!=="force-deleting")return;const t=u.connection.id;b({type:"close"});try{const n=await Z.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:t,force:!0}});if(n.isError){D.error(`Failed to delete connection: ${te(n)}`);return}ee(),D.success("Connection deleted successfully")}catch(n){const a=n instanceof Error?n.message:String(n);D.error(`Failed to delete connection: ${a}`)}},$e=async t=>{let n,a=null,k=null,x=null;if(t.ui_type==="NPX"?(n="STDIO",a="",x=Ot(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(n="STDIO",a="",x=At(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(n=t.ui_type,a=t.connection_url||"",k=t.connection_token||null),m){await O.update.mutateAsync({id:m.id,data:{title:t.title,description:t.description||null,connection_type:n,connection_url:a,...k&&{connection_token:k},...x&&{connection_headers:x}}}),b({type:"close"}),r.reset();return}const w=qe("conn");await O.create.mutateAsync({id:w,title:t.title,description:t.description||null,connection_type:n,connection_url:a,connection_token:k,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:c?.user?.id||"system",organization_id:s.id,icon:null,app_name:null,app_id:null,connection_headers:x,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),J(),r.reset(),i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:w}})},ne=t=>{t||(Q?J():b({type:"close"}),r.reset())},V=t=>{const n=t.trim();if(!n)return;const a=!!r.formState.dirtyFields.title,k=!!r.formState.dirtyFields.description,x=!!r.formState.dirtyFields.env_vars,w=h=>{if(h&&(!a&&!r.getValues("title").trim()&&h.title&&r.setValue("title",h.title,{shouldDirty:!1}),!k&&!(r.getValues("description")??"").trim()&&h.description&&r.setValue("description",h.description,{shouldDirty:!1}),!x&&h.envVarKeys?.length)){const se=r.getValues("env_vars")??[],Ve=new Set(se.map(I=>I.key)),oe=h.envVarKeys.filter(I=>!Ve.has(I));oe.length>0&&r.setValue("env_vars",[...se,...oe.map(I=>({key:I,value:""}))],{shouldDirty:!0})}},H=$t(n);if(H&&N){r.setValue("ui_type","NPX",{shouldDirty:!0}),r.setValue("npx_package",H.packageName,{shouldDirty:!0}),r.setValue("connection_url","",{shouldDirty:!0}),r.setValue("connection_token",null,{shouldDirty:!0}),w(B({uiType:"NPX",npxPackage:H.packageName}));return}if(n.startsWith("http://")||n.startsWith("https://")){const h=p==="HTTP"||p==="SSE"||p==="Websocket"?p:"HTTP";r.setValue("ui_type",h,{shouldDirty:!0}),r.setValue("connection_url",n,{shouldDirty:!0}),w(B({uiType:h,connectionUrl:n})??Ne({uiType:h,connectionUrl:n,registryItems:q}));return}p==="NPX"&&w(B({uiType:"NPX",npxPackage:n}))},Oe=[{id:"title",header:"Name",render:t=>e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(nt,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:e.jsx(z,{})}),e.jsx("span",{className:"text-sm font-medium text-foreground truncate block",title:t.title,children:t.title})]}),cellClassName:"w-32 min-w-0 shrink-0",sortable:!0},{id:"description",header:"Description",render:t=>e.jsx("span",{className:"text-sm text-muted-foreground truncate block",title:t.description||"",children:t.description||"—"}),cellClassName:"flex-1 min-w-0 max-w-0",wrap:!1,sortable:!0},{id:"connection_type",header:"Type",accessor:t=>e.jsx("span",{className:"text-xs font-medium",children:t.connection_type}),cellClassName:"w-16 shrink-0",sortable:!0},{id:"status",header:"Status",render:t=>e.jsx(Ce,{status:t.status}),cellClassName:"w-28 shrink-0",sortable:!1},{id:"updated_by",header:"Updated by",render:t=>e.jsx(re,{id:t.updated_by??t.created_by,size:"3xs"}),cellClassName:"w-32 shrink-0",sortable:!0},{id:"updated_at",header:"Updated",render:t=>e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:t.updated_at?_e(new Date(t.updated_at)):"—"}),cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},{id:"actions",header:"",render:t=>e.jsxs(xe,{children:[e.jsx(he,{asChild:!0,children:e.jsx(S,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:n=>n.stopPropagation(),children:e.jsx(je,{size:20})})}),e.jsxs(ge,{align:"end",onClick:n=>n.stopPropagation(),children:[e.jsxs(F,{onClick:n=>{n.stopPropagation(),i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}})},children:[e.jsx(ye,{size:16}),"Open"]}),e.jsxs(F,{variant:"destructive",onClick:n=>{n.stopPropagation(),b({type:"delete",connection:t})},children:[e.jsx(ve,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],Ae=e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(S,{variant:"outline",onClick:()=>i({to:"/$org/$project/store",params:{org:s.slug,project:g}}),size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Browse Store"}),e.jsx(S,{onClick:De,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Custom Connection"})]});return e.jsxs(E,{children:[e.jsx(mt,{open:Q||u.mode==="editing",onOpenChange:ne,children:e.jsxs(ut,{className:"sm:max-w-[525px]",children:[e.jsxs(pt,{children:[e.jsx(xt,{children:m?"Edit Connection":"Create Connection"}),e.jsx(ht,{children:m?"Update the connection details below.":"Create a custom connection in your organization. Fill in the details below."})]}),e.jsx(ft,{...r,children:e.jsxs("form",{onSubmit:r.handleSubmit($e),children:[e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsx(f,{control:r.control,name:"ui_type",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Type *"}),e.jsxs(jt,{value:t.value,onValueChange:t.onChange,children:[e.jsx(v,{children:e.jsx(yt,{children:e.jsx(vt,{})})}),e.jsxs(_t,{children:[e.jsx($,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx($,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4"}),"SSE"]})}),e.jsx($,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4"}),"Websocket"]})}),N&&e.jsxs(e.Fragment,{children:[e.jsx($,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(z,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx($,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Tt,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(_,{})]})}),p==="NPX"&&e.jsx(e.Fragment,{children:e.jsx(f,{control:r.control,name:"npx_package",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"NPM Package *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:n=>{const a=n.clipboardData.getData("text");a&&(n.preventDefault(),r.setValue("npx_package",a.trim(),{shouldDirty:!0}),V(a))},onBlur:n=>{V(n.target.value),t.onBlur()}})}),e.jsx(_,{})]})})}),p==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(f,{control:r.control,name:"stdio_command",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Command *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(_,{})]})}),e.jsx(f,{control:r.control,name:"stdio_args",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Arguments"}),e.jsx(v,{children:e.jsx(T,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(_,{})]})})]}),e.jsx(f,{control:r.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Working Directory"}),e.jsx(v,{children:e.jsx(T,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(_,{})]})})]}),(p==="NPX"||p==="STDIO")&&e.jsx(f,{control:r.control,name:"env_vars",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Environment Variables"}),e.jsx(v,{children:e.jsx(Pt,{value:t.value??[],onChange:t.onChange})}),e.jsx(_,{})]})}),p!=="NPX"&&p!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(f,{control:r.control,name:"connection_url",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"URL *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:n=>{const a=n.clipboardData.getData("text");a&&(n.preventDefault(),r.setValue("connection_url",a.trim(),{shouldDirty:!0}),V(a))},onBlur:n=>{V(n.target.value),t.onBlur()}})}),e.jsx(_,{})]})}),e.jsx(f,{control:r.control,name:"connection_token",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:P?.token?.label??"Token (optional)"}),e.jsx(v,{children:e.jsx(T,{type:"password",placeholder:P?.token?.placeholder??"Bearer token or API key",...t,value:t.value??""})}),P?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[P.token.helperText,P.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(_,{})]})})]}),e.jsx(f,{control:r.control,name:"title",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Name *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"My Connection",...t})}),e.jsx(_,{})]})}),e.jsx(f,{control:r.control,name:"description",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Description"}),e.jsx(v,{children:e.jsx(Ct,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(_,{})]})})]}),e.jsxs(gt,{children:[e.jsx(S,{type:"button",variant:"outline",onClick:()=>ne(!1),children:"Cancel"}),e.jsx(S,{type:"submit",disabled:r.formState.isSubmitting,className:"min-w-40",children:r.formState.isSubmitting?"Saving...":m?"Update Connection":"Create Connection"})]})]})})]})}),e.jsx(ie,{open:u.mode==="deleting",onOpenChange:t=>!t&&b({type:"close"}),children:e.jsxs(ae,{children:[e.jsxs(ce,{children:[e.jsx(le,{children:"Delete Connection?"}),e.jsxs(de,{children:["This action cannot be undone. This will permanently delete"," ",e.jsx("span",{className:"font-medium text-foreground",children:u.mode==="deleting"&&u.connection.title}),"."]})]}),e.jsxs(me,{children:[e.jsx(ue,{children:"Cancel"}),e.jsx(pe,{onClick:Ie,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})}),e.jsx(ie,{open:u.mode==="force-deleting",onOpenChange:t=>!t&&b({type:"close"}),children:e.jsxs(ae,{children:[e.jsxs(ce,{children:[e.jsx(le,{children:"Connection Used by Agents"}),e.jsx(de,{asChild:!0,children:e.jsxs("div",{children:[e.jsxs("p",{children:["The connection"," ",e.jsx("span",{className:"font-medium text-foreground",children:u.mode==="force-deleting"&&u.connection.title})," ","is currently used by the following agent(s):"," ",e.jsx("span",{className:"font-medium text-foreground",children:u.mode==="force-deleting"&&u.agentNames}),"."]}),e.jsx("p",{className:"mt-2",children:"Deleting this connection will remove it from those agents, which may impact existing workflows that depend on them."})]})})]}),e.jsxs(me,{children:[e.jsx(ue,{children:"Cancel"}),e.jsx(pe,{onClick:Ee,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Anyway"})]})]})}),e.jsxs(E.Header,{children:[e.jsx(E.Header.Left,{children:e.jsx(at,{children:e.jsx(ct,{children:e.jsx(lt,{children:e.jsx(dt,{children:"Connections"})})})})}),e.jsxs(E.Header.Right,{children:[e.jsx(Qe,{viewMode:l.viewMode,onViewModeChange:l.setViewMode,sortKey:l.sortKey,sortDirection:l.sortDirection,onSort:l.handleSort,sortOptions:[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"connection_type",label:"Type"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}]}),Ae]})]}),e.jsx(Ye,{value:l.search,onChange:l.setSearch,placeholder:"Search for a Connection...",onKeyDown:t=>{t.key==="Escape"&&(l.setSearch(""),t.target.blur())}}),e.jsx(E.Content,{children:l.viewMode==="cards"?e.jsx("div",{className:"flex-1 overflow-auto p-5",children:A.length===0?e.jsx(L,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:(l.search,"No Connections found"),description:l.search?`No Connections match "${l.search}"`:"Create a connection to get started.",actions:!l.search&&e.jsx(S,{variant:"outline",onClick:()=>i({to:"/$org/$project/store",params:{org:s.slug,project:g}}),children:"Browse Store"})}):e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:A.map(t=>e.jsx(Ze,{connection:t,fallbackIcon:e.jsx(z,{}),onClick:()=>i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}}),headerActions:e.jsxs(xe,{children:[e.jsx(he,{asChild:!0,children:e.jsx(S,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:n=>n.stopPropagation(),children:e.jsx(je,{size:20})})}),e.jsxs(ge,{align:"end",onClick:n=>n.stopPropagation(),children:[e.jsxs(F,{onClick:n=>{n.stopPropagation(),i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}})},children:[e.jsx(ye,{size:16}),"Open"]}),e.jsxs(F,{variant:"destructive",onClick:n=>{n.stopPropagation(),b({type:"delete",connection:t})},children:[e.jsx(ve,{size:16}),"Delete"]})]})]}),body:e.jsx(Ce,{status:t.status}),footer:e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground w-full min-w-0",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(re,{id:t.updated_by??t.created_by,size:"3xs"})}),e.jsx("span",{className:"shrink-0 ml-2",children:t.updated_at?_e(new Date(t.updated_at)):"—"})]})},t.id))})}):e.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:e.jsx("div",{className:"flex-1 overflow-auto min-w-0",children:e.jsx("div",{className:"min-w-[1000px]",children:e.jsx(Je,{columns:Oe,data:A,isLoading:!1,sortKey:l.sortKey,sortDirection:l.sortDirection,onSort:l.handleSort,onRowClick:t=>i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}}),emptyState:l.search?e.jsx(L,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:400,height:178,"aria-hidden":"true"}),title:"No Connections found",description:`No Connections match "${l.search}"`}):e.jsx(L,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:400,height:178,"aria-hidden":"true"}),title:"No Connections found",description:"Create a connection to get started.",actions:e.jsx(S,{variant:"outline",onClick:()=>i({to:"/$org/$project/store",params:{org:s.slug,project:g}}),children:"Browse Store"})})})})})})})]})}function Xn(){const s=be.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(Fe,{children:e.jsx(X.Suspense,{fallback:e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(St,{size:32,className:"animate-spin text-muted-foreground"})}),children:e.jsx(Ht,{})})}),s[0]=o):o=s[0],o}export{Xn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bA as h,c as d,m as f,bB as _}from"./index-
|
|
1
|
+
import{bA as h,c as d,m as f,bB as _}from"./index-BiG-bBX7.js";const m={authConfig:()=>["authConfig"],threads:t=>["threads",t],virtualMcpThreads:(t,e)=>["threads",t,"virtual-mcp",e],thread:(t,e)=>["thread",t,e],threadMessages:(t,e)=>["thread-messages",t,e],messages:t=>["messages",t],organizations:()=>["organizations"],members:t=>[t,"members"],invitations:t=>[t,"invitations"],organizationRoles:t=>[t,"organization-roles"],connections:t=>[t,"connections"],connectionsByBinding:(t,e)=>[t,"connections",`binding:${e}`],connection:(t,e)=>[t,"connection",e],isMCPAuthenticated:(t,e)=>["is-mcp-authenticated",t,e],mcpTools:(t,e)=>["mcp","tools",t,e],mcpClient:(t,e,n,o)=>["mcp","client",t,e,n,o],mcpToolsList:t=>["mcp","client",t,"tools"],mcpResourcesList:t=>["mcp","client",t,"resources"],mcpPromptsList:t=>["mcp","client",t,"prompts"],mcpReadResource:(t,e)=>["mcp","client",t,"resource",e],mcpGetPrompt:(t,e,n)=>["mcp","client",t,"prompt",e,n],mcpToolCall:(t,e,n)=>["mcp","client",t,"tool-call",e,n],organizationSettings:t=>["organization-settings",t],activeOrganization:t=>["activeOrganization",t],modelsList:t=>["models-list",t],connectionCollections:t=>[t,"collections","discovery"],toolCall:(t,e,n)=>["tool-call",t,e,n],collectionItems:(t,e)=>["collection",t,e],collection:(t,e,n)=>[t,e,"collection",n],collectionItem:(t,e,n,o,i)=>[t,e,n,"collection",o,i],collectionList:(t,e,n,o,i)=>[t,e,n,"collection",o,"list",i],collectionListInfinite:(t,e,n,o,i)=>[t,e,n,"collection",o,"list-infinite",i],githubReadme:(t,e)=>["github-readme",t,e],monitoringStats:()=>["monitoring","stats"],monitoringLogs:t=>["monitoring","logs",t],monitoringLogsInfinite:(t,e)=>["monitoring","logs-infinite",t,e],virtualMcpPrompts:t=>["virtual-mcp",t,"prompts"],connectionPrompts:t=>["connection",t,"prompts"],connectionResources:t=>["connection",t,"resources"],user:t=>["user",t]};class y extends h{constructor(e,n){super(e,n)}send(e,n){const o=b(e);return o?.type==="emit"?(this.onmessage?.(o.message),Promise.resolve()):o?.type==="suppress"?Promise.resolve():super.send(e,n)}}function b(t){const e=t;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const n=e?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{},resources:{},prompts:{},tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}},serverInfo:{name:"mesh-virtual-mcp",version:"1.0.0"}},jsonrpc:e.jsonrpc??"2.0",id:e.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}const C={name:"mesh-sdk",version:"1.0.0"};function T(t,e){const n=e??(typeof window<"u"?window.location.origin:void 0);if(!n)throw new Error("MCP client requires either meshUrl option or a browser environment.");const o=t?`/mcp/${t}`:"/mcp";return new URL(o,n).href}async function g({connectionId:t,orgId:e,token:n,meshUrl:o}){const i=T(t,o),c=new _(C,{capabilities:{tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}}}),r=new y(new URL(i),{requestInit:{headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream","x-org-id":e,...n?{Authorization:`Bearer ${n}`}:{}}}});await c.connect(r);const a=m.mcpClient(e,t??"self",n??"",o??"");return c.toJSON=()=>`mcp-client:${a.join(":")}`,c}function S(t){const e=d.c(13),{connectionId:n,orgId:o,token:i,meshUrl:c}=t;let r;e[0]!==n||e[1]!==c||e[2]!==o||e[3]!==i?(r=m.mcpClient(o,n??"self",i??"",c??""),e[0]=n,e[1]=c,e[2]=o,e[3]=i,e[4]=r):r=e[4];const a=r;let s;e[5]!==n||e[6]!==c||e[7]!==o||e[8]!==i?(s=()=>g({connectionId:n,orgId:o,token:i,meshUrl:c}),e[5]=n,e[6]=c,e[7]=o,e[8]=i,e[9]=s):s=e[9];let l;e[10]!==a||e[11]!==s?(l={queryKey:a,queryFn:s,staleTime:1/0,gcTime:0},e[10]=a,e[11]=s,e[12]=l):l=e[12];const{data:u}=f(l);return u}function I(t){const e=d.c(13),{connectionId:n,orgId:o,token:i,meshUrl:c}=t;let r;e[0]!==n||e[1]!==c||e[2]!==o||e[3]!==i?(r=n!==void 0?m.mcpClient(o,n??"self",i??"",c??""):["mcp","client","skip",o],e[0]=n,e[1]=c,e[2]=o,e[3]=i,e[4]=r):r=e[4];const a=r;let s;e[5]!==n||e[6]!==c||e[7]!==o||e[8]!==i?(s=async()=>n===void 0?null:g({connectionId:n,orgId:o,token:i,meshUrl:c}),e[5]=n,e[6]=c,e[7]=o,e[8]=i,e[9]=s):s=e[9];let l;e[10]!==a||e[11]!==s?(l={queryKey:a,queryFn:s,staleTime:1/0,gcTime:0},e[10]=a,e[11]=s,e[12]=l):l=e[12];const{data:u}=f(l);return u??null}const P={SELF:t=>`${t}_self`,REGISTRY:t=>`${t}_registry`,COMMUNITY_REGISTRY:t=>`${t}_community-registry`,DEV_ASSETS:t=>`${t}_dev-assets`},M="self";function R(t){return{id:P.REGISTRY(t),title:"Deco Store",description:"Official deco MCP registry with curated integrations",connection_type:"HTTP",connection_url:"https://api.decocms.com/mcp/registry",icon:"https://assets.decocache.com/decocms/00ccf6c3-9e13-4517-83b0-75ab84554bb9/596364c63320075ca58483660156b6d9de9b526e.png",app_name:"deco-registry",app_id:null,connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{isDefault:!0,type:"registry"}}}function L(){return{id:"community-registry",title:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",connection_type:"HTTP",connection_url:"https://sites-registry.decocache.com/mcp",icon:"https://assets.decocache.com/decocms/cd7ca472-0f72-463a-b0de-6e44bdd0f9b4/mcp.png",app_name:"mcp-registry",app_id:null,connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{isDefault:!0,type:"registry"}}}function D(t={}){return{id:t.id,title:"OpenRouter",description:"Access hundreds of LLM models from a single API",icon:"https://assets.decocache.com/decocms/b2e2f64f-6025-45f7-9e8c-3b3ebdd073d8/openrouter_logojpg.jpg",app_name:"openrouter",app_id:"openrouter",connection_type:"HTTP",connection_url:"https://sites-openrouter.decocache.com/mcp",connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{source:"chat",verified:!1,scopeName:"deco",toolsCount:0,publishedAt:null,repository:null}}}function A(){return{title:"MCP Studio",description:"An app that allows you to create and manage MCPs",icon:"https://assets.decocache.com/mcp/09e44283-f47d-4046-955f-816d227c626f/app.png",app_name:"mcp-studio",app_id:"65a1b407-b6af-41e2-a89f-ce9450c05bbc",connection_type:"HTTP",connection_url:"https://sites-vibemcp.decocache.com/mcp",connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{isDefault:!1,type:"mcp-studio"}}}function E(t){return{id:v(t),organization_id:t,title:"Decopilot",description:"Default agent that aggregates all organization connections",icon:"https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png",status:"active",created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:"system",updated_by:void 0,metadata:{instructions:null},connections:[]}}const p="decopilot_";function O(t){return!t||!t.startsWith(p)?null:t.slice(p.length)||null}function v(t){return`${p}${t}`}export{m as K,y as S,P as W,M as a,L as b,g as c,E as d,A as e,D as f,v as g,R as h,O as i,I as j,S as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a0 as a,a1 as t}from"./index-BiG-bBX7.js";const e=a(t,{target:"draft-7"});export{e as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as A,s as D,c as O,k as v,l as E,j as r,B as N,d as I}from"./index-
|
|
1
|
+
import{o as A,s as D,c as O,k as v,l as E,j as r,B as N,d as I}from"./index-BiG-bBX7.js";import{A as M,a as L,b as R,c as T,d as $,e as k,f as B}from"./alert-dialog-DQT_qq2D.js";import{F as V,a as q,b as H,c as U,d as G,e as J,f as K}from"./form-CZlsOGpj.js";import{I as P}from"./input-BcOk4EWn.js";import{S as Q}from"./spinner-DSMOMT7g.js";import{u as W}from"./useMutation-Cxle_Mtw.js";function _(o){return o.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const X=A({name:D().min(2,"Organization name is required")});function se(o){const e=O.c(41),{open:a,onOpenChange:s}=o;let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={resolver:v(X),defaultValues:{name:""}},e[0]=j):j=e[0];const t=E(j);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={mutationFn:Z,onSuccess:Y},e[1]=w):w=e[1];const i=W(w),z=i.error instanceof Error?i.error.message:i.error?"Failed to create organization.":null;let F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsxs(R,{children:[r.jsx(T,{children:"Create a new organization"}),r.jsx($,{children:"Set up a new organization to collaborate with others."})]}),e[2]=F):F=e[2];let n;if(e[3]!==i||e[4]!==t){let p;e[6]!==i?(p=b=>i.mutateAsync(b),e[6]=i,e[7]=p):p=e[7],n=t.handleSubmit(p),e[3]=i,e[4]=t,e[5]=n}else n=e[5];let l;e[8]!==t.formState.isSubmitting?(l=p=>{const{field:b}=p;return r.jsxs(H,{children:[r.jsx(U,{children:"Organization Name"}),r.jsx(G,{children:r.jsx(P,{...b,placeholder:"Acme Inc.",disabled:t.formState.isSubmitting})}),r.jsx(J,{children:"The name of your company or organization"}),b.value&&r.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",r.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",_(b.value)]})]}),r.jsx(K,{})]})},e[8]=t.formState.isSubmitting,e[9]=l):l=e[9];let m;e[10]!==t.control||e[11]!==l?(m=r.jsx(V,{control:t.control,name:"name",render:l}),e[10]=t.control,e[11]=l,e[12]=m):m=e[12];let c;e[13]!==z?(c=z&&r.jsx("div",{className:"text-destructive text-sm mt-2",children:z}),e[13]=z,e[14]=c):c=e[14];let f;e[15]!==i||e[16]!==t?(f=()=>{i.reset(),t.reset()},e[15]=i,e[16]=t,e[17]=f):f=e[17];let g;e[18]!==t.formState.isSubmitting||e[19]!==f?(g=r.jsx(M,{disabled:t.formState.isSubmitting,onClick:f,children:"Cancel"}),e[18]=t.formState.isSubmitting,e[19]=f,e[20]=g):g=e[20];const y=!t.formState.isValid||t.formState.isSubmitting;let u;e[21]!==t.formState.isSubmitting?(u=t.formState.isSubmitting?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(Q,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=t.formState.isSubmitting,e[22]=u):u=e[22];let d;e[23]!==y||e[24]!==u?(d=r.jsx(N,{type:"submit",variant:"default",disabled:y,children:u}),e[23]=y,e[24]=u,e[25]=d):d=e[25];let S;e[26]!==d||e[27]!==g?(S=r.jsxs(k,{children:[g,d]}),e[26]=d,e[27]=g,e[28]=S):S=e[28];let h;e[29]!==S||e[30]!==n||e[31]!==m||e[32]!==c?(h=r.jsxs("form",{className:"space-y-6",onSubmit:n,autoComplete:"off",children:[m,c,S]}),e[29]=S,e[30]=n,e[31]=m,e[32]=c,e[33]=h):h=e[33];let x;e[34]!==t||e[35]!==h?(x=r.jsxs(L,{children:[F,r.jsx(q,{...t,children:h})]}),e[34]=t,e[35]=h,e[36]=x):x=e[36];let C;return e[37]!==s||e[38]!==a||e[39]!==x?(C=r.jsx(B,{open:a,onOpenChange:s,children:x}),e[37]=s,e[38]=a,e[39]=x,e[40]=C):C=e[40],C}function Y(o){const{orgSlug:e}=o;window.location.href=`/${e}`}async function Z(o){const e=_(o.name);if(!e)throw new Error("Organization slug is invalid");const a=await I.organization.create({name:o.name,slug:e});if(a?.error)throw new Error(a.error.message||"Failed to create organization");const s=a?.data?.slug??e;if(!s)throw new Error("Failed to create organization");return{orgSlug:s}}export{se as C};
|
package/dist/client/assets/{create-project-dialog-DpFucZww.js → create-project-dialog-BB0XeLGb.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as A,j as e,v as L,u as R,b as k,n as z,r as M,l as T,t as B,K as V,O as j,B as D,o as $,s as f}from"./index-
|
|
1
|
+
import{c as A,j as e,v as L,u as R,b as k,n as z,r as M,l as T,t as B,K as V,O as j,B as D,o as $,s as f}from"./index-BiG-bBX7.js";import{u as q}from"./useMutation-Cxle_Mtw.js";import{u as O,a as K}from"./constants-Bj4b22ad.js";import{D as U,a as G,b as J,c as Q,d as Y,e as H}from"./dialog-DDOb23Pi.js";import{a as W,F as v,b as F,c as N,d as S,f as w}from"./form-CZlsOGpj.js";import{I}from"./input-BcOk4EWn.js";import{T as X}from"./textarea-Bkod2qAV.js";import{L as Z}from"./label-BLk50aKt.js";import{i as ee}from"./Check-Bs28PslG.js";function se(l){return l.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function _(l){return/^[a-z0-9-]+$/.test(l)&&l.length>0&&l.length<=100}const te=["#3B82F6","#8B5CF6","#EC4899","#EF4444","#F97316","#EAB308","#22C55E","#14B8A6","#06B6D4","#6366F1","#64748B","#000000"];function ne(l){const s=A.c(16),{value:r,onChange:i}=l;let c;s[0]!==i||s[1]!==r?(c=te.map(o=>e.jsx("button",{type:"button",onClick:()=>i(o),className:L("size-8 rounded-lg transition-all",r===o&&"ring-2 ring-offset-2 ring-primary"),style:{backgroundColor:o},children:r===o&&e.jsx(ee,{className:"size-4 text-white mx-auto"})},o)),s[0]=i,s[1]=r,s[2]=c):c=s[2];let u;s[3]!==c?(u=e.jsx("div",{className:"grid grid-cols-6 gap-2",children:c}),s[3]=c,s[4]=u):u=s[4];const g=r??"#3B82F6";let d;s[5]!==i?(d=o=>i(o.target.value),s[5]=i,s[6]=d):d=s[6];let t;s[7]!==g||s[8]!==d?(t=e.jsx("input",{type:"color",value:g,onChange:d,className:"size-8 rounded cursor-pointer"}),s[7]=g,s[8]=d,s[9]=t):t=s[9];let a;s[10]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx("span",{className:"text-sm text-muted-foreground",children:"Custom color"}),s[10]=a):a=s[10];let m;s[11]!==t?(m=e.jsxs("div",{className:"flex items-center gap-2",children:[t,a]}),s[11]=t,s[12]=m):m=s[12];let x;return s[13]!==u||s[14]!==m?(x=e.jsxs("div",{className:"space-y-3",children:[u,m]}),s[13]=u,s[14]=m,s[15]=x):x=s[15],x}$({name:f().min(1,"Name is required").max(200),slug:f().min(1,"Slug is required").max(100),description:f().max(1e3).optional(),bannerColor:f().nullable().optional()});function ge({open:l,onOpenChange:s}){const{org:r}=R(),i=k(),c=z(),[u,g]=M.useState(!1),d=O({connectionId:K,orgId:r.id}),t=T({mode:"onChange",defaultValues:{name:"",slug:"",description:"",bannerColor:"#3B82F6"}}),a=q({mutationFn:async n=>{const p=await d.callTool({name:"PROJECT_CREATE",arguments:{organizationId:r.id,slug:n.slug,name:n.name,description:n.description||null,enabledPlugins:[],ui:{banner:null,bannerColor:n.bannerColor??null,icon:null,themeColor:n.bannerColor??null}}});return p.structuredContent??p},onSuccess:n=>{c.invalidateQueries({queryKey:V.projects(r.id)}),B.success("Project created successfully"),s(!1),t.reset({name:"",slug:"",description:"",bannerColor:"#3B82F6"}),g(!1),i({to:"/$org/$project",params:{org:r.slug,project:n.project.slug}})},onError:n=>{B.error("Failed to create project: "+(n instanceof Error?n.message:"Unknown error"))}}),m=async n=>{if(!_(n.slug)){t.setError("slug",{message:"Slug must be lowercase alphanumeric with hyphens only"});return}if(n.slug===j){t.setError("slug",{message:`"${j}" is a reserved slug`});return}await a.mutateAsync(n)},x=n=>{const p=n.target.value;if(t.setValue("name",p),!u){const P=se(p);t.setValue("slug",P)}},o=n=>{g(!0),t.setValue("slug",n.target.value.toLowerCase().replace(/[^a-z0-9-]/g,""))},C=t.watch("bannerColor"),h=t.watch("slug"),b=t.watch("name"),y=h===j,E=h.length>0&&!_(h);return e.jsx(U,{open:l,onOpenChange:s,children:e.jsxs(G,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Create New Project"}),e.jsxs(Y,{children:["Set up a new project in ",r.name,". You can configure plugins and settings after creation."]})]}),e.jsx(W,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(m),className:"space-y-6",children:[e.jsx("div",{className:"h-20 rounded-lg relative",style:{backgroundColor:C??"#3B82F6"},children:e.jsx("div",{className:"absolute -bottom-4 left-4",children:e.jsx("div",{className:"size-12 rounded-lg border-2 border-background flex items-center justify-center text-lg font-semibold text-white",style:{backgroundColor:C??"#3B82F6"},children:b?.charAt(0)?.toUpperCase()||"P"})})}),e.jsxs("div",{className:"space-y-2 pt-4",children:[e.jsx(Z,{children:"Banner Color"}),e.jsx(ne,{value:C??null,onChange:n=>t.setValue("bannerColor",n)})]}),e.jsx(v,{control:t.control,name:"name",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Project Name *"}),e.jsx(S,{children:e.jsx(I,{value:b,onChange:x,placeholder:"My Awesome Project",autoFocus:!0,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"slug",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Slug *"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:["/",r.slug,"/"]}),e.jsx(S,{children:e.jsx(I,{value:h,onChange:o,placeholder:"my-awesome-project",className:"flex-1",disabled:a.isPending})})]}),y&&e.jsxs("p",{className:"text-xs text-destructive",children:['"',j,'" is a reserved slug']}),E&&!y&&e.jsx("p",{className:"text-xs text-destructive",children:"Slug must be lowercase alphanumeric with hyphens only"}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"description",render:({field:n})=>e.jsxs(F,{children:[e.jsx(N,{children:"Description"}),e.jsx(S,{children:e.jsx(X,{...n,placeholder:"What is this project for?",rows:2,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsxs(H,{children:[e.jsx(D,{type:"button",variant:"outline",onClick:()=>s(!1),disabled:a.isPending,children:"Cancel"}),e.jsx(D,{type:"submit",disabled:a.isPending||y||E||!b||!h,children:a.isPending?"Creating...":"Create Project"})]})]})})]})})}export{ge as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,j as r}from"./index-
|
|
1
|
+
import{c as o,j as r}from"./index-BiG-bBX7.js";import{D as s}from"./danger-zone-DJn-yaAs.js";import"./useMutation-Cxle_Mtw.js";import"./constants-Bj4b22ad.js";import"./input-BcOk4EWn.js";import"./alert-dialog-DQT_qq2D.js";function n(){const t=o.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Danger Zone"}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Irreversible and destructive actions."})]}),r.jsx(s,{})]}),t[0]=e):e=t[0],e}function f(){const t=o.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(n,{}),t[0]=e):e=t[0],e}export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,u as G,b as J,n as Q,r as L,O as M,j as t,K as U,t as F,B as Z}from"./index-
|
|
1
|
+
import{c as B,u as G,b as J,n as Q,r as L,O as M,j as t,K as U,t as F,B as Z}from"./index-BiG-bBX7.js";import{u as H}from"./useMutation-Cxle_Mtw.js";import{a as Y,u as z}from"./constants-Bj4b22ad.js";import{I as V}from"./input-BcOk4EWn.js";import{c as W,g as X,d as ee,b as te,A as se,e as le,h as ne,a as re,f as oe}from"./alert-dialog-DQT_qq2D.js";function fe(){const e=B.c(45),{org:n,project:s}=G(),S=J(),E=Q(),[x,R]=L.useState(""),[P,k]=L.useState(!1),K=s.slug===M;let h;e[0]!==n.id?(h={connectionId:Y,orgId:n.id},e[0]=n.id,e[1]=h):h=e[1];const I=z(h);let r;e[2]!==I||e[3]!==s.id?(r=async()=>{const l=await I.callTool({name:"PROJECT_DELETE",arguments:{projectId:s.id}});return l.structuredContent??l},e[2]=I,e[3]=s.id,e[4]=r):r=e[4];let o;e[5]!==S||e[6]!==n.id||e[7]!==n.slug||e[8]!==E?(o=l=>{l.success?(E.invalidateQueries({queryKey:U.projects(n.id)}),F.success("Project deleted"),S({to:"/$org/$project/projects",params:{org:n.slug,project:M}})):F.error(l.message??"Failed to delete project")},e[5]=S,e[6]=n.id,e[7]=n.slug,e[8]=E,e[9]=o):o=e[9];let p;e[10]!==r||e[11]!==o?(p={mutationFn:r,onSuccess:o,onError:ae},e[10]=r,e[11]=o,e[12]=p):p=e[12];const g=H(p);if(K)return null;const $=x===s.name;let j;e[13]!==g?(j=()=>{g.mutate()},e[13]=g,e[14]=j):j=e[14];const O=j;let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=l=>{k(l),l||R("")},e[15]=b):b=e[15];const q=b;let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"Danger Zone"}),e[16]=D):D=e[16];let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Delete Project"}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Permanently delete this project and all its data. This action cannot be undone."})]}),e[17]=v):v=e[17];let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(X,{asChild:!0,children:t.jsx(Z,{variant:"outline",className:"shrink-0 bg-destructive/10 text-destructive border-0 hover:bg-destructive/15 hover:text-destructive",children:"Delete Project"})}),e[18]=_):_=e[18];let a;e[19]!==s.name?(a=t.jsxs(W,{children:['Delete "',s.name,'"?']}),e[19]=s.name,e[20]=a):a=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ee,{children:"This action cannot be undone. All project data will be permanently deleted."}),e[21]=y):y=e[21];let i;e[22]!==a?(i=t.jsxs(te,{children:[a,y]}),e[22]=a,e[23]=i):i=e[23];let c;e[24]!==s.name?(c=t.jsxs("p",{className:"text-sm mb-2",children:["Type ",t.jsx("strong",{children:s.name})," to confirm:"]}),e[24]=s.name,e[25]=c):c=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=l=>R(l.target.value),e[26]=C):C=e[26];let d;e[27]!==x||e[28]!==s.name?(d=t.jsx(V,{value:x,onChange:C,placeholder:s.name}),e[27]=x,e[28]=s.name,e[29]=d):d=e[29];let m;e[30]!==c||e[31]!==d?(m=t.jsxs("div",{className:"py-4",children:[c,d]}),e[30]=c,e[31]=d,e[32]=m):m=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(se,{children:"Cancel"}),e[33]=A):A=e[33];const T=!$||g.isPending,w=g.isPending?"Deleting...":"Delete Project";let u;e[34]!==O||e[35]!==T||e[36]!==w?(u=t.jsxs(le,{children:[A,t.jsx(ne,{onClick:O,disabled:T,className:"bg-destructive/10 text-destructive hover:bg-destructive/15 hover:text-destructive border-0",children:w})]}),e[34]=O,e[35]=T,e[36]=w,e[37]=u):u=e[37];let f;e[38]!==i||e[39]!==m||e[40]!==u?(f=t.jsxs(re,{children:[i,m,u]}),e[38]=i,e[39]=m,e[40]=u,e[41]=f):f=e[41];let N;return e[42]!==P||e[43]!==f?(N=t.jsxs("div",{className:"flex flex-col",children:[D,t.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[v,t.jsxs(oe,{open:P,onOpenChange:q,children:[_,f]})]})]}),e[42]=P,e[43]=f,e[44]=N):N=e[44],N}function ae(e){F.error("Failed to delete project: "+(e instanceof Error?e.message:"Unknown error"))}export{fe as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,m as u,ay as m,az as f}from"./index-
|
|
1
|
+
import{c as l,m as u,ay as m,az as f}from"./index-BiG-bBX7.js";import{u as y}from"./useQuery-Us1whSan.js";import{K as n}from"./constants-Bj4b22ad.js";async function c(r){if(!r.getServerCapabilities()?.prompts)return{prompts:[]};try{return await r.listPrompts()}catch(e){if(e instanceof m&&e.code===f.MethodNotFound)return{prompts:[]};throw e}}async function d(r,t,e){if(!r.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await r.getPrompt({name:t,arguments:e??{}})}function b(r){const t=l.c(12);let e,s;t[0]!==r?({client:e,...s}=r,t[0]=r,t[1]=e,t[2]=s):(e=t[1],s=t[2]);let i;t[3]!==e?(i=n.mcpPromptsList(e),t[3]=e,t[4]=i):i=t[4];let o;t[5]!==e?(o=()=>c(e),t[5]=e,t[6]=o):o=t[6];const p=s.staleTime??3e4;let a;return t[7]!==s||t[8]!==i||t[9]!==o||t[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},t[7]=s,t[8]=i,t[9]=o,t[10]=p,t[11]=a):a=t[11],u(a)}function L(r){const t=l.c(12);let e,s;t[0]!==r?({client:e,...s}=r,t[0]=r,t[1]=e,t[2]=s):(e=t[1],s=t[2]);let i;t[3]!==e?(i=n.mcpPromptsList(e),t[3]=e,t[4]=i):i=t[4];let o;t[5]!==e?(o=()=>c(e),t[5]=e,t[6]=o):o=t[6];const p=s.staleTime??3e4;let a;return t[7]!==s||t[8]!==i||t[9]!==o||t[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},t[7]=s,t[8]=i,t[9]=o,t[10]=p,t[11]=a):a=t[11],y(a)}const P={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},C=Object.values(P);export{C as A,P as D,L as a,d as g,c as l,b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,j as t,u as ue,n as fe,r as pe,v as ne,K as ee,B as xe,t as re}from"./index-
|
|
1
|
+
import{c as K,j as t,u as ue,n as fe,r as pe,v as ne,K as ee,B as xe,t as re}from"./index-BiG-bBX7.js";import{u as he}from"./useQuery-Us1whSan.js";import{u as oe}from"./useMutation-Cxle_Mtw.js";import{P as je,a as ge,b as Ce}from"./popover-Cnhlur36.js";import{C as be,a as ve,b as Ne,c as ye,d as Ee,e as Te}from"./command-BL2WDnzB.js";import{s as _e}from"./Plus-7RI9qITc.js";import{i as Ie}from"./X-B9LxUp5o.js";import{h as Pe}from"./use-connection-CsobI-JA.js";import{a as Se,u as Oe}from"./constants-Bj4b22ad.js";import{u as te}from"./unwrap-tool-result-BYXdCQMg.js";import"./index-CBDYR7h7.js";import"./SearchMd-BzFnoImC.js";function ie(e){const n=K.c(6),{icon:o,title:c}=e;if(o){let a;return n[0]!==o?(a=t.jsx("img",{src:o,alt:"",className:"size-5 shrink-0 rounded"}),n[0]=o,n[1]=a):a=n[1],a}let i;n[2]!==c?(i=c.charAt(0).toUpperCase(),n[2]=c,n[3]=i):i=n[3];let r;return n[4]!==i?(r=t.jsx("div",{className:"size-5 shrink-0 rounded bg-muted flex items-center justify-center",children:t.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:i})}),n[4]=i,n[5]=r):r=n[5],r}function we(){const e=K.c(72),{org:n,project:o}=ue();let c;e[0]!==n.id?(c={connectionId:Se,orgId:n.id},e[0]=n.id,e[1]=c):c=e[1];const i=Oe(c),r=fe(),a=Pe(),l=o.id??"",[Q,se]=pe.useState(!1);let d;e[2]!==l?(d=ee.projectConnections(l),e[2]=l,e[3]=d):d=e[3];const L=!!o.id;let m;e[4]!==i||e[5]!==l?(m=async()=>{const s=await i.callTool({name:"PROJECT_CONNECTION_LIST",arguments:{projectId:l}});return te(s)},e[4]=i,e[5]=l,e[6]=m):m=e[6];let P;e[7]!==d||e[8]!==L||e[9]!==m?(P={queryKey:d,enabled:L,queryFn:m},e[7]=d,e[8]=L,e[9]=m,e[10]=P):P=e[10];const{data:$}=he(P);let S;e[11]!==$?.connections?(S=new Set(($?.connections??[]).map(Re)),e[11]=$?.connections,e[12]=S):S=e[12];const u=S;let O;e[13]!==u?(O=s=>u.has(s.id),e[13]=u,e[14]=O):O=e[14];const I=(a??[]).filter(O);let w;e[15]!==u?(w=s=>!u.has(s.id),e[15]=u,e[16]=w):w=e[16];const le=(a??[]).filter(w);let k;e[17]!==n.id||e[18]!==o.slug||e[19]!==l||e[20]!==r?(k=()=>{r.invalidateQueries({queryKey:ee.projectConnections(l)}),r.invalidateQueries({queryKey:ee.project(n.id,o.slug)})},e[17]=n.id,e[18]=o.slug,e[19]=l,e[20]=r,e[21]=k):k=e[21];const f=k;let p;e[22]!==i||e[23]!==o.id?(p=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[22]=i,e[23]=o.id,e[24]=p):p=e[24];let x;e[25]!==f?(x=()=>f(),e[25]=f,e[26]=x):x=e[26];let z;e[27]!==x||e[28]!==p?(z={mutationFn:p,onSuccess:x,onError:ze},e[27]=x,e[28]=p,e[29]=z):z=e[29];const J=oe(z);let h;e[30]!==i||e[31]!==o.id?(h=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_REMOVE",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[30]=i,e[31]=o.id,e[32]=h):h=e[32];let j;e[33]!==f?(j=()=>f(),e[33]=f,e[34]=j):j=e[34];let R;e[35]!==h||e[36]!==j?(R={mutationFn:h,onSuccess:j,onError:ke},e[35]=h,e[36]=j,e[37]=R):R=e[37];const A=oe(R);let F;e[38]!==J?(F=s=>{se(!1),J.mutate(s)},e[38]=J,e[39]=F):F=e[39];const U=F;let D;e[40]!==A?(D=s=>{A.mutate(s)},e[40]=A,e[41]=D):D=e[41];const ce=D,ae="space-y-4",B=ge;let g;e[42]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ce,{asChild:!0,children:t.jsxs(xe,{variant:"outline",size:"sm",className:"gap-1.5",children:[t.jsx(_e,{size:14}),"Add connection"]})}),e[42]=g):g=e[42];const G=je,de="w-72 p-0",me="start",V=Ne;let C;e[43]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(ye,{placeholder:"Search connections..."}),e[43]=C):C=e[43];const Y=ve;let b;e[44]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(Ee,{children:"No connections found."}),e[44]=b):b=e[44];const H=be;let M;e[45]!==U?(M=s=>t.jsxs(Te,{value:s.title,onSelect:()=>U(s.id),children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsx("span",{className:"truncate",children:s.title}),t.jsx("span",{className:ne("ml-auto inline-block size-1.5 shrink-0 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]},s.id),e[45]=U,e[46]=M):M=e[46];const W=le.map(M);let v;e[47]!==H||e[48]!==W?(v=t.jsx(H,{children:W}),e[47]=H,e[48]=W,e[49]=v):v=e[49];let N;e[50]!==Y||e[51]!==b||e[52]!==v?(N=t.jsxs(Y,{children:[b,v]}),e[50]=Y,e[51]=b,e[52]=v,e[53]=N):N=e[53];let y;e[54]!==V||e[55]!==C||e[56]!==N?(y=t.jsxs(V,{children:[C,N]}),e[54]=V,e[55]=C,e[56]=N,e[57]=y):y=e[57];let E;e[58]!==G||e[59]!==y?(E=t.jsx(G,{className:de,align:me,children:y}),e[58]=G,e[59]=y,e[60]=E):E=e[60];let T;e[61]!==B||e[62]!==Q||e[63]!==g||e[64]!==E?(T=t.jsxs(B,{open:Q,onOpenChange:se,children:[g,E]}),e[61]=B,e[62]=Q,e[63]=g,e[64]=E,e[65]=T):T=e[65];const X=I.length>0&&t.jsx("div",{className:"flex flex-col",children:I.map(s=>t.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border last:border-0",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),t.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:s.connection_type}),t.jsx("span",{className:ne("inline-block size-1.5 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]})]})]}),t.jsx("button",{type:"button",onClick:()=>ce(s.id),disabled:A.isPending,className:"shrink-0 rounded-md p-1 text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors",children:t.jsx(Ie,{size:14})})]},s.id))});let _;e[66]!==I.length?(_=I.length===0&&t.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No connections added yet. Add connections from the organization to make them available in this project."}),e[66]=I.length,e[67]=_):_=e[67];let q;return e[68]!==T||e[69]!==X||e[70]!==_?(q=t.jsxs("div",{className:ae,children:[T,X,_]}),e[68]=T,e[69]=X,e[70]=_,e[71]=q):q=e[71],q}function ke(e){re.error("Failed to remove connection: "+(e instanceof Error?e.message:"Unknown error"))}function ze(e){re.error("Failed to add connection: "+(e instanceof Error?e.message:"Unknown error"))}function Re(e){return e.id}function Ae(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Connections"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose which organization connections are available to this project."})]}),t.jsx(we,{})]}),e[0]=n):n=e[0],n}function Ve(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ae,{}),e[0]=n):n=e[0],n}export{Ve as default};
|