@openhands/agent-canvas 1.5.1 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (720) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{Trans-DqF_OEZB.js → Trans-52HCczKK.js} +1 -1
  4. package/build/assets/{acp-providers-DerAmTyY.js → acp-providers-xACMK9ZP.js} +1 -1
  5. package/build/assets/{active-backend-context-B8rMv0X9.js → active-backend-context-Cd1qcZsb.js} +1 -1
  6. package/build/assets/{add-backend-modal-CxC7BNEc.js → add-backend-modal-5chsfln3.js} +1 -1
  7. package/build/assets/{agent-profiles-settings-BJb8YXR1.js → agent-profiles-settings-BWK4H3kR.js} +1 -1
  8. package/build/assets/agent-server-compatibility-DMY0CihN.js +1 -0
  9. package/build/assets/agent-server-conversation-service.api-CI5-xmIX.js +41 -0
  10. package/build/assets/agent-settings-CMd8-O4f.js +2 -0
  11. package/build/assets/agent-settings-CdrhQJXX.js +1 -0
  12. package/build/assets/{alert-banner-Dh51WURQ.js → alert-banner-CLfWuIAX.js} +1 -1
  13. package/build/assets/api-key-entry-screen-Cc3aC7DZ.js +1 -0
  14. package/build/assets/app-settings-B-DQcBoB.js +1 -0
  15. package/build/assets/{automation-detail-CZsu2CoM.js → automation-detail-BgxBIpyK.js} +2 -2
  16. package/build/assets/automation-export-Dbur8OHa.js +2 -0
  17. package/build/assets/automations-list-BWfjizlp.js +1 -0
  18. package/build/assets/{back-nav-button-DVknCcSP.js → back-nav-button-CaKvsD1E.js} +1 -1
  19. package/build/assets/backend-form-modal-YcfpuBZo.js +1 -0
  20. package/build/assets/{backend-synced-settings-badge-BSfN0AZA.js → backend-synced-settings-badge-BellMmgC.js} +1 -1
  21. package/build/assets/{base-modal-CIF_785P.js → base-modal-Cw7enAHz.js} +1 -1
  22. package/build/assets/{brand-button-B1izLAdR.js → brand-button-BulEFHr3.js} +1 -1
  23. package/build/assets/{browser-DKaeq_sT.js → browser-DfVgUREb.js} +2 -2
  24. package/build/assets/browser-store-CBqI3tNR.js +1 -0
  25. package/build/assets/{browser-tab-qb_ftCxW.js → browser-tab-CmIKQB7S.js} +1 -1
  26. package/build/assets/chat-send-button-BchSSwuD.js +1 -0
  27. package/build/assets/circle-check-BXbQ5nEH.js +1 -0
  28. package/build/assets/{circle-plus-check-toggle-DoFIjVE0.js → circle-plus-check-toggle-BhpPjkh9.js} +1 -1
  29. package/build/assets/client-source-DAUgyJsi.js +1 -0
  30. package/build/assets/cloud-funnel-analytics-B5OeWh4y.js +1 -0
  31. package/build/assets/{color-themes-CHizm1xF.js → color-themes-QKMSVfDU.js} +1 -1
  32. package/build/assets/{combobox-caret-CxZpqoSR.js → combobox-caret-kNZtp53R.js} +1 -1
  33. package/build/assets/{command-menu-oTvKDU3Y.js → command-menu-tUsn23zy.js} +1 -1
  34. package/build/assets/{command-store-D8J5LMW1.js → command-store-B0hrIWMN.js} +1 -1
  35. package/build/assets/{condenser-settings-BGlWn93P.js → condenser-settings-BBizzfIH.js} +1 -1
  36. package/build/assets/{confirmation-modal-DGBWM2Ls.js → confirmation-modal-108xng7X.js} +1 -1
  37. package/build/assets/{context-menu-list-item-6psNyl7X.js → context-menu-list-item-BbKfFuN1.js} +1 -1
  38. package/build/assets/conversation-CTzSrLMq.js +1 -0
  39. package/build/assets/conversation-CgcXNb-Z.js +90 -0
  40. package/build/assets/conversation-panel-bscjGQda.js +1 -0
  41. package/build/assets/{conversation-service.api-_f9GlIEi.js → conversation-service.api-DbBvscJA.js} +1 -1
  42. package/build/assets/conversation-state-store-C5GagZHT.js +1 -0
  43. package/build/assets/{conversation-store-LptbOvKa.js → conversation-store-CyVqoa0d.js} +1 -1
  44. package/build/assets/{conversation-tab-empty-state-CNUmIms2.js → conversation-tab-empty-state-2KYlk5Bh.js} +1 -1
  45. package/build/assets/{copy-to-clipboard-button-CFzH_NOX.js → copy-to-clipboard-button-C54YRPMg.js} +1 -1
  46. package/build/assets/declaration-_yumYLEx.js +1 -0
  47. package/build/assets/{device-verify-WBSjJBLH.js → device-verify-D6FW_KZq.js} +1 -1
  48. package/build/assets/{dropdown-classes-D3wMJlXT.js → dropdown-classes-9uONlOg1.js} +1 -1
  49. package/build/assets/{ellipsis-button-CbNnHlIq.js → ellipsis-button-CoaUrKmQ.js} +1 -1
  50. package/build/assets/{entry.client-DNlPGxsu.js → entry.client-BJSVzw7V.js} +2 -2
  51. package/build/assets/{enum-filter-dropdown-JLYv1t8L.js → enum-filter-dropdown-qQzyjk_q.js} +1 -1
  52. package/build/assets/{environment-switch-overlay-B1PFO8P8.js → environment-switch-overlay-XRWCClLu.js} +1 -1
  53. package/build/assets/extensions-hub-DUp9sWQY.js +1 -0
  54. package/build/assets/extensions-navigation-DmkftjAx.js +1 -0
  55. package/build/assets/file-tUAzhmJ3.js +1 -0
  56. package/build/assets/files-tab-GV5hwiIM.js +1 -0
  57. package/build/assets/files-tab-store-DehyITNC.js +1 -0
  58. package/build/assets/{form-control-classes-CbdN5aO3.js → form-control-classes-BPUnoYyg.js} +1 -1
  59. package/build/assets/git-provider-icon-DDkru3b_.js +1 -0
  60. package/build/assets/highlighted-source-view-CYkPZUxr.js +1 -0
  61. package/build/assets/home-C53WekZ2.js +1 -0
  62. package/build/assets/home-EAwq8ah2.js +1 -0
  63. package/build/assets/index-home-kBdZGKtu.js +1 -0
  64. package/build/assets/install-server-modal-DYk4VP3-.js +1 -0
  65. package/build/assets/{launch-CAGavYl-.js → launch-CIecOy_y.js} +1 -1
  66. package/build/assets/lesson-plan-BSEUwflx.js +4 -0
  67. package/build/assets/llm-not-configured-banner-C8uv1PHT.js +27 -0
  68. package/build/assets/llm-settings-0Bb97NCk.js +1 -0
  69. package/build/assets/llm-settings-D4toJ90k.js +1 -0
  70. package/build/assets/{llm-subscription-service-Casyzgn1.js → llm-subscription-service-BPRw3u3H.js} +1 -1
  71. package/build/assets/{loading-spinner-BcdnT0mN.js → loading-spinner-BCInDEXB.js} +1 -1
  72. package/build/assets/manage-backends-modal-Bon32JYr.js +1 -0
  73. package/build/assets/manifest-ec000ae3.js +1 -0
  74. package/build/assets/markdown-renderer-BlaJOAI2.js +2 -0
  75. package/build/assets/mcp-CFIpOkn2.js +9 -0
  76. package/build/assets/messages-eRPeR4pW.js +40 -0
  77. package/build/assets/{modal-body-Cc2zp0xb.js → modal-body-Bg9UCeoV.js} +1 -1
  78. package/build/assets/{modal-classes-3qT9Ap7Q.js → modal-classes-H1KbJkeC.js} +1 -1
  79. package/build/assets/{modal-close-button-BcIBUdSq.js → modal-close-button-BMLYvo0C.js} +1 -1
  80. package/build/assets/{model-selector-DJrMrFAr.js → model-selector-BqX2RvEr.js} +1 -1
  81. package/build/assets/{navigation-link-D8hfwvxI.js → navigation-link-DoJzTCEz.js} +1 -1
  82. package/build/assets/onboarding-3KO4qE6R.js +1 -0
  83. package/build/assets/onboarding-modal-D4vqkJeT.js +1 -0
  84. package/build/assets/{organization-service.api-vrRNwOma.js → organization-service.api-CvfQugOt.js} +1 -1
  85. package/build/assets/{path-utils-PNfCKQDV.js → path-utils-DRgexxnX.js} +1 -1
  86. package/build/assets/{plan-components-BdZXPyZU.js → plan-components-qkMiGs_-.js} +1 -1
  87. package/build/assets/{planner-tab-ByOw1he8.js → planner-tab-ZrjiirRr.js} +1 -1
  88. package/build/assets/{plugins-management-service-B75jyC56.js → plugins-management-service-9qT-r_37.js} +1 -1
  89. package/build/assets/plus-CzE1b-wl.js +1 -0
  90. package/build/assets/{profiles-service.api-BQTklD5D.js → profiles-service.api-CRVlrQpT.js} +1 -1
  91. package/build/assets/{providers-DfTB2gPd.js → providers-C2DFGBrf.js} +1 -1
  92. package/build/assets/{proxy-B3tCGf0X.js → proxy-DnnDqkwn.js} +1 -1
  93. package/build/assets/puzzle-IHQnD54C.js +1 -0
  94. package/build/assets/recommended-automations-launcher-B97vgHuN.js +58 -0
  95. package/build/assets/refresh-cw-DxbAs3SK.js +1 -0
  96. package/build/assets/root-BbONavTg.css +1 -0
  97. package/build/assets/root-D01rpqZU.js +2 -0
  98. package/build/assets/root-layout-BiHbCIkS.js +2 -0
  99. package/build/assets/{runtime-waiting-state-CnyVhX4T.js → runtime-waiting-state-CbUV9txX.js} +1 -1
  100. package/build/assets/{schema-field-CUwk4wrQ.js → schema-field-B9-9Ta9u.js} +1 -1
  101. package/build/assets/sdk-section-page-DG1s25Pr.js +1 -0
  102. package/build/assets/{sdk-settings-schema-CLR01YIK.js → sdk-settings-schema-B42JFr5Y.js} +1 -1
  103. package/build/assets/{secrets-service-CvyPWJhg.js → secrets-service-DvyS6-mV.js} +1 -1
  104. package/build/assets/secrets-settings-CeSq6cQw.js +1 -0
  105. package/build/assets/{segmented-toggle-kzwZkLaj.js → segmented-toggle-DRVJBNy0.js} +1 -1
  106. package/build/assets/settings-Dzo0dJKM.js +1 -0
  107. package/build/assets/{settings-mQUckT0g.js → settings-HcwfqMjJ.js} +1 -1
  108. package/build/assets/{settings-dropdown-input-Dhx9ErGd.js → settings-dropdown-input-B6RL_mt0.js} +1 -1
  109. package/build/assets/settings-index-uAKHyijw.js +1 -0
  110. package/build/assets/{settings-input-BsgQWS5R.js → settings-input-ZoaAPNQh.js} +1 -1
  111. package/build/assets/{settings-list-classes-DSJJX99U.js → settings-list-classes-Dr8LgITi.js} +1 -1
  112. package/build/assets/settings-modal-BVX2G_IT.js +1 -0
  113. package/build/assets/{settings-service.api-DXk5TdeJ.js → settings-service.api-BY7ncxIz.js} +1 -1
  114. package/build/assets/{settings-switch-Bes8dIlV.js → settings-switch-DUlGnP0B.js} +1 -1
  115. package/build/assets/{settings-utils-DzCVfiR3.js → settings-utils-kWEEvcdv.js} +1 -1
  116. package/build/assets/shared-conversation-CV4Rtdz2.js +1 -0
  117. package/build/assets/{sidebar-layout-Bm7pa3Vk.js → sidebar-layout-BhGooCga.js} +1 -1
  118. package/build/assets/sidebar-mobile-menu-toggle-BntOJphE.js +1 -0
  119. package/build/assets/{sidebar-nav-link-CHqyFXwV.js → sidebar-nav-link-DkA1XWV8.js} +1 -1
  120. package/build/assets/{sidebar-store-uiUXBU1N.js → sidebar-store-CF3b12-m.js} +1 -1
  121. package/build/assets/{skill-card-pill-row-BPYKQ3IN.js → skill-card-pill-row-_gWe1Tws.js} +1 -1
  122. package/build/assets/skill-icon-badge-C-zbaXbD.js +1 -0
  123. package/build/assets/skills-plugins-BwoXKtrR.js +1 -0
  124. package/build/assets/skills-settings-Crq-fZSt.js +2 -0
  125. package/build/assets/{styled-tooltip-B14i_Uac.js → styled-tooltip-CdnCJ67u.js} +1 -1
  126. package/build/assets/syntax-highlighter-CZK2ab-O.js +1 -0
  127. package/build/assets/{task-list-tab-DyfgG4MC.js → task-list-tab-CONOO9iI.js} +1 -1
  128. package/build/assets/telemetry-CC32dJYW.js +2 -0
  129. package/build/assets/{terminal-DRXt2Lr4.js → terminal-CTkDpIU-.js} +1 -1
  130. package/build/assets/{toggle-switch-DX_k418f.js → toggle-switch-yVIzmJLM.js} +1 -1
  131. package/build/assets/{typography-CzfoD9DY.js → typography-BBVEW0un.js} +1 -1
  132. package/build/assets/{use-acp-credential-form-Bm8qXdlc.js → use-acp-credential-form-CIsp8hJe.js} +1 -1
  133. package/build/assets/use-activate-agent-profile-BfcTTJJG.js +1 -0
  134. package/build/assets/{use-active-agent-profile-hI-x-UBa.js → use-active-agent-profile-CCeFtmk9.js} +1 -1
  135. package/build/assets/{use-active-conversation-2qeez40F.js → use-active-conversation-Badxj8w4.js} +1 -1
  136. package/build/assets/{use-agent-profiles-0pr5bLS7.js → use-agent-profiles-BSWVN6hH.js} +1 -1
  137. package/build/assets/{use-agent-state-C6peDXUm.js → use-agent-state-BzRrhoPd.js} +1 -1
  138. package/build/assets/use-backends-health-BsZikyFW.js +1 -0
  139. package/build/assets/{use-can-manage-org-profiles-Ck_bsNbH.js → use-can-manage-org-profiles-Do6mYf6P.js} +1 -1
  140. package/build/assets/{use-cloud-current-user-id-DUCSxNjY.js → use-cloud-current-user-id-Cx3B_0-w.js} +1 -1
  141. package/build/assets/use-config-D9zUVw5b.js +1 -0
  142. package/build/assets/{use-create-conversation-r1JHfKO5.js → use-create-conversation-vvl0kvu7.js} +1 -1
  143. package/build/assets/{use-create-secret-Cf2N11d2.js → use-create-secret-CB7Dvd4s.js} +1 -1
  144. package/build/assets/use-event-store-BlpSUF7N.js +4 -0
  145. package/build/assets/{use-handle-plan-click-CsAW3FlH.js → use-handle-plan-click-DDZkew9p.js} +1 -1
  146. package/build/assets/use-is-creating-conversation-fxSzN778.js +1 -0
  147. package/build/assets/{use-launch-skill-in-chat-DJWEfVc5.js → use-launch-skill-in-chat-D6_n1fs3.js} +1 -1
  148. package/build/assets/use-llm-profiles-CNQm7HYS.js +1 -0
  149. package/build/assets/use-plugins-marketplace-CloojomS.js +1 -0
  150. package/build/assets/use-runtime-is-ready-Bx_4cfar.js +1 -0
  151. package/build/assets/{use-save-agent-profile-RqUGqTv6.js → use-save-agent-profile-Bj7N-1jS.js} +1 -1
  152. package/build/assets/{use-save-settings-Chvzeu2s.js → use-save-settings-BMsb2wk_.js} +1 -1
  153. package/build/assets/use-settings-B9XEmh7i.js +1 -0
  154. package/build/assets/use-settings-nav-items-BGfBS0yL.js +16 -0
  155. package/build/assets/{use-skills-xrVoKYrF.js → use-skills-CSRbvPle.js} +1 -1
  156. package/build/assets/{use-task-list-CfisapBW.js → use-task-list-CTIVLrQA.js} +1 -1
  157. package/build/assets/use-tracking-DjdCssvp.js +1 -0
  158. package/build/assets/{use-user-conversation-CnE4zhOA.js → use-user-conversation-BCpFn-Ei.js} +1 -1
  159. package/build/assets/{useTranslation-Cbf5AGg_.js → useTranslation-CHm_6BRr.js} +1 -1
  160. package/build/assets/{utils-DB9LsAzA.js → utils-CrRpzbM2.js} +1 -1
  161. package/build/assets/vendor-markdown-DzO4uO_0.js +37 -0
  162. package/build/assets/{vendor~browser-wXQ-WZEC.js → vendor~browser-Byfuq5J-.js} +1 -1
  163. package/build/assets/{vendor~browser-tab-CsMb-pta.js → vendor~browser-tab-BLk3qxhw.js} +1 -1
  164. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js} +2 -2
  165. package/build/assets/{vendor~files-tab-B-5fBohe.js → vendor~files-tab-XmnauIZI.js} +1 -1
  166. package/build/assets/{vendor~launch-_Km3J77E.js → vendor~launch-DeC8QhXQ.js} +1 -1
  167. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DDmLzCzm.js} +1 -1
  168. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-YrfJYTQw.js +1 -0
  169. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DoaS51iW.js} +123 -3
  170. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-DEYwoy8u.js} +1 -1
  171. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-DZHLw5Sr.js +1 -0
  172. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-UJ4BNDJP.js} +1 -1
  173. package/build/assets/{verification-settings-CfkrXoSa.js → verification-settings-uwOfc16F.js} +1 -1
  174. package/build/index.html +4 -4
  175. package/build/locales/ar/openhands.json +38 -4
  176. package/build/locales/ca/openhands.json +38 -4
  177. package/build/locales/de/openhands.json +38 -4
  178. package/build/locales/en/openhands.json +38 -4
  179. package/build/locales/es/openhands.json +38 -4
  180. package/build/locales/fr/openhands.json +38 -4
  181. package/build/locales/it/openhands.json +38 -4
  182. package/build/locales/ja/openhands.json +38 -4
  183. package/build/locales/ko-KR/openhands.json +38 -4
  184. package/build/locales/no/openhands.json +38 -4
  185. package/build/locales/pt/openhands.json +38 -4
  186. package/build/locales/tr/openhands.json +38 -4
  187. package/build/locales/uk/openhands.json +38 -4
  188. package/build/locales/zh-CN/openhands.json +38 -4
  189. package/build/locales/zh-TW/openhands.json +38 -4
  190. package/config/defaults.json +7 -3
  191. package/dist/api/agent-canvas-updates.cjs +2 -0
  192. package/dist/api/agent-canvas-updates.cjs.map +1 -0
  193. package/dist/api/agent-canvas-updates.d.ts +7 -0
  194. package/dist/api/agent-canvas-updates.js +19 -0
  195. package/dist/api/agent-canvas-updates.js.map +1 -0
  196. package/dist/api/agent-server-adapter.cjs +1 -1
  197. package/dist/api/agent-server-adapter.cjs.map +1 -1
  198. package/dist/api/agent-server-adapter.d.ts +3 -0
  199. package/dist/api/agent-server-adapter.js +1 -0
  200. package/dist/api/agent-server-adapter.js.map +1 -1
  201. package/dist/api/agent-server-compatibility.cjs +1 -1
  202. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  203. package/dist/api/agent-server-compatibility.d.ts +5 -0
  204. package/dist/api/agent-server-compatibility.js +24 -15
  205. package/dist/api/agent-server-compatibility.js.map +1 -1
  206. package/dist/api/agent-server-config.cjs +1 -1
  207. package/dist/api/agent-server-config.cjs.map +1 -1
  208. package/dist/api/agent-server-config.js +11 -8
  209. package/dist/api/agent-server-config.js.map +1 -1
  210. package/dist/api/automation-service/automation-service.api.cjs +2 -0
  211. package/dist/api/automation-service/automation-service.api.cjs.map +1 -0
  212. package/dist/api/automation-service/automation-service.api.d.ts +3 -0
  213. package/dist/api/automation-service/automation-service.api.js +283 -0
  214. package/dist/api/automation-service/automation-service.api.js.map +1 -0
  215. package/dist/api/client-source.cjs +1 -1
  216. package/dist/api/client-source.cjs.map +1 -1
  217. package/dist/api/client-source.d.ts +3 -0
  218. package/dist/api/client-source.js +4 -4
  219. package/dist/api/client-source.js.map +1 -1
  220. package/dist/api/cloud/settings-service.api.cjs.map +1 -1
  221. package/dist/api/cloud/settings-service.api.js.map +1 -1
  222. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  223. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  224. package/dist/api/conversation-service/agent-server-conversation-service.api.js +111 -109
  225. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  226. package/dist/api/mcp-health/mcp-health-store.cjs +2 -0
  227. package/dist/api/mcp-health/mcp-health-store.cjs.map +1 -0
  228. package/dist/api/mcp-health/mcp-health-store.d.ts +22 -0
  229. package/dist/api/mcp-health/mcp-health-store.js +45 -0
  230. package/dist/api/mcp-health/mcp-health-store.js.map +1 -0
  231. package/dist/api/mcp-health/probe-mcp-server-health.cjs +2 -0
  232. package/dist/api/mcp-health/probe-mcp-server-health.cjs.map +1 -0
  233. package/dist/api/mcp-health/probe-mcp-server-health.d.ts +31 -0
  234. package/dist/api/mcp-health/probe-mcp-server-health.js +57 -0
  235. package/dist/api/mcp-health/probe-mcp-server-health.js.map +1 -0
  236. package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
  237. package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
  238. package/dist/api/mcp-service/mcp-service.api.js +66 -46
  239. package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
  240. package/dist/api/plugins-management-service.cjs.map +1 -1
  241. package/dist/api/plugins-management-service.d.ts +6 -1
  242. package/dist/api/plugins-management-service.js.map +1 -1
  243. package/dist/api/plugins-service.d.ts +30 -2
  244. package/dist/api/secrets-service.cjs +1 -1
  245. package/dist/api/secrets-service.cjs.map +1 -1
  246. package/dist/api/secrets-service.d.ts +6 -6
  247. package/dist/api/secrets-service.js +8 -3
  248. package/dist/api/secrets-service.js.map +1 -1
  249. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  250. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  251. package/dist/api/settings-service/settings-service.api.d.ts +1 -1
  252. package/dist/api/settings-service/settings-service.api.js +1 -0
  253. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  254. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
  255. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
  256. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  257. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  258. package/dist/components/features/backends/backend-form-modal.d.ts +4 -1
  259. package/dist/components/features/backends/backend-form-modal.js +15 -16
  260. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  261. package/dist/components/features/backends/backend-selector.cjs +1 -1
  262. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  263. package/dist/components/features/backends/backend-selector.js +103 -102
  264. package/dist/components/features/backends/backend-selector.js.map +1 -1
  265. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  266. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  267. package/dist/components/features/backends/manage-backends-modal.js +85 -73
  268. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  269. package/dist/components/features/chat/chat-interface.cjs +2 -2
  270. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  271. package/dist/components/features/chat/chat-interface.js +131 -129
  272. package/dist/components/features/chat/chat-interface.js.map +1 -1
  273. package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
  274. package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
  275. package/dist/components/features/chat/skill-install-restart-banner.cjs +2 -0
  276. package/dist/components/features/chat/skill-install-restart-banner.cjs.map +1 -0
  277. package/dist/components/features/chat/skill-install-restart-banner.d.ts +11 -0
  278. package/dist/components/features/chat/skill-install-restart-banner.js +63 -0
  279. package/dist/components/features/chat/skill-install-restart-banner.js.map +1 -0
  280. package/dist/components/features/conversation/right-panel-toggle.cjs +1 -1
  281. package/dist/components/features/conversation/right-panel-toggle.cjs.map +1 -1
  282. package/dist/components/features/conversation/right-panel-toggle.js +1 -1
  283. package/dist/components/features/conversation/right-panel-toggle.js.map +1 -1
  284. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  285. package/dist/components/features/conversation-panel/conversation-panel.js +10 -10
  286. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  287. package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
  288. package/dist/components/features/mcp-page/custom-server-editor.js +78 -77
  289. package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
  290. package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
  291. package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
  292. package/dist/components/features/mcp-page/install-server-modal.d.ts +4 -1
  293. package/dist/components/features/mcp-page/install-server-modal.js +135 -136
  294. package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
  295. package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
  296. package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
  297. package/dist/components/features/mcp-page/installed-server-card.js +40 -34
  298. package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
  299. package/dist/components/features/mcp-page/mcp-server-health.cjs +2 -0
  300. package/dist/components/features/mcp-page/mcp-server-health.cjs.map +1 -0
  301. package/dist/components/features/mcp-page/mcp-server-health.d.ts +18 -0
  302. package/dist/components/features/mcp-page/mcp-server-health.js +117 -0
  303. package/dist/components/features/mcp-page/mcp-server-health.js.map +1 -0
  304. package/dist/components/features/plugins/build-plugins-view-model.d.ts +10 -1
  305. package/dist/components/features/plugins/plugin-files-section.d.ts +13 -0
  306. package/dist/components/features/settings/agent-canvas-update-card.cjs +2 -0
  307. package/dist/components/features/settings/agent-canvas-update-card.cjs.map +1 -0
  308. package/dist/components/features/settings/agent-canvas-update-card.d.ts +7 -0
  309. package/dist/components/features/settings/agent-canvas-update-card.js +170 -0
  310. package/dist/components/features/settings/agent-canvas-update-card.js.map +1 -0
  311. package/dist/components/features/settings/integrations-settings-link.cjs +2 -0
  312. package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -0
  313. package/dist/components/features/settings/integrations-settings-link.d.ts +5 -0
  314. package/dist/components/features/settings/integrations-settings-link.js +41 -0
  315. package/dist/components/features/settings/integrations-settings-link.js.map +1 -0
  316. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  317. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +1 -1
  318. package/dist/components/features/settings/settings-desktop-sidebar.cjs +1 -1
  319. package/dist/components/features/settings/settings-desktop-sidebar.cjs.map +1 -1
  320. package/dist/components/features/settings/settings-desktop-sidebar.js +31 -21
  321. package/dist/components/features/settings/settings-desktop-sidebar.js.map +1 -1
  322. package/dist/components/features/settings/settings-mobile-drawer.cjs +1 -1
  323. package/dist/components/features/settings/settings-mobile-drawer.cjs.map +1 -1
  324. package/dist/components/features/settings/settings-mobile-drawer.js +40 -30
  325. package/dist/components/features/settings/settings-mobile-drawer.js.map +1 -1
  326. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  327. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  328. package/dist/components/features/skills/extensions-navigation.js +54 -33
  329. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  330. package/dist/config/defaults.cjs +1 -1
  331. package/dist/config/defaults.cjs.map +1 -1
  332. package/dist/config/defaults.js +7 -3
  333. package/dist/config/defaults.js.map +1 -1
  334. package/dist/constants/acp-providers.cjs.map +1 -1
  335. package/dist/constants/acp-providers.js.map +1 -1
  336. package/dist/contexts/conversation-websocket-context.cjs +2 -2
  337. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  338. package/dist/contexts/conversation-websocket-context.js +169 -166
  339. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  340. package/dist/hooks/mutation/use-delete-llm-profile.cjs +1 -1
  341. package/dist/hooks/mutation/use-delete-llm-profile.js +1 -0
  342. package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
  343. package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
  344. package/dist/hooks/mutation/use-delete-mcp-server.js +8 -6
  345. package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
  346. package/dist/hooks/mutation/use-rename-llm-profile.cjs +1 -1
  347. package/dist/hooks/mutation/use-rename-llm-profile.js +1 -0
  348. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  349. package/dist/hooks/mutation/use-save-settings.js +3 -3
  350. package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
  351. package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
  352. package/dist/hooks/mutation/use-update-mcp-server.js +11 -9
  353. package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
  354. package/dist/hooks/query/query-keys.cjs +1 -1
  355. package/dist/hooks/query/query-keys.cjs.map +1 -1
  356. package/dist/hooks/query/query-keys.d.ts +4 -0
  357. package/dist/hooks/query/query-keys.js +2 -2
  358. package/dist/hooks/query/query-keys.js.map +1 -1
  359. package/dist/hooks/query/use-automation-sdk-version.cjs +2 -0
  360. package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -0
  361. package/dist/hooks/query/use-automation-sdk-version.d.ts +3 -0
  362. package/dist/hooks/query/use-automation-sdk-version.js +63 -0
  363. package/dist/hooks/query/use-automation-sdk-version.js.map +1 -0
  364. package/dist/hooks/query/use-latest-agent-canvas-version.cjs +2 -0
  365. package/dist/hooks/query/use-latest-agent-canvas-version.cjs.map +1 -0
  366. package/dist/hooks/query/use-latest-agent-canvas-version.d.ts +10 -0
  367. package/dist/hooks/query/use-latest-agent-canvas-version.js +19 -0
  368. package/dist/hooks/query/use-latest-agent-canvas-version.js.map +1 -0
  369. package/dist/hooks/query/use-plugin-file-content.d.ts +7 -0
  370. package/dist/hooks/query/use-resolved-workspaces.cjs +1 -1
  371. package/dist/hooks/query/use-resolved-workspaces.cjs.map +1 -1
  372. package/dist/hooks/query/use-resolved-workspaces.js +25 -26
  373. package/dist/hooks/query/use-resolved-workspaces.js.map +1 -1
  374. package/dist/hooks/query/use-search-subdirs.cjs +1 -1
  375. package/dist/hooks/query/use-search-subdirs.cjs.map +1 -1
  376. package/dist/hooks/query/use-search-subdirs.d.ts +5 -0
  377. package/dist/hooks/query/use-search-subdirs.js +16 -4
  378. package/dist/hooks/query/use-search-subdirs.js.map +1 -1
  379. package/dist/hooks/query/use-task-polling.cjs +1 -1
  380. package/dist/hooks/query/use-task-polling.cjs.map +1 -1
  381. package/dist/hooks/query/use-task-polling.d.ts +19 -3
  382. package/dist/hooks/query/use-task-polling.js +36 -35
  383. package/dist/hooks/query/use-task-polling.js.map +1 -1
  384. package/dist/hooks/use-device-flow.cjs +1 -1
  385. package/dist/hooks/use-device-flow.js +6 -6
  386. package/dist/hooks/use-llm-configured.cjs +1 -1
  387. package/dist/hooks/use-llm-configured.js +3 -3
  388. package/dist/hooks/use-mcp-server-health.cjs +2 -0
  389. package/dist/hooks/use-mcp-server-health.cjs.map +1 -0
  390. package/dist/hooks/use-mcp-server-health.d.ts +11 -0
  391. package/dist/hooks/use-mcp-server-health.js +18 -0
  392. package/dist/hooks/use-mcp-server-health.js.map +1 -0
  393. package/dist/hooks/use-skill-installs.cjs +2 -0
  394. package/dist/hooks/use-skill-installs.cjs.map +1 -0
  395. package/dist/hooks/use-skill-installs.d.ts +10 -0
  396. package/dist/hooks/use-skill-installs.js +21 -0
  397. package/dist/hooks/use-skill-installs.js.map +1 -0
  398. package/dist/hooks/use-tracking.cjs +1 -1
  399. package/dist/hooks/use-tracking.cjs.map +1 -1
  400. package/dist/hooks/use-tracking.d.ts +3 -3
  401. package/dist/hooks/use-tracking.js +67 -52
  402. package/dist/hooks/use-tracking.js.map +1 -1
  403. package/dist/i18n/declaration.cjs +1 -1
  404. package/dist/i18n/declaration.cjs.map +1 -1
  405. package/dist/i18n/declaration.d.ts +35 -1
  406. package/dist/i18n/declaration.js +1 -1
  407. package/dist/i18n/declaration.js.map +1 -1
  408. package/dist/i18n/translation.cjs +3 -3
  409. package/dist/i18n/translation.cjs.map +1 -1
  410. package/dist/i18n/translation.js +623 -45
  411. package/dist/i18n/translation.js.map +1 -1
  412. package/dist/index.cjs +1 -1
  413. package/dist/index.js +1 -2
  414. package/dist/lib/index.cjs +1 -1
  415. package/dist/lib/index.d.ts +0 -1
  416. package/dist/lib/index.js +0 -1
  417. package/dist/locales/ar/openhands.json +38 -4
  418. package/dist/locales/ca/openhands.json +38 -4
  419. package/dist/locales/de/openhands.json +38 -4
  420. package/dist/locales/en/openhands.json +38 -4
  421. package/dist/locales/es/openhands.json +38 -4
  422. package/dist/locales/fr/openhands.json +38 -4
  423. package/dist/locales/it/openhands.json +38 -4
  424. package/dist/locales/ja/openhands.json +38 -4
  425. package/dist/locales/ko-KR/openhands.json +38 -4
  426. package/dist/locales/no/openhands.json +38 -4
  427. package/dist/locales/pt/openhands.json +38 -4
  428. package/dist/locales/tr/openhands.json +38 -4
  429. package/dist/locales/uk/openhands.json +38 -4
  430. package/dist/locales/zh-CN/openhands.json +38 -4
  431. package/dist/locales/zh-TW/openhands.json +38 -4
  432. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs +2 -0
  433. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs.map +1 -0
  434. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js +44 -0
  435. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js.map +1 -0
  436. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs +1 -1
  437. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs.map +1 -1
  438. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js +13 -0
  439. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js.map +1 -1
  440. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
  441. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
  442. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +21 -1
  443. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
  444. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs +1 -1
  445. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs.map +1 -1
  446. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js +1 -1
  447. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js.map +1 -1
  448. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs +1 -1
  449. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs.map +1 -1
  450. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js +13 -0
  451. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js.map +1 -1
  452. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs +1 -1
  453. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs.map +1 -1
  454. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js +13 -0
  455. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js.map +1 -1
  456. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
  457. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
  458. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +13 -0
  459. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
  460. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs +1 -1
  461. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs.map +1 -1
  462. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js +13 -0
  463. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js.map +1 -1
  464. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs +1 -1
  465. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs.map +1 -1
  466. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js +13 -0
  467. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js.map +1 -1
  468. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +1 -1
  469. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -1
  470. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +16 -2
  471. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -1
  472. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs +2 -0
  473. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs.map +1 -0
  474. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js +46 -0
  475. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js.map +1 -0
  476. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
  477. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
  478. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +74 -70
  479. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
  480. package/dist/node_modules/@openhands/extensions/skills/index.cjs +123 -3
  481. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  482. package/dist/node_modules/@openhands/extensions/skills/index.js +7 -1
  483. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  484. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs +2 -0
  485. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs.map +1 -0
  486. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +9 -0
  487. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -0
  488. package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs +2 -0
  489. package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs.map +1 -0
  490. package/dist/node_modules/lucide-react/dist/esm/icons/info.js +21 -0
  491. package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
  492. package/dist/package.cjs +1 -1
  493. package/dist/package.cjs.map +1 -1
  494. package/dist/package.js +10 -3
  495. package/dist/package.js.map +1 -1
  496. package/dist/routes/app-settings.cjs +1 -1
  497. package/dist/routes/app-settings.cjs.map +1 -1
  498. package/dist/routes/app-settings.js +113 -67
  499. package/dist/routes/app-settings.js.map +1 -1
  500. package/dist/routes/conversation.cjs +1 -1
  501. package/dist/routes/conversation.cjs.map +1 -1
  502. package/dist/routes/conversation.js +1 -1
  503. package/dist/routes/conversation.js.map +1 -1
  504. package/dist/routes/mcp.cjs +1 -1
  505. package/dist/routes/mcp.cjs.map +1 -1
  506. package/dist/routes/mcp.js +1 -0
  507. package/dist/routes/mcp.js.map +1 -1
  508. package/dist/services/cloud-funnel-analytics.cjs +1 -1
  509. package/dist/services/cloud-funnel-analytics.cjs.map +1 -1
  510. package/dist/services/cloud-funnel-analytics.d.ts +2 -2
  511. package/dist/services/cloud-funnel-analytics.js +18 -16
  512. package/dist/services/cloud-funnel-analytics.js.map +1 -1
  513. package/dist/services/settings.cjs +1 -1
  514. package/dist/services/settings.cjs.map +1 -1
  515. package/dist/services/settings.js +1 -0
  516. package/dist/services/settings.js.map +1 -1
  517. package/dist/services/telemetry-context.cjs +2 -0
  518. package/dist/services/telemetry-context.cjs.map +1 -0
  519. package/dist/services/telemetry-context.d.ts +17 -0
  520. package/dist/services/telemetry-context.js +27 -0
  521. package/dist/services/telemetry-context.js.map +1 -0
  522. package/dist/services/telemetry.cjs +1 -1
  523. package/dist/services/telemetry.cjs.map +1 -1
  524. package/dist/services/telemetry.d.ts +7 -5
  525. package/dist/services/telemetry.js +132 -123
  526. package/dist/services/telemetry.js.map +1 -1
  527. package/dist/stores/skill-install-banner-store.cjs +2 -0
  528. package/dist/stores/skill-install-banner-store.cjs.map +1 -0
  529. package/dist/stores/skill-install-banner-store.d.ts +32 -0
  530. package/dist/stores/skill-install-banner-store.js +14 -0
  531. package/dist/stores/skill-install-banner-store.js.map +1 -0
  532. package/dist/stores/use-event-store.cjs +1 -1
  533. package/dist/stores/use-event-store.cjs.map +1 -1
  534. package/dist/stores/use-event-store.js +35 -35
  535. package/dist/stores/use-event-store.js.map +1 -1
  536. package/dist/types/mcp-health.cjs +2 -0
  537. package/dist/types/mcp-health.cjs.map +1 -0
  538. package/dist/types/mcp-health.d.ts +21 -0
  539. package/dist/types/mcp-health.js +6 -0
  540. package/dist/types/mcp-health.js.map +1 -0
  541. package/dist/types/settings.d.ts +1 -0
  542. package/dist/utils/handle-event-for-ui.cjs +1 -1
  543. package/dist/utils/handle-event-for-ui.cjs.map +1 -1
  544. package/dist/utils/handle-event-for-ui.d.ts +5 -0
  545. package/dist/utils/handle-event-for-ui.js +71 -57
  546. package/dist/utils/handle-event-for-ui.js.map +1 -1
  547. package/dist/utils/mcp-credential-validation.cjs +1 -1
  548. package/dist/utils/mcp-credential-validation.cjs.map +1 -1
  549. package/dist/utils/mcp-credential-validation.js +32 -16
  550. package/dist/utils/mcp-credential-validation.js.map +1 -1
  551. package/dist/utils/mcp-server-health-key.cjs +2 -0
  552. package/dist/utils/mcp-server-health-key.cjs.map +1 -0
  553. package/dist/utils/mcp-server-health-key.d.ts +16 -0
  554. package/dist/utils/mcp-server-health-key.js +23 -0
  555. package/dist/utils/mcp-server-health-key.js.map +1 -0
  556. package/dist/utils/mcp-test-error-message.cjs +2 -0
  557. package/dist/utils/mcp-test-error-message.cjs.map +1 -0
  558. package/dist/utils/mcp-test-error-message.d.ts +8 -0
  559. package/dist/utils/mcp-test-error-message.js +14 -0
  560. package/dist/utils/mcp-test-error-message.js.map +1 -0
  561. package/dist/utils/redact-mcp-secrets.cjs +2 -0
  562. package/dist/utils/redact-mcp-secrets.cjs.map +1 -0
  563. package/dist/utils/redact-mcp-secrets.d.ts +13 -0
  564. package/dist/utils/redact-mcp-secrets.js +57 -0
  565. package/dist/utils/redact-mcp-secrets.js.map +1 -0
  566. package/dist/utils/settings-utils.cjs.map +1 -1
  567. package/dist/utils/settings-utils.js.map +1 -1
  568. package/dist/utils/skill-install-events.cjs +3 -0
  569. package/dist/utils/skill-install-events.cjs.map +1 -0
  570. package/dist/utils/skill-install-events.d.ts +16 -0
  571. package/dist/utils/skill-install-events.js +26 -0
  572. package/dist/utils/skill-install-events.js.map +1 -0
  573. package/dist/utils/title-llm-profile.cjs +2 -0
  574. package/dist/utils/title-llm-profile.cjs.map +1 -0
  575. package/dist/utils/title-llm-profile.d.ts +2 -0
  576. package/dist/utils/title-llm-profile.js +11 -0
  577. package/dist/utils/title-llm-profile.js.map +1 -0
  578. package/package.json +10 -3
  579. package/scripts/check-sdk-version-sync.mjs +6 -6
  580. package/scripts/check-translation-completeness.cjs +2 -0
  581. package/scripts/dev-process-utils.mjs +62 -1
  582. package/scripts/dev-safe.mjs +2 -2
  583. package/scripts/dev-static.mjs +5 -3
  584. package/scripts/dev-with-automation.mjs +98 -14
  585. package/scripts/download-node.mjs +382 -0
  586. package/scripts/download-uv.mjs +204 -0
  587. package/scripts/logger.mjs +64 -35
  588. package/build/assets/agent-server-compatibility-BWN-EIQn.js +0 -1
  589. package/build/assets/agent-server-conversation-service.api-DSPIkMwJ.js +0 -41
  590. package/build/assets/agent-settings-CgCnqaAA.js +0 -2
  591. package/build/assets/agent-settings-DDkSavD7.js +0 -1
  592. package/build/assets/api-key-entry-screen-iZc7n8AI.js +0 -1
  593. package/build/assets/app-settings-B5zyipxJ.js +0 -1
  594. package/build/assets/automation-export-BwRX6H32.js +0 -2
  595. package/build/assets/automations-list-lHAVzMoA.js +0 -1
  596. package/build/assets/backend-form-modal-RGcu909r.js +0 -1
  597. package/build/assets/browser-store-BI6uklCG.js +0 -1
  598. package/build/assets/chat-send-button-BZHG2hAW.js +0 -1
  599. package/build/assets/client-source-BZK8vRs2.js +0 -1
  600. package/build/assets/cloud-funnel-analytics-Zcv57hfT.js +0 -1
  601. package/build/assets/conversation-BoCYx8n2.js +0 -89
  602. package/build/assets/conversation-DgHqMjnY.js +0 -1
  603. package/build/assets/conversation-panel-78Rxh_-I.js +0 -1
  604. package/build/assets/conversation-state-store-B2Bp32XI.js +0 -1
  605. package/build/assets/declaration-BGsHjPEW.js +0 -1
  606. package/build/assets/extensions-hub-CCbLA7IM.js +0 -1
  607. package/build/assets/extensions-navigation-CPNjMNvR.js +0 -1
  608. package/build/assets/files-tab-store-DJsPxYdg.js +0 -1
  609. package/build/assets/files-tab-y4K7EXBO.js +0 -1
  610. package/build/assets/git-provider-icon-ITvsH4Ko.js +0 -1
  611. package/build/assets/home-BwbeOWwU.js +0 -1
  612. package/build/assets/home-DKPGQ5P3.js +0 -1
  613. package/build/assets/index-home-Bko2Itv5.js +0 -1
  614. package/build/assets/install-server-modal-Qk1gwyI8.js +0 -1
  615. package/build/assets/lesson-plan-DMCPdtrf.js +0 -4
  616. package/build/assets/llm-not-configured-banner-C1ktyb3C.js +0 -27
  617. package/build/assets/llm-settings-BBsZFi9l.js +0 -1
  618. package/build/assets/llm-settings-DFkJQr_w.js +0 -1
  619. package/build/assets/manage-backends-modal-CKQ46rvw.js +0 -1
  620. package/build/assets/manifest-03478bbf.js +0 -1
  621. package/build/assets/markdown-renderer-B4V2OMFP.js +0 -2
  622. package/build/assets/mcp-BapoJsDc.js +0 -9
  623. package/build/assets/messages-CUBFMY5o.js +0 -40
  624. package/build/assets/objectWithoutPropertiesLoose-BgYIAs2y.js +0 -1
  625. package/build/assets/onboarding-6NMkdNxV.js +0 -1
  626. package/build/assets/onboarding-modal-Q4AnpIdg.js +0 -1
  627. package/build/assets/recommended-automations-launcher-Bj7PuHY1.js +0 -58
  628. package/build/assets/refresh-cw-B9B7-vsy.js +0 -1
  629. package/build/assets/root-CDnuTToz.js +0 -2
  630. package/build/assets/root-CYWeTrWE.css +0 -1
  631. package/build/assets/root-layout-DfYVlcRG.js +0 -2
  632. package/build/assets/sdk-section-page-DLLNrYjI.js +0 -1
  633. package/build/assets/secrets-settings-CHy72A5C.js +0 -1
  634. package/build/assets/settings-B9S8UVQr.js +0 -1
  635. package/build/assets/settings-index-BKDl2CQ-.js +0 -1
  636. package/build/assets/settings-modal-DeK11CyT.js +0 -1
  637. package/build/assets/shared-conversation-9atDzTR4.js +0 -1
  638. package/build/assets/sidebar-mobile-menu-toggle-giMMZctn.js +0 -1
  639. package/build/assets/skills-plugins-Tropusio.js +0 -1
  640. package/build/assets/skills-settings-BvzBBCWk.js +0 -2
  641. package/build/assets/telemetry-C5JMEfqB.js +0 -2
  642. package/build/assets/use-activate-agent-profile-DlykqEfN.js +0 -1
  643. package/build/assets/use-backends-health-CLHPitJM.js +0 -1
  644. package/build/assets/use-config-B5r8erYt.js +0 -1
  645. package/build/assets/use-event-store-Bbaz51GR.js +0 -4
  646. package/build/assets/use-llm-profiles-Dr5__SlZ.js +0 -1
  647. package/build/assets/use-plugins-marketplace-BplU65ae.js +0 -1
  648. package/build/assets/use-runtime-is-ready-vCFOcLFa.js +0 -1
  649. package/build/assets/use-settings-CyxSlyTQ.js +0 -1
  650. package/build/assets/use-settings-nav-items-zEkSO_Bf.js +0 -16
  651. package/build/assets/use-tracking-D2Qg5Lpd.js +0 -1
  652. package/build/assets/useMutationState-OnAsCLA_.js +0 -1
  653. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js +0 -2
  654. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js +0 -28
  655. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js +0 -2
  656. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js +0 -2
  657. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js +0 -7
  658. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js +0 -1
  659. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js +0 -1
  660. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js +0 -1
  661. package/dist/components/features/analytics/telemetry-consent-banner.cjs +0 -2
  662. package/dist/components/features/analytics/telemetry-consent-banner.cjs.map +0 -1
  663. package/dist/components/features/analytics/telemetry-consent-banner.d.ts +0 -29
  664. package/dist/components/features/analytics/telemetry-consent-banner.js +0 -59
  665. package/dist/components/features/analytics/telemetry-consent-banner.js.map +0 -1
  666. /package/build/assets/{__vite-browser-external-BQUj0sYu.js → __vite-browser-external-CKHVBTNC.js} +0 -0
  667. /package/build/assets/{agent-server-ui-style-scope-qhnhZHBV.js → agent-server-ui-style-scope-BvSa9on7.js} +0 -0
  668. /package/build/assets/{automation-LZB0MjdV.js → automation-BGiPmxFR.js} +0 -0
  669. /package/build/assets/{canvas-ui-COgjltGz.js → canvas-ui-CC4EJo-H.js} +0 -0
  670. /package/build/assets/{checkmark-h7udgXMM.js → checkmark-ygQB1AtV.js} +0 -0
  671. /package/build/assets/{close-DLFb5kfv.js → close-BjSA0HWT.js} +0 -0
  672. /package/build/assets/{code-tag-DYlAhEQY.js → code-tag-D9aPPbOe.js} +0 -0
  673. /package/build/assets/{common-CxbUL3nR.js → common-CCuqQy_S.js} +0 -0
  674. /package/build/assets/{conversation-local-storage-F6zVMM--.js → conversation-local-storage-BDjWPg0Z.js} +0 -0
  675. /package/build/assets/{copy-BLmGeJcd.js → copy-Dce7sOvS.js} +0 -0
  676. /package/build/assets/{copy-D1YGjP-C.js → copy-iPJAncAj.js} +0 -0
  677. /package/build/assets/{dist-CodhvuAP.js → dist-D9PhjOaq.js} +0 -0
  678. /package/build/assets/{environment-switch-store-DkjlKWzN.js → environment-switch-store-DHfcz4M4.js} +0 -0
  679. /package/build/assets/{extension-module-card-classes-9V3J9J_b.js → extension-module-card-classes-BpebKiN6.js} +0 -0
  680. /package/build/assets/{external-link-lhdITPqq.js → external-link-CpPMXxrV.js} +0 -0
  681. /package/build/assets/{folder-Bk311brm.js → folder-BabbYnbF.js} +0 -0
  682. /package/build/assets/{format-time-delta-DhDbkD7V.js → format-time-delta-BkAmJEPT.js} +0 -0
  683. /package/build/assets/{get-language-from-path-DBqBsCWH.js → get-language-from-path-CPNnuVhI.js} +0 -0
  684. /package/build/assets/{git-status-mapper-DnL9OC8_.js → git-status-mapper-BIXK0AAG.js} +0 -0
  685. /package/build/assets/{iconBase-Dz51Zn5x.js → iconBase-Ch-fOe8B.js} +0 -0
  686. /package/build/assets/{link-external-CaBmUEs_.js → link-external-DfKQroKX.js} +0 -0
  687. /package/build/assets/{list-todo-CAtvkzcy.js → list-todo-6J6zc8oS.js} +0 -0
  688. /package/build/assets/{llm-subscription-DtsX5Lhg.js → llm-subscription-Bvu8BLXc.js} +0 -0
  689. /package/build/assets/{loader-circle-CsAsfLIs.js → loader-circle-DGsqG5qw.js} +0 -0
  690. /package/build/assets/{map-provider-BbIb12oh.js → map-provider-BSvXvVR0.js} +0 -0
  691. /package/build/assets/{middleware-DYHYNAnP.js → middleware-_izt7V6U.js} +0 -0
  692. /package/build/assets/{modal-backdrop-zVwfOJZr.js → modal-backdrop-B7H42xHG.js} +0 -0
  693. /package/build/assets/{navigation-context-DPs2G0X8.js → navigation-context-cvyvI1WA.js} +0 -0
  694. /package/build/assets/{openhands-logo-bcNw5bkY.js → openhands-logo-pEw0nKFP.js} +0 -0
  695. /package/build/assets/{pencil-CWhApFIT.js → pencil-DmSqWUA3.js} +0 -0
  696. /package/build/assets/{react-DPDgL6du.js → react-MKQOkha9.js} +0 -0
  697. /package/build/assets/{search-BgOCR7_c.js → search-B5D5EuSn.js} +0 -0
  698. /package/build/assets/{search-dIQ09UY2.js → search-vnYL5jwV.js} +0 -0
  699. /package/build/assets/{settings-gear-MXCyZW0x.js → settings-gear-BOwF59Bs.js} +0 -0
  700. /package/build/assets/{settings-section-header-context-COMOIaxV.js → settings-section-header-context-CGgHZXrf.js} +0 -0
  701. /package/build/assets/{skills-EqzxYBvT.js → skills-arUOHLcS.js} +0 -0
  702. /package/build/assets/{square-chevron-right-DE-JN-2Z.js → square-chevron-right-EizCGtgq.js} +0 -0
  703. /package/build/assets/{switch-skeleton-DqQwalyu.js → switch-skeleton-BjPRx1QD.js} +0 -0
  704. /package/build/assets/{terminal-Cgf___rK.js → terminal-a57bHgZs.js} +0 -0
  705. /package/build/assets/{trash-2-BU6BlW4i.js → trash-2-CF3hilrY.js} +0 -0
  706. /package/build/assets/{u-check-circle-BqoIxNz_.js → u-check-circle-WGqHdtfO.js} +0 -0
  707. /package/build/assets/{u-check-circle-half-MsShT8Ec.js → u-check-circle-half-LiwZkuFe.js} +0 -0
  708. /package/build/assets/{u-edit-DL5LgKon.js → u-edit-BwHepAPi.js} +0 -0
  709. /package/build/assets/{use-breakpoint-BP3lqLMx.js → use-breakpoint-B-O0lQ84.js} +0 -0
  710. /package/build/assets/{use-click-outside-element-D9BYdANT.js → use-click-outside-element-DLQIMQrz.js} +0 -0
  711. /package/build/assets/{use-is-authed-BezEyfeh.js → use-is-authed-BSeo4coy.js} +0 -0
  712. /package/build/assets/{use-onboarding-completion-C_Swglzp.js → use-onboarding-completion-C0hPNGpw.js} +0 -0
  713. /package/build/assets/{v4-DbCkTSoU.js → v4-q4yWTlMz.js} +0 -0
  714. /package/build/assets/{vendor~browser-By2MVv_N.js → vendor~browser-UwB1jbAZ.js} +0 -0
  715. /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js → vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js} +0 -0
  716. /package/build/assets/{vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js → vendor~index-home~home~conversation-panel~conversation-Bff9cq5J.js} +0 -0
  717. /package/build/assets/{vendor~module-D5a_AClf.js → vendor~module-D4DeFV4J.js} +0 -0
  718. /package/build/assets/{vendor~terminal-CnKZILnC.js → vendor~terminal-B7Eiak0-.js} +0 -0
  719. /package/build/assets/{x-ZE4iplpF.js → x-DQB_00VJ.js} +0 -0
  720. /package/build/assets/{x-mark-Batp6gXa.js → x-mark-B32XuEwS.js} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-install-restart-banner.cjs","names":[],"sources":["../../../../src/components/features/chat/skill-install-restart-banner.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { X } from \"lucide-react\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useSkillInstalls } from \"#/hooks/use-skill-installs\";\nimport { useCreateConversation } from \"#/hooks/mutation/use-create-conversation\";\nimport { useIsCreatingConversation } from \"#/hooks/use-is-creating-conversation\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\n\nexport interface SkillInstallRestartBannerProps {\n conversationId: string | null | undefined;\n}\n\n/**\n * Pinned notice shown after the agent installs a skill via the bundled\n * add-skill flow. The SDK loads skills once at conversation start, so a\n * chat-installed skill can't activate in the running conversation — this\n * banner says so and offers one action: start a new conversation in the\n * directory the skill was installed to.\n */\nexport function SkillInstallRestartBanner({\n conversationId,\n}: SkillInstallRestartBannerProps) {\n const { t } = useTranslation(\"openhands\");\n const { installs, dismissAll } = useSkillInstalls(conversationId);\n const { backend } = useActiveBackend();\n const { mutate: createConversation, isPending } = useCreateConversation();\n const isCreatingElsewhere = useIsCreatingConversation();\n const { navigate } = useNavigation();\n const { data: conversation } = useActiveConversation();\n\n // Local-only: the cloud create path ignores workingDir entirely.\n if (backend.kind !== \"local\" || installs.length === 0) return null;\n\n const latest = installs[installs.length - 1];\n const skillNames = installs\n .filter((install) => install.workspacePath === latest.workspacePath)\n .map((install) => install.skillName);\n\n const handleRestart = () => {\n if (isPending || isCreatingElsewhere) return;\n createConversation(\n {\n // The agent's real install root, parsed from the fetch_skill.py\n // success line — correct even for worktree conversations where\n // selected_workspace would point elsewhere.\n workingDir: latest.workspacePath,\n // new_worktree would start from a fresh worktree without the\n // freshly installed .agents/skills/ directory.\n workspaceMode: \"local_repo\",\n repository:\n conversation?.selected_repository && conversation?.git_provider\n ? {\n name: conversation.selected_repository,\n gitProvider: conversation.git_provider,\n branch: conversation.selected_branch ?? undefined,\n }\n : undefined,\n entryPoint: \"skill_install_restart_banner\",\n },\n {\n onSuccess: (data) => navigate(`/conversations/${data.conversation_id}`),\n onError: (error) => displayErrorToast(error.message),\n },\n );\n };\n\n return (\n <div\n className=\"flex w-full items-start gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]\"\n data-testid=\"skill-install-restart-banner\"\n >\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm text-[var(--oh-foreground)]\">\n {t(I18nKey.SKILLS$INSTALL_BANNER_MESSAGE, {\n skills: skillNames.join(\", \"),\n })}\n </p>\n <button\n type=\"button\"\n onClick={handleRestart}\n disabled={isPending || isCreatingElsewhere}\n className=\"mt-2 cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] disabled:cursor-not-allowed disabled:opacity-50\"\n data-testid=\"skill-install-restart-action\"\n >\n {t(I18nKey.SKILLS$INSTALL_BANNER_ACTION)}\n </button>\n </div>\n <button\n type=\"button\"\n onClick={dismissAll}\n className=\"shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]\"\n aria-label={t(I18nKey.BUTTON$CLOSE)}\n data-testid=\"skill-install-restart-dismiss\"\n >\n <X className=\"h-4 w-4\" aria-hidden />\n </button>\n </div>\n );\n}\n"],"mappings":"4qBAsBA,SAAgB,EAA0B,CACxC,kBACiC,CACjC,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CACnC,CAAE,WAAU,cAAe,EAAA,iBAAiB,EAAe,CAC3D,CAAE,WAAY,EAAA,kBAAkB,CAChC,CAAE,OAAQ,EAAoB,aAAc,EAAA,uBAAuB,CACnE,EAAsB,EAAA,2BAA2B,CACjD,CAAE,YAAa,EAAA,eAAe,CAC9B,CAAE,KAAM,GAAiB,EAAA,uBAAuB,CAGtD,GAAI,EAAQ,OAAS,SAAW,EAAS,SAAW,EAAG,OAAO,KAE9D,IAAM,EAAS,EAAS,EAAS,OAAS,GACpC,EAAa,EAChB,OAAQ,GAAY,EAAQ,gBAAkB,EAAO,cAAc,CACnE,IAAK,GAAY,EAAQ,UAAU,CA8BtC,OACE,EAAA,EAAA,MAAC,MAAD,CACE,UAAU,0IACV,cAAY,wCAFd,EAIE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,0BAAf,EACE,EAAA,EAAA,KAAC,IAAD,CAAG,UAAU,+CACV,EAAE,EAAA,QAAQ,8BAA+B,CACxC,OAAQ,EAAW,KAAK,KAAK,CAC9B,CAAC,CACA,CAAA,EACJ,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,YAzCoB,CACtB,GAAa,GACjB,EACE,CAIE,WAAY,EAAO,cAGnB,cAAe,aACf,WACE,GAAc,qBAAuB,GAAc,aAC/C,CACE,KAAM,EAAa,oBACnB,YAAa,EAAa,aAC1B,OAAQ,EAAa,iBAAmB,IAAA,GACzC,CACD,IAAA,GACN,WAAY,+BACb,CACD,CACE,UAAY,GAAS,EAAS,kBAAkB,EAAK,kBAAkB,CACvE,QAAU,GAAU,EAAA,kBAAkB,EAAM,QAAQ,CACrD,CACF,EAiBK,SAAU,GAAa,EACvB,UAAU,mNACV,cAAY,wCAEX,EAAE,EAAA,QAAQ,6BAA6B,CACjC,CAAA,CACL,IACN,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,QAAS,EACT,UAAU,yIACV,aAAY,EAAE,EAAA,QAAQ,aAAa,CACnC,cAAY,0CAEZ,EAAA,EAAA,KAAC,EAAA,EAAD,CAAG,UAAU,UAAU,cAAA,GAAc,CAAA,CAC9B,CAAA,CACL"}
@@ -0,0 +1,11 @@
1
+ export interface SkillInstallRestartBannerProps {
2
+ conversationId: string | null | undefined;
3
+ }
4
+ /**
5
+ * Pinned notice shown after the agent installs a skill via the bundled
6
+ * add-skill flow. The SDK loads skills once at conversation start, so a
7
+ * chat-installed skill can't activate in the running conversation — this
8
+ * banner says so and offers one action: start a new conversation in the
9
+ * directory the skill was installed to.
10
+ */
11
+ export declare function SkillInstallRestartBanner({ conversationId, }: SkillInstallRestartBannerProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,63 @@
1
+ import { useTranslation as e } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
2
+ import { I18nKey as t } from "../../../i18n/declaration.js";
3
+ import { X as n } from "../../../node_modules/lucide-react/dist/esm/icons/x.js";
4
+ import { useNavigation as r } from "../../../context/navigation-context.js";
5
+ import { displayErrorToast as i } from "../../../utils/custom-toast-handlers.js";
6
+ import { useActiveBackend as a } from "../../../contexts/active-backend-context.js";
7
+ import { useActiveConversation as o } from "../../../hooks/query/use-active-conversation.js";
8
+ import { useCreateConversation as s } from "../../../hooks/mutation/use-create-conversation.js";
9
+ import { useSkillInstalls as c } from "../../../hooks/use-skill-installs.js";
10
+ import { useIsCreatingConversation as l } from "../../../hooks/use-is-creating-conversation.js";
11
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
12
+ //#region src/components/features/chat/skill-install-restart-banner.tsx
13
+ function f({ conversationId: f }) {
14
+ let { t: p } = e("openhands"), { installs: m, dismissAll: h } = c(f), { backend: g } = a(), { mutate: _, isPending: v } = s(), y = l(), { navigate: b } = r(), { data: x } = o();
15
+ if (g.kind !== "local" || m.length === 0) return null;
16
+ let S = m[m.length - 1], C = m.filter((e) => e.workspacePath === S.workspacePath).map((e) => e.skillName);
17
+ return /* @__PURE__ */ d("div", {
18
+ className: "flex w-full items-start gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]",
19
+ "data-testid": "skill-install-restart-banner",
20
+ children: [/* @__PURE__ */ d("div", {
21
+ className: "min-w-0 flex-1",
22
+ children: [/* @__PURE__ */ u("p", {
23
+ className: "text-sm text-[var(--oh-foreground)]",
24
+ children: p(t.SKILLS$INSTALL_BANNER_MESSAGE, { skills: C.join(", ") })
25
+ }), /* @__PURE__ */ u("button", {
26
+ type: "button",
27
+ onClick: () => {
28
+ v || y || _({
29
+ workingDir: S.workspacePath,
30
+ workspaceMode: "local_repo",
31
+ repository: x?.selected_repository && x?.git_provider ? {
32
+ name: x.selected_repository,
33
+ gitProvider: x.git_provider,
34
+ branch: x.selected_branch ?? void 0
35
+ } : void 0,
36
+ entryPoint: "skill_install_restart_banner"
37
+ }, {
38
+ onSuccess: (e) => b(`/conversations/${e.conversation_id}`),
39
+ onError: (e) => i(e.message)
40
+ });
41
+ },
42
+ disabled: v || y,
43
+ className: "mt-2 cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] disabled:cursor-not-allowed disabled:opacity-50",
44
+ "data-testid": "skill-install-restart-action",
45
+ children: p(t.SKILLS$INSTALL_BANNER_ACTION)
46
+ })]
47
+ }), /* @__PURE__ */ u("button", {
48
+ type: "button",
49
+ onClick: h,
50
+ className: "shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]",
51
+ "aria-label": p(t.BUTTON$CLOSE),
52
+ "data-testid": "skill-install-restart-dismiss",
53
+ children: /* @__PURE__ */ u(n, {
54
+ className: "h-4 w-4",
55
+ "aria-hidden": !0
56
+ })
57
+ })]
58
+ });
59
+ }
60
+ //#endregion
61
+ export { f as SkillInstallRestartBanner };
62
+
63
+ //# sourceMappingURL=skill-install-restart-banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-install-restart-banner.js","names":[],"sources":["../../../../src/components/features/chat/skill-install-restart-banner.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { X } from \"lucide-react\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useSkillInstalls } from \"#/hooks/use-skill-installs\";\nimport { useCreateConversation } from \"#/hooks/mutation/use-create-conversation\";\nimport { useIsCreatingConversation } from \"#/hooks/use-is-creating-conversation\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\n\nexport interface SkillInstallRestartBannerProps {\n conversationId: string | null | undefined;\n}\n\n/**\n * Pinned notice shown after the agent installs a skill via the bundled\n * add-skill flow. The SDK loads skills once at conversation start, so a\n * chat-installed skill can't activate in the running conversation — this\n * banner says so and offers one action: start a new conversation in the\n * directory the skill was installed to.\n */\nexport function SkillInstallRestartBanner({\n conversationId,\n}: SkillInstallRestartBannerProps) {\n const { t } = useTranslation(\"openhands\");\n const { installs, dismissAll } = useSkillInstalls(conversationId);\n const { backend } = useActiveBackend();\n const { mutate: createConversation, isPending } = useCreateConversation();\n const isCreatingElsewhere = useIsCreatingConversation();\n const { navigate } = useNavigation();\n const { data: conversation } = useActiveConversation();\n\n // Local-only: the cloud create path ignores workingDir entirely.\n if (backend.kind !== \"local\" || installs.length === 0) return null;\n\n const latest = installs[installs.length - 1];\n const skillNames = installs\n .filter((install) => install.workspacePath === latest.workspacePath)\n .map((install) => install.skillName);\n\n const handleRestart = () => {\n if (isPending || isCreatingElsewhere) return;\n createConversation(\n {\n // The agent's real install root, parsed from the fetch_skill.py\n // success line — correct even for worktree conversations where\n // selected_workspace would point elsewhere.\n workingDir: latest.workspacePath,\n // new_worktree would start from a fresh worktree without the\n // freshly installed .agents/skills/ directory.\n workspaceMode: \"local_repo\",\n repository:\n conversation?.selected_repository && conversation?.git_provider\n ? {\n name: conversation.selected_repository,\n gitProvider: conversation.git_provider,\n branch: conversation.selected_branch ?? undefined,\n }\n : undefined,\n entryPoint: \"skill_install_restart_banner\",\n },\n {\n onSuccess: (data) => navigate(`/conversations/${data.conversation_id}`),\n onError: (error) => displayErrorToast(error.message),\n },\n );\n };\n\n return (\n <div\n className=\"flex w-full items-start gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]\"\n data-testid=\"skill-install-restart-banner\"\n >\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm text-[var(--oh-foreground)]\">\n {t(I18nKey.SKILLS$INSTALL_BANNER_MESSAGE, {\n skills: skillNames.join(\", \"),\n })}\n </p>\n <button\n type=\"button\"\n onClick={handleRestart}\n disabled={isPending || isCreatingElsewhere}\n className=\"mt-2 cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] disabled:cursor-not-allowed disabled:opacity-50\"\n data-testid=\"skill-install-restart-action\"\n >\n {t(I18nKey.SKILLS$INSTALL_BANNER_ACTION)}\n </button>\n </div>\n <button\n type=\"button\"\n onClick={dismissAll}\n className=\"shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]\"\n aria-label={t(I18nKey.BUTTON$CLOSE)}\n data-testid=\"skill-install-restart-dismiss\"\n >\n <X className=\"h-4 w-4\" aria-hidden />\n </button>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAsBA,SAAgB,EAA0B,EACxC,qBACiC;CACjC,IAAM,EAAE,SAAM,EAAe,YAAY,EACnC,EAAE,aAAU,kBAAe,EAAiB,EAAe,EAC3D,EAAE,eAAY,GAAkB,EAChC,EAAE,QAAQ,GAAoB,iBAAc,GAAuB,EACnE,IAAsB,GAA2B,EACjD,EAAE,gBAAa,GAAe,EAC9B,EAAE,MAAM,MAAiB,GAAuB;AAGtD,KAAI,EAAQ,SAAS,WAAW,EAAS,WAAW,EAAG,QAAO;CAE9D,IAAM,IAAS,EAAS,EAAS,SAAS,IACpC,IAAa,EAChB,QAAQ,MAAY,EAAQ,kBAAkB,EAAO,cAAc,CACnE,KAAK,MAAY,EAAQ,UAAU;AA8BtC,QACE,kBAAC,OAAD;EACE,WAAU;EACV,eAAY;YAFd,CAIE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cACV,EAAE,EAAQ,+BAA+B,EACxC,QAAQ,EAAW,KAAK,KAAK,EAC9B,CAAC;IACA,CAAA,EACJ,kBAAC,UAAD;IACE,MAAK;IACL,eAzCoB;AACtB,UAAa,KACjB,EACE;MAIE,YAAY,EAAO;MAGnB,eAAe;MACf,YACE,GAAc,uBAAuB,GAAc,eAC/C;OACE,MAAM,EAAa;OACnB,aAAa,EAAa;OAC1B,QAAQ,EAAa,mBAAmB,KAAA;OACzC,GACD,KAAA;MACN,YAAY;MACb,EACD;MACE,YAAY,MAAS,EAAS,kBAAkB,EAAK,kBAAkB;MACvE,UAAU,MAAU,EAAkB,EAAM,QAAQ;MACrD,CACF;;IAiBK,UAAU,KAAa;IACvB,WAAU;IACV,eAAY;cAEX,EAAE,EAAQ,6BAA6B;IACjC,CAAA,CACL;MACN,kBAAC,UAAD;GACE,MAAK;GACL,SAAS;GACT,WAAU;GACV,cAAY,EAAE,EAAQ,aAAa;GACnC,eAAY;aAEZ,kBAAC,GAAD;IAAG,WAAU;IAAU,eAAA;IAAc,CAAA;GAC9B,CAAA,CACL"}
@@ -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(`../../../hooks/use-conversation-id.cjs`),i=require(`../../../stores/conversation-store.cjs`),a=require(`../../../hooks/use-is-archived-conversation.cjs`),o=require(`../../../hooks/use-breakpoint.cjs`),s=require(`../../../utils/mobile-top-bar-icon-button-classes.cjs`),c=require(`../../../icons/block-drawer-left.cjs`),l=require(`../chat/chat-action-tooltip.cjs`);let u=require(`react/jsx-runtime`),d=require(`react-router`);function f({className:f}){let{t:p}=e.useTranslation(`openhands`),m=o.useBreakpoint(),h=a.useIsArchivedConversation(),g=(0,d.useNavigate)(),{conversationId:_}=r.useConversationId(),{isRightPanelShown:v,setHasRightPanelToggled:y,setIsRightPanelShown:b,setSelectedTab:x}=i.useConversationStore(),S=()=>{if(h)return;if(m){if(!_)return;y(!0),b(!0);let{selectedTab:e}=i.useConversationStore.getState();e||x(`files`),g(`/conversations/${_}/panel`);return}let e=!v;if(y(e),e){let{selectedTab:e}=i.useConversationStore.getState();e||x(`files`)}},C=p(h?t.I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES:m?t.I18nKey.COMMON$SHOW_PANEL:v?t.I18nKey.COMMON$HIDE_PANEL:t.I18nKey.COMMON$SHOW_PANEL),w=m?!1:v;return(0,u.jsx)(l.ChatActionTooltip,{tooltip:C,ariaLabel:C,children:(0,u.jsx)(`button`,{type:`button`,onClick:S,disabled:h,className:n.cn(s.mobileTopBarIconButtonClassName,h&&`cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]`,f),"aria-label":C,"aria-pressed":w,"aria-disabled":h,"data-testid":`right-panel-toggle`,children:(0,u.jsx)(c.default,{className:`w-5 h-5 -scale-x-100`})})})}exports.RightPanelToggle=f;
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(`../../../hooks/use-conversation-id.cjs`),i=require(`../../../stores/conversation-store.cjs`),a=require(`../../../hooks/use-is-archived-conversation.cjs`),o=require(`../../../hooks/use-breakpoint.cjs`),s=require(`../../../utils/mobile-top-bar-icon-button-classes.cjs`),c=require(`../../../icons/block-drawer-left.cjs`),l=require(`../chat/chat-action-tooltip.cjs`);let u=require(`react/jsx-runtime`),d=require(`react-router`);function f({className:f}){let{t:p}=e.useTranslation(`openhands`),m=o.useBreakpoint(),h=a.useIsArchivedConversation(),g=(0,d.useNavigate)(),{conversationId:_}=r.useConversationId(),{isRightPanelShown:v,setHasRightPanelToggled:y,setIsRightPanelShown:b,setSelectedTab:x}=i.useConversationStore(),S=()=>{if(h)return;if(m){if(!_)return;y(!0),b(!0);let{selectedTab:e}=i.useConversationStore.getState();e||x(`files`),g(`/conversations/${_}/panel`);return}let e=!v;if(y(e),b(e),e){let{selectedTab:e}=i.useConversationStore.getState();e||x(`files`)}},C=p(h?t.I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES:m?t.I18nKey.COMMON$SHOW_PANEL:v?t.I18nKey.COMMON$HIDE_PANEL:t.I18nKey.COMMON$SHOW_PANEL),w=m?!1:v;return(0,u.jsx)(l.ChatActionTooltip,{tooltip:C,ariaLabel:C,children:(0,u.jsx)(`button`,{type:`button`,onClick:S,disabled:h,className:n.cn(s.mobileTopBarIconButtonClassName,h&&`cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]`,f),"aria-label":C,"aria-pressed":w,"aria-disabled":h,"data-testid":`right-panel-toggle`,children:(0,u.jsx)(c.default,{className:`w-5 h-5 -scale-x-100`})})})}exports.RightPanelToggle=f;
2
2
  //# sourceMappingURL=right-panel-toggle.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"right-panel-toggle.cjs","names":[],"sources":["../../../../src/components/features/conversation/right-panel-toggle.tsx"],"sourcesContent":["import { useNavigate } from \"react-router\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { mobileTopBarIconButtonClassName } from \"#/utils/mobile-top-bar-icon-button-classes\";\nimport BlockDrawerLeftIcon from \"#/icons/block-drawer-left.svg?react\";\nimport { ChatActionTooltip } from \"../chat/chat-action-tooltip\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface RightPanelToggleProps {\n className?: string;\n}\n\n/**\n * Toggle button for showing/hiding the right panel.\n *\n * Placed in the chat header so users can always restore the panel,\n * even when it's hidden. The open/closed state lives in the in-memory\n * Zustand store and is intentionally not persisted across full reloads —\n * see the comment in `useConversationStore` for the rationale.\n */\nexport function RightPanelToggle({ className }: RightPanelToggleProps) {\n const { t } = useTranslation(\"openhands\");\n const isMobile = useBreakpoint();\n const isArchivedConversation = useIsArchivedConversation();\n const navigate = useNavigate();\n const { conversationId } = useConversationId();\n const {\n isRightPanelShown,\n setHasRightPanelToggled,\n setIsRightPanelShown,\n setSelectedTab,\n } = useConversationStore();\n\n const handleToggle = () => {\n if (isArchivedConversation) {\n return;\n }\n\n if (isMobile) {\n if (!conversationId) return;\n setHasRightPanelToggled(true);\n setIsRightPanelShown(true);\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n navigate(`/conversations/${conversationId}/panel`);\n return;\n }\n\n const newState = !isRightPanelShown;\n setHasRightPanelToggled(newState);\n\n if (newState) {\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n }\n };\n\n const tooltipText = isArchivedConversation\n ? t(I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES)\n : isMobile\n ? t(I18nKey.COMMON$SHOW_PANEL)\n : isRightPanelShown\n ? t(I18nKey.COMMON$HIDE_PANEL)\n : t(I18nKey.COMMON$SHOW_PANEL);\n\n const ariaPressed = isMobile ? false : isRightPanelShown;\n\n return (\n <ChatActionTooltip tooltip={tooltipText} ariaLabel={tooltipText}>\n <button\n type=\"button\"\n onClick={handleToggle}\n disabled={isArchivedConversation}\n className={cn(\n mobileTopBarIconButtonClassName,\n isArchivedConversation &&\n \"cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]\",\n className,\n )}\n aria-label={tooltipText}\n aria-pressed={ariaPressed}\n aria-disabled={isArchivedConversation}\n data-testid=\"right-panel-toggle\"\n >\n <BlockDrawerLeftIcon className=\"w-5 h-5 -scale-x-100\" />\n </button>\n </ChatActionTooltip>\n );\n}\n"],"mappings":"yoBAwBA,SAAgB,EAAiB,CAAE,aAAoC,CACrE,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CACnC,EAAW,EAAA,eAAe,CAC1B,EAAyB,EAAA,2BAA2B,CACpD,GAAA,EAAA,EAAA,cAAwB,CACxB,CAAE,kBAAmB,EAAA,mBAAmB,CACxC,CACJ,oBACA,0BACA,uBACA,kBACE,EAAA,sBAAsB,CAEpB,MAAqB,CACzB,GAAI,EACF,OAGF,GAAI,EAAU,CACZ,GAAI,CAAC,EAAgB,OACrB,EAAwB,GAAK,CAC7B,EAAqB,GAAK,CAC1B,GAAM,CAAE,eAAgB,EAAA,qBAAqB,UAAU,CAClD,GACH,EAAe,QAAQ,CAEzB,EAAS,kBAAkB,EAAe,QAAQ,CAClD,OAGF,IAAM,EAAW,CAAC,EAGlB,GAFA,EAAwB,EAAS,CAE7B,EAAU,CACZ,GAAM,CAAE,eAAgB,EAAA,qBAAqB,UAAU,CAClD,GACH,EAAe,QAAQ,GAKvB,EACF,EADgB,EACd,EAAA,QAAQ,sCACV,EACI,EAAA,QAAQ,kBACV,EACI,EAAA,QAAQ,kBACR,EAAA,QAAQ,kBAAkB,CAE9B,EAAc,EAAW,GAAQ,EAEvC,OACE,EAAA,EAAA,KAAC,EAAA,kBAAD,CAAmB,QAAS,EAAa,UAAW,YAClD,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,QAAS,EACT,SAAU,EACV,UAAW,EAAA,GACT,EAAA,gCACA,GACE,kFACF,EACD,CACD,aAAY,EACZ,eAAc,EACd,gBAAe,EACf,cAAY,+BAEZ,EAAA,EAAA,KAAC,EAAA,QAAD,CAAqB,UAAU,uBAAyB,CAAA,CACjD,CAAA,CACS,CAAA"}
1
+ {"version":3,"file":"right-panel-toggle.cjs","names":[],"sources":["../../../../src/components/features/conversation/right-panel-toggle.tsx"],"sourcesContent":["import { useNavigate } from \"react-router\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { mobileTopBarIconButtonClassName } from \"#/utils/mobile-top-bar-icon-button-classes\";\nimport BlockDrawerLeftIcon from \"#/icons/block-drawer-left.svg?react\";\nimport { ChatActionTooltip } from \"../chat/chat-action-tooltip\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface RightPanelToggleProps {\n className?: string;\n}\n\n/**\n * Toggle button for showing/hiding the right panel.\n *\n * Placed in the chat header so users can always restore the panel,\n * even when it's hidden. The open/closed state lives in the in-memory\n * Zustand store and is intentionally not persisted across full reloads —\n * see the comment in `useConversationStore` for the rationale.\n */\nexport function RightPanelToggle({ className }: RightPanelToggleProps) {\n const { t } = useTranslation(\"openhands\");\n const isMobile = useBreakpoint();\n const isArchivedConversation = useIsArchivedConversation();\n const navigate = useNavigate();\n const { conversationId } = useConversationId();\n const {\n isRightPanelShown,\n setHasRightPanelToggled,\n setIsRightPanelShown,\n setSelectedTab,\n } = useConversationStore();\n\n const handleToggle = () => {\n if (isArchivedConversation) {\n return;\n }\n\n if (isMobile) {\n if (!conversationId) return;\n setHasRightPanelToggled(true);\n setIsRightPanelShown(true);\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n navigate(`/conversations/${conversationId}/panel`);\n return;\n }\n\n const newState = !isRightPanelShown;\n setHasRightPanelToggled(newState);\n setIsRightPanelShown(newState);\n\n if (newState) {\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n }\n };\n\n const tooltipText = isArchivedConversation\n ? t(I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES)\n : isMobile\n ? t(I18nKey.COMMON$SHOW_PANEL)\n : isRightPanelShown\n ? t(I18nKey.COMMON$HIDE_PANEL)\n : t(I18nKey.COMMON$SHOW_PANEL);\n\n const ariaPressed = isMobile ? false : isRightPanelShown;\n\n return (\n <ChatActionTooltip tooltip={tooltipText} ariaLabel={tooltipText}>\n <button\n type=\"button\"\n onClick={handleToggle}\n disabled={isArchivedConversation}\n className={cn(\n mobileTopBarIconButtonClassName,\n isArchivedConversation &&\n \"cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]\",\n className,\n )}\n aria-label={tooltipText}\n aria-pressed={ariaPressed}\n aria-disabled={isArchivedConversation}\n data-testid=\"right-panel-toggle\"\n >\n <BlockDrawerLeftIcon className=\"w-5 h-5 -scale-x-100\" />\n </button>\n </ChatActionTooltip>\n );\n}\n"],"mappings":"yoBAwBA,SAAgB,EAAiB,CAAE,aAAoC,CACrE,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CACnC,EAAW,EAAA,eAAe,CAC1B,EAAyB,EAAA,2BAA2B,CACpD,GAAA,EAAA,EAAA,cAAwB,CACxB,CAAE,kBAAmB,EAAA,mBAAmB,CACxC,CACJ,oBACA,0BACA,uBACA,kBACE,EAAA,sBAAsB,CAEpB,MAAqB,CACzB,GAAI,EACF,OAGF,GAAI,EAAU,CACZ,GAAI,CAAC,EAAgB,OACrB,EAAwB,GAAK,CAC7B,EAAqB,GAAK,CAC1B,GAAM,CAAE,eAAgB,EAAA,qBAAqB,UAAU,CAClD,GACH,EAAe,QAAQ,CAEzB,EAAS,kBAAkB,EAAe,QAAQ,CAClD,OAGF,IAAM,EAAW,CAAC,EAIlB,GAHA,EAAwB,EAAS,CACjC,EAAqB,EAAS,CAE1B,EAAU,CACZ,GAAM,CAAE,eAAgB,EAAA,qBAAqB,UAAU,CAClD,GACH,EAAe,QAAQ,GAKvB,EACF,EADgB,EACd,EAAA,QAAQ,sCACV,EACI,EAAA,QAAQ,kBACV,EACI,EAAA,QAAQ,kBACR,EAAA,QAAQ,kBAAkB,CAE9B,EAAc,EAAW,GAAQ,EAEvC,OACE,EAAA,EAAA,KAAC,EAAA,kBAAD,CAAmB,QAAS,EAAa,UAAW,YAClD,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,QAAS,EACT,SAAU,EACV,UAAW,EAAA,GACT,EAAA,gCACA,GACE,kFACF,EACD,CACD,aAAY,EACZ,eAAc,EACd,gBAAe,EACf,cAAY,+BAEZ,EAAA,EAAA,KAAC,EAAA,QAAD,CAAqB,UAAU,uBAAyB,CAAA,CACjD,CAAA,CACS,CAAA"}
@@ -22,7 +22,7 @@ function f({ className: f }) {
22
22
  return;
23
23
  }
24
24
  let e = !v;
25
- if (y(e), e) {
25
+ if (y(e), b(e), e) {
26
26
  let { selectedTab: e } = i.getState();
27
27
  e || x("files");
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"right-panel-toggle.js","names":[],"sources":["../../../../src/components/features/conversation/right-panel-toggle.tsx"],"sourcesContent":["import { useNavigate } from \"react-router\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { mobileTopBarIconButtonClassName } from \"#/utils/mobile-top-bar-icon-button-classes\";\nimport BlockDrawerLeftIcon from \"#/icons/block-drawer-left.svg?react\";\nimport { ChatActionTooltip } from \"../chat/chat-action-tooltip\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface RightPanelToggleProps {\n className?: string;\n}\n\n/**\n * Toggle button for showing/hiding the right panel.\n *\n * Placed in the chat header so users can always restore the panel,\n * even when it's hidden. The open/closed state lives in the in-memory\n * Zustand store and is intentionally not persisted across full reloads —\n * see the comment in `useConversationStore` for the rationale.\n */\nexport function RightPanelToggle({ className }: RightPanelToggleProps) {\n const { t } = useTranslation(\"openhands\");\n const isMobile = useBreakpoint();\n const isArchivedConversation = useIsArchivedConversation();\n const navigate = useNavigate();\n const { conversationId } = useConversationId();\n const {\n isRightPanelShown,\n setHasRightPanelToggled,\n setIsRightPanelShown,\n setSelectedTab,\n } = useConversationStore();\n\n const handleToggle = () => {\n if (isArchivedConversation) {\n return;\n }\n\n if (isMobile) {\n if (!conversationId) return;\n setHasRightPanelToggled(true);\n setIsRightPanelShown(true);\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n navigate(`/conversations/${conversationId}/panel`);\n return;\n }\n\n const newState = !isRightPanelShown;\n setHasRightPanelToggled(newState);\n\n if (newState) {\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n }\n };\n\n const tooltipText = isArchivedConversation\n ? t(I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES)\n : isMobile\n ? t(I18nKey.COMMON$SHOW_PANEL)\n : isRightPanelShown\n ? t(I18nKey.COMMON$HIDE_PANEL)\n : t(I18nKey.COMMON$SHOW_PANEL);\n\n const ariaPressed = isMobile ? false : isRightPanelShown;\n\n return (\n <ChatActionTooltip tooltip={tooltipText} ariaLabel={tooltipText}>\n <button\n type=\"button\"\n onClick={handleToggle}\n disabled={isArchivedConversation}\n className={cn(\n mobileTopBarIconButtonClassName,\n isArchivedConversation &&\n \"cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]\",\n className,\n )}\n aria-label={tooltipText}\n aria-pressed={ariaPressed}\n aria-disabled={isArchivedConversation}\n data-testid=\"right-panel-toggle\"\n >\n <BlockDrawerLeftIcon className=\"w-5 h-5 -scale-x-100\" />\n </button>\n </ChatActionTooltip>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAwBA,SAAgB,EAAiB,EAAE,gBAAoC;CACrE,IAAM,EAAE,SAAM,EAAe,YAAY,EACnC,IAAW,GAAe,EAC1B,IAAyB,GAA2B,EACpD,IAAW,GAAa,EACxB,EAAE,sBAAmB,GAAmB,EACxC,EACJ,sBACA,4BACA,yBACA,sBACE,GAAsB,EAEpB,UAAqB;AACzB,MAAI,EACF;AAGF,MAAI,GAAU;AACZ,OAAI,CAAC,EAAgB;AAErB,GADA,EAAwB,GAAK,EAC7B,EAAqB,GAAK;GAC1B,IAAM,EAAE,mBAAgB,EAAqB,UAAU;AAIvD,GAHK,KACH,EAAe,QAAQ,EAEzB,EAAS,kBAAkB,EAAe,QAAQ;AAClD;;EAGF,IAAM,IAAW,CAAC;AAGlB,MAFA,EAAwB,EAAS,EAE7B,GAAU;GACZ,IAAM,EAAE,mBAAgB,EAAqB,UAAU;AACvD,GAAK,KACH,EAAe,QAAQ;;IAKvB,IACF,EADgB,IACd,EAAQ,wCACV,IACI,EAAQ,oBACV,IACI,EAAQ,oBACR,EAAQ,kBAAkB,EAE9B,IAAc,IAAW,KAAQ;AAEvC,QACE,kBAAC,GAAD;EAAmB,SAAS;EAAa,WAAW;YAClD,kBAAC,UAAD;GACE,MAAK;GACL,SAAS;GACT,UAAU;GACV,WAAW,EACT,GACA,KACE,mFACF,EACD;GACD,cAAY;GACZ,gBAAc;GACd,iBAAe;GACf,eAAY;aAEZ,kBAAC,GAAD,EAAqB,WAAU,wBAAyB,CAAA;GACjD,CAAA;EACS,CAAA"}
1
+ {"version":3,"file":"right-panel-toggle.js","names":[],"sources":["../../../../src/components/features/conversation/right-panel-toggle.tsx"],"sourcesContent":["import { useNavigate } from \"react-router\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { mobileTopBarIconButtonClassName } from \"#/utils/mobile-top-bar-icon-button-classes\";\nimport BlockDrawerLeftIcon from \"#/icons/block-drawer-left.svg?react\";\nimport { ChatActionTooltip } from \"../chat/chat-action-tooltip\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface RightPanelToggleProps {\n className?: string;\n}\n\n/**\n * Toggle button for showing/hiding the right panel.\n *\n * Placed in the chat header so users can always restore the panel,\n * even when it's hidden. The open/closed state lives in the in-memory\n * Zustand store and is intentionally not persisted across full reloads —\n * see the comment in `useConversationStore` for the rationale.\n */\nexport function RightPanelToggle({ className }: RightPanelToggleProps) {\n const { t } = useTranslation(\"openhands\");\n const isMobile = useBreakpoint();\n const isArchivedConversation = useIsArchivedConversation();\n const navigate = useNavigate();\n const { conversationId } = useConversationId();\n const {\n isRightPanelShown,\n setHasRightPanelToggled,\n setIsRightPanelShown,\n setSelectedTab,\n } = useConversationStore();\n\n const handleToggle = () => {\n if (isArchivedConversation) {\n return;\n }\n\n if (isMobile) {\n if (!conversationId) return;\n setHasRightPanelToggled(true);\n setIsRightPanelShown(true);\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n navigate(`/conversations/${conversationId}/panel`);\n return;\n }\n\n const newState = !isRightPanelShown;\n setHasRightPanelToggled(newState);\n setIsRightPanelShown(newState);\n\n if (newState) {\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n }\n };\n\n const tooltipText = isArchivedConversation\n ? t(I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES)\n : isMobile\n ? t(I18nKey.COMMON$SHOW_PANEL)\n : isRightPanelShown\n ? t(I18nKey.COMMON$HIDE_PANEL)\n : t(I18nKey.COMMON$SHOW_PANEL);\n\n const ariaPressed = isMobile ? false : isRightPanelShown;\n\n return (\n <ChatActionTooltip tooltip={tooltipText} ariaLabel={tooltipText}>\n <button\n type=\"button\"\n onClick={handleToggle}\n disabled={isArchivedConversation}\n className={cn(\n mobileTopBarIconButtonClassName,\n isArchivedConversation &&\n \"cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]\",\n className,\n )}\n aria-label={tooltipText}\n aria-pressed={ariaPressed}\n aria-disabled={isArchivedConversation}\n data-testid=\"right-panel-toggle\"\n >\n <BlockDrawerLeftIcon className=\"w-5 h-5 -scale-x-100\" />\n </button>\n </ChatActionTooltip>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAwBA,SAAgB,EAAiB,EAAE,gBAAoC;CACrE,IAAM,EAAE,SAAM,EAAe,YAAY,EACnC,IAAW,GAAe,EAC1B,IAAyB,GAA2B,EACpD,IAAW,GAAa,EACxB,EAAE,sBAAmB,GAAmB,EACxC,EACJ,sBACA,4BACA,yBACA,sBACE,GAAsB,EAEpB,UAAqB;AACzB,MAAI,EACF;AAGF,MAAI,GAAU;AACZ,OAAI,CAAC,EAAgB;AAErB,GADA,EAAwB,GAAK,EAC7B,EAAqB,GAAK;GAC1B,IAAM,EAAE,mBAAgB,EAAqB,UAAU;AAIvD,GAHK,KACH,EAAe,QAAQ,EAEzB,EAAS,kBAAkB,EAAe,QAAQ;AAClD;;EAGF,IAAM,IAAW,CAAC;AAIlB,MAHA,EAAwB,EAAS,EACjC,EAAqB,EAAS,EAE1B,GAAU;GACZ,IAAM,EAAE,mBAAgB,EAAqB,UAAU;AACvD,GAAK,KACH,EAAe,QAAQ;;IAKvB,IACF,EADgB,IACd,EAAQ,wCACV,IACI,EAAQ,oBACV,IACI,EAAQ,oBACR,EAAQ,kBAAkB,EAE9B,IAAc,IAAW,KAAQ;AAEvC,QACE,kBAAC,GAAD;EAAmB,SAAS;EAAa,WAAW;YAClD,kBAAC,UAAD;GACE,MAAK;GACL,SAAS;GACT,UAAU;GACV,WAAW,EACT,GACA,KACE,mFACF,EACD;GACD,cAAY;GACZ,gBAAc;GACd,iBAAe;GACf,eAAY;aAEZ,kBAAC,GAAD,EAAqB,WAAU,wBAAyB,CAAA;GACjD,CAAA;EACS,CAAA"}
@@ -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/status.cjs`),i=require(`../../../utils/utils.cjs`),ee=require(`../../../context/navigation-context.cjs`),te=require(`../../../utils/custom-toast-handlers.cjs`),ne=require(`../../../contexts/active-backend-context.cjs`),re=require(`../../../node_modules/@heroui/tooltip/dist/chunk-AUA5GDXN.cjs`),ie=require(`../../../hooks/use-click-outside-element.cjs`),ae=require(`../../../hooks/mutation/use-create-conversation.cjs`),oe=require(`../../shared/navigation-link.cjs`),se=require(`../../../hooks/mutation/use-delete-conversation.cjs`),ce=require(`../../../hooks/mutation/use-unified-stop-conversation.cjs`),le=require(`../../../hooks/mutation/use-update-conversation.cjs`),ue=require(`./confirm-delete-modal.cjs`),de=require(`./confirm-stop-modal.cjs`),fe=require(`../../../hooks/query/use-paginated-conversations.cjs`),pe=require(`../../../hooks/query/use-start-tasks.cjs`),me=require(`./exit-conversation-modal.cjs`),he=require(`../../../hooks/use-is-creating-conversation.cjs`),ge=require(`./conversation-card/conversation-card.cjs`),_e=require(`./conversation-card/conversation-card-preview.cjs`),ve=require(`./start-task-card/start-task-card.cjs`),ye=require(`./conversation-card/conversation-card-skeleton.cjs`),be=require(`./compact-conversation-row.cjs`),a=require(`../../../stores/conversation-panel-preferences-store.cjs`),xe=require(`./conversation-panel-filter-menu.cjs`),Se=require(`./conversation-panel-new-thread-picker.cjs`),o=require(`./conversation-panel-list-helpers.cjs`),Ce=require(`./conversation-group-folder-list.cjs`),we=require(`./conversation-panel-pinned-section.cjs`),s=require(`../../../stores/pinned-conversations-store.cjs`);let c=require(`react`);c=e.__toESM(c,1);let l=require(`react/jsx-runtime`);var Te=()=>{},Ee=[],u=3600*1e3,De=e=>{let t=Date.now()-u,n=[],r=[];for(let i of e){let e=i.updated_at?Date.parse(i.updated_at):NaN;Number.isFinite(e)&&e<t?r.push(i):n.push(i)}return{recent:n,older:r}};function d({onClose:e,compact:u=!1}){let{t:d}=t.useTranslation(`openhands`),{conversationId:f,navigate:p}=ee.useNavigation(),{backend:m}=ne.useActiveBackend(),Oe=ie.useClickOutsideElement(e??Te),[ke,h]=c.default.useState(!1),[Ae,g]=c.default.useState(!1),[je,Me]=c.default.useState(!1),[Ne,_]=c.default.useState(!1),v=a.useConversationPanelPreferencesStore(e=>e.showOlderConversations),Pe=a.useConversationPanelPreferencesStore(e=>e.toggleShowOlderConversations),y=a.useConversationPanelPreferencesStore(e=>e.showRepoBranchMetadata),Fe=a.useConversationPanelPreferencesStore(e=>e.toggleShowRepoBranchMetadata),b=a.useConversationPanelPreferencesStore(e=>e.showLlmProfiles),Ie=a.useConversationPanelPreferencesStore(e=>e.toggleShowLlmProfiles),x=a.useConversationPanelPreferencesStore(e=>e.showHoverMetadata),Le=a.useConversationPanelPreferencesStore(e=>e.toggleShowHoverMetadata),S=a.useConversationPanelPreferencesStore(e=>e.organizeMode),Re=a.useConversationPanelPreferencesStore(e=>e.setOrganizeMode),C=a.useConversationPanelPreferencesStore(e=>e.conversationSort),ze=a.useConversationPanelPreferencesStore(e=>e.setConversationSort),w=a.useConversationPanelPreferencesStore(e=>e.threadScope),Be=a.useConversationPanelPreferencesStore(e=>e.setThreadScope),T=a.useConversationPanelPreferencesStore(e=>e.groupFolderOrder),Ve=a.useConversationPanelPreferencesStore(e=>e.setGroupFolderOrder),[He,E]=c.default.useState(!1),[Ue,We]=c.default.useState(!1),Ge=ie.useClickOutsideElement(()=>{E(!1)}),[Ke,D]=c.default.useState(()=>new Set),[qe,O]=c.default.useState(()=>new Set),[Je,k]=c.default.useState(!1),A=s.usePinnedConversationsStore(e=>e.pinsByBackendId[m.id]??Ee),Ye=s.usePinnedConversationsStore(e=>e.togglePin),Xe=s.usePinnedConversationsStore(e=>e.pruneMissingConversations),Ze=c.default.useCallback(e=>{D(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Qe=c.default.useCallback(e=>{O(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);c.default.useEffect(()=>{S!==`grouped`&&(D(new Set),O(new Set))},[S]);let $e=c.default.useRef(null),[j,M]=c.default.useState(null),[et,N]=c.default.useState(null),[P,tt]=c.default.useState(null),{data:nt,isLoading:rt,isFetched:F,hasNextPage:I,isFetching:L,isFetchingNextPage:R,fetchNextPage:z}=fe.usePaginatedConversations(),{data:B}=pe.useStartTasks(),V=c.default.useMemo(()=>{let e=nt?.pages.flatMap(e=>e.items)??[],t=new Set;return e.filter(e=>t.has(e.id)?!1:(t.add(e.id),!0))},[nt]),H=c.default.useMemo(()=>o.resolvePinnedConversations(A,V),[V,A]);c.default.useEffect(()=>{F&&Xe(m.id,V.map(e=>e.id))},[m.id,V,F,Xe]),c.default.useEffect(()=>{A.length===0&&k(!1)},[A.length]);let U=c.default.useMemo(()=>{let e=w===`relevant`?V.filter(e=>r.isExecutionActive(e.execution_status)):V;return u?e:o.filterOutPinnedConversations(e,A)},[u,V,A,w]),{recent:W,older:G}=c.default.useMemo(()=>De(U),[U]),it=c.default.useMemo(()=>o.sortConversationsByField(v?[...W,...G]:W,C),[W,G,v,C]),at=c.default.useMemo(()=>({emptyWorkspace:d(n.I18nKey.CONVERSATION_PANEL$NO_WORKSPACE),emptyRepository:d(n.I18nKey.CONVERSATION_PANEL$NO_REPOSITORY)}),[d]),K=c.default.useMemo(()=>u||S!==`grouped`?null:o.groupConversations([...W,...v?G:[]],m.kind,C,at),[m.kind,u,C,at,G,S,W,v]),q=c.default.useMemo(()=>K?o.applyGroupFolderOrder(K,T):null,[K,T]),ot=c.default.useMemo(()=>K?.map(e=>e.id)??[],[K]),st=c.default.useMemo(()=>o.sortConversationsByField(W.filter(e=>r.isExecutionActive(e.execution_status)),C),[C,W]),ct=it.length,lt=c.default.useMemo(()=>q?q.reduce((e,t)=>e+t.conversations.length,0):0,[q]),ut=S===`grouped`&&!u?lt===0:ct===0,J=S===`grouped`&&!u?lt:ct,[Y,X]=c.default.useState(null),dt=c.default.useRef(J);dt.current=J;let ft=c.default.useCallback(()=>{I&&X(dt.current)},[I]);c.default.useEffect(()=>{if(Y!==null){if(J>Y){X(null);return}if(!I){X(null);return}L||R||z()}},[Y,J,I,L,R,z]);let pt=Y!==null||R,{mutate:mt,mutateAsync:ht}=se.useDeleteConversation(),{mutate:gt}=ce.useUnifiedPauseConversation(),{mutate:_t}=le.useUpdateConversation(),vt=G.length>0&&!v,yt=!!I&&!vt&&!u&&!ut,{mutate:bt}=ae.useCreateConversation(),Z=he.useIsCreatingConversation(),xt=c.default.useCallback(e=>{Z||bt({workingDir:e.workingDir,repository:e.repository,entryPoint:`sidebar_relaunch_project`},{onSuccess:e=>{p(`/conversations/${e.conversation_id}`)}})},[bt,Z,p]),St=c.default.useCallback((e,t)=>{h(!0),M(e),N(t)},[]),Ct=c.default.useCallback(e=>{g(!0),M(e)},[]),wt=c.default.useCallback((e,t)=>{_t({conversationId:e,newTitle:t},{onSuccess:()=>{te.displaySuccessToast(d(n.I18nKey.CONVERSATION$TITLE_UPDATED))}})},[d,_t]),Tt=()=>{j&&mt({conversationId:j},{onSuccess:()=>{j===f&&p(`/conversations`)}})},Et=()=>{j&&gt({conversationId:j})},Dt=async()=>{let e=V.map(e=>e.id),t=await Promise.allSettled(e.map(e=>ht({conversationId:e}))),n=t.flatMap((t,n)=>t.status===`fulfilled`?[e[n]]:[]),r=t.length-n.length;f!==null&&n.includes(f)&&p(`/conversations`),r>0&&te.displayErrorToast(`${r} conversation${r===1?``:`s`} could not be deleted.`)},Q=c.default.useCallback((t,n)=>{let r=A.includes(t.id);return u?(0,l.jsx)(be.CompactConversationRow,{conversationId:t.id,title:t.title??``,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,lastUpdatedAt:t.updated_at,createdAt:t.created_at,workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,isActive:t.id===f,onClose:e,showRepositoryMetadata:y,llmModel:t.llm_model,showLlmProfiles:b,agentKind:t.agent_kind,acpServer:t.acp_server},t.id):(0,l.jsx)(re.tooltip_default,{placement:`right-start`,delay:1e3,closeDelay:100,isDisabled:!x||P===t.id,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,content:(0,l.jsx)(_e.ConversationCardPreview,{title:t.title??``,executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,llmModel:t.llm_model,createdAt:t.created_at}),children:(0,l.jsx)(oe.NavigationLink,{to:`/conversations/${t.id}`,onClick:e,className:i.cn(`block rounded-md transition-colors`,P!==t.id&&`hover:bg-[var(--oh-surface)]`,(t.id===f||P===t.id)&&`bg-[var(--oh-surface)]`),children:(0,l.jsx)(ge.ConversationCard,{onDelete:()=>St(t.id,t.title??``),onStop:()=>Ct(t.id),onChangeTitle:e=>wt(t.id,e),title:t.title??``,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},lastUpdatedAt:t.updated_at,createdAt:t.created_at,executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,conversationId:t.id,contextMenuOpen:P===t.id,onContextMenuToggle:e=>tt(e?t.id:null),isActive:t.id===f,workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,showRepositoryMetadata:y,llmModel:t.llm_model,showLlmProfiles:b,agentKind:t.agent_kind,acpServer:t.acp_server,isPinned:r,onTogglePin:()=>Ye(m.id,t.id),alwaysShowPinIcon:r&&!n?.inPinnedSection})})},t.id)},[m.id,u,f,wt,St,Ct,e,P,A,y,b,x,Ye]),$=rt||!F,Ot=!u&&!$&&H.length>0,kt=F&&!rt&&!u&&ut&&!Ot&&!B?.length;return(0,l.jsxs)(`div`,{ref:Oe,"data-testid":`conversation-panel`,className:`flex h-full min-h-0 w-full flex-col`,children:[!u&&(0,l.jsx)(`div`,{className:i.cn(`-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b`,Ue?`border-[var(--oh-border)]`:`border-transparent`),children:(0,l.jsxs)(`div`,{"data-testid":`older-conversations-summary`,className:`flex min-w-0 flex-nowrap items-center gap-x-2 py-2 pl-4 pr-2.5 text-[var(--oh-muted)]`,children:[(0,l.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-[var(--oh-muted)]`,children:d(n.I18nKey.SIDEBAR$CONVERSATIONS)}),(0,l.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,l.jsx)(Se.ConversationPanelNewThreadPicker,{backendKind:m.kind}),(0,l.jsx)(xe.ConversationPanelFilterMenu,{filterMenuOpen:He,setFilterMenuOpen:E,menuRef:Ge,backendKind:m.kind,organizeMode:S,setOrganizeMode:Re,conversationSort:C,setConversationSort:ze,threadScope:w,setThreadScope:Be,showOlderConversations:v,toggleShowOlderConversations:Pe,showRepoBranchMetadata:y,toggleShowRepoBranchMetadata:Fe,showLlmProfiles:b,toggleShowLlmProfiles:Ie,showHoverMetadata:x,toggleShowHoverMetadata:Le,totalConversationsCount:V.length,onRequestDeleteAll:()=>_(!0)})]})]})}),(0,l.jsxs)(`div`,{ref:$e,"data-testid":`conversation-panel-list-scroll`,onScroll:e=>{We(e.currentTarget.scrollTop>0)},className:i.cn(`flex min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain custom-scrollbar-always`,!u&&`conversation-panel-list-scroll`),children:[$&&(0,l.jsx)(ye.ConversationCardSkeleton,{compact:u}),!u&&kt&&(0,l.jsx)(`div`,{"data-testid":`conversation-panel-empty-state`,className:`flex min-h-0 flex-1 flex-col items-center justify-center px-4 py-8`,children:(0,l.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:d(n.I18nKey.CONVERSATION$NO_CONVERSATIONS)})}),Ot?(0,l.jsx)(we.ConversationPanelPinnedSection,{pinnedConversations:H,isPreviewExpanded:Je,onTogglePreviewExpanded:()=>k(e=>!e),activeConversationId:f,showDivider:!u&&S===`chronological`,renderConversationCard:e=>Q(e,{inPinnedSection:!0})}):null,!u&&B?.map(t=>(0,l.jsx)(oe.NavigationLink,{to:`/conversations/task-${t.id}`,onClick:e,className:`block`,children:(0,l.jsx)(ve.StartTaskCard,{task:t})},t.id)),!$&&u?st.map(e=>Q(e)):null,!$&&!u&&S===`grouped`&&q&&q.length>0?(0,l.jsx)(Ce.ConversationGroupFolderList,{groups:q,groupIds:ot,groupFolderOrder:T,setGroupFolderOrder:Ve,collapsedGroupIds:Ke,expandedGroupPreviewIds:qe,onToggleGroupCollapsed:Ze,onToggleGroupPreviewExpanded:Qe,isCreatingConversationFlow:Z,activeConversationId:f,onLaunchFromGroup:xt,renderConversationCard:e=>Q(e)}):null,!$&&!u&&S===`chronological`?(0,l.jsx)(`div`,{className:`space-y-0.5`,children:it.map(e=>Q(e))}):null,yt&&(pt?(0,l.jsx)(`div`,{className:`py-1`,children:(0,l.jsx)(ye.ConversationCardSkeleton,{compact:u})}):(0,l.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,l.jsx)(`button`,{type:`button`,"data-testid":`load-more-conversations`,onClick:ft,className:`text-xs text-[var(--oh-muted)] hover:text-white`,children:d(n.I18nKey.CONVERSATION$LOAD_MORE)})}))]}),ke&&(0,l.jsx)(ue.ConfirmDeleteModal,{onConfirm:()=>{Tt(),h(!1),N(null)},onCancel:()=>{h(!1),N(null)},conversationTitle:et??void 0}),Ne&&(0,l.jsx)(ue.ConfirmDeleteModal,{title:d(n.I18nKey.CONVERSATION$CONFIRM_DELETE_ALL_TITLE),description:d(n.I18nKey.CONVERSATION$CONFIRM_DELETE_ALL_DESC,{count:V.length}),onConfirm:async()=>{await Dt(),_(!1)},onCancel:()=>_(!1)}),Ae&&(0,l.jsx)(de.ConfirmStopModal,{onConfirm:()=>{Et(),g(!1)},onCancel:()=>g(!1)}),je&&(0,l.jsx)(me.ExitConversationModal,{onConfirm:()=>{e?.()},onClose:()=>Me(!1),onCancel:()=>Me(!1)})]})}exports.ConversationPanel=d;
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/status.cjs`),i=require(`../../../utils/utils.cjs`),ee=require(`../../../context/navigation-context.cjs`),te=require(`../../../utils/custom-toast-handlers.cjs`),ne=require(`../../../contexts/active-backend-context.cjs`),re=require(`../../../node_modules/@heroui/tooltip/dist/chunk-AUA5GDXN.cjs`),ie=require(`../../../hooks/use-click-outside-element.cjs`),ae=require(`../../../hooks/mutation/use-create-conversation.cjs`),oe=require(`../../shared/navigation-link.cjs`),se=require(`../../../hooks/mutation/use-delete-conversation.cjs`),ce=require(`../../../hooks/mutation/use-unified-stop-conversation.cjs`),le=require(`../../../hooks/use-is-creating-conversation.cjs`),ue=require(`../../../hooks/mutation/use-update-conversation.cjs`),de=require(`./confirm-delete-modal.cjs`),fe=require(`./confirm-stop-modal.cjs`),pe=require(`../../../hooks/query/use-paginated-conversations.cjs`),me=require(`../../../hooks/query/use-start-tasks.cjs`),he=require(`./exit-conversation-modal.cjs`),ge=require(`./conversation-card/conversation-card.cjs`),_e=require(`./conversation-card/conversation-card-preview.cjs`),ve=require(`./start-task-card/start-task-card.cjs`),ye=require(`./conversation-card/conversation-card-skeleton.cjs`),be=require(`./compact-conversation-row.cjs`),a=require(`../../../stores/conversation-panel-preferences-store.cjs`),xe=require(`./conversation-panel-filter-menu.cjs`),Se=require(`./conversation-panel-new-thread-picker.cjs`),o=require(`./conversation-panel-list-helpers.cjs`),Ce=require(`./conversation-group-folder-list.cjs`),we=require(`./conversation-panel-pinned-section.cjs`),s=require(`../../../stores/pinned-conversations-store.cjs`);let c=require(`react`);c=e.__toESM(c,1);let l=require(`react/jsx-runtime`);var Te=()=>{},Ee=[],u=3600*1e3,De=e=>{let t=Date.now()-u,n=[],r=[];for(let i of e){let e=i.updated_at?Date.parse(i.updated_at):NaN;Number.isFinite(e)&&e<t?r.push(i):n.push(i)}return{recent:n,older:r}};function d({onClose:e,compact:u=!1}){let{t:d}=t.useTranslation(`openhands`),{conversationId:f,navigate:p}=ee.useNavigation(),{backend:m}=ne.useActiveBackend(),Oe=ie.useClickOutsideElement(e??Te),[ke,h]=c.default.useState(!1),[Ae,g]=c.default.useState(!1),[je,Me]=c.default.useState(!1),[Ne,_]=c.default.useState(!1),v=a.useConversationPanelPreferencesStore(e=>e.showOlderConversations),Pe=a.useConversationPanelPreferencesStore(e=>e.toggleShowOlderConversations),y=a.useConversationPanelPreferencesStore(e=>e.showRepoBranchMetadata),Fe=a.useConversationPanelPreferencesStore(e=>e.toggleShowRepoBranchMetadata),b=a.useConversationPanelPreferencesStore(e=>e.showLlmProfiles),Ie=a.useConversationPanelPreferencesStore(e=>e.toggleShowLlmProfiles),x=a.useConversationPanelPreferencesStore(e=>e.showHoverMetadata),Le=a.useConversationPanelPreferencesStore(e=>e.toggleShowHoverMetadata),S=a.useConversationPanelPreferencesStore(e=>e.organizeMode),Re=a.useConversationPanelPreferencesStore(e=>e.setOrganizeMode),C=a.useConversationPanelPreferencesStore(e=>e.conversationSort),ze=a.useConversationPanelPreferencesStore(e=>e.setConversationSort),w=a.useConversationPanelPreferencesStore(e=>e.threadScope),Be=a.useConversationPanelPreferencesStore(e=>e.setThreadScope),T=a.useConversationPanelPreferencesStore(e=>e.groupFolderOrder),Ve=a.useConversationPanelPreferencesStore(e=>e.setGroupFolderOrder),[He,E]=c.default.useState(!1),[Ue,We]=c.default.useState(!1),Ge=ie.useClickOutsideElement(()=>{E(!1)}),[Ke,D]=c.default.useState(()=>new Set),[qe,O]=c.default.useState(()=>new Set),[Je,k]=c.default.useState(!1),A=s.usePinnedConversationsStore(e=>e.pinsByBackendId[m.id]??Ee),Ye=s.usePinnedConversationsStore(e=>e.togglePin),Xe=s.usePinnedConversationsStore(e=>e.pruneMissingConversations),Ze=c.default.useCallback(e=>{D(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Qe=c.default.useCallback(e=>{O(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);c.default.useEffect(()=>{S!==`grouped`&&(D(new Set),O(new Set))},[S]);let $e=c.default.useRef(null),[j,M]=c.default.useState(null),[et,N]=c.default.useState(null),[P,tt]=c.default.useState(null),{data:nt,isLoading:rt,isFetched:F,hasNextPage:I,isFetching:L,isFetchingNextPage:R,fetchNextPage:z}=pe.usePaginatedConversations(),{data:B}=me.useStartTasks(),V=c.default.useMemo(()=>{let e=nt?.pages.flatMap(e=>e.items)??[],t=new Set;return e.filter(e=>t.has(e.id)?!1:(t.add(e.id),!0))},[nt]),H=c.default.useMemo(()=>o.resolvePinnedConversations(A,V),[V,A]);c.default.useEffect(()=>{F&&Xe(m.id,V.map(e=>e.id))},[m.id,V,F,Xe]),c.default.useEffect(()=>{A.length===0&&k(!1)},[A.length]);let U=c.default.useMemo(()=>{let e=w===`relevant`?V.filter(e=>r.isExecutionActive(e.execution_status)):V;return u?e:o.filterOutPinnedConversations(e,A)},[u,V,A,w]),{recent:W,older:G}=c.default.useMemo(()=>De(U),[U]),it=c.default.useMemo(()=>o.sortConversationsByField(v?[...W,...G]:W,C),[W,G,v,C]),at=c.default.useMemo(()=>({emptyWorkspace:d(n.I18nKey.CONVERSATION_PANEL$NO_WORKSPACE),emptyRepository:d(n.I18nKey.CONVERSATION_PANEL$NO_REPOSITORY)}),[d]),K=c.default.useMemo(()=>u||S!==`grouped`?null:o.groupConversations([...W,...v?G:[]],m.kind,C,at),[m.kind,u,C,at,G,S,W,v]),q=c.default.useMemo(()=>K?o.applyGroupFolderOrder(K,T):null,[K,T]),ot=c.default.useMemo(()=>K?.map(e=>e.id)??[],[K]),st=c.default.useMemo(()=>o.sortConversationsByField(W.filter(e=>r.isExecutionActive(e.execution_status)),C),[C,W]),ct=it.length,lt=c.default.useMemo(()=>q?q.reduce((e,t)=>e+t.conversations.length,0):0,[q]),ut=S===`grouped`&&!u?lt===0:ct===0,J=S===`grouped`&&!u?lt:ct,[Y,X]=c.default.useState(null),dt=c.default.useRef(J);dt.current=J;let ft=c.default.useCallback(()=>{I&&X(dt.current)},[I]);c.default.useEffect(()=>{if(Y!==null){if(J>Y){X(null);return}if(!I){X(null);return}L||R||z()}},[Y,J,I,L,R,z]);let pt=Y!==null||R,{mutate:mt,mutateAsync:ht}=se.useDeleteConversation(),{mutate:gt}=ce.useUnifiedPauseConversation(),{mutate:_t}=ue.useUpdateConversation(),vt=G.length>0&&!v,yt=!!I&&!vt&&!u&&!ut,{mutate:bt}=ae.useCreateConversation(),Z=le.useIsCreatingConversation(),xt=c.default.useCallback(e=>{Z||bt({workingDir:e.workingDir,repository:e.repository,entryPoint:`sidebar_relaunch_project`},{onSuccess:e=>{p(`/conversations/${e.conversation_id}`)}})},[bt,Z,p]),St=c.default.useCallback((e,t)=>{h(!0),M(e),N(t)},[]),Ct=c.default.useCallback(e=>{g(!0),M(e)},[]),wt=c.default.useCallback((e,t)=>{_t({conversationId:e,newTitle:t},{onSuccess:()=>{te.displaySuccessToast(d(n.I18nKey.CONVERSATION$TITLE_UPDATED))}})},[d,_t]),Tt=()=>{j&&mt({conversationId:j},{onSuccess:()=>{j===f&&p(`/conversations`)}})},Et=()=>{j&&gt({conversationId:j})},Dt=async()=>{let e=V.map(e=>e.id),t=await Promise.allSettled(e.map(e=>ht({conversationId:e}))),n=t.flatMap((t,n)=>t.status===`fulfilled`?[e[n]]:[]),r=t.length-n.length;f!==null&&n.includes(f)&&p(`/conversations`),r>0&&te.displayErrorToast(`${r} conversation${r===1?``:`s`} could not be deleted.`)},Q=c.default.useCallback((t,n)=>{let r=A.includes(t.id);return u?(0,l.jsx)(be.CompactConversationRow,{conversationId:t.id,title:t.title??``,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,lastUpdatedAt:t.updated_at,createdAt:t.created_at,workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,isActive:t.id===f,onClose:e,showRepositoryMetadata:y,llmModel:t.llm_model,showLlmProfiles:b,agentKind:t.agent_kind,acpServer:t.acp_server},t.id):(0,l.jsx)(re.tooltip_default,{placement:`right-start`,delay:1e3,closeDelay:100,isDisabled:!x||P===t.id,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,content:(0,l.jsx)(_e.ConversationCardPreview,{title:t.title??``,executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,llmModel:t.llm_model,createdAt:t.created_at}),children:(0,l.jsx)(oe.NavigationLink,{to:`/conversations/${t.id}`,onClick:e,className:i.cn(`block rounded-md transition-colors`,P!==t.id&&`hover:bg-[var(--oh-surface)]`,(t.id===f||P===t.id)&&`bg-[var(--oh-surface)]`),children:(0,l.jsx)(ge.ConversationCard,{onDelete:()=>St(t.id,t.title??``),onStop:()=>Ct(t.id),onChangeTitle:e=>wt(t.id,e),title:t.title??``,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},lastUpdatedAt:t.updated_at,createdAt:t.created_at,executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,conversationId:t.id,contextMenuOpen:P===t.id,onContextMenuToggle:e=>tt(e?t.id:null),isActive:t.id===f,workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,showRepositoryMetadata:y,llmModel:t.llm_model,showLlmProfiles:b,agentKind:t.agent_kind,acpServer:t.acp_server,isPinned:r,onTogglePin:()=>Ye(m.id,t.id),alwaysShowPinIcon:r&&!n?.inPinnedSection})})},t.id)},[m.id,u,f,wt,St,Ct,e,P,A,y,b,x,Ye]),$=rt||!F,Ot=!u&&!$&&H.length>0,kt=F&&!rt&&!u&&ut&&!Ot&&!B?.length;return(0,l.jsxs)(`div`,{ref:Oe,"data-testid":`conversation-panel`,className:`flex h-full min-h-0 w-full flex-col`,children:[!u&&(0,l.jsx)(`div`,{className:i.cn(`-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b`,Ue?`border-[var(--oh-border)]`:`border-transparent`),children:(0,l.jsxs)(`div`,{"data-testid":`older-conversations-summary`,className:`flex min-w-0 flex-nowrap items-center gap-x-2 py-2 pl-4 pr-2.5 text-[var(--oh-muted)]`,children:[(0,l.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-[var(--oh-muted)]`,children:d(n.I18nKey.SIDEBAR$CONVERSATIONS)}),(0,l.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,l.jsx)(Se.ConversationPanelNewThreadPicker,{backendKind:m.kind}),(0,l.jsx)(xe.ConversationPanelFilterMenu,{filterMenuOpen:He,setFilterMenuOpen:E,menuRef:Ge,backendKind:m.kind,organizeMode:S,setOrganizeMode:Re,conversationSort:C,setConversationSort:ze,threadScope:w,setThreadScope:Be,showOlderConversations:v,toggleShowOlderConversations:Pe,showRepoBranchMetadata:y,toggleShowRepoBranchMetadata:Fe,showLlmProfiles:b,toggleShowLlmProfiles:Ie,showHoverMetadata:x,toggleShowHoverMetadata:Le,totalConversationsCount:V.length,onRequestDeleteAll:()=>_(!0)})]})]})}),(0,l.jsxs)(`div`,{ref:$e,"data-testid":`conversation-panel-list-scroll`,onScroll:e=>{We(e.currentTarget.scrollTop>0)},className:i.cn(`flex min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain custom-scrollbar-always`,!u&&`conversation-panel-list-scroll`),children:[$&&(0,l.jsx)(ye.ConversationCardSkeleton,{compact:u}),!u&&kt&&(0,l.jsx)(`div`,{"data-testid":`conversation-panel-empty-state`,className:`flex min-h-0 flex-1 flex-col items-center justify-center px-4 py-8`,children:(0,l.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:d(n.I18nKey.CONVERSATION$NO_CONVERSATIONS)})}),Ot?(0,l.jsx)(we.ConversationPanelPinnedSection,{pinnedConversations:H,isPreviewExpanded:Je,onTogglePreviewExpanded:()=>k(e=>!e),activeConversationId:f,showDivider:!u&&S===`chronological`,renderConversationCard:e=>Q(e,{inPinnedSection:!0})}):null,!u&&B?.map(t=>(0,l.jsx)(oe.NavigationLink,{to:`/conversations/task-${t.id}`,onClick:e,className:`block`,children:(0,l.jsx)(ve.StartTaskCard,{task:t})},t.id)),!$&&u?st.map(e=>Q(e)):null,!$&&!u&&S===`grouped`&&q&&q.length>0?(0,l.jsx)(Ce.ConversationGroupFolderList,{groups:q,groupIds:ot,groupFolderOrder:T,setGroupFolderOrder:Ve,collapsedGroupIds:Ke,expandedGroupPreviewIds:qe,onToggleGroupCollapsed:Ze,onToggleGroupPreviewExpanded:Qe,isCreatingConversationFlow:Z,activeConversationId:f,onLaunchFromGroup:xt,renderConversationCard:e=>Q(e)}):null,!$&&!u&&S===`chronological`?(0,l.jsx)(`div`,{className:`space-y-0.5`,children:it.map(e=>Q(e))}):null,yt&&(pt?(0,l.jsx)(`div`,{className:`py-1`,children:(0,l.jsx)(ye.ConversationCardSkeleton,{compact:u})}):(0,l.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,l.jsx)(`button`,{type:`button`,"data-testid":`load-more-conversations`,onClick:ft,className:`text-xs text-[var(--oh-muted)] hover:text-white`,children:d(n.I18nKey.CONVERSATION$LOAD_MORE)})}))]}),ke&&(0,l.jsx)(de.ConfirmDeleteModal,{onConfirm:()=>{Tt(),h(!1),N(null)},onCancel:()=>{h(!1),N(null)},conversationTitle:et??void 0}),Ne&&(0,l.jsx)(de.ConfirmDeleteModal,{title:d(n.I18nKey.CONVERSATION$CONFIRM_DELETE_ALL_TITLE),description:d(n.I18nKey.CONVERSATION$CONFIRM_DELETE_ALL_DESC,{count:V.length}),onConfirm:async()=>{await Dt(),_(!1)},onCancel:()=>_(!1)}),Ae&&(0,l.jsx)(fe.ConfirmStopModal,{onConfirm:()=>{Et(),g(!1)},onCancel:()=>g(!1)}),je&&(0,l.jsx)(he.ExitConversationModal,{onConfirm:()=>{e?.()},onClose:()=>Me(!1),onCancel:()=>Me(!1)})]})}exports.ConversationPanel=d;
2
2
  //# sourceMappingURL=conversation-panel.cjs.map
@@ -11,13 +11,13 @@ import { useCreateConversation as ae } from "../../../hooks/mutation/use-create-
11
11
  import { NavigationLink as oe } from "../../shared/navigation-link.js";
12
12
  import { useDeleteConversation as se } from "../../../hooks/mutation/use-delete-conversation.js";
13
13
  import { useUnifiedPauseConversation as ce } from "../../../hooks/mutation/use-unified-stop-conversation.js";
14
- import { useUpdateConversation as le } from "../../../hooks/mutation/use-update-conversation.js";
14
+ import { useIsCreatingConversation as le } from "../../../hooks/use-is-creating-conversation.js";
15
+ import { useUpdateConversation as ue } from "../../../hooks/mutation/use-update-conversation.js";
15
16
  import { ConfirmDeleteModal as a } from "./confirm-delete-modal.js";
16
- import { ConfirmStopModal as ue } from "./confirm-stop-modal.js";
17
- import { usePaginatedConversations as de } from "../../../hooks/query/use-paginated-conversations.js";
18
- import { useStartTasks as fe } from "../../../hooks/query/use-start-tasks.js";
19
- import { ExitConversationModal as pe } from "./exit-conversation-modal.js";
20
- import { useIsCreatingConversation as me } from "../../../hooks/use-is-creating-conversation.js";
17
+ import { ConfirmStopModal as de } from "./confirm-stop-modal.js";
18
+ import { usePaginatedConversations as fe } from "../../../hooks/query/use-paginated-conversations.js";
19
+ import { useStartTasks as pe } from "../../../hooks/query/use-start-tasks.js";
20
+ import { ExitConversationModal as me } from "./exit-conversation-modal.js";
21
21
  import { ConversationCard as he } from "./conversation-card/conversation-card.js";
22
22
  import { ConversationCardPreview as ge } from "./conversation-card/conversation-card-preview.js";
23
23
  import { StartTaskCard as _e } from "./start-task-card/start-task-card.js";
@@ -61,7 +61,7 @@ function p({ onClose: f, compact: p = !1 }) {
61
61
  l.useEffect(() => {
62
62
  E !== "grouped" && (j(/* @__PURE__ */ new Set()), M(/* @__PURE__ */ new Set()));
63
63
  }, [E]);
64
- let et = l.useRef(null), [I, tt] = l.useState(null), [nt, L] = l.useState(null), [R, rt] = l.useState(null), { data: it, isLoading: at, isFetched: z, hasNextPage: B, isFetching: ot, isFetchingNextPage: V, fetchNextPage: st } = de(), { data: ct } = fe(), H = l.useMemo(() => {
64
+ let et = l.useRef(null), [I, tt] = l.useState(null), [nt, L] = l.useState(null), [R, rt] = l.useState(null), { data: it, isLoading: at, isFetched: z, hasNextPage: B, isFetching: ot, isFetchingNextPage: V, fetchNextPage: st } = fe(), { data: ct } = pe(), H = l.useMemo(() => {
65
65
  let e = it?.pages.flatMap((e) => e.items) ?? [], t = /* @__PURE__ */ new Set();
66
66
  return e.filter((e) => t.has(e.id) ? !1 : (t.add(e.id), !0));
67
67
  }, [it]), lt = l.useMemo(() => we(P, H), [H, P]);
@@ -125,7 +125,7 @@ function p({ onClose: f, compact: p = !1 }) {
125
125
  V,
126
126
  st
127
127
  ]);
128
- let bt = J !== null || V, { mutate: xt, mutateAsync: St } = se(), { mutate: Ct } = ce(), { mutate: wt } = le(), Tt = W.length > 0 && !S, Et = !!B && !Tt && !p && !_t, { mutate: Dt } = ae(), X = me(), Ot = l.useCallback((e) => {
128
+ let bt = J !== null || V, { mutate: xt, mutateAsync: St } = se(), { mutate: Ct } = ce(), { mutate: wt } = ue(), Tt = W.length > 0 && !S, Et = !!B && !Tt && !p && !_t, { mutate: Dt } = ae(), X = le(), Ot = l.useCallback((e) => {
129
129
  X || Dt({
130
130
  workingDir: e.workingDir,
131
131
  repository: e.repository,
@@ -370,13 +370,13 @@ function p({ onClose: f, compact: p = !1 }) {
370
370
  },
371
371
  onCancel: () => x(!1)
372
372
  }),
373
- Ne && /* @__PURE__ */ u(ue, {
373
+ Ne && /* @__PURE__ */ u(de, {
374
374
  onConfirm: () => {
375
375
  Nt(), y(!1);
376
376
  },
377
377
  onCancel: () => y(!1)
378
378
  }),
379
- Pe && /* @__PURE__ */ u(pe, {
379
+ Pe && /* @__PURE__ */ u(me, {
380
380
  onConfirm: () => {
381
381
  f?.();
382
382
  },
@@ -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(`../../../utils/retrieve-axios-error-message.cjs`),a=require(`../../../utils/custom-toast-handlers.cjs`),o=require(`../../../contexts/active-backend-context.cjs`),s=require(`../../shared/modals/modal-backdrop.cjs`),c=require(`../../../utils/modal-classes.cjs`),l=require(`../../shared/modals/modal-close-button.cjs`),u=require(`../../shared/modals/confirmation-modal.cjs`),d=require(`../../../hooks/mutation/use-delete-mcp-server.cjs`),f=require(`../../../hooks/mutation/use-add-mcp-server.cjs`),p=require(`../../../api/mcp-service/mcp-service.api.cjs`),m=require(`../../../hooks/mutation/use-test-mcp-server.cjs`),h=require(`../settings/mcp-settings/mcp-server-form.cjs`),g=require(`../../../hooks/mutation/use-update-mcp-server.cjs`);let _=require(`react`);_=e.__toESM(_,1);let v=require(`react/jsx-runtime`);function y({server:e,existingServers:y,onClose:b}){let{t:x}=t.useTranslation(`openhands`),{mutate:S,isPending:C}=f.useAddMcpServer(),{mutate:w,isPending:T}=g.useUpdateMcpServer(),{mutate:E,isPending:D}=d.useDeleteMcpServer(),{mutate:O,isPending:k,data:A,reset:j}=m.useTestMcpServer(),[M,N]=_.default.useState(!1),[P,F]=_.default.useState(null),[I,L]=_.default.useState(!1),{backend:R}=o.useActiveBackend(),z=R.kind===`cloud`,B=!!e.id,V=C||T||D,H=V||k||I||M,U=e=>{switch(e.error_kind){case`timeout`:return x(n.I18nKey.MCP$TEST_ERROR_TIMEOUT);case`connection`:return x(n.I18nKey.MCP$TEST_ERROR_CONNECTION);case`credentials`:return x(n.I18nKey.MCP$TEST_ERROR_CREDENTIALS,{error:e.error});default:return x(n.I18nKey.MCP$TEST_ERROR_UNKNOWN,{error:e.error})}},W=_.default.useMemo(()=>{let e=P??A;return e?e.ok?{ok:!0,text:x(n.I18nKey.MCP$TEST_SUCCESS,{count:e.tools.length})}:{ok:!1,text:U(e)}:null},[P,A,x]),G=e=>{a.displayErrorToast(i.retrieveAxiosErrorMessage(e)||x(n.I18nKey.ERROR$GENERIC))};return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(s.ModalBackdrop,{onClose:H?void 0:b,closeOnEscape:!H,"aria-label":x(B?n.I18nKey.MCP$EDIT_CUSTOM_TITLE:n.I18nKey.MCP$ADD_CUSTOM_TITLE),children:(0,v.jsxs)(`div`,{"data-testid":`mcp-custom-editor`,className:`relative bg-base-secondary p-6 rounded-xl border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[90vh] overflow-y-auto custom-scrollbar`,children:[(0,v.jsx)(l.ModalCloseButton,{onClose:b,testId:`mcp-custom-editor-close`,disabled:H}),(0,v.jsx)(`h2`,{className:r.cn(`mb-4 pr-6`,c.modalTitleLgClassName),children:x(B?n.I18nKey.MCP$EDIT_CUSTOM_TITLE:n.I18nKey.MCP$ADD_CUSTOM_TITLE)}),(0,v.jsx)(h.MCPServerForm,{mode:B?`edit`:`add`,server:B?e:void 0,existingServers:y,onSubmit:t=>{if(j(),F(null),t.auth?.strategy===`oauth2`){L(!0),p.default.authorizeOAuth(t).then(n=>{if(F(n),!n.ok)return;let r=n.oauth_state?{...t,auth:{...t.auth,state:n.oauth_state}}:t;B?w({serverId:e.id,server:r},{onSuccess:b,onError:G}):S(r,{onSuccess:b,onError:G})}).catch(G).finally(()=>L(!1));return}O(t,{onSuccess:n=>{if(!n.ok)return;let r=n.oauth_state&&t.auth?.strategy===`oauth2`?{...t,auth:{...t.auth,state:n.oauth_state}}:t;B?w({serverId:e.id,server:r},{onSuccess:b,onError:G}):S(r,{onSuccess:b,onError:G})},onError:G})},onCancel:b,onDelete:B?()=>N(!0):void 0,isActionDisabled:V,onTest:z?void 0:e=>{if(F(null),e.auth?.strategy===`oauth2`&&!z){L(!0),p.default.authorizeOAuth(e).then(F).catch(G).finally(()=>L(!1));return}O(e)},isTestPending:k||I,testMessage:z?null:W})]})}),M?(0,v.jsx)(u.ConfirmationModal,{text:x(n.I18nKey.SETTINGS$MCP_CONFIRM_DELETE),onCancel:()=>N(!1),onConfirm:()=>{E(e,{onSuccess:()=>{a.displaySuccessToast(x(n.I18nKey.MCP$REMOVE_SUCCESS)),N(!1),b()},onError:e=>{G(e),N(!1)}})},isConfirming:D}):null]})}exports.CustomServerEditor=y;
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(`../../../utils/retrieve-axios-error-message.cjs`),a=require(`../../../utils/custom-toast-handlers.cjs`),o=require(`../../../contexts/active-backend-context.cjs`),s=require(`../../shared/modals/modal-backdrop.cjs`),c=require(`../../../utils/modal-classes.cjs`),l=require(`../../shared/modals/modal-close-button.cjs`),u=require(`../../shared/modals/confirmation-modal.cjs`),d=require(`../../../hooks/mutation/use-delete-mcp-server.cjs`),f=require(`../../../api/mcp-service/mcp-service.api.cjs`),p=require(`../../../api/mcp-health/probe-mcp-server-health.cjs`),m=require(`../../../hooks/mutation/use-update-mcp-server.cjs`),h=require(`../../../utils/mcp-test-error-message.cjs`),g=require(`../../../hooks/mutation/use-add-mcp-server.cjs`),_=require(`../../../hooks/mutation/use-test-mcp-server.cjs`),v=require(`../settings/mcp-settings/mcp-server-form.cjs`);let y=require(`react`);y=e.__toESM(y,1);let b=require(`react/jsx-runtime`);function x({server:e,existingServers:x,onClose:S}){let{t:C}=t.useTranslation(`openhands`),{mutate:w,isPending:T}=g.useAddMcpServer(),{mutate:E,isPending:D}=m.useUpdateMcpServer(),{mutate:O,isPending:k}=d.useDeleteMcpServer(),{mutate:A,isPending:j,data:M,reset:N}=_.useTestMcpServer(),[P,F]=y.default.useState(!1),[I,L]=y.default.useState(null),[R,z]=y.default.useState(!1),{backend:B}=o.useActiveBackend(),V=B.kind===`cloud`,H=!!e.id,U=T||D||k,W=U||j||R||P,G=y.default.useMemo(()=>{let e=I??M;return e?e.ok?{ok:!0,text:C(n.I18nKey.MCP$TEST_SUCCESS,{count:e.tools.length})}:{ok:!1,text:h.makeMcpTestErrorMessage(C,e.error_kind,e.error)}:null},[I,M,C]),K=(t,n)=>{V||p.seedMcpServerHealth(t,n,H?x.filter(t=>t.id!==e.id):x)},q=e=>{a.displayErrorToast(i.retrieveAxiosErrorMessage(e)||C(n.I18nKey.ERROR$GENERIC))};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s.ModalBackdrop,{onClose:W?void 0:S,closeOnEscape:!W,"aria-label":C(H?n.I18nKey.MCP$EDIT_CUSTOM_TITLE:n.I18nKey.MCP$ADD_CUSTOM_TITLE),children:(0,b.jsxs)(`div`,{"data-testid":`mcp-custom-editor`,className:`relative bg-base-secondary p-6 rounded-xl border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[90vh] overflow-y-auto custom-scrollbar`,children:[(0,b.jsx)(l.ModalCloseButton,{onClose:S,testId:`mcp-custom-editor-close`,disabled:W}),(0,b.jsx)(`h2`,{className:r.cn(`mb-4 pr-6`,c.modalTitleLgClassName),children:C(H?n.I18nKey.MCP$EDIT_CUSTOM_TITLE:n.I18nKey.MCP$ADD_CUSTOM_TITLE)}),(0,b.jsx)(v.MCPServerForm,{mode:H?`edit`:`add`,server:H?e:void 0,existingServers:x,onSubmit:t=>{if(N(),L(null),t.auth?.strategy===`oauth2`){z(!0),f.default.authorizeOAuth(t).then(n=>{if(L(n),!n.ok)return;let r=n.oauth_state?{...t,auth:{...t.auth,state:n.oauth_state}}:t,i=()=>{K(r,n),S()};H?E({serverId:e.id,server:r},{onSuccess:i,onError:q}):w(r,{onSuccess:i,onError:q})}).catch(q).finally(()=>z(!1));return}A(t,{onSuccess:n=>{if(!n.ok)return;let r=n.oauth_state&&t.auth?.strategy===`oauth2`?{...t,auth:{...t.auth,state:n.oauth_state}}:t,i=()=>{K(r,n),S()};H?E({serverId:e.id,server:r},{onSuccess:i,onError:q}):w(r,{onSuccess:i,onError:q})},onError:q})},onCancel:S,onDelete:H?()=>F(!0):void 0,isActionDisabled:U,onTest:V?void 0:e=>{if(L(null),e.auth?.strategy===`oauth2`&&!V){z(!0),f.default.authorizeOAuth(e).then(L).catch(q).finally(()=>z(!1));return}A(e)},isTestPending:j||R,testMessage:V?null:G})]})}),P?(0,b.jsx)(u.ConfirmationModal,{text:C(n.I18nKey.SETTINGS$MCP_CONFIRM_DELETE),onCancel:()=>F(!1),onConfirm:()=>{O(e,{onSuccess:()=>{a.displaySuccessToast(C(n.I18nKey.MCP$REMOVE_SUCCESS)),F(!1),S()},onError:e=>{q(e),F(!1)}})},isConfirming:k}):null]})}exports.CustomServerEditor=x;
2
2
  //# sourceMappingURL=custom-server-editor.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom-server-editor.cjs","names":[],"sources":["../../../../src/components/features/mcp-page/custom-server-editor.tsx"],"sourcesContent":["import React from \"react\";\nimport { AxiosError } from \"axios\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ModalBackdrop } from \"#/components/shared/modals/modal-backdrop\";\nimport { ModalCloseButton } from \"#/components/shared/modals/modal-close-button\";\nimport { ConfirmationModal } from \"#/components/shared/modals/confirmation-modal\";\nimport {\n MCPServerForm,\n type TestMessage,\n} from \"#/components/features/settings/mcp-settings/mcp-server-form\";\nimport { useAddMcpServer } from \"#/hooks/mutation/use-add-mcp-server\";\nimport { useUpdateMcpServer } from \"#/hooks/mutation/use-update-mcp-server\";\nimport { useDeleteMcpServer } from \"#/hooks/mutation/use-delete-mcp-server\";\nimport { useTestMcpServer } from \"#/hooks/mutation/use-test-mcp-server\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport {\n ExtendedMCPTestFailure,\n ExtendedMCPTestResponse,\n MCPServerConfig,\n} from \"#/types/mcp-server\";\nimport {\n displayErrorToast,\n displaySuccessToast,\n} from \"#/utils/custom-toast-handlers\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\nimport { cn } from \"#/utils/utils\";\nimport { modalTitleLgClassName } from \"#/utils/modal-classes\";\nimport McpService from \"#/api/mcp-service/mcp-service.api\";\n\ninterface CustomServerEditorProps {\n server: MCPServerConfig;\n existingServers: MCPServerConfig[];\n onClose: () => void;\n}\n\n/**\n * Modal wrapper around `MCPServerForm` so users can hand-author\n * arbitrary stdio / SSE / SHTTP entries without reaching for raw JSON.\n * An empty `server.id` means \"Add new\".\n */\nexport function CustomServerEditor({\n server,\n existingServers,\n onClose,\n}: CustomServerEditorProps) {\n const { t } = useTranslation(\"openhands\");\n const { mutate: addMcpServer, isPending: isAdding } = useAddMcpServer();\n const { mutate: updateMcpServer, isPending: isUpdating } =\n useUpdateMcpServer();\n const { mutate: deleteMcpServer, isPending: isDeleting } =\n useDeleteMcpServer();\n const {\n mutate: testServer,\n isPending: isTesting,\n data: testResult,\n reset: resetTest,\n } = useTestMcpServer();\n const [showDeleteConfirm, setShowDeleteConfirm] = React.useState(false);\n const [oauthTestResult, setOauthTestResult] =\n React.useState<ExtendedMCPTestResponse | null>(null);\n const [isOauthTesting, setIsOauthTesting] = React.useState(false);\n\n // The MCP connectivity-test endpoint only exists on the local agent-server.\n // For cloud backends `McpService.testServer` short-circuits with a synthetic\n // success so the save still completes; we hide the manual \"Test connection\"\n // button here so cloud users aren't shown a misleading \"0 tools\" result.\n const { backend } = useActiveBackend();\n const isCloudBackend = backend.kind === \"cloud\";\n\n const isEditing = !!server.id;\n const isPending = isAdding || isUpdating || isDeleting;\n const isDismissBlocked =\n isPending || isTesting || isOauthTesting || showDeleteConfirm;\n\n const makeTestErrorMessage = (failure: ExtendedMCPTestFailure): string => {\n switch (failure.error_kind) {\n case \"timeout\":\n return t(I18nKey.MCP$TEST_ERROR_TIMEOUT);\n case \"connection\":\n return t(I18nKey.MCP$TEST_ERROR_CONNECTION);\n case \"credentials\":\n return t(I18nKey.MCP$TEST_ERROR_CREDENTIALS, { error: failure.error });\n default:\n return t(I18nKey.MCP$TEST_ERROR_UNKNOWN, { error: failure.error });\n }\n };\n\n const testMessage: TestMessage | null = React.useMemo(() => {\n const result = oauthTestResult ?? testResult;\n if (!result) return null;\n if (result.ok) {\n return {\n ok: true,\n text: t(I18nKey.MCP$TEST_SUCCESS, { count: result.tools.length }),\n };\n }\n return { ok: false, text: makeTestErrorMessage(result) };\n }, [oauthTestResult, testResult, t]);\n\n // Shared error handler so both add and update surface backend errors\n // as a toast instead of failing silently — previously these calls\n // had no `onError` and the modal closed even on a 4xx/5xx, leaving\n // the user to discover the failure on the next page load.\n const handleError = (err: unknown) => {\n const message = retrieveAxiosErrorMessage(err as AxiosError);\n displayErrorToast(message || t(I18nKey.ERROR$GENERIC));\n };\n\n const handleSubmit = (payload: MCPServerConfig) => {\n resetTest();\n setOauthTestResult(null);\n if (payload.auth?.strategy === \"oauth2\") {\n setIsOauthTesting(true);\n void McpService.authorizeOAuth(payload)\n .then((result) => {\n setOauthTestResult(result);\n if (!result.ok) return;\n const serverToSave = result.oauth_state\n ? {\n ...payload,\n auth: { ...payload.auth!, state: result.oauth_state },\n }\n : payload;\n if (isEditing) {\n updateMcpServer(\n { serverId: server.id, server: serverToSave },\n { onSuccess: onClose, onError: handleError },\n );\n } else {\n addMcpServer(serverToSave, {\n onSuccess: onClose,\n onError: handleError,\n });\n }\n })\n .catch(handleError)\n .finally(() => setIsOauthTesting(false));\n return;\n }\n testServer(payload, {\n onSuccess: (result) => {\n if (!result.ok) {\n // Test failed — modal stays open, error shown via testMessage.\n return;\n }\n const serverToSave =\n result.oauth_state && payload.auth?.strategy === \"oauth2\"\n ? {\n ...payload,\n auth: { ...payload.auth, state: result.oauth_state },\n }\n : payload;\n if (isEditing) {\n updateMcpServer(\n { serverId: server.id, server: serverToSave },\n { onSuccess: onClose, onError: handleError },\n );\n } else {\n addMcpServer(serverToSave, {\n onSuccess: onClose,\n onError: handleError,\n });\n }\n },\n onError: handleError,\n });\n };\n\n const handleTestClick = (payload: MCPServerConfig) => {\n setOauthTestResult(null);\n if (payload.auth?.strategy === \"oauth2\" && !isCloudBackend) {\n setIsOauthTesting(true);\n void McpService.authorizeOAuth(payload)\n .then(setOauthTestResult)\n .catch(handleError)\n .finally(() => setIsOauthTesting(false));\n return;\n }\n testServer(payload);\n };\n\n const handleConfirmDelete = () => {\n deleteMcpServer(server, {\n onSuccess: () => {\n displaySuccessToast(t(I18nKey.MCP$REMOVE_SUCCESS));\n setShowDeleteConfirm(false);\n onClose();\n },\n onError: (err) => {\n handleError(err);\n setShowDeleteConfirm(false);\n },\n });\n };\n\n return (\n <>\n <ModalBackdrop\n // Block backdrop-click / Escape from dismissing the modal while\n // a mutation is in flight — closing mid-request would orphan\n // the request and leave the user with no error feedback.\n onClose={isDismissBlocked ? undefined : onClose}\n closeOnEscape={!isDismissBlocked}\n aria-label={\n isEditing\n ? t(I18nKey.MCP$EDIT_CUSTOM_TITLE)\n : t(I18nKey.MCP$ADD_CUSTOM_TITLE)\n }\n >\n <div\n data-testid=\"mcp-custom-editor\"\n className=\"relative bg-base-secondary p-6 rounded-xl border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[90vh] overflow-y-auto custom-scrollbar\"\n >\n <ModalCloseButton\n onClose={onClose}\n testId=\"mcp-custom-editor-close\"\n disabled={isDismissBlocked}\n />\n <h2 className={cn(\"mb-4 pr-6\", modalTitleLgClassName)}>\n {isEditing\n ? t(I18nKey.MCP$EDIT_CUSTOM_TITLE)\n : t(I18nKey.MCP$ADD_CUSTOM_TITLE)}\n </h2>\n <MCPServerForm\n mode={isEditing ? \"edit\" : \"add\"}\n server={isEditing ? server : undefined}\n existingServers={existingServers}\n onSubmit={handleSubmit}\n onCancel={onClose}\n onDelete={isEditing ? () => setShowDeleteConfirm(true) : undefined}\n isActionDisabled={isPending}\n onTest={isCloudBackend ? undefined : handleTestClick}\n isTestPending={isTesting || isOauthTesting}\n testMessage={isCloudBackend ? null : testMessage}\n />\n </div>\n </ModalBackdrop>\n\n {showDeleteConfirm ? (\n <ConfirmationModal\n text={t(I18nKey.SETTINGS$MCP_CONFIRM_DELETE)}\n onCancel={() => setShowDeleteConfirm(false)}\n onConfirm={handleConfirmDelete}\n isConfirming={isDeleting}\n />\n ) : null}\n </>\n );\n}\n"],"mappings":"6gCAyCA,SAAgB,EAAmB,CACjC,SACA,kBACA,WAC0B,CAC1B,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CACnC,CAAE,OAAQ,EAAc,UAAW,GAAa,EAAA,iBAAiB,CACjE,CAAE,OAAQ,EAAiB,UAAW,GAC1C,EAAA,oBAAoB,CAChB,CAAE,OAAQ,EAAiB,UAAW,GAC1C,EAAA,oBAAoB,CAChB,CACJ,OAAQ,EACR,UAAW,EACX,KAAM,EACN,MAAO,GACL,EAAA,kBAAkB,CAChB,CAAC,EAAmB,GAAwB,EAAA,QAAM,SAAS,GAAM,CACjE,CAAC,EAAiB,GACtB,EAAA,QAAM,SAAyC,KAAK,CAChD,CAAC,EAAgB,GAAqB,EAAA,QAAM,SAAS,GAAM,CAM3D,CAAE,WAAY,EAAA,kBAAkB,CAChC,EAAiB,EAAQ,OAAS,QAElC,EAAY,CAAC,CAAC,EAAO,GACrB,EAAY,GAAY,GAAc,EACtC,EACJ,GAAa,GAAa,GAAkB,EAExC,EAAwB,GAA4C,CACxE,OAAQ,EAAQ,WAAhB,CACE,IAAK,UACH,OAAO,EAAE,EAAA,QAAQ,uBAAuB,CAC1C,IAAK,aACH,OAAO,EAAE,EAAA,QAAQ,0BAA0B,CAC7C,IAAK,cACH,OAAO,EAAE,EAAA,QAAQ,2BAA4B,CAAE,MAAO,EAAQ,MAAO,CAAC,CACxE,QACE,OAAO,EAAE,EAAA,QAAQ,uBAAwB,CAAE,MAAO,EAAQ,MAAO,CAAC,GAIlE,EAAkC,EAAA,QAAM,YAAc,CAC1D,IAAM,EAAS,GAAmB,EAQlC,OAPK,EACD,EAAO,GACF,CACL,GAAI,GACJ,KAAM,EAAE,EAAA,QAAQ,iBAAkB,CAAE,MAAO,EAAO,MAAM,OAAQ,CAAC,CAClE,CAEI,CAAE,GAAI,GAAO,KAAM,EAAqB,EAAO,CAAE,CAPpC,MAQnB,CAAC,EAAiB,EAAY,EAAE,CAAC,CAM9B,EAAe,GAAiB,CAEpC,EAAA,kBADgB,EAAA,0BAA0B,EACxB,EAAW,EAAE,EAAA,QAAQ,cAAc,CAAC,EA0FxD,OACE,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAA,cAAD,CAIE,QAAS,EAAmB,IAAA,GAAY,EACxC,cAAe,CAAC,EAChB,aAEM,EADJ,EACM,EAAA,QAAQ,sBACR,EAAA,QAAQ,qBAAqB,WAGrC,EAAA,EAAA,MAAC,MAAD,CACE,cAAY,oBACZ,UAAU,2JAFZ,EAIE,EAAA,EAAA,KAAC,EAAA,iBAAD,CACW,UACT,OAAO,0BACP,SAAU,EACV,CAAA,EACF,EAAA,EAAA,KAAC,KAAD,CAAI,UAAW,EAAA,GAAG,YAAa,EAAA,sBAAsB,UAE/C,EADH,EACK,EAAA,QAAQ,sBACR,EAAA,QAAQ,qBAAqB,CAChC,CAAA,EACL,EAAA,EAAA,KAAC,EAAA,cAAD,CACE,KAAM,EAAY,OAAS,MAC3B,OAAQ,EAAY,EAAS,IAAA,GACZ,kBACjB,SAvHY,GAA6B,CAGjD,GAFA,GAAW,CACX,EAAmB,KAAK,CACpB,EAAQ,MAAM,WAAa,SAAU,CACvC,EAAkB,GAAK,CAClB,EAAA,QAAW,eAAe,EAAQ,CACpC,KAAM,GAAW,CAEhB,GADA,EAAmB,EAAO,CACtB,CAAC,EAAO,GAAI,OAChB,IAAM,EAAe,EAAO,YACxB,CACE,GAAG,EACH,KAAM,CAAE,GAAG,EAAQ,KAAO,MAAO,EAAO,YAAa,CACtD,CACD,EACA,EACF,EACE,CAAE,SAAU,EAAO,GAAI,OAAQ,EAAc,CAC7C,CAAE,UAAW,EAAS,QAAS,EAAa,CAC7C,CAED,EAAa,EAAc,CACzB,UAAW,EACX,QAAS,EACV,CAAC,EAEJ,CACD,MAAM,EAAY,CAClB,YAAc,EAAkB,GAAM,CAAC,CAC1C,OAEF,EAAW,EAAS,CAClB,UAAY,GAAW,CACrB,GAAI,CAAC,EAAO,GAEV,OAEF,IAAM,EACJ,EAAO,aAAe,EAAQ,MAAM,WAAa,SAC7C,CACE,GAAG,EACH,KAAM,CAAE,GAAG,EAAQ,KAAM,MAAO,EAAO,YAAa,CACrD,CACD,EACF,EACF,EACE,CAAE,SAAU,EAAO,GAAI,OAAQ,EAAc,CAC7C,CAAE,UAAW,EAAS,QAAS,EAAa,CAC7C,CAED,EAAa,EAAc,CACzB,UAAW,EACX,QAAS,EACV,CAAC,EAGN,QAAS,EACV,CAAC,EA+DM,SAAU,EACV,SAAU,MAAkB,EAAqB,GAAK,CAAG,IAAA,GACzD,iBAAkB,EAClB,OAAQ,EAAiB,IAAA,GA/DV,GAA6B,CAEpD,GADA,EAAmB,KAAK,CACpB,EAAQ,MAAM,WAAa,UAAY,CAAC,EAAgB,CAC1D,EAAkB,GAAK,CAClB,EAAA,QAAW,eAAe,EAAQ,CACpC,KAAK,EAAmB,CACxB,MAAM,EAAY,CAClB,YAAc,EAAkB,GAAM,CAAC,CAC1C,OAEF,EAAW,EAAQ,EAsDX,cAAe,GAAa,EAC5B,YAAa,EAAiB,KAAO,EACrC,CAAA,CACE,GACQ,CAAA,CAEf,GACC,EAAA,EAAA,KAAC,EAAA,kBAAD,CACE,KAAM,EAAE,EAAA,QAAQ,4BAA4B,CAC5C,aAAgB,EAAqB,GAAM,CAC3C,cA7D0B,CAChC,EAAgB,EAAQ,CACtB,cAAiB,CACf,EAAA,oBAAoB,EAAE,EAAA,QAAQ,mBAAmB,CAAC,CAClD,EAAqB,GAAM,CAC3B,GAAS,EAEX,QAAU,GAAQ,CAChB,EAAY,EAAI,CAChB,EAAqB,GAAM,EAE9B,CAAC,EAmDI,aAAc,EACd,CAAA,CACA,KACH,CAAA,CAAA"}
1
+ {"version":3,"file":"custom-server-editor.cjs","names":[],"sources":["../../../../src/components/features/mcp-page/custom-server-editor.tsx"],"sourcesContent":["import React from \"react\";\nimport { AxiosError } from \"axios\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ModalBackdrop } from \"#/components/shared/modals/modal-backdrop\";\nimport { ModalCloseButton } from \"#/components/shared/modals/modal-close-button\";\nimport { ConfirmationModal } from \"#/components/shared/modals/confirmation-modal\";\nimport {\n MCPServerForm,\n type TestMessage,\n} from \"#/components/features/settings/mcp-settings/mcp-server-form\";\nimport { seedMcpServerHealth } from \"#/api/mcp-health/probe-mcp-server-health\";\nimport { useAddMcpServer } from \"#/hooks/mutation/use-add-mcp-server\";\nimport { useUpdateMcpServer } from \"#/hooks/mutation/use-update-mcp-server\";\nimport { useDeleteMcpServer } from \"#/hooks/mutation/use-delete-mcp-server\";\nimport { useTestMcpServer } from \"#/hooks/mutation/use-test-mcp-server\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { ExtendedMCPTestResponse, MCPServerConfig } from \"#/types/mcp-server\";\nimport {\n displayErrorToast,\n displaySuccessToast,\n} from \"#/utils/custom-toast-handlers\";\nimport { makeMcpTestErrorMessage } from \"#/utils/mcp-test-error-message\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\nimport { cn } from \"#/utils/utils\";\nimport { modalTitleLgClassName } from \"#/utils/modal-classes\";\nimport McpService from \"#/api/mcp-service/mcp-service.api\";\n\ninterface CustomServerEditorProps {\n server: MCPServerConfig;\n existingServers: MCPServerConfig[];\n onClose: () => void;\n}\n\n/**\n * Modal wrapper around `MCPServerForm` so users can hand-author\n * arbitrary stdio / SSE / SHTTP entries without reaching for raw JSON.\n * An empty `server.id` means \"Add new\".\n */\nexport function CustomServerEditor({\n server,\n existingServers,\n onClose,\n}: CustomServerEditorProps) {\n const { t } = useTranslation(\"openhands\");\n const { mutate: addMcpServer, isPending: isAdding } = useAddMcpServer();\n const { mutate: updateMcpServer, isPending: isUpdating } =\n useUpdateMcpServer();\n const { mutate: deleteMcpServer, isPending: isDeleting } =\n useDeleteMcpServer();\n const {\n mutate: testServer,\n isPending: isTesting,\n data: testResult,\n reset: resetTest,\n } = useTestMcpServer();\n const [showDeleteConfirm, setShowDeleteConfirm] = React.useState(false);\n const [oauthTestResult, setOauthTestResult] =\n React.useState<ExtendedMCPTestResponse | null>(null);\n const [isOauthTesting, setIsOauthTesting] = React.useState(false);\n\n // The MCP connectivity-test endpoint only exists on the local agent-server.\n // For cloud backends `McpService.testServer` short-circuits with a synthetic\n // success so the save still completes; we hide the manual \"Test connection\"\n // button here so cloud users aren't shown a misleading \"0 tools\" result.\n const { backend } = useActiveBackend();\n const isCloudBackend = backend.kind === \"cloud\";\n\n const isEditing = !!server.id;\n const isPending = isAdding || isUpdating || isDeleting;\n const isDismissBlocked =\n isPending || isTesting || isOauthTesting || showDeleteConfirm;\n\n const testMessage: TestMessage | null = React.useMemo(() => {\n const result = oauthTestResult ?? testResult;\n if (!result) return null;\n if (result.ok) {\n return {\n ok: true,\n text: t(I18nKey.MCP$TEST_SUCCESS, { count: result.tools.length }),\n };\n }\n return {\n ok: false,\n text: makeMcpTestErrorMessage(t, result.error_kind, result.error),\n };\n }, [oauthTestResult, testResult, t]);\n\n // A save always follows a fresh successful probe of the exact config being\n // saved, so publish that result to the card's health entry. On cloud\n // backends the probe is synthetic — never present it as a health verdict.\n const seedSavedServerHealth = (\n serverToSave: MCPServerConfig,\n result: ExtendedMCPTestResponse,\n ) => {\n if (isCloudBackend) return;\n // When editing, the server's own entry must be overwritten, so only the\n // OTHER servers guard against a same-key collision.\n const otherServers = isEditing\n ? existingServers.filter((existing) => existing.id !== server.id)\n : existingServers;\n seedMcpServerHealth(serverToSave, result, otherServers);\n };\n\n // Shared error handler so both add and update surface backend errors\n // as a toast instead of failing silently — previously these calls\n // had no `onError` and the modal closed even on a 4xx/5xx, leaving\n // the user to discover the failure on the next page load.\n const handleError = (err: unknown) => {\n const message = retrieveAxiosErrorMessage(err as AxiosError);\n displayErrorToast(message || t(I18nKey.ERROR$GENERIC));\n };\n\n const handleSubmit = (payload: MCPServerConfig) => {\n resetTest();\n setOauthTestResult(null);\n if (payload.auth?.strategy === \"oauth2\") {\n setIsOauthTesting(true);\n void McpService.authorizeOAuth(payload)\n .then((result) => {\n setOauthTestResult(result);\n if (!result.ok) return;\n const serverToSave = result.oauth_state\n ? {\n ...payload,\n auth: { ...payload.auth!, state: result.oauth_state },\n }\n : payload;\n const onSaved = () => {\n seedSavedServerHealth(serverToSave, result);\n onClose();\n };\n if (isEditing) {\n updateMcpServer(\n { serverId: server.id, server: serverToSave },\n { onSuccess: onSaved, onError: handleError },\n );\n } else {\n addMcpServer(serverToSave, {\n onSuccess: onSaved,\n onError: handleError,\n });\n }\n })\n .catch(handleError)\n .finally(() => setIsOauthTesting(false));\n return;\n }\n testServer(payload, {\n onSuccess: (result) => {\n if (!result.ok) {\n // Test failed — modal stays open, error shown via testMessage.\n return;\n }\n const serverToSave =\n result.oauth_state && payload.auth?.strategy === \"oauth2\"\n ? {\n ...payload,\n auth: { ...payload.auth, state: result.oauth_state },\n }\n : payload;\n const onSaved = () => {\n seedSavedServerHealth(serverToSave, result);\n onClose();\n };\n if (isEditing) {\n updateMcpServer(\n { serverId: server.id, server: serverToSave },\n { onSuccess: onSaved, onError: handleError },\n );\n } else {\n addMcpServer(serverToSave, {\n onSuccess: onSaved,\n onError: handleError,\n });\n }\n },\n onError: handleError,\n });\n };\n\n const handleTestClick = (payload: MCPServerConfig) => {\n setOauthTestResult(null);\n if (payload.auth?.strategy === \"oauth2\" && !isCloudBackend) {\n setIsOauthTesting(true);\n void McpService.authorizeOAuth(payload)\n .then(setOauthTestResult)\n .catch(handleError)\n .finally(() => setIsOauthTesting(false));\n return;\n }\n testServer(payload);\n };\n\n const handleConfirmDelete = () => {\n deleteMcpServer(server, {\n onSuccess: () => {\n displaySuccessToast(t(I18nKey.MCP$REMOVE_SUCCESS));\n setShowDeleteConfirm(false);\n onClose();\n },\n onError: (err) => {\n handleError(err);\n setShowDeleteConfirm(false);\n },\n });\n };\n\n return (\n <>\n <ModalBackdrop\n // Block backdrop-click / Escape from dismissing the modal while\n // a mutation is in flight — closing mid-request would orphan\n // the request and leave the user with no error feedback.\n onClose={isDismissBlocked ? undefined : onClose}\n closeOnEscape={!isDismissBlocked}\n aria-label={\n isEditing\n ? t(I18nKey.MCP$EDIT_CUSTOM_TITLE)\n : t(I18nKey.MCP$ADD_CUSTOM_TITLE)\n }\n >\n <div\n data-testid=\"mcp-custom-editor\"\n className=\"relative bg-base-secondary p-6 rounded-xl border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[90vh] overflow-y-auto custom-scrollbar\"\n >\n <ModalCloseButton\n onClose={onClose}\n testId=\"mcp-custom-editor-close\"\n disabled={isDismissBlocked}\n />\n <h2 className={cn(\"mb-4 pr-6\", modalTitleLgClassName)}>\n {isEditing\n ? t(I18nKey.MCP$EDIT_CUSTOM_TITLE)\n : t(I18nKey.MCP$ADD_CUSTOM_TITLE)}\n </h2>\n <MCPServerForm\n mode={isEditing ? \"edit\" : \"add\"}\n server={isEditing ? server : undefined}\n existingServers={existingServers}\n onSubmit={handleSubmit}\n onCancel={onClose}\n onDelete={isEditing ? () => setShowDeleteConfirm(true) : undefined}\n isActionDisabled={isPending}\n onTest={isCloudBackend ? undefined : handleTestClick}\n isTestPending={isTesting || isOauthTesting}\n testMessage={isCloudBackend ? null : testMessage}\n />\n </div>\n </ModalBackdrop>\n\n {showDeleteConfirm ? (\n <ConfirmationModal\n text={t(I18nKey.SETTINGS$MCP_CONFIRM_DELETE)}\n onCancel={() => setShowDeleteConfirm(false)}\n onConfirm={handleConfirmDelete}\n isConfirming={isDeleting}\n />\n ) : null}\n </>\n );\n}\n"],"mappings":"qoCAuCA,SAAgB,EAAmB,CACjC,SACA,kBACA,WAC0B,CAC1B,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CACnC,CAAE,OAAQ,EAAc,UAAW,GAAa,EAAA,iBAAiB,CACjE,CAAE,OAAQ,EAAiB,UAAW,GAC1C,EAAA,oBAAoB,CAChB,CAAE,OAAQ,EAAiB,UAAW,GAC1C,EAAA,oBAAoB,CAChB,CACJ,OAAQ,EACR,UAAW,EACX,KAAM,EACN,MAAO,GACL,EAAA,kBAAkB,CAChB,CAAC,EAAmB,GAAwB,EAAA,QAAM,SAAS,GAAM,CACjE,CAAC,EAAiB,GACtB,EAAA,QAAM,SAAyC,KAAK,CAChD,CAAC,EAAgB,GAAqB,EAAA,QAAM,SAAS,GAAM,CAM3D,CAAE,WAAY,EAAA,kBAAkB,CAChC,EAAiB,EAAQ,OAAS,QAElC,EAAY,CAAC,CAAC,EAAO,GACrB,EAAY,GAAY,GAAc,EACtC,EACJ,GAAa,GAAa,GAAkB,EAExC,EAAkC,EAAA,QAAM,YAAc,CAC1D,IAAM,EAAS,GAAmB,EAQlC,OAPK,EACD,EAAO,GACF,CACL,GAAI,GACJ,KAAM,EAAE,EAAA,QAAQ,iBAAkB,CAAE,MAAO,EAAO,MAAM,OAAQ,CAAC,CAClE,CAEI,CACL,GAAI,GACJ,KAAM,EAAA,wBAAwB,EAAG,EAAO,WAAY,EAAO,MAAM,CAClE,CAVmB,MAWnB,CAAC,EAAiB,EAAY,EAAE,CAAC,CAK9B,GACJ,EACA,IACG,CACC,GAMJ,EAAA,oBAAoB,EAAc,EAHb,EACjB,EAAgB,OAAQ,GAAa,EAAS,KAAO,EAAO,GAAG,CAC/D,EACmD,EAOnD,EAAe,GAAiB,CAEpC,EAAA,kBADgB,EAAA,0BAA0B,EACxB,EAAW,EAAE,EAAA,QAAQ,cAAc,CAAC,EAkGxD,OACE,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAA,cAAD,CAIE,QAAS,EAAmB,IAAA,GAAY,EACxC,cAAe,CAAC,EAChB,aAEM,EADJ,EACM,EAAA,QAAQ,sBACR,EAAA,QAAQ,qBAAqB,WAGrC,EAAA,EAAA,MAAC,MAAD,CACE,cAAY,oBACZ,UAAU,2JAFZ,EAIE,EAAA,EAAA,KAAC,EAAA,iBAAD,CACW,UACT,OAAO,0BACP,SAAU,EACV,CAAA,EACF,EAAA,EAAA,KAAC,KAAD,CAAI,UAAW,EAAA,GAAG,YAAa,EAAA,sBAAsB,UAE/C,EADH,EACK,EAAA,QAAQ,sBACR,EAAA,QAAQ,qBAAqB,CAChC,CAAA,EACL,EAAA,EAAA,KAAC,EAAA,cAAD,CACE,KAAM,EAAY,OAAS,MAC3B,OAAQ,EAAY,EAAS,IAAA,GACZ,kBACjB,SA/HY,GAA6B,CAGjD,GAFA,GAAW,CACX,EAAmB,KAAK,CACpB,EAAQ,MAAM,WAAa,SAAU,CACvC,EAAkB,GAAK,CAClB,EAAA,QAAW,eAAe,EAAQ,CACpC,KAAM,GAAW,CAEhB,GADA,EAAmB,EAAO,CACtB,CAAC,EAAO,GAAI,OAChB,IAAM,EAAe,EAAO,YACxB,CACE,GAAG,EACH,KAAM,CAAE,GAAG,EAAQ,KAAO,MAAO,EAAO,YAAa,CACtD,CACD,EACE,MAAgB,CACpB,EAAsB,EAAc,EAAO,CAC3C,GAAS,EAEP,EACF,EACE,CAAE,SAAU,EAAO,GAAI,OAAQ,EAAc,CAC7C,CAAE,UAAW,EAAS,QAAS,EAAa,CAC7C,CAED,EAAa,EAAc,CACzB,UAAW,EACX,QAAS,EACV,CAAC,EAEJ,CACD,MAAM,EAAY,CAClB,YAAc,EAAkB,GAAM,CAAC,CAC1C,OAEF,EAAW,EAAS,CAClB,UAAY,GAAW,CACrB,GAAI,CAAC,EAAO,GAEV,OAEF,IAAM,EACJ,EAAO,aAAe,EAAQ,MAAM,WAAa,SAC7C,CACE,GAAG,EACH,KAAM,CAAE,GAAG,EAAQ,KAAM,MAAO,EAAO,YAAa,CACrD,CACD,EACA,MAAgB,CACpB,EAAsB,EAAc,EAAO,CAC3C,GAAS,EAEP,EACF,EACE,CAAE,SAAU,EAAO,GAAI,OAAQ,EAAc,CAC7C,CAAE,UAAW,EAAS,QAAS,EAAa,CAC7C,CAED,EAAa,EAAc,CACzB,UAAW,EACX,QAAS,EACV,CAAC,EAGN,QAAS,EACV,CAAC,EA+DM,SAAU,EACV,SAAU,MAAkB,EAAqB,GAAK,CAAG,IAAA,GACzD,iBAAkB,EAClB,OAAQ,EAAiB,IAAA,GA/DV,GAA6B,CAEpD,GADA,EAAmB,KAAK,CACpB,EAAQ,MAAM,WAAa,UAAY,CAAC,EAAgB,CAC1D,EAAkB,GAAK,CAClB,EAAA,QAAW,eAAe,EAAQ,CACpC,KAAK,EAAmB,CACxB,MAAM,EAAY,CAClB,YAAc,EAAkB,GAAM,CAAC,CAC1C,OAEF,EAAW,EAAQ,EAsDX,cAAe,GAAa,EAC5B,YAAa,EAAiB,KAAO,EACrC,CAAA,CACE,GACQ,CAAA,CAEf,GACC,EAAA,EAAA,KAAC,EAAA,kBAAD,CACE,KAAM,EAAE,EAAA,QAAQ,4BAA4B,CAC5C,aAAgB,EAAqB,GAAM,CAC3C,cA7D0B,CAChC,EAAgB,EAAQ,CACtB,cAAiB,CACf,EAAA,oBAAoB,EAAE,EAAA,QAAQ,mBAAmB,CAAC,CAClD,EAAqB,GAAM,CAC3B,GAAS,EAEX,QAAU,GAAQ,CAChB,EAAY,EAAI,CAChB,EAAqB,GAAM,EAE9B,CAAC,EAmDI,aAAc,EACd,CAAA,CACA,KACH,CAAA,CAAA"}