decocms 2.306.0 → 2.306.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 (196) hide show
  1. package/dist/client/assets/{AlertCircle-ri2xuBKe.js → AlertCircle--wiBhyBy.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-yxFeL5-Q.js → ArrowNarrowLeft-DUEFTkCU.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-Bxgj2IVp.js → ArrowUpRight-ByDFdIYO.js} +1 -1
  4. package/dist/client/assets/{Check-C6Fa8-x7.js → Check-C936sYYN.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-D7N7MOmw.js → CheckCircle-CIhRIzNe.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-DmrzaACF.js → ChevronDown-D9-4IfgQ.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-CZ_XAq5W.js → ChevronRight-DYzYB9o2.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-Ds9ufeJd.js → ChevronUp-DjhQ54oJ.js} +1 -1
  9. package/dist/client/assets/{Container-BXYDPrF5.js → Container-W30Qs4TE.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-CYFsY1AY.js → DotsVertical-BTQcMhn-.js} +1 -1
  11. package/dist/client/assets/{LinkExternal01-Dvpxn-Ig.js → LinkExternal01-BWQuO7gD.js} +1 -1
  12. package/dist/client/assets/{Lock01-63SpB195.js → Lock01-CzswZlFM.js} +1 -1
  13. package/dist/client/assets/{Palette-D0iAFXNq.js → Palette-BkIcRAuI.js} +1 -1
  14. package/dist/client/assets/{Play-D4xI5B_i.js → Play-CX-s0F5M.js} +1 -1
  15. package/dist/client/assets/{Plus-CDEOyPu8.js → Plus-CxH8Dky0.js} +1 -1
  16. package/dist/client/assets/{RefreshCcw01-B2ZHRQzo.js → RefreshCcw01-DUZtukjI.js} +1 -1
  17. package/dist/client/assets/{SearchMd-6IRfjRcX.js → SearchMd-DJcqe9YA.js} +1 -1
  18. package/dist/client/assets/{Settings02-3HEuuiVe.js → Settings02-19U6Pasa.js} +1 -1
  19. package/dist/client/assets/{Shield01-BGj8uiOU.js → Shield01-C1y1P7P6.js} +1 -1
  20. package/dist/client/assets/{Star01-BSZxz5Wn.js → Star01-Dl0-D7bS.js} +1 -1
  21. package/dist/client/assets/{Sun-DdqVKeEA.js → Sun-DZgB_ONP.js} +1 -1
  22. package/dist/client/assets/{Tool01-DMFP0Svb.js → Tool01-zaCqe86u.js} +1 -1
  23. package/dist/client/assets/{Trash01-Dj5mVOWm.js → Trash01-DKdnsDmj.js} +1 -1
  24. package/dist/client/assets/{User01-CDDY3fE9.js → User01-kuDW4DKu.js} +1 -1
  25. package/dist/client/assets/{Users03-BbIOB2XC.js → Users03-DEpz3kvM.js} +1 -1
  26. package/dist/client/assets/{X-yKx8T0mV.js → X-CXRgDFum.js} +1 -1
  27. package/dist/client/assets/{XCircle-BLtaN_6O.js → XCircle-CGvUuorr.js} +1 -1
  28. package/dist/client/assets/{XClose-Bk1D4OG4.js → XClose-C4DzyMov.js} +1 -1
  29. package/dist/client/assets/{Zap-Ctp20y2W.js → Zap-Cl0ETvvt.js} +1 -1
  30. package/dist/client/assets/{ZapSquare-BOPwjpzz.js → ZapSquare-DKEusvEW.js} +1 -1
  31. package/dist/client/assets/{accordion-Cp5pOFIt.js → accordion-fFsu-8K2.js} +1 -1
  32. package/dist/client/assets/{agent-icon-6IsHLhhx.js → agent-icon-D59FxHod.js} +1 -1
  33. package/dist/client/assets/{agents-list-2IMNAAmL.js → agents-list-C9eV3yHD.js} +1 -1
  34. package/dist/client/assets/ai-providers-Dw3vAL7u.js +1 -0
  35. package/dist/client/assets/{alert-dialog-D-vKhXAM.js → alert-dialog-Bs4oM5xq.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-DSDUVS7V.js → auth-catchall-D7pOW-4H.js} +1 -1
  37. package/dist/client/assets/{automation-list-row-DXQ1xbHt.js → automation-list-row-DBnJAyuL.js} +1 -1
  38. package/dist/client/assets/{automations-BKGLmUCl.js → automations-CASAuVDl.js} +1 -1
  39. package/dist/client/assets/{avatar-DiYo_VFp.js → avatar-ChukgIuT.js} +1 -1
  40. package/dist/client/assets/{badge-v1Fnh_-2.js → badge-CYxiHq4p.js} +1 -1
  41. package/dist/client/assets/{brand-context-DWyvnvIk.js → brand-context-BUYExxZ2.js} +1 -1
  42. package/dist/client/assets/{card-CMatfPs6.js → card-CuKTvJk_.js} +1 -1
  43. package/dist/client/assets/{chat-context-BOGVHhEC.js → chat-context-Cmw2lxUK.js} +1 -1
  44. package/dist/client/assets/{checkbox-DgRshC0u.js → checkbox-B5zXb2Jo.js} +1 -1
  45. package/dist/client/assets/{collection-detail-D8ViAcbL.js → collection-detail-D12l8837.js} +1 -1
  46. package/dist/client/assets/{collection-display-button-BEIthj-o.js → collection-display-button-DUUEITxu.js} +1 -1
  47. package/dist/client/assets/{collection-search-Dsu0rnLF.js → collection-search-Clt8DXHN.js} +1 -1
  48. package/dist/client/assets/{collection-search-CLwC-feE.js → collection-search-JYX4AEcX.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-Df3XEjUz.js → collection-table-wrapper-ClYve0R8.js} +1 -1
  50. package/dist/client/assets/{collection-tabs-3zydPpJg.js → collection-tabs-lx0xcUeS.js} +1 -1
  51. package/dist/client/assets/{collections-DIZVbUQW.js → collections-BNOKPh2o.js} +1 -1
  52. package/dist/client/assets/{command-Cb8AzRR0.js → command-Dl-gUn28.js} +1 -1
  53. package/dist/client/assets/{connection-card-CN5pQMAi.js → connection-card-DpO7z97O.js} +1 -1
  54. package/dist/client/assets/{connection-detail-DMf-fgcD.js → connection-detail-AvrFqpFh.js} +1 -1
  55. package/dist/client/assets/{connection-form-helpers-0uGtdPq8.js → connection-form-helpers-YsDtNQ7E.js} +1 -1
  56. package/dist/client/assets/{connections-oG85p-mQ.js → connections-BCRN-YI1.js} +1 -1
  57. package/dist/client/assets/{constants-hjtpWhr_.js → constants-BGzIm0WX.js} +1 -1
  58. package/dist/client/assets/{constants-BBSLGS7p.js → constants-DfKy425l.js} +1 -1
  59. package/dist/client/assets/{dialog-CICi1bFC.js → dialog-De2L-Mm9.js} +1 -1
  60. package/dist/client/assets/{domain-settings-CjSKJW17.js → domain-settings-Dpd1_jlw.js} +1 -1
  61. package/dist/client/assets/{drawer-CAsvHZha.js → drawer-14Rn9Zur.js} +1 -1
  62. package/dist/client/assets/{dropdown-menu-DVFKsYz3.js → dropdown-menu-B7VqWYeT.js} +1 -1
  63. package/dist/client/assets/{dynamic-plugin-layout-BTYFB5Vl.js → dynamic-plugin-layout-DiwAyewI.js} +1 -1
  64. package/dist/client/assets/{empty-state-Dk0gx8oo.js → empty-state-BAo1HEab.js} +1 -1
  65. package/dist/client/assets/{empty-state-CwHUFi5m.js → empty-state-DH5ZYu9E.js} +1 -1
  66. package/dist/client/assets/{extract-connection-data-CvD7TUFj.js → extract-connection-data-Dn80NCk3.js} +1 -1
  67. package/dist/client/assets/{features-vcFr7_NO.js → features-n_p9V38c.js} +1 -1
  68. package/dist/client/assets/{form-bUi5oN1u.js → form-BpjQQfrk.js} +1 -1
  69. package/dist/client/assets/{general-iD0oGniS.js → general-Dq8oAlWK.js} +1 -1
  70. package/dist/client/assets/{index-DWSuPJ_b.js → index-BGGN2eK9.js} +1 -1
  71. package/dist/client/assets/{index-BOCF3HeX.js → index-C3WwEpEf.js} +1 -1
  72. package/dist/client/assets/{index-CMnREwkX.js → index-Cnr3iyKb.js} +1 -1
  73. package/dist/client/assets/{index-CBeau-VE.js → index-CsGGI0Nu.js} +3 -3
  74. package/dist/client/assets/{index-BxSEc3iB.js → index-CzYFXCYm.js} +1 -1
  75. package/dist/client/assets/{index-B7e3gTna.js → index-DZ2mE-ID.js} +1 -1
  76. package/dist/client/assets/{index-D9n-W_rO.js → index-DeZ4lzZS.js} +2 -2
  77. package/dist/client/assets/{index-Dg6zk4z0.js → index-DuYWPwRk.js} +1 -1
  78. package/dist/client/assets/{index-DM4aujMZ.js → index-Lha-Dz-p.js} +1 -1
  79. package/dist/client/assets/{index-C_78kpYQ.js → index-PaARzNIj.js} +1 -1
  80. package/dist/client/assets/{index-PFIdYUp0.js → index-YoMTmLrM.js} +1 -1
  81. package/dist/client/assets/{index-BCI_OHNR.js → index-aqFN5mzK.js} +1 -1
  82. package/dist/client/assets/{index-k1BGw4YF.js → index-f--UpzBV.js} +1 -1
  83. package/dist/client/assets/{index-CKbPmli4.js → index-x86r1Bar.js} +1 -1
  84. package/dist/client/assets/index-xIOMtHnW.js +1 -0
  85. package/dist/client/assets/{index-BczjQy3M.js → index-xj-daVDj.js} +1 -1
  86. package/dist/client/assets/{infiniteQueryObserver-DnwZzogs.js → infiniteQueryObserver-B8wlRxFU.js} +1 -1
  87. package/dist/client/assets/{input-Aj2AxbJX.js → input-BbtZTtIz.js} +1 -1
  88. package/dist/client/assets/{integration-icon-CNrz8Wxa.js → integration-icon-CX-4HHYz.js} +1 -1
  89. package/dist/client/assets/{label-CuWuUZ3O.js → label-B56NHqZu.js} +1 -1
  90. package/dist/client/assets/{layout-zn0Mql8j.js → layout-DJRPSgl8.js} +1 -1
  91. package/dist/client/assets/{lean-canvas-recruit-modal-mlOx896G.js → lean-canvas-recruit-modal-jh6XZJ5m.js} +1 -1
  92. package/dist/client/assets/{login-BAIGAZLg.js → login-MOfMmqEE.js} +1 -1
  93. package/dist/client/assets/{members--FDE6tuk.js → members-Bb0t0cOy.js} +1 -1
  94. package/dist/client/assets/{monaco-editor-PZYP8jhf.js → monaco-editor-B3eeVSHt.js} +1 -1
  95. package/dist/client/assets/{monitoring-stats-row-BbRUPAD5.js → monitoring-stats-row-BOj9NNqP.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-BaQ7B2Rx.js → oauth-callback-Bpfn3wkA.js} +1 -1
  97. package/dist/client/assets/{oauth-callback-ai-provider-DcbaUyEX.js → oauth-callback-ai-provider-BzHKlMUG.js} +1 -1
  98. package/dist/client/assets/{onboarding-h88h3klM.js → onboarding-BHY99bnn.js} +1 -1
  99. package/dist/client/assets/{org-layout-BBR4isCp.js → org-layout-BA9WvOcB.js} +1 -1
  100. package/dist/client/assets/{org-plugin-layout-Dl6QtWDy.js → org-plugin-layout-D8vjiGLz.js} +1 -1
  101. package/dist/client/assets/{pair-DST-dVfc.js → pair-CqzVS7FB.js} +1 -1
  102. package/dist/client/assets/{plugin-empty-state-CAfBOmv9.js → plugin-empty-state-peVJXJ6R.js} +1 -1
  103. package/dist/client/assets/{plugin-header-RtXpJdkF.js → plugin-header-BzceyGQx.js} +1 -1
  104. package/dist/client/assets/{plugin-layout-DLTDP8qX.js → plugin-layout-gRiAtkqj.js} +1 -1
  105. package/dist/client/assets/{popover-DFJMwPZz.js → popover-BWJBmR0W.js} +1 -1
  106. package/dist/client/assets/{profile-Bc72ys1m.js → profile-3DZrk3WT.js} +1 -1
  107. package/dist/client/assets/{project-app-view-k_Cpcixt.js → project-app-view-DKEPlP9n.js} +1 -1
  108. package/dist/client/assets/registry-4PJ4DDSp.js +2 -0
  109. package/dist/client/assets/{registry-layout-Cg78aXMt.js → registry-layout-6idZqCIF.js} +1 -1
  110. package/dist/client/assets/{required-auth-layout-BRdLiCQS.js → required-auth-layout-C4TIYyDi.js} +1 -1
  111. package/dist/client/assets/{reset-password-B6r9t9Oh.js → reset-password-CKXtWBt4.js} +1 -1
  112. package/dist/client/assets/{roles-Ee_Uhan9.js → roles-CR6ZAjq-.js} +1 -1
  113. package/dist/client/assets/{scroll-area-D7xTqtD-.js → scroll-area-CpFD8S3R.js} +1 -1
  114. package/dist/client/assets/{search-input-BYHjVlDa.js → search-input-D2W6-i9v.js} +1 -1
  115. package/dist/client/assets/{select-DWMsyC47.js → select-CACnwoTF.js} +1 -1
  116. package/dist/client/assets/{select-model-p3PkjF3m.js → select-model-Cajziskt.js} +1 -1
  117. package/dist/client/assets/{settings-layout-B5lxdePw.js → settings-layout-BNHNlQuI.js} +1 -1
  118. package/dist/client/assets/{settings-section-DLmXqm7P.js → settings-section-B79eSyxk.js} +1 -1
  119. package/dist/client/assets/{shell-layout-DDd0qO09.js → shell-layout-D-2Zmpp8.js} +1 -1
  120. package/dist/client/assets/{skeleton-fTv1xeu9.js → skeleton-j1f8Y-yp.js} +1 -1
  121. package/dist/client/assets/{sso-DPaJITTm.js → sso-B3TyJ2uc.js} +1 -1
  122. package/dist/client/assets/{store-CAA-krPV.js → store-CIHVOnJ4.js} +1 -1
  123. package/dist/client/assets/store-registry-DKNEpxY8.js +2 -0
  124. package/dist/client/assets/{switch-D664sdCn.js → switch-Cym1wsqe.js} +1 -1
  125. package/dist/client/assets/{table-mlNAjytE.js → table-DjvJngLq.js} +1 -1
  126. package/dist/client/assets/{tabs-Bakk2hgc.js → tabs-CcbG9N2e.js} +1 -1
  127. package/dist/client/assets/{task-status-B1waCh_f.js → task-status-BhHFrQR1.js} +1 -1
  128. package/dist/client/assets/{textarea-B5ocquNh.js → textarea-CxPy3ZTN.js} +1 -1
  129. package/dist/client/assets/{toggle-group-CdL7Wi0S.js → toggle-group-CUoQjxXD.js} +1 -1
  130. package/dist/client/assets/{tools-list-C9TFhRWw.js → tools-list-Cb8a_Lef.js} +1 -1
  131. package/dist/client/assets/{tooltip-D3G-75TX.js → tooltip-CzbSAgXQ.js} +1 -1
  132. package/dist/client/assets/{types-iEh-ujpY.js → types-DxewxD-a.js} +1 -1
  133. package/dist/client/assets/{use-ai-providers-B5bMFCmc.js → use-ai-providers-CHzON1wD.js} +1 -1
  134. package/dist/client/assets/{use-collections-D6rFCbFs.js → use-collections-DSBDbO1N.js} +1 -1
  135. package/dist/client/assets/{use-connection-ChcOtrff.js → use-connection-DbYn3h0U.js} +1 -1
  136. package/dist/client/assets/{use-copy-m0n_RO3C.js → use-copy-B8mhVwfc.js} +1 -1
  137. package/dist/client/assets/{use-create-virtual-mcp-YEubcOB4.js → use-create-virtual-mcp-zuSOC404.js} +1 -1
  138. package/dist/client/assets/{use-debounced-autosave-B2P6o2k5.js → use-debounced-autosave-B3LX33uh.js} +1 -1
  139. package/dist/client/assets/{use-decopilot-events-2TQ7wYAd.js → use-decopilot-events-C1f4EaaO.js} +1 -1
  140. package/dist/client/assets/{use-delete-connection-D5bnzRUU.js → use-delete-connection-B7VdYPcM.js} +1 -1
  141. package/dist/client/assets/{use-infinite-scroll-3bbSny2Z.js → use-infinite-scroll-61_2Ymdd.js} +1 -1
  142. package/dist/client/assets/{use-list-state-wMdeexdh.js → use-list-state-BX0wxNad.js} +1 -1
  143. package/dist/client/assets/{use-mcp-tools-BcOc7oDE.js → use-mcp-tools-LXbg-7b0.js} +1 -1
  144. package/dist/client/assets/{use-members-BNZ3ZVzn.js → use-members-B7wVCVZJ.js} +1 -1
  145. package/dist/client/assets/{use-navigate-to-agent-BpE3mIlu.js → use-navigate-to-agent-mAuF_Olj.js} +1 -1
  146. package/dist/client/assets/{use-org-auth-client-C94Cx1kj.js → use-org-auth-client-CZ46-R8H.js} +1 -1
  147. package/dist/client/assets/{use-org-sso-V0U-retN.js → use-org-sso-iwRxmcvL.js} +1 -1
  148. package/dist/client/assets/{use-organization-roles-Byz74Exs.js → use-organization-roles-BiL7w6Rf.js} +1 -1
  149. package/dist/client/assets/{use-organization-settings-Crj_HvGT.js → use-organization-settings-CgpGj7yV.js} +1 -1
  150. package/dist/client/assets/{use-registry-connections-BLE97Xkr.js → use-registry-connections-v6H0url5.js} +1 -1
  151. package/dist/client/assets/{use-status-sounds-BFxmOR4f.js → use-status-sounds-DWE_lKOw.js} +1 -1
  152. package/dist/client/assets/{use-tasks-B1IA46S1.js → use-tasks-DYLdIMjk.js} +1 -1
  153. package/dist/client/assets/{use-view-mode-DmgZ_4mP.js → use-view-mode-Dj9H2B4i.js} +1 -1
  154. package/dist/client/assets/{use-virtual-mcp-DbNBWdfU.js → use-virtual-mcp-DNHpowZu.js} +1 -1
  155. package/dist/client/assets/useInfiniteQuery-DsFcYHS7.js +1 -0
  156. package/dist/client/assets/useSuspenseInfiniteQuery-B4Xtg3B8.js +1 -0
  157. package/dist/client/assets/{user-BnqvTrf4.js → user-B6HmPP4N.js} +1 -1
  158. package/dist/client/assets/{view-mode-toggle-CwkAkApt.js → view-mode-toggle-CWWQpnSB.js} +1 -1
  159. package/dist/client/assets/workflow-detail-BkYNroDK.js +1 -0
  160. package/dist/client/assets/{workflow-R3hZyuyQ.js → workflow-zflBzFOe.js} +1 -1
  161. package/dist/client/index.html +1 -1
  162. package/dist/server/cli.js +1 -1
  163. package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
  164. package/dist/server/node_modules/postgres-array/index.js +97 -0
  165. package/dist/server/node_modules/{xtend/LICENSE → postgres-array/license} +2 -1
  166. package/dist/server/node_modules/postgres-array/package.json +35 -0
  167. package/dist/server/node_modules/postgres-array/readme.md +43 -0
  168. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  169. package/dist/server/node_modules/postgres-bytea/license +21 -0
  170. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  171. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  172. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  173. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  174. package/dist/server/node_modules/postgres-interval/license +21 -0
  175. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  176. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  177. package/dist/server/node_modules/split2/LICENSE +13 -0
  178. package/dist/server/node_modules/split2/README.md +85 -0
  179. package/dist/server/node_modules/split2/bench.js +27 -0
  180. package/dist/server/node_modules/split2/index.js +141 -0
  181. package/dist/server/node_modules/split2/package.json +39 -0
  182. package/dist/server/node_modules/split2/test.js +409 -0
  183. package/package.json +1 -1
  184. package/dist/client/assets/ai-providers-DJCkxeza.js +0 -1
  185. package/dist/client/assets/index-C3jp8V-r.js +0 -1
  186. package/dist/client/assets/registry-BsIc5aMc.js +0 -2
  187. package/dist/client/assets/store-registry-ofreyRMo.js +0 -2
  188. package/dist/client/assets/useInfiniteQuery-CkLPMOdO.js +0 -1
  189. package/dist/client/assets/useSuspenseInfiniteQuery-3g8exEkj.js +0 -1
  190. package/dist/client/assets/workflow-detail-BJ1tXzcM.js +0 -1
  191. package/dist/server/node_modules/xtend/.jshintrc +0 -30
  192. package/dist/server/node_modules/xtend/README.md +0 -32
  193. package/dist/server/node_modules/xtend/immutable.js +0 -19
  194. package/dist/server/node_modules/xtend/mutable.js +0 -17
  195. package/dist/server/node_modules/xtend/package.json +0 -55
  196. package/dist/server/node_modules/xtend/test.js +0 -103
@@ -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-D9n-W_rO.js";import{P as x}from"./index-CMnREwkX.js";import{d as I}from"./use-organization-settings-Crj_HvGT.js";import{S as Q}from"./switch-D664sdCn.js";import{n as R}from"./Container-BXYDPrF5.js";import{b as w,S as z,a as F,d as M}from"./settings-section-DLmXqm7P.js";import"./tooltip-D3G-75TX.js";import"./X-yKx8T0mV.js";import"./constants-BBSLGS7p.js";import"./card-CMatfPs6.js";import"./ArrowUpRight-Bxgj2IVp.js";function N(){const e=b.c(17),{org:t,project:s}=k(),o=E();let u;e[0]!==s.enabledPlugins?(u=s.enabledPlugins??[],e[0]=s.enabledPlugins,e[1]=u):u=e[1];const c=u,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 d=new Set(c);r?d.add(n):d.delete(n),l.mutate({enabled_plugins:Array.from(d)},{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),d=C(n.id),h=c.includes(n.id);return i.jsx(w,{title:r?.label??n.id,description:d??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-DeZ4lzZS.js";import{P as x}from"./index-Cnr3iyKb.js";import{d as I}from"./use-organization-settings-CgpGj7yV.js";import{S as Q}from"./switch-Cym1wsqe.js";import{n as R}from"./Container-W30Qs4TE.js";import{b as w,S as z,a as F,d as M}from"./settings-section-B79eSyxk.js";import"./tooltip-CzbSAgXQ.js";import"./X-CXRgDFum.js";import"./constants-DfKy425l.js";import"./card-CuKTvJk_.js";import"./ArrowUpRight-ByDFdIYO.js";function N(){const e=b.c(17),{org:t,project:s}=k(),o=E();let u;e[0]!==s.enabledPlugins?(u=s.enabledPlugins??[],e[0]=s.enabledPlugins,e[1]=u):u=e[1];const c=u,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 d=new Set(c);r?d.add(n):d.delete(n),l.mutate({enabled_plugins:Array.from(d)},{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),d=C(n.id),h=c.includes(n.id);return i.jsx(w,{title:r?.label??n.id,description:d??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-D9n-W_rO.js";import{L as N}from"./label-CuWuUZ3O.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-DeZ4lzZS.js";import{L as N}from"./label-B56NHqZu.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-D9n-W_rO.js";import{P as V}from"./index-CMnREwkX.js";import{u as he}from"./use-org-auth-client-C94Cx1kj.js";import{u as je}from"./use-debounced-autosave-B2P6o2k5.js";import{A as be}from"./avatar-DiYo_VFp.js";import{I as ve}from"./input-Aj2AxbJX.js";import{S as X,a as Z,b as Q,c as Se,d as ye}from"./settings-section-DLmXqm7P.js";import{D as Ne}from"./domain-settings-CjSKJW17.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-Dsu0rnLF.js";import{W as ee,i as Re}from"./constants-BBSLGS7p.js";import{b as le}from"./use-virtual-mcp-DbNBWdfU.js";import{b as Le,P as $e,a as Fe}from"./popover-DFJMwPZz.js";import{S as Me}from"./skeleton-fTv1xeu9.js";import{y as Be}from"./agent-icon-6IsHLhhx.js";import{s as He}from"./Plus-CDEOyPu8.js";import{a as ae}from"./Users03-BbIOB2XC.js";import{i as Ke}from"./X-yKx8T0mV.js";import{I as J}from"./integration-icon-CNrz8Wxa.js";import{u as Ue,c as qe}from"./use-organization-settings-Crj_HvGT.js";import"./tooltip-D3G-75TX.js";import"./User01-CDDY3fE9.js";import"./card-CMatfPs6.js";import"./ArrowUpRight-Bxgj2IVp.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./switch-D664sdCn.js";import"./SearchMd-6IRfjRcX.js";import"./use-collections-D6rFCbFs.js";import"./AlertCircle-ri2xuBKe.js";import"./Tool01-DMFP0Svb.js";import"./XClose-Bk1D4OG4.js";import"./RefreshCcw01-B2ZHRQzo.js";import"./ArrowNarrowLeft-yxFeL5-Q.js";import"./XCircle-BLtaN_6O.js";import"./ZapSquare-BOPwjpzz.js";import"./CheckCircle-D7N7MOmw.js";import"./Check-C6Fa8-x7.js";import"./ChevronDown-DmrzaACF.js";import"./ChevronRight-CZ_XAq5W.js";import"./ChevronUp-Ds9ufeJd.js";import"./DotsVertical-CYFsY1AY.js";import"./Container-BXYDPrF5.js";import"./Star01-BSZxz5Wn.js";import"./Palette-D0iAFXNq.js";import"./LinkExternal01-Dvpxn-Ig.js";import"./Lock01-63SpB195.js";import"./Sun-DdqVKeEA.js";import"./Play-D4xI5B_i.js";import"./Settings02-3HEuuiVe.js";import"./Shield01-BGj8uiOU.js";import"./Trash01-Dj5mVOWm.js";import"./Zap-Ctp20y2W.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-DeZ4lzZS.js";import{P as V}from"./index-Cnr3iyKb.js";import{u as he}from"./use-org-auth-client-CZ46-R8H.js";import{u as je}from"./use-debounced-autosave-B3LX33uh.js";import{A as be}from"./avatar-ChukgIuT.js";import{I as ve}from"./input-BbtZTtIz.js";import{S as X,a as Z,b as Q,c as Se,d as ye}from"./settings-section-B79eSyxk.js";import{D as Ne}from"./domain-settings-Dpd1_jlw.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-Clt8DXHN.js";import{W as ee,i as Re}from"./constants-DfKy425l.js";import{b as le}from"./use-virtual-mcp-DNHpowZu.js";import{b as Le,P as $e,a as Fe}from"./popover-BWJBmR0W.js";import{S as Me}from"./skeleton-j1f8Y-yp.js";import{y as Be}from"./agent-icon-D59FxHod.js";import{s as He}from"./Plus-CxH8Dky0.js";import{a as ae}from"./Users03-DEpz3kvM.js";import{i as Ke}from"./X-CXRgDFum.js";import{I as J}from"./integration-icon-CX-4HHYz.js";import{u as Ue,c as qe}from"./use-organization-settings-CgpGj7yV.js";import"./tooltip-CzbSAgXQ.js";import"./User01-kuDW4DKu.js";import"./card-CuKTvJk_.js";import"./ArrowUpRight-ByDFdIYO.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./switch-Cym1wsqe.js";import"./SearchMd-DJcqe9YA.js";import"./use-collections-DSBDbO1N.js";import"./AlertCircle--wiBhyBy.js";import"./Tool01-zaCqe86u.js";import"./XClose-C4DzyMov.js";import"./RefreshCcw01-DUZtukjI.js";import"./ArrowNarrowLeft-DUEFTkCU.js";import"./XCircle-CGvUuorr.js";import"./ZapSquare-DKEusvEW.js";import"./CheckCircle-CIhRIzNe.js";import"./Check-C936sYYN.js";import"./ChevronDown-D9-4IfgQ.js";import"./ChevronRight-DYzYB9o2.js";import"./ChevronUp-DjhQ54oJ.js";import"./DotsVertical-BTQcMhn-.js";import"./Container-W30Qs4TE.js";import"./Star01-Dl0-D7bS.js";import"./Palette-BkIcRAuI.js";import"./LinkExternal01-BWQuO7gD.js";import"./Lock01-CzswZlFM.js";import"./Sun-DZgB_ONP.js";import"./Play-CX-s0F5M.js";import"./Settings02-19U6Pasa.js";import"./Shield01-C1y1P7P6.js";import"./Trash01-DKdnsDmj.js";import"./Zap-Cl0ETvvt.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-D9n-W_rO.js";import{D as Ts,F as Es,B as $s}from"./index-DM4aujMZ.js";import{e as Fe,i as Os,u as ae}from"./constants-BBSLGS7p.js";import{b as fn}from"./use-virtual-mcp-DbNBWdfU.js";import{M as Re}from"./monaco-editor-PZYP8jhf.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-Cp5pOFIt.js";import{B as le}from"./badge-v1Fnh_-2.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-DWMsyC47.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-C_78kpYQ.js";import{V as Xs}from"./view-mode-toggle-CwkAkApt.js";import{a9 as Js,aa as Gs,i as Qs,a1 as mn,ab as Ys,P 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-6IsHLhhx.js";import{i as hn}from"./Play-D4xI5B_i.js";import{b as ro,a as io,V as Qe}from"./layout-zn0Mql8j.js";import{c as gn,T as bn,a as Sn,b as jn}from"./tooltip-D3G-75TX.js";import{u as lo,a as co}from"./use-connection-ChcOtrff.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-BcOc7oDE.js";import{c as ao,d as uo,e as fo,D as mo,a as po,b as xo}from"./dialog-CICi1bFC.js";import"./index-BCI_OHNR.js";import{S as ho}from"./index-PFIdYUp0.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-DVFKsYz3.js";import{s as go}from"./Plus-CDEOyPu8.js";import{b as kn}from"./Tool01-DMFP0Svb.js";import{i as He}from"./Check-C6Fa8-x7.js";import{s as Mt}from"./XClose-Bk1D4OG4.js";import{I as Lt}from"./integration-icon-CNrz8Wxa.js";import{a as bo,S as So}from"./scroll-area-D7xTqtD-.js";import"./index-B7e3gTna.js";import{i as _n}from"./X-yKx8T0mV.js";import{u as Cn,a as jo}from"./use-collections-D6rFCbFs.js";import{E as In}from"./empty-state-CwHUFi5m.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-Aj2AxbJX.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-DeZ4lzZS.js";import{D as Ts,F as Es,B as $s}from"./index-Lha-Dz-p.js";import{e as Fe,i as Os,u as ae}from"./constants-DfKy425l.js";import{b as fn}from"./use-virtual-mcp-DNHpowZu.js";import{M as Re}from"./monaco-editor-B3eeVSHt.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-fFsu-8K2.js";import{B as le}from"./badge-CYxiHq4p.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-CACnwoTF.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-PaARzNIj.js";import{V as Xs}from"./view-mode-toggle-CWWQpnSB.js";import{a9 as Js,aa as Gs,i as Qs,a1 as mn,ab as Ys,P 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-D59FxHod.js";import{i as hn}from"./Play-CX-s0F5M.js";import{b as ro,a as io,V as Qe}from"./layout-DJRPSgl8.js";import{c as gn,T as bn,a as Sn,b as jn}from"./tooltip-CzbSAgXQ.js";import{u as lo,a as co}from"./use-connection-DbYn3h0U.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-LXbg-7b0.js";import{c as ao,d as uo,e as fo,D as mo,a as po,b as xo}from"./dialog-De2L-Mm9.js";import"./index-aqFN5mzK.js";import{S as ho}from"./index-YoMTmLrM.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-B7VqWYeT.js";import{s as go}from"./Plus-CxH8Dky0.js";import{b as kn}from"./Tool01-zaCqe86u.js";import{i as He}from"./Check-C936sYYN.js";import{s as Mt}from"./XClose-C4DzyMov.js";import{I as Lt}from"./integration-icon-CX-4HHYz.js";import{a as bo,S as So}from"./scroll-area-CpFD8S3R.js";import"./index-DZ2mE-ID.js";import{i as _n}from"./X-CXRgDFum.js";import{u as Cn,a as jo}from"./use-collections-DSBDbO1N.js";import{E as In}from"./empty-state-DH5ZYu9E.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-BbtZTtIz.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
  `)}