@openhands/agent-canvas 1.16.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (956) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{acp-providers-CX3Lh9gj.js → acp-providers-DrjNsPOH.js} +1 -1
  4. package/build/assets/active-backend-context-rZiLJRUc.js +2 -0
  5. package/build/assets/{agent-context-settings-DSZlXrLj.js → agent-context-settings-CJUrcBut.js} +1 -1
  6. package/build/assets/agent-profiles-service.api-Biieml2L.js +1 -0
  7. package/build/assets/agent-profiles-settings-x6RvPsq7.js +1 -0
  8. package/build/assets/agent-server-client-options-BikiNwTa.js +1 -0
  9. package/build/assets/agent-server-conversation-service.api-DYFsNHKf.js +88 -0
  10. package/build/assets/agent-settings-BJyovpJ_.js +1 -0
  11. package/build/assets/agent-settings-CpY3zObk.js +2 -0
  12. package/build/assets/{alert-banner-HP6mX-Vr.js → alert-banner-vARz1idS.js} +1 -1
  13. package/build/assets/{api-error-message-B-XdSk3b.js → api-error-message-Ve79qDcN.js} +1 -1
  14. package/build/assets/api-key-entry-screen-CsMuBhoP.js +1 -0
  15. package/build/assets/{app-settings-dbnneVaV.js → app-settings-BaJ7nfHt.js} +1 -1
  16. package/build/assets/automation-detail-CVoGDrKq.js +3 -0
  17. package/build/assets/{automation-export-D3a3of4G.js → automation-export-DxY47m3T.js} +1 -1
  18. package/build/assets/automation-git-sync-CRMP9Bbm.js +1 -0
  19. package/build/assets/automation-setup-route-072beLz1.js +3 -0
  20. package/build/assets/{automation-templates-BRppNh99.js → automation-templates-4C4PM8K7.js} +1 -1
  21. package/build/assets/automations-list-xuqTSQL4.js +1 -0
  22. package/build/assets/{back-nav-button-Cjl_hoxq.js → back-nav-button-B8tH0BEp.js} +1 -1
  23. package/build/assets/backend-form-modal-0aJmWdsa.js +1 -0
  24. package/build/assets/{backend-synced-settings-badge-DPkz30BE.js → backend-synced-settings-badge-B7rKWBir.js} +1 -1
  25. package/build/assets/{badge-BU3S0VtE.js → badge-CcGx2TaV.js} +1 -1
  26. package/build/assets/{base-modal-D_L0oEbG.js → base-modal-DTULovNc.js} +1 -1
  27. package/build/assets/bot-CLMxGFaq.js +1 -0
  28. package/build/assets/{brand-button-BAfk4wGP.js → brand-button-DxPO4Lf8.js} +1 -1
  29. package/build/assets/{browser-DSAo0tz1.js → browser-C-_qBasq.js} +2 -2
  30. package/build/assets/{browser-tab-C9vy56R5.js → browser-tab-DZanIw5m.js} +1 -1
  31. package/build/assets/{canvas-extension-page-dx1gFrfW.js → canvas-extension-page-o_cWgE9B.js} +1 -1
  32. package/build/assets/canvas-extensions-DSgNlCha.js +1 -0
  33. package/build/assets/{canvas-extensions-runtime-2_x5Ezmi.js → canvas-extensions-runtime-DdnkgJXV.js} +1 -1
  34. package/build/assets/{chat-send-button-MUQqCZCS.js → chat-send-button-B3SFSIg5.js} +1 -1
  35. package/build/assets/check-fDEfgSzj.js +1 -0
  36. package/build/assets/chevron-down-CFrWHqu8.js +1 -0
  37. package/build/assets/chevron-right-C5roOrJu.js +1 -0
  38. package/build/assets/circle-check-ClTzJTdb.js +1 -0
  39. package/build/assets/{circle-plus-check-toggle-BO_kFZt3.js → circle-plus-check-toggle-Fr-h-mbL.js} +1 -1
  40. package/build/assets/{cloud-funnel-analytics-CztBCCPp.js → cloud-funnel-analytics-BQanUEEC.js} +1 -1
  41. package/build/assets/{cog-D-MPQW6G.js → cog-VBlRo6iw.js} +1 -1
  42. package/build/assets/command-menu-BT3Ia5Ru.js +1 -0
  43. package/build/assets/commits-tab-2jhtaohl.js +1 -0
  44. package/build/assets/{condenser-settings-DmEOje-7.js → condenser-settings-eVKFMvap.js} +1 -1
  45. package/build/assets/confirmation-modal-gIFHeZt6.js +1 -0
  46. package/build/assets/{context-menu-list-item-I86vKcmM.js → context-menu-list-item-DDROe12Z.js} +1 -1
  47. package/build/assets/conversation-BnjJSFf5.js +93 -0
  48. package/build/assets/conversation-DZ578rOX.js +1 -0
  49. package/build/assets/conversation-panel-DZ578rOX.js +1 -0
  50. package/build/assets/{conversation-state-store-B0ImPLHO.js → conversation-state-store-D1_G_9I-.js} +1 -1
  51. package/build/assets/{conversation-store-Ca3ghXap.js → conversation-store-DVVfkCsk.js} +1 -1
  52. package/build/assets/{conversation-tab-empty-state-FIbh_lc8.js → conversation-tab-empty-state-DKlzAz5c.js} +1 -1
  53. package/build/assets/{copy-to-clipboard-button-Ca8iSkkA.js → copy-to-clipboard-button-B3w0X7WH.js} +1 -1
  54. package/build/assets/{device-verify-Bhn2e_Ye.js → device-verify-BfkCzyFB.js} +1 -1
  55. package/build/assets/{dropdown-classes-Bc1djN0-.js → dropdown-classes-B9kJVDIk.js} +1 -1
  56. package/build/assets/edit-automation-modal-BwhJ39JT.js +1 -0
  57. package/build/assets/empty-state-RZz0OfnY.js +1 -0
  58. package/build/assets/{entry.client-CqyPPjOq.js → entry.client-Ds8LVp-E.js} +2 -2
  59. package/build/assets/enum-filter-dropdown-C4pW0ORd.js +1 -0
  60. package/build/assets/{environment-switch-overlay-BmBRT7gv.js → environment-switch-overlay-P2ZAuzov.js} +1 -1
  61. package/build/assets/{error-state-Body8Ngd.js → error-state-B_5cgNPJ.js} +1 -1
  62. package/build/assets/extensions-hub-DsaUr4ca.js +1 -0
  63. package/build/assets/extensions-navigation-CRMZd-FE.js +1 -0
  64. package/build/assets/external-link-DQtv7eTh.js +1 -0
  65. package/build/assets/files-tab-CCgAcVdc.js +1 -0
  66. package/build/assets/{form-control-classes-Bkh5FGrD.js → form-control-classes-B-z85REi.js} +1 -1
  67. package/build/assets/get-git-path-EHrSDxTM.js +1 -0
  68. package/build/assets/git-repo-dropdown-D2WEQ97X.js +1 -0
  69. package/build/assets/{git-repo-dropdown-4ROKl2cB.js → git-repo-dropdown-DVeCUUXG.js} +1 -1
  70. package/build/assets/{highlighted-source-view-BFRxGT_Q.js → highlighted-source-view-DjHO3SdW.js} +1 -1
  71. package/build/assets/home-BorS_vdS.js +1 -0
  72. package/build/assets/home-aIMbHw5M.js +1 -0
  73. package/build/assets/home-automation-run-tooltip-CpHNFiFl.js +1 -0
  74. package/build/assets/home-store-DyXz0w6d.js +1 -0
  75. package/build/assets/hooks-service-C6dpRtZM.js +1 -0
  76. package/build/assets/index-home-zKFuKK2B.js +1 -0
  77. package/build/assets/info-CTIdjttz.js +1 -0
  78. package/build/assets/install-server-modal-DUiZMc8u.js +1 -0
  79. package/build/assets/kebab-menu-item-content-mm04SBD3.js +1 -0
  80. package/build/assets/{key-BmVyxs-2.js → key-CfXbJa8w.js} +1 -1
  81. package/build/assets/{launch-IrTDEFCs.js → launch-BSIf9KEg.js} +1 -1
  82. package/build/assets/list-filter-CNpqTWVY.js +1 -0
  83. package/build/assets/{list-todo-apgLVjMw.js → list-todo-ByXMdY4W.js} +1 -1
  84. package/build/assets/llm-not-configured-banner-z_QRSeV0.js +27 -0
  85. package/build/assets/llm-settings-B-5AHMiX.js +1 -0
  86. package/build/assets/llm-settings-B3SjHDmA.js +1 -0
  87. package/build/assets/llm-subscription-service-aDNBQ7Gq.js +1 -0
  88. package/build/assets/loader-circle-Dex47vVW.js +1 -0
  89. package/build/assets/{loading-spinner-BY9N3pOe.js → loading-spinner-DfHI77BA.js} +1 -1
  90. package/build/assets/manage-backends-modal-q1NdFisr.js +1 -0
  91. package/build/assets/manifest-8920b615.js +1 -0
  92. package/build/assets/{manifest-subpage-layout-CAOYzrYp.js → manifest-subpage-layout-BQQy5ipR.js} +1 -1
  93. package/build/assets/{map-provider-Cu3Zgumb.js → map-provider-DXvssjw9.js} +1 -1
  94. package/build/assets/markdown-renderer-rivLvYh-.js +8 -0
  95. package/build/assets/{mcp-BTs_SXfZ.js → mcp-CEXDhQWn.js} +1 -1
  96. package/build/assets/{mcp-marketplace-utils-AIBzzHTO.js → mcp-marketplace-utils-Cn_NIMWM.js} +1 -1
  97. package/build/assets/mcp-page-LGYIICMG.js +9 -0
  98. package/build/assets/messages-DUSeANAh.js +41 -0
  99. package/build/assets/{modal-body-BxZjsju9.js → modal-body-DJw4xBki.js} +1 -1
  100. package/build/assets/{modal-classes-C8eycCwG.js → modal-classes-Dg0ngBPO.js} +1 -1
  101. package/build/assets/{modal-close-button-DDzdRvCs.js → modal-close-button-B9j4nasm.js} +1 -1
  102. package/build/assets/{mouse-pointer-click-Co2uyaPA.js → mouse-pointer-click-DEhsSUpu.js} +1 -1
  103. package/build/assets/onboarding-BjFebfs5.js +1 -0
  104. package/build/assets/onboarding-modal-DDTjOpyd.js +1 -0
  105. package/build/assets/organization-service.api-Cyg1Tn03.js +1 -0
  106. package/build/assets/pencil-D5c47kyN.js +1 -0
  107. package/build/assets/pin-C7vMagvf.js +1 -0
  108. package/build/assets/planner-tab-D8f2Y3rn.js +1 -0
  109. package/build/assets/plug-CeaqeF6u.js +1 -0
  110. package/build/assets/plugins-management-service-Bh_pBuf-.js +1 -0
  111. package/build/assets/plus-B3wvU06-.js +1 -0
  112. package/build/assets/profiles-service.api-BbOK0EkF.js +1 -0
  113. package/build/assets/{providers-BhMcY5nv.js → providers-2gIIkz2N.js} +1 -1
  114. package/build/assets/proxy-CBgMd2zf.js +1 -0
  115. package/build/assets/{puzzle-JM_QaRm0.js → puzzle-DdAqbUrb.js} +1 -1
  116. package/build/assets/recommended-automations-launcher-YLAQTp4s.js +1 -0
  117. package/build/assets/refresh-cw-DEQdPCpH.js +1 -0
  118. package/build/assets/root-Bye_XmEL.js +2 -0
  119. package/build/assets/root-Cnwwzgo0.css +1 -0
  120. package/build/assets/root-layout-CSAwxBGM.js +2 -0
  121. package/build/assets/schema-field-CK0xYNbO.js +1 -0
  122. package/build/assets/scroll-fade-state-Dt_fx2kf.js +1 -0
  123. package/build/assets/sdk-section-page-Da73Rs_o.js +1 -0
  124. package/build/assets/secret-form-CB2VwYYg.js +1 -0
  125. package/build/assets/secrets-service-Cr8g8xuv.js +1 -0
  126. package/build/assets/{secrets-settings-B_GpxKW2.js → secrets-settings-Bh0udeKv.js} +1 -1
  127. package/build/assets/settings-DmyIgRxO.js +1 -0
  128. package/build/assets/{settings-dropdown-input-BcwylHs2.js → settings-dropdown-input-DVpyD87C.js} +1 -1
  129. package/build/assets/settings-index-BSJUFmjE.js +1 -0
  130. package/build/assets/{settings-input-Db-1g8Ql.js → settings-input-C0dd8Utu.js} +1 -1
  131. package/build/assets/{settings-list-classes-BzeSZbF2.js → settings-list-classes-Ds4jPBHK.js} +1 -1
  132. package/build/assets/{settings-modal-DfJ3tcJQ.js → settings-modal-yStgEh2o.js} +1 -1
  133. package/build/assets/settings-service.api-9_xdv_mh.js +1 -0
  134. package/build/assets/{settings-switch-CS-dJDmA.js → settings-switch-B78Khmyz.js} +1 -1
  135. package/build/assets/{settings-utils-UYpEdPuD.js → settings-utils-8GIIgOQL.js} +1 -1
  136. package/build/assets/shared-conversation-DM96X4KV.js +1 -0
  137. package/build/assets/shield-check-DO7wa_eu.js +1 -0
  138. package/build/assets/{sidebar-layout-D6fS8-Gl.js → sidebar-layout-EPfWxk11.js} +1 -1
  139. package/build/assets/sidebar-mobile-menu-toggle-D5GR5xT9.js +1 -0
  140. package/build/assets/{sidebar-nav-link-DQQcMf1A.js → sidebar-nav-link-_t4_Ef-9.js} +1 -1
  141. package/build/assets/{sidebar-onboarding-checklist-storage-BBkeI6Bp.js → sidebar-onboarding-checklist-storage-DbDX-Wvj.js} +1 -1
  142. package/build/assets/{sidebar-store-DGqHkVLw.js → sidebar-store-CSDFK0W5.js} +1 -1
  143. package/build/assets/{skill-card-pill-row-B27-xyig.js → skill-card-pill-row-989y15jV.js} +1 -1
  144. package/build/assets/{skill-filter-w__3UCEE.js → skill-filter-BBeZ4JEP.js} +1 -1
  145. package/build/assets/{skill-icon-badge-RQkq8wvl.js → skill-icon-badge-BDhQ-tQ0.js} +1 -1
  146. package/build/assets/skill-scope-Dz3kPH3P.js +1 -0
  147. package/build/assets/skills-plugins-e3CYGdUJ.js +1 -0
  148. package/build/assets/skills-settings-3e-FuHw_.js +1 -0
  149. package/build/assets/styled-tooltip-Pd22BIvr.js +1 -0
  150. package/build/assets/{task-list-tab-C5zcaktH.js → task-list-tab-3Jg8ywch.js} +1 -1
  151. package/build/assets/{terminal-CNElN42a.js → terminal-onXx0_Qz.js} +2 -2
  152. package/build/assets/toggle-switch-lwQtxDcm.js +1 -0
  153. package/build/assets/trash-2-ZhKuTLiz.js +1 -0
  154. package/build/assets/trash-B6OIe4yX.js +1 -0
  155. package/build/assets/triangle-alert-BajLPpQg.js +1 -0
  156. package/build/assets/{typography-v1KN0tzi.js → typography-HLLg_FAn.js} +1 -1
  157. package/build/assets/usage-tab-Cm-9j3UK.js +1 -0
  158. package/build/assets/use-acp-credential-form-BARcvjYE.js +1 -0
  159. package/build/assets/use-activate-agent-profile-BLKML6vQ.js +1 -0
  160. package/build/assets/use-agent-profiles-1P91KSXz.js +1 -0
  161. package/build/assets/{use-automation-health-E6NZi9rb.js → use-automation-health-BZkQNEA8.js} +1 -1
  162. package/build/assets/use-automation-permissions-B_RpvL-s.js +1 -0
  163. package/build/assets/{use-automations-xijQKIl9.js → use-automations-Cg0PDIZr.js} +1 -1
  164. package/build/assets/{use-can-manage-org-profiles-CrJP5262.js → use-can-manage-org-profiles-BbN6KfDr.js} +1 -1
  165. package/build/assets/use-canvas-extensions-CFUpHat6.js +1 -0
  166. package/build/assets/{use-cloud-current-user-id-CDfAHpPX.js → use-cloud-current-user-id-Dk0rjr63.js} +1 -1
  167. package/build/assets/use-config-DpafU_QP.js +1 -0
  168. package/build/assets/use-create-conversation-1YgmAHt-.js +1 -0
  169. package/build/assets/use-create-secret-D8p9ybQj.js +1 -0
  170. package/build/assets/{use-get-secrets-K3jmk-LH.js → use-get-secrets-CQ4b0qK8.js} +1 -1
  171. package/build/assets/use-is-authed-BRPjCRKM.js +1 -0
  172. package/build/assets/{use-launch-skill-in-chat-BYjYihBP.js → use-launch-skill-in-chat-DeYa1tFM.js} +1 -1
  173. package/build/assets/use-llm-configured-DGm8FiRR.js +1 -0
  174. package/build/assets/use-llm-profiles-BTTtpW4z.js +1 -0
  175. package/build/assets/use-manifest-capabilities-AOWGcu0j.js +1 -0
  176. package/build/assets/use-onboarding-completion-CoINurkm.js +1 -0
  177. package/build/assets/use-pinned-home-route-D6krwXjy.js +1 -0
  178. package/build/assets/use-plugins-marketplace-mLsIDhBv.js +1 -0
  179. package/build/assets/use-save-agent-profile-CxyO9YG-.js +1 -0
  180. package/build/assets/{use-save-settings-DYqkKv7T.js → use-save-settings-3U5K9-8x.js} +1 -1
  181. package/build/assets/use-settings-Dn00UISA.js +1 -0
  182. package/build/assets/use-settings-nav-items-vrjxTqcu.js +16 -0
  183. package/build/assets/use-tracking-B9prBsrq.js +3 -0
  184. package/build/assets/{use-user-conversation-B9Gebw_g.js → use-user-conversation-ZWlXtbZb.js} +1 -1
  185. package/build/assets/{useInfiniteQuery-C926xzY4.js → useInfiniteQuery-BzrRqjLg.js} +1 -1
  186. package/build/assets/{useMutation-B-qc391N.js → useMutation-CJuK90oc.js} +1 -1
  187. package/build/assets/{useQueries-DlbhlH9I.js → useQueries-CykmpT-a.js} +1 -1
  188. package/build/assets/{useQuery-BSTgq1rl.js → useQuery-S6j94er1.js} +1 -1
  189. package/build/assets/utils-BOco8mxR.js +1 -0
  190. package/build/assets/{vendor~conversation-panel~conversation-C8Fn4XOf.js → vendor~conversation-panel~conversation-4eJ0tml3.js} +1 -1
  191. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +2 -0
  192. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js +185 -0
  193. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-DnDoaYNi.js} +1 -1
  194. package/build/assets/{vendor~index-home~home~conversation-panel~conversation-hWywRBaR.js → vendor~index-home~home~conversation-panel~conversation-CSFLzmTN.js} +1 -1
  195. package/build/assets/vendor~root-layout-n8XCEXG8.js +1 -0
  196. package/build/assets/{vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js → vendor~root-layout~conversation-panel~conversation-3Idg1_U3.js} +1 -1
  197. package/build/assets/{vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BWir3rJs.js → vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-DkPlXWl9.js} +1 -1
  198. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-j5MFqfSy.js → vendor~root-layout~index-home~home~conversation-panel~conversation-DgQ564nC.js} +1 -1
  199. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-CxhwKuAd.js +1 -0
  200. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js} +1 -1
  201. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js +1 -0
  202. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BPjI-atc.js} +12 -6
  203. package/build/assets/{verification-settings-gw_q6vkL.js → verification-settings-u2POabjH.js} +1 -1
  204. package/build/assets/{wrench-CUEI1krB.js → wrench-CkgI4rxA.js} +1 -1
  205. package/build/assets/x-By6qCmtY.js +1 -0
  206. package/build/index.html +4 -4
  207. package/build/locales/ar/openhands.json +73 -20
  208. package/build/locales/ca/openhands.json +73 -20
  209. package/build/locales/de/openhands.json +73 -20
  210. package/build/locales/en/openhands.json +73 -20
  211. package/build/locales/es/openhands.json +73 -20
  212. package/build/locales/fr/openhands.json +73 -20
  213. package/build/locales/it/openhands.json +73 -20
  214. package/build/locales/ja/openhands.json +73 -20
  215. package/build/locales/ko-KR/openhands.json +73 -20
  216. package/build/locales/no/openhands.json +73 -20
  217. package/build/locales/pt/openhands.json +73 -20
  218. package/build/locales/tr/openhands.json +73 -20
  219. package/build/locales/uk/openhands.json +73 -20
  220. package/build/locales/zh-CN/openhands.json +73 -20
  221. package/build/locales/zh-TW/openhands.json +73 -20
  222. package/config/defaults.json +3 -3
  223. package/dist/api/agent-server-adapter.cjs +3 -3
  224. package/dist/api/agent-server-adapter.cjs.map +1 -1
  225. package/dist/api/agent-server-adapter.d.ts +72 -12
  226. package/dist/api/agent-server-adapter.js +234 -132
  227. package/dist/api/agent-server-adapter.js.map +1 -1
  228. package/dist/api/agent-server-config.cjs +1 -1
  229. package/dist/api/agent-server-config.cjs.map +1 -1
  230. package/dist/api/agent-server-config.d.ts +6 -0
  231. package/dist/api/agent-server-config.js +6 -3
  232. package/dist/api/agent-server-config.js.map +1 -1
  233. package/dist/api/automation-service/automation-service.api.cjs +1 -1
  234. package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
  235. package/dist/api/automation-service/automation-service.api.d.ts +2 -2
  236. package/dist/api/automation-service/automation-service.api.js +7 -7
  237. package/dist/api/automation-service/automation-service.api.js.map +1 -1
  238. package/dist/api/cloud/provider-connections-service.api.cjs +2 -0
  239. package/dist/api/cloud/provider-connections-service.api.cjs.map +1 -0
  240. package/dist/api/cloud/provider-connections-service.api.d.ts +5 -0
  241. package/dist/api/cloud/provider-connections-service.api.js +50 -0
  242. package/dist/api/cloud/provider-connections-service.api.js.map +1 -0
  243. package/dist/api/cloud/skills-service.api.cjs +1 -1
  244. package/dist/api/cloud/skills-service.api.cjs.map +1 -1
  245. package/dist/api/cloud/skills-service.api.d.ts +10 -0
  246. package/dist/api/cloud/skills-service.api.js +11 -1
  247. package/dist/api/cloud/skills-service.api.js.map +1 -1
  248. package/dist/api/conversation-metadata-store.cjs +1 -1
  249. package/dist/api/conversation-metadata-store.cjs.map +1 -1
  250. package/dist/api/conversation-metadata-store.d.ts +24 -0
  251. package/dist/api/conversation-metadata-store.js +10 -2
  252. package/dist/api/conversation-metadata-store.js.map +1 -1
  253. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  254. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  255. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +20 -0
  256. package/dist/api/conversation-service/agent-server-conversation-service.api.js +126 -77
  257. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  258. package/dist/api/hooks-service.cjs +2 -0
  259. package/dist/api/hooks-service.cjs.map +1 -0
  260. package/dist/api/hooks-service.d.ts +13 -0
  261. package/dist/api/hooks-service.js +20 -0
  262. package/dist/api/hooks-service.js.map +1 -0
  263. package/dist/api/provider-connections-service/provider-connections-service.api.cjs +1 -1
  264. package/dist/api/provider-connections-service/provider-connections-service.api.cjs.map +1 -1
  265. package/dist/api/provider-connections-service/provider-connections-service.api.js +25 -16
  266. package/dist/api/provider-connections-service/provider-connections-service.api.js.map +1 -1
  267. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  268. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  269. package/dist/api/settings-service/settings-service.api.d.ts +2 -0
  270. package/dist/api/settings-service/settings-service.api.js +18 -10
  271. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  272. package/dist/api/skills-service.cjs +1 -1
  273. package/dist/api/skills-service.cjs.map +1 -1
  274. package/dist/api/skills-service.d.ts +7 -0
  275. package/dist/api/skills-service.js +11 -8
  276. package/dist/api/skills-service.js.map +1 -1
  277. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
  278. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
  279. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs +1 -1
  280. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs.map +1 -1
  281. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js +2 -1
  282. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js.map +1 -1
  283. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
  284. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
  285. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
  286. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +28 -28
  287. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
  288. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs +1 -1
  289. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs.map +1 -1
  290. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js +2 -1
  291. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js.map +1 -1
  292. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs +1 -1
  293. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs.map +1 -1
  294. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +1 -1
  295. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js +37 -37
  296. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js.map +1 -1
  297. package/dist/components/conversation-events/chat/event-message.cjs +2 -2
  298. package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
  299. package/dist/components/conversation-events/chat/event-message.js +79 -70
  300. package/dist/components/conversation-events/chat/event-message.js.map +1 -1
  301. package/dist/components/conversation-events/chat/messages.cjs +1 -1
  302. package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
  303. package/dist/components/conversation-events/chat/messages.js +28 -27
  304. package/dist/components/conversation-events/chat/messages.js.map +1 -1
  305. package/dist/components/features/automations/automation-card.cjs +1 -1
  306. package/dist/components/features/automations/automation-card.cjs.map +1 -1
  307. package/dist/components/features/automations/automation-card.js +100 -94
  308. package/dist/components/features/automations/automation-card.js.map +1 -1
  309. package/dist/components/features/automations/automation-list-row.cjs +1 -1
  310. package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
  311. package/dist/components/features/automations/automation-list-row.js +88 -77
  312. package/dist/components/features/automations/automation-list-row.js.map +1 -1
  313. package/dist/components/features/automations/detail/detail-header.d.ts +3 -1
  314. package/dist/components/features/automations/detail/run-status-badge.cjs +1 -1
  315. package/dist/components/features/automations/detail/run-status-badge.cjs.map +1 -1
  316. package/dist/components/features/automations/detail/run-status-badge.d.ts +2 -2
  317. package/dist/components/features/automations/detail/run-status-badge.js +82 -53
  318. package/dist/components/features/automations/detail/run-status-badge.js.map +1 -1
  319. package/dist/components/features/automations/kebab-menu.cjs +1 -1
  320. package/dist/components/features/automations/kebab-menu.cjs.map +1 -1
  321. package/dist/components/features/automations/kebab-menu.js +9 -5
  322. package/dist/components/features/automations/kebab-menu.js.map +1 -1
  323. package/dist/components/features/automations/recommended-automations-launcher.cjs +1 -1
  324. package/dist/components/features/automations/recommended-automations-launcher.cjs.map +1 -1
  325. package/dist/components/features/automations/recommended-automations-launcher.js +12 -12
  326. package/dist/components/features/automations/recommended-automations-launcher.js.map +1 -1
  327. package/dist/components/features/automations/recommended-automations-section.cjs +1 -1
  328. package/dist/components/features/automations/recommended-automations-section.js +9 -9
  329. package/dist/components/features/backends/backend-selector.cjs +1 -1
  330. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  331. package/dist/components/features/backends/backend-selector.js +133 -122
  332. package/dist/components/features/backends/backend-selector.js.map +1 -1
  333. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  334. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  335. package/dist/components/features/backends/manage-backends-modal.js +29 -29
  336. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  337. package/dist/components/features/chat/change-agent-button.cjs +1 -1
  338. package/dist/components/features/chat/change-agent-button.js +4 -4
  339. package/dist/components/features/chat/chat-interface.cjs +2 -2
  340. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  341. package/dist/components/features/chat/chat-interface.js +137 -137
  342. package/dist/components/features/chat/chat-interface.js.map +1 -1
  343. package/dist/components/features/chat/chat-message.cjs +1 -1
  344. package/dist/components/features/chat/chat-message.cjs.map +1 -1
  345. package/dist/components/features/chat/chat-message.d.ts +2 -1
  346. package/dist/components/features/chat/chat-message.js +88 -79
  347. package/dist/components/features/chat/chat-message.js.map +1 -1
  348. package/dist/components/features/chat/components/context-window-meter.cjs +1 -1
  349. package/dist/components/features/chat/components/context-window-meter.js +4 -4
  350. package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
  351. package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
  352. package/dist/components/features/chat/generic-event-message.cjs +1 -1
  353. package/dist/components/features/chat/generic-event-message.cjs.map +1 -1
  354. package/dist/components/features/chat/generic-event-message.d.ts +2 -1
  355. package/dist/components/features/chat/generic-event-message.js +41 -22
  356. package/dist/components/features/chat/generic-event-message.js.map +1 -1
  357. package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
  358. package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
  359. package/dist/components/features/chat/interactive-chat-box.js +20 -19
  360. package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
  361. package/dist/components/features/conversation/conversation-overview-git-section.cjs +1 -1
  362. package/dist/components/features/conversation/conversation-overview-git-section.js +4 -4
  363. package/dist/components/features/conversation/conversation-overview-skills-panel.cjs +1 -1
  364. package/dist/components/features/conversation/conversation-overview-skills-panel.js +4 -4
  365. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
  366. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
  367. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +77 -78
  368. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
  369. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
  370. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
  371. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +88 -88
  372. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
  373. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs +2 -0
  374. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs.map +1 -0
  375. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.d.ts +21 -0
  376. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js +239 -0
  377. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js.map +1 -0
  378. package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs +2 -0
  379. package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs.map +1 -0
  380. package/dist/components/features/conversation-panel/conversation-active-tag-filters.d.ts +28 -0
  381. package/dist/components/features/conversation-panel/conversation-active-tag-filters.js +69 -0
  382. package/dist/components/features/conversation-panel/conversation-active-tag-filters.js.map +1 -0
  383. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
  384. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
  385. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +2 -1
  386. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +19 -18
  387. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
  388. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
  389. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
  390. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +2 -1
  391. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +91 -80
  392. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
  393. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs +1 -1
  394. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs.map +1 -1
  395. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js +1 -1
  396. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js.map +1 -1
  397. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
  398. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
  399. package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +7 -1
  400. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +87 -81
  401. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
  402. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs +1 -1
  403. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs.map +1 -1
  404. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.d.ts +2 -1
  405. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js +1 -1
  406. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js.map +1 -1
  407. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs +1 -1
  408. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs.map +1 -1
  409. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.d.ts +2 -1
  410. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js +2 -1
  411. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js.map +1 -1
  412. package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs +2 -0
  413. package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs.map +1 -0
  414. package/dist/components/features/conversation-panel/conversation-layouts-menu.d.ts +29 -0
  415. package/dist/components/features/conversation-panel/conversation-layouts-menu.js +177 -0
  416. package/dist/components/features/conversation-panel/conversation-layouts-menu.js.map +1 -0
  417. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
  418. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
  419. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +37 -0
  420. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +85 -45
  421. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
  422. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  423. package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
  424. package/dist/components/features/conversation-panel/conversation-panel.js +296 -290
  425. package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
  426. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs +2 -0
  427. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs.map +1 -0
  428. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.d.ts +22 -0
  429. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js +153 -0
  430. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js.map +1 -0
  431. package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs +2 -0
  432. package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs.map +1 -0
  433. package/dist/components/features/conversation-panel/hide-older-conversations-row.d.ts +6 -0
  434. package/dist/components/features/conversation-panel/hide-older-conversations-row.js +65 -0
  435. package/dist/components/features/conversation-panel/hide-older-conversations-row.js.map +1 -0
  436. package/dist/components/features/conversation-panel/menu-row.cjs +1 -1
  437. package/dist/components/features/conversation-panel/menu-row.cjs.map +1 -1
  438. package/dist/components/features/conversation-panel/menu-row.d.ts +11 -1
  439. package/dist/components/features/conversation-panel/menu-row.js +27 -16
  440. package/dist/components/features/conversation-panel/menu-row.js.map +1 -1
  441. package/dist/components/features/home/featured-automations/automation-health-indicator.cjs +1 -1
  442. package/dist/components/features/home/featured-automations/automation-health-indicator.cjs.map +1 -1
  443. package/dist/components/features/home/featured-automations/automation-health-indicator.js +1 -1
  444. package/dist/components/features/home/featured-automations/automation-health-indicator.js.map +1 -1
  445. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs +1 -1
  446. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs.map +1 -1
  447. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +4 -3
  448. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js +22 -25
  449. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js.map +1 -1
  450. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs +1 -1
  451. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs.map +1 -1
  452. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +1 -1
  453. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js +15 -15
  454. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js.map +1 -1
  455. package/dist/components/features/home/featured-automations/automation-run-health.cjs +1 -1
  456. package/dist/components/features/home/featured-automations/automation-run-health.cjs.map +1 -1
  457. package/dist/components/features/home/featured-automations/automation-run-health.d.ts +5 -3
  458. package/dist/components/features/home/featured-automations/automation-run-health.js +30 -23
  459. package/dist/components/features/home/featured-automations/automation-run-health.js.map +1 -1
  460. package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +3 -2
  461. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
  462. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
  463. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +1 -1
  464. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +42 -42
  465. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
  466. package/dist/components/features/manifest/manifest-form-field.d.ts +3 -1
  467. package/dist/components/features/manifest/manifest-review-step.d.ts +3 -1
  468. package/dist/components/features/settings/cloud-settings-link.cjs +1 -1
  469. package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
  470. package/dist/components/features/settings/cloud-settings-link.js +5 -3
  471. package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
  472. package/dist/components/features/settings/integrations-settings-link.cjs +1 -1
  473. package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -1
  474. package/dist/components/features/settings/integrations-settings-link.d.ts +3 -1
  475. package/dist/components/features/settings/integrations-settings-link.js +20 -17
  476. package/dist/components/features/settings/integrations-settings-link.js.map +1 -1
  477. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  478. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +1 -1
  479. package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +2 -2
  480. package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs +1 -1
  481. package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs.map +1 -1
  482. package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +8 -7
  483. package/dist/components/features/settings/sdk-settings/sdk-section-page.js +172 -142
  484. package/dist/components/features/settings/sdk-settings/sdk-section-page.js.map +1 -1
  485. package/dist/components/features/settings/secrets-settings/secret-form.cjs +1 -1
  486. package/dist/components/features/settings/secrets-settings/secret-form.cjs.map +1 -1
  487. package/dist/components/features/settings/secrets-settings/secret-form.js +38 -25
  488. package/dist/components/features/settings/secrets-settings/secret-form.js.map +1 -1
  489. package/dist/components/features/settings/settings-dropdown-input.cjs +1 -1
  490. package/dist/components/features/settings/settings-dropdown-input.js +6 -6
  491. package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
  492. package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
  493. package/dist/components/features/sidebar/sidebar-rail-body.d.ts +3 -1
  494. package/dist/components/features/sidebar/sidebar-rail-body.js +156 -139
  495. package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
  496. package/dist/components/features/sidebar/sidebar.cjs +1 -1
  497. package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
  498. package/dist/components/features/sidebar/sidebar.js +44 -43
  499. package/dist/components/features/sidebar/sidebar.js.map +1 -1
  500. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs +1 -1
  501. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js +3 -3
  502. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  503. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  504. package/dist/components/features/skills/extensions-navigation.js +3 -3
  505. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  506. package/dist/components/shared/buttons/styled-tooltip.cjs +1 -1
  507. package/dist/components/shared/buttons/styled-tooltip.cjs.map +1 -1
  508. package/dist/components/shared/buttons/styled-tooltip.d.ts +2 -1
  509. package/dist/components/shared/buttons/styled-tooltip.js +2 -1
  510. package/dist/components/shared/buttons/styled-tooltip.js.map +1 -1
  511. package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
  512. package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
  513. package/dist/components/shared/filters/enum-filter-dropdown.d.ts +5 -1
  514. package/dist/components/shared/filters/enum-filter-dropdown.js +14 -14
  515. package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
  516. package/dist/components/shared/modals/confirmation-modal.cjs +1 -1
  517. package/dist/components/shared/modals/confirmation-modal.cjs.map +1 -1
  518. package/dist/components/shared/modals/confirmation-modal.d.ts +2 -1
  519. package/dist/components/shared/modals/confirmation-modal.js +8 -8
  520. package/dist/components/shared/modals/confirmation-modal.js.map +1 -1
  521. package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
  522. package/dist/components/shared/modals/settings/model-selector.js +27 -27
  523. package/dist/config/defaults.cjs +1 -1
  524. package/dist/config/defaults.cjs.map +1 -1
  525. package/dist/config/defaults.js +3 -3
  526. package/dist/config/defaults.js.map +1 -1
  527. package/dist/constants/settings-nav.d.ts +8 -0
  528. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  529. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  530. package/dist/contexts/conversation-websocket-context.d.ts +5 -0
  531. package/dist/contexts/conversation-websocket-context.js +194 -198
  532. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  533. package/dist/contexts/websocket-provider-wrapper.cjs +1 -1
  534. package/dist/contexts/websocket-provider-wrapper.cjs.map +1 -1
  535. package/dist/contexts/websocket-provider-wrapper.js +31 -15
  536. package/dist/contexts/websocket-provider-wrapper.js.map +1 -1
  537. package/dist/hooks/chat/record-model-switch-message.cjs +1 -1
  538. package/dist/hooks/chat/record-model-switch-message.cjs.map +1 -1
  539. package/dist/hooks/chat/record-model-switch-message.d.ts +31 -0
  540. package/dist/hooks/chat/record-model-switch-message.js +25 -12
  541. package/dist/hooks/chat/record-model-switch-message.js.map +1 -1
  542. package/dist/hooks/chat/use-plan-mode-interceptor.cjs +2 -0
  543. package/dist/hooks/chat/use-plan-mode-interceptor.cjs.map +1 -0
  544. package/dist/hooks/chat/use-plan-mode-interceptor.d.ts +16 -0
  545. package/dist/hooks/chat/use-plan-mode-interceptor.js +43 -0
  546. package/dist/hooks/chat/use-plan-mode-interceptor.js.map +1 -0
  547. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  548. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  549. package/dist/hooks/mutation/use-create-conversation.js +5 -1
  550. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  551. package/dist/hooks/mutation/use-read-conversation-file.cjs +1 -1
  552. package/dist/hooks/mutation/use-read-conversation-file.cjs.map +1 -1
  553. package/dist/hooks/mutation/use-read-conversation-file.js +11 -4
  554. package/dist/hooks/mutation/use-read-conversation-file.js.map +1 -1
  555. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  556. package/dist/hooks/mutation/use-save-settings.js +3 -3
  557. package/dist/hooks/mutation/use-switch-llm-profile.cjs +1 -1
  558. package/dist/hooks/mutation/use-switch-llm-profile.cjs.map +1 -1
  559. package/dist/hooks/mutation/use-switch-llm-profile.js +13 -25
  560. package/dist/hooks/mutation/use-switch-llm-profile.js.map +1 -1
  561. package/dist/hooks/mutation/use-update-conversation-tags.cjs +2 -0
  562. package/dist/hooks/mutation/use-update-conversation-tags.cjs.map +1 -0
  563. package/dist/hooks/mutation/use-update-conversation-tags.d.ts +8 -0
  564. package/dist/hooks/mutation/use-update-conversation-tags.js +45 -0
  565. package/dist/hooks/mutation/use-update-conversation-tags.js.map +1 -0
  566. package/dist/hooks/query/query-keys.cjs +1 -1
  567. package/dist/hooks/query/query-keys.cjs.map +1 -1
  568. package/dist/hooks/query/query-keys.d.ts +6 -0
  569. package/dist/hooks/query/query-keys.js +2 -2
  570. package/dist/hooks/query/query-keys.js.map +1 -1
  571. package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
  572. package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
  573. package/dist/hooks/query/use-automation-sdk-version.d.ts +0 -1
  574. package/dist/hooks/query/use-automation-sdk-version.js +30 -55
  575. package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
  576. package/dist/hooks/query/use-conversation-skills.cjs +1 -1
  577. package/dist/hooks/query/use-conversation-skills.cjs.map +1 -1
  578. package/dist/hooks/query/use-conversation-skills.d.ts +14 -5
  579. package/dist/hooks/query/use-conversation-skills.js +20 -4
  580. package/dist/hooks/query/use-conversation-skills.js.map +1 -1
  581. package/dist/hooks/query/use-provider-connections.cjs +1 -1
  582. package/dist/hooks/query/use-provider-connections.cjs.map +1 -1
  583. package/dist/hooks/query/use-provider-connections.d.ts +6 -3
  584. package/dist/hooks/query/use-provider-connections.js +7 -3
  585. package/dist/hooks/query/use-provider-connections.js.map +1 -1
  586. package/dist/hooks/query/use-sub-conversations.cjs +1 -1
  587. package/dist/hooks/query/use-sub-conversations.cjs.map +1 -1
  588. package/dist/hooks/query/use-sub-conversations.js +16 -16
  589. package/dist/hooks/query/use-sub-conversations.js.map +1 -1
  590. package/dist/hooks/use-acp-model-context.cjs +1 -1
  591. package/dist/hooks/use-acp-model-context.js +3 -3
  592. package/dist/hooks/use-agent-state.cjs +1 -1
  593. package/dist/hooks/use-agent-state.cjs.map +1 -1
  594. package/dist/hooks/use-agent-state.d.ts +17 -1
  595. package/dist/hooks/use-agent-state.js +19 -9
  596. package/dist/hooks/use-agent-state.js.map +1 -1
  597. package/dist/hooks/use-automation-permissions.cjs +2 -0
  598. package/dist/hooks/use-automation-permissions.cjs.map +1 -0
  599. package/dist/hooks/use-automation-permissions.d.ts +43 -0
  600. package/dist/hooks/use-automation-permissions.js +52 -0
  601. package/dist/hooks/use-automation-permissions.js.map +1 -0
  602. package/dist/hooks/use-chat-input-model-state.cjs +1 -1
  603. package/dist/hooks/use-chat-input-model-state.js +3 -3
  604. package/dist/hooks/use-handle-plan-click.cjs +1 -1
  605. package/dist/hooks/use-handle-plan-click.cjs.map +1 -1
  606. package/dist/hooks/use-handle-plan-click.d.ts +3 -1
  607. package/dist/hooks/use-handle-plan-click.js +85 -26
  608. package/dist/hooks/use-handle-plan-click.js.map +1 -1
  609. package/dist/hooks/use-home-automation-actions.cjs +1 -1
  610. package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
  611. package/dist/hooks/use-home-automation-actions.js +1 -0
  612. package/dist/hooks/use-home-automation-actions.js.map +1 -1
  613. package/dist/hooks/use-llm-configured.cjs +1 -1
  614. package/dist/hooks/use-llm-configured.js +3 -3
  615. package/dist/hooks/use-manifest-preflight.d.ts +1 -1
  616. package/dist/hooks/use-unified-websocket-status.cjs +1 -1
  617. package/dist/hooks/use-unified-websocket-status.cjs.map +1 -1
  618. package/dist/hooks/use-unified-websocket-status.d.ts +7 -0
  619. package/dist/hooks/use-unified-websocket-status.js +5 -1
  620. package/dist/hooks/use-unified-websocket-status.js.map +1 -1
  621. package/dist/i18n/declaration.cjs +1 -1
  622. package/dist/i18n/declaration.cjs.map +1 -1
  623. package/dist/i18n/declaration.d.ts +65 -12
  624. package/dist/i18n/declaration.js +1 -1
  625. package/dist/i18n/declaration.js.map +1 -1
  626. package/dist/i18n/translation.cjs +2 -2
  627. package/dist/i18n/translation.cjs.map +1 -1
  628. package/dist/i18n/translation.js +1196 -295
  629. package/dist/i18n/translation.js.map +1 -1
  630. package/dist/locales/ar/openhands.json +73 -20
  631. package/dist/locales/ca/openhands.json +73 -20
  632. package/dist/locales/de/openhands.json +73 -20
  633. package/dist/locales/en/openhands.json +73 -20
  634. package/dist/locales/es/openhands.json +73 -20
  635. package/dist/locales/fr/openhands.json +73 -20
  636. package/dist/locales/it/openhands.json +73 -20
  637. package/dist/locales/ja/openhands.json +73 -20
  638. package/dist/locales/ko-KR/openhands.json +73 -20
  639. package/dist/locales/no/openhands.json +73 -20
  640. package/dist/locales/pt/openhands.json +73 -20
  641. package/dist/locales/tr/openhands.json +73 -20
  642. package/dist/locales/uk/openhands.json +73 -20
  643. package/dist/locales/zh-CN/openhands.json +73 -20
  644. package/dist/locales/zh-TW/openhands.json +73 -20
  645. package/dist/manifests/automation-insights.cjs.map +1 -1
  646. package/dist/manifests/automation-insights.d.ts +10 -2
  647. package/dist/manifests/automation-insights.js.map +1 -1
  648. package/dist/manifests/automation-setup.cjs +1 -1
  649. package/dist/manifests/automation-setup.cjs.map +1 -1
  650. package/dist/manifests/automation-setup.d.ts +9 -16
  651. package/dist/manifests/automation-setup.js +17 -7
  652. package/dist/manifests/automation-setup.js.map +1 -1
  653. package/dist/manifests/manifest-actions.d.ts +1 -1
  654. package/dist/manifests/manifest-capabilities.d.ts +3 -1
  655. package/dist/manifests/manifest-local-validation.cjs +2 -0
  656. package/dist/manifests/manifest-local-validation.cjs.map +1 -0
  657. package/dist/manifests/manifest-local-validation.d.ts +15 -11
  658. package/dist/manifests/manifest-local-validation.js +8 -0
  659. package/dist/manifests/manifest-local-validation.js.map +1 -0
  660. package/dist/manifests/manifest-template.cjs +2 -0
  661. package/dist/manifests/manifest-template.cjs.map +1 -0
  662. package/dist/manifests/manifest-template.d.ts +4 -4
  663. package/dist/manifests/manifest-template.js +12 -0
  664. package/dist/manifests/manifest-template.js.map +1 -0
  665. package/dist/manifests/manifest-validation.cjs +1 -1
  666. package/dist/manifests/manifest-validation.cjs.map +1 -1
  667. package/dist/manifests/manifest-validation.js +106 -28
  668. package/dist/manifests/manifest-validation.js.map +1 -1
  669. package/dist/manifests/types.cjs.map +1 -1
  670. package/dist/manifests/types.d.ts +39 -4
  671. package/dist/manifests/types.js.map +1 -1
  672. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs +8 -0
  673. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs.map +1 -0
  674. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js +221 -0
  675. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js.map +1 -0
  676. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +1 -1
  677. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -1
  678. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +1 -1
  679. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js.map +1 -1
  680. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +1 -1
  681. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -1
  682. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +1 -1
  683. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -1
  684. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs +1 -1
  685. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs.map +1 -1
  686. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js +1 -1
  687. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js.map +1 -1
  688. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
  689. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
  690. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +22 -20
  691. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
  692. package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
  693. package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
  694. package/dist/node_modules/@openhands/extensions/automations/interface.js +2 -1
  695. package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
  696. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +1 -1
  697. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +1 -1
  698. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +24 -5
  699. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +1 -1
  700. package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs +1 -1
  701. package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js +1 -1
  702. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs +2 -0
  703. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs.map +1 -0
  704. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js +21 -0
  705. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js.map +1 -0
  706. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs +2 -0
  707. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs.map +1 -0
  708. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js +23 -0
  709. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js.map +1 -0
  710. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs +2 -0
  711. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs.map +1 -0
  712. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js +43 -0
  713. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js.map +1 -0
  714. package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs +2 -0
  715. package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs.map +1 -0
  716. package/dist/node_modules/lucide-react/dist/esm/icons/tags.js +22 -0
  717. package/dist/node_modules/lucide-react/dist/esm/icons/tags.js.map +1 -0
  718. package/dist/package.cjs +1 -1
  719. package/dist/package.cjs.map +1 -1
  720. package/dist/package.js +4 -4
  721. package/dist/package.js.map +1 -1
  722. package/dist/routes/agent-settings.d.ts +2 -0
  723. package/dist/routes/app-settings.cjs +1 -1
  724. package/dist/routes/app-settings.js +5 -5
  725. package/dist/routes/llm-settings.cjs +1 -1
  726. package/dist/routes/llm-settings.cjs.map +1 -1
  727. package/dist/routes/llm-settings.d.ts +3 -1
  728. package/dist/routes/llm-settings.js +88 -87
  729. package/dist/routes/llm-settings.js.map +1 -1
  730. package/dist/routes/planner-tab.cjs +1 -1
  731. package/dist/routes/planner-tab.cjs.map +1 -1
  732. package/dist/routes/planner-tab.js +44 -28
  733. package/dist/routes/planner-tab.js.map +1 -1
  734. package/dist/services/telemetry.cjs +1 -1
  735. package/dist/services/telemetry.cjs.map +1 -1
  736. package/dist/services/telemetry.d.ts +5 -0
  737. package/dist/services/telemetry.js +122 -115
  738. package/dist/services/telemetry.js.map +1 -1
  739. package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
  740. package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
  741. package/dist/stores/conversation-panel-preferences-store.d.ts +32 -5
  742. package/dist/stores/conversation-panel-preferences-store.js +29 -12
  743. package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
  744. package/dist/stores/conversation-state-store.cjs +1 -1
  745. package/dist/stores/conversation-state-store.cjs.map +1 -1
  746. package/dist/stores/conversation-state-store.d.ts +9 -3
  747. package/dist/stores/conversation-state-store.js +6 -3
  748. package/dist/stores/conversation-state-store.js.map +1 -1
  749. package/dist/stores/conversation-store.cjs +1 -1
  750. package/dist/stores/conversation-store.cjs.map +1 -1
  751. package/dist/stores/conversation-store.d.ts +2 -0
  752. package/dist/stores/conversation-store.js +3 -0
  753. package/dist/stores/conversation-store.js.map +1 -1
  754. package/dist/stores/model-store.cjs +1 -1
  755. package/dist/stores/model-store.cjs.map +1 -1
  756. package/dist/stores/model-store.d.ts +7 -0
  757. package/dist/stores/model-store.js +4 -0
  758. package/dist/stores/model-store.js.map +1 -1
  759. package/dist/types/automation.cjs.map +1 -1
  760. package/dist/types/automation.d.ts +46 -1
  761. package/dist/types/automation.js.map +1 -1
  762. package/dist/ui/context-menu.d.ts +1 -1
  763. package/dist/ui/toggle-switch.cjs +1 -1
  764. package/dist/ui/toggle-switch.cjs.map +1 -1
  765. package/dist/ui/toggle-switch.d.ts +4 -1
  766. package/dist/ui/toggle-switch.js +4 -3
  767. package/dist/ui/toggle-switch.js.map +1 -1
  768. package/dist/utils/automation-catalog.cjs +1 -1
  769. package/dist/utils/automation-catalog.cjs.map +1 -1
  770. package/dist/utils/automation-catalog.d.ts +12 -1
  771. package/dist/utils/automation-catalog.js +42 -12
  772. package/dist/utils/automation-catalog.js.map +1 -1
  773. package/dist/utils/automation-run-display.cjs +2 -0
  774. package/dist/utils/automation-run-display.cjs.map +1 -0
  775. package/dist/utils/automation-run-display.d.ts +20 -0
  776. package/dist/utils/automation-run-display.js +85 -0
  777. package/dist/utils/automation-run-display.js.map +1 -0
  778. package/dist/utils/automation-schedule.cjs +1 -1
  779. package/dist/utils/automation-schedule.cjs.map +1 -1
  780. package/dist/utils/automation-schedule.d.ts +16 -0
  781. package/dist/utils/automation-schedule.js +2 -0
  782. package/dist/utils/automation-schedule.js.map +1 -1
  783. package/dist/utils/constants.cjs +1 -1
  784. package/dist/utils/constants.cjs.map +1 -1
  785. package/dist/utils/constants.d.ts +4 -0
  786. package/dist/utils/constants.js +23 -3
  787. package/dist/utils/constants.js.map +1 -1
  788. package/dist/utils/format-event-timestamp.cjs +2 -0
  789. package/dist/utils/format-event-timestamp.cjs.map +1 -0
  790. package/dist/utils/format-event-timestamp.d.ts +1 -0
  791. package/dist/utils/format-event-timestamp.js +13 -0
  792. package/dist/utils/format-event-timestamp.js.map +1 -0
  793. package/dist/utils/git-diff-stats.cjs +2 -2
  794. package/dist/utils/git-diff-stats.cjs.map +1 -1
  795. package/dist/utils/git-diff-stats.d.ts +4 -0
  796. package/dist/utils/git-diff-stats.js +12 -2
  797. package/dist/utils/git-diff-stats.js.map +1 -1
  798. package/dist/utils/plan-file.cjs +4 -0
  799. package/dist/utils/plan-file.cjs.map +1 -0
  800. package/dist/utils/plan-file.d.ts +18 -0
  801. package/dist/utils/plan-file.js +58 -0
  802. package/dist/utils/plan-file.js.map +1 -0
  803. package/dist/utils/recommended-automation-rail.cjs +1 -1
  804. package/dist/utils/recommended-automation-rail.cjs.map +1 -1
  805. package/dist/utils/recommended-automation-rail.js +1 -0
  806. package/dist/utils/recommended-automation-rail.js.map +1 -1
  807. package/dist/utils/scroll-fade-state.cjs +1 -1
  808. package/dist/utils/scroll-fade-state.cjs.map +1 -1
  809. package/dist/utils/scroll-fade-state.d.ts +6 -0
  810. package/dist/utils/scroll-fade-state.js +8 -1
  811. package/dist/utils/scroll-fade-state.js.map +1 -1
  812. package/dist/utils/sdk-settings-schema.cjs +1 -1
  813. package/dist/utils/sdk-settings-schema.cjs.map +1 -1
  814. package/dist/utils/sdk-settings-schema.d.ts +1 -0
  815. package/dist/utils/sdk-settings-schema.js +25 -22
  816. package/dist/utils/sdk-settings-schema.js.map +1 -1
  817. package/dist/utils/utils.cjs +1 -1
  818. package/dist/utils/utils.cjs.map +1 -1
  819. package/dist/utils/utils.js +11 -11
  820. package/dist/utils/utils.js.map +1 -1
  821. package/package.json +4 -4
  822. package/scripts/check-sdk-version-sync.mjs +6 -6
  823. package/scripts/dev-safe.mjs +1 -1
  824. package/scripts/dev-with-automation.mjs +1 -1
  825. package/scripts/static-server.mjs +33 -1
  826. package/build/assets/active-backend-context-CrHTlgvN.js +0 -2
  827. package/build/assets/agent-profiles-settings-Dzgb7G9z.js +0 -1
  828. package/build/assets/agent-server-conversation-service.api-tnqNjbpE.js +0 -86
  829. package/build/assets/agent-settings-DLtsqaOs.js +0 -2
  830. package/build/assets/agent-settings-fFvR-XC2.js +0 -1
  831. package/build/assets/api-key-entry-screen-qTzrmJcr.js +0 -1
  832. package/build/assets/automation-detail-BmwlCUAB.js +0 -3
  833. package/build/assets/automation-git-sync-CprN5DcU.js +0 -1
  834. package/build/assets/automation-setup-route-C40kXjMY.js +0 -1
  835. package/build/assets/automations-list-DuNcRawl.js +0 -1
  836. package/build/assets/backend-form-modal-lhGwzXFI.js +0 -1
  837. package/build/assets/bot-dMYHVfYM.js +0 -1
  838. package/build/assets/canvas-extensions-8A-XhpgP.js +0 -1
  839. package/build/assets/check-CS0vmpQQ.js +0 -1
  840. package/build/assets/chevron-down-e1QBpjVy.js +0 -1
  841. package/build/assets/chevron-right-ZG4R5G4Q.js +0 -1
  842. package/build/assets/circle-check-DzWLNsbE.js +0 -1
  843. package/build/assets/command-menu--UIlGL72.js +0 -1
  844. package/build/assets/commits-tab-AnZwLvh-.js +0 -1
  845. package/build/assets/confirmation-modal-Dv1ktp8K.js +0 -1
  846. package/build/assets/conversation-BbGrAO4Z.js +0 -93
  847. package/build/assets/conversation-mYT6NAoj.js +0 -1
  848. package/build/assets/conversation-panel-mYT6NAoj.js +0 -1
  849. package/build/assets/edit-automation-modal-DadGbJ2u.js +0 -1
  850. package/build/assets/empty-state-BoGVDecT.js +0 -1
  851. package/build/assets/enum-filter-dropdown-Bgca129f.js +0 -1
  852. package/build/assets/extensions-hub-CcDqq_vR.js +0 -1
  853. package/build/assets/extensions-navigation-Cr4yzYk4.js +0 -1
  854. package/build/assets/external-link-DKUlnCQV.js +0 -1
  855. package/build/assets/files-tab-D4o2VyE_.js +0 -1
  856. package/build/assets/get-git-path-ChKDVHZp.js +0 -1
  857. package/build/assets/git-repo-dropdown-BkqzkMmM.js +0 -1
  858. package/build/assets/home-ChpSuepX.js +0 -1
  859. package/build/assets/home-DIsB440S.js +0 -1
  860. package/build/assets/home-automation-run-tooltip-BVNDWjAH.js +0 -1
  861. package/build/assets/home-store-CY9Ej0ux.js +0 -1
  862. package/build/assets/index-home-BdlrFIif.js +0 -1
  863. package/build/assets/info-B6RQawoW.js +0 -1
  864. package/build/assets/install-server-modal-Dpy89p4g.js +0 -1
  865. package/build/assets/kebab-menu-item-content-D8hSNGmm.js +0 -1
  866. package/build/assets/list-filter-DsEK7NFC.js +0 -1
  867. package/build/assets/llm-not-configured-banner-CIFABh3K.js +0 -27
  868. package/build/assets/llm-settings-B9juXhIa.js +0 -1
  869. package/build/assets/llm-settings-De1d5dfr.js +0 -1
  870. package/build/assets/llm-subscription-service-BpJ0ouQo.js +0 -1
  871. package/build/assets/loader-circle-CC1au6hc.js +0 -1
  872. package/build/assets/manage-backends-modal-BrPV3oB-.js +0 -1
  873. package/build/assets/manifest-80fb1c29.js +0 -1
  874. package/build/assets/markdown-renderer-BzTlxI8x.js +0 -8
  875. package/build/assets/mcp-page-BEBYqH_K.js +0 -9
  876. package/build/assets/messages-DKV9cRc2.js +0 -41
  877. package/build/assets/onboarding-DV_OXoeP.js +0 -1
  878. package/build/assets/onboarding-modal-rkyBYkeQ.js +0 -1
  879. package/build/assets/organization-service.api-DrYNkEN_.js +0 -1
  880. package/build/assets/pencil-47jAZH_V.js +0 -1
  881. package/build/assets/pin-By41Vl5J.js +0 -1
  882. package/build/assets/planner-tab-C9uZmhme.js +0 -1
  883. package/build/assets/plug-CG5HFcNG.js +0 -1
  884. package/build/assets/plugins-management-service-BMJgC3Ga.js +0 -1
  885. package/build/assets/plus-C7Slq-0I.js +0 -1
  886. package/build/assets/profiles-service.api-ChoKrL0l.js +0 -1
  887. package/build/assets/proxy-9Fe1v5na.js +0 -1
  888. package/build/assets/recommended-automations-launcher-6ABrI9Cy.js +0 -1
  889. package/build/assets/refresh-cw-3q3Frrii.js +0 -1
  890. package/build/assets/root-Dc8YmC9F.js +0 -2
  891. package/build/assets/root-VDaypvK4.css +0 -1
  892. package/build/assets/root-layout-CXkhSPYh.js +0 -2
  893. package/build/assets/schema-field-D-y9-LDb.js +0 -1
  894. package/build/assets/scroll-fade-state-Dw-i4SGq.js +0 -1
  895. package/build/assets/sdk-section-page-BlFiizlG.js +0 -1
  896. package/build/assets/secret-form-BB7the8W.js +0 -1
  897. package/build/assets/secrets-service-ByZVENbp.js +0 -1
  898. package/build/assets/settings-C0EWuBtA.js +0 -1
  899. package/build/assets/settings-index-5w5UW2K3.js +0 -1
  900. package/build/assets/settings-service.api-DJ1r62Zr.js +0 -1
  901. package/build/assets/shared-conversation-CA5ISEDy.js +0 -1
  902. package/build/assets/shield-check-D2aCRd16.js +0 -1
  903. package/build/assets/sidebar-mobile-menu-toggle-C_fb0Jki.js +0 -1
  904. package/build/assets/skill-scope-B42H-XOc.js +0 -1
  905. package/build/assets/skills-plugins-tgF8EiXC.js +0 -1
  906. package/build/assets/skills-settings-BgJ9PaOe.js +0 -1
  907. package/build/assets/styled-tooltip-C4jf5Fv9.js +0 -1
  908. package/build/assets/toggle-switch-ChOLXv2n.js +0 -1
  909. package/build/assets/trash-2-D7K26eDO.js +0 -1
  910. package/build/assets/trash-D-HYiVYM.js +0 -1
  911. package/build/assets/triangle-alert-CtdXWHUI.js +0 -1
  912. package/build/assets/usage-tab-CVDffLPt.js +0 -1
  913. package/build/assets/use-acp-credential-form-XIQmpX6M.js +0 -1
  914. package/build/assets/use-activate-agent-profile-BLfmvDiG.js +0 -1
  915. package/build/assets/use-agent-profiles-Bd9Bvvp1.js +0 -1
  916. package/build/assets/use-canvas-extensions-Bi693ujJ.js +0 -1
  917. package/build/assets/use-config-A9QovgXO.js +0 -1
  918. package/build/assets/use-create-conversation-Dx3l7mFZ.js +0 -1
  919. package/build/assets/use-create-secret-B9cUFWRG.js +0 -1
  920. package/build/assets/use-has-permission-B3C8rQmR.js +0 -1
  921. package/build/assets/use-is-authed-nTBcM7dE.js +0 -1
  922. package/build/assets/use-llm-configured-BV9nZ1_j.js +0 -1
  923. package/build/assets/use-llm-profiles-BO-P4Oyo.js +0 -1
  924. package/build/assets/use-manifest-capabilities-Cw_flwEz.js +0 -1
  925. package/build/assets/use-onboarding-completion-D8U7k4Qb.js +0 -1
  926. package/build/assets/use-pinned-home-route-CckOZrmb.js +0 -1
  927. package/build/assets/use-plugins-marketplace-7i94Zu3Z.js +0 -1
  928. package/build/assets/use-save-agent-profile-BUjSsDXK.js +0 -1
  929. package/build/assets/use-settings-DSXLbvBl.js +0 -1
  930. package/build/assets/use-settings-nav-items-CwRw-CmX.js +0 -16
  931. package/build/assets/use-tracking-D53y3TH9.js +0 -3
  932. package/build/assets/utils-CN5ZfZy1.js +0 -1
  933. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js +0 -186
  934. package/build/assets/vendor~root-layout-C9Ju9DQg.js +0 -1
  935. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js +0 -1
  936. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js +0 -1
  937. package/build/assets/x-DJdhbdmt.js +0 -1
  938. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +0 -2
  939. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +0 -1
  940. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +0 -35
  941. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +0 -247
  942. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +0 -1
  943. package/dist/hooks/query/use-skills.cjs +0 -2
  944. package/dist/hooks/query/use-skills.cjs.map +0 -1
  945. package/dist/hooks/query/use-skills.d.ts +0 -7
  946. package/dist/hooks/query/use-skills.js +0 -13
  947. package/dist/hooks/query/use-skills.js.map +0 -1
  948. package/dist/hooks/use-has-permission.cjs +0 -2
  949. package/dist/hooks/use-has-permission.cjs.map +0 -1
  950. package/dist/hooks/use-has-permission.d.ts +0 -1
  951. package/dist/hooks/use-has-permission.js +0 -8
  952. package/dist/hooks/use-has-permission.js.map +0 -1
  953. package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs +0 -2
  954. package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs.map +0 -1
  955. package/dist/node_modules/lucide-react/dist/esm/icons/eye.js +0 -14
  956. package/dist/node_modules/lucide-react/dist/esm/icons/eye.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"run-status-badge.js","names":[],"sources":["../../../../../src/components/features/automations/detail/run-status-badge.tsx"],"sourcesContent":["import { Loader2 } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport { StyledTooltip } from \"#/components/shared/buttons/styled-tooltip\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport CheckCircleIcon from \"#/icons/check-circle.svg?react\";\nimport XCircleIcon from \"#/icons/x-circle.svg?react\";\nimport ClockIcon from \"#/icons/clock.svg?react\";\nimport { AutomationRunStatus } from \"#/types/automation\";\nimport { cn } from \"#/utils/utils\";\n\ninterface RunStatusBadgeProps {\n status: AutomationRunStatus;\n /**\n * Icon-only mark (no pill). Status text is available via hover tooltip and\n * `aria-label`, unless {@link showLabel} is also set.\n */\n iconOnly?: boolean;\n /** With `iconOnly`, render the status word next to the icon (still no pill). */\n showLabel?: boolean;\n /** Smaller pill for dense rows (e.g. home activity meta line). */\n compact?: boolean;\n}\n\nconst statusConfig: Record<\n AutomationRunStatus,\n { label: I18nKey; style: string; iconTone: string }\n> = {\n [AutomationRunStatus.COMPLETED]: {\n label: I18nKey.AUTOMATIONS$DETAIL$SUCCESSFUL,\n style: \"bg-[var(--oh-success)]/10 text-[var(--oh-success)]\",\n iconTone: \"text-[var(--oh-success)]\",\n },\n [AutomationRunStatus.FAILED]: {\n label: I18nKey.AUTOMATIONS$DETAIL$FAILED,\n style: \"bg-[var(--oh-danger)]/10 text-danger\",\n iconTone: \"text-danger\",\n },\n [AutomationRunStatus.PENDING]: {\n label: I18nKey.AUTOMATIONS$DETAIL$PENDING,\n style: \"bg-surface-raised text-muted\",\n iconTone: \"text-muted\",\n },\n [AutomationRunStatus.RUNNING]: {\n label: I18nKey.AUTOMATIONS$DETAIL$RUNNING,\n style: \"bg-surface-raised text-muted\",\n iconTone: \"text-muted\",\n },\n [AutomationRunStatus.CANCELLED]: {\n label: I18nKey.AUTOMATIONS$DETAIL$CANCELLED,\n style: \"bg-surface-raised text-muted\",\n iconTone: \"text-muted\",\n },\n [AutomationRunStatus.SKIPPED]: {\n label: I18nKey.AUTOMATIONS$DETAIL$SKIPPED,\n style: \"bg-surface-raised text-muted\",\n iconTone: \"text-muted\",\n },\n};\n\nfunction StatusIcon({\n status,\n compact = false,\n}: {\n status: AutomationRunStatus;\n compact?: boolean;\n}) {\n const iconClass = compact ? \"size-3\" : \"size-3.5\";\n switch (status) {\n case AutomationRunStatus.COMPLETED:\n return (\n <CheckCircleIcon\n data-testid=\"run-status-icon-completed\"\n className={iconClass}\n />\n );\n case AutomationRunStatus.FAILED:\n return (\n <XCircleIcon\n data-testid=\"run-status-icon-failed\"\n className={iconClass}\n />\n );\n case AutomationRunStatus.RUNNING:\n return (\n <Loader2\n data-testid=\"run-status-icon-running\"\n className={cn(iconClass, \"animate-spin motion-reduce:animate-none\")}\n aria-hidden=\"true\"\n />\n );\n default:\n return (\n <ClockIcon\n data-testid=\"run-status-icon-pending\"\n className={iconClass}\n />\n );\n }\n}\n\nexport function RunStatusBadge({\n status,\n iconOnly = false,\n showLabel = false,\n compact = false,\n}: RunStatusBadgeProps) {\n const { t } = useTranslation(\"openhands\");\n // Degrade instead of crashing on a status the backend added after this enum.\n const config =\n statusConfig[status] ?? statusConfig[AutomationRunStatus.PENDING];\n const label = t(config.label);\n\n if (iconOnly) {\n if (showLabel) {\n return (\n <span\n data-testid=\"run-status-badge-icon\"\n className={cn(\n \"inline-flex min-w-0 shrink-0 items-center gap-1.5 text-xs font-medium\",\n config.iconTone,\n )}\n >\n <StatusIcon status={status} compact={compact} />\n <span className=\"truncate\">{label}</span>\n </span>\n );\n }\n\n return (\n <StyledTooltip content={label} placement=\"top\">\n <span\n role=\"img\"\n aria-label={label}\n data-testid=\"run-status-badge-icon\"\n className={cn(\n \"inline-flex shrink-0 cursor-default items-center justify-center\",\n config.iconTone,\n )}\n >\n <StatusIcon status={status} compact={compact} />\n </span>\n </StyledTooltip>\n );\n }\n\n return (\n <span\n className={cn(\n \"inline-flex items-center rounded-full font-medium\",\n compact\n ? \"gap-1 pl-1 pr-1.5 py-0 text-[10px] leading-4\"\n : \"gap-1.5 pl-2 pr-2.5 py-1 text-xs\",\n config.style,\n )}\n >\n <StatusIcon status={status} compact={compact} />\n {label}\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;AAuBA,IAAM,IAGF;EACD,EAAoB,YAAY;EAC/B,OAAO,EAAQ;EACf,OAAO;EACP,UAAU;CACZ;EACC,EAAoB,SAAS;EAC5B,OAAO,EAAQ;EACf,OAAO;EACP,UAAU;CACZ;EACC,EAAoB,UAAU;EAC7B,OAAO,EAAQ;EACf,OAAO;EACP,UAAU;CACZ;EACC,EAAoB,UAAU;EAC7B,OAAO,EAAQ;EACf,OAAO;EACP,UAAU;CACZ;EACC,EAAoB,YAAY;EAC/B,OAAO,EAAQ;EACf,OAAO;EACP,UAAU;CACZ;EACC,EAAoB,UAAU;EAC7B,OAAO,EAAQ;EACf,OAAO;EACP,UAAU;CACZ;AACF;AAEA,SAAS,EAAW,EAClB,WACA,aAAU,MAIT;CACD,IAAM,IAAY,IAAU,WAAW;CACvC,QAAQ,GAAR;EACE,KAAK,EAAoB,WACvB,OACE,kBAAC,GAAD;GACE,eAAY;GACZ,WAAW;EACZ,CAAA;EAEL,KAAK,EAAoB,QACvB,OACE,kBAAC,GAAD;GACE,eAAY;GACZ,WAAW;EACZ,CAAA;EAEL,KAAK,EAAoB,SACvB,OACE,kBAAC,GAAD;GACE,eAAY;GACZ,WAAW,EAAG,GAAW,yCAAyC;GAClE,eAAY;EACb,CAAA;EAEL,SACE,OACE,kBAAC,GAAD;GACE,eAAY;GACZ,WAAW;EACZ,CAAA;CAEP;AACF;AAEA,SAAgB,EAAe,EAC7B,WACA,cAAW,IACX,eAAY,IACZ,aAAU,MACY;CACtB,IAAM,EAAE,SAAM,EAAe,WAAW,GAElC,IACJ,EAAa,MAAW,EAAa,EAAoB,UACrD,IAAQ,EAAE,EAAO,KAAK;CAmC5B,OAjCI,IACE,IAEA,kBAAC,QAAD;EACE,eAAY;EACZ,WAAW,EACT,yEACA,EAAO,QACT;YALF,CAOE,kBAAC,GAAD;GAAoB;GAAiB;EAAU,CAAA,GAC/C,kBAAC,QAAD;GAAM,WAAU;aAAY;EAAY,CAAA,CACpC;MAKR,kBAAC,GAAD;EAAe,SAAS;EAAO,WAAU;YACvC,kBAAC,QAAD;GACE,MAAK;GACL,cAAY;GACZ,eAAY;GACZ,WAAW,EACT,mEACA,EAAO,QACT;aAEA,kBAAC,GAAD;IAAoB;IAAiB;GAAU,CAAA;EAC3C,CAAA;CACO,CAAA,IAKjB,kBAAC,QAAD;EACE,WAAW,EACT,qDACA,IACI,iDACA,oCACJ,EAAO,KACT;YAPF,CASE,kBAAC,GAAD;GAAoB;GAAiB;EAAU,CAAA,GAC9C,CACG;;AAEV"}
1
+ {"version":3,"file":"run-status-badge.js","names":[],"sources":["../../../../../src/components/features/automations/detail/run-status-badge.tsx"],"sourcesContent":["import { CircleAlert, CircleHelp, Loader2 } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport { StyledTooltip } from \"#/components/shared/buttons/styled-tooltip\";\nimport CheckCircleIcon from \"#/icons/check-circle.svg?react\";\nimport XCircleIcon from \"#/icons/x-circle.svg?react\";\nimport ClockIcon from \"#/icons/clock.svg?react\";\nimport { AutomationRunStatus } from \"#/types/automation\";\nimport {\n getAutomationRunBadgeLabelKey,\n type AutomationRunBadgeStatus,\n} from \"#/utils/automation-run-display\";\nimport { cn } from \"#/utils/utils\";\n\ninterface RunStatusBadgeProps {\n status: AutomationRunBadgeStatus;\n /**\n * Icon-only mark (no pill). Status text is available via hover tooltip and\n * `aria-label`, unless {@link showLabel} is also set.\n */\n iconOnly?: boolean;\n /** With `iconOnly`, render the status word next to the icon (still no pill). */\n showLabel?: boolean;\n /** Smaller pill for dense rows (e.g. home activity meta line). */\n compact?: boolean;\n}\n\nconst statusConfig: Record<string, { style: string; iconTone: string }> = {\n [AutomationRunStatus.COMPLETED]: {\n style: \"bg-[var(--oh-success)]/10 text-[var(--oh-success)]\",\n iconTone: \"text-[var(--oh-success)]\",\n },\n success: {\n style: \"bg-[var(--oh-success)]/10 text-[var(--oh-success)]\",\n iconTone: \"text-[var(--oh-success)]\",\n },\n [AutomationRunStatus.FAILED]: {\n style: \"bg-[var(--oh-danger)]/10 text-danger\",\n iconTone: \"text-danger\",\n },\n failed: {\n style: \"bg-[var(--oh-danger)]/10 text-danger\",\n iconTone: \"text-danger\",\n },\n blocked: {\n style: \"bg-[var(--oh-warning)]/10 text-[var(--oh-warning)]\",\n iconTone: \"text-[var(--oh-warning)]\",\n },\n partial_success: {\n style: \"bg-[var(--oh-warning)]/10 text-[var(--oh-warning)]\",\n iconTone: \"text-[var(--oh-warning)]\",\n },\n unknown: {\n style: \"bg-[var(--oh-warning)]/10 text-[var(--oh-warning)]\",\n iconTone: \"text-[var(--oh-warning)]\",\n },\n [AutomationRunStatus.PENDING]: {\n style: \"bg-surface-raised text-muted\",\n iconTone: \"text-muted\",\n },\n [AutomationRunStatus.RUNNING]: {\n style: \"bg-surface-raised text-muted\",\n iconTone: \"text-muted\",\n },\n [AutomationRunStatus.CANCELLED]: {\n style: \"bg-surface-raised text-muted\",\n iconTone: \"text-muted\",\n },\n [AutomationRunStatus.SKIPPED]: {\n style: \"bg-surface-raised text-muted\",\n iconTone: \"text-muted\",\n },\n};\n\nfunction StatusIcon({\n status,\n compact = false,\n}: {\n status: AutomationRunBadgeStatus;\n compact?: boolean;\n}) {\n const iconClass = compact ? \"size-3\" : \"size-3.5\";\n switch (status) {\n case AutomationRunStatus.COMPLETED:\n case \"success\":\n return (\n <CheckCircleIcon\n data-testid=\"run-status-icon-completed\"\n className={iconClass}\n />\n );\n case AutomationRunStatus.FAILED:\n case \"failed\":\n return (\n <XCircleIcon\n data-testid=\"run-status-icon-failed\"\n className={iconClass}\n />\n );\n case AutomationRunStatus.RUNNING:\n return (\n <Loader2\n data-testid=\"run-status-icon-running\"\n className={cn(iconClass, \"animate-spin motion-reduce:animate-none\")}\n aria-hidden=\"true\"\n />\n );\n case \"blocked\":\n case \"partial_success\":\n return (\n <CircleAlert\n data-testid=\"run-status-icon-warning\"\n className={iconClass}\n aria-hidden=\"true\"\n />\n );\n case \"unknown\":\n return (\n <CircleHelp\n data-testid=\"run-status-icon-needs-review\"\n className={iconClass}\n aria-hidden=\"true\"\n />\n );\n default:\n return (\n <ClockIcon\n data-testid=\"run-status-icon-pending\"\n className={iconClass}\n />\n );\n }\n}\n\nexport function RunStatusBadge({\n status,\n iconOnly = false,\n showLabel = false,\n compact = false,\n}: RunStatusBadgeProps) {\n const { t } = useTranslation(\"openhands\");\n // Degrade instead of crashing on a status the backend added after this enum.\n const config =\n statusConfig[status] ?? statusConfig[AutomationRunStatus.PENDING];\n const label = t(getAutomationRunBadgeLabelKey(status));\n\n if (iconOnly) {\n if (showLabel) {\n return (\n <span\n data-testid=\"run-status-badge-icon\"\n className={cn(\n \"inline-flex min-w-0 shrink-0 items-center gap-1.5 text-xs font-medium\",\n config.iconTone,\n )}\n >\n <StatusIcon status={status} compact={compact} />\n <span className=\"truncate\">{label}</span>\n </span>\n );\n }\n\n return (\n <StyledTooltip content={label} placement=\"top\">\n <span\n role=\"img\"\n aria-label={label}\n data-testid=\"run-status-badge-icon\"\n className={cn(\n \"inline-flex shrink-0 cursor-default items-center justify-center\",\n config.iconTone,\n )}\n >\n <StatusIcon status={status} compact={compact} />\n </span>\n </StyledTooltip>\n );\n }\n\n return (\n <span\n className={cn(\n \"inline-flex items-center rounded-full font-medium\",\n compact\n ? \"gap-1 pl-1 pr-1.5 py-0 text-[10px] leading-4\"\n : \"gap-1.5 pl-2 pr-2.5 py-1 text-xs\",\n config.style,\n )}\n >\n <StatusIcon status={status} compact={compact} />\n {label}\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA0BA,IAAM,IAAoE;EACvE,EAAoB,YAAY;EAC/B,OAAO;EACP,UAAU;CACZ;CACA,SAAS;EACP,OAAO;EACP,UAAU;CACZ;EACC,EAAoB,SAAS;EAC5B,OAAO;EACP,UAAU;CACZ;CACA,QAAQ;EACN,OAAO;EACP,UAAU;CACZ;CACA,SAAS;EACP,OAAO;EACP,UAAU;CACZ;CACA,iBAAiB;EACf,OAAO;EACP,UAAU;CACZ;CACA,SAAS;EACP,OAAO;EACP,UAAU;CACZ;EACC,EAAoB,UAAU;EAC7B,OAAO;EACP,UAAU;CACZ;EACC,EAAoB,UAAU;EAC7B,OAAO;EACP,UAAU;CACZ;EACC,EAAoB,YAAY;EAC/B,OAAO;EACP,UAAU;CACZ;EACC,EAAoB,UAAU;EAC7B,OAAO;EACP,UAAU;CACZ;AACF;AAEA,SAAS,EAAW,EAClB,WACA,aAAU,MAIT;CACD,IAAM,IAAY,IAAU,WAAW;CACvC,QAAQ,GAAR;EACE,KAAK,EAAoB;EACzB,KAAK,WACH,OACE,kBAAC,GAAD;GACE,eAAY;GACZ,WAAW;EACZ,CAAA;EAEL,KAAK,EAAoB;EACzB,KAAK,UACH,OACE,kBAAC,GAAD;GACE,eAAY;GACZ,WAAW;EACZ,CAAA;EAEL,KAAK,EAAoB,SACvB,OACE,kBAAC,GAAD;GACE,eAAY;GACZ,WAAW,EAAG,GAAW,yCAAyC;GAClE,eAAY;EACb,CAAA;EAEL,KAAK;EACL,KAAK,mBACH,OACE,kBAAC,GAAD;GACE,eAAY;GACZ,WAAW;GACX,eAAY;EACb,CAAA;EAEL,KAAK,WACH,OACE,kBAAC,GAAD;GACE,eAAY;GACZ,WAAW;GACX,eAAY;EACb,CAAA;EAEL,SACE,OACE,kBAAC,GAAD;GACE,eAAY;GACZ,WAAW;EACZ,CAAA;CAEP;AACF;AAEA,SAAgB,EAAe,EAC7B,WACA,cAAW,IACX,eAAY,IACZ,aAAU,MACY;CACtB,IAAM,EAAE,SAAM,EAAe,WAAW,GAElC,IACJ,EAAa,MAAW,EAAa,EAAoB,UACrD,IAAQ,EAAE,EAA8B,CAAM,CAAC;CAmCrD,OAjCI,IACE,IAEA,kBAAC,QAAD;EACE,eAAY;EACZ,WAAW,EACT,yEACA,EAAO,QACT;YALF,CAOE,kBAAC,GAAD;GAAoB;GAAiB;EAAU,CAAA,GAC/C,kBAAC,QAAD;GAAM,WAAU;aAAY;EAAY,CAAA,CACpC;MAKR,kBAAC,GAAD;EAAe,SAAS;EAAO,WAAU;YACvC,kBAAC,QAAD;GACE,MAAK;GACL,cAAY;GACZ,eAAY;GACZ,WAAW,EACT,mEACA,EAAO,QACT;aAEA,kBAAC,GAAD;IAAoB;IAAiB;GAAU,CAAA;EAC3C,CAAA;CACO,CAAA,IAKjB,kBAAC,QAAD;EACE,WAAW,EACT,qDACA,IACI,iDACA,oCACJ,EAAO,KACT;YAPF,CASE,kBAAC,GAAD;GAAoB;GAAiB;EAAU,CAAA,GAC9C,CACG;;AAEV"}
@@ -1,2 +1,2 @@
1
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),n=require("../../../i18n/declaration.cjs"),r=require("../../../utils/utils.cjs"),i=require("../../../ui/context-menu.cjs"),a=require("../context-menu/context-menu-list-item.cjs"),o=require("../../../icons/kebab-vertical.cjs"),s=require("./automation-action-button-classes.cjs"),c=require("./kebab-menu-item-content.cjs");let l=require("react"),u=require("react/jsx-runtime"),d=require("react-dom");d=e.__toESM(d,1);function f({items:e,triggerClassName:f}){let{t:p}=t.useTranslation(`openhands`),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(),v=(0,l.useRef)(null),y=(0,l.useRef)(null);(0,l.useLayoutEffect)(()=>{if(!m||!v.current)return;let e=()=>{let e=v.current?.getBoundingClientRect();e&&_({position:`fixed`,zIndex:9999,top:e.bottom+4,right:window.innerWidth-e.right})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[m]),(0,l.useEffect)(()=>{if(!m)return;let e=e=>{let t=e.target;v.current?.contains(t)||y.current?.contains(t)||h(!1)},t=e=>{e.key===`Escape`&&h(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[m]);let b=m&&g?(0,u.jsx)(i.ContextMenu,{ref:y,theme:`popover`,className:`min-w-[10rem]`,children:e.map(e=>(0,u.jsx)(`li`,{children:(0,u.jsx)(a.ContextMenuListItem,{onClick:t=>{t.stopPropagation(),e.onClick(),h(!1)},isDisabled:e.disabled,className:`group`,children:(0,u.jsx)(c.KebabMenuItemContent,{icon:e.icon,label:e.label})})},e.label))}):null;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{ref:v,type:`button`,onClick:e=>{e.stopPropagation(),h(e=>!e)},className:r.cn(s.automationIconActionButtonClassName,f),"aria-label":p(n.I18nKey.AUTOMATIONS$ACTIONS_MENU),"aria-expanded":m,"aria-haspopup":`menu`,children:(0,u.jsx)(o.default,{className:`size-4`})}),m&&g&&typeof document<`u`?d.default.createPortal((0,u.jsx)(`div`,{style:g,children:b}),document.body):null]})}exports.KebabMenu=f;
1
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),n=require("../../../i18n/declaration.cjs"),r=require("../../../utils/utils.cjs"),i=require("../../../ui/context-menu.cjs"),a=require("../context-menu/context-menu-list-item.cjs"),o=require("../../../icons/kebab-vertical.cjs"),s=require("./automation-action-button-classes.cjs"),c=require("./kebab-menu-item-content.cjs");let l=require("react"),u=require("react/jsx-runtime"),d=require("react-dom");d=e.__toESM(d,1);function f({items:e,triggerClassName:f}){let{t:p}=t.useTranslation(`openhands`),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(),v=(0,l.useRef)(null),y=(0,l.useRef)(null);(0,l.useLayoutEffect)(()=>{if(!m||!v.current)return;let t=()=>{let t=v.current?.getBoundingClientRect();if(!t)return;let n=(y.current?.getBoundingClientRect().height??0)||e.length*36;_({position:`fixed`,zIndex:9999,...t.bottom+4+n>window.innerHeight?{bottom:window.innerHeight-t.top+4}:{top:t.bottom+4},right:window.innerWidth-t.right})};t();let n=window.requestAnimationFrame(t);return window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.cancelAnimationFrame(n),window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[m,e.length]),(0,l.useEffect)(()=>{if(!m)return;let e=e=>{let t=e.target;v.current?.contains(t)||y.current?.contains(t)||h(!1)},t=e=>{e.key===`Escape`&&h(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[m]);let b=m&&g?(0,u.jsx)(i.ContextMenu,{ref:y,theme:`popover`,className:`min-w-[10rem]`,children:e.map(e=>(0,u.jsx)(`li`,{children:(0,u.jsx)(a.ContextMenuListItem,{onClick:t=>{t.stopPropagation(),e.onClick(),h(!1)},isDisabled:e.disabled,className:`group`,children:(0,u.jsx)(c.KebabMenuItemContent,{icon:e.icon,label:e.label})})},e.label))}):null;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{ref:v,type:`button`,onClick:e=>{e.stopPropagation(),h(e=>!e)},className:r.cn(s.automationIconActionButtonClassName,f),"aria-label":p(n.I18nKey.AUTOMATIONS$ACTIONS_MENU),"aria-expanded":m,"aria-haspopup":`menu`,children:(0,u.jsx)(o.default,{className:`size-4`})}),m&&g&&typeof document<`u`?d.default.createPortal((0,u.jsx)(`div`,{style:g,children:b}),document.body):null]})}exports.KebabMenu=f;
2
2
  //# sourceMappingURL=kebab-menu.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"kebab-menu.cjs","names":[],"sources":["../../../../src/components/features/automations/kebab-menu.tsx"],"sourcesContent":["import { useState, useEffect, useLayoutEffect, useRef } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { useTranslation } from \"react-i18next\";\nimport KebabVerticalIcon from \"#/icons/kebab-vertical.svg?react\";\nimport { ContextMenuListItem } from \"#/components/features/context-menu/context-menu-list-item\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { cn } from \"#/utils/utils\";\nimport { automationIconActionButtonClassName } from \"./automation-action-button-classes\";\nimport { KebabMenuItemContent } from \"./kebab-menu-item-content\";\n\nexport interface KebabMenuItem {\n label: string;\n icon: React.ReactNode;\n onClick: () => void;\n disabled?: boolean;\n}\n\ninterface KebabMenuProps {\n items: KebabMenuItem[];\n triggerClassName?: string;\n}\n\nexport function KebabMenu({ items, triggerClassName }: KebabMenuProps) {\n const { t } = useTranslation(\"openhands\");\n const [open, setOpen] = useState(false);\n const [portalStyle, setPortalStyle] = useState<React.CSSProperties>();\n const triggerRef = useRef<HTMLButtonElement>(null);\n const menuRef = useRef<HTMLUListElement>(null);\n\n useLayoutEffect(() => {\n if (!open || !triggerRef.current) return undefined;\n\n const updatePosition = () => {\n const rect = triggerRef.current?.getBoundingClientRect();\n if (!rect) return;\n\n const gap = 4;\n setPortalStyle({\n position: \"fixed\",\n zIndex: 9999,\n top: rect.bottom + gap,\n right: window.innerWidth - rect.right,\n });\n };\n\n updatePosition();\n window.addEventListener(\"resize\", updatePosition);\n window.addEventListener(\"scroll\", updatePosition, true);\n return () => {\n window.removeEventListener(\"resize\", updatePosition);\n window.removeEventListener(\"scroll\", updatePosition, true);\n };\n }, [open]);\n\n useEffect(() => {\n if (!open) return undefined;\n\n const handleClickOutside = (event: MouseEvent) => {\n const target = event.target as Node;\n if (\n triggerRef.current?.contains(target) ||\n menuRef.current?.contains(target)\n ) {\n return;\n }\n setOpen(false);\n };\n\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n setOpen(false);\n }\n };\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n document.addEventListener(\"keydown\", handleEscape);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n document.removeEventListener(\"keydown\", handleEscape);\n };\n }, [open]);\n\n const menu =\n open && portalStyle ? (\n <ContextMenu ref={menuRef} theme=\"popover\" className=\"min-w-[10rem]\">\n {items.map((item) => (\n <li key={item.label}>\n <ContextMenuListItem\n onClick={(event) => {\n event.stopPropagation();\n item.onClick();\n setOpen(false);\n }}\n isDisabled={item.disabled}\n className=\"group\"\n >\n <KebabMenuItemContent icon={item.icon} label={item.label} />\n </ContextMenuListItem>\n </li>\n ))}\n </ContextMenu>\n ) : null;\n\n return (\n <>\n <button\n ref={triggerRef}\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n setOpen((current) => !current);\n }}\n className={cn(automationIconActionButtonClassName, triggerClassName)}\n aria-label={t(I18nKey.AUTOMATIONS$ACTIONS_MENU)}\n aria-expanded={open}\n aria-haspopup=\"menu\"\n >\n <KebabVerticalIcon className=\"size-4\" />\n </button>\n\n {open && portalStyle && typeof document !== \"undefined\"\n ? ReactDOM.createPortal(\n <div style={portalStyle}>{menu}</div>,\n document.body,\n )\n : null}\n </>\n );\n}\n"],"mappings":"siBAuBA,SAAgB,EAAU,CAAE,QAAO,oBAAoC,CACrE,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,CAAC,EAAM,IAAA,EAAA,EAAA,UAAoB,EAAK,EAChC,CAAC,EAAa,IAAA,EAAA,EAAA,UAAgD,EAC9D,GAAA,EAAA,EAAA,QAAuC,IAAI,EAC3C,GAAA,EAAA,EAAA,QAAmC,IAAI,GAE7C,EAAA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AAQ,CAAA,CACxC,CAAA,CACnB,EAZK,EAAK,KAYV,CACL,CACU,CAAA,EACX,KAEN,OACE,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,SAAD,CACE,IAAK,EACL,KAAK,SACL,QAAU,GAAM,CACd,EAAE,gBAAgB,EAClB,EAAS,GAAY,CAAC,CAAO,CAC/B,EACA,UAAW,EAAA,GAAG,EAAA,oCAAqC,CAAgB,EACnE,aAAY,EAAE,EAAA,QAAQ,wBAAwB,EAC9C,gBAAe,EACf,gBAAc,iBAEd,EAAA,EAAA,KAAC,EAAA,QAAD,CAAmB,UAAU,QAAU,CAAA,CACjC,CAAA,EAEP,GAAQ,GAAe,OAAO,SAAa,IACxC,EAAA,QAAS,cACP,EAAA,EAAA,KAAC,MAAD,CAAK,MAAO,WAAc,CAAU,CAAA,EACpC,SAAS,IACX,EACA,IACJ,CAAA,CAAA,CAEN"}
1
+ {"version":3,"file":"kebab-menu.cjs","names":[],"sources":["../../../../src/components/features/automations/kebab-menu.tsx"],"sourcesContent":["import { useState, useEffect, useLayoutEffect, useRef } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { useTranslation } from \"react-i18next\";\nimport KebabVerticalIcon from \"#/icons/kebab-vertical.svg?react\";\nimport { ContextMenuListItem } from \"#/components/features/context-menu/context-menu-list-item\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { cn } from \"#/utils/utils\";\nimport { automationIconActionButtonClassName } from \"./automation-action-button-classes\";\nimport { KebabMenuItemContent } from \"./kebab-menu-item-content\";\n\nexport interface KebabMenuItem {\n label: string;\n icon: React.ReactNode;\n onClick: () => void;\n disabled?: boolean;\n}\n\ninterface KebabMenuProps {\n items: KebabMenuItem[];\n triggerClassName?: string;\n}\n\nexport function KebabMenu({ items, triggerClassName }: KebabMenuProps) {\n const { t } = useTranslation(\"openhands\");\n const [open, setOpen] = useState(false);\n const [portalStyle, setPortalStyle] = useState<React.CSSProperties>();\n const triggerRef = useRef<HTMLButtonElement>(null);\n const menuRef = useRef<HTMLUListElement>(null);\n\n useLayoutEffect(() => {\n if (!open || !triggerRef.current) return undefined;\n\n const updatePosition = () => {\n const rect = triggerRef.current?.getBoundingClientRect();\n if (!rect) return;\n\n const gap = 4;\n // The real height is only measurable once the portal has painted; the\n // first pass falls back to an items-derived estimate (~36px per row).\n const measured = menuRef.current?.getBoundingClientRect().height ?? 0;\n const menuHeight = measured || items.length * 36;\n const overflowsBelow =\n rect.bottom + gap + menuHeight > window.innerHeight;\n\n setPortalStyle({\n position: \"fixed\",\n zIndex: 9999,\n // Flip above the trigger when the menu would clip at the viewport\n // bottom. Bottom-anchoring keeps it hugging the trigger at any height.\n ...(overflowsBelow\n ? { bottom: window.innerHeight - rect.top + gap }\n : { top: rect.bottom + gap }),\n right: window.innerWidth - rect.right,\n });\n };\n\n updatePosition();\n const frame = window.requestAnimationFrame(updatePosition);\n window.addEventListener(\"resize\", updatePosition);\n window.addEventListener(\"scroll\", updatePosition, true);\n return () => {\n window.cancelAnimationFrame(frame);\n window.removeEventListener(\"resize\", updatePosition);\n window.removeEventListener(\"scroll\", updatePosition, true);\n };\n }, [open, items.length]);\n\n useEffect(() => {\n if (!open) return undefined;\n\n const handleClickOutside = (event: MouseEvent) => {\n const target = event.target as Node;\n if (\n triggerRef.current?.contains(target) ||\n menuRef.current?.contains(target)\n ) {\n return;\n }\n setOpen(false);\n };\n\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n setOpen(false);\n }\n };\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n document.addEventListener(\"keydown\", handleEscape);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n document.removeEventListener(\"keydown\", handleEscape);\n };\n }, [open]);\n\n const menu =\n open && portalStyle ? (\n <ContextMenu ref={menuRef} theme=\"popover\" className=\"min-w-[10rem]\">\n {items.map((item) => (\n <li key={item.label}>\n <ContextMenuListItem\n onClick={(event) => {\n event.stopPropagation();\n item.onClick();\n setOpen(false);\n }}\n isDisabled={item.disabled}\n className=\"group\"\n >\n <KebabMenuItemContent icon={item.icon} label={item.label} />\n </ContextMenuListItem>\n </li>\n ))}\n </ContextMenu>\n ) : null;\n\n return (\n <>\n <button\n ref={triggerRef}\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n setOpen((current) => !current);\n }}\n className={cn(automationIconActionButtonClassName, triggerClassName)}\n aria-label={t(I18nKey.AUTOMATIONS$ACTIONS_MENU)}\n aria-expanded={open}\n aria-haspopup=\"menu\"\n >\n <KebabVerticalIcon className=\"size-4\" />\n </button>\n\n {open && portalStyle && typeof document !== \"undefined\"\n ? ReactDOM.createPortal(\n <div style={portalStyle}>{menu}</div>,\n document.body,\n )\n : null}\n </>\n );\n}\n"],"mappings":"siBAuBA,SAAgB,EAAU,CAAE,QAAO,oBAAoC,CACrE,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,CAAC,EAAM,IAAA,EAAA,EAAA,UAAoB,EAAK,EAChC,CAAC,EAAa,IAAA,EAAA,EAAA,UAAgD,EAC9D,GAAA,EAAA,EAAA,QAAuC,IAAI,EAC3C,GAAA,EAAA,EAAA,QAAmC,IAAI,GAE7C,EAAA,EAAA,qBAAsB,CACpB,GAAI,CAAC,GAAQ,CAAC,EAAW,QAAS,OAElC,IAAM,MAAuB,CAC3B,IAAM,EAAO,EAAW,SAAS,sBAAsB,EACvD,GAAI,CAAC,EAAM,OAEX,IAIM,GADW,EAAQ,SAAS,sBAAsB,EAAE,QAAU,IACrC,EAAM,OAAS,GAI9C,EAAe,CACb,SAAU,QACV,OAAQ,KAGR,GAPA,EAAK,OAAS,EAAM,EAAa,OAAO,YAQpC,CAAE,OAAQ,OAAO,YAAc,EAAK,IAAM,CAAI,EAC9C,CAAE,IAAK,EAAK,OAAS,CAAI,EAC7B,MAAO,OAAO,WAAa,EAAK,KAClC,CAAC,CACH,EAEA,EAAe,EACf,IAAM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AK,SACL,QAAU,GAAM,CACd,EAAE,gBAAgB,EAClB,EAAS,GAAY,CAAC,CAAO,CAC/B,EACA,UAAW,EAAA,GAAG,EAAA,oCAAqC,CAAgB,EACnE,aAAY,EAAE,EAAA,QAAQ,wBAAwB,EAC9C,gBAAe,EACf,gBAAc,iBAEd,EAAA,EAAA,KAAC,EAAA,QAAD,CAAmB,UAAU,QAAU,CAAA,CACjC,CAAA,EAEP,GAAQ,GAAe,OAAO,SAAa,IACxC,EAAA,QAAS,cACP,EAAA,EAAA,KAAC,MAAD,CAAK,MAAO,WAAc,CAAU,CAAA,EACpC,SAAS,IACX,EACA,IACJ,CAAA,CAAA,CAEN"}
@@ -16,17 +16,21 @@ function g({ items: g, triggerClassName: _ }) {
16
16
  if (!y || !C.current) return;
17
17
  let e = () => {
18
18
  let e = C.current?.getBoundingClientRect();
19
- e && S({
19
+ if (!e) return;
20
+ let t = (w.current?.getBoundingClientRect().height ?? 0) || g.length * 36;
21
+ S({
20
22
  position: "fixed",
21
23
  zIndex: 9999,
22
- top: e.bottom + 4,
24
+ ...e.bottom + 4 + t > window.innerHeight ? { bottom: window.innerHeight - e.top + 4 } : { top: e.bottom + 4 },
23
25
  right: window.innerWidth - e.right
24
26
  });
25
27
  };
26
- return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
27
- window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
28
+ e();
29
+ let t = window.requestAnimationFrame(e);
30
+ return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
31
+ window.cancelAnimationFrame(t), window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
28
32
  };
29
- }, [y]), c(() => {
33
+ }, [y, g.length]), c(() => {
30
34
  if (!y) return;
31
35
  let e = (e) => {
32
36
  let t = e.target;
@@ -1 +1 @@
1
- {"version":3,"file":"kebab-menu.js","names":[],"sources":["../../../../src/components/features/automations/kebab-menu.tsx"],"sourcesContent":["import { useState, useEffect, useLayoutEffect, useRef } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { useTranslation } from \"react-i18next\";\nimport KebabVerticalIcon from \"#/icons/kebab-vertical.svg?react\";\nimport { ContextMenuListItem } from \"#/components/features/context-menu/context-menu-list-item\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { cn } from \"#/utils/utils\";\nimport { automationIconActionButtonClassName } from \"./automation-action-button-classes\";\nimport { KebabMenuItemContent } from \"./kebab-menu-item-content\";\n\nexport interface KebabMenuItem {\n label: string;\n icon: React.ReactNode;\n onClick: () => void;\n disabled?: boolean;\n}\n\ninterface KebabMenuProps {\n items: KebabMenuItem[];\n triggerClassName?: string;\n}\n\nexport function KebabMenu({ items, triggerClassName }: KebabMenuProps) {\n const { t } = useTranslation(\"openhands\");\n const [open, setOpen] = useState(false);\n const [portalStyle, setPortalStyle] = useState<React.CSSProperties>();\n const triggerRef = useRef<HTMLButtonElement>(null);\n const menuRef = useRef<HTMLUListElement>(null);\n\n useLayoutEffect(() => {\n if (!open || !triggerRef.current) return undefined;\n\n const updatePosition = () => {\n const rect = triggerRef.current?.getBoundingClientRect();\n if (!rect) return;\n\n const gap = 4;\n setPortalStyle({\n position: \"fixed\",\n zIndex: 9999,\n top: rect.bottom + gap,\n right: window.innerWidth - rect.right,\n });\n };\n\n updatePosition();\n window.addEventListener(\"resize\", updatePosition);\n window.addEventListener(\"scroll\", updatePosition, true);\n return () => {\n window.removeEventListener(\"resize\", updatePosition);\n window.removeEventListener(\"scroll\", updatePosition, true);\n };\n }, [open]);\n\n useEffect(() => {\n if (!open) return undefined;\n\n const handleClickOutside = (event: MouseEvent) => {\n const target = event.target as Node;\n if (\n triggerRef.current?.contains(target) ||\n menuRef.current?.contains(target)\n ) {\n return;\n }\n setOpen(false);\n };\n\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n setOpen(false);\n }\n };\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n document.addEventListener(\"keydown\", handleEscape);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n document.removeEventListener(\"keydown\", handleEscape);\n };\n }, [open]);\n\n const menu =\n open && portalStyle ? (\n <ContextMenu ref={menuRef} theme=\"popover\" className=\"min-w-[10rem]\">\n {items.map((item) => (\n <li key={item.label}>\n <ContextMenuListItem\n onClick={(event) => {\n event.stopPropagation();\n item.onClick();\n setOpen(false);\n }}\n isDisabled={item.disabled}\n className=\"group\"\n >\n <KebabMenuItemContent icon={item.icon} label={item.label} />\n </ContextMenuListItem>\n </li>\n ))}\n </ContextMenu>\n ) : null;\n\n return (\n <>\n <button\n ref={triggerRef}\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n setOpen((current) => !current);\n }}\n className={cn(automationIconActionButtonClassName, triggerClassName)}\n aria-label={t(I18nKey.AUTOMATIONS$ACTIONS_MENU)}\n aria-expanded={open}\n aria-haspopup=\"menu\"\n >\n <KebabVerticalIcon className=\"size-4\" />\n </button>\n\n {open && portalStyle && typeof document !== \"undefined\"\n ? ReactDOM.createPortal(\n <div style={portalStyle}>{menu}</div>,\n document.body,\n )\n : null}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAuBA,SAAgB,EAAU,EAAE,UAAO,uBAAoC;CACrE,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,CAAC,GAAM,KAAW,EAAS,EAAK,GAChC,CAAC,GAAa,KAAkB,EAA8B,GAC9D,IAAa,EAA0B,IAAI,GAC3C,IAAU,EAAyB,IAAI;CA2B7C,AAzBA,QAAsB;EACpB,IAAI,CAAC,KAAQ,CAAC,EAAW,SAAS;EAElC,IAAM,UAAuB;GAC3B,IAAM,IAAO,EAAW,SAAS,sBAAsB;GAClD,KAGL,EAAe;IACb,UAAU;IACV,QAAQ;IACR,KAAK,EAAK,SAAS;IACnB,OAAO,OAAO,aAAa,EAAK;GAClC,CAAC;EACH;EAKA,OAHA,EAAe,GACf,OAAO,iBAAiB,UAAU,CAAc,GAChD,OAAO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,WAAU,SAAU,CAAA;CACjC,CAAA,GAEP,KAAQ,KAAe,OAAO,WAAa,MACxC,EAAS,aACP,kBAAC,OAAD;EAAK,OAAO;YAAc;CAAU,CAAA,GACpC,SAAS,IACX,IACA,IACJ,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"kebab-menu.js","names":[],"sources":["../../../../src/components/features/automations/kebab-menu.tsx"],"sourcesContent":["import { useState, useEffect, useLayoutEffect, useRef } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { useTranslation } from \"react-i18next\";\nimport KebabVerticalIcon from \"#/icons/kebab-vertical.svg?react\";\nimport { ContextMenuListItem } from \"#/components/features/context-menu/context-menu-list-item\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { cn } from \"#/utils/utils\";\nimport { automationIconActionButtonClassName } from \"./automation-action-button-classes\";\nimport { KebabMenuItemContent } from \"./kebab-menu-item-content\";\n\nexport interface KebabMenuItem {\n label: string;\n icon: React.ReactNode;\n onClick: () => void;\n disabled?: boolean;\n}\n\ninterface KebabMenuProps {\n items: KebabMenuItem[];\n triggerClassName?: string;\n}\n\nexport function KebabMenu({ items, triggerClassName }: KebabMenuProps) {\n const { t } = useTranslation(\"openhands\");\n const [open, setOpen] = useState(false);\n const [portalStyle, setPortalStyle] = useState<React.CSSProperties>();\n const triggerRef = useRef<HTMLButtonElement>(null);\n const menuRef = useRef<HTMLUListElement>(null);\n\n useLayoutEffect(() => {\n if (!open || !triggerRef.current) return undefined;\n\n const updatePosition = () => {\n const rect = triggerRef.current?.getBoundingClientRect();\n if (!rect) return;\n\n const gap = 4;\n // The real height is only measurable once the portal has painted; the\n // first pass falls back to an items-derived estimate (~36px per row).\n const measured = menuRef.current?.getBoundingClientRect().height ?? 0;\n const menuHeight = measured || items.length * 36;\n const overflowsBelow =\n rect.bottom + gap + menuHeight > window.innerHeight;\n\n setPortalStyle({\n position: \"fixed\",\n zIndex: 9999,\n // Flip above the trigger when the menu would clip at the viewport\n // bottom. Bottom-anchoring keeps it hugging the trigger at any height.\n ...(overflowsBelow\n ? { bottom: window.innerHeight - rect.top + gap }\n : { top: rect.bottom + gap }),\n right: window.innerWidth - rect.right,\n });\n };\n\n updatePosition();\n const frame = window.requestAnimationFrame(updatePosition);\n window.addEventListener(\"resize\", updatePosition);\n window.addEventListener(\"scroll\", updatePosition, true);\n return () => {\n window.cancelAnimationFrame(frame);\n window.removeEventListener(\"resize\", updatePosition);\n window.removeEventListener(\"scroll\", updatePosition, true);\n };\n }, [open, items.length]);\n\n useEffect(() => {\n if (!open) return undefined;\n\n const handleClickOutside = (event: MouseEvent) => {\n const target = event.target as Node;\n if (\n triggerRef.current?.contains(target) ||\n menuRef.current?.contains(target)\n ) {\n return;\n }\n setOpen(false);\n };\n\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n setOpen(false);\n }\n };\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n document.addEventListener(\"keydown\", handleEscape);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n document.removeEventListener(\"keydown\", handleEscape);\n };\n }, [open]);\n\n const menu =\n open && portalStyle ? (\n <ContextMenu ref={menuRef} theme=\"popover\" className=\"min-w-[10rem]\">\n {items.map((item) => (\n <li key={item.label}>\n <ContextMenuListItem\n onClick={(event) => {\n event.stopPropagation();\n item.onClick();\n setOpen(false);\n }}\n isDisabled={item.disabled}\n className=\"group\"\n >\n <KebabMenuItemContent icon={item.icon} label={item.label} />\n </ContextMenuListItem>\n </li>\n ))}\n </ContextMenu>\n ) : null;\n\n return (\n <>\n <button\n ref={triggerRef}\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n setOpen((current) => !current);\n }}\n className={cn(automationIconActionButtonClassName, triggerClassName)}\n aria-label={t(I18nKey.AUTOMATIONS$ACTIONS_MENU)}\n aria-expanded={open}\n aria-haspopup=\"menu\"\n >\n <KebabVerticalIcon className=\"size-4\" />\n </button>\n\n {open && portalStyle &&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C7C,AAAI,EAAM,QAAQ,YAChB,EAAQ,EAAK;EAEjB;EAIA,OAFA,SAAS,iBAAiB,aAAa,CAAkB,GACzD,SAAS,iBAAiB,WAAW,CAAY,SACpC;GAEX,AADA,SAAS,oBAAoB,aAAa,CAAkB,GAC5D,SAAS,oBAAoB,WAAW,CAAY;EACtD;CACF,GAAG,CAAC,CAAI,CAAC;CAET,IAAM,IACJ,KAAQ,IACN,kBAAC,GAAD;EAAa,KAAK;EAAS,OAAM;EAAU,WAAU;YAClD,EAAM,KAAK,MACV,kBAAC,MAAD,EAAA,UACE,kBAAC,GAAD;GACE,UAAU,MAAU;IAGlB,AAFA,EAAM,gBAAgB,GACtB,EAAK,QAAQ,GACb,EAAQ,EAAK;GACf;GACA,YAAY,EAAK;GACjB,WAAU;aAEV,kBAAC,GAAD;IAAsB,MAAM,EAAK;IAAM,OAAO,EAAK;GAAQ,CAAA;EACxC,CAAA,EACnB,GAZK,EAAK,KAYV,CACL;CACU,CAAA,IACX;CAEN,OACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,UAAD;EACE,KAAK;EACL,MAAK;EACL,UAAU,MAAM;GAEd,AADA,EAAE,gBAAgB,GAClB,GAAS,MAAY,CAAC,CAAO;EAC/B;EACA,WAAW,EAAG,GAAqC,CAAgB;EACnE,cAAY,EAAE,EAAQ,wBAAwB;EAC9C,iBAAe;EACf,iBAAc;YAEd,kBAAC,GAAD,EAAmB,WAAU,SAAU,CAAA;CACjC,CAAA,GAEP,KAAQ,KAAe,OAAO,WAAa,MACxC,EAAS,aACP,kBAAC,OAAD;EAAK,OAAO;YAAc;CAAU,CAAA,GACpC,SAAS,IACX,IACA,IACJ,EAAA,CAAA;AAEN"}
@@ -1,2 +1,2 @@
1
- require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../context/navigation-context.cjs"),t=require("../../../utils/conversation-local-storage.cjs"),n=require("../../../stores/conversation-store.cjs"),r=require("../../../contexts/active-backend-context.cjs"),ee=require("../../../utils/mcp-config.cjs"),i=require("../../../utils/automation-catalog.cjs"),a=require("../../../manifests/manifest-sources.cjs"),o=require("../../../manifests/automation-interface.cjs"),s=require("../../../hooks/use-tracking.cjs"),c=require("../../../hooks/query/use-settings.cjs"),l=require("../../../hooks/mutation/use-create-conversation.cjs"),u=require("../../../hooks/use-is-creating-conversation.cjs"),d=require("../../../node_modules/@openhands/extensions/integrations/index.cjs"),f=require("../../../utils/mcp-marketplace-utils.cjs"),te=require("../../../hooks/query/use-automations.cjs"),ne=require("../../../hooks/use-responder-url-secret.cjs"),p=require("../../../utils/mcp-installed-servers.cjs"),m=require("../mcp-page/install-server-modal.cjs"),h=require("../../../utils/responder-deployment.cjs"),g=require("./recommended-automations-rail.cjs"),_=require("./recommended-automations-section.cjs"),v=require("./responder-deployment-modal.cjs");let y=require("react"),b=require("react/jsx-runtime");function x(e){return i.getRequiredIntegrationIds(e).map(e=>f.getMarketplaceEntryById(e,d.default)).filter(e=>!!e).filter(f.isMcpInstallableEntry)}function S({query:d,onLaunched:S,scrollableGrid:C=!1,variant:w=`catalog`,className:T}){let E=r.useActiveBackend(),{navigate:D}=e.useNavigation(),{data:O}=c.useSettings(),{trackPrebuiltAutomationEnabled:k}=s.useTracking(),A=l.useCreateConversation(),j=ne.useResponderUrlSecret(),M=u.useIsCreatingConversation(),N=n.useConversationStore(e=>e.setMessageToSend),[P,F]=(0,y.useState)(null),[I,L]=(0,y.useState)(null),[R,z]=(0,y.useState)([]),B=(0,y.useRef)(!1),V=(0,y.useRef)(!1),H=(0,y.useRef)(!1),[U,W]=(0,y.useState)(!1),G=w===`rail`,{data:K,isLoading:q}=te.useAutomations({enabled:G&&E.backend.kind===`local`}),J=(0,y.useMemo)(()=>p.flattenMcpConfig(O?.mcp_config??ee.parseMcpConfig(O?.agent_settings?.mcp_config)).filter(e=>e.enabled!==!1),[O?.agent_settings?.mcp_config,O?.mcp_config]),Y=(0,y.useCallback)(e=>{if(V.current||A.isPending||M)return;if(V.current=!0,a.SETUP_REGISTRY.findById(e.id)){D?.(o.automationSetupPath(e.id)),S?.();return}let n=i.getAutomationLaunchPrompt(e);A.mutate({},{onSuccess:r=>{k({automationName:e.name,automationCategory:e.category}),r.conversation_id.startsWith(`task-`)&&r.task_id?t.setPendingTaskDraft(r.task_id,n):t.setConversationState(r.conversation_id,{draftMessage:n}),D?.(`/conversations/${r.conversation_id}`),S?.(),window.setTimeout(()=>N(n),0)},onError:()=>{V.current=!1}})},[E.backend.kind,A,M,D,S,N,k]),X=(0,y.useCallback)(e=>x(e).filter(e=>!f.findInstalledEntryMatch(e,J)),[J]),Z=e=>{let t=X(e);if(t.length===0){Y(e);return}F(e),z(t)},Q=e=>{if(!(V.current||A.isPending||M||R.length>0||I!==null)){if(h.isResponderAutomation(e)){L(e);return}Z(e)}},re=async()=>{let e=I;if(!(!e||H.current)){H.current=!0,W(!0);try{if(!await j())return;L(null),Z(e)}finally{H.current=!1,W(!1)}}},ie=e=>{L(null),window.open(e,`_blank`,`noopener,noreferrer`)},ae=()=>{L(null)},oe=()=>{if(B.current){B.current=!1;return}F(null),z([])},se=()=>{B.current=!0,z(e=>{let t=e.slice(1);if(t.length===0){let e=P;window.setTimeout(()=>{F(null),e&&Y(e)},0)}return t})},$=R[0]??null;return!o.hasAutomationInterface()||E.backend.kind===`cloud`||G&&q?null:(0,b.jsxs)(b.Fragment,{children:[G?(0,b.jsx)(g.RecommendedAutomationsRail,{className:T,installedAutomations:K?.automations??[],onSelect:Q}):(0,b.jsx)(_.RecommendedAutomationsSection,{backendKind:E.backend.kind,installedServers:J,query:d,onSelect:Q,scrollableGrid:C}),$&&(0,b.jsx)(m.InstallServerModal,{entry:$,existingServers:J,onClose:oe,onSuccess:se},$.id),(0,b.jsx)(v.ResponderDeploymentModal,{isOpen:I!==null,isPending:U,onClose:ae,onContinueLocal:re,onOpenUrl:ie})]})}exports.RecommendedAutomationsLauncher=S;
1
+ require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../context/navigation-context.cjs"),t=require("../../../utils/conversation-local-storage.cjs"),n=require("../../../stores/conversation-store.cjs"),r=require("../../../contexts/active-backend-context.cjs"),i=require("../../../utils/mcp-config.cjs"),a=require("../../../hooks/query/use-settings.cjs"),o=require("../../../utils/automation-catalog.cjs"),ee=require("../../../manifests/manifest-sources.cjs"),s=require("../../../manifests/automation-interface.cjs"),c=require("../../../hooks/use-tracking.cjs"),l=require("../../../hooks/mutation/use-create-conversation.cjs"),u=require("../../../hooks/use-is-creating-conversation.cjs"),d=require("../../../node_modules/@openhands/extensions/integrations/index.cjs"),f=require("../../../utils/mcp-marketplace-utils.cjs"),te=require("../../../hooks/query/use-automations.cjs"),ne=require("../../../hooks/use-responder-url-secret.cjs"),p=require("../../../utils/mcp-installed-servers.cjs"),m=require("../mcp-page/install-server-modal.cjs"),h=require("../../../utils/responder-deployment.cjs"),g=require("./recommended-automations-rail.cjs"),_=require("./recommended-automations-section.cjs"),v=require("./responder-deployment-modal.cjs");let y=require("react"),b=require("react/jsx-runtime");function x(e){return o.getRequiredIntegrationIds(e).map(e=>f.getMarketplaceEntryById(e,d.default)).filter(e=>!!e).filter(f.isMcpInstallableEntry)}function S({query:d,onLaunched:S,scrollableGrid:C=!1,variant:w=`catalog`,className:T}){let E=r.useActiveBackend(),{navigate:D}=e.useNavigation(),{data:O}=a.useSettings(),{trackPrebuiltAutomationEnabled:k}=c.useTracking(),A=l.useCreateConversation(),j=ne.useResponderUrlSecret(),M=u.useIsCreatingConversation(),N=n.useConversationStore(e=>e.setMessageToSend),[P,F]=(0,y.useState)(null),[I,L]=(0,y.useState)(null),[R,z]=(0,y.useState)([]),B=(0,y.useRef)(!1),V=(0,y.useRef)(!1),H=(0,y.useRef)(!1),[U,W]=(0,y.useState)(!1),G=w===`rail`,{data:K,isLoading:q}=te.useAutomations({enabled:G&&E.backend.kind===`local`}),J=(0,y.useMemo)(()=>p.flattenMcpConfig(O?.mcp_config??i.parseMcpConfig(O?.agent_settings?.mcp_config)).filter(e=>e.enabled!==!1),[O?.agent_settings?.mcp_config,O?.mcp_config]),Y=(0,y.useCallback)(e=>{if(V.current||A.isPending||M)return;if(V.current=!0,ee.SETUP_REGISTRY.findById(e.id)){D?.(s.automationSetupPath(e.id)),S?.();return}let n=o.getAutomationLaunchPrompt(e);A.mutate({},{onSuccess:r=>{k({automationName:e.name,automationCategory:e.category}),r.conversation_id.startsWith(`task-`)&&r.task_id?t.setPendingTaskDraft(r.task_id,n):t.setConversationState(r.conversation_id,{draftMessage:n}),D?.(`/conversations/${r.conversation_id}`),S?.(),window.setTimeout(()=>N(n),0)},onError:()=>{V.current=!1}})},[E.backend.kind,A,M,D,S,N,k]),X=(0,y.useCallback)(e=>x(e).filter(e=>!f.findInstalledEntryMatch(e,J)),[J]),Z=e=>{let t=X(e);if(t.length===0){Y(e);return}F(e),z(t)},Q=e=>{if(!(V.current||A.isPending||M||R.length>0||I!==null)){if(h.isResponderAutomation(e)){L(e);return}Z(e)}},re=async()=>{let e=I;if(!(!e||H.current)){H.current=!0,W(!0);try{if(!await j())return;L(null),Z(e)}finally{H.current=!1,W(!1)}}},ie=e=>{L(null),window.open(e,`_blank`,`noopener,noreferrer`)},ae=()=>{L(null)},oe=()=>{if(B.current){B.current=!1;return}F(null),z([])},se=()=>{B.current=!0,z(e=>{let t=e.slice(1);if(t.length===0){let e=P;window.setTimeout(()=>{F(null),e&&Y(e)},0)}return t})},$=R[0]??null;return!s.hasAutomationInterface()||E.backend.kind===`cloud`||G&&q?null:(0,b.jsxs)(b.Fragment,{children:[G?(0,b.jsx)(g.RecommendedAutomationsRail,{className:T,installedAutomations:K?.automations??[],onSelect:Q}):(0,b.jsx)(_.RecommendedAutomationsSection,{backendKind:E.backend.kind,installedServers:J,query:d,onSelect:Q,scrollableGrid:C}),$&&(0,b.jsx)(m.InstallServerModal,{entry:$,existingServers:J,onClose:oe,onSuccess:se},$.id),(0,b.jsx)(v.ResponderDeploymentModal,{isOpen:I!==null,isPending:U,onClose:ae,onContinueLocal:re,onOpenUrl:ie})]})}exports.RecommendedAutomationsLauncher=S;
2
2
  //# sourceMappingURL=recommended-automations-launcher.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"recommended-automations-launcher.cjs","names":[],"sources":["../../../../src/components/features/automations/recommended-automations-launcher.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, useState } from \"react\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useCreateConversation } from \"#/hooks/mutation/use-create-conversation\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport { useIsCreatingConversation } from \"#/hooks/use-is-creating-conversation\";\nimport { useResponderUrlSecret } from \"#/hooks/use-responder-url-secret\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport {\n setConversationState,\n setPendingTaskDraft,\n} from \"#/utils/conversation-local-storage\";\nimport type { RecommendedAutomation } from \"@openhands/extensions/automations\";\nimport { parseMcpConfig } from \"#/utils/mcp-config\";\nimport { flattenMcpConfig } from \"#/utils/mcp-installed-servers\";\nimport {\n INTEGRATION_CATALOG as MCP_MARKETPLACE,\n type IntegrationCatalogEntry as MarketplaceEntry,\n} from \"@openhands/extensions/integrations\";\nimport {\n findInstalledEntryMatch,\n getMarketplaceEntryById,\n isMcpInstallableEntry,\n} from \"#/utils/mcp-marketplace-utils\";\nimport { InstallServerModal } from \"#/components/features/mcp-page/install-server-modal\";\nimport { useTracking } from \"#/hooks/use-tracking\";\nimport {\n automationSetupPath,\n hasAutomationInterface,\n} from \"#/manifests/automation-interface\";\nimport { SETUP_REGISTRY } from \"#/manifests/manifest-sources\";\nimport {\n getAutomationLaunchPrompt,\n getRequiredIntegrationIds,\n} from \"#/utils/automation-catalog\";\nimport { isResponderAutomation } from \"#/utils/responder-deployment\";\nimport { useAutomations } from \"#/hooks/query/use-automations\";\nimport { RecommendedAutomationsRail } from \"./recommended-automations-rail\";\nimport { RecommendedAutomationsSection } from \"./recommended-automations-section\";\nimport { ResponderDeploymentModal } from \"./responder-deployment-modal\";\n\ninterface RecommendedAutomationsLauncherProps {\n query?: string;\n onLaunched?: () => void;\n /** When true, only the automation card grid scrolls inside its section. */\n scrollableGrid?: boolean;\n /**\n * Compact discovery rail for New Chat and the automations dashboard.\n * The templates page keeps the full catalog section.\n */\n variant?: \"catalog\" | \"rail\";\n className?: string;\n}\n\n/**\n * The marketplace entries a launch waits on. An integration the automation is\n * willing to start without is deliberately absent, so it never queues an\n * install modal the user has to dismiss.\n *\n * A required integration this backend cannot install as MCP (e.g. Jira's\n * HTTP-only option) is also excluded here — the install queue can't do\n * anything with it — but it is not silently dropped from the product: the\n * automation card keeps it visible and labels it as needing external setup.\n */\nfunction getRequiredEntries(automation: RecommendedAutomation) {\n return getRequiredIntegrationIds(automation)\n .map((id) => getMarketplaceEntryById(id, MCP_MARKETPLACE))\n .filter((entry): entry is MarketplaceEntry => !!entry)\n .filter(isMcpInstallableEntry);\n}\n\nexport function RecommendedAutomationsLauncher({\n query,\n onLaunched,\n scrollableGrid = false,\n variant = \"catalog\",\n className,\n}: RecommendedAutomationsLauncherProps) {\n const activeBackend = useActiveBackend();\n const { navigate } = useNavigation();\n const { data: settings } = useSettings();\n const { trackPrebuiltAutomationEnabled } = useTracking();\n const createConversation = useCreateConversation();\n const ensureResponderUrlSecret = useResponderUrlSecret();\n const isCreatingConversation = useIsCreatingConversation();\n const setMessageToSend = useConversationStore(\n (state) => state.setMessageToSend,\n );\n const [pendingAutomation, setPendingAutomation] =\n useState<RecommendedAutomation | null>(null);\n const [deploymentChoiceAutomation, setDeploymentChoiceAutomation] =\n useState<RecommendedAutomation | null>(null);\n const [installQueue, setInstallQueue] = useState<MarketplaceEntry[]>([]);\n const completedInstallRef = useRef(false);\n const launchInFlightRef = useRef(false);\n const localSetupInFlightRef = useRef(false);\n const [isPreparingLocalResponder, setIsPreparingLocalResponder] =\n useState(false);\n const isRail = variant === \"rail\";\n const { data: automationsData, isLoading: isAutomationsLoading } =\n useAutomations({\n enabled: isRail && activeBackend.backend.kind === \"local\",\n });\n\n const installedMcpConfig = useMemo(\n () =>\n flattenMcpConfig(\n settings?.mcp_config ??\n parseMcpConfig(settings?.agent_settings?.mcp_config),\n ).filter((server) => server.enabled !== false),\n [settings?.agent_settings?.mcp_config, settings?.mcp_config],\n );\n\n const launchAutomation = useCallback(\n (automation: RecommendedAutomation) => {\n if (\n launchInFlightRef.current ||\n createConversation.isPending ||\n isCreatingConversation\n ) {\n return;\n }\n launchInFlightRef.current = true;\n\n // An automation that ships a setup experience is configured from its own\n // form, so the answers are collected before anything is created. The rest\n // still hand a slash command to an agent to interpret.\n if (SETUP_REGISTRY.findById(automation.id)) {\n navigate?.(automationSetupPath(automation.id));\n onLaunched?.();\n return;\n }\n\n const prompt = getAutomationLaunchPrompt(automation);\n\n createConversation.mutate(\n {},\n {\n onSuccess: (conversation) => {\n trackPrebuiltAutomationEnabled({\n automationName: automation.name,\n automationCategory: automation.category,\n });\n if (\n conversation.conversation_id.startsWith(\"task-\") &&\n conversation.task_id\n ) {\n setPendingTaskDraft(conversation.task_id, prompt);\n } else {\n setConversationState(conversation.conversation_id, {\n draftMessage: prompt,\n });\n }\n navigate?.(`/conversations/${conversation.conversation_id}`);\n onLaunched?.();\n window.setTimeout(() => setMessageToSend(prompt), 0);\n },\n onError: () => {\n launchInFlightRef.current = false;\n },\n },\n );\n },\n [\n activeBackend.backend.kind,\n createConversation,\n isCreatingConversation,\n navigate,\n onLaunched,\n setMessageToSend,\n trackPrebuiltAutomationEnabled,\n ],\n );\n\n const getMissingEntries = useCallback(\n (automation: RecommendedAutomation) =>\n getRequiredEntries(automation).filter(\n (entry) => !findInstalledEntryMatch(entry, installedMcpConfig),\n ),\n [installedMcpConfig],\n );\n\n const proceedWithLocalLaunch = (automation: RecommendedAutomation) => {\n const missingEntries = getMissingEntries(automation);\n if (missingEntries.length === 0) {\n launchAutomation(automation);\n return;\n }\n\n setPendingAutomation(automation);\n setInstallQueue(missingEntries);\n };\n\n const handleSelectAutomation = (automation: RecommendedAutomation) => {\n if (\n launchInFlightRef.current ||\n createConversation.isPending ||\n isCreatingConversation ||\n installQueue.length > 0 ||\n deploymentChoiceAutomation !== null\n ) {\n return;\n }\n\n // GitHub/Slack responders poll continuously; let the user choose where the\n // responder runs before committing to the local setup flow.\n if (isResponderAutomation(automation)) {\n setDeploymentChoiceAutomation(automation);\n return;\n }\n\n proceedWithLocalLaunch(automation);\n };\n\n const handleDeploymentContinueLocal = async () => {\n const automation = deploymentChoiceAutomation;\n if (!automation || localSetupInFlightRef.current) return;\n\n localSetupInFlightRef.current = true;\n setIsPreparingLocalResponder(true);\n\n try {\n const isSecretReady = await ensureResponderUrlSecret();\n if (!isSecretReady) return;\n\n setDeploymentChoiceAutomation(null);\n proceedWithLocalLaunch(automation);\n } finally {\n localSetupInFlightRef.current = false;\n setIsPreparingLocalResponder(false);\n }\n };\n\n const handleDeploymentOpenUrl = (url: string) => {\n setDeploymentChoiceAutomation(null);\n window.open(url, \"_blank\", \"noopener,noreferrer\");\n };\n\n const handleDeploymentClose = () => {\n setDeploymentChoiceAutomation(null);\n };\n\n const cancelInstallFlow = () => {\n if (completedInstallRef.current) {\n completedInstallRef.current = false;\n return;\n }\n setPendingAutomation(null);\n setInstallQueue([]);\n };\n\n const handleInstallSuccess = () => {\n completedInstallRef.current = true;\n\n setInstallQueue((currentQueue) => {\n const nextQueue = currentQueue.slice(1);\n\n if (nextQueue.length === 0) {\n const automation = pendingAutomation;\n window.setTimeout(() => {\n setPendingAutomation(null);\n if (automation) launchAutomation(automation);\n }, 0);\n }\n\n return nextQueue;\n });\n };\n\n const installEntry = installQueue[0] ?? null;\n\n // Like every automation surface, the launcher renders only behind the\n // interface-manifest gate; New Chat mounts it outside the gated routes.\n if (!hasAutomationInterface()) return null;\n\n // Recommended automations are a local-backend-only feature; cloud\n // automations are managed elsewhere.\n if (activeBackend.backend.kind === \"cloud\") return null;\n\n if (isRail && isAutomationsLoading) return null;\n\n return (\n <>\n {isRail ? (\n <RecommendedAutomationsRail\n className={className}\n installedAutomations={automationsData?.automations ?? []}\n onSelect={handleSelectAutomation}\n />\n ) : (\n <RecommendedAutomationsSection\n backendKind={activeBackend.backend.kind}\n installedServers={installedMcpConfig}\n query={query}\n onSelect={handleSelectAutomation}\n scrollableGrid={scrollableGrid}\n />\n )}\n\n {installEntry && (\n <InstallServerModal\n key={installEntry.id}\n entry={installEntry}\n existingServers={installedMcpConfig}\n onClose={cancelInstallFlow}\n onSuccess={handleInstallSuccess}\n />\n )}\n\n <ResponderDeploymentModal\n isOpen={deploymentChoiceAutomation !== null}\n isPending={isPreparingLocalResponder}\n onClose={handleDeploymentClose}\n onContinueLocal={handleDeploymentContinueLocal}\n onOpenUrl={handleDeploymentOpenUrl}\n />\n </>\n );\n}\n"],"mappings":"6xCAgEA,SAAS,EAAmB,EAAmC,CAC7D,OAAO,EAAA,0BAA0B,CAAU,EACxC,IAAK,GAAO,EAAA,wBAAwB,EAAI,EAAA,OAAe,CAAC,EACxD,OAAQ,GAAqC,CAAC,CAAC,CAAK,EACpD,OAAO,EAAA,qBAAqB,CACjC,CAEA,SAAgB,EAA+B,CAC7C,QACA,aACA,iBAAiB,GACjB,UAAU,UACV,aACsC,CACtC,IAAM,EAAgB,EAAA,iBAAiB,EACjC,CAAE,YAAa,EAAA,cAAc,EAC7B,CAAE,KAAM,GAAa,EAAA,YAAY,EACjC,CAAE,kCAAmC,EAAA,YAAY,EACjD,EAAqB,EAAA,sBAAsB,EAC3C,EAA2B,GAAA,sBAAsB,EACjD,EAAyB,EAAA,0BAA0B,EACnD,EAAmB,EAAA,qBACtB,GAAU,EAAM,gBACnB,EACM,CAAC,EAAmB,IAAA,EAAA,EAAA,UACe,IAAI,EACvC,CAAC,EAA4B,IAAA,EAAA,EAAA,UACM,IAAI,EACvC,CAAC,EAAc,IAAA,EAAA,EAAA,UAAgD,CAAC,CAAC,EACjE,GAAA,EAAA,EAAA,QAA6B,EAAK,EAClC,GAAA,EAAA,EAAA,QAA2B,EAAK,EAChC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A,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,CACG,GACC,EAAA,EAAA,KAAC,EAAA,2BAAD,CACa,YACX,qBAAsB,GAAiB,aAAe,CAAC,EACvD,SAAU,CACX,CAAA,GAED,EAAA,EAAA,KAAC,EAAA,8BAAD,CACE,YAAa,EAAc,QAAQ,KACnC,iBAAkB,EACX,QACP,SAAU,EACM,gBACjB,CAAA,EAGF,IACC,EAAA,EAAA,KAAC,EAAA,mBAAD,CAEE,MAAO,EACP,gBAAiB,EACjB,QAAS,GACT,UAAW,EACZ,EALM,EAAa,EAKnB,GAGH,EAAA,EAAA,KAAC,EAAA,yBAAD,CACE,OAAQ,IAA+B,KACvC,UAAW,EACX,QAAS,GACT,gBAAiB,GACjB,UAAW,EACZ,CAAA,CACD,CAAA,CAAA,CAEN"}
1
+ {"version":3,"file":"recommended-automations-launcher.cjs","names":[],"sources":["../../../../src/components/features/automations/recommended-automations-launcher.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, useState } from \"react\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useCreateConversation } from \"#/hooks/mutation/use-create-conversation\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport { useIsCreatingConversation } from \"#/hooks/use-is-creating-conversation\";\nimport { useResponderUrlSecret } from \"#/hooks/use-responder-url-secret\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport {\n setConversationState,\n setPendingTaskDraft,\n} from \"#/utils/conversation-local-storage\";\nimport type { RecommendedAutomation } from \"@openhands/extensions/automations\";\nimport { parseMcpConfig } from \"#/utils/mcp-config\";\nimport { flattenMcpConfig } from \"#/utils/mcp-installed-servers\";\nimport {\n INTEGRATION_CATALOG as MCP_MARKETPLACE,\n type IntegrationCatalogEntry as MarketplaceEntry,\n} from \"@openhands/extensions/integrations\";\nimport {\n findInstalledEntryMatch,\n getMarketplaceEntryById,\n isMcpInstallableEntry,\n} from \"#/utils/mcp-marketplace-utils\";\nimport { InstallServerModal } from \"#/components/features/mcp-page/install-server-modal\";\nimport { useTracking } from \"#/hooks/use-tracking\";\nimport {\n automationSetupPath,\n hasAutomationInterface,\n} from \"#/manifests/automation-interface\";\nimport { SETUP_REGISTRY } from \"#/manifests/manifest-sources\";\nimport {\n getAutomationLaunchPrompt,\n getRequiredIntegrationIds,\n} from \"#/utils/automation-catalog\";\nimport { isResponderAutomation } from \"#/utils/responder-deployment\";\nimport { useAutomations } from \"#/hooks/query/use-automations\";\nimport { RecommendedAutomationsRail } from \"./recommended-automations-rail\";\nimport { RecommendedAutomationsSection } from \"./recommended-automations-section\";\nimport { ResponderDeploymentModal } from \"./responder-deployment-modal\";\n\ninterface RecommendedAutomationsLauncherProps {\n query?: string;\n onLaunched?: () => void;\n /** When true, only the automation card grid scrolls inside its section. */\n scrollableGrid?: boolean;\n /**\n * Compact discovery rail for New Chat and the automations dashboard.\n * The templates page keeps the full catalog section.\n */\n variant?: \"catalog\" | \"rail\";\n className?: string;\n}\n\n/**\n * The marketplace entries a launch waits on. An integration the automation is\n * willing to start without is deliberately absent, so it never queues an\n * install modal the user has to dismiss.\n *\n * A required integration this backend cannot install as MCP (e.g. Jira's\n * HTTP-only option) is also excluded here — the install queue can't do\n * anything with it — but it is not silently dropped from the product: the\n * automation card keeps it visible and labels it as needing external setup.\n */\nfunction getRequiredEntries(automation: RecommendedAutomation) {\n return getRequiredIntegrationIds(automation)\n .map((id) => getMarketplaceEntryById(id, MCP_MARKETPLACE))\n .filter((entry): entry is MarketplaceEntry => !!entry)\n .filter(isMcpInstallableEntry);\n}\n\nexport function RecommendedAutomationsLauncher({\n query,\n onLaunched,\n scrollableGrid = false,\n variant = \"catalog\",\n className,\n}: RecommendedAutomationsLauncherProps) {\n const activeBackend = useActiveBackend();\n const { navigate } = useNavigation();\n const { data: settings } = useSettings();\n const { trackPrebuiltAutomationEnabled } = useTracking();\n const createConversation = useCreateConversation();\n const ensureResponderUrlSecret = useResponderUrlSecret();\n const isCreatingConversation = useIsCreatingConversation();\n const setMessageToSend = useConversationStore(\n (state) => state.setMessageToSend,\n );\n const [pendingAutomation, setPendingAutomation] =\n useState<RecommendedAutomation | null>(null);\n const [deploymentChoiceAutomation, setDeploymentChoiceAutomation] =\n useState<RecommendedAutomation | null>(null);\n const [installQueue, setInstallQueue] = useState<MarketplaceEntry[]>([]);\n const completedInstallRef = useRef(false);\n const launchInFlightRef = useRef(false);\n const localSetupInFlightRef = useRef(false);\n const [isPreparingLocalResponder, setIsPreparingLocalResponder] =\n useState(false);\n const isRail = variant === \"rail\";\n const { data: automationsData, isLoading: isAutomationsLoading } =\n useAutomations({\n enabled: isRail && activeBackend.backend.kind === \"local\",\n });\n\n const installedMcpConfig = useMemo(\n () =>\n flattenMcpConfig(\n settings?.mcp_config ??\n parseMcpConfig(settings?.agent_settings?.mcp_config),\n ).filter((server) => server.enabled !== false),\n [settings?.agent_settings?.mcp_config, settings?.mcp_config],\n );\n\n const launchAutomation = useCallback(\n (automation: RecommendedAutomation) => {\n if (\n launchInFlightRef.current ||\n createConversation.isPending ||\n isCreatingConversation\n ) {\n return;\n }\n launchInFlightRef.current = true;\n\n // An automation that ships a setup experience is configured from its own\n // form, so the answers are collected before anything is created. The rest\n // still hand a slash command to an agent to interpret.\n if (SETUP_REGISTRY.findById(automation.id)) {\n navigate?.(automationSetupPath(automation.id));\n onLaunched?.();\n return;\n }\n\n const prompt = getAutomationLaunchPrompt(automation);\n\n createConversation.mutate(\n {},\n {\n onSuccess: (conversation) => {\n trackPrebuiltAutomationEnabled({\n automationName: automation.name,\n automationCategory: automation.category,\n });\n if (\n conversation.conversation_id.startsWith(\"task-\") &&\n conversation.task_id\n ) {\n setPendingTaskDraft(conversation.task_id, prompt);\n } else {\n setConversationState(conversation.conversation_id, {\n draftMessage: prompt,\n });\n }\n navigate?.(`/conversations/${conversation.conversation_id}`);\n onLaunched?.();\n window.setTimeout(() => setMessageToSend(prompt), 0);\n },\n onError: () => {\n launchInFlightRef.current = false;\n },\n },\n );\n },\n [\n activeBackend.backend.kind,\n createConversation,\n isCreatingConversation,\n navigate,\n onLaunched,\n setMessageToSend,\n trackPrebuiltAutomationEnabled,\n ],\n );\n\n const getMissingEntries = useCallback(\n (automation: RecommendedAutomation) =>\n getRequiredEntries(automation).filter(\n (entry) => !findInstalledEntryMatch(entry, installedMcpConfig),\n ),\n [installedMcpConfig],\n );\n\n const proceedWithLocalLaunch = (automation: RecommendedAutomation) => {\n const missingEntries = getMissingEntries(automation);\n if (missingEntries.length === 0) {\n launchAutomation(automation);\n return;\n }\n\n setPendingAutomation(automation);\n setInstallQueue(missingEntries);\n };\n\n const handleSelectAutomation = (automation: RecommendedAutomation) => {\n if (\n launchInFlightRef.current ||\n createConversation.isPending ||\n isCreatingConversation ||\n installQueue.length > 0 ||\n deploymentChoiceAutomation !== null\n ) {\n return;\n }\n\n // GitHub/Slack responders poll continuously; let the user choose where the\n // responder runs before committing to the local setup flow.\n if (isResponderAutomation(automation)) {\n setDeploymentChoiceAutomation(automation);\n return;\n }\n\n proceedWithLocalLaunch(automation);\n };\n\n const handleDeploymentContinueLocal = async () => {\n const automation = deploymentChoiceAutomation;\n if (!automation || localSetupInFlightRef.current) return;\n\n localSetupInFlightRef.current = true;\n setIsPreparingLocalResponder(true);\n\n try {\n const isSecretReady = await ensureResponderUrlSecret();\n if (!isSecretReady) return;\n\n setDeploymentChoiceAutomation(null);\n proceedWithLocalLaunch(automation);\n } finally {\n localSetupInFlightRef.current = false;\n setIsPreparingLocalResponder(false);\n }\n };\n\n const handleDeploymentOpenUrl = (url: string) => {\n setDeploymentChoiceAutomation(null);\n window.open(url, \"_blank\", \"noopener,noreferrer\");\n };\n\n const handleDeploymentClose = () => {\n setDeploymentChoiceAutomation(null);\n };\n\n const cancelInstallFlow = () => {\n if (completedInstallRef.current) {\n completedInstallRef.current = false;\n return;\n }\n setPendingAutomation(null);\n setInstallQueue([]);\n };\n\n const handleInstallSuccess = () => {\n completedInstallRef.current = true;\n\n setInstallQueue((currentQueue) => {\n const nextQueue = currentQueue.slice(1);\n\n if (nextQueue.length === 0) {\n const automation = pendingAutomation;\n window.setTimeout(() => {\n setPendingAutomation(null);\n if (automation) launchAutomation(automation);\n }, 0);\n }\n\n return nextQueue;\n });\n };\n\n const installEntry = installQueue[0] ?? null;\n\n // Like every automation surface, the launcher renders only behind the\n // interface-manifest gate; New Chat mounts it outside the gated routes.\n if (!hasAutomationInterface()) return null;\n\n // Recommended automations are a local-backend-only feature; cloud\n // automations are managed elsewhere.\n if (activeBackend.backend.kind === \"cloud\") return null;\n\n if (isRail && isAutomationsLoading) return null;\n\n return (\n <>\n {isRail ? (\n <RecommendedAutomationsRail\n className={className}\n installedAutomations={automationsData?.automations ?? []}\n onSelect={handleSelectAutomation}\n />\n ) : (\n <RecommendedAutomationsSection\n backendKind={activeBackend.backend.kind}\n installedServers={installedMcpConfig}\n query={query}\n onSelect={handleSelectAutomation}\n scrollableGrid={scrollableGrid}\n />\n )}\n\n {installEntry && (\n <InstallServerModal\n key={installEntry.id}\n entry={installEntry}\n existingServers={installedMcpConfig}\n onClose={cancelInstallFlow}\n onSuccess={handleInstallSuccess}\n />\n )}\n\n <ResponderDeploymentModal\n isOpen={deploymentChoiceAutomation !== null}\n isPending={isPreparingLocalResponder}\n onClose={handleDeploymentClose}\n onContinueLocal={handleDeploymentContinueLocal}\n onOpenUrl={handleDeploymentOpenUrl}\n />\n </>\n );\n}\n"],"mappings":"6xCAgEA,SAAS,EAAmB,EAAmC,CAC7D,OAAO,EAAA,0BAA0B,CAAU,EACxC,IAAK,GAAO,EAAA,wBAAwB,EAAI,EAAA,OAAe,CAAC,EACxD,OAAQ,GAAqC,CAAC,CAAC,CAAK,EACpD,OAAO,EAAA,qBAAqB,CACjC,CAEA,SAAgB,EAA+B,CAC7C,QACA,aACA,iBAAiB,GACjB,UAAU,UACV,aACsC,CACtC,IAAM,EAAgB,EAAA,iBAAiB,EACjC,CAAE,YAAa,EAAA,cAAc,EAC7B,CAA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ACA,EAAqB,IAAI,EACzB,EAAgB,CAAC,CAAC,CACpB,EAEM,OAA6B,CACjC,EAAoB,QAAU,GAE9B,EAAiB,GAAiB,CAChC,IAAM,EAAY,EAAa,MAAM,CAAC,EAEtC,GAAI,EAAU,SAAW,EAAG,CAC1B,IAAM,EAAa,EACnB,OAAO,eAAiB,CACtB,EAAqB,IAAI,EACrB,GAAY,EAAiB,CAAU,CAC7C,EAAG,CAAC,CACN,CAEA,OAAO,CACT,CAAC,CACH,EAEM,EAAe,EAAa,IAAM,KAYxC,MARI,CAAC,EAAA,uBAAuB,GAIxB,EAAc,QAAQ,OAAS,SAE/B,GAAU,EAA6B,MAGzC,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,CACG,GACC,EAAA,EAAA,KAAC,EAAA,2BAAD,CACa,YACX,qBAAsB,GAAiB,aAAe,CAAC,EACvD,SAAU,CACX,CAAA,GAED,EAAA,EAAA,KAAC,EAAA,8BAAD,CACE,YAAa,EAAc,QAAQ,KACnC,iBAAkB,EACX,QACP,SAAU,EACM,gBACjB,CAAA,EAGF,IACC,EAAA,EAAA,KAAC,EAAA,mBAAD,CAEE,MAAO,EACP,gBAAiB,EACjB,QAAS,GACT,UAAW,EACZ,EALM,EAAa,EAKnB,GAGH,EAAA,EAAA,KAAC,EAAA,yBAAD,CACE,OAAQ,IAA+B,KACvC,UAAW,EACX,QAAS,GACT,gBAAiB,GACjB,UAAW,EACZ,CAAA,CACD,CAAA,CAAA,CAEN"}
@@ -3,11 +3,11 @@ import { setConversationState as t, setPendingTaskDraft as ee } from "../../../u
3
3
  import { useConversationStore as n } from "../../../stores/conversation-store.js";
4
4
  import { useActiveBackend as r } from "../../../contexts/active-backend-context.js";
5
5
  import { parseMcpConfig as i } from "../../../utils/mcp-config.js";
6
- import { getAutomationLaunchPrompt as te, getRequiredIntegrationIds as a } from "../../../utils/automation-catalog.js";
7
- import { SETUP_REGISTRY as o } from "../../../manifests/manifest-sources.js";
8
- import { automationSetupPath as s, hasAutomationInterface as c } from "../../../manifests/automation-interface.js";
9
- import { useTracking as ne } from "../../../hooks/use-tracking.js";
10
- import { useSettings as l } from "../../../hooks/query/use-settings.js";
6
+ import { useSettings as a } from "../../../hooks/query/use-settings.js";
7
+ import { getAutomationLaunchPrompt as te, getRequiredIntegrationIds as o } from "../../../utils/automation-catalog.js";
8
+ import { SETUP_REGISTRY as s } from "../../../manifests/manifest-sources.js";
9
+ import { automationSetupPath as c, hasAutomationInterface as ne } from "../../../manifests/automation-interface.js";
10
+ import { useTracking as l } from "../../../hooks/use-tracking.js";
11
11
  import { useCreateConversation as re } from "../../../hooks/mutation/use-create-conversation.js";
12
12
  import { useIsCreatingConversation as ie } from "../../../hooks/use-is-creating-conversation.js";
13
13
  import u from "../../../node_modules/@openhands/extensions/integrations/index.js";
@@ -24,13 +24,13 @@ import { useCallback as S, useMemo as C, useRef as w, useState as T } from "reac
24
24
  import { Fragment as ae, jsx as E, jsxs as oe } from "react/jsx-runtime";
25
25
  //#region src/components/features/automations/recommended-automations-launcher.tsx
26
26
  function se(e) {
27
- return a(e).map((e) => f(e, u)).filter((e) => !!e).filter(p);
27
+ return o(e).map((e) => f(e, u)).filter((e) => !!e).filter(p);
28
28
  }
29
- function D({ query: a, onLaunched: u, scrollableGrid: f = !1, variant: p = "catalog", className: D }) {
30
- let O = r(), { navigate: k } = e(), { data: A } = l(), { trackPrebuiltAutomationEnabled: j } = ne(), M = re(), N = h(), P = ie(), F = n((e) => e.setMessageToSend), [I, L] = T(null), [R, z] = T(null), [B, V] = T([]), H = w(!1), U = w(!1), W = w(!1), [G, K] = T(!1), q = p === "rail", { data: ce, isLoading: le } = m({ enabled: q && O.backend.kind === "local" }), J = C(() => g(A?.mcp_config ?? i(A?.agent_settings?.mcp_config)).filter((e) => e.enabled !== !1), [A?.agent_settings?.mcp_config, A?.mcp_config]), Y = S((e) => {
29
+ function D({ query: o, onLaunched: u, scrollableGrid: f = !1, variant: p = "catalog", className: D }) {
30
+ let O = r(), { navigate: k } = e(), { data: A } = a(), { trackPrebuiltAutomationEnabled: j } = l(), M = re(), N = h(), P = ie(), F = n((e) => e.setMessageToSend), [I, L] = T(null), [R, z] = T(null), [B, V] = T([]), H = w(!1), U = w(!1), W = w(!1), [G, K] = T(!1), q = p === "rail", { data: ce, isLoading: le } = m({ enabled: q && O.backend.kind === "local" }), J = C(() => g(A?.mcp_config ?? i(A?.agent_settings?.mcp_config)).filter((e) => e.enabled !== !1), [A?.agent_settings?.mcp_config, A?.mcp_config]), Y = S((e) => {
31
31
  if (U.current || M.isPending || P) return;
32
- if (U.current = !0, o.findById(e.id)) {
33
- k?.(s(e.id)), u?.();
32
+ if (U.current = !0, s.findById(e.id)) {
33
+ k?.(c(e.id)), u?.();
34
34
  return;
35
35
  }
36
36
  let n = te(e);
@@ -101,7 +101,7 @@ function D({ query: a, onLaunched: u, scrollableGrid: f = !1, variant: p = "cata
101
101
  return t;
102
102
  });
103
103
  }, $ = B[0] ?? null;
104
- return !c() || O.backend.kind === "cloud" || q && le ? null : /* @__PURE__ */ oe(ae, { children: [
104
+ return !ne() || O.backend.kind === "cloud" || q && le ? null : /* @__PURE__ */ oe(ae, { children: [
105
105
  q ? /* @__PURE__ */ E(y, {
106
106
  className: D,
107
107
  installedAutomations: ce?.automations ?? [],
@@ -109,7 +109,7 @@ function D({ query: a, onLaunched: u, scrollableGrid: f = !1, variant: p = "cata
109
109
  }) : /* @__PURE__ */ E(b, {
110
110
  backendKind: O.backend.kind,
111
111
  installedServers: J,
112
- query: a,
112
+ query: o,
113
113
  onSelect: Z,
114
114
  scrollableGrid: f
115
115
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"recommended-automations-launcher.js","names":[],"sources":["../../../../src/components/features/automations/recommended-automations-launcher.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, useState } from \"react\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useCreateConversation } from \"#/hooks/mutation/use-create-conversation\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport { useIsCreatingConversation } from \"#/hooks/use-is-creating-conversation\";\nimport { useResponderUrlSecret } from \"#/hooks/use-responder-url-secret\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport {\n setConversationState,\n setPendingTaskDraft,\n} from \"#/utils/conversation-local-storage\";\nimport type { RecommendedAutomation } from \"@openhands/extensions/automations\";\nimport { parseMcpConfig } from \"#/utils/mcp-config\";\nimport { flattenMcpConfig } from \"#/utils/mcp-installed-servers\";\nimport {\n INTEGRATION_CATALOG as MCP_MARKETPLACE,\n type IntegrationCatalogEntry as MarketplaceEntry,\n} from \"@openhands/extensions/integrations\";\nimport {\n findInstalledEntryMatch,\n getMarketplaceEntryById,\n isMcpInstallableEntry,\n} from \"#/utils/mcp-marketplace-utils\";\nimport { InstallServerModal } from \"#/components/features/mcp-page/install-server-modal\";\nimport { useTracking } from \"#/hooks/use-tracking\";\nimport {\n automationSetupPath,\n hasAutomationInterface,\n} from \"#/manifests/automation-interface\";\nimport { SETUP_REGISTRY } from \"#/manifests/manifest-sources\";\nimport {\n getAutomationLaunchPrompt,\n getRequiredIntegrationIds,\n} from \"#/utils/automation-catalog\";\nimport { isResponderAutomation } from \"#/utils/responder-deployment\";\nimport { useAutomations } from \"#/hooks/query/use-automations\";\nimport { RecommendedAutomationsRail } from \"./recommended-automations-rail\";\nimport { RecommendedAutomationsSection } from \"./recommended-automations-section\";\nimport { ResponderDeploymentModal } from \"./responder-deployment-modal\";\n\ninterface RecommendedAutomationsLauncherProps {\n query?: string;\n onLaunched?: () => void;\n /** When true, only the automation card grid scrolls inside its section. */\n scrollableGrid?: boolean;\n /**\n * Compact discovery rail for New Chat and the automations dashboard.\n * The templates page keeps the full catalog section.\n */\n variant?: \"catalog\" | \"rail\";\n className?: string;\n}\n\n/**\n * The marketplace entries a launch waits on. An integration the automation is\n * willing to start without is deliberately absent, so it never queues an\n * install modal the user has to dismiss.\n *\n * A required integration this backend cannot install as MCP (e.g. Jira's\n * HTTP-only option) is also excluded here — the install queue can't do\n * anything with it — but it is not silently dropped from the product: the\n * automation card keeps it visible and labels it as needing external setup.\n */\nfunction getRequiredEntries(automation: RecommendedAutomation) {\n return getRequiredIntegrationIds(automation)\n .map((id) => getMarketplaceEntryById(id, MCP_MARKETPLACE))\n .filter((entry): entry is MarketplaceEntry => !!entry)\n .filter(isMcpInstallableEntry);\n}\n\nexport function RecommendedAutomationsLauncher({\n query,\n onLaunched,\n scrollableGrid = false,\n variant = \"catalog\",\n className,\n}: RecommendedAutomationsLauncherProps) {\n const activeBackend = useActiveBackend();\n const { navigate } = useNavigation();\n const { data: settings } = useSettings();\n const { trackPrebuiltAutomationEnabled } = useTracking();\n const createConversation = useCreateConversation();\n const ensureResponderUrlSecret = useResponderUrlSecret();\n const isCreatingConversation = useIsCreatingConversation();\n const setMessageToSend = useConversationStore(\n (state) => state.setMessageToSend,\n );\n const [pendingAutomation, setPendingAutomation] =\n useState<RecommendedAutomation | null>(null);\n const [deploymentChoiceAutomation, setDeploymentChoiceAutomation] =\n useState<RecommendedAutomation | null>(null);\n const [installQueue, setInstallQueue] = useState<MarketplaceEntry[]>([]);\n const completedInstallRef = useRef(false);\n const launchInFlightRef = useRef(false);\n const localSetupInFlightRef = useRef(false);\n const [isPreparingLocalResponder, setIsPreparingLocalResponder] =\n useState(false);\n const isRail = variant === \"rail\";\n const { data: automationsData, isLoading: isAutomationsLoading } =\n useAutomations({\n enabled: isRail && activeBackend.backend.kind === \"local\",\n });\n\n const installedMcpConfig = useMemo(\n () =>\n flattenMcpConfig(\n settings?.mcp_config ??\n parseMcpConfig(settings?.agent_settings?.mcp_config),\n ).filter((server) => server.enabled !== false),\n [settings?.agent_settings?.mcp_config, settings?.mcp_config],\n );\n\n const launchAutomation = useCallback(\n (automation: RecommendedAutomation) => {\n if (\n launchInFlightRef.current ||\n createConversation.isPending ||\n isCreatingConversation\n ) {\n return;\n }\n launchInFlightRef.current = true;\n\n // An automation that ships a setup experience is configured from its own\n // form, so the answers are collected before anything is created. The rest\n // still hand a slash command to an agent to interpret.\n if (SETUP_REGISTRY.findById(automation.id)) {\n navigate?.(automationSetupPath(automation.id));\n onLaunched?.();\n return;\n }\n\n const prompt = getAutomationLaunchPrompt(automation);\n\n createConversation.mutate(\n {},\n {\n onSuccess: (conversation) => {\n trackPrebuiltAutomationEnabled({\n automationName: automation.name,\n automationCategory: automation.category,\n });\n if (\n conversation.conversation_id.startsWith(\"task-\") &&\n conversation.task_id\n ) {\n setPendingTaskDraft(conversation.task_id, prompt);\n } else {\n setConversationState(conversation.conversation_id, {\n draftMessage: prompt,\n });\n }\n navigate?.(`/conversations/${conversation.conversation_id}`);\n onLaunched?.();\n window.setTimeout(() => setMessageToSend(prompt), 0);\n },\n onError: () => {\n launchInFlightRef.current = false;\n },\n },\n );\n },\n [\n activeBackend.backend.kind,\n createConversation,\n isCreatingConversation,\n navigate,\n onLaunched,\n setMessageToSend,\n trackPrebuiltAutomationEnabled,\n ],\n );\n\n const getMissingEntries = useCallback(\n (automation: RecommendedAutomation) =>\n getRequiredEntries(automation).filter(\n (entry) => !findInstalledEntryMatch(entry, installedMcpConfig),\n ),\n [installedMcpConfig],\n );\n\n const proceedWithLocalLaunch = (automation: RecommendedAutomation) => {\n const missingEntries = getMissingEntries(automation);\n if (missingEntries.length === 0) {\n launchAutomation(automation);\n return;\n }\n\n setPendingAutomation(automation);\n setInstallQueue(missingEntries);\n };\n\n const handleSelectAutomation = (automation: RecommendedAutomation) => {\n if (\n launchInFlightRef.current ||\n createConversation.isPending ||\n isCreatingConversation ||\n installQueue.length > 0 ||\n deploymentChoiceAutomation !== null\n ) {\n return;\n }\n\n // GitHub/Slack responders poll continuously; let the user choose where the\n // responder runs before committing to the local setup flow.\n if (isResponderAutomation(automation)) {\n setDeploymentChoiceAutomation(automation);\n return;\n }\n\n proceedWithLocalLaunch(automation);\n };\n\n const handleDeploymentContinueLocal = async () => {\n const automation = deploymentChoiceAutomation;\n if (!automation || localSetupInFlightRef.current) return;\n\n localSetupInFlightRef.current = true;\n setIsPreparingLocalResponder(true);\n\n try {\n const isSecretReady = await ensureResponderUrlSecret();\n if (!isSecretReady) return;\n\n setDeploymentChoiceAutomation(null);\n proceedWithLocalLaunch(automation);\n } finally {\n localSetupInFlightRef.current = false;\n setIsPreparingLocalResponder(false);\n }\n };\n\n const handleDeploymentOpenUrl = (url: string) => {\n setDeploymentChoiceAutomation(null);\n window.open(url, \"_blank\", \"noopener,noreferrer\");\n };\n\n const handleDeploymentClose = () => {\n setDeploymentChoiceAutomation(null);\n };\n\n const cancelInstallFlow = () => {\n if (completedInstallRef.current) {\n completedInstallRef.current = false;\n return;\n }\n setPendingAutomation(null);\n setInstallQueue([]);\n };\n\n const handleInstallSuccess = () => {\n completedInstallRef.current = true;\n\n setInstallQueue((currentQueue) => {\n const nextQueue = currentQueue.slice(1);\n\n if (nextQueue.length === 0) {\n const automation = pendingAutomation;\n window.setTimeout(() => {\n setPendingAutomation(null);\n if (automation) launchAutomation(automation);\n }, 0);\n }\n\n return nextQueue;\n });\n };\n\n const installEntry = installQueue[0] ?? null;\n\n // Like every automation surface, the launcher renders only behind the\n // interface-manifest gate; New Chat mounts it outside the gated routes.\n if (!hasAutomationInterface()) return null;\n\n // Recommended automations are a local-backend-only feature; cloud\n // automations are managed elsewhere.\n if (activeBackend.backend.kind === \"cloud\") return null;\n\n if (isRail && isAutomationsLoading) return null;\n\n return (\n <>\n {isRail ? (\n <RecommendedAutomationsRail\n className={className}\n installedAutomations={automationsData?.automations ?? []}\n onSelect={handleSelectAutomation}\n />\n ) : (\n <RecommendedAutomationsSection\n backendKind={activeBackend.backend.kind}\n installedServers={installedMcpConfig}\n query={query}\n onSelect={handleSelectAutomation}\n scrollableGrid={scrollableGrid}\n />\n )}\n\n {installEntry && (\n <InstallServerModal\n key={installEntry.id}\n entry={installEntry}\n existingServers={installedMcpConfig}\n onClose={cancelInstallFlow}\n onSuccess={handleInstallSuccess}\n />\n )}\n\n <ResponderDeploymentModal\n isOpen={deploymentChoiceAutomation !== null}\n isPending={isPreparingLocalResponder}\n onClose={handleDeploymentClose}\n onContinueLocal={handleDeploymentContinueLocal}\n onOpenUrl={handleDeploymentOpenUrl}\n />\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,SAAS,GAAmB,GAAmC;CAC7D,OAAO,EAA0B,CAAU,EACxC,KAAK,MAAO,EAAwB,GAAI,CAAe,CAAC,EACxD,QAAQ,MAAqC,CAAC,CAAC,CAAK,EACpD,OAAO,CAAqB;AACjC;AAEA,SAAgB,EAA+B,EAC7C,UACA,eACA,oBAAiB,IACjB,aAAU,WACV,gBACsC;CACtC,IAAM,IAAgB,EAAiB,GACjC,EAAE,gBAAa,EAAc,GAC7B,EAAE,MAAM,MAAa,EAAY,GACjC,EAAE,sCAAmC,GAAY,GACjD,IAAqB,GAAsB,GAC3C,IAA2B,EAAsB,GACjD,IAAyB,GAA0B,GACnD,IAAmB,GACtB,MAAU,EAAM,gBACnB,GACM,CAAC,GAAmB,KACxB,EAAuC,IAAI,GACvC,CAAC,GAA4B,KACjC,EAAuC,IAAI,GACvC,CAAC,GAAc,KAAmB,EAA6B,CAAC,CAAC,GACjE,IAAsB,EAAO,EAAK,GAClC,IAAoB,EAAO,EAAK,GAChC,IAAwB,EAAO,EAAK,GACpC,CAAC,GAA2B,KAChC,EAAS,EAAK,GACV,IAAS,MAAY,QACrB,EAAE,MAAM,IAAiB,WAAW,OACxC,EAAe,EACb,SAAS,KAAU,EAAc,QAAQ,SAAS,QACpD,CAAC,GAEG,IAAqB,QAEvB,EACE,GAAU,cACR,EAAe,GAAU,gBAAgB,UAAU,CACvD,EAAE,QAAQ,MAAW,EAAO,YAAY,EAAK,GAC/C,CAAC,GAAU,gBAAgB,YAAY,GAAU,UAAU,CAC7D,GAEM,IAAmB,GACtB,MAAsC;EACrC,IACE,EAAkB,WAClB,EAAmB,aACnB,GAEA;EAOF,IALA,EAAkB,UA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A,EAA8B,IAAI,GAClC,EAAuB,CAAU;GACnC,UAAU;IAER,AADA,EAAsB,UAAU,IAChC,EAA6B,EAAK;GACpC;EAXiC;CAYnC,GAEM,KAA2B,MAAgB;EAE/C,AADA,EAA8B,IAAI,GAClC,OAAO,KAAK,GAAK,UAAU,qBAAqB;CAClD,GAEM,WAA8B;EAClC,EAA8B,IAAI;CACpC,GAEM,WAA0B;EAC9B,IAAI,EAAoB,SAAS;GAC/B,EAAoB,UAAU;GAC9B;EACF;EAEA,AADA,EAAqB,IAAI,GACzB,EAAgB,CAAC,CAAC;CACpB,GAEM,WAA6B;EAGjC,AAFA,EAAoB,UAAU,IAE9B,GAAiB,MAAiB;GAChC,IAAM,IAAY,EAAa,MAAM,CAAC;GAEtC,IAAI,EAAU,WAAW,GAAG;IAC1B,IAAM,IAAa;IACnB,OAAO,iBAAiB;KAEtB,AADA,EAAqB,IAAI,GACrB,KAAY,EAAiB,CAAU;IAC7C,GAAG,CAAC;GACN;GAEA,OAAO;EACT,CAAC;CACH,GAEM,IAAe,EAAa,MAAM;CAYxC,OARI,CAAC,EAAuB,KAIxB,EAAc,QAAQ,SAAS,WAE/B,KAAU,KAA6B,OAGzC,mBAAA,IAAA,EAAA,UAAA;EACG,IACC,kBAAC,GAAD;GACa;GACX,sBAAsB,IAAiB,eAAe,CAAC;GACvD,UAAU;EACX,CAAA,IAED,kBAAC,GAAD;GACE,aAAa,EAAc,QAAQ;GACnC,kBAAkB;GACX;GACP,UAAU;GACM;EACjB,CAAA;EAGF,KACC,kBAAC,GAAD;GAEE,OAAO;GACP,iBAAiB;GACjB,SAAS;GACT,WAAW;EACZ,GALM,EAAa,EAKnB;EAGH,kBAAC,GAAD;GACE,QAAQ,MAA+B;GACvC,WAAW;GACX,SAAS;GACT,iBAAiB;GACjB,WAAW;EACZ,CAAA;CACD,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"recommended-automations-launcher.js","names":[],"sources":["../../../../src/components/features/automations/recommended-automations-launcher.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, useState } from \"react\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useCreateConversation } from \"#/hooks/mutation/use-create-conversation\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport { useIsCreatingConversation } from \"#/hooks/use-is-creating-conversation\";\nimport { useResponderUrlSecret } from \"#/hooks/use-responder-url-secret\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport {\n setConversationState,\n setPendingTaskDraft,\n} from \"#/utils/conversation-local-storage\";\nimport type { RecommendedAutomation } from \"@openhands/extensions/automations\";\nimport { parseMcpConfig } from \"#/utils/mcp-config\";\nimport { flattenMcpConfig } from \"#/utils/mcp-installed-servers\";\nimport {\n INTEGRATION_CATALOG as MCP_MARKETPLACE,\n type IntegrationCatalogEntry as MarketplaceEntry,\n} from \"@openhands/extensions/integrations\";\nimport {\n findInstalledEntryMatch,\n getMarketplaceEntryById,\n isMcpInstallableEntry,\n} from \"#/utils/mcp-marketplace-utils\";\nimport { InstallServerModal } from \"#/components/features/mcp-page/install-server-modal\";\nimport { useTracking } from \"#/hooks/use-tracking\";\nimport {\n automationSetupPath,\n hasAutomationInterface,\n} from \"#/manifests/automation-interface\";\nimport { SETUP_REGISTRY } from \"#/manifests/manifest-sources\";\nimport {\n getAutomationLaunchPrompt,\n getRequiredIntegrationIds,\n} from \"#/utils/automation-catalog\";\nimport { isResponderAutomation } from \"#/utils/responder-deployment\";\nimport { useAutomations } from \"#/hooks/query/use-automations\";\nimport { RecommendedAutomationsRail } from \"./recommended-automations-rail\";\nimport { RecommendedAutomationsSection } from \"./recommended-automations-section\";\nimport { ResponderDeploymentModal } from \"./responder-deployment-modal\";\n\ninterface RecommendedAutomationsLauncherProps {\n query?: string;\n onLaunched?: () => void;\n /** When true, only the automation card grid scrolls inside its section. */\n scrollableGrid?: boolean;\n /**\n * Compact discovery rail for New Chat and the automations dashboard.\n * The templates page keeps the full catalog section.\n */\n variant?: \"catalog\" | \"rail\";\n className?: string;\n}\n\n/**\n * The marketplace entries a launch waits on. An integration the automation is\n * willing to start without is deliberately absent, so it never queues an\n * install modal the user has to dismiss.\n *\n * A required integration this backend cannot install as MCP (e.g. Jira's\n * HTTP-only option) is also excluded here — the install queue can't do\n * anything with it — but it is not silently dropped from the product: the\n * automation card keeps it visible and labels it as needing external setup.\n */\nfunction getRequiredEntries(automation: RecommendedAutomation) {\n return getRequiredIntegrationIds(automation)\n .map((id) => getMarketplaceEntryById(id, MCP_MARKETPLACE))\n .filter((entry): entry is MarketplaceEntry => !!entry)\n .filter(isMcpInstallableEntry);\n}\n\nexport function RecommendedAutomationsLauncher({\n query,\n onLaunched,\n scrollableGrid = false,\n variant = \"catalog\",\n className,\n}: RecommendedAutomationsLauncherProps) {\n const activeBackend = useActiveBackend();\n const { navigate } = useNavigation();\n const { data: settings } = useSettings();\n const { trackPrebuiltAutomationEnabled } = useTracking();\n const createConversation = useCreateConversation();\n const ensureResponderUrlSecret = useResponderUrlSecret();\n const isCreatingConversation = useIsCreatingConversation();\n const setMessageToSend = useConversationStore(\n (state) => state.setMessageToSend,\n );\n const [pendingAutomation, setPendingAutomation] =\n useState<RecommendedAutomation | null>(null);\n const [deploymentChoiceAutomation, setDeploymentChoiceAutomation] =\n useState<RecommendedAutomation | null>(null);\n const [installQueue, setInstallQueue] = useState<MarketplaceEntry[]>([]);\n const completedInstallRef = useRef(false);\n const launchInFlightRef = useRef(false);\n const localSetupInFlightRef = useRef(false);\n const [isPreparingLocalResponder, setIsPreparingLocalResponder] =\n useState(false);\n const isRail = variant === \"rail\";\n const { data: automationsData, isLoading: isAutomationsLoading } =\n useAutomations({\n enabled: isRail && activeBackend.backend.kind === \"local\",\n });\n\n const installedMcpConfig = useMemo(\n () =>\n flattenMcpConfig(\n settings?.mcp_config ??\n parseMcpConfig(settings?.agent_settings?.mcp_config),\n ).filter((server) => server.enabled !== false),\n [settings?.agent_settings?.mcp_config, settings?.mcp_config],\n );\n\n const launchAutomation = useCallback(\n (automation: RecommendedAutomation) => {\n if (\n launchInFlightRef.current ||\n createConversation.isPending ||\n isCreatingConversation\n ) {\n return;\n }\n launchInFlightRef.current = true;\n\n // An automation that ships a setup experience is configured from its own\n // form, so the answers are collected before anything is created. The rest\n // still hand a slash command to an agent to interpret.\n if (SETUP_REGISTRY.findById(automation.id)) {\n navigate?.(automationSetupPath(automation.id));\n onLaunched?.();\n return;\n }\n\n const prompt = getAutomationLaunchPrompt(automation);\n\n createConversation.mutate(\n {},\n {\n onSuccess: (conversation) => {\n trackPrebuiltAutomationEnabled({\n automationName: automation.name,\n automationCategory: automation.category,\n });\n if (\n conversation.conversation_id.startsWith(\"task-\") &&\n conversation.task_id\n ) {\n setPendingTaskDraft(conversation.task_id, prompt);\n } else {\n setConversationState(conversation.conversation_id, {\n draftMessage: prompt,\n });\n }\n navigate?.(`/conversations/${conversation.conversation_id}`);\n onLaunched?.();\n window.setTimeout(() => setMessageToSend(prompt), 0);\n },\n onError: () => {\n launchInFlightRef.current = false;\n },\n },\n );\n },\n [\n activeBackend.backend.kind,\n createConversation,\n isCreatingConversation,\n navigate,\n onLaunched,\n setMessageToSend,\n trackPrebuiltAutomationEnabled,\n ],\n );\n\n const getMissingEntries = useCallback(\n (automation: RecommendedAutomation) =>\n getRequiredEntries(automation).filter(\n (entry) => !findInstalledEntryMatch(entry, installedMcpConfig),\n ),\n [installedMcpConfig],\n );\n\n const proceedWithLocalLaunch = (automation: RecommendedAutomation) => {\n const missingEntries = getMissingEntries(automation);\n if (missingEntries.length === 0) {\n launchAutomation(automation);\n return;\n }\n\n setPendingAutomation(automation);\n setInstallQueue(missingEntries);\n };\n\n const handleSelectAutomation = (automation: RecommendedAutomation) => {\n if (\n launchInFlightRef.current ||\n createConversation.isPending ||\n isCreatingConversation ||\n installQueue.length > 0 ||\n deploymentChoiceAutomation !== null\n ) {\n return;\n }\n\n // GitHub/Slack responders poll continuously; let the user choose where the\n // responder runs before committing to the local setup flow.\n if (isResponderAutomation(automation)) {\n setDeploymentChoiceAutomation(automation);\n return;\n }\n\n proceedWithLocalLaunch(automation);\n };\n\n const handleDeploymentContinueLocal = async () => {\n const automation = deploymentChoiceAutomation;\n if (!automation || localSetupInFlightRef.current) return;\n\n localSetupInFlightRef.current = true;\n setIsPreparingLocalResponder(true);\n\n try {\n const isSecretReady = await ensureResponderUrlSecret();\n if (!isSecretReady) return;\n\n setDeploymentChoiceAutomation(null);\n proceedWithLocalLaunch(automation);\n } finally {\n localSetupInFlightRef.current = false;\n setIsPreparingLocalResponder(false);\n }\n };\n\n const handleDeploymentOpenUrl = (url: string) => {\n setDeploymentChoiceAutomation(null);\n window.open(url, \"_blank\", \"noopener,noreferrer\");\n };\n\n const handleDeploymentClose = () => {\n setDeploymentChoiceAutomation(null);\n };\n\n const cancelInstallFlow = () => {\n if (completedInstallRef.current) {\n completedInstallRef.current = false;\n return;\n }\n setPendingAutomation(null);\n setInstallQueue([]);\n };\n\n const handleInstallSuccess = () => {\n completedInstallRef.current = true;\n\n setInstallQueue((currentQueue) => {\n const nextQueue = currentQueue.slice(1);\n\n if (nextQueue.length === 0) {\n const automation = pendingAutomation;\n window.setTimeout(() => {\n setPendingAutomation(null);\n if (automation) launchAutomation(automation);\n }, 0);\n }\n\n return nextQueue;\n });\n };\n\n const installEntry = installQueue[0] ?? null;\n\n // Like every automation surface, the launcher renders only behind the\n // interface-manifest gate; New Chat mounts it outside the gated routes.\n if (!hasAutomationInterface()) return null;\n\n // Recommended automations are a local-backend-only feature; cloud\n // automations are managed elsewhere.\n if (activeBackend.backend.kind === \"cloud\") return null;\n\n if (isRail && isAutomationsLoading) return null;\n\n return (\n <>\n {isRail ? (\n <RecommendedAutomationsRail\n className={className}\n installedAutomations={automationsData?.automations ?? []}\n onSelect={handleSelectAutomation}\n />\n ) : (\n <RecommendedAutomationsSection\n backendKind={activeBackend.backend.kind}\n installedServers={installedMcpConfig}\n query={query}\n onSelect={handleSelectAutomation}\n scrollableGrid={scrollableGrid}\n />\n )}\n\n {installEntry && (\n <InstallServerModal\n key={installEntry.id}\n entry={installEntry}\n existingServers={installedMcpConfig}\n onClose={cancelInstallFlow}\n onSuccess={handleInstallSuccess}\n />\n )}\n\n <ResponderDeploymentModal\n isOpen={deploymentChoiceAutomation !== null}\n isPending={isPreparingLocalResponder}\n onClose={handleDeploymentClose}\n onContinueLocal={handleDeploymentContinueLocal}\n onOpenUrl={handleDeploymentOpenUrl}\n />\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,SAAS,GAAmB,GAAmC;CAC7D,OAAO,EAA0B,CAAU,EACxC,KAAK,MAAO,EAAwB,GAAI,CAAe,CAAC,EACxD,QAAQ,MAAqC,CAAC,CAAC,CAAK,EACpD,OAAO,CAAqB;AACjC;AAEA,SAAgB,EAA+B,EAC7C,UACA,eACA,oBAAiB,IACjB,aAAU,WACV,gBACsC;CACtC,IAAM,IAAgB,EAAiB,GACjC,EAAE,gBAAa,EAAc,GAC7B,EAAE,MAAM,MAAa,EAAY,GACjC,EAAE,sCAAmC,EAAY,GACjD,IAAqB,GAAsB,GAC3C,IAA2B,EAAsB,GACjD,IAAyB,GAA0B,GACnD,IAAmB,GACtB,MAAU,EAAM,gBACnB,GACM,CAAC,GAAmB,KACxB,EAAuC,IAAI,GACvC,CAAC,GAA4B,KACjC,EAAuC,IAAI,GACvC,CAAC,GAAc,KAAmB,EAA6B,CAAC,CAAC,GACjE,IAAsB,EAAO,EAAK,GAClC,IAAoB,EAAO,EAAK,GAChC,IAAwB,EAAO,EAAK,GACpC,CAAC,GAA2B,KAChC,EAAS,EAAK,GACV,IAAS,MAAY,QACrB,EAAE,MAAM,IAAiB,WAAW,OACxC,EAAe,EACb,SAAS,KAAU,EAAc,QAAQ,SAAS,QACpD,CAAC,GAEG,IAAqB,QAEvB,EACE,GAAU,cACR,EAAe,GAAU,gBAAgB,UAAU,CACvD,EAAE,QAAQ,MAAW,EAAO,YAAY,EAA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X,SAAS;GACT,iBAAiB;GACjB,WAAW;EACZ,CAAA;CACD,EAAA,CAAA;AAEN"}
@@ -1,2 +1,2 @@
1
- require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../i18n/declaration.cjs"),n=require("../../../utils/utils.cjs"),r=require("../../../utils/automation-catalog.cjs"),i=require("../../../node_modules/@openhands/extensions/automations/index.cjs"),a=require("../../../manifests/automation-interface.cjs"),o=require("../../../utils/extension-module-card-classes.cjs"),s=require("../skills/skill-card-pill-row.cjs"),c=require("../../../node_modules/@openhands/extensions/integrations/index.cjs"),l=require("../mcp-logo-badge.cjs"),u=require("../../../utils/mcp-marketplace-utils.cjs"),d=require("./status-badge.cjs"),f=require("../../../utils/recommended-automation-rail.cjs"),p=require("../mcp-page/mcp-logo-stack-badge.cjs"),m=require("../../shared/buttons/circle-plus-check-toggle.cjs");let h=require("react"),g=require("react/jsx-runtime");var _=f.getAutomationsByPopularity(i.default);function v(e){return a.getFeaturedAutomationIds().includes(e.id)}function y(e){return r.getIntegrationIds(e).map(e=>{let t=u.getMarketplaceEntryById(e,c.default);return{id:e,entry:t,mcpInstallable:!!t&&u.isMcpInstallableEntry(t)}})}function b(e,t,n){let i=n.trim().toLowerCase();return i?[e.name,e.category,e.description,r.getAutomationLaunchPrompt(e),...t.flatMap(({entry:e,id:t})=>e?[e.name,t,...e.keywords??[]]:[t])].join(` `).toLowerCase().includes(i):!0}function x(e,r,i,a){let s=e.map(({id:e,entry:i,mcpInstallable:s})=>{let c=!!i&&u.findInstalledEntryMatch(i,r),d=i?.name??e;return{id:`integration-${e}`,node:(0,g.jsxs)(`span`,{className:n.cn(o.extensionModuleCardPillClassName,`gap-1`),children:[(0,g.jsx)(l.McpLogoBadge,{entry:i,size:`xs`}),d,c?(0,g.jsx)(`span`,{className:`text-white`,children:a(t.I18nKey.RECOMMENDED_AUTOMATIONS$CONNECTED)}):i?s?null:(0,g.jsx)(`span`,{className:`text-tertiary-alt`,"data-testid":`automation-integration-external-${e}`,children:a(t.I18nKey.RECOMMENDED_AUTOMATIONS$EXTERNAL_SETUP)}):(0,g.jsx)(`span`,{className:`text-tertiary-alt`,"data-testid":`recommended-automation-integration-${e}`,children:a(t.I18nKey.RECOMMENDED_AUTOMATIONS$UNKNOWN_SETUP)})]})}});return i>0&&s.push({id:`missing-connect`,node:(0,g.jsx)(`span`,{className:o.extensionModuleCardPillClassName,children:a(t.I18nKey.RECOMMENDED_AUTOMATIONS$MISSING_CONNECT,{count:i})})}),s}function S({automation:e,integrations:t,size:n,testId:i}){let a=r.getAutomationIcon(e);return a?(0,g.jsx)(l.McpLogoBadge,{entry:null,size:n,testId:i,fallback:(0,h.createElement)(a,{className:`h-5 w-5`,strokeWidth:2.25})}):(0,g.jsx)(p.McpLogoStackBadge,{entries:t.flatMap(({entry:e})=>e?[e]:[]),testId:i})}function C({automations:e,installedServers:t,onSelect:r,translate:i}){return(0,g.jsx)(`div`,{className:n.cn(`mt-3`,o.extensionModuleCardGridClassName),children:e.map(e=>{let a=y(e),c=a.filter(({entry:e,mcpInstallable:n})=>!!e&&n&&!u.findInstalledEntryMatch(e,t)).length;return(0,g.jsx)(`button`,{type:`button`,"data-testid":`recommended-automation-card-${e.id}`,onClick:()=>r(e),className:n.cn(`flex min-w-0 overflow-hidden p-4 text-left`,o.extensionModuleCardSurfaceClassName,o.extensionModuleCardInteractiveClassName),children:(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-3`,children:[(0,g.jsx)(S,{automation:e,integrations:a,size:`md`,testId:`recommended-automation-icon-${e.id}`}),(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,g.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsx)(`h3`,{className:`truncate text-sm font-semibold text-white`,children:e.name}),(0,g.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-tertiary-alt`,children:e.category})]}),(0,g.jsx)(m.CirclePlusBadge,{testId:`recommended-automation-plus-${e.id}`})]}),(0,g.jsx)(`p`,{className:`line-clamp-2 text-xs leading-relaxed text-tertiary-light`,children:e.description}),(0,g.jsx)(s.SkillCardPillRow,{pills:x(a,t,c,i),testId:`recommended-automation-pills-${e.id}`})]})]})},e.id)})})}function w({backendKind:r,installedServers:i,query:a=``,onSelect:s,scrollableGrid:c=!1}){let{t:l}=e.useTranslation(`openhands`),u=_.filter(e=>b(e,y(e),a));if(u.length===0)return null;let f=u.filter(v),p=u.filter(e=>!v(e));return(0,g.jsx)(`section`,{"data-testid":`recommended-automations-section`,className:n.cn(c&&`flex min-h-0 flex-1 flex-col`),children:(0,g.jsxs)(`div`,{"data-testid":c?`recommended-automations-scroll-area`:void 0,className:n.cn(`mt-3`,o.extensionModuleCardGridContainerClassName,c&&`min-h-0 flex-1 overflow-y-auto custom-scrollbar-always`),children:[f.length>0&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`flex items-center`,children:[(0,g.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:l(t.I18nKey.RECOMMENDED_AUTOMATIONS$SECTION_TITLE)}),(0,g.jsx)(d.StatusBadge,{count:f.length})]}),(0,g.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:l(t.I18nKey.RECOMMENDED_AUTOMATIONS$SECTION_DESCRIPTION)}),(0,g.jsx)(C,{automations:f,installedServers:i,onSelect:s,translate:l})]}),p.length>0&&(0,g.jsxs)(`section`,{"data-testid":`recommended-automations-beta-section`,className:n.cn(f.length>0&&`mt-8`),children:[(0,g.jsxs)(`div`,{"data-testid":`recommended-automations-beta-heading`,className:`flex items-center`,children:[(0,g.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:l(t.I18nKey.RECOMMENDED_AUTOMATIONS$BETA_LABEL)}),(0,g.jsx)(d.StatusBadge,{count:p.length})]}),(0,g.jsx)(C,{automations:p,installedServers:i,onSelect:s,translate:l})]})]})})}exports.RecommendedAutomationsSection=w;
1
+ require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../i18n/declaration.cjs"),n=require("../../../utils/utils.cjs"),r=require("../../../node_modules/@openhands/extensions/automations/index.cjs"),i=require("../../../utils/automation-catalog.cjs"),a=require("../../../manifests/automation-interface.cjs"),o=require("../../../utils/extension-module-card-classes.cjs"),s=require("../skills/skill-card-pill-row.cjs"),c=require("../../../node_modules/@openhands/extensions/integrations/index.cjs"),l=require("../mcp-logo-badge.cjs"),u=require("../../../utils/mcp-marketplace-utils.cjs"),d=require("./status-badge.cjs"),f=require("../../../utils/recommended-automation-rail.cjs"),p=require("../mcp-page/mcp-logo-stack-badge.cjs"),m=require("../../shared/buttons/circle-plus-check-toggle.cjs");let h=require("react"),g=require("react/jsx-runtime");var _=f.getAutomationsByPopularity(r.default);function v(e){return a.getFeaturedAutomationIds().includes(e.id)}function y(e){return i.getIntegrationIds(e).map(e=>{let t=u.getMarketplaceEntryById(e,c.default);return{id:e,entry:t,mcpInstallable:!!t&&u.isMcpInstallableEntry(t)}})}function b(e,t,n){let r=n.trim().toLowerCase();return r?[e.name,e.category,e.description,i.getAutomationLaunchPrompt(e),...t.flatMap(({entry:e,id:t})=>e?[e.name,t,...e.keywords??[]]:[t])].join(` `).toLowerCase().includes(r):!0}function x(e,r,i,a){let s=e.map(({id:e,entry:i,mcpInstallable:s})=>{let c=!!i&&u.findInstalledEntryMatch(i,r),d=i?.name??e;return{id:`integration-${e}`,node:(0,g.jsxs)(`span`,{className:n.cn(o.extensionModuleCardPillClassName,`gap-1`),children:[(0,g.jsx)(l.McpLogoBadge,{entry:i,size:`xs`}),d,c?(0,g.jsx)(`span`,{className:`text-white`,children:a(t.I18nKey.RECOMMENDED_AUTOMATIONS$CONNECTED)}):i?s?null:(0,g.jsx)(`span`,{className:`text-tertiary-alt`,"data-testid":`automation-integration-external-${e}`,children:a(t.I18nKey.RECOMMENDED_AUTOMATIONS$EXTERNAL_SETUP)}):(0,g.jsx)(`span`,{className:`text-tertiary-alt`,"data-testid":`recommended-automation-integration-${e}`,children:a(t.I18nKey.RECOMMENDED_AUTOMATIONS$UNKNOWN_SETUP)})]})}});return i>0&&s.push({id:`missing-connect`,node:(0,g.jsx)(`span`,{className:o.extensionModuleCardPillClassName,children:a(t.I18nKey.RECOMMENDED_AUTOMATIONS$MISSING_CONNECT,{count:i})})}),s}function S({automation:e,integrations:t,size:n,testId:r}){let a=i.getAutomationIcon(e);return a?(0,g.jsx)(l.McpLogoBadge,{entry:null,size:n,testId:r,fallback:(0,h.createElement)(a,{className:`h-5 w-5`,strokeWidth:2.25})}):(0,g.jsx)(p.McpLogoStackBadge,{entries:t.flatMap(({entry:e})=>e?[e]:[]),testId:r})}function C({automations:e,installedServers:t,onSelect:r,translate:i}){return(0,g.jsx)(`div`,{className:n.cn(`mt-3`,o.extensionModuleCardGridClassName),children:e.map(e=>{let a=y(e),c=a.filter(({entry:e,mcpInstallable:n})=>!!e&&n&&!u.findInstalledEntryMatch(e,t)).length;return(0,g.jsx)(`button`,{type:`button`,"data-testid":`recommended-automation-card-${e.id}`,onClick:()=>r(e),className:n.cn(`flex min-w-0 overflow-hidden p-4 text-left`,o.extensionModuleCardSurfaceClassName,o.extensionModuleCardInteractiveClassName),children:(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-3`,children:[(0,g.jsx)(S,{automation:e,integrations:a,size:`md`,testId:`recommended-automation-icon-${e.id}`}),(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,g.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsx)(`h3`,{className:`truncate text-sm font-semibold text-white`,children:e.name}),(0,g.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-tertiary-alt`,children:e.category})]}),(0,g.jsx)(m.CirclePlusBadge,{testId:`recommended-automation-plus-${e.id}`})]}),(0,g.jsx)(`p`,{className:`line-clamp-2 text-xs leading-relaxed text-tertiary-light`,children:e.description}),(0,g.jsx)(s.SkillCardPillRow,{pills:x(a,t,c,i),testId:`recommended-automation-pills-${e.id}`})]})]})},e.id)})})}function w({backendKind:r,installedServers:i,query:a=``,onSelect:s,scrollableGrid:c=!1}){let{t:l}=e.useTranslation(`openhands`),u=_.filter(e=>b(e,y(e),a));if(u.length===0)return null;let f=u.filter(v),p=u.filter(e=>!v(e));return(0,g.jsx)(`section`,{"data-testid":`recommended-automations-section`,className:n.cn(c&&`flex min-h-0 flex-1 flex-col`),children:(0,g.jsxs)(`div`,{"data-testid":c?`recommended-automations-scroll-area`:void 0,className:n.cn(`mt-3`,o.extensionModuleCardGridContainerClassName,c&&`min-h-0 flex-1 overflow-y-auto custom-scrollbar-always`),children:[f.length>0&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`flex items-center`,children:[(0,g.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:l(t.I18nKey.RECOMMENDED_AUTOMATIONS$SECTION_TITLE)}),(0,g.jsx)(d.StatusBadge,{count:f.length})]}),(0,g.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:l(t.I18nKey.RECOMMENDED_AUTOMATIONS$SECTION_DESCRIPTION)}),(0,g.jsx)(C,{automations:f,installedServers:i,onSelect:s,translate:l})]}),p.length>0&&(0,g.jsxs)(`section`,{"data-testid":`recommended-automations-beta-section`,className:n.cn(f.length>0&&`mt-8`),children:[(0,g.jsxs)(`div`,{"data-testid":`recommended-automations-beta-heading`,className:`flex items-center`,children:[(0,g.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:l(t.I18nKey.RECOMMENDED_AUTOMATIONS$BETA_LABEL)}),(0,g.jsx)(d.StatusBadge,{count:p.length})]}),(0,g.jsx)(C,{automations:p,installedServers:i,onSelect:s,translate:l})]})]})})}exports.RecommendedAutomationsSection=w;
2
2
  //# sourceMappingURL=recommended-automations-section.cjs.map
@@ -1,8 +1,8 @@
1
1
  import { useTranslation as e } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
2
2
  import { I18nKey as t } from "../../../i18n/declaration.js";
3
3
  import { cn as n } from "../../../utils/utils.js";
4
- import { getAutomationIcon as r, getAutomationLaunchPrompt as i, getIntegrationIds as a } from "../../../utils/automation-catalog.js";
5
- import o from "../../../node_modules/@openhands/extensions/automations/index.js";
4
+ import r from "../../../node_modules/@openhands/extensions/automations/index.js";
5
+ import { getAutomationIcon as i, getAutomationLaunchPrompt as a, getIntegrationIds as o } from "../../../utils/automation-catalog.js";
6
6
  import { getFeaturedAutomationIds as s } from "../../../manifests/automation-interface.js";
7
7
  import { extensionModuleCardGridClassName as c, extensionModuleCardGridContainerClassName as l, extensionModuleCardInteractiveClassName as u, extensionModuleCardPillClassName as d, extensionModuleCardSurfaceClassName as f } from "../../../utils/extension-module-card-classes.js";
8
8
  import { SkillCardPillRow as p } from "../skills/skill-card-pill-row.js";
@@ -16,12 +16,12 @@ import { CirclePlusBadge as S } from "../../shared/buttons/circle-plus-check-tog
16
16
  import { createElement as C } from "react";
17
17
  import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
18
18
  //#region src/components/features/automations/recommended-automations-section.tsx
19
- var D = b(o);
19
+ var D = b(r);
20
20
  function O(e) {
21
21
  return s().includes(e.id);
22
22
  }
23
23
  function k(e) {
24
- return a(e).map((e) => {
24
+ return o(e).map((e) => {
25
25
  let t = _(e, m);
26
26
  return {
27
27
  id: e,
@@ -36,7 +36,7 @@ function A(e, t, n) {
36
36
  e.name,
37
37
  e.category,
38
38
  e.description,
39
- i(e),
39
+ a(e),
40
40
  ...t.flatMap(({ entry: e, id: t }) => e ? [
41
41
  e.name,
42
42
  t,
@@ -81,19 +81,19 @@ function j(e, r, i, a) {
81
81
  })
82
82
  }), o;
83
83
  }
84
- function M({ automation: e, integrations: t, size: n, testId: i }) {
85
- let a = r(e);
84
+ function M({ automation: e, integrations: t, size: n, testId: r }) {
85
+ let a = i(e);
86
86
  return a ? /* @__PURE__ */ T(h, {
87
87
  entry: null,
88
88
  size: n,
89
- testId: i,
89
+ testId: r,
90
90
  fallback: C(a, {
91
91
  className: "h-5 w-5",
92
92
  strokeWidth: 2.25
93
93
  })
94
94
  }) : /* @__PURE__ */ T(x, {
95
95
  entries: t.flatMap(({ entry: e }) => e ? [e] : []),
96
- testId: i
96
+ testId: r
97
97
  });
98
98
  }
99
99
  function N({ automations: e, installedServers: t, onSelect: r, translate: i }) {
@@ -1,2 +1,2 @@
1
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),n=require("../../../i18n/declaration.cjs"),r=require("../../../node_modules/lucide-react/dist/esm/icons/plus.cjs"),i=require("../../../node_modules/lucide-react/dist/esm/icons/settings.cjs"),a=require("../../../utils/utils.cjs"),o=require("../../../stores/conversation-store.cjs"),s=require("../../../api/agent-server-config.cjs"),ee=require("../../../api/backend-registry/active-store.cjs"),c=require("../../../contexts/active-backend-context.cjs"),l=require("../../../utils/form-control-classes.cjs"),te=require("../../shared/buttons/styled-tooltip.cjs"),u=require("../../../utils/dropdown-classes.cjs"),d=require("../../shared/navigation-link.cjs"),f=require("../../../hooks/query/use-cloud-organizations.cjs"),p=require("../../../hooks/query/use-cloud-current-user-id.cjs"),m=require("../../../ui/dropdown/dropdown.cjs"),h=require("../../../hooks/query/use-backends-health.cjs"),g=require("./environment-switch-store.cjs"),_=require("./backend-status-dot.cjs"),ne=require("./add-backend-modal.cjs"),re=require("./manage-backends-modal.cjs");let v=require("react");v=e.__toESM(v,1);let y=require("react/jsx-runtime"),b=require("react-router");var x=`::`;function S(e,t){return t?`${e}${x}${t}`:e}function ie(e){let[t,n]=e.split(x);return{backendId:t,orgId:n??null}}function C(e){return(0,y.jsx)(_.BackendStatusDot,{isConnected:e?.isConnected??null})}function ae(){return(0,y.jsx)(_.BackendStatusDot,{isConnected:`unavailable`})}function w(e,t,n,r,i){let a=[],o=e.filter(e=>e.kind===`local`),s=e.filter(e=>e.kind===`cloud`);for(let e of o)a.push({value:S(e.id,null),label:e.name,prefix:C(i[e.id])});for(let e of s){let o=n[e.id],s=C(i[e.id]);if(!o||o.orgs.length===0)a.push({value:S(e.id,null),label:e.name,prefix:s});else{let n=r[e.id]?.userId??null;for(let r of o.orgs){let i=n&&n===r.id?t:r.name;a.push({value:S(e.id,r.id),label:`${e.name} – ${i}`,prefix:s})}}}return a}function T({openUpward:e=!1,hideTrigger:_=!1,defaultOpen:x=!1,onSelectOption:T,onOpenAddBackend:E,onOpenManageBackends:D,sidebarCollapsed:oe=!1}={}){let{t:O}=t.useTranslation(`openhands`),{backends:k,active:A,setActive:j}=c.useActiveBackendContext(),M=f.useAllCloudOrganizations(),N=p.useCloudCurrentUserId(),P=h.useBackendsHealth(k),F=(0,b.useNavigate)(),se=(0,b.useMatch)(`/settings`),ce=(0,b.useMatch)(`/settings/*`),I=(0,b.useMatch)(`/conversations/:conversationId`),L=(0,b.useMatch)(`/automations/:automationId`),[R,z]=v.default.useState(!1),[B,V]=v.default.useState(!1),H=O(n.I18nKey.BACKEND$PERSONAL_WORKSPACE),U=v.default.useMemo(()=>w(k,H,M,N,P),[k,H,M,N,P]),W=ee.isNoBackend(A.backend),G=O(n.I18nKey.BACKEND$NO_BACKEND_AVAILABLE),K=S(A.backend.id,A.orgId),q=W?void 0:U.find(e=>e.value===K),J=!!(se||ce),Y=O(n.I18nKey.SIDEBAR$SETTINGS),le=o.useConversationStore(e=>e.isRightPanelShown),ue=!oe||I&&le?`top`:`left`,de=Object.values(M).some(e=>e.isLoading);v.default.useEffect(()=>{if(W||A.backend.kind!==`cloud`||A.orgId)return;let{backend:e}=A,t=M[e.id];if(!t||t.orgs.length===0)return;let n=t.currentOrgId?t.orgs.find(e=>e.id===t.currentOrgId):void 0,r=N[e.id]?.userId??null,i=r?t.orgs.find(e=>e.id===r):void 0,a=n??i??t.orgs[0];a&&j(e.id,a.id)},[A,M,N,j,W]);let X=v.default.useCallback(()=>{if(E){E(),T?.();return}z(!0)},[E,T]),Z=v.default.useCallback(()=>{if(D){D(),T?.();return}V(!0)},[D,T]),Q=s.getLockedCloudHost()!==null,$=v.default.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),fe=v.default.useCallback(e=>{$(e),X()},[X,$]),pe=v.default.useCallback(e=>{$(e),X()},[X,$]),me=v.default.useCallback(e=>{$(e),Z()},[Z,$]),he=v.default.useCallback(e=>{$(e),Z()},[Z,$]),ge=(0,y.jsxs)(`div`,{className:u.dropdownMenuListClassName,children:[Q?null:(0,y.jsxs)(`button`,{type:`button`,"data-testid":`add-backend-menu-item`,onMouseDown:$,onTouchStart:$,onTouchEnd:pe,onClick:fe,className:a.cn(u.dropdownFooterActionClassName,`cursor-pointer rounded-md`),children:[(0,y.jsx)(`span`,{className:u.dropdownMenuRowIconWrapperClassName,"aria-hidden":!0,children:(0,y.jsx)(r.Plus,{width:16,height:16})}),O(n.I18nKey.BACKEND$ADD)]}),(0,y.jsxs)(`button`,{type:`button`,"data-testid":`manage-backends-menu-item`,onMouseDown:$,onTouchStart:$,onTouchEnd:he,onClick:me,className:a.cn(u.dropdownFooterActionClassName,`cursor-pointer rounded-md`),children:[(0,y.jsx)(`span`,{className:u.dropdownMenuRowIconWrapperClassName,"aria-hidden":!0,children:(0,y.jsx)(i.Settings,{width:16,height:16})}),O(Q?n.I18nKey.BACKEND$RECONNECT_CLOUD:n.I18nKey.BACKEND$MANAGE)]})]}),_e=v.default.useCallback(async e=>{if(e===K)return;let{backendId:t,orgId:n}=ie(e),r=k.find(e=>e.id===t);r&&(g.triggerEnvironmentSwitch(U.find(t=>t.value===e)?.label??r.name),await new Promise(e=>{setTimeout(e,400)}),I?F(`/conversations`):L&&F(`/automations`),j(r.id,n),T?.())},[K,k,I,L,F,U,j,O,T]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2 w-full`,children:[(0,y.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,y.jsx)(m.Dropdown,{testId:`backend-selector`,defaultValue:q??{value:K,label:W?G:A.backend.name,prefix:W?ae():C(P[A.backend.id])},footer:ge,openUpward:e,hideTrigger:_,defaultOpen:x,openOnHover:!_,onChange:e=>{e&&_e(e.value)},placeholder:W?G:A.backend.name,loading:de,options:U,className:`h-10 px-2 py-0 bg-transparent border-transparent hover:bg-[var(--oh-surface-raised)] focus-within:bg-[var(--oh-surface-raised)] focus-within:border-transparent focus-within:ring-0`},`${K}-${q?.label??``}`)}),_?null:(0,y.jsx)(te.StyledTooltip,{content:Y,placement:ue,offset:10,children:(0,y.jsx)(d.NavigationLink,{to:`/settings`,"data-testid":`backend-selector-settings-link`,"data-active":J,"aria-label":Y,className:J?a.cn(`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md bg-tertiary text-white font-normal cursor-pointer`,l.formControlTransitionClassName):a.cn(`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)] cursor-pointer`,l.formControlTransitionClassName),children:(0,y.jsx)(i.Settings,{width:16,height:16})})})]}),R?(0,y.jsx)(ne.AddBackendModal,{onClose:()=>z(!1)}):null,B?(0,y.jsx)(re.ManageBackendsModal,{onClose:()=>V(!1)}):null]})}exports.BackendSelector=T;
1
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),n=require("../../../i18n/declaration.cjs"),r=require("../../../node_modules/lucide-react/dist/esm/icons/plus.cjs"),i=require("../../../node_modules/lucide-react/dist/esm/icons/settings.cjs"),a=require("../../../utils/utils.cjs"),o=require("../../../stores/conversation-store.cjs"),s=require("../../../api/agent-server-config.cjs"),ee=require("../../../api/backend-registry/active-store.cjs"),c=require("../../../contexts/active-backend-context.cjs"),l=require("../../shared/buttons/styled-tooltip.cjs"),u=require("../../../utils/form-control-classes.cjs"),d=require("../../../utils/dropdown-classes.cjs"),f=require("../../shared/navigation-link.cjs"),te=require("../../../hooks/query/use-cloud-organizations.cjs"),ne=require("../../../hooks/query/use-cloud-current-user-id.cjs"),p=require("../../../ui/dropdown/dropdown.cjs"),m=require("../../../hooks/query/use-backends-health.cjs"),h=require("./environment-switch-store.cjs"),g=require("./backend-status-dot.cjs"),_=require("./add-backend-modal.cjs"),re=require("./manage-backends-modal.cjs");let v=require("react");v=e.__toESM(v,1);let y=require("react/jsx-runtime"),b=require("react-router");var x=`::`;function S(e,t){return t?`${e}${x}${t}`:e}function ie(e){let[t,n]=e.split(x);return{backendId:t,orgId:n??null}}function C(e){return(0,y.jsx)(g.BackendStatusDot,{isConnected:e?.isConnected??null})}function ae(){return(0,y.jsx)(g.BackendStatusDot,{isConnected:`unavailable`})}function oe(e,t,n,r,i){let a=[],o=e.filter(e=>e.kind===`local`),s=e.filter(e=>e.kind===`cloud`);for(let e of o)a.push({value:S(e.id,null),label:e.name,prefix:C(i[e.id])});for(let e of s){let o=n[e.id],s=C(i[e.id]);if(!o||o.orgs.length===0)a.push({value:S(e.id,null),label:e.name,prefix:s});else{let n=r[e.id]?.userId??null;for(let r of o.orgs){let i=n&&n===r.id?t:r.name;a.push({value:S(e.id,r.id),label:`${e.name} – ${i}`,prefix:s})}}}return a}function w({openUpward:e=!1,hideTrigger:g=!1,defaultOpen:x=!1,onSelectOption:w,onOpenAddBackend:T,onOpenManageBackends:E,sidebarCollapsed:D=!1}={}){let{t:O}=t.useTranslation(`openhands`),{backends:k,active:A,setActive:j}=c.useActiveBackendContext(),M=te.useAllCloudOrganizations(),N=ne.useCloudCurrentUserId(),P=m.useBackendsHealth(k),F=(0,b.useNavigate)(),se=(0,b.useMatch)(`/settings`),ce=(0,b.useMatch)(`/settings/*`),I=(0,b.useMatch)(`/conversations/:conversationId`),L=(0,b.useMatch)(`/automations/:automationId`),[R,z]=v.default.useState(!1),[B,V]=v.default.useState(!1),H=O(n.I18nKey.BACKEND$PERSONAL_WORKSPACE),U=v.default.useMemo(()=>oe(k,H,M,N,P),[k,H,M,N,P]),W=ee.isNoBackend(A.backend),G=O(n.I18nKey.BACKEND$NO_BACKEND_AVAILABLE),K=S(A.backend.id,A.orgId),q=W?void 0:U.find(e=>e.value===K),J=!!(se||ce),Y=O(n.I18nKey.SIDEBAR$SETTINGS),le=o.useConversationStore(e=>e.isRightPanelShown),ue=!D||I&&le?`top`:`left`,de=Object.values(M).some(e=>e.isLoading);v.default.useEffect(()=>{if(W||A.backend.kind!==`cloud`||A.orgId)return;let{backend:e}=A,t=M[e.id];if(!t||t.orgs.length===0)return;let n=t.currentOrgId?t.orgs.find(e=>e.id===t.currentOrgId):void 0,r=N[e.id]?.userId??null,i=r?t.orgs.find(e=>e.id===r):void 0,a=n??i??t.orgs[0];a&&j(e.id,a.id)},[A,M,N,j,W]);let X=v.default.useCallback(()=>{if(T){T(),w?.();return}z(!0)},[T,w]),Z=v.default.useCallback(()=>{if(E){E(),w?.();return}V(!0)},[E,w]),Q=s.getLockedCloudHost()!==null,fe=Q&&A.backend.authMode===`cookie`,$=v.default.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),pe=v.default.useCallback(e=>{$(e),X()},[X,$]),me=v.default.useCallback(e=>{$(e),X()},[X,$]),he=v.default.useCallback(e=>{$(e),Z()},[Z,$]),ge=v.default.useCallback(e=>{$(e),Z()},[Z,$]),_e=fe?void 0:(0,y.jsxs)(`div`,{className:d.dropdownMenuListClassName,children:[Q?null:(0,y.jsxs)(`button`,{type:`button`,"data-testid":`add-backend-menu-item`,onMouseDown:$,onTouchStart:$,onTouchEnd:me,onClick:pe,className:a.cn(d.dropdownFooterActionClassName,`cursor-pointer rounded-md`),children:[(0,y.jsx)(`span`,{className:d.dropdownMenuRowIconWrapperClassName,"aria-hidden":!0,children:(0,y.jsx)(r.Plus,{width:16,height:16})}),O(n.I18nKey.BACKEND$ADD)]}),(0,y.jsxs)(`button`,{type:`button`,"data-testid":`manage-backends-menu-item`,onMouseDown:$,onTouchStart:$,onTouchEnd:ge,onClick:he,className:a.cn(d.dropdownFooterActionClassName,`cursor-pointer rounded-md`),children:[(0,y.jsx)(`span`,{className:d.dropdownMenuRowIconWrapperClassName,"aria-hidden":!0,children:(0,y.jsx)(i.Settings,{width:16,height:16})}),O(Q?n.I18nKey.BACKEND$RECONNECT_CLOUD:n.I18nKey.BACKEND$MANAGE)]})]}),ve=v.default.useCallback(async e=>{if(e===K)return;let{backendId:t,orgId:n}=ie(e),r=k.find(e=>e.id===t);r&&(h.triggerEnvironmentSwitch(U.find(t=>t.value===e)?.label??r.name),await new Promise(e=>{setTimeout(e,400)}),I?F(`/conversations`):L&&F(`/automations`),j(r.id,n),w?.())},[K,k,I,L,F,U,j,O,w]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2 w-full`,children:[(0,y.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,y.jsx)(p.Dropdown,{testId:`backend-selector`,defaultValue:q??{value:K,label:W?G:A.backend.name,prefix:W?ae():C(P[A.backend.id])},footer:_e,openUpward:e,hideTrigger:g,defaultOpen:x,openOnHover:!g,onChange:e=>{e&&ve(e.value)},placeholder:W?G:A.backend.name,loading:de,options:U,className:`h-10 px-2 py-0 bg-transparent border-transparent hover:bg-[var(--oh-surface-raised)] focus-within:bg-[var(--oh-surface-raised)] focus-within:border-transparent focus-within:ring-0`},`${K}-${q?.label??``}`)}),g?null:(0,y.jsx)(l.StyledTooltip,{content:Y,placement:ue,offset:10,children:A.backend.kind===`cloud`?(0,y.jsx)(`a`,{href:`${A.backend.host.replace(/\/+$/,``)}/settings`,target:`_blank`,rel:`noopener noreferrer`,"data-testid":`backend-selector-settings-link`,"aria-label":Y,className:a.cn(`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)] cursor-pointer`,u.formControlTransitionClassName),children:(0,y.jsx)(i.Settings,{width:16,height:16})}):(0,y.jsx)(f.NavigationLink,{to:`/settings`,"data-testid":`backend-selector-settings-link`,"data-active":J,"aria-label":Y,className:J?a.cn(`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md bg-tertiary text-white font-normal cursor-pointer`,u.formControlTransitionClassName):a.cn(`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)] cursor-pointer`,u.formControlTransitionClassName),children:(0,y.jsx)(i.Settings,{width:16,height:16})})})]}),R?(0,y.jsx)(_.AddBackendModal,{onClose:()=>z(!1)}):null,B?(0,y.jsx)(re.ManageBackendsModal,{onClose:()=>V(!1)}):null]})}exports.BackendSelector=w;
2
2
  //# sourceMappingURL=backend-selector.cjs.map