@openhands/agent-canvas 1.7.2 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (599) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{Trans-DP5rcauH.js → Trans-Bwpzk1wT.js} +1 -1
  4. package/build/assets/{acp-providers-BHKZvEm5.js → acp-providers-C921BlYB.js} +1 -1
  5. package/build/assets/active-backend-context-BiwzkzDy.js +2 -0
  6. package/build/assets/agent-context-settings-DXNT_dcw.js +1 -0
  7. package/build/assets/agent-profiles-settings-BymJf3EP.js +1 -0
  8. package/build/assets/agent-server-conversation-service.api-CYSWw-2g.js +41 -0
  9. package/build/assets/agent-settings-BjgQQe-_.js +1 -0
  10. package/build/assets/{agent-settings-BIOsUglV.js → agent-settings-WzqXk6B4.js} +2 -2
  11. package/build/assets/{alert-banner-C1nzoXBC.js → alert-banner-DR8EVyZM.js} +1 -1
  12. package/build/assets/api-error-message-e16L1kwH.js +1 -0
  13. package/build/assets/api-key-entry-screen-DI0I04O3.js +1 -0
  14. package/build/assets/app-settings-DGistSFV.js +1 -0
  15. package/build/assets/automation-C_eCrGyP.js +1 -0
  16. package/build/assets/automation-detail-DY6x2FW1.js +2 -0
  17. package/build/assets/automation-export-C09f-Lua.js +2 -0
  18. package/build/assets/automation-setup-route-CqKp0717.js +1 -0
  19. package/build/assets/automations-list-CqWJ7qXW.js +1 -0
  20. package/build/assets/{back-nav-button-Be_L157B.js → back-nav-button-D4ngzpSh.js} +1 -1
  21. package/build/assets/backend-form-modal-B8D5hBzK.js +1 -0
  22. package/build/assets/{backend-synced-settings-badge-BNpEylNP.js → backend-synced-settings-badge-BnzI8Ysj.js} +1 -1
  23. package/build/assets/{badge-DwgrwohM.js → badge-1Mf1iPcX.js} +1 -1
  24. package/build/assets/{base-modal-CSHhJTSr.js → base-modal-BBuy0WQQ.js} +1 -1
  25. package/build/assets/{brand-button-CQO8oqVo.js → brand-button-DGN6Y9o6.js} +1 -1
  26. package/build/assets/browser-D_ekTlTS.js +6 -0
  27. package/build/assets/{browser-tab-CEApjoEV.js → browser-tab-D4a4Ou_w.js} +1 -1
  28. package/build/assets/{chat-send-button-D4614wUz.js → chat-send-button-CgbcjD97.js} +1 -1
  29. package/build/assets/check-CPLXgluF.js +1 -0
  30. package/build/assets/chevron-down-CP4QHvyc.js +1 -0
  31. package/build/assets/circle-check-Dpy2_xSI.js +1 -0
  32. package/build/assets/{circle-plus-check-toggle-E3Ecb_gg.js → circle-plus-check-toggle-yTAS-nX3.js} +1 -1
  33. package/build/assets/cloud-funnel-analytics-CEOl5Gxr.js +1 -0
  34. package/build/assets/{combobox-caret-C8_eGdp2.js → combobox-caret-Bd2yySnF.js} +1 -1
  35. package/build/assets/command-menu-Bj6X4ckE.js +1 -0
  36. package/build/assets/condenser-settings-EAXQNR2E.js +1 -0
  37. package/build/assets/{confirmation-modal-gZtbojCm.js → confirmation-modal-NCUPr2-O.js} +1 -1
  38. package/build/assets/{context-menu-list-item-BTHGFhIx.js → context-menu-list-item-CrCrYuPF.js} +1 -1
  39. package/build/assets/conversation-BzyIcSwr.js +1 -0
  40. package/build/assets/conversation-CUJ0Vo8g.js +90 -0
  41. package/build/assets/conversation-panel-BzyIcSwr.js +1 -0
  42. package/build/assets/conversation-state-store-F62HvuI1.js +1 -0
  43. package/build/assets/{conversation-tab-empty-state-BCMHkGQk.js → conversation-tab-empty-state-BCZ7rUMH.js} +1 -1
  44. package/build/assets/{copy-B8Y5ufoR.js → copy-DCmZtz6n.js} +1 -1
  45. package/build/assets/{copy-to-clipboard-button-C4l3CMSd.js → copy-to-clipboard-button-D_Lp6-Fl.js} +1 -1
  46. package/build/assets/{device-verify-C_M7Z8xs.js → device-verify-DLmolX8Q.js} +1 -1
  47. package/build/assets/{dropdown-classes-DQlj-MpS.js → dropdown-classes-BB8rzqXL.js} +1 -1
  48. package/build/assets/{entry.client-DETaouwO.js → entry.client-BbIYOsIg.js} +2 -2
  49. package/build/assets/{enum-filter-dropdown-paB-lFSP.js → enum-filter-dropdown-C08-srev.js} +1 -1
  50. package/build/assets/{environment-switch-overlay-D0FgCMqs.js → environment-switch-overlay-BepBBX66.js} +1 -1
  51. package/build/assets/extensions-hub-R3KNv-5V.js +1 -0
  52. package/build/assets/extensions-navigation-CfWFmI1I.js +1 -0
  53. package/build/assets/{external-link-Cnnd6ikC.js → external-link-BdBSg8rk.js} +1 -1
  54. package/build/assets/files-tab-DEq8MbHu.js +1 -0
  55. package/build/assets/{form-control-classes-CSPevi7c.js → form-control-classes-DAfsCJTe.js} +1 -1
  56. package/build/assets/{format-time-delta-DuhE50B-.js → format-time-delta-CxfPJpzC.js} +1 -1
  57. package/build/assets/git-provider-icon-BZqqUPlm.js +1 -0
  58. package/build/assets/git-repo-dropdown-9WKINV6J.js +1 -0
  59. package/build/assets/git-repo-dropdown-DEpOwUez.js +1 -0
  60. package/build/assets/{highlighted-source-view-suUKd5if.js → highlighted-source-view-CX9oIoVT.js} +1 -1
  61. package/build/assets/home-CY0JaxiY.js +1 -0
  62. package/build/assets/home-CaNWlVvB.js +1 -0
  63. package/build/assets/home-store-Ch1ErdBc.js +1 -0
  64. package/build/assets/index-home-CaNWlVvB.js +1 -0
  65. package/build/assets/info-CmWQXtRQ.js +1 -0
  66. package/build/assets/install-server-modal-BWrudmZU.js +1 -0
  67. package/build/assets/{launch-Ccnhte5b.js → launch-B1POpHuP.js} +1 -1
  68. package/build/assets/{list-todo-_BXQzOiB.js → list-todo-DtiL3lTp.js} +1 -1
  69. package/build/assets/llm-not-configured-banner-3tMsM4K6.js +27 -0
  70. package/build/assets/llm-settings-CXo8iPNW.js +1 -0
  71. package/build/assets/llm-settings-D0W8mJDk.js +1 -0
  72. package/build/assets/{llm-subscription-service-W5BprsNA.js → llm-subscription-service-DBJbfd8Z.js} +1 -1
  73. package/build/assets/loader-circle-B4QDBARx.js +1 -0
  74. package/build/assets/{loading-spinner-CcpnCr_d.js → loading-spinner-DfZ_bhV7.js} +1 -1
  75. package/build/assets/manage-backends-modal-CwyWsiag.js +1 -0
  76. package/build/assets/manifest-39f4789d.js +1 -0
  77. package/build/assets/{markdown-renderer-CvOO0YIr.js → markdown-renderer-DgiLLhW6.js} +6 -6
  78. package/build/assets/mcp-DXG9LWrI.js +9 -0
  79. package/build/assets/mcp-marketplace-utils-DFmhKc5s.js +1 -0
  80. package/build/assets/messages-kBjKaAeA.js +40 -0
  81. package/build/assets/{modal-body-DQhiw-AR.js → modal-body-CMsDpalT.js} +1 -1
  82. package/build/assets/{modal-classes-YaEEa5eZ.js → modal-classes-B6PDrxXo.js} +1 -1
  83. package/build/assets/{modal-close-button-turIYn0t.js → modal-close-button-DyxBZaAb.js} +1 -1
  84. package/build/assets/{onboarding-BegDrOKn.js → onboarding-47hh2IHA.js} +1 -1
  85. package/build/assets/onboarding-modal-9BuvvROo.js +1 -0
  86. package/build/assets/organization-service.api-UDy63-oC.js +1 -0
  87. package/build/assets/{pencil-8_lvWDoZ.js → pencil-BjgtZmWp.js} +1 -1
  88. package/build/assets/{planner-tab-w6HT0N_A.js → planner-tab-BWk8885v.js} +1 -1
  89. package/build/assets/plugins-management-service-CjkgF2dd.js +1 -0
  90. package/build/assets/plus-DrKuuvMe.js +1 -0
  91. package/build/assets/profiles-service.api-CukSFLzz.js +1 -0
  92. package/build/assets/providers-CqUWC85T.js +1 -0
  93. package/build/assets/proxy-BBUG3sd2.js +1 -0
  94. package/build/assets/{puzzle-DXWdfaa7.js → puzzle-BoNc6zZ8.js} +1 -1
  95. package/build/assets/recommended-automations-launcher-ejxy1P27.js +1 -0
  96. package/build/assets/{refresh-cw-D7CYLy-d.js → refresh-cw-BrM5ZAZD.js} +1 -1
  97. package/build/assets/root-5S-M8SYa.js +2 -0
  98. package/build/assets/root-DZ39lS5f.css +1 -0
  99. package/build/assets/root-layout-BPqoa0gv.js +3 -0
  100. package/build/assets/schema-field-nImDoY6-.js +1 -0
  101. package/build/assets/{sdk-section-page-BW-i45yr.js → sdk-section-page-BxMrtUNV.js} +1 -1
  102. package/build/assets/search-Dc2qR4O2.js +1 -0
  103. package/build/assets/secrets-service-Dhjh3HhH.js +1 -0
  104. package/build/assets/{secrets-settings-D7U1ErCH.js → secrets-settings-CPdxceT_.js} +1 -1
  105. package/build/assets/segmented-toggle-Do6oyepX.js +1 -0
  106. package/build/assets/settings-BRbnfKEm.js +1 -0
  107. package/build/assets/{settings-dropdown-input-Dx6vlkgf.js → settings-dropdown-input-DYCULKpp.js} +1 -1
  108. package/build/assets/{settings-index-COAdxm2Q.js → settings-index-C9o2NBO0.js} +1 -1
  109. package/build/assets/settings-input-B-q2gkVy.js +1 -0
  110. package/build/assets/{settings-list-classes-gQdBahdt.js → settings-list-classes-WpQi0q1L.js} +1 -1
  111. package/build/assets/{settings-modal-CFnbQ8_4.js → settings-modal-CEK0AIx6.js} +1 -1
  112. package/build/assets/settings-service.api-CZiPD8__.js +1 -0
  113. package/build/assets/{settings-switch-UNSf8K8I.js → settings-switch-LqKdGxHL.js} +1 -1
  114. package/build/assets/shared-conversation-Bu-dQlgp.js +1 -0
  115. package/build/assets/{sidebar-layout-DXHtbEj1.js → sidebar-layout-oHBGQmLh.js} +1 -1
  116. package/build/assets/{sidebar-mobile-menu-toggle-U78hQRJ1.js → sidebar-mobile-menu-toggle-ND-hgygu.js} +1 -1
  117. package/build/assets/{sidebar-nav-link-pvUivfK2.js → sidebar-nav-link-CrujNA09.js} +1 -1
  118. package/build/assets/{sidebar-store-DwrYKwYr.js → sidebar-store-Bui-WNEr.js} +1 -1
  119. package/build/assets/{skill-card-pill-row-D7XCz5uk.js → skill-card-pill-row-CZBI7OqH.js} +1 -1
  120. package/build/assets/{skill-icon-badge-HqBWZ2Eq.js → skill-icon-badge-BOov_phZ.js} +1 -1
  121. package/build/assets/{skills-plugins-BPhaNpfx.js → skills-plugins-D0PiHWAD.js} +1 -1
  122. package/build/assets/{skills-settings-CcwMtnnJ.js → skills-settings-B43KArIz.js} +2 -2
  123. package/build/assets/{styled-tooltip-DsjDnR_W.js → styled-tooltip-C7grwnOX.js} +1 -1
  124. package/build/assets/{task-list-tab-BmaTwjaS.js → task-list-tab-R3ac6m7O.js} +1 -1
  125. package/build/assets/{terminal-BRcoba5B.js → terminal-yqkNdEAx.js} +1 -1
  126. package/build/assets/{toggle-switch-BptY3XRG.js → toggle-switch-BeSrbgCg.js} +1 -1
  127. package/build/assets/{trash-2-Bq4lHbTB.js → trash-2-wW5TWcdN.js} +1 -1
  128. package/build/assets/{typography-C6fuRTTT.js → typography-iYhzLlHO.js} +1 -1
  129. package/build/assets/{use-acp-credential-form-B0_pZ_uS.js → use-acp-credential-form-DUxbxmbq.js} +1 -1
  130. package/build/assets/use-activate-agent-profile-CDHA52tC.js +1 -0
  131. package/build/assets/use-agent-profiles-TsOdIyw5.js +1 -0
  132. package/build/assets/{use-can-manage-org-profiles-CrG1km7R.js → use-can-manage-org-profiles-Bt1M71u5.js} +1 -1
  133. package/build/assets/use-cloud-current-user-id-DWt7HCgf.js +1 -0
  134. package/build/assets/{use-config-Csy8EAP9.js → use-config-CxlEdf_v.js} +1 -1
  135. package/build/assets/{use-create-conversation-Dsa4nzU9.js → use-create-conversation-nOJ6Um5h.js} +1 -1
  136. package/build/assets/{use-create-secret-BnxuAjDt.js → use-create-secret-Dj5ang9x.js} +1 -1
  137. package/build/assets/use-is-authed-BT7Iud4U.js +1 -0
  138. package/build/assets/{use-is-creating-conversation-CIAcnd8M.js → use-is-creating-conversation-CAggrM75.js} +1 -1
  139. package/build/assets/use-llm-profiles-2Wc2db8u.js +1 -0
  140. package/build/assets/use-onboarding-completion-gxQlcEy2.js +1 -0
  141. package/build/assets/use-plugins-marketplace-CVO7sXYR.js +1 -0
  142. package/build/assets/use-save-agent-profile-D0wC5ExW.js +1 -0
  143. package/build/assets/{use-save-settings-BRh9p_fv.js → use-save-settings-L3aMaDeS.js} +1 -1
  144. package/build/assets/use-settings-8nt3DGxW.js +1 -0
  145. package/build/assets/use-settings-nav-items-DHAAD-zk.js +16 -0
  146. package/build/assets/use-skills-CE6miQ3r.js +1 -0
  147. package/build/assets/use-tracking-BGboadaZ.js +68 -0
  148. package/build/assets/{use-user-conversation-GnGhs_Ob.js → use-user-conversation-BIIpGUgM.js} +1 -1
  149. package/build/assets/useInfiniteQuery-BLRVmVPU.js +1 -0
  150. package/build/assets/{useMutation-DyQXZFEF.js → useMutation-CaSHLnX0.js} +1 -1
  151. package/build/assets/{useQueries-B3T1a7qt.js → useQueries--d_WWAzc.js} +1 -1
  152. package/build/assets/{useQuery-B38jBavx.js → useQuery-DiPh8LRJ.js} +1 -1
  153. package/build/assets/utils-BgGG1znF.js +1 -0
  154. package/build/assets/{vendor~browser-CIoZCqGs.js → vendor~browser-IVYgIgG1.js} +1 -1
  155. package/build/assets/{vendor~entry.client-Di4qO77Y.js → vendor~entry.client-BcYIVQvB.js} +1 -1
  156. package/build/assets/{vendor~entry.client-BfviqoVc.js → vendor~entry.client-CXM9oiAk.js} +1 -1
  157. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js} +2 -2
  158. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~d4by102p-C2f0ZhS-.js} +1 -1
  159. package/build/assets/{vendor~files-tab-vm3f67Pz.js → vendor~files-tab-C7RmQJwN.js} +1 -1
  160. package/build/assets/{vendor~index-home~home~conversation-panel~conversation-kX4LrGQC.js → vendor~index-home~home~conversation-panel~conversation-Bqp1ZqJM.js} +1 -1
  161. package/build/assets/{vendor~root-layout~conversation-panel~conversation-DpA6fir3.js → vendor~root-layout~conversation-panel~conversation-BCn8lzeG.js} +1 -1
  162. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-B_L-gcOG.js +1 -0
  163. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-sjx0x5ac.js +1 -0
  164. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~automation-setup-route~onboarding-modal-D7IDevqN.js +1 -0
  165. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-Bw4AuHN1.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~dfc8ddxy-tTyxnjXT.js} +1 -1
  166. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gy8zbn65-CGt6bWRT.js} +1 -1
  167. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~eywn6ulz-BKxxr74w.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~dufan6ng-Dtdw8H0q.js} +17 -4
  168. package/build/assets/{verification-settings-CaCzojbc.js → verification-settings-DBsnSXC3.js} +1 -1
  169. package/build/assets/x-omAzpXkl.js +1 -0
  170. package/build/favicon-16x16.png +0 -0
  171. package/build/favicon-32x32.png +0 -0
  172. package/build/favicon.ico +0 -0
  173. package/build/index.html +4 -4
  174. package/build/locales/ar/openhands.json +39 -2
  175. package/build/locales/ca/openhands.json +39 -2
  176. package/build/locales/de/openhands.json +39 -2
  177. package/build/locales/en/openhands.json +40 -3
  178. package/build/locales/es/openhands.json +39 -2
  179. package/build/locales/fr/openhands.json +39 -2
  180. package/build/locales/it/openhands.json +39 -2
  181. package/build/locales/ja/openhands.json +39 -2
  182. package/build/locales/ko-KR/openhands.json +39 -2
  183. package/build/locales/no/openhands.json +39 -2
  184. package/build/locales/pt/openhands.json +39 -2
  185. package/build/locales/tr/openhands.json +39 -2
  186. package/build/locales/uk/openhands.json +39 -2
  187. package/build/locales/zh-CN/openhands.json +39 -2
  188. package/build/locales/zh-TW/openhands.json +39 -2
  189. package/config/defaults.json +4 -4
  190. package/dist/api/agent-server-adapter.cjs +3 -3
  191. package/dist/api/agent-server-adapter.cjs.map +1 -1
  192. package/dist/api/agent-server-adapter.d.ts +46 -6
  193. package/dist/api/agent-server-adapter.js +187 -168
  194. package/dist/api/agent-server-adapter.js.map +1 -1
  195. package/dist/api/agent-server-compatibility.cjs +1 -1
  196. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  197. package/dist/api/agent-server-compatibility.d.ts +4 -0
  198. package/dist/api/agent-server-compatibility.js +41 -38
  199. package/dist/api/agent-server-compatibility.js.map +1 -1
  200. package/dist/api/automation-service/automation-service.api.cjs +1 -1
  201. package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
  202. package/dist/api/automation-service/automation-service.api.d.ts +20 -0
  203. package/dist/api/automation-service/automation-service.api.js +136 -99
  204. package/dist/api/automation-service/automation-service.api.js.map +1 -1
  205. package/dist/api/backend-registry/storage.cjs +1 -1
  206. package/dist/api/backend-registry/storage.cjs.map +1 -1
  207. package/dist/api/backend-registry/storage.js +1 -1
  208. package/dist/api/backend-registry/storage.js.map +1 -1
  209. package/dist/api/backend-registry/types.d.ts +2 -0
  210. package/dist/api/cloud/conversation-service.api.cjs +1 -1
  211. package/dist/api/cloud/conversation-service.api.js +22 -22
  212. package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
  213. package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
  214. package/dist/api/mcp-service/mcp-service.api.js +19 -19
  215. package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
  216. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  217. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  218. package/dist/api/settings-service/settings-service.api.js +26 -12
  219. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  220. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs +2 -0
  221. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs.map +1 -0
  222. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.d.ts +12 -0
  223. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js +94 -0
  224. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js.map +1 -0
  225. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
  226. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
  227. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +31 -90
  228. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
  229. package/dist/components/features/automations/recommended-automations-launcher.d.ts +0 -7
  230. package/dist/components/features/automations/recommended-automations-section.d.ts +0 -6
  231. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  232. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  233. package/dist/components/features/backends/backend-form-modal.js +568 -358
  234. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  235. package/dist/components/features/backends/device-flow-auth.cjs +1 -1
  236. package/dist/components/features/backends/device-flow-auth.cjs.map +1 -1
  237. package/dist/components/features/backends/device-flow-auth.d.ts +9 -1
  238. package/dist/components/features/backends/device-flow-auth.js +56 -55
  239. package/dist/components/features/backends/device-flow-auth.js.map +1 -1
  240. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  241. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  242. package/dist/components/features/backends/manage-backends-modal.js +1 -1
  243. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  244. package/dist/components/features/chat/chat-interface.cjs +1 -1
  245. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  246. package/dist/components/features/chat/chat-interface.js +105 -105
  247. package/dist/components/features/chat/chat-interface.js.map +1 -1
  248. package/dist/components/features/chat/chat-message.cjs +1 -1
  249. package/dist/components/features/chat/chat-message.cjs.map +1 -1
  250. package/dist/components/features/chat/chat-message.d.ts +2 -1
  251. package/dist/components/features/chat/chat-message.js +59 -49
  252. package/dist/components/features/chat/chat-message.js.map +1 -1
  253. package/dist/components/features/chat/pending-user-messages.cjs +1 -1
  254. package/dist/components/features/chat/pending-user-messages.cjs.map +1 -1
  255. package/dist/components/features/chat/pending-user-messages.js +4 -1
  256. package/dist/components/features/chat/pending-user-messages.js.map +1 -1
  257. package/dist/components/features/chat/typing-indicator.cjs +1 -1
  258. package/dist/components/features/chat/typing-indicator.cjs.map +1 -1
  259. package/dist/components/features/chat/typing-indicator.d.ts +8 -1
  260. package/dist/components/features/chat/typing-indicator.js +94 -10
  261. package/dist/components/features/chat/typing-indicator.js.map +1 -1
  262. package/dist/components/features/command-menu/command-menu-items.d.ts +5 -1
  263. package/dist/components/features/files-tab/segmented-toggle.cjs +1 -1
  264. package/dist/components/features/files-tab/segmented-toggle.cjs.map +1 -1
  265. package/dist/components/features/files-tab/segmented-toggle.d.ts +2 -0
  266. package/dist/components/features/files-tab/segmented-toggle.js +17 -14
  267. package/dist/components/features/files-tab/segmented-toggle.js.map +1 -1
  268. package/dist/components/features/manifest/manifest-form-field.d.ts +27 -0
  269. package/dist/components/features/manifest/manifest-prerequisites-step.d.ts +11 -0
  270. package/dist/components/features/manifest/manifest-review-step.d.ts +14 -0
  271. package/dist/components/features/manifest/manifest-setup-dialog.d.ts +14 -0
  272. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  273. package/dist/components/features/mcp-page/custom-server-editor.js +16 -16
  274. package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
  275. package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
  276. package/dist/components/features/mcp-page/installed-server-card.d.ts +2 -2
  277. package/dist/components/features/mcp-page/installed-server-card.js +6 -7
  278. package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
  279. package/dist/components/features/mcp-page/installed-servers-section.cjs +1 -1
  280. package/dist/components/features/mcp-page/installed-servers-section.cjs.map +1 -1
  281. package/dist/components/features/mcp-page/installed-servers-section.d.ts +2 -2
  282. package/dist/components/features/mcp-page/installed-servers-section.js +2 -2
  283. package/dist/components/features/mcp-page/installed-servers-section.js.map +1 -1
  284. package/dist/components/features/mcp-page/mcp-server-health.cjs +1 -1
  285. package/dist/components/features/mcp-page/mcp-server-health.js +4 -4
  286. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +1 -1
  287. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
  288. package/dist/components/features/settings/mcp-settings/mcp-server-form.js +2 -1
  289. package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
  290. package/dist/components/features/settings/settings-input.cjs +1 -1
  291. package/dist/components/features/settings/settings-input.cjs.map +1 -1
  292. package/dist/components/features/settings/settings-input.d.ts +6 -0
  293. package/dist/components/features/settings/settings-input.js +13 -8
  294. package/dist/components/features/settings/settings-input.js.map +1 -1
  295. package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
  296. package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
  297. package/dist/components/features/sidebar/sidebar-rail-body.js +124 -123
  298. package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
  299. package/dist/config/defaults.cjs +1 -1
  300. package/dist/config/defaults.cjs.map +1 -1
  301. package/dist/config/defaults.js +3 -3
  302. package/dist/config/defaults.js.map +1 -1
  303. package/dist/contexts/active-backend-context.cjs +1 -1
  304. package/dist/contexts/active-backend-context.cjs.map +1 -1
  305. package/dist/contexts/active-backend-context.d.ts +3 -2
  306. package/dist/contexts/active-backend-context.js +55 -42
  307. package/dist/contexts/active-backend-context.js.map +1 -1
  308. package/dist/favicon-16x16.png +0 -0
  309. package/dist/favicon-32x32.png +0 -0
  310. package/dist/favicon.ico +0 -0
  311. package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
  312. package/dist/hooks/mutation/use-update-mcp-server.js +5 -5
  313. package/dist/hooks/query/query-keys.cjs.map +1 -1
  314. package/dist/hooks/query/query-keys.d.ts +4 -0
  315. package/dist/hooks/query/query-keys.js.map +1 -1
  316. package/dist/hooks/query/use-cloud-current-user-id.cjs +1 -1
  317. package/dist/hooks/query/use-cloud-current-user-id.cjs.map +1 -1
  318. package/dist/hooks/query/use-cloud-current-user-id.js +7 -5
  319. package/dist/hooks/query/use-cloud-current-user-id.js.map +1 -1
  320. package/dist/hooks/query/use-cloud-organizations.cjs +1 -1
  321. package/dist/hooks/query/use-cloud-organizations.cjs.map +1 -1
  322. package/dist/hooks/query/use-cloud-organizations.js +5 -1
  323. package/dist/hooks/query/use-cloud-organizations.js.map +1 -1
  324. package/dist/hooks/query/use-manifest-capabilities.d.ts +21 -0
  325. package/dist/hooks/query/use-manifest-prerequisites.d.ts +24 -0
  326. package/dist/hooks/use-can-manage-org-profiles.cjs +1 -1
  327. package/dist/hooks/use-can-manage-org-profiles.cjs.map +1 -1
  328. package/dist/hooks/use-can-manage-org-profiles.js +2 -1
  329. package/dist/hooks/use-can-manage-org-profiles.js.map +1 -1
  330. package/dist/hooks/use-llm-configured.cjs +1 -1
  331. package/dist/hooks/use-llm-configured.cjs.map +1 -1
  332. package/dist/hooks/use-llm-configured.js +2 -1
  333. package/dist/hooks/use-llm-configured.js.map +1 -1
  334. package/dist/hooks/use-manifest-preflight.d.ts +18 -0
  335. package/dist/hooks/use-tracking.cjs +1 -1
  336. package/dist/hooks/use-tracking.cjs.map +1 -1
  337. package/dist/hooks/use-tracking.d.ts +14 -0
  338. package/dist/hooks/use-tracking.js +28 -10
  339. package/dist/hooks/use-tracking.js.map +1 -1
  340. package/dist/i18n/declaration.cjs +1 -1
  341. package/dist/i18n/declaration.cjs.map +1 -1
  342. package/dist/i18n/declaration.d.ts +38 -1
  343. package/dist/i18n/declaration.js +1 -1
  344. package/dist/i18n/declaration.js.map +1 -1
  345. package/dist/i18n/translation.cjs +2 -2
  346. package/dist/i18n/translation.cjs.map +1 -1
  347. package/dist/i18n/translation.js +645 -16
  348. package/dist/i18n/translation.js.map +1 -1
  349. package/dist/icons/external-link.cjs +2 -0
  350. package/dist/icons/external-link.cjs.map +1 -0
  351. package/dist/icons/external-link.js +22 -0
  352. package/dist/icons/external-link.js.map +1 -0
  353. package/dist/icons/server.cjs +2 -0
  354. package/dist/icons/server.cjs.map +1 -0
  355. package/dist/icons/server.js +17 -0
  356. package/dist/icons/server.js.map +1 -0
  357. package/dist/locales/ar/openhands.json +39 -2
  358. package/dist/locales/ca/openhands.json +39 -2
  359. package/dist/locales/de/openhands.json +39 -2
  360. package/dist/locales/en/openhands.json +40 -3
  361. package/dist/locales/es/openhands.json +39 -2
  362. package/dist/locales/fr/openhands.json +39 -2
  363. package/dist/locales/it/openhands.json +39 -2
  364. package/dist/locales/ja/openhands.json +39 -2
  365. package/dist/locales/ko-KR/openhands.json +39 -2
  366. package/dist/locales/no/openhands.json +39 -2
  367. package/dist/locales/pt/openhands.json +39 -2
  368. package/dist/locales/tr/openhands.json +39 -2
  369. package/dist/locales/uk/openhands.json +39 -2
  370. package/dist/locales/zh-CN/openhands.json +39 -2
  371. package/dist/locales/zh-TW/openhands.json +39 -2
  372. package/dist/manifests/automation-interface.cjs +2 -0
  373. package/dist/manifests/automation-interface.cjs.map +1 -0
  374. package/dist/manifests/automation-interface.d.ts +44 -0
  375. package/dist/manifests/automation-interface.js +81 -0
  376. package/dist/manifests/automation-interface.js.map +1 -0
  377. package/dist/manifests/automation-setup.cjs +2 -0
  378. package/dist/manifests/automation-setup.cjs.map +1 -0
  379. package/dist/manifests/automation-setup.d.ts +52 -0
  380. package/dist/manifests/automation-setup.js +8 -0
  381. package/dist/manifests/automation-setup.js.map +1 -0
  382. package/dist/manifests/interface-validation.cjs +2 -0
  383. package/dist/manifests/interface-validation.cjs.map +1 -0
  384. package/dist/manifests/interface-validation.d.ts +27 -0
  385. package/dist/manifests/interface-validation.js +182 -0
  386. package/dist/manifests/interface-validation.js.map +1 -0
  387. package/dist/manifests/manifest-actions.d.ts +15 -0
  388. package/dist/manifests/manifest-capabilities.d.ts +25 -0
  389. package/dist/manifests/manifest-error-map.d.ts +40 -0
  390. package/dist/manifests/manifest-local-validation.d.ts +56 -0
  391. package/dist/manifests/manifest-registry.cjs +2 -0
  392. package/dist/manifests/manifest-registry.cjs.map +1 -0
  393. package/dist/manifests/manifest-registry.d.ts +15 -0
  394. package/dist/manifests/manifest-registry.js +26 -0
  395. package/dist/manifests/manifest-registry.js.map +1 -0
  396. package/dist/manifests/manifest-sources.cjs +2 -0
  397. package/dist/manifests/manifest-sources.cjs.map +1 -0
  398. package/dist/manifests/manifest-sources.d.ts +15 -0
  399. package/dist/manifests/manifest-sources.js +8 -0
  400. package/dist/manifests/manifest-sources.js.map +1 -0
  401. package/dist/manifests/manifest-template.d.ts +18 -0
  402. package/dist/manifests/manifest-validation.cjs +2 -0
  403. package/dist/manifests/manifest-validation.cjs.map +1 -0
  404. package/dist/manifests/manifest-validation.d.ts +30 -0
  405. package/dist/manifests/manifest-validation.js +145 -0
  406. package/dist/manifests/manifest-validation.js.map +1 -0
  407. package/dist/manifests/types.cjs +2 -0
  408. package/dist/manifests/types.cjs.map +1 -0
  409. package/dist/manifests/types.d.ts +227 -0
  410. package/dist/manifests/types.js +6 -0
  411. package/dist/manifests/types.js.map +1 -0
  412. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +9 -0
  413. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -0
  414. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +75 -0
  415. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -0
  416. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs +9 -0
  417. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs.map +1 -0
  418. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js +78 -0
  419. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js.map +1 -0
  420. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.cjs +17 -0
  421. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.cjs.map +1 -0
  422. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.js +89 -0
  423. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.js.map +1 -0
  424. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs +10 -0
  425. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs.map +1 -0
  426. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js +17 -0
  427. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js.map +1 -0
  428. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.cjs +9 -0
  429. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.cjs.map +1 -0
  430. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.js +15 -0
  431. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.js.map +1 -0
  432. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.cjs +9 -0
  433. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.cjs.map +1 -0
  434. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.js +18 -0
  435. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.js.map +1 -0
  436. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.cjs +9 -0
  437. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.cjs.map +1 -0
  438. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.js +14 -0
  439. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.js.map +1 -0
  440. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.cjs +9 -0
  441. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.cjs.map +1 -0
  442. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.js +14 -0
  443. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.js.map +1 -0
  444. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +2 -0
  445. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -0
  446. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +23 -0
  447. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -0
  448. package/dist/node_modules/@openhands/extensions/automations/index.cjs +2 -0
  449. package/dist/node_modules/@openhands/extensions/automations/index.cjs.map +1 -0
  450. package/dist/node_modules/@openhands/extensions/automations/index.js +18 -0
  451. package/dist/node_modules/@openhands/extensions/automations/index.js.map +1 -0
  452. package/dist/node_modules/@openhands/extensions/automations/interface.cjs +2 -0
  453. package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -0
  454. package/dist/node_modules/@openhands/extensions/automations/interface.js +89 -0
  455. package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -0
  456. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs +1 -1
  457. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs.map +1 -1
  458. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js +3 -3
  459. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js.map +1 -1
  460. package/dist/node_modules/@openhands/extensions/skills/index.cjs +17 -4
  461. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  462. package/dist/node_modules/@openhands/extensions/skills/index.js +5 -5
  463. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  464. package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.cjs +1 -1
  465. package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.cjs.map +1 -1
  466. package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.js +9 -0
  467. package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.js.map +1 -1
  468. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.cjs +2 -0
  469. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.cjs.map +1 -0
  470. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js +29 -0
  471. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js.map +1 -0
  472. package/dist/package.cjs +1 -1
  473. package/dist/package.cjs.map +1 -1
  474. package/dist/package.js +3 -3
  475. package/dist/package.js.map +1 -1
  476. package/dist/routes/app-settings.cjs +1 -1
  477. package/dist/routes/app-settings.js +5 -5
  478. package/dist/routes/mcp.cjs +1 -1
  479. package/dist/routes/mcp.cjs.map +1 -1
  480. package/dist/routes/mcp.js +73 -82
  481. package/dist/routes/mcp.js.map +1 -1
  482. package/dist/services/telemetry.cjs +1 -1
  483. package/dist/services/telemetry.cjs.map +1 -1
  484. package/dist/services/telemetry.d.ts +8 -0
  485. package/dist/services/telemetry.js +163 -116
  486. package/dist/services/telemetry.js.map +1 -1
  487. package/dist/types/agent-server/core/events/conversation-state-event.d.ts +2 -19
  488. package/dist/types/agent-server/core/events/observation-event.d.ts +2 -18
  489. package/dist/types/automation.d.ts +7 -3
  490. package/dist/types/mcp-server.d.ts +5 -0
  491. package/dist/types/settings.d.ts +3 -0
  492. package/dist/utils/api-error-message.d.ts +6 -2
  493. package/dist/utils/automation-catalog.cjs +2 -0
  494. package/dist/utils/automation-catalog.cjs.map +1 -0
  495. package/dist/utils/automation-catalog.d.ts +28 -0
  496. package/dist/utils/automation-catalog.js +5 -0
  497. package/dist/utils/automation-catalog.js.map +1 -0
  498. package/dist/utils/automation-timeout.d.ts +3 -2
  499. package/dist/utils/mcp-config.cjs +1 -1
  500. package/dist/utils/mcp-config.cjs.map +1 -1
  501. package/dist/utils/mcp-config.d.ts +8 -0
  502. package/dist/utils/mcp-config.js +25 -20
  503. package/dist/utils/mcp-config.js.map +1 -1
  504. package/dist/utils/mcp-installed-servers.cjs +1 -1
  505. package/dist/utils/mcp-installed-servers.cjs.map +1 -1
  506. package/dist/utils/mcp-installed-servers.js +6 -3
  507. package/dist/utils/mcp-installed-servers.js.map +1 -1
  508. package/dist/utils/responder-deployment.d.ts +5 -1
  509. package/dist/utils/transcript-export/index.cjs +5 -5
  510. package/dist/utils/transcript-export/index.js +12 -12
  511. package/package.json +3 -3
  512. package/scripts/check-sdk-version-sync.mjs +6 -6
  513. package/scripts/check-translation-completeness.cjs +1 -0
  514. package/scripts/dev-safe.mjs +17 -12
  515. package/scripts/dev-static.mjs +17 -0
  516. package/scripts/dev-with-automation.mjs +12 -14
  517. package/scripts/ingress.mjs +22 -0
  518. package/scripts/proxy-utils.mjs +157 -2
  519. package/scripts/runtime-services-info.mjs +6 -6
  520. package/scripts/static-build.mjs +0 -7
  521. package/scripts/static-server.mjs +10 -0
  522. package/build/assets/active-backend-context-BlZPzZNU.js +0 -1
  523. package/build/assets/agent-context-settings-CTaN-Iw9.js +0 -1
  524. package/build/assets/agent-profiles-settings-CR4VTqv_.js +0 -1
  525. package/build/assets/agent-server-conversation-service.api-Btmi4q6d.js +0 -41
  526. package/build/assets/agent-settings-KQs-occT.js +0 -1
  527. package/build/assets/api-key-entry-screen-BhR24gkM.js +0 -1
  528. package/build/assets/app-settings-Bs4sY8WP.js +0 -1
  529. package/build/assets/automation-BGP_I1RR.js +0 -1
  530. package/build/assets/automation-detail-CwDnJbYR.js +0 -2
  531. package/build/assets/automation-export-Bu-r-EzL.js +0 -2
  532. package/build/assets/automations-list-CYw7_6FR.js +0 -1
  533. package/build/assets/backend-form-modal-Ce-KRHOJ.js +0 -1
  534. package/build/assets/browser-BUDJnBg4.js +0 -6
  535. package/build/assets/check-BMOG005H.js +0 -1
  536. package/build/assets/chevron-down-CV1zZP_K.js +0 -1
  537. package/build/assets/circle-check-lvN_jFN5.js +0 -1
  538. package/build/assets/client-source-1v-kWLNU.js +0 -1
  539. package/build/assets/cloud-funnel-analytics-CasMM7EO.js +0 -1
  540. package/build/assets/command-menu-N_BriUy8.js +0 -1
  541. package/build/assets/condenser-settings-Czi8cKxV.js +0 -1
  542. package/build/assets/conversation-C25pc2dT.js +0 -1
  543. package/build/assets/conversation-CObLYSJd.js +0 -90
  544. package/build/assets/conversation-panel-C25pc2dT.js +0 -1
  545. package/build/assets/conversation-state-store-DTq4hFoP.js +0 -1
  546. package/build/assets/extensions-hub-BKftOQ-X.js +0 -1
  547. package/build/assets/extensions-navigation-DF24q1H1.js +0 -1
  548. package/build/assets/files-tab-SAiFCnS5.js +0 -1
  549. package/build/assets/git-provider-icon-BREx-yUX.js +0 -1
  550. package/build/assets/home-EPNFgzUh.js +0 -1
  551. package/build/assets/home-sN90Xcxp.js +0 -1
  552. package/build/assets/index-home-EPNFgzUh.js +0 -1
  553. package/build/assets/install-server-modal-BI8yUfmr.js +0 -1
  554. package/build/assets/llm-not-configured-banner-DTWzISnk.js +0 -27
  555. package/build/assets/llm-settings-BXk5_Pac.js +0 -1
  556. package/build/assets/llm-settings-C1vpgWam.js +0 -1
  557. package/build/assets/loader-circle-6zlEYCJw.js +0 -1
  558. package/build/assets/manage-backends-modal-DhflyGTf.js +0 -1
  559. package/build/assets/manifest-8082e879.js +0 -1
  560. package/build/assets/mcp-CxLPda-W.js +0 -9
  561. package/build/assets/messages-DINDkPNK.js +0 -40
  562. package/build/assets/onboarding-modal-DdvE6rzw.js +0 -1
  563. package/build/assets/organization-service.api-CT2OQlLz.js +0 -1
  564. package/build/assets/plugins-management-service-DVkoM3eA.js +0 -1
  565. package/build/assets/plus-vIbGD459.js +0 -1
  566. package/build/assets/profiles-service.api-CBafmAPO.js +0 -1
  567. package/build/assets/providers-9UzRB9mT.js +0 -1
  568. package/build/assets/proxy-C79PCMjo.js +0 -1
  569. package/build/assets/recommended-automations-launcher-BF2mtAKw.js +0 -58
  570. package/build/assets/root-B5JXKp1P.css +0 -1
  571. package/build/assets/root-Sj7W28yE.js +0 -2
  572. package/build/assets/root-layout-DbhKVoc7.js +0 -3
  573. package/build/assets/schema-field-CV6bFnoL.js +0 -1
  574. package/build/assets/search-sKuYKllf.js +0 -1
  575. package/build/assets/secrets-service-BjK-bPN2.js +0 -1
  576. package/build/assets/segmented-toggle-DbbD3Tve.js +0 -1
  577. package/build/assets/settings-Bj5Oo45A.js +0 -1
  578. package/build/assets/settings-input-BjW_zyTN.js +0 -1
  579. package/build/assets/settings-service.api-DryhKdSr.js +0 -1
  580. package/build/assets/shared-conversation-CnMxy7p_.js +0 -1
  581. package/build/assets/telemetry-cmCL3o6Z.js +0 -2
  582. package/build/assets/use-activate-agent-profile-DH33MvVj.js +0 -1
  583. package/build/assets/use-agent-profiles-Dmd_4H8q.js +0 -1
  584. package/build/assets/use-cloud-current-user-id-B6DP3s47.js +0 -1
  585. package/build/assets/use-is-authed-BsS4XwSL.js +0 -1
  586. package/build/assets/use-llm-profiles-BMQoc612.js +0 -1
  587. package/build/assets/use-onboarding-completion-B-2BTS-y.js +0 -1
  588. package/build/assets/use-plugins-marketplace-PBc_XNz_.js +0 -1
  589. package/build/assets/use-save-agent-profile-2Mk9ZX37.js +0 -1
  590. package/build/assets/use-settings-DBI44RnH.js +0 -1
  591. package/build/assets/use-settings-nav-items-Cva28C-c.js +0 -16
  592. package/build/assets/use-skills-RQsCtdzN.js +0 -1
  593. package/build/assets/use-tracking-CN1nIMnY.js +0 -1
  594. package/build/assets/utils-qjs_KuS4.js +0 -1
  595. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-EShpjxey.js +0 -1
  596. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DD_UNO02.js +0 -1
  597. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-Be63Q2Ln.js +0 -1
  598. package/build/assets/x-EjvKGawc.js +0 -1
  599. /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~emdr2jt4-BrmgjeOw.js} +0 -0
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/manage-backends-modal-DhflyGTf.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/vendor-styling-Bcgpimp9.js","assets/active-backend-context-BlZPzZNU.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js","assets/utils-qjs_KuS4.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js","assets/useQuery-B38jBavx.js","assets/pencil-8_lvWDoZ.js","assets/plus-vIbGD459.js","assets/refresh-cw-D7CYLy-d.js","assets/trash-2-Bq4lHbTB.js","assets/backend-form-modal-Ce-KRHOJ.js","assets/client-source-1v-kWLNU.js","assets/use-tracking-CN1nIMnY.js","assets/proxy-C79PCMjo.js","assets/telemetry-cmCL3o6Z.js","assets/segmented-toggle-DbbD3Tve.js","assets/use-onboarding-completion-B-2BTS-y.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-Bw4AuHN1.js","assets/useQueries-B3T1a7qt.js","assets/organization-service.api-CT2OQlLz.js","assets/brand-button-CQO8oqVo.js","assets/form-control-classes-CSPevi7c.js","assets/settings-input-BjW_zyTN.js","assets/modal-backdrop-X-vKo61e.js","assets/modal-body-DQhiw-AR.js","assets/modal-close-button-turIYn0t.js","assets/navigation-context-BOGzIng3.js","assets/cloud-funnel-analytics-CasMM7EO.js","assets/modal-classes-YaEEa5eZ.js","assets/confirmation-modal-gZtbojCm.js","assets/use-cloud-current-user-id-B6DP3s47.js","assets/api-key-entry-screen-BhR24gkM.js","assets/onboarding-modal-DdvE6rzw.js","assets/recommended-automations-launcher-BF2mtAKw.js","assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-Be63Q2Ln.js","assets/use-is-creating-conversation-CIAcnd8M.js","assets/conversation-store-C6hSXHw0.js","assets/settings-service.api-DryhKdSr.js","assets/settings-Chfn5xTD.js","assets/install-server-modal-BI8yUfmr.js","assets/useMutation-DyQXZFEF.js","assets/v4-DDdyfk2q.js","assets/secrets-service-BjK-bPN2.js","assets/styled-tooltip-DsjDnR_W.js","assets/use-settings-DBI44RnH.js","assets/skill-card-pill-row-D7XCz5uk.js","assets/extension-module-card-classes-Bo43vY5V.js","assets/circle-plus-check-toggle-E3Ecb_gg.js","assets/checkmark-CxdXtM3b.js","assets/x-mark-jcTkPiOB.js","assets/use-create-conversation-Dsa4nzU9.js","assets/use-agent-profiles-Dmd_4H8q.js","assets/agent-server-conversation-service.api-Btmi4q6d.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~eywn6ulz-BKxxr74w.js","assets/profiles-service.api-CBafmAPO.js","assets/llm-subscription-service-W5BprsNA.js","assets/llm-subscription-DTqtBCWz.js","assets/acp-providers-BHKZvEm5.js","assets/plugins-management-service-DVkoM3eA.js","assets/use-llm-profiles-BMQoc612.js","assets/chat-send-button-D4614wUz.js","assets/check-BMOG005H.js","assets/circle-check-lvN_jFN5.js","assets/loader-circle-6zlEYCJw.js","assets/llm-settings-C1vpgWam.js","assets/back-nav-button-Be_L157B.js","assets/navigation-link-Bxmn-pCs.js","assets/copy-B8Y5ufoR.js","assets/external-link-Cnnd6ikC.js","assets/use-can-manage-org-profiles-CrG1km7R.js","assets/dropdown-classes-DQlj-MpS.js","assets/badge-DwgrwohM.js","assets/base-modal-CSHhJTSr.js","assets/sdk-section-page-BW-i45yr.js","assets/switch-skeleton-BQoOhQTB.js","assets/schema-field-CV6bFnoL.js","assets/dist-hOnv1nn2.js","assets/settings-dropdown-input-Dx6vlkgf.js","assets/combobox-caret-C8_eGdp2.js","assets/settings-switch-UNSf8K8I.js","assets/toggle-switch-BptY3XRG.js","assets/use-is-authed-BsS4XwSL.js","assets/typography-C6fuRTTT.js","assets/use-save-settings-BRh9p_fv.js","assets/copy-to-clipboard-button-C4l3CMSd.js","assets/copy-z7idLzWO.js","assets/loading-spinner-CcpnCr_d.js","assets/settings-section-header-context-CnIIQAUn.js","assets/u-check-circle-DBEvndTS.js","assets/u-edit-809W9D9T.js","assets/map-provider-CXU6issd.js","assets/settings-list-classes-gQdBahdt.js","assets/use-acp-credential-form-B0_pZ_uS.js","assets/use-create-secret-BnxuAjDt.js","assets/openhands-logo-CmYvJXBa.js","assets/use-activate-agent-profile-DH33MvVj.js","assets/use-save-agent-profile-2Mk9ZX37.js","assets/terminal-cMS3RgVE.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,xt as n,yt as r}from"./vendor-styling-Bcgpimp9.js";import{F as i,R as a,U as o,_ as s,d as c,m as l,u,v as d,z as f}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{n as p}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t as m}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{C as h,j as g}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{t as _}from"./useQuery-B38jBavx.js";import{r as v}from"./providers-9UzRB9mT.js";import{J as y,L as b,X as ee,Z as x,f as S,h as C,n as w,nt as T,pt as E,q as D,r as te,x as ne,y as re,yt as O}from"./active-backend-context-BlZPzZNU.js";import{z as k}from"./utils-qjs_KuS4.js";import{f as A}from"./telemetry-cmCL3o6Z.js";import{n as j,o as M,r as N,t as P}from"./use-onboarding-completion-B-2BTS-y.js";import{t as F}from"./loading-spinner-CcpnCr_d.js";import{t as I}from"./use-config-Csy8EAP9.js";import{n as L}from"./use-settings-DBI44RnH.js";import{t as R}from"./use-save-settings-BRh9p_fv.js";import{t as z}from"./modal-backdrop-X-vKo61e.js";import{n as B}from"./modal-body-DQhiw-AR.js";import{n as V,r as H}from"./base-modal-CSHhJTSr.js";import{t as U}from"./brand-button-CQO8oqVo.js";import{t as W}from"./navigation-context-BOGzIng3.js";import{i as G,n as K}from"./color-themes-DTj5Ylbr.js";var q=e(t(),1),ie=`/api/authenticate`,J=`/login`,Y=`returnTo`,ae=new Set([`localhost`,`127.0.0.1`,`::1`]);function oe(){return typeof window>`u`?`/`:`${window.location.pathname}${window.location.search}${window.location.hash}`}function se(){return typeof window>`u`?!1:ae.has(window.location.hostname)}function ce(){return D()===`cookie`&&!se()}async function le(){try{return await g.post(ie,null,{withCredentials:!0}),!0}catch(e){if(g.isAxiosError(e)&&e.response?.status===401)return!1;throw e}}function ue(e=oe()){return`${J}?${new URLSearchParams({[Y]:e}).toString()}`}function de(){typeof window>`u`||window.location.assign(ue())}var X=r();function fe({backend:e,onChoice:t}){let{t:n,ready:r}=m(E),i=M([e])[e.id]?.isConnected===!0,{data:a,isSuccess:o}=L(),{mutateAsync:s,isPending:c}=R(),[l,u]=q.useState(!1),[d,f]=q.useState(!1);q.useEffect(()=>{f(!1)},[e.id]);let p=i&&o&&a?.user_consents_to_analytics===null&&!d;return q.useEffect(()=>{if(r&&p){let e=setTimeout(()=>u(!0),50);return()=>clearTimeout(e)}u(!1)},[r,p]),!p||!l?null:(0,X.jsx)(z,{elevated:!0,"aria-label":n(k.TELEMETRY$CONSENT_TITLE),children:(0,X.jsx)(`form`,{"data-testid":`telemetry-consent-form`,onSubmit:async e=>{e.preventDefault();let n=new FormData(e.currentTarget).get(`analytics`)===`on`;try{await s({user_consents_to_analytics:n})}catch{return}f(!0),await A(n?`granted`:`denied`),t?.(n)},className:`flex flex-col gap-2`,children:(0,X.jsxs)(B,{className:`border border-[var(--oh-border)]`,children:[(0,X.jsx)(H,{title:n(k.TELEMETRY$CONSENT_TITLE)}),(0,X.jsx)(V,{children:n(k.TELEMETRY$CONSENT_DESCRIPTION)}),(0,X.jsx)(`p`,{className:`text-xs text-neutral-400`,children:n(k.TELEMETRY$BACKEND_SCOPE,{name:e.name,host:e.host})}),(0,X.jsxs)(`label`,{className:`flex gap-2 items-center self-start text-sm cursor-pointer`,children:[(0,X.jsx)(`input`,{name:`analytics`,type:`checkbox`,defaultChecked:!0,className:`w-4 h-4 cursor-pointer`}),n(k.TELEMETRY$SEND_ANONYMOUS_DATA)]}),(0,X.jsx)(U,{testId:`confirm-telemetry-preferences`,type:`submit`,variant:`primary`,className:`w-full`,isDisabled:c,children:n(k.TELEMETRY$CONFIRM_PREFERENCES)})]})})})}function Z({onChoice:e}){let{backend:t}=w();return y()!==null||t.kind!==`local`?null:(0,X.jsx)(fe,{backend:t,onChoice:e})}function pe(){return q.useEffect(()=>{K(G())},[]),null}var me=q.lazy(()=>n(()=>import(`./manage-backends-modal-DhflyGTf.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]))),Q=q.lazy(()=>n(()=>import(`./api-key-entry-screen-BhR24gkM.js`),__vite__mapDeps([35,1,2,3,4,5,6,7,8,14,9,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]))),he=q.lazy(()=>n(()=>import(`./onboarding-modal-DdvE6rzw.js`).then(e=>e.n).then(e=>({default:e.OnboardingModal})),__vite__mapDeps([36,1,2,3,4,5,6,7,37,38,8,39,30,40,16,15,17,18,41,42,43,44,45,46,24,25,26,47,27,29,48,9,32,49,50,51,52,53,54,55,56,57,21,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,23,74,75,76,28,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,14,19,20,22,31,98,99,100,101]))),ge=q.lazy(()=>n(()=>import(`./backend-form-modal-Ce-KRHOJ.js`).then(e=>e.i).then(e=>({default:e.BackendFormModal})),__vite__mapDeps([14,1,2,3,4,5,6,7,8,9,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])));function _e({children:e}){return(0,X.jsxs)(`html`,{lang:`en`,children:[(0,X.jsxs)(`head`,{children:[(0,X.jsx)(`meta`,{charSet:`utf-8`}),(0,X.jsx)(`meta`,{name:`viewport`,content:`width=device-width, initial-scale=1`}),(0,X.jsx)(c,{}),(0,X.jsx)(u,{})]}),(0,X.jsxs)(`body`,{"data-agent-server-ui":``,className:`m-0`,children:[(0,X.jsxs)(v,{contentClassName:`min-h-screen`,children:[(0,X.jsx)(pe,{}),e,(0,X.jsx)(h,{toastOptions:T}),(0,X.jsx)(`div`,{id:`modal-portal-exit`})]}),(0,X.jsx)(d,{}),(0,X.jsx)(s,{})]})]})}function $(){return(0,X.jsx)(`main`,{className:`min-h-screen bg-base px-6 py-10 text-white`,children:(0,X.jsx)(`div`,{className:`mx-auto flex min-h-screen max-w-6xl items-center justify-center`,children:(0,X.jsx)(`div`,{className:`rounded-3xl border border-white/10 bg-base/80 px-8 py-10 shadow-2xl`,children:(0,X.jsx)(F,{size:`large`})})})})}function ve(){let e=p(),t=q.useCallback(()=>{b()&&(C(),e.invalidateQueries({queryKey:S.WEB_CLIENT_CONFIG}))},[e]);return(0,X.jsx)(`main`,{"data-testid":`agent-server-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,X.jsx)(q.Suspense,{fallback:null,children:(0,X.jsx)(me,{onClose:t,recoveryMode:!0})})})}function ye({onClose:e}){let t=i(),n=a(),r=f(),o=t.pathname.match(/^\/conversations\/([^/]+)/)?.[1]??null,s=q.useMemo(()=>({currentPath:t.pathname,conversationId:o,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[o,t.pathname,n,r.location]);return y()===null?(0,X.jsx)(`main`,{"data-testid":`first-run-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,X.jsx)(W,{value:s,children:(0,X.jsx)(q.Suspense,{fallback:(0,X.jsx)($,{}),children:(0,X.jsx)(he,{onClose:e})})})}):(0,X.jsx)(`main`,{"data-testid":`first-run-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,X.jsx)(q.Suspense,{fallback:(0,X.jsx)($,{}),children:(0,X.jsx)(ge,{mode:`add`,onClose:e,source:`manage_backends_modal`,hideCloseButton:!0})})})}var be=()=>[{rel:`icon`,type:`image/svg+xml`,href:O(`/favicon.svg`)}],xe=()=>[{title:`OpenHands`},{name:`description`,content:`Let's Start Building!`}],Se=o(function(){let e=ee(),t=!!b()?.apiKey,n=e&&!t,{active:r}=te(),i=y(),a=D(),o=i!==null,s=o&&r.backend.kind===`cloud`&&x(r.backend.host,i),{isCompleted:c,markCompleted:u}=P(),d=ce(),f=o?!d&&(!s||a!==`cookie`&&!c):!c,p=_({queryKey:S.MAIN_APP_COOKIE_AUTH,queryFn:le,enabled:d&&!f,retry:!1,staleTime:1e3*60*5,meta:{disableToast:!0}}),m=d&&!f&&p.isPending&&!p.isError,h=d&&p.data===!1,g=!d||p.data===!0||p.isError;q.useEffect(()=>{h&&de()},[h]);let v=I({enabled:!n&&!f&&g}),C=M(r.backend.kind===`cloud`&&g?[r.backend]:[])[r.backend.id],w=r.backend.kind===`cloud`&&C?.isConnected===!1&&N(C.lastError),T=r.backend.kind===`cloud`&&C?.disabled===!0&&j(C.lastError);return f?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ye,{onClose:u}),(0,X.jsx)(Z,{})]}):m||h?(0,X.jsx)($,{}):n||re(v.error)?(0,X.jsx)(q.Suspense,{fallback:(0,X.jsx)($,{}),children:(0,X.jsx)(Q,{})}):v.isPending||v.isLoading?(0,X.jsx)($,{}):w||T||ne(v.error)?(0,X.jsx)(ve,{}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(l,{}),(0,X.jsx)(Z,{})]})});export{_e as Layout,Se as default,be as links,xe as meta};
@@ -1,3 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/settings-modal-CFnbQ8_4.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/vendor-styling-Bcgpimp9.js","assets/active-backend-context-BlZPzZNU.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js","assets/utils-qjs_KuS4.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js","assets/llm-settings-C1vpgWam.js","assets/useMutation-DyQXZFEF.js","assets/useQuery-B38jBavx.js","assets/back-nav-button-Be_L157B.js","assets/navigation-link-Bxmn-pCs.js","assets/navigation-context-BOGzIng3.js","assets/form-control-classes-CSPevi7c.js","assets/copy-B8Y5ufoR.js","assets/external-link-Cnnd6ikC.js","assets/proxy-C79PCMjo.js","assets/profiles-service.api-CBafmAPO.js","assets/settings-service.api-DryhKdSr.js","assets/settings-Chfn5xTD.js","assets/llm-subscription-service-W5BprsNA.js","assets/llm-subscription-DTqtBCWz.js","assets/use-can-manage-org-profiles-CrG1km7R.js","assets/organization-service.api-CT2OQlLz.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-Bw4AuHN1.js","assets/dropdown-classes-DQlj-MpS.js","assets/badge-DwgrwohM.js","assets/settings-input-BjW_zyTN.js","assets/base-modal-CSHhJTSr.js","assets/modal-body-DQhiw-AR.js","assets/modal-classes-YaEEa5eZ.js","assets/modal-backdrop-X-vKo61e.js","assets/brand-button-CQO8oqVo.js","assets/sdk-section-page-BW-i45yr.js","assets/switch-skeleton-BQoOhQTB.js","assets/schema-field-CV6bFnoL.js","assets/dist-hOnv1nn2.js","assets/settings-dropdown-input-Dx6vlkgf.js","assets/combobox-caret-C8_eGdp2.js","assets/settings-switch-UNSf8K8I.js","assets/toggle-switch-BptY3XRG.js","assets/use-is-authed-BsS4XwSL.js","assets/typography-C6fuRTTT.js","assets/use-save-settings-BRh9p_fv.js","assets/use-tracking-CN1nIMnY.js","assets/client-source-1v-kWLNU.js","assets/telemetry-cmCL3o6Z.js","assets/use-settings-DBI44RnH.js","assets/extension-module-card-classes-Bo43vY5V.js","assets/copy-to-clipboard-button-C4l3CMSd.js","assets/checkmark-CxdXtM3b.js","assets/copy-z7idLzWO.js","assets/loading-spinner-CcpnCr_d.js","assets/settings-section-header-context-CnIIQAUn.js","assets/use-llm-profiles-BMQoc612.js","assets/u-check-circle-DBEvndTS.js","assets/u-edit-809W9D9T.js","assets/map-provider-CXU6issd.js","assets/settings-list-classes-gQdBahdt.js","assets/settings-utils-BL_Z9uIe.js","assets/manage-backends-modal-DhflyGTf.js","assets/pencil-8_lvWDoZ.js","assets/plus-vIbGD459.js","assets/refresh-cw-D7CYLy-d.js","assets/trash-2-Bq4lHbTB.js","assets/backend-form-modal-Ce-KRHOJ.js","assets/segmented-toggle-DbbD3Tve.js","assets/use-onboarding-completion-B-2BTS-y.js","assets/useQueries-B3T1a7qt.js","assets/modal-close-button-turIYn0t.js","assets/cloud-funnel-analytics-CasMM7EO.js","assets/confirmation-modal-gZtbojCm.js","assets/use-cloud-current-user-id-B6DP3s47.js","assets/environment-switch-overlay-D0FgCMqs.js","assets/environment-switch-store-DVQZLFbj.js","assets/alert-banner-C1nzoXBC.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DD_UNO02.js","assets/iconBase-B2rQun3J.js","assets/vendor~conversation-panel~conversation~alert-banner-BNzz5FuZ.js","assets/close-CDAVqnTn.js","assets/command-menu-N_BriUy8.js","assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-Be63Q2Ln.js","assets/list-todo-_BXQzOiB.js","assets/search-sKuYKllf.js","assets/sidebar-store-DwrYKwYr.js","assets/conversation-store-C6hSXHw0.js","assets/x-EjvKGawc.js"])))=>i.map(i=>d[i]);
2
- import{a as e,r as t}from"./rolldown-runtime-Cyuzqnbw.js";import{St as n,bt as r,i,xt as a,yt as o}from"./vendor-styling-Bcgpimp9.js";import{B as s,F as c,I as l,L as u,R as d,U as f,V as p,W as m,k as h,m as g,z as _}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{t as v}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{a as y,l as b,o as x,t as S,u as C}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DD_UNO02.js";import{E as w}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{t as T}from"./useQuery-B38jBavx.js";import{t as E}from"./use-is-creating-conversation-CIAcnd8M.js";import{J as D,gt as O,it as k,n as A,r as j,rt as M,z as N}from"./active-backend-context-BlZPzZNU.js";import{C as P,S as F,b as I,t as L,y as ee,z as R}from"./utils-qjs_KuS4.js";import{n as z}from"./vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-Be63Q2Ln.js";import{t as te}from"./check-BMOG005H.js";import{n as B,t as V}from"./vendor~root-layout~conversation-panel~conversation-DpA6fir3.js";import{r as H}from"./onboarding-modal-DdvE6rzw.js";import{n as U,t as ne}from"./vendor~root-layout~index-home~home~conversation-panel~conversation-EShpjxey.js";import{a as re,c as ie,d as ae,f as oe,i as se,l as ce,n as W,o as le,p as ue,r as de,s as fe,t as pe,u as me}from"./onboarding-BegDrOKn.js";import{n as he,t as ge}from"./format-time-delta-DuhE50B-.js";import{t as _e}from"./plus-vIbGD459.js";import{t as ve}from"./search-sKuYKllf.js";import{n as ye,r as be,t as xe}from"./sidebar-store-DwrYKwYr.js";import{a as Se}from"./llm-settings-C1vpgWam.js";import{t as Ce}from"./trash-2-Bq4lHbTB.js";import{t as we}from"./x-EjvKGawc.js";import{a as Te,d as Ee,f as De,o as G,p as Oe,t as ke}from"./telemetry-cmCL3o6Z.js";import{o as K}from"./use-onboarding-completion-B-2BTS-y.js";import{t as Ae}from"./loading-spinner-CcpnCr_d.js";import{t as je}from"./use-config-Csy8EAP9.js";import{n as Me,t as Ne}from"./use-tracking-CN1nIMnY.js";import{n as q,t as Pe}from"./use-settings-DBI44RnH.js";import{t as Fe}from"./use-save-settings-BRh9p_fv.js";import{t as Ie}from"./modal-backdrop-X-vKo61e.js";import{n as Le}from"./modal-body-DQhiw-AR.js";import{i as Re,r as ze}from"./base-modal-CSHhJTSr.js";import{_ as Be,c as Ve}from"./form-control-classes-CSPevi7c.js";import{n as He,t as Ue}from"./navigation-context-BOGzIng3.js";import{t as We}from"./openhands-logo-CmYvJXBa.js";import{t as Ge}from"./navigation-link-Bxmn-pCs.js";import{a as Ke,d as qe,f as Je,i as Ye,l as Xe,n as Ze,r as Qe,u as $e}from"./sidebar-layout-DXHtbEj1.js";import{n as et,t as tt}from"./sidebar-nav-link-pvUivfK2.js";import{t as nt}from"./styled-tooltip-DsjDnR_W.js";import{a as rt,d as it,f as at,i as ot,l as st,n as ct,o as J,r as lt,u as ut}from"./dropdown-classes-DQlj-MpS.js";import{r as dt,t as ft}from"./combobox-caret-C8_eGdp2.js";import{_ as pt,a as mt,c as ht,d as gt,f as _t,g as vt,h as yt,i as bt,l as xt,m as St,n as Ct,p as wt,r as Tt,t as Et,u as Dt,v as Ot}from"./git-provider-icon-BREx-yUX.js";import{n as kt,t as At}from"./use-cloud-current-user-id-B6DP3s47.js";import{s as jt}from"./environment-switch-store-DVQZLFbj.js";import{d as Mt,f as Nt,l as Pt,t as Ft}from"./conversation-store-C6hSXHw0.js";import{o as It,r as Lt}from"./backend-form-modal-Ce-KRHOJ.js";import{t as Rt}from"./manage-backends-modal-DhflyGTf.js";import{n as zt,t as Bt}from"./agent-server-conversation-service.api-Btmi4q6d.js";import{c as Vt,d as Ht,u as Ut}from"./acp-providers-BHKZvEm5.js";import{t as Wt}from"./use-is-authed-BsS4XwSL.js";import{a as Gt,i as Kt,n as qt,t as Jt}from"./conversation-state-store-DTq4hFoP.js";import{a as Yt,c as Xt,d as Zt,f as Qt,i as $t,l as en,o as tn,r as nn,s as rn,t as an,u as on}from"./sidebar-mobile-menu-toggle-U78hQRJ1.js";import{t as sn}from"./use-click-outside-element-DKqpqEEm.js";import{t as cn}from"./use-llm-profiles-BMQoc612.js";import{n as ln}from"./use-create-conversation-Dsa4nzU9.js";import{r as un,t as dn}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-DRblkyXD.js";import{n as fn,t as pn}from"./context-menu-list-item-BTHGFhIx.js";import{a as mn,i as hn,n as gn}from"./use-can-manage-org-profiles-CrG1km7R.js";import{t as _n}from"./u-edit-809W9D9T.js";import{t as vn}from"./skills-CYFLsN5U.js";import{t as yn}from"./search-7DRiGm4Z.js";import{t as bn}from"./use-user-conversation-GnGhs_Ob.js";var xn=w(`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`}]]),Sn=w(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),Cn=w(`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`}]]),wn=w(`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`}]]),Tn=w(`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`}]]),En=w(`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`}]]),Dn=w(`list-filter`,[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]),On=w(`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`}]]),kn=w(`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`}]]),An=w(`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`}]]),jn=w(`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`}]]),Mn=w(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),Y=e(n(),1),X=o(),Nn=46,Pn=30;function Fn({className:e,logoClassName:t,logoWidth:n=Nn,logoHeight:r=Pn}={}){let{t:i}=v(`openhands`);return(0,X.jsx)(Ge,{to:`/conversations`,"aria-label":i(R.BRANDING$OPENHANDS_LOGO),className:L(e),children:(0,X.jsx)(We,{width:n,height:r,className:L(`shrink-0`,t)})})}function In(){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 Ln({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)(we,{size:14})})}function Rn({isOpen:e,isDisabled:t,getToggleButtonProps:n}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,...n({disabled:t,className:L(dt,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed`)}),children:(0,X.jsx)(ft,{})})}function zn({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:L(`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:L(`p-0`,ot)}),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:L(J,`focus:outline-none`,n?.value===e.value&&`bg-[var(--oh-interactive-selected)] text-white`)}),children:[e.prefix?(0,X.jsx)(`span`,{className:ut,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)(Ot,{inset:`menu`}),(0,X.jsx)(`div`,{className:`p-0`,children:o})]}):null]})}function Bn({placeholder:e,isDisabled:t,getInputProps:n,italicPlaceholder:r=!0,fitContent:i=!1}){return(0,X.jsx)(`input`,{...n({placeholder:e,disabled:t,className:L(`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`,Ve,`px-0 not-italic text-inherit`)})})}var Vn={position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,border:0};function Hn({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}=ne({items:S,itemToString:e=>e?.label??``,inputValue:v,stateReducer:(e,t)=>t.type===ne.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:L(`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:Vn}),(0,X.jsx)(`button`,{type:`button`,...O({tabIndex:-1}),style:Vn,"aria-hidden":!0})]}):(0,X.jsxs)(`div`,{className:L(at,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)(Bn,{placeholder:a,isDisabled:M,getInputProps:P,italicPlaceholder:h,fitContent:g}),r&&(0,X.jsx)(In,{}),n&&w&&(0,X.jsx)(Ln,{onClear:()=>T(null)}),(0,X.jsx)(Rn,{isOpen:C,isDisabled:M,getToggleButtonProps:O})]}),(0,X.jsx)(zn,{isOpen:C,filteredOptions:S,selectedItem:w,emptyMessage:t,getMenuProps:k,getItemProps:A,footer:u,openUpward:d,fitContent:g})]})}var Un=t({AddBackendModal:()=>Wn});function Wn({onClose:e}){return(0,X.jsx)(Lt,{mode:`add`,onClose:e})}var Gn=`::`;function Kn(e,t){return t?`${e}${Gn}${t}`:e}function qn(e){let[t,n]=e.split(Gn);return{backendId:t,orgId:n??null}}function Jn(e){return(0,X.jsx)(It,{isConnected:e?.isConnected??null})}function Yn(){return(0,X.jsx)(It,{isConnected:`unavailable`})}function Xn(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:Kn(e.id,null),label:e.name,prefix:Jn(i[e.id])});for(let e of s){let o=n[e.id],s=Jn(i[e.id]);if(!o||o.orgs.length===0)a.push({value:Kn(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:Kn(e.id,r.id),label:`${e.name} – ${i}`,prefix:s})}}}return a}function Zn({openUpward:e=!1,hideTrigger:t=!1,defaultOpen:n=!1,onSelectOption:r,onOpenAddBackend:i,onOpenManageBackends:a,sidebarCollapsed:o=!1}={}){let{t:s}=v(`openhands`),{backends:c,active:u,setActive:f}=j(),p=kt(),m=At(),h=K(c),g=d(),_=l(`/settings`),y=l(`/settings/*`),b=l(`/conversations/:conversationId`),x=l(`/automations/:automationId`),[S,C]=Y.useState(!1),[w,T]=Y.useState(!1),E=s(R.BACKEND$PERSONAL_WORKSPACE),O=Y.useMemo(()=>Xn(c,E,p,m,h),[c,E,p,m,h]),k=N(u.backend),A=s(R.BACKEND$NO_BACKEND_AVAILABLE),M=Kn(u.backend.id,u.orgId),P=k?void 0:O.find(e=>e.value===M),F=!!(_||y),I=s(R.SIDEBAR$SETTINGS),ee=Ft(e=>e.isRightPanelShown),z=!o||b&&ee?`top`:`left`,te=Object.values(p).some(e=>e.isLoading);Y.useEffect(()=>{if(k||u.backend.kind!==`cloud`||u.orgId)return;let{backend:e}=u,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)},[u,p,m,f,k]);let B=Y.useCallback(()=>{if(i){i(),r?.();return}C(!0)},[i,r]),V=Y.useCallback(()=>{if(a){a(),r?.();return}T(!0)},[a,r]),H=D()!==null,U=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),ne=Y.useCallback(e=>{U(e),B()},[B,U]),re=Y.useCallback(e=>{U(e),B()},[B,U]),ie=Y.useCallback(e=>{U(e),V()},[V,U]),ae=Y.useCallback(e=>{U(e),V()},[V,U]),oe=(0,X.jsxs)(`div`,{className:ot,children:[H?null:(0,X.jsxs)(`button`,{type:`button`,"data-testid":`add-backend-menu-item`,onMouseDown:U,onTouchStart:U,onTouchEnd:re,onClick:ne,className:L(ct,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:ut,"aria-hidden":!0,children:(0,X.jsx)(_e,{width:16,height:16})}),s(R.BACKEND$ADD)]}),(0,X.jsxs)(`button`,{type:`button`,"data-testid":`manage-backends-menu-item`,onMouseDown:U,onTouchStart:U,onTouchEnd:ae,onClick:ie,className:L(ct,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:ut,"aria-hidden":!0,children:(0,X.jsx)(be,{width:16,height:16})}),s(H?R.BACKEND$RECONNECT_CLOUD:R.BACKEND$MANAGE)]})]}),se=Y.useCallback(async e=>{if(e===M)return;let{backendId:t,orgId:n}=qn(e),i=c.find(e=>e.id===t);i&&(jt(O.find(t=>t.value===e)?.label??i.name),await new Promise(e=>{setTimeout(e,400)}),b?g(`/conversations`):x&&g(`/automations`),f(i.id,n),r?.())},[M,c,b,x,g,O,f,s,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)(Hn,{testId:`backend-selector`,defaultValue:P??{value:M,label:k?A:u.backend.name,prefix:k?Yn():Jn(h[u.backend.id])},footer:oe,openUpward:e,hideTrigger:t,defaultOpen:n,openOnHover:!t,onChange:e=>{e&&se(e.value)},placeholder:k?A:u.backend.name,loading:te,options:O,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}-${P?.label??``}`)}),t?null:(0,X.jsx)(nt,{content:I,placement:z,offset:10,children:(0,X.jsx)(Ge,{to:`/settings`,"data-testid":`backend-selector-settings-link`,"data-active":F,"aria-label":I,className:L(F?`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`,Be),children:(0,X.jsx)(be,{width:16,height:16})})})]}),S?(0,X.jsx)(Wn,{onClose:()=>C(!1)}):null,w?(0,X.jsx)(Rt,{onClose:()=>T(!1)}):null]})}var Qn=`command-menu-trigger`,$n=18;function er({collapsed:e}){let{t}=v(`openhands`),n=ye(e=>e.open),r=t(R.COMMAND_MENU$OPEN_LABEL),i=(0,X.jsxs)(`button`,{type:`button`,"data-testid":Qn,"aria-label":r,onClick:n,className:L(Je({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)(et,{active:!1,children:(0,X.jsx)(ve,{width:$n,height:$n})}):(0,X.jsx)(`span`,{className:L(Ke,`text-[var(--oh-muted)] group-hover:text-white`),"aria-hidden":`true`,children:(0,X.jsx)(ve,{width:$n,height:$n})}),(0,X.jsx)(`span`,{className:$e(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(R.COMMAND_MENU$SHORTCUT)})]});return e?(0,X.jsx)(nt,{content:r,placement:`right`,children:i}):i}var tr=(e=20)=>{let{data:t}=Wt(),n=A(),r=!N(n.backend);return C({queryKey:[`user`,`conversations`,`paginated`,e,n.backend.id,n.orgId],queryFn:async({pageParam:t})=>await Bt.searchConversations(e,t),enabled:!!t&&r,getNextPageParam:e=>e.next_page_id,initialPageParam:void 0,refetchInterval:1e4,meta:{backendId:n.backend.id}})},nr=(e=10)=>T({queryKey:[`start-tasks`,`search`,e],queryFn:()=>[],select:e=>e.filter(e=>e.status!==`READY`&&e.status!==`ERROR`)});function rr({onConfirm:e,onClose:t,onCancel:n}){let{t:r}=v(`openhands`);return(0,X.jsx)(Ie,{onClose:n,children:(0,X.jsxs)(Le,{testID:`confirm-new-conversation-modal`,children:[(0,X.jsx)(ze,{title:r(R.CONVERSATION$EXIT_WARNING)}),(0,X.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,X.jsx)(Re,{text:r(R.BUTTON$CANCEL),onClick:t,className:`bg-tertiary`}),(0,X.jsx)(Re,{text:r(R.ACTION$CONFIRM),onClick:e,className:`bg-[#C63143]`})]})]})})}function ir({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:L(`text-xs leading-6 font-semibold bg-transparent truncate overflow-hidden`,r&&`opacity-60`),children:t})}var ar=e=>{switch(e){case P.FINISHED:return`check`;case P.RUNNING:return`working`;case P.IDLE:case P.WAITING_FOR_CONFIRMATION:return`active`;case P.PAUSED:return`paused`;case P.ERROR:case P.STUCK:return`error`;default:return`unknown`}},or=(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 sr(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 cr({executionStatus:e,sandboxStatus:t,showTooltip:n=!0}){let{t:r}=v(`openhands`),i=t===`MISSING`,a=t===`ERROR`?`error`:i?`paused`:ar(e),o=r(or(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)(dn,{"data-testid":`conversation-status-archived`,size:10,className:`shrink-0 text-[var(--oh-muted)] opacity-60`,"aria-hidden":!0}):sr(a)});return n?(0,X.jsx)(nt,{content:o,placement:`right`,showArrow:!0,tooltipClassName:`bg-base text-white text-xs shadow-lg`,children:s}):s}function lr({title:e,titleMode:t,onTitleSave:n,executionStatus:r,sandboxStatus:i}){let a=yt(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)(cr,{executionStatus:r,sandboxStatus:i,showTooltip:!1})}),(0,X.jsx)(ir,{title:e,titleMode:t,onSave:n,isConversationArchived:a})]})}var ur=e(r(),1);function dr({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}=v(`openhands`),{backend:p}=A(),m=sn(e,d),h=p.kind===`cloud`?R.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:R.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)(Ot,{inset:`menu`})]},t):null},[]),_=u!=null;return(0,X.jsxs)(fn,{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)(pn,{testId:`edit-button`,onClick:r,children:(0,X.jsx)(mn,{icon:(0,X.jsx)(_n,{width:16,height:16}),text:f(R.BUTTON$RENAME)})},`edit-button`)],`edit-section`),g([a&&(0,X.jsx)(pn,{testId:`show-agent-tools-button`,onClick:a,children:(0,X.jsx)(mn,{icon:(0,X.jsx)(St,{width:16,height:16}),text:f(R.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})},`show-agent-tools-button`),o&&(0,X.jsx)(pn,{testId:`show-skills-button`,onClick:o,children:(0,X.jsx)(mn,{icon:(0,X.jsx)(vn,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:f(R.CONVERSATION$SHOW_SKILLS)})},`show-skills-button`)],`tools-section`),g([n&&(0,X.jsx)(pn,{testId:`stop-button`,onClick:n,children:(0,X.jsx)(mn,{icon:(0,X.jsx)(wt,{width:16,height:16}),text:f(h)})},`stop-button`),s&&(0,X.jsx)(pn,{testId:`download-vscode-button`,onClick:s,children:(0,X.jsx)(mn,{icon:(0,X.jsx)(Xt,{width:16,height:16}),text:f(R.BUTTON$DOWNLOAD_VIA_VSCODE)})},`download-vscode-button`),c&&(0,X.jsx)(pn,{testId:`download-trajectory-button`,onClick:c,children:(0,X.jsx)(mn,{icon:(0,X.jsx)(Xt,{width:16,height:16}),text:f(R.BUTTON$DOWNLOAD_CONVERSATION_DATA)})},`download-trajectory-button`)],`control-section`),g([i&&(0,X.jsx)(pn,{testId:`display-cost-button`,onClick:i,children:(0,X.jsx)(mn,{icon:(0,X.jsx)(rn,{width:16,height:16}),text:f(R.BUTTON$DISPLAY_COST)})},`display-cost-button`),t&&(0,X.jsx)(pn,{testId:`delete-button`,onClick:t,children:(0,X.jsx)(mn,{icon:(0,X.jsx)(hn,{width:16,height:16}),text:f(R.COMMON$DELETE_CONVERSATION)})},`delete-button`)],`info-section`,!0)]})}function fr({contextMenuOpen:e,onContextMenuToggle:t,onDelete:n,onStop:r,onEdit:i,onDownloadViaVSCode:a,onDownloadConversation:o,executionStatus:s,conversationId:c,showOptions:l}){let u=F(s),d=I(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)(gn,{ref:f,onClick:n=>{n.preventDefault(),n.stopPropagation(),t(!e)},className:L(u&&`opacity-60`)}),e&&m&&h?(0,ur.createPortal)((0,X.jsx)(dr,{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 pr(e){return e?e.split(`/`).pop()||e:null}var mr={bitbucket:S,bitbucket_data_center:S,github:y,gitlab:x};function hr({selectedRepository:e}){let t=e.git_provider?mr[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)(_t,{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)(un,{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 gr({workspaceWorkingDir:e}){let{t}=v(`openhands`),n=e?qt(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)(Kt,{width:14,height:14,className:`text-[var(--oh-muted)]`}),(0,X.jsx)(`span`,{className:`truncate min-w-0`,children:t(R.COMMON$NO_REPOSITORY)})]})}function _r({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,tags:d=null,showTags:f=!1}){let{t:p}=v(`openhands`),m=F(r),h=null;if(c)if(l===`acp`){let e=Vt(u)??p(R.CONVERSATION$ACP_AGENT_GENERIC),t=Ut(u,s),n=t??e;h={kind:Ht(u),text:n,tooltip:t?`${e} · ${t}`:e}}else s&&(h={kind:`openhands`,text:pr(s)??s,tooltip:s});let g=r===void 0?void 0:`pl-[26px]`,_=f?zt(d):[],y=_.slice(0,3),b=_.slice(3);return(0,X.jsxs)(`div`,{className:L(`flex flex-col gap-0.5 mt-0.5 w-full min-w-0`,m&&`opacity-60`),children:[h?(0,X.jsx)(`div`,{className:g,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:h.tooltip,children:[(0,X.jsx)(H,{kind:h.kind}),(0,X.jsx)(`span`,{className:`truncate`,children:h.text})]})}):null,_.length>0?(0,X.jsxs)(`div`,{className:L(`flex flex-row flex-wrap items-center gap-1 min-w-0`,g),children:[y.map(([e,t])=>(0,X.jsx)(`span`,{"data-testid":`conversation-card-tag-chip`,title:`${e}: ${t}`,className:`inline-flex max-w-full min-w-0 items-center rounded-sm bg-[var(--oh-surface-raised)] px-1 py-px text-[10px] leading-4 text-[var(--oh-muted)]`,children:(0,X.jsx)(`span`,{className:`truncate`,children:`${e}: ${t}`})},e)),b.length>0?(0,X.jsx)(`span`,{"data-testid":`conversation-card-tag-overflow`,title:b.map(([e,t])=>`${e}: ${t}`).join(`
3
- `),className:`inline-flex items-center rounded-sm bg-[var(--oh-surface-raised)] px-1 py-px text-[10px] leading-4 text-[var(--oh-muted)]`,children:`+${b.length}`}):null]}):null,(0,X.jsxs)(`div`,{className:L(`flex flex-row items-center gap-2 w-full min-w-0`,a&&g),children:[a&&(e?.selected_repository?(0,X.jsx)(hr,{selectedRepository:e}):(0,X.jsx)(gr,{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:`${ge(t??n)} ${p(R.CONVERSATION$AGO)}`})})})]})]})}function vr(){let{t:e}=v(`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)(gt,{className:`text-white w-3 h-3`}),(0,X.jsx)(`span`,{children:e(R.COMMON$ERROR)})]})}function yr({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:y=!1,agentKind:b=null,acpServer:x=null,tags:S=null,showTags:C=!1,isPinned:w=!1,onTogglePin:T,alwaysShowPinIcon:E=!1}){let{t:D}=v(`openhands`),{trackDownloadVsCodeButtonClicked:O}=Ne(),[k,A]=Y.useState(`view`),{mutateAsync:j}=Dt(),M=e=>{e!==``&&e!==a&&r?.(e),A(`view`)},N=e=>{e.preventDefault(),e.stopPropagation(),t?.(),p?.(!1)},P=e=>{e.preventDefault(),e.stopPropagation(),n?.(),p?.(!1)},F=e=>{e.preventDefault(),e.stopPropagation(),A(`edit`),p?.(!1)},I=async e=>{if(e.preventDefault(),e.stopPropagation(),O(),l)try{let e=await Gt.getVSCodeUrl(l);if(e.vscode_url){let t=en(e.vscode_url);t&&window.open(t,`_blank`)}}catch{}p?.(!1)},ee=async e=>{e.preventDefault(),e.stopPropagation(),l&&await j(l),p?.(!1)},z=e=>{e.preventDefault(),e.stopPropagation(),T?.()},te=()=>(0,X.jsx)(`button`,{type:`button`,"data-testid":l?`conversation-pin-toggle-${l}`:`conversation-pin-toggle`,"aria-pressed":w,"aria-label":D(w?R.CONVERSATION_PANEL$UNPIN_CONVERSATION:R.CONVERSATION_PANEL$PIN_CONVERSATION),onClick:z,className:L(`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)(kn,{className:L(`h-3.5 w-3.5`,w&&`fill-current`),"aria-hidden":!0})}),B=!!(t||r||i),V=B||!!T,H=E&&w&&!!T,U=g||y&&(b===`acp`||!!_)||C&&zt(S).length>0;return(0,X.jsxs)(`div`,{"data-testid":`conversation-card`,"data-context-menu-open":f.toString(),"data-active":m?`true`:`false`,onClick:e,className:L(`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)(lr,{title:a,titleMode:k,onTitleSave:M,executionStatus:u,sandboxStatus:d}),d===`ERROR`&&(0,X.jsx)(vr,{})]}),(0,X.jsxs)(`div`,{className:L(`relative ml-auto pl-2 flex items-center justify-end shrink-0`,H?`min-w-[3.75rem]`:V&&`group-hover:min-w-[3.75rem] group-focus-within:min-w-[3.75rem]`,f&&`min-w-[3.75rem]`),children:[!H&&(c??s)&&(0,X.jsx)(`p`,{className:L(`text-xs text-[var(--oh-muted)] text-right whitespace-nowrap transition-opacity -translate-x-1.5`,V&&`group-hover:opacity-0 group-focus-within:opacity-0`,f&&`opacity-0`),children:(0,X.jsx)(`time`,{children:ge(s??c)})}),V?(0,X.jsxs)(`div`,{className:L(`absolute right-0 top-1/2 flex -translate-y-1/2 items-center gap-0.5 transition-opacity`,H?`pointer-events-auto visible opacity-100`:L(`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:[T?te():null,H&&(c??s)&&B?(0,X.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,X.jsx)(`div`,{className:L(!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)(fr,{contextMenuOpen:f,onContextMenuToggle:p||(()=>{}),onDelete:t&&N,onStop:n&&P,onEdit:r&&F,onDownloadViaVSCode:I,onDownloadConversation:ee,executionStatus:u,conversationId:l,showOptions:i})}),(0,X.jsx)(`p`,{className:L(`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:ge(s??c)})})]}):null,!H&&B?(0,X.jsx)(fr,{contextMenuOpen:f,onContextMenuToggle:p||(()=>{}),onDelete:t&&N,onStop:n&&P,onEdit:r&&F,onDownloadViaVSCode:I,onDownloadConversation:ee,executionStatus:u,conversationId:l,showOptions:i}):null]}):null]})]}),U&&(0,X.jsx)(_r,{selectedRepository:o,lastUpdatedAt:s,createdAt:c,executionStatus:u,workspaceWorkingDir:h,showRepositoryMetadata:g,showTimestamp:!1,llmModel:_,showAgentChip:y,agentKind:b,acpServer:x,tags:S,showTags:C})]})}var br={bitbucket:S,bitbucket_data_center:S,github:y,gitlab:x};function xr({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 Sr({title:e,executionStatus:t,sandboxStatus:n,selectedRepository:r,workspaceWorkingDir:i,llmModel:a,createdAt:o}){let{t:s}=v(`openhands`),c=r?.selected_repository??null,l=r?.selected_branch??null,u=r?.git_provider??null,d=u?br[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)(cr,{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)(xr,{label:s(R.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)(_t,{className:`mt-0.5 h-3 w-3 shrink-0`}):null,(0,X.jsx)(`span`,{className:`break-all`,children:c})]})}),l?(0,X.jsx)(xr,{label:s(R.CONVERSATION$BRANCH),children:(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[(0,X.jsx)(un,{size:11,className:`mt-0.5 shrink-0`}),(0,X.jsx)(`span`,{className:`break-all`,children:l})]})}):null]}):i?(0,X.jsx)(xr,{label:s(R.CONVERSATION_PANEL$PREVIEW_DIRECTORY),children:(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[(0,X.jsx)(ue,{size:12,className:`mt-0.5 shrink-0`}),(0,X.jsx)(`span`,{className:`break-all`,children:i})]})}):null,a?(0,X.jsx)(xr,{label:s(R.CONVERSATION_PANEL$PREVIEW_MODEL),children:(0,X.jsx)(`span`,{className:`break-all`,children:a})}):null,f?(0,X.jsx)(xr,{label:s(R.CONVERSATION$CREATED),children:f}):null]})]})}function Cr({taskStatus:e}){return(0,X.jsx)(`div`,{className:L(`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 wr({taskStatus:e}){let{t}=v(`openhands`);return e===`WORKING`?null:(0,X.jsx)(`span`,{className:L(`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(ee(e))})}function Tr({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)(Cr,{taskStatus:t})}),(0,X.jsx)(`h3`,{className:`text-sm font-medium text-content-2 truncate flex-1`,children:e}),(0,X.jsx)(wr,{taskStatus:t})]})}function Er({selectedRepository:e,createdAt:t,detail:n}){let{t:r}=v(`openhands`);return(0,X.jsxs)(`div`,{className:L(`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)(hr,{selectedRepository:e}):(0,X.jsx)(gr,{}),t&&(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] flex-1 text-right`,children:(0,X.jsx)(`time`,{children:`${ge(t)} ${r(R.CONVERSATION$AGO)}`})})]}),n&&(0,X.jsx)(`div`,{className:`text-xs text-[var(--oh-text-subtle)] truncate`,children:n})]})}function Dr({task:e,onClick:t}){let{t:n}=v(`openhands`),r=e.request.title||e.detail||n(R.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:L(`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)(Tr,{title:r,taskStatus:e.status})}),(0,X.jsx)(Er,{selectedRepository:i,createdAt:e.created_at,detail:e.detail})]})}function Or({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 kr({conversationId:e,title:t,selectedRepository:n,executionStatus:r,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,tags:g=null,showTags:_=!1}){let{t:y}=v(`openhands`);return(0,X.jsx)(i,{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)(cr,{executionStatus:r,sandboxStatus:a,showTooltip:!1}),(0,X.jsx)(`span`,{className:`text-sm font-medium text-white truncate`,title:t,children:t||y(R.CONVERSATION$UNTITLED)})]}),(0,X.jsx)(_r,{selectedRepository:n,lastUpdatedAt:o,createdAt:s,executionStatus:r,workspaceWorkingDir:c,showRepositoryMetadata:d,llmModel:f,showAgentChip:p,agentKind:m,acpServer:h,tags:g,showTags:_})]}),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)(Ge,{to:`/conversations/${e}`,onClick:u,"data-testid":`compact-conversation-row`,"data-conversation-id":e,"aria-label":t||e,className:({isActive:e})=>L(`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)(cr,{executionStatus:r,sandboxStatus:a,showTooltip:!1})})})}var Ar={showOlderConversations:!0,showRepoBranchMetadata:!1,showLlmProfiles:!0,showTagsMetadata:!0,showHoverMetadata:!0,organizeMode:`chronological`,conversationSort:`updated`,threadScope:`all`,groupFolderOrder:[]},Z=Nt()(Mt(e=>({...Ar,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})),setShowTagsMetadata:t=>e(()=>({showTagsMetadata:t})),toggleShowTagsMetadata:()=>e(e=>({showTagsMetadata:!e.showTagsMetadata})),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:Pt(()=>localStorage),partialize:e=>({showOlderConversations:e.showOlderConversations,showRepoBranchMetadata:e.showRepoBranchMetadata,showLlmProfiles:e.showLlmProfiles,showTagsMetadata:e.showTagsMetadata,showHoverMetadata:e.showHoverMetadata,organizeMode:e.organizeMode,conversationSort:e.conversationSort,threadScope:e.threadScope,groupFolderOrder:e.groupFolderOrder})})),jr=`px-2 pb-1 pt-1`,Mr=`text-[11px] font-semibold uppercase tracking-wide text-[var(--oh-muted)]`;function Nr({children:e,suffix:t}){return t==null?(0,X.jsx)(`div`,{role:`presentation`,className:L(jr,Mr),children:e}):(0,X.jsxs)(`div`,{role:`presentation`,className:L(`flex items-baseline justify-between gap-2`,jr),children:[(0,X.jsx)(`span`,{className:L(`min-w-0 truncate text-left`,Mr),children:e}),t]})}function Pr(){return(0,X.jsx)(Ot,{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:L(`group`,J,`text-[var(--oh-foreground)] disabled:opacity-50`),children:[(0,X.jsx)(e,{className:L(`h-3.5 w-3.5`,st),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),n?(0,X.jsx)(te,{className:`ml-auto h-3.5 w-3.5 shrink-0 text-white`,"aria-hidden":!0}):null]})}var Fr=e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1):e;function Ir({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,showTagsMetadata:g,toggleShowTagsMetadata:_,showHoverMetadata:y,toggleShowHoverMetadata:b,totalConversationsCount:x,onRequestDeleteAll:S}){let{t:C}=v(`openhands`),w=C(r===`local`?R.CONVERSATION_PANEL$BY_WORKSPACE:R.CONVERSATION_PANEL$BY_REPOSITORY),T=Y.useRef(null),E=Y.useRef(null),D=Y.useRef(e);return Y.useEffect(()=>{e?(E.current?.querySelector(`[role="menuitem"], [role="menuitemradio"]`))?.focus():D.current&&T.current?.focus(),D.current=e},[e]),(0,X.jsxs)(`div`,{ref:n,className:`relative shrink-0 pr-0.5`,children:[(0,X.jsx)(`button`,{ref:T,type:`button`,"data-testid":`older-conversations-filter-toggle`,"aria-label":C(R.CONVERSATION_PANEL$FILTER_LABEL),"aria-haspopup":`menu`,"aria-expanded":e,onClick:()=>t(!e),className:L(`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)]`,lt),children:(0,X.jsx)(Dn,{className:`lucide lucide-list-filter shrink-0`,width:14,height:14,strokeWidth:2,"aria-hidden":!0})}),e?(0,X.jsxs)(`div`,{ref:E,role:`menu`,"aria-orientation":`vertical`,"aria-label":C(R.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=E.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:L(`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`,ot,it),children:[(0,X.jsx)(Nr,{children:C(R.CONVERSATION_PANEL$ORGANIZE)}),(0,X.jsx)(Q,{icon:ue,label:w,selected:i===`grouped`,onClick:()=>{a(`grouped`),t(!1)}}),(0,X.jsx)(Q,{icon:Sn,label:C(R.CONVERSATION_PANEL$CHRONOLOGICAL),selected:i===`chronological`,onClick:()=>{a(`chronological`),t(!1)}}),(0,X.jsx)(Pr,{}),(0,X.jsx)(Nr,{children:C(R.CONVERSATION_PANEL$SORT_BY)}),(0,X.jsx)(Q,{icon:xn,label:C(R.CONVERSATION_PANEL$SORT_CREATED),selected:o===`created`,onClick:()=>{s(`created`),t(!1)}}),(0,X.jsx)(Q,{icon:Cn,label:C(R.CONVERSATION_PANEL$SORT_UPDATED),selected:o===`updated`,onClick:()=>{s(`updated`),t(!1)}}),(0,X.jsx)(Pr,{}),(0,X.jsx)(Nr,{children:C(R.CONVERSATION_PANEL$SHOW)}),(0,X.jsx)(Q,{icon:On,label:C(R.CONVERSATION_PANEL$ALL_THREADS),selected:c===`all`,onClick:()=>{l(`all`),t(!1)}}),(0,X.jsx)(Q,{icon:jn,label:C(R.CONVERSATION_PANEL$RELEVANT_THREADS),selected:c===`relevant`,onClick:()=>{l(`relevant`),t(!1)}}),(0,X.jsx)(Pr,{}),(0,X.jsx)(Nr,{children:C(R.CONVERSATION_PANEL$METADATA)}),(0,X.jsx)(Q,{icon:z,label:C(R.CONVERSATION_PANEL$LLM_MODEL),selected:m,testId:`toggle-llm-profiles`,onClick:()=>{h(),t(!1)}}),(0,X.jsx)(Q,{icon:oe,label:C(R.CONVERSATION_PANEL$REPO_BRANCH),selected:f,testId:`toggle-repo-branch-metadata`,onClick:()=>{p(),t(!1)}}),(0,X.jsx)(Q,{icon:Mn,label:C(R.CONVERSATION_PANEL$TAGS),selected:g,testId:`toggle-tags-metadata`,onClick:()=>{_(),t(!1)}}),(0,X.jsx)(Q,{icon:he,label:C(R.CONVERSATION_PANEL$HOVER_METADATA),selected:y,testId:`toggle-hover-metadata`,onClick:()=>{b(),t(!1)}}),(0,X.jsx)(Pr,{}),(0,X.jsx)(Nr,{suffix:(0,X.jsx)(`span`,{className:`shrink-0 text-right text-[10px] font-medium normal-case tracking-normal text-[var(--oh-muted)]/70`,children:C(R.CONVERSATION_PANEL$OLDER_OVER_ONE_HOUR)}),children:C(R.CONVERSATION_PANEL$OLDER_SECTION)}),(0,X.jsx)(Q,{testId:`toggle-older-conversations`,icon:u?wn:Tn,label:Fr(C(u?R.CONVERSATION$HIDE:R.CONVERSATION$SHOW_ALL)),onClick:()=>{d(),t(!1)}}),(0,X.jsx)(Pr,{}),(0,X.jsx)(Q,{testId:`delete-all-conversations`,icon:Ce,label:Fr(C(R.CONVERSATION$DELETE_ALL)),disabled:x===0,onClick:()=>{x!==0&&(S(),t(!1))}})]}):null]})}var Lr=L(`z-50 flex flex-col rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-white shadow-lg`,rt);function Rr(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 zr({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=v(`openhands`),{navigate:o}=He(),[s,c]=Y.useState(!1),l=Y.useRef(null),u=Y.useRef(null),d=Rr(u,{open:s,enabled:i}),{data:f,error:p}=fe(),m=f?.workspaceParents??[],{mutate:h}=ce(),{mutate:g}=me(),{mutate:_}=ie(),{mutate:y}=ae(),{workspaces:b}=le(),x=re(p,a),[S,C]=Y.useState(!1),[w,T]=Y.useState(!1),{mutate:D,isPending:O}=ln(),k=E(),A=O||k;Y.useEffect(()=>{if(!s||S||w)return;let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[s,S,w]),Y.useEffect(()=>{if(!s||S||w)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[s,S,w]);let j=e=>{A||D({workingDir:e,entryPoint:`sidebar_local_menu`},{onSuccess:e=>{c(!1),o(`/conversations/${e.conversation_id}`)}})},M=J,N=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),P=Y.useCallback(()=>{c(e=>!e)},[]),F=s&&(!i||d!==null),I=!!x,ee=i&&d?{position:`fixed`,top:d.top,left:d.left,width:d.width}:void 0,z=(0,X.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,disabled:I,onMouseDown:N,onClick:e=>{e.preventDefault(),e.stopPropagation(),!I&&C(!0)},className:M,children:a(R.HOME$ADD_WORKSPACES)}),te=x?(0,X.jsx)(nt,{content:x,placement:`top`,children:(0,X.jsx)(`span`,{className:`block`,children:z})}):z;return(0,X.jsxs)(`div`,{className:L(!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:L(Lr,!i&&L(`absolute top-full mt-0`,n)),style:ee,children:[(0,X.jsxs)(`ul`,{className:L(`max-h-[40vh] overflow-y-auto sm:max-h-[280px]`,ot),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(R.HOME$NO_WORKSPACE_OPTION)})})}),b.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:ut,"aria-hidden":!0,children:(0,X.jsx)(xt,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.id))]}),(0,X.jsxs)(`div`,{className:L(`flex flex-col`,ot),"data-testid":`new-conversation-menu-footer`,children:[(0,X.jsx)(Ot,{inset:`menu`,testId:`new-conversation-menu-footer-divider`}),te,(b.length>0||m.length>0)&&(0,X.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,onMouseDown:N,onClick:e=>{e.preventDefault(),e.stopPropagation(),T(!0)},className:M,children:a(R.HOME$MANAGE_WORKSPACES)})]})]}),(0,X.jsx)(se,{isOpen:S,onClose:()=>C(!1),onAdd:e=>h(e),onAddParent:e=>_(e)}),(0,X.jsx)(de,{isOpen:w,workspaces:b,workspaceParents:m,onClose:()=>T(!1),onRemove:e=>g(e),onRemoveParent:e=>y(e)})]})}function Br({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:ut,"aria-hidden":!0,children:(0,X.jsx)(xt,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.full_name})]})})}function Vr({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=v(`openhands`),{navigate:o}=He(),{providers:s}=ht(),{lastSelectedProvider:c,setLastSelectedProvider:l}=Ct(),[u,d]=Y.useState(!1),f=Y.useRef(null),p=Y.useRef(null),m=Rr(p,{open:u,enabled:i}),[h,g]=Y.useState(c??null),[_,y]=Y.useState(``),b=Tt(_,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:x,isLoading:S,isError:C,hasNextPage:w,isFetchingNextPage:T,fetchNextPage:D}=mt({provider:h}),{data:O,isLoading:k}=bt(b,h),A=Y.useMemo(()=>x?.pages.flatMap(e=>e.items)??[],[x]),j=b?O??[]:A,{mutate:M,isPending:N}=ln(),P=E(),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),y(``)},z=J;Y.useEffect(()=>{u&&(b||!w||T||S||j.length===0||j.length>=10||D())},[u,b,w,T,S,j.length,D]);let te=b?k:S,B=!b&&w&&j.length>0,V=Y.useCallback(()=>{d(e=>!e)},[]),H=u&&(!i||m!==null),U=i&&m?{position:`fixed`,top:m.top,left:m.left,width:m.width}:void 0;return(0,X.jsxs)(`div`,{className:L(!i&&`relative`,t),ref:f,children:[(0,X.jsx)(`span`,{ref:p,className:`inline-flex`,children:e({onClick:V,"aria-expanded":u,"aria-haspopup":`menu`,disabled:F})}),H&&(0,X.jsxs)(`div`,{"data-testid":r,className:L(Lr,!i&&L(`absolute top-full mt-0`,n)),style:U,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:L(`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)(Et,{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)(yn,{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=>y(e.target.value),placeholder:a(R.COMMON$SEARCH_REPOSITORIES),disabled:!h,className:L(`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)(Ot,{inset:`menu`}),(0,X.jsxs)(`ul`,{className:L(`max-h-[40vh] overflow-y-auto custom-scrollbar-always sm:max-h-[280px]`,ot),children:[te&&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(R.HOME$LOADING_REPOSITORIES)}),C&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[#F87171]`,"data-testid":`cloud-repo-error`,children:a(R.HOME$FAILED_TO_LOAD_REPOSITORIES)}),!te&&!C&&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(R.GITHUB$NO_RESULTS)}),j.map(e=>(0,X.jsx)(Br,{repo:e,disabled:F,onSelect:I,itemClass:z},`${e.git_provider}:${e.id}`)),B&&(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`cloud-repo-load-more`,disabled:T,onClick:()=>D(),className:z,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-text-secondary)]`,children:a(T?R.HOME$LOADING_MORE_REPOSITORIES:R.CONVERSATION$LOAD_MORE)})})})]})]})]})}var Hr=L(`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 Ur({backendKind:e}){let{t}=v(`openhands`),n=t(R.CONVERSATION_PANEL$NEW_THREAD_FOLDER_ARIA),r=(0,X.jsx)(En,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0,strokeWidth:2});return e===`local`?(0,X.jsx)(zr,{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:Hr,"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)(Vr,{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:Hr,"aria-label":n,"aria-expanded":t,"aria-haspopup":a,disabled:i,"data-testid":`conversation-panel-new-thread-picker`,onClick:e,children:r})})}function Wr(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 Gr(e,t){let n=new Map(t.map(e=>[e.id,e]));return e.map(e=>n.get(e)).filter(e=>e!=null)}function Kr(e,t){if(t.length===0)return[...e];let n=new Set(t);return e.filter(e=>!n.has(e.id))}function qr(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 Jr(e){if(!e)return 0;let t=Date.parse(e);return Number.isFinite(t)?t:0}function Yr(e,t){let n=t===`created`?`created_at`:`updated_at`;return[...e].sort((e,t)=>Jr(t[n])-Jr(e[n]))}function Xr(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 Zr(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 Qr(e,t,n,r){let i=new Map;for(let n of e){let{id:e,label:a}=t===`local`?Xr(n):Zr(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=Yr(r.conversations,n);return{id:e,label:r.label,conversations:i,launch:qr(e,t,i)}}),o=e=>e.conversations.reduce((e,t)=>Math.max(e,Jr(n===`created`?t.created_at:t.updated_at)),0);return a.sort((e,t)=>o(t)-o(e)),a}function $r(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 ei(e,t,n,r,i=`after`){if(n===r)return[...e];let a=$r(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 ti({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:_}=v(`openhands`),y=(0,Y.useRef)(null),b=`thread-folder-${e.id.replace(/[^a-zA-Z0-9_-]/g,`-`)}`,x=e.id.replace(/[^a-zA-Z0-9_-]/g,`-`),{visibleConversations:S,isPreviewTruncated:C,isShowingAll:w}=Wr(e.conversations,{expanded:n,activeConversationId:s});return(0,X.jsxs)(V.section,{ref:y,layout:a?`position`:!1,transition:{type:`spring`,stiffness:600,damping:45},"aria-labelledby":b,"data-testid":`thread-folder-${x}`,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-${x}`,className:L(`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:L(r&&`opacity-0`),children:[(0,X.jsxs)(`div`,{className:L(`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:b,"aria-expanded":t,"aria-controls":`thread-folder-content-${x}`,"data-testid":`thread-folder-drag-${x}`,"aria-label":_(t?R.CONVERSATION_PANEL$COLLAPSE_FOLDER:R.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=y.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:L(`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)(ue,{className:L(`h-4 w-4 shrink-0`,t?`hidden group-hover/folder:block`:`block group-hover/folder:hidden`),"aria-hidden":!0}),(0,X.jsx)(U,{className:L(`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:L(`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":_(R.CONVERSATION_PANEL$ADD_CONVERSATION_TO_GROUP,{label:e.label}),"data-testid":`add-conversation-to-group-${x}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),h()},children:(0,X.jsx)(_e,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0,strokeWidth:2})})]}),t?(0,X.jsxs)(`div`,{id:`thread-folder-content-${x}`,className:`mt-0.5 space-y-0.5`,children:[S.map(g),C?(0,X.jsx)(`div`,{className:`pl-2`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`thread-folder-view-more-${x}`,onClick:m,className:`cursor-pointer text-xs text-[var(--oh-text-dim)] hover:text-white`,children:_(w?R.CONVERSATION_PANEL$LESS:R.CONVERSATION_PANEL$MORE)})}):null]}):null]})]})}function ni({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}=v(`openhands`),[p,m]=(0,Y.useState)(null),[h,g]=(0,Y.useState)(null),[_,y]=(0,Y.useState)(null),[b,x]=(0,Y.useState)(!1),S=(0,Y.useRef)(null);(0,Y.useEffect)(()=>()=>{S.current&&clearTimeout(S.current)},[]);let C=(0,Y.useCallback)(()=>{S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{x(!1),S.current=null},300)},[]),w=(0,Y.useCallback)(()=>{m(null),g(null),y(null)},[]),T=(0,Y.useCallback)(e=>{let t=e.currentTarget.getBoundingClientRect();return e.clientY<t.top+t.height/2?`before`:`after`},[]),E=(0,Y.useCallback)((e,i)=>{if(!p||p===e){w(),C();return}r(ei(n,t,p,e,i)),w(),C()},[p,n,t,w,r,C]);return(0,X.jsx)(`nav`,{"aria-label":f(R.SIDEBAR$CONVERSATIONS),className:`space-y-1 md:space-y-0.5 pb-1`,children:e.map(e=>(0,X.jsx)(ti,{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:b,isCreatingConversationFlow:c,activeConversationId:l,onToggleExpanded:()=>o(e.id),onDragStart:()=>{x(!0),m(e.id)},onDragEnd:()=>{w(),C()},onDragOver:t=>{t.preventDefault();let{dataTransfer:n}=t;n&&(n.dropEffect=`move`),g(e.id),y(T(t))},onDragLeave:()=>{g(t=>t===e.id?null:t)},onDrop:t=>{t.preventDefault(),E(e.id,T(t))},onTogglePreviewExpanded:()=>s(e.id),onLaunchFromGroup:()=>u(e.launch),renderConversationCard:d},e.id))})}function ri({pinnedConversations:e,isPreviewExpanded:t,onTogglePreviewExpanded:n,activeConversationId:r,showDivider:i=!1,renderConversationCard:a}){let{t:o}=v(`openhands`),{visibleConversations:s,isPreviewTruncated:c,isShowingAll:l}=Wr(e,{limit:5,expanded:t,activeConversationId:r});return(0,X.jsxs)(`section`,{"data-testid":`conversation-panel-pinned-section`,className:L(`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)(kn,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0}),o(R.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?R.CONVERSATION_PANEL$LESS:R.CONVERSATION_PANEL$MORE)})}):null]})}var ii={pinsByBackendId:{}};function ai(e,t){return e[t]??[]}var oi=Nt()(Mt((e,t)=>({...ii,pinConversation:(n,r)=>{let i=ai(t().pinsByBackendId,n);i.includes(r)||e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:[r,...i]}}))},unpinConversation:(n,r)=>{let i=ai(t().pinsByBackendId,n);i.includes(r)&&e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:i.filter(e=>e!==r)}}))},togglePin:(e,n)=>{ai(t().pinsByBackendId,e).includes(n)?t().unpinConversation(e,n):t().pinConversation(e,n)},pruneMissingConversations:(n,r)=>{let i=new Set(r),a=ai(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:Pt(()=>localStorage),partialize:e=>({pinsByBackendId:e.pinsByBackendId})})),si=()=>{},ci=[],li=3600*1e3,ui=e=>{let t=Date.now()-li,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 di({onClose:e,compact:t=!1}){let{t:n}=v(`openhands`),{conversationId:r,navigate:a}=He(),{backend:o}=A(),s=sn(e??si),[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),y=Z(e=>e.showRepoBranchMetadata),b=Z(e=>e.toggleShowRepoBranchMetadata),x=Z(e=>e.showLlmProfiles),S=Z(e=>e.toggleShowLlmProfiles),C=Z(e=>e.showTagsMetadata),w=Z(e=>e.toggleShowTagsMetadata),T=Z(e=>e.showHoverMetadata),D=Z(e=>e.toggleShowHoverMetadata),O=Z(e=>e.organizeMode),j=Z(e=>e.setOrganizeMode),N=Z(e=>e.conversationSort),P=Z(e=>e.setConversationSort),F=Z(e=>e.threadScope),ee=Z(e=>e.setThreadScope),z=Z(e=>e.groupFolderOrder),te=Z(e=>e.setGroupFolderOrder),[B,V]=Y.useState(!1),[H,U]=Y.useState(!1),ne=sn(()=>{V(!1)}),[re,ie]=Y.useState(()=>new Set),[ae,oe]=Y.useState(()=>new Set),[se,ce]=Y.useState(!1),W=oi(e=>e.pinsByBackendId[o.id]??ci),le=oi(e=>e.togglePin),ue=oi(e=>e.pruneMissingConversations),de=Y.useCallback(e=>{ie(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),fe=Y.useCallback(e=>{oe(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);Y.useEffect(()=>{O!==`grouped`&&(ie(new Set),oe(new Set))},[O]);let pe=Y.useRef(null),[me,he]=Y.useState(null),[ge,_e]=Y.useState(null),[ve,ye]=Y.useState(null),{data:be,isLoading:xe,isFetched:Se,hasNextPage:Ce,isFetching:we,isFetchingNextPage:Te,fetchNextPage:Ee}=tr(),{data:De}=nr(),G=Y.useMemo(()=>{let e=be?.pages.flatMap(e=>e.items)??[],t=new Set;return e.filter(e=>t.has(e.id)?!1:(t.add(e.id),!0))},[be]),Oe=Y.useMemo(()=>Gr(W,G),[G,W]);Y.useEffect(()=>{Se&&ue(o.id,G.map(e=>e.id))},[o.id,G,Se,ue]),Y.useEffect(()=>{W.length===0&&ce(!1)},[W.length]);let ke=Y.useMemo(()=>{let e=F===`relevant`?G.filter(e=>I(e.execution_status)):G;return t?e:Kr(e,W)},[t,G,W,F]),{recent:K,older:Ae}=Y.useMemo(()=>ui(ke),[ke]),je=Y.useMemo(()=>Yr(g?[...K,...Ae]:K,N),[K,Ae,g,N]),Me=Y.useMemo(()=>({emptyWorkspace:n(R.CONVERSATION_PANEL$NO_WORKSPACE),emptyRepository:n(R.CONVERSATION_PANEL$NO_REPOSITORY)}),[n]),Ne=Y.useMemo(()=>t||O!==`grouped`?null:Qr([...K,...g?Ae:[]],o.kind,N,Me),[o.kind,t,N,Me,Ae,O,K,g]),q=Y.useMemo(()=>Ne?$r(Ne,z):null,[Ne,z]),Pe=Y.useMemo(()=>Ne?.map(e=>e.id)??[],[Ne]),Fe=Y.useMemo(()=>Yr(K.filter(e=>I(e.execution_status)),N),[N,K]),Ie=je.length,Le=Y.useMemo(()=>q?q.reduce((e,t)=>e+t.conversations.length,0):0,[q]),Re=O===`grouped`&&!t?Le===0:Ie===0,ze=O===`grouped`&&!t?Le:Ie,[Be,Ve]=Y.useState(null),Ue=Y.useRef(ze);Ue.current=ze;let We=Y.useCallback(()=>{Ce&&Ve(Ue.current)},[Ce]);Y.useEffect(()=>{if(Be!==null){if(ze>Be){Ve(null);return}if(!Ce){Ve(null);return}we||Te||Ee()}},[Be,ze,Ce,we,Te,Ee]);let Ke=Be!==null||Te,{mutate:qe,mutateAsync:Je}=pt(),{mutate:Ye}=vt(),{mutate:Xe}=on(),Ze=Ae.length>0&&!g,Qe=!!Ce&&!Ze&&!t&&!Re,{mutate:$e}=ln(),et=E(),tt=Y.useCallback(e=>{et||$e({workingDir:e.workingDir,repository:e.repository,entryPoint:`sidebar_relaunch_project`},{onSuccess:e=>{a(`/conversations/${e.conversation_id}`)}})},[$e,et,a]),nt=Y.useCallback((e,t)=>{l(!0),he(e),_e(t)},[]),rt=Y.useCallback(e=>{d(!0),he(e)},[]),it=Y.useCallback((e,t)=>{Xe({conversationId:e,newTitle:t},{onSuccess:()=>{k(n(R.CONVERSATION$TITLE_UPDATED))}})},[n,Xe]),at=()=>{me&&qe({conversationId:me},{onSuccess:()=>{me===r&&a(`/conversations`)}})},ot=()=>{me&&Ye({conversationId:me})},st=async()=>{let e=G.map(e=>e.id),t=await Promise.allSettled(e.map(e=>Je({conversationId:e}))),n=t.flatMap((t,n)=>t.status===`fulfilled`?[e[n]]:[]),i=t.length-n.length;r!==null&&n.includes(r)&&a(`/conversations`),i>0&&M(`${i} conversation${i===1?``:`s`} could not be deleted.`)},ct=Y.useCallback((n,a)=>{let s=W.includes(n.id);return t?(0,X.jsx)(kr,{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===r,onClose:e,showRepositoryMetadata:y,llmModel:n.llm_model,showLlmProfiles:x,agentKind:n.agent_kind,acpServer:n.acp_server,tags:n.tags,showTags:C},n.id):(0,X.jsx)(i,{placement:`right-start`,delay:1e3,closeDelay:100,isDisabled:!T||ve===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)(Sr,{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)(Ge,{to:`/conversations/${n.id}`,onClick:e,className:L(`block rounded-md transition-colors`,ve!==n.id&&`hover:bg-[var(--oh-surface)]`,(n.id===r||ve===n.id)&&`bg-[var(--oh-surface)]`),children:(0,X.jsx)(yr,{onDelete:()=>nt(n.id,n.title??``),onStop:()=>rt(n.id),onChangeTitle:e=>it(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:ve===n.id,onContextMenuToggle:e=>ye(e?n.id:null),isActive:n.id===r,workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,showRepositoryMetadata:y,llmModel:n.llm_model,showLlmProfiles:x,agentKind:n.agent_kind,acpServer:n.acp_server,tags:n.tags,showTags:C,isPinned:s,onTogglePin:()=>le(o.id,n.id),alwaysShowPinIcon:s&&!a?.inPinnedSection})})},n.id)},[o.id,t,r,it,nt,rt,e,ve,W,y,x,C,T,le]),J=xe||!Se,lt=!t&&!J&&Oe.length>0,ut=Se&&!xe&&!t&&Re&&!lt&&!De?.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:L(`-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b`,H?`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(R.SIDEBAR$CONVERSATIONS)}),(0,X.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,X.jsx)(Ur,{backendKind:o.kind}),(0,X.jsx)(Ir,{filterMenuOpen:B,setFilterMenuOpen:V,menuRef:ne,backendKind:o.kind,organizeMode:O,setOrganizeMode:j,conversationSort:N,setConversationSort:P,threadScope:F,setThreadScope:ee,showOlderConversations:g,toggleShowOlderConversations:_,showRepoBranchMetadata:y,toggleShowRepoBranchMetadata:b,showLlmProfiles:x,toggleShowLlmProfiles:S,showTagsMetadata:C,toggleShowTagsMetadata:w,showHoverMetadata:T,toggleShowHoverMetadata:D,totalConversationsCount:G.length,onRequestDeleteAll:()=>h(!0)})]})]})}),(0,X.jsxs)(`div`,{ref:pe,"data-testid":`conversation-panel-list-scroll`,onScroll:e=>{U(e.currentTarget.scrollTop>0)},className:L(`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:[J&&(0,X.jsx)(Or,{compact:t}),!t&&ut&&(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(R.CONVERSATION$NO_CONVERSATIONS)})}),lt?(0,X.jsx)(ri,{pinnedConversations:Oe,isPreviewExpanded:se,onTogglePreviewExpanded:()=>ce(e=>!e),activeConversationId:r,showDivider:!t&&O===`chronological`,renderConversationCard:e=>ct(e,{inPinnedSection:!0})}):null,!t&&De?.map(t=>(0,X.jsx)(Ge,{to:`/conversations/task-${t.id}`,onClick:e,className:`block`,children:(0,X.jsx)(Dr,{task:t})},t.id)),!J&&t?Fe.map(e=>ct(e)):null,!J&&!t&&O===`grouped`&&q&&q.length>0?(0,X.jsx)(ni,{groups:q,groupIds:Pe,groupFolderOrder:z,setGroupFolderOrder:te,collapsedGroupIds:re,expandedGroupPreviewIds:ae,onToggleGroupCollapsed:de,onToggleGroupPreviewExpanded:fe,isCreatingConversationFlow:et,activeConversationId:r,onLaunchFromGroup:tt,renderConversationCard:e=>ct(e)}):null,!J&&!t&&O===`chronological`?(0,X.jsx)(`div`,{className:`space-y-0.5`,children:je.map(e=>ct(e))}):null,Qe&&(Ke?(0,X.jsx)(`div`,{className:`py-1`,children:(0,X.jsx)(Or,{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(R.CONVERSATION$LOAD_MORE)})}))]}),c&&(0,X.jsx)(Qt,{onConfirm:()=>{at(),l(!1),_e(null)},onCancel:()=>{l(!1),_e(null)},conversationTitle:ge??void 0}),m&&(0,X.jsx)(Qt,{title:n(R.CONVERSATION$CONFIRM_DELETE_ALL_TITLE),description:n(R.CONVERSATION$CONFIRM_DELETE_ALL_DESC,{count:G.length}),onConfirm:async()=>{await st(),h(!1)},onCancel:()=>h(!1)}),u&&(0,X.jsx)(Zt,{onConfirm:()=>{ot(),d(!1)},onCancel:()=>d(!1)}),f&&(0,X.jsx)(rr,{onConfirm:()=>{e?.()},onClose:()=>p(!1),onCancel:()=>p(!1)})]})}function fi({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)(di,{})})})}var pi=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,mi=34,hi=Math.round(mi*30/46);function gi({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:_}=v(`openhands`),y=m;return(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,X.jsxs)(`div`,{className:Xe(e),children:[(0,X.jsxs)(`div`,{className:L(e&&t?Ze:`flex min-w-0 shrink-0 items-center`),children:[(0,X.jsx)(`div`,{className:L(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)(Fn,{logoWidth:mi,logoHeight:hi,logoClassName:`max-w-none`,className:L(Ke,`overflow-visible`)})}),e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":i,onClick:o,className:L(Qe,s?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`),children:(0,X.jsx)(b,{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:L(`hidden md:inline-flex ml-auto`,Ye,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(B,{width:14,height:14})}):null,!e&&n?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-drawer-close`,onClick:r,"aria-label":_(R.SIDEBAR$CLOSE_MENU),className:L(`inline-flex ml-auto`,Ye,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(B,{width:14,height:14})}):null]}),(0,X.jsxs)(`nav`,{className:qe(e),children:[(0,X.jsx)(er,{collapsed:e}),(0,X.jsx)(tt,{to:`/conversations`,end:!0,label:_(R.SIDEBAR$NEW_CHAT),testId:`sidebar-conversations-link`,collapsed:e,icon:(0,X.jsx)(_e,{width:$,height:$})}),(0,X.jsx)(tt,{to:`/customize`,label:_(R.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)(tt,{to:`/automations`,label:_(R.SIDEBAR$AUTOMATIONS),testId:`sidebar-automations-link`,collapsed:e,icon:(0,X.jsx)(pi,{width:$,height:$})})]}),(0,X.jsx)(fi,{collapsed:e}),e&&t?(0,X.jsxs)(`nav`,{className:L(qe(e),`mt-auto pb-2 cursor-pointer`),children:[(0,X.jsx)(nt,{content:_(R.SIDEBAR$SETTINGS),placement:`right`,children:(0,X.jsxs)(Ge,{to:`/settings`,"data-testid":`collapsed-settings-link`,"aria-label":_(R.SIDEBAR$SETTINGS),className:Je({collapsed:!0}),children:[(0,X.jsx)(et,{active:l.startsWith(`/settings`),children:(0,X.jsx)(be,{width:$,height:$})}),(0,X.jsx)(`span`,{className:$e(!0),children:_(R.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":_(R.BACKEND$MANAGE),"aria-expanded":d,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>e.stopPropagation(),className:L(Je({collapsed:!0}),`relative`),children:[(0,X.jsx)(et,{active:d,children:(0,X.jsxs)(`span`,{className:`relative inline-flex size-[18px] shrink-0 items-center justify-center`,children:[(0,X.jsx)(It,{isConnected:u?.isConnected??null,className:`absolute -left-0.5 -top-0.5 z-[1] pointer-events-none`}),(0,X.jsx)(An,{width:$,height:$})]})}),(0,X.jsx)(`span`,{className:$e(!0),children:_(R.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)(Zn,{sidebarCollapsed:e,hideTrigger:!0,defaultOpen:!0,openUpward:!0,onSelectOption:()=>f(!1),onOpenAddBackend:h,onOpenManageBackends:g})}):null]})]}):null,e?null:(0,X.jsx)(`div`,{className:L(`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)(Zn,{sidebarCollapsed:e,openUpward:!0})})]})}var _i=Y.lazy(()=>a(()=>import(`./settings-modal-CFnbQ8_4.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,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61]))),vi=Y.lazy(()=>a(()=>Promise.resolve().then(()=>Un).then(e=>({default:e.AddBackendModal})),void 0)),yi=Y.lazy(()=>a(()=>import(`./manage-backends-modal-DhflyGTf.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__vite__mapDeps([62,1,2,3,4,5,6,7,8,11,63,64,65,66,67,47,46,18,48,68,69,26,70,25,34,15,29,33,31,71,14,72,32,73,74]))),bi=250;function xi(){let{t:e}=v(`openhands`),{currentPath:t}=He(),{data:n}=je(),{data:r,error:i,isError:a,isFetching:o}=q(),{backends:s,active:c}=j(),l=K(s)[c.backend.id],u=xe(e=>e.collapsed),d=xe(e=>e.setCollapsed),[f,p]=Y.useState(!1),[m,h]=Y.useState(!1),g=Y.useRef(null),[_,y]=Y.useState(!1),[b,x]=Y.useState(!1),[S,C]=Y.useState(!1),w=Y.useRef(!1),[,T]=Y.useReducer(e=>e+1,0),{isOpen:E,close:D}=tn(),[O,k]=Y.useState(!1),[A,N]=Y.useState(!1),P=sn(()=>h(!1)),F=Pe(i);Y.useEffect(()=>{D()},[t,D]),Y.useEffect(()=>{if(E){k(!0);let e=requestAnimationFrame(()=>{N(!0)});return()=>cancelAnimationFrame(e)}N(!1);let e=window.setTimeout(()=>{k(!1)},bi);return()=>window.clearTimeout(e)},[E]),Y.useEffect(()=>{if(!E)return;let e=e=>{e.key===`Escape`&&D()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[E,D]),Y.useEffect(()=>{t===`/settings`?p(!1):!o&&a&&F!==404?M(e(R.SETTINGS$FETCH_ERROR)):F===404&&!n?.feature_flags?.hide_llm_settings&&p(!0)},[t,o,a,F,n?.feature_flags?.hide_llm_settings,e]);let I=e(u?R.SIDEBAR$EXPAND:R.SIDEBAR$COLLAPSE),ee=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]),z={collapseToggleLabel:I,onCollapse:Y.useCallback(()=>{C(!1),w.current=!0,T(),d(!0),window.setTimeout(()=>{w.current=!1,T()},250)},[d]),onExpand:()=>d(!1),showCollapsedExpandButton:u&&S&&!w.current,isExtensionsActive:t===`/customize`||t.startsWith(`/skills`)||t===`/plugins`||t===`/mcp`,currentPath:t,activeBackendHealth:l,collapsedBackendPopoverOpen:m,setCollapsedBackendPopoverOpen:h,collapsedBackendPopoverRef:P,collapsedBackendCloseTimer:g,onOpenAddBackend:()=>y(!0),onOpenManageBackends:()=>x(!0)};return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`aside`,{"aria-label":e(R.SIDEBAR$NAVIGATION_LABEL),"data-collapsed":u?`true`:`false`,onClick:ee,onMouseEnter:()=>{u&&C(!0)},onMouseLeave:()=>{C(!1)},className:L(`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)(gi,{collapsed:u,showCollapseToggle:!0,...z})}),O?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:L(`fixed inset-0 z-40 bg-black/50 md:hidden`,`transition-opacity ease-in-out motion-reduce:transition-none`,A?`opacity-100`:`pointer-events-none opacity-0`),style:{transitionDuration:`${bi}ms`},onClick:D,"aria-hidden":!A}),(0,X.jsx)(`aside`,{"aria-label":e(R.SIDEBAR$NAVIGATION_LABEL),"data-testid":`sidebar-mobile-drawer`,"aria-hidden":!A,className:L(`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`,A?`translate-x-0`:`-translate-x-full`),style:{transitionDuration:`${bi}ms`},children:(0,X.jsx)(gi,{collapsed:!1,showCollapseToggle:!1,showMobileCloseButton:!0,onCloseMobile:D,...z})})]}):null,f&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(_i,{settings:r,onClose:()=>p(!1)})}),_&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(vi,{onClose:()=>y(!1)})}),b&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(yi,{onClose:()=>x(!1)})})]})}var Si=`/settings`,Ci=`/customize`,wi=[`/skills`,`/mcp`,`/plugins`];function Ti(e){return e===Si?{mode:`menu`}:e.startsWith(`${Si}/`)&&e.length>9?{mode:`back`,backTo:Si,backLabelKey:R.SETTINGS$TITLE}:e===Ci?{mode:`menu`}:wi.some(t=>e===t||e.startsWith(`${t}/`))?{mode:`back`,backTo:Ci,backLabelKey:R.NAV$CUSTOMIZE}:{mode:`menu`}}function Ei(){let{t:e}=v(`openhands`),{currentPath:t,navigate:n}=He(),r=Ti(t);return(0,X.jsxs)(`header`,{className:`flex md:hidden h-12 shrink-0 items-center gap-2 px-2.5`,"aria-label":e(R.SIDEBAR$NAVIGATION_LABEL),children:[(0,X.jsx)(an,{}),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??R.COMMON$BACK),className:nn,children:(0,X.jsx)(B,{size:20,className:$t,"aria-hidden":!0,strokeWidth:2})}):null]})}function Di(){let{backend:e}=A(),t=e.kind===`local`,{data:n}=cn(),{mutate:r,isPending:i}=Se(),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 Oi=()=>{let{backend:e}=A(),{data:t}=q(),{mutate:n,isPending:r}=Fe(`personal`,{retry:2}),i=Y.useSyncExternalStore(Oe,Te,()=>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`&&ke(i);return}if(e.kind!==`cloud`)return;let o=`${e.id}:${i}`;if(r||a.current===o)return;a.current=o,n({user_consents_to_analytics:i===`granted`});return}t.user_consents_to_analytics!==null&&De(t.user_consents_to_analytics===!0?`granted`:`denied`,{syncToCloud:!1})}},[e.id,e.kind,r,i,n,t])};function ki(){let{backend:e}=A(),t=Y.useSyncExternalStore(Oe,G,()=>`pending`),n=Y.useRef(null);Y.useEffect(()=>{if(e.kind!==`local`||t===`pending`)return;let r=`${e.id}:${e.host}:${e.apiKey??``}:${t}`;n.current!==r&&(n.current=r,Me.syncTelemetryConsent(t).catch(()=>{}))},[e.apiKey,e.host,e.id,e.kind,t])}var Ai=`agent_canvas_cloud_cookie_backend_added`,ji=new Set;function Mi(e,t){return`${Ai}:${e}:${t}`}function Ni(e,t){let n=Mi(e,t);if(typeof window>`u`)return!0;try{return window.sessionStorage.getItem(n)===`true`||ji.has(n)}catch{return ji.has(n)}}function Pi(e,t){let n=Mi(e,t);if(!(typeof window>`u`))try{window.sessionStorage.setItem(n,`true`)}catch{ji.add(n)}}var Fi=()=>{let{backend:e,orgId:t}=A(),{data:n}=q(),{trackBackendAdded:r}=Ne(),i=Y.useRef(r),a=At(),o=e.kind===`cloud`?a[e.id]:void 0,s=o?.isLoading??!0,c=o?.userId??null,l=(n?.email||n?.git_user_email)?.trim()||void 0;Y.useEffect(()=>{i.current=r},[r]),Y.useEffect(()=>{if(e.kind!==`cloud`){Ee(null);return}if(!s){if(!c){Ee(null);return}Ee({userId:c,email:l,orgId:t}),e.authMode===`cookie`&&l&&!Ni(e.id,c)&&(i.current({backendKind:`cloud`,connectionMethod:`cloud_cookie`,hasApiKey:!1,source:`cloud_auto_connect`}),Pi(e.id,c))}},[e.authMode,e.id,e.kind,l,s,t,c])};function Ii(e){switch(e){case P.RUNNING:return`🟢`;case P.FINISHED:case P.IDLE:case P.WAITING_FOR_CONFIRMATION:return`✅`;case P.PAUSED:return`⚪`;case P.ERROR:case P.STUCK:return`🔴`;default:return null}}var Li=`OpenHands`,Ri=()=>{let{conversationId:e}=s(),{data:t}=bn(e??null),n=Jt(e=>e.execution_status),r=t?.title,i=e&&r?`${r} | ${Li}`:Li;if(!e)return i;let a=Ii(n??t?.execution_status??null);return a?`${a} ${i}`:i};function zi({children:e}){let{pathname:t}=c(),n=d(),r=_(),i=u(),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)(Ue,{value:Y.useMemo(()=>({currentPath:t,conversationId:a,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[t,a,r.location,n]),children:e})}var Bi=Y.lazy(()=>a(()=>import(`./environment-switch-overlay-D0FgCMqs.js`),__vite__mapDeps([75,1,2,8,5,6,76,7]))),Vi=Y.lazy(()=>a(()=>import(`./alert-banner-C1nzoXBC.js`).then(e=>({default:e.AlertBanner})),__vite__mapDeps([77,1,2,78,4,5,8,6,11,79,80,7,14,81,44,38]))),Hi=Y.lazy(()=>a(()=>import(`./command-menu-N_BriUy8.js`).then(e=>({default:e.CommandMenu})),__vite__mapDeps([82,1,2,83,4,5,8,6,84,85,86,87,88,7,14]))),Ui=m(function(){let e=p(),{t}=v(`openhands`);return h(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(R.ERROR$GENERIC)}),(0,X.jsx)(`pre`,{children:e.message})]}):(0,X.jsx)(`div`,{children:(0,X.jsx)(`h1`,{children:t(R.ERROR$UNKNOWN)})})}),Wi=f(function(){let e=c(),t=Ri(),{data:n}=q(),r=je();if(ki(),Oi(),Fi(),Di(),Y.useEffect(()=>{n?.language&&O.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)(Ae,{size:`large`})});let i=/^\/conversations\/[^/]+/.test(e.pathname),a=W(e.search);return(0,X.jsx)(zi,{children:(0,X.jsxs)(Yt,{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)(xi,{}),(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)(Ei,{}),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)(Vi,{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)(g,{})})]})]}),(0,X.jsxs)(Y.Suspense,{fallback:null,children:[(0,X.jsx)(Bi,{}),(0,X.jsx)(Hi,{})]}),a?(0,X.jsx)(pe,{}):null]})})});export{Ui as ErrorBoundary,Wi as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as i}from"./useQuery-B38jBavx.js";import{n as a,z as o}from"./active-backend-context-BlZPzZNU.js";import{t as s}from"./utils-qjs_KuS4.js";import{t as c}from"./settings-service.api-DryhKdSr.js";import{h as l,l as u}from"./form-control-classes-CSPevi7c.js";import{t as d}from"./dist-hOnv1nn2.js";import{n as f,t as p}from"./settings-input-BjW_zyTN.js";import{a as m,i as h,n as ee}from"./llm-subscription-DTqtBCWz.js";import{t as te}from"./use-is-authed-BsS4XwSL.js";import{t as ne}from"./settings-dropdown-input-Dx6vlkgf.js";import{r as g}from"./typography-C6fuRTTT.js";import{t as _}from"./settings-switch-UNSf8K8I.js";var v=e(t(),1),y=n(),b=d(``,{variants:{size:{default:`text-xs`,settings:`text-sm text-[var(--oh-muted)] font-normal leading-5.5`},linkColor:{default:``,white:`text-white`}},defaultVariants:{size:`default`,linkColor:`default`}});function x({testId:e,text:t,linkText:n,href:r,suffix:i,size:a,linkColor:o,className:c,linkTextClassName:l,suffixClassName:u}){return(0,y.jsxs)(`p`,{"data-testid":e,className:s(b({size:a}),c),children:[t,` `,(0,y.jsx)(`a`,{href:r,rel:`noreferrer noopener`,target:`_blank`,className:s(`underline underline-offset-2`,b({size:a,linkColor:o}),l),children:n}),i&&(0,y.jsx)(`span`,{className:u,children:i})]})}var S=`llm`;function C(e){if(!e?.sections)return e;let t=!1,n=e.sections.map(e=>{if(e.key!==S)return e;let n=new Set(e.fields.map(e=>e.key)),r=h.filter(e=>!n.has(e.key));return r.length===0?e:(t=!0,{...e,fields:[...e.fields,...r]})});return t?{...e,sections:n}:e}var w=(e,t)=>{let{data:n}=te(),{backend:r,orgId:s}=a(),l=!o(r),{data:u,error:d,isLoading:f,isFetching:p}=i({queryKey:[`settings-schema`,e,r.id,s,r.kind,r.host,r.apiKey],queryFn:e===`conversation`?c.getConversationSettingsSchema:c.getSettingsSchema,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,enabled:!t&&!!n&&l,meta:{disableToast:!0}}),m=(0,v.useMemo)(()=>e===`agent`?C(t):t,[t,e]),h=(0,v.useMemo)(()=>e===`agent`?C(u):u,[u,e]);return t?{data:m,error:null,isLoading:!1,isFetching:!1}:{data:h,error:d,isLoading:f,isFetching:p}},T=e=>w(`agent`,e),re=e=>w(`conversation`,e);function E(e,t){return`SCHEMA$${e.replace(/\./g,`$`).toUpperCase()}$${t}`}var D=e=>!!e?.includes(`$`),O={tool_concurrency_limit:{constraints:{min:1,step:1}},"llm.top_p":{constraints:{min:0,max:1,step:.01}},"llm.temperature":{constraints:{min:0,max:2,step:.1}}};function k(e){return O[e]?.constraints}function A(e,t,n,r){if(D(r))return e(r);let i=E(t,n);return e(i,{defaultValue:``})||(r&&console.warn(`[i18n] Missing translation for key "${i}", falling back to: "${r}"`),r??null)}function j(e,t,n){return A(e,t,`LABEL`,n)??``}function M(e,t,n){return A(e,t,`DESCRIPTION`,n)}function ie(e,t,n,r){if(D(r))return e(r);let i=`SCHEMA$${t.replace(/\./g,`$`).toUpperCase()}$CHOICE$${String(n).toUpperCase()}`;return e(i,{defaultValue:``})||(console.warn(`[i18n] Missing translation for key "${i}", falling back to: "${r}"`),r)}var ae=new Set([`llm.model`,`llm.api_key`,`llm.base_url`,ee,m]),oe={basic:new Set([`critical`]),advanced:new Set([`critical`,`major`]),all:new Set([`critical`,`major`,`minor`])};function N(e){return!!e&&Array.isArray(e.sections)}function P(e){return N(e)?e.sections.flatMap(e=>e.fields):[]}function F(e,t){if(!e)return;let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r}function I(e,t,n){let r=t.split(`.`),i=e;for(let e=0;e<r.length-1;e+=1){let t=r[e];(i[t]==null||typeof i[t]!=`object`||Array.isArray(i[t]))&&(i[t]={}),i=i[t]}i[r[r.length-1]]=n}function L(e,t,n=`agent_settings`){return F(e[n],t)??null}function R(e,t){return L(e,t,`agent_settings`)}function z(e){return e.choices.length>0}function B(e){return e.prominence===`critical`}function V(e){return e.prominence===`minor`}function H(e,t){let n=t??e.default;return z(e)?n==null?``:String(n):e.value_type===`boolean`?!!(n??!1):n==null?``:e.value_type===`array`||e.value_type===`object`?JSON.stringify(n,null,2):String(n)}function U(e,t){if(t===void 0)return null;if(e.value_type===`boolean`){if(typeof t==`string`){if(t===`true`)return!0;if(t===`false`)return!1}return t===null?null:!!t}if(e.value_type===`integer`||e.value_type===`number`){if(t===``||t===null)return null;let e=typeof t==`number`?t:Number(String(t));return Number.isNaN(e)?null:e}if(e.value_type===`array`||e.value_type===`object`){if(t===null||e.value_type===`object`&&typeof t==`object`&&!Array.isArray(t)&&Object.keys(t).length===0)return null;if(typeof t==`string`){let n=t.trim();if(!n)return null;try{let t=JSON.parse(n);return e.value_type===`object`&&typeof t==`object`&&t&&!Array.isArray(t)&&Object.keys(t).length===0?null:JSON.stringify(t)}catch{return n}}return JSON.stringify(t)}return t===null?null:String(t)}function W(e,t,n=`agent_settings`){let r=t??(n===`conversation_settings`?e.conversation_settings_schema:e.agent_settings_schema);return r?Object.fromEntries(P(r).map(t=>[t.key,H(t,L(e,t.key,n))])):{}}function G(e,t,n=`agent_settings`){let r=t??(n===`conversation_settings`?e.conversation_settings_schema:e.agent_settings_schema);if(!r)return`basic`;let i=!1,a=!1;for(let t of P(r))B(t)||U(t,L(e,t.key,n)??t.default??null)!==U(t,t.default??null)&&(V(t)?i=!0:a=!0);return i?`all`:a?`advanced`:`basic`}function K(e,t){return e.depends_on.every(e=>t[e]===!0)}function q(e){if(typeof e==`boolean`)return e;let t=e.trim().toLowerCase();if(!t)return null;if(t===`true`)return!0;if(t===`false`)return!1;throw Error(`Expected a boolean value, received: ${e}`)}function J(e,t){if(e.value_type===`boolean`)return q(t);if(e.value_type===`integer`||e.value_type===`number`){let n=String(t).trim();if(!n)return null;let r=Number(n);if(Number.isNaN(r))throw Error(`Expected a numeric value, received: ${n}`);if(e.value_type===`integer`&&!Number.isInteger(r))throw Error(`Expected an integer value, received: ${n}`);let i=k(e.key);if(i?.min!=null&&r<i.min)throw Error(`${e.label} must be at least ${i.min}`);if(i?.max!=null&&r>i.max)throw Error(`${e.label} must be at most ${i.max}`);return r}if(e.value_type===`array`||e.value_type===`object`){let n=String(t).trim();if(!n)return null;let r;try{r=JSON.parse(n)}catch{throw Error(`Invalid JSON for ${e.label}`)}if(e.value_type===`array`){if(!Array.isArray(r))throw Error(`${e.label} must be a JSON array`);return r}if(r===null||Array.isArray(r)||typeof r!=`object`)throw Error(`${e.label} must be a JSON object`);return r}let n=String(t);return n===``&&!e.secret?null:n}function Y(e,t,n){let r={};for(let i of P(e))n[i.key]&&I(r,i.key,J(i,t[i.key]));return r}function X(e,t){return oe[t].has(e.prominence)}function se(e,t,n,r){let i=Y(e,t,n);for(let t of P(e))X(t,r)||I(i,t.key,t.default??null);return i}function Z(e,t,n,r=ae){return N(e)?e.sections.map(e=>({...e,fields:e.fields.filter(e=>!r.has(e.key)&&X(e,n)&&K(e,t))})).filter(e=>e.fields.length>0):[]}function ce(e){return e?P(e).some(e=>e.prominence===`critical`):!1}function le(e){return e?P(e).some(e=>e.prominence===`major`):!1}function ue(e){return e?P(e).some(e=>e.prominence===`minor`):!1}var de={"llm.api_key":{textKey:`SCHEMA$LLM$API_KEY$HELP_TEXT`,linkTextKey:`SCHEMA$LLM$API_KEY$HELP_LINK_TEXT`,href:`https://docs.openhands.dev/usage/local-setup#getting-an-api-key`},"verification.critic_api_key":{textKey:`SCHEMA$VERIFICATION$CRITIC_API_KEY$HELP_TEXT`,linkTextKey:`SETTINGS$NAV_API_KEYS`,suffixKey:`SCHEMA$VERIFICATION$CRITIC_API_KEY$HELP_SUFFIX`,href:`https://app.all-hands.dev/settings/api-keys`,hideDescription:!0}};function Q({field:e}){let{t}=r(`openhands`),n=de[e.key],i=M(t,e.key,e.description);return(0,y.jsxs)(y.Fragment,{children:[i&&!n?.hideDescription?(0,y.jsx)(g.Paragraph,{className:`text-tertiary-alt text-xs leading-5`,children:i}):null,n?(0,y.jsx)(x,{testId:`help-link-${e.key}`,text:t(n.textKey),linkText:t(n.linkTextKey),href:n.href,suffix:n.suffixKey?` ${t(n.suffixKey)}`:void 0,size:`settings`,linkColor:`white`}):null]})}var fe=new Set([`verification.critic_api_key`]);function $(e){return e.choices.length>0}function pe(e){return e.value_type===`boolean`&&!$(e)}function me(e){return e.value_type===`array`||e.value_type===`object`}function he(e){return e.key.endsWith(`url`)||e.key.endsWith(`_url`)}function ge(e){return e.secret?`password`:e.value_type===`integer`||e.value_type===`number`?`number`:e.value_type===`string`&&he(e)?`url`:`text`}function _e({field:e,value:t,isDisabled:n,onChange:i}){let{t:a}=r(`openhands`),o=j(a,e.key,e.label),c=k(e.key);return pe(e)?(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(_,{testId:`sdk-settings-${e.key}`,isToggled:!!t,isDisabled:n,onToggle:i,children:o}),(0,y.jsx)(`div`,{className:l,children:(0,y.jsx)(Q,{field:e})})]}):$(e)?(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(ne,{testId:`sdk-settings-${e.key}`,name:e.key,label:o,items:e.choices.map(t=>({key:String(t.value),label:ie(a,e.key,t.value,t.label)})),selectedKey:t===``?void 0:String(t),isClearable:!e.required,required:e.required,showOptionalTag:!e.required,isDisabled:n,onSelectionChange:e=>i(String(e??``))}),(0,y.jsx)(Q,{field:e})]}):me(e)?(0,y.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`text-sm`,children:o}),e.required?null:(0,y.jsx)(f,{})]}),(0,y.jsx)(`textarea`,{"data-testid":`sdk-settings-${e.key}`,name:e.key,value:String(t??``),required:e.required,disabled:n,onChange:e=>i(e.target.value),className:s(u,`min-h-32 font-mono placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)}),(0,y.jsx)(Q,{field:e})]}):(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(p,{testId:`sdk-settings-${e.key}`,name:e.key,label:o,type:ge(e),value:String(t??``),required:e.required,showOptionalTag:!e.required,isDisabled:n,onChange:i,className:`w-full`,min:c?.min,max:c?.max,step:c?.step}),(0,y.jsx)(Q,{field:e})]})}export{T as _,se as a,Z as c,ue as d,G as f,j as g,M as h,Y as i,le as l,H as m,_e as n,J as o,N as p,W as r,R as s,fe as t,ce as u,re as v,x as y};
@@ -1 +0,0 @@
1
- import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-Cyuzqnbw.js";import{d as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{C as n,D as r,I as i}from"./active-backend-context-BlZPzZNU.js";import{t as a}from"./proxy-C79PCMjo.js";async function o(e,t=3,n=500){for(let r=0;r<t;r+=1)try{return await e()}catch(e){if(r>=t-1)throw e;let i=n*2**r;await new Promise(e=>{setTimeout(e,i)})}throw Error(`Retry attempts exhausted`)}var s=100;function c(){let e=i().backend;if(e.kind!==`cloud`)throw Error(`Cloud secrets call requires a cloud backend.`);return e}async function l(){let e=c(),t=[],n=null;do{let r=new URLSearchParams({limit:String(s)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/secrets/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}async function u({name:e,value:t,description:n,previousName:r}){let i=c();r!==void 0&&await o(()=>a({backend:i,method:`PUT`,path:`/api/v1/secrets/${encodeURIComponent(r)}`,body:{name:e,description:n}})),t!==void 0&&await o(()=>a({backend:i,method:`POST`,path:`/api/v1/secrets`,body:{name:e,value:t,description:n}}))}async function d(e){await a({backend:c(),method:`DELETE`,path:`/api/v1/secrets/${encodeURIComponent(e)}`})}var f=e({SecretsService:()=>p}),p=class{static async getSecrets(){try{return i().backend.kind===`cloud`?await o(()=>l()):(await o(()=>new t(r()).listSecrets())).secrets.map(e=>({name:e.name,description:e.description}))}catch(e){return console.error(`Failed to fetch secrets after retries:`,e),[]}}static async createSecret(e,n,a){if(i().backend.kind===`cloud`){await u({name:e,value:n,description:a});return}await o(()=>new t(r()).upsertSecret({name:e,value:n,description:a}))}static async updateSecret(e,n,a,s){if(i().backend.kind===`cloud`){await u({name:n,value:s,description:a,previousName:e});return}let c=new t(r()),l=s??await o(()=>c.getSecret(e));await o(()=>c.upsertSecret({name:n,value:l,description:a})),n!==e&&await this.deleteSecret(e)}static async deleteSecret(e){try{if(i().backend.kind===`cloud`){await o(()=>d(e));return}await o(()=>new t(r()).deleteSecret(e))}catch(e){if(n(e,404)||e&&typeof e==`object`&&`response`in e&&e.response?.status===404)return;throw e}}};export{f as n,p as t};
@@ -1 +0,0 @@
1
- import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{t}from"./utils-qjs_KuS4.js";var n=e();function r({value:e,options:r,onChange:i,ariaLabel:a,testId:o}){return(0,n.jsx)(`div`,{role:`radiogroup`,"aria-label":a,"data-testid":o,className:`inline-flex items-center rounded-md bg-[var(--oh-surface-raised)] p-0.5 text-xs`,children:r.map(r=>{let a=r.value===e;return(0,n.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":a,"data-testid":o?`${o}-option-${r.value}`:void 0,onClick:()=>i(r.value),className:t(`px-2 py-0.5 rounded cursor-pointer transition-colors`,a?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:text-white`),children:r.label},r.value)})})}export{r as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{F as r,L as i,M as a,U as o,m as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{t as c}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{P as l,f as u,s as d}from"./active-backend-context-BlZPzZNU.js";import{t as f,z as p}from"./utils-qjs_KuS4.js";import{i as m,n as h,r as g,t as _}from"./use-settings-nav-items-Cva28C-c.js";import{n as v}from"./use-config-Csy8EAP9.js";import"./navigation-link-Bxmn-pCs.js";import"./sidebar-layout-DXHtbEj1.js";import{t as y}from"./sidebar-nav-link-pvUivfK2.js";import"./close-CDAVqnTn.js";import{r as b}from"./typography-C6fuRTTT.js";import{t as x}from"./settings-section-header-context-CnIIQAUn.js";import"./settings-gear-TYXnELES.js";import{n as S,r as C}from"./settings-utils-BL_Z9uIe.js";import{t as w}from"./use-breakpoint-DA7JqsRN.js";import{t as T}from"./backend-synced-settings-badge-BNpEylNP.js";import{t as E}from"./settings-like-page-layout-classes-DyxyJ0k4.js";var D=e(t(),1),O=n();function k({navigationItems:e}){let{t}=c(`openhands`),n=e.filter(e=>e.type===`item`);return(0,O.jsxs)(`aside`,{"data-testid":`settings-navbar-desktop`,className:f(`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,O.jsx)(b.Text,{className:`px-2 text-sm font-normal text-white`,children:t(p.SETTINGS$TITLE)}),(0,O.jsxs)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:[n.map(e=>(0,O.jsx)(y,{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,O.jsx)(h,{}),(0,O.jsx)(g,{})]}),(0,O.jsx)(`div`,{className:`px-2 pt-3`,children:(0,O.jsx)(m,{})}),(0,O.jsx)(`div`,{className:`px-2 pt-3`,children:(0,O.jsx)(T,{})})]})}function A({children:e,navigationItems:t}){return(0,O.jsx)(`div`,{className:`flex h-full flex-col md:pt-8`,children:(0,O.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-10 md:items-start`,children:[(0,O.jsx)(k,{navigationItems:t}),(0,O.jsx)(`main`,{className:E,children:(0,O.jsx)(`div`,{className:`mx-auto w-full min-w-0 max-w-[800px]`,children:e})})]})})}var j=async({request:e})=>{let{pathname:t}=new URL(e.url),n=(await l.fetchQuery({queryKey:u.WEB_CLIENT_CONFIG,queryFn:v.getConfig,...d}))?.feature_flags;if(C(t,n)){let e=S(n);if(e&&e!==t)return a(e)}return null};function M(){let{t:e}=c(`openhands`),t=r(),n=i(),a=_(),o=w(768),[l,u]=(0,D.useState)(!1),{currentSectionTitle:d,currentSectionSubtitle:f}=(0,D.useMemo)(()=>{let e=a.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=a.find(e=>e.type===`item`);return n?.type===`item`?{currentSectionTitle:n.item.text,currentSectionSubtitle:n.item.subtitle}:{currentSectionTitle:`SETTINGS$TITLE`,currentSectionSubtitle:null}},[a,t.pathname]),p=n.find(e=>e.pathname===t.pathname)?.handle,m=o&&t.pathname===`/settings`;return(0,O.jsx)(`main`,{"data-testid":`settings-screen`,className:`min-h-0`,children:(0,O.jsx)(x,{setHideSectionHeader:u,children:(0,O.jsx)(A,{navigationItems:a,children:(0,O.jsxs)(`div`,{className:`flex flex-col gap-6 pb-8`,children:[!(p?.hideTitle===!0||m||l)&&(0,O.jsxs)(`header`,{className:`space-y-1`,children:[(0,O.jsx)(b.H2,{children:e(d)}),f?(0,O.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:e(f)}):null]}),(0,O.jsx)(s,{})]})})})})}var N=o(M);export{j as clientLoader,N as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as i,z as a}from"./utils-qjs_KuS4.js";import{f as o}from"./form-control-classes-CSPevi7c.js";var s=e(t(),1),c=n();function l(){let{t:e}=r(`openhands`);return(0,c.jsx)(`span`,{className:`text-xs text-tertiary-alt`,children:e(a.COMMON$OPTIONAL)})}var u=(0,s.forwardRef)(function({testId:e,name:t,label:n,type:r,defaultValue:a,value:s,placeholder:u,showOptionalTag:d,isDisabled:f,startContent:p,className:m,onChange:h,onKeyDown:g,required:_,min:v,max:y,step:b,pattern:x,title:S,labelClassName:C,ariaDescribedBy:w,ariaInvalid:T,error:E,showRequiredTag:D,onBlur:O,inputClassName:k},A){let j=E&&e?`${e}-error`:void 0;return(0,c.jsxs)(`label`,{className:i(`flex flex-col gap-2.5 w-full min-w-0`,m),children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p,(0,c.jsx)(`span`,{className:i(`text-sm`,C),children:n}),D&&(0,c.jsx)(`span`,{className:`text-red-400 text-sm leading-none`,"aria-hidden":!0,children:`*`}),d&&(0,c.jsx)(l,{})]}),(0,c.jsx)(`input`,{ref:A,"data-testid":e,onChange:e=>h?.(e.target.value),onKeyDown:g,onBlur:O,name:t,disabled:f,type:r,defaultValue:a,value:s,placeholder:u,min:v,max:y,step:b,required:_,pattern:x,title:S,"aria-describedby":j??w,"aria-invalid":!!E||T,className:i(o,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`,E&&`border-red-500`,k)}),E&&(0,c.jsx)(`p`,{id:j,role:`alert`,"data-testid":e?`${e}-error`:void 0,className:`text-xs text-red-400 -mt-1`,children:E})]})});export{l as n,u as t};
@@ -1 +0,0 @@
1
- import{d as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{D as t,I as n}from"./active-backend-context-BlZPzZNU.js";import{t as r}from"./proxy-C79PCMjo.js";import{t as i}from"./settings-Chfn5xTD.js";var a=/^[a-zA-Z0-9_-]+$/;function o(e){return a.test(e)}function s(e,t=`mcp`){return e.trim().replace(/[^a-zA-Z0-9_-]+/g,`_`).replace(/_+/g,`_`).replace(/^_+|_+$/g,``)||t}var c={sse_servers:[],stdio_servers:[],shttp_servers:[]},l=`**********`;function u(e,t){return RegExp(`^${t}(_\\d+)?$`).test(e)?void 0:e}function d(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function f(e){if(!d(e))return null;let t=e.mcpServers;return d(t)&&!(`url`in t)&&!(`command`in t)?t:e}function p(e){if(!d(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0}function m(e){return e===`**********`?!0:Array.isArray(e)?e.some(m):d(e)?Object.values(e).some(m):!1}function h(e){if(!d(e))return;let t={};return d(e.tokens)&&(t.tokens=e.tokens),d(e.client_info)&&(t.client_info=e.client_info),(typeof e.token_expires_at==`number`||e.token_expires_at===null)&&(t.token_expires_at=e.token_expires_at),Object.keys(t).length>0?t:void 0}function g(e){if(d(e))switch(e.strategy){case`none`:return{strategy:`none`};case`api_key`:return typeof e.value==`string`?{strategy:`api_key`,value:e.value,...typeof e.header_name==`string`&&{header_name:e.header_name}}:void 0;case`bearer`:return typeof e.value==`string`?{strategy:`bearer`,value:e.value}:void 0;case`basic`:return typeof e.username!=`string`||typeof e.password!=`string`?void 0:{strategy:`basic`,username:e.username,password:e.password};case`header`:{let t=p(e.headers);return t?{strategy:`header`,headers:t}:void 0}case`oauth2`:{let t=C(e.authentication),n=h(e.state);return{strategy:`oauth2`,...t&&{authentication:t},...n&&{state:n}}}default:return}}function _(e){return g(e.auth)}function v(e){let t={};return e.auth&&!m(e.auth)&&(t.auth=e.auth),e.headers&&Object.keys(e.headers).length>0&&(t.headers=e.headers),t}function y(e){return{...e.name&&{name:e.name},url:e.url,...e.headers&&{headers:e.headers},...e.auth&&{auth:e.auth}}}function b(e){return y(e)}function x(e){return{...y(e),...e.timeout!==void 0&&{timeout:e.timeout}}}function S(e){return{name:e.name,command:e.command,...e.args&&{args:e.args},...e.env&&{env:e.env}}}function C(e){if(!e||typeof e!=`object`)return;let t=e;if(t.type!==`oauth`)return;let n={type:`oauth`};return(t.client_auth_method===`none`||t.client_auth_method===`client_secret_post`||t.client_auth_method===`client_secret_basic`||t.client_auth_method===`private_key_jwt`)&&(n.client_auth_method=t.client_auth_method),(typeof t.scopes==`string`||Array.isArray(t.scopes)&&t.scopes.every(e=>typeof e==`string`))&&(n.scopes=t.scopes),typeof t.client_name==`string`&&(n.client_name=t.client_name),typeof t.client_metadata_url==`string`&&(n.client_metadata_url=t.client_metadata_url),typeof t.client_id==`string`&&(n.client_id=t.client_id),typeof t.client_secret==`string`&&(n.client_secret=t.client_secret),t.additional_client_metadata&&typeof t.additional_client_metadata==`object`&&!Array.isArray(t.additional_client_metadata)&&(n.additional_client_metadata=t.additional_client_metadata),n}function w(e){let t=f(e);if(!t)return{...c};let n=[],r=[],i=[];for(let[e,a]of Object.entries(t)){if(!d(a))continue;let t=a.url;if(t){let r=a.transport,o=_(a),s=p(a.headers);if(r===`sse`){let r=u(e,`sse`),i={url:t};r&&(i.name=r),o&&(i.auth=o),s&&(i.headers=s),n.push(i)}else{let n=u(e,`shttp`),r={url:t};n&&(r.name=n),a.timeout!=null&&(r.timeout=a.timeout),o&&(r.auth=o),s&&(r.headers=s),i.push(r)}}else{if(typeof a.command!=`string`)continue;let t={name:e,command:a.command};a.args&&(t.args=a.args),a.env&&(t.env=a.env),r.push(t)}}return{sse_servers:n,stdio_servers:r,shttp_servers:i}}function T(e){let t={},n=e=>{let n=s(e);if(!(n in t))return n;let r=1;for(;`${n}_${r}`in t;)r+=1;return`${n}_${r}`};for(let r of e.sse_servers){let e={},i;typeof r==`string`?e.url=r:(i=r.name,e.url=r.url,Object.assign(e,v(r))),e.transport=`sse`,t[n(i||`sse`)]=e}for(let r of e.shttp_servers){let e={transport:`http`},i;typeof r==`string`?e.url=r:(i=r.name,e.url=r.url,Object.assign(e,v(r)),r.timeout!=null&&(e.timeout=r.timeout)),t[n(i||`shttp`)]=e}for(let r of e.stdio_servers){let e={command:r.command};r.args&&(e.args=r.args),r.env&&(e.env=r.env),t[n(r.name||`stdio`)]=e}return Object.keys(t).length>0?t:null}function E(){let e=n().backend;if(e.kind!==`cloud`)throw Error(`Cloud settings call requires a cloud backend.`);return e}function D(e){if(e.agent_settings&&Object.keys(e.agent_settings).length>0)return e.agent_settings;let t={},n={};typeof e.llm_model==`string`&&(n.model=e.llm_model),typeof e.llm_base_url==`string`&&(n.base_url=e.llm_base_url),typeof e.llm_api_key==`string`&&(n.api_key=e.llm_api_key),Object.keys(n).length>0&&(t.llm=n);let r={};return typeof e.enable_default_condenser==`boolean`&&(r.enabled=e.enable_default_condenser),typeof e.condenser_max_size==`number`&&(r.max_size=e.condenser_max_size),Object.keys(r).length>0&&(t.condenser=r),typeof e.agent==`string`&&(t.agent=e.agent),e.mcp_config&&Object.keys(e.mcp_config).length>0&&(t.mcp_config=e.mcp_config),t}function O(e){if(e.conversation_settings&&Object.keys(e.conversation_settings).length>0)return e.conversation_settings;let t={};return typeof e.confirmation_mode==`boolean`&&(t.confirmation_mode=e.confirmation_mode),(typeof e.security_analyzer==`string`||e.security_analyzer===null)&&(t.security_analyzer=e.security_analyzer),typeof e.max_iterations==`number`&&(t.max_iterations=e.max_iterations),t}async function k(){let e=await r({backend:E(),method:`GET`,path:`/api/v1/settings`});return{...e,agent_settings:D(e),conversation_settings:O(e),llm_api_key_set:!!e.llm_api_key_set,search_api_key_set:!!e.search_api_key_set,provider_tokens_set:e.provider_tokens_set}}async function A(e){let t=E(),n={};if(e.agent_settings_diff){let t={...e.agent_settings_diff};t.agent_context===null&&delete t.agent_context,Object.keys(t).length>0&&(n.agent_settings_diff=t)}if(e.conversation_settings_diff&&Object.keys(e.conversation_settings_diff).length>0&&(n.conversation_settings_diff=e.conversation_settings_diff),e.app_preferences)for(let[t,r]of Object.entries(e.app_preferences))r!==void 0&&(n[t]=r);await r({backend:t,method:`POST`,path:`/api/v1/settings`,body:n})}async function j(){return r({backend:E(),method:`GET`,path:`/api/v1/settings/agent-schema`})}async function M(){return r({backend:E(),method:`GET`,path:`/api/v1/settings/conversation-schema`})}var N=[`language`,`user_consents_to_analytics`,`enable_sound_notifications`,`git_user_name`,`git_user_email`,`title_llm_profile`,`disabled_skills`],P=new Set(N),F=e=>P.has(e),I=e=>{let t={},n={};for(let[r,i]of Object.entries(e))F(r)?t[r]=i:n[r]=i;return{extracted:t,rest:n}},L=e=>JSON.parse(JSON.stringify(e)),R=(e,t)=>({...e??{},...t??{}});async function z(e,t=3,n=500){for(let r=0;r<t;r+=1)try{return await e()}catch(e){if(r>=t-1)throw e;let i=n*2**r;await new Promise(e=>{setTimeout(e,i)})}throw Error(`Retry attempts exhausted`)}var B={redacted:null,encrypted:null,timestamp:0},V=300*1e3,H=()=>Date.now()-B.timestamp<V,U=()=>{B={redacted:null,encrypted:null,timestamp:0}},W=e=>!!e&&typeof e==`object`&&!Array.isArray(e),G=(e,t)=>`Basic ${btoa(`${e}:${t}`)}`,K=e=>{switch(e.strategy){case`none`:return{};case`api_key`:{if(typeof e.value!=`string`||!e.value)return null;let t=typeof e.header_name==`string`&&e.header_name?e.header_name:`Authorization`,n=t===`Authorization`?`Bearer ${e.value}`:e.value;return{[t]:n}}case`bearer`:return typeof e.value!=`string`||!e.value?null:{Authorization:`Bearer ${e.value}`};case`basic`:return typeof e.username!=`string`||typeof e.password!=`string`?null:{Authorization:G(e.username,e.password)};case`header`:return p(e.headers)??{};case`oauth2`:{let t=W(e.state)?e.state.tokens:void 0;return!W(t)||typeof t.access_token!=`string`?null:{Authorization:`Bearer ${t.access_token}`}}default:return null}},q=e=>{if(!W(e))return e;let t=W(e.mcpServers),n=t?e.mcpServers:e,r=Object.fromEntries(Object.entries(n).map(([e,t])=>{if(!W(t)||!W(t.auth))return[e,t];let n=K(t.auth);if(n===null)return[e,t];let r={...t},i={...p(t.headers)??{},...n};return delete r.auth,Object.keys(i).length>0?r.headers=i:delete r.headers,[e,r]}));return t?{...e,mcpServers:r}:r},J=e=>{let t=f(e);return t?Object.values(t).some(e=>m(W(e)?e.auth:void 0)||m(W(e)?e.headers:void 0)||m(W(e)?e.env:void 0)):!1},Y=(e,t)=>{let n=f(e),r=f(t);return!n||!r?!1:Object.keys(n).some(e=>!(e in r))},X=e=>{let t={agent_settings:e.agent_settings??{},conversation_settings:e.conversation_settings??{},llm_api_key_set:e.llm_api_key_is_set},n=e.misc_settings?.app_preferences;if(n)for(let e of N){let r=n[e];r!==void 0&&(t[e]=r)}return t},Z=e=>{let t=R(i.agent_settings??{},e.agent_settings??{}),n=R(i.conversation_settings??{},e.conversation_settings??{}),r={...L(i),...e,provider_tokens_set:{...i.provider_tokens_set??{},...e.provider_tokens_set??{}},agent_settings:t,conversation_settings:n},a=t.llm,o=t.condenser;return typeof t.agent==`string`&&(r.agent=t.agent),typeof a?.model==`string`&&a.model.length>0&&(r.llm_model=a.model),typeof a?.base_url==`string`&&(r.llm_base_url=a.base_url),typeof o?.enabled==`boolean`&&(r.enable_default_condenser=o.enabled),typeof o?.max_size==`number`&&(r.condenser_max_size=o.max_size),typeof n.confirmation_mode==`boolean`&&(r.confirmation_mode=n.confirmation_mode),(typeof n.security_analyzer==`string`||n.security_analyzer===null)&&(r.security_analyzer=n.security_analyzer),typeof n.max_iterations==`number`&&(r.max_iterations=n.max_iterations),r.search_api_key_set=!!r.search_api_key,r},Q=class r{static async fetchSettingsFromApi(n){return z(()=>new e(t()).getSettings({exposeSecrets:n}))}static async getSettings(){if(n().backend.kind===`cloud`)try{return Z(await z(()=>k()))}catch(e){return console.warn(`Failed to fetch cloud settings, using defaults:`,e),Z({})}if(H()&&B.redacted)return Z(X(B.redacted));try{let e=await this.fetchSettingsFromApi();return B.redacted=e,B.timestamp=Date.now(),Z(X(e))}catch(e){return console.warn(`Failed to fetch settings from API, using defaults:`,e),Z({})}}static async getSettingsForConversation(){if(H()&&B.encrypted)return{agentSettings:B.encrypted.agent_settings,conversationSettings:B.encrypted.conversation_settings,secretsEncrypted:!0};let e=await this.fetchSettingsFromApi(`encrypted`);return B.encrypted=e,B.timestamp||=Date.now(),{agentSettings:e.agent_settings,conversationSettings:e.conversation_settings,secretsEncrypted:!0}}static async getSettingsSchema(){return n().backend.kind===`cloud`?await j():await new e(t()).getAgentSchema()}static async getConversationSettingsSchema(){return n().backend.kind===`cloud`?await M():await new e(t()).getConversationSchema()}static async saveSettings(i){let{extracted:a,rest:o}=I(i),s=Object.keys(a).length>0,c={},l=o.agent_settings_diff;l&&Object.keys(l).length>0&&(c.agent_settings_diff=l);let u=o.conversation_settings_diff;u&&Object.keys(u).length>0&&(c.conversation_settings_diff=u),s&&(c.misc_settings_diff={app_preferences:a});let d=n().backend.kind===`cloud`,f=c.agent_settings_diff,p=!!f&&`mcp_config`in f&&f.mcp_config!==null,m;if(p)try{m=d?(await k())?.agent_settings?.mcp_config:(await r.fetchSettingsFromApi())?.agent_settings?.mcp_config}catch{}let h=d&&p&&J(m)&&!Y(m,f?.mcp_config),g=p&&!h;if(d){if(!(c.agent_settings_diff||c.conversation_settings_diff||s))return!0;g&&await z(()=>A({agent_settings_diff:{mcp_config:null}}));let e={};c.agent_settings_diff&&(e.agent_settings_diff={...c.agent_settings_diff},`mcp_config`in e.agent_settings_diff&&(e.agent_settings_diff.mcp_config=q(e.agent_settings_diff.mcp_config))),c.conversation_settings_diff&&(e.conversation_settings_diff=c.conversation_settings_diff),s&&(e.app_preferences=a);try{await z(()=>A(e))}catch(e){if(g&&m)try{await A({agent_settings_diff:{mcp_config:m}})}catch{}throw e}}else{if(!(c.agent_settings_diff||c.conversation_settings_diff||c.misc_settings_diff))return!0;g&&await z(()=>new e(t()).updateSettings({agent_settings_diff:{mcp_config:null}}));try{await z(()=>new e(t()).updateSettings(c))}catch(n){if(g&&m)try{await new e(t()).updateSettings({agent_settings_diff:{mcp_config:m}})}catch{}throw n}}return U(),!0}static invalidateCache(){U()}};export{x as a,T as c,s as d,w as i,a as l,l as n,b as o,m as r,S as s,Q as t,o as u};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{B as r,U as i,l as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{u as s}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DD_UNO02.js";import{s as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{t as l}from"./useQuery-B38jBavx.js";import{D as u}from"./active-backend-context-BlZPzZNU.js";import{z as d}from"./utils-qjs_KuS4.js";import{t as f}from"./messages-DINDkPNK.js";import{t as p}from"./loading-spinner-CcpnCr_d.js";import{t as m}from"./openhands-logo-CmYvJXBa.js";import{S as h,u as g}from"./markdown-renderer-CvOO0YIr.js";var _=e(t(),1),v=e=>l({queryKey:[`shared-conversation`,e],queryFn:()=>{if(!e)throw Error(`Conversation ID is required`);return new c(u()).getSharedConversation(e)},enabled:!!e,retry:!1}),y=e=>s({queryKey:[`shared-conversation-events`,e],queryFn:({pageParam:t})=>{if(!e)throw Error(`Conversation ID is required`);return new c(u()).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=i(function(){let{t:e}=o(`openhands`),{conversationId:t}=r(),{data:n,isLoading:i,error:s}=v(t),{data:c,isLoading:l,error:u,hasNextPage:S,fetchNextPage:C,isFetchingNextPage:w}=y(t),T=i||l,E=s||u,D=_.useMemo(()=>c?.pages?c.pages.flatMap(e=>e.items):[],[c?.pages]),O=_.useMemo(()=>D.reduce((e,t)=>h(t,e),[]).filter(g),[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(d.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(d.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(d.CONVERSATION$SHARED_CONVERSATION)}),n?.selected_branch&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(d.CONVERSATION$BRANCH),`: `,n.selected_branch]}),n?.selected_repository&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(d.CONVERSATION$REPOSITORY),`:`,` `,n.selected_repository]}),n?.llm_model&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(d.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)(f,{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(d.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,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor~module-BZXjBMvd.js","assets/rolldown-runtime-Cyuzqnbw.js"])))=>i.map(i=>d[i]);
2
- import{xt as e}from"./vendor-styling-Bcgpimp9.js";import{T as t,q as n}from"./active-backend-context-BlZPzZNU.js";import{a as r,n as i,r as a}from"./client-source-1v-kWLNU.js";function o(e){return e?.trim()||`unknown`}function s(e){return e?.trim()||null}function c({backendKind:e,agentServerVersion:t,automationSdkVersion:n,backendVersion:r,connectionMethod:i}){let a=o(t??r),s=o(n),c=o(r??t);return{backend_kind:e??null,agent_server_version:a,automation_sdk_version:s,backend_version:c,...i?{connection_method:i}:{}}}function l(e=null){return{cloud_user_id:s(e?.userId),cloud_user_email:s(e?.email),cloud_org_id:s(e?.orgId)}}var u=`openhands-telemetry-consent`,d=`openhands-telemetry-consent-pending-cloud-sync`,f=`openhands-telemetry-consent-change`,p=`openhands-telemetry-first-use`,m=`openhands-telemetry-session`,h=`agent-canvas`,g=`history_change`,_=t.telemetry.posthogApiKey,v=`https://z.openhands.dev`,y=`https://us.posthog.com`,b=null,x=null,S,C={},w=!1,T=Object.freeze({client_source:i,client_version:a,package_name:r.name,package_version:r.version}),E=c({}),D=l();function O(e){E=c(e)}function ee(e){D=l(e)}function k(e){return e?{...e,properties:{...E,...D,...e.properties,...T}}:null}function A(e){w||B()!==`granted`?e.opt_out_capturing():e.opt_in_capturing()}function j(e,t=!1){e.reset(t),A(e)}function M(e){e.get_property?.(`$user_id`)!=null&&j(e)}function N(e){if(e===!1){if(w)return;w=!0,b?.opt_out_capturing(),U();return}let t=w;if(w=!1,!b&&!x){let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));C={...C,...t}}t&&(b&&A(b),U())}function P(){return w?null:{apiKey:C.apiKey||_,apiHost:C.apiHost||v,uiHost:C.uiHost||y}}function F(){return typeof window<`u`&&typeof localStorage<`u`}async function I(){if(!F())return null;if(b)return b;try{let{default:t}=await e(async()=>{let{default:e}=await import(`./vendor~module-BZXjBMvd.js`).then(e=>e.t);return{default:e}},__vite__mapDeps([0,1]));return t}catch{return null}}function L(){return!!(w||typeof process<`u`&&{}.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`))}function R(e){b||(S=e)}async function z(e=!1){if(b)return b;if(x)return x;x=(async()=>{let t=P();if(!t)return null;let n=await I();if(!n)return null;let r=S,i=n.init(t.apiKey,{api_host:t.apiHost,ui_host:t.uiHost,opt_out_capturing_by_default:!e,persistence:`localStorage`,persistence_name:h,consent_persistence_name:`${h}-consent`,person_profiles:`always`,capture_pageview:g,autocapture:!0,disable_session_recording:!0,bootstrap:r,before_send:k},h);return i?(b=i,S=void 0,r||M(b),w?b.opt_out_capturing():B()===`granted`?b.opt_in_capturing():e||b.opt_out_capturing(),b):null})();try{return await x}finally{b||(x=null)}}function B(){if(!F())return`pending`;if(L())return`denied`;if(n()===`cookie`)return`granted`;try{let e=localStorage.getItem(u);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}function V(){if(!F())return null;try{let e=localStorage.getItem(d);return e===`granted`||e===`denied`?e:null}catch{return null}}function H(e){if(!F())return()=>{};let t=t=>{(t.key===u||t.key===d)&&e()};return window.addEventListener(f,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(f,e),window.removeEventListener(`storage`,t)}}function U(){F()&&window.dispatchEvent(new Event(f))}function W(e){if(F())try{localStorage.setItem(d,e)}catch{}}function G(e){if(F())try{if(e!==void 0&&localStorage.getItem(d)!==e)return;localStorage.removeItem(d),U()}catch{}}async function K(e,{syncToCloud:t=!0}={}){if(F())try{let t=B()===e;if(localStorage.setItem(u,e),w||t)return;let n=b??await z();if(!n)return;e===`granted`?n.opt_in_capturing():n.get_property?.(`$user_id`)==null?n.opt_out_capturing():j(n)}catch{}finally{t&&W(e),U()}}function q(){return B()===`granted`}function J(){if(!F())return!1;try{return localStorage.getItem(p)===`true`}catch{return!1}}function Y(){if(F())try{localStorage.setItem(p,`true`)}catch{}}async function X(){if(L()||J())return;let e=await z(!0);!e||L()||((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}),Y(),B()!==`granted`&&e.opt_out_capturing())}function Z(){if(!F())return!1;try{return sessionStorage.getItem(m)===`true`}catch{return!1}}function Q(){if(F())try{sessionStorage.setItem(m,`true`)}catch{}}async function $(){if(!q()||B()!==`granted`)return null;let e=await z();return!e||!q()?null:(e.has_opted_out_capturing?.()&&e.opt_in_capturing(),e)}async function te(){if(Z())return;let e=await $();e&&(e.capture(`canvas_new_session`,{is_first_use:!J()}),Q())}async function ne(){return(await $())?.get_distinct_id?.()??null}async function re(){return!F()||w||L()?null:(await z())?.get_distinct_id?.()??null}async function ie(e,t={}){let n=await $();n&&n.capture(e,t)}async function ae(e,t={}){let n=await $();n&&n.captureException(e,t)}async function oe(){if(F()){try{localStorage.removeItem(u),localStorage.removeItem(p)}catch{}G();try{sessionStorage.removeItem(m)}catch{}E=c({}),D=l();try{b&&j(b,!0)}catch{try{b?.opt_out_capturing()}catch{}}}}export{te as _,V as a,re as c,ee as d,K as f,X as g,ae as h,N as i,z as l,ie as m,oe as n,B as o,H as p,R as r,ne as s,G as t,O as u,c as v};
@@ -1 +0,0 @@
1
- import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t}from"./useMutation-DyQXZFEF.js";import{i as n,p as r}from"./active-backend-context-BlZPzZNU.js";import{t as i}from"./settings-service.api-DryhKdSr.js";import{n as a}from"./use-agent-profiles-Dmd_4H8q.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:n.all});let t=s.getQueriesData({queryKey:n.all});return s.setQueriesData({queryKey:n.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:n.all}),await s.invalidateQueries({queryKey:r.personal()})}})}export{s as n,o as t};
@@ -1 +0,0 @@
1
- import{b as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{t}from"./useQuery-B38jBavx.js";import{D as n,I as r,a as i,i as a,n as o,s}from"./active-backend-context-BlZPzZNU.js";import{t as c}from"./proxy-C79PCMjo.js";var l=`/api/agent-profiles`;function u(){let e=r().backend;if(e.kind!==`cloud`)throw Error(`Cloud agent-profile call requires a cloud backend.`);return e}async function d(){return c({backend:u(),method:`GET`,path:l})}async function f(e){return c({backend:u(),method:`GET`,path:`${l}/${encodeURIComponent(e)}`})}async function p(e,t){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}`,body:t})}async function m(e){return c({backend:u(),method:`DELETE`,path:`${l}/${encodeURIComponent(e)}`})}async function h(e,t){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}/rename`,body:{new_name:t}})}async function g(e){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}/activate`,body:{}})}function _(){return r().backend.kind===`cloud`}var v=`default`,y=class{static async listProfiles(){return _()?d():new e(n()).listAgentProfiles()}static async getProfile(t,r){if(_())return f(t);let i=r?{exposeSecrets:r}:{};return new e(n()).getAgentProfile(t,i)}static async saveProfile(t,r){return _()?p(t,r):new e(n()).saveAgentProfile(t,r)}static async deleteProfile(t){return _()?m(t):new e(n()).deleteAgentProfile(t)}static async renameProfile(t,r){return _()?h(t,r):new e(n()).renameAgentProfile(t,r)}static async activateProfile(t){return _()?g(t):new e(n()).activateAgentProfile(t)}};function b(e={}){let{backend:n,orgId:r}=o();return t({queryKey:[...a.all,n.id,r],queryFn:y.listProfiles,...s,...i,enabled:e.enabled??!0,meta:{disableToast:!0}})}export{y as n,v as r,b as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./useQueries-B3T1a7qt.js";import{n as t,r as n}from"./active-backend-context-BlZPzZNU.js";import{n as r,r as i,t as a}from"./organization-service.api-CT2OQlLz.js";function o(){let{backends:t}=n(),a=t.filter(e=>e.kind===`cloud`),o=e({queries:a.map(e=>({queryKey:[`cloud-organizations`,e.id],queryFn:async()=>{let t=await r(e);if(e.authMode===`cookie`)return t;let n=await i(e);return n.isLegacyKey||n.orgId===null?t:{...t,items:t.items.filter(e=>e.id===n.orgId)}},staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}))}),s={};return a.forEach((e,t)=>{let n=o[t];s[e.id]={backend:e,isLoading:n.isLoading,orgs:n.data?.items??[],currentOrgId:n.data?.currentOrgId??null}}),s}function s(){let{backends:r}=n(),i=t(),s=o(),c=[];for(let e of r)if(e.kind===`cloud`){let t=s[e.id],n=e.id===i.backend.id&&i.orgId?i.orgId:t?.orgs[0]?.id??null;n&&c.push({backendId:e.id,orgIdForMe:n})}let l=e({queries:c.map(({backendId:e,orgIdForMe:t})=>{let n=r.find(t=>t.id===e);return{queryKey:[`cloud-current-user`,e,t],queryFn:async()=>n?a(t,n):{orgId:t,userId:``},enabled:!!n,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}})}),u={};return c.forEach((e,t)=>{let n=l[t];u[e.backendId]={isLoading:n.isLoading,userId:n.data?.userId??null}}),u}export{o as n,s as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./useQuery-B38jBavx.js";var t=()=>e({queryKey:[`user`,`authenticated`],queryFn:async()=>!0,staleTime:1e3*60*5,gcTime:1e3*60*15,retry:!1,meta:{disableToast:!0}});export{t};
@@ -1 +0,0 @@
1
- import{t as e}from"./useQuery-B38jBavx.js";import{c as t,n,s as r}from"./active-backend-context-BlZPzZNU.js";import{t as i}from"./profiles-service.api-CBafmAPO.js";function a(a={}){let{backend:o,orgId:s}=n();return e({queryKey:[...t.all,o.id,s],queryFn:i.listProfiles,...r,enabled:a.enabled??!0,meta:{disableToast:!0}})}export{a as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Bcgpimp9.js";import{S as n,d as r,j as i,y as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{t as o}from"./useQueries-B3T1a7qt.js";import{$ as s,C as c,D as l,Q as u,dt as d,et as f,m as p,tt as m,ut as h}from"./active-backend-context-BlZPzZNU.js";import"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-Bw4AuHN1.js";import{n as g,r as _}from"./organization-service.api-CT2OQlLz.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 i.isAxiosError(e)&&e.response?.status===401||e instanceof n&&e.status===401?Error(w):h(e)?Error(C):e}return!0}try{let t=l({host:e.host,sessionApiKey:e.apiKey||null,timeout:b});await new r(t).getSettings(),p(await new a(t).getServerInfo())}catch(e){throw c(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,r=v.useSyncExternalStore(m,u,u),i=o({queries:e.map(e=>{let t=r[e.id],i=O(e),a=t?.disabled===!0,o=a&&e.kind===`cloud`&&d(t?.lastError),c=!i&&(!a||n||o);return{queryKey:[`backend-health`,e.id,e.kind,e.host,e.apiKey??``],queryFn:async()=>{try{let t=await P(e);return f(e.id),t}catch(t){throw s(e.id,t),t}},enabled:c,refetchInterval:a||i?!1:y,refetchIntervalInBackground:!1,refetchOnMount:a&&n?`always`:!0,refetchOnReconnect:!a&&!i,refetchOnWindowFocus:!a&&!i,retry:!1,staleTime:a?0:y,meta:{disableToast:!0}}})}),a={};return e.forEach((e,t)=>{let n=i[t],o=r[e.id],s=O(e),c=s?!1:o?.disabled===!0,l=s?0:o?.consecutiveFailures??0,u=s?S:o?.lastError??null,d;d=s||c?!1:n.isSuccess?!0:n.isError?!1:null,a[e.id]={isConnected:d,consecutiveFailures:l,lastError:u,disabled:c}}),a}var I=`openhands-onboarded`;function L(){if(typeof window>`u`)return!0;try{return window.localStorage.getItem(I)!==null}catch{return!0}}function R(){let[e,t]=v.useState(()=>L());return v.useEffect(()=>{let e=e=>{e.key===`openhands-onboarded`&&t(L())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),{isCompleted:e,markCompleted:v.useCallback(()=>{try{window.localStorage.setItem(I,`1`)}catch{}t(!0)},[])}}export{E as a,T as i,D as n,F as o,k as r,R as t};
@@ -1 +0,0 @@
1
- import{g as e,l as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{t as n}from"./useQuery-B38jBavx.js";import{D as r,I as i}from"./active-backend-context-BlZPzZNU.js";function a(e){let t=new Uint8Array(e,0,Math.min(e.byteLength,8e3));for(let e=0;e<t.length;e+=1)if(t[e]===0)return!0;return!1}var o=class{static async getPluginsMarketplace(){if(i().backend.kind===`cloud`)return[];try{return(await new t(r()).getPluginsMarketplace()).plugins??[]}catch{return[]}}static async getLocalPlugins(){if(i().backend.kind===`cloud`)return[];try{return(await new t(r()).getPlugins({load_user:!0,load_project:!1})).plugins??[]}catch{return[]}}static async getPluginFileContent(t,n){if(i().backend.kind===`cloud`)throw Error(`Reading plugin files is only available on a local backend.`);let o=await new e(r()).downloadFile(`${t}/${n}`);return a(o)?{kind:`binary`,text:null}:{kind:`text`,text:new TextDecoder(`utf-8`,{fatal:!1}).decode(o)}}},s=()=>n({queryKey:[`plugins-marketplace`],queryFn:()=>o.getPluginsMarketplace(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{o as n,s as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t}from"./useMutation-DyQXZFEF.js";import{i as n}from"./active-backend-context-BlZPzZNU.js";import{n as r}from"./use-agent-profiles-Dmd_4H8q.js";function i(){let i=e();return t({mutationFn:({name:e,profile:t})=>r.saveProfile(e,t),onSuccess:async()=>{await i.invalidateQueries({queryKey:n.all})},meta:{disableToast:!0}})}export{i as t};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{t}from"./useQuery-B38jBavx.js";import{n,p as r,z as i}from"./active-backend-context-BlZPzZNU.js";import{t as a}from"./settings-Chfn5xTD.js";import{i as o,t as s}from"./settings-service.api-DryhKdSr.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=n(),s=!i(o.backend),c=t({queryKey:[...r.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{g as n,d as t};
@@ -1,16 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{E as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{t as a}from"./useQuery-B38jBavx.js";import{J as o,g as s,n as c,o as l,r as u,z as d}from"./active-backend-context-BlZPzZNU.js";import{t as f,z as p}from"./utils-qjs_KuS4.js";import{t as m}from"./chevron-down-CV1zZP_K.js";import{t as h}from"./circle-check-lvN_jFN5.js";import{t as g}from"./external-link-Cnnd6ikC.js";import{t as _}from"./puzzle-DXWdfaa7.js";import{t as v}from"./refresh-cw-D7CYLy-d.js";import{r as y}from"./client-source-1v-kWLNU.js";import{t as b}from"./use-config-Csy8EAP9.js";import{t as x}from"./brand-button-CQO8oqVo.js";import{a as S,f as C,o as w,u as T}from"./sidebar-layout-DXHtbEj1.js";import{t as E}from"./copy-to-clipboard-button-C4l3CMSd.js";import{t as D}from"./u-robot-CJtSzy5X.js";import{r as O}from"./settings-utils-BL_Z9uIe.js";var k=i(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),A=i(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),j=i(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),M=i(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),N=i(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),P=i(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),F=e(t(),1),I=`https://registry.npmjs.org/@openhands/agent-canvas/latest`,L={npm:`npm install -g @openhands/agent-canvas@latest`,docker:`docker pull ghcr.io/openhands/agent-canvas:latest`};async function R(e){let t=await fetch(I,{signal:e,headers:{Accept:`application/json`}});if(!t.ok)throw Error(`npm registry responded ${t.status}`);let n=(await t.json())?.version;if(typeof n!=`string`||!n.trim())throw Error(`npm registry response missing version`);return n.trim()}function z({enabled:e=!0}={}){return a({queryKey:l.latestVersion,queryFn:({signal:e})=>R(e),enabled:e,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*60,meta:{disableToast:!0}})}var B=n();function V({command:e,testId:t}){let[n,r]=(0,F.useState)(!1);return(0,B.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg bg-[var(--oh-surface-deep)] px-2 py-1.5`,children:[(0,B.jsx)(`code`,{"data-testid":t,className:`min-w-0 flex-1 select-all break-all font-mono text-[11px] leading-4 text-white`,children:e}),(0,B.jsx)(E,{isHidden:!1,isDisabled:!1,onClick:()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)},mode:n?`copied`:`copy`})]})}function H(){let{t:e}=r(`openhands`),[t,n]=(0,F.useState)(!1),i=(0,F.useId)(),a=o()!==null,c=z({enabled:!a});if(a)return null;let l=c.data,u=l===void 0?null:s(l,y),d=u===1,_=u!==null&&u<=0,b=t?j:m;return(0,B.jsxs)(`section`,{"data-testid":`agent-canvas-update-card`,className:`flex flex-col gap-2 rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-3`,children:[(0,B.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),"aria-expanded":t,"aria-controls":i,"data-testid":`agent-canvas-update-toggle`,className:`flex w-full cursor-pointer items-center gap-2 text-left`,children:[(0,B.jsx)(`span`,{className:`flex-1 truncate text-xs font-medium text-white`,children:e(p.SETTINGS$APP_UPDATE_CARD_TITLE)}),u!==null&&(0,B.jsx)(`span`,{"data-testid":`agent-canvas-update-badge`,className:f(`inline-flex shrink-0 items-center rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface)] px-1.5 py-0.5 text-[10px] font-medium leading-none`,d?`text-warning`:`text-success`),children:e(d?p.SETTINGS$APP_UPDATE_BADGE_UPDATE_AVAILABLE:p.SETTINGS$APP_UPDATE_BADGE_UP_TO_DATE)}),(0,B.jsx)(b,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]}),(0,B.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,B.jsx)(`span`,{className:`text-[var(--oh-text-dim)]`,children:e(p.SETTINGS$APP_UPDATE_VERSION_LABEL)}),(0,B.jsx)(`span`,{className:`font-mono text-white`,children:y})]}),t&&(0,B.jsxs)(`div`,{id:i,className:`flex flex-col gap-3 pt-1`,children:[(0,B.jsx)(`div`,{"data-testid":`agent-canvas-update-status`,className:`flex items-start gap-2 text-xs`,children:c.isPending?(0,B.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:e(p.SETTINGS$APP_UPDATE_CHECKING)}):d?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(N,{className:`size-4 shrink-0 text-warning`,"aria-hidden":!0}),(0,B.jsx)(`span`,{className:`text-warning`,children:e(p.SETTINGS$APP_UPDATE_AVAILABLE_MESSAGE,{version:l})})]}):_?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(h,{className:`size-4 shrink-0 text-success`,"aria-hidden":!0}),(0,B.jsx)(`span`,{className:`text-success`,children:e(p.SETTINGS$APP_UPDATE_LATEST_MESSAGE)})]}):(0,B.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:e(p.SETTINGS$APP_UPDATE_CHECK_FAILED)})}),(0,B.jsx)(x,{testId:`agent-canvas-update-check-button`,type:`button`,variant:`secondary`,className:`w-full`,isDisabled:c.isFetching,"aria-busy":c.isFetching,onClick:()=>c.refetch(),startContent:(0,B.jsx)(v,{className:f(`size-4`,c.isFetching&&`animate-spin`),"aria-hidden":!0}),children:e(p.SETTINGS$APP_UPDATE_CHECK_BUTTON)}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border border-[var(--oh-border-subtle)] p-3 text-xs`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5 text-white`,children:[(0,B.jsx)(N,{className:`size-4 shrink-0`,"aria-hidden":!0}),(0,B.jsx)(`span`,{className:`font-medium`,children:e(p.SETTINGS$APP_UPDATE_HOW_TO_UPDATE)})]}),(0,B.jsx)(`span`,{className:`text-[var(--oh-text-dim)]`,children:e(p.SETTINGS$APP_UPDATE_RUN_COMMANDS)}),(0,B.jsx)(V,{command:L.npm,testId:`agent-canvas-update-command-npm`}),(0,B.jsx)(`span`,{className:`text-center text-[var(--oh-text-dim)]`,children:e(p.SETTINGS$APP_UPDATE_OR)}),(0,B.jsx)(V,{command:L.docker,testId:`agent-canvas-update-command-docker`})]}),(0,B.jsxs)(`a`,{"data-testid":`agent-canvas-update-release-notes`,href:`https://github.com/OpenHands/OpenHands/releases`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 self-start text-xs text-[var(--oh-accent)] underline`,children:[e(p.SETTINGS$APP_UPDATE_RELEASE_NOTES),(0,B.jsx)(g,{size:12,"aria-hidden":!0})]})]})]})}function U(){let{t:e}=r(`openhands`),{active:t}=u(),{backend:n}=t;return d(n)||n.kind!==`cloud`?null:(0,B.jsxs)(`a`,{"data-testid":`settings-cloud-link`,href:`${n.host.replace(/\/+$/,``)}/settings`,target:`_blank`,rel:`noopener noreferrer`,className:f(C({collapsed:!1}),w.idle),children:[(0,B.jsx)(`span`,{className:S,children:(0,B.jsx)(M,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,B.jsx)(`span`,{className:f(T(!1),`flex-1`),children:e(p.SETTINGS$CLOUD_SETTINGS_LINK)}),(0,B.jsx)(g,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}function W(){let{t:e}=r(`openhands`),{active:t}=u(),{backend:n}=t;return d(n)||n.kind!==`cloud`?null:(0,B.jsxs)(`a`,{"data-testid":`settings-integrations-link`,href:`${n.host.replace(/\/+$/,``)}/settings/integrations`,target:`_blank`,rel:`noopener noreferrer`,className:f(C({collapsed:!1}),w.idle),children:[(0,B.jsx)(`span`,{className:S,children:(0,B.jsx)(_,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,B.jsx)(`span`,{className:f(T(!1),`flex-1`),children:e(p.SETTINGS$INTEGRATIONS_SETTINGS_LINK)}),(0,B.jsx)(g,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}var G=[{icon:(0,B.jsx)(D,{width:16,height:16}),to:`/settings/agents`,text:`SETTINGS$NAV_AGENT`,subtitle:`SETTINGS$PAGE_AGENT_PROFILES_SUBLINE`},{icon:(0,B.jsx)(e=>(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,B.jsx)(`path`,{d:`M10 13C9.80222 13 9.60888 13.0586 9.44443 13.1685C9.27998 13.2784 9.15181 13.4346 9.07612 13.6173C9.00043 13.8 8.98063 14.0011 9.01921 14.1951C9.0578 14.3891 9.15304 14.5673 9.29289 14.7071C9.43275 14.847 9.61093 14.9422 9.80491 14.9808C9.99889 15.0194 10.2 14.9996 10.3827 14.9239C10.5654 14.8482 10.7216 14.72 10.8315 14.5556C10.9414 14.3911 11 14.1978 11 14C11 13.7348 10.8946 13.4804 10.7071 13.2929C10.5196 13.1054 10.2652 13 10 13ZM10 9C9.80222 9 9.60888 9.05865 9.44443 9.16853C9.27998 9.27841 9.15181 9.43459 9.07612 9.61732C9.00043 9.80004 8.98063 10.0011 9.01921 10.1951C9.0578 10.3891 9.15304 10.5673 9.29289 10.7071C9.43275 10.847 9.61093 10.9422 9.80491 10.9808C9.99889 11.0194 10.2 10.9996 10.3827 10.9239C10.5654 10.8482 10.7216 10.72 10.8315 10.5556C10.9414 10.3911 11 10.1978 11 10C11 9.73478 10.8946 9.48043 10.7071 9.29289C10.5196 9.10536 10.2652 9 10 9ZM14 9C13.8022 9 13.6089 9.05865 13.4444 9.16853C13.28 9.27841 13.1518 9.43459 13.0761 9.61732C13.0004 9.80004 12.9806 10.0011 13.0192 10.1951C13.0578 10.3891 13.153 10.5673 13.2929 10.7071C13.4327 10.847 13.6109 10.9422 13.8049 10.9808C13.9989 11.0194 14.2 10.9996 14.3827 10.9239C14.5654 10.8482 14.7216 10.72 14.8315 10.5556C14.9414 10.3911 15 10.1978 15 10C15 9.73478 14.8946 9.48043 14.7071 9.29289C14.5196 9.10536 14.2652 9 14 9ZM21 13C21.2652 13 21.5196 12.8946 21.7071 12.7071C21.8946 12.5196 22 12.2652 22 12C22 11.7348 21.8946 11.4804 21.7071 11.2929C21.5196 11.1054 21.2652 11 21 11H19V9H21C21.2652 9 21.5196 8.89464 21.7071 8.70711C21.8946 8.51957 22 8.26522 22 8C22 7.73478 21.8946 7.48043 21.7071 7.29289C21.5196 7.10536 21.2652 7 21 7H18.82C18.6707 6.5806 18.4299 6.19969 18.1151 5.8849C17.8003 5.57011 17.4194 5.32932 17 5.18V3C17 2.73478 16.8946 2.48043 16.7071 2.29289C16.5196 2.10536 16.2652 2 16 2C15.7348 2 15.4804 2.10536 15.2929 2.29289C15.1054 2.48043 15 2.73478 15 3V5H13V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V5H9V3C9 2.73478 8.89464 2.48043 8.70711 2.29289C8.51957 2.10536 8.26522 2 8 2C7.73478 2 7.48043 2.10536 7.29289 2.29289C7.10536 2.48043 7 2.73478 7 3V5.18C6.5806 5.32932 6.19969 5.57011 5.8849 5.8849C5.57011 6.19969 5.32932 6.5806 5.18 7H3C2.73478 7 2.48043 7.10536 2.29289 7.29289C2.10536 7.48043 2 7.73478 2 8C2 8.26522 2.10536 8.51957 2.29289 8.70711C2.48043 8.89464 2.73478 9 3 9H5V11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H5V15H3C2.73478 15 2.48043 15.1054 2.29289 15.2929C2.10536 15.4804 2 15.7348 2 16C2 16.2652 2.10536 16.5196 2.29289 16.7071C2.48043 16.8946 2.73478 17 3 17H5.18C5.32932 17.4194 5.57011 17.8003 5.8849 18.1151C6.19969 18.4299 6.5806 18.6707 7 18.82V21C7 21.2652 7.10536 21.5196 7.29289 21.7071C7.48043 21.8946 7.73478 22 8 22C8.26522 22 8.51957 21.8946 8.70711 21.7071C8.89464 21.5196 9 21.2652 9 21V19H11V21C11 21.2652 11.1054 21.5196 11.2929 21.7071C11.4804 21.8946 11.7348 22 12 22C12.2652 22 12.5196 21.8946 12.7071 21.7071C12.8946 21.5196 13 21.2652 13 21V19H15V21C15 21.2652 15.1054 21.5196 15.2929 21.7071C15.4804 21.8946 15.7348 22 16 22C16.2652 22 16.5196 21.8946 16.7071 21.7071C16.8946 21.5196 17 21.2652 17 21V18.82C17.4194 18.6707 17.8003 18.4299 18.1151 18.1151C18.4299 17.8003 18.6707 17.4194 18.82 17H21C21.2652 17 21.5196 16.8946 21.7071 16.7071C21.8946 16.5196 22 16.2652 22 16C22 15.7348 21.8946 15.4804 21.7071 15.2929C21.5196 15.1054 21.2652 15 21 15H19V13H21ZM17 16C17 16.2652 16.8946 16.5196 16.7071 16.7071C16.5196 16.8946 16.2652 17 16 17H8C7.73478 17 7.48043 16.8946 7.29289 16.7071C7.10536 16.5196 7 16.2652 7 16V8C7 7.73478 7.10536 7.48043 7.29289 7.29289C7.48043 7.10536 7.73478 7 8 7H16C16.2652 7 16.5196 7.10536 16.7071 7.29289C16.8946 7.48043 17 7.73478 17 8V16ZM14 13C13.8022 13 13.6089 13.0586 13.4444 13.1685C13.28 13.2784 13.1518 13.4346 13.0761 13.6173C13.0004 13.8 12.9806 14.0011 13.0192 14.1951C13.0578 14.3891 13.153 14.5673 13.2929 14.7071C13.4327 14.847 13.6109 14.9422 13.8049 14.9808C13.9989 15.0194 14.2 14.9996 14.3827 14.9239C14.5654 14.8482 14.7216 14.72 14.8315 14.5556C14.9414 14.3911 15 14.1978 15 14C15 13.7348 14.8946 13.4804 14.7071 13.2929C14.5196 13.1054 14.2652 13 14 13Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/llm`,text:`SETTINGS$NAV_LLM`,subtitle:`SETTINGS$PAGE_LLM_SUBLINE`},{icon:(0,B.jsx)(e=>(0,B.jsxs)(`svg`,{id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 22.3 18.66`,...e,children:[(0,B.jsx)(`defs`,{children:(0,B.jsx)(`style`,{children:`
2
- .st0 {
3
- stroke-miterlimit: 10;
4
- }
5
-
6
- .st0, .st1 {
7
- fill: none;
8
- stroke: currentColor;
9
- stroke-linecap: round;
10
- stroke-width: 2px;
11
- }
12
-
13
- .st1 {
14
- stroke-linejoin: round;
15
- }
16
- `})}),(0,B.jsx)(`path`,{className:`st1`,d:`M15.15,12.54h3.26c1.58,0,2.93-1.29,2.9-2.88-.03-1.53-1.28-2.77-2.82-2.77-.04,0-.08,0-.11,0,.13-.44.16-.92.04-1.43-.27-1.17-1.27-2.05-2.46-2.17-.74-.07-1.43.14-1.97.55,0,0,0-.02,0-.03,0-1.56-1.26-2.82-2.82-2.82s-2.82,1.26-2.82,2.82c0,0,0,.02,0,.03-.54-.4-1.23-.62-1.97-.55-1.19.12-2.19,1-2.46,2.17-.12.5-.09.99.04,1.43-.04,0-.08,0-.11,0-1.56,0-2.82,1.26-2.82,2.82s1.26,2.82,2.82,2.82l1.29.03c.41,0,.74.34.74.75v1.85c0,1.38,1.12,2.5,2.5,2.5h.29c1.44,0,2.6-1.17,2.6-2.6V6.49`}),(0,B.jsx)(`polyline`,{className:`st0`,points:`7.97 9.74 11.22 6.49 14.47 9.74`})]}),{width:16,height:16}),to:`/settings/condenser`,text:`SETTINGS$NAV_CONDENSER`,subtitle:`SETTINGS$PAGE_CONDENSER_SUBLINE`},{icon:(0,B.jsx)(A,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),to:`/settings/agent-context`,text:`SETTINGS$NAV_AGENT_CONTEXT`,subtitle:`SETTINGS$PAGE_AGENT_CONTEXT_SUBLINE`},{icon:(0,B.jsx)(P,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),to:`/settings/verification`,text:`SETTINGS$NAV_VERIFICATION`,subtitle:`SETTINGS$PAGE_VERIFICATION_SUBLINE`},{icon:(0,B.jsx)(k,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),to:`/settings/app`,text:`SETTINGS$NAV_APPLICATION`,subtitle:`SETTINGS$PAGE_APPLICATION_SUBLINE`},{icon:(0,B.jsx)(e=>(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M17.0265 1.63647C18.2362 1.88301 19.3557 2.45458 20.2649 3.28974C21.1741 4.12489 21.8384 5.19205 22.1865 6.37647C22.509 7.46247 22.557 8.61147 22.326 9.72147C21.9921 11.2422 21.1518 12.6046 19.9428 13.5856C18.7337 14.5666 17.2274 15.1081 15.6705 15.1215C15.0135 15.1215 14.3595 15.027 13.731 14.8365L12.531 16.2435L11.9625 16.506H10.5V18.756L9.75 19.506H7.5V21.756L6.75 22.506H2.25L1.5 21.756V18.2955L1.719 17.766L9.18 10.305C8.96826 9.62297 8.86698 8.91148 8.88 8.19747C8.89367 7.19853 9.12754 6.2149 9.56495 5.3167C10.0024 4.4185 10.6325 3.62786 11.4105 3.00113C12.1885 2.3744 13.0952 1.92702 14.0659 1.69088C15.0367 1.45473 16.0475 1.43565 17.0265 1.63497V1.63647ZM19.0035 12.4365C19.9458 11.6734 20.6011 10.6131 20.862 9.42897L20.868 9.43647C21.0538 8.57068 21.0204 7.67216 20.7707 6.82258C20.521 5.97299 20.063 5.19926 19.4383 4.57169C18.8135 3.94412 18.0419 3.4826 17.1934 3.22908C16.345 2.97555 15.4466 2.93804 14.58 3.11997C13.4112 3.3794 12.3627 4.0224 11.6016 4.94661C10.8405 5.87082 10.4105 7.02309 10.38 8.21997C10.365 8.90397 10.485 9.58197 10.7385 10.215L10.5735 11.0295L3 18.606V21.006H6V18.756L6.75 18.006H9V15.756L9.75 15.006H11.6175L12.9315 13.482L13.773 13.272C14.3796 13.509 15.0253 13.6301 15.6765 13.629C16.8885 13.6197 18.0615 13.1992 19.0035 12.4365ZM17.7465 8.33847C17.8648 8.17505 17.9489 7.98945 17.9937 7.79277C18.0386 7.59609 18.0434 7.39239 18.0077 7.19384C17.972 6.99528 17.8967 6.80597 17.7861 6.63721C17.6756 6.46845 17.5322 6.32373 17.3644 6.21169C17.1967 6.09965 17.008 6.0226 16.8098 5.98514C16.6116 5.94769 16.4078 5.95061 16.2108 5.99372C16.0137 6.03683 15.8273 6.11925 15.6629 6.23605C15.4984 6.35285 15.3592 6.50162 15.2535 6.67347C15.0503 7.00406 14.983 7.40054 15.066 7.77963C15.1489 8.15872 15.3755 8.49093 15.6982 8.70645C16.0209 8.92198 16.4146 9.00405 16.7966 8.93543C17.1785 8.86682 17.519 8.65285 17.7465 8.33847Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/secrets`,text:`SETTINGS$NAV_SECRETS`,subtitle:`SETTINGS$PAGE_SECRETS_SUBLINE`}];function K(){let{data:e}=b(),{backend:t}=c(),n=e?.feature_flags;return G.filter(e=>!O(e.to,n)).map(e=>({type:`item`,item:e.to===`/settings`?{...e,text:t.kind===`local`?p.SETTINGS$LLM_PROFILES:e.text,subtitle:t.kind===`local`?p.SETTINGS$PAGE_LLM_PROFILES_SUBLINE:e.subtitle}:e}))}export{H as i,W as n,U as r,K as t};
@@ -1 +0,0 @@
1
- import{u as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{t}from"./useQuery-B38jBavx.js";import{D as n,I as r,K as i}from"./active-backend-context-BlZPzZNU.js";import{t as a}from"./proxy-C79PCMjo.js";import{t as o}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~eywn6ulz-BKxxr74w.js";var s=100;function c(){let e=r().backend;if(e.kind!==`cloud`)throw Error(`Cloud skills call requires a cloud backend.`);return e}async function l(){let e=c(),t=[],n=null;do{let r=new URLSearchParams({limit:String(s)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/skills/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}function u(e){return{name:e.name,type:`knowledge`,source:`public`,description:e.description,triggers:e.triggers,content:e.content,license:e.license??null,compatibility:e.compatibility??null}}var d=o.map(u),f=class{static async getSkills(t){if(r().backend.kind===`cloud`)return l();let a=[];try{a=(await new e(n()).getSkills({load_public:!1,load_user:!0,load_project:!0,load_org:!1,project_dir:t??i()})).skills??[]}catch{}return[...a,...d]}},p=e=>t({queryKey:[`skills`,e??null],queryFn:()=>f.getSkills(e),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{p as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Bcgpimp9.js";import{j as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js";import{E as r,I as i,L as a,_ as o,n as s,z as c}from"./active-backend-context-BlZPzZNU.js";import{i as l,t as u}from"./client-source-1v-kWLNU.js";import{c as d,m as f,o as p,s as m,u as h,v as g}from"./telemetry-cmCL3o6Z.js";import{t as _}from"./proxy-C79PCMjo.js";var v=e(t(),1),y=`/api/automation`,b=n.create();async function x(e={}){let t=await m();return{...u,...t?{[l]:t}:{},...e}}b.interceptors.request.use(async e=>{let t=await x();if(Object.entries(t).forEach(([t,n])=>{e.headers.set(t,n)}),e.baseURL)return e;let n=a();if(!n)throw new r;e.baseURL=n.host;let i=n.apiKey?.trim();return i&&e.headers.set(`X-Session-API-Key`,i),e});function S(e){return typeof e==`string`&&e.trim()||null}function C(e){return typeof e==`string`?S(e):S(e.sdk_version)??S(e.version)}function w(e,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),n.set(`offset`,String(t)),n.toString()}function T(e){return e.trigger.type===`event`?{type:`event`,source:e.trigger.source,on:e.trigger.on,...e.trigger.filter&&{filter:e.trigger.filter}}:{type:`cron`,schedule:e.trigger.schedule,timezone:e.timezone??e.trigger.timezone??`UTC`}}function E(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`pending.${crypto.randomUUID()}`:`pending.${Date.now()}.${Math.random().toString(36).slice(2,10)}`}function D(e){if(!e.prompt)throw Error(`An automation prompt is required for import.`);let t=e.repository?[{url:e.repository,...e.branch&&{ref:e.branch},...!e.repository.includes(`://`)&&!e.repository.startsWith(`git@`)&&{provider:`github`}}]:void 0;return{path:`${y}/v1/preset/${e.plugins?.length?`plugin`:`prompt`}`,body:{name:e.name,prompt:e.prompt,trigger:{type:`event`,source:`agent-canvas-import`,on:E()},...e.model&&{model:e.model},...t&&{repos:t},...e.plugins?.length&&{plugins:e.plugins.map(e=>({source:e}))},...e.timeout!=null&&{timeout:e.timeout}}}}async function O(e){let t=e.apiKey.trim();return{baseURL:e.host,headers:await x(t?{"X-Session-API-Key":t}:{})}}async function k(e){return x(e.orgId?{"X-Org-Id":e.orgId}:{})}var A=class e{static async syncTelemetryConsent(e=p()){if(i().backend.kind!==`local`)return;let t=await d();await b.post(`${y}/v1/telemetry/consent`,{consent_granted:e===`granted`,frontend_distinct_id:t},{timeout:5e3})}static async getSdkVersion(){let e=i(),t=`${y}/sdk-version`;try{let n;if(e.backend.kind===`cloud`)n=await _({backend:e.backend,method:`GET`,path:t,headers:await k(e),timeoutSeconds:5});else{let{data:e}=await b.get(t,{timeout:5e3});n=e}return C(n)}catch{return null}}static async listAutomations(e={}){let{limit:t=50,offset:n=0}=e,r=i().backend;if(r.kind===`cloud`)return _({backend:r,method:`GET`,path:`${y}/v1?${w(t,n)}`,headers:await x()});let{data:a}=await b.get(`${y}/v1`,{params:{limit:t,offset:n}});return a}static async getAutomations(t=50,n=0){return e.listAutomations({limit:t,offset:n})}static async getAutomation(e){let t=i().backend,n=`${y}/v1/${encodeURIComponent(e)}`;if(t.kind===`cloud`)return _({backend:t,method:`GET`,path:n,headers:await x()});let{data:r}=await b.get(n);return r}static async createAutomation(e){let t=i(),{path:n,body:r}=D(e),a;if(t.backend.kind===`cloud`)a=await _({backend:t.backend,method:`POST`,path:n,body:r,headers:await k(t)});else{let{data:e}=await b.post(n,r,await O(t.backend));a=e}let o=`${y}/v1/${encodeURIComponent(a.id)}`,s={trigger:T(e),enabled:!1};try{if(t.backend.kind===`cloud`)return await _({backend:t.backend,method:`PATCH`,path:o,body:s,headers:await k(t)});let{data:e}=await b.patch(o,s,await O(t.backend));return e}catch(e){try{t.backend.kind===`cloud`?await _({backend:t.backend,method:`DELETE`,path:o,headers:await k(t)}):await b.delete(o,await O(t.backend))}catch(t){throw AggregateError([e,t],`Failed to disable the imported automation and clean it up.`)}throw e}}static async updateAutomation(e,t){let n=i().backend,r=`${y}/v1/${encodeURIComponent(e)}`;if(n.kind===`cloud`)return _({backend:n,method:`PATCH`,path:r,body:t,headers:await x()});let{data:a}=await b.patch(r,t);return a}static async deleteAutomation(e){let t=i().backend,n=`${y}/v1/${encodeURIComponent(e)}`;if(t.kind===`cloud`){await _({backend:t,method:`DELETE`,path:n,headers:await x()});return}await b.delete(n)}static async dispatchAutomation(e){let t=i().backend,n=`${y}/v1/${encodeURIComponent(e)}/dispatch`;if(t.kind===`cloud`)return _({backend:t,method:`POST`,path:n,headers:await x()});let{data:r}=await b.post(n);return r}static async listAutomationRuns(e,t={}){let{limit:n=50,offset:r=0}=t,a=i().backend,o=`${y}/v1/${encodeURIComponent(e)}/runs`;if(a.kind===`cloud`)return _({backend:a,method:`GET`,path:`${o}?${w(n,r)}`,headers:await x()});let{data:s}=await b.get(o,{params:{limit:n,offset:r}});return s}static async getAutomationRuns(t,n=50,r=0){return e.listAutomationRuns(t,{limit:n,offset:r})}static async toggleAutomation(t,n){return e.updateAutomation(t,{enabled:n})}static async downloadTarball(e,t){let n=i().backend,r=`${y}/v1/${encodeURIComponent(e)}/tarball`,a;if(n.kind===`cloud`)a=await _({backend:n,method:`GET`,path:r,responseType:`blob`,headers:await x()});else{let{data:e}=await b.get(r,{responseType:`blob`});a=e}let o=URL.createObjectURL(a),s=document.createElement(`a`);s.href=o,s.download=`${t}.tar`,s.click(),URL.revokeObjectURL(o)}static async checkHealth(){let e=i().backend,t=`${y}/health`;try{if(e.kind===`cloud`)return await _({backend:e,method:`GET`,path:t,timeoutSeconds:5,headers:await x()});let{data:n}=await b.get(t,{timeout:5e3});return n}catch{return{status:`error`}}}},j=`automation-sdk-version`,M=3600*1e3,N=`\0`,P=new Map,F=new Map;function I(e){let t=P.get(e);if(t){if(t.expiresAt<=Date.now()){P.delete(e);return}return t.version}}function L(e,t){P.set(e,{expiresAt:Date.now()+M,version:t})}function R(e){let t=I(e);if(t!==void 0)return Promise.resolve(t);let n=F.get(e);if(n)return n;if(typeof A.getSdkVersion!=`function`)return L(e,null),Promise.resolve(null);let r=A.getSdkVersion().then(t=>(L(e,t),t)).catch(()=>(L(e,null),null)).finally(()=>{F.delete(e)});return F.set(e,r),r}function z(){let e=s(),{backend:t}=e,n=[j,t.id,t.kind,t.host,e.orgId??``].join(N),[r,i]=v.useState(()=>I(n)??null);return v.useEffect(()=>{if(c(t)){i(null);return}let e=I(n);if(e!==void 0){i(e);return}let r=!0;return i(null),R(n).then(e=>{r&&i(e)}),()=>{r=!1}},[t,n]),r}var B=()=>{let{backend:e}=s(),t=z(),n=v.useCallback(()=>({backendKind:e.kind,agentServerVersion:e.kind===`local`?o(e.host):null,automationSdkVersion:t??null}),[t,e.host,e.kind]);v.useEffect(()=>{h(n())},[n]);let r={current_url:window.location.href},i=(e,t={})=>{h(n()),f(e,{...r,...t})};return{trackLoginButtonClick:({provider:e})=>{i(`login_button_clicked`,{provider:e})},trackConversationCreated:({conversationId:e,taskId:t,hasRepository:n,gitProvider:r,hasWorkspace:a,workspaceMode:o,hasInitialQuery:s,agentType:c,hasParentConversation:l,entryPoint:u})=>{i(`conversation_created`,{conversation_id:e,task_id:t,is_start_task:e.startsWith(`task-`),has_repository:n,git_provider:r,has_workspace:a,workspace_mode:o,has_initial_query:s,agent_type:c,has_parent_conversation:l,entry_point:u})},trackPushButtonClick:()=>{i(`push_button_clicked`)},trackPullButtonClick:()=>{i(`pull_button_clicked`)},trackCreatePrButtonClick:()=>{i(`create_pr_button_clicked`)},trackUserSignupCompleted:()=>{i(`user_signup_completed`,{signup_timestamp:new Date().toISOString()})},trackPrebuiltAutomationEnabled:({automationId:e,automationName:t,automationCategory:n})=>{i(`prebuilt_automation_enabled`,{automation_id:e,automation_name:t,automation_category:n})},trackInitialQuerySubmitted:({entryPoint:e,queryCharacterLength:t,replayJsonSize:n})=>{i(`initial_query_submitted`,{entry_point:e,query_character_length:t,replay_json_size:n})},trackUserMessageSent:({sessionMessageCount:e,currentMessageLength:t})=>{i(`user_message_sent`,{session_message_count:e,current_message_length:t})},trackDownloadVsCodeButtonClicked:()=>{i(`download_via_vscode_button_clicked`)},trackSettingsSaved:({llmModel:e,llmApiKeySet:t,searchApiKeySet:n,remoteRuntimeResourceFactor:r})=>{i(`settings_saved`,{LLM_MODEL:e,LLM_API_KEY_SET:t,SEARCH_API_KEY_SET:n,REMOTE_RUNTIME_RESOURCE_FACTOR:r})},trackMcpConfigUpdated:({sseServersCount:e,stdioServersCount:t})=>{i(`mcp_config_updated`,{has_mcp_config:!0,sse_servers_count:e,stdio_servers_count:t})},trackDownloadTrajectoryButtonClicked:()=>{i(`download_trajectory_button_clicked`)},trackConversationExported:e=>{i(`conversation_exported`,{format:e})},trackAutomationCreatedButton:({backendKind:e})=>{i(`automation_created_button`,{backend_kind:e})},trackAutomationExecuted:({backendKind:e})=>{i(`automation_executed`,{backend_kind:e})},trackAutomationDeleted:({backendKind:e})=>{i(`automation_deleted`,{backend_kind:e})},trackAutomationDisableButton:({backendKind:e})=>{i(`automation_disable_button`,{backend_kind:e})},trackAutomationEdited:({backendKind:e})=>{i(`automation_edited`,{backend_kind:e})},trackAutomationExported:({backendKind:e})=>{i(`automation_exported`,{backend_kind:e})},trackAutomationImported:({backendKind:e})=>{i(`automation_imported`,{backend_kind:e})},trackBackendAdded:({backendKind:e,connectionMethod:t,hasApiKey:n,source:r,agentServerVersion:a,backendVersion:o})=>{i(`backend_added`,{...g({backendKind:e,agentServerVersion:a,backendVersion:o,connectionMethod:t}),has_api_key:n,source:r})},trackOnboardingStarted:()=>{i(`onboarding_started`)},trackOnboardingStepViewed:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{i(`onboarding_step_viewed`,{step:e,step_index:t,total_steps:n,agent:r})},trackOnboardingCompleted:({agent:e})=>{i(`onboarding_completed`,{agent:e})},trackOnboardingSkipped:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{i(`onboarding_skipped`,{step:e,step_index:t,total_steps:n,agent:r})}}};export{A as n,B as t};