decocms 4.76.39 → 4.76.41

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 (234) hide show
  1. package/dist/client/assets/{AlertCircle-D9jKaKtG.js → AlertCircle-B6fSS9Nr.js} +1 -1
  2. package/dist/client/assets/{AreaChart-I19erA5j.js → AreaChart-DV_21XK6.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-Bh_Wxm8y.js → ArrowUp-DW0ypUeN.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-jtciLzcd.js → ArrowUpRight-aNuYEP8-.js} +1 -1
  5. package/dist/client/assets/{Check-DRoFY1jZ.js → Check-_NhVXSMx.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-CV-bgnk_.js → CheckCircle-_QjokS7c.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-BDEk_-et.js → ChevronDown-CVZkvJdC.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-XBiVVXqh.js → ChevronRight-KD2aJSIy.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DxeZOGvu.js → ChevronUp-BPx3UUoH.js} +1 -1
  10. package/dist/client/assets/{Circle-cRSTXKuZ.js → Circle-CAJa_9z1.js} +1 -1
  11. package/dist/client/assets/{Copy01-BCtHDHXP.js → Copy01-9KczXiyU.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CQ4GIDlw.js → DotsVertical-CSUM9S94.js} +1 -1
  13. package/dist/client/assets/{Eye-CRKS3-RJ.js → Eye-VM-QjfJ4.js} +1 -1
  14. package/dist/client/assets/{FilterLines-gGvwXdP1.js → FilterLines-410KjREJ.js} +1 -1
  15. package/dist/client/assets/{Flag01-CPRmw5vG.js → Flag01-BKZcNuf-.js} +1 -1
  16. package/dist/client/assets/{Globe01-m1rF9f3K.js → Globe01-D3lu_PxS.js} +1 -1
  17. package/dist/client/assets/{Globe04-DeQ6tYB5.js → Globe04-DVGalWs5.js} +1 -1
  18. package/dist/client/assets/{HardDrive-C3qDTbF4.js → HardDrive-DJrRKGEp.js} +1 -1
  19. package/dist/client/assets/{Key01-Cr9DTgNd.js → Key01-CWKfoWKt.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-Cj0yR17U.js → LayoutLeft-BSUtodmV.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-tGLpDLEH.js → LinkExternal01-DOER_79f.js} +1 -1
  22. package/dist/client/assets/{List-Cxl23UNX.js → List-Mzj7E1e7.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CrXgGvev.js → Monitor01-CbILz4iM.js} +1 -1
  24. package/dist/client/assets/{Package-BY7kf48b.js → Package-C0PZARZA.js} +1 -1
  25. package/dist/client/assets/{Palette-Cq3EaLGT.js → Palette-zXOXvzYd.js} +1 -1
  26. package/dist/client/assets/{Play-D_nFbDM8.js → Play-DgwPUBp-.js} +1 -1
  27. package/dist/client/assets/{Plus-I8MrkIiI.js → Plus-Cdpb6m4l.js} +1 -1
  28. package/dist/client/assets/{SearchLg-469v_tHW.js → SearchLg-DqauO0tY.js} +1 -1
  29. package/dist/client/assets/{SearchMd-D6sFx8Mr.js → SearchMd-jgaWGeOz.js} +1 -1
  30. package/dist/client/assets/{Settings02-BVibCz3N.js → Settings02-DxvjpB3E.js} +1 -1
  31. package/dist/client/assets/{Shield01-C4fJk111.js → Shield01-1r7dqb60.js} +1 -1
  32. package/dist/client/assets/{Star01-BImm_bom.js → Star01-CgPgwHJ2.js} +1 -1
  33. package/dist/client/assets/{Stars01-D16Lkqom.js → Stars01-Dj55gpJB.js} +1 -1
  34. package/dist/client/assets/{Stars02-K6ZA43p2.js → Stars02-D0RWMzz9.js} +1 -1
  35. package/dist/client/assets/{Sun-BAQt9e3_.js → Sun-Be8x2ETo.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-B2fiZwGo.js → SwitchHorizontal01-kkjfEgm2.js} +1 -1
  37. package/dist/client/assets/{Tool01-C6qtV-8G.js → Tool01-BnjD9Qbg.js} +1 -1
  38. package/dist/client/assets/{Tool02-BMiul4Vu.js → Tool02-D5O4T858.js} +1 -1
  39. package/dist/client/assets/{Trash01-Buc2Et94.js → Trash01-CI4fi--V.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-CFLEmN28.js → TrendUp01-aooN09Df.js} +1 -1
  41. package/dist/client/assets/{Upload01-BtSbyzb2.js → Upload01-MhBbHGeb.js} +1 -1
  42. package/dist/client/assets/{User01-W0LTtPcW.js → User01-Cf3IiQjj.js} +1 -1
  43. package/dist/client/assets/{UserPlus01-C3Lxpb7g.js → UserPlus01-xoPWWzx5.js} +1 -1
  44. package/dist/client/assets/{Users01-CWgpdpN9.js → Users01-CI2RyDXH.js} +1 -1
  45. package/dist/client/assets/{Users03-ByVMXMZu.js → Users03-BHyOeQTw.js} +1 -1
  46. package/dist/client/assets/{X-DRao_8d8.js → X-szfsPB5I.js} +1 -1
  47. package/dist/client/assets/{XCircle-CTIZ1yaQ.js → XCircle-D2s4I9UN.js} +1 -1
  48. package/dist/client/assets/{XClose-CD0FZtT0.js → XClose-D4RYCPSX.js} +1 -1
  49. package/dist/client/assets/{Zap-B5VKBEnn.js → Zap-BN7uLlIg.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-CUhDGLkD.js → ZapSquare-DhHlpHUI.js} +1 -1
  51. package/dist/client/assets/{ZoomOut-v_oEGRX-.js → ZoomOut-Dvwu8cm9.js} +1 -1
  52. package/dist/client/assets/{access-gate-Vlc377tl.js → access-gate-BK-WfMNU.js} +1 -1
  53. package/dist/client/assets/{add-section-modal-DJjQQ3eh.js → add-section-modal-R03IM6Pt.js} +1 -1
  54. package/dist/client/assets/{agent-icon-Br_7deBR.js → agent-icon-BPaG9QEC.js} +1 -1
  55. package/dist/client/assets/{agents-list-B1RSQqve.js → agents-list-BzUXKF2w.js} +1 -1
  56. package/dist/client/assets/{ai-providers-C7nn-9ta.js → ai-providers-or1-z5bo.js} +1 -1
  57. package/dist/client/assets/{alert-DQU-MhUL.js → alert-BgojbBCU.js} +1 -1
  58. package/dist/client/assets/{alert-dialog-5yg0Hi1S.js → alert-dialog-BialD_ZU.js} +1 -1
  59. package/dist/client/assets/app-editor-BFdjoiN7.js +1 -0
  60. package/dist/client/assets/{auth-C9VNKOPG.js → auth-NNXwkbur.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-BdaVtY2b.js → auth-catchall-CAWaeUqp.js} +1 -1
  62. package/dist/client/assets/{auth-entry-BeCZkOnF.js → auth-entry-B7c4ovgl.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-ChS85L7n.js → auth-split-layout-CsgIR_R3.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-Coo8NGqJ.js → authenticate-and-persist-oauth-tCCNhB1g.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-Ck7YuWDG.js → automation-list-row-B6kFvOBE.js} +1 -1
  66. package/dist/client/assets/{automation-runs-BB6bB4uk.js → automation-runs-DNfCbBad.js} +1 -1
  67. package/dist/client/assets/automations-B0Q33VgN.js +1 -0
  68. package/dist/client/assets/{autosend-C1nqxmws.js → autosend-DsTcpmxU.js} +1 -1
  69. package/dist/client/assets/{avatar-Dkunhm0O.js → avatar-DuqzO83Z.js} +1 -1
  70. package/dist/client/assets/{badge-D4NPYwXp.js → badge-YRQ_JPpL.js} +1 -1
  71. package/dist/client/assets/{block-document-BeUNbUJT.js → block-document-CyNyZbFF.js} +1 -1
  72. package/dist/client/assets/{brand-context-C8YxP7gf.js → brand-context-CUstEnIt.js} +1 -1
  73. package/dist/client/assets/{buckets-BnEWdyd5.js → buckets-Ddmm-clb.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-4ZTxlvwO.js → bulk-category-panel-DEvwFCe3.js} +1 -1
  75. package/dist/client/assets/{calendar-2P1X4d0q.js → calendar-CT9v2f6u.js} +1 -1
  76. package/dist/client/assets/{capability-load-error-BuOpDehC.js → capability-load-error-BLxdta8r.js} +1 -1
  77. package/dist/client/assets/{card-DnpsIAKS.js → card-DuGN6TsN.js} +1 -1
  78. package/dist/client/assets/{category-editor-DSx-oqpb.js → category-editor-DNeNfvdm.js} +1 -1
  79. package/dist/client/assets/{chat-context-DhLGI63r.js → chat-context-B59Ax4J3.js} +3 -3
  80. package/dist/client/assets/{checkbox-C63zfsEn.js → checkbox-CHwuu_ZW.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-BEbkLZxi.js → cli-auth-success-j3rt8aNV.js} +1 -1
  82. package/dist/client/assets/{collection-detail-kwhc56lU.js → collection-detail-BhEyyWh1.js} +1 -1
  83. package/dist/client/assets/{collection-display-button-ChKFlO6Q.js → collection-display-button-CmrNBKFv.js} +1 -1
  84. package/dist/client/assets/{collection-search-ZdUay0yR.js → collection-search-DZHTwfTD.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-C0Fwzc3Y.js → collection-table-wrapper-BI03bRRK.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-BDRfTonV.js → collection-tabs-CTuzoIfF.js} +1 -1
  87. package/dist/client/assets/{command-BSpIN9_V.js → command-wVpd_unN.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-DlECdGdC.js → commerce-onboarding-D2g9pPhF.js} +1 -1
  89. package/dist/client/assets/{companions-core-BgscHEfE.js → companions-core-DTyYTER5.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-PsIhhiv6.js → connect-desktop-dialog-GKMeytsA.js} +1 -1
  91. package/dist/client/assets/{connection-card-RYIFLC82.js → connection-card-C0J17slz.js} +1 -1
  92. package/dist/client/assets/{connection-detail-D_QFobT5.js → connection-detail-0Y7iFyAt.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-DKFYVn4p.js → connection-form-helpers-5-UphyhX.js} +1 -1
  94. package/dist/client/assets/{connections-DVfJ_Olq.js → connections-DNrnbzQL.js} +1 -1
  95. package/dist/client/assets/{decopilot-sse-pool-CwqfRM01.js → decopilot-sse-pool-BuypN71j.js} +1 -1
  96. package/dist/client/assets/{dialog-BpG00RHb.js → dialog-D9N9pUie.js} +1 -1
  97. package/dist/client/assets/{domain-settings-C6p-xHvj.js → domain-settings-DSVJJ6p9.js} +1 -1
  98. package/dist/client/assets/{drawer-CizKFwLN.js → drawer-Go8s2c8x.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-aio24EQt.js → dropdown-menu-DkH3cZ6a.js} +1 -1
  100. package/dist/client/assets/{empty-state-CXIgu6fC.js → empty-state-QG3MGYmA.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-BP3pz5Md.js → extract-connection-data-Chim8x32.js} +1 -1
  102. package/dist/client/assets/{file-explorer-D7DK90sc.js → file-explorer-BAMRHyGC.js} +1 -1
  103. package/dist/client/assets/{file-type-icon-gjWGJiVw.js → file-type-icon-vd5OzWpW.js} +1 -1
  104. package/dist/client/assets/{files-BAjje_Bu.js → files-yuG_isVU.js} +1 -1
  105. package/dist/client/assets/{form-DF20JHCC.js → form-ygsxHIqV.js} +1 -1
  106. package/dist/client/assets/{general-CagnxMjJ.js → general-D8WMU2ka.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-BnBl-afV.js → github-repo-picker-CyK2rRRy.js} +1 -1
  108. package/dist/client/assets/{hooks-DYQmWEJE.js → hooks-DjlilSA5.js} +1 -1
  109. package/dist/client/assets/{index-Cv2_43At.js → index-B0qkpg03.js} +1 -1
  110. package/dist/client/assets/{index-D8StYila.js → index-BA4RxhWi.js} +1 -1
  111. package/dist/client/assets/{index-Crxhf3Y-.js → index-BRU38q6V.js} +1 -1
  112. package/dist/client/assets/{index-wMhpN3Rs.js → index-CAECM8Sn.js} +6 -6
  113. package/dist/client/assets/{index-LiqndFWN.js → index-CTalp9el.js} +1 -1
  114. package/dist/client/assets/{index-C8chZC8f.js → index-CZq439_G.js} +1 -1
  115. package/dist/client/assets/{index-CfLzEiZE.js → index-CahqzXBe.js} +3 -3
  116. package/dist/client/assets/{index-CUZGSUu7.js → index-Cdt9J4Gb.js} +2 -2
  117. package/dist/client/assets/{index-BiG7qHuc.js → index-DaJ8vreJ.js} +1 -1
  118. package/dist/client/assets/{index-DRe0HXBU.js → index-Dl2ccLGY.js} +1 -1
  119. package/dist/client/assets/{index-CWo50HSr.js → index-GlxOmFGT.js} +1 -1
  120. package/dist/client/assets/{index-BWelblqY.js → index-Ib7u-hLM.js} +1 -1
  121. package/dist/client/assets/{index-D8Os79zM.js → index-beWplTZW.js} +1 -1
  122. package/dist/client/assets/{index-redirect-jtLx5_jl.js → index-redirect-3dZaLESD.js} +1 -1
  123. package/dist/client/assets/{index-B0fZRciF.js → index-slw1ux2A.js} +1 -1
  124. package/dist/client/assets/{input-Cd7Q_tEs.js → input-xSFHn6TQ.js} +1 -1
  125. package/dist/client/assets/{integration-icon-dqIwkJNu.js → integration-icon-DOUqIxQC.js} +1 -1
  126. package/dist/client/assets/{invite-member-dialog-zZl_c6qP.js → invite-member-dialog-YYCmRASv.js} +1 -1
  127. package/dist/client/assets/{label-kDzDmQUh.js → label-Bry7qC_F.js} +1 -1
  128. package/dist/client/assets/{layout-xGmcH9N7.js → layout-Aj09JGSS.js} +1 -1
  129. package/dist/client/assets/{login-BA0R1D47.js → login-BlLJcT6D.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-CPkFAj__.js → mcp-oauth-CE1QaQRx.js} +1 -1
  131. package/dist/client/assets/{members-s749XIx5.js → members-FS3MZ9e0.js} +1 -1
  132. package/dist/client/assets/{monaco-editor-OupVhgol.js → monaco-editor-87BARCr6.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-BhBTql3n.js → monitoring-stats-row-4LAOhs0m.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-CCmLqvSa.js → oauth-callback-Cr5gDXCB.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-B7DP4xPF.js → oauth-callback-ai-provider-BJ5teeR8.js} +1 -1
  136. package/dist/client/assets/{onboarding-CPHrUgIe.js → onboarding-DP_0Um0n.js} +1 -1
  137. package/dist/client/assets/{org-install-DZ8K4nP2.js → org-install-DN6_tE2D.js} +1 -1
  138. package/dist/client/assets/{org-layout-Bj01P9aV.js → org-layout-BOy7X2lc.js} +1 -1
  139. package/dist/client/assets/{organization-choice-BkL0AuFd.js → organization-choice-QSc6c-Zh.js} +1 -1
  140. package/dist/client/assets/{orgs-MgOngW3M.js → orgs-DotPjeyE.js} +1 -1
  141. package/dist/client/assets/{page-seo-form-Dcyl262_.js → page-seo-form-D8TLqTYg.js} +1 -1
  142. package/dist/client/assets/page-seo-sheet-BLNvKpi7.js +1 -0
  143. package/dist/client/assets/{popover-CAVX4tJ7.js → popover-CNsKnW9O.js} +1 -1
  144. package/dist/client/assets/{post-editor-Da-AeTpq.js → post-editor-CtdNLGvw.js} +1 -1
  145. package/dist/client/assets/{primitives-BIpRcsDg.js → primitives-CzDhzmgb.js} +1 -1
  146. package/dist/client/assets/{profile-B2oypteQ.js → profile-frl0e14b.js} +1 -1
  147. package/dist/client/assets/project-app-view-GTYk-nhF.js +1 -0
  148. package/dist/client/assets/record-editor-BnkeodEZ.js +1 -0
  149. package/dist/client/assets/redirect-editor-DGyxuvg-.js +1 -0
  150. package/dist/client/assets/registry-BIJ2H7Do.js +2 -0
  151. package/dist/client/assets/{registry-layout-DIi5WRCC.js → registry-layout-O6KDx6eh.js} +1 -1
  152. package/dist/client/assets/{reports-CiWTw2nA.js → reports-D19lNImb.js} +1 -1
  153. package/dist/client/assets/{require-capability-ClxNAHDX.js → require-capability-nRyJJ3s0.js} +1 -1
  154. package/dist/client/assets/{required-auth-layout-D6iWtzpZ.js → required-auth-layout-CwGpFQKN.js} +1 -1
  155. package/dist/client/assets/{reset-password-BTUTZovK.js → reset-password-CUr6Jg0a.js} +1 -1
  156. package/dist/client/assets/{roles-CWo9BfDU.js → roles-YWpZvA1A.js} +1 -1
  157. package/dist/client/assets/{search-input-CPSNTvbD.js → search-input-BuRX5kKc.js} +1 -1
  158. package/dist/client/assets/{secrets-BUlZfABy.js → secrets-DyIxarwi.js} +1 -1
  159. package/dist/client/assets/{sections-editor-h0kVDzsJ.js → sections-editor-e5R-bbLf.js} +1 -1
  160. package/dist/client/assets/{select-CG_DAKKi.js → select-BCk-r-KQ.js} +1 -1
  161. package/dist/client/assets/{select-model-D1Ukw1RU.js → select-model-CnPHh8W6.js} +1 -1
  162. package/dist/client/assets/{self-tool-result-NrcSyTvB.js → self-tool-result-ZQezCWkh.js} +1 -1
  163. package/dist/client/assets/{seo-editor-xWY9eWK9.js → seo-editor-tKbIQwj1.js} +1 -1
  164. package/dist/client/assets/{settings-layout-DpSAmroQ.js → settings-layout-_ufdO0pS.js} +1 -1
  165. package/dist/client/assets/{settings-section-Ge2uaXfu.js → settings-section-Cx6iZ_uT.js} +1 -1
  166. package/dist/client/assets/{shell-controls-CunyuOEN.js → shell-controls-DJKjT0Op.js} +1 -1
  167. package/dist/client/assets/{shell-layout-DvbJaA51.js → shell-layout-BX9xNgc_.js} +1 -1
  168. package/dist/client/assets/{sidebar-Cuikqywp.js → sidebar-h9kX-HrJ.js} +1 -1
  169. package/dist/client/assets/{skeleton-NOY7tslO.js → skeleton-CkldJDHW.js} +1 -1
  170. package/dist/client/assets/{sso-Dj-oWS1p.js → sso-C4InZhdm.js} +1 -1
  171. package/dist/client/assets/{store-DeVtQfXU.js → store-CBqH8_uA.js} +1 -1
  172. package/dist/client/assets/store-registry-kBJZdj01.js +2 -0
  173. package/dist/client/assets/{studio-tools-1eYDX3Oc.js → studio-tools-VmhEMLj1.js} +1 -1
  174. package/dist/client/assets/{switch-BASHlSBX.js → switch-2a-NXeeB.js} +1 -1
  175. package/dist/client/assets/{table-BGqdTzVX.js → table-BlPJa_8m.js} +1 -1
  176. package/dist/client/assets/{tabs-C2o3CpVg.js → tabs-DOvmalOj.js} +1 -1
  177. package/dist/client/assets/{textarea-IzqtTP1Z.js → textarea-Ck09ftSq.js} +1 -1
  178. package/dist/client/assets/{toggle-group-DziWJ2L6.js → toggle-group-CbpQVS1m.js} +1 -1
  179. package/dist/client/assets/{toolbar-DhPXh-WY.js → toolbar-DjITm3nK.js} +1 -1
  180. package/dist/client/assets/{toolbar-icon-button-BEz22yUB.js → toolbar-icon-button-D6BUU405.js} +1 -1
  181. package/dist/client/assets/{tools-list-BH8zbMsB.js → tools-list-D56yr0ag.js} +1 -1
  182. package/dist/client/assets/{tooltip-CgWOH4wa.js → tooltip-OfH0JBEY.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-CbXVtnEM.js → use-ai-providers-CrNcf2Wt.js} +1 -1
  184. package/dist/client/assets/{use-automations-B1qSDcNL.js → use-automations-BN_cbzK1.js} +1 -1
  185. package/dist/client/assets/{use-autosave-BYYKDhRy.js → use-autosave-DSw6Tdc1.js} +1 -1
  186. package/dist/client/assets/{use-capability-BPqBRURu.js → use-capability-Cl0xLflg.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-D4BrWu2c.js → use-clock-tick-DtemB9Db.js} +1 -1
  188. package/dist/client/assets/{use-collections-m1nM8P9n.js → use-collections-DLBSxhmH.js} +1 -1
  189. package/dist/client/assets/{use-connection-Cz9rFuAP.js → use-connection-CFK6XdEQ.js} +1 -1
  190. package/dist/client/assets/{use-copy-DN3DYaPu.js → use-copy-CI5Tee-r.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-By8xHfZo.js → use-create-virtual-mcp-DHdAzyo8.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-B9c3N_4_.js → use-debounced-autosave-DQq07StN.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-rNCjgs19.js → use-debounced-value-XFcbJWyM.js} +1 -1
  194. package/dist/client/assets/{use-deco-credits-BwixucYP.js → use-deco-credits-DXdHjyJ4.js} +1 -1
  195. package/dist/client/assets/{use-decopilot-events-DjSP1yLt.js → use-decopilot-events-Czr8tl2D.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-v4SGKuEP.js → use-delete-connection-DoQh__bY.js} +1 -1
  197. package/dist/client/assets/{use-deployment-admin-CG9fzQFG.js → use-deployment-admin-KbX-LVm7.js} +1 -1
  198. package/dist/client/assets/{use-file-configs-C9MVmyu5.js → use-file-configs-CjABS4D4.js} +1 -1
  199. package/dist/client/assets/{use-infinite-scroll-C8h8-Bid.js → use-infinite-scroll-Bgnw8PIs.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-D2TkvOvc.js → use-join-requests-SNf3fAbV.js} +1 -1
  201. package/dist/client/assets/{use-mcp-client-CJuue6By.js → use-mcp-client-CiUDzz1B.js} +1 -1
  202. package/dist/client/assets/{use-mcp-tools-CpP2txfP.js → use-mcp-tools-BQv2doq_.js} +1 -1
  203. package/dist/client/assets/{use-members-CBY3Q1H7.js → use-members-emuVjzcl.js} +1 -1
  204. package/dist/client/assets/{use-mobile-B3nnRQ-H.js → use-mobile-BbbfeIos.js} +1 -1
  205. package/dist/client/assets/{use-navigate-to-agent-oYZab9rM.js → use-navigate-to-agent-wXgVJPh8.js} +1 -1
  206. package/dist/client/assets/{use-org-auth-client-BUAht8Y6.js → use-org-auth-client-D_Ztn44U.js} +1 -1
  207. package/dist/client/assets/{use-org-sso-r8XKUEOM.js → use-org-sso-Boyxd-_6.js} +1 -1
  208. package/dist/client/assets/{use-organization-roles-JwWfCDcq.js → use-organization-roles-BPbea-AQ.js} +1 -1
  209. package/dist/client/assets/{use-organization-settings-CcZSJgrn.js → use-organization-settings-veOuHbzE.js} +1 -1
  210. package/dist/client/assets/{use-registry-connections-RYZ52qIV.js → use-registry-connections-D1PHHgBU.js} +1 -1
  211. package/dist/client/assets/{use-secrets-4AZaTsOK.js → use-secrets-BzL7zgoA.js} +1 -1
  212. package/dist/client/assets/{use-status-sounds-DgKLKrgS.js → use-status-sounds-B44xd_bC.js} +1 -1
  213. package/dist/client/assets/{use-view-mode-DaBxK7Wn.js → use-view-mode-CJQ4aGDJ.js} +1 -1
  214. package/dist/client/assets/{use-virtual-mcp-DD1BP3OK.js → use-virtual-mcp-BU3Eyx1w.js} +1 -1
  215. package/dist/client/assets/useInfiniteQuery-BJbcua_m.js +1 -0
  216. package/dist/client/assets/{useRouterState-BcZw_Fka.js → useRouterState-CWlsh5qm.js} +1 -1
  217. package/dist/client/assets/useSuspenseInfiniteQuery-BrIkzCMU.js +1 -0
  218. package/dist/client/assets/{users-Cn5RrFh5.js → users-DH2w_kqH.js} +1 -1
  219. package/dist/client/assets/{variant-calendar-D0cfazxl.js → variant-calendar-CoO4vjUp.js} +1 -1
  220. package/dist/client/assets/{view-mode-toggle-BiAhl434.js → view-mode-toggle-DQruJ1q6.js} +1 -1
  221. package/dist/client/index.html +1 -1
  222. package/dist/server/cli.js +1 -1
  223. package/dist/server/server.js +1 -1
  224. package/package.json +1 -1
  225. package/dist/client/assets/app-editor-DwEhWLg6.js +0 -1
  226. package/dist/client/assets/automations-Cu2Scg2u.js +0 -1
  227. package/dist/client/assets/page-seo-sheet-DVGzJa-0.js +0 -1
  228. package/dist/client/assets/project-app-view-vueGp2Qb.js +0 -1
  229. package/dist/client/assets/record-editor-DhYREyqZ.js +0 -1
  230. package/dist/client/assets/redirect-editor-B6AKYWWe.js +0 -1
  231. package/dist/client/assets/registry-B-MPhbEM.js +0 -2
  232. package/dist/client/assets/store-registry-DpdS_p7C.js +0 -2
  233. package/dist/client/assets/useInfiniteQuery-C4EffZri.js +0 -1
  234. package/dist/client/assets/useSuspenseInfiniteQuery-PlEdza2Q.js +0 -1
@@ -1 +1 @@
1
- import{c as o,l as n,j as c}from"./index-CfLzEiZE.js";function i(a){const e=o.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 r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let l;return e[5]!==s||e[6]!==r?(l=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=l):l=e[7],l}function f(a){const e=o.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=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
1
+ import{c as o,l as n,j as c}from"./index-CahqzXBe.js";function i(a){const e=o.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 r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let l;return e[5]!==s||e[6]!==r?(l=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=l):l=e[7],l}function f(a){const e=o.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=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
@@ -1 +1 @@
1
- import{c as q,r as S,l as G,j as t,B as I,i as Q,t as U}from"./index-CfLzEiZE.js";import{i as X}from"./XCircle-CTIZ1yaQ.js";import{aC as Y,a7 as T}from"./agent-icon-Br_7deBR.js";import{n as Z}from"./LinkExternal01-tGLpDLEH.js";import{f as K,a as _,b as tt,c as et,d as ot,e as rt,A as it,g as st}from"./alert-dialog-5yg0Hi1S.js";import{I as M}from"./input-Cd7Q_tEs.js";import{L}from"./label-kDzDmQUh.js";import{v as at,w as mt,V as nt,o as lt,x as R,A as pt,W as ct,y as dt}from"./index-wMhpN3Rs.js";import{c as ut,B as gt,a as xt}from"./block-document-BeUNbUJT.js";import{u as ft}from"./use-autosave-BYYKDhRy.js";import{t as ht}from"./ChevronDown-BDEk_-et.js";import{J as yt,K as jt,I as vt}from"./automation-runs-BB6bB4uk.js";import{s as v,E as bt}from"./primitives-BIpRcsDg.js";import"./AlertCircle-D9jKaKtG.js";import"./UserPlus01-C3Lxpb7g.js";import"./Tool01-C6qtV-8G.js";import"./ArrowUp-Bh_Wxm8y.js";import"./Settings02-BVibCz3N.js";import"./Tool02-BMiul4Vu.js";import"./ArrowUpRight-jtciLzcd.js";import"./TrendUp01-CFLEmN28.js";import"./ZapSquare-CUhDGLkD.js";import"./Users03-ByVMXMZu.js";import"./CheckCircle-CV-bgnk_.js";import"./Check-DRoFY1jZ.js";import"./ChevronRight-XBiVVXqh.js";import"./ChevronUp-DxeZOGvu.js";import"./Circle-cRSTXKuZ.js";import"./Stars02-K6ZA43p2.js";import"./Copy01-BCtHDHXP.js";import"./ZoomOut-v_oEGRX-.js";import"./DotsVertical-CQ4GIDlw.js";import"./Globe01-m1rF9f3K.js";import"./Eye-CRKS3-RJ.js";import"./FilterLines-gGvwXdP1.js";import"./Flag01-CPRmw5vG.js";import"./Star01-BImm_bom.js";import"./Globe04-DeQ6tYB5.js";import"./SwitchHorizontal01-B2fiZwGo.js";import"./HardDrive-C3qDTbF4.js";import"./Key01-Cr9DTgNd.js";import"./LayoutLeft-Cj0yR17U.js";import"./List-Cxl23UNX.js";import"./Monitor01-CrXgGvev.js";import"./Sun-BAQt9e3_.js";import"./Package-BY7kf48b.js";import"./Palette-Cq3EaLGT.js";import"./Play-D_nFbDM8.js";import"./Plus-I8MrkIiI.js";import"./SearchLg-469v_tHW.js";import"./SearchMd-D6sFx8Mr.js";import"./Shield01-C4fJk111.js";import"./Stars01-D16Lkqom.js";import"./Trash01-Buc2Et94.js";import"./Upload01-BtSbyzb2.js";import"./User01-W0LTtPcW.js";import"./Users01-CWgpdpN9.js";import"./XClose-CD0FZtT0.js";import"./X-DRao_8d8.js";import"./Zap-B5VKBEnn.js";import"./chat-context-DhLGI63r.js";import"./autosend-C1nqxmws.js";import"./hooks-DYQmWEJE.js";import"./use-mcp-client-CJuue6By.js";import"./constants-D_FQAPnt.js";import"./auth-C9VNKOPG.js";import"./decopilot-sse-pool-CwqfRM01.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-1eYDX3Oc.js";import"./use-virtual-mcp-DD1BP3OK.js";import"./use-collections-m1nM8P9n.js";import"./use-ai-providers-CbXVtnEM.js";import"./use-decopilot-events-DjSP1yLt.js";import"./tab-id-BijBBRwE.js";import"./use-organization-settings-CcZSJgrn.js";import"./tooltip-CgWOH4wa.js";import"./dialog-BpG00RHb.js";import"./drawer-CizKFwLN.js";import"./collection-search-ZdUay0yR.js";import"./use-mobile-B3nnRQ-H.js";import"./AreaChart-I19erA5j.js";import"./index-D8StYila.js";import"./shell-layout-DvbJaA51.js";import"./avatar-Dkunhm0O.js";import"./required-auth-layout-D6iWtzpZ.js";import"./use-org-sso-r8XKUEOM.js";import"./form-DF20JHCC.js";import"./select-CG_DAKKi.js";import"./tabs-C2o3CpVg.js";import"./toggle-group-DziWJ2L6.js";import"./use-deco-credits-BwixucYP.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-RYIFLC82.js";import"./use-registry-connections-RYZ52qIV.js";import"./use-connection-Cz9rFuAP.js";import"./useInfiniteQuery-C4EffZri.js";import"./use-infinite-scroll-C8h8-Bid.js";import"./extract-connection-data-BP3pz5Md.js";import"./card-DnpsIAKS.js";import"./integration-icon-dqIwkJNu.js";import"./collection-tabs-BDRfTonV.js";import"./badge-D4NPYwXp.js";import"./textarea-IzqtTP1Z.js";import"./connection-form-helpers-DKFYVn4p.js";import"./authenticate-and-persist-oauth-Coo8NGqJ.js";import"./mcp-oauth-CPkFAj__.js";import"./useSuspenseInfiniteQuery-PlEdza2Q.js";import"./connect-desktop-dialog-PsIhhiv6.js";import"./select-model-D1Ukw1RU.js";import"./checkbox-C63zfsEn.js";import"./skeleton-NOY7tslO.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Ge2uaXfu.js";import"./command-BSpIN9_V.js";import"./index-Cv2_43At.js";import"./popover-CAVX4tJ7.js";import"./dropdown-menu-aio24EQt.js";import"./index-Crxhf3Y-.js";import"./file-type-icon-gjWGJiVw.js";import"./toolbar-DhPXh-WY.js";import"./use-debounced-value-rNCjgs19.js";import"./index-B0fZRciF.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DgKLKrgS.js";import"./empty-state-CXIgu6fC.js";import"./use-mcp-tools-CpP2txfP.js";import"./use-capability-BPqBRURu.js";import"./tools-list-BH8zbMsB.js";import"./switch-BASHlSBX.js";import"./use-debounced-autosave-B9c3N_4_.js";import"./index-D8Os79zM.js";import"./sidebar-Cuikqywp.js";import"./search-input-CPSNTvbD.js";import"./github-repo-picker-BnBl-afV.js";import"./use-navigate-to-agent-oYZab9rM.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-4AZaTsOK.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./companions-core-BgscHEfE.js";import"./format-time-BnbuEtat.js";import"./use-members-CBY3Q1H7.js";import"./use-org-auth-client-BUAht8Y6.js";import"./index-CUZGSUu7.js";import"./get-initials-D-f_fDFw.js";import"./calendar-2P1X4d0q.js";import"./use-copy-DN3DYaPu.js";import"./toolbar-icon-button-BEz22yUB.js";import"./use-file-configs-C9MVmyu5.js";import"./monaco-editor-OupVhgol.js";import"./use-automations-B1qSDcNL.js";import"./automation-list-row-Ck7YuWDG.js";import"./table-BGqdTzVX.js";import"./use-clock-tick-D4BrWu2c.js";function Ct(k){const e=q.c(18),{icon:f,title:n,defaultOpen:b,children:d}=k,A=b===void 0?!1:b,[x,D]=S.useState(A);let l;e[0]!==f?(l=t.jsx(f,{size:15}),e[0]=f,e[1]=l):l=e[1];let i;e[2]!==n?(i=t.jsx("span",{className:"flex-1 text-left",children:n}),e[2]=n,e[3]=i):i=e[3];const h=x&&"rotate-180";let r;e[4]!==h?(r=G("transition-transform",h),e[4]=h,e[5]=r):r=e[5];let p;e[6]!==r?(p=t.jsx(ht,{size:15,className:r}),e[6]=r,e[7]=p):p=e[7];let c;e[8]!==l||e[9]!==i||e[10]!==p?(c=t.jsx(yt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,i,p]})}),e[8]=l,e[9]=i,e[10]=p,e[11]=c):c=e[11];let s;e[12]!==d?(s=t.jsx(jt,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=s):s=e[13];let u;return e[14]!==x||e[15]!==c||e[16]!==s?(u=t.jsxs(vt,{open:x,onOpenChange:D,className:"mt-4",children:[c,s]}),e[14]=x,e[15]=c,e[16]=s,e[17]=u):u=e[17],u}function yr({orgSlug:k,virtualMcpId:e,branch:f,blockKey:n,block:b,decofile:d,meta:A,onManagePosts:x,onOpenPost:D,previewBaseUrl:l}){const i=at({orgSlug:k,virtualMcpId:e,branch:f}),h=mt(b,"categories"),[r,p,c]=ft(h,o=>{i.mutate({blockKey:n,data:R(n,"categories",o)})}),s=(o,w)=>p({...r,[o]:w}),u=ut({decofile:d,category:r,previewBaseUrl:l}),a=v(r.slug),[B,y]=S.useState(a),[m,C]=S.useState(null),[N,P]=S.useState(!1),$=a?nt(d).filter(o=>o.categorySlugs.includes(a)):[],j=$.length,W=o=>s("slug",o),H=async(o,w)=>{const V=v(r.name);P(!0);try{let g=0;for(const{key:E,payload:O}of pt(d,"posts")){const F=ct(O,o,{name:V,slug:w});F!==O&&(await i.mutateAsync({blockKey:E,data:R(E,"posts",dt(F))}),g+=1)}const z={...r,slug:w};await i.mutateAsync({blockKey:n,data:R(n,"categories",z)}),c(z),U.success(g>0?`Renamed slug and updated ${g} ${g===1?"post":"posts"}`:"Renamed slug"),C(null)}catch(g){y(o),C(null),U.error(g instanceof Error?g.message:"Rename failed")}finally{P(!1)}},J=()=>{const o=B.trim();if(o===a){B!==o&&y(o);return}if(!o){y(a);return}if(j===0){W(o);return}C({oldSlug:a,newSlug:o,count:j})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:v(r.name)||"Untitled category"}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(lt,{isPending:i.isPending,isError:i.isError}),u&&t.jsxs(I,{type:"button",variant:"outline",size:"sm",title:"Open the category preview in a new tab",onClick:()=>window.open(u,"_blank","noopener,noreferrer"),children:[t.jsx(Z,{size:14}),"See category preview"]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(bt,{value:v(r.name),onChange:o=>s("name",o),placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-slug",children:"Slug"}),t.jsx(M,{id:"category-slug",value:B,onChange:o=>y(o.target.value),onBlur:J,placeholder:"my-category",className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-description",children:"Description"}),t.jsx(M,{id:"category-description",value:v(r.description),onChange:o=>s("description",o.target.value),placeholder:"Short description for this category",className:"h-10"})]}),t.jsx(Ct,{icon:Y,title:"Content",defaultOpen:!0,children:t.jsx(gt,{value:xt(r.sections),onChange:o=>s("sections",o),meta:A,emptyMessage:"This category has no content yet. Use ⊕ to add your first block."})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(T,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"text-sm",children:[j," ",j===1?"post":"posts"," in this category"]})]}),t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!a,title:a?"Pick posts to add to this category":"Set a slug to add posts to this category",onClick:()=>x(a),children:["Add posts",t.jsx(X,{size:14})]})]}),j>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:$.map(o=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>D(o.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(T,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:o.title||"Untitled post"}),o.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o.slug})]})]})},o.key))})]})]})})]}),t.jsx(K,{open:!!m,onOpenChange:o=>{o||N||(y(a),C(null))},children:t.jsxs(_,{children:[t.jsxs(tt,{children:[t.jsx(et,{children:"Rename category slug?"}),t.jsx(ot,{children:m?`Changing the slug from "${m.oldSlug}" to "${m.newSlug}" will update ${m.count} ${m.count===1?"post":"posts"} that reference this category.`:null})]}),t.jsxs(rt,{children:[t.jsx(it,{disabled:N,children:"Cancel"}),t.jsx(st,{onClick:o=>{o.preventDefault(),m&&H(m.oldSlug,m.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(Q,{size:14,className:"animate-spin"}),"Renaming…"]}):"Rename & update posts"})]})]})})]})}export{yr as CategoryEditor};
1
+ import{c as q,r as S,l as G,j as t,B as I,i as Q,t as U}from"./index-CahqzXBe.js";import{i as X}from"./XCircle-D2s4I9UN.js";import{aC as Y,a7 as T}from"./agent-icon-BPaG9QEC.js";import{n as Z}from"./LinkExternal01-DOER_79f.js";import{f as K,a as _,b as tt,c as et,d as ot,e as rt,A as it,g as st}from"./alert-dialog-BialD_ZU.js";import{I as M}from"./input-xSFHn6TQ.js";import{L}from"./label-Bry7qC_F.js";import{v as at,w as mt,V as nt,o as lt,x as R,A as pt,W as ct,y as dt}from"./index-CAECM8Sn.js";import{c as ut,B as gt,a as xt}from"./block-document-CyNyZbFF.js";import{u as ft}from"./use-autosave-DSw6Tdc1.js";import{t as ht}from"./ChevronDown-CVZkvJdC.js";import{J as yt,K as jt,I as vt}from"./automation-runs-DNfCbBad.js";import{s as v,E as bt}from"./primitives-CzDhzmgb.js";import"./AlertCircle-B6fSS9Nr.js";import"./UserPlus01-xoPWWzx5.js";import"./Tool01-BnjD9Qbg.js";import"./ArrowUp-DW0ypUeN.js";import"./Settings02-DxvjpB3E.js";import"./Tool02-D5O4T858.js";import"./ArrowUpRight-aNuYEP8-.js";import"./TrendUp01-aooN09Df.js";import"./ZapSquare-DhHlpHUI.js";import"./Users03-BHyOeQTw.js";import"./CheckCircle-_QjokS7c.js";import"./Check-_NhVXSMx.js";import"./ChevronRight-KD2aJSIy.js";import"./ChevronUp-BPx3UUoH.js";import"./Circle-CAJa_9z1.js";import"./Stars02-D0RWMzz9.js";import"./Copy01-9KczXiyU.js";import"./ZoomOut-Dvwu8cm9.js";import"./DotsVertical-CSUM9S94.js";import"./Globe01-D3lu_PxS.js";import"./Eye-VM-QjfJ4.js";import"./FilterLines-410KjREJ.js";import"./Flag01-BKZcNuf-.js";import"./Star01-CgPgwHJ2.js";import"./Globe04-DVGalWs5.js";import"./SwitchHorizontal01-kkjfEgm2.js";import"./HardDrive-DJrRKGEp.js";import"./Key01-CWKfoWKt.js";import"./LayoutLeft-BSUtodmV.js";import"./List-Mzj7E1e7.js";import"./Monitor01-CbILz4iM.js";import"./Sun-Be8x2ETo.js";import"./Package-C0PZARZA.js";import"./Palette-zXOXvzYd.js";import"./Play-DgwPUBp-.js";import"./Plus-Cdpb6m4l.js";import"./SearchLg-DqauO0tY.js";import"./SearchMd-jgaWGeOz.js";import"./Shield01-1r7dqb60.js";import"./Stars01-Dj55gpJB.js";import"./Trash01-CI4fi--V.js";import"./Upload01-MhBbHGeb.js";import"./User01-Cf3IiQjj.js";import"./Users01-CI2RyDXH.js";import"./XClose-D4RYCPSX.js";import"./X-szfsPB5I.js";import"./Zap-BN7uLlIg.js";import"./chat-context-B59Ax4J3.js";import"./autosend-DsTcpmxU.js";import"./hooks-DjlilSA5.js";import"./use-mcp-client-CiUDzz1B.js";import"./constants-D_FQAPnt.js";import"./auth-NNXwkbur.js";import"./decopilot-sse-pool-BuypN71j.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-VmhEMLj1.js";import"./use-virtual-mcp-BU3Eyx1w.js";import"./use-collections-DLBSxhmH.js";import"./use-ai-providers-CrNcf2Wt.js";import"./use-decopilot-events-Czr8tl2D.js";import"./tab-id-BijBBRwE.js";import"./use-organization-settings-veOuHbzE.js";import"./tooltip-OfH0JBEY.js";import"./dialog-D9N9pUie.js";import"./drawer-Go8s2c8x.js";import"./collection-search-DZHTwfTD.js";import"./use-mobile-BbbfeIos.js";import"./AreaChart-DV_21XK6.js";import"./index-BA4RxhWi.js";import"./shell-layout-BX9xNgc_.js";import"./avatar-DuqzO83Z.js";import"./required-auth-layout-CwGpFQKN.js";import"./use-org-sso-Boyxd-_6.js";import"./form-ygsxHIqV.js";import"./select-BCk-r-KQ.js";import"./tabs-DOvmalOj.js";import"./toggle-group-CbpQVS1m.js";import"./use-deco-credits-DXdHjyJ4.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C0J17slz.js";import"./use-registry-connections-D1PHHgBU.js";import"./use-connection-CFK6XdEQ.js";import"./useInfiniteQuery-BJbcua_m.js";import"./use-infinite-scroll-Bgnw8PIs.js";import"./extract-connection-data-Chim8x32.js";import"./card-DuGN6TsN.js";import"./integration-icon-DOUqIxQC.js";import"./collection-tabs-CTuzoIfF.js";import"./badge-YRQ_JPpL.js";import"./textarea-Ck09ftSq.js";import"./connection-form-helpers-5-UphyhX.js";import"./authenticate-and-persist-oauth-tCCNhB1g.js";import"./mcp-oauth-CE1QaQRx.js";import"./useSuspenseInfiniteQuery-BrIkzCMU.js";import"./connect-desktop-dialog-GKMeytsA.js";import"./select-model-CnPHh8W6.js";import"./checkbox-CHwuu_ZW.js";import"./skeleton-CkldJDHW.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Cx6iZ_uT.js";import"./command-wVpd_unN.js";import"./index-B0qkpg03.js";import"./popover-CNsKnW9O.js";import"./dropdown-menu-DkH3cZ6a.js";import"./index-BRU38q6V.js";import"./file-type-icon-vd5OzWpW.js";import"./toolbar-DjITm3nK.js";import"./use-debounced-value-XFcbJWyM.js";import"./index-slw1ux2A.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B44xd_bC.js";import"./empty-state-QG3MGYmA.js";import"./use-mcp-tools-BQv2doq_.js";import"./use-capability-Cl0xLflg.js";import"./tools-list-D56yr0ag.js";import"./switch-2a-NXeeB.js";import"./use-debounced-autosave-DQq07StN.js";import"./index-beWplTZW.js";import"./sidebar-h9kX-HrJ.js";import"./search-input-BuRX5kKc.js";import"./github-repo-picker-CyK2rRRy.js";import"./use-navigate-to-agent-wXgVJPh8.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-BzL7zgoA.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./companions-core-DTyYTER5.js";import"./format-time-BnbuEtat.js";import"./use-members-emuVjzcl.js";import"./use-org-auth-client-D_Ztn44U.js";import"./index-Cdt9J4Gb.js";import"./get-initials-D-f_fDFw.js";import"./calendar-CT9v2f6u.js";import"./use-copy-CI5Tee-r.js";import"./toolbar-icon-button-D6BUU405.js";import"./use-file-configs-CjABS4D4.js";import"./monaco-editor-87BARCr6.js";import"./use-automations-BN_cbzK1.js";import"./automation-list-row-B6kFvOBE.js";import"./table-BlPJa_8m.js";import"./use-clock-tick-DtemB9Db.js";function Ct(k){const e=q.c(18),{icon:f,title:n,defaultOpen:b,children:d}=k,A=b===void 0?!1:b,[x,D]=S.useState(A);let l;e[0]!==f?(l=t.jsx(f,{size:15}),e[0]=f,e[1]=l):l=e[1];let i;e[2]!==n?(i=t.jsx("span",{className:"flex-1 text-left",children:n}),e[2]=n,e[3]=i):i=e[3];const h=x&&"rotate-180";let r;e[4]!==h?(r=G("transition-transform",h),e[4]=h,e[5]=r):r=e[5];let p;e[6]!==r?(p=t.jsx(ht,{size:15,className:r}),e[6]=r,e[7]=p):p=e[7];let c;e[8]!==l||e[9]!==i||e[10]!==p?(c=t.jsx(yt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,i,p]})}),e[8]=l,e[9]=i,e[10]=p,e[11]=c):c=e[11];let s;e[12]!==d?(s=t.jsx(jt,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=s):s=e[13];let u;return e[14]!==x||e[15]!==c||e[16]!==s?(u=t.jsxs(vt,{open:x,onOpenChange:D,className:"mt-4",children:[c,s]}),e[14]=x,e[15]=c,e[16]=s,e[17]=u):u=e[17],u}function yr({orgSlug:k,virtualMcpId:e,branch:f,blockKey:n,block:b,decofile:d,meta:A,onManagePosts:x,onOpenPost:D,previewBaseUrl:l}){const i=at({orgSlug:k,virtualMcpId:e,branch:f}),h=mt(b,"categories"),[r,p,c]=ft(h,o=>{i.mutate({blockKey:n,data:R(n,"categories",o)})}),s=(o,w)=>p({...r,[o]:w}),u=ut({decofile:d,category:r,previewBaseUrl:l}),a=v(r.slug),[B,y]=S.useState(a),[m,C]=S.useState(null),[N,P]=S.useState(!1),$=a?nt(d).filter(o=>o.categorySlugs.includes(a)):[],j=$.length,W=o=>s("slug",o),H=async(o,w)=>{const V=v(r.name);P(!0);try{let g=0;for(const{key:E,payload:O}of pt(d,"posts")){const F=ct(O,o,{name:V,slug:w});F!==O&&(await i.mutateAsync({blockKey:E,data:R(E,"posts",dt(F))}),g+=1)}const z={...r,slug:w};await i.mutateAsync({blockKey:n,data:R(n,"categories",z)}),c(z),U.success(g>0?`Renamed slug and updated ${g} ${g===1?"post":"posts"}`:"Renamed slug"),C(null)}catch(g){y(o),C(null),U.error(g instanceof Error?g.message:"Rename failed")}finally{P(!1)}},J=()=>{const o=B.trim();if(o===a){B!==o&&y(o);return}if(!o){y(a);return}if(j===0){W(o);return}C({oldSlug:a,newSlug:o,count:j})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:v(r.name)||"Untitled category"}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(lt,{isPending:i.isPending,isError:i.isError}),u&&t.jsxs(I,{type:"button",variant:"outline",size:"sm",title:"Open the category preview in a new tab",onClick:()=>window.open(u,"_blank","noopener,noreferrer"),children:[t.jsx(Z,{size:14}),"See category preview"]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(bt,{value:v(r.name),onChange:o=>s("name",o),placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-slug",children:"Slug"}),t.jsx(M,{id:"category-slug",value:B,onChange:o=>y(o.target.value),onBlur:J,placeholder:"my-category",className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-description",children:"Description"}),t.jsx(M,{id:"category-description",value:v(r.description),onChange:o=>s("description",o.target.value),placeholder:"Short description for this category",className:"h-10"})]}),t.jsx(Ct,{icon:Y,title:"Content",defaultOpen:!0,children:t.jsx(gt,{value:xt(r.sections),onChange:o=>s("sections",o),meta:A,emptyMessage:"This category has no content yet. Use ⊕ to add your first block."})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(T,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"text-sm",children:[j," ",j===1?"post":"posts"," in this category"]})]}),t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!a,title:a?"Pick posts to add to this category":"Set a slug to add posts to this category",onClick:()=>x(a),children:["Add posts",t.jsx(X,{size:14})]})]}),j>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:$.map(o=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>D(o.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(T,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:o.title||"Untitled post"}),o.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o.slug})]})]})},o.key))})]})]})})]}),t.jsx(K,{open:!!m,onOpenChange:o=>{o||N||(y(a),C(null))},children:t.jsxs(_,{children:[t.jsxs(tt,{children:[t.jsx(et,{children:"Rename category slug?"}),t.jsx(ot,{children:m?`Changing the slug from "${m.oldSlug}" to "${m.newSlug}" will update ${m.count} ${m.count===1?"post":"posts"} that reference this category.`:null})]}),t.jsxs(rt,{children:[t.jsx(it,{disabled:N,children:"Cancel"}),t.jsx(st,{onClick:o=>{o.preventDefault(),m&&H(m.oldSlug,m.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(Q,{size:14,className:"animate-spin"}),"Renaming…"]}):"Rename & update posts"})]})]})})]})}export{yr as CategoryEditor};
@@ -1,4 +1,4 @@
1
- import{c as oe,l as Xe,bC as Ze,j as K,C as Y,K as ue,m as Ye,cs as Je,R as Ne,n as qe,t as ae,G as le,D as de,b as Fe,u as Ue,e as et,r as y,p as tt,a as nt,U as st,ak as at}from"./index-CfLzEiZE.js";import{A as je,c as ot,a as rt,w as it}from"./autosend-C1nqxmws.js";import{S as ct,b as lt,e as dt,u as ut}from"./hooks-DYQmWEJE.js";import{u as pt}from"./studio-tools-1eYDX3Oc.js";import{u as ft}from"./use-mcp-client-CJuue6By.js";import{a as ht,S as mt}from"./constants-D_FQAPnt.js";import{a as gt}from"./use-virtual-mcp-DD1BP3OK.js";import{u as yt,a as ge}from"./use-ai-providers-CbXVtnEM.js";import{u as xt}from"./use-decopilot-events-DjSP1yLt.js";import{q as St,n as vt}from"./tab-id-BijBBRwE.js";import{g as It}from"./use-organization-settings-CcZSJgrn.js";const bt={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.6-luna"]},Ct={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.6-terra"]},kt={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.6-sol"]},Mt={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},Tt={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},wt={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function Qe(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Et(t){return Qe(t).includes("deepresearch")}const At=["sonar","searchpreview","online"];function Ke(t){const e=Qe(t);return e.includes("deepresearch")?!1:At.some(n=>e.includes(n))}function We(t){return t.asyncResearch!==!0&&Ke(t.modelId)}function Ve(t){return t.asyncResearch===!0||Et(t.modelId)||Ke(t.modelId)}function ie(t,e,n,s){for(const a of n){const o=t.find(r=>r.modelId===a);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const a of n){const o=t.find(r=>r.modelId.includes(a));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(s){const a=t.find(s);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}return null}function _t(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const s of t){const a=e[s.id]??[],o=s.providerId;n.chat.fast||(n.chat.fast=ie(a,s.id,bt[o]??[])),n.chat.smart||(n.chat.smart=ie(a,s.id,Ct[o]??[])),n.chat.thinking||(n.chat.thinking=ie(a,s.id,kt[o]??[])),n.image||(n.image=ie(a,s.id,Mt[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=ie(a,s.id,Tt[o]??[],We)),n.deepResearch||(n.deepResearch=ie(a,s.id,wt[o]??[],Ve))}return n}const Rt=Ze("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function In(t){const e=oe.c(10),{variant:n,size:s}=t;let a;e[0]!==s||e[1]!==n?(a=Xe(Rt({variant:n,size:s})),e[0]=s,e[1]=n,e[2]=a):a=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=K.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=K.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let l;e[5]!==a?(l=K.jsxs("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=a,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=K.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=h):h=e[7];let m;return e[8]!==l?(m=K.jsxs("div",{role:"status",children:[l,h]}),e[8]=l,e[9]=m):m=e[9],m}const Pe={online:!1,capabilities:[],ready:!1};function Pt(t){const e=oe.c(9),{org:n}=Y(),s=pt(),a=t?.fast??!1;let o;e[0]!==n.id?(o=ue.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==s?(r=async()=>{const C=await s.call("LINK_CURRENT_GET",{});return C?{...C,ready:!0}:{...Pe,ready:!0}},e[2]=s,e[3]=r):r=e[3];const l=a?1e3:1e4,h=a?2e3:15e3;let m;e[4]!==o||e[5]!==r||e[6]!==l||e[7]!==h?(m={queryKey:o,queryFn:r,staleTime:l,refetchInterval:h,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=l,e[7]=h,e[8]=m):m=e[8];const{data:S}=Ye(m);return S??Pe}function $t(t,e=[]){return t==="stop"?e.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
1
+ import{c as oe,l as Xe,bC as Ze,j as K,C as Y,K as ue,m as Ye,cs as Je,R as Ne,n as qe,t as ae,G as le,D as de,b as Fe,u as Ue,e as et,r as y,p as tt,a as nt,U as st,ak as at}from"./index-CahqzXBe.js";import{A as je,c as ot,a as rt,w as it}from"./autosend-DsTcpmxU.js";import{S as ct,b as lt,e as dt,u as ut}from"./hooks-DjlilSA5.js";import{u as pt}from"./studio-tools-VmhEMLj1.js";import{u as ft}from"./use-mcp-client-CiUDzz1B.js";import{a as ht,S as mt}from"./constants-D_FQAPnt.js";import{a as gt}from"./use-virtual-mcp-BU3Eyx1w.js";import{u as yt,a as ge}from"./use-ai-providers-CrNcf2Wt.js";import{u as xt}from"./use-decopilot-events-Czr8tl2D.js";import{q as St,n as vt}from"./tab-id-BijBBRwE.js";import{g as It}from"./use-organization-settings-veOuHbzE.js";const bt={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.6-luna"]},Ct={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.6-terra"]},kt={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.6-sol"]},Mt={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},Tt={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},wt={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function Qe(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Et(t){return Qe(t).includes("deepresearch")}const At=["sonar","searchpreview","online"];function Ke(t){const e=Qe(t);return e.includes("deepresearch")?!1:At.some(n=>e.includes(n))}function We(t){return t.asyncResearch!==!0&&Ke(t.modelId)}function Ve(t){return t.asyncResearch===!0||Et(t.modelId)||Ke(t.modelId)}function ie(t,e,n,s){for(const a of n){const o=t.find(r=>r.modelId===a);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const a of n){const o=t.find(r=>r.modelId.includes(a));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(s){const a=t.find(s);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}return null}function _t(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const s of t){const a=e[s.id]??[],o=s.providerId;n.chat.fast||(n.chat.fast=ie(a,s.id,bt[o]??[])),n.chat.smart||(n.chat.smart=ie(a,s.id,Ct[o]??[])),n.chat.thinking||(n.chat.thinking=ie(a,s.id,kt[o]??[])),n.image||(n.image=ie(a,s.id,Mt[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=ie(a,s.id,Tt[o]??[],We)),n.deepResearch||(n.deepResearch=ie(a,s.id,wt[o]??[],Ve))}return n}const Rt=Ze("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function In(t){const e=oe.c(10),{variant:n,size:s}=t;let a;e[0]!==s||e[1]!==n?(a=Xe(Rt({variant:n,size:s})),e[0]=s,e[1]=n,e[2]=a):a=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=K.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=K.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let l;e[5]!==a?(l=K.jsxs("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=a,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=K.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=h):h=e[7];let m;return e[8]!==l?(m=K.jsxs("div",{role:"status",children:[l,h]}),e[8]=l,e[9]=m):m=e[9],m}const Pe={online:!1,capabilities:[],ready:!1};function Pt(t){const e=oe.c(9),{org:n}=Y(),s=pt(),a=t?.fast??!1;let o;e[0]!==n.id?(o=ue.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==s?(r=async()=>{const C=await s.call("LINK_CURRENT_GET",{});return C?{...C,ready:!0}:{...Pe,ready:!0}},e[2]=s,e[3]=r):r=e[3];const l=a?1e3:1e4,h=a?2e3:15e3;let m;e[4]!==o||e[5]!==r||e[6]!==l||e[7]!==h?(m={queryKey:o,queryFn:r,staleTime:l,refetchInterval:h,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=l,e[7]=h,e[8]=m):m=e[8];const{data:S}=Ye(m);return S??Pe}function $t(t,e=[]){return t==="stop"?e.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
2
2
  `).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const Ie={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function Dt(t,e){if(!t)return null;const n=e?Je(e):null;if(t==="decopilot"&&n===null)return"decopilot";for(const[s,a]of Object.entries(Ie))if(a.harness===t&&a.sandbox===n)return s;return null}function bn(t){return t.claudeCode?"claude-code-desktop":t.codex?"codex-desktop":null}function Ot(t,e){return e&&t&&Ie[t].sandbox==="user-desktop"?"decopilot":t}function Lt(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function Nt(t){const e=oe.c(10);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const s=Ne(n);let a;if(e[1]!==s?.params.appSlug||e[2]!==s?.params.collectionName||e[3]!==s?.params.itemId||e[4]!==t){a=[],t&&a.push(`### Selected Agent
3
3
  - ID: ${t}`);let o;e[6]!==s?.params.appSlug||e[7]!==s?.params.collectionName||e[8]!==s?.params.itemId?(o=[],s?.params.appSlug&&o.push(`- Connection ID: ${s?.params.appSlug}`),s?.params.collectionName&&o.push(`- Collection: ${s?.params.collectionName}`),s?.params.itemId&&o.push(`- Item ID: ${s?.params.itemId}`),e[6]=s?.params.appSlug,e[7]=s?.params.collectionName,e[8]=s?.params.itemId,e[9]=o):o=e[9],o.length>0&&a.push(`### Current Resource
4
4
  The user is viewing the following resource:
@@ -19,10 +19,10 @@ Other files in \`${t.sandboxPath}/\`: ${s.join(", ")}`:"";return[{type:"text",te
19
19
  ${a}${o}`}]}function Kt(t,e){const n=[];for(const s of t){if(s.role!=="user"||!s.content)continue;const a=Array.isArray(s.content)?s.content:[s.content];for(const o of a)switch(o.type){case"text":{const r=o.text?.trim();if(!r)continue;n.push({type:"text",text:`[${e}]
20
20
  ${r}`});break}case"image":case"audio":{if(!o.data||!o.mimeType)continue;n.push({type:"file",url:`data:${o.mimeType};base64,${o.data}`,mediaType:o.mimeType});break}case"resource":{const r=o.resource;if(!r||!r.mimeType)continue;r&&("text"in r&&r.text?n.push({type:"text",text:`[${e}]
21
21
  ${r.text}`}):"blob"in r&&r.blob&&r.mimeType&&n.push({type:"file",url:`data:${r.mimeType};base64,${r.blob}`,filename:String(r.uri),mediaType:String(r.mimeType)}));break}}}return n}function He(t){if(!t)return[];const e=[];let n="";const s=a=>{if(a){if(a.type==="text"&&"text"in a&&typeof a.text=="string")n+=a.text;else if(a.type==="mention"&&a.attrs){const o=a.attrs.char??"/",r=`${o}${a.attrs.name}`;if(n+=r,o==="@"){const l=a.attrs.metadata;l&&!Array.isArray(l)&&"agentId"in l?e.push({type:"text",text:`[DELEGATE TO AGENT: ${l.title??a.attrs.name} (agent_id: ${l.agentId})]
22
- 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(l)&&e.push(...$e(l,r))}else if(a.attrs.kind==="skill"){const l=a.attrs.metadata;l&&!Array.isArray(l)&&Array.isArray(l.files)&&e.push(...Qt(l,r))}else{const l=a.attrs.metadata||a.attrs.prompts||[];Array.isArray(l)&&l.length>0&&"role"in l[0]?e.push(...Kt(l,r)):Array.isArray(l)&&e.push(...$e(l,r))}}else if(a.type==="file"&&a.attrs){const o=a.attrs,r=`[file:://${encodeURIComponent(o.name)}]`;n+=r,e.push(...jt(o,r))}if("content"in a&&Array.isArray(a.content))for(const o of a.content)s(o)}};return s(t),n.trim()&&e.unshift({type:"text",text:n.trim()}),e}function Cn(t){const e=He(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function kn(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function Wt(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function Mn(t){return t.filter(e=>e.status==="queued").sort((e,n)=>e.enqueuedAt-n.enqueuedAt)}function Vt(t,e){return t.some(n=>n.messageId===e.messageId)?t:[...t,e]}function Bt(t,e){return t.filter(n=>n.messageId!==e)}const De=new Map,Ee=new Set;function Ht(t){Ee.add(t)}function Gt(t){return Ee.has(t)}function zt(t){Ee.delete(t)}function ye(t){let e=De.get(t);return e||(e=new ct([]),De.set(t,e)),e}function Ge(t,e){ye(t).update(n=>Vt(n,e))}function we(t,e){ye(t).update(n=>Bt(n,e))}function Xt(t,e){ye(t).set(e)}const be=new Map;function Zt(t,e){be.set(`${t}:${e.id}`,e)}function Yt(t,e){const n=`${t}:${e}`,s=be.get(n);return be.delete(n),s}function Oe(t,e){be.delete(`${t}:${e}`)}async function Z(t,e){try{const n=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!n.ok)return;const s=await n.json();Xt(e,s.items??[])}catch{}}function Tn(t){const e=oe.c(2);let n;e[0]!==t?(n=ye(t),e[0]=t,e[1]=n):n=e[1];const s=n;return y.useSyncExternalStore(s.subscribe,s.get,s.get)}function Jt(){const{org:t}=Y();return{enqueue:Ge,refresh:e=>Z(t.slug,e),cancel:async(e,n)=>{const s=`thread-run:${e}:${n}`;we(e,n);try{const a=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(e)}/cancel/${encodeURIComponent(s)}`,{method:"POST",credentials:"include"});if(!a.ok&&a.status!==404)throw new Error(`Cancel failed: ${a.status}`);return!0}catch(a){return ae.error(a instanceof Error?a.message:"Failed to cancel"),!1}finally{await Z(t.slug,e)}}}}const Le=new Set,ne=new Set;function ce(t){return y.useSyncExternalStore(t.subscribe,t.get,t.get)}function en(t){return t.kind==="loading"?"ready":t.kind}function se(t,e,n,s){if(!t)return null;const a=e.find(r=>r.id===t.keyId);if(!a)return null;const o=n.find(r=>r.modelId===t.modelId);return o?{...o,keyId:t.keyId}:{modelId:t.modelId,title:s??t.modelId,keyId:t.keyId,providerId:a.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function tn(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function nn(t,e,n,s){if(!n||s.length===0)return null;const a=e.find(h=>h.id===n);if(!a)return null;const o=_t([a],{[n]:s}),r=t==="fast"?o.chat.fast:t==="thinking"?o.chat.thinking:o.chat.smart;if(!r)return null;const l=s.find(h=>h.modelId===r.modelId);return l?{...l,keyId:n}:null}const sn=1e4,an=10,Ae=y.createContext(null),_e=y.createContext(null),Re=y.createContext(null),ze=y.createContext(null);function on({children:t}){const{locator:e}=Y(),{virtualMcpId:n}=Be(),[s,a]=le(de.chatSelectedImageModel(e),null),[o,r]=le(de.chatSelectedWebSearchModel(e),null),[l,h]=le(de.chatSelectedDeepResearchModel(e),null),[m,S]=y.useState(null),[C,F]=y.useState("default"),f=It(),[$,W]=le(de.chatSimpleModeTier(e),null),L=tn($),k=yt(),M=f.tiers[L],D=m&&k.some(i=>i.id===m)?m:M?.keyId??k[0]?.id??null,{models:v,isLoading:V}=ge(D??void 0),{models:G}=ge(M?.keyId),{models:J}=ge(f.tiers.image?.keyId),{models:w}=ge(f.tiers.web_search?.keyId),{models:B}=ge(f.tiers.deep_research?.keyId),z=se(M,k,G,M?.title)??nn(L,k,D,v),U=V,H=v.filter(i=>i.capabilities?.includes("image")),j=se(s,k,H),u=se(f.tiers.image,k,J,f.tiers.image?.title)??j??H[0]??null,_=v.filter(We),N=se(o,k,_),ee=_.find(i=>i.modelId==="perplexity/sonar")??_[0]??null,Q=se(f.tiers.web_search,k,w,f.tiers.web_search?.title)??N??ee,q=v.filter(Ve),T=se(l,k,q),I=q.find(i=>i.modelId==="perplexity/deep-research")??q.find(i=>i.asyncResearch===!0)??q[0]??null,X=se(f.tiers.deep_research,k,B,f.tiers.deep_research?.title)??T??I,xe=gt(n)??{id:n,title:"",description:null,icon:null},[Ce,fe]=y.useState({}),Se=(i,R)=>{const P=[];for(const A of R.content??[])A.type==="text"&&A.text?.trim()&&P.push(A.text.trim());const b=P.join(`
22
+ 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(l)&&e.push(...$e(l,r))}else if(a.attrs.kind==="skill"){const l=a.attrs.metadata;l&&!Array.isArray(l)&&Array.isArray(l.files)&&e.push(...Qt(l,r))}else{const l=a.attrs.metadata||a.attrs.prompts||[];Array.isArray(l)&&l.length>0&&"role"in l[0]?e.push(...Kt(l,r)):Array.isArray(l)&&e.push(...$e(l,r))}}else if(a.type==="file"&&a.attrs){const o=a.attrs,r=`[file:://${encodeURIComponent(o.name)}]`;n+=r,e.push(...jt(o,r))}if("content"in a&&Array.isArray(a.content))for(const o of a.content)s(o)}};return s(t),n.trim()&&e.unshift({type:"text",text:n.trim()}),e}function Cn(t){const e=He(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function kn(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function Wt(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function Mn(t){return t.filter(e=>e.status==="queued").sort((e,n)=>e.enqueuedAt-n.enqueuedAt)}function Vt(t,e){return t.some(n=>n.messageId===e.messageId)?t:[...t,e]}function Bt(t,e){return t.filter(n=>n.messageId!==e)}const De=new Map,Ee=new Set;function Ht(t){Ee.add(t)}function Gt(t){return Ee.has(t)}function zt(t){Ee.delete(t)}function ye(t){let e=De.get(t);return e||(e=new ct([]),De.set(t,e)),e}function Ge(t,e){ye(t).update(n=>Vt(n,e))}function we(t,e){ye(t).update(n=>Bt(n,e))}function Xt(t,e){ye(t).set(e)}const be=new Map;function Zt(t,e){be.set(`${t}:${e.id}`,e)}function Yt(t,e){const n=`${t}:${e}`,s=be.get(n);return be.delete(n),s}function Oe(t,e){be.delete(`${t}:${e}`)}async function Z(t,e){try{const n=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!n.ok)return;const s=await n.json();Xt(e,s.items??[])}catch{}}function Tn(t){const e=oe.c(2);let n;e[0]!==t?(n=ye(t),e[0]=t,e[1]=n):n=e[1];const s=n;return y.useSyncExternalStore(s.subscribe,s.get,s.get)}function Jt(){const{org:t}=Y();return{enqueue:Ge,refresh:e=>Z(t.slug,e),cancel:async(e,n)=>{const s=`thread-run:${e}:${n}`;we(e,n);try{const a=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(e)}/cancel/${encodeURIComponent(s)}`,{method:"POST",credentials:"include"});if(!a.ok&&a.status!==404)throw new Error(`Cancel failed: ${a.status}`);return!0}catch(a){return ae.error(a instanceof Error?a.message:"Failed to cancel"),!1}finally{await Z(t.slug,e)}}}}function ne(t,e,n,s){if(!t)return null;const a=e.find(r=>r.id===t.keyId);if(!a)return null;const o=n.find(r=>r.modelId===t.modelId);return o?{...o,keyId:t.keyId}:{modelId:t.modelId,title:s??t.modelId,keyId:t.keyId,providerId:a.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function en(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function tn(t,e,n,s){if(!n||s.length===0)return null;const a=e.find(h=>h.id===n);if(!a)return null;const o=_t([a],{[n]:s}),r=t==="fast"?o.chat.fast:t==="thinking"?o.chat.thinking:o.chat.smart;if(!r)return null;const l=s.find(h=>h.modelId===r.modelId);return l?{...l,keyId:n}:null}const Le=new Set,se=new Set;function ce(t){return y.useSyncExternalStore(t.subscribe,t.get,t.get)}function nn(t){return t.kind==="loading"?"ready":t.kind}const sn=1e4,an=10,Ae=y.createContext(null),_e=y.createContext(null),Re=y.createContext(null),ze=y.createContext(null);function on({children:t}){const{locator:e}=Y(),{virtualMcpId:n}=Be(),[s,a]=le(de.chatSelectedImageModel(e),null),[o,r]=le(de.chatSelectedWebSearchModel(e),null),[l,h]=le(de.chatSelectedDeepResearchModel(e),null),[m,S]=y.useState(null),[C,F]=y.useState("default"),f=It(),[$,W]=le(de.chatSimpleModeTier(e),null),L=en($),k=yt(),M=f.tiers[L],D=m&&k.some(i=>i.id===m)?m:M?.keyId??k[0]?.id??null,{models:v,isLoading:V}=ge(D??void 0),{models:G}=ge(M?.keyId),{models:J}=ge(f.tiers.image?.keyId),{models:w}=ge(f.tiers.web_search?.keyId),{models:B}=ge(f.tiers.deep_research?.keyId),z=ne(M,k,G,M?.title)??tn(L,k,D,v),U=V,H=v.filter(i=>i.capabilities?.includes("image")),j=ne(s,k,H),u=ne(f.tiers.image,k,J,f.tiers.image?.title)??j??H[0]??null,_=v.filter(We),N=ne(o,k,_),ee=_.find(i=>i.modelId==="perplexity/sonar")??_[0]??null,Q=ne(f.tiers.web_search,k,w,f.tiers.web_search?.title)??N??ee,q=v.filter(Ve),T=ne(l,k,q),I=q.find(i=>i.modelId==="perplexity/deep-research")??q.find(i=>i.asyncResearch===!0)??q[0]??null,X=ne(f.tiers.deep_research,k,B,f.tiers.deep_research?.title)??T??I,xe=gt(n)??{id:n,title:"",description:null,icon:null},[Ce,fe]=y.useState({}),Se=(i,R)=>{const P=[];for(const A of R.content??[])A.type==="text"&&A.text?.trim()&&P.push(A.text.trim());const b=P.join(`
23
23
  `);if(!b){he(i);return}new TextEncoder().encode(b).length>sn||fe(A=>Object.keys(A).length>=an&&!(i in A)?A:{...A,[i]:b})},he=i=>{fe(R=>{const{[i]:P,...b}=R;return b})},[re,ke]=le(de.chatLastAgentOption(e),i=>i&&i in Ie?i:null),te=ln(),Me=te?.isThreadLocked&&te.lockedHarness!=null?Dt(te.lockedHarness,te.lockedSandbox):null,Te=Pt(),ve=Ot(re,Te.ready&&!Te.online),me=te?.isThreadLocked?Me:ve,c=me?Ie[me]:null,d=c?.harness??null,O=c?.sandbox??null,[E,p]=y.useState(void 0),x=y.useRef(E);x.current=E;const g={selectedModel:z,setModel:()=>{},credentialId:D,setCredentialId:S,allModelsConnections:k,isModelsLoading:U,selectedVirtualMcp:xe,imageModel:u,setImageModel:i=>{a(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},webSearchModel:Q,setWebSearchModel:i=>{r(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},deepResearchModel:X,setDeepResearchModel:i=>{h(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},chatMode:C,setChatMode:F,appContexts:Ce,setAppContext:Se,clearAppContext:he,tiptapDoc:E,setTiptapDoc:p,tiptapDocRef:x,resetInteraction:()=>{},simpleModeTier:L,setSimpleModeTier:i=>W(i),pendingAgentOption:me,setPendingAgentOption:ke,pendingHarnessId:d,pendingSandboxProviderKind:O};return K.jsx(Re.Provider,{value:g,children:t})}function wn(t){const e=oe.c(41),{virtualMcpId:n,task:s,children:a}=t,{locator:o}=Y(),{data:r}=nt.useSession(),l=r?.user??null,{taskId:h,virtualMcpId:m,navigateToTask:S}=Be(),[C]=st(),{markTaskRead:F}=Ft(),f=ut(),$=h,W=m,L=Nt(W);let k;e[0]!==F||e[1]!==S?(k=(T,I)=>{F(T),S(T,{virtualMcpId:I?.virtualMcpId,autosend:I?.autosend})},e[0]=F,e[1]=S,e[2]=k):k=e[2];const M=k,D=$&&s?.id===$?s:null,v=D?.harness_id??null,V=D?.sandbox_provider_kind??null,G=D?.branch??null,J=v!=null,w=G;let B;e[3]!==w||e[4]!==M||e[5]!==f||e[6]!==n?(B=()=>{const T=crypto.randomUUID();return f.create({id:T,virtual_mcp_id:n,...w?{branch:w}:{}}).then(()=>M(T)).catch(()=>{M(T)}),T},e[3]=w,e[4]=M,e[5]=f,e[6]=n,e[7]=B):B=e[7];const z=B;let U;e[8]!==w||e[9]!==o||e[10]!==M||e[11]!==f||e[12]!==n?(U=T=>{const I=crypto.randomUUID(),X=T.virtualMcpId??n,pe=X===n?w:null;it(sessionStorage,o,I,T.message),f.create({id:I,virtual_mcp_id:X,...pe?{branch:pe}:{}}).then(()=>M(I,{virtualMcpId:T.virtualMcpId,autosend:!0})).catch(()=>{M(I,{virtualMcpId:T.virtualMcpId,autosend:!0})})},e[8]=w,e[9]=o,e[10]=M,e[11]=f,e[12]=n,e[13]=U):U=e[13];const H=U;let j;e[14]!==$||e[15]!==f?(j=T=>{$&&f.setBranch($,T)},e[14]=$,e[15]=f,e[16]=j):j=e[16];let u;e[17]!==D||e[18]!==z||e[19]!==H||e[20]!==w||e[21]!==$||e[22]!==W||e[23]!==J||e[24]!==G||e[25]!==v||e[26]!==V||e[27]!==M||e[28]!==j?(u={virtualMcpId:W,taskId:$,openTask:M,createTask:z,createTaskWithMessage:H,activeTask:D,isThreadLocked:J,lockedHarness:v,lockedSandbox:V,lockedBranch:G,currentBranch:w,setCurrentTaskBranch:j},e[17]=D,e[18]=z,e[19]=H,e[20]=w,e[21]=$,e[22]=W,e[23]=J,e[24]=G,e[25]=v,e[26]=V,e[27]=M,e[28]=j,e[29]=u):u=e[29];const _=u;let N;e[30]!==L||e[31]!==C||e[32]!==S||e[33]!==l?(N={user:l,contextPrompt:L,preferences:C,rawNavigateToTask:S},e[30]=L,e[31]=C,e[32]=S,e[33]=l,e[34]=N):N=e[34];const ee=N;let Q;e[35]!==a||e[36]!==ee?(Q=K.jsx(on,{children:K.jsx(ze.Provider,{value:ee,children:a})}),e[35]=a,e[36]=ee,e[37]=Q):Q=e[37];let q;return e[38]!==Q||e[39]!==_?(q=K.jsx(_e.Provider,{value:_,children:Q}),e[38]=Q,e[39]=_,e[40]=q):q=e[40],q}function En({taskId:t,children:e}){const{virtualMcpId:n,activeTask:s,currentBranch:a}=rn();t&&!Le.has(t)&&(Le.add(t),tt("chat_opened",{thread_id:t}));const{imageModel:o,webSearchModel:r,deepResearchModel:l,chatMode:h,setChatMode:m,appContexts:S,setTiptapDoc:C,simpleModeTier:F,pendingSandboxProviderKind:f,pendingHarnessId:$}=cn(),W=y.useContext(ze);if(!W)throw new Error("ActiveTaskProvider must be used within ChatContextProvider");const{user:L,contextPrompt:k,preferences:M,rawNavigateToTask:D}=W,{org:v,locator:V}=Y(),G=Jt(),[J,w]=y.useState(null),B=qt(),z=qe(),U=lt(),H=Fe(),j=ft({connectionId:mt,orgId:v.id,orgSlug:v.slug}),u=dt(v.slug,t,{client:j});y.use(u.ready);const _=ce(u.messages),N=ce(u.status),ee=ce(u.finishReason),Q=ce(u.runStatusStage),q=ce(u.hasMoreOlder),T=ce(u.isFetchingOlder),I=y.useRef({onToolCall:B,queryClient:z,rawNavigateToTask:D,taskId:t,manager:U,navigate:H,orgId:v.id,orgSlug:v.slug});I.current={onToolCall:B,queryClient:z,rawNavigateToTask:D,taskId:t,manager:U,navigate:H,orgId:v.id,orgSlug:v.slug},xt({orgSlug:v.slug,taskId:t,onTaskStatus:c=>{const d=I.current,O=c.data.message_id;if(c.data.status==="in_progress"&&O){we(d.taskId,O);const E=Yt(d.taskId,O);E&&u.applyLocalMessage(E),Z(d.orgSlug,d.taskId)}Gt(d.taskId)&&(async()=>(await Z(d.orgSlug,d.taskId),await u.reconcileFromServer()&&ye(d.taskId).get().length===0&&zt(d.taskId)))()}}),y.useEffect(()=>{const c={onData:p=>{if(p.type==="data-thread-title"){const x=p.data;if(!x?.title)return;const g=I.current;if(!g.taskId)return;g.manager.patchThread({id:g.taskId,title:x.title,updated_at:new Date().toISOString()});return}if(p.type==="data-deck-updated"){const x=p.data;if(!x?.path)return;const g=x.path,i=I.current;i.queryClient.invalidateQueries({queryKey:ue.orgFsStat(i.orgId,"home",g)}),i.queryClient.invalidateQueries({queryKey:ue.orgFsRecent(i.orgId)}),i.navigate({to:".",search:R=>({...R,main:vt(g)}),replace:!0});return}if(p.type==="data-open-preview"){const x=p.data,g=I.current,i=g.taskId;if(i){const R=g.manager.threads.get().find(P=>P.id===i);g.manager.patchThread({id:i,...x?.branch?{branch:x.branch}:{},...x?.sandboxProviderKind?{sandbox_provider_kind:x.sandboxProviderKind}:{},metadata:{...R?.metadata??{},...x?.githubRepo?{githubRepo:x.githubRepo}:{},...x?.sandboxMap?{sandboxMap:x.sandboxMap}:{}}})}g.navigate({to:".",search:R=>({...R,main:"preview"}),replace:!0});return}},onFinish:(p,x,g)=>{const i=I.current;i.taskId&&Z(i.orgSlug,i.taskId),i.taskId&&i.manager.patchThread({id:i.taskId,status:$t(g,p.parts),updated_at:new Date().toISOString()});const R=p.parts?.some(b=>{const A=b;return(A.type==="tool-share_with_user"||A.type==="tool-bash"||A.type==="tool-write")&&A.state==="output-available"});if(i.taskId&&R){const b=ue.threadOutputs(i.taskId);for(const A of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{i.queryClient.invalidateQueries({queryKey:b})},A)}i.queryClient.invalidateQueries({queryKey:ue.homeNextActions(i.orgSlug)});const P=p.metadata?.thread_id;P&&P!==i.taskId&&i.rawNavigateToTask(P)},onError:p=>{w(p),console.error("[chat] Error",p)},onToolCall:p=>I.current.onToolCall(p)};u.observer=c,Z(I.current.orgSlug,I.current.taskId);const d=p=>p==="submitted"||p==="streaming";let O=d(u.status.get().kind);const E=u.status.subscribe(()=>{const p=d(u.status.get().kind);if(p===O)return;O=p;const x=I.current;Z(x.orgSlug,x.taskId)});return()=>{u.observer===c&&(u.observer=null),E()}},[u]);const X=N.kind==="submitted"||N.kind==="streaming",pe=_.length===0,xe=_.at(-1),Ce=!X&&xe?.role==="assistant"&&xe.parts.some(c=>"state"in c&&c.state==="approval-requested"),fe=s,Se=(fe?.status==="in_progress"||fe?.status==="expired")&&N.kind==="ready"&&_.length>0;async function he(c){const d=t,O=n,E=Object.entries(S),p=E.length>0?E.map(([P,b])=>`### App Context: ${P}
24
24
  ${b}`).join(`
25
25
 
26
26
  `):"",x=[k,p].filter(Boolean).join(`
27
27
 
28
- `);let g=h;g==="gen-image"&&!o&&(g="default"),g==="web-search"&&!r&&(g="default"),g==="deep-research"&&!l&&(g="default"),(g==="web-search"||g==="deep-research")&&m("default");const i=Lt({thread:s?{harness_id:s.harness_id??null,sandbox_provider_kind:s.sandbox_provider_kind??null,branch:s.branch??null}:null,globals:{harnessId:$??void 0,sandboxProviderKind:f??void 0,branch:a}});s?.harness_id||U.patchThread({id:d,harness_id:i.harnessId??"decopilot",sandbox_provider_kind:i.sandboxProviderKind??null,updated_at:new Date().toISOString()});const R={tier:F,mode:g,toolApprovalLevel:M.toolApprovalLevel??at(),system:x||void 0,agent:{id:O},thread_id:d,...i};try{if(X||Se){let P=!0;try{Zt(d,c),await u.enqueue(c,R),Ge(d,{workflowId:`thread-run:${d}:${c.id}`,messageId:c.id,text:Wt(c.parts),hasAttachments:c.parts.some(b=>b.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),Ht(d)}catch(b){P=!1,Oe(d,c.id),we(d,c.id),w(b instanceof Error?b:new Error(String(b))),ae.error(b instanceof Error?b.message:"Failed to queue message")}return Z(v.slug,d),P}return await u.submit({kind:"message",message:c},R),!0}finally{ne.delete(d)}}async function re(c){const d=c.parts??He(c.tiptapDoc);if(d.length===0||ne.has(t))return;ne.add(t),w(null),C(void 0);const O={tiptapDoc:c.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:L?.image??void 0,name:L?.name??"you"}},E={id:crypto.randomUUID(),role:"user",parts:d,metadata:O};await he(E)}async function ke(c,d){if(ne.has(t))return ae.info("Still sending your previous message — try again in a moment"),!1;if(ne.add(t),!await G.cancel(t,c))return ne.delete(t),ae.error("Couldn't remove the original message"),!1;Oe(t,c),u.removeLocalMessage(c);const E={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:d}],metadata:{created_at:new Date().toISOString(),user:{avatar:L?.image??void 0,name:L?.name??"you"}}};try{return await he(E)}catch(p){return ae.error(p instanceof Error?p.message:"Failed to send edited message"),!1}}const te=async()=>{u.stop();try{const c=await fetch(`/api/${v.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(c.status===404)return;if(!c.ok){const d=await c.json().catch(()=>({}));throw new Error(d.message??`Cancel failed: ${c.status}`)}}catch(c){const d=c instanceof Error?c.message:"Failed to cancel";ae.error(d),console.error("[chat] cancelRun",c)}},Me=c=>c&&typeof c=="object"&&"type"in c?re({tiptapDoc:c}):re(c),ve=Ue({strict:!1}).autosend===je;y.useEffect(()=>{if(!ve||_.length>0)return;const c=ot(sessionStorage,V,t);c&&re(c.message).then(()=>{rt(sessionStorage,V,t)})},[ve,_.length,V,t,re]);const me={messages:_,status:en(N),sendMessage:Me,editQueuedMessage:ke,stop:()=>{te()},submit:(c,d)=>u.submit(c,d),removeLocalMessage:c=>u.removeLocalMessage(c),isSendInFlight:()=>ne.has(t),error:J,clearError:()=>w(null),finishReason:ee,runStatusStage:Q,clearFinishReason:()=>u.finishReason.set(null),isStreaming:X,isChatEmpty:pe,isWaitingForApprovals:Ce??!1,isRunInProgress:Se,hasMoreOlder:q,isFetchingOlder:T,fetchOlderMessages:u.fetchOlderMessages.bind(u)};return K.jsx(Ae.Provider,{value:me,children:e})}function An(){const t=y.useContext(Ae);if(!t)throw new Error("useChatStream must be used within ActiveTaskProvider");return t}function _n(){return y.useContext(Ae)}function rn(){const t=y.useContext(_e);if(!t)throw new Error("useChatTask must be used within ChatContextProvider");return t}function cn(){const t=y.useContext(Re);if(!t)throw new Error("useChatPrefs must be used within ChatContextProvider");return t}function Rn(){return y.useContext(Re)}function ln(){return y.useContext(_e)}export{En as A,on as C,In as S,cn as a,An as b,ln as c,rn as d,Tn as e,Jt as f,Oe as g,_n as h,wn as i,kn as j,He as k,Be as l,Rn as m,We as n,Ve as o,bn as p,_t as q,Mn as s,Cn as t,Pt as u};
28
+ `);let g=h;g==="gen-image"&&!o&&(g="default"),g==="web-search"&&!r&&(g="default"),g==="deep-research"&&!l&&(g="default"),(g==="web-search"||g==="deep-research")&&m("default");const i=Lt({thread:s?{harness_id:s.harness_id??null,sandbox_provider_kind:s.sandbox_provider_kind??null,branch:s.branch??null}:null,globals:{harnessId:$??void 0,sandboxProviderKind:f??void 0,branch:a}});s?.harness_id||U.patchThread({id:d,harness_id:i.harnessId??"decopilot",sandbox_provider_kind:i.sandboxProviderKind??null,updated_at:new Date().toISOString()});const R={tier:F,mode:g,toolApprovalLevel:M.toolApprovalLevel??at(),system:x||void 0,agent:{id:O},thread_id:d,...i};try{if(X||Se){let P=!0;try{Zt(d,c),await u.enqueue(c,R),Ge(d,{workflowId:`thread-run:${d}:${c.id}`,messageId:c.id,text:Wt(c.parts),hasAttachments:c.parts.some(b=>b.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),Ht(d)}catch(b){P=!1,Oe(d,c.id),we(d,c.id),w(b instanceof Error?b:new Error(String(b))),ae.error(b instanceof Error?b.message:"Failed to queue message")}return Z(v.slug,d),P}return await u.submit({kind:"message",message:c},R),!0}finally{se.delete(d)}}async function re(c){const d=c.parts??He(c.tiptapDoc);if(d.length===0||se.has(t))return;se.add(t),w(null),C(void 0);const O={tiptapDoc:c.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:L?.image??void 0,name:L?.name??"you"}},E={id:crypto.randomUUID(),role:"user",parts:d,metadata:O};await he(E)}async function ke(c,d){if(se.has(t))return ae.info("Still sending your previous message — try again in a moment"),!1;if(se.add(t),!await G.cancel(t,c))return se.delete(t),ae.error("Couldn't remove the original message"),!1;Oe(t,c),u.removeLocalMessage(c);const E={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:d}],metadata:{created_at:new Date().toISOString(),user:{avatar:L?.image??void 0,name:L?.name??"you"}}};try{return await he(E)}catch(p){return ae.error(p instanceof Error?p.message:"Failed to send edited message"),!1}}const te=async()=>{u.stop();try{const c=await fetch(`/api/${v.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(c.status===404)return;if(!c.ok){const d=await c.json().catch(()=>({}));throw new Error(d.message??`Cancel failed: ${c.status}`)}}catch(c){const d=c instanceof Error?c.message:"Failed to cancel";ae.error(d),console.error("[chat] cancelRun",c)}},Me=c=>c&&typeof c=="object"&&"type"in c?re({tiptapDoc:c}):re(c),ve=Ue({strict:!1}).autosend===je;y.useEffect(()=>{if(!ve||_.length>0)return;const c=ot(sessionStorage,V,t);c&&re(c.message).then(()=>{rt(sessionStorage,V,t)})},[ve,_.length,V,t,re]);const me={messages:_,status:nn(N),sendMessage:Me,editQueuedMessage:ke,stop:()=>{te()},submit:(c,d)=>u.submit(c,d),removeLocalMessage:c=>u.removeLocalMessage(c),isSendInFlight:()=>se.has(t),error:J,clearError:()=>w(null),finishReason:ee,runStatusStage:Q,clearFinishReason:()=>u.finishReason.set(null),isStreaming:X,isChatEmpty:pe,isWaitingForApprovals:Ce??!1,isRunInProgress:Se,hasMoreOlder:q,isFetchingOlder:T,fetchOlderMessages:u.fetchOlderMessages.bind(u)};return K.jsx(Ae.Provider,{value:me,children:e})}function An(){const t=y.useContext(Ae);if(!t)throw new Error("useChatStream must be used within ActiveTaskProvider");return t}function _n(){return y.useContext(Ae)}function rn(){const t=y.useContext(_e);if(!t)throw new Error("useChatTask must be used within ChatContextProvider");return t}function cn(){const t=y.useContext(Re);if(!t)throw new Error("useChatPrefs must be used within ChatContextProvider");return t}function Rn(){return y.useContext(Re)}function ln(){return y.useContext(_e)}export{En as A,on as C,In as S,cn as a,An as b,ln as c,rn as d,Tn as e,Jt as f,Oe as g,_n as h,wn as i,kn as j,He as k,Be as l,Rn as m,We as n,Ve as o,bn as p,_t as q,Mn as s,Cn as t,Pt as u};
@@ -1 +1 @@
1
- import{c as n,l as d,j as c,bE as l,bF as b}from"./index-CfLzEiZE.js";import{i as m}from"./Check-DRoFY1jZ.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=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]=a):a=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]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
1
+ import{c as n,l as d,j as c,bE as l,bF as b}from"./index-CahqzXBe.js";import{i as m}from"./Check-_NhVXSMx.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=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]=a):a=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]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
@@ -1 +1 @@
1
- import{c as a,a as c,r as m,j as o}from"./index-CfLzEiZE.js";import{A as u}from"./auth-split-layout-ChS85L7n.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-CahqzXBe.js";import{A as u}from"./auth-split-layout-CsgIR_R3.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 y,j as t,B as F,i as Z,H as Qe,I as se,E as Pe,r as T,C as le,M as Ge,l as J,bd as Ye,u as Ze,L as Q,t as Xe,e as ae,aZ as ke}from"./index-CfLzEiZE.js";import{E as Ee}from"./empty-state-CXIgu6fC.js";import{u as et,a as Ae}from"./use-collections-m1nM8P9n.js";import{u as ce}from"./use-mcp-client-CJuue6By.js";import{F as ne,a as tt,b as de,d as me}from"./form-DF20JHCC.js";import{I as ue}from"./input-Cd7Q_tEs.js";import{T as re}from"./textarea-IzqtTP1Z.js";import{a as st,b as nt,V as pe,O as ot,M as it}from"./index-CWo50HSr.js";import{am as rt,J as lt,ai as at,Q as ct,aa as dt,an as mt,U as be}from"./agent-icon-Br_7deBR.js";import{g as ut,M as pt,a as Ne}from"./index-D8StYila.js";import{A as xt,a as ft,b as ht}from"./alert-DQU-MhUL.js";import{S as ve,a as Se,b as ye,c as we,d as oe}from"./select-CG_DAKKi.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-CgWOH4wa.js";import{i as jt}from"./AlertCircle-D9jKaKtG.js";import{s as bt}from"./Stars02-K6ZA43p2.js";import{a as Nt}from"./Copy01-BCtHDHXP.js";import{i as vt}from"./Play-D_nFbDM8.js";import{i as St}from"./ChevronRight-XBiVVXqh.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./tools-list-BH8zbMsB.js";import{a as Oe,u as Re}from"./use-connection-Cz9rFuAP.js";import{a as It}from"./use-mcp-tools-CpP2txfP.js";import{M as $t,c as Tt}from"./monaco-editor-OupVhgol.js";import{I as Te}from"./integration-icon-dqIwkJNu.js";import{h as Pt,m as kt}from"./chat-context-DhLGI63r.js";import{u as Et}from"./shell-layout-DvbJaA51.js";import{n as At}from"./Tool02-BMiul4Vu.js";import"./constants-D_FQAPnt.js";import"./auth-C9VNKOPG.js";import"./label-kDzDmQUh.js";import"./index-D8Os79zM.js";import"./sidebar-Cuikqywp.js";import"./LayoutLeft-Cj0yR17U.js";import"./use-mobile-B3nnRQ-H.js";import"./X-DRao_8d8.js";import"./ZoomOut-v_oEGRX-.js";import"./Key01-Cr9DTgNd.js";import"./extract-connection-data-BP3pz5Md.js";import"./use-registry-connections-RYZ52qIV.js";import"./use-organization-settings-CcZSJgrn.js";import"./studio-tools-1eYDX3Oc.js";import"./Plus-I8MrkIiI.js";import"./index-LiqndFWN.js";import"./index-Cv2_43At.js";import"./popover-CAVX4tJ7.js";import"./use-virtual-mcp-DD1BP3OK.js";import"./Check-DRoFY1jZ.js";import"./SearchMd-D6sFx8Mr.js";import"./Users03-ByVMXMZu.js";import"./use-create-virtual-mcp-By8xHfZo.js";import"./use-navigate-to-agent-oYZab9rM.js";import"./hooks-DYQmWEJE.js";import"./decopilot-sse-pool-CwqfRM01.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./UserPlus01-C3Lxpb7g.js";import"./Tool01-C6qtV-8G.js";import"./ArrowUp-Bh_Wxm8y.js";import"./Settings02-BVibCz3N.js";import"./XCircle-CTIZ1yaQ.js";import"./ArrowUpRight-jtciLzcd.js";import"./TrendUp01-CFLEmN28.js";import"./ZapSquare-CUhDGLkD.js";import"./CheckCircle-CV-bgnk_.js";import"./ChevronDown-BDEk_-et.js";import"./ChevronUp-DxeZOGvu.js";import"./Circle-cRSTXKuZ.js";import"./DotsVertical-CQ4GIDlw.js";import"./Globe01-m1rF9f3K.js";import"./Eye-CRKS3-RJ.js";import"./FilterLines-gGvwXdP1.js";import"./Flag01-CPRmw5vG.js";import"./Star01-BImm_bom.js";import"./Globe04-DeQ6tYB5.js";import"./SwitchHorizontal01-B2fiZwGo.js";import"./HardDrive-C3qDTbF4.js";import"./LinkExternal01-tGLpDLEH.js";import"./List-Cxl23UNX.js";import"./Monitor01-CrXgGvev.js";import"./Sun-BAQt9e3_.js";import"./Package-BY7kf48b.js";import"./Palette-Cq3EaLGT.js";import"./SearchLg-469v_tHW.js";import"./Shield01-C4fJk111.js";import"./Stars01-D16Lkqom.js";import"./Trash01-Buc2Et94.js";import"./Upload01-BtSbyzb2.js";import"./User01-W0LTtPcW.js";import"./Users01-CWgpdpN9.js";import"./XClose-CD0FZtT0.js";import"./Zap-B5VKBEnn.js";import"./mcp-oauth-CPkFAj__.js";import"./badge-D4NPYwXp.js";import"./index-B0fZRciF.js";import"./autosend-C1nqxmws.js";import"./use-ai-providers-CbXVtnEM.js";import"./use-decopilot-events-DjSP1yLt.js";import"./tab-id-BijBBRwE.js";import"./avatar-Dkunhm0O.js";import"./dialog-BpG00RHb.js";import"./alert-dialog-5yg0Hi1S.js";import"./required-auth-layout-D6iWtzpZ.js";import"./use-org-sso-r8XKUEOM.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:i,isSaving:r,saveLabel:a,undoLabel:c}=s,l=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!i)return null;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(rt,{size:14}),e[0]=p):p=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[p,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let x;e[5]!==r?(x=r?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(lt,{size:14}),e[5]=r,e[6]=x):x=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==l||e[10]!==x?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":l,children:[x,l]}),e[7]=r,e[8]=o,e[9]=l,e[10]=x,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Qe({title:se().min(1),description:se().nullable(),body:se()});function ie(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let i;e[1]!==o.control?(i=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Dt})]})]}),e[1]=o.control,e[2]=i):i=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let l;e[7]!==i||e[8]!==c?(l=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:[i,c]}),e[7]=i,e[8]=c,e[9]=l):l=e[9];let u;return e[10]!==o||e[11]!==l?(u=t.jsx(tt,{...o,children:l}),e[10]=o,e[11]=l,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",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"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:i}=le(),r=o||null;let a;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(a={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),l=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),p=u.update.isPending;let m;e[4]!==l?(m=l?{title:l.title,description:l.description??null,body:ie(l)}:void 0,e[4]=l,e[5]=m):m=e[5];let x;e[6]!==m?(x={values:m},e[6]=m,e[7]=x):x=e[7];const f=Ge(x);let g;e[8]!==f||e[9]!==l?(g=()=>{l&&f.reset({title:l.title,description:l.description??null,body:ie(l)})},e[8]=f,e[9]=l,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:ie(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!l){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==l.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:l.title}),e[16]=l.title,e[17]=$):$=e[17];let E;e[18]!==l.description?(E=l.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:l.description})]}):null,e[18]=l.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==p||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:p})}),e[25]=f.formState.isDirty,e[26]=p,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(pe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const i=n;if(!i){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:i,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("min-w-0 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function G(s){const e=y.c(10);let o,n,i;e[0]!==s?({asChild:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=J("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==i||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...i}),e[6]=r,e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("text-foreground font-medium truncate",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,i;e[0]!==s?({children:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);let r;e[4]!==n?(r=J("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==i||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...i,children:a}),e[8]=i,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:i,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const l=wt(c);if(!l.isAuthenticated){let m;return e[2]!==l.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(it,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let p;return e[5]!==n||e[6]!==r||e[7]!==i||e[8]!==u||e[9]!==o?(p=t.jsx(Jt,{toolName:o,connectionId:n,siblings:i,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=i,e[8]=u,e[9]=o,e[10]=p):p=e[10],p}function Jt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:i}=Ze({strict:!1}),r=(()=>{if(!i)return null;const d=`replay-${i}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,l]=T.useState(a??{}),[u,p]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,x]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=le(),k=Oe(e),N=Pt(),A=kt(),{openSidePanel:U}=Et(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),V=d=>{if(!N)return;const h=Tt(d.content);h.content.length>0&&(U("chat"),N.sendMessage({tiptapDoc:h}))},[M,X]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(X("ui"),Le(!0));const xe=j?.inputSchema?.properties,fe=xe?Object.keys(xe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),x(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const D=u.trim();if(!D)return{};const B=JSON.parse(D);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([D,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[D]=="string")try{h[D]=JSON.parse(h[D])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[D]=="string"&&h[D]!==""){const je=Number(h[D]);Number.isNaN(je)||(h[D]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);x(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{l(v=>({...v,[d]:h}))},Be=()=>{x(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Je=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(De,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Ve=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:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>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:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>p(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):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:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=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:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&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(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(xt,{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(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.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("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(pt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:V,onUpdateModelContext:d=>A?.setAppContext(z,d),onTeardown:()=>A?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx($t,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{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(m,null,2)),Xe.success("Copied to clipboard")},children:t.jsx(Nt,{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(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(pe,{breadcrumb:Je,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(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),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:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):L.isLoading?t.jsx(Z,{size:10,className:"animate-spin 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:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.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:"Instance"}),he]}),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:Ve}),qe]})})]})})}function Vt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:i}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(x=>x.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const l=c;if(!Oe(l||void 0)||!l){let x;return e[3]===Symbol.for("react.memo_cache_sentinel")?(x=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:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=x):x=e[3],x}let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=p):p=e[4];let m;return e[5]!==l||e[6]!==i||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:p,children:t.jsx(Ft,{toolName:o,connectionId:l,siblings:n,onSelectInstance:a,onBack:i})}),e[5]=l,e[6]=i,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:i,description:r,buttonProps:a,buttonComponent:c,className:l,children:u}=s;let p;e[0]!==l?(p=J("flex flex-col items-center justify-center py-16 text-center",l),e[0]=l,e[1]=p):p=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let x;e[5]!==i?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:i}),e[5]=i,e[6]=x):x=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==x||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[x,f]}),e[9]=x,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:J(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==p||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:p,children:[m,g,S,u]}),e[15]=u,e[16]=p,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const l=c,u=Wt;let p;return s[5]!==l||s[6]!==i||s[7]!==a?(p=t.jsx(Vt,{itemId:i,siblings:a,onBack:l,onUpdate:u}),s[5]=l,s[6]=i,s[7]=a,s[8]=p):p=s[8],p}async function Wt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Gt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:l}=le();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,x=m?.id??"",f=x||"no-connection",g=x??null;let S;s[5]!==l.id||s[6]!==l.slug||s[7]!==g?(S={connectionId:g,orgId:l.id,orgSlug:l.slug},s[5]=l.id,s[6]=l.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,i,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==i?(P=i?.toLowerCase(),s[12]=i,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==i?(C=Qt(i),s[14]=i,s[15]=C):C=s[15];const k=C;let N;s[16]!==l.slug?(N=t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections",params:{org:l.slug},children:"Connections"})})}),s[16]=l.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==i||s[20]!==m||s[21]!==l.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:n.appSlug},search:{tab:i},children:m.title})})}),t.jsx(Y,{})]}),s[19]=i,s[20]=m,s[21]=l.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(De,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let V;return s[38]!==L||s[39]!==O?(V=t.jsx(pe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=V):V=s[40],V}function Yt(){const s=y.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 o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Gt,{}),s[2]=r):r=s[2],r}function Qn(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Qn as default};
1
+ import{c as y,j as t,B as F,i as Z,H as Qe,I as se,E as Pe,r as T,C as le,M as Ge,l as J,bd as Ye,u as Ze,L as Q,t as Xe,e as ae,aZ as ke}from"./index-CahqzXBe.js";import{E as Ee}from"./empty-state-QG3MGYmA.js";import{u as et,a as Ae}from"./use-collections-DLBSxhmH.js";import{u as ce}from"./use-mcp-client-CiUDzz1B.js";import{F as ne,a as tt,b as de,d as me}from"./form-ygsxHIqV.js";import{I as ue}from"./input-xSFHn6TQ.js";import{T as re}from"./textarea-Ck09ftSq.js";import{a as st,b as nt,V as pe,O as ot,M as it}from"./index-GlxOmFGT.js";import{am as rt,J as lt,ai as at,Q as ct,aa as dt,an as mt,U as be}from"./agent-icon-BPaG9QEC.js";import{g as ut,M as pt,a as Ne}from"./index-BA4RxhWi.js";import{A as xt,a as ft,b as ht}from"./alert-BgojbBCU.js";import{S as ve,a as Se,b as ye,c as we,d as oe}from"./select-BCk-r-KQ.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-OfH0JBEY.js";import{i as jt}from"./AlertCircle-B6fSS9Nr.js";import{s as bt}from"./Stars02-D0RWMzz9.js";import{a as Nt}from"./Copy01-9KczXiyU.js";import{i as vt}from"./Play-DgwPUBp-.js";import{i as St}from"./ChevronRight-KD2aJSIy.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./tools-list-D56yr0ag.js";import{a as Oe,u as Re}from"./use-connection-CFK6XdEQ.js";import{a as It}from"./use-mcp-tools-BQv2doq_.js";import{M as $t,c as Tt}from"./monaco-editor-87BARCr6.js";import{I as Te}from"./integration-icon-DOUqIxQC.js";import{h as Pt,m as kt}from"./chat-context-B59Ax4J3.js";import{u as Et}from"./shell-layout-BX9xNgc_.js";import{n as At}from"./Tool02-D5O4T858.js";import"./constants-D_FQAPnt.js";import"./auth-NNXwkbur.js";import"./label-Bry7qC_F.js";import"./index-beWplTZW.js";import"./sidebar-h9kX-HrJ.js";import"./LayoutLeft-BSUtodmV.js";import"./use-mobile-BbbfeIos.js";import"./X-szfsPB5I.js";import"./ZoomOut-Dvwu8cm9.js";import"./Key01-CWKfoWKt.js";import"./extract-connection-data-Chim8x32.js";import"./use-registry-connections-D1PHHgBU.js";import"./use-organization-settings-veOuHbzE.js";import"./studio-tools-VmhEMLj1.js";import"./Plus-Cdpb6m4l.js";import"./index-CTalp9el.js";import"./index-B0qkpg03.js";import"./popover-CNsKnW9O.js";import"./use-virtual-mcp-BU3Eyx1w.js";import"./Check-_NhVXSMx.js";import"./SearchMd-jgaWGeOz.js";import"./Users03-BHyOeQTw.js";import"./use-create-virtual-mcp-DHdAzyo8.js";import"./use-navigate-to-agent-wXgVJPh8.js";import"./hooks-DjlilSA5.js";import"./decopilot-sse-pool-BuypN71j.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./UserPlus01-xoPWWzx5.js";import"./Tool01-BnjD9Qbg.js";import"./ArrowUp-DW0ypUeN.js";import"./Settings02-DxvjpB3E.js";import"./XCircle-D2s4I9UN.js";import"./ArrowUpRight-aNuYEP8-.js";import"./TrendUp01-aooN09Df.js";import"./ZapSquare-DhHlpHUI.js";import"./CheckCircle-_QjokS7c.js";import"./ChevronDown-CVZkvJdC.js";import"./ChevronUp-BPx3UUoH.js";import"./Circle-CAJa_9z1.js";import"./DotsVertical-CSUM9S94.js";import"./Globe01-D3lu_PxS.js";import"./Eye-VM-QjfJ4.js";import"./FilterLines-410KjREJ.js";import"./Flag01-BKZcNuf-.js";import"./Star01-CgPgwHJ2.js";import"./Globe04-DVGalWs5.js";import"./SwitchHorizontal01-kkjfEgm2.js";import"./HardDrive-DJrRKGEp.js";import"./LinkExternal01-DOER_79f.js";import"./List-Mzj7E1e7.js";import"./Monitor01-CbILz4iM.js";import"./Sun-Be8x2ETo.js";import"./Package-C0PZARZA.js";import"./Palette-zXOXvzYd.js";import"./SearchLg-DqauO0tY.js";import"./Shield01-1r7dqb60.js";import"./Stars01-Dj55gpJB.js";import"./Trash01-CI4fi--V.js";import"./Upload01-MhBbHGeb.js";import"./User01-Cf3IiQjj.js";import"./Users01-CI2RyDXH.js";import"./XClose-D4RYCPSX.js";import"./Zap-BN7uLlIg.js";import"./mcp-oauth-CE1QaQRx.js";import"./badge-YRQ_JPpL.js";import"./index-slw1ux2A.js";import"./autosend-DsTcpmxU.js";import"./use-ai-providers-CrNcf2Wt.js";import"./use-decopilot-events-Czr8tl2D.js";import"./tab-id-BijBBRwE.js";import"./avatar-DuqzO83Z.js";import"./dialog-D9N9pUie.js";import"./alert-dialog-BialD_ZU.js";import"./required-auth-layout-CwGpFQKN.js";import"./use-org-sso-Boyxd-_6.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:i,isSaving:r,saveLabel:a,undoLabel:c}=s,l=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!i)return null;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(rt,{size:14}),e[0]=p):p=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[p,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let x;e[5]!==r?(x=r?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(lt,{size:14}),e[5]=r,e[6]=x):x=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==l||e[10]!==x?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":l,children:[x,l]}),e[7]=r,e[8]=o,e[9]=l,e[10]=x,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Qe({title:se().min(1),description:se().nullable(),body:se()});function ie(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let i;e[1]!==o.control?(i=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Dt})]})]}),e[1]=o.control,e[2]=i):i=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let l;e[7]!==i||e[8]!==c?(l=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:[i,c]}),e[7]=i,e[8]=c,e[9]=l):l=e[9];let u;return e[10]!==o||e[11]!==l?(u=t.jsx(tt,{...o,children:l}),e[10]=o,e[11]=l,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",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"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:i}=le(),r=o||null;let a;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(a={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),l=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),p=u.update.isPending;let m;e[4]!==l?(m=l?{title:l.title,description:l.description??null,body:ie(l)}:void 0,e[4]=l,e[5]=m):m=e[5];let x;e[6]!==m?(x={values:m},e[6]=m,e[7]=x):x=e[7];const f=Ge(x);let g;e[8]!==f||e[9]!==l?(g=()=>{l&&f.reset({title:l.title,description:l.description??null,body:ie(l)})},e[8]=f,e[9]=l,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:ie(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!l){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==l.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:l.title}),e[16]=l.title,e[17]=$):$=e[17];let E;e[18]!==l.description?(E=l.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:l.description})]}):null,e[18]=l.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==p||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:p})}),e[25]=f.formState.isDirty,e[26]=p,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(pe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const i=n;if(!i){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:i,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("min-w-0 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function G(s){const e=y.c(10);let o,n,i;e[0]!==s?({asChild:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=J("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==i||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...i}),e[6]=r,e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("text-foreground font-medium truncate",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,i;e[0]!==s?({children:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);let r;e[4]!==n?(r=J("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==i||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...i,children:a}),e[8]=i,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:i,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const l=wt(c);if(!l.isAuthenticated){let m;return e[2]!==l.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(it,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let p;return e[5]!==n||e[6]!==r||e[7]!==i||e[8]!==u||e[9]!==o?(p=t.jsx(Jt,{toolName:o,connectionId:n,siblings:i,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=i,e[8]=u,e[9]=o,e[10]=p):p=e[10],p}function Jt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:i}=Ze({strict:!1}),r=(()=>{if(!i)return null;const d=`replay-${i}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,l]=T.useState(a??{}),[u,p]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,x]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=le(),k=Oe(e),N=Pt(),A=kt(),{openSidePanel:U}=Et(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),V=d=>{if(!N)return;const h=Tt(d.content);h.content.length>0&&(U("chat"),N.sendMessage({tiptapDoc:h}))},[M,X]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(X("ui"),Le(!0));const xe=j?.inputSchema?.properties,fe=xe?Object.keys(xe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),x(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const D=u.trim();if(!D)return{};const B=JSON.parse(D);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([D,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[D]=="string")try{h[D]=JSON.parse(h[D])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[D]=="string"&&h[D]!==""){const je=Number(h[D]);Number.isNaN(je)||(h[D]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);x(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{l(v=>({...v,[d]:h}))},Be=()=>{x(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Je=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(De,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Ve=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:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>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:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>p(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):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:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=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:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&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(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(xt,{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(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.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("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(pt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:V,onUpdateModelContext:d=>A?.setAppContext(z,d),onTeardown:()=>A?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx($t,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{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(m,null,2)),Xe.success("Copied to clipboard")},children:t.jsx(Nt,{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(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(pe,{breadcrumb:Je,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(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),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:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):L.isLoading?t.jsx(Z,{size:10,className:"animate-spin 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:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.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:"Instance"}),he]}),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:Ve}),qe]})})]})})}function Vt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:i}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(x=>x.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const l=c;if(!Oe(l||void 0)||!l){let x;return e[3]===Symbol.for("react.memo_cache_sentinel")?(x=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:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=x):x=e[3],x}let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=p):p=e[4];let m;return e[5]!==l||e[6]!==i||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:p,children:t.jsx(Ft,{toolName:o,connectionId:l,siblings:n,onSelectInstance:a,onBack:i})}),e[5]=l,e[6]=i,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:i,description:r,buttonProps:a,buttonComponent:c,className:l,children:u}=s;let p;e[0]!==l?(p=J("flex flex-col items-center justify-center py-16 text-center",l),e[0]=l,e[1]=p):p=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let x;e[5]!==i?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:i}),e[5]=i,e[6]=x):x=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==x||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[x,f]}),e[9]=x,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:J(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==p||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:p,children:[m,g,S,u]}),e[15]=u,e[16]=p,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const l=c,u=Wt;let p;return s[5]!==l||s[6]!==i||s[7]!==a?(p=t.jsx(Vt,{itemId:i,siblings:a,onBack:l,onUpdate:u}),s[5]=l,s[6]=i,s[7]=a,s[8]=p):p=s[8],p}async function Wt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Gt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:l}=le();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,x=m?.id??"",f=x||"no-connection",g=x??null;let S;s[5]!==l.id||s[6]!==l.slug||s[7]!==g?(S={connectionId:g,orgId:l.id,orgSlug:l.slug},s[5]=l.id,s[6]=l.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,i,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==i?(P=i?.toLowerCase(),s[12]=i,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==i?(C=Qt(i),s[14]=i,s[15]=C):C=s[15];const k=C;let N;s[16]!==l.slug?(N=t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections",params:{org:l.slug},children:"Connections"})})}),s[16]=l.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==i||s[20]!==m||s[21]!==l.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:n.appSlug},search:{tab:i},children:m.title})})}),t.jsx(Y,{})]}),s[19]=i,s[20]=m,s[21]=l.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(De,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let V;return s[38]!==L||s[39]!==O?(V=t.jsx(pe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=V):V=s[40],V}function Yt(){const s=y.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 o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Gt,{}),s[2]=r):r=s[2],r}function Qn(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Qn as default};
@@ -1 +1 @@
1
- import{c as B,j as s,l as M,B as V}from"./index-CfLzEiZE.js";import{d as z,a as _,c as $,D as E}from"./dropdown-menu-aio24EQt.js";import{i as L,n as O}from"./ArrowUp-Bh_Wxm8y.js";import{i as S}from"./Check-DRoFY1jZ.js";import{i as R,c as A}from"./SwitchHorizontal01-B2fiZwGo.js";import{i as F}from"./List-Cxl23UNX.js";import{T as I,a as K,c as P,b as W}from"./tooltip-CgWOH4wa.js";import{V as q}from"./view-mode-toggle-BiAhl434.js";import{B as G}from"./badge-D4NPYwXp.js";function le(t){const e=B.c(31),{viewMode:r,onViewModeChange:x,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==x||e[15]!==r?(a=x&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:x,fullWidth:!0,options:[{value:"table",icon:s.jsx(F,{})},{value:"cards",icon:s.jsx(A,{})}]})}),e[14]=x,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&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:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("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:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let m;e[24]!==a||e[25]!==c||e[26]!==d?(m=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=m):m=e[27];let k;return e[28]!==n||e[29]!==m?(k=s.jsxs(E,{children:[n,m]}),e[28]=n,e[29]=m,e[30]=k):k=e[30],k}function H(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 r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&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 J(t){return t.value!=="ALL"}export{le as C};
1
+ import{c as B,j as s,l as M,B as V}from"./index-CahqzXBe.js";import{d as z,a as _,c as $,D as E}from"./dropdown-menu-DkH3cZ6a.js";import{i as L,n as O}from"./ArrowUp-DW0ypUeN.js";import{i as S}from"./Check-_NhVXSMx.js";import{i as R,c as A}from"./SwitchHorizontal01-kkjfEgm2.js";import{i as F}from"./List-Mzj7E1e7.js";import{T as I,a as K,c as P,b as W}from"./tooltip-OfH0JBEY.js";import{V as q}from"./view-mode-toggle-DQruJ1q6.js";import{B as G}from"./badge-YRQ_JPpL.js";function le(t){const e=B.c(31),{viewMode:r,onViewModeChange:x,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==x||e[15]!==r?(a=x&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:x,fullWidth:!0,options:[{value:"table",icon:s.jsx(F,{})},{value:"cards",icon:s.jsx(A,{})}]})}),e[14]=x,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&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:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("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:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let m;e[24]!==a||e[25]!==c||e[26]!==d?(m=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=m):m=e[27];let k;return e[28]!==n||e[29]!==m?(k=s.jsxs(E,{children:[n,m]}),e[28]=n,e[29]=m,e[30]=k):k=e[30],k}function H(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 r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&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 J(t){return t.value!=="ALL"}export{le as C};
@@ -1 +1 @@
1
- import{c as v,l as b,j as a,i as w}from"./index-CfLzEiZE.js";import{i as C}from"./SearchMd-D6sFx8Mr.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=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 h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{size:16,className:"animate-spin 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]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,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]=p,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{S as C};
1
+ import{c as v,l as b,j as a,i as w}from"./index-CahqzXBe.js";import{i as C}from"./SearchMd-jgaWGeOz.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=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 h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{size:16,className:"animate-spin 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]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,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]=p,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{S as C};
@@ -1 +1 @@
1
- import{c as k,j as s,l as C}from"./index-CfLzEiZE.js";import{e as S,d as R,a as T,T as H,b as L,c as z}from"./table-BGqdTzVX.js";import{i as D,n as E}from"./ArrowUp-Bh_Wxm8y.js";function I(y){const e=k.c(29),{columns:r,data:f,sortKey:x,sortDirection:u,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==u?(p=function(t,h){return s.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&u&&(u==="asc"?s.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):s.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=u,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===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]=d):d=e[2];const a=d;let l;if(e[3]!==r||e[4]!==i||e[5]!==b||e[6]!==x){let o;e[8]!==r.length||e[9]!==i||e[10]!==b||e[11]!==x?(o=(t,h)=>{const N=x===t.id;return s.jsx(S,{className:C(a(h,r.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=r.length,e[9]=i,e[10]=b,e[11]=x,e[12]=o):o=e[12],l=r.map(o),e[3]=r,e[4]=i,e[5]=b,e[6]=x,e[7]=l}else l=e[7];let g;e[13]!==l?(g=s.jsx(R,{className:"border-b-0",children:s.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:l})}),e[13]=l,e[14]=g):g=e[14];let j;if(e[15]!==r||e[16]!==f||e[17]!==n||e[18]!==c){let o;e[20]!==r||e[21]!==n||e[22]!==c?(o=(t,h)=>{const N=c?.(t);return s.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:r.map(m=>s.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:s.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(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=r,e[21]=n,e[22]=c,e[23]=o):o=e[23],j=f.map(o),e[15]=r,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=s.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=s.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(12),{columns:r,data:f,isLoading:x,sortKey:u,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(x===void 0?!1:x){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let l;return e[3]!==a?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=l):l=e[4],l}let d;return e[5]!==r||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==u?(d=s.jsx("div",{className:"flex-1",children:s.jsx(I,{columns:r,data:f,sortKey:u,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=r,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=u,e[11]=d):d=e[11],d}export{B as C};
1
+ import{c as k,j as s,l as C}from"./index-CahqzXBe.js";import{e as S,d as R,a as T,T as H,b as L,c as z}from"./table-BlPJa_8m.js";import{i as D,n as E}from"./ArrowUp-DW0ypUeN.js";function I(y){const e=k.c(29),{columns:r,data:f,sortKey:x,sortDirection:u,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==u?(p=function(t,h){return s.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&u&&(u==="asc"?s.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):s.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=u,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===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]=d):d=e[2];const a=d;let l;if(e[3]!==r||e[4]!==i||e[5]!==b||e[6]!==x){let o;e[8]!==r.length||e[9]!==i||e[10]!==b||e[11]!==x?(o=(t,h)=>{const N=x===t.id;return s.jsx(S,{className:C(a(h,r.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=r.length,e[9]=i,e[10]=b,e[11]=x,e[12]=o):o=e[12],l=r.map(o),e[3]=r,e[4]=i,e[5]=b,e[6]=x,e[7]=l}else l=e[7];let g;e[13]!==l?(g=s.jsx(R,{className:"border-b-0",children:s.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:l})}),e[13]=l,e[14]=g):g=e[14];let j;if(e[15]!==r||e[16]!==f||e[17]!==n||e[18]!==c){let o;e[20]!==r||e[21]!==n||e[22]!==c?(o=(t,h)=>{const N=c?.(t);return s.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:r.map(m=>s.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:s.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(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=r,e[21]=n,e[22]=c,e[23]=o):o=e[23],j=f.map(o),e[15]=r,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=s.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=s.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(12),{columns:r,data:f,isLoading:x,sortKey:u,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(x===void 0?!1:x){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let l;return e[3]!==a?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=l):l=e[4],l}let d;return e[5]!==r||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==u?(d=s.jsx("div",{className:"flex-1",children:s.jsx(I,{columns:r,data:f,sortKey:u,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=r,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=u,e[11]=d):d=e[11],d}export{B as C};
@@ -1 +1 @@
1
- import{c as f,l as u,j as m}from"./index-CfLzEiZE.js";import{B as g}from"./badge-D4NPYwXp.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
1
+ import{c as f,l as u,j as m}from"./index-CahqzXBe.js";import{B as g}from"./badge-YRQ_JPpL.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
@@ -1 +1 @@
1
- import{c as d,l as i,j as n}from"./index-CfLzEiZE.js";import{_ as m}from"./index-Cv2_43At.js";import{e as k,a as N,h as j,D as w,d as y}from"./dialog-BpG00RHb.js";import{i as b}from"./SearchMd-D6sFx8Mr.js";function C(a){const e=d.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 o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(w,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{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]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(y,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);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 o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(b,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.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 o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.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(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.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 o;e[3]!==t?(o=i("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]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.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 o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.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 o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,B as f,S as g};
1
+ import{c as d,l as i,j as n}from"./index-CahqzXBe.js";import{_ as m}from"./index-B0qkpg03.js";import{e as k,a as N,h as j,D as w,d as y}from"./dialog-D9N9pUie.js";import{i as b}from"./SearchMd-jgaWGeOz.js";function C(a){const e=d.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 o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(w,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{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]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(y,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);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 o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(b,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.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 o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.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(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.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 o;e[3]!==t?(o=i("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]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.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 o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.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 o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,B as f,S as g};