@decocms/mesh 2.135.1 → 2.136.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-C0eftc-S.js → AlertCircle-CXJCnY_R.js} +1 -1
- package/dist/client/assets/{AlignLeft-y_Ps49tB.js → AlignLeft-Ckpqqq7X.js} +1 -1
- package/dist/client/assets/{ArrowDown-BVK-2NZv.js → ArrowDown-BXCgJapO.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BNX_fMaj.js → ArrowLeft-ihbjidrQ.js} +1 -1
- package/dist/client/assets/{ArrowUp-N8lcMBug.js → ArrowUp-B3tPpNuu.js} +1 -1
- package/dist/client/assets/{Check-Cjs4C9GE.js → Check-G22LpKFd.js} +1 -1
- package/dist/client/assets/{CheckCircle-KfoOm4QY.js → CheckCircle-Dl3Eh5mw.js} +1 -1
- package/dist/client/assets/{CheckDone01-BesDn4jt.js → CheckDone01-DQOA8kaK.js} +1 -1
- package/dist/client/assets/{CheckVerified02-dNCcvCnV.js → CheckVerified02-C58oaMz8.js} +1 -1
- package/dist/client/assets/{ChevronDown-jKZz68gN.js → ChevronDown-DAk1F2Sn.js} +1 -1
- package/dist/client/assets/{ChevronLeft-DrJ63fdN.js → ChevronLeft-CGPjZdmg.js} +1 -1
- package/dist/client/assets/{ChevronRight-O5hZNhHU.js → ChevronRight-BT7U8Kip.js} +1 -1
- package/dist/client/assets/{Clock-CZrEpwOM.js → Clock-CPO-Cqx6.js} +1 -1
- package/dist/client/assets/{Code01-DVgdcTZ1.js → Code01-UXkm6aqY.js} +1 -1
- package/dist/client/assets/{Container-BADgIox6.js → Container-CyEPuAYL.js} +1 -1
- package/dist/client/assets/{Copy01-CwZDv92A.js → Copy01-tzx60ICS.js} +1 -1
- package/dist/client/assets/{Dataflow03-BD9MOeSH.js → Dataflow03-mD5gBD1P.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-M2BFmBhE.js → DotsHorizontal-9qiIYu_T.js} +1 -1
- package/dist/client/assets/{DotsVertical-B7FmF1Xu.js → DotsVertical-DHxrk-2J.js} +1 -1
- package/dist/client/assets/{Download01-9ocXQLzr.js → Download01-DM18IWVp.js} +1 -1
- package/dist/client/assets/{Edit01-kvm_TgXf.js → Edit01-D3PaS600.js} +1 -1
- package/dist/client/assets/{Edit05-D4Vt7tOt.js → Edit05-B64h7zay.js} +1 -1
- package/dist/client/assets/{Eye-BCmEvczH.js → Eye-C_LYW9jG.js} +1 -1
- package/dist/client/assets/{File02-CK_RNTh6.js → File02-CY9LI3Y-.js} +1 -1
- package/dist/client/assets/{File06-B3E-bjor.js → File06-Dy7xo8XS.js} +1 -1
- package/dist/client/assets/{FilterLines-DAyCv-Xk.js → FilterLines-BvkJQ7ij.js} +1 -1
- package/dist/client/assets/{Globe01-jKd57I4x.js → Globe01-39jWI59e.js} +1 -1
- package/dist/client/assets/{Globe02-D-yCMf5N.js → Globe02-X-Xm1ngz.js} +1 -1
- package/dist/client/assets/{Grid01-DRBx9FRw.js → Grid01-DTf5JuyC.js} +1 -1
- package/dist/client/assets/{Hash02-CyfLltcT.js → Hash02-AH6eTaow.js} +1 -1
- package/dist/client/assets/{Home02-BcZSV_S0.js → Home02-DzIcdgJH.js} +1 -1
- package/dist/client/assets/{Image01-Dg_KnZBd.js → Image01-Dvb2vnmH.js} +1 -1
- package/dist/client/assets/{Inbox01-nkL2-2Zq.js → Inbox01-CsvPcK33.js} +1 -1
- package/dist/client/assets/{InfoCircle-Ipgqrfv0.js → InfoCircle-D2mDfen0.js} +1 -1
- package/dist/client/assets/{Key01-CyP1-GBg.js → Key01-C3Fh3hes.js} +1 -1
- package/dist/client/assets/{LayersTwo01-rKs-Uww3.js → LayersTwo01-CRgWs3EX.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BH3urRkN.js → LayoutLeft-C-0_xlw0.js} +1 -1
- package/dist/client/assets/{Link01-D-1AbdDy.js → Link01-C74Jreax.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DIMSPk19.js → LinkExternal01-D6xwQf32.js} +1 -1
- package/dist/client/assets/{List-BzhQuBp2.js → List-DJEz6yKj.js} +1 -1
- package/dist/client/assets/{Loading01-BSgMOGt8.js → Loading01-B3gOoSbd.js} +1 -1
- package/dist/client/assets/{Lock01-T7BR0zuk.js → Lock01-CodP_ius.js} +1 -1
- package/dist/client/assets/{Play-CBKoaI1n.js → Play-CxAaQi_l.js} +1 -1
- package/dist/client/assets/{Plus-kcfCg7FH.js → Plus-Bo0L9uYY.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DiAOUquJ.js → RefreshCcw01-v6pXwg6P.js} +1 -1
- package/dist/client/assets/{Save01-CgyWcG00.js → Save01-CU3VjXKO.js} +1 -1
- package/dist/client/assets/{SearchMd-DyDznS8C.js → SearchMd-Cpf31N-H.js} +1 -1
- package/dist/client/assets/{Settings01-B90Jx8ZC.js → Settings01-BmEB9pVn.js} +1 -1
- package/dist/client/assets/{Shield01-B2Y9HIu6.js → Shield01-CqrrEAw-.js} +1 -1
- package/dist/client/assets/{Terminal-BxQK5nsd.js → Terminal-BS-6VR5p.js} +1 -1
- package/dist/client/assets/{Trash01-Dhrt1Goe.js → Trash01-HuK-pEft.js} +1 -1
- package/dist/client/assets/{Upload01-Dja0ZgIT.js → Upload01-DcyyJb_e.js} +1 -1
- package/dist/client/assets/{Users03-DHATZiFL.js → Users03-CPWgVi4r.js} +1 -1
- package/dist/client/assets/{X-BpJJDPzv.js → X-uHaUni9w.js} +1 -1
- package/dist/client/assets/{XCircle-D52fnGO6.js → XCircle-C4iqiznn.js} +1 -1
- package/dist/client/assets/{XClose-DcdK3w1e.js → XClose-DGYV-4S5.js} +1 -1
- package/dist/client/assets/{Zap-CP5UH1Dw.js → Zap-5c_DBEtK.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-v4ndb6aJ.js → agent-connections-preview-BsjSZYGn.js} +1 -1
- package/dist/client/assets/agent-detail-BxRuQLTH.js +2 -0
- package/dist/client/assets/agents-KBFzt520.js +1 -0
- package/dist/client/assets/{alert-dialog-PSmHhGOE.js → alert-dialog-D3oCqQtu.js} +2 -2
- package/dist/client/assets/{auth-catchall-CplMsxXE.js → auth-catchall-bz6gJ41s.js} +1 -1
- package/dist/client/assets/{avatar-VPsqzp0K.js → avatar-rYlL0ZoJ.js} +1 -1
- package/dist/client/assets/{badge-DSAomO1_.js → badge-CxJArm69.js} +1 -1
- package/dist/client/assets/{binder-8_Oel13A.js → binder-BXDCztlr.js} +1 -1
- package/dist/client/assets/{breadcrumb-Dxn3nF83.js → breadcrumb-CGrLS5HH.js} +1 -1
- package/dist/client/assets/{card-CRGkE-QK.js → card-CAORA3L1.js} +1 -1
- package/dist/client/assets/{chart-B-ayLZ8-.js → chart-DX1_yJHY.js} +1 -1
- package/dist/client/assets/{checkbox-Dj6Qb3KC.js → checkbox-BCSzUsPR.js} +1 -1
- package/dist/client/assets/{circle-alert-DcuI5GGM.js → circle-alert-B4C3d1aQ.js} +1 -1
- package/dist/client/assets/{collapsible-D2Mpu85K.js → collapsible-sQONDG4w.js} +1 -1
- package/dist/client/assets/{collection-detail-FNWcZVfu.js → collection-detail-B42SRwNb.js} +3 -3
- package/dist/client/assets/collection-display-button-M7dfC2Rf.js +1 -0
- package/dist/client/assets/{collection-search-FSS_Lkwz.js → collection-search-q4T1hb73.js} +1 -1
- package/dist/client/assets/collection-tab-e-VwhAzh.js +1 -0
- package/dist/client/assets/collection-table-wrapper-DXH0yXJC.js +1 -0
- package/dist/client/assets/{collection-tabs-CK4hfCPZ.js → collection-tabs-BbVq4J-5.js} +1 -1
- package/dist/client/assets/{command-BK3ZFocj.js → command-CPQN970u.js} +1 -1
- package/dist/client/assets/{connect-D2cFEIR8.js → connect-BGH3KdkD.js} +1 -1
- package/dist/client/assets/{connection-card-GLkE1rwd.js → connection-card-DTiOZbAC.js} +1 -1
- package/dist/client/assets/connection-detail-DznxU3SC.js +1 -0
- package/dist/client/assets/connections-AQfSUAp3.js +1 -0
- package/dist/client/assets/{constants-3MhIA0pZ.js → constants-D9bRXDQp.js} +1 -1
- package/dist/client/assets/constants-DvJZMaim.js +1 -0
- package/dist/client/assets/{create-organization-dialog-CR8t2T4R.js → create-organization-dialog-Bs4zbKG7.js} +1 -1
- package/dist/client/assets/{create-project-dialog-DFaC5_HT.js → create-project-dialog-BkL7vqeo.js} +1 -1
- package/dist/client/assets/{danger-BEh_Y1ce.js → danger-C_vn0auF.js} +1 -1
- package/dist/client/assets/{danger-zone-CpwKIZ0p.js → danger-zone-CdUOoCFt.js} +1 -1
- package/dist/client/assets/{decopilot-events-CA9aFPSQ.js → decopilot-events-DHSwekTa.js} +1 -1
- package/dist/client/assets/dependencies-DTmw6OGT.js +1 -0
- package/dist/client/assets/{dialog-CPWJMuHX.js → dialog-Baq_fjtR.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DW1GDWfN.js → dropdown-menu-CSqO4Mxn.js} +1 -1
- package/dist/client/assets/dynamic-plugin-layout-d0KDA7MF.js +1 -0
- package/dist/client/assets/{editable-task-title-D4gyoQ4x.js → editable-task-title-HUenZvZX.js} +1 -1
- package/dist/client/assets/{empty-state-boxcABsi.js → empty-state-BPClkF2j.js} +1 -1
- package/dist/client/assets/{env-vars-editor-x5YLFI-P.js → env-vars-editor-DDp7f4JN.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D40JrSD8.js → extract-connection-data-BkJeK0tX.js} +1 -1
- package/dist/client/assets/{file-browser-CrcClgQC.js → file-browser-DVzV35Ko.js} +2 -2
- package/dist/client/assets/{form-7Q-FsNtX.js → form-C5R0_qWR.js} +1 -1
- package/dist/client/assets/{general-C0buekt8.js → general-mBNwCpsS.js} +1 -1
- package/dist/client/assets/{grid-view-J96VhXfb.js → grid-view-7eQhfO8f.js} +1 -1
- package/dist/client/assets/{home-H46nCwT5.js → home-okrTp5Gh.js} +1 -1
- package/dist/client/assets/{icon-picker-DPVWLIZ3.js → icon-picker-DevrZ9IQ.js} +1 -1
- package/dist/client/assets/{index-CsXxowFD.js → index-B-STjJpH.js} +1 -1
- package/dist/client/assets/{index-ZgdunwGI.js → index-BK6i23a9.js} +1 -1
- package/dist/client/assets/{index-D7M37zt-.js → index-BWSvBz7o.js} +1 -1
- package/dist/client/assets/{index-3zbyfLqi.js → index-B_0vsVr1.js} +3 -3
- package/dist/client/assets/{index-DqzqEzLf.js → index-ByA6j7_H.js} +1 -1
- package/dist/client/assets/{index-DziKeC8s.js → index-CvEIDmnk.js} +1 -1
- package/dist/client/assets/index-D6E08wfB.css +1 -0
- package/dist/client/assets/index-DYY56DJY.js +1 -0
- package/dist/client/assets/{index-DZgOYNf-.js → index-QCmdl8uj.js} +1 -1
- package/dist/client/assets/{index-CW624IAb.js → index-UbeVlDrq.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DkOiuhUg.js → infiniteQueryObserver-DKiK82rX.js} +1 -1
- package/dist/client/assets/{input-DVv1wKLp.js → input-CW7SVowR.js} +1 -1
- package/dist/client/assets/{integration-icon-_0Y5dukY.js → integration-icon-DAFtApWT.js} +1 -1
- package/dist/client/assets/{label-CfzCa7Vm.js → label-DWU1nKSS.js} +1 -1
- package/dist/client/assets/{layout-DemCWqB_.js → layout-CzVwolFw.js} +1 -1
- package/dist/client/assets/{layout-CFi42XXk.js → layout-DEcRD72T.js} +1 -1
- package/dist/client/assets/{localstorage-keys-D2dx16dH.js → localstorage-keys-BAzeyS9J.js} +1 -1
- package/dist/client/assets/{login-BXUbt1kV.js → login-OPfY3bsF.js} +1 -1
- package/dist/client/assets/{markdown-89WWPNXO.js → markdown-DCSB9ejV.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-MJ3LmhBP.js → mcp-app-renderer-BtuEhdWL.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CPAKRpWT.js → mcp-oauth-D8pA0WRM.js} +1 -1
- package/dist/client/assets/{mcp-server-card-gl2xF4cu.js → mcp-server-card-D7xlSyX7.js} +1 -1
- package/dist/client/assets/mcp-server-detail-DdKXdUu2.js +2 -0
- package/dist/client/assets/members-YKyOsCaT.js +3 -0
- package/dist/client/assets/{monaco-editor-Qwuf1rYM.js → monaco-editor-zyWgiZEt.js} +1 -1
- package/dist/client/assets/{monitoring-C-vcUHdF.js → monitoring-SM_c8qxT.js} +2 -2
- package/dist/client/assets/monitoring-dashboard-edit-cexdjvMw.js +1 -0
- package/dist/client/assets/{monitoring-dashboard-view-D7MwbzDH.js → monitoring-dashboard-view-C3qQNwfm.js} +1 -1
- package/dist/client/assets/{oauth-callback-BnBZDVD6.js → oauth-callback-1SC3hH5y.js} +1 -1
- package/dist/client/assets/page-DfTTOYQt.js +1 -0
- package/dist/client/assets/page-hoODnFtN.js +1 -0
- package/dist/client/assets/{plugin-empty-state-DfdPh9Ts.js → plugin-empty-state-Cl_h_OgT.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-BuLjcm9B.js → plugin-empty-state-Doboc7Tq.js} +1 -1
- package/dist/client/assets/{plugin-header-CKLaOHoT.js → plugin-header-C4Dfehzm.js} +1 -1
- package/dist/client/assets/{plugin-header-Bi-8qclQ.js → plugin-header-DNeaPoeS.js} +1 -1
- package/dist/client/assets/plugins-H9eiCXso.js +1 -0
- package/dist/client/assets/popover-BNZ96bFv.js +1 -0
- package/dist/client/assets/project-app-view-Bsbq4Qf_.js +1 -0
- package/dist/client/assets/project-layout-B4cnkESa.js +1 -0
- package/dist/client/assets/{project-plugins-B1sb2cJf.js → project-plugins-CqDaIw1P.js} +1 -1
- package/dist/client/assets/{projects-list-D0DH8k1c.js → projects-list-CgsVuZof.js} +1 -1
- package/dist/client/assets/{readme-viewer-BvJA0DXw.js → readme-viewer-CKidIXa3.js} +1 -1
- package/dist/client/assets/{registry-layout-BJCo3ZwE.js → registry-layout-oUh5Zl7W.js} +2 -2
- package/dist/client/assets/{registry-utils-Cx5oa6Ne.js → registry-utils-DXJps8H7.js} +1 -1
- package/dist/client/assets/{reports-layout-DYTNa8h-.js → reports-layout-CFJRqv-Q.js} +2 -2
- package/dist/client/assets/{reset-password-DFzqJN6I.js → reset-password-ZQI9gTW6.js} +1 -1
- package/dist/client/assets/{resizable-PA9Y3YAt.js → resizable-CWRglWOX.js} +1 -1
- package/dist/client/assets/{save-actions-CXaB5WYr.js → save-actions-eGQZXGI3.js} +1 -1
- package/dist/client/assets/{scroll-area-DoXCMB9j.js → scroll-area-By1z4ZyY.js} +1 -1
- package/dist/client/assets/{select-DaTaxi5W.js → select-CYY4CENz.js} +1 -1
- package/dist/client/assets/shell-layout-DMKfJTmj.js +3 -0
- package/dist/client/assets/{sidebar-settings-BZwWXZuX.js → sidebar-settings-ILgspCqY.js} +1 -1
- package/dist/client/assets/{skeleton-C9OYLAME.js → skeleton-C4ZMp7sl.js} +1 -1
- package/dist/client/assets/{spinner-RGw-eBKN.js → spinner-oA3jiJW_.js} +1 -1
- package/dist/client/assets/{store-invite-Fvga4enp.js → store-invite-Bfy0Alsf.js} +1 -1
- package/dist/client/assets/{switch-CKTW0M5S.js → switch-BSc4dVNg.js} +1 -1
- package/dist/client/assets/{table-Dr33PlEJ.js → table-RFgqEt_E.js} +1 -1
- package/dist/client/assets/{tabs-t9dEapgX.js → tabs-BZ-xfLNG.js} +1 -1
- package/dist/client/assets/tasks-Cy-gkHRX.js +1 -0
- package/dist/client/assets/{tasks-panel-DLy55FSi.js → tasks-panel-C7RwVTDD.js} +1 -1
- package/dist/client/assets/{textarea-CNTbi5Nk.js → textarea-4HpXofT0.js} +1 -1
- package/dist/client/assets/{time-range-picker-Do8ix4-A.js → time-range-picker-Cx2A-Fs_.js} +1 -1
- package/dist/client/assets/{toggle-group-Ck1YCESf.js → toggle-group-CVFHcp8K.js} +1 -1
- package/dist/client/assets/tools-list-BYphEqhu.js +1 -0
- package/dist/client/assets/{tooltip-CzsT_Xmu.js → tooltip-Cz-bAWiO.js} +1 -1
- package/dist/client/assets/{topbar-portal-pZDSuDEC.js → topbar-portal-DOwsTUY4.js} +1 -1
- package/dist/client/assets/{types-BFBQ7LBo.js → types-B46wd5bS.js} +1 -1
- package/dist/client/assets/{use-binding-Cz4OU82g.js → use-binding-Dz1SRdBY.js} +1 -1
- package/dist/client/assets/use-collections-vccihohV.js +1 -0
- package/dist/client/assets/use-connection-DeEn4qfI.js +1 -0
- package/dist/client/assets/{use-copy-C0vtJ5Ye.js → use-copy-CykDvxn6.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CsNENE7l.js → use-create-virtual-mcp-DB14T-Ft.js} +1 -1
- package/dist/client/assets/use-install-from-registry-BeHRHLDl.js +1 -0
- package/dist/client/assets/{use-list-state-DUq5hUJc.js → use-list-state-ykkfYLR3.js} +1 -1
- package/dist/client/assets/use-llm-B_iPCa-K.js +1 -0
- package/dist/client/assets/{use-mcp-resources-DjDOJ-nS.js → use-mcp-resources-Rqzq7A0J.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-WZlm0cnW.js → use-mcp-tools-BXihKxpu.js} +1 -1
- package/dist/client/assets/{use-members-BLjJfltI.js → use-members-DAcqcxDX.js} +1 -1
- package/dist/client/assets/{use-mobile-CzcHKmhL.js → use-mobile-B2VAoWT2.js} +1 -1
- package/dist/client/assets/{use-project-CIyZUlkd.js → use-project-D96OXk4y.js} +1 -1
- package/dist/client/assets/{use-settings-modal-BU5fs4m_.js → use-settings-modal-CouKpdi3.js} +1 -1
- package/dist/client/assets/{use-view-mode-BadETRuZ.js → use-view-mode-DyK0fMBe.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-OwU65kyR.js +1 -0
- package/dist/client/assets/useInfiniteQuery-Cl9EtkM0.js +1 -0
- package/dist/client/assets/{useMutation-CqJLXgOK.js → useMutation-lBFQDcxE.js} +1 -1
- package/dist/client/assets/useQuery-DcRkCB2j.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DdSDu-rZ.js +1 -0
- package/dist/client/assets/{user-vKqDbtP6.js → user-C73vNaiS.js} +1 -1
- package/dist/client/assets/workflow-S9BhswBs.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-detail-DyOlL9jH.js +0 -2
- package/dist/client/assets/agents-CB6IRof4.js +0 -1
- package/dist/client/assets/collection-tab-FKeWJS1r.js +0 -1
- package/dist/client/assets/collection-table-wrapper-C3jcR2VW.js +0 -1
- package/dist/client/assets/connection-detail-PegJ7rZR.js +0 -1
- package/dist/client/assets/connections-C18lG_Ow.js +0 -1
- package/dist/client/assets/constants-Csevqii0.js +0 -1
- package/dist/client/assets/dependencies-mwSdsJgD.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-CY4G5d8i.js +0 -1
- package/dist/client/assets/index-Cr3FYIgR.css +0 -1
- package/dist/client/assets/index-DFlYm7QG.js +0 -1
- package/dist/client/assets/mcp-server-detail-CzmUyYsJ.js +0 -2
- package/dist/client/assets/members-BjMeazP1.js +0 -3
- package/dist/client/assets/monitoring-dashboard-edit-DdMgOlQK.js +0 -1
- package/dist/client/assets/page-BNQcXJwH.js +0 -1
- package/dist/client/assets/page-DvC0ZQe5.js +0 -1
- package/dist/client/assets/plugins-cGh_gky2.js +0 -1
- package/dist/client/assets/popover-7xIJyxqf.js +0 -1
- package/dist/client/assets/project-app-view-C_PL72tZ.js +0 -1
- package/dist/client/assets/project-layout-DIwsntjO.js +0 -1
- package/dist/client/assets/shell-layout-BqF7J7La.js +0 -3
- package/dist/client/assets/tasks-OJAbxkK1.js +0 -1
- package/dist/client/assets/tools-list-DLfR0anP.js +0 -1
- package/dist/client/assets/use-connection-Dlr-wAwU.js +0 -1
- package/dist/client/assets/use-install-from-registry-C_roXw8y.js +0 -1
- package/dist/client/assets/use-llm-B6AzV9Iw.js +0 -1
- package/dist/client/assets/use-virtual-mcp-BjGr5L6n.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CGGEgi5q.js +0 -1
- package/dist/client/assets/useQuery-DWLTdDjg.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-YGfVGowO.js +0 -1
- package/dist/client/assets/workflow--wyybZpA.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Ae,j as t,B as Ie,b as Ye,d as Ze,u as et,r as tt,O as $e,t as st}from"./index-3zbyfLqi.js";import{g as Oe}from"./generate-id-Dyweu44Y.js";import{a as ot,C as Fe}from"./collection-table-wrapper-C3jcR2VW.js";import{C as it,E as nt}from"./collection-search-FSS_Lkwz.js";import{C as rt}from"./card-CRGkE-QK.js";import{I as ke}from"./integration-icon-_0Y5dukY.js";import{D as Ke,a as Ue,b as Le,c as k}from"./dropdown-menu-DW1GDWfN.js";import{a as Be}from"./Copy01-CwZDv92A.js";import{i as Re}from"./DotsVertical-B7FmF1Xu.js";import{i as Ve}from"./Edit01-kvm_TgXf.js";import{s as Ge}from"./Eye-BCmEvczH.js";import{s as Je}from"./Trash01-Dhrt1Goe.js";import{E as ze}from"./empty-state-boxcABsi.js";import{n as Ee}from"./Inbox01-nkL2-2Zq.js";import{U as lt}from"./user-vKqDbtP6.js";import{u as at}from"./use-list-state-DUq5hUJc.js";import{B as ct}from"./constants-Csevqii0.js";import{A as dt,h as pt,c as mt,b as ut,d as ft,e as ht,a as xt,f as gt}from"./alert-dialog-PSmHhGOE.js";import{u as jt,e as Ct}from"./use-connection-Dlr-wAwU.js";import{u as vt}from"./constants-3MhIA0pZ.js";import{s as bt}from"./Plus-kcfCg7FH.js";import{V as yt}from"./layout-DemCWqB_.js";function Nt(n,e){const s=n.properties||{};for(const i in s){const l=s[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const r=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of r)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function wt(n){const e=Ae.c(25),{item:s,schema:r,actions:i}=n;let l;e[0]!==s||e[1]!==r?(l=Nt(r,s),e[0]=s,e[1]=r,e[2]=l):l=e[2];const u=l,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let j;e[3]!==i?(j=i&&Object.keys(i).length>0,e[3]=i,e[4]=j):j=e[4];const o=j;let m;e[5]!==u||e[6]!==s.title?(m=t.jsx(ke,{icon:u,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=u,e[6]=s.title,e[7]=m):m=e[7];let f;e[8]!==s.title?(f=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=f):f=e[9];const d=p||"No description";let c;e[10]!==d?(c=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:d}),e[10]=d,e[11]=c):c=e[11];let C;e[12]!==f||e[13]!==c?(C=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[f,c]}),e[12]=f,e[13]=c,e[14]=C):C=e[14];let y;e[15]!==m||e[16]!==C?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,C]}),e[15]=m,e[16]=C,e[17]=y):y=e[17];let a;e[18]!==i||e[19]!==o||e[20]!==s?(a=o&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:At,onMouseDown:_t,children:t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Dt,children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:St,children:[i.open&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.open?.(s)},children:[t.jsx(Ge,{size:16}),"Open"]}),i.edit&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.edit?.(s)},children:[t.jsx(Ve,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.duplicate?.(s)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(k,{variant:"destructive",onClick:h=>{h.stopPropagation(),i.delete?.(s)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=o,e[20]=s,e[21]=a):a=e[21];let S;return e[22]!==y||e[23]!==a?(S=t.jsxs(rt,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,a]}),e[22]=y,e[23]=a,e[24]=S):S=e[24],S}function St(n){return n.stopPropagation()}function Dt(n){return n.stopPropagation()}function _t(n){return n.stopPropagation()}function At(n){return n.stopPropagation()}const It=["icon","avatar","logo"],Me=["created_at","created_by","id"];function Pt(n){return Object.keys(n).find(e=>It.includes(e.toLowerCase()))}function We(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Tt(n){const e=Ae.c(32),{data:s,schema:r,viewMode:i,onViewModeChange:l,search:u,sortKey:p,sortDirection:j,onSort:o,actions:m,onItemClick:f,headerActions:d,emptyState:c,readOnly:C,columns:y,hideToolbar:a,sortableFields:S}=n,h=l===void 0?Mt:l,x=j===void 0?"asc":j,P=o===void 0?Et:o;let v;e[0]!==m?(v=m===void 0?{}:m,e[0]=m,e[1]=v):v=e[1];const D=v,_=f===void 0?zt:f,z=d===void 0?null:d,b=c===void 0?null:c,T=C===void 0?!1:C,N=y===void 0?void 0:y,F=a===void 0?!1:a,w=S===void 0?void 0:S;let E;e[2]!==N||e[3]!==r||e[4]!==w?(E=N?N.filter(Ot).filter(M=>!w||w.includes(M.id)).map($t):We(r,w),e[2]=N,e[3]=r,e[4]=w,e[5]=E):E=e[5];const $=E;let A;e[6]!==z||e[7]!==F||e[8]!==P||e[9]!==h||e[10]!==x||e[11]!==p||e[12]!==$||e[13]!==i?(A=!F&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:z}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Fe,{viewMode:i,onViewModeChange:h,sortKey:p,sortDirection:x,onSort:P,sortOptions:$})})]})}),e[6]=z,e[7]=F,e[8]=P,e[9]=h,e[10]=x,e[11]=p,e[12]=$,e[13]=i,e[14]=A):A=e[14];let O;e[15]!==D||e[16]!==N||e[17]!==s||e[18]!==b||e[19]!==_||e[20]!==P||e[21]!==T||e[22]!==r||e[23]!==u||e[24]!==x||e[25]!==p||e[26]!==w||e[27]!==i?(O=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(M=>t.jsx("div",{onClick:()=>_?.(M),className:"cursor-pointer h-full",children:t.jsx(wt,{item:M,schema:r,readOnly:T,actions:D})},M.id))})}):t.jsx(ot,{columns:Kt(N,r,w,D),data:s,sortKey:p,sortDirection:x,onSort:P,onRowClick:_,emptyState:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}),e[15]=D,e[16]=N,e[17]=s,e[18]=b,e[19]=_,e[20]=P,e[21]=T,e[22]=r,e[23]=u,e[24]=x,e[25]=p,e[26]=w,e[27]=i,e[28]=O):O=e[28];let I;return e[29]!==A||e[30]!==O?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[A,O]}),e[29]=A,e[30]=O,e[31]=I):I=e[31],I}function $t(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function Ot(n){return n.sortable!==!1}function zt(){}function Et(){}function Mt(){}function Ft(n){return{id:"actions",header:"",render:e=>t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Ge,{size:16}),"Open"]}),n.edit&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Ve,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(k,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function He(n){const e=n.type;return Array.isArray(e)?e.every(s=>He({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function kt(n,e){const s=n.properties||{},r=Object.keys(s).filter(o=>{const m=s[o];return m&&He(m)}),i=Pt(s),l=[],u=new Set;i&&r.includes(i)&&(l.push(i),u.add(i));const p=["title","description","updated_at","updated_by"];for(const o of p)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));const j=r.filter(o=>!u.has(o)&&!Me.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of j)l.push(o),u.add(o);for(const o of Me)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));return l.map(o=>{const m=s[o],f=e?e.includes(o):!["id"].includes(o);return o===i?{id:o,header:"",render:d=>{const c=d[o];return t.jsx(ke,{icon:c,name:d.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(c)})},sortable:f,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx(lt,{id:String(c),size:"xs"}):"—"},sortable:f,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx("span",{className:"block truncate max-w-full",children:new Date(c).toLocaleDateString()}):"—"},sortable:f,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(c)})},sortable:f,cellClassName:"max-w-[200px]"}})}function Kt(n,e,s,r){const i=n||kt(e,s);return i.some(p=>p.id==="actions")?i:Object.keys(r).length>0?[...i,Ft(r)]:i}function cs(n){const e=Ae.c(113),{connectionId:s,org:r,activeCollection:i}=n,l=i.name,u=i.schema??ct,p=i.hasCreateTool,j=i.hasUpdateTool,o=i.hasDeleteTool,m=Ye(),{data:f}=Ze.useSession(),d=f?.user?.id||"unknown",{org:c}=et();let C;e[0]!==s||e[1]!==c.id?(C={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=C):C=e[2];const y=vt(C),a=jt(s,l,y),S=`${s}-${l}`;let h;e[3]!==r||e[4]!==S?(h={namespace:r,resource:S,defaultSortKey:"updated_at"},e[3]=r,e[4]=S,e[5]=h):h=e[5];const{search:x,searchTerm:P,setSearch:v,viewMode:D,setViewMode:_,sortKey:z,sortDirection:b,handleSort:T}=at(h);let N;e[6]!==P||e[7]!==b||e[8]!==z?(N={searchTerm:P,sortKey:z,sortDirection:b},e[6]=P,e[7]=b,e[8]=z,e[9]=N):N=e[9];const F=Ct(s,l,y,N),w=!p&&!j&&!o;let E;e[10]!==l||e[11]!==s||e[12]!==m||e[13]!==r?(E=g=>{m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:g.id}})},e[10]=l,e[11]=s,e[12]=m,e[13]=r,e[14]=E):E=e[14];const $=E;let A;e[15]!==a.create||e[16]!==d?(A=async g=>{const me=new Date().toISOString();await a.create.mutateAsync({...g,id:Oe("conn"),title:`${g.title} (Copy)`,created_at:me,updated_at:me,created_by:d,updated_by:d})},e[15]=a.create,e[16]=d,e[17]=A):A=e[17];const O=A,[I,M]=tt.useState(null);let oe;e[18]===Symbol.for("react.memo_cache_sentinel")?(oe=g=>{M(g)},e[18]=oe):oe=e[18];const qe=oe;let K;e[19]!==$||e[20]!==j?(K=j&&{edit:$},e[19]=$,e[20]=j,e[21]=K):K=e[21];let U;e[22]!==O||e[23]!==p?(U=p&&{duplicate:O},e[22]=O,e[23]=p,e[24]=U):U=e[24];let L;e[25]!==o?(L=o&&{delete:qe},e[25]=o,e[26]=L):L=e[26];let ie;e[27]!==L||e[28]!==K||e[29]!==U?(ie={...K,...U,...L},e[27]=L,e[28]=K,e[29]=U,e[30]=ie):ie=e[30];const ue=ie;let ne;e[31]!==a.delete||e[32]!==I?(ne=async()=>{I&&(await a.delete.mutateAsync(I.id),M(null))},e[31]=a.delete,e[32]=I,e[33]=ne):ne=e[33];const fe=ne;let re;e[34]!==a.create||e[35]!==l||e[36]!==s||e[37]!==p||e[38]!==m||e[39]!==r||e[40]!==d?(re=async()=>{if(!p){st.error("Create operation is not available for this collection");return}const g=new Date().toISOString(),me={id:Oe("conn"),title:"New Item",description:"A brief description of the item",created_at:g,updated_at:g,created_by:d,updated_by:d};try{const _e=await a.create.mutateAsync(me);m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:_e.id}})}catch(_e){console.error("Failed to create item:",_e)}},e[34]=a.create,e[35]=l,e[36]=s,e[37]=p,e[38]=m,e[39]=r,e[40]=d,e[41]=re):re=e[41];const he=re;let le;e[42]!==u?(le=We(u),e[42]=u,e[43]=le):le=e[43];const xe=le,Pe=(F?.length??0)>0,Qe=p&&Pe,Xe=p&&!Pe&&!x;let ae;e[44]!==a.create||e[45]!==he||e[46]!==p?(ae=p?t.jsxs(Ie,{onClick:he,size:"sm",disabled:a.create.isPending,className:"h-7",children:[t.jsx(bt,{className:"mr-2 h-4 w-4"}),a.create.isPending?"Creating...":"Create"]}):null,e[44]=a.create,e[45]=he,e[46]=p,e[47]=ae):ae=e[47];const Te=ae,ge=z;let B;e[48]!==T||e[49]!==_||e[50]!==b||e[51]!==xe||e[52]!==ge||e[53]!==D?(B=t.jsx(Fe,{viewMode:D,onViewModeChange:_,sortKey:ge,sortDirection:b,onSort:T,sortOptions:xe}),e[48]=T,e[49]=_,e[50]=b,e[51]=xe,e[52]=ge,e[53]=D,e[54]=B):B=e[54];const je=Qe&&Te;let R;e[55]!==B||e[56]!==je?(R=t.jsxs(yt,{children:[B,je]}),e[55]=B,e[56]=je,e[57]=R):R=e[57];const Ce=`Search ${l}...`;let V;e[58]!==v?(V=g=>{g.key==="Escape"&&(v(""),g.target.blur())},e[58]=v,e[59]=V):V=e[59];let G;e[60]!==x||e[61]!==v||e[62]!==Ce||e[63]!==V?(G=t.jsx(it,{value:x,onChange:v,placeholder:Ce,onKeyDown:V}),e[60]=x,e[61]=v,e[62]=Ce,e[63]=V,e[64]=G):G=e[64];let J;e[65]!==F?(J=F??[],e[65]=F,e[66]=J):J=e[66];const ve=z;let W;e[67]!==$?(W=g=>$(g),e[67]=$,e[68]=W):W=e[68];const be="No items found",ye=x?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ne=Xe?Te:void 0;let H;e[69]!==be||e[70]!==ye||e[71]!==Ne?(H=t.jsx(nt,{image:null,title:be,description:ye,actions:Ne}),e[69]=be,e[70]=ye,e[71]=Ne,e[72]=H):H=e[72];let q;e[73]!==T||e[74]!==w||e[75]!==ue||e[76]!==u||e[77]!==x||e[78]!==v||e[79]!==_||e[80]!==b||e[81]!==J||e[82]!==ve||e[83]!==W||e[84]!==H||e[85]!==D?(q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Tt,{hideToolbar:!0,data:J,schema:u,viewMode:D,onViewModeChange:_,search:x,onSearchChange:v,sortKey:ve,sortDirection:b,onSort:T,actions:ue,onItemClick:W,readOnly:w,emptyState:H})}),e[73]=T,e[74]=w,e[75]=ue,e[76]=u,e[77]=x,e[78]=v,e[79]=_,e[80]=b,e[81]=J,e[82]=ve,e[83]=W,e[84]=H,e[85]=D,e[86]=q):q=e[86];let Q;e[87]!==G||e[88]!==q?(Q=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[G,q]}),e[87]=G,e[88]=q,e[89]=Q):Q=e[89];const we=!!I;let ce;e[90]===Symbol.for("react.memo_cache_sentinel")?(ce=g=>{g||M(null)},e[90]=ce):ce=e[90];let de;e[91]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(mt,{children:"Delete item?"}),e[91]=de):de=e[91];const Se=I?.title;let X;e[92]!==Se?(X=t.jsxs(ut,{children:[de,t.jsxs(ft,{children:['Are you sure you want to delete "',Se,'"? This action cannot be undone.']})]}),e[92]=Se,e[93]=X):X=e[93];let Y;e[94]!==a.delete.isPending?(Y=t.jsx(dt,{disabled:a.delete.isPending,children:"Cancel"}),e[94]=a.delete.isPending,e[95]=Y):Y=e[95];const De=a.delete.isPending?"Deleting...":"Delete";let Z;e[96]!==a.delete.isPending||e[97]!==fe||e[98]!==De?(Z=t.jsx(pt,{onClick:fe,disabled:a.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:De}),e[96]=a.delete.isPending,e[97]=fe,e[98]=De,e[99]=Z):Z=e[99];let ee;e[100]!==Y||e[101]!==Z?(ee=t.jsxs(ht,{children:[Y,Z]}),e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let te;e[103]!==X||e[104]!==ee?(te=t.jsxs(xt,{children:[X,ee]}),e[103]=X,e[104]=ee,e[105]=te):te=e[105];let se;e[106]!==we||e[107]!==te?(se=t.jsx(gt,{open:we,onOpenChange:ce,children:te}),e[106]=we,e[107]=te,e[108]=se):se=e[108];let pe;return e[109]!==R||e[110]!==Q||e[111]!==se?(pe=t.jsxs(t.Fragment,{children:[R,Q,se]}),e[109]=R,e[110]=Q,e[111]=se,e[112]=pe):pe=e[112],pe}export{cs as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as I,c as P,v as y,j as s,B as oe}from"./index-3zbyfLqi.js";import{c as ne,a as ie,D as le,b as re}from"./dropdown-menu-DW1GDWfN.js";import{n as Y}from"./ArrowDown-BVK-2NZv.js";import{i as Z}from"./ArrowUp-N8lcMBug.js";import{i as ae}from"./Check-Cjs4C9GE.js";import{c as ce}from"./Grid01-DRBx9FRw.js";import{i as de}from"./List-BzhQuBp2.js";import{c as ue,T as fe,a as me,b as xe}from"./tooltip-CzsT_Xmu.js";import{T as pe,a as he,b as X,c as ge,d as be,e as ve}from"./table-Dr33PlEJ.js";const ee=({size:C=24,color:e="currentColor",...o})=>I.createElement("svg",{viewBox:"0 0 24 24",width:C,height:C,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},I.createElement("path",{d:"M5 21v-7m0-4V3m7 18v-9m0-4V3m7 18v-5m0-4V3M2 14h6m1-6h6m1 8h6"}));ee.displayName="Sliders01";const je={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function we(C){const e=P.c(66),{value:o,onValueChange:a,options:t,size:f,fullWidth:d,className:r}=C,m=f===void 0?"sm":f,c=d===void 0?!1:d,b=I.useRef(null),u=I.useRef(null);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={left:0,width:0,opacity:0},e[0]=l):l=e[0];const[i,h]=I.useState(l);let x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x=K=>{if(!K.current)return;const{offsetLeft:te,offsetWidth:se}=K.current;h({left:te,width:se,opacity:1})},e[1]=x):x=e[1];const j=x;let v;e[2]!==t[0].value||e[3]!==o?(v=()=>{const K=o===t[0].value?b:u;j(K)},e[2]=t[0].value,e[3]=o,e[4]=v):v=e[4];let p;e[5]!==t||e[6]!==o?(p=[o,t],e[5]=t,e[6]=o,e[7]=p):p=e[7],I.useEffect(v,p);const n=je[m];let g;e[8]!==r?(g=y("relative flex gap-0 bg-muted rounded-lg",r),e[8]=r,e[9]=g):g=e[9];let w;e[10]!==a||e[11]!==t[0].value?(w=()=>a(t[0].value),e[10]=a,e[11]=t[0].value,e[12]=w):w=e[12];const N=c?"flex-1 h-12 px-4":n.button,O=!c&&t[0].label?"px-3":"";let z;e[13]!==O||e[14]!==N?(z=y("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",N,O),e[13]=O,e[14]=N,e[15]=z):z=e[15];const A=o===t[0].value?"text-foreground":"text-muted-foreground";let k;e[16]!==n.icon||e[17]!==A?(k=y("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",n.icon,A),e[16]=n.icon,e[17]=A,e[18]=k):k=e[18];let S;e[19]!==t[0].icon||e[20]!==k?(S=s.jsx("span",{className:k,children:t[0].icon}),e[19]=t[0].icon,e[20]=k,e[21]=S):S=e[21];let T;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(T=t[0].label&&s.jsx("span",{className:y("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=T):T=e[25];let D;e[26]!==z||e[27]!==S||e[28]!==T||e[29]!==w?(D=s.jsxs("button",{ref:b,type:"button",onClick:w,className:z,children:[S,T]}),e[26]=z,e[27]=S,e[28]=T,e[29]=w,e[30]=D):D=e[30];let M;e[31]!==a||e[32]!==t[1].value?(M=()=>a(t[1].value),e[31]=a,e[32]=t[1].value,e[33]=M):M=e[33];const q=c?"flex-1 h-12 px-4":n.button,F=!c&&t[1].label?"px-3":"";let R;e[34]!==q||e[35]!==F?(R=y("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",q,F),e[34]=q,e[35]=F,e[36]=R):R=e[36];const G=o===t[1].value?"text-foreground":"text-muted-foreground";let $;e[37]!==n.icon||e[38]!==G?($=y("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",n.icon,G),e[37]=n.icon,e[38]=G,e[39]=$):$=e[39];let V;e[40]!==t[1].icon||e[41]!==$?(V=s.jsx("span",{className:$,children:t[1].icon}),e[40]=t[1].icon,e[41]=$,e[42]=V):V=e[42];let _;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(_=t[1].label&&s.jsx("span",{className:y("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=_):_=e[46];let L;e[47]!==M||e[48]!==R||e[49]!==V||e[50]!==_?(L=s.jsxs("button",{ref:u,type:"button",onClick:M,className:R,children:[V,_]}),e[47]=M,e[48]=R,e[49]=V,e[50]=_,e[51]=L):L=e[51];const J=c?"h-12":n.button;let E;e[52]!==J?(E=y("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",J),e[52]=J,e[53]=E):E=e[53];const Q=`${i.left}px`,U=`${i.width}px`;let W;e[54]!==i.opacity||e[55]!==Q||e[56]!==U?(W={left:Q,width:U,opacity:i.opacity},e[54]=i.opacity,e[55]=Q,e[56]=U,e[57]=W):W=e[57];let B;e[58]!==E||e[59]!==W?(B=s.jsx("div",{className:E,style:W}),e[58]=E,e[59]=W,e[60]=B):B=e[60];let H;return e[61]!==D||e[62]!==L||e[63]!==B||e[64]!==g?(H=s.jsxs("div",{className:g,children:[D,L,B]}),e[61]=D,e[62]=L,e[63]=B,e[64]=g,e[65]=H):H=e[65],H}function $e(C){const e=P.c(16),{viewMode:o,onViewModeChange:a,sortKey:t,sortDirection:f,onSort:d,sortOptions:r}=C;let m;e[0]!==r?(m=r===void 0?[]:r,e[0]=r,e[1]=m):m=e[1];const c=m;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ue,{children:s.jsxs(fe,{children:[s.jsx(me,{asChild:!0,children:s.jsx(ie,{asChild:!0,children:s.jsx(oe,{variant:"outline",size:"icon",className:"size-7 border border-input",children:s.jsx(ee,{size:16})})})}),s.jsx(xe,{children:"Search filters"})]})}),e[2]=b):b=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={value:"table",icon:s.jsx(de,{})},e[3]=u):u=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=[u,{value:"cards",icon:s.jsx(ce,{})}],e[4]=l):l=e[4];let i;e[5]!==a||e[6]!==o?(i=s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(we,{value:o,onValueChange:a,fullWidth:!0,options:l})}),e[5]=a,e[6]=o,e[7]=i):i=e[7];let h;e[8]!==d||e[9]!==f||e[10]!==t||e[11]!==c?(h=c.length>0&&d&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),c.map(j=>{const v=t===j.id;return s.jsx(ne,{onClick:()=>d(j.id),className:y("h-8 px-2 py-0 cursor-pointer",v&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[v&&s.jsx(ae,{size:16,className:"text-foreground shrink-0"}),!v&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:j.label}),v&&f&&(f==="asc"?s.jsx(Z,{size:16,className:"text-foreground shrink-0"}):s.jsx(Y,{size:16,className:"text-foreground shrink-0"}))]})},j.id)})]}),e[8]=d,e[9]=f,e[10]=t,e[11]=c,e[12]=h):h=e[12];let x;return e[13]!==i||e[14]!==h?(x=s.jsxs(le,{children:[b,s.jsxs(re,{align:"end",className:"w-[200px] p-0 gap-0",children:[i,h]})]}),e[13]=i,e[14]=h,e[15]=x):x=e[15],x}function Ne(C){const e=P.c(29),{columns:o,data:a,sortKey:t,sortDirection:f,onSort:d,onRowClick:r,rowClassName:m}=C;let c;e[0]!==f?(c=function(n,g){return s.jsx("div",{className:"w-4 flex items-center justify-center",children:g&&f&&(f==="asc"?s.jsx(Z,{size:16,className:"text-muted-foreground transition-colors"}):s.jsx(Y,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=f,e[1]=c):c=e[1];const b=c;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=function(n,g){let w="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return n===g-1&&(w="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),w},e[2]=u):u=e[2];const l=u;let i;if(e[3]!==o||e[4]!==d||e[5]!==b||e[6]!==t){let p;e[8]!==o.length||e[9]!==d||e[10]!==b||e[11]!==t?(p=(n,g)=>{const w=t===n.id;return s.jsx(pe,{className:y(l(g,o.length),"group transition-colors select-none",n.sortable&&"hover:bg-accent cursor-pointer",n.rowClassName,n.cellClassName),onClick:n.sortable&&d?()=>d(n.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[n.header,n.sortable&&b(n.id,w)]})},n.id)},e[8]=o.length,e[9]=d,e[10]=b,e[11]=t,e[12]=p):p=e[12],i=o.map(p),e[3]=o,e[4]=d,e[5]=b,e[6]=t,e[7]=i}else i=e[7];let h;e[13]!==i?(h=s.jsx(he,{className:"border-b-0",children:s.jsx(X,{className:"h-9 hover:bg-transparent border-b border-border",children:i})}),e[13]=i,e[14]=h):h=e[14];let x;if(e[15]!==o||e[16]!==a||e[17]!==r||e[18]!==m){let p;e[20]!==o||e[21]!==r||e[22]!==m?(p=(n,g)=>{const w=m?.(n);return s.jsx(X,{"data-row-index":g,className:y("group/data-row transition-colors border-b-0 hover:bg-accent/50",r?"cursor-pointer":"",w),onClick:r?()=>r(n):void 0,children:o.map(N=>s.jsx(ge,{className:y("px-5 py-4 h-16 align-middle text-sm text-foreground",N.cellClassName,N.wrap?"whitespace-normal wrap-break-word":""),children:s.jsx("div",{className:y(N.wrap?"w-full":"min-w-0 w-full",!N.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:N.render?N.render(n):N.accessor?N.accessor(n):null})},N.id))},g)},e[20]=o,e[21]=r,e[22]=m,e[23]=p):p=e[23],x=a.map(p),e[15]=o,e[16]=a,e[17]=r,e[18]=m,e[19]=x}else x=e[19];let j;e[24]!==x?(j=s.jsx(be,{children:x}),e[24]=x,e[25]=j):j=e[25];let v;return e[26]!==h||e[27]!==j?(v=s.jsxs(ve,{className:"w-full border-collapse",children:[h,j]}),e[26]=h,e[27]=j,e[28]=v):v=e[28],v}function Ve(C){const e=P.c(12),{columns:o,data:a,isLoading:t,sortKey:f,sortDirection:d,onSort:r,onRowClick:m,emptyState:c}=C;if(t===void 0?!1:t){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=l):l=e[0],l}if(a.length===0){let l;e[1]!==c?(l=c||s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=c,e[2]=l):l=e[2];let i;return e[3]!==l?(i=s.jsx("div",{className:"flex items-center justify-center h-full",children:l}),e[3]=l,e[4]=i):i=e[4],i}let u;return e[5]!==o||e[6]!==a||e[7]!==m||e[8]!==r||e[9]!==d||e[10]!==f?(u=s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx(Ne,{columns:o,data:a,sortKey:f,sortDirection:d,onSort:r,onRowClick:m})}),e[5]=o,e[6]=a,e[7]=m,e[8]=r,e[9]=d,e[10]=f,e[11]=u):u=e[11],u}export{$e as C,we as V,Ve as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as U,j as t,b as Ne,B as Ue,O as ge,aD as it,u as Be,q as gt,c0 as Qe,aB as jt,p as bt,r as X,o as at,bI as vt,bQ as Nt,s as z,aF as Ge,aG as yt,E as ct,e as _t,a as Ct,n as St,k as wt,l as Tt,i as kt,t as ve,K as Je}from"./index-3zbyfLqi.js";import{E as Z,C as ze}from"./collection-search-FSS_Lkwz.js";import{E as Pt,r as It,e as lt}from"./env-vars-editor-x5YLFI-P.js";import{g as Ke}from"./types-BFBQ7LBo.js";import{S as $t}from"./save-actions-CXaB5WYr.js";import{b as At,a as Vt}from"./use-binding-Cz4OU82g.js";import{u as Mt,S as Dt}from"./index-ZgdunwGI.js";import{f as Ot,g as dt}from"./use-connection-Dlr-wAwU.js";import{u as mt}from"./constants-3MhIA0pZ.js";import{d as Rt}from"./use-mcp-tools-WZlm0cnW.js";import{b as Et}from"./use-mcp-resources-DjDOJ-nS.js";import{a as Lt}from"./decopilot-events-CA9aFPSQ.js";import{a as Ut}from"./mcp-oauth-CPAKRpWT.js";import{b as Ye,c as Ft,d as Bt,e as zt,B as Kt,a as Xt}from"./breadcrumb-Dxn3nF83.js";import{C as qt}from"./collection-tabs-CK4hfCPZ.js";import{i as Oe}from"./Loading01-BSgMOGt8.js";import{V as Xe,a as Ht}from"./layout-DemCWqB_.js";import{C as Wt}from"./collection-tab-FKeWJS1r.js";import{I as Qt}from"./icon-picker-DPVWLIZ3.js";import{I as Re}from"./integration-icon-_0Y5dukY.js";import{B as Fe}from"./badge-DSAomO1_.js";import{D as Gt,a as Jt,b as Yt,c as Ze}from"./dropdown-menu-DW1GDWfN.js";import{F as H,a as Zt,b as W,d as K,f as Q,c as Y,e as es}from"./form-7Q-FsNtX.js";import{I as G}from"./input-DVv1wKLp.js";import{S as et,a as tt,b as st,c as nt,d as q}from"./select-DaTaxi5W.js";import{i as ut}from"./CheckCircle-KfoOm4QY.js";import{t as ts}from"./ChevronDown-jKZz68gN.js";import{n as ss}from"./Container-BADgIox6.js";import{s as De}from"./Globe02-D-yCMf5N.js";import{s as ns}from"./RefreshCcw01-DiAOUquJ.js";import{i as os}from"./Terminal-BxQK5nsd.js";import{s as rs}from"./Trash01-Dhrt1Goe.js";import{t as qe}from"./Users03-DHATZiFL.js";import{s as is}from"./XClose-DcdK3w1e.js";import{U as as}from"./user-vKqDbtP6.js";import{b as cs,a as ls}from"./use-virtual-mcp-BjGr5L6n.js";import{i as ds}from"./ChevronRight-O5hZNhHU.js";import{s as ms}from"./Plus-kcfCg7FH.js";import{f as us}from"./formatDistanceToNow-Cb2QZZJn.js";import{a as pt,C as ft}from"./collection-table-wrapper-C3jcR2VW.js";import{C as He}from"./card-CRGkE-QK.js";import{R as ps}from"./readme-viewer-BvJA0DXw.js";import{T as fs,a as xs}from"./tools-list-DLfR0anP.js";import{M as hs}from"./mcp-app-renderer-MJ3LmhBP.js";import"./SearchMd-DyDznS8C.js";import"./Save01-CgyWcG00.js";import"./binder-8_Oel13A.js";import"./File06-B3E-bjor.js";import"./Key01-CyP1-GBg.js";import"./constants-Csevqii0.js";import"./registry-utils-Cx5oa6Ne.js";import"./extract-connection-data-D40JrSD8.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-C_roXw8y.js";import"./index-D7M37zt-.js";import"./circle-alert-DcuI5GGM.js";import"./index-CsXxowFD.js";import"./index-DqzqEzLf.js";import"./index-CW624IAb.js";import"./collapsible-D2Mpu85K.js";import"./use-llm-B6AzV9Iw.js";import"./useQuery-DWLTdDjg.js";import"./localstorage-keys-D2dx16dH.js";import"./useMutation-CqJLXgOK.js";import"./tabs-t9dEapgX.js";import"./checkbox-Dj6Qb3KC.js";import"./Check-Cjs4C9GE.js";import"./dialog-CPWJMuHX.js";import"./X-BpJJDPzv.js";import"./skeleton-C9OYLAME.js";import"./AlignLeft-y_Ps49tB.js";import"./ArrowLeft-BNX_fMaj.js";import"./Image01-Dg_KnZBd.js";import"./Settings01-B90Jx8ZC.js";import"./useSuspenseInfiniteQuery-YGfVGowO.js";import"./infiniteQueryObserver-DkOiuhUg.js";import"./popover-7xIJyxqf.js";import"./spinner-RGw-eBKN.js";import"./tooltip-CzsT_Xmu.js";import"./index-DziKeC8s.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-N8lcMBug.js";import"./Edit01-kvm_TgXf.js";import"./XCircle-D52fnGO6.js";import"./AlertCircle-C0eftc-S.js";import"./use-copy-C0vtJ5Ye.js";import"./Code01-DVgdcTZ1.js";import"./use-create-virtual-mcp-CsNENE7l.js";import"./Copy01-CwZDv92A.js";import"./marked.esm-BaswSlok.js";import"./markdown-89WWPNXO.js";import"./Eye-BCmEvczH.js";import"./LayersTwo01-rKs-Uww3.js";import"./index-DZgOYNf-.js";import"./Clock-CZrEpwOM.js";import"./DotsVertical-B7FmF1Xu.js";import"./empty-state-boxcABsi.js";import"./Inbox01-nkL2-2Zq.js";import"./use-list-state-DUq5hUJc.js";import"./use-view-mode-BadETRuZ.js";import"./use-mobile-CzcHKmhL.js";import"./alert-dialog-PSmHhGOE.js";import"./scroll-area-DoXCMB9j.js";import"./Edit05-D4Vt7tOt.js";import"./Link01-D-1AbdDy.js";import"./label-CfzCa7Vm.js";import"./avatar-VPsqzp0K.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowDown-BVK-2NZv.js";import"./Grid01-DRBx9FRw.js";import"./List-BzhQuBp2.js";import"./table-Dr33PlEJ.js";function gs(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(qe,{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(ds,{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=ls();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(ms,{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(qe,{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 js(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=cs(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(gs,{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 bs({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}=jt(),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?bt(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(qe,{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(H,{control:s.control,name:"ui_type",render:({field:r})=>t.jsxs(W,{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(q,{value:"HTTP",children:"HTTP"}),t.jsx(q,{value:"SSE",children:"SSE"}),t.jsx(q,{value:"Websocket",children:"Websocket"}),m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:"NPX Package"}),t.jsx(q,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(H,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(W,{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(q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(De,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(De,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(q,{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(q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ss,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(os,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(Q,{})]})}),a==="NPX"&&t.jsx(H,{control:s.control,name:"npx_package",render:({field:r})=>t.jsxs(W,{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(H,{control:s.control,name:"stdio_command",render:({field:r})=>t.jsxs(W,{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(H,{control:s.control,name:"stdio_args",render:({field:r})=>t.jsxs(W,{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(H,{control:s.control,name:"stdio_cwd",render:({field:r})=>t.jsxs(W,{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(H,{control:s.control,name:"env_vars",render:({field:r})=>t.jsxs(W,{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(Pt,{value:r.value??[],onChange:r.onChange})}),t.jsx(Q,{})]})}),a!=="NPX"&&a!=="STDIO"&&t.jsx(H,{control:s.control,name:"connection_token",render:({field:r})=>t.jsxs(W,{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(Gt,{children:[t.jsx(Jt,{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(ts,{size:12})]})})}),t.jsxs(Yt,{align:"start",children:[t.jsxs(Ze,{onClick:o,children:[t.jsx(ns,{size:16}),"Re-authenticate"]}),t.jsxs(Ze,{variant:"destructive",onClick:i,children:[t.jsx(rs,{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(is,{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(es,{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 vs(s){const e=U.c(45),{form:n,connection:o,isMCPAuthenticated:i,hasOAuthToken:a,onReauthenticate:l,onRemoveOAuth:j}=s,{org:f}=Be();let m;e[0]!==o.app_name||e[1]!==o.icon||e[2]!==o.title||e[3]!==n.control?(m=o.app_name&&o.icon?t.jsx(Re,{icon:o.icon,name:o.title,size:"lg",className:"shadow-sm"}):t.jsx(gt,{control:n.control,name:"icon",render:k=>{const{field:I}=k;return t.jsx(Qt,{value:I.value,onChange:I.onChange,name:o.title,size:"lg",className:"shadow-sm"})}}),e[0]=o.app_name,e[1]=o.icon,e[2]=o.title,e[3]=n.control,e[4]=m):m=e[4];let x;e[5]!==n.control?(x=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(H,{control:n.control,name:"title",render:ys}),t.jsx(H,{control:n.control,name:"description",render:Ns})]}),e[5]=n.control,e[6]=x):x=e[6];let c;e[7]!==m||e[8]!==x?(c=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[m,x]}),e[7]=m,e[8]=x,e[9]=c):c=e[9];let r;e[10]!==o||e[11]!==n||e[12]!==a||e[13]!==l||e[14]!==j?(r=t.jsx(bs,{form:n,connection:o,hasOAuthToken:a,onReauthenticate:l,onRemoveOAuth:j}),e[10]=o,e[11]=n,e[12]=a,e[13]=l,e[14]=j,e[15]=r):r=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Status"}),e[16]=h):h=e[16];let d;e[17]!==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[17]=i,e[18]=d):d=e[18];let u;e[19]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Created by"}),e[19]=u):u=e[19];let b;e[20]!==o.created_by?(b=t.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[u,t.jsx(as,{id:o.created_by,size:"2xs"})]}),e[20]=o.created_by,e[21]=b):b=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Updated"}),e[22]=v):v=e[22];let _;e[23]!==o.updated_at?(_=o.updated_at?us(new Date(o.updated_at),{addSuffix:!0}):"Unknown",e[23]=o.updated_at,e[24]=_):_=e[24];let S;e[25]!==_?(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[25]=_,e[26]=S):S=e[26];let p;e[27]!==S||e[28]!==d||e[29]!==b?(p=t.jsxs("div",{className:"flex flex-col gap-2 p-5 border-b border-border",children:[d,b,S]}),e[27]=S,e[28]=d,e[29]=b,e[30]=p):p=e[30];let C;e[31]!==o.description||e[32]!==o.icon||e[33]!==o.id||e[34]!==o.title||e[35]!==f.slug?(C=t.jsx(js,{connectionId:o.id,connectionTitle:o.title,connectionDescription:o.description,connectionIcon:o.icon,org:f.slug}),e[31]=o.description,e[32]=o.icon,e[33]=o.id,e[34]=o.title,e[35]=f.slug,e[36]=C):C=e[36];let w;e[37]!==p||e[38]!==C||e[39]!==c||e[40]!==r?(w=t.jsxs("div",{className:"flex flex-col h-full overflow-auto",children:[c,r,p,C]}),e[37]=p,e[38]=C,e[39]=c,e[40]=r,e[41]=w):w=e[41];let g;return e[42]!==n||e[43]!==w?(g=t.jsx(Zt,{...n,children:w}),e[42]=n,e[43]=w,e[44]=g):g=e[44],g}function Ns(s){const{field:e}=s;return t.jsxs(W,{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 ys(s){const{field:e}=s;return t.jsxs(W,{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 _s(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?(_(ks),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 k=g;let I;e[13]===Symbol.for("react.memo_cache_sentinel")?(I=[{id:"name",header:"Name",render:Ts,sortable:!0},{id:"description",header:"Description",render:ws,cellClassName:"flex-1",sortable:!0}],e[13]=I):I=e[13];const V=I;let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=V.filter(Ss).map(Cs),e[14]=M):M=e[14];const L=M;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 D;e[22]!==c?(D=t.jsx(ze,{value:c,onChange:r,placeholder:"Search prompts...",onKeyDown:R}),e[22]=c,e[23]=D):D=e[23];let N;e[24]!==m||e[25]!==w||e[26]!==p||e[27]!==c||e[28]!==v||e[29]!==u||e[30]!==k||e[31]!==h?(N=h==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:k.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:k.map(T=>t.jsx(He,{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:V,data:k,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]=k,e[31]=h,e[32]=N):N=e[32];let A;e[33]!==D||e[34]!==N?(A=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[D,N]}),e[33]=D,e[34]=N,e[35]=A):A=e[35];let $;return e[36]!==A||e[37]!==y?($=t.jsxs(t.Fragment,{children:[y,A]}),e[36]=A,e[37]=y,e[38]=$):$=e[38],$}function Cs(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function Ss(s){return s.sortable}function ws(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function Ts(s){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:s.name})}function ks(s){return s==="asc"?"desc":s==="desc"?null:"asc"}function Ps(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(_s,{prompts:n,connectionId:o,org:i}),e[0]=o,e[1]=i,e[2]=n,e[3]=a):a=e[3],a}function Is(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(ps,{repository:n})}),e[0]=n,e[1]=o):o=e[1],o}function $s(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(Es),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 A=f.toLowerCase();return n.filter($=>$.uri.toLowerCase().includes(A)||$.name&&$.name.toLowerCase().includes(A)||$.description&&$.description.toLowerCase().includes(A))})():n;p=!r||!d?N:[...N].sort((A,$)=>{const T=A[r]||"",F=$[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:Rs,sortable:!0},{id:"uri",header:"URI",render:Os,sortable:!0},{id:"description",header:"Description",render:Ds,cellClassName:"flex-1",sortable:!0},{id:"mimeType",header:"Type",render:Ms,sortable:!0}],e[10]=w):w=e[10];const g=w;let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=g.filter(Vs).map(As),e[11]=k):k=e[11];const I=k;let V;e[12]!==v||e[13]!==l||e[14]!==d||e[15]!==r||e[16]!==x?(V=l&&t.jsx(Xe,{children:t.jsx(ft,{viewMode:x,onViewModeChange:c,sortKey:r,sortDirection:d,onSort:v,sortOptions:I})}),e[12]=v,e[13]=l,e[14]=d,e[15]=r,e[16]=x,e[17]=V):V=e[17];let M;e[18]===Symbol.for("react.memo_cache_sentinel")?(M=N=>{N.key==="Escape"&&(m(""),N.target.blur())},e[18]=M):M=e[18];let L;e[19]!==f?(L=t.jsx(ze,{value:f,onChange:m,placeholder:"Search resources...",onKeyDown:M}),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(He,{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 D;return e[33]!==R||e[34]!==V?(D=t.jsxs(t.Fragment,{children:[V,R]}),e[33]=R,e[34]=V,e[35]=D):D=e[35],D}function As(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function Vs(s){return s.sortable}function Ms(s){return t.jsx("span",{className:"text-sm text-muted-foreground",children:s.mimeType||"—"})}function Ds(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function Os(s){return t.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:s.uri})}function Rs(s){return t.jsx("span",{className:"text-sm font-medium text-foreground",children:s.name||s.uri})}function Es(s){return s==="asc"?"desc":s==="desc"?null:"asc"}function Ls(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($s,{resources:n,connectionId:o,org:i}),e[0]=o,e[1]=i,e[2]=n,e[3]=a):a=e[3],a}const Us=at({key:z().min(1,"Key is required"),value:z()}),Fs=at({title:z().min(1,"Name is required"),description:z().nullable().optional(),icon:z().nullable().optional(),ui_type:yt(["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(Us).optional(),configuration_scopes:Ge(z()).nullable().optional(),configuration_state:vt(z(),Nt()).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 Bs(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(fs,{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 zs(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(Ks),_=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 k=Ke(g._meta);return t.jsxs(He,{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(hs,{resourceURI:k,toolInfo:{tool:g},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(xs,{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 Ks(s){return!!Ke(s._meta)}function Xs(s){return s.command==="npx"}function qs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Hs(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function Ws(s,e){const n={command:"npx",args:["-y",s]},o=lt(e);return Object.keys(o).length>0&&(n.envVars=o),n}function Qs(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??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&kt(s.connection_headers)){const o=s.connection_headers,i=It(o.envVars);if(Xs(o)){const l=qs(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=Hs(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 Gs(s){let e,n=null,o=null,i=null;return s.ui_type==="NPX"?(e="STDIO",n="",i=Ws(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",i=Qs(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,icon:s.icon??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 Js(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=St(),b=dt();let v;e[1]!==o?(v={connectionId:o},e[1]=o,e[2]=v):v=e[2];const _=Mt(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=Vt(C).length>0,k=n?.metadata?.repository,I=!!k?.url;let V;e[5]===Symbol.for("react.memo_cache_sentinel")?(V=wt(Fs),e[5]=V):V=e[5];let M;e[6]!==n?(M=rt(n),e[6]=n,e[7]=M):M=e[7];let L;e[8]!==M?(L={resolver:V,values:M},e[8]=M,e[9]=L):L=e[9];const y=Tt(L),R=y.formState.isDirty;let D;e[10]!==y||e[11]!==j?(D=async()=>{if(!await y.trigger())return;const E=y.getValues(),he=Gs(E);await j(he),y.reset(E)},e[10]=y,e[11]=j,e[12]=D):D=e[12];const N=D;let A;e[13]!==n||e[14]!==y?(A=()=>{y.reset(rt(n))},e[13]=n,e[14]=y,e[15]=A):A=e[15];const $=A;let T;e[16]!==n.id||e[17]!==b||e[18]!==u?(T=async()=>{const{token:P,tokenInfo:E,error:he}=await Ut({connectionId:n.id});if(he||!P){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:P}});else try{await b.update.mutateAsync({id:n.id,data:{}})}catch(We){console.warn("Failed to refresh connection tools after OAuth:",We)}}catch(Me){console.error("Error saving OAuth token:",Me),await b.update.mutateAsync({id:n.id,data:{connection_token:P}})}else await b.update.mutateAsync({id:n.id,data:{connection_token:P}});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 P=await fetch(`/api/connections/${n.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!P.ok){const he=await P.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(P){console.error("Error removing OAuth token:",P),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(en),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]!==I||e[42]!==p||e[43]!==te||e[44]!==se||e[45]!==ne||e[46]!==oe){let P;e[48]!==I?(P=I?[{id:"readme",label:"README"}]:[],e[48]=I,e[49]=P):P=e[49],we=[Se,...te,...se,...ne,...oe,...p?(l||[]).map(Zs):[],...P],e[40]=l,e[41]=I,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(Ys)?"tools":"settings",O=be.some(P=>P.id===a)?a:xt;let Te;e[50]!==d?(Te=P=>{d({search:E=>({...E,tab:P}),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 P;e[57]!==O?(P=E=>E.name===O,e[57]=O,e[58]=P):P=e[58],ke=ie.find(P),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(Bt,{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(zt,{}),e[61]=Ie):Ie=e[61];let ce;e[62]!==n.title?(ce=t.jsx(Ye,{children:t.jsx(Ft,{children:n.title})}),e[62]=n.title,e[63]=ce):ce=e[63];let $e;e[64]!==ae||e[65]!==ce?($e=t.jsx(Kt,{children:t.jsxs(Xt,{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]!==$||e[69]!==R||e[70]!==f?(le=t.jsx(Xe,{children:t.jsx($t,{onSave:N,onUndo:$,isDirty:R,isSaving:f})}),e[67]=N,e[68]=$,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(vs,{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(qt,{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]!==I||e[95]!==r||e[96]!==p||e[97]!==i||e[98]!==m||e[99]!==k||e[100]!==x||e[101]!==c?(ue=t.jsx(X.Suspense,{fallback:Ae,children:O==="tools"?t.jsx(Bs,{tools:c,connectionId:o,org:i,isLoading:r}):O==="ui"?t.jsx(zs,{tools:c,connectionId:o,org:i}):O==="prompts"?t.jsx(Ps,{prompts:m,connectionId:o,org:i}):O==="resources"?t.jsx(Ls,{resources:x,connectionId:o,org:i}):O==="settings"?t.jsx(Dt,{connection:n,form:y,hasMcpBinding:g,isMCPAuthenticated:p,supportsOAuth:_.supportsOAuth,isServerError:_.isServerError,onAuthenticate:F,onViewReadme:I?()=>re("readme"):void 0}):O==="readme"&&I?t.jsx(Is,{repository:k}):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]=I,e[95]=r,e[96]=p,e[97]=i,e[98]=m,e[99]=k,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 Ys(s){return s.id==="tools"}function Zs(s){return{id:s.name,label:s.displayName}}function en(s){return!!Ke(s._meta)}function tn(){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}=_t(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=Ct(j).tab??"",x=Ot(i),c=dt(),r=At(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}=Lt(u);let v;s[8]!==d?(v={client:d},s[8]=d,s[9]=v):v=s[9];const{data:_}=Et(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}=Rt(p);let g;s[13]!==b?.prompts?(g=b?.prompts??[],s[13]=b?.prompts,s[14]=g):g=s[14];let k;s[15]!==g?(k=g.map(on),s[15]=g,s[16]=k):k=s[16];const I=k;let V;s[17]!==_?.resources?(V=_?.resources??[],s[17]=_?.resources,s[18]=V):V=s[18];let M;s[19]!==V?(M=V.map(nn),s[19]=V,s[20]=M):M=s[20];const L=M;let y;s[21]!==x?.tools||s[22]!==S||s[23]!==C?.tools?(y=S?(C?.tools??[]).map(sn):x?.tools??[],s[21]=x?.tools,s[22]=S,s[23]=C?.tools,s[24]=y):y=s[24];const R=y;let D;s[25]!==c.update||s[26]!==i?(D=async $=>{await c.update.mutateAsync({id:i,data:$})},s[25]=c.update,s[26]=i,s[27]=D):D=s[27];const N=D;if(!x){let $;return s[28]!==n||s[29]!==a?($=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]=$):$=s[30],$}let A;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]!==I||s[39]!==m||s[40]!==L||s[41]!==R?(A=t.jsx(Js,{org:a,connection:x,connectionId:i,requestedTabId:m,collections:r,onUpdate:N,isUpdating:c.update.isPending,prompts:I,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]=I,s[39]=m,s[40]=L,s[41]=R,s[42]=A):A=s[42],A}function sn(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,annotations:s.annotations,_meta:s._meta}}function nn(s){return{uri:s.uri,name:s.name,description:s.description}}function on(s){return{name:s.name,description:s.description}}function rn(){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(tn,{})})}),s[0]=e):e=s[0],e}function fr(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(rn,{}),s[0]=e):e=s[0],e}export{fr as default};
|
|
@@ -1 +0,0 @@
|
|
|
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 f,t as D,o as ke,aF as Ke,s as g,aG as Ge}from"./index-3zbyfLqi.js";import{g as qe}from"./generate-id-Dyweu44Y.js";import{C as Qe,a as Je}from"./collection-table-wrapper-C3jcR2VW.js";import{C as Ye,E as L}from"./collection-search-FSS_Lkwz.js";import{C as Ze}from"./connection-card-GLkE1rwd.js";import{B as M}from"./badge-DSAomO1_.js";import{i as et}from"./AlertCircle-C0eftc-S.js";import{i as tt}from"./CheckCircle-KfoOm4QY.js";import{I as nt}from"./integration-icon-_0Y5dukY.js";import{P as E}from"./index-DZgOYNf-.js";import{U as re}from"./user-vKqDbtP6.js";import{u as st}from"./use-binding-Cz4OU82g.js";import{u as ot}from"./use-list-state-DUq5hUJc.js";import{f as rt,e as it}from"./registry-utils-Cx5oa6Ne.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-PSmHhGOE.js";import{B as at,a as ct,b as lt,c as dt}from"./breadcrumb-Dxn3nF83.js";import{D as mt,a as ut,b as pt,c as xt,d as ht,e as gt}from"./dialog-CPWJMuHX.js";import{D as xe,a as he,b as ge,c as F}from"./dropdown-menu-DW1GDWfN.js";import{a as ft,F as j,b as y,c as v,d as _,f as C}from"./form-7Q-FsNtX.js";import{I as T}from"./input-DVv1wKLp.js";import{S as jt,a as yt,b as vt,c as _t,d as $}from"./select-DaTaxi5W.js";import{T as Ct}from"./textarea-CNTbi5Nk.js";import{g as Nt,h as bt}from"./use-connection-Dlr-wAwU.js";import{u as fe,a as kt}from"./constants-3MhIA0pZ.js";import{b as wt}from"./use-mcp-tools-WZlm0cnW.js";import{n as z}from"./Container-BADgIox6.js";import{i as je}from"./DotsVertical-B7FmF1Xu.js";import{s as ye}from"./Eye-BCmEvczH.js";import{s as R}from"./Globe02-D-yCMf5N.js";import{i as St}from"./Loading01-BSgMOGt8.js";import{i as Tt}from"./Terminal-BxQK5nsd.js";import{s as ve}from"./Trash01-Dhrt1Goe.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-x5YLFI-P.js";import"./ArrowDown-BVK-2NZv.js";import"./ArrowUp-N8lcMBug.js";import"./Check-Cjs4C9GE.js";import"./Grid01-DRBx9FRw.js";import"./List-BzhQuBp2.js";import"./tooltip-CzsT_Xmu.js";import"./index-DziKeC8s.js";import"./table-Dr33PlEJ.js";import"./SearchMd-DyDznS8C.js";import"./card-CRGkE-QK.js";import"./localstorage-keys-D2dx16dH.js";import"./useQuery-DWLTdDjg.js";import"./useMutation-CqJLXgOK.js";import"./avatar-VPsqzp0K.js";import"./binder-8_Oel13A.js";import"./use-view-mode-BadETRuZ.js";import"./use-mobile-CzcHKmhL.js";import"./ChevronRight-O5hZNhHU.js";import"./X-BpJJDPzv.js";import"./label-CfzCa7Vm.js";import"./ChevronDown-jKZz68gN.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Plus-kcfCg7FH.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 m;return o[2]===Symbol.for("react.memo_cache_sentinel")?(m=e.jsx(M,{variant:"outline",className:"text-muted-foreground",children:"Inactive"}),o[2]=m):m=o[2],m}const It=ke({key:g(),value:g()}),Et=ke({title:g().min(1,"Name is required"),description:g().nullable().optional(),icon:g().nullable().optional(),ui_type:Ge(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:g().optional(),connection_token:g().nullable().optional(),npx_package:g().optional(),stdio_command:g().optional(),stdio_args:g().optional(),stdio_cwd:g().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),m=i.pathname.length>1?i.pathname.replace(/\/+$/,""):i.pathname;return`${i.origin}${m}`}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 m=(s.npxPackage??"").trim();return o==="NPX"&&m==="@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 m=i.title||i.name||i.server?.title||i.server?.name||"",c=i.server?.description||i.description||i.summary||null;return m?{id:"registry",title:m,description:c}:null}function Ot(s,o){const i={command:"npx",args:["-y",s]},m=we(o);return Object.keys(m).length>0&&(i.envVars=m),i}function At(s,o,i,m){const c={command:s};o.trim()&&(c.args=o.trim().split(/\s+/)),i?.trim()&&(c.cwd=i.trim());const N=we(m);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(),m=Le({strict:!1}),{data:c}=Me.useSession(),{stdioEnabled:N}=ze(),d=ot({namespace:s.slug,resource:"connections"}),O=Nt(),A=bt(d),[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=m.action==="create",De=()=>{i({to:"/$org/$project/mcps",params:{org:s.slug,project:f},search:{action:"create"}})},J=()=>{i({to:"/$org/$project/mcps",params:{org:s.slug,project:f},search:{}})},r=Re({resolver:Xe(Et),defaultValues:{title:"",description:null,icon: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}),l=u.mode==="editing"?u.connection:null;X.useEffect(()=>{if(l){const t=We(l.connection_headers)?l.connection_headers:null;if(t&&l.connection_type==="STDIO"){const n=Dt(t.envVars);if(Vt(t)){const a=Ft(t);r.reset({title:l.title,description:l.description,icon:l.icon??null,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:l.title,description:l.description,icon:l.icon??null,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:l.title,description:l.description,icon:l.icon??null,ui_type:l.connection_type,connection_url:l.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})}else r.reset({title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})},[l,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),l){await O.update.mutateAsync({id:l.id,data:{title:t.title,description:t.description||null,icon:t.icon??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:t.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:f,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:f,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:f}}),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:l?"Edit Connection":"Create Connection"}),e.jsx(ht,{children:l?"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(j,{control:r.control,name:"ui_type",render:({field:t})=>e.jsxs(y,{children:[e.jsx(v,{children:"Type *"}),e.jsxs(jt,{value:t.value,onValueChange:t.onChange,children:[e.jsx(_,{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(C,{})]})}),p==="NPX"&&e.jsx(e.Fragment,{children:e.jsx(j,{control:r.control,name:"npx_package",render:({field:t})=>e.jsxs(y,{children:[e.jsx(v,{children:"NPM Package *"}),e.jsx(_,{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(C,{})]})})}),p==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(j,{control:r.control,name:"stdio_command",render:({field:t})=>e.jsxs(y,{children:[e.jsx(v,{children:"Command *"}),e.jsx(_,{children:e.jsx(T,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(C,{})]})}),e.jsx(j,{control:r.control,name:"stdio_args",render:({field:t})=>e.jsxs(y,{children:[e.jsx(v,{children:"Arguments"}),e.jsx(_,{children:e.jsx(T,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(C,{})]})})]}),e.jsx(j,{control:r.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(y,{children:[e.jsx(v,{children:"Working Directory"}),e.jsx(_,{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(C,{})]})})]}),(p==="NPX"||p==="STDIO")&&e.jsx(j,{control:r.control,name:"env_vars",render:({field:t})=>e.jsxs(y,{children:[e.jsx(v,{children:"Environment Variables"}),e.jsx(_,{children:e.jsx(Pt,{value:t.value??[],onChange:t.onChange})}),e.jsx(C,{})]})}),p!=="NPX"&&p!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"connection_url",render:({field:t})=>e.jsxs(y,{children:[e.jsx(v,{children:"URL *"}),e.jsx(_,{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(C,{})]})}),e.jsx(j,{control:r.control,name:"connection_token",render:({field:t})=>e.jsxs(y,{children:[e.jsx(v,{children:P?.token?.label??"Token (optional)"}),e.jsx(_,{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(C,{})]})})]}),e.jsx(j,{control:r.control,name:"title",render:({field:t})=>e.jsxs(y,{children:[e.jsx(v,{children:"Name *"}),e.jsx(_,{children:e.jsx(T,{placeholder:"My Connection",...t})}),e.jsx(C,{})]})}),e.jsx(j,{control:r.control,name:"description",render:({field:t})=>e.jsxs(y,{children:[e.jsx(v,{children:"Description"}),e.jsx(_,{children:e.jsx(Ct,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(C,{})]})})]}),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...":l?"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:d.viewMode,onViewModeChange:d.setViewMode,sortKey:d.sortKey,sortDirection:d.sortDirection,onSort:d.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:d.search,onChange:d.setSearch,placeholder:"Search for a Connection...",onKeyDown:t=>{t.key==="Escape"&&(d.setSearch(""),t.target.blur())}}),e.jsx(E.Content,{children:d.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:(d.search,"No Connections found"),description:d.search?`No Connections match "${d.search}"`:"Create a connection to get started.",actions:!d.search&&e.jsx(S,{variant:"outline",onClick:()=>i({to:"/$org/$project/store",params:{org:s.slug,project:f}}),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:f,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:f,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:d.sortKey,sortDirection:d.sortDirection,onSort:d.handleSort,onRowClick:t=>i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:f,connectionId:t.id}}),emptyState:d.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 "${d.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:f}}),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 +0,0 @@
|
|
|
1
|
-
import{a0 as a,a1 as t}from"./index-3zbyfLqi.js";const e=a(t,{target:"draft-7"});export{e as B};
|
|
@@ -1 +0,0 @@
|
|
|
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-3zbyfLqi.js";import{u as he}from"./useQuery-DWLTdDjg.js";import{u as oe}from"./useMutation-CqJLXgOK.js";import{P as je,a as ge,b as Ce}from"./popover-7xIJyxqf.js";import{C as be,a as ve,b as Ne,c as ye,d as Ee,e as Te}from"./command-BK3ZFocj.js";import{s as _e}from"./Plus-kcfCg7FH.js";import{i as Ie}from"./X-BpJJDPzv.js";import{h as Pe}from"./use-connection-Dlr-wAwU.js";import{a as Se,u as Oe}from"./constants-3MhIA0pZ.js";import{u as te}from"./unwrap-tool-result-BYXdCQMg.js";import"./index-DqzqEzLf.js";import"./SearchMd-DyDznS8C.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as R,u as W,e as A,d as X,K as Z,j as n,r as q,aE as J,B as ee,aD as te,ba as ne}from"./index-3zbyfLqi.js";import{i as v}from"./Loading01-BSgMOGt8.js";import{c as ie}from"./binder-8_Oel13A.js";import{P as $}from"./topbar-portal-pZDSuDEC.js";import{u as se}from"./useQuery-DWLTdDjg.js";import{h as oe}from"./use-connection-Dlr-wAwU.js";import{a as le,u as re,j as ae}from"./constants-3MhIA0pZ.js";import{t as ce}from"./Settings01-B90Jx8ZC.js";import{P as E}from"./index-DZgOYNf-.js";import"./useMutation-CqJLXgOK.js";import"./localstorage-keys-D2dx16dH.js";import"./tooltip-CzsT_Xmu.js";import"./index-DziKeC8s.js";function de(t,e){return t?t.filter(m=>ie(m,e)):[]}function K(t){return{id:t.id,title:t.title,icon:t.icon,description:t.description,app_name:t.app_name,app_id:t.app_id,tools:t.tools,metadata:t.metadata}}function me(t){const e=R.c(35),{binding:m,renderHeader:f,renderEmptyState:i}=t,{org:o,project:l}=W();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:r,project:g,pluginId:u}=A(c),Q=oe(),{data:y}=X.useSession();let _;e[1]!==o.id?(_={connectionId:le,orgId:o.id},e[1]=o.id,e[2]=_):_=e[2];const H=re(_);let x;e[3]!==u||e[4]!==l.id?(x=Z.projectPluginConfig(l.id??"",u),e[3]=u,e[4]=l.id,e[5]=x):x=e[5];let p;e[6]!==u||e[7]!==l.id||e[8]!==H?(p=async()=>{const s=await H.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:u}});return s.structuredContent??s},e[6]=u,e[7]=l.id,e[8]=H,e[9]=p):p=e[9];const T=!!l.id&&!!u;let b;e[10]!==x||e[11]!==p||e[12]!==T?(b={queryKey:x,queryFn:p,enabled:T},e[10]=x,e[11]=p,e[12]=T,e[13]=b):b=e[13];const{data:U,isLoading:Y}=se(b),D=de(Q,m),F=U?.config?.connectionId,j=F?D.find(s=>s.id===F):null,P=ae({connectionId:j?.id,orgId:o.id}),w=y?.user?{user:{id:y.user.id,name:y.user.name,email:y.user.email,image:y.user.image}}:null,z={id:o.id,slug:o.slug,name:o.name};if(Y){let s;return e[14]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[14]=s):s=e[14],s}if(D.length===0){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let a;e[15]!==i?(a=i(),e[15]=i,e[16]=a):a=e[16];let d;return e[17]!==a?(d=n.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:a}),e[17]=a,e[18]=d):d=e[18],n.jsx($,{value:s,children:d})}if(!j){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let a;e[19]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[n.jsx(ce,{size:48,className:"text-muted-foreground mb-2"}),n.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[19]=a):a=e[19];const d=r??o.slug,O=g??l.slug??"";let L;return e[20]!==d||e[21]!==O?(L=n.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[a,n.jsx(ee,{asChild:!0,children:n.jsx(te,{to:"/$org/$project/settings",params:{org:d,project:O},children:"Go to Project Settings"})})]}),e[20]=d,e[21]=O,e[22]=L):L=e[22],n.jsx($,{value:s,children:L})}let S;e[23]!==P?(S=(s,a)=>P?P.callTool({name:s,arguments:a}).then(fe):Promise.reject(new Error("MCP client is not available")),e[23]=P,e[24]=S):S=e[24];const V={connectionId:j.id,connection:K(j),toolCaller:S,org:z,session:w},B=E,G=E,k=E,M=f({connections:[K(j)],selectedConnectionId:j.id,onConnectionChange:ue});let h;e[25]!==M||e[26]!==k.Header.Left?(h=n.jsx(k.Header.Left,{children:M}),e[25]=M,e[26]=k.Header.Left,e[27]=h):h=e[27];let C;e[28]!==h||e[29]!==G.Header?(C=n.jsx(G.Header,{children:h}),e[28]=h,e[29]=G.Header,e[30]=C):C=e[30];let N;e[31]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(E.Content,{children:n.jsx(q.Suspense,{fallback:n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),children:n.jsx(J,{})})}),e[31]=N):N=e[31];let I;return e[32]!==B||e[33]!==C?(I=n.jsxs(B,{children:[C,N]}),e[32]=B,e[33]=C,e[34]=I):I=e[34],n.jsx($,{value:V,children:I})}function ue(){}function fe(t){return t.structuredContent??t}function Le(){const t=R.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:m}=A(e);let f;t[1]!==m?(f=ne.find(r=>r.id===m),t[1]=m,t[2]=f):f=t[2];const i=f;if(i?.renderHeader&&i?.renderEmptyState&&i?.binding){let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[3]=r):r=t[3];let g;return t[4]!==i.binding||t[5]!==i.renderEmptyState||t[6]!==i.renderHeader?(g=n.jsx(q.Suspense,{fallback:r,children:n.jsx(me,{binding:i.binding,renderHeader:i.renderHeader,renderEmptyState:i.renderEmptyState})}),t[4]=i.binding,t[5]=i.renderEmptyState,t[6]=i.renderHeader,t[7]=g):g=t[7],g}const o=i?.LayoutComponent;if(!o){let r;return t[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(J,{}),t[8]=r):r=t[8],r}let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[9]=l):l=t[9];let c;return t[10]!==o?(c=n.jsx(q.Suspense,{fallback:l,children:n.jsx(o,{})}),t[10]=o,t[11]=c):c=t[11],c}export{Le as default};
|