decocms 4.372.3 → 4.373.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (528) hide show
  1. package/dist/client/assets/{AlertCircle-CMjsP_Tk.js → AlertCircle-3PzOAmGf.js} +1 -1
  2. package/dist/client/assets/{AreaChart-Bh_grNQZ.js → AreaChart-7E6DaaEO.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-CjYy5Nhj.js → ArrowLeft-JCMxLp8E.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-CLncCNat.js → ArrowRight-Cl3bzAIC.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Cii1LHW7.js → ArrowUp-Bmd2w7Fx.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-CD-5y_pX.js → CartesianChart-D-MpJhL1.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DHXQFnpK.js → CheckCircle-Co3IBXeH.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-DiYhGG4T.js → ChevronUp-Djmy8s04.js} +1 -1
  9. package/dist/client/assets/{Copy01-nMxlBfeT.js → Copy01-BYK2zIkj.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-CWXVH3ZM.js → CreditCard01-C7PO4dVs.js} +1 -1
  11. package/dist/client/assets/DotsVertical-BozfeMf6.js +1 -0
  12. package/dist/client/assets/{Download01-BRrSA3Yx.js → Download01-Z6w2IrLj.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-fXvhmekg.js → ErrorBarContext-G3lO5Hsl.js} +1 -1
  14. package/dist/client/assets/{Eye-Dyg2WPG4.js → Eye-ChO6k3fk.js} +1 -1
  15. package/dist/client/assets/{Globe01-D6FaaFR2.js → Globe01-D3UtmZtY.js} +1 -1
  16. package/dist/client/assets/{Users03-Y0Jco4zL.js → Globe04-CCIm2Cf2.js} +1 -1
  17. package/dist/client/assets/{Image01-CxnjAzbb.js → Image01-Dx7ea-3O.js} +1 -1
  18. package/dist/client/assets/{Key01-CIXwHMRo.js → Key01-B8q0d-op.js} +1 -1
  19. package/dist/client/assets/LayoutLeft-DUo3bbMr.js +1 -0
  20. package/dist/client/assets/{Line-YO4Ozgbt.js → Line-DC3wc0Zn.js} +1 -1
  21. package/dist/client/assets/{Link01-C0FvgZZB.js → Link01-C-mBEv93.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-AWlhN5o7.js → LinkExternal01-uHE64k_w.js} +1 -1
  23. package/dist/client/assets/{Monitor01-Ccs1gh2Z.js → Monitor01-CevElukI.js} +1 -1
  24. package/dist/client/assets/{Package-nTbucmaQ.js → Package-C6yqPbb7.js} +1 -1
  25. package/dist/client/assets/{Palette-DSdn1Xis.js → Palette-B2v8R7_D.js} +1 -1
  26. package/dist/client/assets/{Play-lMuWOObF.js → Play-D26LBNWf.js} +1 -1
  27. package/dist/client/assets/{Plus-CVauOqLT.js → Plus-CoGTSnEd.js} +1 -1
  28. package/dist/client/assets/{SearchLg-BrrPVuXr.js → SearchLg-BvCfRAbg.js} +1 -1
  29. package/dist/client/assets/{SearchMd-C45D2PMI.js → SearchMd-C0e2gT30.js} +1 -1
  30. package/dist/client/assets/{Sector-9mXbxJ9i.js → Sector-Cztbz-wz.js} +5 -5
  31. package/dist/client/assets/{Settings02-Cyf85ea0.js → Settings02-azWHb0MO.js} +1 -1
  32. package/dist/client/assets/{Share07-wC47qn2E.js → Share07-CW1RSVqD.js} +1 -1
  33. package/dist/client/assets/{Stars01-oAh9h5b5.js → Stars01-Ch2E4B6o.js} +1 -1
  34. package/dist/client/assets/{Sun-0Ied-kyZ.js → Sun-Cx4zdBZx.js} +1 -1
  35. package/dist/client/assets/Tool01-DbFf2Je1.js +1 -0
  36. package/dist/client/assets/{Tool02-CATStXCy.js → Tool02-Hh7HLEzm.js} +1 -1
  37. package/dist/client/assets/{Trash01-nl-t4IoV.js → Trash01-D8ICnU7E.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-BFAEMx9E.js → TrendUp01-ZTgT_kdi.js} +1 -1
  39. package/dist/client/assets/{Upload01-B4Fqdkae.js → Upload01-BoLmU8be.js} +1 -1
  40. package/dist/client/assets/{User01-ClMaVCaJ.js → User01-CQXsOD6P.js} +1 -1
  41. package/dist/client/assets/{UserSquare-B2lKdt4w.js → UserSquare-C4_QxRGQ.js} +1 -1
  42. package/dist/client/assets/{Users01-BFhxJVhO.js → Users01-mzXfNn0j.js} +1 -1
  43. package/dist/client/assets/{X-CFCE4a-Q.js → X-BmPcW1eb.js} +1 -1
  44. package/dist/client/assets/{XCircle-CleKT0Id.js → XCircle-jpeASVbU.js} +1 -1
  45. package/dist/client/assets/{SwitchHorizontal01-DpXsFGyJ.js → XClose-BhXJw65F.js} +1 -1
  46. package/dist/client/assets/{Zap-B6zkqKWB.js → Zap-Cc5rEM6R.js} +1 -1
  47. package/dist/client/assets/ZoomOut-DtzZmmbM.js +1 -0
  48. package/dist/client/assets/{access-gate-Ds4n25mC.js → access-gate-C720AIcS.js} +1 -1
  49. package/dist/client/assets/add-connection-dialog-DqhI8LLv.js +1 -0
  50. package/dist/client/assets/agent-analytics-CEaAXQWf.js +2 -0
  51. package/dist/client/assets/agent-app-DZehCYZl.js +1 -0
  52. package/dist/client/assets/agent-assets-QG4QLYi4.js +1 -0
  53. package/dist/client/assets/agent-automation-C9l9hEWB.js +20 -0
  54. package/dist/client/assets/agent-automations-7OvEQ1VY.js +1 -0
  55. package/dist/client/assets/agent-connect-sources-D4Eixo2_.js +1 -0
  56. package/dist/client/assets/agent-deck-BVRxo7rJ.js +1 -0
  57. package/dist/client/assets/agent-e2e-Dhn8AUR2.js +1 -0
  58. package/dist/client/assets/agent-experiments-DXXxqvO5.js +1 -0
  59. package/dist/client/assets/agent-file-CoPjYzW3.js +1 -0
  60. package/dist/client/assets/{agent-git-D4IYczGa.js → agent-git-Dz0OC5zZ.js} +2 -2
  61. package/dist/client/assets/agent-hosting-h_IXMzav.js +1 -0
  62. package/dist/client/assets/agent-icon-DbgbaBWC.js +1 -0
  63. package/dist/client/assets/agent-library-file-DLEwy6vn.js +1 -0
  64. package/dist/client/assets/agent-monitor-K9XcbQ8_.js +1 -0
  65. package/dist/client/assets/agent-overview-CHDp8hoe.js +1 -0
  66. package/dist/client/assets/agent-settings-Cw8w6Gap.js +1 -0
  67. package/dist/client/assets/{agent-site-editor-DJSdtoNU.js → agent-site-editor-DQY9pg4H.js} +13 -13
  68. package/dist/client/assets/agent-site-editor-code-B1APLc6I.js +2 -0
  69. package/dist/client/assets/agent-site-editor-content-N2XOogCr.js +2 -0
  70. package/dist/client/assets/agent-site-editor-preview-Dt5NU6JJ.js +518 -0
  71. package/dist/client/assets/agent-view-DVRDYkCo.js +1 -0
  72. package/dist/client/assets/{agent-view-guard-DHJpzCVR.js → agent-view-guard-DJyWI4yF.js} +1 -1
  73. package/dist/client/assets/agents-list-CLIUc54V.js +1 -0
  74. package/dist/client/assets/{ai-providers-jxGd6MbV.js → ai-providers-Dq0uWBim.js} +2 -2
  75. package/dist/client/assets/{alert-U2IStW1f.js → alert-D9Xs8r1J.js} +1 -1
  76. package/dist/client/assets/{alert-dialog-BI-B_8hq.js → alert-dialog-CMdGVc5y.js} +2 -2
  77. package/dist/client/assets/api-keys-BaELtPjJ.js +1 -0
  78. package/dist/client/assets/api-keys-DMJLQGyU.js +1 -0
  79. package/dist/client/assets/app-editor-CxVdHjkp.js +1 -0
  80. package/dist/client/assets/asset-utils-B2xrnUou.js +1 -0
  81. package/dist/client/assets/{auth-DhzAq_9m.js → auth-DvTDuEnH.js} +1 -1
  82. package/dist/client/assets/{auth-catchall-Dar7OygY.js → auth-catchall-CE_y-mnY.js} +1 -1
  83. package/dist/client/assets/auth-entry-BWD0wZ2A.js +1 -0
  84. package/dist/client/assets/{auth-split-layout-DLFqjvPt.js → auth-split-layout-tneb1o26.js} +1 -1
  85. package/dist/client/assets/{authenticate-and-persist-oauth-DkJ4g-X5.js → authenticate-and-persist-oauth-CyEJ3ZKP.js} +1 -1
  86. package/dist/client/assets/automation-list-row-CJ0AVjPL.js +1 -0
  87. package/dist/client/assets/automation-runs-CbMZ10A-.js +1 -0
  88. package/dist/client/assets/automations-kGGjILm8.js +1 -0
  89. package/dist/client/assets/{autosend-BberXmli.js → autosend-CESqNA2a.js} +1 -1
  90. package/dist/client/assets/{avatar-C9HiP4eS.js → avatar-CsDZ0T22.js} +1 -1
  91. package/dist/client/assets/badge-BMuU0t5h.js +1 -0
  92. package/dist/client/assets/block-document-BydU2jcx.js +3 -0
  93. package/dist/client/assets/{blocks-preview-workspace-context-Bwmvvd4S.js → blocks-preview-workspace-context-CuzoVyh9.js} +1 -1
  94. package/dist/client/assets/breadcrumb-CV5rO8sh.js +1 -0
  95. package/dist/client/assets/{buckets-BndbOAGO.js → buckets-Dm9YtrYe.js} +1 -1
  96. package/dist/client/assets/build-improve-prompt-doc-EvTa14jr.js +2 -0
  97. package/dist/client/assets/bulk-category-panel-CY3h3K-9.js +1 -0
  98. package/dist/client/assets/calendar-BhMl9dZ9.js +1 -0
  99. package/dist/client/assets/capability-load-error-HRK6520w.js +1 -0
  100. package/dist/client/assets/category-editor-z_l9WPAc.js +1 -0
  101. package/dist/client/assets/{chart-8nXuVw9P.js → chart-pALnZlqd.js} +5 -5
  102. package/dist/client/assets/{chat-context-tZCX_cqt.js → chat-context-CHZ5Yehn.js} +6 -6
  103. package/dist/client/assets/{chat-draft-BCeqPSxA.js → chat-draft-CZ4LRf6I.js} +1 -1
  104. package/dist/client/assets/checkbox-BoN76eap.js +1 -0
  105. package/dist/client/assets/choose-editor-DHr5QgoP.js +1 -0
  106. package/dist/client/assets/{cli-auth-success-D39z_FO3.js → cli-auth-success-BOpU9sA8.js} +1 -1
  107. package/dist/client/assets/{client-icons-DpcP1bht.js → client-icons-BPRdY54C.js} +1 -1
  108. package/dist/client/assets/collapsible-D3vKPIBT.js +1 -0
  109. package/dist/client/assets/collection-detail-B44G83q8.js +1 -0
  110. package/dist/client/assets/collection-display-button-BndwflUf.js +1 -0
  111. package/dist/client/assets/{collection-search-J9Bt25gS.js → collection-search-BmT0oV8g.js} +1 -1
  112. package/dist/client/assets/{collection-table-wrapper-DBeauaNS.js → collection-table-wrapper-UMxhNoR0.js} +1 -1
  113. package/dist/client/assets/collection-tabs-D6Sk9riW.js +1 -0
  114. package/dist/client/assets/combobox-BXOISFpW.js +1 -0
  115. package/dist/client/assets/command-bqq51nHs.js +1 -0
  116. package/dist/client/assets/{companion-mcps-section-xmRpNJBK.js → companion-mcps-section-7NiZEsE1.js} +1 -1
  117. package/dist/client/assets/connect-gdFpiJzg.js +8 -0
  118. package/dist/client/assets/connect-layout-BNcHFw2B.js +1 -0
  119. package/dist/client/assets/{connection-DD0omVHZ.js → connection-DlOqhGn3.js} +1 -1
  120. package/dist/client/assets/connection-card-Dh4yj-V8.js +1 -0
  121. package/dist/client/assets/connection-detail-Cjp3fFqG.js +1 -0
  122. package/dist/client/assets/{connection-form-helpers-CHlcdgAK.js → connection-form-helpers-DoXq4oCN.js} +1 -1
  123. package/dist/client/assets/connections-BTo7AfIR.js +1 -0
  124. package/dist/client/assets/{create-organization-dialog-1mI4Ad1B.js → create-organization-dialog-CjRZ3hmF.js} +1 -1
  125. package/dist/client/assets/{decofile-api-BNWbEMR6.js → decofile-api-DlO_JJTI.js} +1 -1
  126. package/dist/client/assets/{decopilot-BvepxP_-.js → decopilot-BbHxwoKU.js} +2 -2
  127. package/dist/client/assets/dialog-yUWKJPsU.js +1 -0
  128. package/dist/client/assets/discover-_mwx3kHk.js +1 -0
  129. package/dist/client/assets/domain-settings-DWfJmRnt.js +1 -0
  130. package/dist/client/assets/download-app-dialog-CnJNRM3l.js +1 -0
  131. package/dist/client/assets/{drawer-BIjkXMV3.js → drawer-CFueQivP.js} +1 -1
  132. package/dist/client/assets/{editor-D4Ls62vg.js → editor-9_pChBN4.js} +1 -1
  133. package/dist/client/assets/{empty-state-CyICQznD.js → empty-state-1TOptJ4i.js} +1 -1
  134. package/dist/client/assets/{empty-state-BdiOfgle.js → empty-state-DTENIvqH.js} +1 -1
  135. package/dist/client/assets/{extract-connection-data-Dbm_cKaX.js → extract-connection-data-B7yRd0El.js} +1 -1
  136. package/dist/client/assets/{feature-gate-Bp7Cydio.js → feature-gate-DmyzkRdC.js} +1 -1
  137. package/dist/client/assets/feature-paywall-CFcsZgv5.js +1 -0
  138. package/dist/client/assets/file-explorer-BPttIqTX.js +2 -0
  139. package/dist/client/assets/{file-preview-CARebwHJ.js → file-preview-h8_PuEm0.js} +1 -1
  140. package/dist/client/assets/file-share-button-CYWl5jll.js +3 -0
  141. package/dist/client/assets/{file-type-icon-C9Qn36v4.js → file-type-icon-C7b31Eu-.js} +1 -1
  142. package/dist/client/assets/{folder-icon-BLBZBD_a.js → folder-icon-Cp3UZ2f7.js} +1 -1
  143. package/dist/client/assets/{form-CSXgIHLz.js → form-D4fabgxt.js} +1 -1
  144. package/dist/client/assets/{gateway-client-BuiOykcN.js → gateway-client-BqcIzR1f.js} +1 -1
  145. package/dist/client/assets/general-BVFviafD.js +1 -0
  146. package/dist/client/assets/{github-icon-huXDOAgf.js → github-icon-BJ-JIGKg.js} +1 -1
  147. package/dist/client/assets/home-D_wLSsVp.js +1 -0
  148. package/dist/client/assets/{hooks-BoX5BC-f.js → hooks-CzhqOgxt.js} +2 -2
  149. package/dist/client/assets/{hooks-DZOMRp7D.js → hooks-GmRpr8h8.js} +1 -1
  150. package/dist/client/assets/icon-button-BtmumYDv.js +1 -0
  151. package/dist/client/assets/index-BIAbKV8r.js +1 -0
  152. package/dist/client/assets/index-BiU3YmQL.js +235 -0
  153. package/dist/client/assets/{index-BD213WLU.js → index-Bxbv_23l.js} +1 -1
  154. package/dist/client/assets/index-CFPoNDBi.js +1 -0
  155. package/dist/client/assets/{index-Bb-Re5q8.js → index-CLccaHLm.js} +1 -1
  156. package/dist/client/assets/{index-BWpNlf6e.js → index-CLlrN2I7.js} +1 -1
  157. package/dist/client/assets/{index-DiULBiX9.js → index-CuhH8P7u.js} +1 -1
  158. package/dist/client/assets/index-CxyF2W3e.js +1 -0
  159. package/dist/client/assets/{index-DWw5wi2G.js → index-DAWDSRE3.js} +1 -1
  160. package/dist/client/assets/index-DEoa7bfP.js +5 -0
  161. package/dist/client/assets/index-DaUTlKSt.css +1 -0
  162. package/dist/client/assets/{index-DqT4mG5l.js → index-DmozmqiR.js} +1 -1
  163. package/dist/client/assets/{index-2gtoysbs.js → index-DyLXwR4J.js} +1 -1
  164. package/dist/client/assets/index-PXtwpYFZ.js +26 -0
  165. package/dist/client/assets/{index-redirect-BQTLrDGT.js → index-redirect-C_mVUP1U.js} +1 -1
  166. package/dist/client/assets/{index-tj4CWdxr.js → index-ui6lA5FC.js} +1 -1
  167. package/dist/client/assets/{infiniteQueryObserver-CjWlcBHD.js → infiniteQueryObserver-QHtAxfIQ.js} +1 -1
  168. package/dist/client/assets/infra-billing-BUNh4stc.js +1 -0
  169. package/dist/client/assets/input-4CSpUSQl.js +1 -0
  170. package/dist/client/assets/input-BGhe0a85.js +8 -0
  171. package/dist/client/assets/input-CRD8MdDS.js +1 -0
  172. package/dist/client/assets/{integration-icon-BeEdjsn9.js → integration-icon-1ySWGOUX.js} +1 -1
  173. package/dist/client/assets/{label-BMxIRiEr.js → label-BNElcQf4.js} +1 -1
  174. package/dist/client/assets/{last-preview-page-B_H0ubHa.js → last-preview-page-CriZ3Ybr.js} +1 -1
  175. package/dist/client/assets/layout-JObct3sA.js +1 -0
  176. package/dist/client/assets/legacy-agents-deep-Be8TTzCS.js +1 -0
  177. package/dist/client/assets/legacy-main-redirect-B7vEff38.js +1 -0
  178. package/dist/client/assets/library-DiWyPd02.js +161 -0
  179. package/dist/client/assets/{login-C4Dx9xMO.js → login-Cp8tUb0B.js} +1 -1
  180. package/dist/client/assets/{markdown-DGWjAeXL.js → markdown-Cyp9lJ5l.js} +3 -3
  181. package/dist/client/assets/{mcp-app-renderer-BTjC7Gse.js → mcp-app-renderer-swczxBq4.js} +2 -2
  182. package/dist/client/assets/{mcp-oauth-C4khbNJJ.js → mcp-oauth-S1Th8e_4.js} +1 -1
  183. package/dist/client/assets/members--h5oznU6.js +1 -0
  184. package/dist/client/assets/message-templates-B7sm0uFT.js +1 -0
  185. package/dist/client/assets/{mini-report-page-Ci4cxCz8.js → mini-report-page-gIgc_0u6.js} +1 -1
  186. package/dist/client/assets/mock-board-BgLaLM9b.js +90 -0
  187. package/dist/client/assets/{monaco-editor-CMRYkmyb.js → monaco-editor-BTTiRg3C.js} +2 -2
  188. package/dist/client/assets/{monitoring-stats-row-PncjnNwy.js → monitoring-stats-row-SqX44qyF.js} +1 -1
  189. package/dist/client/assets/multi-select-DlCEHd3Z.js +1 -0
  190. package/dist/client/assets/{mustache-CPZS2ebG.js → mustache-CgVU0pmm.js} +1 -1
  191. package/dist/client/assets/{oauth-callback-CETK2WZB.js → oauth-callback-DVF3P0k_.js} +1 -1
  192. package/dist/client/assets/{oauth-callback-ai-provider-DqbbngEF.js → oauth-callback-ai-provider-DnZgYvOg.js} +1 -1
  193. package/dist/client/assets/{onboarding-B5zAGi2B.js → onboarding-KuoWylVw.js} +1 -1
  194. package/dist/client/assets/optimistic-project-sidebar-views-DbOixNPz.js +1 -0
  195. package/dist/client/assets/{org-file-open-context-BCUpiY_R.js → org-file-open-context-ZSKUsYTL.js} +1 -1
  196. package/dist/client/assets/{organization-choice-BNulT5zU.js → organization-choice-xHSL_jFs.js} +1 -1
  197. package/dist/client/assets/orgs-BZ30h814.js +1 -0
  198. package/dist/client/assets/{page-seo-form-BrHgBXF1.js → page-seo-form-uvAq8WeJ.js} +1 -1
  199. package/dist/client/assets/{pair-B46EBBjF.js → pair-TxCwxPu7.js} +8 -8
  200. package/dist/client/assets/plan-ladder-Jef48mB3.js +1 -0
  201. package/dist/client/assets/{popover-yk_ePqAA.js → popover-QnaOlHhb.js} +1 -1
  202. package/dist/client/assets/post-calendar-iJnYrJKe.js +1 -0
  203. package/dist/client/assets/post-editor-Bo6bvTrf.js +1 -0
  204. package/dist/client/assets/{preview-content-CfbsbElk.js → preview-content-BZw1CdZv.js} +1 -1
  205. package/dist/client/assets/{preview-dialog-CA2C3DS4.js → preview-dialog-CW8lM0wY.js} +1 -1
  206. package/dist/client/assets/primitives-K6663FBF.js +1 -0
  207. package/dist/client/assets/profile-SyCdTPAI.js +1 -0
  208. package/dist/client/assets/project-app-view-LEql7xV5.js +1 -0
  209. package/dist/client/assets/project-feed-B-N2eAAK.js +1 -0
  210. package/dist/client/assets/{project-icon-MWmzrrm8.js → project-icon-DeL96Npe.js} +1 -1
  211. package/dist/client/assets/project-reports-bArXCdyS.js +1 -0
  212. package/dist/client/assets/project-tasks-CK2bx81L.js +1 -0
  213. package/dist/client/assets/{prompts-4lILOzK9.js → prompts-xGBFLFgt.js} +1 -1
  214. package/dist/client/assets/record-editor-Bf769MFv.js +1 -0
  215. package/dist/client/assets/redirect-editor-DXB_8yBv.js +1 -0
  216. package/dist/client/assets/registry-lIOKlNUJ.js +2 -0
  217. package/dist/client/assets/registry-layout-hsve34X8.js +27 -0
  218. package/dist/client/assets/reports-CXzE7a39.js +1 -0
  219. package/dist/client/assets/{reports-BpxYdv2_.js → reports-cM3vPGFG.js} +2 -2
  220. package/dist/client/assets/reports-onboarding-VXLjX7pO.js +1 -0
  221. package/dist/client/assets/reports-tab-D8TZTv9m.js +2 -0
  222. package/dist/client/assets/repositories-CPa6SZ5V.js +1 -0
  223. package/dist/client/assets/repository-import-picker-IY5VTzNS.js +1 -0
  224. package/dist/client/assets/repository-picker-BZKrcN4Y.js +1 -0
  225. package/dist/client/assets/{require-capability-CmtOZnXt.js → require-capability-CimSbmsz.js} +1 -1
  226. package/dist/client/assets/{required-auth-layout-RoMNnMPO.js → required-auth-layout-C1pT7wzX.js} +1 -1
  227. package/dist/client/assets/{reset-password-BeUL8IgX.js → reset-password-BjWIunWT.js} +1 -1
  228. package/dist/client/assets/resizable-YNqh8MUH.js +1 -0
  229. package/dist/client/assets/review-settings-Be2fdXif.js +1 -0
  230. package/dist/client/assets/{rich-text-link-control-CHsxXHIo.js → rich-text-link-control-BExHOMAv.js} +2 -2
  231. package/dist/client/assets/roles-0e4U7If5.js +1 -0
  232. package/dist/client/assets/route-B5ZmPhcw.js +1 -0
  233. package/dist/client/assets/route-FGDifUW3.js +1 -0
  234. package/dist/client/assets/route-ajAF3k6E.js +1 -0
  235. package/dist/client/assets/route-page-header-DEpOaETW.js +1 -0
  236. package/dist/client/assets/runnable-block-editor-MngLlGqF.js +16 -0
  237. package/dist/client/assets/{sandbox-lifecycle-context-C7VKOJoV.js → sandbox-lifecycle-context-BfUCaKZp.js} +2 -2
  238. package/dist/client/assets/{schema-1zAO-l7e.js → schema-C2CxTC2d.js} +1 -1
  239. package/dist/client/assets/{scroll-area-C-wtbVS1.js → scroll-area-IfiqBxp0.js} +1 -1
  240. package/dist/client/assets/search-input-_eiEHUe0.js +1 -0
  241. package/dist/client/assets/search-toggle-Stpj_aWt.js +1 -0
  242. package/dist/client/assets/secrets-CDqpILuq.js +1 -0
  243. package/dist/client/assets/sections-editor-BBGWhCb9.js +2 -0
  244. package/dist/client/assets/select-47N7H1PV.js +1 -0
  245. package/dist/client/assets/select-model-BCgtIi3z.js +1 -0
  246. package/dist/client/assets/seo-editor-BrPfy2aB.js +1 -0
  247. package/dist/client/assets/separator-BlNapRt2.js +1 -0
  248. package/dist/client/assets/settings-tab-Dx5o1dO5.js +5 -0
  249. package/dist/client/assets/{sheet-i72Qx7sL.js → sheet-CvV2x5yz.js} +1 -1
  250. package/dist/client/assets/shell-layout-BMyUKhgs.js +1 -0
  251. package/dist/client/assets/{shell-layout-CuFt8bor.css → shell-layout-CE2Eihra.css} +1 -1
  252. package/dist/client/assets/sidebar-BMWTk3Ss.js +1 -0
  253. package/dist/client/assets/{skill-preview-gfYVdSdM.js → skill-preview-CqDKvwdL.js} +1 -1
  254. package/dist/client/assets/skills-CXSauL5l.js +1 -0
  255. package/dist/client/assets/sso-yxBZIEQo.js +1 -0
  256. package/dist/client/assets/store-registry-BsImLhdC.js +2 -0
  257. package/dist/client/assets/store-t7yAo4iS.js +1 -0
  258. package/dist/client/assets/{switch-BQFtt3BH.js → switch-DUPW32_G.js} +1 -1
  259. package/dist/client/assets/synced-repos-DWXwM86N.js +1 -0
  260. package/dist/client/assets/{table-6I6YKvFY.js → table-D1-dnD05.js} +1 -1
  261. package/dist/client/assets/{tabs-CLziM0Ww.js → tabs-uJDG1LT-.js} +1 -1
  262. package/dist/client/assets/{task-board-DrUf5p-Z.js → task-board-iF-5OywY.js} +1 -1
  263. package/dist/client/assets/task-route-D4VqZZFU.js +1 -0
  264. package/dist/client/assets/task-status-CUfsYmVV.js +1 -0
  265. package/dist/client/assets/taskboard-analytics-C0r-zgde.js +1 -0
  266. package/dist/client/assets/tasks-C5Yiiaae.js +1 -0
  267. package/dist/client/assets/{tasks-Drgd6az8.js → tasks-Dig9WuPL.js} +4 -4
  268. package/dist/client/assets/textarea-DbE6fIU0.js +1 -0
  269. package/dist/client/assets/thread-button-DcS2EMEc.js +1 -0
  270. package/dist/client/assets/{thread-intent-F-sZEflj.js → thread-intent-CnRICyzb.js} +1 -1
  271. package/dist/client/assets/thread-route-CTwlz0m2.js +1 -0
  272. package/dist/client/assets/thread-route-D_e3Th_q.js +1 -0
  273. package/dist/client/assets/thread-sheet-body-BPOqWNL-.js +1 -0
  274. package/dist/client/assets/toggle-group-ofCffann.js +1 -0
  275. package/dist/client/assets/toolbar-icon-button-DPZ8v-BD.js +1 -0
  276. package/dist/client/assets/{tooltip-DV2xHesQ.js → tooltip-BGb6Kdym.js} +1 -1
  277. package/dist/client/assets/{track-ZuOMvhd2.js → track-BtbUodA4.js} +1 -1
  278. package/dist/client/assets/{types-27TVsPN_.js → types-CyZPxJ7C.js} +3 -3
  279. package/dist/client/assets/usage-stats-UqDPk1rl.js +1 -0
  280. package/dist/client/assets/use-ai-providers-Cxi0vxkS.js +1 -0
  281. package/dist/client/assets/use-automations-CbK79XsB.js +1 -0
  282. package/dist/client/assets/{use-autosave-DOzyZumC.js → use-autosave-BEIVrcUg.js} +1 -1
  283. package/dist/client/assets/use-connect-companion-B3ql1eAJ.js +1 -0
  284. package/dist/client/assets/use-connection-C2XMAF5j.js +1 -0
  285. package/dist/client/assets/{use-copy-C_ctOeuP.js → use-copy-BhRM5JUh.js} +1 -1
  286. package/dist/client/assets/{use-create-virtual-mcp-D1w9d4ex.js → use-create-virtual-mcp-CZM9_2b6.js} +1 -1
  287. package/dist/client/assets/{use-date-fns-locale-onM9TTf8.js → use-date-fns-locale-bOp1dUM9.js} +1 -1
  288. package/dist/client/assets/{use-debounced-autosave-DqyNKPJM.js → use-debounced-autosave-DwFjgR25.js} +1 -1
  289. package/dist/client/assets/{use-debounced-value-B9nG3bW5.js → use-debounced-value-CoGGtS8x.js} +1 -1
  290. package/dist/client/assets/use-deco-credits-CKQJlHZi.js +1 -0
  291. package/dist/client/assets/{use-decopilot-events-BpuQrfKN.js → use-decopilot-events-CuJ7CkFw.js} +1 -1
  292. package/dist/client/assets/use-delete-connection-BF9eR-10.js +1 -0
  293. package/dist/client/assets/{use-deployment-admin-BVfgEagI.js → use-deployment-admin-5L_GV7bf.js} +1 -1
  294. package/dist/client/assets/{use-entitlements-Dl7pAsQ5.js → use-entitlements-BGdUcutE.js} +1 -1
  295. package/dist/client/assets/{use-fast-preview-draft-url-mcfOeAAq.js → use-fast-preview-draft-url-JPVt7oTt.js} +1 -1
  296. package/dist/client/assets/use-file-configs-CrAdkDbm.js +1 -0
  297. package/dist/client/assets/use-in-settings-CaGFgkXe.js +1 -0
  298. package/dist/client/assets/{use-infinite-scroll-PhBGPm8H.js → use-infinite-scroll-LXktD04_.js} +1 -1
  299. package/dist/client/assets/use-join-requests-Cju9AeLh.js +1 -0
  300. package/dist/client/assets/use-main-panel-tabs-C86PuGT_.js +1 -0
  301. package/dist/client/assets/use-mcp-auth-status-g0Tk-Phb.js +1 -0
  302. package/dist/client/assets/{use-mcp-client-e_hCatGm.js → use-mcp-client-Br7XFHza.js} +6 -6
  303. package/dist/client/assets/{use-mcp-prompts-DJRXjL4_.js → use-mcp-prompts-C6590AFl.js} +1 -1
  304. package/dist/client/assets/{use-mcp-tools-g86k4oib.js → use-mcp-tools-DpaWZTAA.js} +1 -1
  305. package/dist/client/assets/use-members-buh6Kqlm.js +1 -0
  306. package/dist/client/assets/{use-mobile-hIijCK0k.js → use-mobile-DVkjqQzh.js} +1 -1
  307. package/dist/client/assets/use-navigate-to-agent-LXQlcEnV.js +1 -0
  308. package/dist/client/assets/use-open-billing-url-Bage8zng.js +1 -0
  309. package/dist/client/assets/use-org-auth-client-cknSmCL5.js +1 -0
  310. package/dist/client/assets/use-org-fs-CJMhF9AL.js +1 -0
  311. package/dist/client/assets/use-org-repo-syncs-D2u9tZI_.js +8 -0
  312. package/dist/client/assets/{use-org-sso-BvfIL0yq.js → use-org-sso-zl0gtui9.js} +1 -1
  313. package/dist/client/assets/use-organization-roles-DUhOIBRz.js +1 -0
  314. package/dist/client/assets/use-organization-settings-DalrVcZ1.js +1 -0
  315. package/dist/client/assets/{use-panel-navigate-WrD0KEYx.js → use-panel-navigate-DMG8fP2m.js} +1 -1
  316. package/dist/client/assets/use-project-native-view-presence-DB5jQXqg.js +1 -0
  317. package/dist/client/assets/use-project-scope-_WcnrAA6.js +1 -0
  318. package/dist/client/assets/use-registry-connections-BQknTkkv.js +1 -0
  319. package/dist/client/assets/use-releases-CKVB62Nw.js +1 -0
  320. package/dist/client/assets/use-reports-diagnostic-BezpL0wm.js +1 -0
  321. package/dist/client/assets/{use-route-default-main-Djaj_cL9.js → use-route-default-main-fIaACxCL.js} +1 -1
  322. package/dist/client/assets/use-secrets-BN4lI9QI.js +1 -0
  323. package/dist/client/assets/{use-section-preview-base-BOFovHh4.js → use-section-preview-base-UXUDJdZU.js} +1 -1
  324. package/dist/client/assets/{use-session-runtime-BR1aW1y5.js → use-session-runtime-CGqfWswP.js} +1 -1
  325. package/dist/client/assets/use-tags-DUoR_C2Q.js +1 -0
  326. package/dist/client/assets/use-task-board-analytics-C5PpaVy-.js +1 -0
  327. package/dist/client/assets/use-task-metadata-Cd-4aUjL.js +1 -0
  328. package/dist/client/assets/use-thread-outputs-B1ptcJGL.js +1 -0
  329. package/dist/client/assets/{use-view-mode-B0LeaJg7.js → use-view-mode-IY2Xk-sG.js} +1 -1
  330. package/dist/client/assets/use-virtual-mcp-CmFx7CJY.js +1 -0
  331. package/dist/client/assets/useInfiniteQuery-KPKjfQBF.js +1 -0
  332. package/dist/client/assets/{useQueries-C-SV8tD7.js → useQueries-D09LYNgo.js} +1 -1
  333. package/dist/client/assets/useSuspenseInfiniteQuery-97L-Gf2j.js +1 -0
  334. package/dist/client/assets/{users-BiOPZ43X.js → users-Cd0bupzj.js} +1 -1
  335. package/dist/client/assets/utils-Bn3HByb8.js +4 -0
  336. package/dist/client/assets/variant-calendar-BKkugrKM.js +1 -0
  337. package/dist/client/assets/{variant-matcher-override-BFQoXu82.js → variant-matcher-override-dOY9vOi0.js} +1 -1
  338. package/dist/client/assets/view-mode-toggle-HCiL8YHS.js +1 -0
  339. package/dist/client/assets/{virtual-mcp-ldxphi5G.js → virtual-mcp-BaEt1QHH.js} +1 -1
  340. package/dist/client/index.html +2 -2
  341. package/dist/server/cli.js +1 -1
  342. package/dist/server/server.js +1 -1
  343. package/package.json +1 -1
  344. package/dist/client/assets/Check-B3RSsr_D.js +0 -1
  345. package/dist/client/assets/ChevronRight-USKkhEpL.js +0 -1
  346. package/dist/client/assets/ChevronSelectorVertical-DpRb2z1l.js +0 -1
  347. package/dist/client/assets/Database01-C0YJpjc3.js +0 -1
  348. package/dist/client/assets/DotsVertical-CsjwfYzf.js +0 -1
  349. package/dist/client/assets/File02-BvR-HYxK.js +0 -1
  350. package/dist/client/assets/GitBranch01-rWb2SJK9.js +0 -1
  351. package/dist/client/assets/HardDrive-DNTPLPT4.js +0 -1
  352. package/dist/client/assets/MessageCircle01-DBcg2aiD.js +0 -1
  353. package/dist/client/assets/Printer-CvyxF9Jo.js +0 -1
  354. package/dist/client/assets/Shield01-CqB4I7qm.js +0 -1
  355. package/dist/client/assets/Tool01-DouqPjim.js +0 -1
  356. package/dist/client/assets/XClose-BgzK-Dwz.js +0 -1
  357. package/dist/client/assets/ZoomOut-BPxprY2s.js +0 -1
  358. package/dist/client/assets/add-connection-dialog-DZjTm9W3.js +0 -1
  359. package/dist/client/assets/agent-analytics-DmvdLg8B.js +0 -2
  360. package/dist/client/assets/agent-app-BvmFdS4C.js +0 -1
  361. package/dist/client/assets/agent-assets-czUGY90q.js +0 -1
  362. package/dist/client/assets/agent-automation-C5Kr5Oj3.js +0 -20
  363. package/dist/client/assets/agent-automations-D-3-Opoc.js +0 -1
  364. package/dist/client/assets/agent-connect-sources-CjhmYssY.js +0 -1
  365. package/dist/client/assets/agent-deck-BC5MWVm-.js +0 -1
  366. package/dist/client/assets/agent-e2e-DkL4Ltr6.js +0 -1
  367. package/dist/client/assets/agent-experiments--rXT-2aB.js +0 -1
  368. package/dist/client/assets/agent-file-C3XkHLMm.js +0 -1
  369. package/dist/client/assets/agent-hosting-DaIfm8Hu.js +0 -1
  370. package/dist/client/assets/agent-icon-CczrFEe7.js +0 -1
  371. package/dist/client/assets/agent-library-file-Dji653pU.js +0 -1
  372. package/dist/client/assets/agent-monitor-C-HIyaF_.js +0 -1
  373. package/dist/client/assets/agent-overview-cm15sxNU.js +0 -1
  374. package/dist/client/assets/agent-settings-XmhY1FOi.js +0 -1
  375. package/dist/client/assets/agent-site-editor-code-_Tz57RqE.js +0 -2
  376. package/dist/client/assets/agent-site-editor-content-DOAcxz0t.js +0 -2
  377. package/dist/client/assets/agent-site-editor-preview-mg5Q6hoW.js +0 -518
  378. package/dist/client/assets/agent-view-ClMILC98.js +0 -1
  379. package/dist/client/assets/agents-list-rKFF5b3o.js +0 -1
  380. package/dist/client/assets/anchors-yqDzZN4K.js +0 -1
  381. package/dist/client/assets/api-keys-AIfL76r6.js +0 -1
  382. package/dist/client/assets/api-keys-B6ry5Bc6.js +0 -1
  383. package/dist/client/assets/app-editor-BZKFeBmU.js +0 -1
  384. package/dist/client/assets/asset-utils-DhbLEVKo.js +0 -1
  385. package/dist/client/assets/auth-entry-CwWjlqGu.js +0 -1
  386. package/dist/client/assets/automation-list-row-Btr-Kty6.js +0 -1
  387. package/dist/client/assets/automation-runs-CnOOOwZJ.js +0 -1
  388. package/dist/client/assets/automations-CtLmB1Eo.js +0 -1
  389. package/dist/client/assets/badge-Bu51Hlti.js +0 -1
  390. package/dist/client/assets/block-document-BLCekKXO.js +0 -3
  391. package/dist/client/assets/breadcrumb-Dhdru7Jh.js +0 -1
  392. package/dist/client/assets/build-improve-prompt-doc-Cedp3vV1.js +0 -2
  393. package/dist/client/assets/bulk-category-panel-D3c_qJDk.js +0 -1
  394. package/dist/client/assets/calendar-DIQx67oO.js +0 -1
  395. package/dist/client/assets/capability-load-error-CJMvYDf4.js +0 -1
  396. package/dist/client/assets/cards-BVw8sRdW.js +0 -8
  397. package/dist/client/assets/category-editor-C7sRrVfl.js +0 -1
  398. package/dist/client/assets/checkbox-jLf7fBuW.js +0 -1
  399. package/dist/client/assets/choose-editor-Cbu3-nVC.js +0 -1
  400. package/dist/client/assets/collapsible-CTgXdVQa.js +0 -1
  401. package/dist/client/assets/collection-detail-BF7WM7Gn.js +0 -1
  402. package/dist/client/assets/collection-display-button-C-4xB6xx.js +0 -1
  403. package/dist/client/assets/collection-tabs-CrXIJeNf.js +0 -1
  404. package/dist/client/assets/combobox-BHrqHmge.js +0 -1
  405. package/dist/client/assets/command-B-XD29Nx.js +0 -1
  406. package/dist/client/assets/command-palette-store-DK-56E2K.js +0 -1
  407. package/dist/client/assets/connect-D4qCE3TM.js +0 -8
  408. package/dist/client/assets/connect-layout-DGO84ImO.js +0 -1
  409. package/dist/client/assets/connection-card-fcMCwbTh.js +0 -1
  410. package/dist/client/assets/connection-detail-DS015J4e.js +0 -1
  411. package/dist/client/assets/connections-C98FMYyY.js +0 -1
  412. package/dist/client/assets/dialog-llvhXw2o.js +0 -1
  413. package/dist/client/assets/discover-DNPHmIfF.js +0 -1
  414. package/dist/client/assets/domain-settings-CXxEmIjB.js +0 -1
  415. package/dist/client/assets/download-app-dialog-D_4eQbbs.js +0 -1
  416. package/dist/client/assets/dropdown-menu-C5iafa8S.js +0 -1
  417. package/dist/client/assets/feature-paywall-DEy2mpV2.js +0 -1
  418. package/dist/client/assets/file-explorer-Bs7B2-rr.js +0 -2
  419. package/dist/client/assets/file-share-button-Dk1ugrdV.js +0 -3
  420. package/dist/client/assets/general-BYFfG0fF.js +0 -1
  421. package/dist/client/assets/home-DTaaCW3K.js +0 -1
  422. package/dist/client/assets/index-2eKztu7k.js +0 -5
  423. package/dist/client/assets/index-BH7uCYoT.js +0 -1
  424. package/dist/client/assets/index-CSd_k8Np.js +0 -1
  425. package/dist/client/assets/index-CiMUXLco.js +0 -26
  426. package/dist/client/assets/index-CpNTsElB.css +0 -1
  427. package/dist/client/assets/index-D4RUT3q0.js +0 -1
  428. package/dist/client/assets/index-D_X-LIyA.js +0 -1
  429. package/dist/client/assets/index-Dc7hzqoi.js +0 -235
  430. package/dist/client/assets/infra-billing-D6jrbNxA.js +0 -1
  431. package/dist/client/assets/input-DXlaTX4w.js +0 -1
  432. package/dist/client/assets/input-D_FfvHr0.js +0 -8
  433. package/dist/client/assets/input-uIV5S_EX.js +0 -1
  434. package/dist/client/assets/layout-Dli4i2a0.js +0 -1
  435. package/dist/client/assets/legacy-agents-deep-CoiLV3QJ.js +0 -1
  436. package/dist/client/assets/legacy-main-redirect-BZ4nzqkQ.js +0 -1
  437. package/dist/client/assets/library-Dste3SFA.js +0 -161
  438. package/dist/client/assets/members-CRtKrUle.js +0 -1
  439. package/dist/client/assets/message-templates-B8kOo0Kk.js +0 -1
  440. package/dist/client/assets/mock-board-DRa60E6i.js +0 -90
  441. package/dist/client/assets/multi-select-DzAZ8Rb8.js +0 -1
  442. package/dist/client/assets/optimistic-project-sidebar-views-CrZ9OeIk.js +0 -1
  443. package/dist/client/assets/orgs-B1TBklWZ.js +0 -1
  444. package/dist/client/assets/plan-ladder-B2pv9Y73.js +0 -1
  445. package/dist/client/assets/post-calendar-Bx8YiCbs.js +0 -1
  446. package/dist/client/assets/post-editor-B1fD7o8C.js +0 -1
  447. package/dist/client/assets/primitives-JiGRyPkw.js +0 -1
  448. package/dist/client/assets/profile-CDR0JVtv.js +0 -1
  449. package/dist/client/assets/project-app-view-8VWdrWMf.js +0 -1
  450. package/dist/client/assets/project-feed-ChJRKxhk.js +0 -1
  451. package/dist/client/assets/project-reports-D31utlHg.js +0 -1
  452. package/dist/client/assets/project-tasks-D2AAgqxo.js +0 -1
  453. package/dist/client/assets/record-editor-DPAL8Tq5.js +0 -1
  454. package/dist/client/assets/redirect-editor-EPs_GX-_.js +0 -1
  455. package/dist/client/assets/registry-Dw8UrRRZ.js +0 -2
  456. package/dist/client/assets/registry-layout-CC2lewiS.js +0 -27
  457. package/dist/client/assets/reports-Ch9UvBcS.js +0 -1
  458. package/dist/client/assets/reports-onboarding-Dhm8IBuD.js +0 -1
  459. package/dist/client/assets/reports-tab-BJWrZp37.js +0 -2
  460. package/dist/client/assets/repositories-CMIGVJwC.js +0 -1
  461. package/dist/client/assets/repository-import-picker-DhVniDI2.js +0 -1
  462. package/dist/client/assets/repository-picker-BkoSI-jm.js +0 -1
  463. package/dist/client/assets/resizable-Bt7dvMCc.js +0 -1
  464. package/dist/client/assets/review-settings-Cx_Yzx40.js +0 -1
  465. package/dist/client/assets/roles-BNleKwt9.js +0 -1
  466. package/dist/client/assets/route-CHqG9ihd.js +0 -1
  467. package/dist/client/assets/route-DqJoK5dW.js +0 -1
  468. package/dist/client/assets/route-x8jgkj5T.js +0 -1
  469. package/dist/client/assets/runnable-block-editor-xmOnaiFL.js +0 -16
  470. package/dist/client/assets/search-input-Pobww52G.js +0 -1
  471. package/dist/client/assets/secrets-BF5nuoR4.js +0 -1
  472. package/dist/client/assets/sections-editor-B1LpXw4X.js +0 -2
  473. package/dist/client/assets/select-BkKPcZFe.js +0 -1
  474. package/dist/client/assets/select-model-DPv-zVVj.js +0 -1
  475. package/dist/client/assets/seo-editor-9G7mQFJ5.js +0 -1
  476. package/dist/client/assets/settings-tab-D1V5Uszb.js +0 -5
  477. package/dist/client/assets/shell-layout-Ce0aCJuX.js +0 -1
  478. package/dist/client/assets/sidebar-C5KRz1Pj.js +0 -1
  479. package/dist/client/assets/skills-CgTiBPyO.js +0 -1
  480. package/dist/client/assets/sso-BK-aRT5P.js +0 -1
  481. package/dist/client/assets/store-Nm6KtwbD.js +0 -1
  482. package/dist/client/assets/store-registry-Cs6bPPkP.js +0 -2
  483. package/dist/client/assets/synced-repos-B1z4DDCt.js +0 -1
  484. package/dist/client/assets/task-route-BCTCy27Q.js +0 -1
  485. package/dist/client/assets/task-status-DhCT2ly_.js +0 -1
  486. package/dist/client/assets/taskboard-analytics-Cf1r1f7I.js +0 -1
  487. package/dist/client/assets/tasks-BNvHI7hJ.js +0 -1
  488. package/dist/client/assets/textarea-BU6xemAP.js +0 -1
  489. package/dist/client/assets/thread-route-BBf64Mwk.js +0 -1
  490. package/dist/client/assets/thread-route-BSYRqZDg.js +0 -1
  491. package/dist/client/assets/thread-sheet-body-B4OUWlMn.js +0 -1
  492. package/dist/client/assets/toggle-group-BiU_UDOq.js +0 -1
  493. package/dist/client/assets/toolbar-icon-button-PuQFE8Y9.js +0 -1
  494. package/dist/client/assets/usage-stats-vMRDbAUM.js +0 -1
  495. package/dist/client/assets/use-ai-providers-BnF5Rw_n.js +0 -1
  496. package/dist/client/assets/use-automations-Bo0S3g8m.js +0 -1
  497. package/dist/client/assets/use-connect-companion-CClQCUMS.js +0 -1
  498. package/dist/client/assets/use-connection-Ba04fHwa.js +0 -1
  499. package/dist/client/assets/use-deco-credits-BGBshlLi.js +0 -1
  500. package/dist/client/assets/use-delete-connection-Cns6x8UC.js +0 -1
  501. package/dist/client/assets/use-file-configs-DYGSdjth.js +0 -1
  502. package/dist/client/assets/use-join-requests-DjeVFQr9.js +0 -1
  503. package/dist/client/assets/use-main-panel-tabs-sSRGo66A.js +0 -1
  504. package/dist/client/assets/use-mcp-auth-status-I377R0Kg.js +0 -1
  505. package/dist/client/assets/use-members-DPYHJDe2.js +0 -1
  506. package/dist/client/assets/use-navigate-to-agent-C8pu0B4z.js +0 -1
  507. package/dist/client/assets/use-open-billing-url-Df7K1DCF.js +0 -1
  508. package/dist/client/assets/use-org-auth-client-DbPU3bA-.js +0 -1
  509. package/dist/client/assets/use-org-fs-Du-ErRPs.js +0 -1
  510. package/dist/client/assets/use-org-notice-CyiiFkRG.js +0 -1
  511. package/dist/client/assets/use-organization-roles-FAEtbpE5.js +0 -1
  512. package/dist/client/assets/use-organization-settings-CKbX2SdA.js +0 -1
  513. package/dist/client/assets/use-project-native-view-presence-DWzPH-Sc.js +0 -1
  514. package/dist/client/assets/use-project-scope-DU0-JxYr.js +0 -1
  515. package/dist/client/assets/use-registry-connections-SLFMHpqj.js +0 -1
  516. package/dist/client/assets/use-releases-CFNTwgY3.js +0 -1
  517. package/dist/client/assets/use-reports-diagnostic-8BvW2in8.js +0 -1
  518. package/dist/client/assets/use-secrets-DVry--sz.js +0 -1
  519. package/dist/client/assets/use-tags-CZXCbbwL.js +0 -1
  520. package/dist/client/assets/use-task-board-analytics-Ci1AhxvH.js +0 -1
  521. package/dist/client/assets/use-task-metadata-Dt9l5S_a.js +0 -1
  522. package/dist/client/assets/use-thread-outputs-Dq-RN0P_.js +0 -1
  523. package/dist/client/assets/use-virtual-mcp-DkK7ErtB.js +0 -1
  524. package/dist/client/assets/useInfiniteQuery-CspLjV7h.js +0 -1
  525. package/dist/client/assets/useSuspenseInfiniteQuery-BiQYAhJn.js +0 -1
  526. package/dist/client/assets/utils-DsvmRe8M.js +0 -4
  527. package/dist/client/assets/variant-calendar-DImnsJnP.js +0 -1
  528. package/dist/client/assets/view-mode-toggle-DvGhnpsV.js +0 -1
@@ -1,5 +1,5 @@
1
- import{c as q,X as He,u as qe,dz as at,n as Le,M as Y,K as te,t as ae,I as ue,J as de,d as Ge,bC as rt,cC as it,an as ct,ag as lt,bx as ut,b as ve,r as M,m as dt,_ as pt,e as ft,ap as ht,j as X,x as mt,a as gt,v as yt,dA as St,dB as Tt,o as kt}from"./index-Dc7hzqoi.js";import{u as Xe,a as vt}from"./use-panel-navigate-WrD0KEYx.js";import{A as Ye,c as It,a as Mt,w as bt}from"./autosend-BberXmli.js";import{w as Qe,b as Ue}from"./thread-intent-F-sZEflj.js";import{S as Ct,a as xt,g as wt,c as At}from"./hooks-DZOMRp7D.js";import{u as Rt}from"./use-is-desktop-app-BNujXJc_.js";import{u as Et}from"./use-mcp-client-e_hCatGm.js";import{d as _t,e as $t}from"./use-virtual-mcp-DkK7ErtB.js";import{c as Pt}from"./use-entitlements-Dl7pAsQ5.js";import{u as ze,p as Dt,a as Te,i as Ot,b as Nt}from"./use-ai-providers-BnF5Rw_n.js";import{o as qt,b as Lt}from"./location-oTTXFrSF.js";import{u as Ft}from"./use-decopilot-events-BpuQrfKN.js";import{a as jt,b as Qt}from"./thread-route-BBf64Mwk.js";import{d as Ut}from"./use-organization-settings-CKbX2SdA.js";const Wt={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Je(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(Wt)){const s=e(t.providerMetadata);if(s!==null)return s}return 0}function Bt(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Vt(t,e){if(!e)return t;const s=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,n=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+Je(e),cacheReadTokens:t.cacheReadTokens+s,cacheWriteTokens:t.cacheWriteTokens+n}}function tn(t){const e=Math.max(t.inputTokens,t.cacheReadTokens+t.cacheWriteTokens);return e>0?t.cacheReadTokens/e:0}function sn(t){return t.reduce((e,s)=>Vt(e,s.metadata?.usage),Bt())}function Kt(t,e=[]){return t==="stop"?"completed":t==="tool-calls"?e.some(n=>n.type==="tool-user_ask"&&n.state==="input-available"||n.state==="approval-requested")?"requires_action":"completed":"failed"}const We={"claude-code-desktop":"claude-code","codex-desktop":"codex","opencode-desktop":"opencode"};function Ht(t){return t==="claude-code"?"claude-code-desktop":t==="codex"?"codex-desktop":t==="opencode"?"opencode-desktop":null}function Gt({pendingOption:t,lockedHarness:e}){return e?Ht(e):t}function Xt(t){return t.thread?.harness_id!=null?{}:{branch:t.globals.branch??null}}const Yt=new Set(["decopilot","claude-code"]);function zt({isDesktopApp:t,harnessId:e}){return e!=null&&!Yt.has(e)}function Jt(t){const e=q.c(19);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=s):s=e[0];const n=He(s);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const a=qe(o),r=Xe();let i;e[2]!==r||e[3]!==a?(i=at(r)?.path??a.preview??a.skill??a.brand??null,e[2]=r,e[3]=a,e[4]=i):i=e[4];const u=i;let p;if(e[5]!==n?.params.appSlug||e[6]!==n?.params.collectionName||e[7]!==n?.params.itemId||e[8]!==u||e[9]!==t){if(p=[],t&&p.push(`### Selected Agent
2
- - ID: ${t}`),u){let b;e[11]!==u?(b=qt(u),e[11]=u,e[12]=b):b=e[12];const w=b;let d;e[13]!==u?(d=Lt(u),e[13]=u,e[14]=d):d=e[14],p.push(`### Currently Open File
1
+ import{c as N,a3 as He,u as Ne,dI as at,o as Le,a0 as Y,K as te,t as ae,_ as ue,$ as de,d as Ge,bY as rt,cY as it,aB as ct,au as lt,bT as ut,b as ve,r as b,m as dt,a6 as pt,e as ft,aE as ht,j as X,z as mt,a as gt,x as yt,dJ as Tt,dK as St,q as kt}from"./index-BiU3YmQL.js";import{u as Xe,a as vt}from"./use-panel-navigate-DMG8fP2m.js";import{A as Ye,c as It,a as bt,w as Mt}from"./autosend-CESqNA2a.js";import{w as Qe,b as Ue}from"./thread-intent-CnRICyzb.js";import{S as xt,a as Ct,g as wt,c as At}from"./hooks-GmRpr8h8.js";import{u as Rt}from"./use-is-desktop-app-BNujXJc_.js";import{u as Et}from"./use-mcp-client-Br7XFHza.js";import{d as _t,e as $t}from"./use-virtual-mcp-CmFx7CJY.js";import{c as Pt}from"./use-entitlements-BGdUcutE.js";import{u as ze,p as Dt,a as Se,i as Ot,b as qt}from"./use-ai-providers-Cxi0vxkS.js";import{o as Nt,b as Lt}from"./location-oTTXFrSF.js";import{u as Ft}from"./use-decopilot-events-CuJ7CkFw.js";import{a as jt,b as Qt}from"./thread-route-CTwlz0m2.js";import{d as Ut}from"./use-organization-settings-DalrVcZ1.js";const Wt={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Je(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(Wt)){const s=e(t.providerMetadata);if(s!==null)return s}return 0}function Bt(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Vt(t,e){if(!e)return t;const s=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,n=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+Je(e),cacheReadTokens:t.cacheReadTokens+s,cacheWriteTokens:t.cacheWriteTokens+n}}function tn(t){const e=Math.max(t.inputTokens,t.cacheReadTokens+t.cacheWriteTokens);return e>0?t.cacheReadTokens/e:0}function sn(t){return t.reduce((e,s)=>Vt(e,s.metadata?.usage),Bt())}function Kt(t,e=[]){return t==="stop"?"completed":t==="tool-calls"?e.some(n=>n.type==="tool-user_ask"&&n.state==="input-available"||n.state==="approval-requested")?"requires_action":"completed":"failed"}const We={"claude-code-desktop":"claude-code","codex-desktop":"codex","opencode-desktop":"opencode"};function Ht(t){return t==="claude-code"?"claude-code-desktop":t==="codex"?"codex-desktop":t==="opencode"?"opencode-desktop":null}function Gt({pendingOption:t,lockedHarness:e}){return e?Ht(e):t}function Xt(t){return t.thread?.harness_id!=null?{}:{branch:t.globals.branch??null}}const Yt=new Set(["decopilot","claude-code"]);function zt({isDesktopApp:t,harnessId:e}){return e!=null&&!Yt.has(e)}function Jt(t){const e=N.c(19);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=s):s=e[0];const n=He(s);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const a=Ne(o),r=Xe();let i;e[2]!==r||e[3]!==a?(i=at(r)?.path??a.preview??a.skill??a.brand??null,e[2]=r,e[3]=a,e[4]=i):i=e[4];const u=i;let p;if(e[5]!==n?.params.appSlug||e[6]!==n?.params.collectionName||e[7]!==n?.params.itemId||e[8]!==u||e[9]!==t){if(p=[],t&&p.push(`### Selected Agent
2
+ - ID: ${t}`),u){let M;e[11]!==u?(M=Nt(u),e[11]=u,e[12]=M):M=e[12];const w=M;let d;e[13]!==u?(d=Lt(u),e[13]=u,e[14]=d):d=e[14],p.push(`### Currently Open File
3
3
  The user has this file open in the Library and is most likely referring to it:
4
4
  - Name: ${d}
5
5
  - Library path: ${u}${w?`
@@ -12,7 +12,7 @@ ${f.join(`
12
12
 
13
13
  Help the user understand and work with this resource.`),e[5]=n?.params.appSlug,e[6]=n?.params.collectionName,e[7]=n?.params.itemId,e[8]=u,e[9]=t,e[10]=p}else p=e[10];return p.join(`
14
14
 
15
- `)}function Zt(){const t=q.c(5),e=Le(),{org:s}=Y();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},t[0]=n):n=t[0];const o=He(n);let a;return t[1]!==o?.params||t[2]!==s||t[3]!==e?(a=r=>{const u=r.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!u||!u[1])return;const p=u[1],f=o?.params.appSlug;if(!f)return;e.invalidateQueries({queryKey:te.collection(s.slug,f,p)});const b=p.toLowerCase().replace(/_/g," ");ae.success(`${b} updated`)},t[1]=o?.params,t[2]=s,t[3]=e,t[4]=a):a=t[4],a}function es(){const t=q.c(4),{org:e,project:s}=Y(),n=`${e.id}/${s.id}`;let o;t[0]!==n?(o=de.taskLastViewed(n),t[0]=n,t[1]=o):o=t[1];const[,a]=ue(o,ts);let r;return t[2]!==a?(r={markTaskRead:u=>{a(p=>({...p,[u]:new Date().toISOString()}))}},t[2]=a,t[3]=r):r=t[3],r}function ts(t){return t??{}}function Ze(){const t=q.c(11),e=Ge(),{org:s}=Y(),n=jt(),o=Qt(),a=Xe();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const i=qe(r);let u;t[1]!==a||t[2]!==e||t[3]!==s||t[4]!==i||t[5]!==o?(u=(b,w)=>{const d=a&&!rt(a)?a:void 0,C=w?.virtualMcpId??o,_=C===o&&d&&it(d).kind!=="org-destination"?d:"overview",$=ct({org:s.slug,agentId:C,superAgentId:lt(s.id).id,tabId:_});ut(e,$,{search:()=>({thread:b,...typeof i.sidepanel=="boolean"?{sidepanel:i.sidepanel}:{},...w?.autosend?{autosend:Ye}:{}}),replace:!1})},t[1]=a,t[2]=e,t[3]=s,t[4]=i,t[5]=o,t[6]=u):u=t[6];const p=u;let f;return t[7]!==p||t[8]!==n||t[9]!==o?(f={virtualMcpId:o,taskId:n,navigateToTask:p},t[7]=p,t[8]=n,t[9]=o,t[10]=f):f=t[10],f}function ss(t,e){const{mimeType:s,data:n}=t;if(s.startsWith("text/"))try{const o=new TextDecoder().decode(Uint8Array.from(atob(n),a=>a.charCodeAt(0)));return[{type:"text",text:`${e}
15
+ `)}function Zt(){const t=N.c(5),e=Le(),{org:s}=Y();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},t[0]=n):n=t[0];const o=He(n);let a;return t[1]!==o?.params||t[2]!==s||t[3]!==e?(a=r=>{const u=r.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!u||!u[1])return;const p=u[1],f=o?.params.appSlug;if(!f)return;e.invalidateQueries({queryKey:te.collection(s.slug,f,p)});const M=p.toLowerCase().replace(/_/g," ");ae.success(`${M} updated`)},t[1]=o?.params,t[2]=s,t[3]=e,t[4]=a):a=t[4],a}function es(){const t=N.c(4),{org:e,project:s}=Y(),n=`${e.id}/${s.id}`;let o;t[0]!==n?(o=de.taskLastViewed(n),t[0]=n,t[1]=o):o=t[1];const[,a]=ue(o,ts);let r;return t[2]!==a?(r={markTaskRead:u=>{a(p=>({...p,[u]:new Date().toISOString()}))}},t[2]=a,t[3]=r):r=t[3],r}function ts(t){return t??{}}function Ze(){const t=N.c(11),e=Ge(),{org:s}=Y(),n=jt(),o=Qt(),a=Xe();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const i=Ne(r);let u;t[1]!==a||t[2]!==e||t[3]!==s||t[4]!==i||t[5]!==o?(u=(M,w)=>{const d=a&&!rt(a)?a:void 0,x=w?.virtualMcpId??o,_=x===o&&d&&it(d).kind!=="org-destination"?d:"overview",$=ct({org:s.slug,agentId:x,superAgentId:lt(s.id).id,tabId:_});ut(e,$,{search:()=>({thread:M,...typeof i.sidepanel=="boolean"?{sidepanel:i.sidepanel}:{},...w?.autosend?{autosend:Ye}:{}}),replace:!1})},t[1]=a,t[2]=e,t[3]=s,t[4]=i,t[5]=o,t[6]=u):u=t[6];const p=u;let f;return t[7]!==p||t[8]!==n||t[9]!==o?(f={virtualMcpId:o,taskId:n,navigateToTask:p},t[7]=p,t[8]=n,t[9]=o,t[10]=f):f=t[10],f}function ss(t,e){const{mimeType:s,data:n}=t;if(s.startsWith("text/"))try{const o=new TextDecoder().decode(Uint8Array.from(atob(n),a=>a.charCodeAt(0)));return[{type:"text",text:`${e}
16
16
  ${o}`}]}catch(o){console.error("Failed to decode text file:",o)}return[{type:"file",url:`data:${s};base64,${n}`,filename:e,mediaType:s}]}function Be(t,e){const s=[];for(const n of t)!n||typeof n!="object"||("text"in n&&n.text?s.push({type:"text",text:`[${e}]
17
17
  ${n.text}`}):"blob"in n&&n.blob&&n.mimeType&&s.push({type:"file",url:`data:${n.mimeType};base64,${n.blob}`,filename:String(n.uri),mediaType:String(n.mimeType)}));return s}function ns(t,e){const s=(t.files??[]).filter(r=>r.content?.trim()),n=t.omittedPaths??[];if(s.length===0&&n.length===0)return[];const o=s.map(r=>`<skill-file path="${r.relPath}">
18
18
  ${r.content.trim()}
@@ -28,10 +28,10 @@ ${r.text}`}):"blob"in r&&r.blob&&r.mimeType&&s.push({type:"file",url:`data:${r.m
28
28
  `;else if(o.type==="text"&&"text"in o&&typeof o.text=="string")s+=o.text;else if(o.type==="mention"&&o.attrs){const a=o.attrs.char??"/",r=`${a}${o.attrs.name}`;if(o.attrs.kind==="task"){const i=o.attrs.metadata,u=i?.title??o.attrs.name??"",p=i?.context?.trim()||[u,i?.description?.trim()].filter(Boolean).join(`
29
29
 
30
30
  `);p&&e.push({type:"text",text:p});return}if(s+=r,a==="@"){const i=o.attrs.metadata;i&&typeof i=="object"&&!Array.isArray(i)&&"agentId"in i?e.push({type:"text",text:`[DELEGATE TO AGENT: ${i.title??o.attrs.name} (agent_id: ${i.agentId})]
31
- Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(i)&&e.push(...Be(i,r))}else if(o.attrs.kind==="skill"){const i=o.attrs.metadata;i&&!Array.isArray(i)&&Array.isArray(i.files)&&e.push(...ns(i,r))}else{const i=o.attrs.metadata||o.attrs.prompts||[];Array.isArray(i)&&i.length>0&&typeof i[0]=="object"&&i[0]!==null&&"role"in i[0]?e.push(...os(i,r)):Array.isArray(i)&&e.push(...Be(i,r))}}else if(o.type==="file"&&o.attrs){const a=o.attrs,r=`[file:://${encodeURIComponent(a.name)}]`;s+=r,e.push(...ss(a,r))}if("content"in o&&Array.isArray(o.content))for(const a of o.content)n(a)}};return n(t),s.trim()&&e.unshift({type:"text",text:s.trim()}),e}function nn(t){const e=et(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function on(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function rs(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function an(t){return t.filter(e=>e.status==="queued").sort((e,s)=>e.enqueuedAt-s.enqueuedAt)}function is(t,e){return t.some(s=>s.messageId===e.messageId)?t:[...t,e]}function cs(t,e){return t.filter(s=>s.messageId!==e)}const se=new Map,ls=200;function us(t){if(se.size<ls||se.has(t))return;const e=se.keys().next().value;if(e!==void 0){se.delete(e),Re.delete(e);for(const s of pe.keys())s.startsWith(`${e}:`)&&pe.delete(s)}}const Re=new Set;function ds(t){Re.add(t)}function ps(t){return Re.has(t)}function fs(t){Re.delete(t)}function Ie(t){const e=se.get(t);if(e)return se.delete(t),se.set(t,e),e;us(t);const s=new Ct([]);return se.set(t,s),s}function tt(t,e){Ie(t).update(s=>is(s,e))}function Ne(t,e){Ie(t).update(s=>cs(s,e))}function hs(t,e){Ie(t).set(e)}const pe=new Map;function ms(t,e){pe.set(`${t}:${e.id}`,e)}function gs(t,e){const s=`${t}:${e}`,n=pe.get(s);return pe.delete(s),n}function Ve(t,e){pe.delete(`${t}:${e}`)}async function ee(t,e){try{const s=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!s.ok)return;const n=await s.json();hs(e,n.items??[])}catch{}}function rn(t){const e=q.c(2);let s;e[0]!==t?(s=Ie(t),e[0]=t,e[1]=s):s=e[1];const n=s;return M.useSyncExternalStore(n.subscribe,n.get,n.get)}function ys(){const{org:t}=Y(),e=ve();return{enqueue:tt,refresh:s=>ee(t.slug,s),cancel:async(s,n)=>{const o=`thread-run:${s}:${n}`;Ne(s,n);try{const a=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(s)}/cancel/${encodeURIComponent(o)}`,{method:"POST",credentials:"include"});if(!a.ok&&a.status!==404)throw new Error(`Cancel failed: ${a.status}`);return!0}catch{return ae.error(e("chat.queueTray.cancelFailed")),!1}finally{await ee(t.slug,s)}}}}function Ae(t,e){return t.find(s=>s!=null&&e.has(s.keyId))??null}function Ss(t,e,s){const n=o=>Ae([o],s);return{tiers:{fast:Ae([e.tiers.fast,t.tiers.fast],s),smart:Ae([e.tiers.smart,t.tiers.smart],s),thinking:Ae([e.tiers.thinking,t.tiers.thinking],s),image:n(t.tiers.image),web_search:n(t.tiers.web_search),deep_research:n(t.tiers.deep_research)}}}const ke={tiers:{}};function Ts(){const t=q.c(7),{org:e}=Y();let s;t[0]!==e.id?(s=te.userModelPreferences(e.id),t[0]=e.id,t[1]=s):s=t[1];let n;t[2]!==e.slug?(n=async()=>{const a=await ht(e.slug,"USER_MODEL_PREFERENCES_GET",{});return a?.tiers?a:ke},t[2]=e.slug,t[3]=n):n=t[3];let o;return t[4]!==s||t[5]!==n?(o={queryKey:s,queryFn:n,staleTime:6e4},t[4]=s,t[5]=n,t[6]=o):o=t[6],dt(o)}function ks(){return Ts().data??ke}function cn(){const t=q.c(19),{org:e}=Y(),s=pt(),n=Le();let o;t[0]!==e.id?(o=te.userModelPreferences(e.id),t[0]=e.id,t[1]=o):o=t[1];const a=o;let r;t[2]!==a||t[3]!==n||t[4]!==s?(r=async w=>{const d=n.getQueryData(a)??ke;return await s.call("USER_MODEL_PREFERENCES_UPDATE",d)??d},t[2]=a,t[3]=n,t[4]=s,t[5]=r):r=t[5];let i,u,p,f;t[6]!==a||t[7]!==n?(i=w=>{const{tier:d,slot:C}=w,_=n.getQueryData(a),$=_??ke;return n.setQueryData(a,{tiers:{...$.tiers,[d]:C}}),{prev:_}},u=(w,d,C)=>{n.setQueryData(a,C?.prev??ke)},p=w=>{n.setQueryData(a,w)},f=()=>{n.isMutating({mutationKey:a})===1&&n.invalidateQueries({queryKey:a})},t[6]=a,t[7]=n,t[8]=i,t[9]=u,t[10]=p,t[11]=f):(i=t[8],u=t[9],p=t[10],f=t[11]);let b;return t[12]!==a||t[13]!==r||t[14]!==i||t[15]!==u||t[16]!==p||t[17]!==f?(b={mutationKey:a,mutationFn:r,onMutate:i,onError:u,onSuccess:p,onSettled:f},t[12]=a,t[13]=r,t[14]=i,t[15]=u,t[16]=p,t[17]=f,t[18]=b):b=t[18],ft(b)}function vs(){const t=q.c(4),e=Ut(),s=ks(),n=ze();let o;return t[0]!==n||t[1]!==e||t[2]!==s?(o=Ss(e,s,new Set(n.map(Is))),t[0]=n,t[1]=e,t[2]=s,t[3]=o):o=t[3],o}function Is(t){return t.id}function oe(t,e,s,n){if(!t)return null;const o=e.find(r=>r.id===t.keyId);if(!o)return null;const a=s.find(r=>r.modelId===t.modelId);return a?{...a,keyId:t.keyId}:{modelId:t.modelId,title:n??t.modelId,keyId:t.keyId,providerId:o.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function Ms(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function bs(t,e,s,n){if(!s||n.length===0)return null;const o=e.find(u=>u.id===s);if(!o)return null;const a=Dt([o],{[s]:n}),r=t==="fast"?a.chat.fast:t==="thinking"?a.chat.thinking:a.chat.smart;if(!r)return null;const i=n.find(u=>u.modelId===r.modelId);return i?{...i,keyId:s}:null}const Ke=new Set,Z=new Set;function le(t){return M.useSyncExternalStore(t.subscribe,t.get,t.get)}function Cs(t){return t.kind==="loading"?"ready":t.kind}function st(t){return t&&typeof t=="object"&&"type"in t?{tiptapDoc:t}:t}const xs=1e4,ws=10,Me=M.createContext(null),Ee=M.createContext(null),Fe=M.createContext(null),nt=M.createContext(null);function As(t){const e=q.c(3),{value:s,children:n}=t;let o;return e[0]!==n||e[1]!==s?(o=X.jsx(Me.Provider,{value:s,children:n}),e[0]=n,e[1]=s,e[2]=o):o=e[2],o}function ln(t){const e=q.c(2),{children:s}=t;let n;return e[0]!==s?(n=X.jsx(Me.Provider,{value:null,children:X.jsx(Ee.Provider,{value:null,children:s})}),e[0]=s,e[1]=n):n=e[1],n}function Rs({children:t}){const{locator:e}=Y(),{virtualMcpId:s}=Ze(),[n,o]=ue(de.chatSelectedImageModel(e),null),[a,r]=ue(de.chatSelectedWebSearchModel(e),null),[i,u]=ue(de.chatSelectedDeepResearchModel(e),null),[p,f]=M.useState(null),[b,w]=M.useState("default"),d=vs(),[C,_]=ue(de.chatSimpleModeTier(e),null),$=Ms(C),v=ze(),x=d.tiers[$],j=v.some(c=>c.id===x?.keyId)?x?.keyId:void 0,Q=p&&v.some(c=>c.id===p)?p:j??v[0]?.id??null,{models:O,isLoading:A}=Te(Q??void 0),{models:R}=Te(j),z=v.some(c=>c.id===d.tiers.image?.keyId)?d.tiers.image?.keyId:void 0,{models:ne}=Te(z),N=v.some(c=>c.id===d.tiers.web_search?.keyId)?d.tiers.web_search?.keyId:void 0,{models:U}=Te(N),L=v.some(c=>c.id===d.tiers.deep_research?.keyId)?d.tiers.deep_research?.keyId:void 0,{models:V}=Te(L),K=oe(x,v,R,x?.title)??bs($,v,Q,O),H=A,G=O.filter(c=>c.capabilities?.includes("image")),W=oe(n,v,G),m=oe(d.tiers.image,v,ne,d.tiers.image?.title)??W??G[0]??null,T=O.filter(Ot),I=oe(a,v,T),F=T.find(c=>c.modelId==="perplexity/sonar")??T[0]??null,J=oe(d.tiers.web_search,v,U,d.tiers.web_search?.title)??I??F,re=O.filter(Nt),_e=oe(i,v,re),P=re.find(c=>c.modelId==="perplexity/deep-research")??re.find(c=>c.asyncResearch===!0)??re[0]??null,be=oe(d.tiers.deep_research,v,V,d.tiers.deep_research?.title)??_e??P,fe=_t(s),$e=$t().find(c=>c.id===s),Ce=fe??$e??{id:s,title:"",description:null,icon:null},[Pe,he]=M.useState({}),xe=(c,E)=>{const y=[];for(const g of E.content??[])g.type==="text"&&g.text?.trim()&&y.push(g.text.trim());const k=y.join(`
32
- `);if(!k){me(c);return}new TextEncoder().encode(k).length>xs||he(g=>Object.keys(g).length>=ws&&!(c in g)?g:{...g,[c]:k})},me=c=>{he(E=>{const{[c]:y,...k}=E;return k})},[ge,De]=ue(de.chatLastAgentOption(e),c=>c&&c in We?c:null),we=js(),ye=Gt({pendingOption:ge,lockedHarness:we?.isThreadLocked?we.lockedHarness:null}),je=ye?We[ye]:null,[ie,Oe]=M.useState(void 0),l=M.useRef(ie);l.current=ie;const h={selectedModel:K,setModel:()=>{},credentialId:Q,setCredentialId:f,allModelsConnections:v,isModelsLoading:H,selectedVirtualMcp:Ce,imageModel:m,setImageModel:c=>{o(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},webSearchModel:J,setWebSearchModel:c=>{r(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},deepResearchModel:be,setDeepResearchModel:c=>{u(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},chatMode:b,setChatMode:w,appContexts:Pe,setAppContext:xe,clearAppContext:me,tiptapDoc:ie,setTiptapDoc:Oe,tiptapDocRef:l,resetInteraction:()=>{},simpleModeTier:$,setSimpleModeTier:c=>_(c),pendingAgentOption:ye,setPendingAgentOption:De,pendingHarnessId:je};return X.jsx(Fe.Provider,{value:h,children:t})}function un(t){const e=q.c(41),{virtualMcpId:s,task:n,children:o}=t,{locator:a}=Y(),{data:r}=gt.useSession(),i=r?.user??null,{taskId:u,virtualMcpId:p,navigateToTask:f}=Ze(),[b]=yt(),{markTaskRead:w}=es(),d=At(),C=u,_=p,$=Jt(_);let v;e[0]!==w||e[1]!==f?(v=(T,I)=>{w(T),f(T,{virtualMcpId:I?.virtualMcpId,autosend:I?.autosend})},e[0]=w,e[1]=f,e[2]=v):v=e[2];const x=v,j=C!==null&&n?.id===C?n:null,Q=j?.harness_id??null,O=j?.branch??null,A=Q!=null,R=O;let z;e[3]!==R||e[4]!==a||e[5]!==x||e[6]!==d||e[7]!==s?(z=T=>{const I=crypto.randomUUID(),F=T?.branch??R;return Qe(sessionStorage,a,I,{...T?.runtime?{runtime:T.runtime}:{},...F?{branch:F}:{}}),d.create({id:I,virtual_mcp_id:s,...F?{branch:F}:{},...T?.runtime?{runtime:T.runtime}:{}}).then(()=>{Ue(sessionStorage,a,I),x(I)}).catch(()=>{x(I)}),I},e[3]=R,e[4]=a,e[5]=x,e[6]=d,e[7]=s,e[8]=z):z=e[8];const ne=z;let N;e[9]!==R||e[10]!==a||e[11]!==x||e[12]!==d||e[13]!==s?(N=T=>{const I=crypto.randomUUID(),F=T.virtualMcpId??s,J=F===s?R:null;bt(sessionStorage,a,I,T.message),J&&Qe(sessionStorage,a,I,{branch:J}),d.create({id:I,virtual_mcp_id:F,...J?{branch:J}:{}}).then(()=>{Ue(sessionStorage,a,I),x(I,{virtualMcpId:T.virtualMcpId,autosend:!0})}).catch(()=>{x(I,{virtualMcpId:T.virtualMcpId,autosend:!0})})},e[9]=R,e[10]=a,e[11]=x,e[12]=d,e[13]=s,e[14]=N):N=e[14];const U=N;let L;e[15]!==C||e[16]!==d?(L=T=>{C&&d.setBranch(C,T)},e[15]=C,e[16]=d,e[17]=L):L=e[17];let V;e[18]!==j||e[19]!==ne||e[20]!==U||e[21]!==R||e[22]!==C||e[23]!==_||e[24]!==A||e[25]!==O||e[26]!==Q||e[27]!==x||e[28]!==L?(V={virtualMcpId:_,taskId:C,openTask:x,createTask:ne,createTaskWithMessage:U,activeTask:j,isThreadLocked:A,lockedHarness:Q,lockedBranch:O,currentBranch:R,setCurrentTaskBranch:L},e[18]=j,e[19]=ne,e[20]=U,e[21]=R,e[22]=C,e[23]=_,e[24]=A,e[25]=O,e[26]=Q,e[27]=x,e[28]=L,e[29]=V):V=e[29];const K=V;let H;e[30]!==$||e[31]!==b||e[32]!==f||e[33]!==i?(H={user:i,contextPrompt:$,preferences:b,rawNavigateToTask:f},e[30]=$,e[31]=b,e[32]=f,e[33]=i,e[34]=H):H=e[34];const G=H;let W;e[35]!==o||e[36]!==G?(W=X.jsx(Rs,{children:X.jsx(nt.Provider,{value:G,children:o})}),e[35]=o,e[36]=G,e[37]=W):W=e[37];let m;return e[38]!==W||e[39]!==K?(m=X.jsx(Ee.Provider,{value:K,children:W}),e[38]=W,e[39]=K,e[40]=m):m=e[40],m}const Es=[];function dn(t){const e=q.c(5),{children:s}=t,{createTaskWithMessage:n}=ot();let o;e[0]!==n?(o={messages:Es,status:"ready",sendMessage:async i=>{n({message:st(i)})},editQueuedMessage:Ls,stop:qs,submit:Ns,removeLocalMessage:Os,isSendInFlight:Ds,error:null,clearError:Ps,finishReason:null,runStatusStage:null,clearFinishReason:$s,isStreaming:!1,isChatEmpty:!0,isWaitingForApprovals:!1,isRunInProgress:!1,hasMoreOlder:!1,isFetchingOlder:!1,fetchOlderMessages:_s},e[0]=n,e[1]=o):o=e[1];const a=o;let r;return e[2]!==s||e[3]!==a?(r=X.jsx(As,{value:a,children:s}),e[2]=s,e[3]=a,e[4]=r):r=e[4],r}async function _s(){}function $s(){}function Ps(){}function Ds(){return!1}function Os(){}async function Ns(){}function qs(){}async function Ls(){return!1}function pn({taskId:t,children:e}){const s=ve(),n=Rt(),{virtualMcpId:o,activeTask:a,currentBranch:r}=ot(),i=zt({isDesktopApp:n,harnessId:a?.harness_id}),u=s("chat.input.codingAgentRequiresDesktop");Ke.has(t)||(Ke.add(t),kt("chat_opened",{thread_id:t}));const{imageModel:p,webSearchModel:f,deepResearchModel:b,chatMode:w,setChatMode:d,appContexts:C,setTiptapDoc:_,simpleModeTier:$}=Fs(),v=M.useContext(nt);if(!v)throw new Error(s("chat.chatContext.activeTaskProviderMissingContext"));const{user:x,contextPrompt:j,preferences:Q,rawNavigateToTask:O}=v,{org:A,locator:R}=Y(),z=ys(),[ne,N]=M.useState(null),U=()=>{N(new Error(u))},L=Zt(),V=Le(),K=xt(),H=Ge(),{openPanel:G}=vt(),W=Et({connectionId:mt,orgId:A.id,orgSlug:A.slug}),m=wt(A.slug,t,{client:W});M.use(m.ready);const T=le(m.messages),I=le(m.status),F=le(m.finishReason),J=le(m.runStatusStage),re=le(m.hasMoreOlder),_e=le(m.isFetchingOlder),P=M.useRef({onToolCall:L,queryClient:V,rawNavigateToTask:O,taskId:t,manager:K,navigate:H,openPanel:G,orgId:A.id,orgSlug:A.slug});P.current={onToolCall:L,queryClient:V,rawNavigateToTask:O,taskId:t,manager:K,navigate:H,openPanel:G,orgId:A.id,orgSlug:A.slug};const be=()=>{const l=P.current;ps(l.taskId)&&(async()=>(await ee(l.orgSlug,l.taskId),await m.reconcileFromServer()&&Ie(l.taskId).get().length===0&&fs(l.taskId)))()};Ft({orgSlug:A.slug,taskId:t,onTaskStatus:l=>{const h=P.current,c=l.data.message_id;if(l.data.status==="in_progress"&&c){Ne(h.taskId,c);const E=gs(h.taskId,c);E&&m.applyLocalMessage(E),ee(h.orgSlug,h.taskId)}be()},onReconnect:be}),M.useEffect(()=>{const l={onData:y=>{if(y.type==="data-thread-title"){const k=y.data;if(!k?.title)return;const g=P.current;if(!g.taskId)return;g.manager.patchThread({id:g.taskId,title:k.title,updated_at:new Date().toISOString()});return}if(y.type==="data-deck-updated"){const k=y.data;if(!k?.path)return;const g=k.path,S=P.current;S.queryClient.invalidateQueries({queryKey:te.orgFsStat(S.orgId,"home",g)}),S.queryClient.invalidateQueries({queryKey:te.orgFsRecent(S.orgId)}),S.openPanel(St(g));return}if(y.type==="data-open-preview"){const k=y.data,g=P.current,S=g.taskId;if(S){const ce=g.manager.threads.get().find(B=>B.id===S);g.manager.patchThread({id:S,...k?.branch?{branch:k.branch}:{},metadata:{...ce?.metadata??{},...k?.githubRepo?{githubRepo:k.githubRepo}:{},...k?.sandboxMap?{sandboxMap:k.sandboxMap}:{}}})}g.openPanel("site-editor");return}},onFinish:(y,k,g)=>{const S=P.current;Pt(S.queryClient,S.orgId,Je(y.metadata?.usage)),S.queryClient.invalidateQueries({queryKey:te.aiPlanEntitlements(S.orgId),refetchType:"none"}),S.taskId&&ee(S.orgSlug,S.taskId),S.taskId&&S.manager.patchThread({id:S.taskId,status:Kt(g,y.parts),updated_at:new Date().toISOString()});const ce=y.parts?.some(D=>{const Se=D;return(Se.type==="tool-bash"||Se.type==="tool-write")&&Se.state==="output-available"});if(S.taskId&&ce){const D=te.threadOutputs(S.taskId);for(const Se of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{S.queryClient.invalidateQueries({queryKey:D})},Se)}S.queryClient.invalidateQueries({queryKey:te.homeNextActions(S.orgSlug)});const B=y.metadata?.thread_id;B&&B!==S.taskId&&S.rawNavigateToTask(B)},onError:y=>{N(y),console.error("[chat] Error",y)},onToolCall:y=>P.current.onToolCall(y)};m.observer=l,ee(P.current.orgSlug,P.current.taskId);const h=y=>y==="submitted"||y==="streaming";let c=h(m.status.get().kind);const E=m.status.subscribe(()=>{const y=h(m.status.get().kind);if(y===c)return;c=y;const k=P.current;ee(k.orgSlug,k.taskId)});return()=>{m.observer===l&&(m.observer=null),E()}},[m]);const fe=I.kind==="submitted"||I.kind==="streaming",$e=T.length===0,Ce=T.at(-1),Pe=!fe&&Ce?.role==="assistant"&&Ce.parts.some(l=>"state"in l&&l.state==="approval-requested"),he=a,xe=(he?.status==="in_progress"||he?.status==="expired")&&I.kind==="ready"&&T.length>0;async function me(l){const h=t,c=o;if(i)return U(),Z.delete(h),!1;const E=Object.entries(C),y=E.length>0?E.map(([B,D])=>`### App Context: ${B}
31
+ Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(i)&&e.push(...Be(i,r))}else if(o.attrs.kind==="skill"){const i=o.attrs.metadata;i&&!Array.isArray(i)&&Array.isArray(i.files)&&e.push(...ns(i,r))}else{const i=o.attrs.metadata||o.attrs.prompts||[];Array.isArray(i)&&i.length>0&&typeof i[0]=="object"&&i[0]!==null&&"role"in i[0]?e.push(...os(i,r)):Array.isArray(i)&&e.push(...Be(i,r))}}else if(o.type==="file"&&o.attrs){const a=o.attrs,r=`[file:://${encodeURIComponent(a.name)}]`;s+=r,e.push(...ss(a,r))}if("content"in o&&Array.isArray(o.content))for(const a of o.content)n(a)}};return n(t),s.trim()&&e.unshift({type:"text",text:s.trim()}),e}function nn(t){const e=et(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function on(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function rs(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function an(t){return t.filter(e=>e.status==="queued").sort((e,s)=>e.enqueuedAt-s.enqueuedAt)}function is(t,e){return t.some(s=>s.messageId===e.messageId)?t:[...t,e]}function cs(t,e){return t.filter(s=>s.messageId!==e)}const se=new Map,ls=200;function us(t){if(se.size<ls||se.has(t))return;const e=se.keys().next().value;if(e!==void 0){se.delete(e),Re.delete(e);for(const s of pe.keys())s.startsWith(`${e}:`)&&pe.delete(s)}}const Re=new Set;function ds(t){Re.add(t)}function ps(t){return Re.has(t)}function fs(t){Re.delete(t)}function Ie(t){const e=se.get(t);if(e)return se.delete(t),se.set(t,e),e;us(t);const s=new xt([]);return se.set(t,s),s}function tt(t,e){Ie(t).update(s=>is(s,e))}function qe(t,e){Ie(t).update(s=>cs(s,e))}function hs(t,e){Ie(t).set(e)}const pe=new Map;function ms(t,e){pe.set(`${t}:${e.id}`,e)}function gs(t,e){const s=`${t}:${e}`,n=pe.get(s);return pe.delete(s),n}function Ve(t,e){pe.delete(`${t}:${e}`)}async function ee(t,e){try{const s=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!s.ok)return;const n=await s.json();hs(e,n.items??[])}catch{}}function rn(t){const e=N.c(2);let s;e[0]!==t?(s=Ie(t),e[0]=t,e[1]=s):s=e[1];const n=s;return b.useSyncExternalStore(n.subscribe,n.get,n.get)}function ys(){const{org:t}=Y(),e=ve();return{enqueue:tt,refresh:s=>ee(t.slug,s),cancel:async(s,n)=>{const o=`thread-run:${s}:${n}`;qe(s,n);try{const a=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(s)}/cancel/${encodeURIComponent(o)}`,{method:"POST",credentials:"include"});if(!a.ok&&a.status!==404)throw new Error(`Cancel failed: ${a.status}`);return!0}catch{return ae.error(e("chat.queueTray.cancelFailed")),!1}finally{await ee(t.slug,s)}}}}function Ae(t,e){return t.find(s=>s!=null&&e.has(s.keyId))??null}function Ts(t,e,s){const n=o=>Ae([o],s);return{tiers:{fast:Ae([e.tiers.fast,t.tiers.fast],s),smart:Ae([e.tiers.smart,t.tiers.smart],s),thinking:Ae([e.tiers.thinking,t.tiers.thinking],s),image:n(t.tiers.image),web_search:n(t.tiers.web_search),deep_research:n(t.tiers.deep_research)}}}const ke={tiers:{}};function Ss(){const t=N.c(7),{org:e}=Y();let s;t[0]!==e.id?(s=te.userModelPreferences(e.id),t[0]=e.id,t[1]=s):s=t[1];let n;t[2]!==e.slug?(n=async()=>{const a=await ht(e.slug,"USER_MODEL_PREFERENCES_GET",{});return a?.tiers?a:ke},t[2]=e.slug,t[3]=n):n=t[3];let o;return t[4]!==s||t[5]!==n?(o={queryKey:s,queryFn:n,staleTime:6e4},t[4]=s,t[5]=n,t[6]=o):o=t[6],dt(o)}function ks(){return Ss().data??ke}function cn(){const t=N.c(19),{org:e}=Y(),s=pt(),n=Le();let o;t[0]!==e.id?(o=te.userModelPreferences(e.id),t[0]=e.id,t[1]=o):o=t[1];const a=o;let r;t[2]!==a||t[3]!==n||t[4]!==s?(r=async w=>{const d=n.getQueryData(a)??ke;return await s.call("USER_MODEL_PREFERENCES_UPDATE",d)??d},t[2]=a,t[3]=n,t[4]=s,t[5]=r):r=t[5];let i,u,p,f;t[6]!==a||t[7]!==n?(i=w=>{const{tier:d,slot:x}=w,_=n.getQueryData(a),$=_??ke;return n.setQueryData(a,{tiers:{...$.tiers,[d]:x}}),{prev:_}},u=(w,d,x)=>{n.setQueryData(a,x?.prev??ke)},p=w=>{n.setQueryData(a,w)},f=()=>{n.isMutating({mutationKey:a})===1&&n.invalidateQueries({queryKey:a})},t[6]=a,t[7]=n,t[8]=i,t[9]=u,t[10]=p,t[11]=f):(i=t[8],u=t[9],p=t[10],f=t[11]);let M;return t[12]!==a||t[13]!==r||t[14]!==i||t[15]!==u||t[16]!==p||t[17]!==f?(M={mutationKey:a,mutationFn:r,onMutate:i,onError:u,onSuccess:p,onSettled:f},t[12]=a,t[13]=r,t[14]=i,t[15]=u,t[16]=p,t[17]=f,t[18]=M):M=t[18],ft(M)}function vs(){const t=N.c(4),e=Ut(),s=ks(),n=ze();let o;return t[0]!==n||t[1]!==e||t[2]!==s?(o=Ts(e,s,new Set(n.map(Is))),t[0]=n,t[1]=e,t[2]=s,t[3]=o):o=t[3],o}function Is(t){return t.id}function oe(t,e,s,n){if(!t)return null;const o=e.find(r=>r.id===t.keyId);if(!o)return null;const a=s.find(r=>r.modelId===t.modelId);return a?{...a,keyId:t.keyId}:{modelId:t.modelId,title:n??t.modelId,keyId:t.keyId,providerId:o.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function bs(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function Ms(t,e,s,n){if(!s||n.length===0)return null;const o=e.find(u=>u.id===s);if(!o)return null;const a=Dt([o],{[s]:n}),r=t==="fast"?a.chat.fast:t==="thinking"?a.chat.thinking:a.chat.smart;if(!r)return null;const i=n.find(u=>u.modelId===r.modelId);return i?{...i,keyId:s}:null}const Ke=new Set,Z=new Set;function le(t){return b.useSyncExternalStore(t.subscribe,t.get,t.get)}function xs(t){return t.kind==="loading"?"ready":t.kind}function st(t){return t&&typeof t=="object"&&"type"in t?{tiptapDoc:t}:t}const Cs=1e4,ws=10,be=b.createContext(null),Ee=b.createContext(null),Fe=b.createContext(null),nt=b.createContext(null);function As(t){const e=N.c(3),{value:s,children:n}=t;let o;return e[0]!==n||e[1]!==s?(o=X.jsx(be.Provider,{value:s,children:n}),e[0]=n,e[1]=s,e[2]=o):o=e[2],o}function ln(t){const e=N.c(2),{children:s}=t;let n;return e[0]!==s?(n=X.jsx(be.Provider,{value:null,children:X.jsx(Ee.Provider,{value:null,children:s})}),e[0]=s,e[1]=n):n=e[1],n}function Rs({children:t}){const{locator:e}=Y(),{virtualMcpId:s}=Ze(),[n,o]=ue(de.chatSelectedImageModel(e),null),[a,r]=ue(de.chatSelectedWebSearchModel(e),null),[i,u]=ue(de.chatSelectedDeepResearchModel(e),null),[p,f]=b.useState(null),[M,w]=b.useState("default"),d=vs(),[x,_]=ue(de.chatSimpleModeTier(e),null),$=bs(x),v=ze(),C=d.tiers[$],j=v.some(c=>c.id===C?.keyId)?C?.keyId:void 0,Q=p&&v.some(c=>c.id===p)?p:j??v[0]?.id??null,{models:O,isLoading:A}=Se(Q??void 0),{models:R}=Se(j),z=v.some(c=>c.id===d.tiers.image?.keyId)?d.tiers.image?.keyId:void 0,{models:ne}=Se(z),q=v.some(c=>c.id===d.tiers.web_search?.keyId)?d.tiers.web_search?.keyId:void 0,{models:U}=Se(q),L=v.some(c=>c.id===d.tiers.deep_research?.keyId)?d.tiers.deep_research?.keyId:void 0,{models:V}=Se(L),K=oe(C,v,R,C?.title)??Ms($,v,Q,O),H=A,G=O.filter(c=>c.capabilities?.includes("image")),W=oe(n,v,G),m=oe(d.tiers.image,v,ne,d.tiers.image?.title)??W??G[0]??null,S=O.filter(Ot),I=oe(a,v,S),F=S.find(c=>c.modelId==="perplexity/sonar")??S[0]??null,J=oe(d.tiers.web_search,v,U,d.tiers.web_search?.title)??I??F,re=O.filter(qt),_e=oe(i,v,re),P=re.find(c=>c.modelId==="perplexity/deep-research")??re.find(c=>c.asyncResearch===!0)??re[0]??null,Me=oe(d.tiers.deep_research,v,V,d.tiers.deep_research?.title)??_e??P,fe=_t(s),$e=$t().find(c=>c.id===s),xe=fe??$e??{id:s,title:"",description:null,icon:null},[Pe,he]=b.useState({}),Ce=(c,E)=>{const y=[];for(const g of E.content??[])g.type==="text"&&g.text?.trim()&&y.push(g.text.trim());const k=y.join(`
32
+ `);if(!k){me(c);return}new TextEncoder().encode(k).length>Cs||he(g=>Object.keys(g).length>=ws&&!(c in g)?g:{...g,[c]:k})},me=c=>{he(E=>{const{[c]:y,...k}=E;return k})},[ge,De]=ue(de.chatLastAgentOption(e),c=>c&&c in We?c:null),we=js(),ye=Gt({pendingOption:ge,lockedHarness:we?.isThreadLocked?we.lockedHarness:null}),je=ye?We[ye]:null,[ie,Oe]=b.useState(void 0),l=b.useRef(ie);l.current=ie;const h={selectedModel:K,setModel:()=>{},credentialId:Q,setCredentialId:f,allModelsConnections:v,isModelsLoading:H,selectedVirtualMcp:xe,imageModel:m,setImageModel:c=>{o(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},webSearchModel:J,setWebSearchModel:c=>{r(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},deepResearchModel:Me,setDeepResearchModel:c=>{u(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},chatMode:M,setChatMode:w,appContexts:Pe,setAppContext:Ce,clearAppContext:me,tiptapDoc:ie,setTiptapDoc:Oe,tiptapDocRef:l,resetInteraction:()=>{},simpleModeTier:$,setSimpleModeTier:c=>_(c),pendingAgentOption:ye,setPendingAgentOption:De,pendingHarnessId:je};return X.jsx(Fe.Provider,{value:h,children:t})}function un(t){const e=N.c(41),{virtualMcpId:s,task:n,children:o}=t,{locator:a}=Y(),{data:r}=gt.useSession(),i=r?.user??null,{taskId:u,virtualMcpId:p,navigateToTask:f}=Ze(),[M]=yt(),{markTaskRead:w}=es(),d=At(),x=u,_=p,$=Jt(_);let v;e[0]!==w||e[1]!==f?(v=(S,I)=>{w(S),f(S,{virtualMcpId:I?.virtualMcpId,autosend:I?.autosend})},e[0]=w,e[1]=f,e[2]=v):v=e[2];const C=v,j=x!==null&&n?.id===x?n:null,Q=j?.harness_id??null,O=j?.branch??null,A=Q!=null,R=O;let z;e[3]!==R||e[4]!==a||e[5]!==C||e[6]!==d||e[7]!==s?(z=S=>{const I=crypto.randomUUID(),F=S?.branch??R;return Qe(sessionStorage,a,I,{...S?.runtime?{runtime:S.runtime}:{},...F?{branch:F}:{}}),d.create({id:I,virtual_mcp_id:s,...F?{branch:F}:{},...S?.runtime?{runtime:S.runtime}:{}}).then(()=>{Ue(sessionStorage,a,I),C(I)}).catch(()=>{C(I)}),I},e[3]=R,e[4]=a,e[5]=C,e[6]=d,e[7]=s,e[8]=z):z=e[8];const ne=z;let q;e[9]!==R||e[10]!==a||e[11]!==C||e[12]!==d||e[13]!==s?(q=S=>{const I=crypto.randomUUID(),F=S.virtualMcpId??s,J=F===s?R:null;Mt(sessionStorage,a,I,S.message),J&&Qe(sessionStorage,a,I,{branch:J}),d.create({id:I,virtual_mcp_id:F,...J?{branch:J}:{}}).then(()=>{Ue(sessionStorage,a,I),C(I,{virtualMcpId:S.virtualMcpId,autosend:!0})}).catch(()=>{C(I,{virtualMcpId:S.virtualMcpId,autosend:!0})})},e[9]=R,e[10]=a,e[11]=C,e[12]=d,e[13]=s,e[14]=q):q=e[14];const U=q;let L;e[15]!==x||e[16]!==d?(L=S=>{x&&d.setBranch(x,S)},e[15]=x,e[16]=d,e[17]=L):L=e[17];let V;e[18]!==j||e[19]!==ne||e[20]!==U||e[21]!==R||e[22]!==x||e[23]!==_||e[24]!==A||e[25]!==O||e[26]!==Q||e[27]!==C||e[28]!==L?(V={virtualMcpId:_,taskId:x,openTask:C,createTask:ne,createTaskWithMessage:U,activeTask:j,isThreadLocked:A,lockedHarness:Q,lockedBranch:O,currentBranch:R,setCurrentTaskBranch:L},e[18]=j,e[19]=ne,e[20]=U,e[21]=R,e[22]=x,e[23]=_,e[24]=A,e[25]=O,e[26]=Q,e[27]=C,e[28]=L,e[29]=V):V=e[29];const K=V;let H;e[30]!==$||e[31]!==M||e[32]!==f||e[33]!==i?(H={user:i,contextPrompt:$,preferences:M,rawNavigateToTask:f},e[30]=$,e[31]=M,e[32]=f,e[33]=i,e[34]=H):H=e[34];const G=H;let W;e[35]!==o||e[36]!==G?(W=X.jsx(Rs,{children:X.jsx(nt.Provider,{value:G,children:o})}),e[35]=o,e[36]=G,e[37]=W):W=e[37];let m;return e[38]!==W||e[39]!==K?(m=X.jsx(Ee.Provider,{value:K,children:W}),e[38]=W,e[39]=K,e[40]=m):m=e[40],m}const Es=[];function dn(t){const e=N.c(5),{children:s}=t,{createTaskWithMessage:n}=ot();let o;e[0]!==n?(o={messages:Es,status:"ready",sendMessage:async i=>{n({message:st(i)})},editQueuedMessage:Ls,stop:Ns,submit:qs,removeLocalMessage:Os,isSendInFlight:Ds,error:null,clearError:Ps,finishReason:null,runStatusStage:null,clearFinishReason:$s,isStreaming:!1,isChatEmpty:!0,isWaitingForApprovals:!1,isRunInProgress:!1,hasMoreOlder:!1,isFetchingOlder:!1,fetchOlderMessages:_s},e[0]=n,e[1]=o):o=e[1];const a=o;let r;return e[2]!==s||e[3]!==a?(r=X.jsx(As,{value:a,children:s}),e[2]=s,e[3]=a,e[4]=r):r=e[4],r}async function _s(){}function $s(){}function Ps(){}function Ds(){return!1}function Os(){}async function qs(){}function Ns(){}async function Ls(){return!1}function pn({taskId:t,children:e}){const s=ve(),n=Rt(),{virtualMcpId:o,activeTask:a,currentBranch:r}=ot(),i=zt({isDesktopApp:n,harnessId:a?.harness_id}),u=s("chat.input.codingAgentRequiresDesktop");Ke.has(t)||(Ke.add(t),kt("chat_opened",{thread_id:t}));const{imageModel:p,webSearchModel:f,deepResearchModel:M,chatMode:w,setChatMode:d,appContexts:x,setTiptapDoc:_,simpleModeTier:$}=Fs(),v=b.useContext(nt);if(!v)throw new Error(s("chat.chatContext.activeTaskProviderMissingContext"));const{user:C,contextPrompt:j,preferences:Q,rawNavigateToTask:O}=v,{org:A,locator:R}=Y(),z=ys(),[ne,q]=b.useState(null),U=()=>{q(new Error(u))},L=Zt(),V=Le(),K=Ct(),H=Ge(),{openPanel:G}=vt(),W=Et({connectionId:mt,orgId:A.id,orgSlug:A.slug}),m=wt(A.slug,t,{client:W});b.use(m.ready);const S=le(m.messages),I=le(m.status),F=le(m.finishReason),J=le(m.runStatusStage),re=le(m.hasMoreOlder),_e=le(m.isFetchingOlder),P=b.useRef({onToolCall:L,queryClient:V,rawNavigateToTask:O,taskId:t,manager:K,navigate:H,openPanel:G,orgId:A.id,orgSlug:A.slug});P.current={onToolCall:L,queryClient:V,rawNavigateToTask:O,taskId:t,manager:K,navigate:H,openPanel:G,orgId:A.id,orgSlug:A.slug};const Me=()=>{const l=P.current;ps(l.taskId)&&(async()=>(await ee(l.orgSlug,l.taskId),await m.reconcileFromServer()&&Ie(l.taskId).get().length===0&&fs(l.taskId)))()};Ft({orgSlug:A.slug,taskId:t,onTaskStatus:l=>{const h=P.current,c=l.data.message_id;if(l.data.status==="in_progress"&&c){qe(h.taskId,c);const E=gs(h.taskId,c);E&&m.applyLocalMessage(E),ee(h.orgSlug,h.taskId)}Me()},onReconnect:Me}),b.useEffect(()=>{const l={onData:y=>{if(y.type==="data-thread-title"){const k=y.data;if(!k?.title)return;const g=P.current;if(!g.taskId)return;g.manager.patchThread({id:g.taskId,title:k.title,updated_at:new Date().toISOString()});return}if(y.type==="data-deck-updated"){const k=y.data;if(!k?.path)return;const g=k.path,T=P.current;T.queryClient.invalidateQueries({queryKey:te.orgFsStat(T.orgId,"home",g)}),T.queryClient.invalidateQueries({queryKey:te.orgFsRecent(T.orgId)}),T.openPanel(Tt(g));return}if(y.type==="data-open-preview"){const k=y.data,g=P.current,T=g.taskId;if(T){const ce=g.manager.threads.get().find(B=>B.id===T);g.manager.patchThread({id:T,...k?.branch?{branch:k.branch}:{},metadata:{...ce?.metadata??{},...k?.githubRepo?{githubRepo:k.githubRepo}:{},...k?.sandboxMap?{sandboxMap:k.sandboxMap}:{}}})}g.openPanel("site-editor");return}},onFinish:(y,k,g)=>{const T=P.current;Pt(T.queryClient,T.orgId,Je(y.metadata?.usage)),T.queryClient.invalidateQueries({queryKey:te.aiPlanEntitlements(T.orgId),refetchType:"none"}),T.taskId&&ee(T.orgSlug,T.taskId),T.taskId&&T.manager.patchThread({id:T.taskId,status:Kt(g,y.parts),updated_at:new Date().toISOString()});const ce=y.parts?.some(D=>{const Te=D;return(Te.type==="tool-bash"||Te.type==="tool-write")&&Te.state==="output-available"});if(T.taskId&&ce){const D=te.threadOutputs(T.taskId);for(const Te of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{T.queryClient.invalidateQueries({queryKey:D})},Te)}T.queryClient.invalidateQueries({queryKey:te.homeNextActions(T.orgSlug)});const B=y.metadata?.thread_id;B&&B!==T.taskId&&T.rawNavigateToTask(B)},onError:y=>{q(y),console.error("[chat] Error",y)},onToolCall:y=>P.current.onToolCall(y)};m.observer=l,ee(P.current.orgSlug,P.current.taskId);const h=y=>y==="submitted"||y==="streaming";let c=h(m.status.get().kind);const E=m.status.subscribe(()=>{const y=h(m.status.get().kind);if(y===c)return;c=y;const k=P.current;ee(k.orgSlug,k.taskId)});return()=>{m.observer===l&&(m.observer=null),E()}},[m]);const fe=I.kind==="submitted"||I.kind==="streaming",$e=S.length===0,xe=S.at(-1),Pe=!fe&&xe?.role==="assistant"&&xe.parts.some(l=>"state"in l&&l.state==="approval-requested"),he=a,Ce=(he?.status==="in_progress"||he?.status==="expired")&&I.kind==="ready"&&S.length>0;async function me(l){const h=t,c=o;if(i)return U(),Z.delete(h),!1;const E=Object.entries(x),y=E.length>0?E.map(([B,D])=>`### App Context: ${B}
33
33
  ${D}`).join(`
34
34
 
35
35
  `):"",k=[j,y].filter(Boolean).join(`
36
36
 
37
- `);let g=w;g==="gen-image"&&!p&&(g="default"),g==="web-search"&&!f&&(g="default"),g==="deep-research"&&!b&&(g="default"),(g==="web-search"||g==="deep-research")&&d("default");const S=Xt({thread:a?{harness_id:a.harness_id??null,branch:a.branch??null}:null,globals:{branch:r}});a?.harness_id||K.patchThread({id:h,harness_id:"decopilot",updated_at:new Date().toISOString()});const ce={tier:$,mode:g,toolApprovalLevel:Q.toolApprovalLevel??Tt(),system:k||void 0,agent:{id:c},thread_id:h,...S};try{if(fe||xe){let B=!0;try{ms(h,l),await m.enqueue(l,ce),tt(h,{workflowId:`thread-run:${h}:${l.id}`,messageId:l.id,text:rs(l.parts),hasAttachments:l.parts.some(D=>D.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),ds(h)}catch(D){B=!1,Ve(h,l.id),Ne(h,l.id),N(D instanceof Error?D:new Error(String(D))),ae.error(D instanceof Error?D.message:s("chat.chatContext.failedToQueueMessage"))}return ee(A.slug,h),B}return await m.submit({kind:"message",message:l},ce),!0}finally{Z.delete(h)}}async function ge(l){const h=l.parts??et(l.tiptapDoc);if(h.length===0||Z.has(t))return;Z.add(t),N(null),_(void 0);const c={tiptapDoc:l.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:x?.image??void 0,name:x?.name??"you"}},E={id:crypto.randomUUID(),role:"user",parts:h,metadata:c};await me(E)}async function De(l,h){if(i)return U(),!1;if(Z.has(t))return ae.info(s("chat.chatContext.stillSendingPreviousMessage")),!1;if(Z.add(t),!await z.cancel(t,l))return Z.delete(t),ae.error(s("chat.chatContext.couldNotRemoveOriginalMessage")),!1;Ve(t,l),m.removeLocalMessage(l);const E={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:h}],metadata:{created_at:new Date().toISOString(),user:{avatar:x?.image??void 0,name:x?.name??"you"}}};try{return await me(E)}catch(y){return ae.error(y instanceof Error?y.message:s("chat.chatContext.failedToSendEditedMessage")),!1}}const we=async()=>{m.stop();try{const l=await fetch(`/api/${A.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(l.status===404)return;if(!l.ok){const h=await l.json().catch(()=>({}));throw new Error(h.message??s("chat.chatContext.cancelFailedStatus",{status:l.status}))}}catch(l){const h=l instanceof Error?l.message:s("chat.chatContext.failedToCancel");ae.error(h),console.error("[chat] cancelRun",l)}},ye=l=>ge(st(l)),ie=qe({strict:!1}).autosend===Ye;M.useEffect(()=>{if(!ie||T.length>0||i)return;const l=It(sessionStorage,R,t);l&&ge(l.message).then(()=>{Mt(sessionStorage,R,t)})},[ie,T.length,i,R,t,ge]);const Oe={messages:T,status:Cs(I),sendMessage:ye,editQueuedMessage:De,stop:()=>{if(i){U();return}we()},submit:async(l,h)=>{if(i){U();return}await m.submit(l,h)},removeLocalMessage:l=>m.removeLocalMessage(l),isSendInFlight:()=>Z.has(t),error:ne,clearError:()=>N(null),finishReason:F,runStatusStage:J,clearFinishReason:()=>m.finishReason.set(null),isStreaming:fe,isChatEmpty:$e,isWaitingForApprovals:Pe??!1,isRunInProgress:xe,hasMoreOlder:re,isFetchingOlder:_e,fetchOlderMessages:m.fetchOlderMessages.bind(m)};return X.jsx(Me.Provider,{value:Oe,children:e})}function fn(){const t=ve(),e=M.useContext(Me);if(!e)throw new Error(t("chat.chatContext.useChatStreamMissingContext"));return e}function hn(){return M.useContext(Me)}function ot(){const t=ve(),e=M.useContext(Ee);if(!e)throw new Error(t("chat.chatContext.useChatTaskMissingContext"));return e}function Fs(){const t=ve(),e=M.useContext(Fe);if(!e)throw new Error(t("chat.chatContext.useChatPrefsMissingContext"));return e}function mn(){return M.useContext(Fe)}function js(){return M.useContext(Ee)}export{pn as A,Rs as C,ln as D,dn as T,fn as a,ot as b,Fs as c,sn as d,Ze as e,hn as f,et as g,un as h,rn as i,on as j,an as k,ys as l,Ve as m,Ae as n,Ts as o,cn as p,vs as q,mn as r,zt as s,nn as t,js as u,Je as v,Vt as w,Bt as x,tn as y};
37
+ `);let g=w;g==="gen-image"&&!p&&(g="default"),g==="web-search"&&!f&&(g="default"),g==="deep-research"&&!M&&(g="default"),(g==="web-search"||g==="deep-research")&&d("default");const T=Xt({thread:a?{harness_id:a.harness_id??null,branch:a.branch??null}:null,globals:{branch:r}});a?.harness_id||K.patchThread({id:h,harness_id:"decopilot",updated_at:new Date().toISOString()});const ce={tier:$,mode:g,toolApprovalLevel:Q.toolApprovalLevel??St(),system:k||void 0,agent:{id:c},thread_id:h,...T};try{if(fe||Ce){let B=!0;try{ms(h,l),await m.enqueue(l,ce),tt(h,{workflowId:`thread-run:${h}:${l.id}`,messageId:l.id,text:rs(l.parts),hasAttachments:l.parts.some(D=>D.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),ds(h)}catch(D){B=!1,Ve(h,l.id),qe(h,l.id),q(D instanceof Error?D:new Error(String(D))),ae.error(D instanceof Error?D.message:s("chat.chatContext.failedToQueueMessage"))}return ee(A.slug,h),B}return await m.submit({kind:"message",message:l},ce),!0}finally{Z.delete(h)}}async function ge(l){const h=l.parts??et(l.tiptapDoc);if(h.length===0||Z.has(t))return;Z.add(t),q(null),_(void 0);const c={tiptapDoc:l.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:C?.image??void 0,name:C?.name??"you"}},E={id:crypto.randomUUID(),role:"user",parts:h,metadata:c};await me(E)}async function De(l,h){if(i)return U(),!1;if(Z.has(t))return ae.info(s("chat.chatContext.stillSendingPreviousMessage")),!1;if(Z.add(t),!await z.cancel(t,l))return Z.delete(t),ae.error(s("chat.chatContext.couldNotRemoveOriginalMessage")),!1;Ve(t,l),m.removeLocalMessage(l);const E={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:h}],metadata:{created_at:new Date().toISOString(),user:{avatar:C?.image??void 0,name:C?.name??"you"}}};try{return await me(E)}catch(y){return ae.error(y instanceof Error?y.message:s("chat.chatContext.failedToSendEditedMessage")),!1}}const we=async()=>{m.stop();try{const l=await fetch(`/api/${A.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(l.status===404)return;if(!l.ok){const h=await l.json().catch(()=>({}));throw new Error(h.message??s("chat.chatContext.cancelFailedStatus",{status:l.status}))}}catch(l){const h=l instanceof Error?l.message:s("chat.chatContext.failedToCancel");ae.error(h),console.error("[chat] cancelRun",l)}},ye=l=>ge(st(l)),ie=Ne({strict:!1}).autosend===Ye;b.useEffect(()=>{if(!ie||S.length>0||i)return;const l=It(sessionStorage,R,t);l&&ge(l.message).then(()=>{bt(sessionStorage,R,t)})},[ie,S.length,i,R,t,ge]);const Oe={messages:S,status:xs(I),sendMessage:ye,editQueuedMessage:De,stop:()=>{if(i){U();return}we()},submit:async(l,h)=>{if(i){U();return}await m.submit(l,h)},removeLocalMessage:l=>m.removeLocalMessage(l),isSendInFlight:()=>Z.has(t),error:ne,clearError:()=>q(null),finishReason:F,runStatusStage:J,clearFinishReason:()=>m.finishReason.set(null),isStreaming:fe,isChatEmpty:$e,isWaitingForApprovals:Pe??!1,isRunInProgress:Ce,hasMoreOlder:re,isFetchingOlder:_e,fetchOlderMessages:m.fetchOlderMessages.bind(m)};return X.jsx(be.Provider,{value:Oe,children:e})}function fn(){const t=ve(),e=b.useContext(be);if(!e)throw new Error(t("chat.chatContext.useChatStreamMissingContext"));return e}function hn(){return b.useContext(be)}function ot(){const t=ve(),e=b.useContext(Ee);if(!e)throw new Error(t("chat.chatContext.useChatTaskMissingContext"));return e}function Fs(){const t=ve(),e=b.useContext(Fe);if(!e)throw new Error(t("chat.chatContext.useChatPrefsMissingContext"));return e}function mn(){return b.useContext(Fe)}function js(){return b.useContext(Ee)}export{pn as A,Rs as C,ln as D,dn as T,fn as a,ot as b,Fs as c,sn as d,Ze as e,hn as f,et as g,un as h,rn as i,on as j,an as k,ys as l,Ve as m,Ae as n,Ss as o,cn as p,vs as q,mn as r,zt as s,nn as t,js as u,Je as v,Vt as w,Bt as x,tn as y};
@@ -1 +1 @@
1
- import{J as l}from"./index-Dc7hzqoi.js";const y="[SUBSCRIPTION_REQUIRED]";function h(t){return t?.message.startsWith(y)?t.message.includes("used its free task executions")?"trial_exhausted":t.message.includes("used its monthly task executions")?"monthly_exhausted":t.message.includes("reached its execution limit")?"runs_exhausted":null:null}function d(t){return!t||!t.content||t.content.length===0?!0:t.content.every(e=>e.type==="paragraph"?!e.content||e.content.length===0?!0:e.content.every(n=>n.type==="hardBreak"||n.type==="text"&&(!n.text||n.text.trim()==="")):!1)}const _="__home__";function a(t,e){return l.chatDraft(t,e)}function m(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}if(!e||typeof e!="object"||typeof e.updatedAt!="number")return null;const n=e.tiptapDoc;return!n||typeof n!="object"||n.type!=="doc"||!Array.isArray(n.content)?null:n}function x(t,e,n,r,s){const u=a(e,n);if(d(r)){t.removeItem(u);return}const c={tiptapDoc:r,updatedAt:Date.now()},o=JSON.stringify(c);try{t.setItem(u,o)}catch(i){if(p(i)){const f=new TextEncoder().encode(o).byteLength;s?.onQuotaExceeded?.({docSizeBytes:f});return}throw i}}function R(t,e,n){const r=a(e,n),s=t.getItem(r),u=m(s);return s!==null&&u===null&&t.removeItem(r),u}function D(t,e,n){t.removeItem(a(e,n))}function p(t){if(!t||typeof t!="object")return!1;const e=t.name;return e==="QuotaExceededError"||e==="NS_ERROR_DOM_QUOTA_REACHED"}export{_ as H,D as c,d as i,R as r,h as s,x as w};
1
+ import{$ as l}from"./index-BiU3YmQL.js";const y="[SUBSCRIPTION_REQUIRED]";function h(t){return t?.message.startsWith(y)?t.message.includes("used its free task executions")?"trial_exhausted":t.message.includes("used its monthly task executions")?"monthly_exhausted":t.message.includes("reached its execution limit")?"runs_exhausted":null:null}function d(t){return!t||!t.content||t.content.length===0?!0:t.content.every(e=>e.type==="paragraph"?!e.content||e.content.length===0?!0:e.content.every(n=>n.type==="hardBreak"||n.type==="text"&&(!n.text||n.text.trim()==="")):!1)}const _="__home__";function a(t,e){return l.chatDraft(t,e)}function m(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}if(!e||typeof e!="object"||typeof e.updatedAt!="number")return null;const n=e.tiptapDoc;return!n||typeof n!="object"||n.type!=="doc"||!Array.isArray(n.content)?null:n}function x(t,e,n,r,s){const u=a(e,n);if(d(r)){t.removeItem(u);return}const c={tiptapDoc:r,updatedAt:Date.now()},o=JSON.stringify(c);try{t.setItem(u,o)}catch(i){if(p(i)){const f=new TextEncoder().encode(o).byteLength;s?.onQuotaExceeded?.({docSizeBytes:f});return}throw i}}function R(t,e,n){const r=a(e,n),s=t.getItem(r),u=m(s);return s!==null&&u===null&&t.removeItem(r),u}function D(t,e,n){t.removeItem(a(e,n))}function p(t){if(!t||typeof t!="object")return!1;const e=t.name;return e==="QuotaExceededError"||e==="NS_ERROR_DOM_QUOTA_REACHED"}export{_ as H,D as c,d as i,R as r,h as s,x as w};
@@ -0,0 +1 @@
1
+ import{c as n,l as d,j as c,eG as l,eH as b,a9 as m}from"./index-BiU3YmQL.js";function p(o){const e=n.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(l,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{p as C};
@@ -0,0 +1 @@
1
+ import{c as y,j as s,u as w,b as S,d as v,B as N,N as C,J as K,m as $,K as T,h as I}from"./index-BiU3YmQL.js";import{A as F}from"./agent-icon-DbgbaBWC.js";import{R as P}from"./required-auth-layout-C1pT7wzX.js";import"./AlertCircle-3PzOAmGf.js";import"./Tool01-DbFf2Je1.js";import"./ArrowUp-Bmd2w7Fx.js";import"./ArrowLeft-JCMxLp8E.js";import"./Tool02-Hh7HLEzm.js";import"./ArrowRight-Cl3bzAIC.js";import"./TrendUp01-ZTgT_kdi.js";import"./ZoomOut-DtzZmmbM.js";import"./Globe04-CCIm2Cf2.js";import"./CheckCircle-Co3IBXeH.js";import"./ChevronUp-Djmy8s04.js";import"./UserSquare-C4_QxRGQ.js";import"./Copy01-BYK2zIkj.js";import"./CreditCard01-C7PO4dVs.js";import"./DotsVertical-BozfeMf6.js";import"./Download01-Z6w2IrLj.js";import"./Settings02-azWHb0MO.js";import"./Eye-ChO6k3fk.js";import"./Share07-CW1RSVqD.js";import"./Globe01-D3UtmZtY.js";import"./XClose-BhXJw65F.js";import"./Image01-Dx7ea-3O.js";import"./Key01-B8q0d-op.js";import"./LayoutLeft-DUo3bbMr.js";import"./Link01-C-mBEv93.js";import"./LinkExternal01-uHE64k_w.js";import"./Monitor01-CevElukI.js";import"./Sun-Cx4zdBZx.js";import"./Package-C6yqPbb7.js";import"./Palette-B2v8R7_D.js";import"./Play-D26LBNWf.js";import"./Plus-CoGTSnEd.js";import"./SearchLg-BvCfRAbg.js";import"./SearchMd-C0e2gT30.js";import"./Stars01-Ch2E4B6o.js";import"./Trash01-D8ICnU7E.js";import"./Upload01-BoLmU8be.js";import"./User01-CQXsOD6P.js";import"./Users01-mzXfNn0j.js";import"./XCircle-jpeASVbU.js";import"./X-BmPcW1eb.js";import"./Zap-Cc5rEM6R.js";async function _(t){const e=new URLSearchParams({site:t}),l=await fetch(`/api/_editor-resolve?${e.toString()}`,{headers:{Accept:"application/json"}});if(!l.ok){const r=new Error(`editor-resolve HTTP ${l.status}`);throw r.status=l.status,r}return await l.json()}function R(t){const e=t?.status;return typeof e=="number"&&e>=400&&e<500}function k(t){return{...t.pageId?{contentPageId:t.pageId}:{},...t.path?{contentPath:t.path}:{},...t.pathTemplate?{contentPathTemplate:t.pathTemplate}:{}}}function b(t){const e=y.c(2),{children:l}=t;let r;return e[0]!==l?(r=s.jsx("div",{className:"flex min-h-screen w-full items-center justify-center bg-background p-6",children:s.jsx("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:l})}),e[0]=l,e[1]=r):r=e[1],r}function A(){const t=y.c(5),e=S();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(I,{className:"size-6 text-muted-foreground"}),t[0]=l):l=t[0];let r;t[1]!==e?(r=e("chooseEditor.resolving"),t[1]=e,t[2]=r):r=t[2];let i;return t[3]!==r?(i=s.jsxs(b,{children:[l,s.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),t[3]=r,t[4]=i):i=t[4],i}function E(t){const e=y.c(29),{titleKey:l,descriptionKey:r,onRetry:i}=t,n=S(),m=v();let d;e[0]!==n||e[1]!==l?(d=n(l),e[0]=n,e[1]=l,e[2]=d):d=e[2];let u;e[3]!==d?(u=s.jsx("h1",{className:"text-lg font-medium text-foreground",children:d}),e[3]=d,e[4]=u):u=e[4];let p;e[5]!==r||e[6]!==n?(p=n(r),e[5]=r,e[6]=n,e[7]=p):p=e[7];let a;e[8]!==p?(a=s.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[8]=p,e[9]=a):a=e[9];let c;e[10]!==u||e[11]!==a?(c=s.jsxs("div",{className:"flex flex-col gap-2",children:[u,a]}),e[10]=u,e[11]=a,e[12]=c):c=e[12];let f;e[13]!==i||e[14]!==n?(f=i?s.jsx(N,{variant:"outline",onClick:i,children:n("chooseEditor.retry")}):null,e[13]=i,e[14]=n,e[15]=f):f=e[15];let o;e[16]!==m?(o=()=>m({to:"/"}),e[16]=m,e[17]=o):o=e[17];let g;e[18]!==n?(g=n("chooseEditor.backToStudio"),e[18]=n,e[19]=g):g=e[19];let j;e[20]!==o||e[21]!==g?(j=s.jsx(N,{onClick:o,children:g}),e[20]=o,e[21]=g,e[22]=j):j=e[22];let x;e[23]!==f||e[24]!==j?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[f,j]}),e[23]=f,e[24]=j,e[25]=x):x=e[25];let h;return e[26]!==x||e[27]!==c?(h=s.jsxs(b,{children:[c,x]}),e[26]=x,e[27]=c,e[28]=h):h=e[28],h}function q(t){const e=y.c(6),{orgSlug:l,projectId:r,pageSearch:i}=t;let n;e[0]!==l||e[1]!==r?(n={org:l,agentId:r},e[0]=l,e[1]=r,e[2]=n):n=e[2];let m;return e[3]!==i||e[4]!==n?(m=s.jsx(C,{to:K.siteEditorContent,params:n,search:i,replace:!0}),e[3]=i,e[4]=n,e[5]=m):m=e[5],m}function L(t){const e=y.c(26),{matches:l,pageSearch:r}=t,i=S(),n=v();let m;e[0]!==n||e[1]!==r?(m=x=>{n({to:K.siteEditorContent,params:{org:x.orgSlug,agentId:x.project.id},search:r})},e[0]=n,e[1]=r,e[2]=m):m=e[2];const d=m;let u;e[3]!==i?(u=i("chooseEditor.chooser.title"),e[3]=i,e[4]=u):u=e[4];let p;e[5]!==u?(p=s.jsx("h1",{className:"text-lg font-medium text-foreground",children:u}),e[5]=u,e[6]=p):p=e[6];let a;e[7]!==i?(a=i("chooseEditor.chooser.subtitle"),e[7]=i,e[8]=a):a=e[8];let c;e[9]!==a?(c=s.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[9]=a,e[10]=c):c=e[10];let f;e[11]!==p||e[12]!==c?(f=s.jsxs("div",{className:"flex flex-col gap-2",children:[p,c]}),e[11]=p,e[12]=c,e[13]=f):f=e[13];let o;if(e[14]!==l||e[15]!==d||e[16]!==i){let x;e[18]!==d||e[19]!==i?(x=h=>s.jsxs("button",{type:"button",onClick:()=>d(h),"aria-label":i("chooseEditor.chooser.openAriaLabel",{title:h.project.title,org:h.orgName}),className:"flex w-full items-center gap-3 rounded-lg border border-border bg-card p-3 text-left transition-colors hover:bg-accent",children:[s.jsx(F,{icon:h.project.icon,name:h.project.title,size:"sm"}),s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:h.project.title}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:h.orgName})]})]},`${h.orgSlug}/${h.project.id}`),e[18]=d,e[19]=i,e[20]=x):x=e[20],o=l.map(x),e[14]=l,e[15]=d,e[16]=i,e[17]=o}else o=e[17];let g;e[21]!==o?(g=s.jsx("div",{className:"flex w-full flex-col gap-2",children:o}),e[21]=o,e[22]=g):g=e[22];let j;return e[23]!==f||e[24]!==g?(j=s.jsxs(b,{children:[f,g]}),e[23]=f,e[24]=g,e[25]=j):j=e[25],j}function z(){const t=y.c(24);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/choose-editor"},t[0]=e):e=t[0];const l=w(e);let r,i,n,m;t[1]!==l?(i=l.site?.trim()??"",r=k(l),m=$,n=T.editorResolve(i),t[1]=l,t[2]=r,t[3]=i,t[4]=n,t[5]=m):(r=t[2],i=t[3],n=t[4],m=t[5]);let d;t[6]!==i?(d=()=>_(i),t[6]=i,t[7]=d):d=t[7];const u=i.length>0;let p;t[8]!==n||t[9]!==d||t[10]!==u?(p={queryKey:n,queryFn:d,enabled:u,staleTime:1/0,retry:B},t[8]=n,t[9]=d,t[10]=u,t[11]=p):p=t[11];const a=m(p);if(!i){let o;return t[12]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[12]=o):o=t[12],o}if(a.isError){let o;return t[13]!==a?(o=R(a.error)?s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}):s.jsx(E,{titleKey:"chooseEditor.error.title",descriptionKey:"chooseEditor.error.description",onRetry:()=>a.refetch()}),t[13]=a,t[14]=o):o=t[14],o}if(!a.data){let o;return t[15]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(A,{}),t[15]=o):o=t[15],o}const{matches:c}=a.data;if(c.length===0){let o;return t[16]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[16]=o):o=t[16],o}if(c.length===1&&c[0]){let o;return t[17]!==c[0].orgSlug||t[18]!==c[0].project.id||t[19]!==r?(o=s.jsx(q,{orgSlug:c[0].orgSlug,projectId:c[0].project.id,pageSearch:r}),t[17]=c[0].orgSlug,t[18]=c[0].project.id,t[19]=r,t[20]=o):o=t[20],o}let f;return t[21]!==c||t[22]!==r?(f=s.jsx(L,{matches:c,pageSearch:r}),t[21]=c,t[22]=r,t[23]=f):f=t[23],f}function B(t,e){return!R(e)&&t<2}function Fe(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(P,{children:s.jsx(z,{})}),t[0]=e):e=t[0],e}export{Fe as default};
@@ -1 +1 @@
1
- import{c as a,a as c,r as m,j as o}from"./index-Dc7hzqoi.js";import{A as u}from"./auth-split-layout-DLFqjvPt.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
1
+ import{c as a,a as c,r as m,j as o}from"./index-BiU3YmQL.js";import{A as u}from"./auth-split-layout-tneb1o26.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
@@ -1 +1 @@
1
- import{c as l,j as n}from"./index-Dc7hzqoi.js";function a(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function d(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function h(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}export{a as C,h as a,d as b};
1
+ import{c as l,j as n}from"./index-BiU3YmQL.js";function a(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function d(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function h(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}export{a as C,h as a,d as b};
@@ -0,0 +1 @@
1
+ import{r as a,bu as O,j as i,bo as g,bn as $,bp as S,dj as D,bm as M,br as F,bF as L,c as v,l as k}from"./index-BiU3YmQL.js";var f="Collapsible",[B,J]=L(f),[G,x]=B(f),A=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,open:n,defaultOpen:s,disabled:l,onOpenChange:c,...b}=o,[d,p]=O({prop:n,defaultProp:s??!1,onChange:c,caller:f});return i.jsx(G,{scope:t,disabled:l,contentId:$(),open:d,onOpenToggle:a.useCallback(()=>p(C=>!C),[p]),children:i.jsx(g.div,{"data-state":y(d),"data-disabled":l?"":void 0,...b,ref:e})})});A.displayName=f;var I="CollapsibleTrigger",R=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,...n}=o,s=x(I,t);return i.jsx(g.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":y(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:S(o.onClick,s.onOpenToggle)})});R.displayName=I;var h="CollapsibleContent",N=a.forwardRef((o,e)=>{const{forceMount:t,...n}=o,s=x(h,o.__scopeCollapsible);return i.jsx(D,{present:t||s.open,children:({present:l})=>i.jsx(q,{...n,ref:e,present:l})})});N.displayName=h;var q=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,present:n,children:s,...l}=o,c=x(h,t),[b,d]=a.useState(n),p=a.useRef(null),C=M(e,p),P=a.useRef(0),j=P.current,E=a.useRef(0),_=E.current,m=c.open||b,w=a.useRef(m),u=a.useRef(void 0);return a.useEffect(()=>{const r=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(r)},[]),F(()=>{const r=p.current;if(r){u.current=u.current||{transitionDuration:r.style.transitionDuration,animationName:r.style.animationName},r.style.transitionDuration="0s",r.style.animationName="none";const T=r.getBoundingClientRect();P.current=T.height,E.current=T.width,w.current||(r.style.transitionDuration=u.current.transitionDuration,r.style.animationName=u.current.animationName),d(n)}},[c.open,n]),i.jsx(g.div,{"data-state":y(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!m,...l,ref:C,style:{"--radix-collapsible-content-height":j?`${j}px`:void 0,"--radix-collapsible-content-width":_?`${_}px`:void 0,...o.style},children:m&&s})});function y(o){return o?"open":"closed"}var H=A,K=R,Q=N;function U(o){const e=v.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let n;return e[2]!==t?(n=i.jsx(H,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=n):n=e[3],n}function V(o){const e=v.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let n;return e[2]!==t?(n=i.jsx(R,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=n):n=e[3],n}function W(o){const e=v.c(8);let t,n;e[0]!==o?({className:t,...n}=o,e[0]=o,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s;e[3]!==t?(s=k("overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:animate-none",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==n||e[6]!==s?(l=i.jsx(N,{"data-slot":"collapsible-content",className:s,...n}),e[5]=n,e[6]=s,e[7]=l):l=e[7],l}export{V as C,H as R,K as T,W as a,U as b,J as c,Q as d};
@@ -0,0 +1 @@
1
+ import{c as B,j as t,B as K,h as G,ao as tt,ap as ie,b as W,E as Oe,r as D,Z as Fe,a0 as xe,d5 as st,d4 as Me,ar as ot,n as Be,P as ye,u as nt,L as te,t as lt,f as fe,bZ as ze}from"./index-BiU3YmQL.js";import{E as Le}from"./empty-state-1TOptJ4i.js";import{u as he}from"./use-mcp-client-Br7XFHza.js";import{F as re,a as it,b as ae,d as ce}from"./form-D4fabgxt.js";import{I as ue}from"./input-4CSpUSQl.js";import{T as pe}from"./textarea-DbE6fIU0.js";import{D as ge,O as rt,M as at}from"./index-PXtwpYFZ.js";import{b6 as ct,T as dt,bg as mt,ac as ut,E as pt,F as xt,aB as ft,x as we}from"./agent-icon-DbgbaBWC.js";import{M as ht}from"./mcp-app-renderer-swczxBq4.js";import{g as gt,M as Ce}from"./types-CyZPxJ7C.js";import{a as jt,b as bt,A as Nt}from"./alert-D9Xs8r1J.js";import{S as Ie,b as Te,a as $e,d as Pe,c as de}from"./select-47N7H1PV.js";import{b as vt,c as De,T as ke,a as Ae}from"./tooltip-BGb6Kdym.js";import{B as Ue,a as _e,b as Z,c as se,d as oe,e as Je}from"./breadcrumb-CV5rO8sh.js";import{i as St}from"./AlertCircle-3PzOAmGf.js";import{a as yt}from"./Copy01-BYK2zIkj.js";import{i as wt}from"./Play-D26LBNWf.js";import{g as Ct}from"./connection-slug-CITJ0kGN.js";import{u as It,T as Tt}from"./use-mcp-auth-status-g0Tk-Phb.js";import{a as Ve,u as qe}from"./use-connection-C2XMAF5j.js";import{u as $t}from"./use-mcp-tools-DpaWZTAA.js";import{c as Pt}from"./content-blocks-o63cs2vh.js";import{I as Ee}from"./integration-icon-1ySWGOUX.js";import{f as Dt,r as kt}from"./chat-context-CHZ5Yehn.js";import{a as At}from"./shell-layout-BMyUKhgs.js";import{M as Et}from"./monaco-editor-BTTiRg3C.js";import{E as Rt}from"./empty-state-DTENIvqH.js";import{n as Ot}from"./Tool02-Hh7HLEzm.js";import"./auth-DvTDuEnH.js";import"./label-BNElcQf4.js";import"./sidebar-BMWTk3Ss.js";import"./LayoutLeft-DUo3bbMr.js";import"./use-mobile-DVkjqQzh.js";import"./sheet-CvV2x5yz.js";import"./X-BmPcW1eb.js";import"./Key01-B8q0d-op.js";import"./extract-connection-data-B7yRd0El.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-DlOqhGn3.js";import"./use-registry-connections-BQknTkkv.js";import"./use-organization-settings-DalrVcZ1.js";import"./schema-C2CxTC2d.js";import"./task-board-iF-5OywY.js";import"./Plus-CoGTSnEd.js";import"./index-CLlrN2I7.js";import"./index-DyLXwR4J.js";import"./index-ui6lA5FC.js";import"./index-Bxbv_23l.js";import"./popover-QnaOlHhb.js";import"./use-virtual-mcp-CmFx7CJY.js";import"./SearchMd-C0e2gT30.js";import"./use-create-virtual-mcp-CZM9_2b6.js";import"./use-navigate-to-agent-LXQlcEnV.js";import"./hooks-GmRpr8h8.js";import"./backoff-8mStPHYB.js";import"./thread-intent-CnRICyzb.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./Tool01-DbFf2Je1.js";import"./ArrowUp-Bmd2w7Fx.js";import"./ArrowLeft-JCMxLp8E.js";import"./ArrowRight-Cl3bzAIC.js";import"./TrendUp01-ZTgT_kdi.js";import"./ZoomOut-DtzZmmbM.js";import"./Globe04-CCIm2Cf2.js";import"./CheckCircle-Co3IBXeH.js";import"./ChevronUp-Djmy8s04.js";import"./UserSquare-C4_QxRGQ.js";import"./CreditCard01-C7PO4dVs.js";import"./DotsVertical-BozfeMf6.js";import"./Download01-Z6w2IrLj.js";import"./Settings02-azWHb0MO.js";import"./Eye-ChO6k3fk.js";import"./Share07-CW1RSVqD.js";import"./Globe01-D3UtmZtY.js";import"./XClose-BhXJw65F.js";import"./Image01-Dx7ea-3O.js";import"./Link01-C-mBEv93.js";import"./LinkExternal01-uHE64k_w.js";import"./Monitor01-CevElukI.js";import"./Sun-Cx4zdBZx.js";import"./Package-C6yqPbb7.js";import"./Palette-B2v8R7_D.js";import"./SearchLg-BvCfRAbg.js";import"./Stars01-Ch2E4B6o.js";import"./Trash01-D8ICnU7E.js";import"./Upload01-BoLmU8be.js";import"./User01-CQXsOD6P.js";import"./Users01-mzXfNn0j.js";import"./XCircle-jpeASVbU.js";import"./Zap-Cc5rEM6R.js";import"./index-DAWDSRE3.js";import"./badge-BMuU0t5h.js";import"./mcp-oauth-S1Th8e_4.js";import"./use-panel-navigate-DMG8fP2m.js";import"./thread-route-CTwlz0m2.js";import"./use-project-scope-_WcnrAA6.js";import"./autosend-CESqNA2a.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-BGdUcutE.js";import"./use-ai-providers-Cxi0vxkS.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-CuJ7CkFw.js";import"./avatar-CsDZ0T22.js";import"./download-app-dialog-CnJNRM3l.js";import"./dialog-yUWKJPsU.js";import"./command-bqq51nHs.js";import"./project-icon-DeL96Npe.js";import"./required-auth-layout-C1pT7wzX.js";import"./use-org-sso-zl0gtui9.js";import"./editor-9_pChBN4.js";function Re(s){const e=B.c(15),{onSave:l,onUndo:n,isDirty:m,isSaving:o,saveLabel:a,undoLabel:u}=s,d=a===void 0?"Save":a,r=u===void 0?"Undo":u;if(!m)return null;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(ct,{size:14}),e[0]=i):i=e[0];let h;e[1]!==o||e[2]!==n||e[3]!==r?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:n,disabled:o,"aria-label":r,children:[i,r]}),e[1]=o,e[2]=n,e[3]=r,e[4]=h):h=e[4];let p;e[5]!==o?(p=o?t.jsx(G,{className:"size-3.5"}):t.jsx(dt,{size:14}),e[5]=o,e[6]=p):p=e[6];let x;e[7]!==o||e[8]!==l||e[9]!==d||e[10]!==p?(x=t.jsxs(K,{variant:"default",size:"sm",onClick:l,disabled:o,"aria-label":d,children:[p,d]}),e[7]=o,e[8]=l,e[9]=d,e[10]=p,e[11]=x):x=e[11];let j;return e[12]!==h||e[13]!==x?(j=t.jsxs(t.Fragment,{children:[h,x]}),e[12]=h,e[13]=x,e[14]=j):j=e[14],j}tt({title:ie().min(1),description:ie().nullable(),body:ie()});function me(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),l=e>=0?s[e+1]:void 0;return l?decodeURIComponent(l):void 0}function Mt(s){const e=B.c(43),{form:l}=s,n=W();let m;e[0]!==n?(m=n("details.prompt.details"),e[0]=n,e[1]=m):m=e[1];let o;e[2]!==m?(o=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[2]=m,e[3]=o):o=e[3];let a;e[4]!==n?(a=T=>{const{field:$}=T;return t.jsxs(ae,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:n("details.prompt.title")}),t.jsx(ce,{children:t.jsx(ue,{...$,placeholder:n("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=n,e[5]=a):a=e[5];let u;e[6]!==l.control||e[7]!==a?(u=t.jsx(re,{control:l.control,name:"title",render:a}),e[6]=l.control,e[7]=a,e[8]=u):u=e[8];let d;e[9]!==n?(d=T=>{const{field:$}=T;return t.jsxs(ae,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:n("details.prompt.description")}),t.jsx(ce,{children:t.jsx(ue,{...$,value:$.value??"",placeholder:n("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=n,e[10]=d):d=e[10];let r;e[11]!==l.control||e[12]!==d?(r=t.jsx(re,{control:l.control,name:"description",render:d}),e[11]=l.control,e[12]=d,e[13]=r):r=e[13];let i;e[14]!==u||e[15]!==r?(i=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u,r]}),e[14]=u,e[15]=r,e[16]=i):i=e[16];let h;e[17]!==o||e[18]!==i?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[o,i]}),e[17]=o,e[18]=i,e[19]=h):h=e[19];let p;e[20]!==n?(p=n("details.prompt.message"),e[20]=n,e[21]=p):p=e[21];let x;e[22]!==p?(x=t.jsx("div",{className:"text-sm font-medium text-foreground",children:p}),e[22]=p,e[23]=x):x=e[23];let j;e[24]!==n?(j=n("details.prompt.messageDescription"),e[24]=n,e[25]=j):j=e[25];let f;e[26]!==j?(f=t.jsx("div",{className:"text-xs text-muted-foreground",children:j}),e[26]=j,e[27]=f):f=e[27];let b;e[28]!==n?(b=T=>{const{field:$}=T;return t.jsx(ae,{children:t.jsx(ce,{children:t.jsx(pe,{...$,value:$.value??"",placeholder:n("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=n,e[29]=b):b=e[29];let S;e[30]!==l.control||e[31]!==b?(S=t.jsx(re,{control:l.control,name:"body",render:b}),e[30]=l.control,e[31]=b,e[32]=S):S=e[32];let w;e[33]!==x||e[34]!==f||e[35]!==S?(w=t.jsxs("div",{className:"flex flex-col gap-2",children:[x,f,S]}),e[33]=x,e[34]=f,e[35]=S,e[36]=w):w=e[36];let C;e[37]!==w||e[38]!==h?(C=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,w]}),e[37]=w,e[38]=h,e[39]=C):C=e[39];let I;return e[40]!==l||e[41]!==C?(I=t.jsx(it,{...l,children:C}),e[40]=l,e[41]=C,e[42]=I):I=e[42],I}function Bt(s){const e=B.c(35),{providerId:l,promptId:n}=s,m=Fe(),o=W(),{org:a}=xe(),u=l||null;let d;e[0]!==a.id||e[1]!==a.slug||e[2]!==u?(d={connectionId:u,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=u,e[3]=d):d=e[3];const r=he(d),i=st(l,"PROMPT",n,r),h=Me(l,"PROMPT",r),p=h.update.isPending;let x;e[4]!==i?(x=i?{title:i.title,description:i.description??null,body:me(i)}:void 0,e[4]=i,e[5]=x):x=e[5];let j;e[6]!==x?(j={values:x},e[6]=x,e[7]=j):j=e[7];const f=ot(j);let b;e[8]!==f||e[9]!==i?(b=()=>{i&&f.reset({title:i.title,description:i.description??null,body:me(i)})},e[8]=f,e[9]=i,e[10]=b):b=e[10];const S=b;let w;e[11]!==h.update||e[12]!==f||e[13]!==n?(w=f.handleSubmit(async v=>{const y=await h.update.mutateAsync({id:n,data:{title:v.title,description:v.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:v.body}}]}});f.reset({title:y.title,description:y.description??null,body:me(y)})}),e[11]=h.update,e[12]=f,e[13]=n,e[14]=w):w=e[14];const C=w;if(!i){let v;e[15]!==o?(v=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=v):v=e[16];let y;e[17]!==o?(y=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=y):y=e[18];let k;return e[19]!==v||e[20]!==y?(k=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Le,{title:v,description:y})}),e[19]=v,e[20]=y,e[21]=k):k=e[21],k}let I;e[22]!==m||e[23]!==f.formState.isDirty||e[24]!==p||e[25]!==i.description||e[26]!==i.title||e[27]!==S||e[28]!==C?(I=m?t.jsxs(t.Fragment,{children:[t.jsx(Be.Title,{actions:t.jsx(Re,{onSave:()=>{C()},onUndo:S,isDirty:f.formState.isDirty,isSaving:p}),children:i.title}),i.description&&t.jsx("p",{className:"px-4 py-3 text-sm text-muted-foreground",children:i.description})]}):t.jsxs(t.Fragment,{children:[t.jsx(ye.Topbar.Center.Portal,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null]})}),t.jsx(ye.Topbar.Right.Portal,{children:t.jsx(Re,{onSave:()=>{C()},onUndo:S,isDirty:f.formState.isDirty,isSaving:p})})]}),e[22]=m,e[23]=f.formState.isDirty,e[24]=p,e[25]=i.description,e[26]=i.title,e[27]=S,e[28]=C,e[29]=I):I=e[29];let T;e[30]!==f?(T=t.jsx("div",{className:"h-full",children:t.jsx(Mt,{form:f})}),e[30]=f,e[31]=T):T=e[31];let $;return e[32]!==I||e[33]!==T?($=t.jsxs(ge,{children:[I,T]}),e[32]=I,e[33]=T,e[34]=$):$=e[34],$}function zt(s){const e=B.c(10),{itemId:l}=s,n=W();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=Ft(),e[0]=m):m=e[0];const o=m;if(!o){let u;e[1]!==n?(u=n("details.prompt.notFoundTitle"),e[1]=n,e[2]=u):u=e[2];let d;e[3]!==n?(d=n("details.prompt.missingConnectionDescription"),e[3]=n,e[4]=d):d=e[4];let r;return e[5]!==u||e[6]!==d?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Le,{title:u,description:d})}),e[5]=u,e[6]=d,e[7]=r):r=e[7],r}let a;return e[8]!==l?(a=t.jsx(Oe,{children:t.jsx(D.Suspense,{fallback:null,children:t.jsx(Bt,{providerId:o,promptId:l})})}),e[8]=l,e[9]=a):a=e[9],a}const Lt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=B.c(12),{toolName:l,connectionId:n,siblings:m,onSelectInstance:o,onBack:a}=s,u=W();let d;e[0]!==n?(d={connectionId:n},e[0]=n,e[1]=d):d=e[1];const r=It(d);if(!r.isAuthenticated){let p;return e[2]!==r.supportsOAuth||e[3]!==a||e[4]!==u?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:r.supportsOAuth?t.jsx(rt,{onAuthenticate:()=>a(),buttonText:u("details.tool.goBackToAuthenticate")}):t.jsx(at,{hasReadme:!1})}),e[2]=r.supportsOAuth,e[3]=a,e[4]=u,e[5]=p):p=e[5],p}const i=`${n}:${l}`;let h;return e[6]!==n||e[7]!==o||e[8]!==m||e[9]!==i||e[10]!==l?(h=t.jsx(_t,{toolName:l,connectionId:n,siblings:m,onSelectInstance:o},i),e[6]=n,e[7]=o,e[8]=m,e[9]=i,e[10]=l,e[11]=h):h=e[11],h}function _t({toolName:s,connectionId:e,siblings:l,onSelectInstance:n}){const m=Fe(),o=W(),{replayId:a}=nt({strict:!1}),u=(()=>{if(!a)return null;const c=`replay-${a}`,g=sessionStorage.getItem(c);if(!g)return null;sessionStorage.removeItem(c);try{return JSON.parse(g)}catch{return null}})(),d=(()=>{if(!u)return null;const c={};for(const[g,P]of Object.entries(u))P!==null&&typeof P=="object"?c[g]=JSON.stringify(P,null,2):c[g]=P;return c})(),[r,i]=D.useState(d??{}),[h,p]=D.useState(u?JSON.stringify(u,null,2):"{}"),[x,j]=D.useState(null),[f,b]=D.useState(null),[S,w]=D.useState(null),[C,I]=D.useState(null),[T,$]=D.useState(!1),[v,y]=D.useState(null),{org:k}=xe(),A=Ve(e),q=Dt(),z=kt(),{openSidePanel:U}=At(),H=`${e}:${s}`,L=he({connectionId:e,orgId:k.id,orgSlug:k.slug}),R=$t({client:L}),N=R.data?.tools?.find(c=>c.name===s),E=gt(N?._meta),_=c=>{if(!q)return;const g=Pt(c.content);g.content.length>0&&(U(),q.sendMessage({tiptapDoc:g}))},[O,F]=D.useState("json"),[Q,J]=D.useState(!1);E&&!Q&&(F("ui"),J(!0));const je=N?.inputSchema?.properties,be=je?Object.keys(je):[],Y=be.length>0,X={};if(Y&&N?.inputSchema?.properties)for(const c of be)X[c]=N.inputSchema.required?.includes(c)?"":void 0;const ne=c=>Object.prototype.hasOwnProperty.call(r,c),He=async()=>{$(!0),I(null),j(null),b(null),w(null),y(null);const c=performance.now();try{if(!L)throw new Error("MCP client is not available");const g=Y?{...X,...r}:(()=>{const M=h.trim();if(!M)return{};const V=JSON.parse(M);if(V&&typeof V=="object")return V;throw new Error("Raw JSON input must be an object.")})();Y&&N?.inputSchema?.properties&&Object.entries(N.inputSchema.properties).forEach(([M,V])=>{if((V.type==="object"||V.type==="array")&&typeof g[M]=="string")try{g[M]=JSON.parse(g[M])}catch{}else if((V.type==="number"||V.type==="integer")&&typeof g[M]=="string"&&g[M]!==""){const Se=Number(g[M]);Number.isNaN(Se)||(g[M]=Se)}});const P=await L.callTool({name:s,arguments:g}),ee=P.structuredContent??P,Ge=performance.now(),Xe=Math.round(Ge-c);j(ee),b(P),w(g);const et=JSON.stringify(ee),ve=new TextEncoder().encode(et).length;y({duration:`${Xe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(g){const P=g instanceof Error?g.message:String(g);I(P||"Unknown error occurred");const ee=performance.now();y({duration:`${Math.round(ee-c)}ms`})}finally{$(!1)}},le=(c,g)=>{i(P=>({...P,[c]:g}))},Ke=()=>{j(null),b(null),w(null),I(null),y(null)},We=N?.name??Lt(s),Qe=t.jsx(Ue,{children:t.jsxs(_e,{children:[t.jsx(Z,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:k.slug},children:o("details.tool.connections")})})}),t.jsx(oe,{}),A&&t.jsxs(t.Fragment,{children:[t.jsx(Z,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:k.slug,appSlug:Ct(A)},search:{tab:"tools"},children:A.title})})}),t.jsx(oe,{})]}),t.jsx(Z,{children:t.jsx(Je,{children:We})})]})}),Ne=l.length>1&&t.jsxs(Ie,{value:e,onValueChange:n,children:[t.jsx(Te,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Pe,{children:l.map(c=>t.jsx(de,{value:c.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ee,{icon:c.icon,name:c.title,size:"xs",className:"shrink-0"}),c.title]})},c.id))})]}),Ze=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:o("details.tool.parameters")}),N?.inputSchema?.required&&N.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Y&&N?.inputSchema?.properties?Object.entries(N.inputSchema.properties).map(([c,g])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[c,N.inputSchema?.required?.includes(c)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:g.type})]}),g.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:g.description}),g.type==="object"||g.type==="array"?t.jsx(pe,{className:"font-mono text-xs",value:ne(c)?r[c]??"":X[c]??"",onChange:P=>le(c,P.target.value),placeholder:o("details.tool.enterAsJson",{key:c}),rows:3}):g.type==="boolean"?t.jsxs(Ie,{value:ne(c)?String(r[c]??""):"",onValueChange:P=>le(c,P==="true"),children:[t.jsx(Te,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Pe,{children:[t.jsx(de,{value:"true",children:"true"}),t.jsx(de,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ne(c)?r[c]??"":X[c]??"",onChange:P=>le(c,P.target.value),placeholder:o("details.tool.enter",{key:c})})]},c)):N?.inputSchema&&!Y?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(pe,{className:"font-mono text-xs min-h-[120px]",value:h,onChange:c=>p(c.target.value),placeholder:o("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:T?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Ke,children:[t.jsx(mt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:He,children:[t.jsx(wt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ye=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[v&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:v.duration})]}),v.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:v.tokens})]}),v.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:v.bytes})]}),v.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:v.cost})})]}),E&&t.jsx(vt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(De,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:O==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>F("ui"),children:t.jsx(ft,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(De,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:O==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>F("json"),children:t.jsx(we,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),C&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(jt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(St,{className:"h-4 w-4"}),t.jsx(bt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(Nt,{className:"text-xs text-destructive",children:C})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:E&&O==="ui"&&L?t.jsx(D.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(G,{className:"size-4"}),t.jsx("span",{className:"text-sm",children:o("details.tool.loadingApp")})]})}),children:t.jsx(ht,{resourceURI:E,toolInfo:N?{tool:N}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ce.view.minHeight,maxHeight:Ce.view.maxHeight,client:L,onMessage:_,onUpdateModelContext:c=>z?.setAppContext(H,c),onTeardown:()=>z?.clearAppContext(H),className:"h-full"})}):x?t.jsxs(t.Fragment,{children:[t.jsx(Et,{code:JSON.stringify(x,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(x,null,2)),lt.success(o("details.tool.copiedToClipboard"))},children:t.jsx(yt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(we,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(ge,{leading:Qe,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Ee,{icon:A?.icon||null,name:A?.title||s,size:"xl",className:"shrink-0"}),m?t.jsx(Be.Title,{children:s}):t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[R.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):R.isLoading?t.jsx(G,{className:"size-[10px] text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:R.isSuccess?"ready":R.isLoading?"connecting":"error"})]}),t.jsx(Tt,{annotations:N?.annotations,_meta:N?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:N?.description||"No description available"})]}),l.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:o("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Ze}),Ye]})})]})})}function Jt(s){const e=B.c(20),{itemId:l,siblings:n,onBack:m}=s,o=W(),[a,u]=D.useState(n[0]?.id??"");let d;e[0]!==a||e[1]!==n?(d=n.find(x=>x.id===a)?.id??n[0]?.id??"",e[0]=a,e[1]=n,e[2]=d):d=e[2];const r=d;if(!Ve(r||void 0)||!r){let x;e[3]!==o?(x=o("details.tool.connectionNotFound"),e[3]=o,e[4]=x):x=e[4];let j;e[5]!==x?(j=t.jsx("h3",{className:"text-lg font-semibold",children:x}),e[5]=x,e[6]=j):j=e[6];let f;e[7]!==o?(f=o("details.tool.connectionNotFoundMessage"),e[7]=o,e[8]=f):f=e[8];let b;e[9]!==f?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[9]=f,e[10]=b):b=e[10];let S;return e[11]!==j||e[12]!==b?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[j,b]})}),e[11]=j,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{className:"size-8 text-muted-foreground"})}),e[14]=h):h=e[14];let p;return e[15]!==r||e[16]!==m||e[17]!==n||e[18]!==l?(p=t.jsx(D.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:l,connectionId:r,siblings:n,onSelectInstance:u,onBack:m})}),e[15]=r,e[16]=m,e[17]=n,e[18]=l,e[19]=p):p=e[19],p}const Vt={prompt:zt};function qt(){const s=B.c(9),e=ze();let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=l):l=s[0];const n=fe(l),m=decodeURIComponent(n.itemId);let o;s[1]!==n.appSlug?(o={slug:n.appSlug},s[1]=n.appSlug,s[2]=o):o=s[2];const a=qe(o);let u;s[3]!==e.history?(u=()=>{e.history.back()},s[3]=e.history,s[4]=u):u=s[4];const d=u,r=Ht;let i;return s[5]!==d||s[6]!==m||s[7]!==a?(i=t.jsx(Jt,{itemId:m,siblings:a,onBack:d,onUpdate:r}),s[5]=d,s[6]=m,s[7]=a,s[8]=i):i=s[8],i}async function Ht(s){return Promise.resolve()}function Kt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Wt(){const s=B.c(52),e=ze();let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=l):l=s[0];const n=fe(l),m=W(),o=decodeURIComponent(n.collectionName),a=decodeURIComponent(n.itemId);let u;s[1]!==e.history?(u=()=>{e.history.back()},s[1]=e.history,s[2]=u):u=s[2];const d=u,{org:r}=xe();let i;s[3]!==n.appSlug?(i={slug:n.appSlug},s[3]=n.appSlug,s[4]=i):i=s[4];const p=qe(i)[0]??null,x=p?.id??"",j=x||"no-connection",f=x??null;let b;s[5]!==r.id||s[6]!==r.slug||s[7]!==f?(b={connectionId:f,orgId:r.id,orgSlug:r.slug},s[5]=r.id,s[6]=r.slug,s[7]=f,s[8]=b):b=s[8];const S=he(b),w=Me(j,o,S);let C;s[9]!==w||s[10]!==a?(C=async J=>{a&&await w.update.mutateAsync({id:a,data:J})},s[9]=w,s[10]=a,s[11]=C):C=s[11];const I=C;let T;s[12]!==o?(T=o?.toLowerCase(),s[12]=o,s[13]=T):T=s[13];const $=T,v=$&&Vt[$];let y;s[14]!==o?(y=Kt(o),s[14]=o,s[15]=y):y=s[15];const k=y;let A;s[16]!==r.slug?(A=t.jsx(Z,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:r.slug},children:"Connections"})})}),s[16]=r.slug,s[17]=A):A=s[17];let q;s[18]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx(oe,{}),s[18]=q):q=s[18];let z;s[19]!==o||s[20]!==p||s[21]!==r.slug||s[22]!==n.appSlug?(z=p&&t.jsxs(t.Fragment,{children:[t.jsx(Z,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:n.appSlug},search:{tab:o},children:p.title})})}),t.jsx(oe,{})]}),s[19]=o,s[20]=p,s[21]=r.slug,s[22]=n.appSlug,s[23]=z):z=s[23];let U;s[24]!==k?(U=t.jsx(Z,{children:t.jsx(Je,{children:k})}),s[24]=k,s[25]=U):U=s[25];let H;s[26]!==z||s[27]!==U||s[28]!==A?(H=t.jsx(Ue,{children:t.jsxs(_e,{children:[A,q,z,U]})}),s[26]=z,s[27]=U,s[28]=A,s[29]=H):H=s[29];const L=H;if(v){let J;return s[30]!==v||s[31]!==d||s[32]!==I||s[33]!==a?(J=t.jsx(v,{itemId:a,onBack:d,onUpdate:I}),s[30]=v,s[31]=d,s[32]=I,s[33]=a,s[34]=J):J=s[34],J}let R;s[35]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=R):R=s[35];let N;s[36]!==m?(N=m("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=m,s[37]=N):N=s[37];let E;s[38]!==m?(E=m("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=m,s[39]=E):E=s[39];let _;s[40]!==m?(_=m("orgs.collectionDetail.goBackButton"),s[40]=m,s[41]=_):_=s[41];let O;s[42]!==d||s[43]!==_?(O={onClick:d,children:_},s[42]=d,s[43]=_,s[44]=O):O=s[44];let F;s[45]!==N||s[46]!==E||s[47]!==O?(F=t.jsx(Rt,{icon:R,title:N,description:E,buttonProps:O}),s[45]=N,s[46]=E,s[47]=O,s[48]=F):F=s[48];let Q;return s[49]!==L||s[50]!==F?(Q=t.jsx(ge,{leading:L,children:F}),s[49]=L,s[50]=F,s[51]=Q):Q=s[51],Q}function Qt(){const s=B.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const l=fe(e);if(decodeURIComponent(l.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(qt,{}),s[1]=a):a=s[1],a}let o;return s[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Wt,{}),s[2]=o):o=s[2],o}function tn(){const s=B.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Oe,{children:t.jsx(D.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Qt,{})})}),s[0]=e):e=s[0],e}export{tn as default};
@@ -0,0 +1 @@
1
+ import{c as $,b as F,j as s,G as z,a9 as S,l as V,F as A,B as E,H as I,I as L}from"./index-BiU3YmQL.js";import{i as O,n as R}from"./ArrowUp-Bmd2w7Fx.js";import{a as _,i as G,c as H}from"./XClose-BhXJw65F.js";import{T as K,a as P,b as W,c as q}from"./tooltip-BGb6Kdym.js";import{V as J}from"./view-mode-toggle-HCiL8YHS.js";import{B as Q}from"./badge-BMuU0t5h.js";function re(t){const e=$.c(36),{viewMode:l,onViewModeChange:f,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=F();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(_,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(K,{asChild:!0,children:s.jsx(A,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(P,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(W,{children:s.jsxs(q,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==f||e[19]!==l?(x=f&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:f,fullWidth:!0,options:[{value:"table",icon:s.jsx(G,{})},{value:"cards",icon:s.jsx(H,{})}]})}),e[18]=f,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("collections.collectionDisplayButton.sortBy")}),N.map(B=>{const D=M===B.id;return s.jsx(z,{onClick:()=>g(B.id),className:V("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:B.label}),D&&h&&(h==="asc"?s.jsx(O,{size:16,className:"text-foreground shrink-0"}):s.jsx(R,{size:16,className:"text-foreground shrink-0"}))]})},B.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let u;e[29]!==x||e[30]!==m||e[31]!==p?(u=s.jsxs(I,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=u):u=e[32];let T;return e[33]!==d||e[34]!==u?(T=s.jsxs(L,{children:[d,u]}),e[33]=d,e[34]=u,e[35]=T):T=e[35],T}function U(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const l=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:V("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!l&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function X(t){return t.value!=="ALL"}export{re as C};
@@ -1 +1 @@
1
- import{c as v,l as b,j as a,h as w}from"./index-Dc7hzqoi.js";import{i as C}from"./SearchMd-C45D2PMI.js";function y(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,h=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const p=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==p?(s=b("flex items-center gap-2.5 h-12 px-4",p),e[2]=p,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{className:"size-4 text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==h||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:h,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=h,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{y as C};
1
+ import{c as v,l as b,j as a,h as w}from"./index-BiU3YmQL.js";import{i as C}from"./SearchMd-C0e2gT30.js";function y(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,h=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const p=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==p?(s=b("flex items-center gap-2.5 h-12 px-4",p),e[2]=p,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{className:"size-4 text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==h||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:h,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=h,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{y as C};
@@ -1 +1 @@
1
- import{c as k,j as r,l as C,b as S}from"./index-Dc7hzqoi.js";import{T as R,a as H,b as T,c as I,d as W,e as z}from"./table-6I6YKvFY.js";import{i as D,n as E}from"./ArrowUp-Cii1LHW7.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
1
+ import{c as k,j as r,l as C,b as S}from"./index-BiU3YmQL.js";import{T as R,a as H,b as T,c as I,d as W,e as z}from"./table-D1-dnD05.js";import{i as D,n as E}from"./ArrowUp-Bmd2w7Fx.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
@@ -0,0 +1 @@
1
+ import{c as b,Z as j,j as a,n as h,P as C,l as g}from"./index-BiU3YmQL.js";import{B as v}from"./badge-BMuU0t5h.js";function T(d){const e=b.c(13),{tabs:o,activeTab:t,onTabChange:r,className:f,placement:l}=d,c=l===void 0?"inline":l;let s;if(e[0]!==t||e[1]!==r||e[2]!==o){let x;e[4]!==t||e[5]!==r?(x=m=>{const p=t===m.id;return a.jsxs(h.Tab,{active:p,onClick:()=>r(m.id),children:[m.label,m.count!==void 0&&a.jsx(v,{variant:"secondary",className:g("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",p?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:m.count})]},m.id)},e[4]=t,e[5]=r,e[6]=x):x=e[6],s=o.map(x),e[0]=t,e[1]=r,e[2]=o,e[3]=s}else s=e[3];let i;e[7]!==f||e[8]!==s?(i=a.jsx(h.Tabs,{className:f,children:s}),e[7]=f,e[8]=s,e[9]=i):i=e[9];const n=i;let u;return e[10]!==n||e[11]!==c?(u=c==="page"?a.jsx(C.Toolbar.Left.Portal,{fallback:n,children:n}):n,e[10]=n,e[11]=c,e[12]=u):u=e[12],u}function y(d){const e=b.c(12),{tabs:o,activeTab:t,onTabChange:r,className:f}=d;let l;e[0]!==f?(l=g("flex items-center gap-2 overflow-x-auto no-scrollbar",f),e[0]=f,e[1]=l):l=e[1];let c;if(e[2]!==t||e[3]!==r||e[4]!==o){let i;e[6]!==t||e[7]!==r?(i=n=>{const u=t===n.id;return a.jsxs("button",{type:"button",onClick:()=>r(n.id),className:g("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",u&&"bg-accent border-border text-foreground",!u&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[n.label,n.count!==void 0&&a.jsx(v,{variant:"secondary",className:g("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",u?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:n.count})]},n.id)},e[6]=t,e[7]=r,e[8]=i):i=e[8],c=o.map(i),e[2]=t,e[3]=r,e[4]=o,e[5]=c}else c=e[5];let s;return e[9]!==l||e[10]!==c?(s=a.jsx("div",{className:l,children:c}),e[9]=l,e[10]=c,e[11]=s):s=e[11],s}function P(d){const e=b.c(3),o=j();let t;return e[0]!==o||e[1]!==d?(t=o?a.jsx(T,{...d}):a.jsx(y,{...d}),e[0]=o,e[1]=d,e[2]=t):t=e[2],t}export{P as C};
@@ -0,0 +1 @@
1
+ import{c as D,r as H,j as s,l as b,B as J,a9 as K}from"./index-BiU3YmQL.js";import{i as Q}from"./Tool01-DbFf2Je1.js";import{e as U,C as V,b as W,a as X,c as Y,d as Z}from"./command-bqq51nHs.js";import{a as _,P as ee,b as se}from"./popover-QnaOlHhb.js";function re(k){const e=D.c(41),{options:v,value:t,onChange:x,placeholder:B,triggerClassName:M,contentClassName:y,width:R,renderTrigger:$,renderItem:o,emptyMessage:F,searchPlaceholder:G,filter:N}=k,q=B===void 0?"Select...":B,z=R===void 0?"w-[200px]":R,w=F===void 0?"No results found.":F,P=G===void 0?"Search...":G;let j;e[0]!==t?(j=u=>u.value===t,e[0]=t,e[1]=j):j=e[1];const S=v.find(j),[E,l]=H.useState(!1),T=ee,I=_,A=!0,O=$?s.jsx("div",{className:b("cursor-pointer",M),children:$(S)}):s.jsxs(J,{variant:"outline",role:"combobox",className:b("justify-between",z,M),children:[S?S.label:q,s.jsx(Q,{className:"opacity-50"})]});let r;e[2]!==I||e[3]!==O?(r=s.jsx(I,{asChild:A,children:O}),e[2]=I,e[3]=O,e[4]=r):r=e[4];let c;e[5]!==y?(c=b("p-0",y),e[5]=y,e[6]=c):c=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C={width:"var(--radix-popover-trigger-width)"},e[7]=C):C=e[7];let n;e[8]!==P?(n=s.jsx(U,{placeholder:P,className:"h-9"}),e[8]=P,e[9]=n):n=e[9];let i;e[10]!==w?(i=s.jsx(V,{children:w}),e[10]=w,e[11]=i):i=e[11];let m;if(e[12]!==x||e[13]!==v||e[14]!==o||e[15]!==l||e[16]!==t){let u;e[18]!==x||e[19]!==o||e[20]!==l||e[21]!==t?(u=a=>{const L=t===a.value;return s.jsx(W,{value:a.label,onSelect:()=>{x(a.value===t?"":a.value),l(!1)},children:o?o(a,L):s.jsxs(s.Fragment,{children:[a.label,s.jsx(K,{className:b("ml-auto",L?"opacity-100":"opacity-0")})]})},a.value)},e[18]=x,e[19]=o,e[20]=l,e[21]=t,e[22]=u):u=e[22],m=v.map(u),e[12]=x,e[13]=v,e[14]=o,e[15]=l,e[16]=t,e[17]=m}else m=e[17];let d;e[23]!==m?(d=s.jsx(X,{children:m}),e[23]=m,e[24]=d):d=e[24];let h;e[25]!==i||e[26]!==d?(h=s.jsxs(Y,{children:[i,d]}),e[25]=i,e[26]=d,e[27]=h):h=e[27];let p;e[28]!==N||e[29]!==n||e[30]!==h?(p=s.jsxs(Z,{filter:N,children:[n,h]}),e[28]=N,e[29]=n,e[30]=h,e[31]=p):p=e[31];let f;e[32]!==p||e[33]!==c?(f=s.jsx(se,{className:c,style:C,children:p}),e[32]=p,e[33]=c,e[34]=f):f=e[34];let g;return e[35]!==T||e[36]!==E||e[37]!==l||e[38]!==f||e[39]!==r?(g=s.jsxs(T,{open:E,onOpenChange:l,children:[r,f]}),e[35]=T,e[36]=E,e[37]=l,e[38]=f,e[39]=r,e[40]=g):g=e[40],g}export{re as C};
@@ -0,0 +1 @@
1
+ import{c as f,l as u,j as n,aF as j}from"./index-BiU3YmQL.js";import{_ as g}from"./index-Bxbv_23l.js";import{D as b,d as w,h as y,c as C,b as z}from"./dialog-yUWKJPsU.js";import{i as D}from"./SearchMd-C0e2gT30.js";function $(a){const e=f.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g,{"data-slot":"command",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function L(a){const e=f.c(28);let t,s,l,o,r,i,c;e[0]!==a?({title:i,description:c,children:t,className:s,filter:l,shouldFilter:r,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o,e[5]=r,e[6]=i,e[7]=c):(t=e[1],s=e[2],l=e[3],o=e[4],r=e[5],i=e[6],c=e[7]);const m=i===void 0?"Command Palette":i,p=c===void 0?"Search for a command to run...":c;let d;e[8]!==m?(d=n.jsx(w,{children:m}),e[8]=m,e[9]=d):d=e[9];let x;e[10]!==p?(x=n.jsx(y,{children:p}),e[10]=p,e[11]=x):x=e[11];let h;e[12]!==d||e[13]!==x?(h=n.jsxs(C,{className:"sr-only",children:[d,x]}),e[12]=d,e[13]=x,e[14]=h):h=e[14];let _;e[15]!==s?(_=u("overflow-hidden p-0",s),e[15]=s,e[16]=_):_=e[16];let v;e[17]!==t||e[18]!==l||e[19]!==r?(v=n.jsx($,{filter:l,shouldFilter:r,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg:not([class*='size-'])]:h-5 [&_[cmdk-item]_svg:not([class*='size-'])]:w-5",children:t}),e[17]=t,e[18]=l,e[19]=r,e[20]=v):v=e[20];let k;e[21]!==_||e[22]!==v?(k=n.jsx(z,{className:_,closeButtonClassName:"hidden",children:v}),e[21]=_,e[22]=v,e[23]=k):k=e[23];let N;return e[24]!==o||e[25]!==h||e[26]!==k?(N=n.jsxs(b,{...o,children:[h,k]}),e[24]=o,e[25]=h,e[26]=k,e[27]=N):N=e[27],N}function R(a){const e=f.c(16);let t,s,l;e[0]!==a?({className:t,size:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);const r=(l===void 0?"default":l)==="sm"?"h-9":"h-10";let i;e[4]!==r?(i=u("flex items-center gap-2 border-b px-3",r),e[4]=r,e[5]=i):i=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[6]=c):c=e[6];let m;e[7]!==t||e[8]!==r?(m=u("placeholder:text-muted-foreground flex w-full rounded-md bg-transparent classic:py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",r,t),e[7]=t,e[8]=r,e[9]=m):m=e[9];let p;e[10]!==s||e[11]!==m?(p=n.jsx(g.Input,{"data-slot":"command-input",className:m,...s}),e[10]=s,e[11]=m,e[12]=p):p=e[12];let d;return e[13]!==i||e[14]!==p?(d=n.jsxs("div",{"data-slot":"command-input-wrapper",className:i,children:[c,p]}),e[13]=i,e[14]=p,e[15]=d):d=e[15],d}function V(a){const e=f.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.List,{"data-slot":"command-list",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function B(a){const e=f.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(g.Empty,{"data-slot":"command-empty",className:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function H(a){const e=f.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Group,{"data-slot":"command-group",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function P(a){const e=f.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("bg-border -mx-1 h-px",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Separator,{"data-slot":"command-separator",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}const I=j("[&_svg:not([class*='text-'])]:text-muted-foreground relative flex compact:min-h-8 cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{highlight:{selected:"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",hover:"w-full hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{highlight:"selected"}});function T(a){const e=f.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u(I(),t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Item,{"data-slot":"command-item",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}export{B as C,H as a,T as b,V as c,$ as d,R as e,L as f,I as g,P as h};
@@ -1 +1 @@
1
- import{c as _,r as U,l as Q,j as s,Q as Y,E as Z,b as z,a as ee,x as te,B as ne}from"./index-Dc7hzqoi.js";import{n as se}from"./site-url-en5df9c-.js";import{u as oe}from"./use-mcp-client-e_hCatGm.js";import{u as re,a as le,C as ie,b as ae}from"./use-connect-companion-CClQCUMS.js";function ce(t){const e=_.c(14),{children:n,className:o,wrapperClassName:r}=t,[d,c]=U.useState(!0);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=u=>{if(!u)return;const y=()=>{const j=u.scrollHeight-u.scrollTop-u.clientHeight<8;c(j)};y(),u.addEventListener("scroll",y,{passive:!0});const b=new ResizeObserver(y);b.observe(u);for(const j of Array.from(u.children))b.observe(j);return()=>{u.removeEventListener("scroll",y),b.disconnect()}},e[0]=f):f=e[0];const p=f;let l;e[1]!==r?(l=Q("relative",r),e[1]=r,e[2]=l):l=e[2];let i;e[3]!==n||e[4]!==o?(i=s.jsx("div",{ref:p,className:o,children:n}),e[3]=n,e[4]=o,e[5]=i):i=e[5];const a=d?"opacity-0":"opacity-100";let x;e[6]!==a?(x=Q("pointer-events-none absolute inset-x-0 -bottom-px h-[72px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",a),e[6]=a,e[7]=x):x=e[7];let m;e[8]!==x?(m=s.jsx("div",{"aria-hidden":!0,className:x}),e[8]=x,e[9]=m):m=e[9];let g;return e[10]!==l||e[11]!==i||e[12]!==m?(g=s.jsxs("div",{className:l,children:[i,m]}),e[10]=l,e[11]=i,e[12]=m,e[13]=g):g=e[13],g}const H="flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none md:gap-6";function q(){const t=_.c(4),e=z();let n;t[0]!==e?(n=e("routes.reportsOnboarding.companionSection.title"),t[0]=e,t[1]=n):n=t[1];let o;return t[2]!==n?(o=s.jsx("h1",{className:"text-lg font-medium leading-6 text-foreground lg:text-xl lg:leading-7",children:n}),t[2]=n,t[3]=o):o=t[3],o}function de(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2,3].map(me)}),t[0]=e):e=t[0],e}function me(t){return s.jsx(ae,{},t)}function fe(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:H,children:[s.jsx(q,{}),s.jsx(de,{})]}),t[0]=e):e=t[0],e}function ue(t){const e=_.c(18),{onRetry:n}=t,o=z();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(q,{}),e[0]=r):r=e[0];let d;e[1]!==o?(d=o("routes.reportsOnboarding.companionSection.loadError"),e[1]=o,e[2]=d):d=e[2];let c;e[3]!==d?(c=s.jsx("p",{className:"text-sm text-foreground",children:d}),e[3]=d,e[4]=c):c=e[4];let f;e[5]!==o?(f=o("routes.reportsOnboarding.companionSection.loadErrorDescription"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:f}),e[7]=f,e[8]=p):p=e[8];let l;e[9]!==o?(l=o("routes.reportsOnboarding.companionSection.retry"),e[9]=o,e[10]=l):l=e[10];let i;e[11]!==n||e[12]!==l?(i=s.jsx(ne,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:n,children:l}),e[11]=n,e[12]=l,e[13]=i):i=e[13];let a;return e[14]!==c||e[15]!==p||e[16]!==i?(a=s.jsxs("div",{className:H,children:[r,s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[c,p,i]})]}),e[14]=c,e[15]=p,e[16]=i,e[17]=a):a=e[17],a}function ve(t){const e=_.c(2);let n;return e[0]!==t?(n=s.jsx(Y,{children:o=>{const{reset:r}=o;return s.jsx(Z,{fallback:d=>{const{resetError:c}=d;return s.jsx(ue,{onRetry:()=>{r(),c()}})},children:s.jsx(U.Suspense,{fallback:s.jsx(fe,{}),children:s.jsx(pe,{...t})})})}}),e[0]=t,e[1]=n):n=e[1],n}function pe(t){const e=_.c(60),{org:n,cdConnectionId:o,siteUrl:r,onReadinessChange:d}=t,c=z(),{data:f}=ee.useSession(),p=f?.user?.id??"";let l;if(e[0]!==r){const $=r?se(r):null;if($?.ok)try{l=new URL($.value).hostname}catch{l=void 0}e[0]=r,e[1]=l}else l=e[1];let i;e[2]!==n.id||e[3]!==n.slug?(i={connectionId:te,orgId:n.id,orgSlug:n.slug},e[2]=n.id,e[3]=n.slug,e[4]=i):i=e[4];const a=oe(i);let x;e[5]!==o||e[6]!==n||e[7]!==a||e[8]!==r?(x={selfClient:a,org:n,cdConnectionId:o,siteUrl:r},e[5]=o,e[6]=n,e[7]=a,e[8]=r,e[9]=x):x=e[9];const{cards:m,saStatusUnavailable:g}=re(x);let u;e[10]!==o||e[11]!==n||e[12]!==a||e[13]!==l||e[14]!==r||e[15]!==p?(u={selfClient:a,org:n,userId:p,cdConnectionId:o,domain:l,siteUrl:r},e[10]=o,e[11]=n,e[12]=a,e[13]=l,e[14]=r,e[15]=p,e[16]=u):u=e[16];const{connect:y,connectingFieldKey:b,disconnect:j,disconnectingFieldKey:L,error:N}=le(u),[F,D]=U.useState(null),P=he;let E,R,C,k,K,O,I,w,S,v;if(e[17]!==F||e[18]!==m||e[19]!==y||e[20]!==N||e[21]!==b||e[22]!==j||e[23]!==L||e[24]!==d||e[25]!==n||e[26]!==g||e[27]!==a||e[28]!==r||e[29]!==c){k=Symbol.for("react.early_return_sentinel");e:{const $=m.filter(ge),G=m.filter(xe),J=g||($.length>0?$.every(P):m.length===0||m.some(P));if(d?.(J),m.length===0){k=null;break e}const V=b!==null||L!==null,W=h=>{const X=async()=>{await y(h)&&D(h.fieldKey)};return s.jsx(ie,{card:h,connecting:b===h.fieldKey,disconnecting:L===h.fieldKey,disabled:V&&b!==h.fieldKey&&L!==h.fieldKey,org:n,selfClient:a,siteUrl:r,autoOpenConfigFieldKey:F,onAutoOpenConfigHandled:()=>D(T=>T===h.fieldKey?null:T),onConnect:()=>{X()},onDisconnect:()=>{j(h)}},h.fieldKey)};R=H,e[40]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(q,{}),e[40]=C):C=e[40],E=ce,I="flex min-h-0 flex-1 flex-col md:block",w="-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[min(60vh,calc(100dvh-330px))] md:flex-none",e[41]!==N?(S=N&&s.jsx("p",{role:"alert",className:"mb-3 text-sm text-destructive",children:N}),e[41]=N,e[42]=S):S=e[42],e[43]!==g||e[44]!==c?(v=g&&s.jsx("p",{role:"status",className:"mb-3 rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-foreground",children:c("routes.reportsOnboarding.companionSection.statusUnavailable")}),e[43]=g,e[44]=c,e[45]=v):v=e[45],K="flex flex-col gap-4 pt-3",O=[...$,...G].map(W)}e[17]=F,e[18]=m,e[19]=y,e[20]=N,e[21]=b,e[22]=j,e[23]=L,e[24]=d,e[25]=n,e[26]=g,e[27]=a,e[28]=r,e[29]=c,e[30]=E,e[31]=R,e[32]=C,e[33]=k,e[34]=K,e[35]=O,e[36]=I,e[37]=w,e[38]=S,e[39]=v}else E=e[30],R=e[31],C=e[32],k=e[33],K=e[34],O=e[35],I=e[36],w=e[37],S=e[38],v=e[39];if(k!==Symbol.for("react.early_return_sentinel"))return k;let A;e[46]!==K||e[47]!==O?(A=s.jsx("div",{className:K,children:O}),e[46]=K,e[47]=O,e[48]=A):A=e[48];let B;e[49]!==E||e[50]!==A||e[51]!==I||e[52]!==w||e[53]!==S||e[54]!==v?(B=s.jsxs(E,{wrapperClassName:I,className:w,children:[S,v,A]}),e[49]=E,e[50]=A,e[51]=I,e[52]=w,e[53]=S,e[54]=v,e[55]=B):B=e[55];let M;return e[56]!==R||e[57]!==C||e[58]!==B?(M=s.jsxs("div",{className:R,children:[C,B]}),e[56]=R,e[57]=C,e[58]=B,e[59]=M):M=e[59],M}function xe(t){return!t.required}function ge(t){return t.required}function he(t){return t.satisfied&&t.configured}export{fe as C,ce as S,ve as a};
1
+ import{c as _,r as T,l as Q,j as s,Q as Y,E as Z,b as U,a as ee,z as te,B as ne}from"./index-BiU3YmQL.js";import{n as se}from"./site-url-en5df9c-.js";import{u as oe}from"./use-mcp-client-Br7XFHza.js";import{u as re,a as le,C as ie,b as ae}from"./use-connect-companion-B3ql1eAJ.js";function ce(t){const e=_.c(14),{children:n,className:o,wrapperClassName:r}=t,[d,c]=T.useState(!0);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=u=>{if(!u)return;const y=()=>{const j=u.scrollHeight-u.scrollTop-u.clientHeight<8;c(j)};y(),u.addEventListener("scroll",y,{passive:!0});const b=new ResizeObserver(y);b.observe(u);for(const j of Array.from(u.children))b.observe(j);return()=>{u.removeEventListener("scroll",y),b.disconnect()}},e[0]=f):f=e[0];const p=f;let l;e[1]!==r?(l=Q("relative",r),e[1]=r,e[2]=l):l=e[2];let i;e[3]!==n||e[4]!==o?(i=s.jsx("div",{ref:p,className:o,children:n}),e[3]=n,e[4]=o,e[5]=i):i=e[5];const a=d?"opacity-0":"opacity-100";let x;e[6]!==a?(x=Q("pointer-events-none absolute inset-x-0 -bottom-px h-[72px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",a),e[6]=a,e[7]=x):x=e[7];let m;e[8]!==x?(m=s.jsx("div",{"aria-hidden":!0,className:x}),e[8]=x,e[9]=m):m=e[9];let g;return e[10]!==l||e[11]!==i||e[12]!==m?(g=s.jsxs("div",{className:l,children:[i,m]}),e[10]=l,e[11]=i,e[12]=m,e[13]=g):g=e[13],g}const H="flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none md:gap-6";function q(){const t=_.c(4),e=U();let n;t[0]!==e?(n=e("routes.reportsOnboarding.companionSection.title"),t[0]=e,t[1]=n):n=t[1];let o;return t[2]!==n?(o=s.jsx("h1",{className:"text-lg font-medium leading-6 text-foreground lg:text-xl lg:leading-7",children:n}),t[2]=n,t[3]=o):o=t[3],o}function de(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2,3].map(me)}),t[0]=e):e=t[0],e}function me(t){return s.jsx(ae,{},t)}function fe(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:H,children:[s.jsx(q,{}),s.jsx(de,{})]}),t[0]=e):e=t[0],e}function ue(t){const e=_.c(18),{onRetry:n}=t,o=U();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(q,{}),e[0]=r):r=e[0];let d;e[1]!==o?(d=o("routes.reportsOnboarding.companionSection.loadError"),e[1]=o,e[2]=d):d=e[2];let c;e[3]!==d?(c=s.jsx("p",{className:"text-sm text-foreground",children:d}),e[3]=d,e[4]=c):c=e[4];let f;e[5]!==o?(f=o("routes.reportsOnboarding.companionSection.loadErrorDescription"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:f}),e[7]=f,e[8]=p):p=e[8];let l;e[9]!==o?(l=o("routes.reportsOnboarding.companionSection.retry"),e[9]=o,e[10]=l):l=e[10];let i;e[11]!==n||e[12]!==l?(i=s.jsx(ne,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:n,children:l}),e[11]=n,e[12]=l,e[13]=i):i=e[13];let a;return e[14]!==c||e[15]!==p||e[16]!==i?(a=s.jsxs("div",{className:H,children:[r,s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[c,p,i]})]}),e[14]=c,e[15]=p,e[16]=i,e[17]=a):a=e[17],a}function ve(t){const e=_.c(2);let n;return e[0]!==t?(n=s.jsx(Y,{children:o=>{const{reset:r}=o;return s.jsx(Z,{fallback:d=>{const{resetError:c}=d;return s.jsx(ue,{onRetry:()=>{r(),c()}})},children:s.jsx(T.Suspense,{fallback:s.jsx(fe,{}),children:s.jsx(pe,{...t})})})}}),e[0]=t,e[1]=n):n=e[1],n}function pe(t){const e=_.c(60),{org:n,cdConnectionId:o,siteUrl:r,onReadinessChange:d}=t,c=U(),{data:f}=ee.useSession(),p=f?.user?.id??"";let l;if(e[0]!==r){const $=r?se(r):null;if($?.ok)try{l=new URL($.value).hostname}catch{l=void 0}e[0]=r,e[1]=l}else l=e[1];let i;e[2]!==n.id||e[3]!==n.slug?(i={connectionId:te,orgId:n.id,orgSlug:n.slug},e[2]=n.id,e[3]=n.slug,e[4]=i):i=e[4];const a=oe(i);let x;e[5]!==o||e[6]!==n||e[7]!==a||e[8]!==r?(x={selfClient:a,org:n,cdConnectionId:o,siteUrl:r},e[5]=o,e[6]=n,e[7]=a,e[8]=r,e[9]=x):x=e[9];const{cards:m,saStatusUnavailable:g}=re(x);let u;e[10]!==o||e[11]!==n||e[12]!==a||e[13]!==l||e[14]!==r||e[15]!==p?(u={selfClient:a,org:n,userId:p,cdConnectionId:o,domain:l,siteUrl:r},e[10]=o,e[11]=n,e[12]=a,e[13]=l,e[14]=r,e[15]=p,e[16]=u):u=e[16];const{connect:y,connectingFieldKey:b,disconnect:j,disconnectingFieldKey:L,error:N}=le(u),[z,D]=T.useState(null),P=he;let E,R,C,k,K,O,I,w,S,v;if(e[17]!==z||e[18]!==m||e[19]!==y||e[20]!==N||e[21]!==b||e[22]!==j||e[23]!==L||e[24]!==d||e[25]!==n||e[26]!==g||e[27]!==a||e[28]!==r||e[29]!==c){k=Symbol.for("react.early_return_sentinel");e:{const $=m.filter(ge),G=m.filter(xe),J=g||($.length>0?$.every(P):m.length===0||m.some(P));if(d?.(J),m.length===0){k=null;break e}const V=b!==null||L!==null,W=h=>{const X=async()=>{await y(h)&&D(h.fieldKey)};return s.jsx(ie,{card:h,connecting:b===h.fieldKey,disconnecting:L===h.fieldKey,disabled:V&&b!==h.fieldKey&&L!==h.fieldKey,org:n,selfClient:a,siteUrl:r,autoOpenConfigFieldKey:z,onAutoOpenConfigHandled:()=>D(F=>F===h.fieldKey?null:F),onConnect:()=>{X()},onDisconnect:()=>{j(h)}},h.fieldKey)};R=H,e[40]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(q,{}),e[40]=C):C=e[40],E=ce,I="flex min-h-0 flex-1 flex-col md:block",w="-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[min(60vh,calc(100dvh-330px))] md:flex-none",e[41]!==N?(S=N&&s.jsx("p",{role:"alert",className:"mb-3 text-sm text-destructive",children:N}),e[41]=N,e[42]=S):S=e[42],e[43]!==g||e[44]!==c?(v=g&&s.jsx("p",{role:"status",className:"mb-3 rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-foreground",children:c("routes.reportsOnboarding.companionSection.statusUnavailable")}),e[43]=g,e[44]=c,e[45]=v):v=e[45],K="flex flex-col gap-4 pt-3",O=[...$,...G].map(W)}e[17]=z,e[18]=m,e[19]=y,e[20]=N,e[21]=b,e[22]=j,e[23]=L,e[24]=d,e[25]=n,e[26]=g,e[27]=a,e[28]=r,e[29]=c,e[30]=E,e[31]=R,e[32]=C,e[33]=k,e[34]=K,e[35]=O,e[36]=I,e[37]=w,e[38]=S,e[39]=v}else E=e[30],R=e[31],C=e[32],k=e[33],K=e[34],O=e[35],I=e[36],w=e[37],S=e[38],v=e[39];if(k!==Symbol.for("react.early_return_sentinel"))return k;let A;e[46]!==K||e[47]!==O?(A=s.jsx("div",{className:K,children:O}),e[46]=K,e[47]=O,e[48]=A):A=e[48];let B;e[49]!==E||e[50]!==A||e[51]!==I||e[52]!==w||e[53]!==S||e[54]!==v?(B=s.jsxs(E,{wrapperClassName:I,className:w,children:[S,v,A]}),e[49]=E,e[50]=A,e[51]=I,e[52]=w,e[53]=S,e[54]=v,e[55]=B):B=e[55];let M;return e[56]!==R||e[57]!==C||e[58]!==B?(M=s.jsxs("div",{className:R,children:[C,B]}),e[56]=R,e[57]=C,e[58]=B,e[59]=M):M=e[59],M}function xe(t){return!t.required}function ge(t){return t.required}function he(t){return t.satisfied&&t.configured}export{fe as C,ce as S,ve as a};
@@ -0,0 +1,8 @@
1
+ import{c as _,b as B,r as D,l as ee,j as s,a9 as J,fr as te,a0 as se,af as ne,T as ie,B as F,t as X,eL as oe,dW as le,an as ae}from"./index-BiU3YmQL.js";import{a as re,A as ce}from"./alert-D9Xs8r1J.js";import{a as de,b as ue,c as V,d as fe,S as pe}from"./select-47N7H1PV.js";import{T as me,c as xe,a as ge,b as he}from"./tabs-uJDG1LT-.js";import{u as Y}from"./use-copy-BhRM5JUh.js";import{a as Q}from"./Copy01-BYK2zIkj.js";import{i as ye}from"./Key01-B8q0d-op.js";import{i as Ce}from"./Link01-C-mBEv93.js";import{C as je,a as be,b as ve}from"./client-icons-BPRdY54C.js";import{u as we,a as Ne,A as $e}from"./api-keys-BaELtPjJ.js";import{R as ke}from"./require-capability-CimSbmsz.js";import"./index-DAWDSRE3.js";import"./ChevronUp-Djmy8s04.js";import"./AlertCircle-3PzOAmGf.js";import"./Plus-CoGTSnEd.js";import"./Trash01-D8ICnU7E.js";import"./alert-dialog-CMdGVc5y.js";import"./dialog-yUWKJPsU.js";import"./X-BmPcW1eb.js";import"./input-4CSpUSQl.js";import"./label-BNElcQf4.js";import"./use-mcp-client-Br7XFHza.js";import"./auth-DvTDuEnH.js";import"./access-gate-C720AIcS.js";import"./capability-load-error-HRK6520w.js";function Se(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function Ke(t){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${t}/mcp/self`}function _e({client:t,mode:e,url:r,apiKey:c}){const i=c??"<paste-your-api-key>",a=Se();if(t==="claude-code")return e==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r} \\
2
+ --header "Authorization: Bearer ${i}"`};if(t==="cursor"){const n={url:r};return e==="api-key"&&(n.headers={Authorization:`Bearer ${i}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[a]:n}},null,2)}}if(t==="codex"){const n=[`[mcp_servers.${a}]`,`url = "${r}"`];return e==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${i}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
3
+ `)}}return e==="oauth"?{language:"text",code:`${r}
4
+
5
+ # OAuth: clients that support MCP OAuth 2.1 will discover
6
+ # the auth flow via the WWW-Authenticate header on 401.`}:{language:"text",code:`${r}
7
+
8
+ Authorization: Bearer ${i}`}}function ze(t){const e=_.c(32),{client:r,mode:c,url:i,apiKey:a}=t,n=B();let d;e[0]!==a||e[1]!==r||e[2]!==c||e[3]!==i?(d=_e({client:r,mode:c,url:i,apiKey:a}),e[0]=a,e[1]=r,e[2]=c,e[3]=i,e[4]=d):d=e[4];const o=d,{handleCopy:u,copied:l}=Y(),f=D.useId(),p=D.useId();let m;e[5]!==u||e[6]!==o.code?(m=()=>u(o.code),e[5]=u,e[6]=o.code,e[7]=m):m=e[7];const C=`${f} ${p}`;let x;e[8]!==n?(x=n("settings.connectClients.copy"),e[8]=n,e[9]=x):x=e[9];let h;e[10]!==f||e[11]!==x?(h=s.jsx("span",{id:f,className:"sr-only",children:x}),e[10]=f,e[11]=x,e[12]=h):h=e[12];const y=o.pathHint??o.language;let j;e[13]!==y?(j=s.jsx("span",{className:"min-w-0 truncate font-mono text-[11px] leading-none text-muted-foreground",children:y}),e[13]=y,e[14]=j):j=e[14];const S=l?"text-success":"group-hover:border-foreground/30 group-hover:text-foreground";let K;e[15]!==S?(K=ee("flex size-6 shrink-0 items-center justify-center self-start rounded-md border border-border text-muted-foreground transition-colors",S),e[15]=S,e[16]=K):K=e[16];let v;e[17]!==l?(v=l?s.jsx(J,{size:13}):s.jsx(Q,{size:13}),e[17]=l,e[18]=v):v=e[18];let N;e[19]!==v||e[20]!==K?(N=s.jsx("span",{"aria-hidden":"true",className:K,children:v}),e[19]=v,e[20]=K,e[21]=N):N=e[21];let b;e[22]!==p||e[23]!==o.code?(b=s.jsx("pre",{className:"overflow-x-auto pt-2 font-mono text-xs leading-relaxed",children:s.jsx("code",{id:p,children:o.code})}),e[22]=p,e[23]=o.code,e[24]=b):b=e[24];let w;return e[25]!==N||e[26]!==b||e[27]!==m||e[28]!==C||e[29]!==h||e[30]!==j?(w=s.jsxs("button",{type:"button",onClick:m,"aria-labelledby":C,className:"group relative grid w-full cursor-pointer grid-cols-[minmax(0,1fr)_auto] items-start gap-x-3 classic:rounded-md compact:rounded-lg p-3 text-left transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[h,j,N,b]}),e[25]=N,e[26]=b,e[27]=m,e[28]=C,e[29]=h,e[30]=j,e[31]=w):w=e[31],w}const q="Connect: ",U=[{id:"claude-code",label:"Claude",Icon:je},{id:"cursor",label:"Cursor",Icon:be},{id:"codex",label:"Codex",Icon:ve},{id:"raw",label:"Other client",labelKey:"settings.connectClients.otherClient",Icon:Ce}];function Z(t){return U.find(e=>e.id===t)?.label??t}function Ae(){return typeof window>"u"?"unknown":window.location.hostname}function Ie(t){const e=_.c(11),{text:r}=t,c=B(),{handleCopy:i,copied:a}=Y();let n;e[0]!==i||e[1]!==r?(n=()=>i(r),e[0]=i,e[1]=r,e[2]=n):n=e[2];let d;e[3]!==c?(d=c("settings.connectClients.copy"),e[3]=c,e[4]=d):d=e[4];let o;e[5]!==a?(o=a?s.jsx(J,{size:14}):s.jsx(Q,{size:14}),e[5]=a,e[6]=o):o=e[6];let u;return e[7]!==n||e[8]!==d||e[9]!==o?(u=s.jsx(F,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:n,"aria-label":d,children:o}),e[7]=n,e[8]=d,e[9]=o,e[10]=u):u=e[10],u}function Oe(t){const e=_.c(17),{url:r}=t,c=B(),i=`${r}/.well-known/oauth-protected-resource`;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ae,{size:12,className:"shrink-0 transition-transform group-open:rotate-90"}),e[0]=a):a=e[0];let n;e[1]!==c?(n=c("settings.connectClients.oauthDiscoveryDetails"),e[1]=c,e[2]=n):n=e[2];let d;e[3]!==n?(d=s.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[a,n]}),e[3]=n,e[4]=d):d=e[4];let o;e[5]!==c?(o=c("settings.connectClients.oauthMetadataHint"),e[5]=c,e[6]=o):o=e[6];let u;e[7]!==o?(u=s.jsx("p",{children:o}),e[7]=o,e[8]=u):u=e[8];let l;e[9]!==i?(l=s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5",children:[s.jsx("code",{className:"flex-1 truncate font-mono text-[11px]",children:i}),s.jsx(Ie,{text:i})]}),e[9]=i,e[10]=l):l=e[10];let f;e[11]!==u||e[12]!==l?(f=s.jsxs("div",{className:"mt-2 space-y-1 pl-[18px]",children:[u,l]}),e[11]=u,e[12]=l,e[13]=f):f=e[13];let p;return e[14]!==d||e[15]!==f?(p=s.jsxs("details",{className:"group text-xs text-muted-foreground",children:[d,f]}),e[14]=d,e[15]=f,e[16]=p):p=e[16],p}function Te(t){const e=_.c(23),{mode:r,onModeChange:c}=t,i=B();let a;e[0]!==c?(a=x=>{(x==="oauth"||x==="api-key")&&c(x)},e[0]=c,e[1]=a):a=e[1];let n;e[2]!==i?(n=i("settings.connectClients.installMethod"),e[2]=i,e[3]=n):n=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(de,{}),e[4]=d):d=e[4];let o;e[5]!==n?(o=s.jsx(ue,{size:"sm",className:"text-xs","aria-label":n,children:d}),e[5]=n,e[6]=o):o=e[6];let u;e[7]!==i?(u=i("settings.connectClients.oauthOption"),e[7]=i,e[8]=u):u=e[8];let l;e[9]!==u?(l=s.jsx(V,{value:"oauth",className:"text-xs",children:u}),e[9]=u,e[10]=l):l=e[10];let f;e[11]!==i?(f=i("settings.connectClients.apiKeyOption"),e[11]=i,e[12]=f):f=e[12];let p;e[13]!==f?(p=s.jsx(V,{value:"api-key",className:"text-xs",children:f}),e[13]=f,e[14]=p):p=e[14];let m;e[15]!==l||e[16]!==p?(m=s.jsxs(fe,{children:[l,p]}),e[15]=l,e[16]=p,e[17]=m):m=e[17];let C;return e[18]!==r||e[19]!==a||e[20]!==o||e[21]!==m?(C=s.jsxs(pe,{value:r,onValueChange:a,children:[o,m]}),e[18]=r,e[19]=a,e[20]=o,e[21]=m,e[22]=C):C=e[22],C}function Me(t){const e=_.c(26),{client:r,url:c,mode:i,newKey:a,canManageKeys:n,onGenerate:d,isGenerating:o,onClearNewKey:u}=t,l=B(),f=i==="api-key"&&a!==null,p=r==="raw";let m;e[0]!==f||e[1]!==l?(m=f&&s.jsxs(re,{variant:"warning",className:"text-xs",children:[s.jsx(ie,{}),s.jsx(ce,{children:l("settings.connectClients.snippetOneTimeWarning")})]}),e[0]=f,e[1]=l,e[2]=m):m=e[2];const C=f&&a?a:void 0;let x;e[3]!==r||e[4]!==i||e[5]!==C||e[6]!==c?(x=s.jsx(ze,{client:r,mode:i,url:c,apiKey:C}),e[3]=r,e[4]=i,e[5]=C,e[6]=c,e[7]=x):x=e[7];let h;e[8]!==p||e[9]!==c?(h=p&&s.jsx(Oe,{url:c}),e[8]=p,e[9]=c,e[10]=h):h=e[10];let y;e[11]!==n||e[12]!==r||e[13]!==o||e[14]!==p||e[15]!==i||e[16]!==u||e[17]!==d||e[18]!==f||e[19]!==l?(y=i==="api-key"&&n&&s.jsx("div",{children:f?s.jsx(F,{variant:"ghost",size:"sm",onClick:u,className:"text-xs",children:l("settings.connectClients.doneHideKey")}):s.jsxs(F,{size:"sm",onClick:d,disabled:o,className:"gap-1.5",children:[s.jsx(ye,{size:14}),o?l("settings.connectClients.generatingKey"):p?l("settings.connectClients.generateKey"):l("settings.connectClients.generateKeyFor",{client:Z(r)})]})}),e[11]=n,e[12]=r,e[13]=o,e[14]=p,e[15]=i,e[16]=u,e[17]=d,e[18]=f,e[19]=l,e[20]=y):y=e[20];let j;return e[21]!==m||e[22]!==x||e[23]!==h||e[24]!==y?(j=s.jsxs("div",{className:"flex flex-col gap-3",children:[m,x,h,y]}),e[21]=m,e[22]=x,e[23]=h,e[24]=y,e[25]=j):j=e[25],j}function Ee(){const t=_.c(51),e=B(),{org:r}=se();let c;t[0]!==r.slug?(c=Ke(r.slug),t[0]=r.slug,t[1]=c):c=t[1];const i=c,a=we(),{granted:n}=ne("api-keys:manage");let d;t[2]!==n?(d={enabled:n},t[2]=n,t[3]=d):d=t[3];const{data:o,dataUpdatedAt:u}=Ne(d),[l,f]=D.useState("oauth");let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p={},t[4]=p):p=t[4];const[m,C]=D.useState(p);let x;t[5]!==u||t[6]!==m||t[7]!==o?(x=$=>{const g=m[$];return g&&(!o||u<g.at||o.some(k=>k.id===g.id))?g.key:null},t[5]=u,t[6]=m,t[7]=o,t[8]=x):x=t[8];const h=x,[y,j]=D.useState("claude-code");let S;t[9]===Symbol.for("react.memo_cache_sentinel")?(S=$=>{const g=U.find(k=>k.id===$);g&&j(g.id)},t[9]=S):S=t[9];const K=S;let v;t[10]!==a||t[11]!==e?(v=$=>{const g=`${q}${Z($)} on ${Ae()}`;a.mutate({name:g,permissions:{"*":["*"]}},{onSuccess:k=>{C(P=>({...P,[$]:{id:k.id,key:k.key,at:Date.now()}})),X.success(e("settings.connectClients.keyCreated"))},onError:He})},t[10]=a,t[11]=e,t[12]=v):v=t[12];const N=v;let b;t[13]!==e?(b=e("settings.connectClients.connectAClient"),t[13]=e,t[14]=b):b=t[14];let w;t[15]!==e?(w=U.map($=>{const{id:g,label:k,labelKey:P,Icon:W}=$;return s.jsxs(me,{value:g,variant:"underline",className:"gap-2",children:[s.jsx(W,{size:16}),P?e(P):k]},g)}),t[15]=e,t[16]=w):w=t[16];let z;t[17]!==w?(z=s.jsx(ge,{variant:"underline",className:"h-10 min-w-0 flex-1 gap-1 overflow-x-auto border-b-0",children:w}),t[17]=w,t[18]=z):z=t[18];let A;t[19]!==l?(A=s.jsx(Te,{mode:l,onModeChange:f}),t[19]=l,t[20]=A):A=t[20];let I;t[21]!==z||t[22]!==A?(I=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-1",children:[z,A]}),t[21]=z,t[22]=A,t[23]=I):I=t[23];let O;t[24]!==n||t[25]!==a||t[26]!==N||t[27]!==h||t[28]!==l||t[29]!==i?(O=U.map($=>{const{id:g,label:k}=$;return s.jsx(xe,{value:g,className:"p-2",children:s.jsx(Me,{client:g,url:i,mode:l,newKey:h(g),canManageKeys:n,onGenerate:()=>N(g),isGenerating:a.isPending&&a.variables?.name?.startsWith(`${q}${k}`)===!0,onClearNewKey:()=>C(P=>{const W={...P};return delete W[g],W})})},g)}),t[24]=n,t[25]=a,t[26]=N,t[27]=h,t[28]=l,t[29]=i,t[30]=O):O=t[30];let T;t[31]!==y||t[32]!==I||t[33]!==O?(T=s.jsx(oe,{className:"gap-0 overflow-hidden p-0",children:s.jsxs(he,{value:y,onValueChange:K,variant:"underline",className:"gap-0",children:[I,O]})}),t[31]=y,t[32]=I,t[33]=O,t[34]=T):T=t[34];let M;t[35]!==l||t[36]!==e?(M=e(l==="oauth"?"settings.connectClients.oauthKeyHint":"settings.connectClients.headlessKeyHint"),t[35]=l,t[36]=e,t[37]=M):M=t[37];let E;t[38]!==M?(E=s.jsx("p",{className:"text-xs leading-snug text-muted-foreground",children:M}),t[38]=M,t[39]=E):E=t[39];let H;t[40]!==y||t[41]!==e?(H=y==="raw"&&s.jsx("p",{className:"text-xs leading-snug text-muted-foreground",children:e("settings.connectClients.anyOtherClientDescription")}),t[40]=y,t[41]=e,t[42]=H):H=t[42];let L;t[43]!==T||t[44]!==E||t[45]!==H||t[46]!==b?(L=s.jsxs(le,{headerClassName:"px-0",title:b,children:[T,E,H]}),t[43]=T,t[44]=E,t[45]=H,t[46]=b,t[47]=L):L=t[47];let G;t[48]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(ke,{capability:"api-keys:manage",area:"api-keys",children:s.jsx($e,{})}),t[48]=G):G=t[48];let R;return t[49]!==L?(R=s.jsxs(s.Fragment,{children:[L,G]}),t[49]=L,t[50]=R):R=t[50],R}function He(t){return X.error(t.message)}function Le(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{group:"connect",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function dt(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Le,{}),t[0]=e):e=t[0],e}export{dt as default};
@@ -0,0 +1 @@
1
+ import{c as v,b as N,j as s,R as w,an as k,B as y}from"./index-BiU3YmQL.js";import{i as z}from"./X-BmPcW1eb.js";import{aq as _,ah as C}from"./agent-icon-DbgbaBWC.js";const S="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function $(){const t=v.c(13),e=N();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let n;t[1]!==e?(n=e("routes.reportsOnboarding.connectModal.quote"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",n,"”"]}),t[3]=n,t[4]=o):o=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("img",{src:S,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=a):a=t[5];let r;t[6]!==e?(r=e("routes.reportsOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=r):r=t[7];let i;t[8]!==r?(i=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[a,s.jsx("span",{className:"text-base font-medium",children:r})]}),t[8]=r,t[9]=i):i=t[9];let c;return t[10]!==o||t[11]!==i?(c=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,o,i]}),t[10]=o,t[11]=i,t[12]=c):c=t[12],c}function q(){const t=v.c(19),e=N();let l;t[0]!==e?(l=e("routes.reportsOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n={Icon:_,label:l},t[2]=l,t[3]=n):n=t[3];let o;t[4]!==e?(o=e("routes.reportsOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=o):o=t[5];let a;t[6]!==o?(a={Icon:w,label:o},t[6]=o,t[7]=a):a=t[7];let r;t[8]!==e?(r=e("routes.reportsOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=r):r=t[9];let i;t[10]!==r?(i={Icon:C,label:r},t[10]=r,t[11]=i):i=t[11];let c;t[12]!==n||t[13]!==a||t[14]!==i?(c=[n,a,i],t[12]=n,t[13]=a,t[14]=i,t[15]=c):c=t[15];const m=c;let f;t[16]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=f):f=t[16];let d;return t[17]!==m?(d=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[f,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:m.map(M)})]}),t[17]=m,t[18]=d):d=t[18],d}function M(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function A(t){const e=v.c(22),{siteHost:l,footer:n,onClose:o,children:a}=t,r=N(),i=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let c;e[0]!==o||e[1]!==r?(c=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":r("routes.reportsOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(z,{size:18})}),e[0]=o,e[1]=r,e[2]=c):c=e[2];let m,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),f=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=m,e[4]=f):(m=e[3],f=e[4]);let d;e[5]!==i||e[6]!==l?(d=l&&s.jsxs(s.Fragment,{children:[s.jsx(k,{size:16,className:"shrink-0 text-foreground/25"}),i&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:i,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let x;e[8]!==d?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[m,f,d]}),e[8]=d,e[9]=x):x=e[9];let g;e[10]!==n?(g=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:n}),e[10]=n,e[11]=g):g=e[11];let h;e[12]!==a||e[13]!==x||e[14]!==g?(h=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[x,a,g]}),e[12]=a,e[13]=x,e[14]=g,e[15]=h):h=e[15];let u,b;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),b=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=u,e[17]=b):(u=e[16],b=e[17]);let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[u,b,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx($,{}),s.jsx("div",{className:"flex-1"}),s.jsx(q,{})]})]}),e[18]=p):p=e[18];let j;return e[19]!==c||e[20]!==h?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[c,h,p]}),e[19]=c,e[20]=h,e[21]=j):j=e[21],j}function I(t){const e=v.c(5),{ready:l,pending:n,label:o,onClick:a,children:r}=t,i=n||!l,c=l&&!n?r:null;let m;return e[0]!==o||e[1]!==a||e[2]!==i||e[3]!==c?(m=s.jsxs(y,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal classic:rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:a,disabled:i,children:[o,c]}),e[0]=o,e[1]=a,e[2]=i,e[3]=c,e[4]=m):m=e[4],m}export{A as C,I as a};
@@ -1 +1 @@
1
- import{aa as o,bs as a,bq as n,ab as e,br as i,bt as r,cy as b,dq as p,ct as m}from"./index-Dc7hzqoi.js";const h=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:n(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:b("object"),properties:i(e(),r()).optional(),required:n(e()).optional()}).catchall(r()),_=p.extend({inputSchema:s,outputSchema:s.optional()}),f=o({headers:i(e(),e()).optional()}),g=o({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:n(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:i(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),d=256*1024;function l(t){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=d,{message:`${t} must serialize to at most ${d} bytes`})}const u=o({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:a(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:m([g,f]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:h.nullable().describe("OAuth configuration"),configuration_state:l("configuration_state").describe("Configuration state (decrypted)"),configuration_scopes:n(e()).nullable().optional().describe("Configuration scopes"),metadata:l("metadata").describe("Additional metadata (includes repository info)"),tools:n(_).nullable().describe("Discovered tools from MCP"),bindings:n(e()).nullable().describe("Detected bindings"),status:a(["active","inactive","error"]).describe("Current status")});u.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});u.partial();function T(t){return t!=null&&"command"in t}function y(t){return!t||!t.startsWith("virtual://")?null:t.replace("virtual://","")}export{h as O,T as i,y as p};
1
+ import{ao as o,bN as a,bL as t,ap as e,bM as i,bO as r,cU as p,dz as b,cP as m}from"./index-BiU3YmQL.js";const h=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:t(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:p("object"),properties:i(e(),r()).optional(),required:t(e()).optional()}).catchall(r()),_=b.extend({inputSchema:s,outputSchema:s.optional()}),f=o({headers:i(e(),e()).optional()}),g=o({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:t(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:i(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),d=256*1024;function l(n){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=d,{message:`${n} must serialize to at most ${d} bytes`})}const u=o({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:a(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:m([g,f]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:h.nullable().describe("OAuth configuration"),configuration_state:l("configuration_state").describe("Configuration state (decrypted)"),configuration_scopes:t(e()).nullable().optional().describe("Configuration scopes"),metadata:l("metadata").describe("Additional metadata (includes repository info)"),tools:t(_).nullable().describe("Discovered tools from MCP"),bindings:t(e()).nullable().describe("Detected bindings"),status:a(["active","inactive","error"]).describe("Current status")});u.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});u.partial();function T(n){return n!=null&&"command"in n}function y(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{h as O,T as i,y as p};
@@ -0,0 +1 @@
1
+ import{c as $,a0 as K,z as k,a8 as F,K as H,b as q,l as A,j as x,eL as z}from"./index-BiU3YmQL.js";import{u as G}from"./use-registry-connections-BQknTkkv.js";import{e as U}from"./use-organization-settings-DalrVcZ1.js";import{u as V}from"./useInfiniteQuery-KPKjfQBF.js";import{c as X}from"./use-mcp-client-Br7XFHza.js";import{i as Y,f as B}from"./extract-connection-data-B7yRd0El.js";import{r as W,R as Z}from"./retry-i8LvYSZg.js";import{g as L}from"./connection-slug-CITJ0kGN.js";import{I as J}from"./integration-icon-1ySWGOUX.js";function ge(){const s=$.c(6),e=G(),t=U(),o=K().project.enabledPlugins??[];let n;if(s[0]!==o||s[1]!==t||s[2]!==e){let a;s[4]!==t?(a=r=>t(r.id),s[4]=t,s[5]=a):a=s[5],n=e.filter(a).map(O),o.includes("private-registry")&&t(k)&&n.push({id:k,title:"Private Registry",icon:null}),s[0]=o,s[1]=t,s[2]=e,s[3]=n}else n=s[3];return n}function O(s){return{id:s.id,title:s.title,icon:s.icon}}const ee=24,S=3;function Q(s){return s.id.includes("community-registry")}function te(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(o=>t.map(n=>({field:n,operator:"contains",value:o})))}}function D(s,e,t,o,n){const a=s.map(l=>l.id).sort().join(","),r=te(n),{data:p,fetchNextPage:f,hasNextPage:d,isFetchingNextPage:g,isLoading:N}=V({queryKey:H.storeDiscovery(e,`${a}:${n??""}`),queryFn:async({pageParam:l})=>{const c=l??{};return await Promise.all(s.map(async i=>{const y=c[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const C=Y(i.id,e);try{return await W(async()=>{let u=null;try{u=await X({connectionId:i.id,orgId:e,orgSlug:t});const h={limit:ee};y&&(h.cursor=y),r&&(h.where=r);const b=await u.callTool({name:C,arguments:h}),v=b.structuredContent??b,P=v.nextCursor||v.cursor||void 0,R=B(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:R,nextCursor:P}}finally{await u?.close().catch(()=>{})}},{maxAttempts:S,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(u){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${S} attempts:`,u instanceof Z?u.cause:u),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:l=>{const c={};let m=!1;for(const i of l)i.registryId&&(i.nextCursor?(c[i.registryId]=i.nextCursor,m=!0):c[i.registryId]="EXHAUSTED");return m?c:void 0},staleTime:3600*1e3,placeholderData:F,retry:!1,enabled:s.length>0}),I=[];if(p?.pages)for(const l of p.pages)for(const c of l)for(const m of c.items)I.push({...m,_sourceName:m._sourceName??c.registryTitle,_sourceIcon:m._sourceIcon??c.registryIcon,_registryId:m._registryId??c.registryId});return{items:I,hasMore:d??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{d&&!g&&f()}}}function ye(s,e){const t=$.c(16),{org:o}=K();let n;t[0]!==s?(n=s.filter(ie),t[0]=s,t[1]=n):n=t[1];const a=n;let r;t[2]!==s?(r=s.filter(se),t[2]=s,t[3]=r):r=t[3];const p=r,f=D(a,o.id,o.slug,!0,e),d=D(p,o.id,o.slug,!0,e);let g;if(t[4]!==d.items||t[5]!==f.items){const y=new Set;g=[];const C=[...f.items,...d.items];for(const u of C){const h=`${u._registryId}:${u.id}`;y.has(h)||(y.add(h),g.push(u))}t[4]=d.items,t[5]=f.items,t[6]=g}else g=t[6];const N=f.isInitialLoading||d.isInitialLoading,I=f.isLoadingMore||d.isLoadingMore,l=f.hasMore||d.hasMore;let c;t[7]!==d||t[8]!==f?(c=()=>{f.hasMore&&f.fetchNextPage(),d.hasMore&&d.fetchNextPage()},t[7]=d,t[8]=f,t[9]=c):c=t[9];const m=c;let i;return t[10]!==l||t[11]!==N||t[12]!==I||t[13]!==g||t[14]!==m?(i={items:g,hasMore:l,isLoadingMore:I,isInitialLoading:N,loadMore:m},t[10]=l,t[11]=N,t[12]=I,t[13]=g,t[14]=m,t[15]=i):i=t[15],i}function se(s){return Q(s)}function ie(s){return!Q(s)}function he(s){const e=new Map;for(const n of s){const a=L(n),r=e.get(a);r?r.push(n):e.set(a,[n])}const t=[],o=new Set;for(const n of s){const a=L(n);if(o.has(a))continue;o.add(a);const r=e.get(a),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:a,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function xe(s){const e=$.c(43),{connection:t,onClick:o,headerActions:n,headerActionsAlwaysVisible:a,footer:r,className:p,fallbackIcon:f,selected:d}=s,g=a===void 0?!1:a,N=q(),I=o&&"cursor-pointer hover:bg-muted/50";let l;e[0]!==p||e[1]!==I?(l=A("transition-colors group overflow-hidden flex flex-col h-full",I,p),e[0]=p,e[1]=I,e[2]=l):l=e[2];const c=o?"button":void 0,m=o?0:void 0,i=o&&d!==void 0?d:void 0;let y;e[3]!==o?(y=o?E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),o())}:void 0,e[3]=o,e[4]=y):y=e[4];let C;e[5]!==t.icon||e[6]!==t.title||e[7]!==f?(C=x.jsx(J,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[5]=t.icon,e[6]=t.title,e[7]=f,e[8]=C):C=e[8];let u;e[9]!==n||e[10]!==g?(u=n&&x.jsx("div",{className:A("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:ne,children:n}),e[9]=n,e[10]=g,e[11]=u):u=e[11];let h;e[12]!==u?(h=x.jsx("div",{className:"relative",children:u}),e[12]=u,e[13]=h):h=e[13];let b;e[14]!==h||e[15]!==C?(b=x.jsxs("div",{className:"flex items-start justify-between",children:[C,h]}),e[14]=h,e[15]=C,e[16]=b):b=e[16];let v;e[17]!==t.title?(v=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[17]=t.title,e[18]=v):v=e[18];let P;e[19]!==t.description||e[20]!==N?(P=t.description||N("connections.connectionCard.noDescription"),e[19]=t.description,e[20]=N,e[21]=P):P=e[21];let R;e[22]!==P?(R=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=R):R=e[23];let j;e[24]!==v||e[25]!==R?(j=x.jsxs("div",{className:"flex flex-col gap-1",children:[v,R]}),e[24]=v,e[25]=R,e[26]=j):j=e[26];let M;e[27]!==b||e[28]!==j?(M=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[b,j]}),e[27]=b,e[28]=j,e[29]=M):M=e[29];let w;e[30]!==r?(w=r&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:oe,children:r})}),e[30]=r,e[31]=w):w=e[31];let T;e[32]!==M||e[33]!==w?(T=x.jsxs("div",{className:"flex flex-col flex-1",children:[M,w]}),e[32]=M,e[33]=w,e[34]=T):T=e[34];let _;return e[35]!==o||e[36]!==T||e[37]!==l||e[38]!==c||e[39]!==m||e[40]!==i||e[41]!==y?(_=x.jsx(z,{className:l,onClick:o,role:c,tabIndex:m,"aria-pressed":i,onKeyDown:y,children:T}),e[35]=o,e[36]=T,e[37]=l,e[38]=c,e[39]=m,e[40]=i,e[41]=y,e[42]=_):_=e[42],_}function oe(s){return s.stopPropagation()}function ne(s){return s.stopPropagation()}export{xe as C,ye as a,he as g,ge as u};