decocms 4.73.0 → 4.74.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/dist/client/assets/{AlertCircle-DUm4G2Ta.js → AlertCircle-B3RwS95T.js} +1 -1
  2. package/dist/client/assets/{AreaChart-To_28uvZ.js → AreaChart-CeUtnjqK.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-BdzyW8MP.js → ArrowUp-fvpasfHA.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-BBxL_SHu.js → ArrowUpRight-lOkPFYjO.js} +1 -1
  5. package/dist/client/assets/{Check-Cmqw6Sl1.js → Check-DnAYNBd3.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-CaRVoG7J.js → CheckCircle-BO6J-n65.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-BBJF7Gd7.js → ChevronDown-BgCxL-GP.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-DpcCbUD4.js → ChevronRight-VMTeeUVU.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-CWbLUTJ1.js → ChevronUp-0bLcRcR5.js} +1 -1
  10. package/dist/client/assets/{Circle-DDT9SH1v.js → Circle-D-C3wY9l.js} +1 -1
  11. package/dist/client/assets/Copy01-F3kuhze8.js +1 -0
  12. package/dist/client/assets/{DotsVertical-Bo1yMQgi.js → DotsVertical-BohDldDQ.js} +1 -1
  13. package/dist/client/assets/Eye-D8v_PWEV.js +1 -0
  14. package/dist/client/assets/{FilterLines-Bk0q76wv.js → FilterLines-BuiPEsWW.js} +1 -1
  15. package/dist/client/assets/{Flag01-DcQVqR36.js → Flag01-jPQyjtpN.js} +1 -1
  16. package/dist/client/assets/{Globe01-Cdx_m0Bt.js → Globe01-DZFE3D--.js} +1 -1
  17. package/dist/client/assets/{Globe04-PExuJSe1.js → Globe04-BOTx2neN.js} +1 -1
  18. package/dist/client/assets/{HardDrive-V2DxUiyj.js → HardDrive-BH4rqzvp.js} +1 -1
  19. package/dist/client/assets/{Key01-BVqY8Ikr.js → Key01-DluaP-2u.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-D09qOLeU.js → LayoutLeft-DFCjfsjl.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-CJQH4V3A.js → LinkExternal01-5pu1heWR.js} +1 -1
  22. package/dist/client/assets/{List-Jbj9anH7.js → List-YUkUhWKr.js} +1 -1
  23. package/dist/client/assets/{Monitor01-y7DjWM-8.js → Monitor01-C5qdTklD.js} +1 -1
  24. package/dist/client/assets/{Package-Bq8-Pz9F.js → Package-Ervi9t7o.js} +1 -1
  25. package/dist/client/assets/{Palette-CY7o2v4x.js → Palette-BbqL282s.js} +1 -1
  26. package/dist/client/assets/{Play-BXjeqQYf.js → Play-BWPLfuT-.js} +1 -1
  27. package/dist/client/assets/{Plus-BvqCxQWT.js → Plus-C7hC8SpT.js} +1 -1
  28. package/dist/client/assets/{SearchLg-CI8WyjSW.js → SearchLg-BP2X4cc1.js} +1 -1
  29. package/dist/client/assets/{SearchMd-B9Pphw6_.js → SearchMd-D5a6J7pQ.js} +1 -1
  30. package/dist/client/assets/{Settings02-BMZwd-rX.js → Settings02-ChVDCff4.js} +1 -1
  31. package/dist/client/assets/{Shield01-DBuRGV43.js → Shield01-BghKHNHp.js} +1 -1
  32. package/dist/client/assets/{Star01-DHK6A0AH.js → Star01-ddfHzcdx.js} +1 -1
  33. package/dist/client/assets/{Stars01-BrGFjvO7.js → Stars01-BLbNFsON.js} +1 -1
  34. package/dist/client/assets/{Stars02-CMCqTIWA.js → Stars02-CFIxqlDB.js} +1 -1
  35. package/dist/client/assets/{Sun-BGTkSsSi.js → Sun-DGTohf0D.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-DiTwvr8W.js → SwitchHorizontal01-CycHoz62.js} +1 -1
  37. package/dist/client/assets/{Tool01-D-X02mJF.js → Tool01-DI4NGpKu.js} +1 -1
  38. package/dist/client/assets/{Tool02-BlbTnl2V.js → Tool02-coCWDTld.js} +1 -1
  39. package/dist/client/assets/{Trash01-B_OOuHxX.js → Trash01-C4PYQ260.js} +1 -1
  40. package/dist/client/assets/TrendUp01-CqjivQOz.js +1 -0
  41. package/dist/client/assets/{Upload01-JrjTbAm6.js → Upload01-DKbAOjLO.js} +1 -1
  42. package/dist/client/assets/{User01-BE2iU5Da.js → User01-DZo9wC0M.js} +1 -1
  43. package/dist/client/assets/{UserPlus01-Dx6ZYTlZ.js → UserPlus01-Cc66FCwu.js} +1 -1
  44. package/dist/client/assets/{Users01-BtmWOMAT.js → Users01-Awzuq6-o.js} +1 -1
  45. package/dist/client/assets/{Users03-CjAO_nlR.js → Users03-DdGJsYr_.js} +1 -1
  46. package/dist/client/assets/{X-DRBKd8kQ.js → X-CKhm6NKz.js} +1 -1
  47. package/dist/client/assets/{XCircle-BvwKzrrG.js → XCircle-QpO-0-H8.js} +1 -1
  48. package/dist/client/assets/{XClose-DXFnYpcq.js → XClose-xVSFxsEZ.js} +1 -1
  49. package/dist/client/assets/{Zap-CR0zPUwW.js → Zap-4VyviJPw.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-Dr7bY5ye.js → ZapSquare-t9N7iryv.js} +1 -1
  51. package/dist/client/assets/{ZoomOut-DwdfMia5.js → ZoomOut-JsgQ5G9W.js} +1 -1
  52. package/dist/client/assets/{access-gate-BCofPcI1.js → access-gate-cPizOefl.js} +1 -1
  53. package/dist/client/assets/{add-section-modal-CMRUtaXD.js → add-section-modal-CFgn9Y7r.js} +1 -1
  54. package/dist/client/assets/agent-icon-CwWOzJGq.js +1 -0
  55. package/dist/client/assets/agents-list-kxpuQE39.js +1 -0
  56. package/dist/client/assets/ai-providers-XFUWELZV.js +1 -0
  57. package/dist/client/assets/{alert-BSu8gNrn.js → alert-DJuOa3mj.js} +1 -1
  58. package/dist/client/assets/{alert-dialog-DTE4AoIR.js → alert-dialog-B4LFyBX_.js} +1 -1
  59. package/dist/client/assets/app-editor-DEvFnBRt.js +1 -0
  60. package/dist/client/assets/{auth-mga72Myo.js → auth-OrVa6ikj.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-DOFEQziV.js → auth-catchall-CIcoYipu.js} +1 -1
  62. package/dist/client/assets/{auth-entry-Rbkf51Xu.js → auth-entry-4MrJ8eDu.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-DeI5DAKL.js → auth-split-layout-DBUDyD-O.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-BPOwOntx.js → authenticate-and-persist-oauth-D2VFqXEQ.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-BxBeG7Gn.js → automation-list-row-C25_S4HS.js} +1 -1
  66. package/dist/client/assets/{automation-runs-D4CtRz19.js → automation-runs-CaESP8tN.js} +10 -10
  67. package/dist/client/assets/automations-OF46wI0h.js +1 -0
  68. package/dist/client/assets/{autosend-DFZ8OnVq.js → autosend-DzU9i0KJ.js} +1 -1
  69. package/dist/client/assets/{avatar-Cj6O7eGR.js → avatar-Cec866OF.js} +1 -1
  70. package/dist/client/assets/{badge-CZrdrM01.js → badge-4R5aFJi_.js} +1 -1
  71. package/dist/client/assets/{block-document-B0JFSD7-.js → block-document-B8t3sZlE.js} +1 -1
  72. package/dist/client/assets/{brand-context-CIhM39WR.js → brand-context-DvFCkd-p.js} +1 -1
  73. package/dist/client/assets/{buckets-CtHjxFJ9.js → buckets-DmibZq05.js} +1 -1
  74. package/dist/client/assets/bulk-category-panel-BDcF7vlj.js +1 -0
  75. package/dist/client/assets/{calendar-B4WhdghP.js → calendar-DMX1rETI.js} +1 -1
  76. package/dist/client/assets/{capability-load-error-DmkDPEdx.js → capability-load-error-BTCn9yWP.js} +1 -1
  77. package/dist/client/assets/{card-wofgsu5q.js → card-CXGnwYmQ.js} +1 -1
  78. package/dist/client/assets/category-editor-CC0AXFMB.js +1 -0
  79. package/dist/client/assets/{chat-context-oGIzvqdB.js → chat-context-CLJP_v1n.js} +5 -5
  80. package/dist/client/assets/{checkbox-BGhVoJWj.js → checkbox-BJqnUKkh.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-eoLmqUDS.js → cli-auth-success-ni-iUWUs.js} +1 -1
  82. package/dist/client/assets/collection-detail-B6tk8yPJ.js +1 -0
  83. package/dist/client/assets/{collection-display-button-D9tR0hkB.js → collection-display-button-v20W0fBS.js} +1 -1
  84. package/dist/client/assets/{collection-search-CGqvS7W4.js → collection-search-NNFhPzm0.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-0Xgp8y5r.js → collection-table-wrapper-BTO_amNe.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-De8l1T9I.js → collection-tabs-D6q0qziZ.js} +1 -1
  87. package/dist/client/assets/{command-LBXWnWuJ.js → command-CmCCBhtZ.js} +1 -1
  88. package/dist/client/assets/commerce-onboarding-pGDflmnE.js +1 -0
  89. package/dist/client/assets/companions-core-DUUDzHYn.js +1 -0
  90. package/dist/client/assets/connect-desktop-dialog-UANGxF3S.js +1 -0
  91. package/dist/client/assets/{connection-card-DBsockE1.js → connection-card-BlU_PWjm.js} +1 -1
  92. package/dist/client/assets/connection-detail-ZgrXf_7F.js +1 -0
  93. package/dist/client/assets/{connection-form-helpers-Cc3xYBKB.js → connection-form-helpers-Cg-EgGYa.js} +1 -1
  94. package/dist/client/assets/connections-GOfGz6xP.js +1 -0
  95. package/dist/client/assets/{decopilot-sse-pool-DYp05ehL.js → decopilot-sse-pool-C0F8pzjg.js} +1 -1
  96. package/dist/client/assets/{dialog-N2mQdoSV.js → dialog-DMEkJRi9.js} +1 -1
  97. package/dist/client/assets/{domain-settings-qZcHmkUd.js → domain-settings-DTGCUflD.js} +1 -1
  98. package/dist/client/assets/{drawer-DVfN4fV_.js → drawer-BwJpfW3_.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-36LID3uN.js → dropdown-menu-CAUKG4H2.js} +1 -1
  100. package/dist/client/assets/{empty-state-DrOIAXxd.js → empty-state-Bc7sfFRm.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-C1Iz--Qu.js → extract-connection-data-ChE74QTj.js} +1 -1
  102. package/dist/client/assets/file-explorer-A9fG8rb3.js +2 -0
  103. package/dist/client/assets/{file-type-icon-DAly4Os4.js → file-type-icon-D_DXgZoy.js} +1 -1
  104. package/dist/client/assets/{files-BhhHH-Hw.js → files-CBtYK6N5.js} +1 -1
  105. package/dist/client/assets/{form-BSsGiMr6.js → form-p22RM8Be.js} +1 -1
  106. package/dist/client/assets/{general-CATXSlTF.js → general-CwMfsv83.js} +1 -1
  107. package/dist/client/assets/github-repo-picker-DIeS0Get.js +1 -0
  108. package/dist/client/assets/{hooks-C56PmBxD.js → hooks-C58kVYwN.js} +1 -1
  109. package/dist/client/assets/{index-CvE6NA3K.js → index-91WZDmJV.js} +3 -3
  110. package/dist/client/assets/{index-BvV7IYEt.js → index-B59IemhG.js} +1 -1
  111. package/dist/client/assets/index-B7Kp0gmf.css +1 -0
  112. package/dist/client/assets/index-B8GIVfgq.js +1 -0
  113. package/dist/client/assets/{index-CukGgUNa.js → index-B8RR74IB.js} +1 -1
  114. package/dist/client/assets/{index-BExWvPx3.js → index-BDvU0Sut.js} +1 -1
  115. package/dist/client/assets/{index-CMq5BhdV.js → index-BNoDubXR.js} +4 -4
  116. package/dist/client/assets/{index-BrfuswEE.js → index-Bs12pnrh.js} +1 -1
  117. package/dist/client/assets/{index-DZZ15uvC.js → index-CSQQ478F.js} +1 -1
  118. package/dist/client/assets/{index-CRyX1rZk.js → index-CjGCqXBq.js} +15 -15
  119. package/dist/client/assets/{index-CUGAO2RP.js → index-Cz9EHfBS.js} +1 -1
  120. package/dist/client/assets/{index-Dyab7QoZ.js → index-D9FCAcgH.js} +1 -1
  121. package/dist/client/assets/{index-R9vPHNTs.js → index-DNwAUOhu.js} +1 -1
  122. package/dist/client/assets/{index-CmkEa9jH.js → index-DQYrA6vC.js} +2 -2
  123. package/dist/client/assets/index-Ya0Ldwmp.js +2 -0
  124. package/dist/client/assets/{index-redirect-BVZ2dZzp.js → index-redirect-C--V_COi.js} +1 -1
  125. package/dist/client/assets/{input-DDORXh5t.js → input-mRvXuLxu.js} +1 -1
  126. package/dist/client/assets/{integration-icon-BabLlpyY.js → integration-icon-DrXERMrU.js} +1 -1
  127. package/dist/client/assets/{invite-member-dialog-36L0ORt1.js → invite-member-dialog-D2HJG_oE.js} +1 -1
  128. package/dist/client/assets/{label-l63Zf6FC.js → label-C69kawVV.js} +1 -1
  129. package/dist/client/assets/{layout-Bws4P8oB.js → layout-DtyzLLWN.js} +1 -1
  130. package/dist/client/assets/{login-CrPH7SzE.js → login-6qMlZICA.js} +1 -1
  131. package/dist/client/assets/{mcp-oauth-CmIamg5I.js → mcp-oauth-J4q4tPPI.js} +1 -1
  132. package/dist/client/assets/{members-C_fVnb7L.js → members-BiCdMm4e.js} +1 -1
  133. package/dist/client/assets/{monaco-editor-DEasbMz7.js → monaco-editor-DvmPTc-w.js} +1 -1
  134. package/dist/client/assets/{monitoring-stats-row-DPeCDYXM.js → monitoring-stats-row-BM1a8dD0.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-Cu1g2eYT.js → oauth-callback-ai-provider-D2Rdfqdi.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-C1ZqREQd.js → oauth-callback-fTDh5Cxt.js} +1 -1
  137. package/dist/client/assets/{onboarding-BMBwsvvA.js → onboarding-DUost6kv.js} +1 -1
  138. package/dist/client/assets/{org-install-BM-QIMNd.js → org-install-SFLbi_i3.js} +1 -1
  139. package/dist/client/assets/{org-layout-jEuNZREy.js → org-layout-BhJPcKMY.js} +1 -1
  140. package/dist/client/assets/{organization-choice-DFdteEHL.js → organization-choice-Bf6nDAdY.js} +1 -1
  141. package/dist/client/assets/{orgs-aVghABPc.js → orgs-CvOBimi_.js} +1 -1
  142. package/dist/client/assets/{page-seo-form-CdxrXmcP.js → page-seo-form-B7qItQ6M.js} +1 -1
  143. package/dist/client/assets/page-seo-sheet-6tJRMOkY.js +1 -0
  144. package/dist/client/assets/{popover-DbZaoM7Y.js → popover-B4Nkm4A4.js} +1 -1
  145. package/dist/client/assets/post-editor-Bkl5QmSW.js +1 -0
  146. package/dist/client/assets/{primitives-C95MEBhN.js → primitives-BOif4rDS.js} +1 -1
  147. package/dist/client/assets/{profile-CSDZdfn-.js → profile-cOyk1oLp.js} +1 -1
  148. package/dist/client/assets/project-app-view-Be3eSqUW.js +1 -0
  149. package/dist/client/assets/provision-repo-scoped-github-connection-CB4ICKHq.js +1 -0
  150. package/dist/client/assets/record-editor-B3wpfDL-.js +1 -0
  151. package/dist/client/assets/redirect-editor-zgpqQuCR.js +1 -0
  152. package/dist/client/assets/registry-Ck_pt68h.js +2 -0
  153. package/dist/client/assets/{registry-layout-DbLtbQP0.js → registry-layout-fMI6o8Tr.js} +2 -2
  154. package/dist/client/assets/reports-B3WWbU9M.js +43 -0
  155. package/dist/client/assets/reports-BWI6IDQq.css +1 -0
  156. package/dist/client/assets/{require-capability-YOu-a1Nf.js → require-capability-MEpF0SIv.js} +1 -1
  157. package/dist/client/assets/{required-auth-layout-zCMsJxhL.js → required-auth-layout-BvERL28m.js} +1 -1
  158. package/dist/client/assets/{reset-password-BAUaQc4A.js → reset-password-CwTdPKkp.js} +1 -1
  159. package/dist/client/assets/roles-BnapyCgN.js +1 -0
  160. package/dist/client/assets/{search-input-DkNJyppH.js → search-input-C98WMRK2.js} +1 -1
  161. package/dist/client/assets/{secrets-Dt87lM8f.js → secrets-Bkpz7zLd.js} +1 -1
  162. package/dist/client/assets/{sections-editor-Cq8_krZX.js → sections-editor-p6Vvcqbj.js} +2 -2
  163. package/dist/client/assets/{select-J1shvVzc.js → select-CLwZuGPx.js} +1 -1
  164. package/dist/client/assets/{select-model-DzCAuTc_.js → select-model-bEf855Lo.js} +1 -1
  165. package/dist/client/assets/self-tool-result-DY7Ci9dV.js +1 -0
  166. package/dist/client/assets/seo-editor-i7qkiCx-.js +1 -0
  167. package/dist/client/assets/{settings-layout-CNU-uZd1.js → settings-layout-C_Ztey_r.js} +1 -1
  168. package/dist/client/assets/{settings-section-CfrhTSGz.js → settings-section-BOHyHJ9t.js} +1 -1
  169. package/dist/client/assets/{shell-controls-CfZWEU6Y.js → shell-controls-zjtYdcX2.js} +1 -1
  170. package/dist/client/assets/{shell-layout-NH-BOyu1.js → shell-layout-A4tNVer9.js} +1 -1
  171. package/dist/client/assets/{sidebar-DEYkBI03.js → sidebar-Bb1gffab.js} +1 -1
  172. package/dist/client/assets/{skeleton-DJxtAPQ_.js → skeleton-CxXLGVcj.js} +1 -1
  173. package/dist/client/assets/{sso-CXSiCeFX.js → sso-BYpIZ_oX.js} +1 -1
  174. package/dist/client/assets/{store-D21OvS3h.js → store-CL1d3ygz.js} +1 -1
  175. package/dist/client/assets/store-registry-Cs5_5OZk.js +2 -0
  176. package/dist/client/assets/{studio-tools-BZkjLjgu.js → studio-tools-kw84m6MC.js} +1 -1
  177. package/dist/client/assets/{switch-BoQxI0fh.js → switch-B8druCri.js} +1 -1
  178. package/dist/client/assets/{table-BO5xCsWv.js → table-DXOnm_q_.js} +1 -1
  179. package/dist/client/assets/{tabs-zVrZaEG_.js → tabs-BJEVg99x.js} +1 -1
  180. package/dist/client/assets/{textarea-DLOpUOKH.js → textarea-DecRBQ8o.js} +1 -1
  181. package/dist/client/assets/{toggle-group-oD1wdNnd.js → toggle-group-LqhxYG0N.js} +1 -1
  182. package/dist/client/assets/{toolbar-CHqJ-l6l.js → toolbar-Dw6VpcpV.js} +1 -1
  183. package/dist/client/assets/{toolbar-icon-button-CnbUfQ6-.js → toolbar-icon-button-DjIrRdwA.js} +1 -1
  184. package/dist/client/assets/{tools-list-Bt_uV9t_.js → tools-list-8_sl41Dl.js} +1 -1
  185. package/dist/client/assets/{tooltip-08a1C_gE.js → tooltip-BaQcLOeF.js} +1 -1
  186. package/dist/client/assets/{use-ai-providers-rWA-gXGT.js → use-ai-providers-B8pZgQIi.js} +1 -1
  187. package/dist/client/assets/{use-automations-CH0qxK80.js → use-automations-7p82MLKi.js} +1 -1
  188. package/dist/client/assets/{use-autosave-BbImU3pD.js → use-autosave-Dqi3GCKG.js} +1 -1
  189. package/dist/client/assets/{use-capability-CiRLF8b5.js → use-capability-41WP3hyq.js} +1 -1
  190. package/dist/client/assets/{use-clock-tick-BukM8jyc.js → use-clock-tick-CfuRRFJp.js} +1 -1
  191. package/dist/client/assets/{use-collections-CzmC_4Yp.js → use-collections-D_RdoXBk.js} +1 -1
  192. package/dist/client/assets/{use-connection-Dg4qtA0P.js → use-connection-CS4Dlyd5.js} +1 -1
  193. package/dist/client/assets/{use-copy-BQfD7Nvo.js → use-copy-O5WTkYEX.js} +1 -1
  194. package/dist/client/assets/{use-create-virtual-mcp-DFUSPCYo.js → use-create-virtual-mcp-DD6OZVGi.js} +1 -1
  195. package/dist/client/assets/{use-debounced-autosave-CYK7sAxb.js → use-debounced-autosave-To4NTn66.js} +1 -1
  196. package/dist/client/assets/{use-debounced-value-3mOTIM9Q.js → use-debounced-value-CJMTSEUW.js} +1 -1
  197. package/dist/client/assets/{use-deco-credits-CgeG9KvV.js → use-deco-credits-Cd4Q8xLS.js} +1 -1
  198. package/dist/client/assets/{use-decopilot-events-B3n4OWWN.js → use-decopilot-events-B3Un5Pf5.js} +1 -1
  199. package/dist/client/assets/{use-delete-connection-CVTYnQcR.js → use-delete-connection-DjQLzzf-.js} +1 -1
  200. package/dist/client/assets/{use-deployment-admin-CY-Bj12U.js → use-deployment-admin-Cnd71KQ-.js} +1 -1
  201. package/dist/client/assets/{use-file-configs-D3ZIWGba.js → use-file-configs-Bpym33vN.js} +1 -1
  202. package/dist/client/assets/{use-infinite-scroll-CVlo5SDp.js → use-infinite-scroll-OQZq9KdK.js} +1 -1
  203. package/dist/client/assets/{use-join-requests-BbM523d-.js → use-join-requests-Cg0ghRb1.js} +1 -1
  204. package/dist/client/assets/{use-mcp-client-Dp9Co-su.js → use-mcp-client-B3bAGU_A.js} +1 -1
  205. package/dist/client/assets/{use-mcp-tools-sUHG3IR2.js → use-mcp-tools-2no3rZCp.js} +1 -1
  206. package/dist/client/assets/{use-members-Dqk2nuAE.js → use-members-BPnLHHOq.js} +1 -1
  207. package/dist/client/assets/{use-mobile-DOANEp3O.js → use-mobile-Brhk2RWm.js} +1 -1
  208. package/dist/client/assets/{use-navigate-to-agent-BxBGEkUr.js → use-navigate-to-agent-BLWfWNXL.js} +1 -1
  209. package/dist/client/assets/{use-org-auth-client-B2B6T6i4.js → use-org-auth-client-C6WrJ19d.js} +1 -1
  210. package/dist/client/assets/{use-org-sso-DLpH8992.js → use-org-sso-CQw4CXDU.js} +1 -1
  211. package/dist/client/assets/{use-organization-roles-BcxjJ1G6.js → use-organization-roles-RO55RQ8w.js} +1 -1
  212. package/dist/client/assets/{use-organization-settings-0YxWJPkh.js → use-organization-settings-BXuAO17w.js} +1 -1
  213. package/dist/client/assets/{use-registry-connections-FiGV0MsU.js → use-registry-connections-SB8B2_6i.js} +1 -1
  214. package/dist/client/assets/{use-secrets-Ds9NTjth.js → use-secrets-CAOcUpKp.js} +1 -1
  215. package/dist/client/assets/{use-status-sounds-Cwul5kM5.js → use-status-sounds-Drw_Cpys.js} +1 -1
  216. package/dist/client/assets/{use-view-mode-CcC0lYNa.js → use-view-mode-D8jPoSgV.js} +1 -1
  217. package/dist/client/assets/{use-virtual-mcp-BJ21-pKK.js → use-virtual-mcp-BVL_C1tI.js} +1 -1
  218. package/dist/client/assets/useInfiniteQuery-Bp7eBtop.js +1 -0
  219. package/dist/client/assets/{useRouterState-C1EVrPw0.js → useRouterState-pH-L4p87.js} +1 -1
  220. package/dist/client/assets/useSuspenseInfiniteQuery-BW8PkK6i.js +1 -0
  221. package/dist/client/assets/{users-Cjg5CM3l.js → users-BQj6oo3X.js} +1 -1
  222. package/dist/client/assets/variant-calendar-BIDpQtCP.js +1 -0
  223. package/dist/client/assets/{view-mode-toggle-BR_5SDRO.js → view-mode-toggle-D6ccLqaK.js} +1 -1
  224. package/dist/client/index.html +2 -2
  225. package/dist/server/cli.js +1 -1
  226. package/dist/server/server.js +1 -1
  227. package/package.json +1 -1
  228. package/dist/client/assets/Eye-CZj87vlg.js +0 -1
  229. package/dist/client/assets/TrendUp01-BExQrNyF.js +0 -1
  230. package/dist/client/assets/agent-icon-CK_iR-s0.js +0 -1
  231. package/dist/client/assets/agents-list-BMB8q3n7.js +0 -1
  232. package/dist/client/assets/ai-providers-DeNGP1nk.js +0 -1
  233. package/dist/client/assets/app-editor-DbnSNsCZ.js +0 -1
  234. package/dist/client/assets/automations-DfXEDici.js +0 -1
  235. package/dist/client/assets/bulk-category-panel-BSSSYZTu.js +0 -1
  236. package/dist/client/assets/category-editor-Du2J29_C.js +0 -1
  237. package/dist/client/assets/collection-detail-CAG7qtAA.js +0 -1
  238. package/dist/client/assets/commerce-onboarding-CURjnvsF.js +0 -1
  239. package/dist/client/assets/companions-core-B950PdHH.js +0 -1
  240. package/dist/client/assets/connect-desktop-dialog-CVpa-1aH.js +0 -1
  241. package/dist/client/assets/connection-detail-w2mAtB4j.js +0 -1
  242. package/dist/client/assets/connections-54yZvQbG.js +0 -1
  243. package/dist/client/assets/file-explorer-DXyWRS16.js +0 -2
  244. package/dist/client/assets/github-installations-ChFezl8I.js +0 -1
  245. package/dist/client/assets/github-repo-picker-hhppcqwU.js +0 -1
  246. package/dist/client/assets/index-BO2t38sV.css +0 -1
  247. package/dist/client/assets/index-CbsJaFv8.js +0 -1
  248. package/dist/client/assets/index-CgpaWB0t.js +0 -2
  249. package/dist/client/assets/page-seo-sheet-CGQKkzFj.js +0 -1
  250. package/dist/client/assets/post-editor-B2vpnHhS.js +0 -1
  251. package/dist/client/assets/project-app-view-CF6WDRfm.js +0 -1
  252. package/dist/client/assets/record-editor-B86e0THi.js +0 -1
  253. package/dist/client/assets/redirect-editor-yP9z1dnE.js +0 -1
  254. package/dist/client/assets/registry-C2T3wkUy.js +0 -2
  255. package/dist/client/assets/reports-B9fD08K6.js +0 -43
  256. package/dist/client/assets/reports-UJeN0SPp.css +0 -1
  257. package/dist/client/assets/roles-Cj1U4eDE.js +0 -1
  258. package/dist/client/assets/self-tool-result-DRhRJWFm.js +0 -1
  259. package/dist/client/assets/seo-editor-Vwp4GBks.js +0 -1
  260. package/dist/client/assets/store-registry-DrnOWSup.js +0 -2
  261. package/dist/client/assets/useInfiniteQuery-BQVUBF2l.js +0 -1
  262. package/dist/client/assets/useSuspenseInfiniteQuery-atDxo3aA.js +0 -1
  263. package/dist/client/assets/variant-calendar-VDvpmZaR.js +0 -1
@@ -1 +0,0 @@
1
- import{r as E,c as oe,j as t,E as Ye,i as ce,C as be,b as _e,u as Ze,a as Ne,z as et,G as tt,D as nt,M as st,J as ot,B as U,p as te,n as it,l as de,t as W,K as rt}from"./index-CvE6NA3K.js";import{g as lt,a as De,b as at,e as ct}from"./extract-connection-data-C1Iz--Qu.js";import{C as dt}from"./collection-display-button-D9tR0hkB.js";import{S as mt}from"./search-input-DkNJyppH.js";import{C as ut}from"./collection-tabs-De8l1T9I.js";import{u as pt,a as ke,g as ht,C as Ce}from"./connection-card-DBsockE1.js";import{E as gt}from"./empty-state-DrOIAXxd.js";import{I as xt}from"./integration-icon-BabLlpyY.js";import{P as ue}from"./index-DZZ15uvC.js";import{u as ft,D as jt}from"./use-delete-connection-CVTYnQcR.js";import{u as ye}from"./use-capability-CiRLF8b5.js";import{u as yt}from"./use-infinite-scroll-CVlo5SDp.js";import{u as Ct}from"./use-view-mode-CcC0lYNa.js";import{g as he}from"./connection-slug-eyAPH6o3.js";import{c as Ae,d as we,b as Te,A as Ie,e as Pe,g as $e,a as Le,f as Oe}from"./alert-dialog-DTE4AoIR.js";import{C as Fe}from"./checkbox-BGhVoJWj.js";import{e as Me,d as ze,D as Ve,a as Ee,h as Be,c as Ke}from"./dialog-N2mQdoSV.js";import{D as vt,a as St,c as bt,b as _t,d as Nt,e as Dt,f as kt}from"./drawer-DVfN4fV_.js";import{u as At}from"./use-mobile-DOANEp3O.js";import{D as Ue,a as Re,c as He,d as re}from"./dropdown-menu-36LID3uN.js";import{F as Q,b as J,c as Y,d as Z,f as ee,a as ve}from"./form-BSsGiMr6.js";import{I as ie}from"./input-DDORXh5t.js";import{S as wt,a as Tt,b as It,c as Pt,d as ae}from"./select-J1shvVzc.js";import{T as $t}from"./textarea-DLOpUOKH.js";import{b as We,u as Lt}from"./use-connection-Dg4qtA0P.js";import{u as Ot}from"./use-virtual-mcp-BJ21-pKK.js";import{u as Ft}from"./studio-tools-BZkjLjgu.js";import{ak as Mt,an as zt,N as Vt,M as Et}from"./agent-icon-CK_iR-s0.js";import{n as ge}from"./Tool02-BlbTnl2V.js";import{i as Xe}from"./DotsVertical-Bo1yMQgi.js";import{s as qe}from"./Eye-CZj87vlg.js";import{s as je}from"./Star01-DHK6A0AH.js";import{s as Ge}from"./Plus-BvqCxQWT.js";import{s as Qe}from"./Trash01-B_OOuHxX.js";import{s as Je}from"./XClose-DXFnYpcq.js";import{i as pe,a as Se,E as Bt,c as Kt,p as Ut,b as Rt,d as Ht}from"./connection-form-helpers-Cc3xYBKB.js";import{a as Wt}from"./authenticate-and-persist-oauth-BPOwOntx.js";import"./use-mcp-client-Dp9Co-su.js";import"./constants-D_FQAPnt.js";import"./auth-mga72Myo.js";import"./ArrowUp-BdzyW8MP.js";import"./Check-Cmqw6Sl1.js";import"./SwitchHorizontal01-DiTwvr8W.js";import"./List-Jbj9anH7.js";import"./tooltip-08a1C_gE.js";import"./view-mode-toggle-BR_5SDRO.js";import"./badge-CZrdrM01.js";import"./SearchMd-B9Pphw6_.js";import"./use-registry-connections-FiGV0MsU.js";import"./use-organization-settings-0YxWJPkh.js";import"./useInfiniteQuery-BQVUBF2l.js";import"./card-wofgsu5q.js";import"./sidebar-DEYkBI03.js";import"./LayoutLeft-D09qOLeU.js";import"./X-DRBKd8kQ.js";import"./ChevronRight-DpcCbUD4.js";import"./Circle-DDT9SH1v.js";import"./label-l63Zf6FC.js";import"./ChevronDown-BBJF7Gd7.js";import"./ChevronUp-CWbLUTJ1.js";import"./use-collections-CzmC_4Yp.js";import"./AlertCircle-DUm4G2Ta.js";import"./UserPlus01-Dx6ZYTlZ.js";import"./Tool01-D-X02mJF.js";import"./Settings02-BMZwd-rX.js";import"./XCircle-BvwKzrrG.js";import"./ArrowUpRight-BBxL_SHu.js";import"./TrendUp01-BExQrNyF.js";import"./ZapSquare-Dr7bY5ye.js";import"./Users03-CjAO_nlR.js";import"./CheckCircle-CaRVoG7J.js";import"./Stars02-CMCqTIWA.js";import"./ZoomOut-DwdfMia5.js";import"./Globe01-Cdx_m0Bt.js";import"./FilterLines-Bk0q76wv.js";import"./Flag01-DcQVqR36.js";import"./Globe04-PExuJSe1.js";import"./HardDrive-V2DxUiyj.js";import"./Key01-BVqY8Ikr.js";import"./LinkExternal01-CJQH4V3A.js";import"./Monitor01-y7DjWM-8.js";import"./Sun-BGTkSsSi.js";import"./Package-Bq8-Pz9F.js";import"./Palette-CY7o2v4x.js";import"./Play-BXjeqQYf.js";import"./SearchLg-CI8WyjSW.js";import"./Shield01-DBuRGV43.js";import"./Stars01-BrGFjvO7.js";import"./Upload01-JrjTbAm6.js";import"./User01-BE2iU5Da.js";import"./Users01-BtmWOMAT.js";import"./Zap-CR0zPUwW.js";import"./mcp-oauth-CmIamg5I.js";function Xt(f){const e=`deco-filters-${f}`,[n,p]=E.useState(()=>{try{const o=globalThis.localStorage?.getItem(e);if(o)return JSON.parse(o)}catch(o){console.error("Failed to parse stored filters:",o)}return[]});return[n,o=>{p(o);try{globalThis.localStorage?.setItem(e,JSON.stringify(o))}catch(i){console.error("Failed to save filters:",i)}}]}function qt(f){const e=oe.c(7),[n,p]=E.useState(f),[l,o]=E.useState(f?"desc":null);let i;e[0]!==l||e[1]!==n?(i=j=>{n!==j?(p(j),o("asc")):l==="asc"?o("desc"):l==="desc"&&(p(void 0),o(null))},e[0]=l,e[1]=n,e[2]=i):i=e[2];const g=i;let h;return e[3]!==g||e[4]!==l||e[5]!==n?(h={sortKey:n,sortDirection:l,handleSort:g},e[3]=g,e[4]=l,e[5]=n,e[6]=h):h=e[6],h}function Gt(f){const e=oe.c(20),{namespace:n,resource:p,defaultSortKey:l,defaultViewMode:o}=f,i=l===void 0?"title":l,g=o===void 0?"table":o,[h,j]=E.useState(""),y=E.useDeferredValue(h),N=`${n}-${p}`,[b,a]=Xt(N),x=`mesh-${p}-filter-visible-${n}`;let m;e[0]!==x?(m=()=>globalThis.localStorage?.getItem(x)==="true",e[0]=x,e[1]=m):m=e[1];const[v,_]=E.useState(m);let D;e[2]!==x?(D=T=>{_(T),globalThis.localStorage?.setItem(x,String(T))},e[2]=x,e[3]=D):D=e[3];const L=D;let O;e[4]!==v||e[5]!==L?(O=()=>{L(!v)},e[4]=v,e[5]=L,e[6]=O):O=e[6];const s=O,[A,F]=Ct(`mesh-${p}-${n}`,g),{sortKey:M,sortDirection:w,handleSort:P}=qt(i),z=M;let C;return e[7]!==v||e[8]!==b||e[9]!==P||e[10]!==h||e[11]!==y||e[12]!==L||e[13]!==a||e[14]!==F||e[15]!==w||e[16]!==z||e[17]!==s||e[18]!==A?(C={search:h,searchTerm:y,setSearch:j,filters:b,setFilters:a,filterBarVisible:v,setFilterBarVisible:L,toggleFilterBar:s,viewMode:A,setViewMode:F,sortKey:z,sortDirection:w,handleSort:P},e[7]=v,e[8]=b,e[9]=P,e[10]=h,e[11]=y,e[12]=L,e[13]=a,e[14]=F,e[15]=w,e[16]=z,e[17]=s,e[18]=A,e[19]=C):C=e[19],C}function Qt(f){const e=oe.c(51),{group:n,onOpen:p,selectionMode:l,selectedIds:o,onToggleSelect:i}=f;let g;if(e[0]!==n.connections||e[1]!==o){let C;e[3]!==o?(C=T=>o.has(T.id),e[3]=o,e[4]=C):C=e[4],g=n.connections.every(C),e[0]=n.connections,e[1]=o,e[2]=g}else g=e[2];const h=g;let j;if(e[5]!==n.connections||e[6]!==o){let C;e[8]!==o?(C=T=>o.has(T.id),e[8]=o,e[9]=C):C=e[9],j=n.connections.some(C),e[5]=n.connections,e[6]=o,e[7]=j}else j=e[7];const y=j,N=`${n.connections.length} instances`;let b;e[10]!==n.icon||e[11]!==n.title||e[12]!==N?(b={title:n.title,icon:n.icon,description:N},e[10]=n.icon,e[11]=n.title,e[12]=N,e[13]=b):b=e[13];let a;e[14]!==h||e[15]!==n.connections||e[16]!==p||e[17]!==i||e[18]!==o||e[19]!==l?(a=()=>l?(()=>{for(const C of n.connections)h?o.has(C.id)&&i(C.id):o.has(C.id)||i(C.id)})():p(),e[14]=h,e[15]=n.connections,e[16]=p,e[17]=i,e[18]=o,e[19]=l,e[20]=a):a=e[20];const x=l&&h&&"ring-2 ring-primary",m=l&&y&&!h&&"ring-1 ring-primary/50";let v;e[21]!==x||e[22]!==m?(v=de(x,m),e[21]=x,e[22]=m,e[23]=v):v=e[23];let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(ge,{}),e[24]=_):_=e[24];let D;e[25]!==h||e[26]!==n.connections||e[27]!==i||e[28]!==o||e[29]!==l||e[30]!==y?(D=l?t.jsx(Fe,{checked:h?!0:y?"indeterminate":!1,onCheckedChange:()=>{for(const C of n.connections)h?o.has(C.id)&&i(C.id):o.has(C.id)||i(C.id)}}):t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}),t.jsxs("span",{className:"text-xs text-muted-foreground font-normal tabular-nums",children:["x",n.connections.length]})]}),e[25]=h,e[26]=n.connections,e[27]=i,e[28]=o,e[29]=l,e[30]=y,e[31]=D):D=e[31];const L=l?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let O;e[32]!==L?(O=de("overflow-hidden transition-all duration-150 ease-out",L),e[32]=L,e[33]=O):O=e[33];let s;e[34]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(Re,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Yt,children:t.jsx(Xe,{size:20})})}),e[34]=s):s=e[34];let A;e[35]!==p?(A=C=>{C.stopPropagation(),p()},e[35]=p,e[36]=A):A=e[36];let F;e[37]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(qe,{size:16}),e[37]=F):F=e[37];let M;e[38]!==A?(M=t.jsxs(Ue,{children:[s,t.jsx(He,{align:"end",onClick:Jt,children:t.jsxs(re,{onClick:A,children:[F,"Open"]})})]}),e[38]=A,e[39]=M):M=e[39];let w;e[40]!==O||e[41]!==M?(w=t.jsx("div",{className:O,children:M}),e[40]=O,e[41]=M,e[42]=w):w=e[42];let P;e[43]!==D||e[44]!==w?(P=t.jsxs("div",{className:"flex items-center gap-1",children:[D,w]}),e[43]=D,e[44]=w,e[45]=P):P=e[45];let z;return e[46]!==P||e[47]!==b||e[48]!==a||e[49]!==v?(z=t.jsx(t.Fragment,{children:t.jsx(Ce,{connection:b,onClick:a,className:v,fallbackIcon:_,headerActionsAlwaysVisible:!0,headerActions:P})}),e[46]=P,e[47]=b,e[48]=a,e[49]=v,e[50]=z):z=e[50],z}function Jt(f){return f.stopPropagation()}function Yt(f){return f.stopPropagation()}function Zt(f){const e=oe.c(23),{count:n,total:p,canManage:l,canManageAgents:o,onSelectAll:i,onDeselectAll:g,onDelete:h,onAddToAgent:j,onToggleStatus:y,onCancel:N}=f;if(n===0)return null;let b;e[0]!==n?(b=t.jsxs("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=b):b=e[1];let a;e[2]!==n||e[3]!==g||e[4]!==i||e[5]!==p?(a=n<p?t.jsxs(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:i,children:["Select all (",p,")"]}):t.jsx(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:g,children:"Clear selection"}),e[2]=n,e[3]=g,e[4]=i,e[5]=p,e[6]=a):a=e[6];let x;e[7]!==o||e[8]!==j?(x=o&&t.jsxs(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:j,children:[t.jsx(Ge,{size:13}),"Add to Agent"]}),e[7]=o,e[8]=j,e[9]=x):x=e[9];let m;e[10]!==l||e[11]!==h||e[12]!==y?(m=l&&t.jsxs(t.Fragment,{children:[t.jsx(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>y("active"),children:"Enable"}),t.jsx(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>y("inactive"),children:"Disable"}),t.jsxs(U,{variant:"destructive",size:"sm",className:"h-7 text-xs px-2",onClick:h,children:[t.jsx(Qe,{size:13}),"Delete"]})]}),e[10]=l,e[11]=h,e[12]=y,e[13]=m):m=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Je,{size:13}),e[14]=v):v=e[14];let _;e[15]!==N?(_=t.jsx(U,{variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:N,children:v}),e[15]=N,e[16]=_):_=e[16];let D;return e[17]!==b||e[18]!==a||e[19]!==x||e[20]!==m||e[21]!==_?(D=t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl border border-border bg-background/95 shadow-lg backdrop-blur px-3 py-2 flex items-center gap-2",children:[b,a,x,m,_]})}),e[17]=b,e[18]=a,e[19]=x,e[20]=m,e[21]=_,e[22]=D):D=e[22],D}function en(f){const e=oe.c(25),{open:n,onOpenChange:p,agents:l,onConfirm:o}=f,[i,g]=E.useState(null);let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs(Ve,{children:[t.jsx(Ee,{children:"Add to Agent"}),t.jsx(Be,{children:"Select an agent to add the selected connections to."})]}),e[0]=h):h=e[0];let j;e[1]!==l||e[2]!==i?(j=l.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No agents found"}):l.map(D=>t.jsxs("button",{type:"button",onClick:()=>g(D.id),className:de("flex items-center gap-3 w-full rounded-md px-3 py-2 text-left transition-colors",i===D.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-muted/50"),children:[t.jsx(xt,{icon:D.icon,name:D.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:D.title}),D.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:D.description})]})]},D.id)),e[1]=l,e[2]=i,e[3]=j):j=e[3];let y;e[4]!==j?(y=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:j}),e[4]=j,e[5]=y):y=e[5];let N;e[6]!==p?(N=t.jsx(U,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),e[6]=p,e[7]=N):N=e[7];const b=!i;let a;e[8]!==o||e[9]!==p||e[10]!==i?(a=()=>{i&&(o(i),p(!1),g(null))},e[8]=o,e[9]=p,e[10]=i,e[11]=a):a=e[11];let x;e[12]!==b||e[13]!==a?(x=t.jsx(U,{disabled:b,onClick:a,children:"Add"}),e[12]=b,e[13]=a,e[14]=x):x=e[14];let m;e[15]!==N||e[16]!==x?(m=t.jsxs(Ke,{children:[N,x]}),e[15]=N,e[16]=x,e[17]=m):m=e[17];let v;e[18]!==y||e[19]!==m?(v=t.jsxs(ze,{className:"sm:max-w-[400px]",children:[h,y,m]}),e[18]=y,e[19]=m,e[20]=v):v=e[20];let _;return e[21]!==p||e[22]!==n||e[23]!==v?(_=t.jsx(Me,{open:n,onOpenChange:p,children:v}),e[21]=p,e[22]=n,e[23]=v,e[24]=_):_=e[24],_}function tn(f){const e=oe.c(20),{open:n,onOpenChange:p,count:l,onConfirm:o}=f,i=l!==1?"s":"";let g;e[0]!==l||e[1]!==i?(g=t.jsxs(Ae,{children:["Delete ",l," connection",i,"?"]}),e[0]=l,e[1]=i,e[2]=g):g=e[2];const h=l!==1?"s":"";let j;e[3]!==h?(j=t.jsxs(we,{children:["This will permanently delete the selected connection",h,". This action cannot be undone."]}),e[3]=h,e[4]=j):j=e[4];let y;e[5]!==g||e[6]!==j?(y=t.jsxs(Te,{children:[g,j]}),e[5]=g,e[6]=j,e[7]=y):y=e[7];let N;e[8]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(Ie,{children:"Cancel"}),e[8]=N):N=e[8];const b=l!==1?"s":"";let a;e[9]!==l||e[10]!==o||e[11]!==b?(a=t.jsxs(Pe,{children:[N,t.jsxs($e,{onClick:o,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:["Delete ",l," connection",b]})]}),e[9]=l,e[10]=o,e[11]=b,e[12]=a):a=e[12];let x;e[13]!==y||e[14]!==a?(x=t.jsxs(Le,{children:[y,a]}),e[13]=y,e[14]=a,e[15]=x):x=e[15];let m;return e[16]!==p||e[17]!==n||e[18]!==x?(m=t.jsx(Oe,{open:n,onOpenChange:p,children:x}),e[16]=p,e[17]=n,e[18]=x,e[19]=m):m=e[19],m}function nn(f){return f._registryId?.includes("community-registry")===!0}function sn(f){const e=oe.c(58),{item:n,canManage:p,allConnections:l,connectedAppNames:o,connectingItemId:i,onNavigateConnected:g,onConnect:h}=f,[j,y]=E.useState(!1),[N,b]=E.useState(null);let a,x;e[0]!==o||e[1]!==n?(a=De(n)??"",x=o.has(a),e[0]=o,e[1]=n,e[2]=a,e[3]=x):(a=e[2],x=e[3]);const m=x,v=n._meta?.["mcp.mesh"],_=v?.friendlyName||v?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",D=n.server?.description||n.description||null;let L;e[4]!==n.server?.icons?.[0]?.src||e[5]!==n.server?.repository?(L=n.server?.icons?.[0]?.src||at(n.server?.repository)||null,e[4]=n.server?.icons?.[0]?.src,e[5]=n.server?.repository,e[6]=L):L=e[6];const O=L;let s;if(e[7]!==l||e[8]!==a){let k;e[10]!==a?(k=se=>se.connection_type!=="VIRTUAL"&&se.app_name===a,e[10]=a,e[11]=k):k=e[11],s=l.filter(k),e[7]=l,e[8]=a,e[9]=s}else s=e[9];const A=s;let F;e[12]!==n?(F=nn(n),e[12]=n,e[13]=F):F=e[13];const M=F;let w,P;e[14]!==A||e[15]!==p||e[16]!==M||e[17]!==m||e[18]!==n||e[19]!==h||e[20]!==g?(w=()=>{if(m){const k=A[0];k&&g(k);return}p&&P()},P=()=>{M?(b("connect"),y(!0)):h(n)},e[14]=A,e[15]=p,e[16]=M,e[17]=m,e[18]=n,e[19]=h,e[20]=g,e[21]=w,e[22]=P):(w=e[21],P=e[22]);let z;e[23]!==n||e[24]!==h||e[25]!==N?(z=()=>{te("connections_community_warning_confirmed",{registry_item_id:n.id}),y(!1),N==="connect"&&h(n),b(null)},e[23]=n,e[24]=h,e[25]=N,e[26]=z):z=e[26];const C=z;let T;e[27]!==D||e[28]!==O||e[29]!==_?(T={title:_,description:D,icon:O},e[27]=D,e[28]=O,e[29]=_,e[30]=T):T=e[30];let G;e[31]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(ge,{}),e[31]=G):G=e[31];let H;e[32]!==M||e[33]!==n._sourceIcon?(H=M&&n._sourceIcon&&t.jsx("img",{src:n._sourceIcon,alt:"Community",className:"size-4 rounded-sm object-contain"}),e[32]=M,e[33]=n._sourceIcon,e[34]=H):H=e[34];let X;e[35]!==p||e[36]!==i||e[37]!==P||e[38]!==m||e[39]!==n.id?(X=m?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}):p&&t.jsx(U,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:i!==null,onClick:k=>{k.stopPropagation(),P()},children:i===n.id?t.jsx(ce,{size:14,className:"animate-spin"}):"Connect"}),e[35]=p,e[36]=i,e[37]=P,e[38]=m,e[39]=n.id,e[40]=X):X=e[40];let c;e[41]!==H||e[42]!==X?(c=t.jsxs("div",{className:"flex items-center gap-2",children:[H,X]}),e[41]=H,e[42]=X,e[43]=c):c=e[43];let S;e[44]!==w||e[45]!==c||e[46]!==T?(S=t.jsx(Ce,{connection:T,fallbackIcon:G,onClick:w,headerActionsAlwaysVisible:!0,headerActions:c}),e[44]=w,e[45]=c,e[46]=T,e[47]=S):S=e[47];let V;e[48]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsxs(Te,{children:[t.jsx(Ae,{children:"Community MCP Server"}),t.jsx(we,{children:"This MCP server is from the Community MCP Registry and is not maintained or verified by Deco. Community servers may have varying levels of quality, security, and reliability. Proceed with caution and review the server details before connecting."})]}),e[48]=V):V=e[48];let R;e[49]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(Ie,{children:"Cancel"}),e[49]=R):R=e[49];let B;e[50]!==C?(B=t.jsxs(Le,{children:[V,t.jsxs(Pe,{children:[R,t.jsx($e,{onClick:C,children:"Continue"})]})]}),e[50]=C,e[51]=B):B=e[51];let u;e[52]!==j||e[53]!==B?(u=t.jsx(Oe,{open:j,onOpenChange:y,children:B}),e[52]=j,e[53]=B,e[54]=u):u=e[54];let $;return e[55]!==S||e[56]!==u?($=t.jsxs(t.Fragment,{children:[S,u]}),e[55]=S,e[56]=u,e[57]=$):$=e[57],$}function on({listState:f,activeTab:e,typeFilter:n,statusFilter:p,registryFilter:l,enabledRegistries:o}){const{org:i}=be(),g=it(),h=_e(),{data:j}=Ne.useSession(),y=We(),N=Lt(f),b=ft(),{granted:a}=ye("connections:manage"),{granted:x}=ye("agents:manage"),[m,v]=E.useState(new Set),_=m.size>0,[D,L]=E.useState(!1),[O,s]=E.useState(!1),[A,F]=E.useState(null),M=Ot(),w=N.filter(r=>!(n!=="ALL"&&r.connection_type!==n||p!=="ALL"&&r.status!==p)),P=ht(w),z=r=>{v(d=>{const K=new Set(d);return K.has(r)?K.delete(r):K.add(r),K})},C=()=>{v(new Set)},T=ke(o,f.searchTerm),G=T.items,H=yt(T.loadMore,T.hasMore,T.isLoadingMore),X=new Set(N.filter(r=>r.app_name).map(r=>r.app_name)),c=l==="ALL"||o.some(r=>r.id===l)?l:"ALL",S=f.search.length>0,V=e==="all"||S?G.filter(r=>{if(c!=="ALL"&&r._registryId!==c)return!1;if(S){const d=De(r);if(d&&X.has(d))return!1}return!0}):[],R=e==="connected"||S?P:[],B=async r=>{if(!(!i||!j?.user?.id)){te("connection_add_clicked",{action:"connect_new",registry_item_id:r.id,source:"connections_page"}),F(r.id);try{const d=ct(r,i.id,j.user.id,{remoteIndex:0}),K=d.connection_type==="STDIO",I=!!d.connection_url,q=K&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!I&&!q){W.error("This MCP Server cannot be connected: no connection method available"),F(null);return}const{id:ne}=await y.create.mutateAsync(d),le=await Wt({connectionId:ne,orgId:i.id,orgSlug:i.slug,persistFallback:fe=>y.update.mutateAsync({id:ne,data:{connection_token:fe}}).then(()=>{})});if(le.ran&&!le.ok){te("connection_oauth_failed",{connection_id:ne,flow:"connections_page_connect",error:le.error??"no_token"}),W.error(`Authentication failed: ${le.error??"no token received"}`);return}if(le.ran){te("connection_oauth_succeeded",{connection_id:ne,flow:"connections_page_connect"});const fe=new URL(`/api/${i.slug}/mcp/${ne}`,window.location.origin);await g.invalidateQueries({queryKey:rt.isMCPAuthenticated(fe.href,null)}),$(),W.success("Authentication successful")}W.success("Connected successfully")}catch(d){W.error(`Failed to connect: ${d instanceof Error?d.message:String(d)}`)}finally{F(null)}}},u=Ft(),$=()=>{g.invalidateQueries({predicate:r=>{const d=r.queryKey;return d[1]===i.id&&d[3]==="collection"&&d[4]==="CONNECTIONS"}})},k=async()=>{L(!1);const r=[...m];te("connections_bulk_delete",{count:r.length});let d=0;for(const K of r)try{await u.call("COLLECTION_CONNECTIONS_DELETE",{id:K,force:!0}),d++}catch{}$(),W.success(`Deleted ${d} connection${d!==1?"s":""}`),C()},se=async(r,d)=>{try{await y.update.mutateAsync({id:r,data:{status:d}}),$(),W.success(d==="active"?"Connection enabled":"Connection disabled")}catch{W.error("Failed to update connection")}},xe=async r=>{const d=[...m];te("connections_bulk_status_toggled",{count:d.length,to_status:r});let K=0;for(const I of d)try{await y.update.mutateAsync({id:I,data:{status:r}}),K++}catch{}$(),W.success(`${r==="active"?"Enabled":"Disabled"} ${K} connection${K!==1?"s":""}`),C()},me=async r=>{const d=M.find(q=>q.id===r);if(!d)return;te("connections_bulk_add_to_agent",{agent_id:r,count:m.size});const K=new Set(d.connections.map(q=>q.connection_id)),I=[...m].filter(q=>!K.has(q)).map(q=>({connection_id:q,selected_tools:null,selected_resources:null,selected_prompts:null}));if(I.length===0){W.info("All selected connections are already in that agent");return}try{await u.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:r,data:{connections:[...d.connections,...I]}}),g.invalidateQueries({predicate:q=>{const ne=q.queryKey;return ne[1]===i.id&&ne[3]==="collection"&&ne[4]==="VIRTUAL_MCP"}}),W.success(`Added ${I.length} connection${I.length!==1?"s":""} to "${d.title}"`),C()}catch{W.error("Failed to add connections to agent")}};return t.jsxs(t.Fragment,{children:[t.jsx(jt,{...b}),t.jsx(tn,{open:D,onOpenChange:L,count:m.size,onConfirm:k}),t.jsx(en,{open:O,onOpenChange:s,agents:M,onConfirm:me}),T.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ce,{size:32,className:"animate-spin text-muted-foreground"})}):t.jsx("div",{children:(S?V.length===0&&w.length===0:e==="all"?V.length===0:w.length===0)?t.jsx(gt,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:"No Connections found",description:f.search?`No Connections match "${f.search}"`:a?"Create a connection to get started.":"Ask an organization admin to add one."}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[R.map(r=>{if(r.type==="group")return t.jsx(Qt,{group:r,onOpen:()=>{h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:r.key}})},selectionMode:_,selectedIds:m,onToggleSelect:z},r.key);const d=r.connection,K=m.has(d.id);return t.jsx(Ce,{connection:d,fallbackIcon:t.jsx(ge,{}),onClick:()=>_?z(d.id):h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:he(d)}}),className:de(K&&"ring-2 ring-primary bg-primary/5"),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1",children:[_?t.jsx(Fe,{checked:K,onCheckedChange:()=>z(d.id),onClick:I=>I.stopPropagation()}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}),t.jsx("div",{className:de("overflow-hidden transition-all duration-150 ease-out",_?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100"),children:t.jsxs(Ue,{children:[t.jsx(Re,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:I=>I.stopPropagation(),children:t.jsx(Xe,{size:20})})}),t.jsxs(He,{align:"end",onClick:I=>I.stopPropagation(),children:[t.jsxs(re,{onClick:I=>{I.stopPropagation(),h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:he(d)}})},children:[t.jsx(qe,{size:16}),"Open"]}),(a||x)&&t.jsxs(re,{onClick:I=>{I.stopPropagation(),z(d.id)},children:[t.jsx(zt,{size:16}),"Select"]}),a&&(d.status==="active"?t.jsxs(re,{onClick:I=>{I.stopPropagation(),se(d.id,"inactive")},children:[t.jsx(Vt,{size:16}),"Disable"]}):t.jsxs(re,{onClick:I=>{I.stopPropagation(),se(d.id,"active")},children:[t.jsx(Et,{size:16}),"Enable"]})),a&&t.jsxs(re,{variant:"destructive",onClick:I=>{I.stopPropagation(),b.requestDelete(d)},children:[t.jsx(Qe,{size:16}),"Delete"]})]})]})})]})},d.id)}),V.map(r=>t.jsx(sn,{item:r,canManage:a,allConnections:N,connectedAppNames:X,connectingItemId:A,onNavigateConnected:d=>h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:he(d)}}),onConnect:B},`catalog-${r._registryId}:${r.id}`)),(e==="all"||S)&&o.length>0&&t.jsx("div",{ref:H,className:"col-span-full h-4"}),(e==="all"||S)&&T.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ce,{size:24,className:"animate-spin text-muted-foreground"})})]})}),_&&t.jsx(Zt,{count:m.size,total:w.length,canManage:a,canManageAgents:x,onSelectAll:()=>{v(new Set(w.map(r=>r.id)))},onDeselectAll:()=>v(new Set),onDelete:()=>L(!0),onAddToAgent:()=>s(!0),onToggleStatus:xe,onCancel:C})]})}function rn(){const{org:f}=be(),e=_e(),n=Ze({strict:!1}),{data:p}=Ne.useSession(),{stdioEnabled:l}=et(),o=At(),{granted:i}=ye("connections:manage"),g=Gt({namespace:f.slug,resource:"connections"}),h=We(),[j,y]=tt(nt.connectionsTab(f.slug),c=>n.tab==="all"||n.tab==="connected"?n.tab:c??"all"),[N,b]=E.useState("ALL"),[a,x]=E.useState("ALL"),[m,v]=E.useState("ALL"),_=pt(),L=ke(_,g.searchTerm).items,O=g.search!==g.searchTerm,s=st({resolver:ot(Kt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),A=s.watch("ui_type"),F=s.watch("connection_url"),M=s.watch("npx_package"),w=pe({uiType:A,connectionUrl:F??"",npxPackage:M??""})??Se({uiType:A,connectionUrl:F??"",registryItems:L}),P=i&&n.action==="create",z=()=>{te("connections_custom_dialog_opened",{source:"connections_page"}),e({to:"/$org/settings/connections",params:{org:f.slug},search:{action:"create"}})},C=()=>{e({to:"/$org/settings/connections",params:{org:f.slug},search:{}})},T=async c=>{let S,V=null,R=null,B=null;c.ui_type==="NPX"?(S="STDIO",V="",B=Rt(c.npx_package||"",c.env_vars||[])):c.ui_type==="STDIO"?(S="STDIO",V="",B=Ht(c.stdio_command||"",c.stdio_args||"",c.stdio_cwd,c.env_vars||[])):(S=c.ui_type,V=c.connection_url||"",R=c.connection_token||null);const u=lt("conn");te("connection_custom_created",{connection_type:S,ui_type:c.ui_type}),await h.create.mutateAsync({id:u,title:c.title,description:c.description||null,connection_type:S,connection_url:V,connection_token:R,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:p?.user?.id||"system",organization_id:f.id,icon:c.icon??null,app_name:null,app_id:null,connection_headers:B,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),C(),s.reset(),e({to:"/$org/settings/connections/$appSlug",params:{org:f.slug,appSlug:he({app_name:null,connection_url:V,title:c.title,id:u})}})},G=c=>{c||(P&&C(),s.reset())},H=c=>{const S=c.trim();if(!S)return;const V=!!s.formState.dirtyFields.title,R=!!s.formState.dirtyFields.description,B=!!s.formState.dirtyFields.env_vars,u=k=>{if(k&&(!V&&!s.getValues("title").trim()&&k.title&&s.setValue("title",k.title,{shouldDirty:!1}),!R&&!(s.getValues("description")??"").trim()&&k.description&&s.setValue("description",k.description,{shouldDirty:!1}),!B&&k.envVarKeys?.length)){const se=s.getValues("env_vars")??[],xe=new Set(se.map(r=>r.key)),me=k.envVarKeys.filter(r=>!xe.has(r));me.length>0&&s.setValue("env_vars",[...se,...me.map(r=>({key:r,value:""}))],{shouldDirty:!0})}},$=Ut(S);if($&&l){s.setValue("ui_type","NPX",{shouldDirty:!0}),s.setValue("npx_package",$.packageName,{shouldDirty:!0}),s.setValue("connection_url","",{shouldDirty:!0}),s.setValue("connection_token",null,{shouldDirty:!0}),u(pe({uiType:"NPX",npxPackage:$.packageName}));return}if(S.startsWith("http://")||S.startsWith("https://")){const k=A==="HTTP"||A==="SSE"||A==="Websocket"?A:"HTTP";s.setValue("ui_type",k,{shouldDirty:!0}),s.setValue("connection_url",S,{shouldDirty:!0}),u(pe({uiType:k,connectionUrl:S})??Se({uiType:k,connectionUrl:S,registryItems:L}));return}A==="NPX"&&u(pe({uiType:"NPX",npxPackage:S}))},X=i?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(U,{variant:"outline",onClick:z,children:[t.jsx(Ge,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:"Custom Connection"})]})}):null;return t.jsx(t.Fragment,{children:t.jsxs(ue,{children:[(()=>{const c="Create Connection",S="Create a custom connection in your organization. Fill in the details below.",V=s.formState.isSubmitting?"Saving...":"Create Connection",R=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(Q,{control:s.control,name:"ui_type",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Type *"}),t.jsxs(wt,{value:u.value,onValueChange:u.onChange,children:[t.jsx(Z,{children:t.jsx(Tt,{children:t.jsx(It,{})})}),t.jsxs(Pt,{children:[t.jsx(ae,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(ae,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(ae,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"Websocket"]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(ae,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ge,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(ae,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Mt,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(ee,{})]})}),A==="NPX"&&t.jsx(Q,{control:s.control,name:"npx_package",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"NPM Package *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"@perplexity-ai/mcp-server",...u,value:u.value??"",onPaste:$=>{const k=$.clipboardData.getData("text");k&&($.preventDefault(),s.setValue("npx_package",k.trim(),{shouldDirty:!0}),H(k))},onBlur:$=>{H($.target.value),u.onBlur()}})}),t.jsx(ee,{})]})}),A==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(Q,{control:s.control,name:"stdio_command",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Command *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"node, bun, python...",...u,value:u.value??""})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:s.control,name:"stdio_args",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Arguments"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"arg1 arg2 --flag value",...u,value:u.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:s.control,name:"stdio_cwd",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Working Directory"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"/path/to/project (optional)",...u,value:u.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),t.jsx(ee,{})]})})]}),(A==="NPX"||A==="STDIO")&&t.jsx(Q,{control:s.control,name:"env_vars",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Environment Variables"}),t.jsx(Z,{children:t.jsx(Bt,{value:u.value??[],onChange:u.onChange})}),t.jsx(ee,{})]})}),A!=="NPX"&&A!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{control:s.control,name:"connection_url",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"URL *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"https://example.com/mcp",...u,value:u.value??"",onPaste:$=>{const k=$.clipboardData.getData("text");k&&($.preventDefault(),s.setValue("connection_url",k.trim(),{shouldDirty:!0}),H(k))},onBlur:$=>{H($.target.value),u.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:s.control,name:"connection_token",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:w?.token?.label??"Token (optional)"}),t.jsx(Z,{children:t.jsx(ie,{type:"password",placeholder:w?.token?.placeholder??"Bearer token or API key",...u,value:u.value??""})}),w?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[w.token.helperText,w.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.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"})]})]}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:s.control,name:"title",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Name *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"My Connection",...u})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:s.control,name:"description",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Description"}),t.jsx(Z,{children:t.jsx($t,{placeholder:"A brief description of this connection",rows:3,...u,value:u.value??""})}),t.jsx(ee,{})]})})]}),B=P;return o?t.jsx(vt,{open:B,onOpenChange:G,children:t.jsxs(St,{className:"max-h-[90vh]",children:[t.jsx(bt,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(_t,{children:c}),t.jsx(Nt,{className:"mt-1",children:S})]}),t.jsx(Dt,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(Je,{size:16})})})]})}),t.jsx(ve,{...s,children:t.jsxs("form",{onSubmit:s.handleSubmit(T),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:R}),t.jsx(kt,{children:t.jsx(U,{type:"submit",disabled:s.formState.isSubmitting,className:"w-full",children:V})})]})})]})}):t.jsx(Me,{open:B,onOpenChange:G,children:t.jsxs(ze,{className:"sm:max-w-[525px]",children:[t.jsxs(Ve,{children:[t.jsx(Ee,{children:c}),t.jsx(Be,{children:S})]}),t.jsx(ve,{...s,children:t.jsxs("form",{onSubmit:s.handleSubmit(T),children:[t.jsx("div",{className:"py-4",children:R}),t.jsxs(Ke,{children:[t.jsx(U,{type:"button",variant:"outline",onClick:()=>G(!1),children:"Cancel"}),t.jsx(U,{type:"submit",disabled:s.formState.isSubmitting,className:"min-w-40",children:V})]})]})})]})})})(),t.jsx(ue.Content,{children:t.jsx(ue.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(ue.Title,{children:"Connections"}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(mt,{value:g.search,onChange:g.setSearch,placeholder:"Search for a connection",className:"w-full md:w-[375px]",onKeyDown:c=>{c.key==="Escape"&&(g.setSearch(""),c.target.blur())}}),t.jsx(dt,{sortKey:g.sortKey,sortDirection:g.sortDirection,onSort:g.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"}],filters:[{label:"Type",value:N,onChange:c=>b(c||"ALL"),options:[{id:"ALL",label:"All"},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:"Status",value:a,onChange:c=>x(c||"ALL"),options:[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"},{id:"error",label:"Error"}]},..._.length>1?[{label:"Registry",value:m,onChange:c=>v(c||"ALL"),options:[{id:"ALL",label:"All registries"},..._.map(c=>({id:c.id,label:c.id.includes("community-registry")?"Community MCP Registry":c.title}))]}]:[]]})]}),X]}),t.jsx(ut,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:c=>{const S=c;S!==j&&te("connections_page_tab_changed",{to_tab:S}),y(S)}}),t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ce,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:O?.5:1,transition:O?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:O?"none":"auto"},children:t.jsx(on,{listState:g,activeTab:j,typeFilter:N,statusFilter:a,registryFilter:m,enabledRegistries:_})})})]})})})]})})}function Ws(){const f=oe.c(1);let e;return f[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ye,{children:t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ce,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(rn,{})})}),f[0]=e):e=f[0],e}export{Ws as default};
@@ -1,2 +0,0 @@
1
- import{c as Z,r as u,j as r,i as se,B as he,d$ as Mt,aO as Dt,aU as ie,e0 as Rt,e1 as Pt,e2 as Et,e3 as kt,bO as Ot,e4 as Tt,e5 as qe,aQ as At,e6 as Lt,e7 as Ft,e8 as It,e9 as $t,ea as _t,eb as zt,ec as Wt,ed as Gt,ee as Kt,l as ae,n as Bt,t as W,K as $e}from"./index-CvE6NA3K.js";import{F as Ut,l as Vt}from"./index-BExWvPx3.js";import{d as qt,aB as Qt,aC as Ht,aD as ue,aE as Xt,a9 as _e}from"./agent-icon-CK_iR-s0.js";import{a as Jt}from"./Tool01-D-X02mJF.js";import{s as Yt}from"./XClose-DXFnYpcq.js";import{A as Zt}from"./automation-runs-D4CtRz19.js";import{b as ze,T as We,a as Ge}from"./tooltip-08a1C_gE.js";import{f as en,a as tn,b as nn,c as rn,d as on,e as sn,A as an,g as ln}from"./alert-dialog-DTE4AoIR.js";import{b as cn}from"./chat-context-oGIzvqdB.js";import{u as dn}from"./shell-layout-NH-BOyu1.js";import{s as fe,a as Ke,f as un}from"./index-CRyX1rZk.js";import{a as fn,h as mn,D as pn,c as xn,d as hn,e as gn}from"./dialog-N2mQdoSV.js";import{I as Be}from"./input-DDORXh5t.js";import{t as vn}from"./ChevronDown-BBJF7Gd7.js";import{i as yn}from"./ChevronRight-DpcCbUD4.js";import{a as Cn}from"./ZoomOut-DwdfMia5.js";import{E as wn,v as Ue,w as Ce,x as bn,y as jn,z as Nn,A as U,C as me,g as we,D as be,G as Sn,I as Mn,J as je,K as pe,M as Ne,N as Dn,O as Rn}from"./index-CMq5BhdV.js";import"./AlertCircle-DUm4G2Ta.js";import"./UserPlus01-Dx6ZYTlZ.js";import"./ArrowUp-BdzyW8MP.js";import"./Settings02-BMZwd-rX.js";import"./Tool02-BlbTnl2V.js";import"./XCircle-BvwKzrrG.js";import"./ArrowUpRight-BBxL_SHu.js";import"./TrendUp01-BExQrNyF.js";import"./ZapSquare-Dr7bY5ye.js";import"./Users03-CjAO_nlR.js";import"./CheckCircle-CaRVoG7J.js";import"./Check-Cmqw6Sl1.js";import"./ChevronUp-CWbLUTJ1.js";import"./Circle-DDT9SH1v.js";import"./Stars02-CMCqTIWA.js";import"./Eye-CZj87vlg.js";import"./DotsVertical-Bo1yMQgi.js";import"./Globe01-Cdx_m0Bt.js";import"./FilterLines-Bk0q76wv.js";import"./Flag01-DcQVqR36.js";import"./Star01-DHK6A0AH.js";import"./Globe04-PExuJSe1.js";import"./SwitchHorizontal01-DiTwvr8W.js";import"./HardDrive-V2DxUiyj.js";import"./Key01-BVqY8Ikr.js";import"./LayoutLeft-D09qOLeU.js";import"./LinkExternal01-CJQH4V3A.js";import"./List-Jbj9anH7.js";import"./Monitor01-y7DjWM-8.js";import"./Sun-BGTkSsSi.js";import"./Package-Bq8-Pz9F.js";import"./Palette-CY7o2v4x.js";import"./Play-BXjeqQYf.js";import"./Plus-BvqCxQWT.js";import"./SearchLg-CI8WyjSW.js";import"./SearchMd-B9Pphw6_.js";import"./Shield01-DBuRGV43.js";import"./Stars01-BrGFjvO7.js";import"./Trash01-B_OOuHxX.js";import"./Upload01-JrjTbAm6.js";import"./User01-BE2iU5Da.js";import"./Users01-BtmWOMAT.js";import"./X-DRBKd8kQ.js";import"./Zap-CR0zPUwW.js";import"./select-J1shvVzc.js";import"./useInfiniteQuery-BQVUBF2l.js";import"./use-infinite-scroll-CVlo5SDp.js";import"./use-connection-Dg4qtA0P.js";import"./use-collections-CzmC_4Yp.js";import"./use-mcp-client-Dp9Co-su.js";import"./constants-D_FQAPnt.js";import"./auth-mga72Myo.js";import"./use-virtual-mcp-BJ21-pKK.js";import"./card-wofgsu5q.js";import"./sidebar-DEYkBI03.js";import"./use-mobile-DOANEp3O.js";import"./table-BO5xCsWv.js";import"./empty-state-DrOIAXxd.js";import"./use-members-Dqk2nuAE.js";import"./use-org-auth-client-B2B6T6i4.js";import"./use-clock-tick-BukM8jyc.js";import"./use-automations-CH0qxK80.js";import"./studio-tools-BZkjLjgu.js";import"./useSuspenseInfiniteQuery-atDxo3aA.js";import"./badge-CZrdrM01.js";import"./checkbox-BGhVoJWj.js";import"./command-LBXWnWuJ.js";import"./index-CUGAO2RP.js";import"./popover-DbZaoM7Y.js";import"./avatar-Cj6O7eGR.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BQfD7Nvo.js";import"./file-type-icon-DAly4Os4.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-DEasbMz7.js";import"./delay-CnY5UFtP.js";import"./index-BrfuswEE.js";import"./hooks-C56PmBxD.js";import"./decopilot-sse-pool-DYp05ehL.js";import"./backoff-CrEUbyZT.js";import"./integration-icon-BabLlpyY.js";import"./use-navigate-to-agent-BxBGEkUr.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-To_28uvZ.js";import"./form-BSsGiMr6.js";import"./label-l63Zf6FC.js";import"./autosend-DFZ8OnVq.js";import"./use-ai-providers-rWA-gXGT.js";import"./use-decopilot-events-B3n4OWWN.js";import"./use-organization-settings-0YxWJPkh.js";import"./required-auth-layout-zCMsJxhL.js";import"./use-org-sso-DLpH8992.js";import"./drawer-DVfN4fV_.js";import"./collection-search-CGqvS7W4.js";import"./tabs-zVrZaEG_.js";import"./toggle-group-oD1wdNnd.js";import"./use-deco-credits-CgeG9KvV.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DBsockE1.js";import"./use-registry-connections-FiGV0MsU.js";import"./extract-connection-data-C1Iz--Qu.js";import"./collection-tabs-De8l1T9I.js";import"./textarea-DLOpUOKH.js";import"./connection-form-helpers-Cc3xYBKB.js";import"./authenticate-and-persist-oauth-BPOwOntx.js";import"./mcp-oauth-CmIamg5I.js";import"./connect-desktop-dialog-CVpa-1aH.js";import"./select-model-DzCAuTc_.js";import"./skeleton-DJxtAPQ_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CfrhTSGz.js";import"./dropdown-menu-36LID3uN.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Cwul5kM5.js";import"./toolbar-CHqJ-l6l.js";import"./use-mcp-tools-sUHG3IR2.js";import"./use-capability-CiRLF8b5.js";import"./tools-list-Bt_uV9t_.js";import"./switch-BoQxI0fh.js";import"./use-debounced-autosave-CYK7sAxb.js";import"./index-DZZ15uvC.js";import"./search-input-DkNJyppH.js";import"./github-repo-picker-hhppcqwU.js";import"./use-debounced-value-3mOTIM9Q.js";import"./github-installations-ChFezl8I.js";import"./use-secrets-Ds9NTjth.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-B950PdHH.js";import"./index-CgpaWB0t.js";import"./get-initials-D-f_fDFw.js";import"./calendar-B4WhdghP.js";import"./toolbar-icon-button-CnbUfQ6-.js";import"./use-file-configs-D3ZIWGba.js";import"./automation-list-row-BxBeG7Gn.js";const Pn={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function En(s){const e=Z.c(51),{open:i,mode:a,initialName:c,parentLabel:m,isPending:x,onSubmit:p,onOpenChange:g}=s,M=c===void 0?"":c,d=x===void 0?!1:x,[h,y]=u.useState(M),[B,V]=u.useState(i),C=Pn[a];i!==B&&(V(i),i&&y(M));let I;e[0]!==d||e[1]!==g?(I=_=>{!_&&!d&&g(!1)},e[0]=d,e[1]=g,e[2]=I):I=e[2];const H=I;let q;e[3]!==d||e[4]!==h||e[5]!==p?(q=async _=>{_.preventDefault();const K=h.trim();!K||d||await p(K)},e[3]=d,e[4]=h,e[5]=p,e[6]=q):q=e[6];const Q=q;let $;e[7]!==C.title?($=r.jsx(fn,{children:C.title}),e[7]=C.title,e[8]=$):$=e[8];let O;e[9]!==C.description?(O=r.jsx(mn,{children:C.description}),e[9]=C.description,e[10]=O):O=e[10];let G;e[11]!==$||e[12]!==O?(G=r.jsxs(pn,{children:[$,O]}),e[11]=$,e[12]=O,e[13]=G):G=e[13];let T;e[14]!==m?(T=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(Be,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=m,e[15]=T):T=e[15];let A;e[16]===Symbol.for("react.memo_cache_sentinel")?(A=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=A):A=e[16];let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R=_=>y(_.target.value),e[17]=R):R=e[17];let P;e[18]!==C.placeholder||e[19]!==d||e[20]!==h?(P=r.jsxs("div",{className:"space-y-1.5",children:[A,r.jsx(Be,{id:"file-explorer-name",value:h,onChange:R,placeholder:C.placeholder,autoFocus:!0,disabled:d})]}),e[18]=C.placeholder,e[19]=d,e[20]=h,e[21]=P):P=e[21];let j;e[22]!==P||e[23]!==T?(j=r.jsxs("div",{className:"space-y-4 py-4",children:[T,P]}),e[22]=P,e[23]=T,e[24]=j):j=e[24];let N;e[25]!==g?(N=()=>g(!1),e[25]=g,e[26]=N):N=e[26];let E;e[27]!==d||e[28]!==N?(E=r.jsx(he,{type:"button",variant:"outline",onClick:N,disabled:d,children:"Cancel"}),e[27]=d,e[28]=N,e[29]=E):E=e[29];let k;e[30]!==d||e[31]!==h?(k=!h.trim()||d,e[30]=d,e[31]=h,e[32]=k):k=e[32];let w;e[33]!==C.submit||e[34]!==d?(w=d?r.jsxs(r.Fragment,{children:[r.jsx(se,{size:14,className:"animate-spin"}),"Saving…"]}):C.submit,e[33]=C.submit,e[34]=d,e[35]=w):w=e[35];let L;e[36]!==k||e[37]!==w?(L=r.jsx(he,{type:"submit",disabled:k,children:w}),e[36]=k,e[37]=w,e[38]=L):L=e[38];let b;e[39]!==E||e[40]!==L?(b=r.jsxs(xn,{children:[E,L]}),e[39]=E,e[40]=L,e[41]=b):b=e[41];let S;e[42]!==Q||e[43]!==j||e[44]!==b||e[45]!==G?(S=r.jsx(hn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:Q,children:[G,j,b]})}),e[42]=Q,e[43]=j,e[44]=b,e[45]=G,e[46]=S):S=e[46];let z;return e[47]!==H||e[48]!==i||e[49]!==S?(z=r.jsx(gn,{open:i,onOpenChange:H,children:S}),e[47]=H,e[48]=i,e[49]=S,e[50]=z):z=e[50],z}var Me="ContextMenu",[kn]=At(Me,[qe]),F=qe(),[On,Qe]=kn(Me),He=s=>{const{__scopeContextMenu:e,children:i,onOpenChange:a,dir:c,modal:m=!0}=s,[x,p]=u.useState(!1),g=F(e),M=Ot(a),d=u.useCallback(h=>{p(h),M(h)},[M]);return r.jsx(On,{scope:e,open:x,onOpenChange:d,modal:m,children:r.jsx(Tt,{...g,dir:c,open:x,onOpenChange:d,modal:m,children:i})})};He.displayName=Me;var Xe="ContextMenuTrigger",Je=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,disabled:a=!1,...c}=s,m=Qe(Xe,i),x=F(i),p=u.useRef({x:0,y:0}),g=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),M=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(M.current),[]),h=y=>{p.current={x:y.clientX,y:y.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Mt,{...x,virtualRef:g}),r.jsx(Dt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...s.style},onContextMenu:a?s.onContextMenu:ie(s.onContextMenu,y=>{d(),h(y),y.preventDefault()}),onPointerDown:a?s.onPointerDown:ie(s.onPointerDown,xe(y=>{d(),M.current=window.setTimeout(()=>h(y),700)})),onPointerMove:a?s.onPointerMove:ie(s.onPointerMove,xe(d)),onPointerCancel:a?s.onPointerCancel:ie(s.onPointerCancel,xe(d)),onPointerUp:a?s.onPointerUp:ie(s.onPointerUp,xe(d))})]})});Je.displayName=Xe;var Tn="ContextMenuPortal",Ye=s=>{const{__scopeContextMenu:e,...i}=s,a=F(e);return r.jsx(Et,{...a,...i})};Ye.displayName=Tn;var Ze="ContextMenuContent",et=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=Qe(Ze,i),m=F(i),x=u.useRef(!1);return r.jsx(kt,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{s.onCloseAutoFocus?.(p),!p.defaultPrevented&&x.current&&p.preventDefault(),x.current=!1},onInteractOutside:p=>{s.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(x.current=!0)},style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});et.displayName=Ze;var An="ContextMenuGroup",Ln=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Lt,{...c,...a,ref:e})});Ln.displayName=An;var Fn="ContextMenuLabel",In=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Ft,{...c,...a,ref:e})});In.displayName=Fn;var $n="ContextMenuItem",tt=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Rt,{...c,...a,ref:e})});tt.displayName=$n;var _n="ContextMenuCheckboxItem",zn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(It,{...c,...a,ref:e})});zn.displayName=_n;var Wn="ContextMenuRadioGroup",Gn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx($t,{...c,...a,ref:e})});Gn.displayName=Wn;var Kn="ContextMenuRadioItem",Bn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(_t,{...c,...a,ref:e})});Bn.displayName=Kn;var Un="ContextMenuItemIndicator",Vn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(zt,{...c,...a,ref:e})});Vn.displayName=Un;var qn="ContextMenuSeparator",nt=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Pt,{...c,...a,ref:e})});nt.displayName=qn;var Qn="ContextMenuArrow",Hn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Wt,{...c,...a,ref:e})});Hn.displayName=Qn;var Xn="ContextMenuSubTrigger",Jn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Gt,{...c,...a,ref:e})});Jn.displayName=Xn;var Yn="ContextMenuSubContent",Zn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Kt,{...c,...a,ref:e,style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zn.displayName=Yn;function xe(s){return e=>e.pointerType!=="mouse"?s(e):void 0}var er=He,tr=Je,nr=Ye,rr=et,or=tt,ir=nt;function sr(s){const e=Z.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(er,{"data-slot":"context-menu",...i}),e[2]=i,e[3]=a):a=e[3],a}function ar(s){const e=Z.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(tr,{"data-slot":"context-menu-trigger",...i}),e[2]=i,e[3]=a):a=e[3],a}function lr(s){const e=Z.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ae("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(nr,{children:r.jsx(rr,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}function te(s){const e=Z.c(12);let i,a,c,m;e[0]!==s?({className:i,inset:a,variant:m,...c}=s,e[0]=s,e[1]=i,e[2]=a,e[3]=c,e[4]=m):(i=e[1],a=e[2],c=e[3],m=e[4]);const x=m===void 0?"default":m;let p;e[5]!==i?(p=ae("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=p):p=e[6];let g;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==x?(g=r.jsx(or,{"data-slot":"context-menu-item","data-inset":a,"data-variant":x,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=x,e[11]=g):g=e[11],g}function Ve(s){const e=Z.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ae("bg-border -mx-1 my-1 h-px",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(ir,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}const cr="#d9a441";function dr(s){const e=Z.c(45),{node:i,depth:a,isExpanded:c,isSelected:m,isLoading:x,fileVisual:p,onOpen:g,onSelect:M,onNewFile:d,onNewFolder:h,onCopyPath:y,onCopyRelativePath:B,onRename:V,onDelete:C}=s,I=x===void 0?!1:x,H=i.kind==="directory",{Icon:q,color:Q}=p,$=m&&"bg-accent";let O;e[0]!==$?(O=ae("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",$),e[0]=$,e[1]=O):O=e[1];const G=`${a*14+8}px`;let T;e[2]!==G?(T={paddingLeft:G},e[2]=G,e[3]=T):T=e[3];let A;e[4]!==g||e[5]!==M?(A=()=>{M(),g()},e[4]=g,e[5]=M,e[6]=A):A=e[6];let R;e[7]!==q||e[8]!==Q||e[9]!==H||e[10]!==c||e[11]!==I?(R=H?r.jsxs(r.Fragment,{children:[I?r.jsx(se,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(vn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(yn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Cn,{size:16,className:"shrink-0",style:{color:cr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(q,{size:16,className:"shrink-0",style:{color:Q}})]}),e[7]=q,e[8]=Q,e[9]=H,e[10]=c,e[11]=I,e[12]=R):R=e[12];let P;e[13]!==i.name?(P=r.jsx("span",{className:"truncate",children:i.name}),e[13]=i.name,e[14]=P):P=e[14];let j;e[15]!==O||e[16]!==T||e[17]!==A||e[18]!==R||e[19]!==P?(j=r.jsx(ar,{asChild:!0,children:r.jsxs("button",{type:"button",className:O,style:T,onClick:A,children:[R,P]})}),e[15]=O,e[16]=T,e[17]=A,e[18]=R,e[19]=P,e[20]=j):j=e[20];let N;e[21]!==d?(N=r.jsx(te,{onSelect:d,children:"New File"}),e[21]=d,e[22]=N):N=e[22];let E;e[23]!==h?(E=r.jsx(te,{onSelect:h,children:"New Folder"}),e[23]=h,e[24]=E):E=e[24];let k;e[25]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Ve,{}),e[25]=k):k=e[25];let w;e[26]!==y?(w=r.jsx(te,{onSelect:y,children:"Copy Path"}),e[26]=y,e[27]=w):w=e[27];let L;e[28]!==B?(L=r.jsx(te,{onSelect:B,children:"Copy Relative Path"}),e[28]=B,e[29]=L):L=e[29];let b;e[30]===Symbol.for("react.memo_cache_sentinel")?(b=r.jsx(Ve,{}),e[30]=b):b=e[30];let S;e[31]!==V?(S=r.jsx(te,{onSelect:V,children:"Rename"}),e[31]=V,e[32]=S):S=e[32];let z;e[33]!==C?(z=r.jsx(te,{variant:"destructive",onSelect:C,children:"Delete"}),e[33]=C,e[34]=z):z=e[34];let _;e[35]!==N||e[36]!==E||e[37]!==w||e[38]!==L||e[39]!==S||e[40]!==z?(_=r.jsxs(lr,{className:"w-52",children:[N,E,k,w,L,b,S,z]}),e[35]=N,e[36]=E,e[37]=w,e[38]=L,e[39]=S,e[40]=z,e[41]=_):_=e[41];let K;return e[42]!==_||e[43]!==j?(K=r.jsxs(sr,{children:[j,_]}),e[42]=_,e[43]=j,e[44]=K):K=e[44],K}Vt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function Se(s,e,i,a){return`/api/${s}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(i)}/${a}`}function ur(s){const e=U(s);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const fr="#94a3b8";function mr(s){const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ue,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ue,color:"#d9a441"}:e.endsWith(".json")?{Icon:Xt,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ue,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ue,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:Jt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:_e,color:"#64748b"}:{Icon:_e,color:fr}}function is({orgSlug:s,virtualMcpId:e,branch:i,openPath:a}){const[c,m]=u.useState({files:[],directories:[],truncated:!1}),{files:x,directories:p}=c,[g,M]=u.useState(new Set),[d,h]=u.useState(null),[y,B]=u.useState(null),[V,C]=u.useState([]),[I,H]=u.useState(""),[q,Q]=u.useState(!1),[$,O]=u.useState(!1),[,G]=u.useState(new Set),[T,A]=u.useState(new Set),R=u.useRef(0),P=u.useRef(null),j=u.useRef(new Set),N=u.useRef(new Map);function E(t){G(n=>{const o=typeof t=="function"?t(n):t;return j.current=o,o})}const[k,w]=u.useState(new Map),L=u.useRef(null),[b,S]=u.useState(null),{sendMessage:z}=cn(),{openSidePanel:_}=dn(),K=Bt(),[D,X]=u.useState(null),[J,ge]=u.useState(null),[ne,le]=u.useState(!1);async function re(t,n){const o=await fetch(Se(s,e,i,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function ce(){K.invalidateQueries({queryKey:Ke(s,e,i)})}function De(t,n){navigator.clipboard.writeText(n).then(()=>W.success(`${t} copied`),()=>W.error(`Failed to copy ${t.toLowerCase()}`))}function rt(t){const n=Dn(t);if(!n)return;const o=`${s}/${e}/${i}`;K.setQueryData($e.decofile(o),l=>{if(!l)return l;const{[n]:f,...v}=l;return v}),K.invalidateQueries({queryKey:$e.liveMeta(o)})}function ot(t){const n=t.kind==="file"?[t.path]:x.filter(o=>o.startsWith(".deco/blocks/")).map(o=>me(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)rt(o)}function it(t){const n=me(t);return V.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=k.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function Re(t){C(n=>n.map(o=>t(o)).filter(o=>o!==null)),h(n=>n&&t(n)),w(n=>{const o=new Map;for(const[l,f]of n){const v=t(l);v&&o.set(v,f)}return o}),B(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function st(t){const n=me(t);B(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Re(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function at(t){if(!D)return;const n=pe(D.parentDir,t);if(Ne(n,x,p))throw new Error(`"${t}" already exists`);await re("write",{path:U(n),content:""}),await oe(),await ce(),X(null),ve(n)}async function lt(t){if(!D)return;const n=pe(D.parentDir,t);if(Ne(n,x,p))throw new Error(`"${t}" already exists`);const o=U(n);await re("mkdir",{path:o}),m(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await oe(),await ce(),X(null),M(l=>{const f=new Set(l);for(const v of Ce(n))f.add(v);return f.add(n),f}),B({name:t,path:n,kind:"directory",children:[]})}async function ct(t){if(!D)return;const n=D.node.path,o=je(n),l=pe(o,t);if(l===n){X(null);return}if(Ne(l,x,p))throw new Error(`"${t}" already exists`);await re("rename",{from:U(n),to:U(l)}),Re(f=>f===n?l:f.startsWith(`${n}/`)?pe(l,f.slice(n.length+1)):f),await oe(),await ce(),X(null)}async function dt(t){le(!0);try{await re("unlink",{path:U(t.path),recursive:t.kind==="directory"}),ot(t),st(t.path),await oe(),await ce(),ge(null),W.success(`Deleted "${t.name}"`)}catch(n){W.error(n instanceof Error?n.message:"Delete failed")}finally{le(!1)}}async function ut(t){const n=Mn(t);if(n){W.error(n);return}le(!0);try{D?.mode==="new-file"?(await at(t),W.success(`Created "${t}"`)):D?.mode==="new-folder"?(await lt(t),W.success(`Created folder "${t}"`)):D?.mode==="rename"&&(await ct(t),W.success(`Renamed to "${t}"`))}catch(o){W.error(o instanceof Error?o.message:"Operation failed")}finally{le(!1)}}const Pe=u.useRef(!1);Pe.current||(Pe.current=!0,P.current=oe());const[ft,mt]=u.useState(null);if(a&&a!==ft){mt(a);const t=a;queueMicrotask(()=>{ur(t)&&ve(t).catch(n=>{W.error(n instanceof Error?n.message:"Failed to open file")})})}async function Ee(t){const n=await re("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function ke(t,n,o){if(o!==R.current)return!1;let l=!1;return m(f=>{const v=n?Rn(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!v.truncated,{files:v.files,directories:v.directories,truncated:l}}),l&&W.warning("File list truncated — some files may be hidden"),l}async function pt(t){const n=N.current.get(t);if(n)return n;const o=R.current,l=(async()=>{const f=await Ee({pattern:"**/*",path:U(t),limit:Ue}),v=ke(f,!0,o);return!v&&o===R.current&&E(Y=>{const de=new Set(Y);return de.add(t),de}),v})();N.current.set(t,l);try{return await l}finally{N.current.delete(t)}}async function Oe(t){if(!be(t,j.current))return!1;A(n=>new Set(n).add(t));try{return await pt(t)}finally{A(n=>{const o=new Set(n);return o.delete(t),o})}}async function xt(t){const n=new Set(j.current);for(const o of Ce(t)){if(!be(o,n))continue;if(await Oe(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function oe(){const t=++R.current;N.current.clear(),Q(!0),E(new Set),M(new Set),A(new Set);try{const n=await Ee({pattern:"**/*",limit:Ue,maxDepth:wn});ke(n,!1,t),O(!0)}catch{$&&W.error("Failed to refresh file tree")}finally{Q(!1)}}async function Te(t){if(!k.get(t)?.loaded){w(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await fetch(Se(s,e,i,"read"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:U(t),full:!0})});if(!o.ok)return;const l=await o.json(),f=Sn(l.content??"");w(v=>{const Y=new Map(v);return Y.set(t,{savedContent:f,editorValue:f,loaded:!0}),Y})}catch{}}}async function ht(t,n){try{const o=await fetch(Se(s,e,i,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:U(t),content:n})});if(!o.ok){fe("file save failed",{path:t,status:o.status});return}fe("file saved via sandbox /write",{path:t}),K.invalidateQueries({queryKey:Ke(s,e,i)});try{const l=await un(s,e,i);fe("git status after save",l)}catch(l){fe("git status after save failed",{path:t,error:l instanceof Error?l.message:String(l)})}w(l=>{const f=new Map(l),v=f.get(t);return v&&f.set(t,{...v,savedContent:n}),f})}catch{}}function gt(t){h(t),B({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),S(null),V.includes(t)||C(n=>[...n,t]),Te(t)}function vt(t){C(n=>{const o=n.filter(l=>l!==t);return d===t&&h(o[o.length-1]??null),o}),w(n=>{const o=new Map(n);return o.delete(t),o})}function Ae(t){M(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function yt(t){if(be(t,j.current))try{if(await Oe(t))return}catch(n){W.error(n instanceof Error?n.message:"Failed to load folder");return}Ae(t)}async function Ct(t,n){if(n){Ae(t);return}await yt(t)}async function ve(t){await P.current,await xt(t);const n=Ce(t);M(o=>{const l=new Set(o);for(const f of n)l.add(f);return l}),gt(t)}function wt(){return y?.kind==="directory"?y.path:y?.kind==="file"?je(y.path):d?je(d):"/"}function Le(t){const n=wt();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const bt=bn(x,p),Fe=jn(bt,g),Ie=I?Fe.filter(t=>t.node.name.toLowerCase().includes(I.toLowerCase())):Fe,ee=d?k.get(d):null,jt=ee?.loaded&&ee.editorValue!==ee.savedContent,ye=J?it(J.path):[],Nt=(t,n)=>{L.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await ht(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const f=l.getValueInRange(o);S({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function St(t){if(!b)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${b.filePath}\``,`**Lines:** ${b.lineStart}–${b.lineEnd}`];if(b.selectedCode){const o=we(b.filePath),l=b.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),_("chat"),z({parts:[{type:"text",text:n.join(`
2
- `)}]}),S(null)}return q&&!$?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(qt,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:I,onChange:t=>H(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(ze,{children:[r.jsx(We,{asChild:!0,children:r.jsx(he,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Le("new-file"),children:r.jsx(Qt,{size:14})})}),r.jsx(Ge,{side:"bottom",children:"New file"})]}),r.jsxs(ze,{children:[r.jsx(We,{asChild:!0,children:r.jsx(he,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Le("new-folder"),children:r.jsx(Ht,{size:14})})}),r.jsx(Ge,{side:"bottom",children:"New folder"})]})]}),r.jsx(Zt,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[Ie.map(t=>{const{node:n,depth:o}=t,l=n.kind==="directory",f=g.has(n.path),v=y?.path===n.path,Y=Nn(n.path,n.kind),de=l&&T.has(n.path);return r.jsx(dr,{node:n,depth:o,isExpanded:f,isSelected:v,isLoading:de,fileVisual:mr(n.name),onSelect:()=>B(n),onOpen:()=>{l?Ct(n.path,f):ve(n.path)},onNewFile:()=>X({mode:"new-file",node:n,parentDir:Y}),onNewFolder:()=>X({mode:"new-folder",node:n,parentDir:Y}),onCopyPath:()=>De("Path",me(n.path)),onCopyRelativePath:()=>De("Relative path",U(n.path)),onRename:()=>X({mode:"rename",node:n,parentDir:Y}),onDelete:()=>ge(n)},n.path)}),$&&Ie.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:I?`No files match "${I}"`:"No files found"})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[V.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:V.map(t=>{const n=k.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,l=d===t,f=t.split("/").pop()??t;return r.jsxs("div",{className:ae("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",l?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{h(t),Te(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":l,children:[r.jsx("span",{className:"truncate max-w-32",children:f}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:v=>{v.stopPropagation(),vt(t)},children:r.jsx(Yt,{size:12})})]},t)})}),b&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&St(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&S(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:"Send"}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&ee?.loaded?r.jsx(Ut,{language:we(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ee.editorValue,path:d,onChange:t=>{const n=d;n&&w(o=>{const l=new Map(o),f=l.get(n);return f&&l.set(n,{...f,editorValue:t??""}),l})},onMount:Nt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!ee?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[jt?"Modified":"Saved"," ·"," ",we(d)]})]})]}),r.jsx(En,{open:D!==null,mode:D?.mode??"new-file",initialName:D?.mode==="rename"?D.node.name:"",parentLabel:D&&D.mode!=="rename"?D.parentDir==="/"?"/":U(D.parentDir):void 0,isPending:ne,onSubmit:ut,onOpenChange:t=>{!t&&!ne&&X(null)}}),r.jsx(en,{open:J!==null,onOpenChange:t=>{!t&&!ne&&ge(null)},children:r.jsxs(tn,{children:[r.jsxs(nn,{children:[r.jsxs(rn,{children:["Delete ",J?.kind==="directory"?"folder":"file","?"]}),r.jsxs(on,{children:["This will permanently delete"," ",r.jsx("span",{className:"font-mono",children:J?.name}),J?.kind==="directory"?" and everything inside it.":".",ye.length>0&&r.jsxs(r.Fragment,{children:[" ",ye.length===1?"One open file has unsaved changes that will be lost.":`${ye.length} open files have unsaved changes that will be lost.`]})]})]}),r.jsxs(sn,{children:[r.jsx(an,{disabled:ne,children:"Cancel"}),r.jsx(ln,{disabled:ne||!J,onClick:t=>{t.preventDefault(),J&&dt(J)},children:"Delete"})]})]})})]})}export{is as FileExplorer};
@@ -1 +0,0 @@
1
- const o={contents:"write",metadata:"read",pull_requests:"write",issues:"write"};function i(e){if(!e||typeof e!="object"||Array.isArray(e))return o;const t=e;return Object.values(t).some(n=>typeof n!="string")?o:t}function s(e){if(!(typeof e!="number"||!Number.isFinite(e)||!Number.isInteger(e)||e<=0))return e}function a(e){const t=e.metadata?.repoScope;if(!t||typeof t.installationId!="number"||!Number.isFinite(t.installationId)||!Number.isInteger(t.installationId)||t.installationId<=0||typeof t.owner!="string"||typeof t.repo!="string"||t.owner.length===0||t.repo.length===0)return null;const n=s(t.repositoryId);return{sourceConnectionId:typeof t.sourceConnectionId=="string"?t.sourceConnectionId:void 0,installationId:t.installationId,repositoryId:n,owner:t.owner,repo:t.repo,permissions:i(t.permissions),grantProvider:t.grantProvider==="github-mcp"?"github-mcp":void 0}}function u(e){return(e??[]).filter(t=>a(t)===null)}async function c(e,t){const r=(await e({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:t}})).content?.[0]?.text;if(!r)throw new Error("No response from GITHUB_LIST_USER_ORGS");try{return JSON.parse(r)}catch{throw new Error("Invalid response from GITHUB_LIST_USER_ORGS")}}function l(e,t){const n=t.toLowerCase();return e.find(r=>r.login.toLowerCase()===n)}export{o as G,a,l as b,c as f,u as g};
@@ -1 +0,0 @@
1
- import{c as R,j as t,C as U,a as Z,n as B,r as T,am as $,i as L,d as K,t as F,dH as ee,K as P,m as te,B as ne,l as D,v as se,w as oe}from"./index-CvE6NA3K.js";import{D as re,a as ie,d as le,e as ae}from"./dialog-N2mQdoSV.js";import{C as ce}from"./collection-search-CGqvS7W4.js";import{u as ue}from"./use-debounced-value-3mOTIM9Q.js";import{b as J,u as de}from"./use-connection-Dg4qtA0P.js";import{u as H}from"./use-mcp-client-Dp9Co-su.js";import{W as me,S as Y}from"./constants-D_FQAPnt.js";import{a as W}from"./authenticate-and-persist-oauth-BPOwOntx.js";import{b as X}from"./Settings02-BMZwd-rX.js";import{J as fe}from"./agent-icon-CK_iR-s0.js";import{u as xe}from"./use-mcp-tools-sUHG3IR2.js";import{e as pe}from"./extract-connection-data-C1Iz--Qu.js";import{c as ge}from"./use-navigate-to-agent-BxBGEkUr.js";import{G as q,g as he,f as ye}from"./github-installations-ChFezl8I.js";function G(i){const e=R.c(4),{size:n,className:r}=i;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=f):f=e[0];let l;return e[1]!==r||e[2]!==n?(l=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:r,children:f}),e[1]=r,e[2]=n,e[3]=l):l=e[3],l}function be(i,e){const n=R.c(12),{org:r}=U();let f;n[0]!==r.id?(f=me.REGISTRY(r.id),n[0]=r.id,n[1]=f):f=n[1];const l=f;let o;n[2]!==r.id||n[3]!==r.slug||n[4]!==l?(o={connectionId:l,orgId:r.id,orgSlug:r.slug},n[2]=r.id,n[3]=r.slug,n[4]=l,n[5]=o):o=n[5];const N=H(o);let x;n[6]!==i?(x={name:i},n[6]=i,n[7]=x):x=n[7];const y=e?.enabled??!0;let a;return n[8]!==N||n[9]!==x||n[10]!==y?(a={client:N,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:x,enabled:y,staleTime:3e5,select:Ne},n[8]=N,n[9]=x,n[10]=y,n[11]=a):a=n[11],xe(a)}function Ne(i){return i.structuredContent?.item??null}const je="deco/mcp-github";function we(i){const{org:e}=U(),{data:n}=Z.useSession(),r=J(),f=B(),[l,o]=T.useState("idle"),[N,x]=T.useState(null),[y,a]=T.useState(null),{data:j,isLoading:u}=be(je,{enabled:i.enabled}),c=T.useRef(!1);i.enabled&&j&&!u&&!c.current&&n?.user?.id&&l==="idle"&&(c.current=!0,m());async function m(){if(!(!j||!n?.user?.id||!e))try{o("installing"),x(null);const d=pe(j,e.id,n.user.id,{remoteIndex:0});if(!d.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:w}=await r.create.mutateAsync(d);o("authenticating");const b=await W({connectionId:w,orgId:e.id,orgSlug:e.slug,persistFallback:s=>r.update.mutateAsync({id:w,data:{connection_token:s}}).then(()=>{})});if(b.ran&&!b.ok){try{await r.delete.mutateAsync(w)}catch{}throw new Error(b.error&&b.error!=="no token received"?b.error:"No token received from GitHub")}$(f,e.id),a(d),o("ready")}catch(d){x(d instanceof Error?d.message:String(d)),o("error")}}function p(){o("idle"),x(null),a(null),c.current=!1}return i.enabled&&u&&l==="idle"?{status:"installing",error:null,connection:null,retry:p}:{status:l,error:N,connection:y,retry:p}}const Q="GitHub MCP did not return refreshable repo grant metadata";function O(i){if(typeof i!="string")return null;const e=i.trim();return e.length>0?e:null}function Ce(i){try{const e=new URL(i);return(e.protocol==="http:"||e.protocol==="https:")&&!e.username&&!e.password}catch{return!1}}function Ie(i){return typeof i=="number"&&Number.isFinite(i)&&Number.isInteger(i)&&i>0?i:void 0}async function V(i){const{orgSlug:e,sourceConnection:n,installationId:r,owner:f,repo:l,githubCallTool:o,selfCallTool:N,orgShared:x}=i,y=await o({name:"MINT_REPO_TOKEN",arguments:{installationId:r,owner:f,repo:l,permissions:q}}),a=y.structuredContent;if(y.isError||!a?.token){const h=y.content?.find(_=>_.type==="text")?.text;throw new Error(h?`Failed to mint a repo-scoped GitHub token: ${h}`:"Failed to mint a repo-scoped GitHub token")}const j=O(a.refreshToken),u=O(a.tokenEndpoint),c=O(a.clientId);if(!j||!u||!c)throw new Error(Q);if(!Ce(u))throw new Error(Q);const m=O(a.repository?.owner),p=O(a.repository?.name),d="GitHub MCP returned refresh metadata for a different repository";if(a.repository?.owner!==void 0&&(!m||m.toLowerCase()!==f.toLowerCase()))throw new Error(d);if(a.repository?.name!==void 0&&(!p||p.toLowerCase()!==l.toLowerCase()))throw new Error(d);const g=Ie(a.repository?.id),w=a.expiresAt?Date.parse(a.expiresAt):NaN,b=Number.isFinite(w)?Math.max(0,Math.floor((w-Date.now())/1e3)):null,C=(typeof a.expiresIn=="number"&&Number.isFinite(a.expiresIn)&&Number.isInteger(a.expiresIn)&&a.expiresIn>0?a.expiresIn:null)??b,S=await N({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:{title:`GitHub: ${f}/${l}`,description:`Repo-scoped GitHub access for ${f}/${l}`,icon:n.icon,app_name:n.app_name,app_id:n.app_id,connection_type:n.connection_type,connection_url:n.connection_url,metadata:{...x?{orgShared:!0}:{},repoScope:{installationId:r,repositoryId:g,owner:f,repo:l,permissions:q,grantProvider:"github-mcp"}}}}}),v=S.structuredContent??S,I=v.item?.id??v.id;if(!I)throw new Error("Failed to create the repo-scoped GitHub connection");if(!(await fetch(`/api/${e}/connections/${I}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:a.token,refreshToken:j,expiresIn:C,scope:a.scope??null,clientId:c,tokenEndpoint:u})})).ok)throw await N({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:I,force:!0}}).catch(()=>{}),new Error("Failed to persist the repo-scoped token");return{childConnectionId:I}}function Qe(i){const e=R.c(22),{open:n,onOpenChange:r,title:f,onImportComplete:l,mode:o}=i,N=o===void 0?"agent":o,x=f??(N==="connection"?"Add repo":"Import from GitHub"),[y,a]=T.useState(null);let j;e[0]!==x?(j=t.jsx(re,{className:"sr-only",children:t.jsx(ie,{children:x})}),e[0]=x,e[1]=j):j=e[1];let u;e[2]!==x||e[3]!==y?(u=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:y?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>a(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(X,{size:16})}),t.jsx("img",{src:y.avatarUrl,alt:y.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:y.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(G,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:x})]})}),e[2]=x,e[3]=y,e[4]=u):u=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(L,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=c):c=e[5];let m;e[6]!==r?(m=()=>r(!1),e[6]=r,e[7]=m):m=e[7];let p;e[8]!==N||e[9]!==l||e[10]!==n||e[11]!==y||e[12]!==m?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:c,children:t.jsx(Se,{open:n,onComplete:m,selectedInstallation:y,onSelectInstallation:a,onImportComplete:l,mode:N})})}),e[8]=N,e[9]=l,e[10]=n,e[11]=y,e[12]=m,e[13]=p):p=e[13];let d;e[14]!==j||e[15]!==u||e[16]!==p?(d=t.jsxs(le,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[j,u,p]}),e[14]=j,e[15]=u,e[16]=p,e[17]=d):d=e[17];let g;return e[18]!==r||e[19]!==n||e[20]!==d?(g=t.jsx(ae,{open:n,onOpenChange:r,children:d}),e[18]=r,e[19]=n,e[20]=d,e[21]=g):g=e[21],g}function Se({open:i,onComplete:e,selectedInstallation:n,onSelectInstallation:r,onImportComplete:f,mode:l="agent"}){const{org:o}=U(),N=B(),x=ge(),[y,a]=T.useState(null),j=de({slug:"mcp-github"}),u=he(j),c=we({enabled:i&&u.length===0}),m=u.length===1?u[0]??null:y,p=H({connectionId:m?.id??"",orgId:o.id,orgSlug:o.slug}),d=H({connectionId:Y,orgId:o.id,orgSlug:o.slug}),g=async(s,C)=>{try{const v=await p.callTool({name:"get_file_contents",arguments:{owner:s.owner,repo:s.name,path:C}});if(v.isError)return null;const E=v.content?.find(h=>h.type==="resource")?.resource?.text;if(!E)return null;try{const h=JSON.parse(E);return typeof h=="string"?h:JSON.stringify(h)}catch{return E}}catch{return null}},w=(s,C)=>{Promise.all([g(C,"AGENTS.md"),g(C,"CLAUDE.md")]).then(async([S,v])=>{const I=S??v??null;I&&(await d.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s,data:{metadata:{instructions:I}}}}),$(N,o.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},b=K({mutationFn:async s=>{if(!m||!n)throw new Error("No GitHub connection or installation");const C=n.installationId;if(l==="connection"){const{childConnectionId:I}=await V({orgSlug:o.slug,sourceConnection:m,installationId:C,owner:s.owner,repo:s.name,githubCallTool:E=>p.callTool(E),selfCallTool:E=>d.callTool(E),orgShared:!0});return{virtualMcpId:null,repo:s,connectionId:I,item:null}}const{childConnectionId:S}=await V({orgSlug:o.slug,sourceConnection:m,installationId:C,owner:s.owner,repo:s.name,githubCallTool:I=>p.callTool(I),selfCallTool:I=>d.callTool(I)});let v=null;try{const I=await d.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s.name,description:s.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:s.owner,name:s.name,url:s.url,installationId:C,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),E=I.structuredContent??I,h=E.item?.id;if(!E.item||!h)throw new Error("Failed to create the imported agent");return v=h,{virtualMcpId:h,repo:s,connectionId:S,item:E.item}}catch(I){throw v&&await d.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:v}}).catch(()=>{}),await d.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),I}},onSuccess:({virtualMcpId:s,repo:C,connectionId:S,item:v})=>{if(l==="connection"||!s||!v){$(N,o.id),ee(N,o.id),F.success(`Added ${C.name}`),e();return}if(N.setQueryData(P.collectionItem(d,o.id,"","VIRTUAL_MCP",s),{item:v}),$(N,o.id),w(s,C),f){f({virtualMcpId:s,repo:C,connectionId:S});return}F.success(`Imported ${C.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),x(s)},onError:s=>{F.error("Failed to import repo: "+(s instanceof Error?s.message:"Unknown error"))}});return c.status==="installing"||c.status==="authenticating"?t.jsx(M,{status:c.status,error:null,retry:c.retry}):c.status==="error"?t.jsx(M,{status:"error",error:c.error,retry:c.retry}):u.length===0&&c.status==="idle"?t.jsx(M,{status:"installing",error:null,retry:c.retry}):u.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),u.map(s=>t.jsxs("button",{type:"button",onClick:()=>a(s),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?t.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(G,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}):m?n?t.jsx(Te,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,installation:n,onSelectRepo:s=>b.mutate(s),isSaving:b.isPending}):t.jsx(ve,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,onSelect:r,showBackButton:u.length>1,onBack:()=>a(null)}):null}function ve(i){const e=R.c(47),{connectionId:n,orgId:r,orgSlug:f,onSelect:l,showBackButton:o,onBack:N}=i;let x;e[0]!==r||e[1]!==f?(x={connectionId:Y,orgId:r,orgSlug:f},e[0]=r,e[1]=f,e[2]=x):x=e[2];const y=H(x),a=B(),j=J();let u;e[3]!==n||e[4]!==r?(u=P.githubUserOrgs(r,n),e[3]=n,e[4]=r,e[5]=u):u=e[5];let c;e[6]!==n||e[7]!==y?(c=()=>ye(h=>y.callTool(h),n),e[6]=n,e[7]=y,e[8]=c):c=e[8];let m;e[9]!==u||e[10]!==c?(m={queryKey:u,queryFn:c},e[9]=u,e[10]=c,e[11]=m):m=e[11];const p=te(m);let d;e[12]!==j||e[13]!==n||e[14]!==p||e[15]!==r||e[16]!==f||e[17]!==a?(d={mutationFn:async()=>{const h=await W({connectionId:n,orgId:r,orgSlug:f,persistFallback:k=>j.update.mutateAsync({id:n,data:{connection_token:k}}).then(_e)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const _=new URL(`/api/${f}/mcp/${n}`,window.location.origin);await a.invalidateQueries({queryKey:P.isMCPAuthenticated(_.href,null)}),await a.invalidateQueries({queryKey:P.mcpClientPrefix()}),await p.refetch()},onError:Ee},e[12]=j,e[13]=n,e[14]=p,e[15]=r,e[16]=f,e[17]=a,e[18]=d):d=e[18];const g=K(d);if(p.isLoading){let h;return e[19]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(L,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=h):h=e[19],h}if(p.isError){let h,_;e[20]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),_=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=h,e[21]=_):(h=e[20],_=e[21]);let k;e[22]!==g?(k=()=>g.mutate(),e[22]=g,e[23]=k):k=e[23];let A;e[24]!==g.isPending?(A=g.isPending?t.jsx(L,{size:14,className:"animate-spin"}):t.jsx(G,{className:"size-3.5"}),e[24]=g.isPending,e[25]=A):A=e[25];let z;return e[26]!==g.isPending||e[27]!==k||e[28]!==A?(z=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[h,_,t.jsxs(ne,{type:"button",variant:"outline",size:"sm",onClick:k,disabled:g.isPending,children:[A,"Reconnect GitHub"]})]}),e[26]=g.isPending,e[27]=k,e[28]=A,e[29]=z):z=e[29],z}const w=p.data;if(!w)return null;let b;e[30]!==N||e[31]!==o?(b=o&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:N,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(X,{size:12}),"Change connection"]})}),e[30]=N,e[31]=o,e[32]=b):b=e[32];let s;if(e[33]!==w.installations||e[34]!==l){let h;e[36]!==l?(h=_=>t.jsxs("button",{type:"button",onClick:()=>l(_),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:_.avatarUrl,alt:_.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},_.installationId),e[36]=l,e[37]=h):h=e[37],s=w.installations.map(h),e[33]=w.installations,e[34]=l,e[35]=s}else s=e[35];let C;e[38]!==s?(C=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:s}),e[38]=s,e[39]=C):C=e[39];const S=w.appSlug?`https://github.com/apps/${w.appSlug}/installations/new`:"https://github.com/settings/installations";let v;e[40]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=v):v=e[40];let I;e[41]!==S?(I=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",v]})}),e[41]=S,e[42]=I):I=e[42];let E;return e[43]!==I||e[44]!==b||e[45]!==C?(E=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,C,I]}),e[43]=I,e[44]=b,e[45]=C,e[46]=E):E=e[46],E}function Ee(i){F.error("Failed to reconnect GitHub: "+(i instanceof Error?i.message:"Unknown error"))}function _e(){}function Te(i){const e=R.c(20),{connectionId:n,orgId:r,orgSlug:f,installation:l,onSelectRepo:o,isSaving:N}=i,[x,y]=T.useState(""),a=ue(x,300),j=T.useDeferredValue(a),u=x!==j;let c;e[0]!==u||e[1]!==x?(c=t.jsx(ce,{placeholder:"Search repositories...",value:x,onChange:y,isSearching:u}),e[0]=u,e[1]=x,e[2]=c):c=e[2];const m=u?"opacity-40":"opacity-100";let p;e[3]!==m?(p=D("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",m),e[3]=m,e[4]=p):p=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(L,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=d):d=e[5];let g;e[6]!==n||e[7]!==j||e[8]!==l||e[9]!==N||e[10]!==o||e[11]!==r||e[12]!==f?(g=t.jsx(T.Suspense,{fallback:d,children:t.jsx(ke,{connectionId:n,orgId:r,orgSlug:f,installation:l,query:j,onSelectRepo:o,isSaving:N})}),e[6]=n,e[7]=j,e[8]=l,e[9]=N,e[10]=o,e[11]=r,e[12]=f,e[13]=g):g=e[13];let w;e[14]!==p||e[15]!==g?(w=t.jsx("div",{className:p,children:g}),e[14]=p,e[15]=g,e[16]=w):w=e[16];let b;return e[17]!==c||e[18]!==w?(b=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[c,w]}),e[17]=c,e[18]=w,e[19]=b):b=e[19],b}function ke(i){const e=R.c(29),{connectionId:n,orgId:r,orgSlug:f,installation:l,query:o,onSelectRepo:N,isSaving:x}=i;let y;e[0]!==n||e[1]!==r||e[2]!==f?(y={connectionId:n,orgId:r,orgSlug:f},e[0]=n,e[1]=r,e[2]=f,e[3]=y):y=e[3];const a=H(y),j=l.type==="User"?"user":"org",u=o?`${j}:${l.login} ${o} in:name`:`${j}:${l.login}`;let c;e[4]!==n||e[5]!==l.login||e[6]!==r||e[7]!==o?(c=P.githubOrgRepos(r,n,l.login,o),e[4]=n,e[5]=l.login,e[6]=r,e[7]=o,e[8]=c):c=e[8];let m;e[9]!==a||e[10]!==u?(m=async b=>{const{signal:s}=b,S=(await a.callTool({name:"search_repositories",arguments:{query:u,page:1,perPage:30}},void 0,{signal:s})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(Re)},e[9]=a,e[10]=u,e[11]=m):m=e[11];let p;e[12]!==c||e[13]!==m?(p={queryKey:c,queryFn:m},e[12]=c,e[13]=m,e[14]=p):p=e[14];const{data:d}=se(p);if(d.length===0){let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=b):b=e[15];let s;e[16]!==o?(s=o&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=o,e[17]=s):s=e[17];let C;return e[18]!==s?(C=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[b,s]}),e[18]=s,e[19]=C):C=e[19],C}let g;if(e[20]!==x||e[21]!==N||e[22]!==d){let b;e[24]!==x||e[25]!==N?(b=s=>t.jsxs("button",{type:"button",onClick:()=>N(s),disabled:x,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(G,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:s.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[s.private?t.jsx(oe,{size:10}):t.jsx(fe,{size:10}),s.private?"Private":"Public"]})]},s.fullName),e[24]=x,e[25]=N,e[26]=b):b=e[26],g=d.map(b),e[20]=x,e[21]=N,e[22]=d,e[23]=g}else g=e[23];let w;return e[27]!==g?(w=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[27]=g,e[28]=w):w=e[28],w}function Re(i){return{name:i.name,fullName:i.full_name,owner:i.full_name.split("/")[0]??"",url:i.html_url,private:i.private,description:i.description,updatedAt:i.updated_at}}function M(i){const e=R.c(33),{status:n,error:r,retry:f}=i;if(n==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(G,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=v):v=e[1];const I=r??"Something went wrong while connecting to GitHub.";let E;e[2]!==I?(E=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[v,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:I})]}),e[2]=I,e[3]=E):E=e[3];let h;e[4]!==f?(h=t.jsx("button",{type:"button",onClick:f,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=f,e[5]=h):h=e[5];let _;return e[6]!==E||e[7]!==h?(_=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,E,h]}),e[6]=E,e[7]=h,e[8]=_):_=e[8],_}const l=n==="authenticating";let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(G,{className:"size-5 text-foreground"})}),e[9]=o):o=e[9];let N;e[10]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsxs("div",{className:"relative size-10",children:[o,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(L,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=N):N=e[10];const x=l?"Authenticating with GitHub":"Setting up GitHub";let y;e[11]!==x?(y=t.jsx("p",{className:"text-sm font-medium",children:x}),e[11]=x,e[12]=y):y=e[12];const a=l?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let j;e[13]!==a?(j=t.jsx("p",{className:"text-xs text-muted-foreground",children:a}),e[13]=a,e[14]=j):j=e[14];let u;e[15]!==y||e[16]!==j?(u=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[y,j]}),e[15]=y,e[16]=j,e[17]=u):u=e[17];const c=l?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[18]!==c?(m=D("size-1.5 rounded-full",c),e[18]=c,e[19]=m):m=e[19];let p;e[20]!==m?(p=t.jsx("span",{className:m}),e[20]=m,e[21]=p):p=e[21];const d=l?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[22]!==d?(g=D("size-1.5 rounded-full",d),e[22]=d,e[23]=g):g=e[23];let w;e[24]!==g?(w=t.jsx("span",{className:g}),e[24]=g,e[25]=w):w=e[25];let b;e[26]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=b):b=e[26];let s;e[27]!==p||e[28]!==w?(s=t.jsxs("div",{className:"flex items-center gap-1.5",children:[p,w,b]}),e[27]=p,e[28]=w,e[29]=s):s=e[29];let C;return e[30]!==s||e[31]!==u?(C=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,u,s]}),e[30]=s,e[31]=u,e[32]=C):C=e[32],C}export{Qe as G,G as a,we as b,V as p,be as u};