@decocms/mesh 2.113.0 → 2.114.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/dist/client/assets/{AlertCircle-CooHa8Dx.js → AlertCircle-FL98lGLa.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-Dbg9uZyB.js → AlertOctagon-B33KdaLi.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-Ca8IB5bL.js → AlertTriangle-DteHmOG1.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-DIF2VO2W.js → ArrowLeft-CMuGBwkE.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DgvOdNkG.js → ArrowUp-xougxkbC.js} +1 -1
  6. package/dist/client/assets/{Check-DGXJXTap.js → Check-BY-DCpO_.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DDajcDWB.js → CheckCircle-CpXx2avT.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-CnxPjvi4.js → CheckDone01-DJLuFHxJ.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-Iy-LVhoI.js → CheckVerified02-Cqu-AawR.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-Di42C1UO.js → ChevronDown-FdgQzkaa.js} +1 -1
  11. package/dist/client/assets/{ChevronRight-BNn59ko7.js → ChevronRight-DYxU3E_q.js} +1 -1
  12. package/dist/client/assets/{Clock-BLkZwDYw.js → Clock-Drw10Mc_.js} +1 -1
  13. package/dist/client/assets/{Code01-DooPA--K.js → Code01-CowHxp14.js} +1 -1
  14. package/dist/client/assets/{Container-C1CLnDNL.js → Container-B7qKC3EI.js} +1 -1
  15. package/dist/client/assets/{Copy01-rucQ3PSp.js → Copy01-B_7d0dwb.js} +1 -1
  16. package/dist/client/assets/{Dataflow03-DY9MPHye.js → Dataflow03-Cf4yDkKR.js} +1 -1
  17. package/dist/client/assets/{DotsHorizontal-CxkCXGJv.js → DotsHorizontal-CqtaWGEh.js} +1 -1
  18. package/dist/client/assets/{DotsVertical-NXfqoXCN.js → DotsVertical-qEJ2g9HJ.js} +1 -1
  19. package/dist/client/assets/{Download01-f5vnFohs.js → Download01-IPqVm26W.js} +1 -1
  20. package/dist/client/assets/{Edit01-CxGjhFGJ.js → Edit01-CUcmwNxC.js} +1 -1
  21. package/dist/client/assets/{Eye-CmK33jvc.js → Eye-Rq15dwoo.js} +1 -1
  22. package/dist/client/assets/{File02-Bs24RCQ6.js → File02-DPSlzBxh.js} +1 -1
  23. package/dist/client/assets/{File06-XfbhoM8r.js → File06-xsY7vCFb.js} +1 -1
  24. package/dist/client/assets/{FilterLines-Gpro-d22.js → FilterLines-CJgE2bmA.js} +1 -1
  25. package/dist/client/assets/{Globe01-CspKYhQJ.js → Globe01-BuKzbzrx.js} +1 -1
  26. package/dist/client/assets/{Globe02-DcNEoN4R.js → Globe02-BIRPCTiD.js} +1 -1
  27. package/dist/client/assets/{Grid01-DkGxNKPL.js → Grid01-CcUd9dpu.js} +1 -1
  28. package/dist/client/assets/{Hash02-DFSzHnWN.js → Hash02-BAkYwsUS.js} +1 -1
  29. package/dist/client/assets/{Home02-CccWHOVS.js → Home02-CyX62jfB.js} +1 -1
  30. package/dist/client/assets/{Image01-F0dDnjWb.js → Image01-CiGMIZf1.js} +1 -1
  31. package/dist/client/assets/{Inbox01-rhXjoTLG.js → Inbox01-CxlDy_Yy.js} +1 -1
  32. package/dist/client/assets/{InfoCircle-DDMndy6f.js → InfoCircle-BBQwzN3e.js} +1 -1
  33. package/dist/client/assets/{Key01-BoEk45CQ.js → Key01-CcfhRF0P.js} +1 -1
  34. package/dist/client/assets/{LinkExternal01-6fiITYn6.js → LinkExternal01-CHfE9mil.js} +1 -1
  35. package/dist/client/assets/{List-DLWOvAOP.js → List-BkcTlONj.js} +1 -1
  36. package/dist/client/assets/{Loading01-BGpLDRYx.js → Loading01-CWwskqmx.js} +1 -1
  37. package/dist/client/assets/{Lock01-CkEZCQ8T.js → Lock01-C-e30A69.js} +1 -1
  38. package/dist/client/assets/{Pin01-CSZOSQvf.js → Pin01-DNrhTTs3.js} +1 -1
  39. package/dist/client/assets/{Play-Ck339o9D.js → Play-sMJsBLST.js} +1 -1
  40. package/dist/client/assets/{Plus-BB0XqcsP.js → Plus-7gpDbhJy.js} +1 -1
  41. package/dist/client/assets/{RefreshCcw01-BlblCD0d.js → RefreshCcw01-BzY8N8T3.js} +1 -1
  42. package/dist/client/assets/{RefreshCw01-C2HUNviY.js → RefreshCw01-dI5kYugT.js} +1 -1
  43. package/dist/client/assets/{Save01-j7EMqYuR.js → Save01-C9jVAZgo.js} +1 -1
  44. package/dist/client/assets/{SearchMd-CguhhQVb.js → SearchMd-BMO4jqwv.js} +1 -1
  45. package/dist/client/assets/{Settings01-jz5w4e3w.js → Settings01-CRoxTuTO.js} +1 -1
  46. package/dist/client/assets/{Share07-DA5hMI-c.js → Share07-DFdDYoqj.js} +1 -1
  47. package/dist/client/assets/Shield01-DymehiLu.js +1 -0
  48. package/dist/client/assets/{Terminal-B6KzedA2.js → Terminal-zi42zfXM.js} +1 -1
  49. package/dist/client/assets/{Tool01-BPh57jnm.js → Tool01-lC4M_AmN.js} +1 -1
  50. package/dist/client/assets/{Trash01-DGjvH5rG.js → Trash01-BKhksYCP.js} +1 -1
  51. package/dist/client/assets/{Upload01-BWKtoN2l.js → Upload01-CorstXj2.js} +1 -1
  52. package/dist/client/assets/{Users03-DWNrz1Vr.js → Users03-B6oew679.js} +1 -1
  53. package/dist/client/assets/{XCircle-VzD2IKvZ.js → XCircle-WTPrrNWD.js} +1 -1
  54. package/dist/client/assets/{XClose-quksRQbf.js → XClose-DoKE29TG.js} +1 -1
  55. package/dist/client/assets/{agent-connections-preview-DO3HZtWQ.js → agent-connections-preview-DybZ18X5.js} +1 -1
  56. package/dist/client/assets/agent-detail-DncXhd81.js +1 -0
  57. package/dist/client/assets/agents-D-4jcSt1.js +1 -0
  58. package/dist/client/assets/{alert-dialog-BobozgbA.js → alert-dialog-Dm7Md3Yk.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-Bg2u42FQ.js → auth-catchall-DHQTu60x.js} +1 -1
  60. package/dist/client/assets/avatar-B-mPVtLH.js +1 -0
  61. package/dist/client/assets/{badge-Ba42zrft.js → badge-Bt6C7wEJ.js} +1 -1
  62. package/dist/client/assets/{binder-XSlHh33G.js → binder-BvXUsKRF.js} +1 -1
  63. package/dist/client/assets/breadcrumb-Cipoy1eR.js +1 -0
  64. package/dist/client/assets/button-Bl7hMmCe.js +1 -0
  65. package/dist/client/assets/card-BMQBEGUR.js +1 -0
  66. package/dist/client/assets/{checkbox-BgqFPCG8.js → checkbox-C-nrBu1T.js} +1 -1
  67. package/dist/client/assets/{circle-alert-D1V0DFvr.js → circle-alert-DYoRV5F7.js} +1 -1
  68. package/dist/client/assets/{collection-detail-tuOZUkEg.js → collection-detail-x0pDfnG2.js} +3 -3
  69. package/dist/client/assets/{collection-tab-DpQw4w-_.js → collection-tab-CMJJpUjs.js} +1 -1
  70. package/dist/client/assets/{collection-table-wrapper-Dwsrv-is.js → collection-table-wrapper-DS44ibQ8.js} +1 -1
  71. package/dist/client/assets/{collection-tabs-BxPjmpup.js → collection-tabs-Dyc14WST.js} +1 -1
  72. package/dist/client/assets/{command-eII6FM4T.js → command-DGGP5Edh.js} +1 -1
  73. package/dist/client/assets/{connect-CjbgNw43.js → connect-BqPwKrDp.js} +1 -1
  74. package/dist/client/assets/{connection-card-B-vaA7In.js → connection-card-B_yTVrCB.js} +1 -1
  75. package/dist/client/assets/connection-detail-BHwcydrH.js +1 -0
  76. package/dist/client/assets/connections-C2FniOCy.js +1 -0
  77. package/dist/client/assets/constants-B9b2QjkO.js +1 -0
  78. package/dist/client/assets/{constants-DTZgxhQr.js → constants-DY_BU6PR.js} +1 -1
  79. package/dist/client/assets/{create-organization-dialog-_ENRfzh2.js → create-organization-dialog-BmtVHISe.js} +1 -1
  80. package/dist/client/assets/{create-project-dialog-CkoSW_Yw.js → create-project-dialog-DFYOBIMM.js} +1 -1
  81. package/dist/client/assets/dialog-BTs7spED.js +1 -0
  82. package/dist/client/assets/{dropdown-menu-DwhvTSoj.js → dropdown-menu-Dk3PdiLq.js} +1 -1
  83. package/dist/client/assets/dynamic-plugin-layout-C8tDNw7E.js +1 -0
  84. package/dist/client/assets/empty-state-BrrA9jzc.js +1 -0
  85. package/dist/client/assets/{empty-state-CUSdR_G_.js → empty-state-yzpNvfA-.js} +1 -1
  86. package/dist/client/assets/{env-vars-editor-CX-fJfxt.js → env-vars-editor-CxFtbjNH.js} +1 -1
  87. package/dist/client/assets/{error-boundary-Di0tQXdv.js → error-boundary-GB3TovJQ.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-Dd3BvcTW.js → extract-connection-data-Cjm6QMzJ.js} +1 -1
  89. package/dist/client/assets/{file-browser-CyYYn3HQ.js → file-browser-CeBgj9Bh.js} +2 -2
  90. package/dist/client/assets/{form-DIsigMsk.js → form-Dxe8J4dP.js} +1 -1
  91. package/dist/client/assets/{grid-view-BsAPFz5e.js → grid-view-qfkYjNIX.js} +1 -1
  92. package/dist/client/assets/{home-DoBwFvBu.js → home-C39nGjR7.js} +1 -1
  93. package/dist/client/assets/index-48TFsA2Q.css +1 -0
  94. package/dist/client/assets/{index-BVrm4rGn.js → index-B2KxLjHq.js} +1 -1
  95. package/dist/client/assets/{index-CMu5spRk.js → index-BOlMuTYA.js} +6 -6
  96. package/dist/client/assets/index-BrH9wXxf.js +1 -0
  97. package/dist/client/assets/{index-qSvnMMX3.js → index-BuPkfOh7.js} +1 -1
  98. package/dist/client/assets/{index-Cs0vYfu9.js → index-CLUeNS9F.js} +1 -1
  99. package/dist/client/assets/{index-DeBwK236.js → index-CSf23Q8F.js} +5 -5
  100. package/dist/client/assets/index-CzSiUwwv.js +218 -0
  101. package/dist/client/assets/{index-NEbz2HQu.js → index-DVHOzh7f.js} +1 -1
  102. package/dist/client/assets/{index-CDwFwb7Q.js → index-Dps5khDb.js} +1 -1
  103. package/dist/client/assets/{infiniteQueryObserver-DbZCUgr5.js → infiniteQueryObserver-Ctmp4byY.js} +1 -1
  104. package/dist/client/assets/{input-Cw77piS4.js → input-CAPxG1rh.js} +1 -1
  105. package/dist/client/assets/{integration-icon-D3fWRQzh.js → integration-icon-jbm4PmZt.js} +1 -1
  106. package/dist/client/assets/{label-CUy1x9Fc.js → label-A7ibpcPd.js} +1 -1
  107. package/dist/client/assets/{layout-BPYuOiPI.js → layout-DHncYg0M.js} +1 -1
  108. package/dist/client/assets/{localstorage-keys-DRPmjZks.js → localstorage-keys-Cc9e53sU.js} +1 -1
  109. package/dist/client/assets/{login-CUcM51_h.js → login-C4VFa6jD.js} +1 -1
  110. package/dist/client/assets/{markdown-BUX5ABnz.js → markdown-DTO-ngpn.js} +1 -1
  111. package/dist/client/assets/{mcp-oauth-Da77-kcD.js → mcp-oauth-lMxJpMMH.js} +1 -1
  112. package/dist/client/assets/{mcp-server-card-DcZS4AhS.js → mcp-server-card-C-sPhXVX.js} +1 -1
  113. package/dist/client/assets/mcp-server-detail-BtO9BwQ6.js +2 -0
  114. package/dist/client/assets/members-Dh31vMll.js +3 -0
  115. package/dist/client/assets/{monitoring-DINJ4pYy.js → monitoring-D0DgTEcy.js} +1 -1
  116. package/dist/client/assets/monitoring-dashboard-edit-DCcFalwQ.js +1 -0
  117. package/dist/client/assets/{monitoring-dashboard-view-B53vWJlZ.js → monitoring-dashboard-view-CuFcYaD_.js} +1 -1
  118. package/dist/client/assets/{oauth-callback-Dsqe_oXS.js → oauth-callback-DKWROL5U.js} +1 -1
  119. package/dist/client/assets/{page-BKBuf2HE.js → page-BpCfHp43.js} +1 -1
  120. package/dist/client/assets/page-CoIEp87I.js +1 -0
  121. package/dist/client/assets/{plugin-empty-state-D_Z6xsRD.js → plugin-empty-state-DMdw5AKa.js} +1 -1
  122. package/dist/client/assets/{plugin-empty-state-Cdi0lxlF.js → plugin-empty-state-DfPCNHNV.js} +1 -1
  123. package/dist/client/assets/{plugin-header-D_XJF06t.js → plugin-header-CVaBr8-j.js} +1 -1
  124. package/dist/client/assets/{plugin-header-DGLeYRv9.js → plugin-header-DqwJE7vc.js} +1 -1
  125. package/dist/client/assets/{popover-C8z2ljXJ.js → popover-Ca9Cyzf7.js} +1 -1
  126. package/dist/client/assets/{project-layout-gRYIrnzO.js → project-layout-F2YJOnzp.js} +1 -1
  127. package/dist/client/assets/project-settings-DwtLH_vq.js +1 -0
  128. package/dist/client/assets/projects-list-DPMlGsBe.js +1 -0
  129. package/dist/client/assets/{readme-viewer-DSTuLgLE.js → readme-viewer-D5RieYNW.js} +1 -1
  130. package/dist/client/assets/registry-layout-BrhYm9Dr.js +5 -0
  131. package/dist/client/assets/{registry-utils-D8FLO1oI.js → registry-utils--fif7P3x.js} +1 -1
  132. package/dist/client/assets/{reports-layout-NWBpDTNI.js → reports-layout-9yNTvI9o.js} +1 -1
  133. package/dist/client/assets/{reset-password-BEvAUHxp.js → reset-password-FRWYt8ap.js} +1 -1
  134. package/dist/client/assets/{resizable-Q_6VrAvM.js → resizable-DKtpdeB3.js} +1 -1
  135. package/dist/client/assets/{save-actions-DnatwzCI.js → save-actions-DH-J_-0b.js} +1 -1
  136. package/dist/client/assets/{scroll-area--Dl42eG7.js → scroll-area-BfJ2ZkbI.js} +1 -1
  137. package/dist/client/assets/{select-DmOdy-_2.js → select-CKDoCTJO.js} +1 -1
  138. package/dist/client/assets/shell-layout-DkuDKL8p.js +3 -0
  139. package/dist/client/assets/{spinner-BFe5KsON.js → spinner-B-FWJ8nx.js} +1 -1
  140. package/dist/client/assets/{store-invite-B6QzkY9D.js → store-invite-1HxdtnDC.js} +1 -1
  141. package/dist/client/assets/{switch-BTNdX6uT.js → switch-ySGmS6Zx.js} +1 -1
  142. package/dist/client/assets/{table-m7xKes0i.js → table-DGDNn7mH.js} +1 -1
  143. package/dist/client/assets/tasks-BuxJd7k9.js +1 -0
  144. package/dist/client/assets/{textarea-1ZAkAqPs.js → textarea-COGwSIgK.js} +1 -1
  145. package/dist/client/assets/{time-range-picker-S5DXdK6J.js → time-range-picker-hBuoR0m0.js} +1 -1
  146. package/dist/client/assets/{toggle-group-B4gd2g4g.js → toggle-group-RO8j2kDd.js} +1 -1
  147. package/dist/client/assets/{tools-list-BYJP7wdj.js → tools-list-CBpacE22.js} +1 -1
  148. package/dist/client/assets/tooltip-CLbmwjfd.js +1 -0
  149. package/dist/client/assets/topbar-portal-BHxVS8Tl.js +1 -0
  150. package/dist/client/assets/typewriter-title-C4OcGX3b.js +16 -0
  151. package/dist/client/assets/{use-binding-CAtjL1rr.js → use-binding-D36c91MK.js} +1 -1
  152. package/dist/client/assets/{use-connection-BRwTI0xk.js → use-connection-CdIwTzRh.js} +1 -1
  153. package/dist/client/assets/{use-copy-BnGNgGbL.js → use-copy-BZqI2HfR.js} +1 -1
  154. package/dist/client/assets/{use-create-virtual-mcp-BIn6DTPa.js → use-create-virtual-mcp-DKrayFIg.js} +1 -1
  155. package/dist/client/assets/{use-deco-chat-open-CWPuucLF.js → use-deco-chat-open-BuMsTBnv.js} +3 -3
  156. package/dist/client/assets/{use-install-from-registry-GZkHb-J_.js → use-install-from-registry-kn39eg4d.js} +1 -1
  157. package/dist/client/assets/{use-list-state-CLqJqhda.js → use-list-state-CYucxtoX.js} +1 -1
  158. package/dist/client/assets/{use-llm-BToIG9lg.js → use-llm-CX9QGbjZ.js} +1 -1
  159. package/dist/client/assets/{use-mcp-prompts-C28zFdyF.js → use-mcp-prompts-DMC1gnwj.js} +1 -1
  160. package/dist/client/assets/{use-mcp-tools-CnGq7c_h.js → use-mcp-tools-SZ1hgrkZ.js} +1 -1
  161. package/dist/client/assets/{use-organization-settings-BVsgnOKP.js → use-organization-settings-1mU06z41.js} +1 -1
  162. package/dist/client/assets/{use-project-pPGjnPtH.js → use-project-CsuhSK50.js} +1 -1
  163. package/dist/client/assets/use-view-mode-CVN4cPaD.js +1 -0
  164. package/dist/client/assets/{use-virtual-mcp-C67SrK4s.js → use-virtual-mcp-CqdRLJoL.js} +1 -1
  165. package/dist/client/assets/useInfiniteQuery-Bd_PpC7_.js +1 -0
  166. package/dist/client/assets/{useMutation-BLWSoXAi.js → useMutation-BYl8vvsl.js} +1 -1
  167. package/dist/client/assets/useQuery-CTct6gOY.js +1 -0
  168. package/dist/client/assets/useSuspenseInfiniteQuery-DJZPFUMY.js +1 -0
  169. package/dist/client/assets/workflow-CMJomw9A.js +1 -0
  170. package/dist/client/index.html +2 -2
  171. package/dist/server/cli.js +3 -3
  172. package/dist/server/migrate.js +3 -3
  173. package/dist/server/server.js +3 -3
  174. package/package.json +1 -1
  175. package/dist/client/assets/Settings02-BEGJoXOf.js +0 -1
  176. package/dist/client/assets/X-hlRWRdLd.js +0 -1
  177. package/dist/client/assets/agent-detail-Dm90C1dq.js +0 -1
  178. package/dist/client/assets/agents-Dp1lzRWx.js +0 -1
  179. package/dist/client/assets/avatar-DzNBuwvQ.js +0 -1
  180. package/dist/client/assets/breadcrumb-DVboj9hZ.js +0 -1
  181. package/dist/client/assets/button-BvpGJmwj.js +0 -1
  182. package/dist/client/assets/card-DUyr2anf.js +0 -1
  183. package/dist/client/assets/connection-detail-1_ZQMYvG.js +0 -1
  184. package/dist/client/assets/connections-DSsqgW7V.js +0 -1
  185. package/dist/client/assets/constants-BXsR0e2f.js +0 -1
  186. package/dist/client/assets/dialog-Djb2_yQ3.js +0 -1
  187. package/dist/client/assets/dynamic-plugin-layout-gS11xmZg.js +0 -1
  188. package/dist/client/assets/empty-state-CfAcFJ3T.js +0 -1
  189. package/dist/client/assets/index-hmLeN6Cx.css +0 -1
  190. package/dist/client/assets/index-p5ek_T2U.js +0 -218
  191. package/dist/client/assets/index-r3RmHcg-.js +0 -1
  192. package/dist/client/assets/mcp-server-detail-BsuSFuH9.js +0 -2
  193. package/dist/client/assets/members-Dt-WMWXs.js +0 -3
  194. package/dist/client/assets/monitoring-dashboard-edit-ViuWKC7f.js +0 -1
  195. package/dist/client/assets/page-BLmopBsr.js +0 -1
  196. package/dist/client/assets/project-settings-iakvSAMp.js +0 -1
  197. package/dist/client/assets/projects-list-BTf0o0Dw.js +0 -1
  198. package/dist/client/assets/registry-layout-D0ZI3R-w.js +0 -5
  199. package/dist/client/assets/shell-layout-DaVrqTvl.js +0 -12
  200. package/dist/client/assets/tasks-B817iTsv.js +0 -1
  201. package/dist/client/assets/tooltip-w4nyO9EM.js +0 -1
  202. package/dist/client/assets/topbar-portal-DFijBXBE.js +0 -1
  203. package/dist/client/assets/typewriter-title-fwTbDCyQ.js +0 -16
  204. package/dist/client/assets/use-mobile-Dl83qL71.js +0 -1
  205. package/dist/client/assets/use-view-mode-BC3VVzlU.js +0 -1
  206. package/dist/client/assets/useInfiniteQuery-CL1DQ1B_.js +0 -1
  207. package/dist/client/assets/useQuery-CoMTdc_B.js +0 -1
  208. package/dist/client/assets/useSuspenseInfiniteQuery-BEcP523_.js +0 -1
  209. package/dist/client/assets/workflow-D3d1tCTr.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/mesh",
3
- "version": "2.113.0",
3
+ "version": "2.114.0",
4
4
  "description": "MCP Mesh - Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- import{r as e}from"./index-p5ek_T2U.js";const l=({size:a=24,color:t="currentColor",...r})=>e.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},e.createElement("path",{d:"m9.395 19.371.585 1.315a2.212 2.212 0 0 0 4.044 0l.584-1.315a2.426 2.426 0 0 1 2.47-1.423l1.43.152a2.212 2.212 0 0 0 2.023-3.502l-.847-1.164a2.428 2.428 0 0 1-.46-1.434c0-.513.163-1.014.464-1.429l.847-1.163a2.211 2.211 0 0 0-2.022-3.502l-1.43.152a2.433 2.433 0 0 1-1.47-.312 2.426 2.426 0 0 1-1-1.117l-.589-1.315a2.212 2.212 0 0 0-4.044 0L9.395 4.63c-.207.468-.557.86-1 1.117-.445.256-.96.365-1.47.312l-1.434-.152a2.212 2.212 0 0 0-2.023 3.502l.847 1.163a2.43 2.43 0 0 1 0 2.858l-.847 1.163a2.21 2.21 0 0 0 .786 3.273c.382.195.811.274 1.237.23l1.43-.153a2.434 2.434 0 0 1 2.474 1.43Z"}),e.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));l.displayName="Settings02";export{l as a};
@@ -1 +0,0 @@
1
- import{r}from"./index-p5ek_T2U.js";const i=({size:e=24,color:t="currentColor",...o})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},r.createElement("path",{d:"M17 7 7 17M7 7l10 10"}));i.displayName="X";export{i};
@@ -1 +0,0 @@
1
- import{r as z,c as T,j as t,u as xe,V as Je,s as Ye,t as Ee,b as Ke,e as Ze,O as Be,bz as Qe,l as Xe,k as et,aE as tt,q as st}from"./index-p5ek_T2U.js";import{T as be,a as lt,b as Ne,c as ot,i as nt,d as it,e as rt,u as at,C as ct,f as dt}from"./use-deco-chat-open-CWPuucLF.js";import{C as mt,E as ut}from"./empty-state-CUSdR_G_.js";import{E as pe}from"./error-boundary-Di0tQXdv.js";import{I as he}from"./integration-icon-D3fWRQzh.js";import{I as ft,R as pt,a as xt,P as ht}from"./index-qSvnMMX3.js";import{B as Ie}from"./badge-Ba42zrft.js";import{B as Q,c as me}from"./button-BvpGJmwj.js";import{I as Re}from"./input-Cw77piS4.js";import{S as gt}from"./switch-BTNdX6uT.js";import{T as jt}from"./textarea-1ZAkAqPs.js";import{a as ae,c as ve,T as ce,b as de}from"./tooltip-w4nyO9EM.js";import{h as bt,f as Nt}from"./use-connection-BRwTI0xk.js";import{u as vt,a as yt}from"./use-virtual-mcp-C67SrK4s.js";import{i as Me}from"./ChevronRight-BNn59ko7.js";import{n as Ct}from"./select-DmOdy-_2.js";import{i as Oe}from"./File02-Bs24RCQ6.js";import{i as Fe}from"./Loading01-BGpLDRYx.js";import{i as _t}from"./Play-Ck339o9D.js";import{s as ze}from"./Plus-BB0XqcsP.js";import{i as St}from"./Share07-DA5hMI-c.js";import{a as Ae}from"./Tool01-BPh57jnm.js";import{t as Tt}from"./Users03-DWNrz1Vr.js";import{B as kt,a as wt,b as Pe,d as Et,e as It,c as Ot}from"./breadcrumb-DVboj9hZ.js";import{a as At,V as Dt}from"./layout-BPYuOiPI.js";import{S as $t}from"./save-actions-DnatwzCI.js";import{T as Lt}from"./tools-list-BYJP7wdj.js";import{C as De}from"./checkbox-BgqFPCG8.js";import{e as Rt,a as Ge,D as Ue,b as zt,c as Pt}from"./dialog-Djb2_yQ3.js";import{u as $e}from"./constants-DTZgxhQr.js";import{c as Vt}from"./use-mcp-tools-CnGq7c_h.js";import{c as Bt,u as Mt}from"./use-mcp-prompts-C28zFdyF.js";import{i as Ft}from"./AlertTriangle-Ca8IB5bL.js";import{s as He}from"./slugify-CEUa2lfQ.js";import{i as We}from"./Check-DGXJXTap.js";import{i as Gt}from"./Code01-DooPA--K.js";import{a as Ut}from"./Copy01-rucQ3PSp.js";import{i as ye}from"./InfoCircle-DDMndy6f.js";import{A as Ht}from"./agent-connections-preview-DO3HZtWQ.js";import"./use-llm-BToIG9lg.js";import"./use-binding-CAtjL1rr.js";import"./binder-XSlHh33G.js";import"./useQuery-CoMTdc_B.js";import"./localstorage-keys-DRPmjZks.js";import"./useMutation-BLWSoXAi.js";import"./popover-C8z2ljXJ.js";import"./ChevronDown-Di42C1UO.js";import"./File06-XfbhoM8r.js";import"./Grid01-DkGxNKPL.js";import"./Image01-F0dDnjWb.js";import"./RefreshCcw01-BlblCD0d.js";import"./SearchMd-CguhhQVb.js";import"./Settings01-jz5w4e3w.js";import"./useSuspenseInfiniteQuery-BEcP523_.js";import"./infiniteQueryObserver-DbZCUgr5.js";import"./Container-C1CLnDNL.js";import"./Pin01-CSZOSQvf.js";import"./use-organization-settings-BVsgnOKP.js";import"./index-CDwFwb7Q.js";import"./index-r3RmHcg-.js";import"./Save01-j7EMqYuR.js";import"./collection-table-wrapper-Dwsrv-is.js";import"./dropdown-menu-DwhvTSoj.js";import"./ArrowUp-DgvOdNkG.js";import"./List-DLWOvAOP.js";import"./table-m7xKes0i.js";import"./card-DUyr2anf.js";import"./Eye-CmK33jvc.js";import"./Globe02-DcNEoN4R.js";import"./RefreshCw01-C2HUNviY.js";import"./X-hlRWRdLd.js";const qe=({size:o=24,color:e="currentColor",...s})=>z.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},z.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"}));qe.displayName="Circle";const ge=({size:o=24,color:e="currentColor",...s})=>z.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},z.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"}));ge.displayName="CubeOutline";function Ce(o){return o===null?"all":o?.length??0}function Wt(o,e){const s=o[e];if(!s)return"";const a=[];return s.tools===null?a.push("all tools"):s.tools&&s.tools.length>0&&a.push(`${s.tools.length} tools`),s.resources===null?a.push("all resources"):s.resources&&s.resources.length>0&&a.push(`${s.resources.length} resources`),s.prompts===null?a.push("all prompts"):s.prompts&&s.prompts.length>0&&a.push(`${s.prompts.length} prompts`),a.join(", ")}function qt(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 Jt={tools:null,resources:null,prompts:null};function _e(){const o=T.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(Fe,{className:"animate-spin text-muted-foreground",size:24})}),o[0]=e):e=o[0],e}function Se(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(Ft,{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 Yt(o){const e=T.c(23),{item:s,isSelected:a,onToggle:l,disabled:n}=o,f=n?"cursor-not-allowed opacity-50":"cursor-pointer",i=a?"bg-accent/25":"hover:bg-muted/50";let r;e[0]!==f||e[1]!==i?(r=me("flex items-start gap-3 p-4 rounded-lg transition-colors",f,i),e[0]=f,e[1]=i,e[2]=r):r=e[2];let d;e[3]!==s.name?(d=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=d):d=e[4];let p;e[5]!==s.tags?(p=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=p):p=e[6];let c;e[7]!==d||e[8]!==p?(c=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d,p]}),e[7]=d,e[8]=p,e[9]=c):c=e[9];let h;e[10]!==s.description?(h=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=h):h=e[11];let x;e[12]!==c||e[13]!==h?(x=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[c,h]}),e[12]=c,e[13]=h,e[14]=x):x=e[14];let m;e[15]!==n||e[16]!==a||e[17]!==l?(m=t.jsx(De,{checked:a,onCheckedChange:l,disabled:n,className:"mt-0.5"}),e[15]=n,e[16]=a,e[17]=l,e[18]=m):m=e[18];let u;return e[19]!==r||e[20]!==x||e[21]!==m?(u=t.jsxs("label",{className:r,children:[x,m]}),e[19]=r,e[20]=x,e[21]=m,e[22]=u):u=e[22],u}function Le(o){const e=T.c(32),{items:s,selections:a,onToggle:l,onToggleAll:n,emptyMessage:f,disabled:i}=o;let r,d,p,c,h;if(e[0]!==i||e[1]!==f||e[2]!==s||e[3]!==l||e[4]!==n||e[5]!==a){h=Symbol.for("react.early_return_sentinel");e:{const u=s.map(Kt);if(s.length===0){let C;e[11]!==f?(C=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:f})}),e[11]=f,e[12]=C):C=e[12],h=C;break e}p="flex flex-col h-full";const v=i?"cursor-not-allowed opacity-50":"cursor-pointer";let b;e[13]!==v?(b=me("flex items-start gap-3 p-4",v),e[13]=v,e[14]=b):b=e[14];let N;e[15]!==s.length?(N=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]=N):N=e[16];const g=a===null;let y;e[17]!==i||e[18]!==n||e[19]!==g?(y=t.jsx(De,{checked:g,onCheckedChange:n,disabled:i,className:"mt-0.5"}),e[17]=i,e[18]=n,e[19]=g,e[20]=y):y=e[20],e[21]!==y||e[22]!==b||e[23]!==N?(c=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:b,children:[N,y]})}),e[21]=y,e[22]=b,e[23]=N,e[24]=c):c=e[24],r="flex-1 overflow-auto px-4 py-3 space-y-1",d=s.map(C=>t.jsx(Yt,{item:C,isSelected:a===null||a?.includes(C.id),onToggle:()=>l(C.id,u),disabled:i},C.id))}e[0]=i,e[1]=f,e[2]=s,e[3]=l,e[4]=n,e[5]=a,e[6]=r,e[7]=d,e[8]=p,e[9]=c,e[10]=h}else r=e[6],d=e[7],p=e[8],c=e[9],h=e[10];if(h!==Symbol.for("react.early_return_sentinel"))return h;let x;e[25]!==r||e[26]!==d?(x=t.jsx("div",{className:r,children:d}),e[25]=r,e[26]=d,e[27]=x):x=e[27];let m;return e[28]!==p||e[29]!==c||e[30]!==x?(m=t.jsxs("div",{className:p,children:[c,x]}),e[28]=p,e[29]=c,e[30]=x,e[31]=m):m=e[31],m}function Kt(o){return o.id}function Zt(o){const e=T.c(13),{connectionId:s,selections:a,onToggle:l,onToggleAll:n,disabled:f}=o,{org:i}=xe();let r;e[0]!==s||e[1]!==i.id?(r={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=r):r=e[2];const d=$e(r);let p;e[3]!==d?(p={client:d},e[3]=d,e[4]=p):p=e[4];const{data:c}=Vt(p);let h;e[5]!==c.tools?(h=c.tools.map(Qt),e[5]=c.tools,e[6]=h):h=e[6];const x=h;let m;return e[7]!==f||e[8]!==x||e[9]!==l||e[10]!==n||e[11]!==a?(m=t.jsx(Le,{items:x,selections:a,onToggle:l,onToggleAll:n,emptyMessage:"No tools available",disabled:f}),e[7]=f,e[8]=x,e[9]=l,e[10]=n,e[11]=a,e[12]=m):m=e[12],m}function Qt(o){return{id:o.name,name:o.name,description:o.description,tags:t.jsx(Lt,{annotations:o.annotations})}}function Xt(o){const e=T.c(13),{connectionId:s,selections:a,onToggle:l,onToggleAll:n,disabled:f}=o,{org:i}=xe();let r;e[0]!==s||e[1]!==i.id?(r={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=r):r=e[2];const d=$e(r);let p;e[3]!==d?(p={client:d},e[3]=d,e[4]=p):p=e[4];const{data:c}=Bt(p);let h;e[5]!==c.resources?(h=c.resources.map(es),e[5]=c.resources,e[6]=h):h=e[6];const x=h;let m;return e[7]!==f||e[8]!==x||e[9]!==l||e[10]!==n||e[11]!==a?(m=t.jsx(Le,{items:x,selections:a,onToggle:l,onToggleAll:n,emptyMessage:"No resources available",disabled:f}),e[7]=f,e[8]=x,e[9]=l,e[10]=n,e[11]=a,e[12]=m):m=e[12],m}function es(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function ts(o){const e=T.c(13),{connectionId:s,selections:a,onToggle:l,onToggleAll:n,disabled:f}=o,{org:i}=xe();let r;e[0]!==s||e[1]!==i.id?(r={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=r):r=e[2];const d=$e(r);let p;e[3]!==d?(p={client:d},e[3]=d,e[4]=p):p=e[4];const{data:c}=Mt(p);let h;e[5]!==c.prompts?(h=c.prompts.map(ss),e[5]=c.prompts,e[6]=h):h=e[6];const x=h;let m;return e[7]!==f||e[8]!==x||e[9]!==l||e[10]!==n||e[11]!==a?(m=t.jsx(Le,{items:x,selections:a,onToggle:l,onToggleAll:n,emptyMessage:"No prompts available",disabled:f}),e[7]=f,e[8]=x,e[9]=l,e[10]=n,e[11]=a,e[12]=m):m=e[12],m}function ss(o){return{id:o.name,name:o.name,description:o.description}}function ls(o){const e=T.c(24),{connection:s,isSelected:a,hasSelections:l,summary:n,onClick:f,onToggleAll:i,disabled:r}=o,d=r?"cursor-not-allowed opacity-50":"cursor-pointer",p=a?"bg-accent":"hover:bg-muted/50";let c;e[0]!==d||e[1]!==p?(c=me("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",d,p),e[0]=d,e[1]=p,e[2]=c):c=e[2];const h=r?void 0:f;let x;e[3]!==s.icon||e[4]!==s.title?(x=t.jsx(he,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=x):x=e[5];let m;e[6]!==s.title?(m=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=m):m=e[7];let u;e[8]!==l||e[9]!==n?(u=l&&n&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n}),e[8]=l,e[9]=n,e[10]=u):u=e[10];let v;e[11]!==m||e[12]!==u?(v=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[m,u]}),e[11]=m,e[12]=u,e[13]=v):v=e[13];let b;e[14]!==r||e[15]!==l||e[16]!==i?(b=t.jsx(De,{checked:l,onCheckedChange:i,onClick:os,disabled:r,className:"shrink-0"}),e[14]=r,e[15]=l,e[16]=i,e[17]=b):b=e[17];let N;return e[18]!==c||e[19]!==h||e[20]!==x||e[21]!==v||e[22]!==b?(N=t.jsxs("div",{className:c,onClick:h,children:[x,v,b]}),e[18]=c,e[19]=h,e[20]=x,e[21]=v,e[22]=b,e[23]=N):N=e[23],N}function os(o){return o.stopPropagation()}function ns(o){const e=T.c(22),{allConnections:s,searchTerm:a,selectedId:l,hasSelections:n,getSelectionSummary:f,onConnectionClick:i,onToggleAll:r,disabled:d}=o;let p;e[0]!==s||e[1]!==a?(p=a?s.filter(m=>m.title.toLowerCase().includes(a.toLowerCase())||m.description?.toLowerCase().includes(a.toLowerCase())):s,e[0]=s,e[1]=a,e[2]=p):p=e[2];const c=p;if(c.length===0){const m=a?"No connections found":"No connections available";let u;return e[3]!==m?(u=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:m}),e[3]=m,e[4]=u):u=e[4],u}let h;if(e[5]!==d||e[6]!==c||e[7]!==f||e[8]!==n||e[9]!==i||e[10]!==r||e[11]!==l){let m;e[13]!==d||e[14]!==f||e[15]!==n||e[16]!==i||e[17]!==r||e[18]!==l?(m=u=>t.jsx(ls,{connection:u,isSelected:l===u.id,hasSelections:n(u.id),summary:f(u.id),onClick:()=>i(u.id),onToggleAll:()=>r(u.id),disabled:d},u.id),e[13]=d,e[14]=f,e[15]=n,e[16]=i,e[17]=r,e[18]=l,e[19]=m):m=e[19],h=c.map(m),e[5]=d,e[6]=c,e[7]=f,e[8]=n,e[9]=i,e[10]=r,e[11]=l,e[12]=h}else h=e[12];let x;return e[20]!==h?(x=t.jsx("div",{className:"flex flex-col gap-0.5",children:h}),e[20]=h,e[21]=x):x=e[21],x}function is(o){const e=T.c(75),{currentConnection:s,activeTab:a,selectedId:l,formData:n,toggleTool:f,toggleResource:i,togglePrompt:r,toggleAllTools:d,toggleAllResources:p,toggleAllPrompts:c,onTabChange:h}=o;let x;e[0]!==s.icon||e[1]!==s.title?(x=t.jsx(he,{icon:s.icon,name:s.title,size:"md",className:"shrink-0"}),e[0]=s.icon,e[1]=s.title,e[2]=x):x=e[2];let m;e[3]!==s.title?(m=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=m):m=e[4];let u;e[5]!==s.description?(u=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=u):u=e[6];let v;e[7]!==m||e[8]!==u?(v=t.jsxs("div",{className:"flex-1 min-w-0",children:[m,u]}),e[7]=m,e[8]=u,e[9]=v):v=e[9];let b;e[10]!==x||e[11]!==v?(b=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[x,v]})}),e[10]=x,e[11]=v,e[12]=b):b=e[12];let N;e[13]!==h?(N=M=>h(M),e[13]=h,e[14]=N):N=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsxs(be,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Ae,{size:16}),"Tools"]}),e[15]=g):g=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(be,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(ge,{size:16}),"Resources"]}),e[16]=y):y=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(lt,{variant:"underline",className:"shrink-0 px-6",children:[g,y,t.jsxs(be,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx(Oe,{size:16}),"Prompts"]})]}),e[17]=C):C=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=Se("Tools not supported by this server"),e[18]=P):P=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(_e,{}),e[19]=S):S=e[19];let O;e[20]!==n||e[21]!==l?(O=n[l]?n[l].tools:[],e[20]=n,e[21]=l,e[22]=O):O=e[22];let _;e[23]!==l||e[24]!==f?(_=(M,K)=>f(l,M,K),e[23]=l,e[24]=f,e[25]=_):_=e[25];let k;e[26]!==l||e[27]!==d?(k=()=>d(l),e[26]=l,e[27]=d,e[28]=k):k=e[28];let E;e[29]!==l||e[30]!==O||e[31]!==_||e[32]!==k?(E=t.jsx(Ne,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:P,children:t.jsx(z.Suspense,{fallback:S,children:t.jsx(Zt,{connectionId:l,selections:O,onToggle:_,onToggleAll:k})})})}),e[29]=l,e[30]=O,e[31]=_,e[32]=k,e[33]=E):E=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=Se("Resources not supported by this server"),e[34]=A):A=e[34];let L;e[35]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(_e,{}),e[35]=L):L=e[35];let w;e[36]!==n||e[37]!==l?(w=n[l]?n[l].resources:[],e[36]=n,e[37]=l,e[38]=w):w=e[38];let I;e[39]!==l||e[40]!==i?(I=(M,K)=>i(l,M,K),e[39]=l,e[40]=i,e[41]=I):I=e[41];let D;e[42]!==l||e[43]!==p?(D=()=>p(l),e[42]=l,e[43]=p,e[44]=D):D=e[44];let R;e[45]!==l||e[46]!==w||e[47]!==I||e[48]!==D?(R=t.jsx(Ne,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:A,children:t.jsx(z.Suspense,{fallback:L,children:t.jsx(Xt,{connectionId:l,selections:w,onToggle:I,onToggleAll:D})})})}),e[45]=l,e[46]=w,e[47]=I,e[48]=D,e[49]=R):R=e[49];let J;e[50]===Symbol.for("react.memo_cache_sentinel")?(J=Se("Prompts not supported by this server"),e[50]=J):J=e[50];let Y;e[51]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(_e,{}),e[51]=Y):Y=e[51];let F;e[52]!==n||e[53]!==l?(F=n[l]?n[l].prompts:[],e[52]=n,e[53]=l,e[54]=F):F=e[54];let W;e[55]!==l||e[56]!==r?(W=(M,K)=>r(l,M,K),e[55]=l,e[56]=r,e[57]=W):W=e[57];let G;e[58]!==l||e[59]!==c?(G=()=>c(l),e[58]=l,e[59]=c,e[60]=G):G=e[60];let q;e[61]!==l||e[62]!==F||e[63]!==W||e[64]!==G?(q=t.jsx(Ne,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:J,children:t.jsx(z.Suspense,{fallback:Y,children:t.jsx(ts,{connectionId:l,selections:F,onToggle:W,onToggleAll:G})})})}),e[61]=l,e[62]=F,e[63]=W,e[64]=G,e[65]=q):q=e[65];let U;e[66]!==a||e[67]!==E||e[68]!==R||e[69]!==q||e[70]!==N?(U=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(ot,{value:a,onValueChange:N,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[C,E,R,q]})}),e[66]=a,e[67]=E,e[68]=R,e[69]=q,e[70]=N,e[71]=U):U=e[71];let H;return e[72]!==U||e[73]!==b?(H=t.jsxs(t.Fragment,{children:[b,U]}),e[72]=U,e[73]=b,e[74]=H):H=e[74],H}function rs(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 Te(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function as(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 Ve=(o,e)=>o.find(s=>s.id===e)??o[0];function cs(o){const e=T.c(79),{open:s,onOpenChange:a,selectedId:l,form:n,connections:f}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];const r=bt(i);let d;e[1]!==r||e[2]!==l?(d=Ve(r,l)?.id??null,e[1]=r,e[2]=l,e[3]=d):d=e[3];let p;e[4]!==d?(p={activeTab:"tools",searchTerm:"",selectedId:d},e[4]=d,e[5]=p):p=e[5];const[c,h]=z.useReducer(as,p);let x;e[6]!==f?(x=f??[],e[6]=f,e[7]=x):x=e[7];let m;e[8]!==x?(m=rs(x),e[8]=x,e[9]=m):m=e[9];const u=m;let v;e[10]!==r||e[11]!==c.selectedId?(v=Ve(r,c.selectedId),e[10]=r,e[11]=c.selectedId,e[12]=v):v=e[12];const b=v;let N;e[13]!==u?(N=j=>qt(u,j),e[13]=u,e[14]=N):N=e[14];const g=N;let y;e[15]!==u?(y=j=>Wt(u,j),e[15]=u,e[16]=y):y=e[16];const C=y;let P;e[17]!==n||e[18]!==u?(P=(j,$,V,Z)=>{const ie=u[j]?.[$];let B;ie===null?B=Z.filter(je=>je!==V):ie?.includes(V)?B=ie.filter(je=>je!==V):(B=[...ie??[],V],B.length===Z.length&&(B=null));const re={...u};re[j]?re[j]={...re[j]}:re[j]={tools:null,resources:null,prompts:null},re[j][$]=B,n.setValue("connections",Te(re),{shouldDirty:!0,shouldTouch:!0})},e[17]=n,e[18]=u,e[19]=P):P=e[19];const S=P;let O;e[20]!==n||e[21]!==u?(O=(j,$)=>{const ie=u[j]?.[$]===null?[]:null,B={...u};B[j]?B[j]={...B[j]}:B[j]={tools:null,resources:null,prompts:null},B[j][$]=ie,n.setValue("connections",Te(B),{shouldDirty:!0,shouldTouch:!0})},e[20]=n,e[21]=u,e[22]=O):O=e[22];const _=O;let k;e[23]!==S?(k=(j,$,V)=>S(j,"tools",$,V),e[23]=S,e[24]=k):k=e[24];const E=k;let A;e[25]!==S?(A=(j,$,V)=>S(j,"resources",$,V),e[25]=S,e[26]=A):A=e[26];const L=A;let w;e[27]!==S?(w=(j,$,V)=>S(j,"prompts",$,V),e[27]=S,e[28]=w):w=e[28];const I=w;let D;e[29]!==_?(D=j=>_(j,"tools"),e[29]=_,e[30]=D):D=e[30];const R=D;let J;e[31]!==_?(J=j=>_(j,"resources"),e[31]=_,e[32]=J):J=e[32];const Y=J;let F;e[33]!==_?(F=j=>_(j,"prompts"),e[33]=_,e[34]=F):F=e[34];const W=F;let G;e[35]!==n||e[36]!==u?(G=j=>{const $=u[j],V=$&&$.tools===null&&$.resources===null&&$.prompts===null,Z={...u};V?delete Z[j]:Z[j]=Jt,n.setValue("connections",Te(Z),{shouldDirty:!0,shouldTouch:!0})},e[35]=n,e[36]=u,e[37]=G):G=e[37];const q=G;let U;e[38]!==r||e[39]!==a||e[40]!==l?(U=j=>{j&&h({type:"RESET",payload:{selectedId:l,firstConnectionId:r[0]?.id??null}}),a(j)},e[38]=r,e[39]=a,e[40]=l,e[41]=U):U=e[41];const H=U;let M;e[42]===Symbol.for("react.memo_cache_sentinel")?(M=j=>{h({type:"SELECT_CONNECTION",payload:j})},e[42]=M):M=e[42];const K=M;let ue;e[43]===Symbol.for("react.memo_cache_sentinel")?(ue=j=>h({type:"SET_SEARCH_TERM",payload:j}),e[43]=ue):ue=e[43];let X;e[44]!==c.searchTerm?(X=t.jsx(mt,{value:c.searchTerm,onChange:ue,placeholder:"Search connections..."}),e[44]=c.searchTerm,e[45]=X):X=e[45];let ee;e[46]!==r||e[47]!==c.searchTerm||e[48]!==c.selectedId||e[49]!==C||e[50]!==g||e[51]!==q?(ee=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(ns,{allConnections:r,searchTerm:c.searchTerm,selectedId:c.selectedId,hasSelections:g,getSelectionSummary:C,onConnectionClick:K,onToggleAll:q})}),e[46]=r,e[47]=c.searchTerm,e[48]=c.selectedId,e[49]=C,e[50]=g,e[51]=q,e[52]=ee):ee=e[52];let te;e[53]!==X||e[54]!==ee?(te=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:[X,ee]}),e[53]=X,e[54]=ee,e[55]=te):te=e[55];let se;e[56]!==b||e[57]!==c.activeTab||e[58]!==c.selectedId||e[59]!==u||e[60]!==W||e[61]!==Y||e[62]!==R||e[63]!==I||e[64]!==L||e[65]!==E?(se=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:b&&c.selectedId?t.jsx(is,{currentConnection:b,activeTab:c.activeTab,selectedId:c.selectedId,formData:u,toggleTool:E,toggleResource:L,togglePrompt:I,toggleAllTools:R,toggleAllResources:Y,toggleAllPrompts:W,onTabChange:j=>h({type:"SET_ACTIVE_TAB",payload:j})},c.selectedId):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[56]=b,e[57]=c.activeTab,e[58]=c.selectedId,e[59]=u,e[60]=W,e[61]=Y,e[62]=R,e[63]=I,e[64]=L,e[65]=E,e[66]=se):se=e[66];let le;e[67]!==te||e[68]!==se?(le=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[te,se]}),e[67]=te,e[68]=se,e[69]=le):le=e[69];let oe;e[70]!==H?(oe=t.jsx(Rt,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(Q,{variant:"outline",onClick:()=>H(!1),children:"Done"})}),e[70]=H,e[71]=oe):oe=e[71];let ne;e[72]!==le||e[73]!==oe?(ne=t.jsxs(Ge,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[le,oe]}),e[72]=le,e[73]=oe,e[74]=ne):ne=e[74];let fe;return e[75]!==H||e[76]!==s||e[77]!==ne?(fe=t.jsx(Ue,{open:s,onOpenChange:H,children:ne}),e[75]=H,e[76]=s,e[77]=ne,e[78]=fe):fe=e[78],fe}const ds=Je.pick({title:!0,description:!0,status:!0,metadata:!0,connections:!0}).extend({title:Ye().min(1,"Name is required").max(255)});function ms(o){const e=T.c(8);let s,a;e[0]!==o?({className:s,...a}=o,e[0]=o,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=me("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let n;return e[5]!==a||e[6]!==l?(n=t.jsx(pt,{"data-slot":"radio-group",className:l,...a}),e[5]=a,e[6]=l,e[7]=n):n=e[7],n}function ke(o){const e=T.c(9);let s,a;e[0]!==o?({className:s,...a}=o,e[0]=o,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=me("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 n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(xt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(qe,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=n):n=e[5];let f;return e[6]!==a||e[7]!==l?(f=t.jsx(ft,{"data-slot":"radio-group-item",className:l,...a,children:n}),e[6]=a,e[7]=l,e[8]=f):f=e[8],f}function us(o){const s=new TextEncoder().encode(o),a=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(a)}function fs(o){const e=T.c(10),{url:s}=o,[a,l]=z.useState(!1);let n;e[0]!==s?(n=async()=>{await navigator.clipboard.writeText(s),l(!0),Ee.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=n):n=e[1];const f=n;let i;e[2]!==a?(i=a?t.jsx(We,{size:20,className:"text-green-600"}):t.jsx(Ut,{size:20}),e[2]=a,e[3]=i):i=e[3];const r=a?"Copied!":"Copy URL";let d;e[4]!==r?(d=t.jsx("span",{className:"text-xs font-medium",children:r}),e[4]=r,e[5]=d):d=e[5];let p;return e[6]!==f||e[7]!==i||e[8]!==d?(p=t.jsxs(Q,{type:"button",variant:"outline",onClick:f,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[i,d]}),e[6]=f,e[7]=i,e[8]=d,e[9]=p):p=e[9],p}function ps(o){const e=T.c(7),{url:s,serverName:a}=o;let l;e[0]!==a||e[1]!==s?(l=()=>{const d=He(a),c=us(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),h=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(d)}&config=${encodeURIComponent(c)}`;window.open(h,"_blank"),Ee.success("Opening Cursor...")},e[0]=a,e[1]=s,e[2]=l):l=e[2];const n=l;let f,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=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%)"}}),i=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=f,e[4]=i):(f=e[3],i=e[4]);let r;return e[5]!==n?(r=t.jsxs(Q,{type:"button",variant:"outline",onClick:n,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[f,i]}),e[5]=n,e[6]=r):r=e[6],r}function xs(o){const e=T.c(11),{url:s,serverName:a}=o,[l,n]=z.useState(!1);let f;e[0]!==a||e[1]!==s?(f=async()=>{const h=He(a),m=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),u=`claude mcp add-json "${h}" '${m.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(u),n(!0),Ee.success("Claude Code command copied to clipboard"),setTimeout(()=>n(!1),2e3)},e[0]=a,e[1]=s,e[2]=f):f=e[2];const i=f;let r;e[3]!==l?(r=l?t.jsx(We,{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]=r):r=e[4];const d=l?"Copied!":"Install on Claude";let p;e[5]!==d?(p=t.jsx("span",{className:"text-xs font-medium",children:d}),e[5]=d,e[6]=p):p=e[6];let c;return e[7]!==i||e[8]!==r||e[9]!==p?(c=t.jsxs(Q,{type:"button",variant:"outline",onClick:i,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[r,p]}),e[7]=i,e[8]=r,e[9]=p,e[10]=c):c=e[10],c}function hs(o){const e=T.c(40),{open:s,onOpenChange:a,virtualMcp:l}=o,[n,f]=z.useState("code_execution");let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=R=>{(R==="passthrough"||R==="smart_tool_selection"||R==="code_execution")&&f(R)},e[0]=i):i=e[0];const r=i;let d;e[1]!==n||e[2]!==l.id?(d=new URL(`/mcp/virtual-mcp/${l.id}`,window.location.origin),d.searchParams.set("mode",n),e[1]=n,e[2]=l.id,e[3]=d):d=e[3];let p;e[4]!==l.id||e[5]!==l.title?(p=l.title||`agent-${l.id?.slice(0,8)??"default"}`,e[4]=l.id,e[5]=l.title,e[6]=p):p=e[6];const c=p;let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(zt,{children:t.jsx(Pt,{children:"Share Agent"})}),e[7]=h):h=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mt-1",children:"How should this agent work?"})}),e[8]=x):x=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(nt,{className:"size-5 text-muted-foreground"})}),e[9]=m):m=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=u):u=e[10];let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(ae,{asChild:!0,children:t.jsx(ye,{className:"size-3.5 text-muted-foreground"})}),e[11]=v):v=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=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:[m,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[u,t.jsx(ve,{children:t.jsxs(ce,{children:[v,t.jsx(de,{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(ke,{id:"mode-passthrough",value:"passthrough"})]}),e[12]=b):b=e[12];let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(it,{className:"size-5 text-muted-foreground"})}),e[13]=N):N=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=g):g=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ae,{asChild:!0,children:t.jsx(ye,{className:"size-3.5 text-muted-foreground"})}),e[15]=y):y=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=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:[N,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[g,t.jsx(ve,{children:t.jsxs(ce,{children:[y,t.jsx(de,{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(ke,{id:"mode-smart",value:"smart_tool_selection"})]}),e[16]=C):C=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(Gt,{className:"size-5 text-muted-foreground"})}),e[17]=P):P=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=S):S=e[18];let O;e[19]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ae,{asChild:!0,children:t.jsx(ye,{className:"size-3.5 text-muted-foreground"})}),e[19]=O):O=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=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:[S,t.jsx(ve,{children:t.jsxs(ce,{children:[O,t.jsx(de,{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(ke,{id:"mode-code",value:"code_execution"}),t.jsx(Ie,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=_):_=e[20];let k;e[21]!==n?(k=t.jsxs("div",{className:"flex flex-col gap-3",children:[x,t.jsxs(ms,{value:n,onValueChange:r,className:"flex flex-col gap-4.5",children:[b,C,_]})]}),e[21]=n,e[22]=k):k=e[22];let E;e[23]!==d.href?(E=t.jsx(fs,{url:d.href}),e[23]=d.href,e[24]=E):E=e[24];let A,L;e[25]!==c||e[26]!==d.href?(A=t.jsx(ps,{url:d.href,serverName:c}),L=t.jsx(xs,{url:d.href,serverName:c}),e[25]=c,e[26]=d.href,e[27]=A,e[28]=L):(A=e[27],L=e[28]);let w;e[29]!==E||e[30]!==A||e[31]!==L?(w=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[E,A,L]})}),e[29]=E,e[30]=A,e[31]=L,e[32]=w):w=e[32];let I;e[33]!==k||e[34]!==w?(I=t.jsxs(Ge,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[h,t.jsxs("div",{className:"flex flex-col gap-6",children:[k,w]})]}),e[33]=k,e[34]=w,e[35]=I):I=e[35];let D;return e[36]!==a||e[37]!==s||e[38]!==I?(D=t.jsx(Ue,{open:s,onOpenChange:a,children:I}),e[36]=a,e[37]=s,e[38]=I,e[39]=D):D=e[39],D}function gs(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 we(o){const e=T.c(27),{connection_id:s,selected_tools:a,selected_resources:l,selected_prompts:n,onClick:f}=o,i=Nt(s);if(!i)return null;let r;e[0]!==a?(r=Ce(a),e[0]=a,e[1]=r):r=e[1];const d=r;let p;e[2]!==l?(p=Ce(l),e[2]=l,e[3]=p):p=e[3];const c=p;let h;e[4]!==n?(h=Ce(n),e[4]=n,e[5]=h):h=e[5];const x=h;let m;e[6]!==i.icon||e[7]!==i.title?(m=t.jsx(he,{icon:i.icon,name:i.title,size:"xs"}),e[6]=i.icon,e[7]=i.title,e[8]=m):m=e[8];let u;e[9]!==i.title?(u=t.jsx("p",{className:"flex-1 text-sm font-normal text-foreground truncate",children:i.title}),e[9]=i.title,e[10]=u):u=e[10];let v;e[11]!==d?(v=d!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:d==="all"?"all":d}),t.jsx(Ae,{size:12})]}),e[11]=d,e[12]=v):v=e[12];let b;e[13]!==c?(b=c!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:c==="all"?"all":c}),t.jsx(ge,{size:12})]}),e[13]=c,e[14]=b):b=e[14];let N;e[15]!==x?(N=x!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:x==="all"?"all":x}),t.jsx(Oe,{size:12})]}),e[15]=x,e[16]=N):N=e[16];let g;e[17]!==v||e[18]!==b||e[19]!==N?(g=t.jsxs(Ie,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[v,b,N]}),e[17]=v,e[18]=b,e[19]=N,e[20]=g):g=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Me,{size:16,className:"text-muted-foreground shrink-0"}),e[21]=y):y=e[21];let C;return e[22]!==f||e[23]!==m||e[24]!==u||e[25]!==g?(C=t.jsxs("div",{onClick:f,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:[m,u,g,y]}),e[22]=f,e[23]=m,e[24]=u,e[25]=g,e[26]=C):C=e[26],C}we.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(Ie,{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(Ae,{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(ge,{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(Oe,{size:12})]})]}),t.jsx(Me,{size:16,className:"text-muted-foreground shrink-0"})]})};function js({virtualMcp:o}){const{org:e}=xe(),a=Qe().location.href,l=yt(),n=Xe({resolver:et(ds),defaultValues:o}),f=n.watch("connections"),[i,r]=z.useReducer(gs,{shareDialogOpen:!1,connectionDialogOpen:!1,editingConnectionId:null,skillsOpen:!1}),[,d]=rt(),{setVirtualMcpId:p}=at();z.useEffect(()=>{d(!0),p(o.id)},[o.id]);const c=()=>{p(o.id),d(!0)},h=n.formState.isDirty,x=async()=>{const g=n.getValues(),y=await l.update.mutateAsync({id:o.id,data:g});n.reset(y)},m=()=>{n.reset(o)},u=()=>{r({type:"SET_EDITING_CONNECTION_ID",payload:null}),r({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},v=g=>{r({type:"SET_EDITING_CONNECTION_ID",payload:g}),r({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},b=l.update.isPending,N=t.jsx(kt,{children:t.jsxs(wt,{children:[t.jsx(Pe,{children:t.jsx(Et,{asChild:!0,children:t.jsx(tt,{to:"/$org/$project/agents",params:{org:e.slug,project:Be},children:"Agents"})})}),t.jsx(It,{}),t.jsx(Pe,{children:t.jsx(Ot,{children:o.title})})]})});return t.jsxs(At,{breadcrumb:N,children:[t.jsxs(Dt,{children:[t.jsx($t,{onSave:x,onUndo:m,isDirty:h,isSaving:b}),t.jsxs(ce,{delayDuration:0,children:[t.jsx(ae,{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:c,"aria-label":"Test Agent",children:[t.jsx(_t,{size:14}),"Test Agent"]})})}),t.jsx(de,{side:"bottom",children:"Test this agent in chat"})]}),t.jsxs(ce,{delayDuration:0,children:[t.jsx(ae,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(Q,{variant:"outline",size:"icon",className:"size-7 border border-input",onClick:()=>r({type:"SET_SHARE_DIALOG_OPEN",payload:!0}),"aria-label":"Share",children:t.jsx(St,{size:14})})})}),t.jsx(de,{side:"bottom",children:"Share"})]}),t.jsx(ht,{title:o.title,url:a,icon:o.icon??"cpu_chip"})]}),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(he,{icon:o.icon,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(Re,{...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(Re,{...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(gt,{checked:n.watch("status")==="active",onCheckedChange:g=>n.setValue("status",g?"active":"inactive",{shouldDirty:!0})})})]}),t.jsxs(ct,{open:i.skillsOpen,onOpenChange:g=>r({type:"SET_SKILLS_OPEN",payload:g}),className:"border-t border-border shrink-0 max-h-[400px] overflow-hidden flex flex-col",children:[f.length===0?t.jsxs("button",{type:"button",onClick:u,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:"Skills"}),t.jsxs("div",{className:"h-7 px-2 inline-flex items-center justify-center gap-1 rounded-md text-sm text-muted-foreground",children:[t.jsx(ze,{size:14}),"Add"]})]}):t.jsx(dt,{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:"Skills"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"ease-(--ease-out-expo)",style:{width:i.skillsOpen?0:"auto",marginRight:i.skillsOpen?0:4,opacity:i.skillsOpen?0:1,pointerEvents:i.skillsOpen?"none":"auto",transitionProperty:"all",transitionDuration:i.skillsOpen?"0ms":"200ms"},children:t.jsx(Ht,{connectionIds:f.map(g=>g.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:i.skillsOpen?"auto":28,paddingLeft:i.skillsOpen?8:0,paddingRight:i.skillsOpen?8:0,gap:i.skillsOpen?4:0},onPointerDown:g=>{g.stopPropagation()},onClick:g=>{g.stopPropagation(),g.preventDefault(),u()},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.stopPropagation(),g.preventDefault(),u())},children:[t.jsx(ze,{size:14,className:"shrink-0"}),t.jsx("span",{className:"overflow-hidden whitespace-nowrap transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?"auto":0,opacity:i.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:i.skillsOpen?28:0,opacity:i.skillsOpen?1:0},children:t.jsx(Ct,{size:16,className:"shrink-0"})})]})]})}),t.jsx("div",{className:"grid overflow-hidden transition-[grid-template-rows] duration-200 ease-(--ease-out-expo)",style:{gridTemplateRows:i.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:f.map(g=>t.jsx(z.Suspense,{fallback:t.jsx(we.Fallback,{}),children:t.jsx(we,{connection_id:g.connection_id,selected_tools:g.selected_tools,selected_resources:g.selected_resources,selected_prompts:g.selected_prompts,onClick:()=>v(g.connection_id)})},g.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(st,{name:"metadata.instructions",control:n.control,render:({field:g})=>t.jsx(jt,{...g,value:g.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(cs,{open:i.connectionDialogOpen,onOpenChange:g=>r({type:"SET_CONNECTION_DIALOG_OPEN",payload:g}),selectedId:i.editingConnectionId,form:n,connections:f}),t.jsx(hs,{open:i.shareDialogOpen,onOpenChange:g=>r({type:"SET_SHARE_DIALOG_OPEN",payload:g}),virtualMcp:o})]})}function bs(){const o=T.c(6),e=Ke();let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/agents/$agentId"},o[0]=s):s=o[0];const a=Ze(s),{org:l,agentId:n}=a,f=vt(n);if(!f){let r;return o[1]!==e||o[2]!==l?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ut,{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:Be}}),children:"Back to agents"})})}),o[1]=e,o[2]=l,o[3]=r):r=o[3],r}let i;return o[4]!==f?(i=t.jsx(js,{virtualMcp:f}),o[4]=f,o[5]=i):i=o[5],i}function zl(){const o=T.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(pe,{children:t.jsx(z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Fe,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(bs,{})})}),o[0]=e):e=o[0],e}export{zl as default};
@@ -1 +0,0 @@
1
- import{c as ie,j as t,r as X,u as ne,b as ae,O as V}from"./index-p5ek_T2U.js";import{C as le,a as ce}from"./collection-table-wrapper-Dwsrv-is.js";import{C as de,E as q}from"./empty-state-CUSdR_G_.js";import{P as j}from"./index-r3RmHcg-.js";import{B as me,a as pe,b as ue,c as ge}from"./breadcrumb-DVboj9hZ.js";import{C as he}from"./connection-card-B-vaA7In.js";import{E as fe}from"./error-boundary-Di0tQXdv.js";import{I as xe}from"./integration-icon-D3fWRQzh.js";import{u as je,U as Ce}from"./use-list-state-CLqJqhda.js";import{u as be}from"./use-create-virtual-mcp-BIn6DTPa.js";import{i as ye}from"./constants-DTZgxhQr.js";import{b as we,a as Ne}from"./use-virtual-mcp-C67SrK4s.js";import{c as De,b as Se,d as _e,A as ke,e as ve,g as Ae,a as Ie,f as Pe}from"./alert-dialog-BobozgbA.js";import{B as Q}from"./button-BvpGJmwj.js";import{D as Y,a as Z,b as ee,c as R}from"./dropdown-menu-DwhvTSoj.js";import{i as te}from"./DotsVertical-NXfqoXCN.js";import{s as se}from"./Eye-CmK33jvc.js";import{i as $e}from"./Loading01-BGpLDRYx.js";import{s as oe}from"./Trash01-DGjvH5rG.js";import{t as C}from"./Users03-DWNrz1Vr.js";import{A as re}from"./agent-connections-preview-DO3HZtWQ.js";import{f as ze}from"./format-time-CMKyl-GC.js";import"./ArrowUp-DgvOdNkG.js";import"./Check-DGXJXTap.js";import"./Grid01-DkGxNKPL.js";import"./List-DLWOvAOP.js";import"./tooltip-w4nyO9EM.js";import"./index-CDwFwb7Q.js";import"./table-m7xKes0i.js";import"./SearchMd-CguhhQVb.js";import"./input-Cw77piS4.js";import"./ChevronRight-BNn59ko7.js";import"./card-DUyr2anf.js";import"./AlertTriangle-Ca8IB5bL.js";import"./Container-C1CLnDNL.js";import"./avatar-DzNBuwvQ.js";import"./useQuery-CoMTdc_B.js";import"./use-view-mode-BC3VVzlU.js";import"./use-mobile-Dl83qL71.js";import"./use-connection-BRwTI0xk.js";import"./useMutation-BLWSoXAi.js";import"./differenceInSeconds-NQ4PDo0z.js";function Me(e,r){switch(r.type){case"delete":return{mode:"deleting",virtualMcp:r.virtualMcp};case"close":return{mode:"idle"}}}function Be(){const e=ie.c(65),{org:r}=ne(),n=ae();let b;e[0]!==r.slug?(b={namespace:r.slug,resource:"agents"},e[0]=r.slug,e[1]=b):b=e[1];const s=je(b),x=we(s);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y={navigateOnCreate:!0},e[2]=y):y=e[2];const{createVirtualMCP:T,isCreating:w}=be(y),U=Ne();let N;e[3]===Symbol.for("react.memo_cache_sentinel")?(N={mode:"idle"},e[3]=N):N=e[3];const[i,D]=X.useReducer(Me,N);let S;e[4]!==U||e[5]!==i.mode||e[6]!==i.virtualMcp?(S=async()=>{if(i.mode!=="deleting")return;const o=i.virtualMcp.id;if(D({type:"close"}),!(!o||ye(o)))try{await U.delete.mutateAsync(o)}catch{}},e[4]=U,e[5]=i.mode,e[6]=i.virtualMcp,e[7]=S):S=e[7];const L=S;let _,k,v,A,I;e[8]===Symbol.for("react.memo_cache_sentinel")?(_={id:"title",header:"Name",render:Fe,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},k={id:"description",header:"Description",render:He,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},v={id:"connections",header:"Connections",render:Ue,cellClassName:"w-28 shrink-0"},A={id:"updated_by",header:"Updated by",render:Te,cellClassName:"w-32 shrink-0",sortable:!0},I={id:"updated_at",header:"Updated",render:Re,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},e[8]=_,e[9]=k,e[10]=v,e[11]=A,e[12]=I):(_=e[8],k=e[9],v=e[10],A=e[11],I=e[12]);let P;e[13]!==n||e[14]!==r.slug?(P=[_,k,v,A,I,{id:"actions",header:"",render:o=>t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ve,children:t.jsx(te,{size:20})})}),t.jsxs(ee,{align:"end",onClick:Ke,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}})},children:[t.jsx(se,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),D({type:"delete",virtualMcp:o})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[13]=n,e[14]=r.slug,e[15]=P):P=e[15];const H=P,F=w?"Creating...":"Create Agent";let $;e[16]!==T||e[17]!==w||e[18]!==F?($=t.jsx(Q,{onClick:T,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:w,children:F}),e[16]=T,e[17]=w,e[18]=F,e[19]=$):$=e[19];const G=$,J=i.mode==="deleting";let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=o=>!o&&D({type:"close"}),e[20]=z):z=e[20];let M;e[21]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(De,{children:"Delete Agent?"}),e[21]=M):M=e[21];const W=i.mode==="deleting"&&i.virtualMcp.title;let l;e[22]!==W?(l=t.jsxs(Se,{children:[M,t.jsxs(_e,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[22]=W,e[23]=l):l=e[23];let B;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ke,{children:"Cancel"}),e[24]=B):B=e[24];let c;e[25]!==L?(c=t.jsxs(ve,{children:[B,t.jsx(Ae,{onClick:L,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[25]=L,e[26]=c):c=e[26];let d;e[27]!==l||e[28]!==c?(d=t.jsxs(Ie,{children:[l,c]}),e[27]=l,e[28]=c,e[29]=d):d=e[29];let m;e[30]!==J||e[31]!==d?(m=t.jsx(Pe,{open:J,onOpenChange:z,children:d}),e[30]=J,e[31]=d,e[32]=m):m=e[32];let O;e[33]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(j.Header.Left,{children:t.jsx(me,{children:t.jsx(pe,{children:t.jsx(ue,{children:t.jsx(ge,{children:"Agents"})})})})}),e[33]=O):O=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],e[34]=E):E=e[34];let p;e[35]!==s.handleSort||e[36]!==s.setViewMode||e[37]!==s.sortDirection||e[38]!==s.sortKey||e[39]!==s.viewMode?(p=t.jsx(le,{viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:E}),e[35]=s.handleSort,e[36]=s.setViewMode,e[37]=s.sortDirection,e[38]=s.sortKey,e[39]=s.viewMode,e[40]=p):p=e[40];let u;e[41]!==G||e[42]!==p?(u=t.jsxs(j.Header,{children:[O,t.jsxs(j.Header.Right,{children:[p,G]})]}),e[41]=G,e[42]=p,e[43]=u):u=e[43];let g;e[44]!==s?(g=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[44]=s,e[45]=g):g=e[45];let h;e[46]!==s.search||e[47]!==s.setSearch||e[48]!==g?(h=t.jsx(de,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:g}),e[46]=s.search,e[47]=s.setSearch,e[48]=g,e[49]=h):h=e[49];let f;e[50]!==H||e[51]!==s.handleSort||e[52]!==s.search||e[53]!==s.sortDirection||e[54]!==s.sortKey||e[55]!==s.viewMode||e[56]!==n||e[57]!==r.slug||e[58]!==x?(f=t.jsx(j.Content,{children:s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:x.map(o=>t.jsx(he,{connection:{id:o.id??"",title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:t.jsx(C,{}),onClick:()=>n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}}),footer:t.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:t.jsxs("span",{children:[o.connections.length," connection",o.connections.length!==1?"s":""]})}),headerActions:t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ee,children:t.jsx(te,{size:20})})}),t.jsxs(ee,{align:"end",onClick:Oe,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}})},children:[t.jsx(se,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),D({type:"delete",virtualMcp:o})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]})},o.id??"default"))})}):t.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:t.jsx(ce,{columns:H,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})}),e[50]=H,e[51]=s.handleSort,e[52]=s.search,e[53]=s.sortDirection,e[54]=s.sortKey,e[55]=s.viewMode,e[56]=n,e[57]=r.slug,e[58]=x,e[59]=f):f=e[59];let K;return e[60]!==m||e[61]!==u||e[62]!==h||e[63]!==f?(K=t.jsxs(j,{children:[m,u,h,f]}),e[60]=m,e[61]=u,e[62]=h,e[63]=f,e[64]=K):K=e[64],K}function Oe(e){return e.stopPropagation()}function Ee(e){return e.stopPropagation()}function Ke(e){return e.stopPropagation()}function Ve(e){return e.stopPropagation()}function Re(e){return t.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?ze(new Date(e.updated_at)):"—"})}function Te(e){return t.jsx(Ce,{id:e.updated_by??e.created_by,size:"3xs"})}function Ue(e){return t.jsx(X.Suspense,{fallback:t.jsx(re.Fallback,{}),children:t.jsx(re,{connectionIds:e.connections.map(Le),maxVisibleIcons:2})})}function Le(e){return e.connection_id}function He(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Fe(e){return t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(xe,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(C,{size:16})}),t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})]})}function Mt(){const e=ie.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(fe,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx($e,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Be,{})})}),e[0]=r):r=e[0],r}export{Mt as default};
@@ -1 +0,0 @@
1
- import{r as R,c as j,j as i,y as I,aB as $,aC as L,aD as M}from"./index-p5ek_T2U.js";import{c as f}from"./button-BvpGJmwj.js";const V=({size:a=24,color:e="currentColor",...s})=>R.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},R.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));V.displayName="User01";function O(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(M,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function B(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function D(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(L,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}const S=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],T="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function W(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%S.length;return S[s]}const U=I("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-xs font-semibold","2xs":"w-4 h-4 text-xs font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=I("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),Z=a=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[a]||e.base};function G(a){const e=j.c(35);let s,t,o,r,n,d,g,l;e[0]!==a?({url:l,fallback:t,shape:r,size:n,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,[m,x]=R.useState(!1);let C;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],C=c;break e}C=t}const F=C;let y;e:{if(k){y=T;break e}if(typeof t=="string"){let c;e[11]!==t?(c=W(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=S[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(U({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==F||e[24]!==E||e[25]!==m||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(V,{size:Z(h)})}):i.jsxs(i.Fragment,{children:[l&&!m&&i.jsx(B,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u})),onError:()=>x(!0)}),(!l||m)&&i.jsx(D,{className:f(z,"rounded-none"),children:F})]}),e[22]=z,e[23]=F,e[24]=E,e[25]=m,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(O,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(a){const e=j.c(18);let s,t,o,r,n,d,g,l;e[0]!==a?({shape:r,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,m=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==m||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:m,objectFit:u,className:s,muted:k,...o}),e[9]=s,e[10]=t,e[11]=k,e[12]=u,e[13]=o,e[14]=b,e[15]=m,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(U({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
@@ -1 +0,0 @@
1
- import{c,j as n,v as f}from"./index-p5ek_T2U.js";import{i as u}from"./ChevronRight-BNn59ko7.js";import{c as m}from"./button-BvpGJmwj.js";function x(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function j(r){const e=c.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?f:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==l||e[7]!==s||e[8]!==i?(o=n.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function h(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-normal truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function B(r){const e=c.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??n.jsx(u,{}),e[6]=a,e[7]=i):i=e[7];let o;return e[8]!==s||e[9]!==l||e[10]!==i?(o=n.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=o):o=e[11],o}export{x as B,N as a,g as b,h as c,j as d,B as e};
@@ -1 +0,0 @@
1
- import{b0 as g,b1 as u,c as l,j as v,v as b,y as p}from"./index-p5ek_T2U.js";function x(...a){return g(u(a))}const f=p("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground",brand:"bg-brand-green-light text-brand-green-dark hover:bg-brand-green-light/90"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function k(a){const e=l.c(14);let t,r,s,o,i;e[0]!==a?({className:t,variant:i,size:s,asChild:o,...r}=a,e[0]=a,e[1]=t,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(t=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const c=(o===void 0?!1:o)?b:"button";let n;e[6]!==t||e[7]!==s||e[8]!==i?(n=x(f({variant:i,size:s,className:t})),e[6]=t,e[7]=s,e[8]=i,e[9]=n):n=e[9];let d;return e[10]!==c||e[11]!==r||e[12]!==n?(d=v.jsx(c,{"data-slot":"button",className:n,...r}),e[10]=c,e[11]=r,e[12]=n,e[13]=d):d=e[13],d}export{k as B,f as b,x as c};
@@ -1 +0,0 @@
1
- import{c as o,j as c}from"./index-p5ek_T2U.js";import{c as i}from"./button-BvpGJmwj.js";function f(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function p(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto]",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function m(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function u(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function x(r){const e=o.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{f as C,x as a,m as b,u as c,p as d};
@@ -1 +0,0 @@
1
- import{c as X,j as t,b as Re,O as Se,aE as at,u as ct,bB as Ge,ak as vt,p as Nt,bz as Xe,r as Y,o as lt,b8 as yt,bg as _t,s as W,al as Je,am as Ct,e as St,a as wt,z as Tt,k as kt,l as Pt,i as It,t as Ce,K as Ye}from"./index-p5ek_T2U.js";import{E as ye,C as dt}from"./empty-state-CUSdR_G_.js";import{E as mt}from"./error-boundary-Di0tQXdv.js";import{E as $t,r as At,e as ut}from"./env-vars-editor-CX-fJfxt.js";import{P as Ke}from"./index-qSvnMMX3.js";import{S as Vt}from"./save-actions-DnatwzCI.js";import{b as Mt,a as Dt}from"./use-binding-CAtjL1rr.js";import{u as Ot,S as Et}from"./index-CMu5spRk.js";import{f as We,g as pt}from"./use-connection-BRwTI0xk.js";import{u as Rt}from"./constants-DTZgxhQr.js";import{d as Lt}from"./use-mcp-tools-CnGq7c_h.js";import{b as Ut,d as Ft}from"./use-mcp-prompts-C28zFdyF.js";import{a as zt}from"./mcp-oauth-Da77-kcD.js";import{b as Ze,c as Bt,d as Xt,e as Kt,B as Wt,a as qt}from"./breadcrumb-DVboj9hZ.js";import{B as ze}from"./button-BvpGJmwj.js";import{C as Ht}from"./collection-tabs-BxPjmpup.js";import{i as Ee}from"./Loading01-BGpLDRYx.js";import{V as qe,a as Qt}from"./layout-BPYuOiPI.js";import{C as Gt}from"./collection-tab-DpQw4w-_.js";import{I as Le}from"./integration-icon-D3fWRQzh.js";import{B as Be}from"./badge-Ba42zrft.js";import{D as Jt,a as Yt,b as Zt,c as et}from"./dropdown-menu-DwhvTSoj.js";import{F as G,a as es,b as J,d as q,f as Z,c as te,e as ts}from"./form-DIsigMsk.js";import{I as ee}from"./input-Cw77piS4.js";import{S as tt,a as st,b as nt,c as ot,d as Q}from"./select-DmOdy-_2.js";import{i as ft}from"./CheckCircle-DDajcDWB.js";import{t as ss}from"./ChevronDown-Di42C1UO.js";import{n as ns}from"./Container-C1CLnDNL.js";import{s as Oe}from"./Globe02-DcNEoN4R.js";import{s as os}from"./RefreshCcw01-BlblCD0d.js";import{i as rs}from"./Terminal-B6KzedA2.js";import{s as is}from"./Trash01-DGjvH5rG.js";import{t as He}from"./Users03-DWNrz1Vr.js";import{s as as}from"./XClose-quksRQbf.js";import{U as cs}from"./use-list-state-CLqJqhda.js";import{b as ls,a as ds}from"./use-virtual-mcp-C67SrK4s.js";import{i as ms}from"./ChevronRight-BNn59ko7.js";import{s as us}from"./Plus-BB0XqcsP.js";import{f as ps}from"./formatDistanceToNow-Cb2QZZJn.js";import{a as xt,C as ht}from"./collection-table-wrapper-Dwsrv-is.js";import{C as gt}from"./card-DUyr2anf.js";import{R as fs}from"./readme-viewer-DSTuLgLE.js";import{a as xs}from"./tools-list-BYJP7wdj.js";import"./SearchMd-CguhhQVb.js";import"./AlertTriangle-Ca8IB5bL.js";import"./tooltip-w4nyO9EM.js";import"./index-CDwFwb7Q.js";import"./Pin01-CSZOSQvf.js";import"./use-organization-settings-BVsgnOKP.js";import"./useMutation-BLWSoXAi.js";import"./Save01-j7EMqYuR.js";import"./binder-XSlHh33G.js";import"./File06-XfbhoM8r.js";import"./Key01-BoEk45CQ.js";import"./constants-BXsR0e2f.js";import"./registry-utils-D8FLO1oI.js";import"./extract-connection-data-Dd3BvcTW.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-GZkHb-J_.js";import"./index-BVrm4rGn.js";import"./circle-alert-D1V0DFvr.js";import"./index-NEbz2HQu.js";import"./index-DeBwK236.js";import"./use-deco-chat-open-CWPuucLF.js";import"./use-llm-BToIG9lg.js";import"./useQuery-CoMTdc_B.js";import"./localstorage-keys-DRPmjZks.js";import"./popover-C8z2ljXJ.js";import"./Grid01-DkGxNKPL.js";import"./Image01-F0dDnjWb.js";import"./Settings01-jz5w4e3w.js";import"./useSuspenseInfiniteQuery-BEcP523_.js";import"./infiniteQueryObserver-DbZCUgr5.js";import"./spinner-BFe5KsON.js";import"./dialog-Djb2_yQ3.js";import"./X-hlRWRdLd.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-DgvOdNkG.js";import"./Edit01-CxGjhFGJ.js";import"./XCircle-VzD2IKvZ.js";import"./AlertCircle-CooHa8Dx.js";import"./ArrowLeft-DIF2VO2W.js";import"./use-copy-BnGNgGbL.js";import"./Check-DGXJXTap.js";import"./Code01-DooPA--K.js";import"./use-create-virtual-mcp-BIn6DTPa.js";import"./marked.esm-BaswSlok.js";import"./markdown-BUX5ABnz.js";import"./Copy01-rucQ3PSp.js";import"./Clock-BLkZwDYw.js";import"./index-r3RmHcg-.js";import"./DotsVertical-NXfqoXCN.js";import"./Eye-CmK33jvc.js";import"./empty-state-CfAcFJ3T.js";import"./Inbox01-rhXjoTLG.js";import"./alert-dialog-BobozgbA.js";import"./label-CUy1x9Fc.js";import"./avatar-DzNBuwvQ.js";import"./use-view-mode-BC3VVzlU.js";import"./use-mobile-Dl83qL71.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./List-DLWOvAOP.js";import"./table-m7xKes0i.js";import"./RefreshCw01-C2HUNviY.js";function hs(s){const e=X.c(14),{virtualMcp:n,org:o}=s;let r;e[0]!==o||e[1]!==n.id?(r={org:o,project:Se,agentId:n.id},e[0]=o,e[1]=n.id,e[2]=r):r=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(He,{size:16}),e[3]=a):a=e[3];let c;e[4]!==n.icon||e[5]!==n.title?(c=t.jsx(Le,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:a}),e[4]=n.icon,e[5]=n.title,e[6]=c):c=e[6];let u;e[7]!==n.title?(u=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[7]=n.title,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ms,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[9]=f):f=e[9];let l;return e[10]!==r||e[11]!==c||e[12]!==u?(l=t.jsxs(at,{to:"/$org/$project/agents/$agentId",params:r,className:"flex items-center gap-3 p-2 pr-1 rounded-lg hover:bg-muted/50 transition-colors group",children:[c,u,f]}),e[10]=r,e[11]=c,e[12]=u,e[13]=l):l=e[13],l}function rt(s){const e=X.c(20),{connectionId:n,connectionTitle:o,connectionDescription:r,connectionIcon:a,org:c,hasExistingVirtualMcps:u}=s,f=Re(),l=ds();let x;e[0]!==l.create||e[1]!==r||e[2]!==a||e[3]!==n||e[4]!==o||e[5]!==f||e[6]!==c?(x=async()=>{const m=await l.create.mutateAsync({title:`${o} Agent`,description:r??null,icon:a??null,status:"active",connections:[{connection_id:n,selected_tools:null,selected_resources:null,selected_prompts:null}]});f({to:"/$org/$project/agents/$agentId",params:{org:c,project:Se,agentId:m.id}})},e[0]=l.create,e[1]=r,e[2]=a,e[3]=n,e[4]=o,e[5]=f,e[6]=c,e[7]=x):x=e[7];const p=x;if(u){let m;e[8]!==l.create.isPending?(m=l.create.isPending?t.jsx(Ee,{size:16,className:"animate-spin"}):t.jsx(us,{size:16}),e[8]=l.create.isPending,e[9]=m):m=e[9];let d;return e[10]!==l.create.isPending||e[11]!==p||e[12]!==m?(d=t.jsx(ze,{variant:"ghost",className:"size-6 p-0",onClick:p,disabled:l.create.isPending,children:m}),e[10]=l.create.isPending,e[11]=p,e[12]=m,e[13]=d):d=e[13],d}let i;e[14]!==l.create.isPending?(i=l.create.isPending?t.jsx(Ee,{className:"animate-spin text-muted-foreground"}):t.jsx(He,{className:"size-3 text-muted-foreground"}),e[14]=l.create.isPending,e[15]=i):i=e[15];let b;return e[16]!==l.create.isPending||e[17]!==p||e[18]!==i?(b=t.jsxs(ze,{variant:"outline",size:"sm",onClick:p,disabled:l.create.isPending,children:[i,"Create an agent"]}),e[16]=l.create.isPending,e[17]=p,e[18]=i,e[19]=b):b=e[19],b}function gs(s){const e=X.c(26),{connectionId:n,connectionTitle:o,connectionDescription:r,connectionIcon:a,org:c}=s;let u;e[0]!==n?(u={filters:[{column:"connection_id",value:n}]},e[0]=n,e[1]=u):u=e[1];const f=ls(u);if(!(f.length>0)){let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("h4",{className:"text-xs text-muted-foreground font-medium",children:"Use in your IDE"}),e[2]=d):d=e[2];let j;return e[3]!==r||e[4]!==a||e[5]!==n||e[6]!==o||e[7]!==c?(j=t.jsxs("div",{className:"p-5 flex items-center justify-between gap-3",children:[d,t.jsx(rt,{connectionId:n,connectionTitle:o,connectionDescription:r,connectionIcon:a,org:c,hasExistingVirtualMcps:!1})]}),e[3]=r,e[4]=a,e[5]=n,e[6]=o,e[7]=c,e[8]=j):j=e[8],j}let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("h4",{className:"text-xs text-muted-foreground font-medium",children:"Agents"}),e[9]=x):x=e[9];let p;e[10]!==r||e[11]!==a||e[12]!==n||e[13]!==o||e[14]!==c?(p=t.jsx("div",{className:"flex flex-col gap-1",children:t.jsxs("div",{className:"flex items-center justify-between",children:[x,t.jsx(rt,{connectionId:n,connectionTitle:o,connectionDescription:r,connectionIcon:a,org:c,hasExistingVirtualMcps:!0})]})}),e[10]=r,e[11]=a,e[12]=n,e[13]=o,e[14]=c,e[15]=p):p=e[15];let i;if(e[16]!==c||e[17]!==f){let d;e[19]!==c?(d=j=>t.jsx(hs,{virtualMcp:j,org:c},j.id),e[19]=c,e[20]=d):d=e[20],i=f.map(d),e[16]=c,e[17]=f,e[18]=i}else i=e[18];let b;e[21]!==i?(b=t.jsx("div",{className:"flex flex-col gap-2",children:i}),e[21]=i,e[22]=b):b=e[22];let m;return e[23]!==p||e[24]!==b?(m=t.jsxs("div",{className:"p-5 flex flex-col gap-3",children:[p,b]}),e[23]=p,e[24]=b,e[25]=m):m=e[25],m}function js({form:s,connection:e,hasOAuthToken:n,onReauthenticate:o,onRemoveOAuth:r}){const a=Ge({control:s.control,name:"ui_type"}),c=Ge({control:s.control,name:"connection_url"}),{stdioEnabled:u}=vt(),f=(()=>{if(typeof c!="string"||!c)return!1;try{const i=new URL(c);return i.hostname==="api.githubcopilot.com"&&i.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),l=u||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",p=x?Nt(e.connection_url):null;return x?t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Type"}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(He,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsx(G,{control:s.control,name:"ui_type",render:({field:i})=>t.jsxs(J,{className:"flex flex-col gap-3",children:[t.jsx(te,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),a!=="NPX"&&a!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(tt,{value:i.value,onValueChange:i.onChange,children:[t.jsx(q,{children:t.jsxs(st,{className:"h-10 w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(Oe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(nt,{})]})}),t.jsxs(ot,{children:[t.jsx(Q,{value:"HTTP",children:"HTTP"}),t.jsx(Q,{value:"SSE",children:"SSE"}),t.jsx(Q,{value:"Websocket",children:"Websocket"}),l&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{value:"NPX",children:"NPX Package"}),t.jsx(Q,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(G,{control:s.control,name:"connection_url",render:({field:b})=>t.jsx(J,{className:"flex-1 min-w-0",children:t.jsx(q,{children:t.jsx(ee,{placeholder:"https://example.com/mcp",...b,value:b.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(tt,{value:i.value,onValueChange:i.onChange,children:[t.jsx(q,{children:t.jsx(st,{className:"h-10",children:t.jsx(nt,{})})}),t.jsxs(ot,{children:[t.jsx(Q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Oe,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(Q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Oe,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(Q,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Oe,{className:"w-4 h-4"}),"Websocket"]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ns,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(Q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(rs,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(Z,{})]})}),a==="NPX"&&t.jsx(G,{control:s.control,name:"npx_package",render:({field:i})=>t.jsxs(J,{className:"flex flex-col gap-3",children:[t.jsx(te,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(q,{children:t.jsx(ee,{placeholder:"@perplexity-ai/mcp-server",...i,value:i.value||"",className:"h-10 rounded-lg"})}),t.jsx(Z,{})]})}),a==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(G,{control:s.control,name:"stdio_command",render:({field:i})=>t.jsxs(J,{className:"flex flex-col gap-3",children:[t.jsx(te,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(q,{children:t.jsx(ee,{placeholder:"node, bun, python...",...i,value:i.value||"",className:"h-10 rounded-lg"})}),t.jsx(Z,{})]})}),t.jsx(G,{control:s.control,name:"stdio_args",render:({field:i})=>t.jsxs(J,{className:"flex flex-col gap-3",children:[t.jsx(te,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(q,{children:t.jsx(ee,{placeholder:"arg1 arg2 --flag value",...i,value:i.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(Z,{})]})})]}),t.jsx(G,{control:s.control,name:"stdio_cwd",render:({field:i})=>t.jsxs(J,{className:"flex flex-col gap-3",children:[t.jsx(te,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(q,{children:t.jsx(ee,{placeholder:"/path/to/project (optional)",...i,value:i.value||"",className:"h-10 rounded-lg"})}),t.jsx(Z,{})]})})]}),(a==="NPX"||a==="STDIO")&&t.jsx(G,{control:s.control,name:"env_vars",render:({field:i})=>t.jsxs(J,{className:"flex flex-col gap-3",children:[t.jsx(te,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(q,{children:t.jsx($t,{value:i.value??[],onChange:i.onChange})}),t.jsx(Z,{})]})}),a!=="NPX"&&a!=="STDIO"&&t.jsx(G,{control:s.control,name:"connection_token",render:({field:i})=>t.jsxs(J,{className:"flex flex-col gap-3",children:[t.jsx(te,{className:"text-xs text-muted-foreground font-medium",children:f?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Jt,{children:[t.jsx(Yt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Be,{variant:"success",className:"gap-1.5",children:[t.jsx(ft,{size:12}),"Authenticated via OAuth",t.jsx(ss,{size:12})]})})}),t.jsxs(Zt,{align:"start",children:[t.jsxs(et,{onClick:o,children:[t.jsx(os,{size:16}),"Re-authenticate"]}),t.jsxs(et,{variant:"destructive",onClick:r,children:[t.jsx(is,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&i.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>i.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(as,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(ee,{type:"password",placeholder:f?"Paste your GitHub PAT":"Enter access token...",...i,value:i.value||"",className:"h-10 rounded-lg"})}),f&&t.jsxs(ts,{children:["Create a PAT at"," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(Z,{})]})})]})}function bs(s){const e=X.c(43),{form:n,connection:o,isMCPAuthenticated:r,hasOAuthToken:a,onReauthenticate:c,onRemoveOAuth:u}=s,{org:f}=ct();let l;e[0]!==o.icon||e[1]!==o.title?(l=t.jsx(Le,{icon:o.icon,name:o.title,size:"lg",className:"shadow-sm"}),e[0]=o.icon,e[1]=o.title,e[2]=l):l=e[2];let x;e[3]!==n.control?(x=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(G,{control:n.control,name:"title",render:Ns}),t.jsx(G,{control:n.control,name:"description",render:vs})]}),e[3]=n.control,e[4]=x):x=e[4];let p;e[5]!==l||e[6]!==x?(p=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[l,x]}),e[5]=l,e[6]=x,e[7]=p):p=e[7];let i;e[8]!==o||e[9]!==n||e[10]!==a||e[11]!==c||e[12]!==u?(i=t.jsx(js,{form:n,connection:o,hasOAuthToken:a,onReauthenticate:c,onRemoveOAuth:u}),e[8]=o,e[9]=n,e[10]=a,e[11]=c,e[12]=u,e[13]=i):i=e[13];let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Status"}),e[14]=b):b=e[14];let m;e[15]!==r?(m=t.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[b,r?t.jsxs(Be,{variant:"success",className:"gap-1.5 bg-success-foreground text-success",children:[t.jsx(ft,{size:12}),"Connected"]}):t.jsx(Be,{variant:"outline",className:"text-muted-foreground",children:"Not connected"})]}),e[15]=r,e[16]=m):m=e[16];let d;e[17]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Created by"}),e[17]=d):d=e[17];let j;e[18]!==o.created_by?(j=t.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[d,t.jsx(cs,{id:o.created_by,size:"2xs"})]}),e[18]=o.created_by,e[19]=j):j=e[19];let T;e[20]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Updated"}),e[20]=T):T=e[20];let v;e[21]!==o.updated_at?(v=o.updated_at?ps(new Date(o.updated_at),{addSuffix:!0}):"Unknown",e[21]=o.updated_at,e[22]=v):v=e[22];let y;e[23]!==v?(y=t.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[T,t.jsx("span",{className:"text-sm text-foreground",children:v})]}),e[23]=v,e[24]=y):y=e[24];let _;e[25]!==y||e[26]!==m||e[27]!==j?(_=t.jsxs("div",{className:"flex flex-col gap-2 p-5 border-b border-border",children:[m,j,y]}),e[25]=y,e[26]=m,e[27]=j,e[28]=_):_=e[28];let N;e[29]!==o.description||e[30]!==o.icon||e[31]!==o.id||e[32]!==o.title||e[33]!==f.slug?(N=t.jsx(gs,{connectionId:o.id,connectionTitle:o.title,connectionDescription:o.description,connectionIcon:o.icon,org:f.slug}),e[29]=o.description,e[30]=o.icon,e[31]=o.id,e[32]=o.title,e[33]=f.slug,e[34]=N):N=e[34];let h;e[35]!==_||e[36]!==N||e[37]!==p||e[38]!==i?(h=t.jsxs("div",{className:"flex flex-col h-full overflow-auto",children:[p,i,_,N]}),e[35]=_,e[36]=N,e[37]=p,e[38]=i,e[39]=h):h=e[39];let k;return e[40]!==n||e[41]!==h?(k=t.jsx(es,{...n,children:h}),e[40]=n,e[41]=h,e[42]=k):k=e[42],k}function vs(s){const{field:e}=s;return t.jsxs(J,{className:"w-full space-y-0",children:[t.jsx(q,{children:t.jsx(ee,{...e,value:e.value||"",className:"h-auto py-0.5 text-base text-muted-foreground leading-6 px-2 -mx-2 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})}),t.jsx(Z,{})]})}function Ns(s){const{field:e}=s;return t.jsxs(J,{className:"flex-1 space-y-0",children:[t.jsx(q,{children:t.jsx(ee,{...e,className:"h-auto py-0.5 text-lg! font-medium leading-7 px-2 -mx-2 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Connection Name"})}),t.jsx(Z,{})]})}function ys(s){const e=X.c(42),{prompts:n,connectionId:o,org:r,connectionTitle:a,connectionIcon:c,onPromptClick:u,showToolbar:f,emptyMessage:l}=s,x=f===void 0?!0:f,p=l===void 0?"This connection doesn't have any prompts yet.":l,i=Re(),m=Xe().location.href,[d,j]=Y.useState(""),[T,v]=Y.useState("table"),[y,_]=Y.useState("name"),[N,h]=Y.useState("asc");let k;e[0]!==N||e[1]!==y?(k=S=>{y===S?(h(Ts),N==="desc"&&_(void 0)):(_(S),h("asc"))},e[0]=N,e[1]=y,e[2]=k):k=e[2];const z=k;let $;e[3]!==o||e[4]!==i||e[5]!==u||e[6]!==r?($=S=>{u?u(S):o&&r&&i({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:Se,connectionId:o,collectionName:"prompts",itemId:encodeURIComponent(S.name)}})},e[3]=o,e[4]=i,e[5]=u,e[6]=r,e[7]=$):$=e[7];const M=$;let A;if(e[8]!==n||e[9]!==d||e[10]!==N||e[11]!==y){const S=!n||n.length===0?[]:d.trim()?(()=>{const H=d.toLowerCase();return n.filter(K=>K.name.toLowerCase().includes(H)||K.description&&K.description.toLowerCase().includes(H))})():n;A=!y||!N?S:[...S].sort((H,K)=>{const se=H[y]||"",ne=K[y]||"",oe=String(se).localeCompare(String(ne));return N==="asc"?oe:-oe}),e[8]=n,e[9]=d,e[10]=N,e[11]=y,e[12]=A}else A=e[12];const I=A;let R;e[13]===Symbol.for("react.memo_cache_sentinel")?(R=[{id:"name",header:"Name",render:ws,sortable:!0},{id:"description",header:"Description",render:Ss,cellClassName:"flex-1",sortable:!0}],e[13]=R):R=e[13];const L=R;let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=L.filter(Cs).map(_s),e[14]=C):C=e[14];const B=C;let P;e[15]!==c||e[16]!==a||e[17]!==z||e[18]!==x||e[19]!==N||e[20]!==y||e[21]!==m||e[22]!==T?(P=x&&t.jsxs(qe,{children:[t.jsx(ht,{viewMode:T,onViewModeChange:v,sortKey:y,sortDirection:N,onSort:z,sortOptions:B}),t.jsx(Ke,{title:a?`${a}: Prompts`:"Prompts",url:m,icon:c??"description"})]}),e[15]=c,e[16]=a,e[17]=z,e[18]=x,e[19]=N,e[20]=y,e[21]=m,e[22]=T,e[23]=P):P=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=S=>{S.key==="Escape"&&(j(""),S.target.blur())},e[24]=D):D=e[24];let V;e[25]!==d?(V=t.jsx(dt,{value:d,onChange:j,placeholder:"Search prompts...",onKeyDown:D}),e[25]=d,e[26]=V):V=e[26];let g;e[27]!==p||e[28]!==M||e[29]!==z||e[30]!==d||e[31]!==N||e[32]!==y||e[33]!==I||e[34]!==T?(g=T==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:I.length===0?t.jsx(ye,{image:null,title:d?"No prompts found":"No prompts available",description:d?"Try adjusting your search terms":p}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:I.map(S=>t.jsx(gt,{className:"cursor-pointer transition-colors",onClick:()=>M(S),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(Le,{icon:null,name:S.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:S.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:S.description||"No description"})]})]})},S.name))})}):t.jsx(xt,{columns:L,data:I,isLoading:!1,sortKey:y,sortDirection:N,onSort:z,onRowClick:S=>M(S),emptyState:t.jsx(ye,{image:null,title:d?"No prompts found":"No prompts available",description:d?"Try adjusting your search terms":p})}),e[27]=p,e[28]=M,e[29]=z,e[30]=d,e[31]=N,e[32]=y,e[33]=I,e[34]=T,e[35]=g):g=e[35];let F;e[36]!==V||e[37]!==g?(F=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[V,g]}),e[36]=V,e[37]=g,e[38]=F):F=e[38];let O;return e[39]!==F||e[40]!==P?(O=t.jsxs(t.Fragment,{children:[P,F]}),e[39]=F,e[40]=P,e[41]=O):O=e[41],O}function _s(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function Cs(s){return s.sortable}function Ss(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function ws(s){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:s.name})}function Ts(s){return s==="asc"?"desc":s==="desc"?null:"asc"}function ks(s){const e=X.c(6),{prompts:n,connectionId:o,org:r}=s,a=We(o),c=a?.title,u=a?.icon;let f;return e[0]!==o||e[1]!==r||e[2]!==n||e[3]!==c||e[4]!==u?(f=t.jsx(ys,{prompts:n,connectionId:o,org:r,connectionTitle:c,connectionIcon:u}),e[0]=o,e[1]=r,e[2]=n,e[3]=c,e[4]=u,e[5]=f):f=e[5],f}function Ps(s){const e=X.c(2),{repository:n}=s;let o;return e[0]!==n?(o=t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(fs,{repository:n})}),e[0]=n,e[1]=o):o=e[1],o}function Is(s){const e=X.c(39),{resources:n,connectionTitle:o,connectionIcon:r,onResourceClick:a,showToolbar:c,emptyMessage:u}=s,f=c===void 0?!0:c,l=u===void 0?"This connection doesn't have any resources yet.":u,p=Xe().location.href,[i,b]=Y.useState(""),[m,d]=Y.useState("table"),[j,T]=Y.useState("name"),[v,y]=Y.useState("asc");let _;e[0]!==v||e[1]!==j?(_=g=>{j===g?(y(Es),v==="desc"&&T(void 0)):(T(g),y("asc"))},e[0]=v,e[1]=j,e[2]=_):_=e[2];const N=_;let h;e[3]!==a?(h=g=>{a&&a(g)},e[3]=a,e[4]=h):h=e[4];const k=h;let z;if(e[5]!==n||e[6]!==i||e[7]!==v||e[8]!==j){const g=!n||n.length===0?[]:i.trim()?(()=>{const F=i.toLowerCase();return n.filter(O=>O.uri.toLowerCase().includes(F)||O.name&&O.name.toLowerCase().includes(F)||O.description&&O.description.toLowerCase().includes(F))})():n;z=!j||!v?g:[...g].sort((F,O)=>{const S=F[j]||"",H=O[j]||"",K=String(S).localeCompare(String(H));return v==="asc"?K:-K}),e[5]=n,e[6]=i,e[7]=v,e[8]=j,e[9]=z}else z=e[9];const $=z;let M;e[10]===Symbol.for("react.memo_cache_sentinel")?(M=[{id:"name",header:"Name",render:Os,sortable:!0},{id:"uri",header:"URI",render:Ds,sortable:!0},{id:"description",header:"Description",render:Ms,cellClassName:"flex-1",sortable:!0},{id:"mimeType",header:"Type",render:Vs,sortable:!0}],e[10]=M):M=e[10];const A=M;let I;e[11]===Symbol.for("react.memo_cache_sentinel")?(I=A.filter(As).map($s),e[11]=I):I=e[11];const R=I;let L;e[12]!==r||e[13]!==o||e[14]!==N||e[15]!==f||e[16]!==v||e[17]!==j||e[18]!==p||e[19]!==m?(L=f&&t.jsxs(qe,{children:[t.jsx(ht,{viewMode:m,onViewModeChange:d,sortKey:j,sortDirection:v,onSort:N,sortOptions:R}),t.jsx(Ke,{title:o?`${o}: Resources`:"Resources",url:p,icon:r??"folder"})]}),e[12]=r,e[13]=o,e[14]=N,e[15]=f,e[16]=v,e[17]=j,e[18]=p,e[19]=m,e[20]=L):L=e[20];let C;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=g=>{g.key==="Escape"&&(b(""),g.target.blur())},e[21]=C):C=e[21];let B;e[22]!==i?(B=t.jsx(dt,{value:i,onChange:b,placeholder:"Search resources...",onKeyDown:C}),e[22]=i,e[23]=B):B=e[23];let P;e[24]!==l||e[25]!==k||e[26]!==N||e[27]!==i||e[28]!==v||e[29]!==j||e[30]!==$||e[31]!==m?(P=m==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:$.length===0?t.jsx(ye,{image:null,title:i?"No resources found":"No resources available",description:i?"Try adjusting your search terms":l}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:$.map(g=>t.jsx(gt,{className:"cursor-pointer transition-colors",onClick:()=>k(g),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(Le,{icon:null,name:g.name||g.uri,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:g.name||g.uri}),t.jsx("p",{className:"text-xs font-mono text-muted-foreground truncate",children:g.uri}),g.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-1",children:g.description})]})]})},g.uri))})}):t.jsx(xt,{columns:A,data:$,isLoading:!1,sortKey:j,sortDirection:v,onSort:N,onRowClick:g=>k(g),emptyState:t.jsx(ye,{image:null,title:i?"No resources found":"No resources available",description:i?"Try adjusting your search terms":l})}),e[24]=l,e[25]=k,e[26]=N,e[27]=i,e[28]=v,e[29]=j,e[30]=$,e[31]=m,e[32]=P):P=e[32];let D;e[33]!==B||e[34]!==P?(D=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[B,P]}),e[33]=B,e[34]=P,e[35]=D):D=e[35];let V;return e[36]!==D||e[37]!==L?(V=t.jsxs(t.Fragment,{children:[L,D]}),e[36]=D,e[37]=L,e[38]=V):V=e[38],V}function $s(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function As(s){return s.sortable}function Vs(s){return t.jsx("span",{className:"text-sm text-muted-foreground",children:s.mimeType||"—"})}function Ms(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function Ds(s){return t.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:s.uri})}function Os(s){return t.jsx("span",{className:"text-sm font-medium text-foreground",children:s.name||s.uri})}function Es(s){return s==="asc"?"desc":s==="desc"?null:"asc"}function Rs(s){const e=X.c(6),{resources:n,connectionId:o,org:r}=s,a=We(o),c=a?.title,u=a?.icon;let f;return e[0]!==o||e[1]!==r||e[2]!==n||e[3]!==c||e[4]!==u?(f=t.jsx(Is,{resources:n,connectionId:o,org:r,connectionTitle:c,connectionIcon:u}),e[0]=o,e[1]=r,e[2]=n,e[3]=c,e[4]=u,e[5]=f):f=e[5],f}const Ls=lt({key:W().min(1,"Key is required"),value:W()}),Us=lt({title:W().min(1,"Name is required"),description:W().nullable().optional(),ui_type:Ct(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:W().optional(),connection_token:W().nullable().optional(),npx_package:W().optional(),stdio_command:W().optional(),stdio_args:W().optional(),stdio_cwd:W().optional(),env_vars:Je(Ls).optional(),configuration_scopes:Je(W()).nullable().optional(),configuration_state:yt(W(),_t()).nullable().optional()}).refine(s=>s.ui_type==="NPX"?!!s.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(s=>s.ui_type==="STDIO"?!!s.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(s=>s.ui_type==="HTTP"||s.ui_type==="SSE"||s.ui_type==="Websocket"?!!s.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function Fs(s){const e=X.c(5),{tools:n,connectionId:o,org:r,isLoading:a}=s;let c;return e[0]!==o||e[1]!==a||e[2]!==r||e[3]!==n?(c=t.jsx(xs,{tools:n,connectionId:o,org:r,isLoading:a}),e[0]=o,e[1]=a,e[2]=r,e[3]=n,e[4]=c):c=e[4],c}function zs(s){return s.command==="npx"}function Bs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Xs(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function Ks(s,e){const n={command:"npx",args:["-y",s]},o=ut(e);return Object.keys(o).length>0&&(n.envVars=o),n}function Ws(s,e,n,o){const r={command:s};e.trim()&&(r.args=e.trim().split(/\s+/)),n?.trim()&&(r.cwd=n.trim());const a=ut(o);return Object.keys(a).length>0&&(r.envVars=a),r}function it(s,e){const n={title:s.title,description:s.description??"",configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&It(s.connection_headers)){const o=s.connection_headers,r=At(o.envVars);if(zs(o)){const c=Bs(o);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:c,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:r}}const a=Xs(o);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:a.command,stdio_args:a.args,stdio_cwd:a.cwd,env_vars:r}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function qs(s){let e,n=null,o=null,r=null;return s.ui_type==="NPX"?(e="STDIO",n="",r=Ks(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",r=Ws(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",o=s.connection_token||null),{title:s.title,description:s.description||null,connection_type:e,connection_url:n,...o&&{connection_token:o},...r&&{connection_headers:r},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function Hs(s){const e=X.c(117),{connection:n,connectionId:o,org:r,requestedTabId:a,collections:c,onUpdate:u,isUpdating:f,prompts:l,resources:x,tools:p,isLoadingTools:i}=s;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={from:"/$org/$project/mcps/$connectionId"},e[0]=b):b=e[0];const m=Re(b),d=Tt(),T=Xe().location.href,v=pt();let y;e[1]!==o?(y={connectionId:o},e[1]=o,e[2]=y):y=e[2];const _=Ot(y),h=n?.connection_type==="VIRTUAL"||_.isAuthenticated;let k;e[3]!==n?(k={connections:[n],binding:"MCP"},e[3]=n,e[4]=k):k=e[4];const $=Dt(k).length>0,M=n?.metadata?.repository,A=!!M?.url;let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=kt(Us),e[5]=I):I=e[5];let R;e[6]!==n?(R=it(n),e[6]=n,e[7]=R):R=e[7];let L;e[8]!==R?(L={resolver:I,values:R},e[8]=R,e[9]=L):L=e[9];const C=Pt(L),B=C.formState.isDirty;let P;e[10]!==C||e[11]!==u?(P=async()=>{if(!await C.trigger())return;const U=C.getValues(),Ne=qs(U);await u(Ne),C.reset(U)},e[10]=C,e[11]=u,e[12]=P):P=e[12];const D=P;let V;e[13]!==n||e[14]!==C?(V=()=>{C.reset(it(n))},e[13]=n,e[14]=C,e[15]=V):V=e[15];const g=V;let F;e[16]!==n.id||e[17]!==v||e[18]!==d?(F=async()=>{const{token:w,tokenInfo:U,error:Ne}=await zt({connectionId:n.id});if(Ne||!w){Ce.error(`Authentication failed: ${Ne}`);return}if(U)try{const De=await fetch(`/api/connections/${n.id}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:U.accessToken,refreshToken:U.refreshToken,expiresIn:U.expiresIn,scope:U.scope,clientId:U.clientId,clientSecret:U.clientSecret,tokenEndpoint:U.tokenEndpoint})});if(!De.ok)console.error("Failed to save OAuth token:",await De.text()),await v.update.mutateAsync({id:n.id,data:{connection_token:w}});else try{await v.update.mutateAsync({id:n.id,data:{}})}catch(Qe){console.warn("Failed to refresh connection tools after OAuth:",Qe)}}catch(De){console.error("Error saving OAuth token:",De),await v.update.mutateAsync({id:n.id,data:{connection_token:w}})}else await v.update.mutateAsync({id:n.id,data:{connection_token:w}});const bt=new URL(`/mcp/${n.id}`,window.location.origin);await d.invalidateQueries({queryKey:Ye.isMCPAuthenticated(bt.href,null)}),Ce.success("Authentication successful")},e[16]=n.id,e[17]=v,e[18]=d,e[19]=F):F=e[19];const O=F;let S;e[20]!==n.id||e[21]!==d?(S=async()=>{try{const w=await fetch(`/api/connections/${n.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!w.ok){const Ne=await w.text();Ce.error(`Failed to remove OAuth: ${Ne}`);return}const U=new URL(`/mcp/${n.id}`,window.location.origin);await d.invalidateQueries({queryKey:Ye.isMCPAuthenticated(U.href,null)}),Ce.success("OAuth removed. You can now re-authenticate with a different account.")}catch(w){console.error("Error removing OAuth token:",w),Ce.error("Failed to remove OAuth")}},e[20]=n.id,e[21]=d,e[22]=S):S=e[22];const H=S,K=p.length,se=l.length,ne=x.length,oe=K>0||i;let we;e[23]===Symbol.for("react.memo_cache_sentinel")?(we={id:"settings",label:"Settings"},e[23]=we):we=e[23];let re;e[24]!==i||e[25]!==h||e[26]!==oe||e[27]!==K?(re=h&&oe?[{id:"tools",label:"Tools",count:i?void 0:K}]:[],e[24]=i,e[25]=h,e[26]=oe,e[27]=K,e[28]=re):re=e[28];let ie;e[29]!==h||e[30]!==se?(ie=h&&se>0?[{id:"prompts",label:"Prompts",count:se}]:[],e[29]=h,e[30]=se,e[31]=ie):ie=e[31];let ae;e[32]!==h||e[33]!==ne?(ae=h&&ne>0?[{id:"resources",label:"Resources",count:ne}]:[],e[32]=h,e[33]=ne,e[34]=ae):ae=e[34];let Te;if(e[35]!==c||e[36]!==A||e[37]!==h||e[38]!==re||e[39]!==ie||e[40]!==ae){let w;e[42]!==A?(w=A?[{id:"readme",label:"README"}]:[],e[42]=A,e[43]=w):w=e[43],Te=[we,...re,...ie,...ae,...h?(c||[]).map(Gs):[],...w],e[35]=c,e[36]=A,e[37]=h,e[38]=re,e[39]=ie,e[40]=ae,e[41]=Te}else Te=e[41];const _e=Te,jt=h&&_e.some(Qs)?"tools":"settings",E=_e.some(w=>w.id===a)?a:jt;let ke;e[44]!==m?(ke=w=>{m({search:U=>({...U,tab:w}),replace:!0})},e[44]=m,e[45]=ke):ke=e[45];const ce=ke;let le;e[46]!==c?(le=c||[],e[46]=c,e[47]=le):le=e[47];let Pe;if(e[48]!==E||e[49]!==le){let w;e[51]!==E?(w=U=>U.name===E,e[51]=E,e[52]=w):w=e[52],Pe=le.find(w),e[48]=E,e[49]=le,e[50]=Pe}else Pe=e[50];const Ie=Pe;let de;e[53]!==r?(de=t.jsx(Ze,{children:t.jsx(Xt,{asChild:!0,children:t.jsx(at,{to:"/$org/$project/mcps",params:{org:r,project:Se},children:"Connections"})})}),e[53]=r,e[54]=de):de=e[54];let $e;e[55]===Symbol.for("react.memo_cache_sentinel")?($e=t.jsx(Kt,{}),e[55]=$e):$e=e[55];let me;e[56]!==n.title?(me=t.jsx(Ze,{children:t.jsx(Bt,{children:n.title})}),e[56]=n.title,e[57]=me):me=e[57];let Ae;e[58]!==de||e[59]!==me?(Ae=t.jsx(Wt,{children:t.jsxs(qt,{children:[de,$e,me]})}),e[58]=de,e[59]=me,e[60]=Ae):Ae=e[60];const Ue=Ae;let ue;e[61]!==D||e[62]!==g||e[63]!==B||e[64]!==f?(ue=t.jsx(Vt,{onSave:D,onUndo:g,isDirty:B,isSaving:f}),e[61]=D,e[62]=g,e[63]=B,e[64]=f,e[65]=ue):ue=e[65];const Fe=n.icon??"settings";let pe;e[66]!==n.title||e[67]!==Fe||e[68]!==T?(pe=t.jsx(Ke,{title:n.title,url:T,icon:Fe}),e[66]=n.title,e[67]=Fe,e[68]=T,e[69]=pe):pe=e[69];let fe;e[70]!==ue||e[71]!==pe?(fe=t.jsxs(qe,{children:[ue,pe]}),e[70]=ue,e[71]=pe,e[72]=fe):fe=e[72];let xe;e[73]!==_.hasOAuthToken||e[74]!==n||e[75]!==C||e[76]!==O||e[77]!==H||e[78]!==h?(xe=t.jsx("div",{className:"w-100 shrink-0 border-r border-border bg-background",children:t.jsx(bs,{form:C,connection:n,isMCPAuthenticated:h,hasOAuthToken:_.hasOAuthToken,onReauthenticate:O,onRemoveOAuth:H})}),e[73]=_.hasOAuthToken,e[74]=n,e[75]=C,e[76]=O,e[77]=H,e[78]=h,e[79]=xe):xe=e[79];let he;e[80]!==E||e[81]!==ce||e[82]!==_e?(he=t.jsx("div",{className:"shrink-0 flex items-center gap-4 px-5 py-3 border-b border-border",children:t.jsx(Ht,{tabs:_e,activeTab:E,onTabChange:ce,className:"flex-1"})}),e[80]=E,e[81]=ce,e[82]=_e,e[83]=he):he=e[83];let Ve;e[84]===Symbol.for("react.memo_cache_sentinel")?(Ve=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Ee,{size:32,className:"animate-spin text-muted-foreground"})}),e[84]=Ve):Ve=e[84];let ge;e[85]!==Ie||e[86]!==E||e[87]!==_.isServerError||e[88]!==_.supportsOAuth||e[89]!==n||e[90]!==o||e[91]!==C||e[92]!==O||e[93]!==ce||e[94]!==$||e[95]!==A||e[96]!==i||e[97]!==h||e[98]!==r||e[99]!==l||e[100]!==M||e[101]!==x||e[102]!==p?(ge=t.jsx(Y.Suspense,{fallback:Ve,children:E==="tools"?t.jsx(Fs,{tools:p,connectionId:o,org:r,isLoading:i}):E==="prompts"?t.jsx(ks,{prompts:l,connectionId:o,org:r}):E==="resources"?t.jsx(Rs,{resources:x,connectionId:o,org:r}):E==="settings"?t.jsx(Et,{connection:n,form:C,hasMcpBinding:$,isMCPAuthenticated:h,supportsOAuth:_.supportsOAuth,isServerError:_.isServerError,onAuthenticate:O,onViewReadme:A?()=>ce("readme"):void 0}):E==="readme"&&A?t.jsx(Ps,{repository:M}):Ie&&h?t.jsx(Gt,{connectionId:o,org:r,activeCollection:Ie},E):t.jsx(ye,{title:"Collection not found",description:"This collection may have been deleted or you may not have access."})}),e[85]=Ie,e[86]=E,e[87]=_.isServerError,e[88]=_.supportsOAuth,e[89]=n,e[90]=o,e[91]=C,e[92]=O,e[93]=ce,e[94]=$,e[95]=A,e[96]=i,e[97]=h,e[98]=r,e[99]=l,e[100]=M,e[101]=x,e[102]=p,e[103]=ge):ge=e[103];let je;e[104]!==E||e[105]!==ge?(je=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(mt,{children:ge},E)}),e[104]=E,e[105]=ge,e[106]=je):je=e[106];let be;e[107]!==he||e[108]!==je?(be=t.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-hidden",children:[he,je]}),e[107]=he,e[108]=je,e[109]=be):be=e[109];let ve;e[110]!==xe||e[111]!==be?(ve=t.jsxs("div",{className:"flex h-full w-full bg-background overflow-hidden",children:[xe,be]}),e[110]=xe,e[111]=be,e[112]=ve):ve=e[112];let Me;return e[113]!==Ue||e[114]!==fe||e[115]!==ve?(Me=t.jsxs(Qt,{breadcrumb:Ue,children:[fe,ve]}),e[113]=Ue,e[114]=fe,e[115]=ve,e[116]=Me):Me=e[116],Me}function Qs(s){return s.id==="tools"}function Gs(s){return{id:s.name,label:s.displayName}}function Js(){const s=X.c(43);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/$project/mcps/$connectionId"},s[0]=e):e=s[0];const n=Re(e);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/$project/mcps/$connectionId"},s[1]=o):o=s[1];const{connectionId:r,org:a}=St(o),{org:c}=ct();let u;s[2]===Symbol.for("react.memo_cache_sentinel")?(u={from:"/shell/$org/$project/mcps/$connectionId"},s[2]=u):u=s[2];const l=wt(u).tab??"",x=We(r),p=pt(),i=Mt(x??void 0);let b;s[3]!==r||s[4]!==c.id?(b={connectionId:r,orgId:c.id},s[3]=r,s[4]=c.id,s[5]=b):b=s[5];const m=Rt(b);let d;s[6]!==m?(d={client:m},s[6]=m,s[7]=d):d=s[7];const{data:j}=Ut(d);let T;s[8]!==m?(T={client:m},s[8]=m,s[9]=T):T=s[9];const{data:v}=Ft(T),_=!(x?.connection_type==="VIRTUAL")&&x?.tools&&x.tools.length>0,N=!_;let h;s[10]!==m||s[11]!==N?(h={client:m,enabled:N},s[10]=m,s[11]=N,s[12]=h):h=s[12];const{data:k,isLoading:z}=Lt(h);let $;s[13]!==j?.prompts?($=j?.prompts??[],s[13]=j?.prompts,s[14]=$):$=s[14];let M;s[15]!==$?(M=$.map(en),s[15]=$,s[16]=M):M=s[16];const A=M;let I;s[17]!==v?.resources?(I=v?.resources??[],s[17]=v?.resources,s[18]=I):I=s[18];let R;s[19]!==I?(R=I.map(Zs),s[19]=I,s[20]=R):R=s[20];const L=R;let C;s[21]!==x||s[22]!==_||s[23]!==k?.tools?(C=_?x.tools??[]:(k?.tools??[]).map(Ys),s[21]=x,s[22]=_,s[23]=k?.tools,s[24]=C):C=s[24];const B=C;let P;s[25]!==p.update||s[26]!==r?(P=async g=>{await p.update.mutateAsync({id:r,data:g})},s[25]=p.update,s[26]=r,s[27]=P):P=s[27];const D=P;if(!x){let g;return s[28]!==n||s[29]!==a?(g=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ye,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(ze,{variant:"outline",onClick:()=>n({to:"/$org/$project/mcps",params:{org:a,project:Se}}),children:"Back to connections"})})}),s[28]=n,s[29]=a,s[30]=g):g=s[30],g}let V;return s[31]!==p.update.isPending||s[32]!==i||s[33]!==x||s[34]!==r||s[35]!==D||s[36]!==z||s[37]!==a||s[38]!==A||s[39]!==l||s[40]!==L||s[41]!==B?(V=t.jsx(Hs,{org:a,connection:x,connectionId:r,requestedTabId:l,collections:i,onUpdate:D,isUpdating:p.update.isPending,prompts:A,resources:L,tools:B,isLoadingTools:z}),s[31]=p.update.isPending,s[32]=i,s[33]=x,s[34]=r,s[35]=D,s[36]=z,s[37]=a,s[38]=A,s[39]=l,s[40]=L,s[41]=B,s[42]=V):V=s[42],V}function Ys(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,annotations:s.annotations}}function Zs(s){return{uri:s.uri,name:s.name,description:s.description}}function en(s){return{name:s.name,description:s.description}}function tn(){const s=X.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(mt,{children:t.jsx(Y.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ee,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Js,{})})}),s[0]=e):e=s[0],e}function sr(){const s=X.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(tn,{}),s[0]=e):e=s[0],e}export{sr as default};
@@ -1 +0,0 @@
1
- import{c as be,j as e,r as X,u as Fe,z as Be,b as Ue,a as He,d as ze,ak as Le,l as Me,k as Re,i as Xe,O as g,t as D,o as ke,al as We,s as C,am as Ke}from"./index-p5ek_T2U.js";import{g as Ge}from"./generate-id-Dyweu44Y.js";import{C as qe,a as Qe}from"./collection-table-wrapper-Dwsrv-is.js";import{C as Je,E as z}from"./empty-state-CUSdR_G_.js";import{C as Ye}from"./connection-card-B-vaA7In.js";import{B as L}from"./badge-Ba42zrft.js";import{i as Ze}from"./AlertCircle-CooHa8Dx.js";import{i as et}from"./CheckCircle-DDajcDWB.js";import{E as tt}from"./error-boundary-Di0tQXdv.js";import{I as nt}from"./integration-icon-D3fWRQzh.js";import{P as E}from"./index-r3RmHcg-.js";import{u as st,U as re}from"./use-list-state-CLqJqhda.js";import{u as ot}from"./use-binding-CAtjL1rr.js";import{f as rt,e as it}from"./registry-utils-D8FLO1oI.js";import{f as ie,a as ae,b as ce,c as le,d as de,e as me,A as ue,g as pe}from"./alert-dialog-BobozgbA.js";import{B as at,a as ct,b as lt,c as dt}from"./breadcrumb-DVboj9hZ.js";import{B as S}from"./button-BvpGJmwj.js";import{D as mt,a as ut,b as pt,c as xt,d as ht,e as gt}from"./dialog-Djb2_yQ3.js";import{D as xe,a as he,b as ge,c as F}from"./dropdown-menu-DwhvTSoj.js";import{a as ft,F as f,b as j,c as y,d as v,f as _}from"./form-DIsigMsk.js";import{I as T}from"./input-Cw77piS4.js";import{S as jt,a as yt,b as vt,c as _t,d as $}from"./select-DmOdy-_2.js";import{T as Ct}from"./textarea-1ZAkAqPs.js";import{g as Nt,h as bt}from"./use-connection-BRwTI0xk.js";import{u as fe,a as kt}from"./constants-DTZgxhQr.js";import{b as wt}from"./use-mcp-tools-CnGq7c_h.js";import{n as M}from"./Container-C1CLnDNL.js";import{i as je}from"./DotsVertical-NXfqoXCN.js";import{s as ye}from"./Eye-CmK33jvc.js";import{s as R}from"./Globe02-DcNEoN4R.js";import{i as St}from"./Loading01-BGpLDRYx.js";import{i as Tt}from"./Terminal-B6KzedA2.js";import{s as ve}from"./Trash01-DGjvH5rG.js";import{f as _e}from"./format-time-CMKyl-GC.js";import{r as Dt,E as Pt,e as we}from"./env-vars-editor-CX-fJfxt.js";import"./ArrowUp-DgvOdNkG.js";import"./Check-DGXJXTap.js";import"./Grid01-DkGxNKPL.js";import"./List-DLWOvAOP.js";import"./tooltip-w4nyO9EM.js";import"./index-CDwFwb7Q.js";import"./table-m7xKes0i.js";import"./SearchMd-CguhhQVb.js";import"./card-DUyr2anf.js";import"./AlertTriangle-Ca8IB5bL.js";import"./avatar-DzNBuwvQ.js";import"./useQuery-CoMTdc_B.js";import"./use-view-mode-BC3VVzlU.js";import"./use-mobile-Dl83qL71.js";import"./binder-XSlHh33G.js";import"./ChevronRight-BNn59ko7.js";import"./X-hlRWRdLd.js";import"./label-CUy1x9Fc.js";import"./ChevronDown-Di42C1UO.js";import"./useMutation-BLWSoXAi.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Plus-BB0XqcsP.js";function Ce(s){const o=be.c(3),{status:i}=s;if(i==="active"){let c;return o[0]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsxs(L,{variant:"success",className:"gap-1.5 text-success border-success/40 bg-background",children:[e.jsx(et,{size:12}),"Active"]}),o[0]=c):c=o[0],c}if(i==="error"){let c;return o[1]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsxs(L,{variant:"outline",className:"gap-1.5 text-destructive border-destructive/40 bg-background",children:[e.jsx(Ze,{size:12}),"Error"]}),o[1]=c):c=o[1],c}let d;return o[2]===Symbol.for("react.memo_cache_sentinel")?(d=e.jsx(L,{variant:"outline",className:"text-muted-foreground",children:"Inactive"}),o[2]=d):d=o[2],d}const It=ke({key:C(),value:C()}),Et=ke({title:C().min(1,"Name is required"),description:C().nullable().optional(),ui_type:Ke(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:C().optional(),connection_token:C().nullable().optional(),npx_package:C().optional(),stdio_command:C().optional(),stdio_args:C().optional(),stdio_cwd:C().optional(),env_vars:We(It).optional()}).refine(s=>s.ui_type==="NPX"?!!s.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(s=>s.ui_type==="STDIO"?!!s.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(s=>s.ui_type==="HTTP"||s.ui_type==="SSE"||s.ui_type==="Websocket"?!!s.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function U(s){const o=s.trim();if(!o)return"";try{const i=new URL(o),d=i.pathname.length>1?i.pathname.replace(/\/+$/,""):i.pathname;return`${i.origin}${d}`}catch{return o.replace(/\/+$/,"")}}function $t(s){const o=s.trim().split(/\s+/).filter(Boolean);if(o.length<2)return null;const i=o[0]?.toLowerCase();if(i!=="npx"&&i!=="bunx")return null;const c=o.slice(1).find(N=>!N.startsWith("-"));return c?{packageName:c}:null}function B(s){const{uiType:o}=s,i=U(s.connectionUrl??"");if((o==="HTTP"||o==="SSE"||o==="Websocket")&&i===U("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const d=(s.npxPackage??"").trim();return o==="NPX"&&d==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function Ne(s){if(s.registryItems.length===0||s.uiType!=="HTTP"&&s.uiType!=="SSE"&&s.uiType!=="Websocket")return null;const o=U(s.connectionUrl??"");if(!o)return null;const i=s.registryItems.find(N=>(N.server?.remotes??[]).some(O=>U(O.url??"")===o));if(!i)return null;const d=i.title||i.name||i.server?.title||i.server?.name||"",c=i.server?.description||i.description||i.summary||null;return d?{id:"registry",title:d,description:c}:null}function Ot(s,o){const i={command:"npx",args:["-y",s]},d=we(o);return Object.keys(d).length>0&&(i.envVars=d),i}function At(s,o,i,d){const c={command:s};o.trim()&&(c.args=o.trim().split(/\s+/)),i?.trim()&&(c.cwd=i.trim());const N=we(d);return Object.keys(N).length>0&&(c.envVars=N),c}function Vt(s){return s.command==="npx"}function Ft(s){return s.args?.find(o=>!o.startsWith("-"))??""}function Bt(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function Ut(s,o){switch(o.type){case"edit":return{mode:"editing",connection:o.connection};case"delete":return{mode:"deleting",connection:o.connection};case"force-delete":return{mode:"force-deleting",connection:o.connection,agentNames:o.agentNames};case"close":return{mode:"idle"}}}function Ht(){const{org:s}=Fe(),o=Be(),i=Ue(),d=He({strict:!1}),{data:c}=ze.useSession(),{stdioEnabled:N}=Le(),l=st({namespace:s.slug,resource:"connections"}),O=Nt(),A=bt(l),[u,b]=X.useReducer(Ut,{mode:"idle"}),W=ot(A)[0],K=W?.id??"",G=rt(W?.tools),Se=fe({connectionId:K||null,orgId:s.id}),{data:Te}=wt({client:Se,toolName:G,toolArguments:{limit:200},enabled:!!(K&&G),staleTime:3600*1e3,select:t=>t.structuredContent??t}),q=it(Te??[]),Q=d.action==="create",De=()=>{i({to:"/$org/$project/mcps",params:{org:s.slug,project:g},search:{action:"create"}})},J=()=>{i({to:"/$org/$project/mcps",params:{org:s.slug,project:g},search:{}})},r=Me({resolver:Re(Et),defaultValues:{title:"",description:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),p=r.watch("ui_type"),Y=r.watch("connection_url"),Pe=r.watch("npx_package"),P=B({uiType:p,connectionUrl:Y??"",npxPackage:Pe??""})??Ne({uiType:p,connectionUrl:Y??"",registryItems:q}),m=u.mode==="editing"?u.connection:null;X.useEffect(()=>{if(m){const t=Xe(m.connection_headers)?m.connection_headers:null;if(t&&m.connection_type==="STDIO"){const n=Dt(t.envVars);if(Vt(t)){const a=Ft(t);r.reset({title:m.title,description:m.description,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:a,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:n})}else{const a=Bt(t);r.reset({title:m.title,description:m.description,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:a.command,stdio_args:a.args,stdio_cwd:a.cwd,env_vars:n})}}else r.reset({title:m.title,description:m.description,ui_type:m.connection_type,connection_url:m.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})}else r.reset({title:"",description:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})},[m,r]);const Z=fe({connectionId:kt,orgId:s.id}),ee=()=>{o.invalidateQueries({predicate:t=>{const n=t.queryKey;return n[1]===s.id&&n[3]==="collection"&&n[4]==="CONNECTIONS"}})},te=t=>{const n=t.content;return Array.isArray(n)&&n[0]?.type==="text"&&typeof n[0].text=="string"?n[0].text:"Unknown error"},Ie=async()=>{if(u.mode!=="deleting")return;const t=u.connection;b({type:"close"});try{const n=await Z.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:t.id}});if(n.isError){const a=te(n),k=a.replace(/^Error:\s*/,"");try{const x=JSON.parse(k);if(x.code==="CONNECTION_IN_USE"&&x.agentNames){b({type:"force-delete",connection:t,agentNames:x.agentNames.map(w=>`"${w}"`).join(", ")});return}}catch{}D.error(`Failed to delete connection: ${a}`);return}ee(),D.success("Connection deleted successfully")}catch(n){const a=n instanceof Error?n.message:String(n);D.error(`Failed to delete connection: ${a}`)}},Ee=async()=>{if(u.mode!=="force-deleting")return;const t=u.connection.id;b({type:"close"});try{const n=await Z.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:t,force:!0}});if(n.isError){D.error(`Failed to delete connection: ${te(n)}`);return}ee(),D.success("Connection deleted successfully")}catch(n){const a=n instanceof Error?n.message:String(n);D.error(`Failed to delete connection: ${a}`)}},$e=async t=>{let n,a=null,k=null,x=null;if(t.ui_type==="NPX"?(n="STDIO",a="",x=Ot(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(n="STDIO",a="",x=At(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(n=t.ui_type,a=t.connection_url||"",k=t.connection_token||null),m){await O.update.mutateAsync({id:m.id,data:{title:t.title,description:t.description||null,connection_type:n,connection_url:a,...k&&{connection_token:k},...x&&{connection_headers:x}}}),b({type:"close"}),r.reset();return}const w=Ge("conn");await O.create.mutateAsync({id:w,title:t.title,description:t.description||null,connection_type:n,connection_url:a,connection_token:k,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:c?.user?.id||"system",organization_id:s.id,icon:null,app_name:null,app_id:null,connection_headers:x,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),J(),r.reset(),i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:w}})},ne=t=>{t||(Q?J():b({type:"close"}),r.reset())},V=t=>{const n=t.trim();if(!n)return;const a=!!r.formState.dirtyFields.title,k=!!r.formState.dirtyFields.description,x=!!r.formState.dirtyFields.env_vars,w=h=>{if(h&&(!a&&!r.getValues("title").trim()&&h.title&&r.setValue("title",h.title,{shouldDirty:!1}),!k&&!(r.getValues("description")??"").trim()&&h.description&&r.setValue("description",h.description,{shouldDirty:!1}),!x&&h.envVarKeys?.length)){const se=r.getValues("env_vars")??[],Ve=new Set(se.map(I=>I.key)),oe=h.envVarKeys.filter(I=>!Ve.has(I));oe.length>0&&r.setValue("env_vars",[...se,...oe.map(I=>({key:I,value:""}))],{shouldDirty:!0})}},H=$t(n);if(H&&N){r.setValue("ui_type","NPX",{shouldDirty:!0}),r.setValue("npx_package",H.packageName,{shouldDirty:!0}),r.setValue("connection_url","",{shouldDirty:!0}),r.setValue("connection_token",null,{shouldDirty:!0}),w(B({uiType:"NPX",npxPackage:H.packageName}));return}if(n.startsWith("http://")||n.startsWith("https://")){const h=p==="HTTP"||p==="SSE"||p==="Websocket"?p:"HTTP";r.setValue("ui_type",h,{shouldDirty:!0}),r.setValue("connection_url",n,{shouldDirty:!0}),w(B({uiType:h,connectionUrl:n})??Ne({uiType:h,connectionUrl:n,registryItems:q}));return}p==="NPX"&&w(B({uiType:"NPX",npxPackage:n}))},Oe=[{id:"title",header:"Name",render:t=>e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(nt,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:e.jsx(M,{})}),e.jsx("span",{className:"text-sm font-medium text-foreground truncate block",title:t.title,children:t.title})]}),cellClassName:"w-32 min-w-0 shrink-0",sortable:!0},{id:"description",header:"Description",render:t=>e.jsx("span",{className:"text-sm text-muted-foreground truncate block",title:t.description||"",children:t.description||"—"}),cellClassName:"flex-1 min-w-0 max-w-0",wrap:!1,sortable:!0},{id:"connection_type",header:"Type",accessor:t=>e.jsx("span",{className:"text-xs font-medium",children:t.connection_type}),cellClassName:"w-16 shrink-0",sortable:!0},{id:"status",header:"Status",render:t=>e.jsx(Ce,{status:t.status}),cellClassName:"w-28 shrink-0",sortable:!1},{id:"updated_by",header:"Updated by",render:t=>e.jsx(re,{id:t.updated_by??t.created_by,size:"3xs"}),cellClassName:"w-32 shrink-0",sortable:!0},{id:"updated_at",header:"Updated",render:t=>e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:t.updated_at?_e(new Date(t.updated_at)):"—"}),cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},{id:"actions",header:"",render:t=>e.jsxs(xe,{children:[e.jsx(he,{asChild:!0,children:e.jsx(S,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:n=>n.stopPropagation(),children:e.jsx(je,{size:20})})}),e.jsxs(ge,{align:"end",onClick:n=>n.stopPropagation(),children:[e.jsxs(F,{onClick:n=>{n.stopPropagation(),i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}})},children:[e.jsx(ye,{size:16}),"Open"]}),e.jsxs(F,{variant:"destructive",onClick:n=>{n.stopPropagation(),b({type:"delete",connection:t})},children:[e.jsx(ve,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],Ae=e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(S,{variant:"outline",onClick:()=>i({to:"/$org/$project/store",params:{org:s.slug,project:g}}),size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Browse Store"}),e.jsx(S,{onClick:De,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Custom Connection"})]});return e.jsxs(E,{children:[e.jsx(mt,{open:Q||u.mode==="editing",onOpenChange:ne,children:e.jsxs(ut,{className:"sm:max-w-[525px]",children:[e.jsxs(pt,{children:[e.jsx(xt,{children:m?"Edit Connection":"Create Connection"}),e.jsx(ht,{children:m?"Update the connection details below.":"Create a custom connection in your organization. Fill in the details below."})]}),e.jsx(ft,{...r,children:e.jsxs("form",{onSubmit:r.handleSubmit($e),children:[e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsx(f,{control:r.control,name:"ui_type",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Type *"}),e.jsxs(jt,{value:t.value,onValueChange:t.onChange,children:[e.jsx(v,{children:e.jsx(yt,{children:e.jsx(vt,{})})}),e.jsxs(_t,{children:[e.jsx($,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx($,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4"}),"SSE"]})}),e.jsx($,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4"}),"Websocket"]})}),N&&e.jsxs(e.Fragment,{children:[e.jsx($,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(M,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx($,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Tt,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(_,{})]})}),p==="NPX"&&e.jsx(e.Fragment,{children:e.jsx(f,{control:r.control,name:"npx_package",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"NPM Package *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:n=>{const a=n.clipboardData.getData("text");a&&(n.preventDefault(),r.setValue("npx_package",a.trim(),{shouldDirty:!0}),V(a))},onBlur:n=>{V(n.target.value),t.onBlur()}})}),e.jsx(_,{})]})})}),p==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(f,{control:r.control,name:"stdio_command",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Command *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(_,{})]})}),e.jsx(f,{control:r.control,name:"stdio_args",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Arguments"}),e.jsx(v,{children:e.jsx(T,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(_,{})]})})]}),e.jsx(f,{control:r.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Working Directory"}),e.jsx(v,{children:e.jsx(T,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(_,{})]})})]}),(p==="NPX"||p==="STDIO")&&e.jsx(f,{control:r.control,name:"env_vars",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Environment Variables"}),e.jsx(v,{children:e.jsx(Pt,{value:t.value??[],onChange:t.onChange})}),e.jsx(_,{})]})}),p!=="NPX"&&p!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(f,{control:r.control,name:"connection_url",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"URL *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:n=>{const a=n.clipboardData.getData("text");a&&(n.preventDefault(),r.setValue("connection_url",a.trim(),{shouldDirty:!0}),V(a))},onBlur:n=>{V(n.target.value),t.onBlur()}})}),e.jsx(_,{})]})}),e.jsx(f,{control:r.control,name:"connection_token",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:P?.token?.label??"Token (optional)"}),e.jsx(v,{children:e.jsx(T,{type:"password",placeholder:P?.token?.placeholder??"Bearer token or API key",...t,value:t.value??""})}),P?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[P.token.helperText,P.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(_,{})]})})]}),e.jsx(f,{control:r.control,name:"title",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Name *"}),e.jsx(v,{children:e.jsx(T,{placeholder:"My Connection",...t})}),e.jsx(_,{})]})}),e.jsx(f,{control:r.control,name:"description",render:({field:t})=>e.jsxs(j,{children:[e.jsx(y,{children:"Description"}),e.jsx(v,{children:e.jsx(Ct,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(_,{})]})})]}),e.jsxs(gt,{children:[e.jsx(S,{type:"button",variant:"outline",onClick:()=>ne(!1),children:"Cancel"}),e.jsx(S,{type:"submit",disabled:r.formState.isSubmitting,className:"min-w-40",children:r.formState.isSubmitting?"Saving...":m?"Update Connection":"Create Connection"})]})]})})]})}),e.jsx(ie,{open:u.mode==="deleting",onOpenChange:t=>!t&&b({type:"close"}),children:e.jsxs(ae,{children:[e.jsxs(ce,{children:[e.jsx(le,{children:"Delete Connection?"}),e.jsxs(de,{children:["This action cannot be undone. This will permanently delete"," ",e.jsx("span",{className:"font-medium text-foreground",children:u.mode==="deleting"&&u.connection.title}),"."]})]}),e.jsxs(me,{children:[e.jsx(ue,{children:"Cancel"}),e.jsx(pe,{onClick:Ie,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})}),e.jsx(ie,{open:u.mode==="force-deleting",onOpenChange:t=>!t&&b({type:"close"}),children:e.jsxs(ae,{children:[e.jsxs(ce,{children:[e.jsx(le,{children:"Connection Used by Agents"}),e.jsx(de,{asChild:!0,children:e.jsxs("div",{children:[e.jsxs("p",{children:["The connection"," ",e.jsx("span",{className:"font-medium text-foreground",children:u.mode==="force-deleting"&&u.connection.title})," ","is currently used by the following agent(s):"," ",e.jsx("span",{className:"font-medium text-foreground",children:u.mode==="force-deleting"&&u.agentNames}),"."]}),e.jsx("p",{className:"mt-2",children:"Deleting this connection will remove it from those agents, which may impact existing workflows that depend on them."})]})})]}),e.jsxs(me,{children:[e.jsx(ue,{children:"Cancel"}),e.jsx(pe,{onClick:Ee,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Anyway"})]})]})}),e.jsxs(E.Header,{children:[e.jsx(E.Header.Left,{children:e.jsx(at,{children:e.jsx(ct,{children:e.jsx(lt,{children:e.jsx(dt,{children:"Connections"})})})})}),e.jsxs(E.Header.Right,{children:[e.jsx(qe,{viewMode:l.viewMode,onViewModeChange:l.setViewMode,sortKey:l.sortKey,sortDirection:l.sortDirection,onSort:l.handleSort,sortOptions:[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"connection_type",label:"Type"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}]}),Ae]})]}),e.jsx(Je,{value:l.search,onChange:l.setSearch,placeholder:"Search for a Connection...",onKeyDown:t=>{t.key==="Escape"&&(l.setSearch(""),t.target.blur())}}),e.jsx(E.Content,{children:l.viewMode==="cards"?e.jsx("div",{className:"flex-1 overflow-auto p-5",children:A.length===0?e.jsx(z,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:(l.search,"No Connections found"),description:l.search?`No Connections match "${l.search}"`:"Create a connection to get started.",actions:!l.search&&e.jsx(S,{variant:"outline",onClick:()=>i({to:"/$org/$project/store",params:{org:s.slug,project:g}}),children:"Browse Store"})}):e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:A.map(t=>e.jsx(Ye,{connection:t,fallbackIcon:e.jsx(M,{}),onClick:()=>i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}}),headerActions:e.jsxs(xe,{children:[e.jsx(he,{asChild:!0,children:e.jsx(S,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:n=>n.stopPropagation(),children:e.jsx(je,{size:20})})}),e.jsxs(ge,{align:"end",onClick:n=>n.stopPropagation(),children:[e.jsxs(F,{onClick:n=>{n.stopPropagation(),i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}})},children:[e.jsx(ye,{size:16}),"Open"]}),e.jsxs(F,{variant:"destructive",onClick:n=>{n.stopPropagation(),b({type:"delete",connection:t})},children:[e.jsx(ve,{size:16}),"Delete"]})]})]}),body:e.jsx(Ce,{status:t.status}),footer:e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground w-full min-w-0",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(re,{id:t.updated_by??t.created_by,size:"3xs"})}),e.jsx("span",{className:"shrink-0 ml-2",children:t.updated_at?_e(new Date(t.updated_at)):"—"})]})},t.id))})}):e.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:e.jsx("div",{className:"flex-1 overflow-auto min-w-0",children:e.jsx("div",{className:"min-w-[1000px]",children:e.jsx(Qe,{columns:Oe,data:A,isLoading:!1,sortKey:l.sortKey,sortDirection:l.sortDirection,onSort:l.handleSort,onRowClick:t=>i({to:"/$org/$project/mcps/$connectionId",params:{org:s.slug,project:g,connectionId:t.id}}),emptyState:l.search?e.jsx(z,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:400,height:178,"aria-hidden":"true"}),title:"No Connections found",description:`No Connections match "${l.search}"`}):e.jsx(z,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:400,height:178,"aria-hidden":"true"}),title:"No Connections found",description:"Create a connection to get started.",actions:e.jsx(S,{variant:"outline",onClick:()=>i({to:"/$org/$project/store",params:{org:s.slug,project:g}}),children:"Browse Store"})})})})})})})]})}function Xn(){const s=be.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(tt,{children:e.jsx(X.Suspense,{fallback:e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(St,{size:32,className:"animate-spin text-muted-foreground"})}),children:e.jsx(Ht,{})})}),s[0]=o):o=s[0],o}export{Xn as default};
@@ -1 +0,0 @@
1
- import{E as t,G as a}from"./index-p5ek_T2U.js";const e=t(a,{target:"draft-7"});export{e as B};
@@ -1 +0,0 @@
1
- import{c as n,j as i,J as u,M as m,T as x,Q as j,U as N,W as b,X as g,Y as D}from"./index-p5ek_T2U.js";import{i as h}from"./X-hlRWRdLd.js";import{c}from"./button-BvpGJmwj.js";function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-background/60 backdrop-blur-[0.5px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(g,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function R(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function P(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{k as D,R as a,B as b,O as c,P as d,E as e,w as f,T as g};
@@ -1 +0,0 @@
1
- import{c as A,u as W,e as D,d as X,K as Z,j as n,r as $,m as J,aE as ee,aF as te}from"./index-p5ek_T2U.js";import{i as v}from"./Loading01-BGpLDRYx.js";import{c as ne}from"./binder-XSlHh33G.js";import{P as O}from"./topbar-portal-DFijBXBE.js";import{u as se}from"./useQuery-CoMTdc_B.js";import{h as ie}from"./use-connection-BRwTI0xk.js";import{a as oe,u as le,j as re}from"./constants-DTZgxhQr.js";import{t as ce}from"./Settings01-jz5w4e3w.js";import{B as ae}from"./button-BvpGJmwj.js";import{P as E}from"./index-r3RmHcg-.js";import"./useMutation-BLWSoXAi.js";function de(t,e){return t?t.filter(m=>ne(m,e)):[]}function R(t){return{id:t.id,title:t.title,icon:t.icon,description:t.description,app_name:t.app_name,app_id:t.app_id,tools:t.tools,metadata:t.metadata}}function me(t){const e=A.c(35),{binding:m,renderHeader:f,renderEmptyState:s}=t,{org:o,project:l}=W();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const{org:r,project:g,pluginId:u}=D(a),Q=ie(),{data:y}=X.useSession();let _;e[1]!==o.id?(_={connectionId:oe,orgId:o.id},e[1]=o.id,e[2]=_):_=e[2];const H=le(_);let x;e[3]!==u||e[4]!==l.id?(x=Z.projectPluginConfig(l.id??"",u),e[3]=u,e[4]=l.id,e[5]=x):x=e[5];let p;e[6]!==u||e[7]!==l.id||e[8]!==H?(p=async()=>{const i=await H.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:u}});return i.structuredContent??i},e[6]=u,e[7]=l.id,e[8]=H,e[9]=p):p=e[9];const T=!!l.id&&!!u;let b;e[10]!==x||e[11]!==p||e[12]!==T?(b={queryKey:x,queryFn:p,enabled:T},e[10]=x,e[11]=p,e[12]=T,e[13]=b):b=e[13];const{data:U,isLoading:Y}=se(b),q=de(Q,m),K=U?.config?.connectionId,j=K?q.find(i=>i.id===K):null,P=re({connectionId:j?.id,orgId:o.id}),w=y?.user?{user:{id:y.user.id,name:y.user.name,email:y.user.email,image:y.user.image}}:null,z={id:o.id,slug:o.slug,name:o.name};if(Y){let i;return e[14]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[14]=i):i=e[14],i}if(q.length===0){const i={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[15]!==s?(c=s(),e[15]=s,e[16]=c):c=e[16];let d;return e[17]!==c?(d=n.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:c}),e[17]=c,e[18]=d):d=e[18],n.jsx(O,{value:i,children:d})}if(!j){const i={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[19]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[n.jsx(ce,{size:48,className:"text-muted-foreground mb-2"}),n.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[19]=c):c=e[19];const d=r??o.slug,M=g??l.slug??"";let L;return e[20]!==d||e[21]!==M?(L=n.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[c,n.jsx(ae,{asChild:!0,children:n.jsx(ee,{to:"/$org/$project/settings",params:{org:d,project:M},children:"Go to Project Settings"})})]}),e[20]=d,e[21]=M,e[22]=L):L=e[22],n.jsx(O,{value:i,children:L})}let S;e[23]!==P?(S=(i,c)=>P?P.callTool({name:i,arguments:c}).then(fe):Promise.reject(new Error("MCP client is not available")),e[23]=P,e[24]=S):S=e[24];const V={connectionId:j.id,connection:R(j),toolCaller:S,org:z,session:w},B=E,G=E,k=E,F=f({connections:[R(j)],selectedConnectionId:j.id,onConnectionChange:ue});let h;e[25]!==F||e[26]!==k.Header.Left?(h=n.jsx(k.Header.Left,{children:F}),e[25]=F,e[26]=k.Header.Left,e[27]=h):h=e[27];let C;e[28]!==h||e[29]!==G.Header?(C=n.jsx(G.Header,{children:h}),e[28]=h,e[29]=G.Header,e[30]=C):C=e[30];let N;e[31]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(E.Content,{children:n.jsx($.Suspense,{fallback:n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),children:n.jsx(J,{})})}),e[31]=N):N=e[31];let I;return e[32]!==B||e[33]!==C?(I=n.jsxs(B,{children:[C,N]}),e[32]=B,e[33]=C,e[34]=I):I=e[34],n.jsx(O,{value:V,children:I})}function ue(){}function fe(t){return t.structuredContent??t}function Ne(){const t=A.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:m}=D(e);let f;t[1]!==m?(f=te.find(r=>r.id===m),t[1]=m,t[2]=f):f=t[2];const s=f;if(s?.renderHeader&&s?.renderEmptyState&&s?.binding){let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[3]=r):r=t[3];let g;return t[4]!==s.binding||t[5]!==s.renderEmptyState||t[6]!==s.renderHeader?(g=n.jsx($.Suspense,{fallback:r,children:n.jsx(me,{binding:s.binding,renderHeader:s.renderHeader,renderEmptyState:s.renderEmptyState})}),t[4]=s.binding,t[5]=s.renderEmptyState,t[6]=s.renderHeader,t[7]=g):g=t[7],g}const o=s?.LayoutComponent;if(!o){let r;return t[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(J,{}),t[8]=r):r=t[8],r}let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[9]=l):l=t[9];let a;return t[10]!==o?(a=n.jsx($.Suspense,{fallback:l,children:n.jsx(o,{})}),t[10]=o,t[11]=a):a=t[11],a}export{Ne as default};
@@ -1 +0,0 @@
1
- import{c as p,j as t}from"./index-p5ek_T2U.js";import{B as j,c as b}from"./button-BvpGJmwj.js";function v(u){const e=p.c(18),{icon:a,title:m,description:x,buttonProps:n,buttonComponent:f}=u;let s;e[0]!==a?(s=t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("div",{className:"p-6 rounded-full border border-muted",children:t.jsx("div",{className:"p-4 rounded-full border border-border",children:t.jsx("div",{className:"p-3.5 rounded-full border border-border",children:t.jsx("div",{className:"p-3 rounded-full border border-border",children:t.jsx("div",{className:"w-20 h-20 rounded-full bg-muted flex items-center justify-center p-4",children:a})})})})})}),e[0]=a,e[1]=s):s=e[1];let l;e[2]!==m?(l=t.jsx("h3",{className:"text-2xl font-semibold text-foreground text-center",children:m}),e[2]=m,e[3]=l):l=e[3];let r;e[4]!==x?(r=t.jsx("div",{className:"text-sm text-muted-foreground text-center flex flex-col gap-1",children:x}),e[4]=x,e[5]=r):r=e[5];let d;e[6]!==l||e[7]!==r?(d=t.jsxs("div",{className:"flex flex-col items-center gap-2 max-w-md",children:[l,r]}),e[6]=l,e[7]=r,e[8]=d):d=e[8];let i;e[9]!==f||e[10]!==n?(i=f??(n&&t.jsx(j,{variant:"outline",size:"default",className:b("gap-2",n?.className),...n})),e[9]=f,e[10]=n,e[11]=i):i=e[11];let c;e[12]!==i?(c=t.jsx("div",{className:"mt-6",children:i}),e[12]=i,e[13]=c):c=e[13];let o;return e[14]!==s||e[15]!==d||e[16]!==c?(o=t.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[s,d,c]}),e[14]=s,e[15]=d,e[16]=c,e[17]=o):o=e[17],o}export{v as E};