@openhands/agent-canvas 1.5.2 → 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 (711) 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-DHhm10VS.js → active-backend-context-Cd1qcZsb.js} +1 -1
  6. package/build/assets/{add-backend-modal-BoMkMyLB.js → add-backend-modal-5chsfln3.js} +1 -1
  7. package/build/assets/{agent-profiles-settings-CYPloKYK.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-Bn8q0AG3.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-yVh6Kf4E.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-Q1rHh4Qe.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-D8QU-BiL.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-Dnnak-Hq.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-DlXspDku.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-C0zN0-rH.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-D51W2Q9b.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-Da2jiuBS.js → organization-service.api-CvfQugOt.js} +1 -1
  85. package/build/assets/{path-utils-D53ZHUQU.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-BM-pKx0z.js → planner-tab-ZrjiirRr.js} +1 -1
  88. package/build/assets/{plugins-management-service-DISfOL13.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-DWetW2TL.js → profiles-service.api-CRVlrQpT.js} +1 -1
  91. package/build/assets/{providers-C7lMslCi.js → providers-C2DFGBrf.js} +1 -1
  92. package/build/assets/{proxy-G4ce0fnQ.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-CwdqUOnE.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-Ch7RH8eH.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-DPTFyRXL.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-BDTa1HEr.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-DHd_Id-q.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-BMDTXsay.js → use-active-agent-profile-CCeFtmk9.js} +1 -1
  135. package/build/assets/{use-active-conversation-BbeVgedA.js → use-active-conversation-Badxj8w4.js} +1 -1
  136. package/build/assets/{use-agent-profiles-Dn_S_Tkz.js → use-agent-profiles-BSWVN6hH.js} +1 -1
  137. package/build/assets/{use-agent-state-5qM3X30V.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-CyYqfzeo.js → use-can-manage-org-profiles-Do6mYf6P.js} +1 -1
  140. package/build/assets/{use-cloud-current-user-id-BwMX7jHW.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-CkKUQVbP.js → use-create-conversation-vvl0kvu7.js} +1 -1
  143. package/build/assets/{use-create-secret-DEgM0MXZ.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-BFcE0Xms.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-i4FcEP98.js → use-save-agent-profile-Bj7N-1jS.js} +1 -1
  152. package/build/assets/{use-save-settings-DiDEbIJw.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-Blpg2BqE.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-BrN2xeQU.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-C8KzAdAX.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/use-device-flow.cjs +1 -1
  380. package/dist/hooks/use-device-flow.js +6 -6
  381. package/dist/hooks/use-llm-configured.cjs +1 -1
  382. package/dist/hooks/use-llm-configured.js +3 -3
  383. package/dist/hooks/use-mcp-server-health.cjs +2 -0
  384. package/dist/hooks/use-mcp-server-health.cjs.map +1 -0
  385. package/dist/hooks/use-mcp-server-health.d.ts +11 -0
  386. package/dist/hooks/use-mcp-server-health.js +18 -0
  387. package/dist/hooks/use-mcp-server-health.js.map +1 -0
  388. package/dist/hooks/use-skill-installs.cjs +2 -0
  389. package/dist/hooks/use-skill-installs.cjs.map +1 -0
  390. package/dist/hooks/use-skill-installs.d.ts +10 -0
  391. package/dist/hooks/use-skill-installs.js +21 -0
  392. package/dist/hooks/use-skill-installs.js.map +1 -0
  393. package/dist/hooks/use-tracking.cjs +1 -1
  394. package/dist/hooks/use-tracking.cjs.map +1 -1
  395. package/dist/hooks/use-tracking.d.ts +3 -3
  396. package/dist/hooks/use-tracking.js +67 -52
  397. package/dist/hooks/use-tracking.js.map +1 -1
  398. package/dist/i18n/declaration.cjs +1 -1
  399. package/dist/i18n/declaration.cjs.map +1 -1
  400. package/dist/i18n/declaration.d.ts +35 -1
  401. package/dist/i18n/declaration.js +1 -1
  402. package/dist/i18n/declaration.js.map +1 -1
  403. package/dist/i18n/translation.cjs +3 -3
  404. package/dist/i18n/translation.cjs.map +1 -1
  405. package/dist/i18n/translation.js +623 -45
  406. package/dist/i18n/translation.js.map +1 -1
  407. package/dist/index.cjs +1 -1
  408. package/dist/index.js +1 -2
  409. package/dist/lib/index.cjs +1 -1
  410. package/dist/lib/index.d.ts +0 -1
  411. package/dist/lib/index.js +0 -1
  412. package/dist/locales/ar/openhands.json +38 -4
  413. package/dist/locales/ca/openhands.json +38 -4
  414. package/dist/locales/de/openhands.json +38 -4
  415. package/dist/locales/en/openhands.json +38 -4
  416. package/dist/locales/es/openhands.json +38 -4
  417. package/dist/locales/fr/openhands.json +38 -4
  418. package/dist/locales/it/openhands.json +38 -4
  419. package/dist/locales/ja/openhands.json +38 -4
  420. package/dist/locales/ko-KR/openhands.json +38 -4
  421. package/dist/locales/no/openhands.json +38 -4
  422. package/dist/locales/pt/openhands.json +38 -4
  423. package/dist/locales/tr/openhands.json +38 -4
  424. package/dist/locales/uk/openhands.json +38 -4
  425. package/dist/locales/zh-CN/openhands.json +38 -4
  426. package/dist/locales/zh-TW/openhands.json +38 -4
  427. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs +2 -0
  428. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs.map +1 -0
  429. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js +44 -0
  430. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js.map +1 -0
  431. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs +1 -1
  432. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs.map +1 -1
  433. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js +13 -0
  434. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js.map +1 -1
  435. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
  436. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
  437. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +21 -1
  438. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
  439. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs +1 -1
  440. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs.map +1 -1
  441. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js +1 -1
  442. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js.map +1 -1
  443. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs +1 -1
  444. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs.map +1 -1
  445. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js +13 -0
  446. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js.map +1 -1
  447. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs +1 -1
  448. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs.map +1 -1
  449. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js +13 -0
  450. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js.map +1 -1
  451. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
  452. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
  453. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +13 -0
  454. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
  455. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs +1 -1
  456. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs.map +1 -1
  457. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js +13 -0
  458. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js.map +1 -1
  459. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs +1 -1
  460. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs.map +1 -1
  461. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js +13 -0
  462. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js.map +1 -1
  463. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +1 -1
  464. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -1
  465. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +16 -2
  466. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -1
  467. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs +2 -0
  468. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs.map +1 -0
  469. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js +46 -0
  470. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js.map +1 -0
  471. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
  472. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
  473. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +74 -70
  474. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
  475. package/dist/node_modules/@openhands/extensions/skills/index.cjs +123 -3
  476. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  477. package/dist/node_modules/@openhands/extensions/skills/index.js +7 -1
  478. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  479. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs +2 -0
  480. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs.map +1 -0
  481. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +9 -0
  482. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -0
  483. package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs +2 -0
  484. package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs.map +1 -0
  485. package/dist/node_modules/lucide-react/dist/esm/icons/info.js +21 -0
  486. package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
  487. package/dist/package.cjs +1 -1
  488. package/dist/package.cjs.map +1 -1
  489. package/dist/package.js +10 -3
  490. package/dist/package.js.map +1 -1
  491. package/dist/routes/app-settings.cjs +1 -1
  492. package/dist/routes/app-settings.cjs.map +1 -1
  493. package/dist/routes/app-settings.js +113 -67
  494. package/dist/routes/app-settings.js.map +1 -1
  495. package/dist/routes/mcp.cjs +1 -1
  496. package/dist/routes/mcp.cjs.map +1 -1
  497. package/dist/routes/mcp.js +1 -0
  498. package/dist/routes/mcp.js.map +1 -1
  499. package/dist/services/cloud-funnel-analytics.cjs +1 -1
  500. package/dist/services/cloud-funnel-analytics.cjs.map +1 -1
  501. package/dist/services/cloud-funnel-analytics.d.ts +2 -2
  502. package/dist/services/cloud-funnel-analytics.js +18 -16
  503. package/dist/services/cloud-funnel-analytics.js.map +1 -1
  504. package/dist/services/settings.cjs +1 -1
  505. package/dist/services/settings.cjs.map +1 -1
  506. package/dist/services/settings.js +1 -0
  507. package/dist/services/settings.js.map +1 -1
  508. package/dist/services/telemetry-context.cjs +2 -0
  509. package/dist/services/telemetry-context.cjs.map +1 -0
  510. package/dist/services/telemetry-context.d.ts +17 -0
  511. package/dist/services/telemetry-context.js +27 -0
  512. package/dist/services/telemetry-context.js.map +1 -0
  513. package/dist/services/telemetry.cjs +1 -1
  514. package/dist/services/telemetry.cjs.map +1 -1
  515. package/dist/services/telemetry.d.ts +7 -5
  516. package/dist/services/telemetry.js +132 -123
  517. package/dist/services/telemetry.js.map +1 -1
  518. package/dist/stores/skill-install-banner-store.cjs +2 -0
  519. package/dist/stores/skill-install-banner-store.cjs.map +1 -0
  520. package/dist/stores/skill-install-banner-store.d.ts +32 -0
  521. package/dist/stores/skill-install-banner-store.js +14 -0
  522. package/dist/stores/skill-install-banner-store.js.map +1 -0
  523. package/dist/stores/use-event-store.cjs +1 -1
  524. package/dist/stores/use-event-store.cjs.map +1 -1
  525. package/dist/stores/use-event-store.js +35 -35
  526. package/dist/stores/use-event-store.js.map +1 -1
  527. package/dist/types/mcp-health.cjs +2 -0
  528. package/dist/types/mcp-health.cjs.map +1 -0
  529. package/dist/types/mcp-health.d.ts +21 -0
  530. package/dist/types/mcp-health.js +6 -0
  531. package/dist/types/mcp-health.js.map +1 -0
  532. package/dist/types/settings.d.ts +1 -0
  533. package/dist/utils/handle-event-for-ui.cjs +1 -1
  534. package/dist/utils/handle-event-for-ui.cjs.map +1 -1
  535. package/dist/utils/handle-event-for-ui.d.ts +5 -0
  536. package/dist/utils/handle-event-for-ui.js +71 -57
  537. package/dist/utils/handle-event-for-ui.js.map +1 -1
  538. package/dist/utils/mcp-credential-validation.cjs +1 -1
  539. package/dist/utils/mcp-credential-validation.cjs.map +1 -1
  540. package/dist/utils/mcp-credential-validation.js +32 -16
  541. package/dist/utils/mcp-credential-validation.js.map +1 -1
  542. package/dist/utils/mcp-server-health-key.cjs +2 -0
  543. package/dist/utils/mcp-server-health-key.cjs.map +1 -0
  544. package/dist/utils/mcp-server-health-key.d.ts +16 -0
  545. package/dist/utils/mcp-server-health-key.js +23 -0
  546. package/dist/utils/mcp-server-health-key.js.map +1 -0
  547. package/dist/utils/mcp-test-error-message.cjs +2 -0
  548. package/dist/utils/mcp-test-error-message.cjs.map +1 -0
  549. package/dist/utils/mcp-test-error-message.d.ts +8 -0
  550. package/dist/utils/mcp-test-error-message.js +14 -0
  551. package/dist/utils/mcp-test-error-message.js.map +1 -0
  552. package/dist/utils/redact-mcp-secrets.cjs +2 -0
  553. package/dist/utils/redact-mcp-secrets.cjs.map +1 -0
  554. package/dist/utils/redact-mcp-secrets.d.ts +13 -0
  555. package/dist/utils/redact-mcp-secrets.js +57 -0
  556. package/dist/utils/redact-mcp-secrets.js.map +1 -0
  557. package/dist/utils/settings-utils.cjs.map +1 -1
  558. package/dist/utils/settings-utils.js.map +1 -1
  559. package/dist/utils/skill-install-events.cjs +3 -0
  560. package/dist/utils/skill-install-events.cjs.map +1 -0
  561. package/dist/utils/skill-install-events.d.ts +16 -0
  562. package/dist/utils/skill-install-events.js +26 -0
  563. package/dist/utils/skill-install-events.js.map +1 -0
  564. package/dist/utils/title-llm-profile.cjs +2 -0
  565. package/dist/utils/title-llm-profile.cjs.map +1 -0
  566. package/dist/utils/title-llm-profile.d.ts +2 -0
  567. package/dist/utils/title-llm-profile.js +11 -0
  568. package/dist/utils/title-llm-profile.js.map +1 -0
  569. package/package.json +10 -3
  570. package/scripts/check-sdk-version-sync.mjs +6 -6
  571. package/scripts/check-translation-completeness.cjs +2 -0
  572. package/scripts/dev-process-utils.mjs +62 -1
  573. package/scripts/dev-safe.mjs +2 -2
  574. package/scripts/dev-static.mjs +5 -3
  575. package/scripts/dev-with-automation.mjs +98 -14
  576. package/scripts/download-node.mjs +382 -0
  577. package/scripts/download-uv.mjs +204 -0
  578. package/scripts/logger.mjs +64 -35
  579. package/build/assets/agent-server-compatibility-C0MtTTwb.js +0 -1
  580. package/build/assets/agent-server-conversation-service.api-lzc8dabY.js +0 -41
  581. package/build/assets/agent-settings-GwiXe_6k.js +0 -2
  582. package/build/assets/agent-settings-OdsyI2gX.js +0 -1
  583. package/build/assets/api-key-entry-screen-2gsoZAOK.js +0 -1
  584. package/build/assets/app-settings-CD9euh81.js +0 -1
  585. package/build/assets/automation-export-Djc8Tf0M.js +0 -2
  586. package/build/assets/automations-list-Dtiolk1h.js +0 -1
  587. package/build/assets/backend-form-modal-B8GtBA-J.js +0 -1
  588. package/build/assets/browser-store-BI6uklCG.js +0 -1
  589. package/build/assets/chat-send-button-BZHG2hAW.js +0 -1
  590. package/build/assets/client-source-CtQjJEy6.js +0 -1
  591. package/build/assets/cloud-funnel-analytics-uzzLlLuj.js +0 -1
  592. package/build/assets/conversation-B8d8_Upd.js +0 -1
  593. package/build/assets/conversation-Lmqm6VJC.js +0 -89
  594. package/build/assets/conversation-panel-B8n40Swu.js +0 -1
  595. package/build/assets/conversation-state-store-B2Bp32XI.js +0 -1
  596. package/build/assets/declaration-BGsHjPEW.js +0 -1
  597. package/build/assets/extensions-hub-DqvwvpCi.js +0 -1
  598. package/build/assets/extensions-navigation-BMc9Nluv.js +0 -1
  599. package/build/assets/files-tab-BAkaV4aO.js +0 -1
  600. package/build/assets/files-tab-store-DJsPxYdg.js +0 -1
  601. package/build/assets/git-provider-icon-xvbukHaT.js +0 -1
  602. package/build/assets/home-D01kSnmo.js +0 -1
  603. package/build/assets/home-NZO2bF4N.js +0 -1
  604. package/build/assets/index-home-BsI6i0TC.js +0 -1
  605. package/build/assets/install-server-modal-BYjqoRyX.js +0 -1
  606. package/build/assets/lesson-plan-cNUjpdFx.js +0 -4
  607. package/build/assets/llm-not-configured-banner-DUPyoFIZ.js +0 -27
  608. package/build/assets/llm-settings-Cs_iieFY.js +0 -1
  609. package/build/assets/llm-settings-J2ke2foG.js +0 -1
  610. package/build/assets/manage-backends-modal-nMoCZ2a0.js +0 -1
  611. package/build/assets/manifest-f1b46f62.js +0 -1
  612. package/build/assets/markdown-renderer-B4V2OMFP.js +0 -2
  613. package/build/assets/mcp-kZM-cAZw.js +0 -9
  614. package/build/assets/messages-CJAv5n4j.js +0 -40
  615. package/build/assets/objectWithoutPropertiesLoose-BgYIAs2y.js +0 -1
  616. package/build/assets/onboarding-Dx8n8HFr.js +0 -1
  617. package/build/assets/onboarding-modal-Bxuxpfdz.js +0 -1
  618. package/build/assets/recommended-automations-launcher-BWRRvMPE.js +0 -58
  619. package/build/assets/refresh-cw-B9B7-vsy.js +0 -1
  620. package/build/assets/root-CYWeTrWE.css +0 -1
  621. package/build/assets/root-layout-ClEl-JlJ.js +0 -2
  622. package/build/assets/root-oT83qVlk.js +0 -2
  623. package/build/assets/sdk-section-page-Cwj0T4gF.js +0 -1
  624. package/build/assets/secrets-settings-Bc_pBX6F.js +0 -1
  625. package/build/assets/settings-index-BzSIM1-N.js +0 -1
  626. package/build/assets/settings-modal-BnZ7mMu7.js +0 -1
  627. package/build/assets/settings-n9a395O0.js +0 -1
  628. package/build/assets/shared-conversation-CIDDti9I.js +0 -1
  629. package/build/assets/sidebar-mobile-menu-toggle-CTX7J4wM.js +0 -1
  630. package/build/assets/skills-plugins-HZEbNDmX.js +0 -1
  631. package/build/assets/skills-settings-BdqijFlC.js +0 -2
  632. package/build/assets/telemetry-SHxpVxk8.js +0 -2
  633. package/build/assets/use-activate-agent-profile-BRDdSwQ0.js +0 -1
  634. package/build/assets/use-backends-health-BagmAE_W.js +0 -1
  635. package/build/assets/use-config-B39iHYFi.js +0 -1
  636. package/build/assets/use-event-store-Bbaz51GR.js +0 -4
  637. package/build/assets/use-llm-profiles-CgRtnj74.js +0 -1
  638. package/build/assets/use-plugins-marketplace-DOJp9rlE.js +0 -1
  639. package/build/assets/use-runtime-is-ready-ziHQvXZQ.js +0 -1
  640. package/build/assets/use-settings-BeJap6YL.js +0 -1
  641. package/build/assets/use-settings-nav-items-D5JJjFHJ.js +0 -16
  642. package/build/assets/use-tracking-DFoPQUSU.js +0 -1
  643. package/build/assets/useMutationState-OnAsCLA_.js +0 -1
  644. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js +0 -2
  645. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js +0 -28
  646. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js +0 -2
  647. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js +0 -2
  648. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js +0 -7
  649. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js +0 -1
  650. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js +0 -1
  651. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js +0 -1
  652. package/dist/components/features/analytics/telemetry-consent-banner.cjs +0 -2
  653. package/dist/components/features/analytics/telemetry-consent-banner.cjs.map +0 -1
  654. package/dist/components/features/analytics/telemetry-consent-banner.d.ts +0 -29
  655. package/dist/components/features/analytics/telemetry-consent-banner.js +0 -59
  656. package/dist/components/features/analytics/telemetry-consent-banner.js.map +0 -1
  657. /package/build/assets/{__vite-browser-external-BQUj0sYu.js → __vite-browser-external-CKHVBTNC.js} +0 -0
  658. /package/build/assets/{agent-server-ui-style-scope-qhnhZHBV.js → agent-server-ui-style-scope-BvSa9on7.js} +0 -0
  659. /package/build/assets/{automation-LZB0MjdV.js → automation-BGiPmxFR.js} +0 -0
  660. /package/build/assets/{canvas-ui-COgjltGz.js → canvas-ui-CC4EJo-H.js} +0 -0
  661. /package/build/assets/{checkmark-h7udgXMM.js → checkmark-ygQB1AtV.js} +0 -0
  662. /package/build/assets/{close-DLFb5kfv.js → close-BjSA0HWT.js} +0 -0
  663. /package/build/assets/{code-tag-DYlAhEQY.js → code-tag-D9aPPbOe.js} +0 -0
  664. /package/build/assets/{common-CxbUL3nR.js → common-CCuqQy_S.js} +0 -0
  665. /package/build/assets/{conversation-local-storage-F6zVMM--.js → conversation-local-storage-BDjWPg0Z.js} +0 -0
  666. /package/build/assets/{copy-BLmGeJcd.js → copy-Dce7sOvS.js} +0 -0
  667. /package/build/assets/{copy-D1YGjP-C.js → copy-iPJAncAj.js} +0 -0
  668. /package/build/assets/{dist-CodhvuAP.js → dist-D9PhjOaq.js} +0 -0
  669. /package/build/assets/{environment-switch-store-DkjlKWzN.js → environment-switch-store-DHfcz4M4.js} +0 -0
  670. /package/build/assets/{extension-module-card-classes-9V3J9J_b.js → extension-module-card-classes-BpebKiN6.js} +0 -0
  671. /package/build/assets/{external-link-lhdITPqq.js → external-link-CpPMXxrV.js} +0 -0
  672. /package/build/assets/{folder-Bk311brm.js → folder-BabbYnbF.js} +0 -0
  673. /package/build/assets/{format-time-delta-DhDbkD7V.js → format-time-delta-BkAmJEPT.js} +0 -0
  674. /package/build/assets/{get-language-from-path-DBqBsCWH.js → get-language-from-path-CPNnuVhI.js} +0 -0
  675. /package/build/assets/{git-status-mapper-DnL9OC8_.js → git-status-mapper-BIXK0AAG.js} +0 -0
  676. /package/build/assets/{iconBase-Dz51Zn5x.js → iconBase-Ch-fOe8B.js} +0 -0
  677. /package/build/assets/{link-external-CaBmUEs_.js → link-external-DfKQroKX.js} +0 -0
  678. /package/build/assets/{list-todo-CAtvkzcy.js → list-todo-6J6zc8oS.js} +0 -0
  679. /package/build/assets/{llm-subscription-DtsX5Lhg.js → llm-subscription-Bvu8BLXc.js} +0 -0
  680. /package/build/assets/{loader-circle-CsAsfLIs.js → loader-circle-DGsqG5qw.js} +0 -0
  681. /package/build/assets/{map-provider-BbIb12oh.js → map-provider-BSvXvVR0.js} +0 -0
  682. /package/build/assets/{middleware-DYHYNAnP.js → middleware-_izt7V6U.js} +0 -0
  683. /package/build/assets/{modal-backdrop-zVwfOJZr.js → modal-backdrop-B7H42xHG.js} +0 -0
  684. /package/build/assets/{navigation-context-DPs2G0X8.js → navigation-context-cvyvI1WA.js} +0 -0
  685. /package/build/assets/{openhands-logo-bcNw5bkY.js → openhands-logo-pEw0nKFP.js} +0 -0
  686. /package/build/assets/{pencil-CWhApFIT.js → pencil-DmSqWUA3.js} +0 -0
  687. /package/build/assets/{react-DPDgL6du.js → react-MKQOkha9.js} +0 -0
  688. /package/build/assets/{search-BgOCR7_c.js → search-B5D5EuSn.js} +0 -0
  689. /package/build/assets/{search-dIQ09UY2.js → search-vnYL5jwV.js} +0 -0
  690. /package/build/assets/{settings-gear-MXCyZW0x.js → settings-gear-BOwF59Bs.js} +0 -0
  691. /package/build/assets/{settings-section-header-context-COMOIaxV.js → settings-section-header-context-CGgHZXrf.js} +0 -0
  692. /package/build/assets/{skills-EqzxYBvT.js → skills-arUOHLcS.js} +0 -0
  693. /package/build/assets/{square-chevron-right-DE-JN-2Z.js → square-chevron-right-EizCGtgq.js} +0 -0
  694. /package/build/assets/{switch-skeleton-DqQwalyu.js → switch-skeleton-BjPRx1QD.js} +0 -0
  695. /package/build/assets/{terminal-Cgf___rK.js → terminal-a57bHgZs.js} +0 -0
  696. /package/build/assets/{trash-2-BU6BlW4i.js → trash-2-CF3hilrY.js} +0 -0
  697. /package/build/assets/{u-check-circle-BqoIxNz_.js → u-check-circle-WGqHdtfO.js} +0 -0
  698. /package/build/assets/{u-check-circle-half-MsShT8Ec.js → u-check-circle-half-LiwZkuFe.js} +0 -0
  699. /package/build/assets/{u-edit-DL5LgKon.js → u-edit-BwHepAPi.js} +0 -0
  700. /package/build/assets/{use-breakpoint-BP3lqLMx.js → use-breakpoint-B-O0lQ84.js} +0 -0
  701. /package/build/assets/{use-click-outside-element-D9BYdANT.js → use-click-outside-element-DLQIMQrz.js} +0 -0
  702. /package/build/assets/{use-is-authed-BezEyfeh.js → use-is-authed-BSeo4coy.js} +0 -0
  703. /package/build/assets/{use-onboarding-completion-C_Swglzp.js → use-onboarding-completion-C0hPNGpw.js} +0 -0
  704. /package/build/assets/{v4-DbCkTSoU.js → v4-q4yWTlMz.js} +0 -0
  705. /package/build/assets/{vendor~browser-By2MVv_N.js → vendor~browser-UwB1jbAZ.js} +0 -0
  706. /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js → vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js} +0 -0
  707. /package/build/assets/{vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js → vendor~index-home~home~conversation-panel~conversation-Bff9cq5J.js} +0 -0
  708. /package/build/assets/{vendor~module-D5a_AClf.js → vendor~module-D4DeFV4J.js} +0 -0
  709. /package/build/assets/{vendor~terminal-CnKZILnC.js → vendor~terminal-B7Eiak0-.js} +0 -0
  710. /package/build/assets/{x-ZE4iplpF.js → x-DQB_00VJ.js} +0 -0
  711. /package/build/assets/{x-mark-Batp6gXa.js → x-mark-B32XuEwS.js} +0 -0
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/settings-modal-BnZ7mMu7.js","assets/rolldown-runtime-BFRubm34.js","assets/vendor-styling-CI0PQ3ab.js","assets/declaration-BGsHjPEW.js","assets/useTranslation-Cbf5AGg_.js","assets/active-backend-context-DHhm10VS.js","assets/agent-server-compatibility-C0MtTTwb.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js","assets/createLucideIcon-D4Tak8A1.js","assets/utils-DB9LsAzA.js","assets/common-CxbUL3nR.js","assets/model-selector-D51W2Q9b.js","assets/useQuery-D5pEZbY0.js","assets/suspense-DmZ3MSSh.js","assets/proxy-G4ce0fnQ.js","assets/combobox-caret-CxZpqoSR.js","assets/form-control-classes-CbdN5aO3.js","assets/sdk-settings-schema-CLR01YIK.js","assets/dist-CodhvuAP.js","assets/llm-subscription-DtsX5Lhg.js","assets/map-provider-BbIb12oh.js","assets/brand-button-B1izLAdR.js","assets/settings-input-BsgQWS5R.js","assets/base-modal-CIF_785P.js","assets/modal-body-Cc2zp0xb.js","assets/modal-classes-3qT9Ap7Q.js","assets/modal-backdrop-zVwfOJZr.js","assets/navigation-context-DPs2G0X8.js","assets/use-save-settings-DiDEbIJw.js","assets/useMutation-u8UgRgDK.js","assets/settings-service.api-DPTFyRXL.js","assets/settings-mQUckT0g.js","assets/use-settings-BeJap6YL.js","assets/use-tracking-DFoPQUSU.js","assets/telemetry-SHxpVxk8.js","assets/client-source-CtQjJEy6.js","assets/settings-utils-DzCVfiR3.js","assets/add-backend-modal-BoMkMyLB.js","assets/backend-form-modal-B8GtBA-J.js","assets/cloud-funnel-analytics-uzzLlLuj.js","assets/segmented-toggle-kzwZkLaj.js","assets/modal-close-button-BcIBUdSq.js","assets/use-backends-health-BagmAE_W.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js","assets/useQueries-BpIlT8Mt.js","assets/organization-service.api-Da2jiuBS.js","assets/manage-backends-modal-nMoCZ2a0.js","assets/pencil-CWhApFIT.js","assets/refresh-cw-B9B7-vsy.js","assets/trash-2-BU6BlW4i.js","assets/confirmation-modal-DGBWM2Ls.js","assets/use-cloud-current-user-id-BwMX7jHW.js","assets/environment-switch-overlay-B1PFO8P8.js","assets/environment-switch-store-DkjlKWzN.js","assets/alert-banner-Dh51WURQ.js","assets/vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js","assets/iconBase-Dz51Zn5x.js","assets/close-DLFb5kfv.js","assets/typography-CzfoD9DY.js","assets/command-menu-oTvKDU3Y.js","assets/bot-C-EA6685.js","assets/list-todo-CAtvkzcy.js","assets/search-dIQ09UY2.js","assets/sidebar-store-uiUXBU1N.js","assets/middleware-DYHYNAnP.js","assets/react-DPDgL6du.js","assets/x-ZE4iplpF.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,St as n,a as r,bt as i,xt as a}from"./vendor-styling-CI0PQ3ab.js";import{A as o,C as s,F as c,L as l,M as u,N as d,P as f,R as p,c as m,j as h,k as g}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{h as _,m as v,r as y,t as b}from"./path-utils-D53ZHUQU.js";import{t as x}from"./useQuery-D5pEZbY0.js";import{t as S}from"./useTranslation-Cbf5AGg_.js";import{t as C}from"./declaration-BGsHjPEW.js";import{C as w,F as T,S as E,n as D,r as O}from"./active-backend-context-DHhm10VS.js";import{t as k}from"./createLucideIcon-D4Tak8A1.js";import{t as A}from"./bot-C-EA6685.js";import{t as j}from"./check-TbOEtHKj.js";import{n as M,t as N}from"./vendor~root-layout~conversation-panel~conversation-8tIsyrPj.js";import{r as P}from"./onboarding-modal-Bxuxpfdz.js";import{n as F,t as I}from"./vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js";import{a as ee,c as L,d as R,f as z,i as B,l as te,n as ne,o as re,p as ie,r as ae,s as oe,t as V,u as se}from"./onboarding-Dx8n8HFr.js";import{n as ce,t as le}from"./format-time-delta-DhDbkD7V.js";import{n as ue}from"./refresh-cw-B9B7-vsy.js";import{t as de}from"./search-dIQ09UY2.js";import{n as fe,r as pe,t as me}from"./sidebar-store-uiUXBU1N.js";import{i as he}from"./llm-settings-Cs_iieFY.js";import{t as ge}from"./trash-2-BU6BlW4i.js";import{t as _e}from"./x-ZE4iplpF.js";import{S as ve,b as ye,t as H,y as be}from"./utils-DB9LsAzA.js";import{t as U}from"./common-CxbUL3nR.js";import{S as xe}from"./agent-server-compatibility-C0MtTTwb.js";import{a as Se,c as Ce,l as we,t as Te,u as W}from"./telemetry-SHxpVxk8.js";import{a as Ee}from"./use-backends-health-BagmAE_W.js";import{t as De}from"./modal-backdrop-zVwfOJZr.js";import{n as G}from"./modal-body-Cc2zp0xb.js";import{i as Oe,r as ke}from"./base-modal-CIF_785P.js";import{_ as Ae,c as je}from"./form-control-classes-CbdN5aO3.js";import{t as Me}from"./loading-spinner-BcdnT0mN.js";import{t as Ne}from"./use-config-B39iHYFi.js";import{n as Pe,t as Fe}from"./navigation-context-DPs2G0X8.js";import{t as Ie}from"./openhands-logo-bcNw5bkY.js";import{t as Le}from"./navigation-link-D8hfwvxI.js";import{a as Re,d as ze,f as Be,i as Ve,l as He,n as Ue,r as We,u as Ge}from"./sidebar-layout-Bm7pa3Vk.js";import{n as Ke,t as qe}from"./sidebar-nav-link-CHqyFXwV.js";import{t as Je}from"./styled-tooltip-B14i_Uac.js";import{a as Ye,d as Xe,f as Ze,i as K,l as Qe,n as $e,o as et,r as tt,u as nt}from"./dropdown-classes-D3wMJlXT.js";import{r as rt,t as it}from"./combobox-caret-CxZpqoSR.js";import{_ as at,a as ot,c as st,d as ct,f as lt,g as ut,h as dt,i as ft,l as pt,m as mt,n as ht,p as gt,r as _t,s as vt,t as yt,u as bt}from"./git-provider-icon-xvbukHaT.js";import{n as xt,t as St}from"./use-cloud-current-user-id-BwMX7jHW.js";import{s as Ct}from"./environment-switch-store-DkjlKWzN.js";import{t as wt}from"./react-DPDgL6du.js";import{r as Tt,t as Et}from"./middleware-DYHYNAnP.js";import{t as Dt}from"./conversation-store-LptbOvKa.js";import{o as Ot}from"./backend-form-modal-B8GtBA-J.js";import{r as kt,t as At}from"./use-settings-BeJap6YL.js";import{t as jt}from"./use-tracking-DFoPQUSU.js";import{t as Mt}from"./add-backend-modal-BoMkMyLB.js";import{t as Nt}from"./manage-backends-modal-nMoCZ2a0.js";import{t as Pt}from"./agent-server-conversation-service.api-lzc8dabY.js";import{c as Ft,d as It,u as Lt}from"./acp-providers-DerAmTyY.js";import{t as Rt}from"./use-is-authed-BezEyfeh.js";import{a as zt,c as Bt,d as Vt,f as Ht,i as Ut,l as Wt,o as Gt,r as Kt,s as qt,t as Jt,u as Yt}from"./sidebar-mobile-menu-toggle-CTX7J4wM.js";import{t as Xt}from"./use-click-outside-element-D9BYdANT.js";import{t as Zt}from"./use-llm-profiles-CgRtnj74.js";import{n as Qt}from"./use-create-conversation-CkKUQVbP.js";import{r as $t}from"./recommended-automations-launcher-BWRRvMPE.js";import{t as en}from"./conversation-service.api-D8QU-BiL.js";import{r as tn,t as nn}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js";import{n as rn,t as q}from"./context-menu-list-item-6psNyl7X.js";import{i as J,r as an,t as on}from"./ellipsis-button-CbNnHlIq.js";import{t as sn}from"./u-edit-DL5LgKon.js";import{t as cn}from"./skills-EqzxYBvT.js";import{a as ln,o as un,t as dn}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js";import{t as fn}from"./search-BgOCR7_c.js";import{t as pn}from"./use-save-settings-DiDEbIJw.js";import{t as mn}from"./use-user-conversation-BrN2xeQU.js";import{t as hn}from"./conversation-state-store-B2Bp32XI.js";var gn=k(`calendar-arrow-down`,[[`path`,{d:`m14 18 4 4 4-4`,key:`1waygx`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M18 14v8`,key:`irew45`}],[`path`,{d:`M21 11.354V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.343`,key:`bse4f3`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}]]),_n=k(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),vn=k(`clock-arrow-down`,[[`path`,{d:`M12 6v6l2 1`,key:`19cm8n`}],[`path`,{d:`M12.337 21.994a10 10 0 1 1 9.588-8.767`,key:`28moa`}],[`path`,{d:`m14 18 4 4 4-4`,key:`1waygx`}],[`path`,{d:`M18 14v8`,key:`irew45`}]]),yn=k(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),bn=k(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),xn=k(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Sn=k(`list-filter`,[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]),Cn=k(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),wn=k(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Tn=k(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),En=k(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Y=e(t(),1),X=i(),Dn=46,On=30;function kn({className:e,logoClassName:t,logoWidth:n=Dn,logoHeight:r=On}={}){let{t:i}=S(`openhands`);return(0,X.jsx)(Le,{to:`/conversations`,"aria-label":i(C.BRANDING$OPENHANDS_LOGO),className:H(e),children:(0,X.jsx)(Ie,{width:n,height:r,className:H(`shrink-0`,t)})})}function An(){return(0,X.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`,"data-testid":`dropdown-loading`})}function jn({onClear:e}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-clear`,onClick:e,"aria-label":`Clear selection`,className:`text-white hover:text-[var(--oh-text-tertiary)]`,children:(0,X.jsx)(_e,{size:14})})}function Mn({isOpen:e,isDisabled:t,getToggleButtonProps:n}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,...n({disabled:t,className:H(rt,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed`)}),children:(0,X.jsx)(it,{})})}function Nn({isOpen:e,filteredOptions:t,selectedItem:n,emptyMessage:r,getMenuProps:i,getItemProps:a,footer:o,openUpward:s=!1,fitContent:c=!1}){return(0,X.jsxs)(`div`,{className:H(`absolute z-50 overflow-hidden text-white`,c?`min-w-full w-max`:`w-full`,s?`bottom-full mb-1`:`mt-1`,`bg-tertiary rounded-[6px] context-menu-box-shadow p-1`,`max-h-60 overflow-auto`,!e&&`hidden`),children:[(0,X.jsxs)(`ul`,{...i({className:H(`p-0`,K)}),children:[e&&t.length===0&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,children:r}),e&&t.map((e,t)=>(0,X.jsxs)(`li`,{...a({item:e,index:t,className:H(et,`focus:outline-none`,n?.value===e.value&&`bg-[var(--oh-interactive-selected)] text-white`)}),children:[e.prefix?(0,X.jsx)(`span`,{className:nt,children:e.prefix}):null,(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label})]},e.value))]}),e&&o?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(at,{inset:`menu`}),(0,X.jsx)(`div`,{className:`p-0`,children:o})]}):null]})}function Pn({placeholder:e,isDisabled:t,getInputProps:n,italicPlaceholder:r=!0,fitContent:i=!1}){return(0,X.jsx)(`input`,{...n({placeholder:e,disabled:t,className:H(`outline-none bg-transparent text-white not-italic`,i?`w-auto field-sizing-content whitespace-nowrap text-sm`:`flex-1 min-w-0`,r&&`placeholder:italic placeholder:text-tertiary-alt`,!r&&`placeholder:text-tertiary-alt`,je,`px-0 not-italic text-inherit`)})})}var Fn={position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,border:0};function In({options:e,emptyMessage:t=`No options`,clearable:n=!1,loading:r=!1,disabled:i=!1,placeholder:a,defaultValue:o,onChange:s,testId:c,className:l,footer:u,openUpward:d=!1,hideTrigger:f=!1,defaultOpen:p=!1,openOnHover:m=!1,italicPlaceholder:h=!0,fitContent:g=!1}){let _=Y.useRef(null),[v,y]=(0,Y.useState)(o?.label??``),[b,x]=(0,Y.useState)(``);Y.useEffect(()=>()=>{_.current&&=(clearTimeout(_.current),null)},[]);let S=e.filter(e=>e.label.toLowerCase().includes(b.toLowerCase())),{isOpen:C,selectedItem:w,selectItem:T,openMenu:E,closeMenu:D,getToggleButtonProps:O,getMenuProps:k,getItemProps:A,getInputProps:j}=I({items:S,itemToString:e=>e?.label??``,inputValue:v,stateReducer:(e,t)=>t.type===I.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes,initialIsOpen:p,onInputValueChange:({inputValue:e})=>{y(e??``),x(e??``)},defaultSelectedItem:o,onSelectedItemChange:({selectedItem:e})=>{s?.(e??null)},onIsOpenChange:({isOpen:e,selectedItem:t})=>{e?(y(``),x(``)):(y(t?.label??``),x(``))}}),M=r||i,N=w?e.find(e=>e.value===w.value)??w:null,P=e=>j({...e,onChange:e=>{y(e.target.value),x(e.target.value)}});return(0,X.jsxs)(`div`,{className:H(`relative`,g?`inline-block w-auto`:`w-full`),"data-testid":c,onMouseEnter:m?()=>{_.current&&=(clearTimeout(_.current),null),E()}:void 0,onMouseLeave:m?()=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>D(),150)}:void 0,children:[f?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`input`,{...P({"aria-label":a??`Filter options`,tabIndex:-1}),style:Fn}),(0,X.jsx)(`button`,{type:`button`,...O({tabIndex:-1}),style:Fn,"aria-hidden":!0})]}):(0,X.jsxs)(`div`,{className:H(Ze,g?`w-auto`:`w-full`,M&&`cursor-not-allowed opacity-60`,l),children:[N?.prefix?(0,X.jsx)(`span`,{className:`flex items-center shrink-0`,children:N.prefix}):null,(0,X.jsx)(Pn,{placeholder:a,isDisabled:M,getInputProps:P,italicPlaceholder:h,fitContent:g}),r&&(0,X.jsx)(An,{}),n&&w&&(0,X.jsx)(jn,{onClear:()=>T(null)}),(0,X.jsx)(Mn,{isOpen:C,isDisabled:M,getToggleButtonProps:O})]}),(0,X.jsx)(Nn,{isOpen:C,filteredOptions:S,selectedItem:w,emptyMessage:t,getMenuProps:k,getItemProps:A,footer:u,openUpward:d,fitContent:g})]})}var Ln=`::`;function Rn(e,t){return t?`${e}${Ln}${t}`:e}function zn(e){let[t,n]=e.split(Ln);return{backendId:t,orgId:n??null}}function Bn(e){return(0,X.jsx)(Ot,{isConnected:e?.isConnected??null})}function Vn(){return(0,X.jsx)(Ot,{isConnected:`unavailable`})}function Hn(e,t,n,r,i){let a=[],o=e.filter(e=>e.kind===`local`),s=e.filter(e=>e.kind===`cloud`);for(let e of o)a.push({value:Rn(e.id,null),label:e.name,prefix:Bn(i[e.id])});for(let e of s){let o=n[e.id],s=Bn(i[e.id]);if(!o||o.orgs.length===0)a.push({value:Rn(e.id,null),label:e.name,prefix:s});else{let n=r[e.id]?.userId??null;for(let r of o.orgs){let i=n&&n===r.id?t:r.name;a.push({value:Rn(e.id,r.id),label:`${e.name} – ${i}`,prefix:s})}}}return a}function Un({openUpward:e=!1,hideTrigger:t=!1,defaultOpen:n=!1,onSelectOption:r,onOpenAddBackend:i,onOpenManageBackends:a,sidebarCollapsed:s=!1}={}){let{t:c}=S(`openhands`),{backends:l,active:d,setActive:f}=O(),p=xt(),m=St(),h=Ee(l),g=u(),_=o(`/settings`),v=o(`/settings/*`),y=o(`/conversations/:conversationId`),b=o(`/automations/:automationId`),[x,w]=Y.useState(!1),[T,E]=Y.useState(!1),D=c(C.BACKEND$PERSONAL_WORKSPACE),k=Y.useMemo(()=>Hn(l,D,p,m,h),[l,D,p,m,h]),A=xe(d.backend),j=c(C.BACKEND$NO_BACKEND_AVAILABLE),M=Rn(d.backend.id,d.orgId),N=A?void 0:k.find(e=>e.value===M),P=!!(_||v),F=c(C.SIDEBAR$SETTINGS),I=Dt(e=>e.isRightPanelShown),ee=!s||y&&I?`top`:`left`,L=Object.values(p).some(e=>e.isLoading);Y.useEffect(()=>{if(A||d.backend.kind!==`cloud`||d.orgId)return;let{backend:e}=d,t=p[e.id];if(!t||t.orgs.length===0)return;let n=t.currentOrgId?t.orgs.find(e=>e.id===t.currentOrgId):void 0,r=m[e.id]?.userId??null,i=r?t.orgs.find(e=>e.id===r):void 0,a=n??i??t.orgs[0];a&&f(e.id,a.id)},[d,p,m,f,A]);let R=Y.useCallback(()=>{if(i){i(),r?.();return}w(!0)},[i,r]),z=Y.useCallback(()=>{if(a){a(),r?.();return}E(!0)},[a,r]),B=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),te=Y.useCallback(e=>{B(e),R()},[R,B]),ne=Y.useCallback(e=>{B(e),R()},[R,B]),re=Y.useCallback(e=>{B(e),z()},[z,B]),ie=Y.useCallback(e=>{B(e),z()},[z,B]),ae=(0,X.jsxs)(`div`,{className:K,children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`add-backend-menu-item`,onMouseDown:B,onTouchStart:B,onTouchEnd:ne,onClick:te,className:H($e,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:nt,"aria-hidden":!0,children:(0,X.jsx)(ue,{width:16,height:16})}),c(C.BACKEND$ADD)]}),(0,X.jsxs)(`button`,{type:`button`,"data-testid":`manage-backends-menu-item`,onMouseDown:B,onTouchStart:B,onTouchEnd:ie,onClick:re,className:H($e,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:nt,"aria-hidden":!0,children:(0,X.jsx)(pe,{width:16,height:16})}),c(C.BACKEND$MANAGE)]})]}),oe=Y.useCallback(async e=>{if(e===M)return;let{backendId:t,orgId:n}=zn(e),i=l.find(e=>e.id===t);i&&(Ct(k.find(t=>t.value===e)?.label??i.name),await new Promise(e=>{setTimeout(e,400)}),y?g(`/conversations`):b&&g(`/automations`),f(i.id,n),r?.())},[M,l,y,b,g,k,f,c,r]);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 w-full`,children:[(0,X.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,X.jsx)(In,{testId:`backend-selector`,defaultValue:N??{value:M,label:A?j:d.backend.name,prefix:A?Vn():Bn(h[d.backend.id])},footer:ae,openUpward:e,hideTrigger:t,defaultOpen:n,openOnHover:!t,onChange:e=>{e&&oe(e.value)},placeholder:A?j:d.backend.name,loading:L,options:k,className:`h-10 px-2 py-0 bg-transparent border-transparent hover:bg-[var(--oh-surface-raised)] focus-within:bg-[var(--oh-surface-raised)] focus-within:border-transparent focus-within:ring-0`},`${M}-${N?.label??``}`)}),t?null:(0,X.jsx)(Je,{content:F,placement:ee,offset:10,children:(0,X.jsx)(Le,{to:`/settings`,"data-testid":`backend-selector-settings-link`,"data-active":P,"aria-label":F,className:H(P?`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md bg-tertiary text-white font-normal cursor-pointer`:`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)] cursor-pointer`,Ae),children:(0,X.jsx)(pe,{width:16,height:16})})})]}),x?(0,X.jsx)(Mt,{onClose:()=>w(!1)}):null,T?(0,X.jsx)(Nt,{onClose:()=>E(!1)}):null]})}var Wn=`command-menu-trigger`,Gn=18;function Kn({collapsed:e}){let{t}=S(`openhands`),n=fe(e=>e.open),r=t(C.COMMAND_MENU$OPEN_LABEL),i=(0,X.jsxs)(`button`,{type:`button`,"data-testid":Wn,"aria-label":r,onClick:n,className:H(Be({collapsed:e}),e?`cursor-pointer`:`group justify-between border border-[var(--oh-border-subtle)] bg-[var(--oh-surface)]/50 hover:border-[var(--oh-border)] hover:bg-[var(--oh-surface-raised)]`),children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[e?(0,X.jsx)(Ke,{active:!1,children:(0,X.jsx)(de,{width:Gn,height:Gn})}):(0,X.jsx)(`span`,{className:H(Re,`text-[var(--oh-muted)] group-hover:text-white`),"aria-hidden":`true`,children:(0,X.jsx)(de,{width:Gn,height:Gn})}),(0,X.jsx)(`span`,{className:Ge(e),children:r})]}),e?null:(0,X.jsx)(`kbd`,{className:`rounded-md border border-[var(--oh-border)] bg-black/20 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-[var(--oh-text-dim)]`,children:t(C.COMMAND_MENU$SHORTCUT)})]});return e?(0,X.jsx)(Je,{content:r,placement:`right`,children:i}):i}var qn=(e=20)=>{let{data:t}=Rt(),n=D(),r=!xe(n.backend);return _({queryKey:[`user`,`conversations`,`paginated`,e,n.backend.id,n.orgId],queryFn:async({pageParam:t})=>await Pt.searchConversations(e,t),enabled:!!t&&r,getNextPageParam:e=>e.next_page_id,initialPageParam:void 0,refetchInterval:1e4,meta:{backendId:n.backend.id}})},Jn=(e=10)=>x({queryKey:[`start-tasks`,`search`,e],queryFn:()=>[],select:e=>e.filter(e=>e.status!==`READY`&&e.status!==`ERROR`)});function Yn({onConfirm:e,onClose:t,onCancel:n}){let{t:r}=S(`openhands`);return(0,X.jsx)(De,{onClose:n,children:(0,X.jsxs)(G,{testID:`confirm-new-conversation-modal`,children:[(0,X.jsx)(ke,{title:r(C.CONVERSATION$EXIT_WARNING)}),(0,X.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,X.jsx)(Oe,{text:r(C.BUTTON$CANCEL),onClick:t,className:`bg-tertiary`}),(0,X.jsx)(Oe,{text:r(C.ACTION$CONFIRM),onClick:e,className:`bg-[#C63143]`})]})]})})}function Xn({titleMode:e,title:t,onSave:n,isConversationArchived:r}){return e===`edit`?(0,X.jsx)(`input`,{autoFocus:!0,"data-testid":`conversation-card-title`,onClick:e=>{e.preventDefault(),e.stopPropagation()},onBlur:e=>{n(e.currentTarget?.value?.trim?.()??``)},onKeyUp:e=>{e.nativeEvent.isComposing||e.key===`Enter`&&e.currentTarget.blur()},type:`text`,defaultValue:t,className:`text-sm leading-6 font-semibold bg-transparent w-full`}):(0,X.jsx)(`p`,{"data-testid":`conversation-card-title`,className:H(`text-xs leading-6 font-semibold bg-transparent truncate overflow-hidden`,r&&`opacity-60`),children:t})}var Zn=e=>{switch(e){case U.FINISHED:return`check`;case U.RUNNING:return`working`;case U.IDLE:case U.WAITING_FOR_CONFIRMATION:return`active`;case U.PAUSED:return`paused`;case U.ERROR:case U.STUCK:return`error`;default:return`unknown`}},Qn=(e,t)=>{if(t)return`COMMON$ARCHIVED`;switch(e){case`check`:return`COMMON$FINISHED`;case`working`:case`active`:return`COMMON$WORKING`;case`paused`:return`COMMON$PAUSED`;case`error`:return`COMMON$ERROR`;default:return`COMMON$STOPPED`}};function $n(e){switch(e){case`check`:return(0,X.jsx)(`svg`,{"data-testid":`conversation-status-check`,viewBox:`0 0 12 12`,className:`w-2.5 h-2.5 stroke-[var(--oh-status-success)]`,fill:`none`,strokeWidth:2.25,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,X.jsx)(`path`,{d:`M2.5 6.5 5 9l4.5-5.5`})});case`working`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-working`,className:`w-1.5 h-1.5 rounded-full animate-pulse bg-[var(--oh-status-success)]`});case`active`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-active`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-status-success)]`});case`paused`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-paused`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-muted)]`});case`error`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-error`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-status-error)]`});default:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-unknown`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-color-tertiary)]`})}}function er({executionStatus:e,sandboxStatus:t,showTooltip:n=!0}){let{t:r}=S(`openhands`),i=t===`MISSING`,a=t===`ERROR`?`error`:i?`paused`:Zn(e),o=r(Qn(a,i)),s=(0,X.jsx)(`div`,{className:`w-2.5 h-2.5 flex items-center justify-center shrink-0`,children:i?(0,X.jsx)(nn,{"data-testid":`conversation-status-archived`,size:10,className:`shrink-0 text-[var(--oh-muted)] opacity-60`,"aria-hidden":!0}):$n(a)});return n?(0,X.jsx)(Je,{content:o,placement:`right`,showArrow:!0,tooltipClassName:`bg-base text-white text-xs shadow-lg`,children:s}):s}function tr({title:e,titleMode:t,onTitleSave:n,executionStatus:r,sandboxStatus:i}){let a=mt(i);return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden`,children:[r!==void 0&&(0,X.jsx)(`div`,{className:`flex w-[18px] shrink-0 items-center justify-center`,children:(0,X.jsx)(er,{executionStatus:r,sandboxStatus:i,showTooltip:!1})}),(0,X.jsx)(Xn,{title:e,titleMode:t,onSave:n,isConversationArchived:a})]})}var nr=e(a(),1);function rr({onClose:e,onDelete:t,onStop:n,onEdit:r,onDisplayCost:i,onShowAgentTools:a,onShowSkills:o,onDownloadViaVSCode:s,onDownloadConversation:c,position:l=`bottom`,floatingStyle:u,ignoreOutsideClickRef:d}){let{t:f}=S(`openhands`),{backend:p}=D(),m=Xt(e,d),h=p.kind===`cloud`?C.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:C.COMMON$STOP_CONVERSATION,g=(0,Y.useCallback)((e,t,n)=>{let r=e.filter(e=>e!=null);return r.length>0?n?(0,X.jsx)(Y.Fragment,{children:r},t):(0,X.jsxs)(Y.Fragment,{children:[r,(0,X.jsx)(at,{inset:`menu`})]},t):null},[]),_=u!=null;return(0,X.jsxs)(rn,{ref:m,testId:`context-menu`,style:_?u:void 0,theme:_?`popover`:`default`,position:_?`none`:l,alignment:_?`none`:`right`,spacing:_?`none`:`default`,className:_?`mt-0 min-w-[200px] w-max max-w-[min(280px,100vw-16px)]`:`z-[200] mt-0`,children:[g([r&&(0,X.jsx)(q,{testId:`edit-button`,onClick:r,children:(0,X.jsx)(J,{icon:(0,X.jsx)(sn,{width:16,height:16}),text:f(C.BUTTON$RENAME)})},`edit-button`)],`edit-section`),g([a&&(0,X.jsx)(q,{testId:`show-agent-tools-button`,onClick:a,children:(0,X.jsx)(J,{icon:(0,X.jsx)(gt,{width:16,height:16}),text:f(C.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})},`show-agent-tools-button`),o&&(0,X.jsx)(q,{testId:`show-skills-button`,onClick:o,children:(0,X.jsx)(J,{icon:(0,X.jsx)(cn,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:f(C.CONVERSATION$SHOW_SKILLS)})},`show-skills-button`)],`tools-section`),g([n&&(0,X.jsx)(q,{testId:`stop-button`,onClick:n,children:(0,X.jsx)(J,{icon:(0,X.jsx)(lt,{width:16,height:16}),text:f(h)})},`stop-button`),s&&(0,X.jsx)(q,{testId:`download-vscode-button`,onClick:s,children:(0,X.jsx)(J,{icon:(0,X.jsx)(Bt,{width:16,height:16}),text:f(C.BUTTON$DOWNLOAD_VIA_VSCODE)})},`download-vscode-button`),c&&(0,X.jsx)(q,{testId:`download-trajectory-button`,onClick:c,children:(0,X.jsx)(J,{icon:(0,X.jsx)(Bt,{width:16,height:16}),text:f(C.BUTTON$DOWNLOAD_CONVERSATION_DATA)})},`download-trajectory-button`)],`control-section`),g([i&&(0,X.jsx)(q,{testId:`display-cost-button`,onClick:i,children:(0,X.jsx)(J,{icon:(0,X.jsx)(qt,{width:16,height:16}),text:f(C.BUTTON$DISPLAY_COST)})},`display-cost-button`),t&&(0,X.jsx)(q,{testId:`delete-button`,onClick:t,children:(0,X.jsx)(J,{icon:(0,X.jsx)(an,{width:16,height:16}),text:f(C.COMMON$DELETE_CONVERSATION)})},`delete-button`)],`info-section`,!0)]})}function ir({contextMenuOpen:e,onContextMenuToggle:t,onDelete:n,onStop:r,onEdit:i,onDownloadViaVSCode:a,onDownloadConversation:o,executionStatus:s,conversationId:c,showOptions:l}){let u=ve(s),d=ye(s),f=(0,Y.useRef)(null),[,p]=(0,Y.useReducer)(e=>e+1,0);(0,Y.useLayoutEffect)(()=>{if(!e)return;p();let t=0,n=()=>{t||=window.requestAnimationFrame(()=>{t=0,p()})};return window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{t&&window.cancelAnimationFrame(t),window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}},[e]);let m=(()=>{if(!e||!f.current)return;let t=f.current.getBoundingClientRect(),n=Number(window.innerWidth)||0,r=Number(window.innerHeight)||0,i=Number(t.bottom)||0,a=Number(t.right)||0;return{position:`fixed`,top:i+280+8>r?Math.max(8,t.top-280-4):i+4,right:Math.max(8,n-a),zIndex:1e5}})(),h=typeof document<`u`?document.body:null;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(on,{ref:f,onClick:n=>{n.preventDefault(),n.stopPropagation(),t(!e)},className:H(u&&`opacity-60`)}),e&&m&&h?(0,nr.createPortal)((0,X.jsx)(rr,{ignoreOutsideClickRef:f,floatingStyle:m,onClose:()=>t(!1),onDelete:n,onStop:d?r:void 0,onEdit:i,onDownloadViaVSCode:c&&l?a:void 0,onDownloadConversation:c?o:void 0,position:`bottom`}),h):null]})}function ar(e){return e?e.split(`/`).pop()||e:null}var or={bitbucket:dn,bitbucket_data_center:dn,github:ln,gitlab:un};function sr({selectedRepository:e}){let t=e.git_provider?or[e.git_provider]:null;return(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 overflow-hidden`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[t&&(0,X.jsx)(t,{size:14,className:`shrink-0 text-[var(--oh-muted)]`}),e.git_provider===`azure_devops`&&(0,X.jsx)(ct,{className:`h-[14px] w-[14px] shrink-0 text-[var(--oh-muted)]`}),(0,X.jsx)(`span`,{"data-testid":`conversation-card-selected-repository`,className:`min-w-0 truncate text-xs text-[var(--oh-muted)]`,children:e.selected_repository})]}),(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[(0,X.jsx)(tn,{size:12,className:`shrink-0 text-[var(--oh-muted)]`}),(0,X.jsx)(`span`,{"data-testid":`conversation-card-selected-branch`,className:`min-w-0 truncate text-xs text-[var(--oh-muted)]`,children:e.selected_branch})]})]})}function cr({workspaceWorkingDir:e}){let{t}=S(`openhands`),n=e?b(e).trim():``;return n?(0,X.jsx)(`span`,{className:`truncate min-w-0 text-xs text-[var(--oh-muted)] flex-1`,title:e??void 0,children:n}):(0,X.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-[var(--oh-muted)] flex-1 min-w-0 overflow-hidden`,children:[(0,X.jsx)(y,{width:14,height:14,className:`text-[var(--oh-muted)]`}),(0,X.jsx)(`span`,{className:`truncate min-w-0`,children:t(C.COMMON$NO_REPOSITORY)})]})}function lr({selectedRepository:e,lastUpdatedAt:t,createdAt:n,executionStatus:r,workspaceWorkingDir:i,showRepositoryMetadata:a=!0,showTimestamp:o=!0,llmModel:s,showAgentChip:c=!1,agentKind:l=null,acpServer:u=null}){let{t:d}=S(`openhands`),f=ve(r),p=null;if(c)if(l===`acp`){let e=Ft(u)??d(C.CONVERSATION$ACP_AGENT_GENERIC),t=Lt(u,s),n=t??e;p={kind:It(u),text:n,tooltip:t?`${e} · ${t}`:e}}else s&&(p={kind:`openhands`,text:ar(s)??s,tooltip:s});let m=r===void 0?void 0:`pl-[26px]`;return(0,X.jsxs)(`div`,{className:H(`flex flex-col gap-0.5 mt-0.5 w-full min-w-0`,f&&`opacity-60`),children:[p?(0,X.jsx)(`div`,{className:m,children:(0,X.jsxs)(`span`,{"data-testid":`conversation-card-agent-chip`,className:`inline-flex items-center gap-1 text-xs text-[var(--oh-muted)] max-w-full min-w-0`,title:p.tooltip,children:[(0,X.jsx)(P,{kind:p.kind}),(0,X.jsx)(`span`,{className:`truncate`,children:p.text})]})}):null,(0,X.jsxs)(`div`,{className:H(`flex flex-row items-center gap-2 w-full min-w-0`,a&&m),children:[a&&(e?.selected_repository?(0,X.jsx)(sr,{selectedRepository:e}):(0,X.jsx)(cr,{workspaceWorkingDir:i})),(0,X.jsx)(`div`,{className:`flex items-center gap-2 shrink-0 ml-auto`,children:o&&(n??t)&&(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] text-right`,children:(0,X.jsx)(`time`,{children:`${le(t??n)} ${d(C.CONVERSATION$AGO)}`})})})]})]})}function ur(){let{t:e}=S(`openhands`);return(0,X.jsxs)(`span`,{"data-testid":`error-badge`,className:`flex items-center gap-1 px-1.5 py-0.5 bg-[var(--oh-status-error)] text-white text-xs font-medium rounded-full`,children:[(0,X.jsx)(bt,{className:`text-white w-3 h-3`}),(0,X.jsx)(`span`,{children:e(C.COMMON$ERROR)})]})}function dr({onClick:e,onDelete:t,onStop:n,onChangeTitle:r,showOptions:i,title:a,selectedRepository:o,lastUpdatedAt:s,createdAt:c,conversationId:l,executionStatus:u,sandboxStatus:d,contextMenuOpen:f=!1,onContextMenuToggle:p,isActive:m=!1,workspaceWorkingDir:h,showRepositoryMetadata:g=!0,llmModel:_=null,showLlmProfiles:v=!1,agentKind:y=null,acpServer:b=null,isPinned:x=!1,onTogglePin:w,alwaysShowPinIcon:T=!1}){let{t:E}=S(`openhands`),{trackDownloadVsCodeButtonClicked:D}=jt(),[O,k]=Y.useState(`view`),{mutateAsync:A}=pt(),j=e=>{e!==``&&e!==a&&r?.(e),k(`view`)},M=e=>{e.preventDefault(),e.stopPropagation(),t?.(),p?.(!1)},N=e=>{e.preventDefault(),e.stopPropagation(),n?.(),p?.(!1)},P=e=>{e.preventDefault(),e.stopPropagation(),k(`edit`),p?.(!1)},F=async e=>{if(e.preventDefault(),e.stopPropagation(),D(),l)try{let e=await en.getVSCodeUrl(l);if(e.vscode_url){let t=Wt(e.vscode_url);t&&window.open(t,`_blank`)}}catch{}p?.(!1)},I=async e=>{e.preventDefault(),e.stopPropagation(),l&&await A(l),p?.(!1)},ee=e=>{e.preventDefault(),e.stopPropagation(),w?.()},L=()=>(0,X.jsx)(`button`,{type:`button`,"data-testid":l?`conversation-pin-toggle-${l}`:`conversation-pin-toggle`,"aria-pressed":x,"aria-label":E(x?C.CONVERSATION_PANEL$UNPIN_CONVERSATION:C.CONVERSATION_PANEL$PIN_CONVERSATION),onClick:ee,className:H(`flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1`,`text-[var(--oh-muted)] hover:bg-white/10 hover:text-white`),children:(0,X.jsx)(wn,{className:H(`h-3.5 w-3.5`,x&&`fill-current`),"aria-hidden":!0})}),R=!!(t||r||i),z=R||!!w,B=T&&x&&!!w,te=g||v&&(y===`acp`||!!_);return(0,X.jsxs)(`div`,{"data-testid":`conversation-card`,"data-context-menu-open":f.toString(),"data-active":m?`true`:`false`,onClick:e,className:H(`group relative h-auto w-full cursor-pointer rounded-md py-1 pl-2 pr-1 transition-colors`,!f&&`hover:bg-[var(--oh-surface)]`,(m||f)&&`bg-[var(--oh-surface)]`),children:[(0,X.jsxs)(`div`,{className:`flex items-center w-full min-w-0`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden`,children:[(0,X.jsx)(tr,{title:a,titleMode:O,onTitleSave:j,executionStatus:u,sandboxStatus:d}),d===`ERROR`&&(0,X.jsx)(ur,{})]}),(0,X.jsxs)(`div`,{className:H(`relative ml-auto pl-2 flex items-center justify-end shrink-0`,B?`min-w-[3.75rem]`:z&&`group-hover:min-w-[3.75rem] group-focus-within:min-w-[3.75rem]`,f&&`min-w-[3.75rem]`),children:[!B&&(c??s)&&(0,X.jsx)(`p`,{className:H(`text-xs text-[var(--oh-muted)] text-right whitespace-nowrap transition-opacity -translate-x-1.5`,z&&`group-hover:opacity-0 group-focus-within:opacity-0`,f&&`opacity-0`),children:(0,X.jsx)(`time`,{children:le(s??c)})}),z?(0,X.jsxs)(`div`,{className:H(`absolute right-0 top-1/2 flex -translate-y-1/2 items-center gap-0.5 transition-opacity`,B?`pointer-events-auto visible opacity-100`:H(`pointer-events-none opacity-0 invisible`,`group-hover:pointer-events-auto group-hover:opacity-100 group-hover:visible`,`group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-focus-within:visible`),f&&`pointer-events-auto visible opacity-100`),children:[w?L():null,B&&(c??s)&&R?(0,X.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,X.jsx)(`div`,{className:H(!f&&`invisible pointer-events-none group-hover:visible group-hover:pointer-events-auto group-focus-within:visible group-focus-within:pointer-events-auto`),children:(0,X.jsx)(ir,{contextMenuOpen:f,onContextMenuToggle:p||(()=>{}),onDelete:t&&M,onStop:n&&N,onEdit:r&&P,onDownloadViaVSCode:F,onDownloadConversation:I,executionStatus:u,conversationId:l,showOptions:i})}),(0,X.jsx)(`p`,{className:H(`pointer-events-none absolute inset-0 flex items-center justify-end`,`text-xs text-[var(--oh-muted)] whitespace-nowrap -translate-x-1.5`,`group-hover:hidden group-focus-within:hidden`,f&&`hidden`),children:(0,X.jsx)(`time`,{children:le(s??c)})})]}):null,!B&&R?(0,X.jsx)(ir,{contextMenuOpen:f,onContextMenuToggle:p||(()=>{}),onDelete:t&&M,onStop:n&&N,onEdit:r&&P,onDownloadViaVSCode:F,onDownloadConversation:I,executionStatus:u,conversationId:l,showOptions:i}):null]}):null]})]}),te&&(0,X.jsx)(lr,{selectedRepository:o,lastUpdatedAt:s,createdAt:c,executionStatus:u,workspaceWorkingDir:h,showRepositoryMetadata:g,showTimestamp:!1,llmModel:_,showAgentChip:v,agentKind:y,acpServer:b})]})}var fr={bitbucket:dn,bitbucket_data_center:dn,github:ln,gitlab:un};function pr({label:e,children:t}){return(0,X.jsxs)(`div`,{className:`flex items-start gap-2 text-xs`,children:[(0,X.jsx)(`span`,{className:`w-20 shrink-0 text-[var(--oh-muted)]`,children:e}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 break-words text-[var(--oh-foreground)]`,children:t})]})}function mr({title:e,executionStatus:t,sandboxStatus:n,selectedRepository:r,workspaceWorkingDir:i,llmModel:a,createdAt:o}){let{t:s}=S(`openhands`),c=r?.selected_repository??null,l=r?.selected_branch??null,u=r?.git_provider??null,d=u?fr[u]:null,f=o?new Date(o).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):null;return(0,X.jsxs)(`div`,{className:`flex w-[280px] flex-col gap-3 p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2`,children:[t===void 0?null:(0,X.jsx)(`div`,{className:`mt-0.5`,children:(0,X.jsx)(er,{executionStatus:t,sandboxStatus:n,showTooltip:!1})}),(0,X.jsx)(`span`,{className:`break-words text-sm font-medium text-white`,children:e})]}),(0,X.jsxs)(`dl`,{className:`flex flex-col gap-1.5`,children:[c?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(pr,{label:s(C.CONVERSATION$REPOSITORY),children:(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[d?(0,X.jsx)(d,{size:12,className:`mt-0.5 shrink-0`}):null,u===`azure_devops`?(0,X.jsx)(ct,{className:`mt-0.5 h-3 w-3 shrink-0`}):null,(0,X.jsx)(`span`,{className:`break-all`,children:c})]})}),l?(0,X.jsx)(pr,{label:s(C.CONVERSATION$BRANCH),children:(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[(0,X.jsx)(tn,{size:11,className:`mt-0.5 shrink-0`}),(0,X.jsx)(`span`,{className:`break-all`,children:l})]})}):null]}):i?(0,X.jsx)(pr,{label:s(C.CONVERSATION_PANEL$PREVIEW_DIRECTORY),children:(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[(0,X.jsx)(ie,{size:12,className:`mt-0.5 shrink-0`}),(0,X.jsx)(`span`,{className:`break-all`,children:i})]})}):null,a?(0,X.jsx)(pr,{label:s(C.CONVERSATION_PANEL$PREVIEW_MODEL),children:(0,X.jsx)(`span`,{className:`break-all`,children:a})}):null,f?(0,X.jsx)(pr,{label:s(C.CONVERSATION$CREATED),children:f}):null]})]})}function hr({taskStatus:e}){return(0,X.jsx)(`div`,{className:H(`w-2 h-2 rounded-full flex-shrink-0`,(()=>{switch(e){case`READY`:return`bg-green-500`;case`ERROR`:return`bg-red-500`;case`WORKING`:case`WAITING_FOR_SANDBOX`:case`PREPARING_REPOSITORY`:case`RUNNING_SETUP_SCRIPT`:case`SETTING_UP_GIT_HOOKS`:case`SETTING_UP_SKILLS`:case`STARTING_CONVERSATION`:return`bg-yellow-500 animate-pulse`;default:return`bg-[var(--oh-interactive-selected)]`}})()),"aria-label":`Task status: ${e}`})}function gr({taskStatus:e}){let{t}=S(`openhands`);return e===`WORKING`?null:(0,X.jsx)(`span`,{className:H(`text-xs font-medium px-2 py-0.5 rounded border flex-shrink-0`,(()=>{switch(e){case`READY`:return`bg-green-500/10 text-green-400 border-green-500/20`;case`ERROR`:return`bg-red-500/10 text-red-400 border-red-500/20`;default:return`bg-yellow-500/10 text-yellow-400 border-yellow-500/20`}})()),children:t(be(e))})}function _r({title:e,taskStatus:t}){return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden mr-2`,children:[(0,X.jsx)(`div`,{className:`flex items-center`,children:(0,X.jsx)(hr,{taskStatus:t})}),(0,X.jsx)(`h3`,{className:`text-sm font-medium text-content-2 truncate flex-1`,children:e}),(0,X.jsx)(gr,{taskStatus:t})]})}function vr({selectedRepository:e,createdAt:t,detail:n}){let{t:r}=S(`openhands`);return(0,X.jsxs)(`div`,{className:H(`flex flex-col gap-1 mt-1`),children:[(0,X.jsxs)(`div`,{className:`flex flex-row justify-between items-center`,children:[e?(0,X.jsx)(sr,{selectedRepository:e}):(0,X.jsx)(cr,{}),t&&(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] flex-1 text-right`,children:(0,X.jsx)(`time`,{children:`${le(t)} ${r(C.CONVERSATION$AGO)}`})})]}),n&&(0,X.jsx)(`div`,{className:`text-xs text-[var(--oh-text-subtle)] truncate`,children:n})]})}function yr({task:e,onClick:t}){let{t:n}=S(`openhands`),r=e.request.title||e.detail||n(C.CONVERSATION$STARTING_CONVERSATION),i=e.request.selected_repository?{selected_repository:e.request.selected_repository,selected_branch:e.request.selected_branch||null,git_provider:e.request.git_provider||null}:null;return(0,X.jsxs)(`div`,{"data-testid":`start-task-card`,onClick:t,className:H(`relative h-auto w-full p-3.5 border-b border-[var(--oh-border)] cursor-pointer`,`hover:bg-tertiary`),children:[(0,X.jsx)(`div`,{className:`flex items-center justify-between w-full`,children:(0,X.jsx)(_r,{title:r,taskStatus:e.status})}),(0,X.jsx)(vr,{selectedRepository:i,createdAt:e.created_at,detail:e.detail})]})}function br({compact:e=!1}){return e?(0,X.jsx)(`div`,{"data-testid":`conversation-card-skeleton-compact`,className:`skeleton-stagger flex flex-col items-center gap-1.5 py-1`,"aria-hidden":!0,children:[0,1,2].map(e=>(0,X.jsx)(`div`,{className:`h-1.5 w-7 shrink-0 skeleton`},`conversation-skeleton-compact-${e}`))}):(0,X.jsx)(`div`,{"data-testid":`conversation-card-skeleton`,className:`skeleton-stagger flex flex-col gap-1.5 py-0.5`,"aria-hidden":!0,children:[0,1,2].map(e=>(0,X.jsx)(`div`,{className:`h-6 min-h-6 w-full skeleton`},`conversation-skeleton-row-${e}`))})}function xr({conversationId:e,title:t,selectedRepository:n,executionStatus:i,sandboxStatus:a,lastUpdatedAt:o,createdAt:s,workspaceWorkingDir:c,isActive:l=!1,onClose:u,showRepositoryMetadata:d=!0,llmModel:f=null,showLlmProfiles:p=!1,agentKind:m=null,acpServer:h=null}){let{t:g}=S(`openhands`);return(0,X.jsx)(r,{content:(0,X.jsxs)(`div`,{className:`w-[260px] p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,X.jsx)(er,{executionStatus:i,sandboxStatus:a,showTooltip:!1}),(0,X.jsx)(`span`,{className:`text-sm font-medium text-white truncate`,title:t,children:t||g(C.CONVERSATION$UNTITLED)})]}),(0,X.jsx)(lr,{selectedRepository:n,lastUpdatedAt:o,createdAt:s,executionStatus:i,workspaceWorkingDir:c,showRepositoryMetadata:d,llmModel:f,showAgentChip:p,agentKind:m,acpServer:h})]}),placement:`right`,closeDelay:100,className:`bg-[var(--oh-surface)] text-white border border-[var(--oh-border-subtle)] shadow-xl p-0`,disableAnimation:!1,children:(0,X.jsx)(Le,{to:`/conversations/${e}`,onClick:u,"data-testid":`compact-conversation-row`,"data-conversation-id":e,"aria-label":t||e,className:({isActive:e})=>H(`flex items-center justify-center w-10 h-9 mx-auto rounded-md`,`transition-colors cursor-pointer`,e||l?`bg-tertiary`:`hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(er,{executionStatus:i,sandboxStatus:a,showTooltip:!1})})})}var Sr={showOlderConversations:!0,showRepoBranchMetadata:!1,showLlmProfiles:!0,showHoverMetadata:!0,organizeMode:`chronological`,conversationSort:`updated`,threadScope:`all`,groupFolderOrder:[]},Z=wt()(Tt(e=>({...Sr,setShowOlderConversations:t=>e(()=>({showOlderConversations:t})),toggleShowOlderConversations:()=>e(e=>({showOlderConversations:!e.showOlderConversations})),setShowRepoBranchMetadata:t=>e(()=>({showRepoBranchMetadata:t})),toggleShowRepoBranchMetadata:()=>e(e=>({showRepoBranchMetadata:!e.showRepoBranchMetadata})),setShowLlmProfiles:t=>e(()=>({showLlmProfiles:t})),toggleShowLlmProfiles:()=>e(e=>({showLlmProfiles:!e.showLlmProfiles})),setShowHoverMetadata:t=>e(()=>({showHoverMetadata:t})),toggleShowHoverMetadata:()=>e(e=>({showHoverMetadata:!e.showHoverMetadata})),setOrganizeMode:t=>e(()=>({organizeMode:t})),setConversationSort:t=>e(()=>({conversationSort:t})),setThreadScope:t=>e(()=>({threadScope:t})),setGroupFolderOrder:t=>e(()=>({groupFolderOrder:[...t]}))}),{name:`conversation-panel-preferences`,storage:Et(()=>localStorage),partialize:e=>({showOlderConversations:e.showOlderConversations,showRepoBranchMetadata:e.showRepoBranchMetadata,showLlmProfiles:e.showLlmProfiles,showHoverMetadata:e.showHoverMetadata,organizeMode:e.organizeMode,conversationSort:e.conversationSort,threadScope:e.threadScope,groupFolderOrder:e.groupFolderOrder})})),Cr=`px-2 pb-1 pt-1`,wr=`text-[11px] font-semibold uppercase tracking-wide text-[var(--oh-muted)]`;function Tr({children:e,suffix:t}){return t==null?(0,X.jsx)(`div`,{role:`presentation`,className:H(Cr,wr),children:e}):(0,X.jsxs)(`div`,{role:`presentation`,className:H(`flex items-baseline justify-between gap-2`,Cr),children:[(0,X.jsx)(`span`,{className:H(`min-w-0 truncate text-left`,wr),children:e}),t]})}function Er(){return(0,X.jsx)(at,{inset:`menu`})}function Q({icon:e,label:t,selected:n,onClick:r,testId:i,disabled:a}){return(0,X.jsxs)(`button`,{type:`button`,role:n===void 0?`menuitem`:`menuitemradio`,"aria-checked":n===void 0?void 0:!!n,"data-testid":i,disabled:a,onClick:r,className:H(`group`,et,`text-[var(--oh-foreground)] disabled:opacity-50`),children:[(0,X.jsx)(e,{className:H(`h-3.5 w-3.5`,Qe),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),n?(0,X.jsx)(j,{className:`ml-auto h-3.5 w-3.5 shrink-0 text-white`,"aria-hidden":!0}):null]})}var Dr=e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1):e;function Or({filterMenuOpen:e,setFilterMenuOpen:t,menuRef:n,backendKind:r,organizeMode:i,setOrganizeMode:a,conversationSort:o,setConversationSort:s,threadScope:c,setThreadScope:l,showOlderConversations:u,toggleShowOlderConversations:d,showRepoBranchMetadata:f,toggleShowRepoBranchMetadata:p,showLlmProfiles:m,toggleShowLlmProfiles:h,showHoverMetadata:g,toggleShowHoverMetadata:_,totalConversationsCount:v,onRequestDeleteAll:y}){let{t:b}=S(`openhands`),x=b(r===`local`?C.CONVERSATION_PANEL$BY_WORKSPACE:C.CONVERSATION_PANEL$BY_REPOSITORY),w=Y.useRef(null),T=Y.useRef(null),E=Y.useRef(e);return Y.useEffect(()=>{e?(T.current?.querySelector(`[role="menuitem"], [role="menuitemradio"]`))?.focus():E.current&&w.current?.focus(),E.current=e},[e]),(0,X.jsxs)(`div`,{ref:n,className:`relative shrink-0 pr-0.5`,children:[(0,X.jsx)(`button`,{ref:w,type:`button`,"data-testid":`older-conversations-filter-toggle`,"aria-label":b(C.CONVERSATION_PANEL$FILTER_LABEL),"aria-haspopup":`menu`,"aria-expanded":e,onClick:()=>t(!e),className:H(`inline-flex h-7 w-7 items-center justify-center rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`,tt),children:(0,X.jsx)(Sn,{className:`lucide lucide-list-filter shrink-0`,width:14,height:14,strokeWidth:2,"aria-hidden":!0})}),e?(0,X.jsxs)(`div`,{ref:T,role:`menu`,"aria-orientation":`vertical`,"aria-label":b(C.CONVERSATION_PANEL$FILTER_LABEL),tabIndex:-1,"data-testid":`older-conversations-filter-menu`,onKeyDown:e=>{if(e.key===`Escape`){e.preventDefault(),t(!1);return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;let n=T.current;if(!n)return;let r=Array.from(n.querySelectorAll(`[role="menuitem"], [role="menuitemradio"]`)).filter(e=>!e.disabled);if(r.length===0)return;let i=r.indexOf(document.activeElement),a=e.key===`ArrowDown`?1:-1,o=((i===-1?0:i)+a+r.length)%r.length;e.preventDefault(),r[o]?.focus()},className:H(`absolute right-0 top-full z-50 mt-0 w-64 rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-[var(--oh-foreground)] shadow-lg`,K,Xe),children:[(0,X.jsx)(Tr,{children:b(C.CONVERSATION_PANEL$ORGANIZE)}),(0,X.jsx)(Q,{icon:ie,label:x,selected:i===`grouped`,onClick:()=>{a(`grouped`),t(!1)}}),(0,X.jsx)(Q,{icon:_n,label:b(C.CONVERSATION_PANEL$CHRONOLOGICAL),selected:i===`chronological`,onClick:()=>{a(`chronological`),t(!1)}}),(0,X.jsx)(Er,{}),(0,X.jsx)(Tr,{children:b(C.CONVERSATION_PANEL$SORT_BY)}),(0,X.jsx)(Q,{icon:gn,label:b(C.CONVERSATION_PANEL$SORT_CREATED),selected:o===`created`,onClick:()=>{s(`created`),t(!1)}}),(0,X.jsx)(Q,{icon:vn,label:b(C.CONVERSATION_PANEL$SORT_UPDATED),selected:o===`updated`,onClick:()=>{s(`updated`),t(!1)}}),(0,X.jsx)(Er,{}),(0,X.jsx)(Tr,{children:b(C.CONVERSATION_PANEL$SHOW)}),(0,X.jsx)(Q,{icon:Cn,label:b(C.CONVERSATION_PANEL$ALL_THREADS),selected:c===`all`,onClick:()=>{l(`all`),t(!1)}}),(0,X.jsx)(Q,{icon:En,label:b(C.CONVERSATION_PANEL$RELEVANT_THREADS),selected:c===`relevant`,onClick:()=>{l(`relevant`),t(!1)}}),(0,X.jsx)(Er,{}),(0,X.jsx)(Tr,{children:b(C.CONVERSATION_PANEL$METADATA)}),(0,X.jsx)(Q,{icon:A,label:b(C.CONVERSATION_PANEL$LLM_MODEL),selected:m,testId:`toggle-llm-profiles`,onClick:()=>{h(),t(!1)}}),(0,X.jsx)(Q,{icon:z,label:b(C.CONVERSATION_PANEL$REPO_BRANCH),selected:f,testId:`toggle-repo-branch-metadata`,onClick:()=>{p(),t(!1)}}),(0,X.jsx)(Q,{icon:ce,label:b(C.CONVERSATION_PANEL$HOVER_METADATA),selected:g,testId:`toggle-hover-metadata`,onClick:()=>{_(),t(!1)}}),(0,X.jsx)(Er,{}),(0,X.jsx)(Tr,{suffix:(0,X.jsx)(`span`,{className:`shrink-0 text-right text-[10px] font-medium normal-case tracking-normal text-[var(--oh-muted)]/70`,children:b(C.CONVERSATION_PANEL$OLDER_OVER_ONE_HOUR)}),children:b(C.CONVERSATION_PANEL$OLDER_SECTION)}),(0,X.jsx)(Q,{testId:`toggle-older-conversations`,icon:u?yn:bn,label:Dr(b(u?C.CONVERSATION$HIDE:C.CONVERSATION$SHOW_ALL)),onClick:()=>{d(),t(!1)}}),(0,X.jsx)(Er,{}),(0,X.jsx)(Q,{testId:`delete-all-conversations`,icon:ge,label:Dr(b(C.CONVERSATION$DELETE_ALL)),disabled:v===0,onClick:()=>{v!==0&&(y(),t(!1))}})]}):null]})}var kr=H(`z-50 flex flex-col rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-white shadow-lg`,Ye);function Ar(e,t){let{open:n,enabled:r,targetWidth:i=256}=t,[a,o]=Y.useState(null),s=Y.useCallback(()=>{let t=e.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.min(i,window.innerWidth-16),a=n.right-r;a<8&&(a=8),a+r>window.innerWidth-8&&(a=Math.max(8,window.innerWidth-8-r)),o({top:n.bottom+4,left:a,width:r})},[e,i]);return Y.useLayoutEffect(()=>{if(!n||!r){o(null);return}return s(),window.addEventListener(`resize`,s),window.addEventListener(`scroll`,s,!0),()=>{window.removeEventListener(`resize`,s),window.removeEventListener(`scroll`,s,!0)}},[n,r,s]),a}function jr({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=S(`openhands`),{navigate:o}=Pe(),[s,c]=Y.useState(!1),l=Y.useRef(null),u=Y.useRef(null),d=Ar(u,{open:s,enabled:i}),{data:f,error:p}=oe(),m=f?.workspaceParents??[],{mutate:h}=te(),{mutate:g}=se(),{mutate:_}=L(),{mutate:v}=R(),{workspaces:y}=re(),b=ee(p,a),[x,w]=Y.useState(!1),[T,E]=Y.useState(!1),{mutate:D,isPending:O}=Qt(),k=$t(),A=O||k;Y.useEffect(()=>{if(!s||x||T)return;let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[s,x,T]),Y.useEffect(()=>{if(!s||x||T)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[s,x,T]);let j=e=>{A||D({workingDir:e,entryPoint:`sidebar_local_menu`},{onSuccess:e=>{c(!1),o(`/conversations/${e.conversation_id}`)}})},M=et,N=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),P=Y.useCallback(()=>{c(e=>!e)},[]),F=s&&(!i||d!==null),I=!!b,z=i&&d?{position:`fixed`,top:d.top,left:d.left,width:d.width}:void 0,ne=(0,X.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,disabled:I,onMouseDown:N,onClick:e=>{e.preventDefault(),e.stopPropagation(),!I&&w(!0)},className:M,children:a(C.HOME$ADD_WORKSPACES)}),ie=b?(0,X.jsx)(Je,{content:b,placement:`top`,children:(0,X.jsx)(`span`,{className:`block`,children:ne})}):ne;return(0,X.jsxs)(`div`,{className:H(!i&&`relative`,t),ref:l,children:[(0,X.jsx)(`span`,{ref:u,className:`inline-flex`,children:e({onClick:P,"aria-expanded":s,"aria-haspopup":`menu`,disabled:A})}),F&&(0,X.jsxs)(`div`,{"data-testid":r,className:H(kr,!i&&H(`absolute top-full mt-0`,n)),style:z,children:[(0,X.jsxs)(`ul`,{className:H(`max-h-[40vh] overflow-y-auto sm:max-h-[280px]`,K),children:[(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,disabled:A,"data-testid":`launch-no-workspace`,onClick:()=>j(),className:M,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:a(C.HOME$NO_WORKSPACE_OPTION)})})}),y.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,disabled:A,"data-testid":`launch-workspace`,"data-workspace-path":e.path,onClick:()=>j(e.path),className:M,children:[(0,X.jsx)(`span`,{className:nt,"aria-hidden":!0,children:(0,X.jsx)(st,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.id))]}),(0,X.jsxs)(`div`,{className:H(`flex flex-col`,K),"data-testid":`new-conversation-menu-footer`,children:[(0,X.jsx)(at,{inset:`menu`,testId:`new-conversation-menu-footer-divider`}),ie,(y.length>0||m.length>0)&&(0,X.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,onMouseDown:N,onClick:e=>{e.preventDefault(),e.stopPropagation(),E(!0)},className:M,children:a(C.HOME$MANAGE_WORKSPACES)})]})]}),(0,X.jsx)(B,{isOpen:x,onClose:()=>w(!1),onAdd:e=>h(e),onAddParent:e=>_(e)}),(0,X.jsx)(ae,{isOpen:T,workspaces:y,workspaceParents:m,onClose:()=>E(!1),onRemove:e=>g(e),onRemoveParent:e=>v(e)})]})}function Mr({repo:e,disabled:t,onSelect:n,itemClass:r}){return(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,disabled:t,"data-testid":`launch-repository`,"data-repo-name":e.full_name,onClick:()=>n(e),className:r,children:[(0,X.jsx)(`span`,{className:nt,"aria-hidden":!0,children:(0,X.jsx)(st,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.full_name})]})})}function Nr({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=S(`openhands`),{navigate:o}=Pe(),{providers:s}=vt(),{lastSelectedProvider:c,setLastSelectedProvider:l}=ht(),[u,d]=Y.useState(!1),f=Y.useRef(null),p=Y.useRef(null),m=Ar(p,{open:u,enabled:i}),[h,g]=Y.useState(c??null),[_,v]=Y.useState(``),y=_t(_,300);Y.useEffect(()=>{if(s.length===0){h!==null&&g(null);return}h&&s.includes(h)||g(c&&s.includes(c)?c:s[0])},[s,h,c]);let{data:b,isLoading:x,isError:w,hasNextPage:T,isFetchingNextPage:E,fetchNextPage:D}=ot({provider:h}),{data:O,isLoading:k}=ft(y,h),A=Y.useMemo(()=>b?.pages.flatMap(e=>e.items)??[],[b]),j=y?O??[]:A,{mutate:M,isPending:N}=Qt(),P=$t(),F=N||P;Y.useEffect(()=>{if(!u)return;let e=e=>{f.current&&!f.current.contains(e.target)&&d(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[u]),Y.useEffect(()=>{if(!u)return;let e=e=>{e.key===`Escape`&&d(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[u]);let I=e=>{F||M({repository:{name:e.full_name,gitProvider:e.git_provider,branch:e.main_branch??`main`},entryPoint:`sidebar_cloud_menu`},{onSuccess:e=>{d(!1),o(`/conversations/${e.conversation_id}`)}})},ee=e=>{g(e),l(e),v(``)},L=et;Y.useEffect(()=>{u&&(y||!T||E||x||j.length===0||j.length>=10||D())},[u,y,T,E,x,j.length,D]);let R=y?k:x,z=!y&&T&&j.length>0,B=Y.useCallback(()=>{d(e=>!e)},[]),te=u&&(!i||m!==null),ne=i&&m?{position:`fixed`,top:m.top,left:m.left,width:m.width}:void 0;return(0,X.jsxs)(`div`,{className:H(!i&&`relative`,t),ref:f,children:[(0,X.jsx)(`span`,{ref:p,className:`inline-flex`,children:e({onClick:B,"aria-expanded":u,"aria-haspopup":`menu`,disabled:F})}),te&&(0,X.jsxs)(`div`,{"data-testid":r,className:H(kr,!i&&H(`absolute top-full mt-0`,n)),style:ne,children:[s.length>1&&(0,X.jsx)(`div`,{className:`flex items-center gap-1 px-1 py-1`,"data-testid":`cloud-provider-tabs`,children:s.map(e=>{let t=e===h;return(0,X.jsxs)(`button`,{type:`button`,"data-testid":`cloud-provider-tab-${e}`,onClick:()=>ee(e),className:H(`flex items-center gap-1 rounded border px-2 py-1 text-xs`,`transition-none`,t?`border-[var(--oh-border-subtle)] bg-[var(--oh-interactive-hover)] text-white`:`border-transparent text-[var(--oh-text-secondary)] hover:text-white`),children:[(0,X.jsx)(yt,{gitProvider:e}),(0,X.jsx)(`span`,{className:`capitalize`,children:e})]},e)})}),(0,X.jsx)(`div`,{className:`px-2`,children:(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(fn,{width:16,height:16,"aria-hidden":!0,className:`pointer-events-none absolute left-0 top-1/2 -translate-y-1/2 text-[var(--oh-muted)]`}),(0,X.jsx)(`input`,{type:`text`,"data-testid":`cloud-repo-search-input`,value:_,onChange:e=>v(e.target.value),placeholder:a(C.COMMON$SEARCH_REPOSITORIES),disabled:!h,className:H(`w-full border-0 bg-transparent py-1.5 pl-6 pr-0 text-sm text-white`,`outline-none placeholder:text-[var(--oh-muted)]`,`focus:outline-none focus:ring-0`,`disabled:cursor-not-allowed disabled:opacity-60`)})]})}),(0,X.jsx)(at,{inset:`menu`}),(0,X.jsxs)(`ul`,{className:H(`max-h-[40vh] overflow-y-auto custom-scrollbar-always sm:max-h-[280px]`,K),children:[R&&j.length===0&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,"data-testid":`cloud-repo-loading`,children:a(C.HOME$LOADING_REPOSITORIES)}),w&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[#F87171]`,"data-testid":`cloud-repo-error`,children:a(C.HOME$FAILED_TO_LOAD_REPOSITORIES)}),!R&&!w&&j.length===0&&!!h&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,"data-testid":`cloud-repo-empty`,children:a(C.GITHUB$NO_RESULTS)}),j.map(e=>(0,X.jsx)(Mr,{repo:e,disabled:F,onSelect:I,itemClass:L},`${e.git_provider}:${e.id}`)),z&&(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`cloud-repo-load-more`,disabled:E,onClick:()=>D(),className:L,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-text-secondary)]`,children:a(E?C.HOME$LOADING_MORE_REPOSITORIES:C.CONVERSATION$LOAD_MORE)})})})]})]})]})}var Pr=H(`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md`,`text-[var(--oh-muted)] transition-colors`,`hover:bg-[var(--oh-surface-raised)] hover:text-white`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`,`disabled:cursor-not-allowed disabled:opacity-50`);function Fr({backendKind:e}){let{t}=S(`openhands`),n=t(C.CONVERSATION_PANEL$NEW_THREAD_FOLDER_ARIA),r=(0,X.jsx)(xn,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0,strokeWidth:2});return e===`local`?(0,X.jsx)(jr,{useFixedPlacement:!0,popoverTestId:`conversation-panel-new-thread-popover`,popoverClassName:``,trigger:({onClick:e,"aria-expanded":t,disabled:i,"aria-haspopup":a})=>(0,X.jsx)(`button`,{type:`button`,className:Pr,"aria-label":n,"aria-expanded":t,"aria-haspopup":a,disabled:i,"data-testid":`conversation-panel-new-thread-picker`,onClick:e,children:r})}):(0,X.jsx)(Nr,{useFixedPlacement:!0,popoverTestId:`conversation-panel-new-thread-popover`,popoverClassName:``,trigger:({onClick:e,"aria-expanded":t,disabled:i,"aria-haspopup":a})=>(0,X.jsx)(`button`,{type:`button`,className:Pr,"aria-label":n,"aria-expanded":t,"aria-haspopup":a,disabled:i,"data-testid":`conversation-panel-new-thread-picker`,onClick:e,children:r})})}function Ir(e,t){let n=t.limit??5;if(t.expanded||e.length<=n)return{visibleConversations:[...e],isPreviewTruncated:e.length>n,isShowingAll:!0};let r=t.activeConversationId==null?-1:e.findIndex(e=>e.id===t.activeConversationId);if(r>=n){let t=e[r];return{visibleConversations:[...e.slice(0,n-1),t],isPreviewTruncated:!0,isShowingAll:!1}}return{visibleConversations:e.slice(0,n),isPreviewTruncated:e.length>n,isShowingAll:!1}}function Lr(e,t){let n=new Map(t.map(e=>[e.id,e]));return e.map(e=>n.get(e)).filter(e=>e!=null)}function Rr(e,t){if(t.length===0)return[...e];let n=new Set(t);return e.filter(e=>!n.has(e.id))}function zr(e,t,n){if(t===`local`)return e===`__none_workspace`?{}:e.startsWith(`ws:`)?{workingDir:e.slice(3)}:{};if(e===`__none_repo`)return{};if(e.startsWith(`repo:`)){let t=e.slice(5),r=n[0];return{repository:{name:t,gitProvider:r?.git_provider??`github`,branch:r?.selected_branch??`main`}}}return{}}function Br(e){if(!e)return 0;let t=Date.parse(e);return Number.isFinite(t)?t:0}function Vr(e,t){let n=t===`created`?`created_at`:`updated_at`;return[...e].sort((e,t)=>Br(t[n])-Br(e[n]))}function Hr(e){let t=e.selected_workspace?.trim().replace(/\/+$/,``);if(!t)return{id:`__none_workspace`,label:``};let n=t.split(`/`).filter(Boolean).pop()??t;return{id:`ws:${t}`,label:n}}function Ur(e){let t=e.selected_repository?.trim().replace(/\/+$/,``);if(!t)return{id:`__none_repo`,label:``};let n=t.split(`/`).filter(Boolean),r=n.length?(n[n.length-1]??t).replace(/\.git$/,``):t.replace(/\.git$/,``);return{id:`repo:${t}`,label:r}}function Wr(e,t,n,r){let i=new Map;for(let n of e){let{id:e,label:a}=t===`local`?Hr(n):Ur(n),o=e===`__none_workspace`?r.emptyWorkspace:e===`__none_repo`?r.emptyRepository:a,s=i.get(e);s?s.conversations.push(n):i.set(e,{label:o,conversations:[n]})}let a=[...i.entries()].map(([e,r])=>{let i=Vr(r.conversations,n);return{id:e,label:r.label,conversations:i,launch:zr(e,t,i)}}),o=e=>e.conversations.reduce((e,t)=>Math.max(e,Br(n===`created`?t.created_at:t.updated_at)),0);return a.sort((e,t)=>o(t)-o(e)),a}function Gr(e,t){if(t.length===0)return[...e];let n=new Map(e.map(e=>[e.id,e])),r=[],i=new Set;for(let e of t){let t=n.get(e);t&&(r.push(t),i.add(e))}for(let t of e)i.has(t.id)||r.push(t);return r}function Kr(e,t,n,r,i=`after`){if(n===r)return[...e];let a=Gr(t.map(e=>({id:e})),e).map(e=>e.id),o=a.indexOf(n),s=a.indexOf(r);if(o<0||s<0)return[...e];let c=[...a];c.splice(o,1);let l=c.indexOf(r),u=i===`before`?l:l+1;return c.splice(u,0,n),c}function qr({group:e,expanded:t,previewExpanded:n,isDragging:r,dropIndicatorPosition:i,animateLayout:a,isCreatingConversationFlow:o,activeConversationId:s,onToggleExpanded:c,onDragStart:l,onDragEnd:u,onDragOver:d,onDragLeave:f,onDrop:p,onTogglePreviewExpanded:m,onLaunchFromGroup:h,renderConversationCard:g}){let{t:_}=S(`openhands`),v=(0,Y.useRef)(null),y=`thread-folder-${e.id.replace(/[^a-zA-Z0-9_-]/g,`-`)}`,b=e.id.replace(/[^a-zA-Z0-9_-]/g,`-`),{visibleConversations:x,isPreviewTruncated:w,isShowingAll:T}=Ir(e.conversations,{expanded:n,activeConversationId:s});return(0,X.jsxs)(N.section,{ref:v,layout:a?`position`:!1,transition:{type:`spring`,stiffness:600,damping:45},"aria-labelledby":y,"data-testid":`thread-folder-${b}`,onDragOver:d,onDragLeave:f,onDrop:p,className:`relative rounded-md`,children:[i?(0,X.jsx)(`div`,{"aria-hidden":!0,"data-testid":`thread-folder-drop-indicator-${b}`,className:H(`pointer-events-none absolute inset-x-0 z-10 h-0.5 rounded-full bg-[var(--oh-accent)]`,i===`before`?`-top-0.5`:`-bottom-0.5`)}):null,(0,X.jsxs)(`div`,{className:H(r&&`opacity-0`),children:[(0,X.jsxs)(`div`,{className:H(`flex h-8 w-full min-w-0 items-center gap-0.5 rounded-md pl-2 pr-1 text-sm font-normal`,`text-[var(--oh-muted)] transition-colors hover:bg-[var(--oh-surface-raised)] hover:text-white`),children:[(0,X.jsxs)(`button`,{type:`button`,draggable:!0,id:y,"aria-expanded":t,"aria-controls":`thread-folder-content-${b}`,"data-testid":`thread-folder-drag-${b}`,"aria-label":_(t?C.CONVERSATION_PANEL$COLLAPSE_FOLDER:C.CONVERSATION_PANEL$EXPAND_FOLDER,{label:e.label}),onClick:c,onDragStart:t=>{t.stopPropagation();let{dataTransfer:n}=t;if(n){n.effectAllowed=`move`,n.setData(`text/plain`,e.id);let r=v.current;if(r&&typeof n.setDragImage==`function`){let e=r.getBoundingClientRect(),i=r.cloneNode(!0);i.style.position=`fixed`,i.style.top=`0`,i.style.left=`-9999px`,i.style.width=`${e.width}px`,i.style.margin=`0`,i.style.pointerEvents=`none`,i.style.borderRadius=`0.5rem`,i.style.padding=`0.25rem`,i.style.backgroundColor=`var(--oh-surface-raised)`,i.style.boxShadow=`0 8px 24px rgba(0, 0, 0, 0.35)`,document.body.appendChild(i),n.setDragImage(i,t.clientX-e.left,t.clientY-e.top),window.setTimeout(()=>i.remove(),0)}}l()},onDragEnd:e=>{e.stopPropagation(),u()},className:H(`group/folder flex min-h-8 min-w-0 flex-1 cursor-grab items-center gap-2 rounded-md py-1 text-left text-inherit outline-none active:cursor-grabbing`,`focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`),children:[(0,X.jsx)(ie,{className:H(`h-4 w-4 shrink-0`,t?`hidden group-hover/folder:block`:`block group-hover/folder:hidden`),"aria-hidden":!0}),(0,X.jsx)(F,{className:H(`h-4 w-4 shrink-0`,t?`block group-hover/folder:hidden`:`hidden group-hover/folder:block`),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`truncate`,children:e.label})]}),(0,X.jsx)(`button`,{type:`button`,className:H(`inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md`,`text-inherit transition-colors`,`hover:bg-white/10 hover:text-white`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`,`disabled:cursor-not-allowed disabled:opacity-50`),disabled:o,"aria-label":_(C.CONVERSATION_PANEL$ADD_CONVERSATION_TO_GROUP,{label:e.label}),"data-testid":`add-conversation-to-group-${b}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),h()},children:(0,X.jsx)(ue,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0,strokeWidth:2})})]}),t?(0,X.jsxs)(`div`,{id:`thread-folder-content-${b}`,className:`mt-0.5 space-y-0.5`,children:[x.map(g),w?(0,X.jsx)(`div`,{className:`pl-2`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`thread-folder-view-more-${b}`,onClick:m,className:`cursor-pointer text-xs text-[var(--oh-text-dim)] hover:text-white`,children:_(T?C.CONVERSATION_PANEL$LESS:C.CONVERSATION_PANEL$MORE)})}):null]}):null]})]})}function Jr({groups:e,groupIds:t,groupFolderOrder:n,setGroupFolderOrder:r,collapsedGroupIds:i,expandedGroupPreviewIds:a,onToggleGroupCollapsed:o,onToggleGroupPreviewExpanded:s,isCreatingConversationFlow:c,activeConversationId:l,onLaunchFromGroup:u,renderConversationCard:d}){let{t:f}=S(`openhands`),[p,m]=(0,Y.useState)(null),[h,g]=(0,Y.useState)(null),[_,v]=(0,Y.useState)(null),[y,b]=(0,Y.useState)(!1),x=(0,Y.useRef)(null);(0,Y.useEffect)(()=>()=>{x.current&&clearTimeout(x.current)},[]);let w=(0,Y.useCallback)(()=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{b(!1),x.current=null},300)},[]),T=(0,Y.useCallback)(()=>{m(null),g(null),v(null)},[]),E=(0,Y.useCallback)(e=>{let t=e.currentTarget.getBoundingClientRect();return e.clientY<t.top+t.height/2?`before`:`after`},[]),D=(0,Y.useCallback)((e,i)=>{if(!p||p===e){T(),w();return}r(Kr(n,t,p,e,i)),T(),w()},[p,n,t,T,r,w]);return(0,X.jsx)(`nav`,{"aria-label":f(C.SIDEBAR$CONVERSATIONS),className:`space-y-1 md:space-y-0.5 pb-1`,children:e.map(e=>(0,X.jsx)(qr,{group:e,expanded:!i.has(e.id),previewExpanded:a.has(e.id),isDragging:p===e.id,dropIndicatorPosition:h===e.id&&p!==e.id?_:null,animateLayout:y,isCreatingConversationFlow:c,activeConversationId:l,onToggleExpanded:()=>o(e.id),onDragStart:()=>{b(!0),m(e.id)},onDragEnd:()=>{T(),w()},onDragOver:t=>{t.preventDefault();let{dataTransfer:n}=t;n&&(n.dropEffect=`move`),g(e.id),v(E(t))},onDragLeave:()=>{g(t=>t===e.id?null:t)},onDrop:t=>{t.preventDefault(),D(e.id,E(t))},onTogglePreviewExpanded:()=>s(e.id),onLaunchFromGroup:()=>u(e.launch),renderConversationCard:d},e.id))})}function Yr({pinnedConversations:e,isPreviewExpanded:t,onTogglePreviewExpanded:n,activeConversationId:r,showDivider:i=!1,renderConversationCard:a}){let{t:o}=S(`openhands`),{visibleConversations:s,isPreviewTruncated:c,isShowingAll:l}=Ir(e,{limit:5,expanded:t,activeConversationId:r});return(0,X.jsxs)(`section`,{"data-testid":`conversation-panel-pinned-section`,className:H(`pt-1`,i?`mb-2 border-b border-[var(--oh-border-subtle)] pb-2`:`pb-2`),children:[(0,X.jsxs)(`h3`,{className:`flex items-center gap-1.5 py-1.5 pl-2 text-sm font-normal text-[var(--oh-muted)]`,children:[(0,X.jsx)(wn,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0}),o(C.CONVERSATION_PANEL$PINNED)]}),(0,X.jsx)(`div`,{className:`space-y-0.5`,children:s.map(a)}),c?(0,X.jsx)(`div`,{className:`pl-2 pt-0.5`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`conversation-panel-pinned-view-more`,onClick:n,className:`cursor-pointer text-xs text-[var(--oh-text-dim)] hover:text-white`,children:o(l?C.CONVERSATION_PANEL$LESS:C.CONVERSATION_PANEL$MORE)})}):null]})}var Xr={pinsByBackendId:{}};function Zr(e,t){return e[t]??[]}var Qr=wt()(Tt((e,t)=>({...Xr,pinConversation:(n,r)=>{let i=Zr(t().pinsByBackendId,n);i.includes(r)||e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:[r,...i]}}))},unpinConversation:(n,r)=>{let i=Zr(t().pinsByBackendId,n);i.includes(r)&&e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:i.filter(e=>e!==r)}}))},togglePin:(e,n)=>{Zr(t().pinsByBackendId,e).includes(n)?t().unpinConversation(e,n):t().pinConversation(e,n)},pruneMissingConversations:(n,r)=>{let i=new Set(r),a=Zr(t().pinsByBackendId,n),o=a.filter(e=>i.has(e));o.length!==a.length&&e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:o}}))}}),{name:`pinned-conversations`,storage:Et(()=>localStorage),partialize:e=>({pinsByBackendId:e.pinsByBackendId})})),$r=()=>{},ei=[],ti=3600*1e3,ni=e=>{let t=Date.now()-ti,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 ri({onClose:e,compact:t=!1}){let{t:n}=S(`openhands`),{conversationId:i,navigate:a}=Pe(),{backend:o}=D(),s=Xt(e??$r),[c,l]=Y.useState(!1),[u,d]=Y.useState(!1),[f,p]=Y.useState(!1),[m,h]=Y.useState(!1),g=Z(e=>e.showOlderConversations),_=Z(e=>e.toggleShowOlderConversations),v=Z(e=>e.showRepoBranchMetadata),y=Z(e=>e.toggleShowRepoBranchMetadata),b=Z(e=>e.showLlmProfiles),x=Z(e=>e.toggleShowLlmProfiles),T=Z(e=>e.showHoverMetadata),O=Z(e=>e.toggleShowHoverMetadata),k=Z(e=>e.organizeMode),A=Z(e=>e.setOrganizeMode),j=Z(e=>e.conversationSort),M=Z(e=>e.setConversationSort),N=Z(e=>e.threadScope),P=Z(e=>e.setThreadScope),F=Z(e=>e.groupFolderOrder),I=Z(e=>e.setGroupFolderOrder),[ee,L]=Y.useState(!1),[R,z]=Y.useState(!1),B=Xt(()=>{L(!1)}),[te,ne]=Y.useState(()=>new Set),[re,ie]=Y.useState(()=>new Set),[ae,oe]=Y.useState(!1),V=Qr(e=>e.pinsByBackendId[o.id]??ei),se=Qr(e=>e.togglePin),ce=Qr(e=>e.pruneMissingConversations),le=Y.useCallback(e=>{ne(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),ue=Y.useCallback(e=>{ie(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);Y.useEffect(()=>{k!==`grouped`&&(ne(new Set),ie(new Set))},[k]);let de=Y.useRef(null),[fe,pe]=Y.useState(null),[me,he]=Y.useState(null),[ge,_e]=Y.useState(null),{data:ve,isLoading:be,isFetched:U,hasNextPage:xe,isFetching:Se,isFetchingNextPage:Ce,fetchNextPage:we}=qn(),{data:Te}=Jn(),W=Y.useMemo(()=>{let e=ve?.pages.flatMap(e=>e.items)??[],t=new Set;return e.filter(e=>t.has(e.id)?!1:(t.add(e.id),!0))},[ve]),Ee=Y.useMemo(()=>Lr(V,W),[W,V]);Y.useEffect(()=>{U&&ce(o.id,W.map(e=>e.id))},[o.id,W,U,ce]),Y.useEffect(()=>{V.length===0&&oe(!1)},[V.length]);let De=Y.useMemo(()=>{let e=N===`relevant`?W.filter(e=>ye(e.execution_status)):W;return t?e:Rr(e,V)},[t,W,V,N]),{recent:G,older:Oe}=Y.useMemo(()=>ni(De),[De]),ke=Y.useMemo(()=>Vr(g?[...G,...Oe]:G,j),[G,Oe,g,j]),Ae=Y.useMemo(()=>({emptyWorkspace:n(C.CONVERSATION_PANEL$NO_WORKSPACE),emptyRepository:n(C.CONVERSATION_PANEL$NO_REPOSITORY)}),[n]),je=Y.useMemo(()=>t||k!==`grouped`?null:Wr([...G,...g?Oe:[]],o.kind,j,Ae),[o.kind,t,j,Ae,Oe,k,G,g]),Me=Y.useMemo(()=>je?Gr(je,F):null,[je,F]),Ne=Y.useMemo(()=>je?.map(e=>e.id)??[],[je]),Fe=Y.useMemo(()=>Vr(G.filter(e=>ye(e.execution_status)),j),[j,G]),Ie=ke.length,Re=Y.useMemo(()=>Me?Me.reduce((e,t)=>e+t.conversations.length,0):0,[Me]),ze=k===`grouped`&&!t?Re===0:Ie===0,Be=k===`grouped`&&!t?Re:Ie,[Ve,He]=Y.useState(null),Ue=Y.useRef(Be);Ue.current=Be;let We=Y.useCallback(()=>{xe&&He(Ue.current)},[xe]);Y.useEffect(()=>{if(Ve!==null){if(Be>Ve){He(null);return}if(!xe){He(null);return}Se||Ce||we()}},[Ve,Be,xe,Se,Ce,we]);let Ge=Ve!==null||Ce,{mutate:Ke,mutateAsync:qe}=ut(),{mutate:Je}=dt(),{mutate:Ye}=Yt(),Xe=Oe.length>0&&!g,Ze=!!xe&&!Xe&&!t&&!ze,{mutate:K}=Qt(),Qe=$t(),$e=Y.useCallback(e=>{Qe||K({workingDir:e.workingDir,repository:e.repository,entryPoint:`sidebar_relaunch_project`},{onSuccess:e=>{a(`/conversations/${e.conversation_id}`)}})},[K,Qe,a]),et=Y.useCallback((e,t)=>{l(!0),pe(e),he(t)},[]),tt=Y.useCallback(e=>{d(!0),pe(e)},[]),nt=Y.useCallback((e,t)=>{Ye({conversationId:e,newTitle:t},{onSuccess:()=>{w(n(C.CONVERSATION$TITLE_UPDATED))}})},[n,Ye]),rt=()=>{fe&&Ke({conversationId:fe},{onSuccess:()=>{fe===i&&a(`/conversations`)}})},it=()=>{fe&&Je({conversationId:fe})},at=async()=>{let e=W.map(e=>e.id),t=await Promise.allSettled(e.map(e=>qe({conversationId:e}))),n=t.flatMap((t,n)=>t.status===`fulfilled`?[e[n]]:[]),r=t.length-n.length;i!==null&&n.includes(i)&&a(`/conversations`),r>0&&E(`${r} conversation${r===1?``:`s`} could not be deleted.`)},ot=Y.useCallback((n,a)=>{let s=V.includes(n.id);return t?(0,X.jsx)(xr,{conversationId:n.id,title:n.title??``,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,lastUpdatedAt:n.updated_at,createdAt:n.created_at,workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,isActive:n.id===i,onClose:e,showRepositoryMetadata:v,llmModel:n.llm_model,showLlmProfiles:b,agentKind:n.agent_kind,acpServer:n.acp_server},n.id):(0,X.jsx)(r,{placement:`right-start`,delay:1e3,closeDelay:100,isDisabled:!T||ge===n.id,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,content:(0,X.jsx)(mr,{title:n.title??``,executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,llmModel:n.llm_model,createdAt:n.created_at}),children:(0,X.jsx)(Le,{to:`/conversations/${n.id}`,onClick:e,className:H(`block rounded-md transition-colors`,ge!==n.id&&`hover:bg-[var(--oh-surface)]`,(n.id===i||ge===n.id)&&`bg-[var(--oh-surface)]`),children:(0,X.jsx)(dr,{onDelete:()=>et(n.id,n.title??``),onStop:()=>tt(n.id),onChangeTitle:e=>nt(n.id,e),title:n.title??``,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},lastUpdatedAt:n.updated_at,createdAt:n.created_at,executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,conversationId:n.id,contextMenuOpen:ge===n.id,onContextMenuToggle:e=>_e(e?n.id:null),isActive:n.id===i,workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,showRepositoryMetadata:v,llmModel:n.llm_model,showLlmProfiles:b,agentKind:n.agent_kind,acpServer:n.acp_server,isPinned:s,onTogglePin:()=>se(o.id,n.id),alwaysShowPinIcon:s&&!a?.inPinnedSection})})},n.id)},[o.id,t,i,nt,et,tt,e,ge,V,v,b,T,se]),st=be||!U,ct=!t&&!st&&Ee.length>0,lt=U&&!be&&!t&&ze&&!ct&&!Te?.length;return(0,X.jsxs)(`div`,{ref:s,"data-testid":`conversation-panel`,className:`flex h-full min-h-0 w-full flex-col`,children:[!t&&(0,X.jsx)(`div`,{className:H(`-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b`,R?`border-[var(--oh-border)]`:`border-transparent`),children:(0,X.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,X.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-[var(--oh-muted)]`,children:n(C.SIDEBAR$CONVERSATIONS)}),(0,X.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,X.jsx)(Fr,{backendKind:o.kind}),(0,X.jsx)(Or,{filterMenuOpen:ee,setFilterMenuOpen:L,menuRef:B,backendKind:o.kind,organizeMode:k,setOrganizeMode:A,conversationSort:j,setConversationSort:M,threadScope:N,setThreadScope:P,showOlderConversations:g,toggleShowOlderConversations:_,showRepoBranchMetadata:v,toggleShowRepoBranchMetadata:y,showLlmProfiles:b,toggleShowLlmProfiles:x,showHoverMetadata:T,toggleShowHoverMetadata:O,totalConversationsCount:W.length,onRequestDeleteAll:()=>h(!0)})]})]})}),(0,X.jsxs)(`div`,{ref:de,"data-testid":`conversation-panel-list-scroll`,onScroll:e=>{z(e.currentTarget.scrollTop>0)},className:H(`flex min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain custom-scrollbar-always`,!t&&`conversation-panel-list-scroll`),children:[st&&(0,X.jsx)(br,{compact:t}),!t&&lt&&(0,X.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,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:n(C.CONVERSATION$NO_CONVERSATIONS)})}),ct?(0,X.jsx)(Yr,{pinnedConversations:Ee,isPreviewExpanded:ae,onTogglePreviewExpanded:()=>oe(e=>!e),activeConversationId:i,showDivider:!t&&k===`chronological`,renderConversationCard:e=>ot(e,{inPinnedSection:!0})}):null,!t&&Te?.map(t=>(0,X.jsx)(Le,{to:`/conversations/task-${t.id}`,onClick:e,className:`block`,children:(0,X.jsx)(yr,{task:t})},t.id)),!st&&t?Fe.map(e=>ot(e)):null,!st&&!t&&k===`grouped`&&Me&&Me.length>0?(0,X.jsx)(Jr,{groups:Me,groupIds:Ne,groupFolderOrder:F,setGroupFolderOrder:I,collapsedGroupIds:te,expandedGroupPreviewIds:re,onToggleGroupCollapsed:le,onToggleGroupPreviewExpanded:ue,isCreatingConversationFlow:Qe,activeConversationId:i,onLaunchFromGroup:$e,renderConversationCard:e=>ot(e)}):null,!st&&!t&&k===`chronological`?(0,X.jsx)(`div`,{className:`space-y-0.5`,children:ke.map(e=>ot(e))}):null,Ze&&(Ge?(0,X.jsx)(`div`,{className:`py-1`,children:(0,X.jsx)(br,{compact:t})}):(0,X.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`load-more-conversations`,onClick:We,className:`text-xs text-[var(--oh-muted)] hover:text-white`,children:n(C.CONVERSATION$LOAD_MORE)})}))]}),c&&(0,X.jsx)(Ht,{onConfirm:()=>{rt(),l(!1),he(null)},onCancel:()=>{l(!1),he(null)},conversationTitle:me??void 0}),m&&(0,X.jsx)(Ht,{title:n(C.CONVERSATION$CONFIRM_DELETE_ALL_TITLE),description:n(C.CONVERSATION$CONFIRM_DELETE_ALL_DESC,{count:W.length}),onConfirm:async()=>{await at(),h(!1)},onCancel:()=>h(!1)}),u&&(0,X.jsx)(Vt,{onConfirm:()=>{it(),d(!1)},onCancel:()=>d(!1)}),f&&(0,X.jsx)(Yn,{onConfirm:()=>{e?.()},onClose:()=>p(!1),onCancel:()=>p(!1)})]})}function ii({collapsed:e}){return e?null:(0,X.jsx)(`div`,{className:`flex flex-col flex-1 min-h-0`,children:(0,X.jsx)(`div`,{className:`flex min-h-0 w-full flex-1 flex-col`,children:(0,X.jsx)(ri,{})})})}var ai=e=>(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 20 20`,fill:`none`,...e,children:[(0,X.jsx)(`mask`,{id:`mask0_18339_1445`,style:{maskType:`luminance`},maskUnits:`userSpaceOnUse`,x:1,y:1,width:18,height:18,children:(0,X.jsx)(`path`,{d:`M19 1H1V19H19V1Z`,fill:`white`})}),(0,X.jsxs)(`g`,{mask:`url(#mask0_18339_1445)`,children:[(0,X.jsx)(`path`,{d:`M10 18.1818V16.5454`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M10 1.81836V3.45472`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M1.81824 10H3.4546`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M18.1818 10H16.5454`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M5.93359 17.1019L6.74359 15.6782`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M14.0663 2.89844L13.2563 4.32208`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M2.89819 5.93359L4.32183 6.74359`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M17.1019 14.0663L15.6782 13.2563`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M5.92542 2.90625L6.7436 4.3217`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M14.0909 17.0854L13.2727 15.6699`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M17.0855 5.90918L15.67 6.72736`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M2.91455 14.0911L4.33001 13.2729`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M10 16.5455C13.615 16.5455 16.5455 13.615 16.5455 10C16.5455 6.38509 13.615 3.45459 10 3.45459C6.38509 3.45459 3.45459 6.38509 3.45459 10C3.45459 13.615 6.38509 16.5455 10 16.5455Z`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M12.5854 9.77916L8.80545 7.59461C8.63363 7.49643 8.41272 7.61916 8.41272 7.81552V12.1846C8.41272 12.381 8.62545 12.5119 8.80545 12.4055L12.5854 10.221C12.7573 10.1228 12.7573 9.86916 12.5854 9.77098V9.77916Z`,fill:`currentColor`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`})]})]}),$=18,oi=34,si=Math.round(oi*30/46);function ci({collapsed:e,showCollapseToggle:t,showMobileCloseButton:n=!1,onCloseMobile:r,collapseToggleLabel:i,onCollapse:a,onExpand:o,showCollapsedExpandButton:s,isExtensionsActive:c,currentPath:l,activeBackendHealth:u,collapsedBackendPopoverOpen:d,setCollapsedBackendPopoverOpen:f,collapsedBackendPopoverRef:p,collapsedBackendCloseTimer:m,onOpenAddBackend:h,onOpenManageBackends:g}){let{t:_}=S(`openhands`),y=m;return(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,X.jsxs)(`div`,{className:He(e),children:[(0,X.jsxs)(`div`,{className:H(e&&t?Ue:`flex min-w-0 shrink-0 items-center`),children:[(0,X.jsx)(`div`,{className:H(e&&t&&`flex h-full w-full items-center justify-start pl-2.5 transition-opacity duration-150`,e&&s&&`opacity-0`),children:(0,X.jsx)(kn,{logoWidth:oi,logoHeight:si,logoClassName:`max-w-none`,className:H(Re,`overflow-visible`)})}),e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":i,onClick:o,className:H(We,s?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`),children:(0,X.jsx)(v,{width:14,height:14})}):null]}),!e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":i,onClick:a,className:H(`hidden md:inline-flex ml-auto`,Ve,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(M,{width:14,height:14})}):null,!e&&n?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-drawer-close`,onClick:r,"aria-label":_(C.SIDEBAR$CLOSE_MENU),className:H(`inline-flex ml-auto`,Ve,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(M,{width:14,height:14})}):null]}),(0,X.jsxs)(`nav`,{className:ze(e),children:[(0,X.jsx)(Kn,{collapsed:e}),(0,X.jsx)(qe,{to:`/conversations`,end:!0,label:_(C.SIDEBAR$NEW_CHAT),testId:`sidebar-conversations-link`,collapsed:e,icon:(0,X.jsx)(ue,{width:$,height:$})}),(0,X.jsx)(qe,{to:`/customize`,label:_(C.NAV$CUSTOMIZE),testId:`sidebar-skills-link`,collapsed:e,forceActive:c,icon:(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:$,height:$,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,X.jsx)(`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`}),(0,X.jsx)(`path`,{d:`m7 16.5-4.74-2.85`}),(0,X.jsx)(`path`,{d:`m7 16.5 5-3`}),(0,X.jsx)(`path`,{d:`M7 16.5v5.17`}),(0,X.jsx)(`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`}),(0,X.jsx)(`path`,{d:`m17 16.5-5-3`}),(0,X.jsx)(`path`,{d:`m17 16.5 4.74-2.85`}),(0,X.jsx)(`path`,{d:`m17 16.5v5.17`}),(0,X.jsx)(`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`}),(0,X.jsx)(`path`,{d:`M12 8 7.26 5.15`}),(0,X.jsx)(`path`,{d:`m12 8 4.74-2.85`}),(0,X.jsx)(`path`,{d:`M12 13.5V8`})]})}),(0,X.jsx)(qe,{to:`/automations`,label:_(C.SIDEBAR$AUTOMATIONS),testId:`sidebar-automations-link`,collapsed:e,icon:(0,X.jsx)(ai,{width:$,height:$})})]}),(0,X.jsx)(ii,{collapsed:e}),e&&t?(0,X.jsxs)(`nav`,{className:H(ze(e),`mt-auto pb-2 cursor-pointer`),children:[(0,X.jsx)(Je,{content:_(C.SIDEBAR$SETTINGS),placement:`right`,children:(0,X.jsxs)(Le,{to:`/settings`,"data-testid":`collapsed-settings-link`,"aria-label":_(C.SIDEBAR$SETTINGS),className:Be({collapsed:!0}),children:[(0,X.jsx)(Ke,{active:l.startsWith(`/settings`),children:(0,X.jsx)(pe,{width:$,height:$})}),(0,X.jsx)(`span`,{className:Ge(!0),children:_(C.SIDEBAR$SETTINGS)})]})}),(0,X.jsxs)(`div`,{className:`relative`,ref:p,onMouseEnter:()=>{y.current&&=(clearTimeout(y.current),null),f(!0)},onMouseLeave:()=>{y.current=setTimeout(()=>f(!1),150)},children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`collapsed-backend-selector-link`,"aria-label":_(C.BACKEND$MANAGE),"aria-expanded":d,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>e.stopPropagation(),className:H(Be({collapsed:!0}),`relative`),children:[(0,X.jsx)(Ke,{active:d,children:(0,X.jsxs)(`span`,{className:`relative inline-flex size-[18px] shrink-0 items-center justify-center`,children:[(0,X.jsx)(Ot,{isConnected:u?.isConnected??null,className:`absolute -left-0.5 -top-0.5 z-[1] pointer-events-none`}),(0,X.jsx)(Tn,{width:$,height:$})]})}),(0,X.jsx)(`span`,{className:Ge(!0),children:_(C.BACKEND$MANAGE)})]}),d?(0,X.jsx)(`div`,{className:`absolute bottom-[-4px] left-full pl-2.5 z-40 w-[272px]`,onClick:e=>e.stopPropagation(),children:(0,X.jsx)(Un,{sidebarCollapsed:e,hideTrigger:!0,defaultOpen:!0,openUpward:!0,onSelectOption:()=>f(!1),onOpenAddBackend:h,onOpenManageBackends:g})}):null]})]}):null,e?null:(0,X.jsx)(`div`,{className:H(`flex flex-col items-stretch max-w-none box-border shrink-0`,`-ml-2.5 w-[calc(100%+0.625rem)] border-t border-[var(--oh-border)] pt-2 px-2.5`),children:(0,X.jsx)(Un,{sidebarCollapsed:e,openUpward:!0})})]})}var li=Y.lazy(()=>n(()=>import(`./settings-modal-BnZ7mMu7.js`).then(e=>({default:e.SettingsModal})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]))),ui=Y.lazy(()=>n(()=>import(`./add-backend-modal-BoMkMyLB.js`).then(e=>e.n).then(e=>({default:e.AddBackendModal})),__vite__mapDeps([39,1,2,40,6,7,14,9,15,3,4,5,8,10,11,12,41,37,36,42,23,18,24,28,26,43,29,44,45,46,47,16,35,34,32,33,27]))),di=Y.lazy(()=>n(()=>import(`./manage-backends-modal-nMoCZ2a0.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__vite__mapDeps([48,1,2,6,7,14,9,15,49,10,50,51,3,4,5,8,11,12,40,41,37,36,42,23,18,24,28,26,43,29,44,45,46,47,16,35,34,32,33,27,52,53]))),fi=250;function pi(){let{t:e}=S(`openhands`),{currentPath:t}=Pe(),{data:n}=Ne(),{data:r,error:i,isError:a,isFetching:o}=kt(),{backends:s,active:c}=O(),l=Ee(s)[c.backend.id],u=me(e=>e.collapsed),d=me(e=>e.setCollapsed),[f,p]=Y.useState(!1),[m,h]=Y.useState(!1),g=Y.useRef(null),[_,v]=Y.useState(!1),[y,b]=Y.useState(!1),[x,w]=Y.useState(!1),T=Y.useRef(!1),[,D]=Y.useReducer(e=>e+1,0),{isOpen:k,close:A}=Gt(),[j,M]=Y.useState(!1),[N,P]=Y.useState(!1),F=Xt(()=>h(!1)),I=At(i);Y.useEffect(()=>{A()},[t,A]),Y.useEffect(()=>{if(k){M(!0);let e=requestAnimationFrame(()=>{P(!0)});return()=>cancelAnimationFrame(e)}P(!1);let e=window.setTimeout(()=>{M(!1)},fi);return()=>window.clearTimeout(e)},[k]),Y.useEffect(()=>{if(!k)return;let e=e=>{e.key===`Escape`&&A()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[k,A]),Y.useEffect(()=>{t===`/settings`?p(!1):!o&&a&&I!==404?E(e(C.SETTINGS$FETCH_ERROR)):I===404&&!n?.feature_flags?.hide_llm_settings&&p(!0)},[t,o,a,I,n?.feature_flags?.hide_llm_settings,e]);let ee=e(u?C.SIDEBAR$EXPAND:C.SIDEBAR$COLLAPSE),L=Y.useCallback(e=>{if(!u)return;let t=e.target;t instanceof HTMLElement&&(t.closest(`a,button,input,textarea,select,[role='button'],[role='link']`)||d(!1))},[u,d]),R={collapseToggleLabel:ee,onCollapse:Y.useCallback(()=>{w(!1),T.current=!0,D(),d(!0),window.setTimeout(()=>{T.current=!1,D()},250)},[d]),onExpand:()=>d(!1),showCollapsedExpandButton:u&&x&&!T.current,isExtensionsActive:t===`/customize`||t.startsWith(`/skills`)||t===`/plugins`||t===`/mcp`,currentPath:t,activeBackendHealth:l,collapsedBackendPopoverOpen:m,setCollapsedBackendPopoverOpen:h,collapsedBackendPopoverRef:F,collapsedBackendCloseTimer:g,onOpenAddBackend:()=>v(!0),onOpenManageBackends:()=>b(!0)};return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`aside`,{"aria-label":e(C.SIDEBAR$NAVIGATION_LABEL),"data-collapsed":u?`true`:`false`,onClick:L,onMouseEnter:()=>{u&&w(!0)},onMouseLeave:()=>{w(!1)},className:H(`max-md:hidden flex bg-base flex-col min-h-0 transition-[width,min-width] duration-200`,`md:border-r md:border-[var(--oh-border)] md:h-full`,u?`md:w-[60px] md:min-w-[60px] md:px-2.5`:`md:w-[300px] md:min-w-[300px] pb-2 md:pl-2.5 md:pr-0`,t===`/`&&`md:pb-3`),children:(0,X.jsx)(ci,{collapsed:u,showCollapseToggle:!0,...R})}),j?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:H(`fixed inset-0 z-40 bg-black/50 md:hidden`,`transition-opacity ease-in-out motion-reduce:transition-none`,N?`opacity-100`:`pointer-events-none opacity-0`),style:{transitionDuration:`${fi}ms`},onClick:A,"aria-hidden":!N}),(0,X.jsx)(`aside`,{"aria-label":e(C.SIDEBAR$NAVIGATION_LABEL),"data-testid":`sidebar-mobile-drawer`,"aria-hidden":!N,className:H(`fixed inset-y-0 left-0 z-50 flex min-h-0 w-[min(300px,85vw)] flex-col bg-base`,`border-r border-[var(--oh-border)] pb-2 pl-2.5 pr-0 md:hidden`,`transition-transform ease-in-out motion-reduce:transition-none`,N?`translate-x-0`:`-translate-x-full`),style:{transitionDuration:`${fi}ms`},children:(0,X.jsx)(ci,{collapsed:!1,showCollapseToggle:!1,showMobileCloseButton:!0,onCloseMobile:A,...R})})]}):null,f&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(li,{settings:r,onClose:()=>p(!1)})}),_&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(ui,{onClose:()=>v(!1)})}),y&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(di,{onClose:()=>b(!1)})})]})}var mi=`/settings`,hi=`/customize`,gi=[`/skills`,`/mcp`,`/plugins`];function _i(e){return e===mi?{mode:`menu`}:e.startsWith(`${mi}/`)&&e.length>9?{mode:`back`,backTo:mi,backLabelKey:C.SETTINGS$TITLE}:e===hi?{mode:`menu`}:gi.some(t=>e===t||e.startsWith(`${t}/`))?{mode:`back`,backTo:hi,backLabelKey:C.NAV$CUSTOMIZE}:{mode:`menu`}}function vi(){let{t:e}=S(`openhands`),{currentPath:t,navigate:n}=Pe(),r=_i(t);return(0,X.jsxs)(`header`,{className:`flex md:hidden h-12 shrink-0 items-center gap-2 px-2.5`,"aria-label":e(C.SIDEBAR$NAVIGATION_LABEL),children:[(0,X.jsx)(Jt,{}),r.mode===`back`&&r.backTo?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-back-button`,onClick:()=>n(r.backTo),"aria-label":e(r.backLabelKey??C.COMMON$BACK),className:Kt,children:(0,X.jsx)(M,{size:20,className:Ut,"aria-hidden":!0,strokeWidth:2})}):null]})}function yi(){let{backend:e}=D(),t=e.kind===`local`,{data:n}=Zt(),{mutate:r,isPending:i}=he(),a=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{a.current=null},[e.id]),(0,Y.useEffect)(()=>{if(!t||i||!n)return;let{profiles:e,active_profile:o}=n,s=o!=null&&e.some(e=>e.name===o);if(e.length===0||s){a.current=null;return}let c=e.find(e=>e.api_key_set)??e[0];a.current!==c.name&&(a.current=c.name,r(c.name))},[t,n,i,r])}var bi=()=>{let{backend:e}=D(),{data:t}=kt(),{mutate:n,isPending:r}=pn(`personal`,{retry:2}),i=Y.useSyncExternalStore(W,Se,()=>null),a=Y.useRef(null);Y.useEffect(()=>{if(t!==void 0){if(i!==null){if((t.user_consents_to_analytics===!0?`granted`:t.user_consents_to_analytics===!1?`denied`:null)===i){a.current=null,e.kind===`cloud`&&Te(i);return}let o=`${e.id}:${i}`;if(r||a.current===o)return;a.current=o,n({user_consents_to_analytics:i===`granted`});return}Ce(t.user_consents_to_analytics===!0?`granted`:`denied`,{syncToCloud:!1})}},[e.id,e.kind,r,i,n,t])},xi=()=>{let{backend:e}=D(),{data:t}=kt(),n=St(),r=e.kind===`cloud`?n[e.id]:void 0,i=r?.isLoading??!0,a=r?.userId??null,o=t?.email||t?.git_user_email||void 0;Y.useEffect(()=>{if(!(e.kind!==`cloud`||i)){if(!a){we(null);return}we(a,o?{email:o}:{})}},[e.kind,o,i,a])};function Si(e){switch(e){case U.RUNNING:return`🟢`;case U.FINISHED:case U.IDLE:case U.WAITING_FOR_CONFIRMATION:return`✅`;case U.PAUSED:return`⚪`;case U.ERROR:case U.STUCK:return`🔴`;default:return null}}var Ci=`OpenHands`,wi=()=>{let{conversationId:e}=f(),{data:t}=mn(e??null),n=hn(e=>e.execution_status),r=t?.title,i=e&&r?`${r} | ${Ci}`:Ci;if(!e)return i;let a=Si(n??t?.execution_status??null);return a?`${a} ${i}`:i};function Ti({children:e}){let{pathname:t}=g(),n=u(),r=d(),i=h(),a=Y.useMemo(()=>{for(let e=i.length-1;e>=0;--e){let t=i[e]?.params?.conversationId;if(t)return t}return null},[i]);return(0,X.jsx)(Fe,{value:Y.useMemo(()=>({currentPath:t,conversationId:a,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[t,a,r.location,n]),children:e})}var Ei=Y.lazy(()=>n(()=>import(`./environment-switch-overlay-B1PFO8P8.js`),__vite__mapDeps([54,1,2,3,4,55]))),Di=Y.lazy(()=>n(()=>import(`./alert-banner-Dh51WURQ.js`).then(e=>({default:e.AlertBanner})),__vite__mapDeps([56,1,2,57,3,4,58,59,11,12,29,60,61,20]))),Oi=Y.lazy(()=>n(()=>import(`./command-menu-oTvKDU3Y.js`).then(e=>({default:e.CommandMenu})),__vite__mapDeps([62,1,2,10,63,64,65,66,67,68,69,3,4,11,12,29]))),ki=p(function(){let e=c(),{t}=S(`openhands`);return s(e)?(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h1`,{children:e.status}),(0,X.jsx)(`p`,{children:e.statusText}),(0,X.jsx)(`pre`,{children:e.data instanceof Object?JSON.stringify(e.data):e.data})]}):e instanceof Error?(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h1`,{children:t(C.ERROR$GENERIC)}),(0,X.jsx)(`pre`,{children:e.message})]}):(0,X.jsx)(`div`,{children:(0,X.jsx)(`h1`,{children:t(C.ERROR$UNKNOWN)})})}),Ai=l(function(){let e=g(),t=wi(),{data:n}=kt(),r=Ne();if(bi(),xi(),yi(),Y.useEffect(()=>{n?.language&&T.changeLanguage(n.language)},[n?.language]),r.isLoading)return(0,X.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-base`,children:(0,X.jsx)(Me,{size:`large`})});let i=/^\/conversations\/[^/]+/.test(e.pathname),a=ne(e.search);return(0,X.jsx)(Ti,{children:(0,X.jsxs)(zt,{children:[(0,X.jsxs)(`div`,{"data-testid":`root-layout`,className:`h-screen lg:min-w-5xl flex flex-col md:flex-row bg-base overflow-hidden p-0`,children:[(0,X.jsx)(`title`,{children:t}),(0,X.jsx)(pi,{}),(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-col w-full min-w-0 h-full gap-3`,children:[i?null:(0,X.jsx)(vi,{}),r.data&&(r.data.maintenance_start_time||r.data.faulty_models&&r.data.faulty_models.length>0||r.data.error_message)&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(Di,{maintenanceStartTime:r.data.maintenance_start_time,faultyModels:r.data.faulty_models,errorMessage:r.data.error_message,updatedAt:r.data.updated_at})}),(0,X.jsx)(`div`,{id:`root-outlet`,className:`relative flex-1 overflow-auto px-0 custom-scrollbar`,children:(0,X.jsx)(m,{})})]})]}),(0,X.jsxs)(Y.Suspense,{fallback:null,children:[(0,X.jsx)(Ei,{}),(0,X.jsx)(Oi,{})]}),a?(0,X.jsx)(V,{}):null]})})});export{ki as ErrorBoundary,Ai as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/manage-backends-modal-nMoCZ2a0.js","assets/rolldown-runtime-BFRubm34.js","assets/vendor-styling-CI0PQ3ab.js","assets/agent-server-compatibility-C0MtTTwb.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js","assets/useQuery-D5pEZbY0.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js","assets/suspense-DmZ3MSSh.js","assets/pencil-CWhApFIT.js","assets/createLucideIcon-D4Tak8A1.js","assets/refresh-cw-B9B7-vsy.js","assets/trash-2-BU6BlW4i.js","assets/declaration-BGsHjPEW.js","assets/useTranslation-Cbf5AGg_.js","assets/active-backend-context-DHhm10VS.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js","assets/utils-DB9LsAzA.js","assets/common-CxbUL3nR.js","assets/backend-form-modal-B8GtBA-J.js","assets/cloud-funnel-analytics-uzzLlLuj.js","assets/client-source-CtQjJEy6.js","assets/telemetry-SHxpVxk8.js","assets/segmented-toggle-kzwZkLaj.js","assets/brand-button-B1izLAdR.js","assets/form-control-classes-CbdN5aO3.js","assets/settings-input-BsgQWS5R.js","assets/modal-backdrop-zVwfOJZr.js","assets/modal-body-Cc2zp0xb.js","assets/modal-close-button-BcIBUdSq.js","assets/navigation-context-DPs2G0X8.js","assets/use-backends-health-BagmAE_W.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js","assets/useQueries-BpIlT8Mt.js","assets/organization-service.api-Da2jiuBS.js","assets/proxy-G4ce0fnQ.js","assets/use-tracking-DFoPQUSU.js","assets/use-settings-BeJap6YL.js","assets/settings-service.api-DPTFyRXL.js","assets/settings-mQUckT0g.js","assets/modal-classes-3qT9Ap7Q.js","assets/confirmation-modal-DGBWM2Ls.js","assets/use-cloud-current-user-id-BwMX7jHW.js","assets/api-key-entry-screen-2gsoZAOK.js","assets/onboarding-modal-Bxuxpfdz.js","assets/recommended-automations-launcher-BWRRvMPE.js","assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js","assets/useMutationState-OnAsCLA_.js","assets/install-server-modal-BYjqoRyX.js","assets/useMutation-u8UgRgDK.js","assets/bot-C-EA6685.js","assets/v4-DbCkTSoU.js","assets/secrets-service-Ch7RH8eH.js","assets/styled-tooltip-B14i_Uac.js","assets/skill-card-pill-row-BPYKQ3IN.js","assets/extension-module-card-classes-9V3J9J_b.js","assets/circle-plus-check-toggle-DoFIjVE0.js","assets/checkmark-h7udgXMM.js","assets/x-mark-Batp6gXa.js","assets/use-create-conversation-CkKUQVbP.js","assets/use-agent-profiles-Dn_S_Tkz.js","assets/agent-server-conversation-service.api-lzc8dabY.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js","assets/profiles-service.api-DWetW2TL.js","assets/llm-subscription-service-C0zN0-rH.js","assets/llm-subscription-DtsX5Lhg.js","assets/acp-providers-DerAmTyY.js","assets/canvas-ui-COgjltGz.js","assets/plugins-management-service-DISfOL13.js","assets/use-llm-profiles-CgRtnj74.js","assets/conversation-store-LptbOvKa.js","assets/middleware-DYHYNAnP.js","assets/react-DPDgL6du.js","assets/conversation-local-storage-F6zVMM--.js","assets/chat-send-button-BZHG2hAW.js","assets/check-TbOEtHKj.js","assets/loader-circle-CsAsfLIs.js","assets/llm-settings-Cs_iieFY.js","assets/back-nav-button-DVknCcSP.js","assets/navigation-link-D8hfwvxI.js","assets/copy-D1YGjP-C.js","assets/external-link-lhdITPqq.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js","assets/model-selector-D51W2Q9b.js","assets/combobox-caret-CxZpqoSR.js","assets/sdk-settings-schema-CLR01YIK.js","assets/dist-CodhvuAP.js","assets/map-provider-BbIb12oh.js","assets/ellipsis-button-CbNnHlIq.js","assets/dropdown-classes-D3wMJlXT.js","assets/use-can-manage-org-profiles-CyYqfzeo.js","assets/base-modal-CIF_785P.js","assets/sdk-section-page-Cwj0T4gF.js","assets/switch-skeleton-DqQwalyu.js","assets/schema-field-CwdqUOnE.js","assets/settings-dropdown-input-Dhx9ErGd.js","assets/settings-switch-Bes8dIlV.js","assets/toggle-switch-DX_k418f.js","assets/use-is-authed-BezEyfeh.js","assets/typography-CzfoD9DY.js","assets/use-save-settings-DiDEbIJw.js","assets/copy-to-clipboard-button-CFzH_NOX.js","assets/copy-BLmGeJcd.js","assets/loading-spinner-BcdnT0mN.js","assets/settings-section-header-context-COMOIaxV.js","assets/u-check-circle-BqoIxNz_.js","assets/u-edit-DL5LgKon.js","assets/settings-list-classes-DSJJX99U.js","assets/use-acp-credential-form-DHd_Id-q.js","assets/use-create-secret-DEgM0MXZ.js","assets/openhands-logo-bcNw5bkY.js","assets/use-activate-agent-profile-BRDdSwQ0.js","assets/use-save-agent-profile-i4FcEP98.js","assets/terminal-Cgf___rK.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,St as n,bt as r}from"./vendor-styling-CI0PQ3ab.js";import{L as i,M as a,N as o,a as s,c,d as l,f as u,i as d,k as f}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{n as p}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{c as m,t as h}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t as g}from"./useQuery-D5pEZbY0.js";import{t as _}from"./useTranslation-Cbf5AGg_.js";import{t as v}from"./declaration-BGsHjPEW.js";import{r as y}from"./providers-C7lMslCi.js";import{R as b,d as x,r as ee,x as S}from"./active-backend-context-DHhm10VS.js";import{F as C,L as te,P as w,R as ne,i as re,n as T,o as E,y as D}from"./agent-server-compatibility-C0MtTTwb.js";import{c as O,d as k,m as A,n as j,o as M,p as N,u as P}from"./telemetry-SHxpVxk8.js";import{a as F,n as I,t as L}from"./use-backends-health-BagmAE_W.js";import{t as R}from"./modal-backdrop-zVwfOJZr.js";import{n as z}from"./modal-body-Cc2zp0xb.js";import{n as B,r as V}from"./base-modal-CIF_785P.js";import{t as H}from"./brand-button-B1izLAdR.js";import{t as U}from"./loading-spinner-BcdnT0mN.js";import{t as W}from"./use-config-B39iHYFi.js";import{t as G}from"./use-onboarding-completion-C_Swglzp.js";import{t as K}from"./navigation-context-DPs2G0X8.js";import{i as q,n as J}from"./color-themes-CHizm1xF.js";var Y=e(t(),1),X=`/api/authenticate`,ie=`/login`,ae=`returnTo`,oe=new Set([`localhost`,`127.0.0.1`,`::1`]);function se(){return typeof window>`u`?`/`:`${window.location.pathname}${window.location.search}${window.location.hash}`}function ce(){return typeof window>`u`?!1:oe.has(window.location.hostname)}function le(){return w()===`cookie`&&!ce()}async function ue(){try{return await m.post(X,null,{withCredentials:!0}),!0}catch(e){if(m.isAxiosError(e)&&e.response?.status===401)return!1;throw e}}function de(e=se()){return`${ie}?${new URLSearchParams({[ae]:e}).toString()}`}function fe(){typeof window>`u`||window.location.assign(de())}function pe(){let e=(0,Y.useSyncExternalStore)(P,M,()=>`pending`),t=(0,Y.useRef)(!1);(0,Y.useEffect)(()=>{t.current||(t.current=!0,N())},[]),(0,Y.useEffect)(()=>{e===`granted`&&A()},[e]);let n=(0,Y.useCallback)(()=>O(`granted`),[]),r=(0,Y.useCallback)(()=>O(`denied`),[]),i=(0,Y.useCallback)((e,t)=>{k(e,t)},[]),a=(0,Y.useCallback)(()=>j(),[]);return{consent:e,isEnabled:e===`granted`,showConsentPrompt:e===`pending`,grantConsent:n,denyConsent:r,track:i,clearData:a}}var Z=r();function me({onChoice:e}){let{t,ready:n}=_(`openhands`),{showConsentPrompt:r,grantConsent:i,denyConsent:a}=pe(),[o,s]=(0,Y.useState)(!1);return(0,Y.useEffect)(()=>{if(n&&r){let e=setTimeout(()=>s(!0),50);return()=>clearTimeout(e)}s(!1)},[n,r]),o?(0,Z.jsx)(R,{elevated:!0,"aria-label":t(v.TELEMETRY$CONSENT_TITLE),children:(0,Z.jsx)(`form`,{"data-testid":`telemetry-consent-form`,onSubmit:t=>{t.preventDefault();let n=new FormData(t.currentTarget).get(`analytics`)===`on`;n?i():a(),e?.(n)},className:`flex flex-col gap-2`,children:(0,Z.jsxs)(z,{className:`border border-[var(--oh-border)]`,children:[(0,Z.jsx)(V,{title:t(v.TELEMETRY$CONSENT_TITLE)}),(0,Z.jsx)(B,{children:t(v.TELEMETRY$CONSENT_DESCRIPTION)}),(0,Z.jsxs)(`label`,{className:`flex gap-2 items-center self-start text-sm cursor-pointer`,children:[(0,Z.jsx)(`input`,{name:`analytics`,type:`checkbox`,defaultChecked:!0,className:`w-4 h-4 cursor-pointer`}),t(v.TELEMETRY$SEND_ANONYMOUS_DATA)]}),(0,Z.jsx)(H,{testId:`confirm-telemetry-preferences`,type:`submit`,variant:`primary`,className:`w-full`,children:t(v.TELEMETRY$CONFIRM_PREFERENCES)})]})})}):null}function Q(){return Y.useEffect(()=>{J(q())},[]),null}var he=Y.lazy(()=>n(()=>import(`./manage-backends-modal-nMoCZ2a0.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41]))),ge=Y.lazy(()=>n(()=>import(`./api-key-entry-screen-2gsoZAOK.js`),__vite__mapDeps([42,1,2,3,4,12,13,14,15,6,9,16,17,18,5,7,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39]))),_e=Y.lazy(()=>n(()=>import(`./onboarding-modal-Bxuxpfdz.js`).then(e=>e.n).then(e=>({default:e.OnboardingModal})),__vite__mapDeps([43,1,2,3,4,44,45,46,6,12,13,14,15,9,16,17,37,34,38,47,48,49,50,51,23,24,25,52,26,28,36,5,7,39,53,54,55,56,57,29,58,59,60,61,31,20,62,63,64,65,66,67,68,35,21,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,33,90,27,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,19,18,22,30,32,109,110,111,112]))),ve=Y.lazy(()=>n(()=>import(`./backend-form-modal-B8GtBA-J.js`).then(e=>e.i).then(e=>({default:e.BackendFormModal})),__vite__mapDeps([18,1,2,3,4,5,6,7,12,13,14,15,9,16,17,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39])));function ye({children:e}){return(0,Z.jsxs)(`html`,{lang:`en`,children:[(0,Z.jsxs)(`head`,{children:[(0,Z.jsx)(`meta`,{charSet:`utf-8`}),(0,Z.jsx)(`meta`,{name:`viewport`,content:`width=device-width, initial-scale=1`}),(0,Z.jsx)(s,{}),(0,Z.jsx)(d,{})]}),(0,Z.jsxs)(`body`,{"data-agent-server-ui":``,className:`m-0`,children:[(0,Z.jsxs)(y,{contentClassName:`min-h-screen`,children:[(0,Z.jsx)(Q,{}),e,(0,Z.jsx)(h,{toastOptions:S}),(0,Z.jsx)(me,{}),(0,Z.jsx)(`div`,{id:`modal-portal-exit`})]}),(0,Z.jsx)(u,{}),(0,Z.jsx)(l,{})]})]})}function $(){return(0,Z.jsx)(`main`,{className:`min-h-screen bg-base px-6 py-10 text-white`,children:(0,Z.jsx)(`div`,{className:`mx-auto flex min-h-screen max-w-6xl items-center justify-center`,children:(0,Z.jsx)(`div`,{className:`rounded-3xl border border-white/10 bg-base/80 px-8 py-10 shadow-2xl`,children:(0,Z.jsx)(U,{size:`large`})})})})}function be(){let e=p(),t=Y.useCallback(()=>{D()&&(T(),e.invalidateQueries({queryKey:x.WEB_CLIENT_CONFIG}))},[e]);return(0,Z.jsx)(`main`,{"data-testid":`agent-server-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,Z.jsx)(Y.Suspense,{fallback:null,children:(0,Z.jsx)(he,{onClose:t,recoveryMode:!0})})})}function xe({onClose:e}){let t=f(),n=a(),r=o(),i=t.pathname.match(/^\/conversations\/([^/]+)/)?.[1]??null,s=Y.useMemo(()=>({currentPath:t.pathname,conversationId:i,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[i,t.pathname,n,r.location]);return C()===null?(0,Z.jsx)(`main`,{"data-testid":`first-run-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,Z.jsx)(K,{value:s,children:(0,Z.jsx)(Y.Suspense,{fallback:(0,Z.jsx)($,{}),children:(0,Z.jsx)(_e,{onClose:e})})})}):(0,Z.jsx)(`main`,{"data-testid":`first-run-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,Z.jsx)(Y.Suspense,{fallback:(0,Z.jsx)($,{}),children:(0,Z.jsx)(ve,{mode:`add`,onClose:e,source:`manage_backends_modal`,hideCloseButton:!0})})})}var Se=()=>[{rel:`icon`,type:`image/svg+xml`,href:b(`/favicon.svg`)}],Ce=()=>[{title:`OpenHands`},{name:`description`,content:`Let's Start Building!`}],we=i(function(){let e=te(),t=!!D()?.apiKey,n=e&&!t,{active:r}=ee(),i=C(),a=w(),o=i!==null,s=o&&r.backend.kind===`cloud`&&ne(r.backend.host,i),{isCompleted:l,markCompleted:u}=G(),d=le(),f=o?!d&&(!s||a!==`cookie`&&!l):!l,p=g({queryKey:x.MAIN_APP_COOKIE_AUTH,queryFn:ue,enabled:d&&!f,retry:!1,staleTime:1e3*60*5,meta:{disableToast:!0}}),m=d&&!f&&p.isPending&&!p.isError,h=d&&p.data===!1,_=!d||p.data===!0||p.isError;Y.useEffect(()=>{h&&fe()},[h]);let v=W({enabled:!n&&!f&&_}),y=F(r.backend.kind===`cloud`&&_?[r.backend]:[])[r.backend.id],b=r.backend.kind===`cloud`&&y?.isConnected===!1&&I(y.lastError),S=r.backend.kind===`cloud`&&y?.disabled===!0&&L(y.lastError);return f?(0,Z.jsx)(xe,{onClose:u}):m||h?(0,Z.jsx)($,{}):n||re(v.error)?(0,Z.jsx)(Y.Suspense,{fallback:(0,Z.jsx)($,{}),children:(0,Z.jsx)(ge,{})}):v.isPending||v.isLoading?(0,Z.jsx)($,{}):b||S||E(v.error)?(0,Z.jsx)(be,{}):(0,Z.jsx)(c,{})});export{ye as Layout,we as default,Se as links,Ce as meta};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{o as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t as i}from"./useTranslation-Cbf5AGg_.js";import{t as a}from"./declaration-BGsHjPEW.js";import{C as o,E as s,S as c}from"./active-backend-context-DHhm10VS.js";import{t as l}from"./utils-DB9LsAzA.js";import{_ as u}from"./form-control-classes-CbdN5aO3.js";import{t as ee}from"./brand-button-B1izLAdR.js";import{r as te}from"./use-settings-BeJap6YL.js";import{t as ne}from"./use-save-settings-DiDEbIJw.js";import{c as re,l as ie,n as ae,o as d,r as f,s as p,t as oe,u as se}from"./sdk-settings-schema-CLR01YIK.js";import{i as m,n as ce,r as le,t as ue}from"./schema-field-CwdqUOnE.js";import{n as h,t as g}from"./switch-skeleton-DqQwalyu.js";import{o as de}from"./extension-module-card-classes-9V3J9J_b.js";var _=e(t(),1),v=n();function y(){return(0,v.jsx)(`div`,{className:`w-[250px] h-[20px] skeleton`})}function b(){return(0,v.jsxs)(`div`,{"data-testid":`app-settings-skeleton`,className:`px-11 py-9 flex flex-col gap-6`,children:[(0,v.jsx)(g,{}),(0,v.jsx)(h,{}),(0,v.jsx)(h,{}),(0,v.jsx)(h,{}),(0,v.jsx)(y,{}),(0,v.jsx)(g,{}),(0,v.jsx)(g,{}),(0,v.jsx)(h,{})]})}var x=(e,t)=>l(`w-fit px-2 py-2 text-sm cursor-pointer rounded-none bg-transparent`,u,`border-b-2 pb-2`,e?`text-white border-white`:`text-[var(--oh-muted)] border-transparent hover:text-white`,t&&`pointer-events-none opacity-30 cursor-not-allowed`);function fe({view:e,setView:t,showAdvanced:n,showAll:r,isDisabled:o=!1}){let{t:s}=i(`openhands`);return!n&&!r?null:(0,v.jsxs)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:`mb-6 flex items-center gap-2`,children:[(0,v.jsx)(`button`,{"data-testid":`sdk-section-basic-toggle`,type:`button`,role:`tab`,"aria-selected":e===`basic`,disabled:o,className:x(e===`basic`,o),onClick:()=>t(`basic`),children:s(a.SETTINGS$BASIC)}),n?(0,v.jsx)(`button`,{"data-testid":`sdk-section-advanced-toggle`,type:`button`,role:`tab`,"aria-selected":e===`advanced`,disabled:o,className:x(e===`advanced`,o),onClick:()=>t(`advanced`),children:s(a.SETTINGS$ADVANCED)}):null,r?(0,v.jsx)(`button`,{"data-testid":`sdk-section-all-toggle`,type:`button`,role:`tab`,"aria-selected":e===`all`,disabled:o,className:x(e===`all`,o),onClick:()=>t(`all`),children:s(a.SETTINGS$ALL)}):null]})}var pe=new Set,S={basic:0,advanced:1,all:2},me=(e,t)=>S[t]<S[e]?t:e,he=(e,t)=>S[t]>S[e]?t:e,ge=(e,{showAdvanced:t,showAll:n})=>e===`all`?n?`all`:t?`advanced`:`basic`:e===`advanced`?t?`advanced`:n?`all`:`basic`:`basic`,_e={agent_settings:`agent_settings_diff`,conversation_settings:`conversation_settings_diff`},ve=(e,t)=>e instanceof r?e.response?.status===401?`${t} This agent server requires X-Session-API-Key. Set VITE_SESSION_API_KEY in the frontend to the same value used by the backend SESSION_API_KEY or OH_SESSION_API_KEYS_0.`:e.response?.status===404?`${t} This backend does not expose /api/settings/* schema endpoints. Upgrade to a recent openhands-agent-server release.`:t:t;function C({settingsSources:e,scope:t=`personal`,header:n,extraDirty:r=!1,buildPayload:l,onSaveSuccess:u,getInitialView:h,forceShowAdvancedView:g=!1,allowAllView:y=!0,initialValueOverrides:x,embedded:S=!1,hideSaveButton:C=!1,suppressSuccessToast:ye=!1,onSaveControlChange:w,testId:be=`sdk-section-settings-screen`}){let{t:T}=i(`openhands`),{mutate:xe,isPending:E}=ne(t),{data:D,isLoading:Se,isFetching:Ce}=te(t),O=le(D?.agent_settings_schema),k=m(D?.conversation_settings_schema),A=_.useMemo(()=>JSON.stringify(e.map(e=>({source:e.settingsSource,sectionKeys:e.sectionKeys,excludeKeys:e.excludeKeys?Array.from(e.excludeKeys).sort():null}))),[e]),j=_.useMemo(()=>JSON.parse(A).map(e=>({settingsSource:e.source,sectionKeys:e.sectionKeys,excludeKeys:e.excludeKeys?new Set(e.excludeKeys):void 0})),[A]),M=_.useCallback(e=>e===`conversation_settings`?k.data:O.data,[O.data,k.data]),we=j.some(e=>e.settingsSource===`conversation_settings`?k.isLoading:O.isLoading),N=_.useMemo(()=>j.map(e=>{let t=M(e.settingsSource);if(!se(t))return{...e,filteredSchema:null};let n=new Set(e.sectionKeys),r={...t,sections:t.sections.filter(e=>n.has(e.key))};return{...e,filteredSchema:r}}),[j,M]),P=g||N.some(e=>p(e.filteredSchema)),F=y&&N.some(e=>re(e.filteredSchema)),Te=_.useMemo(()=>ve(j.reduce((e,t)=>e??(t.settingsSource===`conversation_settings`?k.error:O.error),null),T(a.SETTINGS$SDK_SCHEMA_UNAVAILABLE)),[j,O.error,k.error,T]),Ee=_.useMemo(()=>x?JSON.stringify(x):``,[x]),[I,L]=_.useState(`basic`),[R,z]=_.useState({}),[B,V]=_.useState({}),H=_.useRef(!1),U=_.useMemo(()=>{if(!D)return null;let e={};for(let t of N){if(!t.filteredSchema)return null;e[t.settingsSource]={...e[t.settingsSource]??{},...oe(D,t.filteredSchema,t.settingsSource)}}if(x){let t=N[0]?.settingsSource;t&&e[t]&&(e[t]={...e[t],...x})}return e},[D,N,Ee]),W=_.useMemo(()=>{if(!D)return null;let e=null;for(let t of N){if(!t.filteredSchema)return null;let n=h?h(D,t.filteredSchema):ie(D,t.filteredSchema,t.settingsSource);e=e?he(e,n):n}return e?ge(e,{showAdvanced:P,showAll:F}):null},[D,N,h,P,F]);_.useEffect(()=>{H.current=!1,L(`basic`),z({}),V({})},[t,A]),_.useEffect(()=>{if(!(!U||!W)){if(z(U),x){let e=N[0]?.settingsSource;if(e){let t=Object.fromEntries(Object.keys(x).map(e=>[e,!0]));V({[e]:t})}else V({})}else V({});L(e=>H.current?me(e,W):(H.current=!0,W))}},[U,W]);let G=_.useMemo(()=>{let e=new Map;for(let t of N)if(t.filteredSchema)for(let n of t.filteredSchema.sections)for(let r of n.fields)e.has(r.key)||e.set(r.key,t.settingsSource);return e},[N]),K=_.useMemo(()=>{let e={};for(let t of N)Object.assign(e,R[t.settingsSource]??{});return e},[N,R]),q=_.useMemo(()=>{let e={};for(let t of N)Object.assign(e,B[t.settingsSource]??{});return e},[N,B]),J=_.useCallback((e,t)=>{let n=G.get(e);n&&(z(r=>({...r,[n]:{...r[n]??{},[e]:t}})),V(t=>({...t,[n]:{...t[n]??{},[e]:!0}})))},[G]),De=_.useCallback(e=>{c(s(e)||T(a.ERROR$GENERIC))},[T]),Y=_.useRef(()=>{}),Oe=_.useCallback(()=>{Y.current()},[]),X=_.useRef(()=>({})),ke=_.useCallback(()=>X.current(),[]),Z=()=>{if(N.some(e=>!e.filteredSchema))return;let e;try{let t={};for(let e of N){let n=e.filteredSchema,r=f(n,R[e.settingsSource]??{},B[e.settingsSource]??{},I);if(Object.keys(r).length>0){let n=_e[e.settingsSource];t[n]={...t[n]??{},...r}}}e=l?l(t,{values:K,dirty:q,view:I}):t}catch(e){c(e instanceof Error?e.message:T(a.ERROR$GENERIC));return}Object.keys(e).length!==0&&xe(e,{onError:De,onSuccess:()=>{ye||o(T(a.SETTINGS$SAVED_WARNING)),V({}),u?.()}})};Y.current=Z,X.current=()=>{let e={};for(let t of N){if(!t.filteredSchema)continue;let n=R[t.settingsSource]??{},r=B[t.settingsSource]??{};Object.assign(e,ae(t.filteredSchema,n,r))}return e};let Q=Object.keys(q).length>0,$=Q||r;return _.useEffect(()=>{w&&w({save:Oe,isSaving:E,isDirty:$,values:K,view:I,getDirtyPayload:ke})},[E,$,K,I]),(Se||Ce)&&!D||we?(0,v.jsx)(b,{}):N.some(e=>e.filteredSchema&&e.filteredSchema.sections.length>0)?Object.keys(K).length===0?(0,v.jsx)(b,{}):(0,v.jsxs)(`div`,{"data-testid":be,className:S?`relative flex min-h-0 w-full flex-1 flex-col`:`relative w-full min-h-0`,children:[(0,v.jsx)(fe,{view:I,setView:L,showAdvanced:P,showAll:F,isDisabled:!1}),(0,v.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[n?.({values:K,isDisabled:!1,view:I,onChange:J}),N.map(e=>{if(!e.filteredSchema)return null;let t=R[e.settingsSource]??{};return d(e.filteredSchema,{...K,...t},I,e.excludeKeys??pe).map(n=>(0,v.jsx)(`section`,{className:`flex flex-col gap-4`,children:(0,v.jsx)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:n.fields.map(e=>(0,v.jsx)(`div`,{className:ue.has(e.key)?`xl:col-span-2`:void 0,children:(0,v.jsx)(ce,{field:e,value:t[e.key],isDisabled:!1,onChange:t=>J(e.key,t)})},e.key))})},`${e.settingsSource}:${n.key}`))}),C?null:(0,v.jsx)(`div`,{className:`flex justify-start pt-2`,children:(0,v.jsx)(ee,{testId:`save-button`,type:`button`,variant:`primary`,isDisabled:E||!Q&&!r,onClick:Z,children:T(E?a.SETTINGS$SAVING:a.SETTINGS$SAVE_CHANGES)})})]})]}):(0,v.jsx)(`div`,{"data-testid":`sdk-schema-unavailable`,className:de,children:(0,v.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:Te})})}export{C as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as a}from"./useMutation-u8UgRgDK.js";import{t as o}from"./useTranslation-Cbf5AGg_.js";import{t as s}from"./declaration-BGsHjPEW.js";import{t as c}from"./back-nav-button-DVknCcSP.js";import{t as l}from"./pencil-CWhApFIT.js";import{t as u}from"./trash-2-BU6BlW4i.js";import{t as d}from"./utils-DB9LsAzA.js";import{f,l as p}from"./form-control-classes-CbdN5aO3.js";import{t as m}from"./brand-button-B1izLAdR.js";import{t as h}from"./loading-spinner-BcdnT0mN.js";import{n as g,t as _}from"./settings-input-BsgQWS5R.js";import{t as v}from"./confirmation-modal-DGBWM2Ls.js";import{r as y}from"./typography-CzfoD9DY.js";import"./extension-module-card-classes-9V3J9J_b.js";import{a as b,c as x,i as S,l as C,o as w,r as T,s as E}from"./settings-list-classes-DSJJX99U.js";import{t as D}from"./secrets-service-Ch7RH8eH.js";import{n as O,t as k}from"./use-create-secret-DEgM0MXZ.js";var A=e(t(),1),j=()=>a({mutationFn:e=>D.deleteSecret(e)}),M=()=>a({mutationFn:({secretToEdit:e,name:t,description:n})=>D.updateSecret(e,t,n)}),N=n();function P({mode:e,selectedSecret:t,onCancel:n}){let r=i(),{t:a}=o(`openhands`),{data:c}=O(),{mutate:l}=k(),{mutate:u}=M(),[h,v]=A.useState(null),y=e===`edit`&&t&&c?.find(e=>e.name===t)?.description?.trim()||``,b=()=>{r.invalidateQueries({queryKey:[`secrets-search`]}),r.invalidateQueries({queryKey:[`secrets`]})},x=(e,t,r)=>{l({name:e,value:t,description:r},{onSettled:n,onSuccess:b})},S=(e,t,r)=>{u({secretToEdit:e,name:t,description:r},{onSettled:n,onSuccess:b})};return(0,N.jsxs)(`form`,{"data-testid":e===`add`?`add-secret-form`:`edit-secret-form`,onSubmit:n=>{n.preventDefault();let r=new FormData(n.currentTarget),i=r.get(`secret-name`)?.toString(),o=r.get(`secret-value`)?.toString().trim(),l=r.get(`secret-description`)?.toString();if(i){if(v(null),c?.some(e=>e.name===i&&e.name!==t)){v(a(s.SECRETS$SECRET_ALREADY_EXISTS));return}if(e===`add`){if(!o){v(a(s.SECRETS$SECRET_VALUE_REQUIRED));return}x(i,o,l||void 0)}else e===`edit`&&t&&S(t,i,l||void 0)}},className:`flex flex-col items-start gap-6`,children:[(0,N.jsx)(_,{testId:`name-input`,name:`secret-name`,type:`text`,label:a(s.SETTINGS$NAME),className:`w-full min-w-0`,required:!0,defaultValue:e===`edit`&&t?t:``,placeholder:a(s.SECRETS$API_KEY_EXAMPLE),pattern:`^[a-zA-Z][a-zA-Z0-9_]{0,63}$`,title:a(s.SETTINGS$SECRET_NAME_PATTERN_TITLE)}),h&&(0,N.jsx)(`p`,{className:`text-red-500 text-sm`,children:h}),e===`add`&&(0,N.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,N.jsx)(`span`,{className:`text-sm`,children:a(s.FORM$VALUE)}),(0,N.jsx)(`textarea`,{"data-testid":`value-input`,name:`secret-value`,required:!0,className:d(`resize-none`,p,`placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)] disabled:cursor-not-allowed`),rows:8})]}),(0,N.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:`text-sm`,children:a(s.FORM$DESCRIPTION)}),(0,N.jsx)(g,{})]}),(0,N.jsx)(`input`,{"data-testid":`description-input`,name:`secret-description`,defaultValue:y,className:d(f,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,N.jsx)(m,{testId:`cancel-button`,type:`button`,variant:`secondary`,onClick:n,children:a(s.BUTTON$CANCEL)}),(0,N.jsxs)(m,{testId:`submit-button`,type:`submit`,variant:`primary`,children:[e===`add`&&a(s.SECRETS$ADD_SECRET),e===`edit`&&a(s.SECRETS$EDIT_SECRET)]})]})]})}function F(){return(0,N.jsxs)(`div`,{className:d(S,`justify-between border-t border-[var(--oh-border)] first:border-t-0`),children:[(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-4`,children:[(0,N.jsx)(`span`,{className:`skeleton h-4 w-1/4`}),(0,N.jsx)(`span`,{className:`skeleton h-4 w-1/2`})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,N.jsx)(`span`,{className:`skeleton h-4 w-4`}),(0,N.jsx)(`span`,{className:`skeleton h-4 w-4`})]})]})}function I({title:e,description:t,onEdit:n,onDelete:r}){return(0,N.jsxs)(`tr`,{"data-testid":`secret-item`,className:C,children:[(0,N.jsx)(`td`,{className:d(w,`text-content-2 truncate`),title:e,children:e}),(0,N.jsx)(`td`,{className:d(w,`truncate text-content-2 opacity-80`),title:t||``,children:t||``}),(0,N.jsx)(`td`,{className:w,children:(0,N.jsxs)(`div`,{className:`flex items-center justify-end gap-0.5`,children:[(0,N.jsx)(`button`,{"data-testid":`edit-secret-button`,type:`button`,onClick:n,"aria-label":`Edit ${e}`,className:T,children:(0,N.jsx)(l,{"aria-hidden":!0,className:`size-4`,strokeWidth:2})}),(0,N.jsx)(`button`,{"data-testid":`delete-secret-button`,type:`button`,onClick:r,"aria-label":`Delete ${e}`,className:T,children:(0,N.jsx)(u,{"aria-hidden":!0,className:`size-4`,strokeWidth:2})})]})})]})}var L={hideTitle:!0};function R(){let e=i(),{t}=o(`openhands`),n=(0,A.useRef)(null),{data:r,isLoading:a,hasNextPage:l,isFetchingNextPage:u,onLoadMore:f}=O(),{mutate:p}=j(),[g,_]=A.useState(`list`),[S,C]=A.useState(null),[w,T]=A.useState(!1),D=(0,A.useCallback)(e=>{let t=e.currentTarget;t.scrollHeight-t.scrollTop<=t.clientHeight+100&&l&&!u&&f()},[l,u,f]),k=()=>{e.invalidateQueries({queryKey:[`secrets-search`]}),e.invalidateQueries({queryKey:[`secrets`]})},M=e=>{p(e,{onSettled:()=>{T(!1)},onSuccess:k,onError:k})},L=()=>{S&&M(S)},R=()=>{T(!1)},z=()=>{_(`list`),C(null)},B=g===`add-secret-form`||g===`edit-secret-form`,V=t(g===`add-secret-form`?s.SECRETS$ADD_A_SECRET:s.SECRETS$EDIT_A_SECRET);return(0,N.jsxs)(`div`,{"data-testid":`secrets-settings-screen`,className:`flex flex-col gap-6`,children:[g===`list`?(0,N.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,N.jsx)(y.H2,{children:t(s.SETTINGS$NAV_SECRETS)}),(0,N.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:t(s.SETTINGS$PAGE_SECRETS_SUBLINE)})]}),(0,N.jsx)(m,{testId:`add-secret-button`,type:`button`,variant:`primary`,className:`shrink-0 whitespace-nowrap`,onClick:()=>_(`add-secret-form`),isDisabled:a,children:t(s.SECRETS$ADD_NEW_SECRET)})]}):null,B?(0,N.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,N.jsx)(c,{testId:`back-to-secrets`,onClick:z,children:t(s.BUTTON$BACK)}),(0,N.jsx)(y.H2,{testId:`secret-editor-title`,children:V})]}):null,a&&g===`list`&&(0,N.jsxs)(`ul`,{children:[(0,N.jsx)(F,{}),(0,N.jsx)(F,{}),(0,N.jsx)(F,{})]}),g===`list`&&!a&&r?.length===0&&(0,N.jsx)(`div`,{"data-testid":`secrets-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,N.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:t(s.SECRETS$EMPTY)})}),g===`list`&&!a&&(r?.length??0)>0&&(0,N.jsxs)(`div`,{ref:n,className:b,onScroll:D,children:[(0,N.jsxs)(`table`,{className:`w-full min-w-full table-fixed`,children:[(0,N.jsx)(`thead`,{className:E,children:(0,N.jsxs)(`tr`,{children:[(0,N.jsx)(`th`,{className:d(x,`w-1/4`),children:t(s.SETTINGS$NAME)}),(0,N.jsx)(`th`,{className:d(x,`w-1/2`),children:t(s.SECRETS$DESCRIPTION)}),(0,N.jsx)(`th`,{className:d(x,`w-1/4 text-right`),children:t(s.SETTINGS$ACTIONS)})]})}),(0,N.jsx)(`tbody`,{children:r?.map(e=>(0,N.jsx)(I,{title:e.name,description:e.description,onEdit:()=>{_(`edit-secret-form`),C(e.name)},onDelete:()=>{T(!0),C(e.name)}},e.name))})]}),u&&(0,N.jsx)(`div`,{className:`flex justify-center p-4`,children:(0,N.jsx)(h,{size:`small`})})]}),(g===`add-secret-form`||g===`edit-secret-form`)&&(0,N.jsx)(P,{mode:g===`add-secret-form`?`add`:`edit`,selectedSecret:S,onCancel:z}),w&&(0,N.jsx)(v,{text:t(s.SECRETS$CONFIRM_DELETE_KEY),onConfirm:L,onCancel:R})]})}var z=r(R);export{z as default,L as handle};
@@ -1 +0,0 @@
1
- import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{L as t,s as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{r as a,t as o}from"./use-settings-nav-items-D5JJjFHJ.js";import{t as s}from"./use-config-B39iHYFi.js";import{t as c}from"./sidebar-nav-link-CHqyFXwV.js";import{r as l}from"./typography-CzfoD9DY.js";import{n as u}from"./settings-utils-DzCVfiR3.js";import{t as d}from"./use-breakpoint-BP3lqLMx.js";import{t as f}from"./backend-synced-settings-badge-yVh6Kf4E.js";var p=e();function m({navigationItems:e}){let{t}=r(`openhands`),n=e.filter(e=>e.type===`item`);return(0,p.jsxs)(`div`,{"data-testid":`settings-mobile-hub`,className:`flex flex-col gap-4 px-4 py-2 md:hidden`,children:[(0,p.jsx)(l.H2,{children:t(i.SETTINGS$TITLE)}),(0,p.jsxs)(`nav`,{className:`flex flex-col gap-0.5`,children:[n.map(e=>(0,p.jsx)(c,{to:e.item.to,label:t(e.item.text),end:!0,testId:`sidebar-settings-${e.item.to}`,icon:e.item.icon},e.item.to)),(0,p.jsx)(a,{})]}),(0,p.jsx)(`div`,{className:`pt-1`,children:(0,p.jsx)(f,{})})]})}var h=t(function(){let e=d(768),t=o(),{data:r}=s();return e?(0,p.jsx)(m,{navigationItems:t}):(0,p.jsx)(n,{to:u(r?.feature_flags)??`/settings/app`,replace:!0})});export{h as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{R as a}from"./active-backend-context-DHhm10VS.js";import{F as o,t as s}from"./utils-DB9LsAzA.js";import{t as c}from"./modal-backdrop-zVwfOJZr.js";import{r as l,t as u}from"./modal-body-Cc2zp0xb.js";import{t as d}from"./base-modal-CIF_785P.js";import{t as f}from"./modal-classes-3qT9Ap7Q.js";import{t as p}from"./brand-button-B1izLAdR.js";import{n as m}from"./navigation-context-DPs2G0X8.js";import{t as h}from"./settings-input-BsgQWS5R.js";import{t as g}from"./settings-mQUckT0g.js";import{t as _}from"./use-tracking-DFoPQUSU.js";import{t as v}from"./use-save-settings-DiDEbIJw.js";import{t as y}from"./model-selector-D51W2Q9b.js";import{a as b,g as x}from"./sdk-settings-schema-CLR01YIK.js";import{t as S}from"./settings-utils-DzCVfiR3.js";var C=e(t(),1),w=n();function T({testId:e,title:t,description:n,buttons:r}){return(0,w.jsx)(d,{testId:e,title:t,description:n,buttons:[{text:r.danger.text,onClick:r.danger.onClick,className:`bg-danger`},{text:r.cancel.text,onClick:r.cancel.onClick,className:`bg-[var(--oh-interactive-selected)]`}]})}function E({settings:e,onClose:t}){let{trackSettingsSaved:n}=_(),{mutate:a}=v(),{currentPath:s}=m(),{t:l}=r(`openhands`),u=C.useRef(null),[d,f]=C.useState(!1),g=async e=>{let r=S(e);await a(r,{onSuccess:()=>{t();let e=r.agent_settings_diff?.llm??{};n({llmModel:e.model,llmApiKeySet:e.api_key?`SET`:`UNSET`,searchApiKeySet:r.search_api_key?`SET`:`UNSET`,remoteRuntimeResourceFactor:r.remote_runtime_resource_factor})}})},E=()=>{g(new FormData(u.current??void 0))},D=e=>{e.preventDefault();let t=new FormData(e.currentTarget);s.startsWith(`/conversations/`)?f(!0):g(t)},O=e.llm_api_key_set,k=b(e,`llm.model`);return(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`form`,{ref:u,"data-testid":`settings-form`,className:`flex flex-col gap-6`,onSubmit:D,children:[(0,w.jsxs)(`div`,{className:`flex flex-col gap-[17px]`,children:[(0,w.jsx)(y,{currentModel:typeof k==`string`?k:void 0,wrapperClassName:`!flex-col !gap-[17px]`,labelClassName:o.LABEL_CLASSNAME}),(0,w.jsx)(h,{testId:`llm-api-key-input`,name:`llm-api-key-input`,label:l(i.SETTINGS_FORM$API_KEY),type:`password`,className:`w-full`,placeholder:O?`<hidden>`:``,labelClassName:o.LABEL_CLASSNAME}),(0,w.jsx)(x,{testId:`llm-api-key-help-anchor`,text:l(i.SETTINGS$DONT_KNOW_API_KEY),linkText:l(i.SETTINGS$CLICK_FOR_INSTRUCTIONS),href:`https://docs.openhands.dev/usage/local-setup#getting-an-api-key`,size:`settings`,linkColor:`white`})]}),(0,w.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,w.jsx)(p,{testId:`save-settings-button`,type:`submit`,variant:`primary`,className:`w-full`,children:l(i.BUTTON$SAVE)})})]}),d&&(0,w.jsx)(c,{children:(0,w.jsx)(T,{title:l(i.MODAL$END_SESSION_TITLE),description:l(i.MODAL$END_SESSION_MESSAGE),buttons:{danger:{text:l(i.BUTTON$END_SESSION),onClick:E},cancel:{text:l(i.BUTTON$CANCEL),onClick:()=>f(!1)}}})})]})}function D({onClose:e,settings:t}){let{t:n}=r(`openhands`);return(0,w.jsx)(c,{children:(0,w.jsxs)(`div`,{"data-testid":`ai-config-modal`,className:s(`bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal`,l(`md`),u),children:[(0,w.jsx)(`span`,{className:f,children:n(i.AI_SETTINGS$TITLE)}),(0,w.jsx)(x,{testId:`advanced-settings-link`,text:`${n(i.SETTINGS$DESCRIPTION)}. ${n(i.SETTINGS$FOR_OTHER_OPTIONS)} ${n(i.COMMON$SEE)}`,linkText:n(i.COMMON$ADVANCED_SETTINGS),href:a(`/settings`),suffix:`.`,size:`settings`,linkColor:`white`,suffixClassName:`text-white`}),(0,w.jsx)(E,{settings:t||g,onClose:e})]})})}export{D as SettingsModal};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{E as r,L as i,c as a,j as o,k as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as c}from"./useTranslation-Cbf5AGg_.js";import{t as l}from"./declaration-BGsHjPEW.js";import{a as u,d,f,h as p,i as m,o as h}from"./active-backend-context-DHhm10VS.js";import{n as g,r as _,t as v}from"./use-settings-nav-items-D5JJjFHJ.js";import{t as y}from"./utils-DB9LsAzA.js";import{_ as b}from"./agent-server-compatibility-C0MtTTwb.js";import{n as x}from"./use-config-B39iHYFi.js";import"./navigation-link-D8hfwvxI.js";import"./sidebar-layout-Bm7pa3Vk.js";import{t as S}from"./sidebar-nav-link-CHqyFXwV.js";import{n as C}from"./use-settings-BeJap6YL.js";import{n as w}from"./use-agent-profiles-Dn_S_Tkz.js";import"./close-DLFb5kfv.js";import{r as T}from"./typography-CzfoD9DY.js";import{t as E}from"./settings-section-header-context-COMOIaxV.js";import"./settings-gear-MXCyZW0x.js";import{n as D,r as O}from"./settings-utils-DzCVfiR3.js";import{t as k}from"./use-breakpoint-BP3lqLMx.js";import{t as A}from"./backend-synced-settings-badge-yVh6Kf4E.js";import{t as j}from"./settings-like-page-layout-classes-Cdl6jOe5.js";var M=e(t(),1),N=n();function P({navigationItems:e}){let{t}=c(`openhands`),n=e.filter(e=>e.type===`item`);return(0,N.jsxs)(`aside`,{"data-testid":`settings-navbar-desktop`,className:y(`hidden md:flex md:w-[260px] md:shrink-0 md:flex-col md:gap-2`,`md:sticky md:top-8 md:self-start md:pl-8`),children:[(0,N.jsx)(T.Text,{className:`px-2 text-sm font-normal text-white`,children:t(l.SETTINGS$TITLE)}),(0,N.jsxs)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:[n.map(e=>(0,N.jsx)(S,{to:e.item.to,label:t(e.item.text),end:!0,testId:`sidebar-settings-${e.item.to}`,icon:e.item.icon,disabled:e.disabled,disabledReason:e.disabled&&e.disabledAgentName?t(l.SETTINGS$AGENT_DISABLED_TOOLTIP,{agentName:e.disabledAgentName}):void 0},e.item.to)),(0,N.jsx)(_,{})]}),(0,N.jsx)(`div`,{className:`px-2 pt-3`,children:(0,N.jsx)(A,{})})]})}function F({children:e,navigationItems:t}){return(0,N.jsx)(`div`,{className:`flex h-full flex-col md:pt-8`,children:(0,N.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-10 md:items-start`,children:[(0,N.jsx)(P,{navigationItems:t}),(0,N.jsx)(`main`,{className:j,children:(0,N.jsx)(`div`,{className:`mx-auto w-full min-w-0 max-w-[800px]`,children:e})})]})})}async function I(){try{let e=b(),t;try{let n=await p.fetchQuery({queryKey:[...m.all,e.backend.id,e.orgId],queryFn:w.listProfiles,staleTime:0,...u}),r=n?.active_agent_profile_id??null,i=n?.profiles.find(e=>e.id!=null&&e.id===r);i&&(t=i.agent_kind===`acp`)}catch{}if(t===void 0&&(t=(await p.fetchQuery({queryKey:[...f.byScope(`personal`),e.backend.id,e.orgId],queryFn:()=>C(`personal`),staleTime:0}))?.agent_settings?.agent_kind===`acp`),t)return r(`/settings/agents`)}catch{}return null}var L=async({request:e})=>{let{pathname:t}=new URL(e.url),n=(await p.fetchQuery({queryKey:d.WEB_CLIENT_CONFIG,queryFn:x.getConfig,...h}))?.feature_flags;if(O(t,n)){let e=D(n);if(e&&e!==t)return r(e)}if(g.find(e=>e.to===t)?.disabledByAcp){let e=await I();if(e)return e}return null};function R(){let{t:e}=c(`openhands`),t=s(),n=o(),r=v(),i=k(768),[l,u]=(0,M.useState)(!1),{currentSectionTitle:d,currentSectionSubtitle:f}=(0,M.useMemo)(()=>{let e=r.find(e=>e.type===`item`&&e.item.to===t.pathname);if(e?.type===`item`)return{currentSectionTitle:e.item.text,currentSectionSubtitle:e.item.subtitle};let n=r.find(e=>e.type===`item`);return n?.type===`item`?{currentSectionTitle:n.item.text,currentSectionSubtitle:n.item.subtitle}:{currentSectionTitle:`SETTINGS$TITLE`,currentSectionSubtitle:null}},[r,t.pathname]),p=n.find(e=>e.pathname===t.pathname)?.handle,m=i&&t.pathname===`/settings`;return(0,N.jsx)(`main`,{"data-testid":`settings-screen`,className:`min-h-0`,children:(0,N.jsx)(E,{setHideSectionHeader:u,children:(0,N.jsx)(F,{navigationItems:r,children:(0,N.jsxs)(`div`,{className:`flex flex-col gap-6 pb-8`,children:[!(p?.hideTitle===!0||m||l)&&(0,N.jsxs)(`header`,{className:`space-y-1`,children:[(0,N.jsx)(T.H2,{children:e(d)}),f?(0,N.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:e(f)}):null]}),(0,N.jsx)(a,{})]})})})})}var z=i(R);export{L as clientLoader,z as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r,P as i,r as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{h as o}from"./path-utils-D53ZHUQU.js";import{t as s}from"./useQuery-D5pEZbY0.js";import{t as c}from"./useTranslation-Cbf5AGg_.js";import{t as l}from"./declaration-BGsHjPEW.js";import{t as u}from"./messages-CJAv5n4j.js";import{d}from"./agent-server-compatibility-C0MtTTwb.js";import{s as f}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{t as p}from"./loading-spinner-BcdnT0mN.js";import{t as m}from"./openhands-logo-bcNw5bkY.js";import{c as h}from"./lesson-plan-cNUjpdFx.js";import{n as g}from"./use-event-store-Bbaz51GR.js";var _=e(t(),1),v=e=>s({queryKey:[`shared-conversation`,e],queryFn:()=>{if(!e)throw Error(`Conversation ID is required`);return new f(d()).getSharedConversation(e)},enabled:!!e,retry:!1}),y=e=>o({queryKey:[`shared-conversation-events`,e],queryFn:({pageParam:t})=>{if(!e)throw Error(`Conversation ID is required`);return new f(d()).searchSharedEvents({conversationId:e,limit:100,pageId:t})},initialPageParam:void 0,getNextPageParam:e=>e.next_page_id??void 0,enabled:!!e,retry:!1}),b=({hasNextPage:e,isFetchingNextPage:t,fetchNextPage:n,threshold:r=100})=>{let i=(0,_.useRef)(null),a=(0,_.useCallback)(()=>{if(!i.current||t||!e)return;let{scrollTop:a,scrollHeight:o,clientHeight:s}=i.current;a+s>=o-r&&n()},[e,t,n,r]);return(0,_.useEffect)(()=>{let e=i.current;if(e)return e.addEventListener(`scroll`,a),()=>{e.removeEventListener(`scroll`,a)}},[a]),i},x=n(),S=r(function(){let{t:e}=c(`openhands`),{conversationId:t}=i(),{data:n,isLoading:r,error:o}=v(t),{data:s,isLoading:d,error:f,hasNextPage:S,fetchNextPage:C,isFetchingNextPage:w}=y(t),T=r||d,E=o||f,D=_.useMemo(()=>s?.pages?s.pages.flatMap(e=>e.items):[],[s?.pages]),O=_.useMemo(()=>D.reduce((e,t)=>g(t,e),[]).filter(h),[D]),k=b({hasNextPage:!!S,isFetchingNextPage:w,fetchNextPage:C});return T?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(p,{size:`large`})}):E||!n?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(`div`,{className:`text-white`,children:e(l.CONVERSATION$NOT_FOUND)})}):(0,x.jsxs)(`div`,{className:`h-screen bg-base text-white flex flex-col`,children:[(0,x.jsx)(`div`,{className:`border-b border-[var(--oh-border-subtle)] p-4 flex-shrink-0`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto flex items-start gap-4`,children:[(0,x.jsx)(a,{to:`/conversations`,className:`flex-shrink-0`,"aria-label":e(l.BRANDING$OPENHANDS_LOGO),children:(0,x.jsx)(m,{width:46,height:30})}),(0,x.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,x.jsx)(`h1`,{className:`text-xl font-medium mb-2`,children:n?.title||e(l.CONVERSATION$SHARED_CONVERSATION)}),n?.selected_branch&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.CONVERSATION$BRANCH),`: `,n.selected_branch]}),n?.selected_repository&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.CONVERSATION$REPOSITORY),`:`,` `,n.selected_repository]}),n?.llm_model&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.LLM$MODEL),`: `,n.llm_model]})]})]})}),(0,x.jsx)(`div`,{ref:k,className:`flex-1 overflow-y-auto custom-scrollbar-always px-4 pt-4 gap-2`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto p-4 border border-[var(--oh-border-subtle)] rounded`,children:[O.length>0?(0,x.jsx)(u,{messages:O,allEvents:D}):(0,x.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,x.jsx)(`div`,{className:`text-center text-[var(--oh-muted)] py-8`,children:e(l.CONVERSATION$NO_HISTORY_AVAILABLE)})}),w&&(0,x.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,x.jsx)(p,{size:`small`})})]})})]})});export{S as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as i}from"./useMutation-u8UgRgDK.js";import{t as a}from"./Trans-DqF_OEZB.js";import{t as o}from"./useTranslation-Cbf5AGg_.js";import{t as s}from"./declaration-BGsHjPEW.js";import{t as c}from"./utils-DB9LsAzA.js";import{t as l}from"./modal-backdrop-zVwfOJZr.js";import{n as u}from"./modal-body-Cc2zp0xb.js";import{n as d,r as f}from"./base-modal-CIF_785P.js";import{_ as p,u as m}from"./form-control-classes-CbdN5aO3.js";import{t as h}from"./brand-button-B1izLAdR.js";import{t as g}from"./agent-server-conversation-service.api-lzc8dabY.js";var _=e(t(),1),v=n();function y({onConfirm:e,onCancel:t,conversationTitle:n,title:r,description:i}){let{t:c}=o(`openhands`),p;return p=i??(n?(0,v.jsx)(a,{ns:`openhands`,i18nKey:s.CONVERSATION$DELETE_WARNING_WITH_TITLE,values:{title:n},components:{title:(0,v.jsx)(`span`,{className:`text-white`})}}):c(s.CONVERSATION$DELETE_WARNING)),(0,v.jsx)(l,{onClose:t,children:(0,v.jsxs)(u,{className:`items-start border border-[var(--oh-border)]`,children:[(0,v.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,v.jsx)(f,{title:r??c(s.CONVERSATION$CONFIRM_DELETE)}),(0,v.jsx)(d,{children:p})]}),(0,v.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,v.jsx)(h,{type:`button`,variant:`secondary`,onClick:t,"data-testid":`cancel-button`,children:c(s.BUTTON$CANCEL)}),(0,v.jsx)(h,{type:`button`,variant:`primary`,onClick:e,"data-testid":`confirm-button`,children:c(s.ACTION$CONFIRM_DELETE)})]})]})})}function b({onConfirm:e,onCancel:t}){let{t:n}=o(`openhands`);return(0,v.jsx)(l,{onClose:t,children:(0,v.jsxs)(u,{className:`items-start border border-[var(--oh-border)]`,children:[(0,v.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,v.jsx)(f,{title:n(s.CONVERSATION$CONFIRM_CLOSE_CONVERSATION)}),(0,v.jsx)(d,{description:n(s.CONVERSATION$CLOSE_CONVERSATION_WARNING)})]}),(0,v.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,v.jsx)(h,{type:`button`,variant:`secondary`,onClick:t,"data-testid":`cancel-button`,children:n(s.BUTTON$CANCEL)}),(0,v.jsx)(h,{type:`button`,variant:`primary`,onClick:e,"data-testid":`confirm-button`,children:n(s.ACTION$CONFIRM_CLOSE)})]})]})})}var x=()=>{let e=r();return i({mutationFn:e=>g.updateConversationTitle(e.conversationId,e.newTitle),onMutate:async t=>{await e.cancelQueries({queryKey:[`user`,`conversations`]});let n=e.getQueryData([`user`,`conversations`]);return e.setQueryData([`user`,`conversations`],e=>e?.map(e=>e.id===t.conversationId?{...e,title:t.newTitle}:e)),e.setQueryData([`user`,`conversation`,t.conversationId],e=>e&&{...e,title:t.newTitle}),{previousConversations:n}},onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]})}})};function S(e){if(!e)return null;try{let t=new URL(e);return t.hostname===`localhost`&&window.location.hostname!==`localhost`?(t.hostname=window.location.hostname,t.toString()):e}catch{return e}}var C=e=>(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,v.jsx)(`path`,{d:`M12 2C12.5523 2 13 2.44772 13 3V13.5858L15.2929 11.2929C15.6834 10.9024 16.3166 10.9024 16.7071 11.2929C17.0976 11.6834 17.0976 12.3166 16.7071 12.7071L12.7071 16.7071C12.3166 17.0976 11.6834 17.0976 11.2929 16.7071L7.29289 12.7071C6.90237 12.3166 6.90237 11.6834 7.29289 11.2929C7.68342 10.9024 8.31658 10.9024 8.70711 11.2929L11 13.5858V3C11 2.44772 11.4477 2 12 2ZM5 17C5.55228 17 6 17.4477 6 18V20H18V18C18 17.4477 18.4477 17 19 17C19.5523 17 20 17.4477 20 18V20C20 21.1046 19.1046 22 18 22H6C4.89543 22 4 21.1046 4 20V18C4 17.4477 4.44772 17 5 17Z`,fill:`currentColor`})}),w=e=>(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,v.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M21 7.5V9H3V7.5H21ZM3 10.5H21V18H3V10.5ZM21 6H3C2.60218 6 2.22064 6.15804 1.93934 6.43934C1.65804 6.72064 1.5 7.10218 1.5 7.5V18C1.5 18.3978 1.65804 18.7794 1.93934 19.0607C2.22064 19.342 2.60218 19.5 3 19.5H21C21.3978 19.5 21.7794 19.342 22.0607 19.0607C22.342 18.7794 22.5 18.3978 22.5 18V7.5C22.5 7.10218 22.342 6.72064 22.0607 6.43934C21.7794 6.15804 21.3978 6 21 6ZM16.5 15H19.5V16.5H16.5V15Z`,fill:`currentColor`})}),T=_.createContext(null);function E({children:e}){let[t,n]=_.useState(!1),r=_.useCallback(()=>n(!0),[]),i=_.useCallback(()=>n(!1),[]),a=_.useCallback(()=>n(e=>!e),[]),o=_.useMemo(()=>({isOpen:t,open:r,close:i,toggle:a}),[t,r,i,a]);return(0,v.jsx)(T.Provider,{value:o,children:e})}function D(){let e=_.useContext(T);if(!e)throw Error(`useSidebarMobileNav must be used within SidebarMobileNavProvider`);return e}var O=c(`inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1`,`text-[var(--oh-muted)]`,p,m),k=`size-5 shrink-0`,A=e=>(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,v.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10 5.5H18C18.2761 5.5 18.5 5.72386 18.5 6V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 5.5ZM8.5 5.5H6C5.72386 5.5 5.5 5.72386 5.5 6V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 5.5ZM18 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V6C20 4.89543 19.1046 4 18 4Z`,fill:`currentColor`})});function j(){let{t:e}=o(`openhands`),{isOpen:t,toggle:n}=D();return(0,v.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-menu-toggle`,onClick:n,"aria-expanded":t,"aria-label":e(t?s.SIDEBAR$CLOSE_MENU:s.SIDEBAR$OPEN_MENU),className:O,children:(0,v.jsx)(A,{className:k,"aria-hidden":!0})})}export{E as a,C as c,b as d,y as f,k as i,S as l,A as n,D as o,O as r,w as s,j as t,x as u};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as a}from"./useMutation-u8UgRgDK.js";import{t as o}from"./useQuery-D5pEZbY0.js";import{t as s}from"./useTranslation-Cbf5AGg_.js";import{t as c}from"./declaration-BGsHjPEW.js";import{C as l,E as u,S as d,n as f,u as p}from"./active-backend-context-DHhm10VS.js";import{t as m}from"./search-dIQ09UY2.js";import{t as h}from"./x-ZE4iplpF.js";import{t as g}from"./utils-DB9LsAzA.js";import{t as _}from"./modal-backdrop-zVwfOJZr.js";import{n as v}from"./modal-classes-3qT9Ap7Q.js";import{t as y}from"./brand-button-B1izLAdR.js";import{n as b}from"./navigation-context-DPs2G0X8.js";import{t as x}from"./modal-close-button-BcIBUdSq.js";import{t as S}from"./settings-input-BsgQWS5R.js";import{t as C}from"./plugins-management-service-DISfOL13.js";import{a as w,i as T,r as E}from"./extension-module-card-classes-9V3J9J_b.js";import{t as D}from"./settings-switch-Bes8dIlV.js";import{n as O}from"./circle-plus-check-toggle-DoFIjVE0.js";import{n as k,t as A}from"./use-plugins-marketplace-DOJp9rlE.js";import{n as j}from"./extensions-navigation-BMc9Nluv.js";import{n as M}from"./settings-like-page-layout-classes-Cdl6jOe5.js";var N=e(t(),1),P=n();function F({plugin:e,isBusy:t=!1,isDisabled:n=!1,onOpen:r,onInstall:i,onToggle:a}){let{t:o}=s(`openhands`);return(0,P.jsxs)(`div`,{"data-testid":`plugin-card-${e.name}`,role:`button`,tabIndex:0,onClick:r,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:g(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,w,E),children:[(0,P.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,P.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,P.jsx)(`h3`,{"data-testid":`plugin-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,P.jsx)(`p`,{"data-testid":`plugin-source-${e.name}`,className:`mt-0.5 min-w-0 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}):null]}),e.installed?(0,P.jsx)(O,{testId:`plugin-toggle-${e.name}`,isSelected:e.enabled,isDisabled:n||t,onToggle:a,disableTooltipKey:c.COMMON$DISABLE}):e.isLocal?(0,P.jsx)(`span`,{"data-testid":`plugin-local-badge-${e.name}`,className:g(T,`flex-shrink-0`),children:o(c.SETTINGS$PLUGINS_FILTER_LOCAL)}):(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-install-${e.name}`,isDisabled:n||t,className:`flex-shrink-0 whitespace-nowrap`,onClick:e=>{e?.stopPropagation(),i()},children:o(t?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)})]}),e.description?(0,P.jsx)(`p`,{"data-testid":`plugin-description-${e.name}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:e.description}):null,(e.installed||e.isLocal)&&e.version?(0,P.jsx)(`span`,{"data-testid":`plugin-version-${e.name}`,className:g(T,`self-start`),children:o(c.SETTINGS$SKILLS_VERSION,{version:e.version})}):null]})}var I=[{value:`all`,labelKey:c.SETTINGS$PLUGINS_FILTER_ALL},{value:`installed`,labelKey:c.SETTINGS$PLUGINS_FILTER_INSTALLED},{value:`available`,labelKey:c.SETTINGS$PLUGINS_FILTER_AVAILABLE},{value:`local`,labelKey:c.SETTINGS$PLUGINS_FILTER_LOCAL}];function ee({search:e,onSearchChange:t,statusFilter:n,onStatusFilterChange:r}){let{t:i}=s(`openhands`);return(0,P.jsxs)(`div`,{"data-testid":`plugins-toolbar`,className:`flex items-stretch gap-2`,children:[(0,P.jsxs)(`div`,{className:g(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,P.jsx)(m,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,P.jsx)(`input`,{"data-testid":`plugins-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(c.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),"aria-label":i(c.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),className:g(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,P.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(c.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,P.jsx)(h,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,P.jsx)(`div`,{"data-testid":`plugins-status-filter`,className:`flex shrink-0 items-center gap-1 rounded-lg border border-[var(--oh-border)] bg-base-secondary p-1`,children:I.map(e=>(0,P.jsx)(`button`,{type:`button`,"data-testid":`plugins-filter-${e.value}`,"aria-pressed":n===e.value,onClick:()=>r(e.value),className:g(`cursor-pointer rounded-md px-3 py-1 text-xs transition-colors`,n===e.value?`bg-surface-raised text-white`:`text-tertiary-alt hover:text-white`),children:i(e.labelKey)},e.value))})]})}function L({plugin:e,isBusy:t=!1,isDisabled:n=!1,onToggle:r,onInstall:i,onUninstall:a,onRefresh:o,onClose:l,onStartConversation:u}){let{t:d}=s(`openhands`),f=n||t;return(0,P.jsx)(_,{onClose:l,"aria-label":e.name,children:(0,P.jsxs)(`div`,{"data-testid":`plugin-detail-modal`,"data-plugin-name":e.name,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,P.jsx)(x,{onClose:l,testId:`plugin-detail-modal-close`}),(0,P.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,P.jsx)(`h2`,{className:g(`pr-6`,v),children:e.name}),e.source?(0,P.jsx)(`p`,{className:`mt-1 break-all text-xs text-tertiary-alt`,children:e.source}):null]}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[e.description?(0,P.jsx)(`p`,{className:`text-sm leading-relaxed text-tertiary-light`,children:e.description}):null,(0,P.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.isLocal?(0,P.jsx)(`span`,{className:T,children:d(c.SETTINGS$PLUGINS_FILTER_LOCAL)}):null,e.version?(0,P.jsx)(`span`,{className:T,children:d(c.SETTINGS$SKILLS_VERSION,{version:e.version})}):null,e.ref?(0,P.jsxs)(`span`,{className:T,children:[d(c.SETTINGS$PLUGINS_REF_LABEL),` `,e.ref]}):null,e.repoPath?(0,P.jsxs)(`span`,{className:T,children:[d(c.SETTINGS$PLUGINS_REPO_PATH_LABEL),` `,e.repoPath]}):null]}),e.installed?(0,P.jsx)(D,{testId:`plugin-modal-toggle-${e.name}`,isToggled:e.enabled,onToggle:r,isDisabled:f,togglePosition:`right`,children:d(e.enabled?c.SETTINGS$SKILLS_ENABLED:c.SETTINGS$SKILLS_DISABLED)}):null]}),(0,P.jsxs)(`footer`,{className:`flex flex-shrink-0 flex-wrap justify-end gap-2 px-6 pb-6 pt-4`,children:[e.installed?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-refresh-${e.name}`,isDisabled:f,onClick:o,children:d(c.SETTINGS$PLUGINS_REFRESH)}),(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-uninstall-${e.name}`,isDisabled:f,onClick:a,children:d(c.SETTINGS$PLUGINS_UNINSTALL)})]}):e.isLocal?null:(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-install-${e.name}`,isDisabled:f,onClick:i,children:d(t?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)}),e.source&&u?(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-start-conversation-${e.name}`,onClick:u,children:d(c.COMMON$START_CONVERSATION)}):null,(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-modal-dismiss`,onClick:l,children:d(c.BUTTON$CLOSE)})]})]})})}function R(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.installPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),e.invalidateQueries({queryKey:p.marketplace}),l(t(c.SETTINGS$PLUGINS_INSTALL_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function z({onClose:e,onInstalled:t}){let{t:n}=s(`openhands`),r=R(),[i,a]=N.useState(``),[o,l]=N.useState(``),[u,d]=N.useState(``),f=i.trim(),p=f.length>0&&!r.isPending;return(0,P.jsx)(_,{onClose:e,"aria-label":n(c.SETTINGS$PLUGINS_ADD_MODAL_TITLE),children:(0,P.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),p&&r.mutate({source:f,ref:o.trim()||null,repo_path:u.trim()||null},{onSuccess:()=>{t?.(),e()}})},"data-testid":`add-plugin-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,P.jsx)(x,{onClose:e,testId:`add-plugin-modal-close`}),(0,P.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,P.jsx)(`h2`,{className:g(`pr-6`,v),children:n(c.SETTINGS$PLUGINS_ADD_MODAL_TITLE)}),(0,P.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:n(c.SETTINGS$PLUGINS_ADD_MODAL_INTRO)})]}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,P.jsx)(S,{testId:`add-plugin-source-input`,label:n(c.SETTINGS$PLUGINS_SOURCE_LABEL),type:`text`,value:i,onChange:a,placeholder:n(c.SETTINGS$PLUGINS_SOURCE_PLACEHOLDER),showRequiredTag:!0}),(0,P.jsx)(S,{testId:`add-plugin-ref-input`,label:n(c.SETTINGS$PLUGINS_REF_LABEL),type:`text`,value:o,onChange:l,showOptionalTag:!0}),(0,P.jsx)(S,{testId:`add-plugin-repo-path-input`,label:n(c.SETTINGS$PLUGINS_REPO_PATH_LABEL),type:`text`,value:u,onChange:d,showOptionalTag:!0})]}),(0,P.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,P.jsx)(y,{type:`button`,variant:`secondary`,onClick:e,testId:`add-plugin-modal-dismiss`,children:n(c.BUTTON$CLOSE)}),(0,P.jsx)(y,{type:`submit`,variant:`primary`,testId:`add-plugin-submit`,isDisabled:!p,children:n(r.isPending?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)})]})]})})}function B(e,t,n=void 0){let r=new Map;for(let t of e??[])r.set(t.name,{name:t.name,description:t.description,source:t.source,ref:t.ref??null,repoPath:t.repo_path??null,installed:t.installed,enabled:!1,version:null,inCatalog:!0,isLocal:!1});for(let e of t??[]){let t=r.get(e.name);r.set(e.name,{name:e.name,description:t?.description??e.description??null,source:e.source??t?.source??null,ref:e.resolved_ref??t?.ref??null,repoPath:e.repo_path??t?.repoPath??null,installed:!0,enabled:e.enabled,version:e.version??null,inCatalog:t?.inCatalog??!1,isLocal:!1})}for(let e of n??[])r.has(e.name)||r.set(e.name,{name:e.name,description:e.description||null,source:null,ref:null,repoPath:null,installed:!1,enabled:!1,version:e.version||null,inCatalog:!1,isLocal:!0});let i=e=>e.installed?0:e.isLocal?1:2;return Array.from(r.values()).sort((e,t)=>{let n=i(e)-i(t);return n===0?e.name.localeCompare(t.name):n})}function V(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description??``,e.source??``,e.repoPath??``,e.ref??``].some(e=>e.toLowerCase().includes(n)):!0}function H(e,t){return t===`installed`?e.installed:t===`available`?!e.installed&&!e.isLocal:t===`local`?e.isLocal:!0}var U=()=>o({queryKey:p.installed,queryFn:()=>C.listInstalledPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1}),W=()=>o({queryKey:p.local,queryFn:()=>k.getLocalPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});function G(){let e=i(),{t}=s(`openhands`);return a({mutationFn:({name:e,enabled:t})=>C.setPluginEnabled(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed})},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function K(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.uninstallPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),e.invalidateQueries({queryKey:p.marketplace}),l(t(c.SETTINGS$PLUGINS_UNINSTALL_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function q(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.refreshPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),l(t(c.SETTINGS$PLUGINS_REFRESH_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function J(e){let t=btoa(JSON.stringify(e));return`/launch?${new URLSearchParams({plugins:t}).toString()}`}var Y=r(function(){let{t:e}=s(`openhands`),{backend:t}=f(),{navigate:n}=b(),r=t.kind===`local`,{data:i,isLoading:a}=A(),{data:o,isLoading:l}=U(),{data:u,isLoading:d}=W(),p=R(),m=G(),h=K(),_=q(),[v,x]=N.useState(``),[S,C]=N.useState(`all`),[w,T]=N.useState(null),[E,D]=N.useState(!1),O=N.useMemo(()=>B(i,o,u),[i,o,u]),k=N.useMemo(()=>O.filter(e=>H(e,S)&&V(e,v)),[O,S,v]),I=w?O.find(e=>e.name===w)??null:null,Y=a||l||d,X=(m.isPending?m.variables?.name:void 0)??(h.isPending?h.variables:void 0)??(_.isPending?_.variables:void 0)??null,Z=e=>X===e.name||p.isPending&&p.variables?.source===e.source,Q=e=>{e.source&&p.mutate({source:e.source,ref:e.ref,repo_path:e.repoPath})},$=(e,t)=>{m.mutate({name:e.name,enabled:t})},te=e=>{h.mutate(e.name,{onSuccess:()=>T(null)})},ne=e=>{_.mutate(e.name)},re=e=>{e.source&&n(J([{source:e.source,ref:e.ref,repo_path:e.repoPath}]))};return(0,P.jsxs)(`div`,{"data-testid":`skills-plugins-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,P.jsx)(j,{}),(0,P.jsx)(`main`,{className:g(M,`h-full`),children:(0,P.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,P.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,P.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(c.SETTINGS$PLUGINS_TITLE)}),(0,P.jsx)(`div`,{"data-testid":`plugins-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_PAGE_DESCRIPTION)})]}),(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugins-add-plugin-button`,isDisabled:!r,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>D(!0),children:e(c.SETTINGS$PLUGINS_ADD_BUTTON)})]}),Y&&(0,P.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,P.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!Y&&O.length===0&&(0,P.jsx)(`div`,{"data-testid":`plugins-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,P.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_NO_PLUGINS)})}),!Y&&O.length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(ee,{search:v,onSearchChange:x,statusFilter:S,onStatusFilterChange:C}),k.length===0?(0,P.jsx)(`div`,{"data-testid":`plugins-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,P.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_NO_MATCH)})}):(0,P.jsx)(`section`,{className:g(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,P.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:k.map(e=>(0,P.jsx)(F,{plugin:e,isBusy:Z(e),isDisabled:!r,onOpen:()=>T(e.name),onInstall:()=>Q(e),onToggle:t=>$(e,t)},e.name))})})]}),I&&(0,P.jsx)(L,{plugin:I,isBusy:Z(I),isDisabled:!r,onToggle:e=>$(I,e),onInstall:()=>Q(I),onUninstall:()=>te(I),onRefresh:()=>ne(I),onStartConversation:()=>re(I),onClose:()=>T(null)}),E&&(0,P.jsx)(z,{onClose:()=>D(!1)})]})})]})});export{Y as default};
@@ -1,2 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as i}from"./Trans-DqF_OEZB.js";import{t as a}from"./useTranslation-Cbf5AGg_.js";import{t as o}from"./declaration-BGsHjPEW.js";import{E as s,S as c}from"./active-backend-context-DHhm10VS.js";import{t as l}from"./search-dIQ09UY2.js";import{t as u}from"./x-ZE4iplpF.js";import{t as d}from"./utils-DB9LsAzA.js";import{t as f}from"./modal-backdrop-zVwfOJZr.js";import{n as p}from"./modal-classes-3qT9Ap7Q.js";import{t as m}from"./brand-button-B1izLAdR.js";import{t as h}from"./modal-close-button-BcIBUdSq.js";import{r as g}from"./use-settings-BeJap6YL.js";import{t as _}from"./skills-EqzxYBvT.js";import{t as v}from"./use-save-settings-DiDEbIJw.js";import{t as y}from"./checkmark-h7udgXMM.js";import{t as b}from"./copy-BLmGeJcd.js";import{a as x,r as S}from"./extension-module-card-classes-9V3J9J_b.js";import{t as C}from"./settings-switch-Bes8dIlV.js";import{n as w,t as T}from"./skill-card-pill-row-BPYKQ3IN.js";import{n as E}from"./circle-plus-check-toggle-DoFIjVE0.js";import{t as D}from"./use-skills-Blpg2BqE.js";import{n as O}from"./extensions-navigation-BMc9Nluv.js";import{n as k,t as A}from"./use-launch-skill-in-chat-DJWEfVc5.js";import{t as j}from"./enum-filter-dropdown-JLYv1t8L.js";import{n as ee}from"./settings-like-page-layout-classes-Cdl6jOe5.js";var M=e(t(),1),N=n();function P({skillName:e,className:t}){return(0,N.jsx)(`span`,{"aria-hidden":`true`,title:e,"data-testid":`skill-icon-${e}`,className:d(`inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden`,`rounded-lg border border-white/10 bg-surface-raised text-white`,`shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,`[&>svg]:h-5 [&>svg]:w-5`,t),children:(0,N.jsx)(_,{})})}var F=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function te(e){let t=e.match(/^description:\s*\|\s*\r?\n((?:[ \t].*(?:\r?\n|$))+)/m);if(t)return t[1].replace(/^[ \t]+/gm,``).trim();let n=e.match(/^description:\s*['"](.+?)['"]\s*$/m);if(n)return n[1].trim();let r=e.match(/^description:\s*(.+)\s*$/m);return r?r[1].trim():null}function ne(e){let t=e.match(F);return t?e.slice(t[0].length).trim():e.trim()}function re(e){let t=e.replace(/^#+\s+[^\n]+\n+/,``).trim();return t.split(/\n\s*\n/).map(e=>e.replace(/\s+/g,` `).trim()).find(e=>e.length>0)??t.replace(/\s+/g,` `).trim()}function I(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(F);if(r){let e=te(r[1]);if(e)return e}return re(ne(n))}var L=`inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-text-secondary/35 bg-text-secondary/12 px-2 py-0.5 text-[11px] font-medium leading-4 text-tertiary-light`,R={agentskills:{labelKey:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:o.SETTINGS$SKILLS_TYPE_REPO}};function z({type:e}){let{t}=a(`openhands`),n=R[e];return(0,N.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:L,children:t(n.labelKey)})}function B(e,t,n){if(e)return`${e}-${t}-${n}`}function V(e,t,n={}){let{variant:r=`card`,testIdPrefix:i}=n,a=[{id:`type-${e.type}`,node:(0,N.jsx)(z,{type:e.type})}];if(e.version&&a.push({id:`version-${e.version}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`version`)??`skill-version-${e.name}`,className:T,children:t(o.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&a.push({id:`license-${e.license}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`license`),className:T,children:e.license})}),r===`detail`&&e.compatibility&&a.push({id:`compatibility-${e.compatibility}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`compatibility`),className:T,children:e.compatibility})}),e.disable_model_invocation&&a.push({id:`disable-model-invocation`,node:(0,N.jsxs)(`span`,{"data-testid":B(i,e.name,`disable-model-invocation`)??`skill-disable-model-invocation-${e.name}`,className:`inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[rgba(248,113,113,0.35)] bg-[rgba(248,113,113,0.12)] px-2 py-0.5 text-[11px] font-medium leading-4 text-[#fca5a5]`,children:[(0,N.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(o.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)a.push({id:`allowed-tool-${t}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`tool-${t}`),className:d(T,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))a.push({id:`metadata-${t}`,node:(0,N.jsxs)(`span`,{"data-testid":B(i,e.name,`metadata-${t}`),className:T,children:[(0,N.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])a.push({id:`trigger-${t}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`trigger-${t}`),className:T,children:t})});return a}function H(e){let t=e?.trim();return t?!!(/^https?:\/\//i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~`)||/^[A-Za-z]:[\\/]/.test(t)||t.includes(`/`)||t.includes(`\\`)):!1}function U({skill:e,enabled:t,onOpen:n,onToggle:r}){let{t:i}=a(`openhands`),[s,c]=M.useState(!1),l=I(e),u=M.useMemo(()=>V(e,i),[e,i]),f=H(e.source);return M.useEffect(()=>{if(!s)return;let e=setTimeout(()=>c(!1),2e3);return()=>clearTimeout(e)},[s]),(0,N.jsx)(`div`,{"data-testid":`skill-card-${e.name}`,role:`button`,tabIndex:0,onClick:n,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())},className:d(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,x,S),children:(0,N.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,N.jsx)(P,{skillName:e.name}),(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,N.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,N.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,N.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,N.jsx)(`p`,{"data-testid":`skill-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),f?(0,N.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":i(s?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:s,onClick:async t=>{t.stopPropagation(),e.source&&(await navigator.clipboard.writeText(e.source),c(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:s?(0,N.jsx)(y,{width:12,height:12}):(0,N.jsx)(b,{width:12,height:12})}):null]}):null]}),(0,N.jsx)(E,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:r,disableTooltipKey:o.COMMON$DISABLE})]}),l?(0,N.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,N.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:l})}):null,u.length>0?(0,N.jsx)(w,{pills:u,testId:`skill-triggers-${e.name}`}):null]})]})})}var W=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,G=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`;function K(e){return e.name===`add-skill`?G:`/${e.name} `}function q({testId:e,label:t,value:n}){return(0,N.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,N.jsx)(`span`,{className:`text-sm`,children:t}),(0,N.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
2
- `).length)),className:d(`bg-[var(--oh-surface-raised)] border border-[var(--oh-border-subtle)] w-full min-w-0 rounded-sm p-2 text-sm`,`cursor-not-allowed resize-none custom-scrollbar`)})]})}function J({skill:e,enabled:t,onToggle:n,onClose:r}){let{t:i}=a(`openhands`),s=A(),[c,l]=M.useState(!1),u=M.useMemo(()=>K(e),[e]),d=I(e),g=M.useMemo(()=>V(e,i,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,i]),_=H(e.source);return M.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,N.jsx)(f,{onClose:r,"aria-label":e.name,children:(0,N.jsxs)(`div`,{"data-testid":`skill-detail-modal`,"data-skill-name":e.name,className:`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[85vh] overflow-y-auto custom-scrollbar`,children:[(0,N.jsx)(h,{onClose:r,testId:`skill-detail-modal-close`}),(0,N.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,N.jsx)(P,{skillName:e.name}),(0,N.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,N.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:p,children:e.name}),e.source?(0,N.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,N.jsx)(`p`,{"data-testid":`skill-modal-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),_?(0,N.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":i(c?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async()=>{e.source&&(await navigator.clipboard.writeText(e.source),l(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:c?(0,N.jsx)(y,{width:12,height:12}):(0,N.jsx)(b,{width:12,height:12})}):null]}):null]})]}),(0,N.jsx)(`div`,{"data-testid":`skill-modal-enable-row-${e.name}`,className:`flex w-full items-center rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:(0,N.jsx)(C,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:i(t?o.SETTINGS$SKILLS_ENABLED:o.SETTINGS$SKILLS_DISABLED)})}),d?(0,N.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`text-xs text-tertiary-light`,children:d}):null,g.length>0?(0,N.jsx)(w,{pills:g,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,N.jsx)(q,{testId:`skill-modal-field-content-${e.name}`,label:i(o.SETTINGS$SKILLS_CONTENT),value:e.content}):null,(0,N.jsxs)(`div`,{className:`mt-2 flex justify-end gap-2`,children:[(0,N.jsx)(m,{type:`button`,variant:`secondary`,onClick:r,testId:`skill-detail-close`,children:i(o.BUTTON$CLOSE)}),(0,N.jsx)(m,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>s(u,r),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,N.jsx)(k,{className:`size-4`,"aria-hidden":!0}),children:i(o.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}var Y=[o.SETTINGS$SKILLS_ADD_MODAL_STEP_1,o.SETTINGS$SKILLS_ADD_MODAL_STEP_2,o.SETTINGS$SKILLS_ADD_MODAL_STEP_3,o.SETTINGS$SKILLS_ADD_MODAL_STEP_4,o.SETTINGS$SKILLS_ADD_MODAL_STEP_5],X={cmd:(0,N.jsx)(Z,{}),path:(0,N.jsx)(Z,{}),env:(0,N.jsx)(Z,{})};function Z({children:e}){return(0,N.jsx)(`code`,{className:d(`mx-0.5 inline-block rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 align-baseline font-mono text-[11px] text-white`),children:e})}function ie(){let{t:e}=a(`openhands`),[t,n]=M.useState(!1);return M.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,N.jsxs)(`div`,{className:`relative`,children:[(0,N.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:d(`overflow-x-auto rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] p-2 pr-10 text-xs text-white`),children:G}),(0,N.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?o.BUTTON$COPIED:o.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(G),n(!0)},className:d(`absolute right-2 top-2 cursor-pointer rounded-sm border border-[var(--oh-border-subtle)]`,`bg-base-secondary p-1 text-tertiary-alt transition-colors`,`hover:bg-[var(--oh-surface)] hover:text-white disabled:cursor-default [&_path]:fill-current`),children:t?(0,N.jsx)(y,{width:14,height:14}):(0,N.jsx)(b,{width:14,height:14})})]})}function Q({i18nKey:e}){return(0,N.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,N.jsx)(i,{ns:`openhands`,i18nKey:e,components:X})})}function ae({onClose:e}){let{t}=a(`openhands`);return(0,N.jsx)(f,{onClose:e,"aria-label":t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,N.jsxs)(`div`,{"data-testid":`add-skill-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,N.jsx)(h,{onClose:e,testId:`add-skill-modal-close`}),(0,N.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,N.jsx)(`h2`,{className:d(`pr-6`,p),children:t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,N.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,N.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,N.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,N.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,N.jsx)(ie,{}),(0,N.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:Y.map(e=>(0,N.jsx)(`li`,{children:e===o.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,N.jsx)(i,{ns:`openhands`,i18nKey:e,components:X}):t(e)},e))})]}),(0,N.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,N.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,N.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,N.jsx)(`a`,{href:W,target:`_blank`,rel:`noreferrer`,"data-testid":`add-skill-modal-docs-link`,className:`self-start text-xs text-[var(--oh-muted)] transition-colors hover:text-white hover:underline`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,N.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,N.jsx)(m,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(o.BUTTON$CLOSE)})})]})})}var oe=[`all`,`agentskills`,`knowledge`,`repo`],$={all:o.SETTINGS$SKILLS_TYPE_ALL,agentskills:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:o.SETTINGS$SKILLS_TYPE_REPO};function se({value:e,onChange:t}){return(0,N.jsx)(j,{testId:`skills-type-filter`,value:e,onChange:t,options:oe,labelKeyByValue:$})}function ce({search:e,onSearchChange:t,typeFilter:n,onTypeFilterChange:r}){let{t:i}=a(`openhands`);return(0,N.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,N.jsxs)(`div`,{className:d(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,N.jsx)(l,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,N.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":i(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:d(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,N.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(o.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,N.jsx)(u,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,N.jsx)(se,{value:n,onChange:r})]})}function le(e,t){if(!t)return!0;let n=[e.name,I(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],r=t.toLowerCase();return n.some(e=>e.toLowerCase().includes(r))}function ue(){let{t:e}=a(`openhands`),{mutate:t}=v(),{data:n,isLoading:r}=g(),{data:i,isLoading:l}=D(),[u,f]=M.useState(new Set),[p,h]=M.useState(!1),[_,y]=M.useState(``),[b,x]=M.useState(`all`),[S,C]=M.useState(null),[w,T]=M.useState(!1);M.useEffect(()=>{r||!n||(f(new Set(n.disabled_skills??[])),h(!0))},[r,n?.disabled_skills]);let E=(e,t)=>{f(n=>{let r=new Set(n);return t?r.delete(e):r.add(e),r})};M.useEffect(()=>{p&&t({disabled_skills:Array.from(u)},{onError:t=>{c(s(t)||e(o.ERROR$GENERIC))}})},[u,p,t,e]);let k=r||l||!n,A=M.useMemo(()=>i?i.filter(e=>(b===`all`||e.type===b)&&le(e,_)):[],[i,b,_]);return(0,N.jsxs)(`div`,{"data-testid":`skills-settings-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,N.jsx)(O,{}),(0,N.jsx)(`main`,{className:d(ee,`h-full`),children:(0,N.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,N.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,N.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(o.SETTINGS$SKILLS_TITLE)}),(0,N.jsx)(`div`,{"data-testid":`skills-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_PAGE_DESCRIPTION)})]}),(0,N.jsx)(m,{type:`button`,variant:`secondary`,testId:`skills-add-skill-button`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>T(!0),children:e(o.SETTINGS$SKILLS_ADD_BUTTON)})]}),k&&(0,N.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,N.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!k&&(!i||i.length===0)&&(0,N.jsx)(`div`,{"data-testid":`skills-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,N.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_NO_SKILLS)})}),!k&&i&&i.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ce,{search:_,onSearchChange:y,typeFilter:b,onTypeFilterChange:x}),A.length===0?(0,N.jsx)(`div`,{"data-testid":`skills-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,N.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_NO_MATCH)})}):(0,N.jsx)(`section`,{className:d(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,N.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:A.map(e=>(0,N.jsx)(U,{skill:e,enabled:!u.has(e.name),onOpen:()=>C(e),onToggle:t=>E(e.name,t)},e.name))})})]}),S&&(0,N.jsx)(J,{skill:S,enabled:!u.has(S.name),onToggle:e=>E(S.name,e),onClose:()=>C(null)}),w&&(0,N.jsx)(ae,{onClose:()=>T(!1)})]})})]})}var de=r(ue);export{de as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor~module-D5a_AClf.js","assets/rolldown-runtime-BFRubm34.js"])))=>i.map(i=>d[i]);
2
- import{St as e}from"./vendor-styling-CI0PQ3ab.js";import{i as t,n,r}from"./client-source-CtQjJEy6.js";var i=`openhands-telemetry-consent`,a=`openhands-telemetry-consent-pending-cloud-sync`,o=`openhands-telemetry-consent-change`,s=`openhands-telemetry-first-use`,c=`openhands-telemetry-session`,l=`agent-canvas`,u=`phc_BgzfxKdgsYMLFTmJqt424ZoyVHvKFfrwttLimzdYTKFK`,d=`https://z.openhands.dev`,f=`https://us.posthog.com`,p=null,m=null,h,g={},_=!1,v,y=0,b=-1,x=Object.freeze({client_source:n,client_version:r,package_name:t.name,package_version:t.version});function S(e){return e?{...e,properties:{...e.properties,...x}}:null}function C(e){_||P()!==`granted`?e.opt_out_capturing():e.opt_in_capturing()}function w(e,t=!1){e.reset(t),b=-1,C(e)}function T(e){if(v===void 0||!H())return;let t=v?.distinctId,n=e.get_property(`$user_id`);if(n!=null&&n!==t&&w(e),v===null){b=y;return}(e.get_property(`$user_id`)!==v.distinctId||b!==y)&&(e.identify(v.distinctId,v.properties),b=y)}function E(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}function D(e){if(e===!1){if(_)return;_=!0,p?.opt_out_capturing(),L();return}let t=_;if(_=!1,!p&&!m){let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));g={...g,...t}}t&&(p&&(C(p),T(p)),L())}function O(){return _?null:{apiKey:g.apiKey||u,apiHost:g.apiHost||d,uiHost:g.uiHost||f}}function k(){return typeof window<`u`&&typeof localStorage<`u`}async function A(){if(!k())return null;if(p)return p;try{let{default:t}=await e(async()=>{let{default:e}=await import(`./vendor~module-D5a_AClf.js`).then(e=>e.t);return{default:e}},__vite__mapDeps([0,1]));return t}catch{return null}}function j(){return!!(_||typeof process<`u`&&{}?.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`))}function M(e){p||(h=e)}async function N(e=!1){if(p)return p;if(m)return m;m=(async()=>{let t=O();if(!t)return null;let n=await A();if(!n)return null;let r=n.init(t.apiKey,{api_host:t.apiHost,ui_host:t.uiHost,opt_out_capturing_by_default:!e,capture_pageview:!1,autocapture:!1,persistence:`localStorage`,persistence_name:l,consent_persistence_name:`${l}-consent`,person_profiles:`identified_only`,disable_session_recording:!0,bootstrap:h,before_send:S},l);return r?(p=r,h=void 0,_?p.opt_out_capturing():P()===`granted`?(p.opt_in_capturing(),T(p)):e||p.opt_out_capturing(),p):null})();try{return await m}finally{p||(m=null)}}function P(){if(!k())return`pending`;if(j())return`denied`;try{let e=localStorage.getItem(i);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}function F(){if(!k())return null;try{let e=localStorage.getItem(a);return e===`granted`||e===`denied`?e:null}catch{return null}}function I(e){if(!k())return()=>{};let t=t=>{(t.key===i||t.key===a)&&e()};return window.addEventListener(o,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(o,e),window.removeEventListener(`storage`,t)}}function L(){k()&&window.dispatchEvent(new Event(o))}function R(e){if(k())try{localStorage.setItem(a,e)}catch{}}function z(e){if(k())try{if(e!==void 0&&localStorage.getItem(a)!==e)return;localStorage.removeItem(a),L()}catch{}}async function B(e,{syncToCloud:t=!0}={}){if(k())try{if(localStorage.setItem(i,e),_)return;let t=p??await N();if(!t)return;e===`granted`?(t.opt_in_capturing(),T(t)):t.get_property(`$user_id`)==null?t.opt_out_capturing():w(t)}catch{}finally{t&&R(e),L()}}async function V(e,t={}){let n=e===null?null:{distinctId:e,properties:t};if(v===n||v!=null&&n!==null&&v.distinctId===n.distinctId&&E(v.properties,t)||(v=n,y+=1,b=-1,!H()))return;let r=p??await N();r&&H()&&T(r)}function H(){return P()===`granted`}function U(){if(!k())return!1;try{return localStorage.getItem(s)===`true`}catch{return!1}}function W(){if(k())try{localStorage.setItem(s,`true`)}catch{}}async function G(){if(j()||U())return;let e=await N(!0);!e||j()||((e.has_opted_out_capturing?.()??!1)&&e.opt_in_capturing(),e.capture(`canvas_install`,{platform:typeof navigator<`u`?navigator.platform:`unknown`,user_agent:typeof navigator<`u`?navigator.userAgent:`unknown`,referrer:typeof document<`u`?document.referrer:``,url_origin:typeof window<`u`?window.location.origin:``,embedded:typeof window<`u`&&window.self!==window.top}),W(),P()!==`granted`&&e.opt_out_capturing())}function K(){if(!k())return!1;try{return sessionStorage.getItem(c)===`true`}catch{return!1}}function q(){if(k())try{sessionStorage.setItem(c,`true`)}catch{}}async function J(){if(!H())return null;let e=await N();return!e||!H()?null:(e.has_opted_out_capturing?.()&&e.opt_in_capturing(),T(e),e)}async function Y(){if(K())return;let e=await J();e&&(e.capture(`canvas_new_session`,{is_first_use:!U()}),q())}async function X(e,t={}){let n=await J();n&&n.capture(e,t)}async function Z(e,t={}){let n=await J();n&&n.captureException(e,t)}async function Q(){if(k()){try{localStorage.removeItem(i),localStorage.removeItem(s)}catch{}z();try{sessionStorage.removeItem(c)}catch{}v=null,y+=1,b=-1;try{p&&w(p,!0)}catch{try{p?.opt_out_capturing()}catch{}}}}export{F as a,B as c,X as d,Z as f,D as i,V as l,Y as m,Q as n,P as o,G as p,M as r,N as s,z as t,I as u};
@@ -1 +0,0 @@
1
- import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{f as n,i as r}from"./active-backend-context-DHhm10VS.js";import{t as i}from"./settings-service.api-DPTFyRXL.js";import{n as a}from"./use-agent-profiles-Dn_S_Tkz.js";var o=[`activate-agent-profile`];function s(){let s=e();return t({mutationKey:o,mutationFn:e=>a.activateProfile(e),onMutate:async e=>{await s.cancelQueries({queryKey:r.all});let t=s.getQueriesData({queryKey:r.all});return s.setQueriesData({queryKey:r.all},t=>t&&{...t,active_agent_profile_id:e}),{snapshots:t}},onError:(e,t,n)=>{n?.snapshots?.forEach(([e,t])=>{s.setQueryData(e,t)})},onSuccess:async()=>{i.invalidateCache(),await s.invalidateQueries({queryKey:r.all}),await s.invalidateQueries({queryKey:n.personal()})}})}export{s as n,o as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{c as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t as r}from"./useQueries-BpIlT8Mt.js";import{A as i,_ as a,b as o,k as s,v as c,y as l}from"./active-backend-context-DHhm10VS.js";import{c as u,d,t as f}from"./agent-server-compatibility-C0MtTTwb.js";import{S as p,d as m,y as h}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js";import{n as g,r as _}from"./organization-service.api-Da2jiuBS.js";var v=e(t(),1),y=1e4,b=4e3,x=`Invalid API key`,S=`API key required`,C=`Cloud API key or network issue`,w=`Logged out`;function T(e){return e===x}function E(e){return e===S}function D(e){return e===C}function O(e){return e.kind===`cloud`&&e.authMode!==`cookie`&&!e.apiKey.trim()}function k(e){return e===w}async function A(e){if(e.kind===`cloud`){if(e.authMode!==`cookie`&&!e.apiKey?.trim())throw Error(S);try{e.authMode===`cookie`?await g(e):await _(e)}catch(e){throw n.isAxiosError(e)&&e.response?.status===401||e instanceof p&&e.status===401?Error(w):s(e)?Error(C):e}return!0}try{let t=d({host:e.host,sessionApiKey:e.apiKey||null,timeout:b});await new m(t).getSettings(),f(await new h(t).getServerInfo())}catch(e){throw u(e,401)?Error(x):e}return!0}var j=2,M=300;function N(e){return e instanceof Error?e.message!==`Invalid API key`&&e.message!==`API key required`&&e.message!==`Logged out`:!0}async function P(e){for(let t=0;;t+=1)try{return await A(e)}catch(e){if(t>=j||!N(e))throw e;await new Promise(e=>{setTimeout(e,M)})}}function F(e,t={}){let{probeDisabledOnce:n=!1}=t,s=v.useSyncExternalStore(o,a,a),u=r({queries:e.map(e=>{let t=s[e.id],r=O(e),a=t?.disabled===!0,o=a&&e.kind===`cloud`&&i(t?.lastError),u=!r&&(!a||n||o);return{queryKey:[`backend-health`,e.id,e.kind,e.host,e.apiKey??``],queryFn:async()=>{try{let t=await P(e);return l(e.id),t}catch(t){throw c(e.id,t),t}},enabled:u,refetchInterval:a||r?!1:y,refetchIntervalInBackground:!1,refetchOnMount:a&&n?`always`:!0,refetchOnReconnect:!a&&!r,refetchOnWindowFocus:!a&&!r,retry:!1,staleTime:a?0:y,meta:{disableToast:!0}}})}),d={};return e.forEach((e,t)=>{let n=u[t],r=s[e.id],i=O(e),a=i?!1:r?.disabled===!0,o=i?0:r?.consecutiveFailures??0,c=i?S:r?.lastError??null,l;l=i||a?!1:n.isSuccess?!0:n.isError?!1:null,d[e.id]={isConnected:l,consecutiveFailures:o,lastError:c,disabled:a}}),d}export{F as a,E as i,k as n,T as r,D as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./useQuery-D5pEZbY0.js";import{d as t,o as n}from"./active-backend-context-DHhm10VS.js";import{d as r,i,l as a,o}from"./agent-server-compatibility-C0MtTTwb.js";import{m as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";var c=class{static async getModels(){let e=new s(r()),[t,n,i]=await Promise.all([e.getModels(),e.getVerifiedModels(),e.getProviders()]),a=Object.keys(n??{}).sort(),o=a.flatMap(e=>n[e]??[]);return{models:t??[],verified_models:o,verified_providers:i?.filter(e=>a.includes(e))??a,default_model:o[0]??t?.[0]??``}}static async getConfig(){return await a(),{feature_flags:{hide_llm_settings:!1,hide_users_page:!0},providers_configured:[],maintenance_start_time:null,recaptcha_site_key:null,faulty_models:[],error_message:null,updated_at:new Date().toISOString()}}},l=r=>e({queryKey:t.WEB_CLIENT_CONFIG,queryFn:c.getConfig,retry:(e,t)=>!o(t)&&!i(t)&&e<3,meta:{disableToast:!0},...n,enabled:r?.enabled});export{c as n,l as t};
@@ -1,4 +0,0 @@
1
- import{t as e}from"./react-DPDgL6du.js";import"./canvas-ui-COgjltGz.js";function t(e){return typeof e==`object`&&!!e&&`id`in e&&`timestamp`in e&&`source`in e&&typeof e.id==`string`&&e.id.length>0&&typeof e.timestamp==`string`&&e.timestamp.length>0&&typeof e.source==`string`&&(e.source===`agent`||e.source===`user`||e.source===`environment`||e.source===`hook`)}var n=e=>e.source===`environment`&&`action_id`in e&&`observation`in e&&e.observation!==null&&typeof e.observation==`object`&&`kind`in e.observation,r=e=>e.source===`agent`&&`tool_name`in e&&`tool_call_id`in e&&`error`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`&&typeof e.error==`string`,i=e=>`llm_message`in e&&typeof e.llm_message==`object`&&e.llm_message!==null&&`role`in e.llm_message&&`content`in e.llm_message,a=e=>i(e)&&e.llm_message.role===`user`,o=e=>e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&`tool_name`in e&&`tool_call_id`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`,s=e=>o(e)&&(e.action.kind===`ExecuteBashAction`||e.action.kind===`TerminalAction`),c=e=>n(e)&&(e.observation.kind===`ExecuteBashObservation`||e.observation.kind===`TerminalObservation`),l=e=>n(e)&&e.observation.kind===`PlanningFileEditorObservation`,u=e=>n(e)&&e.observation.kind===`BrowserObservation`,d=e=>n(e)&&e.observation.kind===`SwitchLLMObservation`,f=e=>o(e)&&e.action.kind===`BrowserNavigateAction`,p=e=>o(e)&&(e.tool_name===`canvas_ui`||e.tool_name===`canvas_ui_control`),m=e=>e.source===`agent`&&`system_prompt`in e&&`tools`in e&&typeof e.system_prompt==`object`&&Array.isArray(e.tools),h=e=>`kind`in e&&e.kind===`ConversationStateUpdateEvent`,g=e=>e.key===`full_state`,_=e=>e.key===`execution_status`,v=e=>e.key===`stats`,y=e=>e.key===`goal`,b=e=>`kind`in e&&e.kind===`ConversationErrorEvent`,x=e=>`kind`in e&&e.kind===`ServerErrorEvent`,S=e=>b(e)||x(e),C=e=>`kind`in e&&e.kind===`HookExecutionEvent`,w=e=>`kind`in e&&e.kind===`ACPToolCallEvent`,T=e=>`kind`in e&&e.kind===`StreamingDeltaEvent`;function E(e){return t(e)}var D=e=>e.thought.filter(e=>e.type===`text`).map(e=>e.text).join(`
2
- `),O=e=>e.reasoning_content?e.reasoning_content:e.thinking_blocks?.length?e.thinking_blocks.filter(e=>e.type===`thinking`).map(e=>e.thinking).join(`
3
-
4
- `):``,k=e=>D(e).trim().length>0,A=(e,t)=>{let n=e.replace(/^\s+/,``);if(!n.startsWith(`<think>`))return{reasoning:``,message:e};let r=n.slice(7),i=r.indexOf(`</think>`);return i===-1?t?.streaming?{reasoning:r.trim(),message:``}:{reasoning:``,message:e}:{reasoning:r.slice(0,i).trim(),message:r.slice(i+8).trim()}},j=(e,t)=>{if(o(e))return e.action.kind===`ThinkAction`?null:k(e)?e:null;if(n(e)){let n=t.find(t=>o(t)&&t.id===e.action_id);return!n||n.action.kind===`ThinkAction`?null:k(n)?n:null}return null},M=(e,t)=>({...t,content:`${t.content??``}${e.content??``}`||null,reasoning_content:`${t.reasoning_content??``}${e.reasoning_content??``}`||null}),N=(e,t)=>({...e,content:`${e.content??``}${t}`||null}),P=e=>{for(let t=e.length-1;t>=0;--t){let n=e[t];if(i(n)&&n.source===`user`)return t}return-1},F=e=>e.filter(e=>e.type===`text`).map(e=>e.text).join(``),I=e=>o(e)&&e.action.kind===`FinishAction`?e.action.message:i(e)&&e.source===`agent`?F(e.llm_message.content):null,L=(e,t)=>{let n=0,r=0;for(let i of t){let t=e.indexOf(i,n);if(t===-1)return{matched:!1,lastMatchEnd:r};r=t+i.length,n=r}return{matched:!0,lastMatchEnd:r}},R=e=>{let t=P(e);return e.map((e,t)=>({event:e,index:t})).filter(e=>e.index>t&&T(e.event)&&(e.event.content?.length??0)>0)},z=e=>{let t=[];for(let n=e.length-1;n>=0;--n){let r=e[n];if(!T(r))break;(r.content?.length??0)>0&&t.unshift({event:r,index:n})}return t},B=(e,t)=>{let n=t.join(``);for(let t of[n,n.trimEnd()])if(t&&e.startsWith(t))return{matched:!0,lastMatchEnd:t.length};let r=t.length-1;return L(e,t.map((e,t)=>t===r?e.trimEnd():e))},V=(e,t)=>{let n=R(t);if(n.length===0)return null;let r=I(e);if(!r)return null;let{matched:i,lastMatchEnd:a}=B(r,n.map(({event:e})=>e.content??``));if(!i)return null;let o=[...t],s=r.slice(a),c=n.at(-1)?.index,l=c===void 0?void 0:o[c];return s&&c!==void 0&&l&&T(l)&&(o[c]=N(l,s)),o},H=(e,t)=>{let n=F(e.thought);if(!n)return null;let r=z(t);if(r.length===0||!B(n,r.map(({event:e})=>e.content??``)).matched)return null;let i=O(e).trim().length>0,a=new Set(r.map(({index:e})=>e)),o=[];return t.forEach((e,t)=>{if(!a.has(t)||!T(e)){o.push(e);return}!i&&e.reasoning_content&&o.push({...e,content:null})}),o},U=(e,t)=>{let r=[...t];if(T(e)){if(e.content===null&&e.reasoning_content===null)return r;let t=r.length-1,n=r[t];return n&&T(n)?(r[t]=M(e,n),r):(r.push(e),r)}if(o(e)&&e.action.kind===`FinishAction`||i(e)&&e.source===`agent`){let t=V(e,r);if(t)return t}if(o(e)&&e.action.kind!==`FinishAction`&&e.action.kind!==`ThinkAction`){let t=H(e,r);if(t)return t.push(e),t}if(w(e)){let t=r.findIndex(t=>w(t)&&t.tool_call_id===e.tool_call_id);return t===-1?r.push(e):r[t]=e,r}if(n(e)){if(e.observation.kind===`ThinkObservation`||e.observation.kind===`FinishObservation`)return r;let t=r.findIndex(t=>t.id===e.action_id);t===-1?r.push(e):r[t]=e}else r.push(e);return r},W=e=>`id`in e?e.id:void 0,G=e=>`timestamp`in e?e.timestamp:void 0,K=(e,t)=>{let n=G(e),r=G(t);return!n&&!r?0:n?r?n.localeCompare(r):-1:1},q=(e,t)=>{if(e.length===0)return!1;let n=e[e.length-1],r=G(n),i=G(t);return!r||!i?!1:i<r},J=(e,t)=>{let n=W(t);if(n!==void 0&&e.eventIds.has(n))return e;let r=n===void 0?e.eventIds:new Set(e.eventIds).add(n),i=e.events.length-1,a=e.events[i],o=a&&T(t)&&T(a),s=[...e.events];return o?s[i]=M(t,a):s.push(t),{...e,events:s,eventIds:r,uiEvents:U(t,e.uiEvents)}},Y=e=>({...e,events:[...e.events].sort(K),uiEvents:[...e.uiEvents].sort(K)}),X=(e,t)=>{let n=J(e,t);return n===e?e:!q(e.events,t)&&!q(e.uiEvents,t)?n:Y(n)},Z=e()(e=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:null,addEvent:t=>e(e=>X(e,t)),addEvents:t=>e(e=>{if(t.length===0)return e;let n=new Set(e.eventIds),r=[...e.events],i=[...e.uiEvents],a=!1;for(let e of t){let t=W(e);if(!(t!==void 0&&n.has(t))){a=!0,t!==void 0&&n.add(t);let o=r.length-1,s=r[o];s&&T(e)&&T(s)?r[o]=M(e,s):r.push(e),i=U(e,i)}}return a?Y({...e,events:r,eventIds:n,uiEvents:i}):e}),clearEvents:()=>e(()=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:null})),clearEventsForConversation:t=>e(()=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:t}))}));export{n as C,d as D,T as E,m as O,i as S,v as T,s as _,j as a,y as b,o as c,_ as d,f,S as g,h,O as i,a as k,r as l,p as m,U as n,A as o,u as p,D as r,w as s,Z as t,E as u,c as v,l as w,C as x,g as y};
@@ -1 +0,0 @@
1
- import{t as e}from"./useQuery-D5pEZbY0.js";import{n as t,o as n,s as r}from"./active-backend-context-DHhm10VS.js";import{t as i}from"./profiles-service.api-DWetW2TL.js";function a(a={}){let{backend:o,orgId:s}=t();return e({queryKey:[...r.all,o.id,s],queryFn:i.listProfiles,...n,enabled:a.enabled??!0,meta:{disableToast:!0}})}export{a as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./useQuery-D5pEZbY0.js";import{_ as t,d as n}from"./agent-server-compatibility-C0MtTTwb.js";import{l as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";var i=class{static async getPluginsMarketplace(){if(t().backend.kind===`cloud`)return[];try{return(await new r(n()).getPluginsMarketplace()).plugins??[]}catch{return[]}}static async getLocalPlugins(){if(t().backend.kind===`cloud`)return[];try{return(await new r(n()).getPlugins({load_user:!0,load_project:!1})).plugins??[]}catch{return[]}}},a=()=>e({queryKey:[`plugins-marketplace`],queryFn:()=>i.getPluginsMarketplace(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{i as n,a as t};
@@ -1 +0,0 @@
1
- import{T as e,b as t,w as n}from"./utils-DB9LsAzA.js";import{t as r}from"./use-active-conversation-BbeVgedA.js";import{t as i}from"./use-agent-state-5qM3X30V.js";var a=({allowAgentError:a=!1}={})=>{let{data:o}=r(),{curAgentState:s}=i(),c=a?e:n;return t(o?.execution_status)&&!c.includes(s)};export{a as t};
@@ -1 +0,0 @@
1
- import{c as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t}from"./useQuery-D5pEZbY0.js";import{f as n,n as r}from"./active-backend-context-DHhm10VS.js";import{S as i}from"./agent-server-compatibility-C0MtTTwb.js";import{t as a}from"./settings-mQUckT0g.js";import{i as o,t as s}from"./settings-service.api-DPTFyRXL.js";var c=(...e)=>e.find(e=>typeof e==`boolean`),l=(...e)=>e.find(e=>typeof e==`number`),u=(...e)=>{for(let t of e){if(typeof t==`string`)return t;if(t===null)return null}},d=t=>{if(typeof t==`object`&&t&&`status`in t){let{status:e}=t;if(typeof e==`number`)return e}if(e.isAxiosError(t))return t.response?.status},f=(e,t)=>{let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r},p=(e,t,n,r=!1)=>{let i=f(e,t);return typeof i==`string`&&(i.length>0||r)?i:n},m=e=>{let t=e.agent_settings??{},n={...a.conversation_settings??{},...e.conversation_settings??{}},r=t.mcp_config===void 0?e.mcp_config??a.mcp_config:o(t.mcp_config);return{...a,...e,llm_model:p(t,`llm.model`,a.llm_model),llm_base_url:p(t,`llm.base_url`,a.llm_base_url,!0),agent:p(t,`agent`,a.agent),llm_api_key:e.llm_api_key??null,llm_api_key_set:e.llm_api_key_set??!1,confirmation_mode:c(n.confirmation_mode)??a.confirmation_mode,security_analyzer:u(n.security_analyzer)??a.security_analyzer,max_iterations:l(n.max_iterations)??a.max_iterations,enable_default_condenser:c(f(t,`condenser.enabled`))??a.enable_default_condenser,condenser_max_size:l(f(t,`condenser.max_size`))??a.condenser_max_size,mcp_config:r,search_api_key:e.search_api_key||``,email:e.email||``,git_user_name:e.git_user_name||a.git_user_name,git_user_email:e.git_user_email||a.git_user_email,is_new_user:!1,disabled_skills:e.disabled_skills??a.disabled_skills,agent_settings_schema:e.agent_settings_schema??null,agent_settings:e.agent_settings??a.agent_settings,conversation_settings_schema:e.conversation_settings_schema??a.conversation_settings_schema,conversation_settings:n}},h=async(e=`personal`)=>{if(e!==`personal`)throw Error(`Unsupported settings scope: ${e}`);return m(await s.getSettings())},g=(e=`personal`)=>{let o=r(),s=!i(o.backend),c=t({queryKey:[...n.byScope(e),o.backend.id,o.orgId],queryFn:()=>h(e),retry:(e,t)=>d(t)!==404,enabled:s,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,meta:{disableToast:!0}});return s?d(c.error)===404?{data:a,error:c.error,isError:c.isError,isLoading:c.isLoading,isFetching:c.isFetching,isFetched:c.isFetched,isSuccess:c.isSuccess,status:c.status,fetchStatus:c.fetchStatus,refetch:c.refetch}:c:{data:a,error:null,isError:!1,isLoading:!1,isFetching:!1,isFetched:!1,isSuccess:!0,status:`success`,fetchStatus:`idle`,refetch:c.refetch}};export{h as n,g as r,d as t};