decocms 2.310.1 → 2.310.3

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 (202) hide show
  1. package/dist/client/assets/{AlertCircle-BUuG9jUS.js → AlertCircle-B72APkrz.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-B2WgGuUG.js → ArrowNarrowLeft-Dz0P9WNF.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-BRxJDyw2.js → ArrowUpRight-CCQZEQ7k.js} +1 -1
  4. package/dist/client/assets/{Check-DNFNSXQB.js → Check-CUpq9BBu.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-fDjMIV_J.js → CheckCircle-DTCxFilU.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-plDbvt9_.js → ChevronDown-D5WF5tyi.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-C6IGuK_L.js → ChevronRight-DwbV0YDZ.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-BQpSShtW.js → ChevronUp-CDMPc0ql.js} +1 -1
  9. package/dist/client/assets/{Container-cby1lpQK.js → Container-BioZd28q.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-CrL41KCh.js → DotsVertical-D8wcDPCU.js} +1 -1
  11. package/dist/client/assets/{LinkExternal01-DDjHJHtD.js → LinkExternal01-CKpEz_fF.js} +1 -1
  12. package/dist/client/assets/{Lock01-CMc8wMJA.js → Lock01-CHfwR6Qi.js} +1 -1
  13. package/dist/client/assets/{Palette-BsSq52os.js → Palette-brLBiHpP.js} +1 -1
  14. package/dist/client/assets/{Play-B93BJPTD.js → Play-DRCdZRLW.js} +1 -1
  15. package/dist/client/assets/{Plus-CsU0klMp.js → Plus-DNkjVBwq.js} +1 -1
  16. package/dist/client/assets/{RefreshCcw01-GcJ7_jjW.js → RefreshCcw01-CdP9yH0w.js} +1 -1
  17. package/dist/client/assets/{SearchMd-CLV2ZHE1.js → SearchMd-JqX1mLMq.js} +1 -1
  18. package/dist/client/assets/{Settings02-CMQBJ6AU.js → Settings02-D1Jfvo1d.js} +1 -1
  19. package/dist/client/assets/{Shield01-Bb8uicnU.js → Shield01-D5fQpAyA.js} +1 -1
  20. package/dist/client/assets/{Star01-DOzaFb6_.js → Star01-Y834gtsL.js} +1 -1
  21. package/dist/client/assets/{Sun-Bp560G7u.js → Sun-BgOSswUu.js} +1 -1
  22. package/dist/client/assets/{Tool01-B1WXLPyp.js → Tool01-CXQZ3p7Z.js} +1 -1
  23. package/dist/client/assets/{Trash01-WbvRG8Rr.js → Trash01-B8-uqWxa.js} +1 -1
  24. package/dist/client/assets/{User01-Dqi_S_yw.js → User01-Cxb6YtJq.js} +1 -1
  25. package/dist/client/assets/{Users03-CmMFskSR.js → Users03-CXkopkPu.js} +1 -1
  26. package/dist/client/assets/{X-26aOhFK-.js → X-CdXDgTcN.js} +1 -1
  27. package/dist/client/assets/{XCircle-DuIm7Kpp.js → XCircle-CjR4LC4r.js} +1 -1
  28. package/dist/client/assets/{XClose-Bet7IpXN.js → XClose-zqTFiPq2.js} +1 -1
  29. package/dist/client/assets/{Zap-DHkXBm_R.js → Zap--FKeiDFf.js} +1 -1
  30. package/dist/client/assets/{ZapSquare-B0Ev1OMS.js → ZapSquare-CliIuzcs.js} +1 -1
  31. package/dist/client/assets/{accordion-D1MMgTV5.js → accordion-BBKL1fM-.js} +1 -1
  32. package/dist/client/assets/{agent-icon-BhSIvnHs.js → agent-icon-CaG-DX2m.js} +1 -1
  33. package/dist/client/assets/{agents-list-DfRZsmWN.js → agents-list-BUqQO9y3.js} +1 -1
  34. package/dist/client/assets/ai-providers-BvV5AI1b.js +1 -0
  35. package/dist/client/assets/{alert-dialog-Booud0bQ.js → alert-dialog-B-P8jHly.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-CfLpBYfo.js → auth-catchall-CyIMPFaS.js} +1 -1
  37. package/dist/client/assets/{automation-list-row-3UbFqf20.js → automation-list-row-Qk3UXtKg.js} +1 -1
  38. package/dist/client/assets/{automations-Bpw-Bphr.js → automations-CkkIdwK3.js} +1 -1
  39. package/dist/client/assets/{avatar-Dr_hgnh5.js → avatar-CYyuZ3vB.js} +1 -1
  40. package/dist/client/assets/{badge-Dc_jqHv8.js → badge-C-R5WeFR.js} +1 -1
  41. package/dist/client/assets/{brand-context-DDkAkGby.js → brand-context-BqPn2XVA.js} +1 -1
  42. package/dist/client/assets/{card-I8QwhHay.js → card-BWjsP1pO.js} +1 -1
  43. package/dist/client/assets/{chat-context-DANvJNxJ.js → chat-context-D7DJNKEQ.js} +1 -1
  44. package/dist/client/assets/{checkbox-YDqzyyON.js → checkbox-DRyB8BVf.js} +1 -1
  45. package/dist/client/assets/{collection-detail-CEcX9P1L.js → collection-detail-BiG3-7wS.js} +1 -1
  46. package/dist/client/assets/{collection-display-button-CEbXTT1D.js → collection-display-button-D0yyhe94.js} +1 -1
  47. package/dist/client/assets/{collection-search-ZtrOS_FO.js → collection-search-BtC9EgTH.js} +1 -1
  48. package/dist/client/assets/{collection-search-54YVIzGK.js → collection-search-CVa4reVh.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-CykRk2i4.js → collection-table-wrapper-C2Zi2ikn.js} +1 -1
  50. package/dist/client/assets/{collection-tabs-BJYdyh2U.js → collection-tabs-8bicuWoG.js} +1 -1
  51. package/dist/client/assets/{collections-B4Ew0_5W.js → collections-ZqRHYd6U.js} +1 -1
  52. package/dist/client/assets/{command-BUdSnxPX.js → command-BUJHwA-d.js} +1 -1
  53. package/dist/client/assets/{connection-card-CPkO4XVy.js → connection-card-CiNzXirJ.js} +1 -1
  54. package/dist/client/assets/{connection-detail-7MO-vamz.js → connection-detail-DQFCqOq5.js} +1 -1
  55. package/dist/client/assets/{connection-form-helpers-DTw0Qq7p.js → connection-form-helpers-BFnOvbFy.js} +1 -1
  56. package/dist/client/assets/{connections-Cae6WzSq.js → connections-BzqA2cUL.js} +1 -1
  57. package/dist/client/assets/{constants-8vN_wpoM.js → constants-BmLTAQzq.js} +1 -1
  58. package/dist/client/assets/{constants-C0Z_UV1B.js → constants-Df56C9B1.js} +1 -1
  59. package/dist/client/assets/{dialog-ChC8b-fd.js → dialog-HqMwvS0c.js} +1 -1
  60. package/dist/client/assets/{domain-settings-wSm6QNFe.js → domain-settings-8zUtZk7o.js} +1 -1
  61. package/dist/client/assets/{drawer-C1rmyAh5.js → drawer-hkToOxOG.js} +1 -1
  62. package/dist/client/assets/{dropdown-menu-BYnm4L0S.js → dropdown-menu-CD1YJIi0.js} +1 -1
  63. package/dist/client/assets/{dynamic-plugin-layout-C8rDQhFA.js → dynamic-plugin-layout--sGvQXk2.js} +1 -1
  64. package/dist/client/assets/{empty-state-B5SEGNSf.js → empty-state-B29HN9Vl.js} +1 -1
  65. package/dist/client/assets/{empty-state-CS1xioMM.js → empty-state-CElAqeAn.js} +1 -1
  66. package/dist/client/assets/{extract-connection-data-CnZlsGuF.js → extract-connection-data-DYXiFLZH.js} +1 -1
  67. package/dist/client/assets/{features-B16s5Y96.js → features-Dvru3uGD.js} +1 -1
  68. package/dist/client/assets/{form-DgLK3RL7.js → form-CKajJk24.js} +1 -1
  69. package/dist/client/assets/{general-f6TAIn-G.js → general-D8u2dVV2.js} +1 -1
  70. package/dist/client/assets/{index-fsAFWsFR.js → index--52kuhAD.js} +1 -1
  71. package/dist/client/assets/{index-DsyVbeAM.js → index-BPbckF-i.js} +3 -3
  72. package/dist/client/assets/{index-CbahmBQ1.js → index-BPgW_PVH.js} +1 -1
  73. package/dist/client/assets/index-BTded5vd.js +1 -0
  74. package/dist/client/assets/{index-CgQIf70g.js → index-Boo37gVZ.js} +1 -1
  75. package/dist/client/assets/{index-CGzddOPN.js → index-CHpjwsZ-.js} +1 -1
  76. package/dist/client/assets/{index-TdWHe30j.js → index-CMbhqARA.js} +1 -1
  77. package/dist/client/assets/{index-BtR3GFsv.js → index-CO402MfB.js} +1 -1
  78. package/dist/client/assets/{index-C5EaiV0u.js → index-CgQG3OxM.js} +1 -1
  79. package/dist/client/assets/{index-DlX-BDoo.js → index-ClxNnAsp.js} +1 -1
  80. package/dist/client/assets/{index-CVMf-cdp.js → index-CnR4TnGO.js} +1 -1
  81. package/dist/client/assets/{index-D3id_i25.js → index-D7rGFiVq.js} +1 -1
  82. package/dist/client/assets/{index-BrFuw-qb.js → index-D9-ppQFz.js} +1 -1
  83. package/dist/client/assets/{index-ofAY-Kzj.js → index-DVk4aJ0j.js} +1 -1
  84. package/dist/client/assets/{index-DCa8vMMj.js → index-Y4klGMPr.js} +1 -1
  85. package/dist/client/assets/{index--hcGoWBP.js → index-k8njt3_A.js} +2 -2
  86. package/dist/client/assets/{infiniteQueryObserver-Bw_LLK9Y.js → infiniteQueryObserver-IG8f9wWg.js} +1 -1
  87. package/dist/client/assets/{input-Di5VhXrx.js → input-DrFzs1Yw.js} +1 -1
  88. package/dist/client/assets/{integration-icon-BFclX5Vo.js → integration-icon-DUMCOZJc.js} +1 -1
  89. package/dist/client/assets/{label--CSWWgsb.js → label-0J4Z8Ji8.js} +1 -1
  90. package/dist/client/assets/{layout-DGzZ7eIZ.js → layout-zbF9c9kI.js} +1 -1
  91. package/dist/client/assets/{lean-canvas-recruit-modal-BRNt7FNZ.js → lean-canvas-recruit-modal-D2QgFiqW.js} +1 -1
  92. package/dist/client/assets/{login-CWxs7FH8.js → login-m1plet6k.js} +1 -1
  93. package/dist/client/assets/{members-D-RcZScv.js → members-DsVQeYYP.js} +1 -1
  94. package/dist/client/assets/{monaco-editor-BRZw2Ss_.js → monaco-editor-Br1M5lwR.js} +1 -1
  95. package/dist/client/assets/{monitoring-stats-row-BELQHcMp.js → monitoring-stats-row-BtBHpMXc.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-D1mU79r6.js → oauth-callback-D6DOFeyW.js} +1 -1
  97. package/dist/client/assets/{oauth-callback-ai-provider-BI3N0zYC.js → oauth-callback-ai-provider-wUhwntlH.js} +1 -1
  98. package/dist/client/assets/{onboarding-Corplh-J.js → onboarding-dml5YruP.js} +1 -1
  99. package/dist/client/assets/{org-layout-Dw015CRn.js → org-layout-QSP-N9k0.js} +1 -1
  100. package/dist/client/assets/{org-plugin-layout-BhY_p3Sb.js → org-plugin-layout-ZONr0rlX.js} +1 -1
  101. package/dist/client/assets/{pair-BkQ-4R0Y.js → pair-mf97TAS_.js} +2 -2
  102. package/dist/client/assets/{plugin-empty-state-Daxzikof.js → plugin-empty-state-CFxEUNdF.js} +1 -1
  103. package/dist/client/assets/{plugin-header-DxSn3bJb.js → plugin-header-HXnwUdYS.js} +1 -1
  104. package/dist/client/assets/{plugin-layout-CLDR8aeJ.js → plugin-layout-ZwMLw5wK.js} +1 -1
  105. package/dist/client/assets/{popover-BxTvqO7l.js → popover-DUMNq33j.js} +1 -1
  106. package/dist/client/assets/{profile-CiaA4yp_.js → profile-CyqjRQfg.js} +1 -1
  107. package/dist/client/assets/{project-app-view-C9qLbJFL.js → project-app-view-Di4yF5Oz.js} +1 -1
  108. package/dist/client/assets/registry-DgOCTdY8.js +2 -0
  109. package/dist/client/assets/{registry-layout-DUo-P35f.js → registry-layout-B2U_9fgO.js} +1 -1
  110. package/dist/client/assets/{required-auth-layout-BnqlPeG9.js → required-auth-layout-PH0-_blQ.js} +1 -1
  111. package/dist/client/assets/{reset-password-DHzLCFSu.js → reset-password-5ioWEbN5.js} +1 -1
  112. package/dist/client/assets/{roles-qTMcTl_m.js → roles-4ojRgHgc.js} +1 -1
  113. package/dist/client/assets/{scroll-area-VgUNFi6v.js → scroll-area-D_tsHfC-.js} +1 -1
  114. package/dist/client/assets/{search-input-Fm6Uugnb.js → search-input-Boj5tfQn.js} +1 -1
  115. package/dist/client/assets/{select-4BiO-1He.js → select-B3lWwv9y.js} +1 -1
  116. package/dist/client/assets/{select-model-DbFtB1R4.js → select-model-C-fLwr4k.js} +1 -1
  117. package/dist/client/assets/{settings-layout-B4AxAY74.js → settings-layout-U-ZhWkRq.js} +1 -1
  118. package/dist/client/assets/{settings-section-BqQHUry6.js → settings-section-qufbNRCL.js} +1 -1
  119. package/dist/client/assets/{shell-layout-CcLP72E6.js → shell-layout-G8D-0WXl.js} +1 -1
  120. package/dist/client/assets/{skeleton-D_v3jh_x.js → skeleton-BfKJMKYc.js} +1 -1
  121. package/dist/client/assets/{sso-BgjWtdcn.js → sso-BdojNoX2.js} +1 -1
  122. package/dist/client/assets/{store-IULAwEa2.js → store-DGVb_5C1.js} +1 -1
  123. package/dist/client/assets/store-registry-KlW3QwUJ.js +2 -0
  124. package/dist/client/assets/{switch-Uh77-H9s.js → switch-YLfAn92x.js} +1 -1
  125. package/dist/client/assets/{table-BCa0VyBS.js → table-wHPRdxYv.js} +1 -1
  126. package/dist/client/assets/{tabs-CJMCPubd.js → tabs-8aX3BTo-.js} +1 -1
  127. package/dist/client/assets/{task-status-QVkFLAWD.js → task-status-CY3ltf_M.js} +1 -1
  128. package/dist/client/assets/{textarea-IkB1PXd2.js → textarea-BJZt5-vN.js} +1 -1
  129. package/dist/client/assets/{toggle-group-CxTeQVbK.js → toggle-group-C_B32Tm8.js} +1 -1
  130. package/dist/client/assets/{tools-list-PZv7L79s.js → tools-list-bxPeEc0p.js} +1 -1
  131. package/dist/client/assets/{tooltip-DwEKoS3m.js → tooltip-B26xbtws.js} +1 -1
  132. package/dist/client/assets/{types-DBa5NWuL.js → types-DfgXo_cD.js} +1 -1
  133. package/dist/client/assets/{use-ai-providers-hUoQ1QKn.js → use-ai-providers-CnyJW7s-.js} +1 -1
  134. package/dist/client/assets/{use-collections-CbyJ6t6i.js → use-collections-D66SnH5Q.js} +1 -1
  135. package/dist/client/assets/{use-connection-BZIS5d-M.js → use-connection-9VrA1Bg7.js} +1 -1
  136. package/dist/client/assets/{use-copy-BhwMe7lW.js → use-copy-DpxSUjqd.js} +1 -1
  137. package/dist/client/assets/{use-create-virtual-mcp-Qup6KxHA.js → use-create-virtual-mcp-DBfs4FWm.js} +1 -1
  138. package/dist/client/assets/{use-debounced-autosave-De7heoii.js → use-debounced-autosave-Ja8PcJv_.js} +1 -1
  139. package/dist/client/assets/{use-decopilot-events-BSFPv0OJ.js → use-decopilot-events-DjAxcjIH.js} +1 -1
  140. package/dist/client/assets/{use-delete-connection-CVL2tyXf.js → use-delete-connection-7Blp6D0s.js} +1 -1
  141. package/dist/client/assets/{use-infinite-scroll-B1XpJhs7.js → use-infinite-scroll-IwyU_OvC.js} +1 -1
  142. package/dist/client/assets/{use-list-state-NYzHNEE3.js → use-list-state-Dk2QFrYd.js} +1 -1
  143. package/dist/client/assets/{use-mcp-tools-DEJYwjVI.js → use-mcp-tools-C7yIpDHe.js} +1 -1
  144. package/dist/client/assets/{use-members-CE8F-6Pl.js → use-members-Bg4ZFsu9.js} +1 -1
  145. package/dist/client/assets/{use-navigate-to-agent-BQCBqC6w.js → use-navigate-to-agent-BehsrrsA.js} +1 -1
  146. package/dist/client/assets/{use-org-auth-client-DWMaaDOW.js → use-org-auth-client-mkgKwCAh.js} +1 -1
  147. package/dist/client/assets/{use-org-sso-DG73ueOt.js → use-org-sso-Xv4QV2bL.js} +1 -1
  148. package/dist/client/assets/{use-organization-roles-C_InafKr.js → use-organization-roles-BmH8DM7C.js} +1 -1
  149. package/dist/client/assets/{use-organization-settings-DU3tZPVG.js → use-organization-settings-Coi7Ggqq.js} +1 -1
  150. package/dist/client/assets/{use-registry-connections-BB_6SUlA.js → use-registry-connections-_83vUYHS.js} +1 -1
  151. package/dist/client/assets/{use-status-sounds--S4wlp-c.js → use-status-sounds-DLYnzZvv.js} +1 -1
  152. package/dist/client/assets/{use-tasks-BXrbnymy.js → use-tasks-CUt44N_R.js} +1 -1
  153. package/dist/client/assets/{use-view-mode-30iczyXm.js → use-view-mode-CZXZPLm6.js} +1 -1
  154. package/dist/client/assets/{use-virtual-mcp-DqC7TCRl.js → use-virtual-mcp-BlYQqAfZ.js} +1 -1
  155. package/dist/client/assets/useInfiniteQuery-BJ1I2JSf.js +1 -0
  156. package/dist/client/assets/useSuspenseInfiniteQuery-BpfkmtaB.js +1 -0
  157. package/dist/client/assets/{user-CU2SK3qY.js → user-BFqIXUgg.js} +1 -1
  158. package/dist/client/assets/{view-mode-toggle-ChONnJPm.js → view-mode-toggle-BC7A6oBR.js} +1 -1
  159. package/dist/client/assets/{workflow-C2A8waKp.js → workflow-B3ajRQIi.js} +1 -1
  160. package/dist/client/assets/workflow-detail-l83JU-Mp.js +1 -0
  161. package/dist/client/index.html +1 -1
  162. package/dist/server/cli.js +4 -4
  163. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  164. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  165. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  166. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  167. package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
  168. package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
  169. package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
  170. package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
  171. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  172. package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
  173. package/dist/server/node_modules/{slice-ansi → is-fullwidth-code-point}/license +0 -1
  174. package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
  175. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
  176. package/dist/server/server.js +3 -3
  177. package/package.json +1 -1
  178. package/dist/client/assets/ai-providers-C2Z8tM8W.js +0 -1
  179. package/dist/client/assets/index-Cf1ZbDa8.js +0 -1
  180. package/dist/client/assets/registry-Ijr9ccjx.js +0 -2
  181. package/dist/client/assets/store-registry-BRPkAkWY.js +0 -2
  182. package/dist/client/assets/useInfiniteQuery-Cy6k7dIo.js +0 -1
  183. package/dist/client/assets/useSuspenseInfiniteQuery-DvQj0VfO.js +0 -1
  184. package/dist/client/assets/workflow-detail-DtfIhsSe.js +0 -1
  185. package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
  186. package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
  187. package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
  188. package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
  189. package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
  190. package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
  191. package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
  192. package/dist/server/node_modules/mimic-fn/index.d.ts +0 -54
  193. package/dist/server/node_modules/mimic-fn/index.js +0 -13
  194. package/dist/server/node_modules/mimic-fn/package.json +0 -42
  195. package/dist/server/node_modules/mimic-fn/readme.md +0 -69
  196. package/dist/server/node_modules/slice-ansi/index.d.ts +0 -19
  197. package/dist/server/node_modules/slice-ansi/index.js +0 -260
  198. package/dist/server/node_modules/slice-ansi/package.json +0 -59
  199. package/dist/server/node_modules/slice-ansi/readme.md +0 -54
  200. package/dist/server/node_modules/slice-ansi/tokenize-ansi.js +0 -752
  201. /package/dist/server/node_modules/{get-east-asian-width → ansi-styles}/license +0 -0
  202. /package/dist/server/node_modules/{mimic-fn → escape-string-regexp}/license +0 -0
@@ -1 +1 @@
1
- import{e as b,s as k,o as E,bM as P,j as i,X as K,aG as _,K as S,x as q}from"./index--hcGoWBP.js";import{P as x}from"./index-DlX-BDoo.js";import{e as I}from"./use-organization-settings-DU3tZPVG.js";import{S as Q}from"./switch-Uh77-H9s.js";import{n as R}from"./Container-cby1lpQK.js";import{b as w,S as z,a as F,d as M}from"./settings-section-BqQHUry6.js";import"./tooltip-DwEKoS3m.js";import"./X-26aOhFK-.js";import"./constants-C0Z_UV1B.js";import"./card-I8QwhHay.js";import"./ArrowUpRight-BRxJDyw2.js";function N(){const e=b.c(17),{org:t,project:s}=k(),o=E();let d;e[0]!==s.enabledPlugins?(d=s.enabledPlugins??[],e[0]=s.enabledPlugins,e[1]=d):d=e[1];const c=d,l=I();let m;e[2]!==t||e[3]!==s.slug||e[4]!==o?(m=()=>{o.invalidateQueries({queryKey:S.project(t.id,s.slug)}),o.invalidateQueries({queryKey:S.projects(t.id)}),o.invalidateQueries({predicate:n=>{const r=n.queryKey;return r[1]===t.id&&r[3]==="collection"&&r[4]==="VIRTUAL_MCP"}})},e[2]=t,e[3]=s.slug,e[4]=o,e[5]=m):m=e[5];const j=m;let g;e[6]!==j||e[7]!==l||e[8]!==c?(g=(n,r)=>{const u=new Set(c);r?u.add(n):u.delete(n),l.mutate({enabled_plugins:Array.from(u)},{onSuccess:j,onError:A})},e[6]=j,e[7]=l,e[8]=c,e[9]=g):g=e[9];const p=g,y=$,C=U;if(P.length===0){let n;return e[10]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}),e[10]=n):n=e[10],n}let a;e[11]!==p||e[12]!==l||e[13]!==c?(a=P.map(n=>{const r=y(n.id),u=C(n.id),h=c.includes(n.id);return i.jsx(w,{title:r?.label??n.id,description:u??void 0,icon:i.jsx("span",{className:"text-muted-foreground [&>svg]:size-4",children:r?.icon??i.jsx(R,{size:14})}),onClick:()=>!l.isPending&&p(n.id,!h),action:i.jsx(Q,{checked:h,onCheckedChange:v=>p(n.id,v),disabled:l.isPending,onClick:T})},n.id)}),e[11]=p,e[12]=l,e[13]=c,e[14]=a):a=e[14];let f;return e[15]!==a?(f=i.jsx(z,{children:i.jsx(F,{children:a})}),e[15]=a,e[16]=f):f=e[16],f}function T(e){return e.stopPropagation()}function U(e){return P.find(s=>s.id===e)?.description??null}function $(e){const t=K.find(o=>o.pluginId===e);if(t)return{label:t.label,icon:t.items[0]?.icon};const s=_.find(o=>o.pluginId===e);return s?{label:s.label,icon:s.icon}:null}function A(e){q.error("Failed to update plugin: "+(e instanceof Error?e.message:"Unknown error"))}function D(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(x,{children:i.jsx(x.Content,{children:i.jsx(x.Body,{children:i.jsxs(M,{children:[i.jsx(x.Title,{children:"Plugins"}),i.jsx(N,{})]})})})}),e[0]=t):t=e[0],t}function ee(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D,{}),e[0]=t):t=e[0],t}export{ee as default};
1
+ import{e as b,s as k,o as E,bM as P,j as i,X as K,aG as _,K as S,x as q}from"./index-k8njt3_A.js";import{P as x}from"./index-ClxNnAsp.js";import{e as I}from"./use-organization-settings-Coi7Ggqq.js";import{S as Q}from"./switch-YLfAn92x.js";import{n as R}from"./Container-BioZd28q.js";import{b as w,S as z,a as F,d as M}from"./settings-section-qufbNRCL.js";import"./tooltip-B26xbtws.js";import"./X-CdXDgTcN.js";import"./constants-Df56C9B1.js";import"./card-BWjsP1pO.js";import"./ArrowUpRight-CCQZEQ7k.js";function N(){const e=b.c(17),{org:t,project:s}=k(),o=E();let d;e[0]!==s.enabledPlugins?(d=s.enabledPlugins??[],e[0]=s.enabledPlugins,e[1]=d):d=e[1];const c=d,l=I();let m;e[2]!==t||e[3]!==s.slug||e[4]!==o?(m=()=>{o.invalidateQueries({queryKey:S.project(t.id,s.slug)}),o.invalidateQueries({queryKey:S.projects(t.id)}),o.invalidateQueries({predicate:n=>{const r=n.queryKey;return r[1]===t.id&&r[3]==="collection"&&r[4]==="VIRTUAL_MCP"}})},e[2]=t,e[3]=s.slug,e[4]=o,e[5]=m):m=e[5];const j=m;let g;e[6]!==j||e[7]!==l||e[8]!==c?(g=(n,r)=>{const u=new Set(c);r?u.add(n):u.delete(n),l.mutate({enabled_plugins:Array.from(u)},{onSuccess:j,onError:A})},e[6]=j,e[7]=l,e[8]=c,e[9]=g):g=e[9];const p=g,y=$,C=U;if(P.length===0){let n;return e[10]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}),e[10]=n):n=e[10],n}let a;e[11]!==p||e[12]!==l||e[13]!==c?(a=P.map(n=>{const r=y(n.id),u=C(n.id),h=c.includes(n.id);return i.jsx(w,{title:r?.label??n.id,description:u??void 0,icon:i.jsx("span",{className:"text-muted-foreground [&>svg]:size-4",children:r?.icon??i.jsx(R,{size:14})}),onClick:()=>!l.isPending&&p(n.id,!h),action:i.jsx(Q,{checked:h,onCheckedChange:v=>p(n.id,v),disabled:l.isPending,onClick:T})},n.id)}),e[11]=p,e[12]=l,e[13]=c,e[14]=a):a=e[14];let f;return e[15]!==a?(f=i.jsx(z,{children:i.jsx(F,{children:a})}),e[15]=a,e[16]=f):f=e[16],f}function T(e){return e.stopPropagation()}function U(e){return P.find(s=>s.id===e)?.description??null}function $(e){const t=K.find(o=>o.pluginId===e);if(t)return{label:t.label,icon:t.items[0]?.icon};const s=_.find(o=>o.pluginId===e);return s?{label:s.label,icon:s.icon}:null}function A(e){q.error("Failed to update plugin: "+(e instanceof Error?e.message:"Unknown error"))}function D(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(x,{children:i.jsx(x.Content,{children:i.jsx(x.Body,{children:i.jsxs(M,{children:[i.jsx(x.Title,{children:"Plugins"}),i.jsx(N,{})]})})})}),e[0]=t):t=e[0],t}function ee(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D,{}),e[0]=t):t=e[0],t}export{ee as default};
@@ -1 +1 @@
1
- import{bW as b,e as f,j as c,D as C,r as d,c as p,aY as j,bX as v,bY as h}from"./index--hcGoWBP.js";import{L as N}from"./label--CSWWgsb.js";const E=b,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(C,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(j,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
1
+ import{bW as b,e as f,j as c,D as C,r as d,c as p,aY as j,bX as v,bY as h}from"./index-k8njt3_A.js";import{L as N}from"./label-0J4Z8Ji8.js";const E=b,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(C,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(j,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
@@ -1 +1 @@
1
- import{f as re,s as ce,o as de,z as me,C as ue,a as fe,t as Y,x as K,K as te,j as s,D as se,H as ge,J as W,e as $,r as H,B as G,c as xe,M as pe}from"./index--hcGoWBP.js";import{P as V}from"./index-DlX-BDoo.js";import{u as he}from"./use-org-auth-client-DWMaaDOW.js";import{u as je}from"./use-debounced-autosave-De7heoii.js";import{A as be}from"./avatar-Dr_hgnh5.js";import{I as ve}from"./input-Di5VhXrx.js";import{S as X,a as Z,b as Q,c as Se,d as ye}from"./settings-section-BqQHUry6.js";import{D as Ne}from"./domain-settings-wSm6QNFe.js";import{u as Ce,a as ne,D as we,c as _e,S as ze,v as De,K as Ae,P as Pe,d as ke,C as Ie,s as Ee,b as Te,e as Oe}from"./collection-search-ZtrOS_FO.js";import{W as ee,i as Re}from"./constants-C0Z_UV1B.js";import{b as le}from"./use-virtual-mcp-DqC7TCRl.js";import{b as Le,P as $e,a as Fe}from"./popover-BxTvqO7l.js";import{S as Me}from"./skeleton-D_v3jh_x.js";import{y as Be}from"./agent-icon-BhSIvnHs.js";import{s as He}from"./Plus-CsU0klMp.js";import{a as ae}from"./Users03-CmMFskSR.js";import{i as Ke}from"./X-26aOhFK-.js";import{I as J}from"./integration-icon-BFclX5Vo.js";import{a as Ue,d as qe}from"./use-organization-settings-DU3tZPVG.js";import"./tooltip-DwEKoS3m.js";import"./User01-Dqi_S_yw.js";import"./card-I8QwhHay.js";import"./ArrowUpRight-BRxJDyw2.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./switch-Uh77-H9s.js";import"./SearchMd-CLV2ZHE1.js";import"./use-collections-CbyJ6t6i.js";import"./AlertCircle-BUuG9jUS.js";import"./Tool01-B1WXLPyp.js";import"./XClose-Bet7IpXN.js";import"./RefreshCcw01-GcJ7_jjW.js";import"./ArrowNarrowLeft-B2WgGuUG.js";import"./XCircle-DuIm7Kpp.js";import"./ZapSquare-B0Ev1OMS.js";import"./CheckCircle-fDjMIV_J.js";import"./Check-DNFNSXQB.js";import"./ChevronDown-plDbvt9_.js";import"./ChevronRight-C6IGuK_L.js";import"./ChevronUp-BQpSShtW.js";import"./DotsVertical-CrL41KCh.js";import"./Container-cby1lpQK.js";import"./Star01-DOzaFb6_.js";import"./Palette-BsSq52os.js";import"./LinkExternal01-DDjHJHtD.js";import"./Lock01-CMc8wMJA.js";import"./Sun-Bp560G7u.js";import"./Play-B93BJPTD.js";import"./Settings02-CMQBJ6AU.js";import"./Shield01-Bb8uicnU.js";import"./Trash01-WbvRG8Rr.js";import"./Zap-DHkXBm_R.js";const Ve=ge({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function Ge(t){const e=$.c(13),{value:a,onChange:l,name:r,disabled:d}=t,n=H.useRef(null);let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=()=>n.current?.click(),e[0]=h):h=e[0];const m=h;let b;e[1]!==l?(b=z=>{const x=z.target.files?.[0];if(!x)return;if(x.size>2097152){K.error("Image must be smaller than 2MB");return}const v=new FileReader;v.onerror=We,v.onloadend=()=>{v.result&&l(v.result),n.current&&(n.current.value="")},v.readAsDataURL(x)},e[1]=l,e[2]=b):b=e[2];const o=b;let i;e[3]!==d||e[4]!==o?(i=s.jsx("input",{ref:n,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:d}),e[3]=d,e[4]=o,e[5]=i):i=e[5];const u=a||void 0,j=r??"?";let f;e[6]!==u||e[7]!==j?(f=s.jsx(be,{url:u,fallback:j,shape:"square",size:"base"}),e[6]=u,e[7]=j,e[8]=f):f=e[8];let g;return e[9]!==d||e[10]!==i||e[11]!==f?(g=s.jsxs("button",{type:"button",onClick:m,disabled:d,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[i,f]}),e[9]=d,e[10]=i,e[11]=f,e[12]=g):g=e[12],g}function We(){return K.error("Failed to read image")}function Qe(){const t=re(),{org:e}=ce(),a=he(),l=de(),r=me({resolver:ue(Ve),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),d=fe({mutationFn:async o=>{const i={name:o.name,slug:o.slug};o.logo&&(i.logo=o.logo);const u=await a.organization.update({data:i});if(u?.error)throw new Error(u.error.message||"Failed to update organization");return u},onSuccess:(o,i)=>{Y("organization_settings_updated",{organization_id:e.id,fields:Object.keys(i)}),l.invalidateQueries({queryKey:te.organizations()}),l.invalidateQueries({queryKey:te.activeOrganization(e.slug)}),o?.data?.slug&&o.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:o.data.slug}})},onError:(o,i)=>{Y("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(i),error:o instanceof Error?o.message:String(o)}),K.error(o instanceof Error?o.message:"Failed to update organization")}}),{schedule:n,flush:h}=je({save:async()=>{!r.formState.isDirty||!await r.trigger()||await d.mutateAsync(r.getValues())}}),m=r.formState.errors,b=typeof window<"u"?`${window.location.host}/`:"";return s.jsx(X,{children:s.jsxs(Z,{children:[s.jsx(Q,{title:"Logo",description:"Recommended size is 256x256px",action:s.jsx(Ge,{value:r.watch("logo"),onChange:o=>{r.setValue("logo",o??"",{shouldDirty:!0}),h()},name:r.watch("name")})}),s.jsx(Q,{title:"Name",action:s.jsx(se,{control:r.control,name:"name",render:({field:o})=>s.jsx(ve,{id:"org-name",...o,onChange:i=>{o.onChange(i),n()},onBlur:()=>{o.onBlur(),h()},placeholder:"Organization name",className:"w-[280px]"})})}),s.jsx(Q,{title:"URL",action:s.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[b&&s.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:b}),s.jsx(se,{control:r.control,name:"slug",render:({field:o})=>s.jsx("input",{id:"org-slug",value:o.value??"",name:o.name,ref:o.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:i=>{const u=i.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");r.setValue("slug",u,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),n()},onBlur:()=>{o.onBlur(),h()}})})]})}),(m.name||m.slug||m.logo)&&s.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[m.name&&s.jsx("p",{className:"text-xs text-destructive",children:m.name.message}),m.slug&&s.jsx("p",{className:"text-xs text-destructive",children:m.slug.message}),m.logo&&s.jsx("p",{className:"text-xs text-destructive",children:m.logo.message})]})]})})}const oe=["site-editor","site-diagnostics","ai-image","ai-research"],ie=8;function Ye(t,e,a){const l=e.find(d=>d.id===t);if(l)return{id:l.id,title:l.title,icon:l.icon,kind:"template"};const r=a.find(d=>d.id===t);return r?{id:t,title:r.title,icon:r.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function Je(t){const e=$.c(39),{agent:a,onRemove:l}=t;let r;e[0]!==a.id?(r={id:a.id},e[0]=a.id,e[1]=r):r=e[1];const{attributes:d,listeners:n,setNodeRef:h,transform:m,transition:b,isDragging:o}=ke(r);let i;e[2]!==m?(i=Ie.Transform.toString(m),e[2]=m,e[3]=i):i=e[3];const u=o?.5:void 0,j=o?100:void 0;let f;e[4]!==i||e[5]!==u||e[6]!==j||e[7]!==b?(f={transform:i,transition:b,opacity:u,zIndex:j},e[4]=i,e[5]=u,e[6]=j,e[7]=b,e[8]=f):f=e[8];const g=f,z=o&&"shadow-lg";let x;e[9]!==z?(x=xe("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",z),e[9]=z,e[10]=x):x=e[10];const v=`Drag to reorder ${a.title}`;let D;e[11]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Be,{size:14}),e[11]=D):D=e[11];let k;e[12]!==d||e[13]!==n||e[14]!==v?(k=s.jsx("button",{type:"button",...d,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":v,children:D}),e[12]=d,e[13]=n,e[14]=v,e[15]=k):k=e[15];let N;e[16]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ae,{size:14}),e[16]=N):N=e[16];let w;e[17]!==a.icon||e[18]!==a.title?(w=s.jsx(J,{icon:a.icon,name:a.title,size:"xs",fallbackIcon:N}),e[17]=a.icon,e[18]=a.title,e[19]=w):w=e[19];let S;e[20]!==a.title?(S=s.jsx("span",{className:"text-sm text-foreground truncate",children:a.title}),e[20]=a.title,e[21]=S):S=e[21];const _=a.kind==="template"?"Template":a.kind==="custom"?"Custom agent":"Unavailable";let p;e[22]!==_?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:_}),e[22]=_,e[23]=p):p=e[23];let y;e[24]!==S||e[25]!==p?(y=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[S,p]}),e[24]=S,e[25]=p,e[26]=y):y=e[26];const I=`Remove ${a.title}`;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ke,{size:14}),e[27]=A):A=e[27];let C;e[28]!==l||e[29]!==I?(C=s.jsx("button",{type:"button",onClick:l,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":I,children:A}),e[28]=l,e[29]=I,e[30]=C):C=e[30];let P;return e[31]!==h||e[32]!==g||e[33]!==k||e[34]!==w||e[35]!==y||e[36]!==C||e[37]!==x?(P=s.jsxs("div",{ref:h,style:g,className:x,children:[k,w,y,C]}),e[31]=h,e[32]=g,e[33]=k,e[34]=w,e[35]=y,e[36]=C,e[37]=x,e[38]=P):P=e[38],P}function Xe(t){const e=$.c(48),{selectedIds:a,onAdd:l}=t,[r,d]=H.useState(!1),[n,h]=H.useState(""),m=le();let b;e[0]!==a?(b=new Set(a),e[0]=a,e[1]=b):b=e[1];const o=b;let i,u,j,f,g,z,x,v,D,k,N,w,S;if(e[2]!==m||e[3]!==l||e[4]!==r||e[5]!==n||e[6]!==o){const A=n.toLowerCase();f=ee.filter(c=>!o.has(c.id)&&(!n||c.title.toLowerCase().includes(A)));let C;e[20]!==o?(C=c=>c.id!==null&&!Re(c.id)&&!o.has(c.id),e[20]=o,e[21]=C):C=e[21],j=m.filter(C).filter(c=>!n||c.title.toLowerCase().includes(A));let P;e[22]!==l?(P=c=>{l(c),d(!1),h("")},e[22]=l,e[23]=P):P=e[23];const T=P;u=Le,w=r,S=d,e[24]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx($e,{asChild:!0,children:s.jsxs(G,{type:"button",variant:"outline",size:"sm",children:[s.jsx(He,{size:14}),"Add agent"]})}),e[24]=g):g=e[24],i=Fe,D="w-[320px] p-0 overflow-hidden",k="start",e[25]!==n?(N=s.jsx(Oe,{value:n,onChange:h,placeholder:"Search agents..."}),e[25]=n,e[26]=N):N=e[26],z="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",x=f.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Templates"}),f.map(c=>s.jsxs("button",{type:"button",onClick:()=>T(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),v=j.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Custom agents"}),j.map(c=>s.jsxs("button",{type:"button",onClick:()=>T(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs",fallbackIcon:s.jsx(ae,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),e[2]=m,e[3]=l,e[4]=r,e[5]=n,e[6]=o,e[7]=i,e[8]=u,e[9]=j,e[10]=f,e[11]=g,e[12]=z,e[13]=x,e[14]=v,e[15]=D,e[16]=k,e[17]=N,e[18]=w,e[19]=S}else i=e[7],u=e[8],j=e[9],f=e[10],g=e[11],z=e[12],x=e[13],v=e[14],D=e[15],k=e[16],N=e[17],w=e[18],S=e[19];let _;e[27]!==j||e[28]!==f.length||e[29]!==n?(_=f.length===0&&j.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground text-center py-6",children:n?"No agents found":"All agents are already added"}),e[27]=j,e[28]=f.length,e[29]=n,e[30]=_):_=e[30];let p;e[31]!==_||e[32]!==z||e[33]!==x||e[34]!==v?(p=s.jsxs("div",{className:z,children:[x,v,_]}),e[31]=_,e[32]=z,e[33]=x,e[34]=v,e[35]=p):p=e[35];let y;e[36]!==i||e[37]!==p||e[38]!==D||e[39]!==k||e[40]!==N?(y=s.jsxs(i,{className:D,align:k,children:[N,p]}),e[36]=i,e[37]=p,e[38]=D,e[39]=k,e[40]=N,e[41]=y):y=e[41];let I;return e[42]!==u||e[43]!==g||e[44]!==y||e[45]!==w||e[46]!==S?(I=s.jsxs(u,{open:w,onOpenChange:S,children:[g,y]}),e[42]=u,e[43]=g,e[44]=y,e[45]=w,e[46]=S,e[47]=I):I=e[47],I}function Ze(){const t=$.c(61),e=Ue(),a=le(),l=qe();let r;t[0]!==e?.ids?(r=e?.ids??[...oe],t[0]=e?.ids,t[1]=r):r=t[1];const d=r,[n,h]=H.useState(d);let m;t[2]!==n||t[3]!==d?(m=n.length!==d.length||n.some((E,O)=>E!==d[O]),t[2]=n,t[3]=d,t[4]=m):m=t[4];const b=m;let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o={activationConstraint:{distance:5}},t[5]=o):o=t[5];let i;t[6]===Symbol.for("react.memo_cache_sentinel")?(i={coordinateGetter:Ee},t[6]=i):i=t[6];const u=Ce(ne(Pe,o),ne(Ae,i));let j;t[7]!==n?(j=E=>{const{active:O,over:R}=E;if(!R||O.id===R.id)return;const L=n.indexOf(O.id),q=n.indexOf(R.id);L===-1||q===-1||h(Te([...n],L,q))},t[7]=n,t[8]=j):j=t[8];const f=j;let g;t[9]!==n?(g=E=>{n.includes(E)||h([...n,E])},t[9]=n,t[10]=g):g=t[10];const z=g;let x;t[11]!==n?(x=E=>{h(n.filter(O=>O!==E))},t[11]=n,t[12]=x):x=t[12];const v=x;let D;t[13]===Symbol.for("react.memo_cache_sentinel")?(D=()=>{h([...oe])},t[13]=D):D=t[13];const k=D;let N;t[14]!==n||t[15]!==l?(N=()=>{l.mutate({ids:n},{onSuccess:()=>{Y("default_home_agents_updated",{count:n.length,template_count:n.filter(tt).length}),K.success("Default home agents updated")},onError:et})},t[14]=n,t[15]=l,t[16]=N):N=t[16];const w=N;let S,_,p,y,I,A,C;if(t[17]!==a||t[18]!==n||t[19]!==f||t[20]!==v||t[21]!==u||t[22]!==l.isPending){let E;t[30]!==a?(E=L=>Ye(L,ee,a),t[30]=a,t[31]=E):E=t[31];const O=n.map(E);p=Math.max(0,n.length-ie),_=X,I="Default home agents";let R;t[32]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(pe,{size:14}),t[32]=R):R=t[32],t[33]!==l.isPending?(A=s.jsxs(G,{type:"button",variant:"ghost",size:"sm",onClick:k,disabled:l.isPending,children:[R,"Reset defaults"]}),t[33]=l.isPending,t[34]=A):A=t[34],S=Z,C="px-5 py-5 flex flex-col gap-3",y=O.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-border p-6 text-center text-xs text-muted-foreground",children:'No agents selected. The home view will only show "Create agent".'}):s.jsx(we,{sensors:u,collisionDetection:_e,onDragEnd:f,children:s.jsx(ze,{items:n,strategy:De,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:O.map((L,q)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[q===ie&&s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-xs text-muted-foreground",children:[s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx("span",{children:"Below this line is hidden on the home view"}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),s.jsx(Je,{agent:L,onRemove:()=>v(L.id)})]},L.id))})})}),t[17]=a,t[18]=n,t[19]=f,t[20]=v,t[21]=u,t[22]=l.isPending,t[23]=S,t[24]=_,t[25]=p,t[26]=y,t[27]=I,t[28]=A,t[29]=C}else S=t[23],_=t[24],p=t[25],y=t[26],I=t[27],A=t[28],C=t[29];let P;t[35]!==n||t[36]!==z?(P=s.jsx(Xe,{selectedIds:n,onAdd:z}),t[35]=n,t[36]=z,t[37]=P):P=t[37];let T;t[38]!==p?(T=p>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[p," agent",p===1?"":"s"," won't fit on the home view"]}),t[38]=p,t[39]=T):T=t[39];let c;t[40]!==P||t[41]!==T?(c=s.jsxs("div",{className:"flex items-center justify-between",children:[P,T]}),t[40]=P,t[41]=T,t[42]=c):c=t[42];let F;t[43]!==y||t[44]!==c||t[45]!==C?(F=s.jsxs("div",{className:C,children:[y,c]}),t[43]=y,t[44]=c,t[45]=C,t[46]=F):F=t[46];let M;t[47]!==w||t[48]!==d||t[49]!==b||t[50]!==l.isPending?(M=b&&s.jsxs(Se,{children:[s.jsx(G,{type:"button",variant:"outline",onClick:()=>h(d),disabled:l.isPending,children:"Cancel"}),s.jsx(G,{type:"button",onClick:w,disabled:l.isPending,children:l.isPending?"Saving…":"Save"})]}),t[47]=w,t[48]=d,t[49]=b,t[50]=l.isPending,t[51]=M):M=t[51];let B;t[52]!==S||t[53]!==F||t[54]!==M?(B=s.jsxs(S,{children:[F,M]}),t[52]=S,t[53]=F,t[54]=M,t[55]=B):B=t[55];let U;return t[56]!==_||t[57]!==I||t[58]!==A||t[59]!==B?(U=s.jsx(_,{title:I,actions:A,children:B}),t[56]=_,t[57]=I,t[58]=A,t[59]=B,t[60]=U):U=t[60],U}function et(t){K.error(t instanceof Error?t.message:"Failed to update default home agents")}function tt(t){return ee.some(e=>e.id===t)}function st(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(X,{title:"Default home agents",children:s.jsx(Z,{children:s.jsx("div",{className:"px-5 py-5 flex flex-col gap-2",children:Array.from({length:4}).map(nt)})})}),t[0]=e):e=t[0],e}function nt(t,e){return s.jsx(Me,{className:"h-12 w-full rounded-lg"},e)}function ot(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(H.Suspense,{fallback:s.jsx(st,{}),children:s.jsx(Ze,{})}),t[0]=e):e=t[0],e}function it(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(V,{children:s.jsx(V.Content,{children:s.jsx(V.Body,{children:s.jsxs(ye,{children:[s.jsx(V.Title,{children:"Organization"}),s.jsx(Qe,{}),s.jsx(Ne,{}),s.jsx(ot,{})]})})})}),t[0]=e):e=t[0],e}function ns(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(it,{}),t[0]=e):e=t[0],e}export{ns as default};
1
+ import{f as re,s as ce,o as de,z as me,C as ue,a as fe,t as Y,x as K,K as te,j as s,D as se,H as ge,J as W,e as $,r as H,B as G,c as xe,M as pe}from"./index-k8njt3_A.js";import{P as V}from"./index-ClxNnAsp.js";import{u as he}from"./use-org-auth-client-mkgKwCAh.js";import{u as je}from"./use-debounced-autosave-Ja8PcJv_.js";import{A as be}from"./avatar-CYyuZ3vB.js";import{I as ve}from"./input-DrFzs1Yw.js";import{S as X,a as Z,b as Q,c as Se,d as ye}from"./settings-section-qufbNRCL.js";import{D as Ne}from"./domain-settings-8zUtZk7o.js";import{u as Ce,a as ne,D as we,c as _e,S as ze,v as De,K as Ae,P as Pe,d as ke,C as Ie,s as Ee,b as Te,e as Oe}from"./collection-search-BtC9EgTH.js";import{W as ee,i as Re}from"./constants-Df56C9B1.js";import{b as le}from"./use-virtual-mcp-BlYQqAfZ.js";import{b as Le,P as $e,a as Fe}from"./popover-DUMNq33j.js";import{S as Me}from"./skeleton-BfKJMKYc.js";import{y as Be}from"./agent-icon-CaG-DX2m.js";import{s as He}from"./Plus-DNkjVBwq.js";import{a as ae}from"./Users03-CXkopkPu.js";import{i as Ke}from"./X-CdXDgTcN.js";import{I as J}from"./integration-icon-DUMCOZJc.js";import{a as Ue,d as qe}from"./use-organization-settings-Coi7Ggqq.js";import"./tooltip-B26xbtws.js";import"./User01-Cxb6YtJq.js";import"./card-BWjsP1pO.js";import"./ArrowUpRight-CCQZEQ7k.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./switch-YLfAn92x.js";import"./SearchMd-JqX1mLMq.js";import"./use-collections-D66SnH5Q.js";import"./AlertCircle-B72APkrz.js";import"./Tool01-CXQZ3p7Z.js";import"./XClose-zqTFiPq2.js";import"./RefreshCcw01-CdP9yH0w.js";import"./ArrowNarrowLeft-Dz0P9WNF.js";import"./XCircle-CjR4LC4r.js";import"./ZapSquare-CliIuzcs.js";import"./CheckCircle-DTCxFilU.js";import"./Check-CUpq9BBu.js";import"./ChevronDown-D5WF5tyi.js";import"./ChevronRight-DwbV0YDZ.js";import"./ChevronUp-CDMPc0ql.js";import"./DotsVertical-D8wcDPCU.js";import"./Container-BioZd28q.js";import"./Star01-Y834gtsL.js";import"./Palette-brLBiHpP.js";import"./LinkExternal01-CKpEz_fF.js";import"./Lock01-CHfwR6Qi.js";import"./Sun-BgOSswUu.js";import"./Play-DRCdZRLW.js";import"./Settings02-D1Jfvo1d.js";import"./Shield01-D5fQpAyA.js";import"./Trash01-B8-uqWxa.js";import"./Zap--FKeiDFf.js";const Ve=ge({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function Ge(t){const e=$.c(13),{value:a,onChange:l,name:r,disabled:d}=t,n=H.useRef(null);let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=()=>n.current?.click(),e[0]=h):h=e[0];const m=h;let b;e[1]!==l?(b=z=>{const x=z.target.files?.[0];if(!x)return;if(x.size>2097152){K.error("Image must be smaller than 2MB");return}const v=new FileReader;v.onerror=We,v.onloadend=()=>{v.result&&l(v.result),n.current&&(n.current.value="")},v.readAsDataURL(x)},e[1]=l,e[2]=b):b=e[2];const o=b;let i;e[3]!==d||e[4]!==o?(i=s.jsx("input",{ref:n,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:d}),e[3]=d,e[4]=o,e[5]=i):i=e[5];const u=a||void 0,j=r??"?";let f;e[6]!==u||e[7]!==j?(f=s.jsx(be,{url:u,fallback:j,shape:"square",size:"base"}),e[6]=u,e[7]=j,e[8]=f):f=e[8];let g;return e[9]!==d||e[10]!==i||e[11]!==f?(g=s.jsxs("button",{type:"button",onClick:m,disabled:d,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[i,f]}),e[9]=d,e[10]=i,e[11]=f,e[12]=g):g=e[12],g}function We(){return K.error("Failed to read image")}function Qe(){const t=re(),{org:e}=ce(),a=he(),l=de(),r=me({resolver:ue(Ve),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),d=fe({mutationFn:async o=>{const i={name:o.name,slug:o.slug};o.logo&&(i.logo=o.logo);const u=await a.organization.update({data:i});if(u?.error)throw new Error(u.error.message||"Failed to update organization");return u},onSuccess:(o,i)=>{Y("organization_settings_updated",{organization_id:e.id,fields:Object.keys(i)}),l.invalidateQueries({queryKey:te.organizations()}),l.invalidateQueries({queryKey:te.activeOrganization(e.slug)}),o?.data?.slug&&o.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:o.data.slug}})},onError:(o,i)=>{Y("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(i),error:o instanceof Error?o.message:String(o)}),K.error(o instanceof Error?o.message:"Failed to update organization")}}),{schedule:n,flush:h}=je({save:async()=>{!r.formState.isDirty||!await r.trigger()||await d.mutateAsync(r.getValues())}}),m=r.formState.errors,b=typeof window<"u"?`${window.location.host}/`:"";return s.jsx(X,{children:s.jsxs(Z,{children:[s.jsx(Q,{title:"Logo",description:"Recommended size is 256x256px",action:s.jsx(Ge,{value:r.watch("logo"),onChange:o=>{r.setValue("logo",o??"",{shouldDirty:!0}),h()},name:r.watch("name")})}),s.jsx(Q,{title:"Name",action:s.jsx(se,{control:r.control,name:"name",render:({field:o})=>s.jsx(ve,{id:"org-name",...o,onChange:i=>{o.onChange(i),n()},onBlur:()=>{o.onBlur(),h()},placeholder:"Organization name",className:"w-[280px]"})})}),s.jsx(Q,{title:"URL",action:s.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[b&&s.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:b}),s.jsx(se,{control:r.control,name:"slug",render:({field:o})=>s.jsx("input",{id:"org-slug",value:o.value??"",name:o.name,ref:o.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:i=>{const u=i.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");r.setValue("slug",u,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),n()},onBlur:()=>{o.onBlur(),h()}})})]})}),(m.name||m.slug||m.logo)&&s.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[m.name&&s.jsx("p",{className:"text-xs text-destructive",children:m.name.message}),m.slug&&s.jsx("p",{className:"text-xs text-destructive",children:m.slug.message}),m.logo&&s.jsx("p",{className:"text-xs text-destructive",children:m.logo.message})]})]})})}const oe=["site-editor","site-diagnostics","ai-image","ai-research"],ie=8;function Ye(t,e,a){const l=e.find(d=>d.id===t);if(l)return{id:l.id,title:l.title,icon:l.icon,kind:"template"};const r=a.find(d=>d.id===t);return r?{id:t,title:r.title,icon:r.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function Je(t){const e=$.c(39),{agent:a,onRemove:l}=t;let r;e[0]!==a.id?(r={id:a.id},e[0]=a.id,e[1]=r):r=e[1];const{attributes:d,listeners:n,setNodeRef:h,transform:m,transition:b,isDragging:o}=ke(r);let i;e[2]!==m?(i=Ie.Transform.toString(m),e[2]=m,e[3]=i):i=e[3];const u=o?.5:void 0,j=o?100:void 0;let f;e[4]!==i||e[5]!==u||e[6]!==j||e[7]!==b?(f={transform:i,transition:b,opacity:u,zIndex:j},e[4]=i,e[5]=u,e[6]=j,e[7]=b,e[8]=f):f=e[8];const g=f,z=o&&"shadow-lg";let x;e[9]!==z?(x=xe("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",z),e[9]=z,e[10]=x):x=e[10];const v=`Drag to reorder ${a.title}`;let D;e[11]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Be,{size:14}),e[11]=D):D=e[11];let k;e[12]!==d||e[13]!==n||e[14]!==v?(k=s.jsx("button",{type:"button",...d,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":v,children:D}),e[12]=d,e[13]=n,e[14]=v,e[15]=k):k=e[15];let N;e[16]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ae,{size:14}),e[16]=N):N=e[16];let w;e[17]!==a.icon||e[18]!==a.title?(w=s.jsx(J,{icon:a.icon,name:a.title,size:"xs",fallbackIcon:N}),e[17]=a.icon,e[18]=a.title,e[19]=w):w=e[19];let S;e[20]!==a.title?(S=s.jsx("span",{className:"text-sm text-foreground truncate",children:a.title}),e[20]=a.title,e[21]=S):S=e[21];const _=a.kind==="template"?"Template":a.kind==="custom"?"Custom agent":"Unavailable";let p;e[22]!==_?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:_}),e[22]=_,e[23]=p):p=e[23];let y;e[24]!==S||e[25]!==p?(y=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[S,p]}),e[24]=S,e[25]=p,e[26]=y):y=e[26];const I=`Remove ${a.title}`;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ke,{size:14}),e[27]=A):A=e[27];let C;e[28]!==l||e[29]!==I?(C=s.jsx("button",{type:"button",onClick:l,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":I,children:A}),e[28]=l,e[29]=I,e[30]=C):C=e[30];let P;return e[31]!==h||e[32]!==g||e[33]!==k||e[34]!==w||e[35]!==y||e[36]!==C||e[37]!==x?(P=s.jsxs("div",{ref:h,style:g,className:x,children:[k,w,y,C]}),e[31]=h,e[32]=g,e[33]=k,e[34]=w,e[35]=y,e[36]=C,e[37]=x,e[38]=P):P=e[38],P}function Xe(t){const e=$.c(48),{selectedIds:a,onAdd:l}=t,[r,d]=H.useState(!1),[n,h]=H.useState(""),m=le();let b;e[0]!==a?(b=new Set(a),e[0]=a,e[1]=b):b=e[1];const o=b;let i,u,j,f,g,z,x,v,D,k,N,w,S;if(e[2]!==m||e[3]!==l||e[4]!==r||e[5]!==n||e[6]!==o){const A=n.toLowerCase();f=ee.filter(c=>!o.has(c.id)&&(!n||c.title.toLowerCase().includes(A)));let C;e[20]!==o?(C=c=>c.id!==null&&!Re(c.id)&&!o.has(c.id),e[20]=o,e[21]=C):C=e[21],j=m.filter(C).filter(c=>!n||c.title.toLowerCase().includes(A));let P;e[22]!==l?(P=c=>{l(c),d(!1),h("")},e[22]=l,e[23]=P):P=e[23];const T=P;u=Le,w=r,S=d,e[24]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx($e,{asChild:!0,children:s.jsxs(G,{type:"button",variant:"outline",size:"sm",children:[s.jsx(He,{size:14}),"Add agent"]})}),e[24]=g):g=e[24],i=Fe,D="w-[320px] p-0 overflow-hidden",k="start",e[25]!==n?(N=s.jsx(Oe,{value:n,onChange:h,placeholder:"Search agents..."}),e[25]=n,e[26]=N):N=e[26],z="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",x=f.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Templates"}),f.map(c=>s.jsxs("button",{type:"button",onClick:()=>T(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),v=j.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Custom agents"}),j.map(c=>s.jsxs("button",{type:"button",onClick:()=>T(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs",fallbackIcon:s.jsx(ae,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),e[2]=m,e[3]=l,e[4]=r,e[5]=n,e[6]=o,e[7]=i,e[8]=u,e[9]=j,e[10]=f,e[11]=g,e[12]=z,e[13]=x,e[14]=v,e[15]=D,e[16]=k,e[17]=N,e[18]=w,e[19]=S}else i=e[7],u=e[8],j=e[9],f=e[10],g=e[11],z=e[12],x=e[13],v=e[14],D=e[15],k=e[16],N=e[17],w=e[18],S=e[19];let _;e[27]!==j||e[28]!==f.length||e[29]!==n?(_=f.length===0&&j.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground text-center py-6",children:n?"No agents found":"All agents are already added"}),e[27]=j,e[28]=f.length,e[29]=n,e[30]=_):_=e[30];let p;e[31]!==_||e[32]!==z||e[33]!==x||e[34]!==v?(p=s.jsxs("div",{className:z,children:[x,v,_]}),e[31]=_,e[32]=z,e[33]=x,e[34]=v,e[35]=p):p=e[35];let y;e[36]!==i||e[37]!==p||e[38]!==D||e[39]!==k||e[40]!==N?(y=s.jsxs(i,{className:D,align:k,children:[N,p]}),e[36]=i,e[37]=p,e[38]=D,e[39]=k,e[40]=N,e[41]=y):y=e[41];let I;return e[42]!==u||e[43]!==g||e[44]!==y||e[45]!==w||e[46]!==S?(I=s.jsxs(u,{open:w,onOpenChange:S,children:[g,y]}),e[42]=u,e[43]=g,e[44]=y,e[45]=w,e[46]=S,e[47]=I):I=e[47],I}function Ze(){const t=$.c(61),e=Ue(),a=le(),l=qe();let r;t[0]!==e?.ids?(r=e?.ids??[...oe],t[0]=e?.ids,t[1]=r):r=t[1];const d=r,[n,h]=H.useState(d);let m;t[2]!==n||t[3]!==d?(m=n.length!==d.length||n.some((E,O)=>E!==d[O]),t[2]=n,t[3]=d,t[4]=m):m=t[4];const b=m;let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o={activationConstraint:{distance:5}},t[5]=o):o=t[5];let i;t[6]===Symbol.for("react.memo_cache_sentinel")?(i={coordinateGetter:Ee},t[6]=i):i=t[6];const u=Ce(ne(Pe,o),ne(Ae,i));let j;t[7]!==n?(j=E=>{const{active:O,over:R}=E;if(!R||O.id===R.id)return;const L=n.indexOf(O.id),q=n.indexOf(R.id);L===-1||q===-1||h(Te([...n],L,q))},t[7]=n,t[8]=j):j=t[8];const f=j;let g;t[9]!==n?(g=E=>{n.includes(E)||h([...n,E])},t[9]=n,t[10]=g):g=t[10];const z=g;let x;t[11]!==n?(x=E=>{h(n.filter(O=>O!==E))},t[11]=n,t[12]=x):x=t[12];const v=x;let D;t[13]===Symbol.for("react.memo_cache_sentinel")?(D=()=>{h([...oe])},t[13]=D):D=t[13];const k=D;let N;t[14]!==n||t[15]!==l?(N=()=>{l.mutate({ids:n},{onSuccess:()=>{Y("default_home_agents_updated",{count:n.length,template_count:n.filter(tt).length}),K.success("Default home agents updated")},onError:et})},t[14]=n,t[15]=l,t[16]=N):N=t[16];const w=N;let S,_,p,y,I,A,C;if(t[17]!==a||t[18]!==n||t[19]!==f||t[20]!==v||t[21]!==u||t[22]!==l.isPending){let E;t[30]!==a?(E=L=>Ye(L,ee,a),t[30]=a,t[31]=E):E=t[31];const O=n.map(E);p=Math.max(0,n.length-ie),_=X,I="Default home agents";let R;t[32]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(pe,{size:14}),t[32]=R):R=t[32],t[33]!==l.isPending?(A=s.jsxs(G,{type:"button",variant:"ghost",size:"sm",onClick:k,disabled:l.isPending,children:[R,"Reset defaults"]}),t[33]=l.isPending,t[34]=A):A=t[34],S=Z,C="px-5 py-5 flex flex-col gap-3",y=O.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-border p-6 text-center text-xs text-muted-foreground",children:'No agents selected. The home view will only show "Create agent".'}):s.jsx(we,{sensors:u,collisionDetection:_e,onDragEnd:f,children:s.jsx(ze,{items:n,strategy:De,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:O.map((L,q)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[q===ie&&s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-xs text-muted-foreground",children:[s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx("span",{children:"Below this line is hidden on the home view"}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),s.jsx(Je,{agent:L,onRemove:()=>v(L.id)})]},L.id))})})}),t[17]=a,t[18]=n,t[19]=f,t[20]=v,t[21]=u,t[22]=l.isPending,t[23]=S,t[24]=_,t[25]=p,t[26]=y,t[27]=I,t[28]=A,t[29]=C}else S=t[23],_=t[24],p=t[25],y=t[26],I=t[27],A=t[28],C=t[29];let P;t[35]!==n||t[36]!==z?(P=s.jsx(Xe,{selectedIds:n,onAdd:z}),t[35]=n,t[36]=z,t[37]=P):P=t[37];let T;t[38]!==p?(T=p>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[p," agent",p===1?"":"s"," won't fit on the home view"]}),t[38]=p,t[39]=T):T=t[39];let c;t[40]!==P||t[41]!==T?(c=s.jsxs("div",{className:"flex items-center justify-between",children:[P,T]}),t[40]=P,t[41]=T,t[42]=c):c=t[42];let F;t[43]!==y||t[44]!==c||t[45]!==C?(F=s.jsxs("div",{className:C,children:[y,c]}),t[43]=y,t[44]=c,t[45]=C,t[46]=F):F=t[46];let M;t[47]!==w||t[48]!==d||t[49]!==b||t[50]!==l.isPending?(M=b&&s.jsxs(Se,{children:[s.jsx(G,{type:"button",variant:"outline",onClick:()=>h(d),disabled:l.isPending,children:"Cancel"}),s.jsx(G,{type:"button",onClick:w,disabled:l.isPending,children:l.isPending?"Saving…":"Save"})]}),t[47]=w,t[48]=d,t[49]=b,t[50]=l.isPending,t[51]=M):M=t[51];let B;t[52]!==S||t[53]!==F||t[54]!==M?(B=s.jsxs(S,{children:[F,M]}),t[52]=S,t[53]=F,t[54]=M,t[55]=B):B=t[55];let U;return t[56]!==_||t[57]!==I||t[58]!==A||t[59]!==B?(U=s.jsx(_,{title:I,actions:A,children:B}),t[56]=_,t[57]=I,t[58]=A,t[59]=B,t[60]=U):U=t[60],U}function et(t){K.error(t instanceof Error?t.message:"Failed to update default home agents")}function tt(t){return ee.some(e=>e.id===t)}function st(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(X,{title:"Default home agents",children:s.jsx(Z,{children:s.jsx("div",{className:"px-5 py-5 flex flex-col gap-2",children:Array.from({length:4}).map(nt)})})}),t[0]=e):e=t[0],e}function nt(t,e){return s.jsx(Me,{className:"h-12 w-full rounded-lg"},e)}function ot(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(H.Suspense,{fallback:s.jsx(st,{}),children:s.jsx(Ze,{})}),t[0]=e):e=t[0],e}function it(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(V,{children:s.jsx(V.Content,{children:s.jsx(V.Body,{children:s.jsxs(ye,{children:[s.jsx(V.Title,{children:"Organization"}),s.jsx(Qe,{}),s.jsx(Ne,{}),s.jsx(ot,{})]})})})}),t[0]=e):e=t[0],e}function ns(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(it,{}),t[0]=e):e=t[0],e}export{ns as default};
@@ -1,4 +1,4 @@
1
- import{cj as ne,e as _,j as o,B as te,l as ln,bc as ze,ck as ms,r as T,s as oe,c as O,g as ps,o as cn,c5 as xs,a7 as hs,a8 as fe,aW as an,c6 as gs,aT as bs,c4 as Ss,c7 as un,b6 as js,cd as ys,ce as vs,ae as ws,cf as Ns,cl as $t,cm as dn,x as ks,y as _s,cn as Cs,co as Is}from"./index--hcGoWBP.js";import{D as Ts,F as Es,B as $s}from"./index-BtR3GFsv.js";import{e as Fe,i as Os,u as ae}from"./constants-C0Z_UV1B.js";import{b as fn}from"./use-virtual-mcp-DqC7TCRl.js";import{M as Re}from"./monaco-editor-BRZw2Ss_.js";import{A as Rs,c as Ms,a as Ls,b as Ps,e as As,R as Ut,d as zs}from"./accordion-D1MMgTV5.js";import{B as le}from"./badge-Dc_jqHv8.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-4BiO-1He.js";import{N as Ws,h as Ds,j as Fs,m as Be,P as Hs,i as Vs,R as Us,c as qs,k as Ks,e as qt,d as Bs,S as st}from"./index-CbahmBQ1.js";import{V as Xs}from"./view-mode-toggle-ChONnJPm.js";import{a9 as Js,aa as Gs,i as Qs,a1 as mn,ab as Ys,Q as Zs,r as eo,ac as pn,Y as to,U as xn,ad as no,ae as so,S as bt,af as oo}from"./agent-icon-BhSIvnHs.js";import{i as hn}from"./Play-B93BJPTD.js";import{b as ro,a as io,V as Qe}from"./layout-DGzZ7eIZ.js";import{c as gn,T as bn,a as Sn,b as jn}from"./tooltip-DwEKoS3m.js";import{u as lo,a as co}from"./use-connection-BZIS5d-M.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-DEJYwjVI.js";import{c as ao,d as uo,e as fo,D as mo,a as po,b as xo}from"./dialog-ChC8b-fd.js";import"./index-BrFuw-qb.js";import{S as ho}from"./index-D3id_i25.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-BYnm4L0S.js";import{s as go}from"./Plus-CsU0klMp.js";import{b as kn}from"./Tool01-B1WXLPyp.js";import{i as He}from"./Check-DNFNSXQB.js";import{s as Mt}from"./XClose-Bet7IpXN.js";import{I as Lt}from"./integration-icon-BFclX5Vo.js";import{a as bo,S as So}from"./scroll-area-VgUNFi6v.js";import"./index-DCa8vMMj.js";import{i as _n}from"./X-26aOhFK-.js";import{u as Cn,a as jo}from"./use-collections-CbyJ6t6i.js";import{E as In}from"./empty-state-B5SEGNSf.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-Di5VhXrx.js";const Tn=ne("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const En=ne("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ot=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const rt=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const vo=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const $n=ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wo=ne("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const On=ne("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Rn=ne("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Mn=ne("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const No=ne("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ln=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Pn=ne("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const ko=ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const An=ne("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function _o(t){const e=_.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Js,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(ln,{size:14,className:"animate-spin"}):o.jsx(Gs,{size:14}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(x=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=x):x=e[11];let p;return e[12]!==f||e[13]!==x?(p=o.jsxs(o.Fragment,{children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14],p}const Bt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Pt=(t=>t?Bt(t):Bt),Co=t=>t;function _t(t,e=Co){const n=ze.useSyncExternalStore(t.subscribe,ze.useCallback(()=>e(t.getState()),[t,e]),ze.useCallback(()=>e(t.getInitialState()),[t,e]));return ze.useDebugValue(n),n}const Io=t=>{const e=Pt(t),n=s=>_t(e,s);return Object.assign(n,e),n},To=(t=>Io);function zn(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},Eo=(t,e)=>(n,s,i)=>{let r={storage:zn(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!d)return;const j=++c;l=!1,a.forEach(y=>{var S;return y((S=s())!=null?S:x)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const S=r.migrate(y.state,y.version);return S instanceof Promise?S.then(w=>[!0,w]):[!0,S]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var S;if(j!==c)return;const[w,N]=y;if(p=r.merge(N,(S=s())!=null?S:x),n(p,!0),w)return f()}).then(()=>{j===c&&(v?.(s(),void 0),p=s(),l=!0,u.forEach(y=>y(p)))}).catch(y=>{j===c&&v?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),p||x},Wn=Eo,{useSyncExternalStoreWithSelector:$o}=ms,Oo=t=>t;function Ro(t,e=Oo,n){const s=$o(t.subscribe,t.getState,t.getInitialState,e,n);return ze.useDebugValue(s),s}const Xt=t=>Symbol.iterator in t,Jt=t=>"entries"in t,Gt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Mo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Lo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Xt(t)&&Xt(e)?Jt(t)&&Jt(e)?Gt(t,e):Mo(t,e):Gt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dn(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
1
+ import{cj as ne,e as _,j as o,B as te,l as ln,bc as ze,ck as ms,r as T,s as oe,c as O,g as ps,o as cn,c5 as xs,a7 as hs,a8 as fe,aW as an,c6 as gs,aT as bs,c4 as Ss,c7 as un,b6 as js,cd as ys,ce as vs,ae as ws,cf as Ns,cl as $t,cm as dn,x as ks,y as _s,cn as Cs,co as Is}from"./index-k8njt3_A.js";import{D as Ts,F as Es,B as $s}from"./index-CO402MfB.js";import{e as Fe,i as Os,u as ae}from"./constants-Df56C9B1.js";import{b as fn}from"./use-virtual-mcp-BlYQqAfZ.js";import{M as Re}from"./monaco-editor-Br1M5lwR.js";import{A as Rs,c as Ms,a as Ls,b as Ps,e as As,R as Ut,d as zs}from"./accordion-BBKL1fM-.js";import{B as le}from"./badge-C-R5WeFR.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-B3lWwv9y.js";import{N as Ws,h as Ds,j as Fs,m as Be,P as Hs,i as Vs,R as Us,c as qs,k as Ks,e as qt,d as Bs,S as st}from"./index-BPgW_PVH.js";import{V as Xs}from"./view-mode-toggle-BC7A6oBR.js";import{a9 as Js,aa as Gs,i as Qs,a1 as mn,ab as Ys,Q as Zs,r as eo,ac as pn,Y as to,U as xn,ad as no,ae as so,S as bt,af as oo}from"./agent-icon-CaG-DX2m.js";import{i as hn}from"./Play-DRCdZRLW.js";import{b as ro,a as io,V as Qe}from"./layout-zbF9c9kI.js";import{c as gn,T as bn,a as Sn,b as jn}from"./tooltip-B26xbtws.js";import{u as lo,a as co}from"./use-connection-9VrA1Bg7.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-C7yIpDHe.js";import{c as ao,d as uo,e as fo,D as mo,a as po,b as xo}from"./dialog-HqMwvS0c.js";import"./index-D9-ppQFz.js";import{S as ho}from"./index-D7rGFiVq.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-CD1YJIi0.js";import{s as go}from"./Plus-DNkjVBwq.js";import{b as kn}from"./Tool01-CXQZ3p7Z.js";import{i as He}from"./Check-CUpq9BBu.js";import{s as Mt}from"./XClose-zqTFiPq2.js";import{I as Lt}from"./integration-icon-DUMCOZJc.js";import{a as bo,S as So}from"./scroll-area-D_tsHfC-.js";import"./index-Y4klGMPr.js";import{i as _n}from"./X-CdXDgTcN.js";import{u as Cn,a as jo}from"./use-collections-D66SnH5Q.js";import{E as In}from"./empty-state-B29HN9Vl.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-DrFzs1Yw.js";const Tn=ne("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const En=ne("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ot=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const rt=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const vo=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const $n=ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wo=ne("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const On=ne("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Rn=ne("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Mn=ne("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const No=ne("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ln=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Pn=ne("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const ko=ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const An=ne("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function _o(t){const e=_.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Js,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(ln,{size:14,className:"animate-spin"}):o.jsx(Gs,{size:14}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(x=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=x):x=e[11];let p;return e[12]!==f||e[13]!==x?(p=o.jsxs(o.Fragment,{children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14],p}const Bt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Pt=(t=>t?Bt(t):Bt),Co=t=>t;function _t(t,e=Co){const n=ze.useSyncExternalStore(t.subscribe,ze.useCallback(()=>e(t.getState()),[t,e]),ze.useCallback(()=>e(t.getInitialState()),[t,e]));return ze.useDebugValue(n),n}const Io=t=>{const e=Pt(t),n=s=>_t(e,s);return Object.assign(n,e),n},To=(t=>Io);function zn(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},Eo=(t,e)=>(n,s,i)=>{let r={storage:zn(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!d)return;const j=++c;l=!1,a.forEach(y=>{var S;return y((S=s())!=null?S:x)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const S=r.migrate(y.state,y.version);return S instanceof Promise?S.then(w=>[!0,w]):[!0,S]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var S;if(j!==c)return;const[w,N]=y;if(p=r.merge(N,(S=s())!=null?S:x),n(p,!0),w)return f()}).then(()=>{j===c&&(v?.(s(),void 0),p=s(),l=!0,u.forEach(y=>y(p)))}).catch(y=>{j===c&&v?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),p||x},Wn=Eo,{useSyncExternalStoreWithSelector:$o}=ms,Oo=t=>t;function Ro(t,e=Oo,n){const s=$o(t.subscribe,t.getState,t.getInitialState,e,n);return ze.useDebugValue(s),s}const Xt=t=>Symbol.iterator in t,Jt=t=>"entries"in t,Gt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Mo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Lo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Xt(t)&&Xt(e)?Jt(t)&&Jt(e)?Gt(t,e):Mo(t,e):Gt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dn(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
2
2
  ${Object.entries(l).map(([u,d])=>{const f=c.has(u)?"":"?";return`${d.description?` /** ${d.description} */
3
3
  `:""} ${u}${f}: ${n(d)};`}).join(`
4
4
  `)}