decocms 2.178.1 → 2.178.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CI8iQIN4.js → AlertCircle-12chRuly.js} +1 -1
- package/dist/client/assets/{AlignLeft-D1a9nQq5.js → AlignLeft-_LT9deOt.js} +1 -1
- package/dist/client/assets/{ArrowDown-bcBjuFxH.js → ArrowDown-7rbX3zqZ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BaV7db3X.js → ArrowLeft-erI8s3G2.js} +1 -1
- package/dist/client/assets/{ArrowUp-BtIkmj4Y.js → ArrowUp-DoIG5eQh.js} +1 -1
- package/dist/client/assets/{Building02-R_mkgdQ4.js → Building02-Dr7IyBdv.js} +1 -1
- package/dist/client/assets/{Check-GOz4_bBS.js → Check-DW8AVFkq.js} +1 -1
- package/dist/client/assets/{CheckCircle-DosFvCW2.js → CheckCircle-hBpanOsI.js} +1 -1
- package/dist/client/assets/{CheckSquare-Be1kXxvn.js → CheckSquare-Cr3IzSXp.js} +1 -1
- package/dist/client/assets/{CheckVerified02-CZakFFpv.js → CheckVerified02-r17ymUCs.js} +1 -1
- package/dist/client/assets/{ChevronDown-DElgod-p.js → ChevronDown-BIRGQoZ5.js} +1 -1
- package/dist/client/assets/{ChevronLeft-Bk7mc5_w.js → ChevronLeft-D-e7F7Gj.js} +1 -1
- package/dist/client/assets/{ChevronRight-Ys0vr-YD.js → ChevronRight-DsjLlugM.js} +1 -1
- package/dist/client/assets/{ChevronUp-CKkWbsZ5.js → ChevronUp-Bi3NMXzv.js} +1 -1
- package/dist/client/assets/{Clock-DRICOB0c.js → Clock-D4xJnA3P.js} +1 -1
- package/dist/client/assets/{Code01-CDxb4LVl.js → Code01-YGq5QwlZ.js} +1 -1
- package/dist/client/assets/{Container-C8ScaknS.js → Container-DHyMOW_p.js} +1 -1
- package/dist/client/assets/{Copy01-DhAVspEC.js → Copy01-DkcjIGiS.js} +1 -1
- package/dist/client/assets/{Dataflow03-ONoSH2VT.js → Dataflow03-CD3eo8oO.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BaiN7u8r.js → DotsHorizontal-CjYGc80C.js} +1 -1
- package/dist/client/assets/{DotsVertical-rvqtR29a.js → DotsVertical-2nyye7GD.js} +1 -1
- package/dist/client/assets/{Download01-CVEqgoRT.js → Download01-BvtNZalG.js} +1 -1
- package/dist/client/assets/{Edit01-BaPedGGl.js → Edit01-CoeKfJ-u.js} +1 -1
- package/dist/client/assets/{Edit05-DSl3Jqkp.js → Edit05-CbbEzOoe.js} +1 -1
- package/dist/client/assets/{Eye-BgAytXDm.js → Eye-hBqNQHpc.js} +1 -1
- package/dist/client/assets/{EyeOff-CucokIoZ.js → EyeOff-CJoTkAtN.js} +1 -1
- package/dist/client/assets/{File02-gbFS8GtC.js → File02-D19u2hUl.js} +1 -1
- package/dist/client/assets/{File06-Dpi3gJhU.js → File06-Bp4ioOvR.js} +1 -1
- package/dist/client/assets/{FilterLines-BeHTcRH-.js → FilterLines-Dvk7BhWf.js} +1 -1
- package/dist/client/assets/{Globe01-Ceb6Pyzg.js → Globe01-B8Ib7knn.js} +1 -1
- package/dist/client/assets/{Globe02-4oAOo4_d.js → Globe02-wRhoc1N5.js} +1 -1
- package/dist/client/assets/{Grid01-NwJJaoW7.js → Grid01-C5e9ReQ4.js} +1 -1
- package/dist/client/assets/{Home02-DQJpzzIE.js → Home02-JZJR9jmQ.js} +1 -1
- package/dist/client/assets/{Image01-BwGUDEUi.js → Image01-DjoSkYp_.js} +1 -1
- package/dist/client/assets/{Inbox01-CDOpLWwZ.js → Inbox01-ClVaT7W5.js} +1 -1
- package/dist/client/assets/{InfoCircle-CfTVXLYm.js → InfoCircle-DzyfpQes.js} +1 -1
- package/dist/client/assets/{Key01-BZkaWvm5.js → Key01-qNySmY39.js} +1 -1
- package/dist/client/assets/{LayersTwo01-D9dHuPjU.js → LayersTwo01-dfSlQT0y.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BHhw95T0.js → LayoutLeft-B2KZfn2n.js} +1 -1
- package/dist/client/assets/{Link01-CU6UcWFS.js → Link01-Cz_ZRKoB.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DOdBEG1U.js → LinkExternal01-CKvCiQnV.js} +1 -1
- package/dist/client/assets/{List-DD3BKPLz.js → List-NLa0AhO4.js} +1 -1
- package/dist/client/assets/{Loading01-B85tVuIU.js → Loading01-Bb8FCosd.js} +1 -1
- package/dist/client/assets/{Lock01-WwvDQaaT.js → Lock01-CnZITIks.js} +1 -1
- package/dist/client/assets/{Play-DTPauCd1.js → Play-Bw5lQw7j.js} +1 -1
- package/dist/client/assets/{Plus-C9dY5EOr.js → Plus-CajZ9VfC.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DJsZi8Hz.js → RefreshCcw01-B_NTitRE.js} +1 -1
- package/dist/client/assets/{Save01-COu7GfwR.js → Save01-8oEsqMkJ.js} +1 -1
- package/dist/client/assets/{SearchMd-CKp0BoPW.js → SearchMd-eZWeU0sP.js} +1 -1
- package/dist/client/assets/{Settings01-DunsMQ-m.js → Settings01-ClPVpLPy.js} +1 -1
- package/dist/client/assets/{Shield01-CCMtDdxH.js → Shield01-N4ace-oo.js} +1 -1
- package/dist/client/assets/{Terminal-COsHV7Wy.js → Terminal-CGwuP-_5.js} +1 -1
- package/dist/client/assets/{Tool01-Delk_MGO.js → Tool01-D1m8i7Ez.js} +1 -1
- package/dist/client/assets/{Trash01-BtiNjuw3.js → Trash01-B_4PTwjI.js} +1 -1
- package/dist/client/assets/{Upload01-DqqcM3M6.js → Upload01-CLIOr3Tj.js} +1 -1
- package/dist/client/assets/{Users03-CQa5jfkV.js → Users03-Bv-hUQkl.js} +1 -1
- package/dist/client/assets/{X-CaaFSPD_.js → X-LzehymHS.js} +1 -1
- package/dist/client/assets/{XClose-Dey3r3af.js → XClose-CcNXqPQc.js} +1 -1
- package/dist/client/assets/{Zap-DX02pf-a.js → Zap-BFN1DqIC.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-BCTZ6BnP.js → agent-connections-preview-3pYXfstj.js} +1 -1
- package/dist/client/assets/{agent-detail-BBSZrHWb.js → agent-detail-DMK-u3yi.js} +1 -1
- package/dist/client/assets/{agents-DVOxH2hb.js → agents-Wfe5dNfh.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-BWU0RfRJ.js → ai-providers-logos-CCp39UCk.js} +1 -1
- package/dist/client/assets/{alert-dialog-BGZzdkI2.js → alert-dialog-B_ae3oRt.js} +1 -1
- package/dist/client/assets/{auth-catchall-1PjzZ5eD.js → auth-catchall-DAx9m28t.js} +1 -1
- package/dist/client/assets/{automation-detail-dSH73muX.js → automation-detail-DfFkGT_5.js} +1 -1
- package/dist/client/assets/{automations-CEr8CMbK.js → automations-A8NOzTSS.js} +1 -1
- package/dist/client/assets/{avatar-DWAYNsNK.js → avatar-B2yArl-q.js} +1 -1
- package/dist/client/assets/{badge-B_BTuJZe.js → badge-DtRom7JO.js} +1 -1
- package/dist/client/assets/{binder-l1kCmNCE.js → binder-D4cqx_Kx.js} +1 -1
- package/dist/client/assets/{breadcrumb-ijphtzQp.js → breadcrumb-C2RG4nAQ.js} +1 -1
- package/dist/client/assets/{card-CwEWrOs9.js → card-B8qDZGCZ.js} +1 -1
- package/dist/client/assets/{checkbox-B_91sMwd.js → checkbox-B1rexahu.js} +1 -1
- package/dist/client/assets/{collapsible-DILfwVxb.js → collapsible-BtjeaBAE.js} +1 -1
- package/dist/client/assets/{collection-detail-lkCxiUzr.js → collection-detail-BaBGI9i2.js} +1 -1
- package/dist/client/assets/{collection-display-button-kCOiEzLn.js → collection-display-button-CpVZ4wHm.js} +1 -1
- package/dist/client/assets/{collection-search-Bdxpglbf.js → collection-search-BYV7N3mr.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D-vPJPam.js → collection-table-wrapper-CHFJQd21.js} +1 -1
- package/dist/client/assets/{collection-tabs-IdlFD1jR.js → collection-tabs-CJEa3dRy.js} +1 -1
- package/dist/client/assets/{command-BgTh2_vK.js → command-Drksh_DO.js} +1 -1
- package/dist/client/assets/{connection-card-BWZAp_hO.js → connection-card-Bak2l1_M.js} +1 -1
- package/dist/client/assets/{connection-detail-DPSHmWyz.js → connection-detail-BKy2ZsS6.js} +1 -1
- package/dist/client/assets/{connections-BvYzdmU4.js → connections-Dxf4eIOE.js} +1 -1
- package/dist/client/assets/{constants-BCt7c81T.js → constants-D7qXOYRn.js} +1 -1
- package/dist/client/assets/{context-BTMVzdan.js → context-DxQMlFKC.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Du7uAMNm.js → create-organization-dialog-CNWB-72r.js} +1 -1
- package/dist/client/assets/{create-project-dialog-Bb7dubB7.js → create-project-dialog-BeIY4Oy9.js} +1 -1
- package/dist/client/assets/{danger-CfnLHwII.js → danger-YWbxrjNq.js} +1 -1
- package/dist/client/assets/{danger-zone-DjN4GhuT.js → danger-zone-DGg0ZzSy.js} +1 -1
- package/dist/client/assets/{dependencies-CwSG23CA.js → dependencies-DtAVTWu-.js} +1 -1
- package/dist/client/assets/{dialog-BDa2Gsq9.js → dialog-ChXYvlDt.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DEQ5DCnG.js → dropdown-menu-BxlQMXgW.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-DP6UGwOE.js → dynamic-plugin-layout-JpZTv0Ay.js} +1 -1
- package/dist/client/assets/{editable-task-title-CaE6DIBf.js → editable-task-title-Cm-uIwFs.js} +1 -1
- package/dist/client/assets/{empty-state-DmgqwjeV.js → empty-state-qLM_bVsv.js} +1 -1
- package/dist/client/assets/{empty-state-C4c2sKjV.js → empty-state-xIvMMy-_.js} +1 -1
- package/dist/client/assets/{env-vars-editor-Ah5xyGmz.js → env-vars-editor-Yss1wn0m.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BxJWN5u-.js → extract-connection-data-48N591A_.js} +1 -1
- package/dist/client/assets/{file-browser-BRFmGA__.js → file-browser-BbqpPFZK.js} +2 -2
- package/dist/client/assets/{form-BWoxqZfk.js → form-CaFPTMVC.js} +1 -1
- package/dist/client/assets/{general-BKqD1lIr.js → general-DI9irVIQ.js} +1 -1
- package/dist/client/assets/{generate-id-BaIFvm62.js → generate-id-BiV6m8fS.js} +1 -1
- package/dist/client/assets/{grid-view-DGZvuOwZ.js → grid-view-DurgUMuo.js} +1 -1
- package/dist/client/assets/{home-B7jB9Gxp.js → home-CspK560n.js} +1 -1
- package/dist/client/assets/{index-BgoahoDu.js → index-ChUIqRBi.js} +1 -1
- package/dist/client/assets/{index--PLXALUm.js → index-CqWJIMlG.js} +1 -1
- package/dist/client/assets/{index-WTO-ZRzC.js → index-CqtWW-Tq.js} +1 -1
- package/dist/client/assets/{index-10S4l3se.js → index-CqyqI90F.js} +1 -1
- package/dist/client/assets/{index-DZ6p-ZXx.js → index-De1iYnQy.js} +1 -1
- package/dist/client/assets/{index-DcxE8oe_.js → index-NjMxPJgF.js} +3 -3
- package/dist/client/assets/{index-DGLQ2uQ5.js → index-TV8hw8s3.js} +1 -1
- package/dist/client/assets/{index-Bc448aeG.js → index-YL7q5tyF.js} +1 -1
- package/dist/client/assets/{index-CTjqFNkw.js → index-YRudAQp7.js} +1 -1
- package/dist/client/assets/{index-B5vgf28x.js → index-yiVP4brl.js} +1 -1
- package/dist/client/assets/{index-CM7_8eMu.js → index-zWpUeKAz.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CzIVu_kK.js → infiniteQueryObserver-JZ0YxCW-.js} +1 -1
- package/dist/client/assets/{input-DPpAbHbD.js → input-B89sozd8.js} +1 -1
- package/dist/client/assets/{integration-icon-6jcHFHZV.js → integration-icon-BPVDVJvP.js} +1 -1
- package/dist/client/assets/{label-BtaiiWJ8.js → label-DkiEYJcU.js} +1 -1
- package/dist/client/assets/{layout-Cjef80qc.js → layout-Cqn-h1Jz.js} +1 -1
- package/dist/client/assets/{layout-DG9LlvE6.js → layout-DcmGLVHZ.js} +1 -1
- package/dist/client/assets/{login-D1Xb70mS.js → login-qT_ItpIx.js} +1 -1
- package/dist/client/assets/{logo-upload-79T6Ecg3.js → logo-upload-CoGaedUC.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DgOOTmoQ.js → mcp-app-renderer-By1mQEU9.js} +1 -1
- package/dist/client/assets/{mcp-server-card-CqBs71hZ.js → mcp-server-card-B3Nrrgyk.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-D_BCRi3w.js → mcp-server-detail-DMfy0V9h.js} +2 -2
- package/dist/client/assets/{members-BkdG_-Nh.js → members-Q81LXZu1.js} +1 -1
- package/dist/client/assets/{monaco-editor-D5smiy7k.js → monaco-editor-ZB27PMAe.js} +1 -1
- package/dist/client/assets/{monitoring-kw0ipyvO.js → monitoring-C31A03PZ.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-S2Ut1cvD.js → monitoring-dashboard-edit-Dfi8Jxeb.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-gNG_IQ8M.js → monitoring-dashboard-view-CxjxBHLW.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D3PlzPcP.js → monitoring-stats-row-CAn-8pVZ.js} +1 -1
- package/dist/client/assets/{oauth-callback-9ngEzskH.js → oauth-callback-B8DRnSok.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CpdQKMVl.js → oauth-callback-ai-provider-CsTCxPAY.js} +1 -1
- package/dist/client/assets/{org-ai-providers-CrQ3OeB5.js → org-ai-providers-DaYyItUL.js} +1 -1
- package/dist/client/assets/{page-C2HdbsvN.js → page-BjLk0DX_.js} +1 -1
- package/dist/client/assets/{page-DmVGFJaY.js → page-C2I5Nlmu.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DXhpvNlI.js → plugin-empty-state-K02oXRNN.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CWxRJkeE.js → plugin-empty-state-l30u7dec.js} +1 -1
- package/dist/client/assets/{plugin-header-C3JJ8Nq_.js → plugin-header-B_wkRb4Y.js} +1 -1
- package/dist/client/assets/{plugin-header-TcX-3hN2.js → plugin-header-CE-BhILm.js} +1 -1
- package/dist/client/assets/plugins-6p4XZdw1.js +1 -0
- package/dist/client/assets/{popover-CNIkv0WT.js → popover-Br8QkMK3.js} +1 -1
- package/dist/client/assets/{project-app-view-BVSK5NCb.js → project-app-view-CRe7LVZk.js} +1 -1
- package/dist/client/assets/{project-layout-Bd1vlG83.js → project-layout-Bg1hlIaM.js} +1 -1
- package/dist/client/assets/{project-plugins-az_ZXSwN.js → project-plugins-BHOZZsH7.js} +1 -1
- package/dist/client/assets/{projects-list-D8eiYeUr.js → projects-list-i4ZvUqtI.js} +1 -1
- package/dist/client/assets/{registry-layout-BXceDqEw.js → registry-layout-DQV7LhSo.js} +1 -1
- package/dist/client/assets/{registry-utils-CkCRcmq4.js → registry-utils-cjX9P5J9.js} +1 -1
- package/dist/client/assets/{reset-password-xlfm2d95.js → reset-password-Cgcrl5ZG.js} +1 -1
- package/dist/client/assets/{resizable-B7fIdnoq.js → resizable-Nu1SqaJD.js} +1 -1
- package/dist/client/assets/{save-actions-DIKaTzi7.js → save-actions-CVl6VtT2.js} +1 -1
- package/dist/client/assets/{scroll-area-B-pB6oMr.js → scroll-area-BTJQ86Ry.js} +1 -1
- package/dist/client/assets/{select-DeNgR918.js → select-Dx3T3-4n.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-CFDIRCp8.js → select-virtual-mcp-BS537pmy.js} +1 -1
- package/dist/client/assets/{sheet-BBLyN2xl.js → sheet-C3HM0Uwr.js} +1 -1
- package/dist/client/assets/{shell-layout-CiKn6BP6.js → shell-layout-Bco0BFOl.js} +2 -2
- package/dist/client/assets/{sidebar-settings-DOwlHFdj.js → sidebar-settings-JhN4X_jg.js} +1 -1
- package/dist/client/assets/{skeleton-CNgs5GJt.js → skeleton-Cjm8s7CT.js} +1 -1
- package/dist/client/assets/{spinner-BZdAS5i2.js → spinner-Dzx7B3Jl.js} +1 -1
- package/dist/client/assets/{store-invite-BXcKXIzr.js → store-invite-BPcFU0aw.js} +1 -1
- package/dist/client/assets/{switch-CmREXk8C.js → switch-CA_oYDia.js} +1 -1
- package/dist/client/assets/{table-C4WVepD4.js → table-C-1rP_rt.js} +1 -1
- package/dist/client/assets/{tabs-BeYHPY-1.js → tabs-BSOe8gLq.js} +1 -1
- package/dist/client/assets/{task-status-DauQRqAW.js → task-status-DYx9R7EL.js} +1 -1
- package/dist/client/assets/tasks-D1X8oLa3.js +1 -0
- package/dist/client/assets/{tasks-panel-DqbQRMGq.js → tasks-panel-BJ3TfA-_.js} +1 -1
- package/dist/client/assets/{textarea-C7YqhWTc.js → textarea-DIJzFUWn.js} +1 -1
- package/dist/client/assets/{time-range-picker-CM-9xODE.js → time-range-picker-CGBh-D6p.js} +1 -1
- package/dist/client/assets/{toggle-group-B7g3fYap.js → toggle-group-DlZGDyPQ.js} +1 -1
- package/dist/client/assets/{tools-list-4D_tBiUe.js → tools-list-D-T64862.js} +1 -1
- package/dist/client/assets/{tooltip-CXZH0tSC.js → tooltip-BJMSu0c2.js} +1 -1
- package/dist/client/assets/{topbar-portal-CjA9qO3_.js → topbar-portal-ChPXVsi1.js} +1 -1
- package/dist/client/assets/{types-CPj3Y6i2.js → types-BHeMLyAV.js} +1 -1
- package/dist/client/assets/{use-automations-B0CZymwk.js → use-automations-Bmw3x7Dk.js} +1 -1
- package/dist/client/assets/{use-collections-CObsJD7p.js → use-collections-C0cYiFfV.js} +1 -1
- package/dist/client/assets/{use-connection-Cv_-e2MS.js → use-connection-CHFdKnsr.js} +1 -1
- package/dist/client/assets/{use-copy-sxHnzQ3E.js → use-copy-xhdji_Bl.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-dSjfTRl8.js → use-create-virtual-mcp-B7odZ_c3.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CqxPDCSp.js → use-infinite-scroll-CPhZNIw7.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-wW1d1HtB.js → use-install-from-registry-BzwuBLOx.js} +1 -1
- package/dist/client/assets/{use-list-state-CWVUvMhj.js → use-list-state-CbsN6RbJ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C4X4lEEg.js → use-mcp-prompts-Bel4H4rh.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-DoUnZI9j.js → use-mcp-resources-qGdymfRz.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cnh4vEBm.js → use-mcp-tools-BCZI_Wqc.js} +1 -1
- package/dist/client/assets/{use-members-BHa-Fb-h.js → use-members-B4ncWtMV.js} +1 -1
- package/dist/client/assets/{use-mobile-v2XXLV0O.js → use-mobile-DOUfTohp.js} +1 -1
- package/dist/client/assets/{use-project-B-9YXhNP.js → use-project-b5C3lq5-.js} +1 -1
- package/dist/client/assets/{use-store-discovery-z8nwAYJJ.js → use-store-discovery-B402mTHd.js} +1 -1
- package/dist/client/assets/{use-view-mode-XMRPR1ke.js → use-view-mode-ss3eRodO.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DfPJ-WDb.js → use-virtual-mcp-BP6aaUzw.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BXDrDvlH.js +1 -0
- package/dist/client/assets/{useMutation-CV3IN68C.js → useMutation-68NxhXCf.js} +1 -1
- package/dist/client/assets/useQuery-BYBCFxgb.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-X3jXt04i.js +1 -0
- package/dist/client/assets/{user-_Hc5WOWn.js → user-iDZRuimU.js} +1 -1
- package/dist/client/assets/{workflow-DKAllKJO.js → workflow-CrrTPehP.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/migrate.js +1 -1
- package/dist/server/node_modules/pg-connection-string/LICENSE +21 -0
- package/dist/server/node_modules/pg-connection-string/README.md +105 -0
- package/dist/server/node_modules/pg-connection-string/esm/index.mjs +8 -0
- package/dist/server/node_modules/pg-connection-string/index.d.ts +36 -0
- package/dist/server/node_modules/pg-connection-string/index.js +231 -0
- package/dist/server/node_modules/pg-connection-string/package.json +52 -0
- package/dist/server/node_modules/{pg → pg-pool}/LICENSE +1 -1
- package/dist/server/node_modules/pg-pool/README.md +357 -0
- package/dist/server/node_modules/pg-pool/esm/index.mjs +5 -0
- package/dist/server/node_modules/pg-pool/index.js +517 -0
- package/dist/server/node_modules/pg-pool/package.json +51 -0
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/plugins-BfcAD8Xs.js +0 -1
- package/dist/client/assets/tasks-fQ7kFf17.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BIejUr4H.js +0 -1
- package/dist/client/assets/useQuery-CEE9SUlS.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B7NkSjI9.js +0 -1
- package/dist/server/node_modules/pg/README.md +0 -95
- package/dist/server/node_modules/pg/esm/index.mjs +0 -20
- package/dist/server/node_modules/pg/lib/client.js +0 -743
- package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
- package/dist/server/node_modules/pg/lib/connection.js +0 -221
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
- package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
- package/dist/server/node_modules/pg/lib/defaults.js +0 -91
- package/dist/server/node_modules/pg/lib/index.js +0 -73
- package/dist/server/node_modules/pg/lib/native/client.js +0 -323
- package/dist/server/node_modules/pg/lib/native/index.js +0 -2
- package/dist/server/node_modules/pg/lib/native/query.js +0 -165
- package/dist/server/node_modules/pg/lib/query.js +0 -252
- package/dist/server/node_modules/pg/lib/result.js +0 -109
- package/dist/server/node_modules/pg/lib/stream.js +0 -83
- package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
- package/dist/server/node_modules/pg/lib/utils.js +0 -217
- package/dist/server/node_modules/pg/package.json +0 -76
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as E,c as O,D as Q,j as t,B as q,E as fe,ad as Je,u as de,V as Ze,n as Qe,v as ce,e as Xe,g as et,O as Ge,t as tt,q as st,Q as lt,U as Ve}from"./index-DcxE8oe_.js";import{u as ot}from"./context-BTMVzdan.js";import{E as nt}from"./empty-state-C4c2sKjV.js";import{I as Ie}from"./input-DPpAbHbD.js";import{P as rt,a as it,b as at}from"./popover-CNIkv0WT.js";import{S as ct}from"./scroll-area-B-pB6oMr.js";import{n as dt}from"./Container-C8ScaknS.js";import{i as mt}from"./Edit05-DSl3Jqkp.js";import{i as ut}from"./Link01-CU6UcWFS.js";import{s as ft}from"./XClose-Dey3r3af.js";import{I as Oe}from"./integration-icon-6jcHFHZV.js";import{a as xt}from"./index-DZ6p-ZXx.js";import{B as $e}from"./badge-B_BTuJZe.js";import{i as pt,a as ht,C as gt,b as jt}from"./collapsible-DILfwVxb.js";import{S as bt}from"./switch-CmREXk8C.js";import{T as Nt}from"./textarea-C7YqhWTc.js";import{a as xe,c as ve,T as pe,b as he}from"./tooltip-CXZH0tSC.js";import{b as vt,u as yt}from"./use-connection-Cv_-e2MS.js";import{u as Ct,a as _t}from"./use-virtual-mcp-DfPJ-WDb.js";import{i as Ue}from"./ChevronRight-Ys0vr-YD.js";import{n as St}from"./ChevronUp-CKkWbsZ5.js";import{i as De}from"./File02-gbFS8GtC.js";import{i as ze}from"./Loading01-B85tVuIU.js";import{i as kt}from"./Play-DTPauCd1.js";import{s as Be}from"./Plus-C9dY5EOr.js";import{a as Le}from"./Tool01-Delk_MGO.js";import{t as Tt}from"./Users03-CQa5jfkV.js";import{B as wt,a as Et,b as Fe,d as It,e as At,c as Ot}from"./breadcrumb-ijphtzQp.js";import{a as $t,V as Dt}from"./layout-DG9LlvE6.js";import{S as zt}from"./save-actions-DIKaTzi7.js";import{C as Lt}from"./collection-search-Bdxpglbf.js";import{T as Pt}from"./tools-list-4D_tBiUe.js";import{C as Pe}from"./checkbox-B_91sMwd.js";import{e as Rt,a as He,D as Ke,b as Mt,c as Vt}from"./dialog-BDa2Gsq9.js";import{T as ye,a as Bt,b as Ce,c as Ft}from"./tabs-BeYHPY-1.js";import{u as ge,a as Gt}from"./constants-BCt7c81T.js";import{c as Ut}from"./use-mcp-tools-Cnh4vEBm.js";import{a as Ht}from"./use-mcp-resources-DoUnZI9j.js";import{u as Kt}from"./use-mcp-prompts-C4X4lEEg.js";import{s as We}from"./slugify-CEUa2lfQ.js";import{I as Wt,R as Yt,a as qt}from"./index-BgoahoDu.js";import{k as Jt}from"./dropdown-menu-DEQ5DCnG.js";import{i as je}from"./Check-GOz4_bBS.js";import{i as Zt}from"./Code01-CDxb4LVl.js";import{a as Re}from"./Copy01-DhAVspEC.js";import{i as _e}from"./InfoCircle-CfTVXLYm.js";import{i as Qt}from"./Key01-BZkaWvm5.js";import{A as Xt}from"./agent-connections-preview-BCTZ6BnP.js";import"./decopilot-events-Brt4gAR6.js";import"./index-Bc448aeG.js";import"./useQuery-CEE9SUlS.js";import"./useMutation-CV3IN68C.js";import"./index-B5vgf28x.js";import"./index-10S4l3se.js";import"./use-collections-CObsJD7p.js";import"./Save01-COu7GfwR.js";import"./SearchMd-CKp0BoPW.js";import"./collection-display-button-kCOiEzLn.js";import"./ArrowDown-bcBjuFxH.js";import"./ArrowUp-BtIkmj4Y.js";import"./Grid01-NwJJaoW7.js";import"./List-DD3BKPLz.js";import"./collection-table-wrapper-D-vPJPam.js";import"./table-C4WVepD4.js";import"./card-CwEWrOs9.js";import"./types-CPj3Y6i2.js";import"./Eye-BgAytXDm.js";import"./Globe02-4oAOo4_d.js";import"./LayersTwo01-D9dHuPjU.js";import"./X-CaaFSPD_.js";const be=({size:o=24,color:e="currentColor",...s})=>E.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},E.createElement("path",{d:"m9.75 20.75 1.473.818c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l1.473-.818m-9-2.5-1.427-.793c-.3-.166-.45-.25-.558-.368a1 1 0 0 1-.215-.364C3 16.573 3 16.401 3 16.06V14.5m0-5V7.942c0-.343 0-.514.05-.667a1 1 0 0 1 .215-.364c.109-.119.258-.202.558-.368L5.25 5.75m4.5-2.5 1.473-.818c.284-.158.425-.237.576-.267a1 1 0 0 1 .402 0c.15.03.292.11.576.267l1.473.818m4.5 2.5 1.427.793c.3.166.45.25.558.368a1 1 0 0 1 .215.364c.05.153.05.324.05.667V9.5m0 5v1.559c0 .342 0 .514-.05.666a.999.999 0 0 1-.215.364c-.109.119-.258.202-.558.368l-1.427.793m-9-7.5L12 12m0 0 2.25-1.25M12 12v2.5M3 7l2.25 1.25m13.5 0L21 7m-9 12.5V22"}));be.displayName="CubeOutline";const Ye=({size:o=24,color:e="currentColor",...s})=>E.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},E.createElement("path",{d:"m12 5.5-4.638 6.747c-.28.406-.42.609-.41.778a.5.5 0 0 0 .195.373c.135.102.38.102.874.102H12v5l4.638-6.747c.28-.406.42-.609.41-.778a.5.5 0 0 0-.195-.373c-.135-.102-.38-.102-.874-.102H12v-5Z"}),E.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));Ye.displayName="ZapCircle";const es=0,ts=38;function ss(){const o=[];for(let e=es;e<=ts;e++)o.push(`/icons/capy-${e}.png`);return o}const ls={sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16"},os=ss();function ns(o){const e=O.c(53),{value:s,onChange:n,name:l,size:r,className:d,fallbackIcon:c}=o,a=r===void 0?"lg":r,[i,u]=E.useState(""),[g,x]=E.useState(!1);let h;e[0]!==n?(h=w=>{n(w),x(!1),u("")},e[0]=n,e[1]=h):h=e[1];const p=h;let f;e[2]!==i||e[3]!==n?(f=()=>{const w=i.trim();w&&(n(w),x(!1),u(""))},e[2]=i,e[3]=n,e[4]=f):f=e[4];const b=f;let m;e[5]!==n?(m=()=>{n(null),x(!1),u("")},e[5]=n,e[6]=m):m=e[6];const j=m,v=ls[a];let C;e[7]!==d||e[8]!==v?(C=Q("relative group rounded-lg border border-border shrink-0 overflow-hidden cursor-pointer",v,d),e[7]=d,e[8]=v,e[9]=C):C=e[9];const y=s??"no-icon";let P;e[10]!==c||e[11]!==l||e[12]!==y||e[13]!==s?(P=t.jsx(is,{icon:s,name:l,fallbackIcon:c},y),e[10]=c,e[11]=l,e[12]=y,e[13]=s,e[14]=P):P=e[14];let R;e[15]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(mt,{size:16,className:"text-white"})}),e[15]=R):R=e[15];let S;e[16]!==C||e[17]!==P?(S=t.jsx(rt,{asChild:!0,children:t.jsxs("button",{type:"button",className:C,children:[P,R]})}),e[16]=C,e[17]=P,e[18]=S):S=e[18];let z;e[19]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("span",{className:"text-sm font-medium",children:"Choose icon"}),e[19]=z):z=e[19];let _;e[20]!==j||e[21]!==s?(_=s&&t.jsxs(q,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-xs text-muted-foreground",onClick:j,children:[t.jsx(ft,{size:12}),"Remove"]}),e[20]=j,e[21]=s,e[22]=_):_=e[22];let k;e[23]!==_?(k=t.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[z,_]}),e[23]=_,e[24]=k):k=e[24];let $;e[25]!==p||e[26]!==s?($=os.map(w=>t.jsx("button",{type:"button",onClick:()=>p(w),className:Q("h-9 w-9 rounded-md overflow-hidden border transition-colors hover:border-primary cursor-pointer",s===w?"border-primary ring-1 ring-primary":"border-transparent"),children:t.jsx("img",{src:w,alt:"",className:"h-full w-full object-cover",loading:"lazy"})},w)),e[25]=p,e[26]=s,e[27]=$):$=e[27];let A;e[28]!==$?(A=t.jsx(ct,{className:"h-48",children:t.jsx("div",{className:"grid grid-cols-7 gap-1 p-2",children:$})}),e[28]=$,e[29]=A):A=e[29];let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[30]=D):D=e[30];let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=w=>u(w.target.value),e[31]=L):L=e[31];let I;e[32]!==b?(I=w=>{w.key==="Enter"&&(w.preventDefault(),b())},e[32]=b,e[33]=I):I=e[33];let T;e[34]!==i||e[35]!==I?(T=t.jsx(Ie,{value:i,onChange:L,placeholder:"Paste image URL...",className:"h-7 text-xs",onKeyDown:I}),e[34]=i,e[35]=I,e[36]=T):T=e[36];let M;e[37]!==i?(M=i.trim(),e[37]=i,e[38]=M):M=e[38];const V=!M;let F;e[39]!==b||e[40]!==V?(F=t.jsx(q,{variant:"outline",size:"sm",className:"h-7 px-2 text-xs shrink-0",onClick:b,disabled:V,children:"Apply"}),e[39]=b,e[40]=V,e[41]=F):F=e[41];let B;e[42]!==T||e[43]!==F?(B=t.jsxs("div",{className:"flex items-center gap-1.5 p-2 border-t border-border",children:[D,T,F]}),e[42]=T,e[43]=F,e[44]=B):B=e[44];let G;e[45]!==k||e[46]!==A||e[47]!==B?(G=t.jsx(it,{align:"start",className:"w-80 p-0",onOpenAutoFocus:rs,children:t.jsxs("div",{className:"flex flex-col",children:[k,A,B]})}),e[45]=k,e[46]=A,e[47]=B,e[48]=G):G=e[48];let U;return e[49]!==g||e[50]!==S||e[51]!==G?(U=t.jsxs(at,{open:g,onOpenChange:x,children:[S,G]}),e[49]=g,e[50]=S,e[51]=G,e[52]=U):U=e[52],U}function rs(o){return o.preventDefault()}function is(o){const e=O.c(8),{icon:s,name:n,fallbackIcon:l}=o,[r,d]=E.useState(!1);if(!s||r){let i;e[0]!==l?(i=l??t.jsx(dt,{size:24,className:"text-muted-foreground"}),e[0]=l,e[1]=i):i=e[1];let u;return e[2]!==i?(u=t.jsx("div",{className:"h-full w-full flex items-center justify-center bg-muted/20",children:i}),e[2]=i,e[3]=u):u=e[3],u}let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>d(!0),e[4]=c):c=e[4];let a;return e[5]!==s||e[6]!==n?(a=t.jsx("img",{src:s,alt:n,className:"h-full w-full object-cover",onError:c}),e[5]=s,e[6]=n,e[7]=a):a=e[7],a}function Se(o){return o===null?"all":o?.length??0}function as(o,e){const s=o[e];if(!s)return"";const n=[];return s.tools===null?n.push("all tools"):s.tools&&s.tools.length>0&&n.push(`${s.tools.length} tools`),s.resources===null?n.push("all resources"):s.resources&&s.resources.length>0&&n.push(`${s.resources.length} resources`),s.prompts===null?n.push("all prompts"):s.prompts&&s.prompts.length>0&&n.push(`${s.prompts.length} prompts`),n.join(", ")}function cs(o,e){const s=o[e];return s?!((s.tools===void 0||s.tools!==null&&s.tools.length===0)&&(s.resources===void 0||s.resources!==null&&s.resources.length===0)&&(s.prompts===void 0||s.prompts!==null&&s.prompts.length===0)):!1}const ds={tools:null,resources:null,prompts:null};function ke(){const o=O.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(ze,{className:"animate-spin text-muted-foreground",size:24})}),o[0]=e):e=o[0],e}function Te(o){return({error:e})=>e?.message?.includes("Method not found")||e?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:o})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(Je,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:e?.message?e.message.length>200?`${e.message.slice(0,200)}...`:e.message:"An unexpected error occurred"})]})]})}function ms(o){const e=O.c(23),{item:s,isSelected:n,onToggle:l,disabled:r}=o,d=r?"cursor-not-allowed opacity-50":"cursor-pointer",c=n?"bg-accent/25":"hover:bg-muted/50";let a;e[0]!==d||e[1]!==c?(a=Q("flex items-start gap-3 p-4 rounded-lg transition-colors",d,c),e[0]=d,e[1]=c,e[2]=a):a=e[2];let i;e[3]!==s.name?(i=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=i):i=e[4];let u;e[5]!==s.tags?(u=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=u):u=e[6];let g;e[7]!==i||e[8]!==u?(g=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i,u]}),e[7]=i,e[8]=u,e[9]=g):g=e[9];let x;e[10]!==s.description?(x=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=x):x=e[11];let h;e[12]!==g||e[13]!==x?(h=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[g,x]}),e[12]=g,e[13]=x,e[14]=h):h=e[14];let p;e[15]!==r||e[16]!==n||e[17]!==l?(p=t.jsx(Pe,{checked:n,onCheckedChange:l,disabled:r,className:"mt-0.5"}),e[15]=r,e[16]=n,e[17]=l,e[18]=p):p=e[18];let f;return e[19]!==a||e[20]!==h||e[21]!==p?(f=t.jsxs("label",{className:a,children:[h,p]}),e[19]=a,e[20]=h,e[21]=p,e[22]=f):f=e[22],f}function Me(o){const e=O.c(32),{items:s,selections:n,onToggle:l,onToggleAll:r,emptyMessage:d,disabled:c}=o;let a,i,u,g,x;if(e[0]!==c||e[1]!==d||e[2]!==s||e[3]!==l||e[4]!==r||e[5]!==n){x=Symbol.for("react.early_return_sentinel");e:{const f=s.map(us);if(s.length===0){let y;e[11]!==d?(y=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:d})}),e[11]=d,e[12]=y):y=e[12],x=y;break e}u="flex flex-col h-full";const b=c?"cursor-not-allowed opacity-50":"cursor-pointer";let m;e[13]!==b?(m=Q("flex items-start gap-3 p-4",b),e[13]=b,e[14]=m):m=e[14];let j;e[15]!==s.length?(j=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("span",{className:"text-sm font-medium",children:["Select All (",s.length,")"]})}),e[15]=s.length,e[16]=j):j=e[16];const v=n===null;let C;e[17]!==c||e[18]!==r||e[19]!==v?(C=t.jsx(Pe,{checked:v,onCheckedChange:r,disabled:c,className:"mt-0.5"}),e[17]=c,e[18]=r,e[19]=v,e[20]=C):C=e[20],e[21]!==C||e[22]!==m||e[23]!==j?(g=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:m,children:[j,C]})}),e[21]=C,e[22]=m,e[23]=j,e[24]=g):g=e[24],a="flex-1 overflow-auto px-4 py-3 space-y-1",i=s.map(y=>t.jsx(ms,{item:y,isSelected:n===null||n?.includes(y.id),onToggle:()=>l(y.id,f),disabled:c},y.id))}e[0]=c,e[1]=d,e[2]=s,e[3]=l,e[4]=r,e[5]=n,e[6]=a,e[7]=i,e[8]=u,e[9]=g,e[10]=x}else a=e[6],i=e[7],u=e[8],g=e[9],x=e[10];if(x!==Symbol.for("react.early_return_sentinel"))return x;let h;e[25]!==a||e[26]!==i?(h=t.jsx("div",{className:a,children:i}),e[25]=a,e[26]=i,e[27]=h):h=e[27];let p;return e[28]!==u||e[29]!==g||e[30]!==h?(p=t.jsxs("div",{className:u,children:[g,h]}),e[28]=u,e[29]=g,e[30]=h,e[31]=p):p=e[31],p}function us(o){return o.id}function fs(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Ut(u);let x;e[5]!==g.tools?(x=g.tools.map(xs),e[5]=g.tools,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No tools available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function xs(o){return{id:o.name,name:o.name,description:o.description,tags:t.jsx(Pt,{annotations:o.annotations,_meta:o._meta})}}function ps(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Ht(u);let x;e[5]!==g.resources?(x=g.resources.map(hs),e[5]=g.resources,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No resources available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function hs(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function gs(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Kt(u);let x;e[5]!==g.prompts?(x=g.prompts.map(js),e[5]=g.prompts,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No prompts available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function js(o){return{id:o.name,name:o.name,description:o.description}}function bs(o){const e=O.c(24),{connection:s,isSelected:n,hasSelections:l,summary:r,onClick:d,onToggleAll:c,disabled:a}=o,i=a?"cursor-not-allowed opacity-50":"cursor-pointer",u=n?"bg-accent":"hover:bg-muted/50";let g;e[0]!==i||e[1]!==u?(g=Q("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",i,u),e[0]=i,e[1]=u,e[2]=g):g=e[2];const x=a?void 0:d;let h;e[3]!==s.icon||e[4]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=h):h=e[5];let p;e[6]!==s.title?(p=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=p):p=e[7];let f;e[8]!==l||e[9]!==r?(f=l&&r&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r}),e[8]=l,e[9]=r,e[10]=f):f=e[10];let b;e[11]!==p||e[12]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[p,f]}),e[11]=p,e[12]=f,e[13]=b):b=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==c?(m=t.jsx(Pe,{checked:l,onCheckedChange:c,onClick:Ns,disabled:a,className:"shrink-0"}),e[14]=a,e[15]=l,e[16]=c,e[17]=m):m=e[17];let j;return e[18]!==g||e[19]!==x||e[20]!==h||e[21]!==b||e[22]!==m?(j=t.jsxs("div",{className:g,onClick:x,children:[h,b,m]}),e[18]=g,e[19]=x,e[20]=h,e[21]=b,e[22]=m,e[23]=j):j=e[23],j}function Ns(o){return o.stopPropagation()}function vs(o){const e=O.c(22),{allConnections:s,searchTerm:n,selectedId:l,hasSelections:r,getSelectionSummary:d,onConnectionClick:c,onToggleAll:a,disabled:i}=o;let u;e[0]!==s||e[1]!==n?(u=n?s.filter(p=>p.title.toLowerCase().includes(n.toLowerCase())||p.description?.toLowerCase().includes(n.toLowerCase())):s,e[0]=s,e[1]=n,e[2]=u):u=e[2];const g=u;if(g.length===0){const p=n?"No connections found":"No connections available";let f;return e[3]!==p?(f=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:p}),e[3]=p,e[4]=f):f=e[4],f}let x;if(e[5]!==i||e[6]!==g||e[7]!==d||e[8]!==r||e[9]!==c||e[10]!==a||e[11]!==l){let p;e[13]!==i||e[14]!==d||e[15]!==r||e[16]!==c||e[17]!==a||e[18]!==l?(p=f=>t.jsx(bs,{connection:f,isSelected:l===f.id,hasSelections:r(f.id),summary:d(f.id),onClick:()=>c(f.id),onToggleAll:()=>a(f.id),disabled:i},f.id),e[13]=i,e[14]=d,e[15]=r,e[16]=c,e[17]=a,e[18]=l,e[19]=p):p=e[19],x=g.map(p),e[5]=i,e[6]=g,e[7]=d,e[8]=r,e[9]=c,e[10]=a,e[11]=l,e[12]=x}else x=e[12];let h;return e[20]!==x?(h=t.jsx("div",{className:"flex flex-col gap-0.5",children:x}),e[20]=x,e[21]=h):h=e[21],h}function ys(o){const e=O.c(75),{currentConnection:s,activeTab:n,selectedId:l,formData:r,toggleTool:d,toggleResource:c,togglePrompt:a,toggleAllTools:i,toggleAllResources:u,toggleAllPrompts:g,onTabChange:x}=o;let h;e[0]!==s.icon||e[1]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"md",className:"shrink-0"}),e[0]=s.icon,e[1]=s.title,e[2]=h):h=e[2];let p;e[3]!==s.title?(p=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=p):p=e[4];let f;e[5]!==s.description?(f=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=f):f=e[6];let b;e[7]!==p||e[8]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[p,f]}),e[7]=p,e[8]=f,e[9]=b):b=e[9];let m;e[10]!==h||e[11]!==b?(m=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[h,b]})}),e[10]=h,e[11]=b,e[12]=m):m=e[12];let j;e[13]!==x?(j=K=>x(K),e[13]=x,e[14]=j):j=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(ye,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Le,{size:16}),"Tools"]}),e[15]=v):v=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(ye,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(be,{size:16}),"Resources"]}),e[16]=C):C=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(Bt,{variant:"underline",className:"shrink-0 px-6",children:[v,C,t.jsxs(ye,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx(De,{size:16}),"Prompts"]})]}),e[17]=y):y=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=Te("Tools not supported by this server"),e[18]=P):P=e[18];let R;e[19]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(ke,{}),e[19]=R):R=e[19];let S;e[20]!==r||e[21]!==l?(S=r[l]?r[l].tools:[],e[20]=r,e[21]=l,e[22]=S):S=e[22];let z;e[23]!==l||e[24]!==d?(z=(K,J)=>d(l,K,J),e[23]=l,e[24]=d,e[25]=z):z=e[25];let _;e[26]!==l||e[27]!==i?(_=()=>i(l),e[26]=l,e[27]=i,e[28]=_):_=e[28];let k;e[29]!==l||e[30]!==S||e[31]!==z||e[32]!==_?(k=t.jsx(Ce,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:P,children:t.jsx(E.Suspense,{fallback:R,children:t.jsx(fs,{connectionId:l,selections:S,onToggle:z,onToggleAll:_})})})}),e[29]=l,e[30]=S,e[31]=z,e[32]=_,e[33]=k):k=e[33];let $;e[34]===Symbol.for("react.memo_cache_sentinel")?($=Te("Resources not supported by this server"),e[34]=$):$=e[34];let A;e[35]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ke,{}),e[35]=A):A=e[35];let D;e[36]!==r||e[37]!==l?(D=r[l]?r[l].resources:[],e[36]=r,e[37]=l,e[38]=D):D=e[38];let L;e[39]!==l||e[40]!==c?(L=(K,J)=>c(l,K,J),e[39]=l,e[40]=c,e[41]=L):L=e[41];let I;e[42]!==l||e[43]!==u?(I=()=>u(l),e[42]=l,e[43]=u,e[44]=I):I=e[44];let T;e[45]!==l||e[46]!==D||e[47]!==L||e[48]!==I?(T=t.jsx(Ce,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:$,children:t.jsx(E.Suspense,{fallback:A,children:t.jsx(ps,{connectionId:l,selections:D,onToggle:L,onToggleAll:I})})})}),e[45]=l,e[46]=D,e[47]=L,e[48]=I,e[49]=T):T=e[49];let M;e[50]===Symbol.for("react.memo_cache_sentinel")?(M=Te("Prompts not supported by this server"),e[50]=M):M=e[50];let V;e[51]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(ke,{}),e[51]=V):V=e[51];let F;e[52]!==r||e[53]!==l?(F=r[l]?r[l].prompts:[],e[52]=r,e[53]=l,e[54]=F):F=e[54];let B;e[55]!==l||e[56]!==a?(B=(K,J)=>a(l,K,J),e[55]=l,e[56]=a,e[57]=B):B=e[57];let G;e[58]!==l||e[59]!==g?(G=()=>g(l),e[58]=l,e[59]=g,e[60]=G):G=e[60];let U;e[61]!==l||e[62]!==F||e[63]!==B||e[64]!==G?(U=t.jsx(Ce,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:M,children:t.jsx(E.Suspense,{fallback:V,children:t.jsx(gs,{connectionId:l,selections:F,onToggle:B,onToggleAll:G})})})}),e[61]=l,e[62]=F,e[63]=B,e[64]=G,e[65]=U):U=e[65];let w;e[66]!==n||e[67]!==k||e[68]!==T||e[69]!==U||e[70]!==j?(w=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(Ft,{value:n,onValueChange:j,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[y,k,T,U]})}),e[66]=n,e[67]=k,e[68]=T,e[69]=U,e[70]=j,e[71]=w):w=e[71];let Z;return e[72]!==w||e[73]!==m?(Z=t.jsxs(t.Fragment,{children:[m,w]}),e[72]=w,e[73]=m,e[74]=Z):Z=e[74],Z}function Cs(o){const e={};for(const s of o)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function we(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function _s(o,e){switch(e.type){case"SET_SEARCH_TERM":return{...o,searchTerm:e.payload};case"SET_SELECTED":return{...o,selectedId:e.payload};case"SET_ACTIVE_TAB":return{...o,activeTab:e.payload};case"RESET":return{searchTerm:"",selectedId:e.payload.selectedId??e.payload.firstConnectionId??null,activeTab:"tools"};case"SELECT_CONNECTION":return{...o,selectedId:e.payload,activeTab:"tools"};default:return o}}const Ss=(o,e)=>o.find(s=>s.id===e)??o[0];function ks(o){const e=O.c(77),{open:s,onOpenChange:n,selectedId:l,form:r,connections:d}=o;let c;e[0]!==l?(c={activeTab:"tools",searchTerm:"",selectedId:l},e[0]=l,e[1]=c):c=e[1];const[a,i]=E.useReducer(_s,c),u=E.useDeferredValue(a.searchTerm);let g;e[2]!==u?(g={searchTerm:u},e[2]=u,e[3]=g):g=e[3];const x=vt(g);let h;e[4]!==d?(h=d??[],e[4]=d,e[5]=h):h=e[5];let p;e[6]!==h?(p=Cs(h),e[6]=h,e[7]=p):p=e[7];const f=p;let b;e[8]!==x||e[9]!==a.selectedId?(b=Ss(x,a.selectedId),e[8]=x,e[9]=a.selectedId,e[10]=b):b=e[10];const m=b,j=m?.id??null;let v;e[11]!==f?(v=N=>cs(f,N),e[11]=f,e[12]=v):v=e[12];const C=v;let y;e[13]!==f?(y=N=>as(f,N),e[13]=f,e[14]=y):y=e[14];const P=y;let R;e[15]!==r||e[16]!==f?(R=(N,H,W,X)=>{const ie=f[N]?.[H];let Y;ie===null?Y=X.filter(Ne=>Ne!==W):ie?.includes(W)?Y=ie.filter(Ne=>Ne!==W):(Y=[...ie??[],W],Y.length===X.length&&(Y=null));const ae={...f};ae[N]?ae[N]={...ae[N]}:ae[N]={tools:null,resources:null,prompts:null},ae[N][H]=Y,r.setValue("connections",we(ae),{shouldDirty:!0,shouldTouch:!0})},e[15]=r,e[16]=f,e[17]=R):R=e[17];const S=R;let z;e[18]!==r||e[19]!==f?(z=(N,H)=>{const ie=f[N]?.[H]===null?[]:null,Y={...f};Y[N]?Y[N]={...Y[N]}:Y[N]={tools:null,resources:null,prompts:null},Y[N][H]=ie,r.setValue("connections",we(Y),{shouldDirty:!0,shouldTouch:!0})},e[18]=r,e[19]=f,e[20]=z):z=e[20];const _=z;let k;e[21]!==S?(k=(N,H,W)=>S(N,"tools",H,W),e[21]=S,e[22]=k):k=e[22];const $=k;let A;e[23]!==S?(A=(N,H,W)=>S(N,"resources",H,W),e[23]=S,e[24]=A):A=e[24];const D=A;let L;e[25]!==S?(L=(N,H,W)=>S(N,"prompts",H,W),e[25]=S,e[26]=L):L=e[26];const I=L;let T;e[27]!==_?(T=N=>_(N,"tools"),e[27]=_,e[28]=T):T=e[28];const M=T;let V;e[29]!==_?(V=N=>_(N,"resources"),e[29]=_,e[30]=V):V=e[30];const F=V;let B;e[31]!==_?(B=N=>_(N,"prompts"),e[31]=_,e[32]=B):B=e[32];const G=B;let U;e[33]!==r||e[34]!==f?(U=N=>{const H=f[N],W=H&&H.tools===null&&H.resources===null&&H.prompts===null,X={...f};W?delete X[N]:X[N]=ds,r.setValue("connections",we(X),{shouldDirty:!0,shouldTouch:!0})},e[33]=r,e[34]=f,e[35]=U):U=e[35];const w=U;let Z;e[36]!==x||e[37]!==n||e[38]!==l?(Z=N=>{N&&i({type:"RESET",payload:{selectedId:l,firstConnectionId:x[0]?.id??null}}),n(N)},e[36]=x,e[37]=n,e[38]=l,e[39]=Z):Z=e[39];const K=Z;let J;e[40]===Symbol.for("react.memo_cache_sentinel")?(J=N=>{i({type:"SELECT_CONNECTION",payload:N})},e[40]=J):J=e[40];const qe=J;let me;e[41]===Symbol.for("react.memo_cache_sentinel")?(me=N=>i({type:"SET_SEARCH_TERM",payload:N}),e[41]=me):me=e[41];let ee;e[42]!==a.searchTerm?(ee=t.jsx(Lt,{value:a.searchTerm,onChange:me,placeholder:"Search connections..."}),e[42]=a.searchTerm,e[43]=ee):ee=e[43];let te;e[44]!==x||e[45]!==a.searchTerm||e[46]!==j||e[47]!==P||e[48]!==C||e[49]!==w?(te=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(vs,{allConnections:x,searchTerm:a.searchTerm,selectedId:j,hasSelections:C,getSelectionSummary:P,onConnectionClick:qe,onToggleAll:w})}),e[44]=x,e[45]=a.searchTerm,e[46]=j,e[47]=P,e[48]=C,e[49]=w,e[50]=te):te=e[50];let se;e[51]!==ee||e[52]!==te?(se=t.jsxs("div",{className:"w-full sm:w-72 sm:border-r border-b sm:border-b-0 border-border flex flex-col bg-background sm:h-full max-h-[40vh] sm:max-h-full",children:[ee,te]}),e[51]=ee,e[52]=te,e[53]=se):se=e[53];let le;e[54]!==m||e[55]!==a.activeTab||e[56]!==j||e[57]!==f||e[58]!==G||e[59]!==F||e[60]!==M||e[61]!==I||e[62]!==D||e[63]!==$?(le=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:m&&j?t.jsx(ys,{currentConnection:m,activeTab:a.activeTab,selectedId:j,formData:f,toggleTool:$,toggleResource:D,togglePrompt:I,toggleAllTools:M,toggleAllResources:F,toggleAllPrompts:G,onTabChange:N=>i({type:"SET_ACTIVE_TAB",payload:N})},j):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Select a connection to view its tools, resources, and prompts"})}),e[54]=m,e[55]=a.activeTab,e[56]=j,e[57]=f,e[58]=G,e[59]=F,e[60]=M,e[61]=I,e[62]=D,e[63]=$,e[64]=le):le=e[64];let oe;e[65]!==se||e[66]!==le?(oe=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[se,le]}),e[65]=se,e[66]=le,e[67]=oe):oe=e[67];let ne;e[68]!==K?(ne=t.jsx(Rt,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(q,{variant:"outline",onClick:()=>K(!1),children:"Done"})}),e[68]=K,e[69]=ne):ne=e[69];let re;e[70]!==oe||e[71]!==ne?(re=t.jsxs(He,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[oe,ne]}),e[70]=oe,e[71]=ne,e[72]=re):re=e[72];let ue;return e[73]!==K||e[74]!==s||e[75]!==re?(ue=t.jsx(Ke,{open:s,onOpenChange:K,children:re}),e[73]=K,e[74]=s,e[75]=re,e[76]=ue):ue=e[76],ue}const Ts=Ze.pick({title:!0,description:!0,icon:!0,status:!0,metadata:!0,connections:!0}).extend({title:Qe().min(1,"Name is required").max(255)});function ws(o){const e=O.c(8);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=Q("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx(Yt,{"data-slot":"radio-group",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Ee(o){const e=O.c(9);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=Q("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=l):l=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(qt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Jt,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=r):r=e[5];let d;return e[6]!==n||e[7]!==l?(d=t.jsx(Wt,{"data-slot":"radio-group-item",className:l,...n,children:r}),e[6]=n,e[7]=l,e[8]=d):d=e[8],d}function Es(o){const s=new TextEncoder().encode(o),n=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(n)}function Is(o){const e=O.c(10),{url:s}=o,[n,l]=E.useState(!1);let r;e[0]!==s?(r=async()=>{await navigator.clipboard.writeText(s),l(!0),ce.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=r):r=e[1];const d=r;let c;e[2]!==n?(c=n?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx(Re,{size:20}),e[2]=n,e[3]=c):c=e[3];const a=n?"Copied!":"Copy URL";let i;e[4]!==a?(i=t.jsx("span",{className:"text-xs font-medium",children:a}),e[4]=a,e[5]=i):i=e[5];let u;return e[6]!==d||e[7]!==c||e[8]!==i?(u=t.jsxs(q,{type:"button",variant:"outline",onClick:d,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[c,i]}),e[6]=d,e[7]=c,e[8]=i,e[9]=u):u=e[9],u}function As(o){const e=O.c(7),{url:s,serverName:n}=o;let l;e[0]!==n||e[1]!==s?(l=()=>{const i=We(n),g=Es(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),x=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(i)}&config=${encodeURIComponent(g)}`;window.open(x,"_blank"),ce.success("Opening Cursor...")},e[0]=n,e[1]=s,e[2]=l):l=e[2];const r=l;let d,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),c=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=d,e[4]=c):(d=e[3],c=e[4]);let a;return e[5]!==r?(a=t.jsxs(q,{type:"button",variant:"outline",onClick:r,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[d,c]}),e[5]=r,e[6]=a):a=e[6],a}function Os(o){const e=O.c(11),{url:s,serverName:n}=o,[l,r]=E.useState(!1);let d;e[0]!==n||e[1]!==s?(d=async()=>{const x=We(n),p=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),f=`claude mcp add-json "${x}" '${p.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(f),r(!0),ce.success("Claude Code command copied to clipboard"),setTimeout(()=>r(!1),2e3)},e[0]=n,e[1]=s,e[2]=d):d=e[2];const c=d;let a;e[3]!==l?(a=l?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=l,e[4]=a):a=e[4];const i=l?"Copied!":"Install on Claude";let u;e[5]!==i?(u=t.jsx("span",{className:"text-xs font-medium",children:i}),e[5]=i,e[6]=u):u=e[6];let g;return e[7]!==c||e[8]!==a||e[9]!==u?(g=t.jsxs(q,{type:"button",variant:"outline",onClick:c,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[a,u]}),e[7]=c,e[8]=a,e[9]=u,e[10]=g):g=e[10],g}function $s({virtualMcp:o}){const{org:e}=de(),s=ge({connectionId:Gt,orgId:e.id}),[n,l]=E.useState(null),[r,d]=E.useState(!1),[c,a]=E.useState(!1),i=o.id,u=o.title||`agent-${i.slice(0,8)}`,g=n?`bunx @decocms/typegen@latest --mcp ${i} --key ${n} --output client.ts`:`bunx @decocms/typegen@latest --mcp ${i} --key <api-key> --output client.ts`,x=async()=>{d(!0);try{const f=(await s.callTool({name:"API_KEY_CREATE",arguments:{name:`typegen-${u}`,permissions:{[i]:["*"]}}})).structuredContent?.key;if(!f)throw new Error("No key in response");l(f)}catch{ce.error("Failed to generate API key")}finally{d(!1)}},h=async()=>{await navigator.clipboard.writeText(g),a(!0),ce.success("Command copied to clipboard"),setTimeout(()=>a(!1),2e3)};return t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("h4",{className:"text-sm font-medium text-foreground",children:"Generate typed client"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Introspects this agent and writes a typed"," ",t.jsx("code",{className:"font-mono",children:"client.ts"})," you can import directly."]})]}),!n&&t.jsxs(q,{type:"button",variant:"outline",size:"sm",className:"shrink-0 gap-1.5",onClick:x,disabled:r,children:[r?t.jsx(ze,{size:14,className:"animate-spin"}):t.jsx(Qt,{size:14}),t.jsx("span",{children:r?"Generating…":"Generate API key"})]})]}),n&&t.jsx("p",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700",children:"Store this key securely — it won't be shown again."}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Generate client"}),t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("code",{className:"min-w-0 flex-1 break-all font-mono text-xs text-muted-foreground",children:g}),t.jsx(q,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:h,children:c?t.jsx(je,{size:12,className:"text-green-600"}):t.jsx(Re,{size:12})})]})}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Runtime variables"}),t.jsx(Ds,{apiKey:n})]})}function Ds(o){const e=O.c(19),{apiKey:s}=o,[n,l]=E.useState(!1),r=window.location.origin,d=s?`MESH_API_KEY=${s}`:"MESH_API_KEY=<api-key>",c=`MESH_BASE_URL=${r}`,a=`${d}
|
|
1
|
+
import{r as E,c as O,D as Q,j as t,B as q,E as fe,ad as Je,u as de,V as Ze,n as Qe,v as ce,e as Xe,g as et,O as Ge,t as tt,q as st,Q as lt,U as Ve}from"./index-NjMxPJgF.js";import{u as ot}from"./context-DxQMlFKC.js";import{E as nt}from"./empty-state-xIvMMy-_.js";import{I as Ie}from"./input-B89sozd8.js";import{P as rt,a as it,b as at}from"./popover-Br8QkMK3.js";import{S as ct}from"./scroll-area-BTJQ86Ry.js";import{n as dt}from"./Container-DHyMOW_p.js";import{i as mt}from"./Edit05-CbbEzOoe.js";import{i as ut}from"./Link01-Cz_ZRKoB.js";import{s as ft}from"./XClose-CcNXqPQc.js";import{I as Oe}from"./integration-icon-BPVDVJvP.js";import{a as xt}from"./index-De1iYnQy.js";import{B as $e}from"./badge-DtRom7JO.js";import{i as pt,a as ht,C as gt,b as jt}from"./collapsible-BtjeaBAE.js";import{S as bt}from"./switch-CA_oYDia.js";import{T as Nt}from"./textarea-DIJzFUWn.js";import{a as xe,c as ve,T as pe,b as he}from"./tooltip-BJMSu0c2.js";import{b as vt,u as yt}from"./use-connection-CHFdKnsr.js";import{u as Ct,a as _t}from"./use-virtual-mcp-BP6aaUzw.js";import{i as Ue}from"./ChevronRight-DsjLlugM.js";import{n as St}from"./ChevronUp-Bi3NMXzv.js";import{i as De}from"./File02-D19u2hUl.js";import{i as ze}from"./Loading01-Bb8FCosd.js";import{i as kt}from"./Play-Bw5lQw7j.js";import{s as Be}from"./Plus-CajZ9VfC.js";import{a as Le}from"./Tool01-D1m8i7Ez.js";import{t as Tt}from"./Users03-Bv-hUQkl.js";import{B as wt,a as Et,b as Fe,d as It,e as At,c as Ot}from"./breadcrumb-C2RG4nAQ.js";import{a as $t,V as Dt}from"./layout-DcmGLVHZ.js";import{S as zt}from"./save-actions-CVl6VtT2.js";import{C as Lt}from"./collection-search-BYV7N3mr.js";import{T as Pt}from"./tools-list-D-T64862.js";import{C as Pe}from"./checkbox-B1rexahu.js";import{e as Rt,a as He,D as Ke,b as Mt,c as Vt}from"./dialog-ChXYvlDt.js";import{T as ye,a as Bt,b as Ce,c as Ft}from"./tabs-BSOe8gLq.js";import{u as ge,a as Gt}from"./constants-D7qXOYRn.js";import{c as Ut}from"./use-mcp-tools-BCZI_Wqc.js";import{a as Ht}from"./use-mcp-resources-qGdymfRz.js";import{u as Kt}from"./use-mcp-prompts-Bel4H4rh.js";import{s as We}from"./slugify-CEUa2lfQ.js";import{I as Wt,R as Yt,a as qt}from"./index-ChUIqRBi.js";import{k as Jt}from"./dropdown-menu-BxlQMXgW.js";import{i as je}from"./Check-DW8AVFkq.js";import{i as Zt}from"./Code01-YGq5QwlZ.js";import{a as Re}from"./Copy01-DkcjIGiS.js";import{i as _e}from"./InfoCircle-DzyfpQes.js";import{i as Qt}from"./Key01-qNySmY39.js";import{A as Xt}from"./agent-connections-preview-3pYXfstj.js";import"./decopilot-events-Brt4gAR6.js";import"./index-YL7q5tyF.js";import"./useQuery-BYBCFxgb.js";import"./useMutation-68NxhXCf.js";import"./index-yiVP4brl.js";import"./index-CqyqI90F.js";import"./use-collections-C0cYiFfV.js";import"./Save01-8oEsqMkJ.js";import"./SearchMd-eZWeU0sP.js";import"./collection-display-button-CpVZ4wHm.js";import"./ArrowDown-7rbX3zqZ.js";import"./ArrowUp-DoIG5eQh.js";import"./Grid01-C5e9ReQ4.js";import"./List-NLa0AhO4.js";import"./collection-table-wrapper-CHFJQd21.js";import"./table-C-1rP_rt.js";import"./card-B8qDZGCZ.js";import"./types-BHeMLyAV.js";import"./Eye-hBqNQHpc.js";import"./Globe02-wRhoc1N5.js";import"./LayersTwo01-dfSlQT0y.js";import"./X-LzehymHS.js";const be=({size:o=24,color:e="currentColor",...s})=>E.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},E.createElement("path",{d:"m9.75 20.75 1.473.818c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l1.473-.818m-9-2.5-1.427-.793c-.3-.166-.45-.25-.558-.368a1 1 0 0 1-.215-.364C3 16.573 3 16.401 3 16.06V14.5m0-5V7.942c0-.343 0-.514.05-.667a1 1 0 0 1 .215-.364c.109-.119.258-.202.558-.368L5.25 5.75m4.5-2.5 1.473-.818c.284-.158.425-.237.576-.267a1 1 0 0 1 .402 0c.15.03.292.11.576.267l1.473.818m4.5 2.5 1.427.793c.3.166.45.25.558.368a1 1 0 0 1 .215.364c.05.153.05.324.05.667V9.5m0 5v1.559c0 .342 0 .514-.05.666a.999.999 0 0 1-.215.364c-.109.119-.258.202-.558.368l-1.427.793m-9-7.5L12 12m0 0 2.25-1.25M12 12v2.5M3 7l2.25 1.25m13.5 0L21 7m-9 12.5V22"}));be.displayName="CubeOutline";const Ye=({size:o=24,color:e="currentColor",...s})=>E.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},E.createElement("path",{d:"m12 5.5-4.638 6.747c-.28.406-.42.609-.41.778a.5.5 0 0 0 .195.373c.135.102.38.102.874.102H12v5l4.638-6.747c.28-.406.42-.609.41-.778a.5.5 0 0 0-.195-.373c-.135-.102-.38-.102-.874-.102H12v-5Z"}),E.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));Ye.displayName="ZapCircle";const es=0,ts=38;function ss(){const o=[];for(let e=es;e<=ts;e++)o.push(`/icons/capy-${e}.png`);return o}const ls={sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16"},os=ss();function ns(o){const e=O.c(53),{value:s,onChange:n,name:l,size:r,className:d,fallbackIcon:c}=o,a=r===void 0?"lg":r,[i,u]=E.useState(""),[g,x]=E.useState(!1);let h;e[0]!==n?(h=w=>{n(w),x(!1),u("")},e[0]=n,e[1]=h):h=e[1];const p=h;let f;e[2]!==i||e[3]!==n?(f=()=>{const w=i.trim();w&&(n(w),x(!1),u(""))},e[2]=i,e[3]=n,e[4]=f):f=e[4];const b=f;let m;e[5]!==n?(m=()=>{n(null),x(!1),u("")},e[5]=n,e[6]=m):m=e[6];const j=m,v=ls[a];let C;e[7]!==d||e[8]!==v?(C=Q("relative group rounded-lg border border-border shrink-0 overflow-hidden cursor-pointer",v,d),e[7]=d,e[8]=v,e[9]=C):C=e[9];const y=s??"no-icon";let P;e[10]!==c||e[11]!==l||e[12]!==y||e[13]!==s?(P=t.jsx(is,{icon:s,name:l,fallbackIcon:c},y),e[10]=c,e[11]=l,e[12]=y,e[13]=s,e[14]=P):P=e[14];let R;e[15]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(mt,{size:16,className:"text-white"})}),e[15]=R):R=e[15];let S;e[16]!==C||e[17]!==P?(S=t.jsx(rt,{asChild:!0,children:t.jsxs("button",{type:"button",className:C,children:[P,R]})}),e[16]=C,e[17]=P,e[18]=S):S=e[18];let z;e[19]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("span",{className:"text-sm font-medium",children:"Choose icon"}),e[19]=z):z=e[19];let _;e[20]!==j||e[21]!==s?(_=s&&t.jsxs(q,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-xs text-muted-foreground",onClick:j,children:[t.jsx(ft,{size:12}),"Remove"]}),e[20]=j,e[21]=s,e[22]=_):_=e[22];let k;e[23]!==_?(k=t.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[z,_]}),e[23]=_,e[24]=k):k=e[24];let $;e[25]!==p||e[26]!==s?($=os.map(w=>t.jsx("button",{type:"button",onClick:()=>p(w),className:Q("h-9 w-9 rounded-md overflow-hidden border transition-colors hover:border-primary cursor-pointer",s===w?"border-primary ring-1 ring-primary":"border-transparent"),children:t.jsx("img",{src:w,alt:"",className:"h-full w-full object-cover",loading:"lazy"})},w)),e[25]=p,e[26]=s,e[27]=$):$=e[27];let A;e[28]!==$?(A=t.jsx(ct,{className:"h-48",children:t.jsx("div",{className:"grid grid-cols-7 gap-1 p-2",children:$})}),e[28]=$,e[29]=A):A=e[29];let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[30]=D):D=e[30];let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=w=>u(w.target.value),e[31]=L):L=e[31];let I;e[32]!==b?(I=w=>{w.key==="Enter"&&(w.preventDefault(),b())},e[32]=b,e[33]=I):I=e[33];let T;e[34]!==i||e[35]!==I?(T=t.jsx(Ie,{value:i,onChange:L,placeholder:"Paste image URL...",className:"h-7 text-xs",onKeyDown:I}),e[34]=i,e[35]=I,e[36]=T):T=e[36];let M;e[37]!==i?(M=i.trim(),e[37]=i,e[38]=M):M=e[38];const V=!M;let F;e[39]!==b||e[40]!==V?(F=t.jsx(q,{variant:"outline",size:"sm",className:"h-7 px-2 text-xs shrink-0",onClick:b,disabled:V,children:"Apply"}),e[39]=b,e[40]=V,e[41]=F):F=e[41];let B;e[42]!==T||e[43]!==F?(B=t.jsxs("div",{className:"flex items-center gap-1.5 p-2 border-t border-border",children:[D,T,F]}),e[42]=T,e[43]=F,e[44]=B):B=e[44];let G;e[45]!==k||e[46]!==A||e[47]!==B?(G=t.jsx(it,{align:"start",className:"w-80 p-0",onOpenAutoFocus:rs,children:t.jsxs("div",{className:"flex flex-col",children:[k,A,B]})}),e[45]=k,e[46]=A,e[47]=B,e[48]=G):G=e[48];let U;return e[49]!==g||e[50]!==S||e[51]!==G?(U=t.jsxs(at,{open:g,onOpenChange:x,children:[S,G]}),e[49]=g,e[50]=S,e[51]=G,e[52]=U):U=e[52],U}function rs(o){return o.preventDefault()}function is(o){const e=O.c(8),{icon:s,name:n,fallbackIcon:l}=o,[r,d]=E.useState(!1);if(!s||r){let i;e[0]!==l?(i=l??t.jsx(dt,{size:24,className:"text-muted-foreground"}),e[0]=l,e[1]=i):i=e[1];let u;return e[2]!==i?(u=t.jsx("div",{className:"h-full w-full flex items-center justify-center bg-muted/20",children:i}),e[2]=i,e[3]=u):u=e[3],u}let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>d(!0),e[4]=c):c=e[4];let a;return e[5]!==s||e[6]!==n?(a=t.jsx("img",{src:s,alt:n,className:"h-full w-full object-cover",onError:c}),e[5]=s,e[6]=n,e[7]=a):a=e[7],a}function Se(o){return o===null?"all":o?.length??0}function as(o,e){const s=o[e];if(!s)return"";const n=[];return s.tools===null?n.push("all tools"):s.tools&&s.tools.length>0&&n.push(`${s.tools.length} tools`),s.resources===null?n.push("all resources"):s.resources&&s.resources.length>0&&n.push(`${s.resources.length} resources`),s.prompts===null?n.push("all prompts"):s.prompts&&s.prompts.length>0&&n.push(`${s.prompts.length} prompts`),n.join(", ")}function cs(o,e){const s=o[e];return s?!((s.tools===void 0||s.tools!==null&&s.tools.length===0)&&(s.resources===void 0||s.resources!==null&&s.resources.length===0)&&(s.prompts===void 0||s.prompts!==null&&s.prompts.length===0)):!1}const ds={tools:null,resources:null,prompts:null};function ke(){const o=O.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(ze,{className:"animate-spin text-muted-foreground",size:24})}),o[0]=e):e=o[0],e}function Te(o){return({error:e})=>e?.message?.includes("Method not found")||e?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:o})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(Je,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:e?.message?e.message.length>200?`${e.message.slice(0,200)}...`:e.message:"An unexpected error occurred"})]})]})}function ms(o){const e=O.c(23),{item:s,isSelected:n,onToggle:l,disabled:r}=o,d=r?"cursor-not-allowed opacity-50":"cursor-pointer",c=n?"bg-accent/25":"hover:bg-muted/50";let a;e[0]!==d||e[1]!==c?(a=Q("flex items-start gap-3 p-4 rounded-lg transition-colors",d,c),e[0]=d,e[1]=c,e[2]=a):a=e[2];let i;e[3]!==s.name?(i=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=i):i=e[4];let u;e[5]!==s.tags?(u=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=u):u=e[6];let g;e[7]!==i||e[8]!==u?(g=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i,u]}),e[7]=i,e[8]=u,e[9]=g):g=e[9];let x;e[10]!==s.description?(x=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=x):x=e[11];let h;e[12]!==g||e[13]!==x?(h=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[g,x]}),e[12]=g,e[13]=x,e[14]=h):h=e[14];let p;e[15]!==r||e[16]!==n||e[17]!==l?(p=t.jsx(Pe,{checked:n,onCheckedChange:l,disabled:r,className:"mt-0.5"}),e[15]=r,e[16]=n,e[17]=l,e[18]=p):p=e[18];let f;return e[19]!==a||e[20]!==h||e[21]!==p?(f=t.jsxs("label",{className:a,children:[h,p]}),e[19]=a,e[20]=h,e[21]=p,e[22]=f):f=e[22],f}function Me(o){const e=O.c(32),{items:s,selections:n,onToggle:l,onToggleAll:r,emptyMessage:d,disabled:c}=o;let a,i,u,g,x;if(e[0]!==c||e[1]!==d||e[2]!==s||e[3]!==l||e[4]!==r||e[5]!==n){x=Symbol.for("react.early_return_sentinel");e:{const f=s.map(us);if(s.length===0){let y;e[11]!==d?(y=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:d})}),e[11]=d,e[12]=y):y=e[12],x=y;break e}u="flex flex-col h-full";const b=c?"cursor-not-allowed opacity-50":"cursor-pointer";let m;e[13]!==b?(m=Q("flex items-start gap-3 p-4",b),e[13]=b,e[14]=m):m=e[14];let j;e[15]!==s.length?(j=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("span",{className:"text-sm font-medium",children:["Select All (",s.length,")"]})}),e[15]=s.length,e[16]=j):j=e[16];const v=n===null;let C;e[17]!==c||e[18]!==r||e[19]!==v?(C=t.jsx(Pe,{checked:v,onCheckedChange:r,disabled:c,className:"mt-0.5"}),e[17]=c,e[18]=r,e[19]=v,e[20]=C):C=e[20],e[21]!==C||e[22]!==m||e[23]!==j?(g=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:m,children:[j,C]})}),e[21]=C,e[22]=m,e[23]=j,e[24]=g):g=e[24],a="flex-1 overflow-auto px-4 py-3 space-y-1",i=s.map(y=>t.jsx(ms,{item:y,isSelected:n===null||n?.includes(y.id),onToggle:()=>l(y.id,f),disabled:c},y.id))}e[0]=c,e[1]=d,e[2]=s,e[3]=l,e[4]=r,e[5]=n,e[6]=a,e[7]=i,e[8]=u,e[9]=g,e[10]=x}else a=e[6],i=e[7],u=e[8],g=e[9],x=e[10];if(x!==Symbol.for("react.early_return_sentinel"))return x;let h;e[25]!==a||e[26]!==i?(h=t.jsx("div",{className:a,children:i}),e[25]=a,e[26]=i,e[27]=h):h=e[27];let p;return e[28]!==u||e[29]!==g||e[30]!==h?(p=t.jsxs("div",{className:u,children:[g,h]}),e[28]=u,e[29]=g,e[30]=h,e[31]=p):p=e[31],p}function us(o){return o.id}function fs(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Ut(u);let x;e[5]!==g.tools?(x=g.tools.map(xs),e[5]=g.tools,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No tools available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function xs(o){return{id:o.name,name:o.name,description:o.description,tags:t.jsx(Pt,{annotations:o.annotations,_meta:o._meta})}}function ps(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Ht(u);let x;e[5]!==g.resources?(x=g.resources.map(hs),e[5]=g.resources,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No resources available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function hs(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function gs(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Kt(u);let x;e[5]!==g.prompts?(x=g.prompts.map(js),e[5]=g.prompts,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No prompts available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function js(o){return{id:o.name,name:o.name,description:o.description}}function bs(o){const e=O.c(24),{connection:s,isSelected:n,hasSelections:l,summary:r,onClick:d,onToggleAll:c,disabled:a}=o,i=a?"cursor-not-allowed opacity-50":"cursor-pointer",u=n?"bg-accent":"hover:bg-muted/50";let g;e[0]!==i||e[1]!==u?(g=Q("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",i,u),e[0]=i,e[1]=u,e[2]=g):g=e[2];const x=a?void 0:d;let h;e[3]!==s.icon||e[4]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=h):h=e[5];let p;e[6]!==s.title?(p=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=p):p=e[7];let f;e[8]!==l||e[9]!==r?(f=l&&r&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r}),e[8]=l,e[9]=r,e[10]=f):f=e[10];let b;e[11]!==p||e[12]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[p,f]}),e[11]=p,e[12]=f,e[13]=b):b=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==c?(m=t.jsx(Pe,{checked:l,onCheckedChange:c,onClick:Ns,disabled:a,className:"shrink-0"}),e[14]=a,e[15]=l,e[16]=c,e[17]=m):m=e[17];let j;return e[18]!==g||e[19]!==x||e[20]!==h||e[21]!==b||e[22]!==m?(j=t.jsxs("div",{className:g,onClick:x,children:[h,b,m]}),e[18]=g,e[19]=x,e[20]=h,e[21]=b,e[22]=m,e[23]=j):j=e[23],j}function Ns(o){return o.stopPropagation()}function vs(o){const e=O.c(22),{allConnections:s,searchTerm:n,selectedId:l,hasSelections:r,getSelectionSummary:d,onConnectionClick:c,onToggleAll:a,disabled:i}=o;let u;e[0]!==s||e[1]!==n?(u=n?s.filter(p=>p.title.toLowerCase().includes(n.toLowerCase())||p.description?.toLowerCase().includes(n.toLowerCase())):s,e[0]=s,e[1]=n,e[2]=u):u=e[2];const g=u;if(g.length===0){const p=n?"No connections found":"No connections available";let f;return e[3]!==p?(f=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:p}),e[3]=p,e[4]=f):f=e[4],f}let x;if(e[5]!==i||e[6]!==g||e[7]!==d||e[8]!==r||e[9]!==c||e[10]!==a||e[11]!==l){let p;e[13]!==i||e[14]!==d||e[15]!==r||e[16]!==c||e[17]!==a||e[18]!==l?(p=f=>t.jsx(bs,{connection:f,isSelected:l===f.id,hasSelections:r(f.id),summary:d(f.id),onClick:()=>c(f.id),onToggleAll:()=>a(f.id),disabled:i},f.id),e[13]=i,e[14]=d,e[15]=r,e[16]=c,e[17]=a,e[18]=l,e[19]=p):p=e[19],x=g.map(p),e[5]=i,e[6]=g,e[7]=d,e[8]=r,e[9]=c,e[10]=a,e[11]=l,e[12]=x}else x=e[12];let h;return e[20]!==x?(h=t.jsx("div",{className:"flex flex-col gap-0.5",children:x}),e[20]=x,e[21]=h):h=e[21],h}function ys(o){const e=O.c(75),{currentConnection:s,activeTab:n,selectedId:l,formData:r,toggleTool:d,toggleResource:c,togglePrompt:a,toggleAllTools:i,toggleAllResources:u,toggleAllPrompts:g,onTabChange:x}=o;let h;e[0]!==s.icon||e[1]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"md",className:"shrink-0"}),e[0]=s.icon,e[1]=s.title,e[2]=h):h=e[2];let p;e[3]!==s.title?(p=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=p):p=e[4];let f;e[5]!==s.description?(f=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=f):f=e[6];let b;e[7]!==p||e[8]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[p,f]}),e[7]=p,e[8]=f,e[9]=b):b=e[9];let m;e[10]!==h||e[11]!==b?(m=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[h,b]})}),e[10]=h,e[11]=b,e[12]=m):m=e[12];let j;e[13]!==x?(j=K=>x(K),e[13]=x,e[14]=j):j=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(ye,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Le,{size:16}),"Tools"]}),e[15]=v):v=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(ye,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(be,{size:16}),"Resources"]}),e[16]=C):C=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(Bt,{variant:"underline",className:"shrink-0 px-6",children:[v,C,t.jsxs(ye,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx(De,{size:16}),"Prompts"]})]}),e[17]=y):y=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=Te("Tools not supported by this server"),e[18]=P):P=e[18];let R;e[19]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(ke,{}),e[19]=R):R=e[19];let S;e[20]!==r||e[21]!==l?(S=r[l]?r[l].tools:[],e[20]=r,e[21]=l,e[22]=S):S=e[22];let z;e[23]!==l||e[24]!==d?(z=(K,J)=>d(l,K,J),e[23]=l,e[24]=d,e[25]=z):z=e[25];let _;e[26]!==l||e[27]!==i?(_=()=>i(l),e[26]=l,e[27]=i,e[28]=_):_=e[28];let k;e[29]!==l||e[30]!==S||e[31]!==z||e[32]!==_?(k=t.jsx(Ce,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:P,children:t.jsx(E.Suspense,{fallback:R,children:t.jsx(fs,{connectionId:l,selections:S,onToggle:z,onToggleAll:_})})})}),e[29]=l,e[30]=S,e[31]=z,e[32]=_,e[33]=k):k=e[33];let $;e[34]===Symbol.for("react.memo_cache_sentinel")?($=Te("Resources not supported by this server"),e[34]=$):$=e[34];let A;e[35]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ke,{}),e[35]=A):A=e[35];let D;e[36]!==r||e[37]!==l?(D=r[l]?r[l].resources:[],e[36]=r,e[37]=l,e[38]=D):D=e[38];let L;e[39]!==l||e[40]!==c?(L=(K,J)=>c(l,K,J),e[39]=l,e[40]=c,e[41]=L):L=e[41];let I;e[42]!==l||e[43]!==u?(I=()=>u(l),e[42]=l,e[43]=u,e[44]=I):I=e[44];let T;e[45]!==l||e[46]!==D||e[47]!==L||e[48]!==I?(T=t.jsx(Ce,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:$,children:t.jsx(E.Suspense,{fallback:A,children:t.jsx(ps,{connectionId:l,selections:D,onToggle:L,onToggleAll:I})})})}),e[45]=l,e[46]=D,e[47]=L,e[48]=I,e[49]=T):T=e[49];let M;e[50]===Symbol.for("react.memo_cache_sentinel")?(M=Te("Prompts not supported by this server"),e[50]=M):M=e[50];let V;e[51]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(ke,{}),e[51]=V):V=e[51];let F;e[52]!==r||e[53]!==l?(F=r[l]?r[l].prompts:[],e[52]=r,e[53]=l,e[54]=F):F=e[54];let B;e[55]!==l||e[56]!==a?(B=(K,J)=>a(l,K,J),e[55]=l,e[56]=a,e[57]=B):B=e[57];let G;e[58]!==l||e[59]!==g?(G=()=>g(l),e[58]=l,e[59]=g,e[60]=G):G=e[60];let U;e[61]!==l||e[62]!==F||e[63]!==B||e[64]!==G?(U=t.jsx(Ce,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:M,children:t.jsx(E.Suspense,{fallback:V,children:t.jsx(gs,{connectionId:l,selections:F,onToggle:B,onToggleAll:G})})})}),e[61]=l,e[62]=F,e[63]=B,e[64]=G,e[65]=U):U=e[65];let w;e[66]!==n||e[67]!==k||e[68]!==T||e[69]!==U||e[70]!==j?(w=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(Ft,{value:n,onValueChange:j,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[y,k,T,U]})}),e[66]=n,e[67]=k,e[68]=T,e[69]=U,e[70]=j,e[71]=w):w=e[71];let Z;return e[72]!==w||e[73]!==m?(Z=t.jsxs(t.Fragment,{children:[m,w]}),e[72]=w,e[73]=m,e[74]=Z):Z=e[74],Z}function Cs(o){const e={};for(const s of o)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function we(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function _s(o,e){switch(e.type){case"SET_SEARCH_TERM":return{...o,searchTerm:e.payload};case"SET_SELECTED":return{...o,selectedId:e.payload};case"SET_ACTIVE_TAB":return{...o,activeTab:e.payload};case"RESET":return{searchTerm:"",selectedId:e.payload.selectedId??e.payload.firstConnectionId??null,activeTab:"tools"};case"SELECT_CONNECTION":return{...o,selectedId:e.payload,activeTab:"tools"};default:return o}}const Ss=(o,e)=>o.find(s=>s.id===e)??o[0];function ks(o){const e=O.c(77),{open:s,onOpenChange:n,selectedId:l,form:r,connections:d}=o;let c;e[0]!==l?(c={activeTab:"tools",searchTerm:"",selectedId:l},e[0]=l,e[1]=c):c=e[1];const[a,i]=E.useReducer(_s,c),u=E.useDeferredValue(a.searchTerm);let g;e[2]!==u?(g={searchTerm:u},e[2]=u,e[3]=g):g=e[3];const x=vt(g);let h;e[4]!==d?(h=d??[],e[4]=d,e[5]=h):h=e[5];let p;e[6]!==h?(p=Cs(h),e[6]=h,e[7]=p):p=e[7];const f=p;let b;e[8]!==x||e[9]!==a.selectedId?(b=Ss(x,a.selectedId),e[8]=x,e[9]=a.selectedId,e[10]=b):b=e[10];const m=b,j=m?.id??null;let v;e[11]!==f?(v=N=>cs(f,N),e[11]=f,e[12]=v):v=e[12];const C=v;let y;e[13]!==f?(y=N=>as(f,N),e[13]=f,e[14]=y):y=e[14];const P=y;let R;e[15]!==r||e[16]!==f?(R=(N,H,W,X)=>{const ie=f[N]?.[H];let Y;ie===null?Y=X.filter(Ne=>Ne!==W):ie?.includes(W)?Y=ie.filter(Ne=>Ne!==W):(Y=[...ie??[],W],Y.length===X.length&&(Y=null));const ae={...f};ae[N]?ae[N]={...ae[N]}:ae[N]={tools:null,resources:null,prompts:null},ae[N][H]=Y,r.setValue("connections",we(ae),{shouldDirty:!0,shouldTouch:!0})},e[15]=r,e[16]=f,e[17]=R):R=e[17];const S=R;let z;e[18]!==r||e[19]!==f?(z=(N,H)=>{const ie=f[N]?.[H]===null?[]:null,Y={...f};Y[N]?Y[N]={...Y[N]}:Y[N]={tools:null,resources:null,prompts:null},Y[N][H]=ie,r.setValue("connections",we(Y),{shouldDirty:!0,shouldTouch:!0})},e[18]=r,e[19]=f,e[20]=z):z=e[20];const _=z;let k;e[21]!==S?(k=(N,H,W)=>S(N,"tools",H,W),e[21]=S,e[22]=k):k=e[22];const $=k;let A;e[23]!==S?(A=(N,H,W)=>S(N,"resources",H,W),e[23]=S,e[24]=A):A=e[24];const D=A;let L;e[25]!==S?(L=(N,H,W)=>S(N,"prompts",H,W),e[25]=S,e[26]=L):L=e[26];const I=L;let T;e[27]!==_?(T=N=>_(N,"tools"),e[27]=_,e[28]=T):T=e[28];const M=T;let V;e[29]!==_?(V=N=>_(N,"resources"),e[29]=_,e[30]=V):V=e[30];const F=V;let B;e[31]!==_?(B=N=>_(N,"prompts"),e[31]=_,e[32]=B):B=e[32];const G=B;let U;e[33]!==r||e[34]!==f?(U=N=>{const H=f[N],W=H&&H.tools===null&&H.resources===null&&H.prompts===null,X={...f};W?delete X[N]:X[N]=ds,r.setValue("connections",we(X),{shouldDirty:!0,shouldTouch:!0})},e[33]=r,e[34]=f,e[35]=U):U=e[35];const w=U;let Z;e[36]!==x||e[37]!==n||e[38]!==l?(Z=N=>{N&&i({type:"RESET",payload:{selectedId:l,firstConnectionId:x[0]?.id??null}}),n(N)},e[36]=x,e[37]=n,e[38]=l,e[39]=Z):Z=e[39];const K=Z;let J;e[40]===Symbol.for("react.memo_cache_sentinel")?(J=N=>{i({type:"SELECT_CONNECTION",payload:N})},e[40]=J):J=e[40];const qe=J;let me;e[41]===Symbol.for("react.memo_cache_sentinel")?(me=N=>i({type:"SET_SEARCH_TERM",payload:N}),e[41]=me):me=e[41];let ee;e[42]!==a.searchTerm?(ee=t.jsx(Lt,{value:a.searchTerm,onChange:me,placeholder:"Search connections..."}),e[42]=a.searchTerm,e[43]=ee):ee=e[43];let te;e[44]!==x||e[45]!==a.searchTerm||e[46]!==j||e[47]!==P||e[48]!==C||e[49]!==w?(te=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(vs,{allConnections:x,searchTerm:a.searchTerm,selectedId:j,hasSelections:C,getSelectionSummary:P,onConnectionClick:qe,onToggleAll:w})}),e[44]=x,e[45]=a.searchTerm,e[46]=j,e[47]=P,e[48]=C,e[49]=w,e[50]=te):te=e[50];let se;e[51]!==ee||e[52]!==te?(se=t.jsxs("div",{className:"w-full sm:w-72 sm:border-r border-b sm:border-b-0 border-border flex flex-col bg-background sm:h-full max-h-[40vh] sm:max-h-full",children:[ee,te]}),e[51]=ee,e[52]=te,e[53]=se):se=e[53];let le;e[54]!==m||e[55]!==a.activeTab||e[56]!==j||e[57]!==f||e[58]!==G||e[59]!==F||e[60]!==M||e[61]!==I||e[62]!==D||e[63]!==$?(le=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:m&&j?t.jsx(ys,{currentConnection:m,activeTab:a.activeTab,selectedId:j,formData:f,toggleTool:$,toggleResource:D,togglePrompt:I,toggleAllTools:M,toggleAllResources:F,toggleAllPrompts:G,onTabChange:N=>i({type:"SET_ACTIVE_TAB",payload:N})},j):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Select a connection to view its tools, resources, and prompts"})}),e[54]=m,e[55]=a.activeTab,e[56]=j,e[57]=f,e[58]=G,e[59]=F,e[60]=M,e[61]=I,e[62]=D,e[63]=$,e[64]=le):le=e[64];let oe;e[65]!==se||e[66]!==le?(oe=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[se,le]}),e[65]=se,e[66]=le,e[67]=oe):oe=e[67];let ne;e[68]!==K?(ne=t.jsx(Rt,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(q,{variant:"outline",onClick:()=>K(!1),children:"Done"})}),e[68]=K,e[69]=ne):ne=e[69];let re;e[70]!==oe||e[71]!==ne?(re=t.jsxs(He,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[oe,ne]}),e[70]=oe,e[71]=ne,e[72]=re):re=e[72];let ue;return e[73]!==K||e[74]!==s||e[75]!==re?(ue=t.jsx(Ke,{open:s,onOpenChange:K,children:re}),e[73]=K,e[74]=s,e[75]=re,e[76]=ue):ue=e[76],ue}const Ts=Ze.pick({title:!0,description:!0,icon:!0,status:!0,metadata:!0,connections:!0}).extend({title:Qe().min(1,"Name is required").max(255)});function ws(o){const e=O.c(8);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=Q("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx(Yt,{"data-slot":"radio-group",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Ee(o){const e=O.c(9);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=Q("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=l):l=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(qt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Jt,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=r):r=e[5];let d;return e[6]!==n||e[7]!==l?(d=t.jsx(Wt,{"data-slot":"radio-group-item",className:l,...n,children:r}),e[6]=n,e[7]=l,e[8]=d):d=e[8],d}function Es(o){const s=new TextEncoder().encode(o),n=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(n)}function Is(o){const e=O.c(10),{url:s}=o,[n,l]=E.useState(!1);let r;e[0]!==s?(r=async()=>{await navigator.clipboard.writeText(s),l(!0),ce.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=r):r=e[1];const d=r;let c;e[2]!==n?(c=n?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx(Re,{size:20}),e[2]=n,e[3]=c):c=e[3];const a=n?"Copied!":"Copy URL";let i;e[4]!==a?(i=t.jsx("span",{className:"text-xs font-medium",children:a}),e[4]=a,e[5]=i):i=e[5];let u;return e[6]!==d||e[7]!==c||e[8]!==i?(u=t.jsxs(q,{type:"button",variant:"outline",onClick:d,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[c,i]}),e[6]=d,e[7]=c,e[8]=i,e[9]=u):u=e[9],u}function As(o){const e=O.c(7),{url:s,serverName:n}=o;let l;e[0]!==n||e[1]!==s?(l=()=>{const i=We(n),g=Es(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),x=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(i)}&config=${encodeURIComponent(g)}`;window.open(x,"_blank"),ce.success("Opening Cursor...")},e[0]=n,e[1]=s,e[2]=l):l=e[2];const r=l;let d,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),c=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=d,e[4]=c):(d=e[3],c=e[4]);let a;return e[5]!==r?(a=t.jsxs(q,{type:"button",variant:"outline",onClick:r,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[d,c]}),e[5]=r,e[6]=a):a=e[6],a}function Os(o){const e=O.c(11),{url:s,serverName:n}=o,[l,r]=E.useState(!1);let d;e[0]!==n||e[1]!==s?(d=async()=>{const x=We(n),p=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),f=`claude mcp add-json "${x}" '${p.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(f),r(!0),ce.success("Claude Code command copied to clipboard"),setTimeout(()=>r(!1),2e3)},e[0]=n,e[1]=s,e[2]=d):d=e[2];const c=d;let a;e[3]!==l?(a=l?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=l,e[4]=a):a=e[4];const i=l?"Copied!":"Install on Claude";let u;e[5]!==i?(u=t.jsx("span",{className:"text-xs font-medium",children:i}),e[5]=i,e[6]=u):u=e[6];let g;return e[7]!==c||e[8]!==a||e[9]!==u?(g=t.jsxs(q,{type:"button",variant:"outline",onClick:c,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[a,u]}),e[7]=c,e[8]=a,e[9]=u,e[10]=g):g=e[10],g}function $s({virtualMcp:o}){const{org:e}=de(),s=ge({connectionId:Gt,orgId:e.id}),[n,l]=E.useState(null),[r,d]=E.useState(!1),[c,a]=E.useState(!1),i=o.id,u=o.title||`agent-${i.slice(0,8)}`,g=n?`bunx @decocms/typegen@latest --mcp ${i} --key ${n} --output client.ts`:`bunx @decocms/typegen@latest --mcp ${i} --key <api-key> --output client.ts`,x=async()=>{d(!0);try{const f=(await s.callTool({name:"API_KEY_CREATE",arguments:{name:`typegen-${u}`,permissions:{[i]:["*"]}}})).structuredContent?.key;if(!f)throw new Error("No key in response");l(f)}catch{ce.error("Failed to generate API key")}finally{d(!1)}},h=async()=>{await navigator.clipboard.writeText(g),a(!0),ce.success("Command copied to clipboard"),setTimeout(()=>a(!1),2e3)};return t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("h4",{className:"text-sm font-medium text-foreground",children:"Generate typed client"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Introspects this agent and writes a typed"," ",t.jsx("code",{className:"font-mono",children:"client.ts"})," you can import directly."]})]}),!n&&t.jsxs(q,{type:"button",variant:"outline",size:"sm",className:"shrink-0 gap-1.5",onClick:x,disabled:r,children:[r?t.jsx(ze,{size:14,className:"animate-spin"}):t.jsx(Qt,{size:14}),t.jsx("span",{children:r?"Generating…":"Generate API key"})]})]}),n&&t.jsx("p",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700",children:"Store this key securely — it won't be shown again."}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Generate client"}),t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("code",{className:"min-w-0 flex-1 break-all font-mono text-xs text-muted-foreground",children:g}),t.jsx(q,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:h,children:c?t.jsx(je,{size:12,className:"text-green-600"}):t.jsx(Re,{size:12})})]})}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Runtime variables"}),t.jsx(Ds,{apiKey:n})]})}function Ds(o){const e=O.c(19),{apiKey:s}=o,[n,l]=E.useState(!1),r=window.location.origin,d=s?`MESH_API_KEY=${s}`:"MESH_API_KEY=<api-key>",c=`MESH_BASE_URL=${r}`,a=`${d}
|
|
2
2
|
${c}`;let i;e[0]!==a?(i=async()=>{await navigator.clipboard.writeText(a),l(!0),setTimeout(()=>l(!1),2e3)},e[0]=a,e[1]=i):i=e[1];const u=i,g=!s;let x;e[2]!==g?(x=Q({"opacity-50":g}),e[2]=g,e[3]=x):x=e[3];let h;e[4]!==d||e[5]!==x?(h=t.jsx("span",{className:x,children:d}),e[4]=d,e[5]=x,e[6]=h):h=e[6];let p,f;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("br",{}),f=t.jsx("span",{children:c}),e[7]=p,e[8]=f):(p=e[7],f=e[8]);let b;e[9]!==h?(b=t.jsxs("code",{className:"min-w-0 flex-1 font-mono text-xs text-muted-foreground",children:[h,p,f]}),e[9]=h,e[10]=b):b=e[10];let m;e[11]!==n?(m=n?t.jsx(je,{size:12,className:"text-green-600"}):t.jsx(Re,{size:12}),e[11]=n,e[12]=m):m=e[12];let j;e[13]!==u||e[14]!==m?(j=t.jsx(q,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:u,children:m}),e[13]=u,e[14]=m,e[15]=j):j=e[15];let v;return e[16]!==b||e[17]!==j?(v=t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[b,j]})}),e[16]=b,e[17]=j,e[18]=v):v=e[18],v}function zs(o){const e=O.c(3),{virtualMcp:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"h-20 animate-pulse rounded-md bg-muted"}),e[0]=n):n=e[0];let l;return e[1]!==s?(l=t.jsx(E.Suspense,{fallback:n,children:t.jsx($s,{virtualMcp:s})}),e[1]=s,e[2]=l):l=e[2],l}function Ls(o){const e=O.c(44),{open:s,onOpenChange:n,virtualMcp:l}=o,[r,d]=E.useState("code_execution");let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=V=>{(V==="passthrough"||V==="smart_tool_selection"||V==="code_execution")&&d(V)},e[0]=c):c=e[0];const a=c;let i;e[1]!==r||e[2]!==l.id?(i=new URL(`/mcp/virtual-mcp/${l.id}`,window.location.origin),i.searchParams.set("mode",r),e[1]=r,e[2]=l.id,e[3]=i):i=e[3];let u;e[4]!==l.id||e[5]!==l.title?(u=l.title||`agent-${l.id?.slice(0,8)??"default"}`,e[4]=l.id,e[5]=l.title,e[6]=u):u=e[6];const g=u;let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Mt,{children:t.jsx(Vt,{children:"Connect"})}),e[7]=x):x=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mt-1",children:"How should this agent work?"})}),e[8]=h):h=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(pt,{className:"size-5 text-muted-foreground"})}),e[9]=p):p=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=f):f=e[10];let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(xe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[11]=b):b=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("label",{htmlFor:"mode-passthrough",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[p,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[f,t.jsx(ve,{children:t.jsxs(pe,{children:[b,t.jsx(he,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"All tools are exposed directly via tools/list. Best for small tool surfaces with deterministic behavior."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Best for small teams or when you need predictable behavior"})]}),t.jsx(Ee,{id:"mode-passthrough",value:"passthrough"})]}),e[12]=m):m=e[12];let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(ht,{className:"size-5 text-muted-foreground"})}),e[13]=j):j=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=v):v=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(xe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[15]=C):C=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs("label",{htmlFor:"mode-smart",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[j,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[v,t.jsx(ve,{children:t.jsxs(pe,{children:[C,t.jsx(he,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Uses meta-tools (GATEWAY_SEARCH_TOOLS, GATEWAY_DESCRIBE_TOOLS, GATEWAY_CALL_TOOL) to keep the tool list small and request details on demand."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Ideal for large teams with many tools - AI finds what it needs"})]}),t.jsx(Ee,{id:"mode-smart",value:"smart_tool_selection"})]}),e[16]=y):y=e[16];let P;e[17]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Zt,{className:"size-5 text-muted-foreground"})}),e[17]=P):P=e[17];let R;e[18]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=R):R=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(xe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[19]=S):S=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsxs("label",{htmlFor:"mode-code",className:"relative flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[P,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[R,t.jsx(ve,{children:t.jsxs(pe,{children:[S,t.jsx(he,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Exposes meta-tools for discovery + sandboxed execution (GATEWAY_RUN_CODE). Reduces overhead on large surfaces by shifting work into a controlled runtime."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Maximum flexibility - AI can write code to orchestrate tools"})]}),t.jsx(Ee,{id:"mode-code",value:"code_execution"}),t.jsx($e,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=z):z=e[20];let _;e[21]!==r?(_=t.jsxs("div",{className:"flex flex-col gap-3",children:[h,t.jsxs(ws,{value:r,onValueChange:a,className:"flex flex-col gap-4.5",children:[m,y,z]})]}),e[21]=r,e[22]=_):_=e[22];let k;e[23]!==i.href?(k=t.jsx(Is,{url:i.href}),e[23]=i.href,e[24]=k):k=e[24];let $,A;e[25]!==g||e[26]!==i.href?($=t.jsx(As,{url:i.href,serverName:g}),A=t.jsx(Os,{url:i.href,serverName:g}),e[25]=g,e[26]=i.href,e[27]=$,e[28]=A):($=e[27],A=e[28]);let D;e[29]!==k||e[30]!==$||e[31]!==A?(D=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[k,$,A]})}),e[29]=k,e[30]=$,e[31]=A,e[32]=D):D=e[32];let L;e[33]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("div",{className:"border-t border-border"}),e[33]=L):L=e[33];let I;e[34]!==l?(I=t.jsx(zs,{virtualMcp:l}),e[34]=l,e[35]=I):I=e[35];let T;e[36]!==_||e[37]!==D||e[38]!==I?(T=t.jsxs(He,{className:"max-h-[80vh] overflow-y-auto sm:max-w-2xl",children:[x,t.jsxs("div",{className:"flex flex-col gap-6",children:[_,D,L,I]})]}),e[36]=_,e[37]=D,e[38]=I,e[39]=T):T=e[39];let M;return e[40]!==n||e[41]!==s||e[42]!==T?(M=t.jsx(Ke,{open:s,onOpenChange:n,children:T}),e[40]=n,e[41]=s,e[42]=T,e[43]=M):M=e[43],M}function Ps(o,e){switch(e.type){case"SET_SHARE_DIALOG_OPEN":return{...o,shareDialogOpen:e.payload};case"SET_CONNECTION_DIALOG_OPEN":return{...o,connectionDialogOpen:e.payload};case"SET_EDITING_CONNECTION_ID":return{...o,editingConnectionId:e.payload};case"SET_SKILLS_OPEN":return{...o,skillsOpen:e.payload};default:return o}}function Ae(o){const e=O.c(27),{connection_id:s,selected_tools:n,selected_resources:l,selected_prompts:r,onClick:d}=o,c=yt(s);if(!c)return null;let a;e[0]!==n?(a=Se(n),e[0]=n,e[1]=a):a=e[1];const i=a;let u;e[2]!==l?(u=Se(l),e[2]=l,e[3]=u):u=e[3];const g=u;let x;e[4]!==r?(x=Se(r),e[4]=r,e[5]=x):x=e[5];const h=x;let p;e[6]!==c.icon||e[7]!==c.title?(p=t.jsx(Oe,{icon:c.icon,name:c.title,size:"xs"}),e[6]=c.icon,e[7]=c.title,e[8]=p):p=e[8];let f;e[9]!==c.title?(f=t.jsx("p",{className:"flex-1 text-sm font-normal text-foreground truncate",children:c.title}),e[9]=c.title,e[10]=f):f=e[10];let b;e[11]!==i?(b=i!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:i==="all"?"all":i}),t.jsx(Le,{size:12})]}),e[11]=i,e[12]=b):b=e[12];let m;e[13]!==g?(m=g!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:g==="all"?"all":g}),t.jsx(be,{size:12})]}),e[13]=g,e[14]=m):m=e[14];let j;e[15]!==h?(j=h!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:h==="all"?"all":h}),t.jsx(De,{size:12})]}),e[15]=h,e[16]=j):j=e[16];let v;e[17]!==b||e[18]!==m||e[19]!==j?(v=t.jsxs($e,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[b,m,j]}),e[17]=b,e[18]=m,e[19]=j,e[20]=v):v=e[20];let C;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Ue,{size:16,className:"text-muted-foreground shrink-0"}),e[21]=C):C=e[21];let y;return e[22]!==d||e[23]!==p||e[24]!==f||e[25]!==v?(y=t.jsxs("div",{onClick:d,className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border hover:bg-accent/50 transition-colors cursor-pointer",children:[p,f,v,C]}),e[22]=d,e[23]=p,e[24]=f,e[25]=v,e[26]=y):y=e[26],y}Ae.Fallback=function(){return t.jsxs("div",{className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border",children:[t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"flex-1 h-4 rounded bg-muted animate-pulse"}),t.jsxs($e,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(Le,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(be,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(De,{size:12})]})]}),t.jsx(Ue,{size:16,className:"text-muted-foreground shrink-0"})]})};function Rs({virtualMcp:o}){const{org:e}=de(),s=_t(),n=tt({resolver:st(Ts),defaultValues:o}),l=n.watch("connections"),[r,d]=E.useReducer(Ps,{shareDialogOpen:!1,connectionDialogOpen:!1,editingConnectionId:null,skillsOpen:!1}),[,c]=xt(),{setVirtualMcpId:a}=ot();E.useEffect(()=>{c(!0),a(o.id)},[o.id]);const i=()=>{a(o.id),c(!0)},u=n.formState.isDirty,g=async()=>{const m=n.getValues(),j=await s.update.mutateAsync({id:o.id,data:m});n.reset(j)},x=()=>{n.reset(o)},h=()=>{d({type:"SET_EDITING_CONNECTION_ID",payload:null}),d({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},p=m=>{d({type:"SET_EDITING_CONNECTION_ID",payload:m}),d({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},f=s.update.isPending,b=t.jsx(wt,{children:t.jsxs(Et,{children:[t.jsx(Fe,{children:t.jsx(It,{asChild:!0,children:t.jsx(lt,{to:"/$org/$project/agents",params:{org:e.slug,project:Ge},children:"Agents"})})}),t.jsx(At,{}),t.jsx(Fe,{children:t.jsx(Ot,{children:o.title})})]})});return t.jsxs($t,{breadcrumb:b,children:[t.jsxs(Dt,{children:[t.jsx(zt,{onSave:g,onUndo:x,isDirty:u,isSaving:f}),t.jsxs(pe,{delayDuration:0,children:[t.jsx(xe,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsxs(q,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:i,"aria-label":"Test Agent",children:[t.jsx(kt,{size:14}),"Test Agent"]})})}),t.jsx(he,{side:"bottom",children:"Test this agent in chat"})]}),t.jsxs(q,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:()=>d({type:"SET_SHARE_DIALOG_OPEN",payload:!0}),children:[t.jsx(Ye,{size:14}),"Connect"]})]}),t.jsx("div",{className:"flex h-full w-full bg-background overflow-auto",children:t.jsxs("div",{className:"flex flex-col w-full",children:[t.jsxs("div",{className:"flex items-start justify-between gap-4 p-6 shrink-0",children:[t.jsxs("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[t.jsx(Ve,{control:n.control,name:"icon",render:({field:m})=>t.jsx(ns,{value:m.value,onChange:m.onChange,name:n.watch("title")||"Agent",size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(Tt,{})})}),t.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[t.jsx(Ie,{...n.register("title"),className:"h-auto py-0.5 text-lg! font-medium leading-7 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Agent Name"}),t.jsx(Ie,{...n.register("description"),className:"h-auto py-0.5 text-base text-muted-foreground leading-6 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})]})]}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(bt,{checked:n.watch("status")==="active",onCheckedChange:m=>n.setValue("status",m?"active":"inactive",{shouldDirty:!0})})})]}),t.jsxs(gt,{open:r.skillsOpen,onOpenChange:m=>d({type:"SET_SKILLS_OPEN",payload:m}),className:"border-t border-border shrink-0 max-h-[400px] overflow-hidden flex flex-col",children:[l.length===0?t.jsxs("div",{className:"px-6 py-4 flex flex-col gap-3",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Connections"}),t.jsxs("button",{type:"button",onClick:h,className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-border hover:bg-accent/50 transition-colors w-full text-left cursor-pointer overflow-hidden",children:[t.jsxs("div",{className:"relative flex items-center justify-center size-8 rounded-md text-muted-foreground/75 shrink-0",children:[t.jsxs("svg",{className:"absolute inset-0 size-full overflow-hidden",fill:"none",viewBox:"0 0 32 32",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"agent-detail-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[t.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),t.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),t.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),t.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"5.5",stroke:"url(#agent-detail-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),t.jsx(Be,{size:16})]}),t.jsx("span",{className:"text-sm text-muted-foreground truncate",children:"No connections yet. Add one to get started."})]})]}):t.jsx(jt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Connections"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"ease-(--ease-out-expo)",style:{width:r.skillsOpen?0:"auto",marginRight:r.skillsOpen?0:4,opacity:r.skillsOpen?0:1,pointerEvents:r.skillsOpen?"none":"auto",transitionProperty:"all",transitionDuration:r.skillsOpen?"0ms":"200ms"},children:t.jsx(Xt,{connectionIds:l.map(m=>m.connection_id),maxVisibleIcons:2})}),t.jsxs("div",{role:"button",tabIndex:0,className:"h-7 inline-flex items-center justify-center rounded-md text-sm text-muted-foreground overflow-hidden transition-all duration-200 ease-(--ease-out-expo) hover:bg-accent hover:text-accent-foreground",style:{width:r.skillsOpen?"auto":28,paddingLeft:r.skillsOpen?8:0,paddingRight:r.skillsOpen?8:0,gap:r.skillsOpen?4:0},onPointerDown:m=>{m.stopPropagation()},onClick:m=>{m.stopPropagation(),m.preventDefault(),h()},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.stopPropagation(),m.preventDefault(),h())},children:[t.jsx(Be,{size:14,className:"shrink-0"}),t.jsx("span",{className:"overflow-hidden whitespace-nowrap transition-all duration-200 ease-(--ease-out-expo)",style:{width:r.skillsOpen?"auto":0,opacity:r.skillsOpen?1:0},children:"Add"})]}),t.jsx("div",{className:"h-7 inline-flex items-center justify-center overflow-hidden transition-all duration-200 ease-(--ease-out-expo)",style:{width:r.skillsOpen?28:0,opacity:r.skillsOpen?1:0},children:t.jsx(St,{size:16,className:"shrink-0"})})]})]})}),t.jsx("div",{className:"grid overflow-hidden transition-[grid-template-rows] duration-200 ease-(--ease-out-expo)",style:{gridTemplateRows:r.skillsOpen?"1fr":"0fr"},children:t.jsx("div",{className:"min-h-0 overflow-hidden",children:t.jsx("div",{className:"overflow-y-auto max-h-[300px] mask-[linear-gradient(to_bottom,black_calc(100%-40px),transparent_100%)]",children:t.jsx("div",{className:"flex flex-col gap-2 px-6 pb-4 pt-2",children:l.map(m=>t.jsx(E.Suspense,{fallback:t.jsx(Ae.Fallback,{}),children:t.jsx(Ae,{connection_id:m.connection_id,selected_tools:m.selected_tools,selected_resources:m.selected_resources,selected_prompts:m.selected_prompts,onClick:()=>p(m.connection_id)})},m.connection_id))})})})})]}),t.jsxs("div",{className:"flex flex-col flex-1 p-6 border-t border-border overflow-auto",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Instructions"}),t.jsx(Ve,{name:"metadata.instructions",control:n.control,render:({field:m})=>t.jsx(Nt,{...m,value:m.value??"",placeholder:"Write instructions here...",className:"min-h-[200px] resize-none text-sm placeholder:text-muted-foreground/50 leading-relaxed border-0 rounded-none shadow-none px-0 focus-visible:ring-0 focus-visible:ring-offset-0 focus:border-0 bg-transparent"})})]})]})}),t.jsx(ks,{open:r.connectionDialogOpen,onOpenChange:m=>d({type:"SET_CONNECTION_DIALOG_OPEN",payload:m}),selectedId:r.editingConnectionId,form:n,connections:l}),t.jsx(Ls,{open:r.shareDialogOpen,onOpenChange:m=>d({type:"SET_SHARE_DIALOG_OPEN",payload:m}),virtualMcp:o})]})}function Ms(){const o=O.c(6),e=Xe();let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/agents/$agentId"},o[0]=s):s=o[0];const n=et(s),{org:l,agentId:r}=n,d=Ct(r);if(!d){let a;return o[1]!==e||o[2]!==l?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(nt,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(q,{variant:"outline",onClick:()=>e({to:"/$org/$project/agents",params:{org:l,project:Ge}}),children:"Back to agents"})})}),o[1]=e,o[2]=l,o[3]=a):a=o[3],a}let c;return o[4]!==d?(c=t.jsx(Rs,{virtualMcp:d}),o[4]=d,o[5]=c):c=o[5],c}function so(){const o=O.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(fe,{children:t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ze,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ms,{})})}),o[0]=e):e=o[0],e}export{so as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ve,j as s,E as Nt,r as Q,u as Ct,e as yt,B as U,D as X,v as wt,O as St}from"./index-DcxE8oe_.js";import{C as kt}from"./collection-display-button-kCOiEzLn.js";import{C as _t}from"./collection-search-Bdxpglbf.js";import{P as Ce}from"./index-DZ6p-ZXx.js";import{B as Dt,a as zt,b as At,c as Mt}from"./breadcrumb-ijphtzQp.js";import{C as gt}from"./connection-card-BWZAp_hO.js";import{B as be}from"./badge-B_BTuJZe.js";import{i as $t}from"./AlertCircle-CI8iQIN4.js";import{i as Tt}from"./CheckCircle-DosFvCW2.js";import{E as lt}from"./empty-state-C4c2sKjV.js";import{I as Ue}from"./integration-icon-6jcHFHZV.js";import{u as Pt}from"./use-list-state-CWVUvMhj.js";import{u as It}from"./use-create-virtual-mcp-dSjfTRl8.js";import{i as ye}from"./constants-BCt7c81T.js";import{b as Ot,a as Bt}from"./use-virtual-mcp-DfPJ-WDb.js";import{c as at,b as rt,d as ot,A as ct,e as dt,h as mt,a as ft,f as ut}from"./alert-dialog-BGZzdkI2.js";import{C as Fe}from"./checkbox-B_91sMwd.js";import{c as Lt,d as Et,b as Rt,a as Kt,D as Vt}from"./dialog-BDa2Gsq9.js";import{c as Gt,a as Ut,b as Ge,e as te,d as Ft,T as Ht}from"./table-C4WVepD4.js";import{D as et,a as tt,b as st,c as je}from"./dropdown-menu-DEQ5DCnG.js";import{n as qt}from"./ArrowDown-bcBjuFxH.js";import{i as Jt}from"./ArrowUp-BtIkmj4Y.js";import{i as Qt}from"./CheckSquare-Be1kXxvn.js";import{t as Wt}from"./ChevronDown-DElgod-p.js";import{i as nt}from"./DotsVertical-rvqtR29a.js";import{s as it}from"./Eye-BgAytXDm.js";import{i as Xt}from"./Loading01-B85tVuIU.js";import{s as ht}from"./Plus-C9dY5EOr.js";import{s as He}from"./Trash01-BtiNjuw3.js";import{t as se}from"./Users03-CQa5jfkV.js";import{s as jt}from"./XClose-Dey3r3af.js";import{U as we}from"./user-_Hc5WOWn.js";import{A as xt}from"./agent-connections-preview-BCTZ6BnP.js";import{f as Se}from"./format-time-CMKyl-GC.js";import"./Check-GOz4_bBS.js";import"./Grid01-NwJJaoW7.js";import"./List-DD3BKPLz.js";import"./tooltip-CXZH0tSC.js";import"./index-10S4l3se.js";import"./SearchMd-CKp0BoPW.js";import"./input-DPpAbHbD.js";import"./useQuery-CEE9SUlS.js";import"./useMutation-CV3IN68C.js";import"./ChevronRight-Ys0vr-YD.js";import"./card-CwEWrOs9.js";import"./Container-C8ScaknS.js";import"./use-view-mode-XMRPR1ke.js";import"./use-mobile-v2XXLV0O.js";import"./use-collections-CObsJD7p.js";import"./X-CaaFSPD_.js";import"./avatar-DWAYNsNK.js";import"./use-connection-Cv_-e2MS.js";import"./differenceInSeconds-NQ4PDo0z.js";function qe(t){const e=ve.c(3),{status:n}=t;if(n==="active"){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(be,{variant:"success",className:"gap-1.5 text-success border-success/40 bg-background",children:[s.jsx(Tt,{size:12}),"Active"]}),e[0]=i):i=e[0],i}if(n==="error"){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(be,{variant:"outline",className:"gap-1.5 text-destructive border-destructive/40 bg-background",children:[s.jsx($t,{size:12}),"Error"]}),e[1]=i):i=e[1],i}let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(be,{variant:"outline",className:"text-muted-foreground",children:"Inactive"}),e[2]=o):o=e[2],o}function pt(t){return t.title.trim().replace(/\s+\(\d+\)$/,"")}function Yt(t){const e=new Map;for(const i of t){const a=pt(i),l=e.get(a);l?l.push(i):e.set(a,[i])}const n=[],o=new Set;for(const i of t){const a=pt(i);if(o.has(a))continue;o.add(a);const l=e.get(a),f=l[0];l.length===1?n.push({type:"single",agent:f}):n.push({type:"group",key:a,icon:f.icon,title:f.title.replace(/\s*\(\d+\)\s*$/,""),agents:l})}return n}function bt(t){const e=new Set,n=[];for(const o of t)o.created_by&&!e.has(o.created_by)&&(e.add(o.created_by),n.push(o.created_by));return n}function Zt(t,e){switch(e.type){case"delete":return{mode:"deleting",virtualMcp:e.virtualMcp};case"close":return{mode:"idle"}}}function es(t){const e=ve.c(107),{group:n,onNavigate:o,onDelete:i,selectionMode:a,selectedIds:l,onToggleSelect:f}=t,[j,g]=Q.useState(!1);let w;if(e[0]!==n.agents||e[1]!==l){let y;e[3]!==l?(y=_=>l.has(_.id),e[3]=l,e[4]=y):y=e[4],w=n.agents.every(y),e[0]=n.agents,e[1]=l,e[2]=w}else w=e[2];const m=w;let D;if(e[5]!==n.agents||e[6]!==l){let y;e[8]!==l?(y=_=>l.has(_.id),e[8]=l,e[9]=y):y=e[9],D=n.agents.some(y),e[5]=n.agents,e[6]=l,e[7]=D}else D=e[7];const c=D;let O,S,d,C,z,P,k,I,A,u,b;if(e[10]!==m||e[11]!==n.agents||e[12]!==n.icon||e[13]!==n.title||e[14]!==f||e[15]!==l||e[16]!==a||e[17]!==c){const y=bt(n.agents),_=n.agents.reduce(is,n.agents[0]),W=_.updated_at??_.created_at;O=gt;const Y=`${n.agents.length} instances`;e[29]!==n.icon||e[30]!==n.title||e[31]!==Y?(A={title:n.title,icon:n.icon,description:Y},e[29]=n.icon,e[30]=n.title,e[31]=Y,e[32]=A):A=e[32],e[33]!==m||e[34]!==n.agents||e[35]!==f||e[36]!==l||e[37]!==a?(u=()=>a?(()=>{for(const E of n.agents)m?l.has(E.id)&&f(E.id):l.has(E.id)||f(E.id)})():g(!0),e[33]=m,e[34]=n.agents,e[35]=f,e[36]=l,e[37]=a,e[38]=u):u=e[38];const q=a&&m&&"ring-2 ring-primary",Z=a&&c&&!m&&"ring-1 ring-primary/50";e[39]!==q||e[40]!==Z?(b=X(q,Z),e[39]=q,e[40]=Z,e[41]=b):b=e[41],e[42]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(se,{}),e[42]=S):S=e[42],e[43]!==m||e[44]!==n.agents||e[45]!==f||e[46]!==l||e[47]!==a||e[48]!==c?(d=a?s.jsx(Fe,{checked:m?!0:c?"indeterminate":!1,onCheckedChange:()=>{for(const E of n.agents)m?l.has(E.id)&&f(E.id):l.has(E.id)||f(E.id)}}):s.jsxs(be,{variant:"secondary",className:"text-xs tabular-nums",children:["x",n.agents.length]}),e[43]=m,e[44]=n.agents,e[45]=f,e[46]=l,e[47]=a,e[48]=c,e[49]=d):d=e[49];let J;e[50]!==n.agents?(J=n.agents.slice(0,6).map(ns),e[50]=n.agents,e[51]=J):J=e[51],e[52]!==J?(C=s.jsx("div",{className:"flex items-center gap-1",children:J}),e[52]=J,e[53]=C):C=e[53],k="flex items-center justify-between text-xs text-muted-foreground w-full min-w-0";const ee=y.map(E=>s.jsx(we,{id:E,size:"3xs",avatarOnly:y.length>1},E));e[54]!==ee?(I=s.jsx("div",{className:"flex items-center -space-x-1.5",children:ee}),e[54]=ee,e[55]=I):I=e[55],z="shrink-0 ml-2",P=W?Se(new Date(W)):"—",e[10]=m,e[11]=n.agents,e[12]=n.icon,e[13]=n.title,e[14]=f,e[15]=l,e[16]=a,e[17]=c,e[18]=O,e[19]=S,e[20]=d,e[21]=C,e[22]=z,e[23]=P,e[24]=k,e[25]=I,e[26]=A,e[27]=u,e[28]=b}else O=e[18],S=e[19],d=e[20],C=e[21],z=e[22],P=e[23],k=e[24],I=e[25],A=e[26],u=e[27],b=e[28];let p;e[56]!==z||e[57]!==P?(p=s.jsx("span",{className:z,children:P}),e[56]=z,e[57]=P,e[58]=p):p=e[58];let M;e[59]!==p||e[60]!==k||e[61]!==I?(M=s.jsxs("div",{className:k,children:[I,p]}),e[59]=p,e[60]=k,e[61]=I,e[62]=M):M=e[62];let $;e[63]!==O||e[64]!==S||e[65]!==d||e[66]!==C||e[67]!==M||e[68]!==A||e[69]!==u||e[70]!==b?($=s.jsx(O,{connection:A,onClick:u,className:b,fallbackIcon:S,headerActions:d,body:C,footer:M}),e[63]=O,e[64]=S,e[65]=d,e[66]=C,e[67]=M,e[68]=A,e[69]=u,e[70]=b,e[71]=$):$=e[71];let B;e[72]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(se,{}),e[72]=B):B=e[72];let T;e[73]!==n.icon||e[74]!==n.title?(T=s.jsx(Ue,{icon:n.icon,name:n.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:B}),e[73]=n.icon,e[74]=n.title,e[75]=T):T=e[75];let L;e[76]!==n.agents.length?(L=s.jsxs(be,{variant:"secondary",className:"ml-2 text-xs tabular-nums",children:["x",n.agents.length]}),e[76]=n.agents.length,e[77]=L):L=e[77];let r;e[78]!==n.title||e[79]!==L?(r=s.jsxs(Lt,{children:[n.title,L]}),e[78]=n.title,e[79]=L,e[80]=r):r=e[80];let h;e[81]!==n.agents.length?(h=s.jsxs(Et,{children:[n.agents.length," instances"]}),e[81]=n.agents.length,e[82]=h):h=e[82];let v;e[83]!==r||e[84]!==h?(v=s.jsxs("div",{children:[r,h]}),e[83]=r,e[84]=h,e[85]=v):v=e[85];let K;e[86]!==T||e[87]!==v?(K=s.jsx(Rt,{className:"px-6 pt-6 pb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[T,v]})}),e[86]=T,e[87]=v,e[88]=K):K=e[88];let V;if(e[89]!==n.agents||e[90]!==i||e[91]!==o){let y;e[93]!==i||e[94]!==o?(y=_=>s.jsxs("div",{className:"flex items-center gap-3 px-6 py-3 hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>{g(!1),o(_.id)},children:[s.jsx(Ue,{icon:_.icon,name:_.title,size:"sm",className:"shrink-0",fallbackIcon:s.jsx(se,{})}),s.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:_.title}),s.jsx(qe,{status:_.status})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground shrink-0",children:[s.jsx(we,{id:_.created_by,size:"3xs"}),s.jsx("span",{children:_.created_at?Se(new Date(_.created_at)):"—"})]}),s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:ss,children:s.jsx(nt,{size:16})})}),s.jsxs(st,{align:"end",onClick:ts,children:[s.jsxs(je,{onClick:()=>{g(!1),o(_.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(_.id)&&s.jsxs(je,{variant:"destructive",onClick:()=>i(_),children:[s.jsx(He,{size:16}),"Delete"]})]})]})]},_.id),e[93]=i,e[94]=o,e[95]=y):y=e[95],V=n.agents.map(y),e[89]=n.agents,e[90]=i,e[91]=o,e[92]=V}else V=e[92];let F;e[96]!==V?(F=s.jsx("div",{className:"divide-y max-h-80 overflow-auto",children:V}),e[96]=V,e[97]=F):F=e[97];let R;e[98]!==K||e[99]!==F?(R=s.jsxs(Kt,{className:"sm:max-w-lg p-0 gap-0",children:[K,F]}),e[98]=K,e[99]=F,e[100]=R):R=e[100];let G;e[101]!==j||e[102]!==R?(G=s.jsx(Vt,{open:j,onOpenChange:g,children:R}),e[101]=j,e[102]=R,e[103]=G):G=e[103];let H;return e[104]!==$||e[105]!==G?(H=s.jsxs(s.Fragment,{children:[$,G]}),e[104]=$,e[105]=G,e[106]=H):H=e[106],H}function ts(t){return t.stopPropagation()}function ss(t){return t.stopPropagation()}function ns(t){return s.jsx(qe,{status:t.status},t.id)}function is(t,e){const n=e.updated_at??e.created_at,o=t.updated_at??t.created_at;return n?o?new Date(n)>new Date(o)?e:t:e:t}function ls(t){const e=ve.c(21),{count:n,total:o,onSelectAll:i,onDeselectAll:a,onDelete:l,onCancel:f}=t;if(n===0)return null;let j;e[0]!==n?(j=s.jsxs("span",{className:"text-sm font-medium tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=j):j=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"h-4 w-px bg-border"}),e[2]=g):g=e[2];let w;e[3]!==n||e[4]!==a||e[5]!==i||e[6]!==o?(w=n<o?s.jsxs(U,{variant:"ghost",size:"sm",onClick:i,children:["Select all (",o,")"]}):s.jsx(U,{variant:"ghost",size:"sm",onClick:a,children:"Clear selection"}),e[3]=n,e[4]=a,e[5]=i,e[6]=o,e[7]=w):w=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-4 w-px bg-border"}),e[8]=m):m=e[8];let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(He,{size:14}),e[9]=D):D=e[9];let c;e[10]!==l?(c=s.jsxs(U,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:l,children:[D,"Delete"]}),e[10]=l,e[11]=c):c=e[11];let O;e[12]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("div",{className:"h-4 w-px bg-border"}),e[12]=O):O=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(jt,{size:14}),e[13]=S):S=e[13];let d;e[14]!==f?(d=s.jsxs(U,{variant:"ghost",size:"sm",onClick:f,children:[S,"Cancel"]}),e[14]=f,e[15]=d):d=e[15];let C;return e[16]!==j||e[17]!==w||e[18]!==c||e[19]!==d?(C=s.jsxs("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2 flex items-center gap-3 rounded-xl border border-border bg-background/95 backdrop-blur px-4 py-2.5 shadow-lg",children:[j,g,w,m,c,O,d]}),e[16]=j,e[17]=w,e[18]=c,e[19]=d,e[20]=C):C=e[20],C}function as(t){const e=ve.c(37),{columns:n,grouped:o,sortKey:i,sortDirection:a,onSort:l,onRowClick:f,selectionMode:j,selectedIds:g,onToggleSelect:w,emptyState:m}=t;let D;e[0]===Symbol.for("react.memo_cache_sentinel")?(D=new Set,e[0]=D):D=e[0];const[c,O]=Q.useState(D);let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=u=>{O(b=>{const p=new Set(b);return p.has(u)?p.delete(u):p.add(u),p})},e[1]=S):S=e[1];const d=S;if(o.length===0&&m){let u;return e[2]!==m?(u=s.jsx("div",{className:"flex items-center justify-center h-full",children:m}),e[2]=m,e[3]=u):u=e[3],u}const C=n.length;let z;if(e[4]!==C||e[5]!==n||e[6]!==l||e[7]!==a||e[8]!==i){let u;e[10]!==C||e[11]!==l||e[12]!==a||e[13]!==i?(u=(b,p)=>{const M=i===b.id,$=p===C-1;return s.jsx(Gt,{className:X("px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider",$&&"w-8","group transition-colors select-none",b.sortable&&"hover:bg-accent cursor-pointer",b.cellClassName),onClick:b.sortable&&l?()=>l(b.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[b.header,b.sortable&&s.jsx("span",{className:"w-4 flex items-center justify-center",children:M&&a&&(a==="asc"?s.jsx(Jt,{size:16,className:"text-muted-foreground"}):s.jsx(qt,{size:16,className:"text-muted-foreground"}))})]})},b.id)},e[10]=C,e[11]=l,e[12]=a,e[13]=i,e[14]=u):u=e[14],z=n.map(u),e[4]=C,e[5]=n,e[6]=l,e[7]=a,e[8]=i,e[9]=z}else z=e[9];let P;e[15]!==z?(P=s.jsx(Ut,{className:"border-b-0",children:s.jsx(Ge,{className:"h-9 hover:bg-transparent border-b border-border",children:z})}),e[15]=z,e[16]=P):P=e[16];let k;if(e[17]!==n||e[18]!==c||e[19]!==o||e[20]!==f||e[21]!==w||e[22]!==g||e[23]!==j){let u;e[25]!==n||e[26]!==c||e[27]!==f||e[28]!==w||e[29]!==g||e[30]!==j?(u=b=>{if(b.type==="single"){const r=b.agent;return s.jsx(Ge,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer",j&&g.has(r.id)&&"bg-primary/5"),onClick:()=>f(r),children:n.map(h=>s.jsx(te,{className:X("px-5 py-4 h-16 align-middle text-sm text-foreground",h.cellClassName),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:h.render?h.render(r):null})},h.id))},r.id)}const p=b,M=c.has(p.key),$=p.agents.every(r=>g.has(r.id)),B=p.agents.some(r=>g.has(r.id)),T=bt(p.agents),L=p.agents.reduce(os,p.agents[0]);return s.jsxs(Q.Fragment,{children:[s.jsx(Ge,{className:"border-b-0 hover:bg-accent/50 cursor-pointer transition-colors",onClick:()=>d(p.key),children:n.map(r=>{const h=X("px-5 py-3 h-14 align-middle text-sm",r.cellClassName);if(r.id==="select")return s.jsx(te,{className:h,children:s.jsx(Fe,{checked:$?!0:B?"indeterminate":!1,onCheckedChange:()=>{for(const v of p.agents)$?g.has(v.id)&&w(v.id):g.has(v.id)||w(v.id)},onClick:rs})},r.id);if(r.id==="title")return s.jsx(te,{className:h,children:s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ue,{icon:p.icon,name:p.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(se,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:p.title}),s.jsxs(be,{variant:"secondary",className:"text-xs tabular-nums",children:["x",p.agents.length]})]})},r.id);if(r.id==="updated_by")return s.jsx(te,{className:h,children:s.jsx("div",{className:"flex items-center -space-x-1.5",children:T.map(v=>s.jsx(we,{id:v,size:"3xs",avatarOnly:T.length>1},v))})},r.id);if(r.id==="updated_at"){const v=L.updated_at??L.created_at;return s.jsx(te,{className:h,children:s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v?Se(new Date(v)):"—"})},r.id)}return r.id==="actions"?s.jsx(te,{className:h,children:s.jsx(Wt,{size:16,className:X("text-muted-foreground transition-transform",M&&"rotate-180")})},r.id):s.jsx(te,{className:h},r.id)})}),M&&p.agents.map(r=>s.jsx(Ge,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer bg-muted/20",j&&g.has(r.id)&&"bg-primary/5"),onClick:()=>f(r),children:n.map(h=>s.jsx(te,{className:X("px-5 py-3 h-14 align-middle text-sm text-foreground",h.cellClassName,h.id==="title"&&"pl-12"),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:h.render?h.render(r):null})},h.id))},r.id))]},p.key)},e[25]=n,e[26]=c,e[27]=f,e[28]=w,e[29]=g,e[30]=j,e[31]=u):u=e[31],k=o.map(u),e[17]=n,e[18]=c,e[19]=o,e[20]=f,e[21]=w,e[22]=g,e[23]=j,e[24]=k}else k=e[24];let I;e[32]!==k?(I=s.jsx(Ft,{children:k}),e[32]=k,e[33]=I):I=e[33];let A;return e[34]!==P||e[35]!==I?(A=s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsxs(Ht,{className:"w-full border-collapse",children:[P,I]})}),e[34]=P,e[35]=I,e[36]=A):A=e[36],A}function rs(t){return t.stopPropagation()}function os(t,e){const n=e.updated_at??e.created_at,o=t.updated_at??t.created_at;return n?o?new Date(n)>new Date(o)?e:t:e:t}function cs(){const t=ve.c(138),{org:e}=Ct(),n=yt();let o;t[0]!==e.slug?(o={namespace:e.slug,resource:"agents"},t[0]=e.slug,t[1]=o):o=t[1];const i=Pt(o),a=Ot(i);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l={navigateOnCreate:!0},t[2]=l):l=t[2];const{createVirtualMCP:f,isCreating:j}=It(l),g=Bt();let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w={mode:"idle"},t[3]=w):w=t[3];const[m,D]=Q.useReducer(Zt,w),[c,O]=Q.useState(!1);let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=new Set,t[4]=S):S=t[4];const[d,C]=Q.useState(S),[z,P]=Q.useState(!1),[k,I]=Q.useState("ALL");let A;t[5]===Symbol.for("react.memo_cache_sentinel")?(A=R=>{C(G=>{const H=new Set(G);return H.has(R)?H.delete(R):H.add(R),H})},t[5]=A):A=t[5];const u=A;let b;t[6]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{O(!1),C(new Set)},t[6]=b):b=t[6];const p=b;let M,$,B,T,L,r,h,v;if(t[7]!==g||t[8]!==z||t[9]!==f||t[10]!==m.mode||t[11]!==m.virtualMcp||t[12]!==j||t[13]!==i||t[14]!==n||t[15]!==e.slug||t[16]!==d||t[17]!==c||t[18]!==k||t[19]!==a){let R;t[28]!==k?(R=x=>!(k!=="ALL"&&x.status!==k),t[28]=k,t[29]=R):R=t[29],B=a.filter(R);const G=Yt(B),H=a.length;let y;t[30]!==a?(y=a.filter(ws),t[30]=a,t[31]=y):y=t[31];const _=y.length;let W;t[32]!==a?(W=a.filter(ys),t[32]=a,t[33]=W):W=t[33];let Y;t[34]!==y.length||t[35]!==W.length||t[36]!==a.length?(Y={total:H,active:_,inactive:W.length},t[34]=y.length,t[35]=W.length,t[36]=a.length,t[37]=Y):Y=t[37];const q=Y;let Z;t[38]!==g||t[39]!==m.mode||t[40]!==m.virtualMcp?(Z=async()=>{if(m.mode!=="deleting")return;const x=m.virtualMcp.id;if(D({type:"close"}),!(!x||ye(x)))try{await g.delete.mutateAsync(x)}catch{}},t[38]=g,t[39]=m.mode,t[40]=m.virtualMcp,t[41]=Z):Z=t[41];const J=Z;let ee;t[42]!==g||t[43]!==d?(ee=async()=>{P(!1);let x=0;for(const N of d)if(!ye(N))try{await g.delete.mutateAsync(N),x++}catch{}wt.success(`Deleted ${x} agent${x!==1?"s":""}`),p()},t[42]=g,t[43]=d,t[44]=ee):ee=t[44];const E=ee;let ke;t[45]!==n||t[46]!==e.slug||t[47]!==c?(ke=x=>{if(c){u(x);return}n({to:"/$org/$project/agents/$agentId",params:{org:e.slug,project:St,agentId:x}})},t[45]=n,t[46]=e.slug,t[47]=c,t[48]=ke):ke=t[48];const ne=ke;let ie;t[49]!==d||t[50]!==c?(ie=c?[{id:"select",header:"",render:x=>s.jsx(Fe,{checked:d.has(x.id),onCheckedChange:()=>u(x.id),onClick:Cs}),cellClassName:"w-10 shrink-0"}]:[],t[49]=d,t[50]=c,t[51]=ie):ie=t[51];let _e,De,ze,Ae,Me,$e;t[52]===Symbol.for("react.memo_cache_sentinel")?(_e={id:"title",header:"Name",render:Ns,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},De={id:"description",header:"Description",render:vs,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},ze={id:"connections",header:"Connections",render:js,cellClassName:"w-28 shrink-0"},Ae={id:"status",header:"Status",render:gs,cellClassName:"w-24 shrink-0"},Me={id:"updated_by",header:"Updated by",render:ps,cellClassName:"w-32 shrink-0",sortable:!0},$e={id:"updated_at",header:"Updated",render:xs,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},t[52]=_e,t[53]=De,t[54]=ze,t[55]=Ae,t[56]=Me,t[57]=$e):(_e=t[52],De=t[53],ze=t[54],Ae=t[55],Me=t[56],$e=t[57]);let le;t[58]!==ne?(le={id:"actions",header:"",render:x=>s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:hs,children:s.jsx(nt,{size:20})})}),s.jsxs(st,{align:"end",onClick:us,children:[s.jsxs(je,{onClick:N=>{N.stopPropagation(),ne(x.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(x.id)&&s.jsxs(je,{variant:"destructive",onClick:N=>{N.stopPropagation(),D({type:"delete",virtualMcp:x})},children:[s.jsx(He,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"},t[58]=ne,t[59]=le):le=t[59];let Te;t[60]!==ie||t[61]!==le?(Te=[...ie,_e,De,ze,Ae,Me,$e,le],t[60]=ie,t[61]=le,t[62]=Te):Te=t[62];const vt=Te;let Pe;t[63]!==f||t[64]!==j||t[65]!==c?(Pe=s.jsx("div",{className:"flex items-center gap-2",children:c?s.jsxs(U,{variant:"ghost",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:p,children:[s.jsx(jt,{size:14}),"Cancel"]}):s.jsxs(s.Fragment,{children:[s.jsxs(U,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:()=>O(!0),children:[s.jsx(Qt,{size:14}),"Select"]}),s.jsx(U,{onClick:f,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:j,children:j?"Creating...":"Create Agent"})]})}),t[63]=f,t[64]=j,t[65]=c,t[66]=Pe):Pe=t[66];const Je=Pe;$=Ce;const Qe=m.mode==="deleting";let Ie;t[67]===Symbol.for("react.memo_cache_sentinel")?(Ie=x=>!x&&D({type:"close"}),t[67]=Ie):Ie=t[67];let Oe;t[68]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(at,{children:"Delete Agent?"}),t[68]=Oe):Oe=t[68];const We=m.mode==="deleting"&&m.virtualMcp.title;let ae;t[69]!==We?(ae=s.jsxs(rt,{children:[Oe,s.jsxs(ot,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:We}),"."]})]}),t[69]=We,t[70]=ae):ae=t[70];let Be;t[71]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(ct,{children:"Cancel"}),t[71]=Be):Be=t[71];let re;t[72]!==J?(re=s.jsxs(dt,{children:[Be,s.jsx(mt,{onClick:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[72]=J,t[73]=re):re=t[73];let oe;t[74]!==ae||t[75]!==re?(oe=s.jsxs(ft,{children:[ae,re]}),t[74]=ae,t[75]=re,t[76]=oe):oe=t[76],t[77]!==Qe||t[78]!==oe?(r=s.jsx(ut,{open:Qe,onOpenChange:Ie,children:oe}),t[77]=Qe,t[78]=oe,t[79]=r):r=t[79];const Xe=d.size!==1?"s":"";let ce;t[80]!==d.size||t[81]!==Xe?(ce=s.jsxs(at,{children:["Delete ",d.size," agent",Xe,"?"]}),t[80]=d.size,t[81]=Xe,t[82]=ce):ce=t[82];let Le;t[83]===Symbol.for("react.memo_cache_sentinel")?(Le=s.jsx(ot,{children:"This action cannot be undone. This will permanently delete the selected agents."}),t[83]=Le):Le=t[83];let de;t[84]!==ce?(de=s.jsxs(rt,{children:[ce,Le]}),t[84]=ce,t[85]=de):de=t[85];let Ee;t[86]===Symbol.for("react.memo_cache_sentinel")?(Ee=s.jsx(ct,{children:"Cancel"}),t[86]=Ee):Ee=t[86];let me;t[87]!==E?(me=s.jsxs(dt,{children:[Ee,s.jsx(mt,{onClick:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[87]=E,t[88]=me):me=t[88];let fe;t[89]!==de||t[90]!==me?(fe=s.jsxs(ft,{children:[de,me]}),t[89]=de,t[90]=me,t[91]=fe):fe=t[91],t[92]!==z||t[93]!==fe?(h=s.jsx(ut,{open:z,onOpenChange:P,children:fe}),t[92]=z,t[93]=fe,t[94]=h):h=t[94];const Ye=q.active>0&&` · ${q.active} active`,Ze=q.inactive>0&&` · ${q.inactive} inactive`;let ue;t[95]!==q.total||t[96]!==Ye||t[97]!==Ze?(ue=s.jsx(Ce.Header.Left,{children:s.jsx(Dt,{children:s.jsx(zt,{children:s.jsx(At,{children:s.jsxs(Mt,{className:"flex items-center gap-2",children:["Agents",s.jsxs("span",{className:"text-xs font-normal text-muted-foreground tabular-nums",children:[q.total," total",Ye,Ze]})]})})})})}),t[95]=q.total,t[96]=Ye,t[97]=Ze,t[98]=ue):ue=t[98];let Re;t[99]===Symbol.for("react.memo_cache_sentinel")?(Re=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],t[99]=Re):Re=t[99];let Ke,Ve;t[100]===Symbol.for("react.memo_cache_sentinel")?(Ke=x=>I(x||"ALL"),Ve=[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"}],t[100]=Ke,t[101]=Ve):(Ke=t[100],Ve=t[101]);let he;t[102]!==k?(he=[{label:"Status",value:k,onChange:Ke,options:Ve}],t[102]=k,t[103]=he):he=t[103];let xe;t[104]!==i.handleSort||t[105]!==i.setViewMode||t[106]!==i.sortDirection||t[107]!==i.sortKey||t[108]!==i.viewMode||t[109]!==he?(xe=s.jsx(kt,{viewMode:i.viewMode,onViewModeChange:i.setViewMode,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,sortOptions:Re,filters:he}),t[104]=i.handleSort,t[105]=i.setViewMode,t[106]=i.sortDirection,t[107]=i.sortKey,t[108]=i.viewMode,t[109]=he,t[110]=xe):xe=t[110];let pe;t[111]!==Je||t[112]!==xe?(pe=s.jsxs(Ce.Header.Right,{children:[xe,Je]}),t[111]=Je,t[112]=xe,t[113]=pe):pe=t[113],t[114]!==ue||t[115]!==pe?(v=s.jsxs(Ce.Header,{children:[ue,pe]}),t[114]=ue,t[115]=pe,t[116]=v):v=t[116];let ge;t[117]!==i?(ge=x=>{x.key==="Escape"&&(i.setSearch(""),x.target.blur())},t[117]=i,t[118]=ge):ge=t[118],t[119]!==i.search||t[120]!==i.setSearch||t[121]!==ge?(T=s.jsx("div",{className:"flex items-center gap-3 px-5 pb-0",children:s.jsx("div",{className:"flex-1",children:s.jsx(_t,{value:i.search,onChange:i.setSearch,placeholder:"Search for an agent...",onKeyDown:ge})})}),t[119]=i.search,t[120]=i.setSearch,t[121]=ge,t[122]=T):T=t[122],M=Ce.Content,L=i.viewMode==="cards"?s.jsx("div",{className:"flex-1 overflow-auto p-5",children:B.length===0?s.jsx("div",{className:"flex items-center h-full",children:s.jsx(lt,{image:s.jsx(se,{size:48,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections.",actions:!i.search&&s.jsxs(U,{size:"sm",onClick:f,disabled:j,children:[s.jsx(ht,{size:14}),j?"Creating...":"Create Agent"]})})}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:G.map(x=>{if(x.type==="group")return s.jsx(es,{group:x,onNavigate:ne,onDelete:Ne=>D({type:"delete",virtualMcp:Ne}),selectionMode:c,selectedIds:d,onToggleSelect:u},x.key);const N=x.agent;return s.jsxs("div",{className:"relative",children:[c&&s.jsx("div",{className:"absolute top-3 left-3 z-10",children:s.jsx(Fe,{checked:d.has(N.id),onCheckedChange:()=>u(N.id)})}),s.jsx(gt,{connection:{id:N.id??"",title:N.title,description:N.description,icon:N.icon,status:N.status},fallbackIcon:s.jsx(se,{}),onClick:()=>ne(N.id),className:X(c&&d.has(N.id)&&"ring-2 ring-primary"),body:s.jsx(qe,{status:N.status}),footer:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground w-full min-w-0",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(we,{id:N.updated_by??N.created_by,size:"3xs"})}),s.jsx("span",{className:"shrink-0 ml-2",children:N.updated_at?Se(new Date(N.updated_at)):"—"})]}),headerActions:c?void 0:s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:fs,children:s.jsx(nt,{size:20})})}),s.jsxs(st,{align:"end",onClick:ms,children:[s.jsxs(je,{onClick:Ne=>{Ne.stopPropagation(),ne(N.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(N.id)&&s.jsxs(je,{variant:"destructive",onClick:Ne=>{Ne.stopPropagation(),D({type:"delete",virtualMcp:N})},children:[s.jsx(He,{size:16}),"Delete"]})]})]})})]},N.id)})})}):s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx("div",{className:"flex-1 overflow-auto min-w-0",children:G.length===0?s.jsx("div",{className:"flex items-center h-full",children:s.jsx(lt,{image:s.jsx(se,{size:48,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections.",actions:!i.search&&s.jsxs(U,{size:"sm",onClick:f,disabled:j,children:[s.jsx(ht,{size:14}),j?"Creating...":"Create Agent"]})})}):s.jsx("div",{className:"min-w-[1000px]",children:s.jsx(as,{columns:vt,grouped:G,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,onRowClick:x=>ne(x.id),selectionMode:c,selectedIds:d,onToggleSelect:u})})})}),t[7]=g,t[8]=z,t[9]=f,t[10]=m.mode,t[11]=m.virtualMcp,t[12]=j,t[13]=i,t[14]=n,t[15]=e.slug,t[16]=d,t[17]=c,t[18]=k,t[19]=a,t[20]=M,t[21]=$,t[22]=B,t[23]=T,t[24]=L,t[25]=r,t[26]=h,t[27]=v}else M=t[20],$=t[21],B=t[22],T=t[23],L=t[24],r=t[25],h=t[26],v=t[27];let K;t[123]!==M||t[124]!==L?(K=s.jsx(M,{children:L}),t[123]=M,t[124]=L,t[125]=K):K=t[125];let V;t[126]!==B||t[127]!==d.size||t[128]!==c?(V=c&&s.jsx(ls,{count:d.size,total:B.length,onSelectAll:()=>C(new Set(B.map(ds))),onDeselectAll:()=>C(new Set),onDelete:()=>P(!0),onCancel:p}),t[126]=B,t[127]=d.size,t[128]=c,t[129]=V):V=t[129];let F;return t[130]!==$||t[131]!==T||t[132]!==K||t[133]!==V||t[134]!==r||t[135]!==h||t[136]!==v?(F=s.jsxs($,{children:[r,h,v,T,K,V]}),t[130]=$,t[131]=T,t[132]=K,t[133]=V,t[134]=r,t[135]=h,t[136]=v,t[137]=F):F=t[137],F}function ds(t){return t.id}function ms(t){return t.stopPropagation()}function fs(t){return t.stopPropagation()}function us(t){return t.stopPropagation()}function hs(t){return t.stopPropagation()}function xs(t){return s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:t.updated_at?Se(new Date(t.updated_at)):"—"})}function ps(t){return s.jsx(we,{id:t.updated_by??t.created_by,size:"3xs"})}function gs(t){return s.jsx(qe,{status:t.status})}function js(t){return s.jsx(Q.Suspense,{fallback:s.jsx(xt.Fallback,{}),children:s.jsx(xt,{connectionIds:t.connections.map(bs),maxVisibleIcons:2})})}function bs(t){return t.connection_id}function vs(t){return s.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:t.description||"—"})}function Ns(t){return s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ue,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(se,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.title})]})}function Cs(t){return t.stopPropagation()}function ys(t){return t.status==="inactive"}function ws(t){return t.status==="active"}function Sn(){const t=ve.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Nt,{children:s.jsx(Q.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(Xt,{size:32,className:"animate-spin text-muted-foreground"})}),children:s.jsx(cs,{})})}),t[0]=e):e=t[0],e}export{Sn as default};
|
|
1
|
+
import{c as ve,j as s,E as Nt,r as Q,u as Ct,e as yt,B as U,D as X,v as wt,O as St}from"./index-NjMxPJgF.js";import{C as kt}from"./collection-display-button-CpVZ4wHm.js";import{C as _t}from"./collection-search-BYV7N3mr.js";import{P as Ce}from"./index-De1iYnQy.js";import{B as Dt,a as zt,b as At,c as Mt}from"./breadcrumb-C2RG4nAQ.js";import{C as gt}from"./connection-card-Bak2l1_M.js";import{B as be}from"./badge-DtRom7JO.js";import{i as $t}from"./AlertCircle-12chRuly.js";import{i as Tt}from"./CheckCircle-hBpanOsI.js";import{E as lt}from"./empty-state-xIvMMy-_.js";import{I as Ue}from"./integration-icon-BPVDVJvP.js";import{u as Pt}from"./use-list-state-CbsN6RbJ.js";import{u as It}from"./use-create-virtual-mcp-B7odZ_c3.js";import{i as ye}from"./constants-D7qXOYRn.js";import{b as Ot,a as Bt}from"./use-virtual-mcp-BP6aaUzw.js";import{c as at,b as rt,d as ot,A as ct,e as dt,h as mt,a as ft,f as ut}from"./alert-dialog-B_ae3oRt.js";import{C as Fe}from"./checkbox-B1rexahu.js";import{c as Lt,d as Et,b as Rt,a as Kt,D as Vt}from"./dialog-ChXYvlDt.js";import{c as Gt,a as Ut,b as Ge,e as te,d as Ft,T as Ht}from"./table-C-1rP_rt.js";import{D as et,a as tt,b as st,c as je}from"./dropdown-menu-BxlQMXgW.js";import{n as qt}from"./ArrowDown-7rbX3zqZ.js";import{i as Jt}from"./ArrowUp-DoIG5eQh.js";import{i as Qt}from"./CheckSquare-Cr3IzSXp.js";import{t as Wt}from"./ChevronDown-BIRGQoZ5.js";import{i as nt}from"./DotsVertical-2nyye7GD.js";import{s as it}from"./Eye-hBqNQHpc.js";import{i as Xt}from"./Loading01-Bb8FCosd.js";import{s as ht}from"./Plus-CajZ9VfC.js";import{s as He}from"./Trash01-B_4PTwjI.js";import{t as se}from"./Users03-Bv-hUQkl.js";import{s as jt}from"./XClose-CcNXqPQc.js";import{U as we}from"./user-iDZRuimU.js";import{A as xt}from"./agent-connections-preview-3pYXfstj.js";import{f as Se}from"./format-time-CMKyl-GC.js";import"./Check-DW8AVFkq.js";import"./Grid01-C5e9ReQ4.js";import"./List-NLa0AhO4.js";import"./tooltip-BJMSu0c2.js";import"./index-CqyqI90F.js";import"./SearchMd-eZWeU0sP.js";import"./input-B89sozd8.js";import"./useQuery-BYBCFxgb.js";import"./useMutation-68NxhXCf.js";import"./ChevronRight-DsjLlugM.js";import"./card-B8qDZGCZ.js";import"./Container-DHyMOW_p.js";import"./use-view-mode-ss3eRodO.js";import"./use-mobile-DOUfTohp.js";import"./use-collections-C0cYiFfV.js";import"./X-LzehymHS.js";import"./avatar-B2yArl-q.js";import"./use-connection-CHFdKnsr.js";import"./differenceInSeconds-NQ4PDo0z.js";function qe(t){const e=ve.c(3),{status:n}=t;if(n==="active"){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(be,{variant:"success",className:"gap-1.5 text-success border-success/40 bg-background",children:[s.jsx(Tt,{size:12}),"Active"]}),e[0]=i):i=e[0],i}if(n==="error"){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(be,{variant:"outline",className:"gap-1.5 text-destructive border-destructive/40 bg-background",children:[s.jsx($t,{size:12}),"Error"]}),e[1]=i):i=e[1],i}let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(be,{variant:"outline",className:"text-muted-foreground",children:"Inactive"}),e[2]=o):o=e[2],o}function pt(t){return t.title.trim().replace(/\s+\(\d+\)$/,"")}function Yt(t){const e=new Map;for(const i of t){const a=pt(i),l=e.get(a);l?l.push(i):e.set(a,[i])}const n=[],o=new Set;for(const i of t){const a=pt(i);if(o.has(a))continue;o.add(a);const l=e.get(a),f=l[0];l.length===1?n.push({type:"single",agent:f}):n.push({type:"group",key:a,icon:f.icon,title:f.title.replace(/\s*\(\d+\)\s*$/,""),agents:l})}return n}function bt(t){const e=new Set,n=[];for(const o of t)o.created_by&&!e.has(o.created_by)&&(e.add(o.created_by),n.push(o.created_by));return n}function Zt(t,e){switch(e.type){case"delete":return{mode:"deleting",virtualMcp:e.virtualMcp};case"close":return{mode:"idle"}}}function es(t){const e=ve.c(107),{group:n,onNavigate:o,onDelete:i,selectionMode:a,selectedIds:l,onToggleSelect:f}=t,[j,g]=Q.useState(!1);let w;if(e[0]!==n.agents||e[1]!==l){let y;e[3]!==l?(y=_=>l.has(_.id),e[3]=l,e[4]=y):y=e[4],w=n.agents.every(y),e[0]=n.agents,e[1]=l,e[2]=w}else w=e[2];const m=w;let D;if(e[5]!==n.agents||e[6]!==l){let y;e[8]!==l?(y=_=>l.has(_.id),e[8]=l,e[9]=y):y=e[9],D=n.agents.some(y),e[5]=n.agents,e[6]=l,e[7]=D}else D=e[7];const c=D;let O,S,d,C,z,P,k,I,A,u,b;if(e[10]!==m||e[11]!==n.agents||e[12]!==n.icon||e[13]!==n.title||e[14]!==f||e[15]!==l||e[16]!==a||e[17]!==c){const y=bt(n.agents),_=n.agents.reduce(is,n.agents[0]),W=_.updated_at??_.created_at;O=gt;const Y=`${n.agents.length} instances`;e[29]!==n.icon||e[30]!==n.title||e[31]!==Y?(A={title:n.title,icon:n.icon,description:Y},e[29]=n.icon,e[30]=n.title,e[31]=Y,e[32]=A):A=e[32],e[33]!==m||e[34]!==n.agents||e[35]!==f||e[36]!==l||e[37]!==a?(u=()=>a?(()=>{for(const E of n.agents)m?l.has(E.id)&&f(E.id):l.has(E.id)||f(E.id)})():g(!0),e[33]=m,e[34]=n.agents,e[35]=f,e[36]=l,e[37]=a,e[38]=u):u=e[38];const q=a&&m&&"ring-2 ring-primary",Z=a&&c&&!m&&"ring-1 ring-primary/50";e[39]!==q||e[40]!==Z?(b=X(q,Z),e[39]=q,e[40]=Z,e[41]=b):b=e[41],e[42]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(se,{}),e[42]=S):S=e[42],e[43]!==m||e[44]!==n.agents||e[45]!==f||e[46]!==l||e[47]!==a||e[48]!==c?(d=a?s.jsx(Fe,{checked:m?!0:c?"indeterminate":!1,onCheckedChange:()=>{for(const E of n.agents)m?l.has(E.id)&&f(E.id):l.has(E.id)||f(E.id)}}):s.jsxs(be,{variant:"secondary",className:"text-xs tabular-nums",children:["x",n.agents.length]}),e[43]=m,e[44]=n.agents,e[45]=f,e[46]=l,e[47]=a,e[48]=c,e[49]=d):d=e[49];let J;e[50]!==n.agents?(J=n.agents.slice(0,6).map(ns),e[50]=n.agents,e[51]=J):J=e[51],e[52]!==J?(C=s.jsx("div",{className:"flex items-center gap-1",children:J}),e[52]=J,e[53]=C):C=e[53],k="flex items-center justify-between text-xs text-muted-foreground w-full min-w-0";const ee=y.map(E=>s.jsx(we,{id:E,size:"3xs",avatarOnly:y.length>1},E));e[54]!==ee?(I=s.jsx("div",{className:"flex items-center -space-x-1.5",children:ee}),e[54]=ee,e[55]=I):I=e[55],z="shrink-0 ml-2",P=W?Se(new Date(W)):"—",e[10]=m,e[11]=n.agents,e[12]=n.icon,e[13]=n.title,e[14]=f,e[15]=l,e[16]=a,e[17]=c,e[18]=O,e[19]=S,e[20]=d,e[21]=C,e[22]=z,e[23]=P,e[24]=k,e[25]=I,e[26]=A,e[27]=u,e[28]=b}else O=e[18],S=e[19],d=e[20],C=e[21],z=e[22],P=e[23],k=e[24],I=e[25],A=e[26],u=e[27],b=e[28];let p;e[56]!==z||e[57]!==P?(p=s.jsx("span",{className:z,children:P}),e[56]=z,e[57]=P,e[58]=p):p=e[58];let M;e[59]!==p||e[60]!==k||e[61]!==I?(M=s.jsxs("div",{className:k,children:[I,p]}),e[59]=p,e[60]=k,e[61]=I,e[62]=M):M=e[62];let $;e[63]!==O||e[64]!==S||e[65]!==d||e[66]!==C||e[67]!==M||e[68]!==A||e[69]!==u||e[70]!==b?($=s.jsx(O,{connection:A,onClick:u,className:b,fallbackIcon:S,headerActions:d,body:C,footer:M}),e[63]=O,e[64]=S,e[65]=d,e[66]=C,e[67]=M,e[68]=A,e[69]=u,e[70]=b,e[71]=$):$=e[71];let B;e[72]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(se,{}),e[72]=B):B=e[72];let T;e[73]!==n.icon||e[74]!==n.title?(T=s.jsx(Ue,{icon:n.icon,name:n.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:B}),e[73]=n.icon,e[74]=n.title,e[75]=T):T=e[75];let L;e[76]!==n.agents.length?(L=s.jsxs(be,{variant:"secondary",className:"ml-2 text-xs tabular-nums",children:["x",n.agents.length]}),e[76]=n.agents.length,e[77]=L):L=e[77];let r;e[78]!==n.title||e[79]!==L?(r=s.jsxs(Lt,{children:[n.title,L]}),e[78]=n.title,e[79]=L,e[80]=r):r=e[80];let h;e[81]!==n.agents.length?(h=s.jsxs(Et,{children:[n.agents.length," instances"]}),e[81]=n.agents.length,e[82]=h):h=e[82];let v;e[83]!==r||e[84]!==h?(v=s.jsxs("div",{children:[r,h]}),e[83]=r,e[84]=h,e[85]=v):v=e[85];let K;e[86]!==T||e[87]!==v?(K=s.jsx(Rt,{className:"px-6 pt-6 pb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[T,v]})}),e[86]=T,e[87]=v,e[88]=K):K=e[88];let V;if(e[89]!==n.agents||e[90]!==i||e[91]!==o){let y;e[93]!==i||e[94]!==o?(y=_=>s.jsxs("div",{className:"flex items-center gap-3 px-6 py-3 hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>{g(!1),o(_.id)},children:[s.jsx(Ue,{icon:_.icon,name:_.title,size:"sm",className:"shrink-0",fallbackIcon:s.jsx(se,{})}),s.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:_.title}),s.jsx(qe,{status:_.status})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground shrink-0",children:[s.jsx(we,{id:_.created_by,size:"3xs"}),s.jsx("span",{children:_.created_at?Se(new Date(_.created_at)):"—"})]}),s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:ss,children:s.jsx(nt,{size:16})})}),s.jsxs(st,{align:"end",onClick:ts,children:[s.jsxs(je,{onClick:()=>{g(!1),o(_.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(_.id)&&s.jsxs(je,{variant:"destructive",onClick:()=>i(_),children:[s.jsx(He,{size:16}),"Delete"]})]})]})]},_.id),e[93]=i,e[94]=o,e[95]=y):y=e[95],V=n.agents.map(y),e[89]=n.agents,e[90]=i,e[91]=o,e[92]=V}else V=e[92];let F;e[96]!==V?(F=s.jsx("div",{className:"divide-y max-h-80 overflow-auto",children:V}),e[96]=V,e[97]=F):F=e[97];let R;e[98]!==K||e[99]!==F?(R=s.jsxs(Kt,{className:"sm:max-w-lg p-0 gap-0",children:[K,F]}),e[98]=K,e[99]=F,e[100]=R):R=e[100];let G;e[101]!==j||e[102]!==R?(G=s.jsx(Vt,{open:j,onOpenChange:g,children:R}),e[101]=j,e[102]=R,e[103]=G):G=e[103];let H;return e[104]!==$||e[105]!==G?(H=s.jsxs(s.Fragment,{children:[$,G]}),e[104]=$,e[105]=G,e[106]=H):H=e[106],H}function ts(t){return t.stopPropagation()}function ss(t){return t.stopPropagation()}function ns(t){return s.jsx(qe,{status:t.status},t.id)}function is(t,e){const n=e.updated_at??e.created_at,o=t.updated_at??t.created_at;return n?o?new Date(n)>new Date(o)?e:t:e:t}function ls(t){const e=ve.c(21),{count:n,total:o,onSelectAll:i,onDeselectAll:a,onDelete:l,onCancel:f}=t;if(n===0)return null;let j;e[0]!==n?(j=s.jsxs("span",{className:"text-sm font-medium tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=j):j=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"h-4 w-px bg-border"}),e[2]=g):g=e[2];let w;e[3]!==n||e[4]!==a||e[5]!==i||e[6]!==o?(w=n<o?s.jsxs(U,{variant:"ghost",size:"sm",onClick:i,children:["Select all (",o,")"]}):s.jsx(U,{variant:"ghost",size:"sm",onClick:a,children:"Clear selection"}),e[3]=n,e[4]=a,e[5]=i,e[6]=o,e[7]=w):w=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-4 w-px bg-border"}),e[8]=m):m=e[8];let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(He,{size:14}),e[9]=D):D=e[9];let c;e[10]!==l?(c=s.jsxs(U,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:l,children:[D,"Delete"]}),e[10]=l,e[11]=c):c=e[11];let O;e[12]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("div",{className:"h-4 w-px bg-border"}),e[12]=O):O=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(jt,{size:14}),e[13]=S):S=e[13];let d;e[14]!==f?(d=s.jsxs(U,{variant:"ghost",size:"sm",onClick:f,children:[S,"Cancel"]}),e[14]=f,e[15]=d):d=e[15];let C;return e[16]!==j||e[17]!==w||e[18]!==c||e[19]!==d?(C=s.jsxs("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2 flex items-center gap-3 rounded-xl border border-border bg-background/95 backdrop-blur px-4 py-2.5 shadow-lg",children:[j,g,w,m,c,O,d]}),e[16]=j,e[17]=w,e[18]=c,e[19]=d,e[20]=C):C=e[20],C}function as(t){const e=ve.c(37),{columns:n,grouped:o,sortKey:i,sortDirection:a,onSort:l,onRowClick:f,selectionMode:j,selectedIds:g,onToggleSelect:w,emptyState:m}=t;let D;e[0]===Symbol.for("react.memo_cache_sentinel")?(D=new Set,e[0]=D):D=e[0];const[c,O]=Q.useState(D);let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=u=>{O(b=>{const p=new Set(b);return p.has(u)?p.delete(u):p.add(u),p})},e[1]=S):S=e[1];const d=S;if(o.length===0&&m){let u;return e[2]!==m?(u=s.jsx("div",{className:"flex items-center justify-center h-full",children:m}),e[2]=m,e[3]=u):u=e[3],u}const C=n.length;let z;if(e[4]!==C||e[5]!==n||e[6]!==l||e[7]!==a||e[8]!==i){let u;e[10]!==C||e[11]!==l||e[12]!==a||e[13]!==i?(u=(b,p)=>{const M=i===b.id,$=p===C-1;return s.jsx(Gt,{className:X("px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider",$&&"w-8","group transition-colors select-none",b.sortable&&"hover:bg-accent cursor-pointer",b.cellClassName),onClick:b.sortable&&l?()=>l(b.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[b.header,b.sortable&&s.jsx("span",{className:"w-4 flex items-center justify-center",children:M&&a&&(a==="asc"?s.jsx(Jt,{size:16,className:"text-muted-foreground"}):s.jsx(qt,{size:16,className:"text-muted-foreground"}))})]})},b.id)},e[10]=C,e[11]=l,e[12]=a,e[13]=i,e[14]=u):u=e[14],z=n.map(u),e[4]=C,e[5]=n,e[6]=l,e[7]=a,e[8]=i,e[9]=z}else z=e[9];let P;e[15]!==z?(P=s.jsx(Ut,{className:"border-b-0",children:s.jsx(Ge,{className:"h-9 hover:bg-transparent border-b border-border",children:z})}),e[15]=z,e[16]=P):P=e[16];let k;if(e[17]!==n||e[18]!==c||e[19]!==o||e[20]!==f||e[21]!==w||e[22]!==g||e[23]!==j){let u;e[25]!==n||e[26]!==c||e[27]!==f||e[28]!==w||e[29]!==g||e[30]!==j?(u=b=>{if(b.type==="single"){const r=b.agent;return s.jsx(Ge,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer",j&&g.has(r.id)&&"bg-primary/5"),onClick:()=>f(r),children:n.map(h=>s.jsx(te,{className:X("px-5 py-4 h-16 align-middle text-sm text-foreground",h.cellClassName),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:h.render?h.render(r):null})},h.id))},r.id)}const p=b,M=c.has(p.key),$=p.agents.every(r=>g.has(r.id)),B=p.agents.some(r=>g.has(r.id)),T=bt(p.agents),L=p.agents.reduce(os,p.agents[0]);return s.jsxs(Q.Fragment,{children:[s.jsx(Ge,{className:"border-b-0 hover:bg-accent/50 cursor-pointer transition-colors",onClick:()=>d(p.key),children:n.map(r=>{const h=X("px-5 py-3 h-14 align-middle text-sm",r.cellClassName);if(r.id==="select")return s.jsx(te,{className:h,children:s.jsx(Fe,{checked:$?!0:B?"indeterminate":!1,onCheckedChange:()=>{for(const v of p.agents)$?g.has(v.id)&&w(v.id):g.has(v.id)||w(v.id)},onClick:rs})},r.id);if(r.id==="title")return s.jsx(te,{className:h,children:s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ue,{icon:p.icon,name:p.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(se,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:p.title}),s.jsxs(be,{variant:"secondary",className:"text-xs tabular-nums",children:["x",p.agents.length]})]})},r.id);if(r.id==="updated_by")return s.jsx(te,{className:h,children:s.jsx("div",{className:"flex items-center -space-x-1.5",children:T.map(v=>s.jsx(we,{id:v,size:"3xs",avatarOnly:T.length>1},v))})},r.id);if(r.id==="updated_at"){const v=L.updated_at??L.created_at;return s.jsx(te,{className:h,children:s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v?Se(new Date(v)):"—"})},r.id)}return r.id==="actions"?s.jsx(te,{className:h,children:s.jsx(Wt,{size:16,className:X("text-muted-foreground transition-transform",M&&"rotate-180")})},r.id):s.jsx(te,{className:h},r.id)})}),M&&p.agents.map(r=>s.jsx(Ge,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer bg-muted/20",j&&g.has(r.id)&&"bg-primary/5"),onClick:()=>f(r),children:n.map(h=>s.jsx(te,{className:X("px-5 py-3 h-14 align-middle text-sm text-foreground",h.cellClassName,h.id==="title"&&"pl-12"),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:h.render?h.render(r):null})},h.id))},r.id))]},p.key)},e[25]=n,e[26]=c,e[27]=f,e[28]=w,e[29]=g,e[30]=j,e[31]=u):u=e[31],k=o.map(u),e[17]=n,e[18]=c,e[19]=o,e[20]=f,e[21]=w,e[22]=g,e[23]=j,e[24]=k}else k=e[24];let I;e[32]!==k?(I=s.jsx(Ft,{children:k}),e[32]=k,e[33]=I):I=e[33];let A;return e[34]!==P||e[35]!==I?(A=s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsxs(Ht,{className:"w-full border-collapse",children:[P,I]})}),e[34]=P,e[35]=I,e[36]=A):A=e[36],A}function rs(t){return t.stopPropagation()}function os(t,e){const n=e.updated_at??e.created_at,o=t.updated_at??t.created_at;return n?o?new Date(n)>new Date(o)?e:t:e:t}function cs(){const t=ve.c(138),{org:e}=Ct(),n=yt();let o;t[0]!==e.slug?(o={namespace:e.slug,resource:"agents"},t[0]=e.slug,t[1]=o):o=t[1];const i=Pt(o),a=Ot(i);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l={navigateOnCreate:!0},t[2]=l):l=t[2];const{createVirtualMCP:f,isCreating:j}=It(l),g=Bt();let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w={mode:"idle"},t[3]=w):w=t[3];const[m,D]=Q.useReducer(Zt,w),[c,O]=Q.useState(!1);let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=new Set,t[4]=S):S=t[4];const[d,C]=Q.useState(S),[z,P]=Q.useState(!1),[k,I]=Q.useState("ALL");let A;t[5]===Symbol.for("react.memo_cache_sentinel")?(A=R=>{C(G=>{const H=new Set(G);return H.has(R)?H.delete(R):H.add(R),H})},t[5]=A):A=t[5];const u=A;let b;t[6]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{O(!1),C(new Set)},t[6]=b):b=t[6];const p=b;let M,$,B,T,L,r,h,v;if(t[7]!==g||t[8]!==z||t[9]!==f||t[10]!==m.mode||t[11]!==m.virtualMcp||t[12]!==j||t[13]!==i||t[14]!==n||t[15]!==e.slug||t[16]!==d||t[17]!==c||t[18]!==k||t[19]!==a){let R;t[28]!==k?(R=x=>!(k!=="ALL"&&x.status!==k),t[28]=k,t[29]=R):R=t[29],B=a.filter(R);const G=Yt(B),H=a.length;let y;t[30]!==a?(y=a.filter(ws),t[30]=a,t[31]=y):y=t[31];const _=y.length;let W;t[32]!==a?(W=a.filter(ys),t[32]=a,t[33]=W):W=t[33];let Y;t[34]!==y.length||t[35]!==W.length||t[36]!==a.length?(Y={total:H,active:_,inactive:W.length},t[34]=y.length,t[35]=W.length,t[36]=a.length,t[37]=Y):Y=t[37];const q=Y;let Z;t[38]!==g||t[39]!==m.mode||t[40]!==m.virtualMcp?(Z=async()=>{if(m.mode!=="deleting")return;const x=m.virtualMcp.id;if(D({type:"close"}),!(!x||ye(x)))try{await g.delete.mutateAsync(x)}catch{}},t[38]=g,t[39]=m.mode,t[40]=m.virtualMcp,t[41]=Z):Z=t[41];const J=Z;let ee;t[42]!==g||t[43]!==d?(ee=async()=>{P(!1);let x=0;for(const N of d)if(!ye(N))try{await g.delete.mutateAsync(N),x++}catch{}wt.success(`Deleted ${x} agent${x!==1?"s":""}`),p()},t[42]=g,t[43]=d,t[44]=ee):ee=t[44];const E=ee;let ke;t[45]!==n||t[46]!==e.slug||t[47]!==c?(ke=x=>{if(c){u(x);return}n({to:"/$org/$project/agents/$agentId",params:{org:e.slug,project:St,agentId:x}})},t[45]=n,t[46]=e.slug,t[47]=c,t[48]=ke):ke=t[48];const ne=ke;let ie;t[49]!==d||t[50]!==c?(ie=c?[{id:"select",header:"",render:x=>s.jsx(Fe,{checked:d.has(x.id),onCheckedChange:()=>u(x.id),onClick:Cs}),cellClassName:"w-10 shrink-0"}]:[],t[49]=d,t[50]=c,t[51]=ie):ie=t[51];let _e,De,ze,Ae,Me,$e;t[52]===Symbol.for("react.memo_cache_sentinel")?(_e={id:"title",header:"Name",render:Ns,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},De={id:"description",header:"Description",render:vs,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},ze={id:"connections",header:"Connections",render:js,cellClassName:"w-28 shrink-0"},Ae={id:"status",header:"Status",render:gs,cellClassName:"w-24 shrink-0"},Me={id:"updated_by",header:"Updated by",render:ps,cellClassName:"w-32 shrink-0",sortable:!0},$e={id:"updated_at",header:"Updated",render:xs,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},t[52]=_e,t[53]=De,t[54]=ze,t[55]=Ae,t[56]=Me,t[57]=$e):(_e=t[52],De=t[53],ze=t[54],Ae=t[55],Me=t[56],$e=t[57]);let le;t[58]!==ne?(le={id:"actions",header:"",render:x=>s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:hs,children:s.jsx(nt,{size:20})})}),s.jsxs(st,{align:"end",onClick:us,children:[s.jsxs(je,{onClick:N=>{N.stopPropagation(),ne(x.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(x.id)&&s.jsxs(je,{variant:"destructive",onClick:N=>{N.stopPropagation(),D({type:"delete",virtualMcp:x})},children:[s.jsx(He,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"},t[58]=ne,t[59]=le):le=t[59];let Te;t[60]!==ie||t[61]!==le?(Te=[...ie,_e,De,ze,Ae,Me,$e,le],t[60]=ie,t[61]=le,t[62]=Te):Te=t[62];const vt=Te;let Pe;t[63]!==f||t[64]!==j||t[65]!==c?(Pe=s.jsx("div",{className:"flex items-center gap-2",children:c?s.jsxs(U,{variant:"ghost",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:p,children:[s.jsx(jt,{size:14}),"Cancel"]}):s.jsxs(s.Fragment,{children:[s.jsxs(U,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:()=>O(!0),children:[s.jsx(Qt,{size:14}),"Select"]}),s.jsx(U,{onClick:f,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:j,children:j?"Creating...":"Create Agent"})]})}),t[63]=f,t[64]=j,t[65]=c,t[66]=Pe):Pe=t[66];const Je=Pe;$=Ce;const Qe=m.mode==="deleting";let Ie;t[67]===Symbol.for("react.memo_cache_sentinel")?(Ie=x=>!x&&D({type:"close"}),t[67]=Ie):Ie=t[67];let Oe;t[68]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(at,{children:"Delete Agent?"}),t[68]=Oe):Oe=t[68];const We=m.mode==="deleting"&&m.virtualMcp.title;let ae;t[69]!==We?(ae=s.jsxs(rt,{children:[Oe,s.jsxs(ot,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:We}),"."]})]}),t[69]=We,t[70]=ae):ae=t[70];let Be;t[71]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(ct,{children:"Cancel"}),t[71]=Be):Be=t[71];let re;t[72]!==J?(re=s.jsxs(dt,{children:[Be,s.jsx(mt,{onClick:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[72]=J,t[73]=re):re=t[73];let oe;t[74]!==ae||t[75]!==re?(oe=s.jsxs(ft,{children:[ae,re]}),t[74]=ae,t[75]=re,t[76]=oe):oe=t[76],t[77]!==Qe||t[78]!==oe?(r=s.jsx(ut,{open:Qe,onOpenChange:Ie,children:oe}),t[77]=Qe,t[78]=oe,t[79]=r):r=t[79];const Xe=d.size!==1?"s":"";let ce;t[80]!==d.size||t[81]!==Xe?(ce=s.jsxs(at,{children:["Delete ",d.size," agent",Xe,"?"]}),t[80]=d.size,t[81]=Xe,t[82]=ce):ce=t[82];let Le;t[83]===Symbol.for("react.memo_cache_sentinel")?(Le=s.jsx(ot,{children:"This action cannot be undone. This will permanently delete the selected agents."}),t[83]=Le):Le=t[83];let de;t[84]!==ce?(de=s.jsxs(rt,{children:[ce,Le]}),t[84]=ce,t[85]=de):de=t[85];let Ee;t[86]===Symbol.for("react.memo_cache_sentinel")?(Ee=s.jsx(ct,{children:"Cancel"}),t[86]=Ee):Ee=t[86];let me;t[87]!==E?(me=s.jsxs(dt,{children:[Ee,s.jsx(mt,{onClick:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[87]=E,t[88]=me):me=t[88];let fe;t[89]!==de||t[90]!==me?(fe=s.jsxs(ft,{children:[de,me]}),t[89]=de,t[90]=me,t[91]=fe):fe=t[91],t[92]!==z||t[93]!==fe?(h=s.jsx(ut,{open:z,onOpenChange:P,children:fe}),t[92]=z,t[93]=fe,t[94]=h):h=t[94];const Ye=q.active>0&&` · ${q.active} active`,Ze=q.inactive>0&&` · ${q.inactive} inactive`;let ue;t[95]!==q.total||t[96]!==Ye||t[97]!==Ze?(ue=s.jsx(Ce.Header.Left,{children:s.jsx(Dt,{children:s.jsx(zt,{children:s.jsx(At,{children:s.jsxs(Mt,{className:"flex items-center gap-2",children:["Agents",s.jsxs("span",{className:"text-xs font-normal text-muted-foreground tabular-nums",children:[q.total," total",Ye,Ze]})]})})})})}),t[95]=q.total,t[96]=Ye,t[97]=Ze,t[98]=ue):ue=t[98];let Re;t[99]===Symbol.for("react.memo_cache_sentinel")?(Re=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],t[99]=Re):Re=t[99];let Ke,Ve;t[100]===Symbol.for("react.memo_cache_sentinel")?(Ke=x=>I(x||"ALL"),Ve=[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"}],t[100]=Ke,t[101]=Ve):(Ke=t[100],Ve=t[101]);let he;t[102]!==k?(he=[{label:"Status",value:k,onChange:Ke,options:Ve}],t[102]=k,t[103]=he):he=t[103];let xe;t[104]!==i.handleSort||t[105]!==i.setViewMode||t[106]!==i.sortDirection||t[107]!==i.sortKey||t[108]!==i.viewMode||t[109]!==he?(xe=s.jsx(kt,{viewMode:i.viewMode,onViewModeChange:i.setViewMode,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,sortOptions:Re,filters:he}),t[104]=i.handleSort,t[105]=i.setViewMode,t[106]=i.sortDirection,t[107]=i.sortKey,t[108]=i.viewMode,t[109]=he,t[110]=xe):xe=t[110];let pe;t[111]!==Je||t[112]!==xe?(pe=s.jsxs(Ce.Header.Right,{children:[xe,Je]}),t[111]=Je,t[112]=xe,t[113]=pe):pe=t[113],t[114]!==ue||t[115]!==pe?(v=s.jsxs(Ce.Header,{children:[ue,pe]}),t[114]=ue,t[115]=pe,t[116]=v):v=t[116];let ge;t[117]!==i?(ge=x=>{x.key==="Escape"&&(i.setSearch(""),x.target.blur())},t[117]=i,t[118]=ge):ge=t[118],t[119]!==i.search||t[120]!==i.setSearch||t[121]!==ge?(T=s.jsx("div",{className:"flex items-center gap-3 px-5 pb-0",children:s.jsx("div",{className:"flex-1",children:s.jsx(_t,{value:i.search,onChange:i.setSearch,placeholder:"Search for an agent...",onKeyDown:ge})})}),t[119]=i.search,t[120]=i.setSearch,t[121]=ge,t[122]=T):T=t[122],M=Ce.Content,L=i.viewMode==="cards"?s.jsx("div",{className:"flex-1 overflow-auto p-5",children:B.length===0?s.jsx("div",{className:"flex items-center h-full",children:s.jsx(lt,{image:s.jsx(se,{size:48,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections.",actions:!i.search&&s.jsxs(U,{size:"sm",onClick:f,disabled:j,children:[s.jsx(ht,{size:14}),j?"Creating...":"Create Agent"]})})}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:G.map(x=>{if(x.type==="group")return s.jsx(es,{group:x,onNavigate:ne,onDelete:Ne=>D({type:"delete",virtualMcp:Ne}),selectionMode:c,selectedIds:d,onToggleSelect:u},x.key);const N=x.agent;return s.jsxs("div",{className:"relative",children:[c&&s.jsx("div",{className:"absolute top-3 left-3 z-10",children:s.jsx(Fe,{checked:d.has(N.id),onCheckedChange:()=>u(N.id)})}),s.jsx(gt,{connection:{id:N.id??"",title:N.title,description:N.description,icon:N.icon,status:N.status},fallbackIcon:s.jsx(se,{}),onClick:()=>ne(N.id),className:X(c&&d.has(N.id)&&"ring-2 ring-primary"),body:s.jsx(qe,{status:N.status}),footer:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground w-full min-w-0",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(we,{id:N.updated_by??N.created_by,size:"3xs"})}),s.jsx("span",{className:"shrink-0 ml-2",children:N.updated_at?Se(new Date(N.updated_at)):"—"})]}),headerActions:c?void 0:s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:fs,children:s.jsx(nt,{size:20})})}),s.jsxs(st,{align:"end",onClick:ms,children:[s.jsxs(je,{onClick:Ne=>{Ne.stopPropagation(),ne(N.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(N.id)&&s.jsxs(je,{variant:"destructive",onClick:Ne=>{Ne.stopPropagation(),D({type:"delete",virtualMcp:N})},children:[s.jsx(He,{size:16}),"Delete"]})]})]})})]},N.id)})})}):s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx("div",{className:"flex-1 overflow-auto min-w-0",children:G.length===0?s.jsx("div",{className:"flex items-center h-full",children:s.jsx(lt,{image:s.jsx(se,{size:48,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections.",actions:!i.search&&s.jsxs(U,{size:"sm",onClick:f,disabled:j,children:[s.jsx(ht,{size:14}),j?"Creating...":"Create Agent"]})})}):s.jsx("div",{className:"min-w-[1000px]",children:s.jsx(as,{columns:vt,grouped:G,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,onRowClick:x=>ne(x.id),selectionMode:c,selectedIds:d,onToggleSelect:u})})})}),t[7]=g,t[8]=z,t[9]=f,t[10]=m.mode,t[11]=m.virtualMcp,t[12]=j,t[13]=i,t[14]=n,t[15]=e.slug,t[16]=d,t[17]=c,t[18]=k,t[19]=a,t[20]=M,t[21]=$,t[22]=B,t[23]=T,t[24]=L,t[25]=r,t[26]=h,t[27]=v}else M=t[20],$=t[21],B=t[22],T=t[23],L=t[24],r=t[25],h=t[26],v=t[27];let K;t[123]!==M||t[124]!==L?(K=s.jsx(M,{children:L}),t[123]=M,t[124]=L,t[125]=K):K=t[125];let V;t[126]!==B||t[127]!==d.size||t[128]!==c?(V=c&&s.jsx(ls,{count:d.size,total:B.length,onSelectAll:()=>C(new Set(B.map(ds))),onDeselectAll:()=>C(new Set),onDelete:()=>P(!0),onCancel:p}),t[126]=B,t[127]=d.size,t[128]=c,t[129]=V):V=t[129];let F;return t[130]!==$||t[131]!==T||t[132]!==K||t[133]!==V||t[134]!==r||t[135]!==h||t[136]!==v?(F=s.jsxs($,{children:[r,h,v,T,K,V]}),t[130]=$,t[131]=T,t[132]=K,t[133]=V,t[134]=r,t[135]=h,t[136]=v,t[137]=F):F=t[137],F}function ds(t){return t.id}function ms(t){return t.stopPropagation()}function fs(t){return t.stopPropagation()}function us(t){return t.stopPropagation()}function hs(t){return t.stopPropagation()}function xs(t){return s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:t.updated_at?Se(new Date(t.updated_at)):"—"})}function ps(t){return s.jsx(we,{id:t.updated_by??t.created_by,size:"3xs"})}function gs(t){return s.jsx(qe,{status:t.status})}function js(t){return s.jsx(Q.Suspense,{fallback:s.jsx(xt.Fallback,{}),children:s.jsx(xt,{connectionIds:t.connections.map(bs),maxVisibleIcons:2})})}function bs(t){return t.connection_id}function vs(t){return s.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:t.description||"—"})}function Ns(t){return s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ue,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(se,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.title})]})}function Cs(t){return t.stopPropagation()}function ys(t){return t.status==="inactive"}function ws(t){return t.status==="active"}function Sn(){const t=ve.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Nt,{children:s.jsx(Q.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(Xt,{size:32,className:"animate-spin text-muted-foreground"})}),children:s.jsx(cs,{})})}),t[0]=e):e=t[0],e}export{Sn as default};
|
package/dist/client/assets/{ai-providers-logos-BWU0RfRJ.js → ai-providers-logos-CCp39UCk.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,u as h,x as P,K as g}from"./index-
|
|
1
|
+
import{c as b,u as h,x as P,K as g}from"./index-NjMxPJgF.js";import{u as w}from"./useQuery-BYBCFxgb.js";import{a as u,u as _}from"./constants-D7qXOYRn.js";function A(){const c=b.c(9),{locator:e,org:i}=h();let o;c[0]!==i.id?(o={connectionId:u,orgId:i.id},c[0]=i.id,c[1]=o):o=c[1];const d=_(o);let a;c[2]!==e?(a=g.aiProviders(e),c[2]=e,c[3]=a):a=c[3];let s;c[4]!==d?(s=async()=>(await d.callTool({name:"AI_PROVIDERS_LIST",arguments:{}})).structuredContent,c[4]=d,c[5]=s):s=c[5];let t;c[6]!==a||c[7]!==s?(t={queryKey:a,staleTime:1/0,queryFn:s},c[6]=a,c[7]=s,c[8]=t):t=c[8];const{data:n}=P(t);return n}function q(){const c=b.c(11),{locator:e,org:i}=h();let o;c[0]!==i.id?(o={connectionId:u,orgId:i.id},c[0]=i.id,c[1]=o):o=c[1];const d=_(o);let a;c[2]!==e?(a=g.aiProviderKeys(e),c[2]=e,c[3]=a):a=c[3];let s;c[4]!==d?(s=async()=>(await d.callTool({name:"AI_PROVIDER_KEY_LIST",arguments:{}})).structuredContent??null,c[4]=d,c[5]=s):s=c[5];let t;c[6]!==a||c[7]!==s?(t={queryKey:a,staleTime:6e4,queryFn:s},c[6]=a,c[7]=s,c[8]=t):t=c[8];const{data:n}=P(t);let m;return c[9]!==n?.keys?(m=n?.keys??[],c[9]=n?.keys,c[10]=m):m=c[10],m}function C(c){const e=b.c(17),{locator:i,org:o}=h();let d;e[0]!==o.id?(d={connectionId:u,orgId:o.id},e[0]=o.id,e[1]=d):d=e[1];const a=_(d);let s;e[2]!==c||e[3]!==i?(s=g.aiProviderModels(i,c??""),e[2]=c,e[3]=i,e[4]=s):s=e[4];const t=!!c;let n;e[5]!==a||e[6]!==c?(n=async()=>(await a.callTool({name:"AI_PROVIDERS_LIST_MODELS",arguments:{keyId:c}})).structuredContent??null,e[5]=a,e[6]=c,e[7]=n):n=e[7];let m;e[8]!==s||e[9]!==t||e[10]!==n?(m={queryKey:s,enabled:t,staleTime:6e4,queryFn:n},e[8]=s,e[9]=t,e[10]=n,e[11]=m):m=e[11];const{data:f,isLoading:y}=w(m);let l;e[12]!==f?.models?(l=f?.models??[],e[12]=f?.models,e[13]=l):l=e[13];const v=!!c&&y;let p;return e[14]!==l||e[15]!==v?(p={models:l,isLoading:v},e[14]=l,e[15]=v,e[16]=p):p=e[16],p}function x(c){const e=b.c(13),{locator:i,org:o}=h();let d;e[0]!==o.id?(d={connectionId:u,orgId:o.id},e[0]=o.id,e[1]=d):d=e[1];const a=_(d);let s;e[2]!==c||e[3]!==i?(s=g.aiProviderModels(i,c),e[2]=c,e[3]=i,e[4]=s):s=e[4];let t;e[5]!==a||e[6]!==c?(t=async()=>(await a.callTool({name:"AI_PROVIDERS_LIST_MODELS",arguments:{keyId:c}})).structuredContent??null,e[5]=a,e[6]=c,e[7]=t):t=e[7];let n;e[8]!==s||e[9]!==t?(n={queryKey:s,staleTime:6e4,queryFn:t},e[8]=s,e[9]=t,e[10]=n):n=e[10];const{data:m}=P(n);let f;return e[11]!==m?.models?(f=m?.models??[],e[11]=m?.models,e[12]=f):f=e[12],f}const r="https://assets.decocache.com/decocms/bc2ca488-2bae-4aac-8d3e-ead262dad764/agent.png",L="https://assets.decocache.com/decocms/b2e2f64f-6025-45f7-9e8c-3b3ebdd073d8/openrouter_logojpg.jpg",S="https://assets.decocache.com/decocms/4fa4f3ed-1bf3-4e5a-8d05-4f3787df5966/anthropic-icon-tdvkiqisswbrmtkiygb0ia.webp";function D(c){const e=c.modelId.includes("/")?c.modelId.split("/")[0]:null;return e&&I[e]||I[c.providerId]||r}const I={"aion-labs":"https://assets.decocache.com/decocms/6da18da8-0160-4b85-8bca-84eefffebe12/images-(6).png",ai21:"https://assets.decocache.com/decocms/5d8388e9-027b-4b23-b816-90cee1cd28ad/images-(5).png",alfredpros:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",alibaba:"https://assets.decocache.com/decocms/4d113b13-5412-4d3b-96ec-3c2e7c1f7a5f/images-(8).png",allenai:"https://assets.decocache.com/decocms/21d6071a-e0da-4919-9f35-902b1d0b85b8/allen.png",alpindale:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",amazon:"https://assets.decocache.com/decocms/31e7b260-6cf0-4753-bb32-bd062b15c5f1/Amazon_icon.png",anthropic:S,"anthracite-org":r,"arcee-ai":"https://assets.decocache.com/decocms/ee325839-6acc-48dc-8cf7-8bab74698015/126496414.png",baidu:"https://assets.decocache.com/decocms/cf4c19f1-39b5-499e-87b7-e16dc5da2b50/images-(9).png",bytedance:"https://assets.decocache.com/decocms/1c111a26-8e1d-4a48-9d3c-fe9fb728af06/images-(18).png","bytedance-seed":"https://assets.decocache.com/decocms/1c111a26-8e1d-4a48-9d3c-fe9fb728af06/images-(18).png",cognitivecomputations:r,cohere:"https://assets.decocache.com/decocms/c942091b-b3bf-4c46-af37-fc2c1086d9f7/cohere-color.png",deepcogito:"https://assets.decocache.com/decocms/4ee77a8f-a36a-4933-8cdf-d2e8676b88d8/images-(13).png",deepseek:"https://assets.decocache.com/decocms/3611e8ac-4cad-4b0e-a1f8-8f791288ce03/images-(1).png",eleutherai:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",essentialai:"https://assets.decocache.com/decocms/c5afc6de-1e41-457e-a6dd-91810d92541e/images-(1).jpeg",google:"https://assets.decocache.com/webdraw/17df85af-1578-42ef-ae07-4300de0d1723/gemini.svg",gryphe:"https://assets.decocache.com/decocms/a5503d3b-2056-47f2-a76c-611b7416bdc8/6798c7dccaaadd0a1318d66a_66f41d1fd146c3b0b9c76453_gryphe-logo.webp","ibm-granite":"https://assets.decocache.com/decocms/2c50018d-6f70-472d-be30-65a5e8e249f0/images-(10).png",inflection:r,inception:"https://assets.decocache.com/decocms/ff9822b8-a914-482b-bd7d-b0e46b9d5a56/images-(6).jpeg",kwaipilot:"https://assets.decocache.com/decocms/cd576e1d-1184-45ba-8162-cf2bd06d684f/images-(14).png",liquid:r,mancer:"https://assets.decocache.com/decocms/79762356-a0c5-4546-b268-ad4a0b51db51/Screenshot-2026-01-08-at-18.49.42.png",meituan:r,"meta-llama":"https://assets.decocache.com/decocms/56421cb3-488c-4cc3-83a5-16d9a303850e/images-(11).png",microsoft:"https://assets.decocache.com/decocms/0e352a51-4ea5-4f35-802e-fd82bf266683/images-(12).png",minimax:"https://assets.decocache.com/decocms/f362cc4f-7ccc-4317-afda-92e6f348fdfd/images-(2).png",mistralai:"https://assets.decocache.com/decocms/73ab9971-bbbc-40dc-99a3-5fddd9a0f340/images-(3).png",morph:r,moonshotai:"https://assets.decocache.com/decocms/b8abfea7-e8b4-4b72-b653-fdf11c9e3b66/moonshot.png",neversleep:r,"nex-agi":"https://assets.decocache.com/decocms/d2ada265-160d-4959-981d-e90210d71713/241570229.jpeg",nousresearch:"https://assets.decocache.com/decocms/496acb3d-9b5d-4759-b764-16c9ca7eb6b2/nousresearch.png",nvidia:"https://assets.decocache.com/decocms/ecca3238-fa79-4648-bb55-738f13a4293f/nvidia-7.svg",opengvlab:"https://assets.decocache.com/decocms/fb2d0c32-85f1-410a-87f4-9731dfafd248/images-(2).jpeg",openai:"https://assets.decocache.com/webdraw/15dc381c-23b4-4f6b-9ceb-9690f77a7cf5/openai.svg",openrouter:L,perplexity:"https://assets.decocache.com/decocms/3a134746-f370-4089-a3c9-fe545be0441c/images-(15).png","prime-intellect":r,qwen:"https://assets.decocache.com/decocms/ab94208c-4439-4aec-a06c-c51747120e43/Qwen_logo.svg.png",raifle:r,relace:"https://assets.decocache.com/decocms/c5dbae73-3ce0-40ca-8433-c38783fb13a9/Screenshot-2026-01-08-at-18.52.09.png",sao10k:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png","stepfun-ai":"https://assets.decocache.com/decocms/8892b883-4905-444e-b554-648565dc7fab/images-(16).png",switchpoint:"https://assets.decocache.com/decocms/0319d595-e0dd-4d8e-a0a3-b20ff4cbddcb/images-(4).jpeg",tencent:"https://assets.decocache.com/decocms/80f2f7bd-f9ea-4fcf-b89c-c58823a389ed/images-(3).jpeg",thedrummer:"https://assets.decocache.com/decocms/5c6c09fc-cf9d-43a1-a1c3-4a1ef367b824/images-(17).png",thudm:r,tngtech:"https://assets.decocache.com/decocms/5b5648ad-f858-4687-b67b-212cf186b62d/images-(7).png",undi95:r,xiaomi:"https://assets.decocache.com/decocms/2d7191b7-fc80-4867-a431-6d443d691cfc/images-(4).png","x-ai":"https://assets.decocache.com/webdraw/7a8003ff-8f2d-4988-8693-3feb20e87eca/xai.svg","z-ai":"https://assets.decocache.com/decocms/12a0877f-c978-4880-88d1-09097e606e2f/Z.ai_(company_logo).svg.png"};export{r as D,I as P,A as a,q as b,x as c,D as g,C as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,R as w,r as n,a5 as m,bc as O,F as M,a7 as I,T as F,G as z,I as A,bd as D,H as G,b4 as L,aa as H,ah as k,J as V,c as i,D as p,be as v}from"./index-
|
|
1
|
+
import{j as r,R as w,r as n,a5 as m,bc as O,F as M,a7 as I,T as F,G as z,I as A,bd as D,H as G,b4 as L,aa as H,ah as k,J as V,c as i,D as p,be as v}from"./index-NjMxPJgF.js";var x="AlertDialog",[W]=H(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(w,{...a,...t,modal:!0})};N.displayName=x;var Y="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});y.displayName=Y;var q="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(G,{...a,...t})};j.displayName=q;var B="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(V,{...o,...a,ref:e})});_.displayName=B;var g="AlertDialogContent",[J,K]=W(g),Q=L("AlertDialogContent"),b=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return r.jsx(O,{contentName:g,titleName:h,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,f=>{f.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});b.displayName=g;var h="AlertDialogTitle",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(F,{...o,...a,ref:e})});R.displayName=h;var $="AlertDialogDescription",E=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});E.displayName=$;var U="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=U;var S="AlertDialogCancel",T=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(S,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});T.displayName=S;var X=({contentRef:l})=>{const e=`\`${g}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${g}\` by passing a \`${$}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,g as m,j as t,A as f,S as h,k as x,l as r,m as p,N as u}from"./index-
|
|
1
|
+
import{c as l,g as m,j as t,A as f,S as h,k as x,l as r,m as p,N as u}from"./index-NjMxPJgF.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
|