@openhands/agent-canvas 1.0.0-rc.1 → 1.0.0-rc.3

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 (460) hide show
  1. package/README.md +2 -2
  2. package/README.windows.md +2 -2
  3. package/build/assets/{QueryClientProvider-w1cZWY41.js → QueryClientProvider-7oLZ1RtQ.js} +1 -1
  4. package/build/assets/{Trans-BJeYqz2A.js → Trans-rF21Jwln.js} +1 -1
  5. package/build/assets/acp-providers-C55k29rf.js +1 -0
  6. package/build/assets/active-backend-context-CQTk4wD8.js +1 -0
  7. package/build/assets/add-backend-modal-BdYxoUdL.js +1 -0
  8. package/build/assets/agent-server-client-options-Dvgeb3x4.js +1 -0
  9. package/build/assets/agent-server-compatibility-BANjmMTo.js +1 -0
  10. package/build/assets/agent-server-conversation-service.api-js3oYcdU.js +5 -0
  11. package/build/assets/{agent-settings-BXBaybB_.js → agent-settings-BNrffu3I.js} +1 -1
  12. package/build/assets/{alert-banner-NeUl1-PQ.js → alert-banner-BzU93oDh.js} +1 -1
  13. package/build/assets/{analytics-consent-form-modal-DxkThW4K.js → analytics-consent-form-modal-Ce-_Skcd.js} +1 -1
  14. package/build/assets/api-key-entry-screen-CGyS-Cna.js +1 -0
  15. package/build/assets/{app-settings-C-U6jONZ.js → app-settings-DmOs4oik.js} +1 -1
  16. package/build/assets/automation-detail-DLbCVJCw.js +1 -0
  17. package/build/assets/{automations-list-BLJzAd-p.js → automations-list-Ces5shz5.js} +1 -1
  18. package/build/assets/{back-nav-button-DgkK0Ka6.js → back-nav-button-BDM9vr_o.js} +1 -1
  19. package/build/assets/backend-form-modal-BUy-PzZN.js +1 -0
  20. package/build/assets/{backend-synced-settings-badge-BktJcGgH.js → backend-synced-settings-badge-1A63yxGs.js} +1 -1
  21. package/build/assets/{base-modal-DZCNv0A4.js → base-modal-Ba5WcNb6.js} +1 -1
  22. package/build/assets/{brand-button-LBFNic99.js → brand-button-BoiPxAGm.js} +1 -1
  23. package/build/assets/browser-B8bp1IqT.js +5 -0
  24. package/build/assets/browser-store-C5uQbbIi.js +1 -0
  25. package/build/assets/{browser-tab-be3QvXg9.js → browser-tab-CiBRWB4X.js} +1 -1
  26. package/build/assets/chat-send-button-qKFZuB9E.js +1 -0
  27. package/build/assets/check-BDAbW7je.js +1 -0
  28. package/build/assets/{checkmark-Rmpruj7q.js → checkmark-SEZPnU2I.js} +1 -1
  29. package/build/assets/{chevron-down-KhWYEjeW.js → chevron-down-DUxWwzTm.js} +1 -1
  30. package/build/assets/{chevron-left-small-6nyFCWVQ.js → chevron-left-small-x9_-ucHG.js} +1 -1
  31. package/build/assets/{circle-plus-check-toggle-DquBwJ_6.js → circle-plus-check-toggle-CboDp7XB.js} +1 -1
  32. package/build/assets/{close-D_o3d8QM.js → close-CbOsKMRg.js} +1 -1
  33. package/build/assets/{code-tag-DhsjDB-v.js → code-tag-C0vR_IQH.js} +1 -1
  34. package/build/assets/{color-themes-0biOprdo.js → color-themes-B9n7pBQl.js} +1 -1
  35. package/build/assets/{combobox-caret-CO7eozIY.js → combobox-caret-DwMmhrrA.js} +1 -1
  36. package/build/assets/{command-store-UzKGSUC2.js → command-store-BUWgE-vZ.js} +1 -1
  37. package/build/assets/{condenser-settings-BulzYEuW.js → condenser-settings-FCBjvqSo.js} +1 -1
  38. package/build/assets/{confirmation-modal-CMAtd9R0.js → confirmation-modal-BPgWqWRI.js} +1 -1
  39. package/build/assets/{context-menu-list-item-D0swnhFt.js → context-menu-list-item-CHWCx1Mc.js} +1 -1
  40. package/build/assets/conversation-CT8AvxEH.js +1 -0
  41. package/build/assets/conversation-panel-DqDDs4WZ.js +1 -0
  42. package/build/assets/conversation-service.api-y_eB_43m.js +1 -0
  43. package/build/assets/conversation-state-store-DpgQaK_O.js +1 -0
  44. package/build/assets/conversation-store-CiYGBud3.js +6 -0
  45. package/build/assets/{conversation-tab-empty-state-DYjKsg_c.js → conversation-tab-empty-state-Ba5hbJhn.js} +1 -1
  46. package/build/assets/conversation-vNuLKgz6.js +19 -0
  47. package/build/assets/conversation-websocket-context-Bb4XBXoc.js +3 -0
  48. package/build/assets/{copy-BM0RpLez.js → copy-CAxUvM-U.js} +1 -1
  49. package/build/assets/{custom-toast-handlers-BohXx7uh.js → custom-toast-handlers-fgD4IYsu.js} +1 -1
  50. package/build/assets/{declaration-DaUdB2Wg.js → declaration-IA661TBv.js} +1 -1
  51. package/build/assets/{device-verify-DiEJqpJb.js → device-verify-BOQz2LJQ.js} +1 -1
  52. package/build/assets/{dist-xtCm0O6P.js → dist-B-SKiGDl.js} +1 -1
  53. package/build/assets/dist-CeJSjcAI.js +1 -0
  54. package/build/assets/{dropdown-classes-Vqz86I0R.js → dropdown-classes-lT1LUsbO.js} +1 -1
  55. package/build/assets/edit-automation-modal-C-oC5tis.js +1 -0
  56. package/build/assets/ellipsis-button-CiLx8dqc.js +1 -0
  57. package/build/assets/{entry.client-BvKgdCQ9.js → entry.client-Db3BpFL_.js} +2 -2
  58. package/build/assets/{enum-filter-dropdown-DdFgk0EM.js → enum-filter-dropdown-DFwoVtOw.js} +1 -1
  59. package/build/assets/{environment-switch-overlay-CuBuZOaa.js → environment-switch-overlay-Cow6h62p.js} +1 -1
  60. package/build/assets/{extensions-hub-Dayqvv0n.js → extensions-hub-BxZbAtjP.js} +1 -1
  61. package/build/assets/extensions-navigation-BIb-vAa2.js +1 -0
  62. package/build/assets/{file-DwHCkWZT.js → file-BJCSojij.js} +1 -1
  63. package/build/assets/files-tab-DpulQlIo.js +1 -0
  64. package/build/assets/files-tab-store-CZAEwv3x.js +1 -0
  65. package/build/assets/{folder-2h1hR1Qb.js → folder-wShAU0y7.js} +1 -1
  66. package/build/assets/git-control-bar-branch-button-D1uam-nI.js +27 -0
  67. package/build/assets/{globe-qFjFNG6J.js → globe-CQ_5xwpo.js} +1 -1
  68. package/build/assets/home-sJAFzI6v.js +1 -0
  69. package/build/assets/{i18n-zDndR1Ne.js → i18n-CyvU1o95.js} +1 -1
  70. package/build/assets/install-server-modal-BjEzlLF5.js +1 -0
  71. package/build/assets/{launch-I00QV8YT.js → launch-DgtB1JTX.js} +1 -1
  72. package/build/assets/{lesson-plan-C18uB_56.js → lesson-plan-B607buca.js} +1 -1
  73. package/build/assets/{link-external-DtcdPFbw.js → link-external-DCsHkAj4.js} +1 -1
  74. package/build/assets/llm-client-BnqeDPua.js +1 -0
  75. package/build/assets/llm-settings-B8kPJ0Of.js +1 -0
  76. package/build/assets/llm-settings-CjUpPsvA.js +1 -0
  77. package/build/assets/{loading-spinner-DNwR4--Z.js → loading-spinner-CFuA0UNt.js} +1 -1
  78. package/build/assets/manage-backends-modal-CTA-2x4F.js +1 -0
  79. package/build/assets/manifest-d3e8504d.js +1 -0
  80. package/build/assets/{markdown-renderer-D6B-u2nM.js → markdown-renderer-oOUs3tw5.js} +1 -1
  81. package/build/assets/mcp-client-xEdbDxOL.js +1 -0
  82. package/build/assets/mcp-kJYdM8aJ.js +9 -0
  83. package/build/assets/messages-BFJXB6MW.js +36 -0
  84. package/build/assets/{modal-backdrop-BDqI1zBV.js → modal-backdrop-B1si6TUd.js} +1 -1
  85. package/build/assets/{modal-body-CCLCqX1J.js → modal-body-2Po2nl1e.js} +1 -1
  86. package/build/assets/{modal-classes-DwTdT3IK.js → modal-classes-9XTtWCtF.js} +1 -1
  87. package/build/assets/{modal-close-button-gQgKqUf-.js → modal-close-button-DY-rVmld.js} +1 -1
  88. package/build/assets/model-selector-z_QOzaRV.js +1 -0
  89. package/build/assets/{navigation-context-aNGUUtdq.js → navigation-context-CszaA-CJ.js} +1 -1
  90. package/build/assets/{navigation-link-CYkF2y3K.js → navigation-link-DXg4oo29.js} +1 -1
  91. package/build/assets/onboarding-CZ_7nd-M.js +1 -0
  92. package/build/assets/{openhands-logo-CHmtDV-t.js → openhands-logo-B-IDE1ER.js} +1 -1
  93. package/build/assets/{option-service.api-CGNANEcT.js → option-service.api-DHOGfYKh.js} +1 -1
  94. package/build/assets/organization-service.api-D79cdERN.js +1 -0
  95. package/build/assets/path-utils-0KWEiRs9.js +1 -0
  96. package/build/assets/{pencil-Dr0b2jL1.js → pencil-COslZGUC.js} +1 -1
  97. package/build/assets/{plan-components--aLlpASH.js → plan-components-DsiDjcDi.js} +1 -1
  98. package/build/assets/{planner-tab-B-5EeCEm.js → planner-tab-CNmJiZ22.js} +1 -1
  99. package/build/assets/plus-D8aJZRkD.js +1 -0
  100. package/build/assets/profiles-client-CesbAK-7.js +1 -0
  101. package/build/assets/{providers-DknP6O2g.js → providers-Bpq3xFRA.js} +1 -1
  102. package/build/assets/proxy-wIasY2Po.js +1 -0
  103. package/build/assets/{query-client-config-CWWGQWvw.js → query-client-config-CITeuHD7.js} +1 -1
  104. package/build/assets/{recommended-automations-launcher-BIul0osB.js → recommended-automations-launcher-B1kfmFTQ.js} +8 -10
  105. package/build/assets/root-CIZ7Rv1X.js +2 -0
  106. package/build/assets/root-layout-B5ijp9At.js +2 -0
  107. package/build/assets/{sdk-section-page-VmtJWH3A.js → sdk-section-page-DTyvCc52.js} +1 -1
  108. package/build/assets/{sdk-settings-schema-DFievvEK.js → sdk-settings-schema-B0KrqqPX.js} +1 -1
  109. package/build/assets/{search-BeVRXvX7.js → search-BqXT2Ied.js} +1 -1
  110. package/build/assets/secrets-service-rJqZtDmI.js +1 -0
  111. package/build/assets/{secrets-settings-BLMvCkKm.js → secrets-settings-BQNSDLKS.js} +1 -1
  112. package/build/assets/server-client-Cz8PyIbN.js +1 -0
  113. package/build/assets/settings-BUlJrO_h.js +1 -0
  114. package/build/assets/settings-client-BUlG0Gzq.js +1 -0
  115. package/build/assets/{settings-dropdown-input-DA_pzHWE.js → settings-dropdown-input-BUk4m23x.js} +1 -1
  116. package/build/assets/{settings-gear-aNebYlCy.js → settings-gear-DFmoMp-6.js} +1 -1
  117. package/build/assets/{settings-index-CycvkOoq.js → settings-index-DE91Eahc.js} +1 -1
  118. package/build/assets/{settings-input-8y5p4kze.js → settings-input-DsoZj8Dm.js} +1 -1
  119. package/build/assets/{settings-list-classes-Qk7zl0Wu.js → settings-list-classes-D8VAVZmi.js} +1 -1
  120. package/build/assets/{settings-modal-DdntdOGP.js → settings-modal-CCaPYVqW.js} +1 -1
  121. package/build/assets/{settings-section-header-context-B77tsYlx.js → settings-section-header-context-D61smD-W.js} +1 -1
  122. package/build/assets/settings-service.api-4u2RKC8k.js +1 -0
  123. package/build/assets/{settings-switch-ba4DuiNO.js → settings-switch-BQiAS9ga.js} +1 -1
  124. package/build/assets/{settings-utils-BxzHqLmZ.js → settings-utils-chxTa1vn.js} +1 -1
  125. package/build/assets/shared-conversation-sBPLAawM.js +1 -0
  126. package/build/assets/{sidebar-mobile-menu-toggle-C0mmabKj.js → sidebar-mobile-menu-toggle-BDXWzhyB.js} +1 -1
  127. package/build/assets/{sidebar-nav-link-BsYdDFfb.js → sidebar-nav-link-Bhlzlhp8.js} +1 -1
  128. package/build/assets/{skill-card-pill-row-BhUlGcYB.js → skill-card-pill-row-Bg5joQf6.js} +1 -1
  129. package/build/assets/{skills-TYjOUQ2d.js → skills-BDOWVle-.js} +1 -1
  130. package/build/assets/skills-client-Cr9F5306.js +1 -0
  131. package/build/assets/{skills-plugins-D0pdqgKa.js → skills-plugins-fihjo1KZ.js} +1 -1
  132. package/build/assets/{skills-settings-VqKTkmVl.js → skills-settings-NQnuMwZP.js} +1 -1
  133. package/build/assets/{styled-tooltip-TCp7svY3.js → styled-tooltip-GXy1qxsO.js} +1 -1
  134. package/build/assets/suspense-C9MBE_9N.js +1 -0
  135. package/build/assets/{switch-skeleton-cKrdaYGj.js → switch-skeleton-QpdcdxRP.js} +1 -1
  136. package/build/assets/{task-list-tab-BiizRsY3.js → task-list-tab-Hl9BuVfq.js} +1 -1
  137. package/build/assets/telemetry-j9SLrtY7.js +2 -0
  138. package/build/assets/{terminal-BSYITdM0.js → terminal-BUww3Ssl.js} +1 -1
  139. package/build/assets/{terminal-CpgZx6go.js → terminal-DRwe8--D.js} +1 -1
  140. package/build/assets/{toggle-switch-CUgOZqZu.js → toggle-switch-DDr-DnEc.js} +1 -1
  141. package/build/assets/{trash-2-CbVljPko.js → trash-2-DAKXV2Wm.js} +1 -1
  142. package/build/assets/{typography-Bvw0IxaN.js → typography-Cx7uw7z3.js} +1 -1
  143. package/build/assets/{u-check-circle-u9QiS4Fr.js → u-check-circle-CftRwky1.js} +1 -1
  144. package/build/assets/{u-check-circle-half-DjpjzWu3.js → u-check-circle-half-sGVk0BtL.js} +1 -1
  145. package/build/assets/{u-circuit-DlBlOwx9.js → u-circuit-Cg9tH5qb.js} +1 -1
  146. package/build/assets/{u-edit-BIYzjs3v.js → u-edit-foF02hwH.js} +1 -1
  147. package/build/assets/{use-active-conversation-q1wT8LI5.js → use-active-conversation-DJGoI9Mc.js} +1 -1
  148. package/build/assets/use-agent-settings-schema-DtusObuC.js +1 -0
  149. package/build/assets/{use-agent-state-CCHlVqvY.js → use-agent-state-BXgWhFh6.js} +1 -1
  150. package/build/assets/{use-cloud-current-user-id-BAKf91Zx.js → use-cloud-current-user-id-e1Pk7NxQ.js} +1 -1
  151. package/build/assets/use-config-DSzkljTq.js +1 -0
  152. package/build/assets/use-create-conversation-CzvaVA5A.js +1 -0
  153. package/build/assets/use-event-store-DSpvASbC.js +1 -0
  154. package/build/assets/use-get-secrets-DiLgP147.js +1 -0
  155. package/build/assets/use-handle-plan-click-CUZwmKIk.js +1 -0
  156. package/build/assets/use-is-authed-fNsj-Adj.js +1 -0
  157. package/build/assets/{use-launch-skill-in-chat-3ydwpi_M.js → use-launch-skill-in-chat-ClRJlIx7.js} +1 -1
  158. package/build/assets/use-llm-profiles-CyNVoVqm.js +1 -0
  159. package/build/assets/use-runtime-is-ready-CWkGQFsb.js +1 -0
  160. package/build/assets/{use-save-settings-rE9aA29R.js → use-save-settings-CP23emUY.js} +1 -1
  161. package/build/assets/use-settings-0qFqC-r6.js +1 -0
  162. package/build/assets/{use-settings-nav-items-C7MOWj09.js → use-settings-nav-items-C6YxUn4h.js} +1 -1
  163. package/build/assets/use-skills-BWHATXK-.js +1 -0
  164. package/build/assets/{use-task-list-YMkSzdDv.js → use-task-list-JPudBRv3.js} +1 -1
  165. package/build/assets/{use-tracking-DQYdZpxi.js → use-tracking-CjLZgh8X.js} +1 -1
  166. package/build/assets/use-unified-vscode-url-DSn2tT08.js +1 -0
  167. package/build/assets/use-user-conversation-CQ5IwnZk.js +1 -0
  168. package/build/assets/{useMutation-DDo48A8t.js → useMutation-7hG0GuPx.js} +1 -1
  169. package/build/assets/useQuery-JDs8UaWj.js +1 -0
  170. package/build/assets/{useTranslation-CEcjrme-.js → useTranslation-CbJtty1g.js} +1 -1
  171. package/build/assets/{utils-CdgBzLA7.js → utils-CVcuFUYj.js} +1 -1
  172. package/build/assets/{vendor~browser-DWk6fNtJ.js → vendor~browser-Dwwc84Zf.js} +1 -1
  173. package/build/assets/{vendor~browser-tab-NZdVoI2Z.js → vendor~browser-tab-Bhohe29F.js} +1 -1
  174. package/build/assets/{vendor~conversation-panel~conversation-gp03cWZW.js → vendor~conversation-panel~conversation-DYHL7QoY.js} +1 -1
  175. package/build/assets/{vendor~conversation-panel~conversation~index-BZ5C6Xpz.js → vendor~conversation-panel~conversation~index-Be58Romv.js} +1 -1
  176. package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-BodGsxSf.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-CBEOG8NF.js} +1 -1
  177. package/build/assets/{vendor~files-tab-Buz36Y-q.js → vendor~files-tab-B447_Zns.js} +1 -1
  178. package/build/assets/{vendor~home~conversation-panel~conversation-DG0H5SkJ.js → vendor~home~conversation-panel~conversation-DZ-F7J6T.js} +1 -1
  179. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CXivI4Ym.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B4oeCCli.js} +1 -1
  180. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-9Il_wz8U.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CQQAW8hY.js} +1 -1
  181. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-1pTajrpX.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DFsI4CLy.js} +1 -1
  182. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Ceeqkj0k.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DcvlNgbn.js} +1 -1
  183. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B7I1ZxCx.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-ojk_J4bB.js} +1 -1
  184. package/build/assets/{vendor~launch-DXL78kBf.js → vendor~launch-BdXJCmwc.js} +1 -1
  185. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-CfAc3nMS.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DToubnIU.js} +1 -1
  186. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-DkwcKRtv.js → vendor~root-layout~home~conversation-panel~conversation-Cg0nXqVs.js} +1 -1
  187. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-DSqEbr0N.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-Dr8Ly0at.js} +1 -1
  188. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-BC9XTECT.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-DveauQfg.js} +1 -1
  189. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-D0XUSHNN.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~jpfhx3ls-zdl_Rltz.js} +2 -2
  190. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~jxrvuot9-BaCzvZac.js +48 -0
  191. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CcFtthyg.js → vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-BwbkftxT.js} +1 -1
  192. package/build/assets/{vendor~root-layout~home~mcp~automations-list-cNHi83v_.js → vendor~root-layout~home~mcp~automations-list-CtdIEhjQ.js} +1 -1
  193. package/build/assets/{vendor~root-layout~home~mcp~automations-list-BnIlGhjl.js → vendor~root-layout~home~mcp~automations-list-DGOI7kQz.js} +1 -1
  194. package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BGWUbqUq.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-CbuXadI-.js} +1 -1
  195. package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BuCSnjsW.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-iPAfRWNQ.js} +2 -2
  196. package/build/assets/{verification-settings-CIqtxWat.js → verification-settings-Cm02KmeI.js} +1 -1
  197. package/build/assets/{vscode-tab-DEt72yJX.js → vscode-tab-AF70Yke0.js} +1 -1
  198. package/build/assets/{waiting-for-runtime-message-DSjJfeoj.js → waiting-for-runtime-message-Bg27u9JB.js} +1 -1
  199. package/build/assets/x-8AbJWTbX.js +1 -0
  200. package/build/assets/{x-mark-DsJ9tDD0.js → x-mark-Cn-YJVbN.js} +1 -1
  201. package/build/index.html +4 -4
  202. package/build/locales/ar/openhands.json +2 -1
  203. package/build/locales/ca/openhands.json +2 -1
  204. package/build/locales/de/openhands.json +2 -1
  205. package/build/locales/en/openhands.json +2 -1
  206. package/build/locales/es/openhands.json +2 -1
  207. package/build/locales/fr/openhands.json +2 -1
  208. package/build/locales/it/openhands.json +2 -1
  209. package/build/locales/ja/openhands.json +2 -1
  210. package/build/locales/ko-KR/openhands.json +2 -1
  211. package/build/locales/no/openhands.json +2 -1
  212. package/build/locales/pt/openhands.json +2 -1
  213. package/build/locales/tr/openhands.json +2 -1
  214. package/build/locales/uk/openhands.json +2 -1
  215. package/build/locales/zh-CN/openhands.json +2 -1
  216. package/build/locales/zh-TW/openhands.json +2 -1
  217. package/config/defaults.json +1 -1
  218. package/dist/api/agent-server-adapter.cjs +3 -3
  219. package/dist/api/agent-server-adapter.cjs.map +1 -1
  220. package/dist/api/agent-server-adapter.js +94 -86
  221. package/dist/api/agent-server-adapter.js.map +1 -1
  222. package/dist/api/app-preferences-store.cjs.map +1 -1
  223. package/dist/api/app-preferences-store.d.ts +6 -2
  224. package/dist/api/app-preferences-store.js.map +1 -1
  225. package/dist/api/cloud/proxy.cjs +1 -1
  226. package/dist/api/cloud/proxy.cjs.map +1 -1
  227. package/dist/api/cloud/proxy.d.ts +18 -6
  228. package/dist/api/cloud/proxy.js +1 -1
  229. package/dist/api/cloud/proxy.js.map +1 -1
  230. package/dist/api/conversation-metadata-store.cjs.map +1 -1
  231. package/dist/api/conversation-metadata-store.d.ts +8 -0
  232. package/dist/api/conversation-metadata-store.js.map +1 -1
  233. package/dist/api/conversation-service/agent-server-conversation-service.types.d.ts +9 -0
  234. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs +1 -1
  235. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs.map +1 -1
  236. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js +9 -9
  237. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js.map +1 -1
  238. package/dist/components/conversation-events/chat/event-message.cjs +1 -1
  239. package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
  240. package/dist/components/conversation-events/chat/event-message.js +80 -71
  241. package/dist/components/conversation-events/chat/event-message.js.map +1 -1
  242. package/dist/components/features/automations/recommended-automations-launcher.d.ts +7 -1
  243. package/dist/components/features/chat/switch-profile-button.cjs +1 -1
  244. package/dist/components/features/chat/switch-profile-button.cjs.map +1 -1
  245. package/dist/components/features/chat/switch-profile-button.js +5 -5
  246. package/dist/components/features/chat/switch-profile-button.js.map +1 -1
  247. package/dist/components/features/conversation-panel/skills-modal.cjs +1 -1
  248. package/dist/components/features/conversation-panel/skills-modal.cjs.map +1 -1
  249. package/dist/components/features/conversation-panel/skills-modal.js +34 -37
  250. package/dist/components/features/conversation-panel/skills-modal.js.map +1 -1
  251. package/dist/components/features/home/workspace-selection-form.d.ts +1 -0
  252. package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +8 -0
  253. package/dist/components/features/settings/llm-profiles/profile-actions-menu.cjs +1 -1
  254. package/dist/components/features/settings/llm-profiles/profile-actions-menu.js +1 -0
  255. package/dist/components/features/sidebar/sidebar.cjs +1 -1
  256. package/dist/components/features/sidebar/sidebar.js +6 -6
  257. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  258. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  259. package/dist/components/features/skills/extensions-navigation.d.ts +1 -9
  260. package/dist/components/features/skills/extensions-navigation.js +31 -50
  261. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  262. package/dist/constants/acp-providers.cjs +1 -1
  263. package/dist/constants/acp-providers.js +1 -1
  264. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  265. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  266. package/dist/hooks/mutation/use-create-conversation.js +26 -14
  267. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  268. package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs +1 -1
  269. package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs.map +1 -1
  270. package/dist/hooks/mutation/use-switch-llm-profile-and-log.js +26 -15
  271. package/dist/hooks/mutation/use-switch-llm-profile-and-log.js.map +1 -1
  272. package/dist/i18n/declaration.cjs +1 -1
  273. package/dist/i18n/declaration.cjs.map +1 -1
  274. package/dist/i18n/declaration.d.ts +1 -0
  275. package/dist/i18n/declaration.js +1 -1
  276. package/dist/i18n/declaration.js.map +1 -1
  277. package/dist/i18n/translation.cjs +1 -1
  278. package/dist/i18n/translation.cjs.map +1 -1
  279. package/dist/i18n/translation.js +32 -15
  280. package/dist/i18n/translation.js.map +1 -1
  281. package/dist/index.cjs +1 -1
  282. package/dist/index.js +10 -10
  283. package/dist/lib/index.cjs +1 -1
  284. package/dist/lib/index.js +1 -1
  285. package/dist/locales/ar/openhands.json +2 -1
  286. package/dist/locales/ca/openhands.json +2 -1
  287. package/dist/locales/de/openhands.json +2 -1
  288. package/dist/locales/en/openhands.json +2 -1
  289. package/dist/locales/es/openhands.json +2 -1
  290. package/dist/locales/fr/openhands.json +2 -1
  291. package/dist/locales/it/openhands.json +2 -1
  292. package/dist/locales/ja/openhands.json +2 -1
  293. package/dist/locales/ko-KR/openhands.json +2 -1
  294. package/dist/locales/no/openhands.json +2 -1
  295. package/dist/locales/pt/openhands.json +2 -1
  296. package/dist/locales/tr/openhands.json +2 -1
  297. package/dist/locales/uk/openhands.json +2 -1
  298. package/dist/locales/zh-CN/openhands.json +2 -1
  299. package/dist/locales/zh-TW/openhands.json +2 -1
  300. package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs +1 -1
  301. package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs.map +1 -1
  302. package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js +10 -1
  303. package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js.map +1 -1
  304. package/dist/package.cjs +1 -1
  305. package/dist/package.cjs.map +1 -1
  306. package/dist/package.js +2 -2
  307. package/dist/package.js.map +1 -1
  308. package/dist/routes/llm-settings.cjs +1 -1
  309. package/dist/routes/llm-settings.cjs.map +1 -1
  310. package/dist/routes/llm-settings.js +21 -21
  311. package/dist/routes/llm-settings.js.map +1 -1
  312. package/dist/routes/mcp.cjs +1 -1
  313. package/dist/routes/mcp.cjs.map +1 -1
  314. package/dist/routes/mcp.d.ts +0 -1
  315. package/dist/routes/mcp.js +0 -1
  316. package/dist/routes/mcp.js.map +1 -1
  317. package/dist/types/agent-server/core/events/index.d.ts +1 -0
  318. package/dist/types/agent-server/core/events/streaming-delta-event.d.ts +7 -0
  319. package/dist/types/agent-server/core/openhands-event.d.ts +2 -2
  320. package/dist/types/agent-server/type-guards.cjs +1 -1
  321. package/dist/types/agent-server/type-guards.cjs.map +1 -1
  322. package/dist/types/agent-server/type-guards.d.ts +2 -0
  323. package/dist/types/agent-server/type-guards.js +3 -3
  324. package/dist/types/agent-server/type-guards.js.map +1 -1
  325. package/dist/utils/handle-event-for-ui.cjs +1 -1
  326. package/dist/utils/handle-event-for-ui.cjs.map +1 -1
  327. package/dist/utils/handle-event-for-ui.js +69 -13
  328. package/dist/utils/handle-event-for-ui.js.map +1 -1
  329. package/dist/utils/mcp-config.cjs +1 -1
  330. package/dist/utils/mcp-config.cjs.map +1 -1
  331. package/dist/utils/mcp-config.js +27 -19
  332. package/dist/utils/mcp-config.js.map +1 -1
  333. package/dist/utils/mcp-marketplace-utils.cjs +1 -1
  334. package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
  335. package/dist/utils/mcp-marketplace-utils.js +38 -18
  336. package/dist/utils/mcp-marketplace-utils.js.map +1 -1
  337. package/dist/utils/normalize-display-model.cjs +1 -1
  338. package/dist/utils/normalize-display-model.cjs.map +1 -1
  339. package/dist/utils/normalize-display-model.js +8 -7
  340. package/dist/utils/normalize-display-model.js.map +1 -1
  341. package/dist/utils/openhands-llm.cjs +1 -1
  342. package/dist/utils/openhands-llm.cjs.map +1 -1
  343. package/dist/utils/openhands-llm.d.ts +13 -0
  344. package/dist/utils/openhands-llm.js +9 -3
  345. package/dist/utils/openhands-llm.js.map +1 -1
  346. package/package.json +2 -2
  347. package/scripts/check-sdk-version-sync.mjs +6 -6
  348. package/scripts/dev-safe.mjs +71 -120
  349. package/scripts/dev-with-automation.mjs +58 -4
  350. package/scripts/runtime-services-info.mjs +199 -0
  351. package/scripts/static-server.mjs +42 -4
  352. package/build/assets/acp-providers-DJr8DlNG.js +0 -1
  353. package/build/assets/acp-route-guard-A__sWgbc.js +0 -1
  354. package/build/assets/active-backend-context-I2w666XY.js +0 -1
  355. package/build/assets/add-backend-modal-BDBDBXsJ.js +0 -1
  356. package/build/assets/agent-server-client-options-9agOSarV.js +0 -1
  357. package/build/assets/agent-server-compatibility-B7QStIcH.js +0 -1
  358. package/build/assets/agent-server-conversation-service.api-Cagoqq1V.js +0 -5
  359. package/build/assets/api-key-entry-screen-ByXA4hXH.js +0 -1
  360. package/build/assets/automation-detail-Dbmgt974.js +0 -1
  361. package/build/assets/backend-form-modal-CeB983Sj.js +0 -1
  362. package/build/assets/browser-D08Sp3ZY.js +0 -5
  363. package/build/assets/browser-store-JRrcGdlk.js +0 -1
  364. package/build/assets/chat-send-button-5qz0zj6R.js +0 -1
  365. package/build/assets/check-CZhEL6rP.js +0 -1
  366. package/build/assets/conversation-BrjF2-Ky.js +0 -1
  367. package/build/assets/conversation-HgR_TTPE.js +0 -19
  368. package/build/assets/conversation-panel-BlRcO5AC.js +0 -1
  369. package/build/assets/conversation-service.api-B_Pdmwsa.js +0 -1
  370. package/build/assets/conversation-state-store-D-w0uurj.js +0 -1
  371. package/build/assets/conversation-store-CC-isCnP.js +0 -1
  372. package/build/assets/conversation-websocket-context-G95yfL81.js +0 -3
  373. package/build/assets/dist-Bl-1K5Tv.js +0 -1
  374. package/build/assets/edit-automation-modal-CNZgSSiH.js +0 -1
  375. package/build/assets/extensions-navigation-yFLAU06N.js +0 -1
  376. package/build/assets/files-tab-CMredyYX.js +0 -1
  377. package/build/assets/files-tab-store-DLU28g8C.js +0 -1
  378. package/build/assets/git-control-bar-branch-button-D8blTNXh.js +0 -27
  379. package/build/assets/home-CWw845Rz.js +0 -1
  380. package/build/assets/install-server-modal-D8Q0xZcN.js +0 -1
  381. package/build/assets/llm-client-BqyLKgUN.js +0 -1
  382. package/build/assets/llm-settings-CAnFYAEG.js +0 -1
  383. package/build/assets/llm-settings-DotqpmCF.js +0 -1
  384. package/build/assets/manage-backends-modal-Ceo_SOcf.js +0 -1
  385. package/build/assets/manifest-61ec2d68.js +0 -1
  386. package/build/assets/mcp-EvrLVTla.js +0 -9
  387. package/build/assets/messages-Bz9TWjlh.js +0 -36
  388. package/build/assets/middleware-CfatjPYZ.js +0 -6
  389. package/build/assets/model-selector-CZOi4V7r.js +0 -1
  390. package/build/assets/onboarding-CPCKYvFh.js +0 -1
  391. package/build/assets/organization-service.api-Dn74hBTH.js +0 -1
  392. package/build/assets/path-utils-BjxzIGLp.js +0 -1
  393. package/build/assets/plus-DT-M0FA1.js +0 -1
  394. package/build/assets/profiles-client-BrqNmaDV.js +0 -1
  395. package/build/assets/proxy-sRh0WKI7.js +0 -1
  396. package/build/assets/root-CklXEh3W.js +0 -2
  397. package/build/assets/root-layout-BCA_X8XL.js +0 -2
  398. package/build/assets/secrets-service-DVtlLWY8.js +0 -1
  399. package/build/assets/server-client-DYv_GHPl.js +0 -1
  400. package/build/assets/settings-CXvJUx_j.js +0 -1
  401. package/build/assets/settings-service.api-DxIEtvx6.js +0 -1
  402. package/build/assets/shared-conversation-x41nZQi7.js +0 -1
  403. package/build/assets/sidebar-store-DnQAJAE5.js +0 -1
  404. package/build/assets/telemetry-fQFd-8V3.js +0 -2
  405. package/build/assets/use-agent-settings-schema-Yxf7KGyG.js +0 -1
  406. package/build/assets/use-config-DwfigQ_Y.js +0 -1
  407. package/build/assets/use-create-conversation-BEzddjXn.js +0 -1
  408. package/build/assets/use-event-store-Cxqc45Sw.js +0 -1
  409. package/build/assets/use-get-secrets-BlO1BfUo.js +0 -1
  410. package/build/assets/use-handle-plan-click-Bfl0zIBr.js +0 -1
  411. package/build/assets/use-is-authed-hHndEep7.js +0 -1
  412. package/build/assets/use-llm-profiles-E-jjZMZw.js +0 -1
  413. package/build/assets/use-runtime-is-ready-DBWzvAmc.js +0 -1
  414. package/build/assets/use-settings-BPTbE7lg.js +0 -1
  415. package/build/assets/use-skills-QhoaIYGF.js +0 -1
  416. package/build/assets/use-unified-vscode-url-DFtNIC1Q.js +0 -1
  417. package/build/assets/use-user-conversation-BRAseenw.js +0 -1
  418. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-D8soyAAx.js +0 -48
  419. package/build/assets/vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js +0 -1
  420. package/build/assets/x-JOBEVLW0.js +0 -1
  421. package/dist/components/features/conversation-panel/skills-runtime-waiting-state.cjs +0 -2
  422. package/dist/components/features/conversation-panel/skills-runtime-waiting-state.cjs.map +0 -1
  423. package/dist/components/features/conversation-panel/skills-runtime-waiting-state.d.ts +0 -1
  424. package/dist/components/features/conversation-panel/skills-runtime-waiting-state.js +0 -21
  425. package/dist/components/features/conversation-panel/skills-runtime-waiting-state.js.map +0 -1
  426. package/dist/utils/acp-route-guard.cjs +0 -1
  427. package/dist/utils/acp-route-guard.d.ts +0 -26
  428. package/dist/utils/acp-route-guard.js +0 -4
  429. /package/build/assets/{agent-server-ui-style-scope-BwIZYdC1.js → agent-server-ui-style-scope-Bhc5vpWO.js} +0 -0
  430. /package/build/assets/{automation-DJ_3GeXD.js → automation-BzmydDjr.js} +0 -0
  431. /package/build/assets/{common-DqjLSBOt.js → common-Cfviy7yT.js} +0 -0
  432. /package/build/assets/{context-CEQZwATj.js → context-BBqptpXX.js} +0 -0
  433. /package/build/assets/{conversation-local-storage-YmOVXxxW.js → conversation-local-storage-D5Tre_GA.js} +0 -0
  434. /package/build/assets/{createLucideIcon-Ddu8jDOQ.js → createLucideIcon-C9OEnwvX.js} +0 -0
  435. /package/build/assets/{environment-switch-store-CiurvTtK.js → environment-switch-store-BpKxp6Xq.js} +0 -0
  436. /package/build/assets/{git-status-mapper-DnL9OC8_.js → git-status-mapper-C3rfzUex.js} +0 -0
  437. /package/build/assets/{handle-capture-consent-3XrjZ8wi.js → handle-capture-consent-DDnXMC9Y.js} +0 -0
  438. /package/build/assets/{health-store-B5f0S2FY.js → health-store-d-d2ssv4.js} +0 -0
  439. /package/build/assets/{iconBase-BVhFI-0E.js → iconBase-1A_WRQ4E.js} +0 -0
  440. /package/build/assets/{map-provider-C3Z5Dx2J.js → map-provider-XSFHmdDs.js} +0 -0
  441. /package/build/assets/{objectWithoutPropertiesLoose-DSQKyRhw.js → objectWithoutPropertiesLoose-B-IA9dU9.js} +0 -0
  442. /package/build/assets/{query-keys-tAsQcc_9.js → query-keys-CQaji0wJ.js} +0 -0
  443. /package/build/assets/{react-Dy05vyj5.js → react-CuAHzoGi.js} +0 -0
  444. /package/build/assets/{retrieve-axios-error-message-BY-yIkIq.js → retrieve-axios-error-message-DbnSBc_1.js} +0 -0
  445. /package/build/assets/{sdk-settings-field-metadata-C6KMD-jZ.js → sdk-settings-field-metadata-CETNItbo.js} +0 -0
  446. /package/build/assets/{settings-DGY6n4J2.js → settings-BgL2HUsU.js} +0 -0
  447. /package/build/assets/{settings-like-page-layout-classes-DNg2vKSM.js → settings-like-page-layout-classes-DENKlZpD.js} +0 -0
  448. /package/build/assets/{use-breakpoint-DpxHDmuH.js → use-breakpoint-Dt2knceC.js} +0 -0
  449. /package/build/assets/{use-click-outside-element-DhxCUyWl.js → use-click-outside-element-Bu2A3s59.js} +0 -0
  450. /package/build/assets/{v4-khGvL7i2.js → v4-BygpdDmc.js} +0 -0
  451. /package/build/assets/{vendor~browser-BDNLFng6.js → vendor~browser-BYEwwJqV.js} +0 -0
  452. /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-D_hRW_zc.js → vendor~conversation-panel~conversation~alert-banner-BnHToS5O.js} +0 -0
  453. /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~j8sdb9mk-OFpe9fX_.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~j8sdb9mk-oCzr0-9g.js} +0 -0
  454. /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-BPuuVEqr.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-CTmh4bwd.js} +0 -0
  455. /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~skills-settings~m~o9nrx3fm-D44TR8hL.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~skills-settings~m~o9nrx3fm-87v-LliW.js} +0 -0
  456. /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dr3Ow7Ms.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-D8cqyq4k.js} +0 -0
  457. /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-B1TKKuuH.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ntycl9e1-DspdqGPW.js} +0 -0
  458. /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-Fa-nXZ4M.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-DMH1jSwL.js} +0 -0
  459. /package/build/assets/{vendor~terminal-0ObOedYm.js → vendor~terminal-aeP3PnKf.js} +0 -0
  460. /package/build/assets/{vscode-url-helper-BMq8JBhB.js → vscode-url-helper-DOCkV_-G.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{k as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as r}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{u as i}from"./path-utils-BjxzIGLp.js";import{t as a}from"./useMutation-DDo48A8t.js";import{i as o}from"./organization-service.api-Dn74hBTH.js";import{o as s,t as c}from"./declaration-DaUdB2Wg.js";import{n as l}from"./QueryClientProvider-w1cZWY41.js";import{r as u,t as d}from"./recommended-automations-launcher-BIul0osB.js";import{t as f}from"./useTranslation-CEcjrme-.js";import{t as p}from"./retrieve-axios-error-message-BY-yIkIq.js";import{t as m}from"./createLucideIcon-Ddu8jDOQ.js";import{n as h}from"./vendor~root-layout~home~conversation-panel~conversation-DkwcKRtv.js";import{t as g}from"./check-CZhEL6rP.js";import{n as _,r as v}from"./custom-toast-handlers-BohXx7uh.js";import{a as y,i as b,r as x,t as S}from"./llm-settings-DotqpmCF.js";import{t as C}from"./utils-CdgBzLA7.js";import{T as w,b as ee,g as te,n as T}from"./agent-server-client-options-9agOSarV.js";import{n as E,r as ne}from"./active-backend-context-I2w666XY.js";import{a as re,d as D,f as ie,u as O}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-D8soyAAx.js";import{r as k}from"./query-keys-tAsQcc_9.js";import{t as A}from"./modal-backdrop-BDqI1zBV.js";import{r as j,t as M}from"./modal-body-CCLCqX1J.js";import{r as N}from"./base-modal-DZCNv0A4.js";import{i as P}from"./modal-classes-DwTdT3IK.js";import{t as F}from"./brand-button-LBFNic99.js";import{t as ae}from"./openhands-logo-CHmtDV-t.js";import{n as oe}from"./navigation-context-aNGUUtdq.js";import{t as se}from"./chat-send-button-5qz0zj6R.js";import{i as ce,o as le,t as ue}from"./backend-form-modal-CeB983Sj.js";import{t as de}from"./settings-input-8y5p4kze.js";import{t as fe}from"./confirmation-modal-CMAtd9R0.js";import{i as pe,n as I,o as me,s as he}from"./acp-providers-DJr8DlNG.js";import{t as ge}from"./use-create-conversation-BEzddjXn.js";import{t as _e}from"./terminal-BSYITdM0.js";import{t as L}from"./folder-2h1hR1Qb.js";import{t as ve}from"./chevron-left-small-6nyFCWVQ.js";import{t as R}from"./close-D_o3d8QM.js";import{t as ye}from"./use-save-settings-rE9aA29R.js";import{n as be,t as xe}from"./use-get-secrets-BlO1BfUo.js";var Se=m(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),z=e(t(),1),B=s(),Ce=`m19.6 66.5 19.7-11 .3-1-.3-.5h-1l-3.3-.2-11.2-.3L14 53l-9.5-.5-2.4-.5L0 49l.2-1.5 2-1.3 2.9.2 6.3.5 9.5.6 6.9.4L38 49.1h1.6l.2-.7-.5-.4-.4-.4L29 41l-10.6-7-5.6-4.1-3-2-1.5-2-.6-4.2 2.7-3 3.7.3.9.2 3.7 2.9 8 6.1L37 36l1.5 1.2.6-.4.1-.3-.7-1.1L33 25l-6-10.4-2.7-4.3-.7-2.6c-.3-1-.4-2-.4-3l3-4.2L28 0l4.2.6L33.8 2l2.6 6 4.1 9.3L47 29.9l2 3.8 1 3.4.3 1h.7v-.5l.5-7.2 1-8.7 1-11.2.3-3.2 1.6-3.8 3-2L61 2.6l2 2.9-.3 1.8-1.1 7.7L59 27.1l-1.5 8.2h.9l1-1.1 4.1-5.4 6.9-8.6 3-3.5L77 13l2.3-1.8h4.3l3.1 4.7-1.4 4.9-4.4 5.6-3.7 4.7-5.3 7.1-3.2 5.7.3.4h.7l12-2.6 6.4-1.1 7.6-1.3 3.5 1.6.4 1.6-1.4 3.4-8.2 2-9.6 2-14.3 3.3-.2.1.2.3 6.4.6 2.8.2h6.8l12.6 1 3.3 2 1.9 2.7-.3 2-5.1 2.6-6.8-1.6-16-3.8-5.4-1.3h-.8v.4l4.6 4.5 8.3 7.5L89 80.1l.5 2.4-1.3 2-1.4-.2-9.2-7-3.6-3-8-6.8h-.5v.7l1.8 2.7 9.8 14.7.5 4.5-.7 1.4-2.6 1-2.7-.6-5.8-8-6-9-4.7-8.2-.5.4-2.9 30.2-1.3 1.5-3 1.2-2.5-2-1.4-3 1.4-6.2 1.6-8 1.3-6.4 1.2-7.9.7-2.6v-.2H49L43 72l-9 12.3-7.2 7.6-1.7.7-3-1.5.3-2.8L24 86l10-12.8 6-7.9 4-4.6-.1-.5h-.3L17.2 77.4l-4.7.6-2-2 .2-3 1-1 8-5.5Z`,we=`0 0 100 100`,Te=`M4.04286 0.228393C4.52451 0.0304495 5.0488 -0.0409817 5.56586 0.0208928C6.23236 0.0973928 6.82636 0.380893 7.34786 0.870893C7.35488 0.877545 7.36344 0.882351 7.37278 0.884881C7.38212 0.887412 7.39194 0.887588 7.40136 0.885393C8.10536 0.712393 8.78236 0.773393 9.43186 1.06839L9.46336 1.08339L9.54036 1.12139C10.2189 1.47289 10.7054 2.00639 10.9994 2.72039C11.1384 3.05989 11.2084 3.41439 11.2099 3.78339C11.2197 4.05816 11.1893 4.33288 11.1199 4.59889C11.1164 4.61245 11.1165 4.62665 11.12 4.6402C11.1235 4.65374 11.1303 4.66618 11.1399 4.67639C11.5329 5.0749 11.8063 5.57572 11.9289 6.12189C12.1214 7.07239 11.9239 7.92939 11.3374 8.69189L11.2464 8.80189C10.8579 9.24669 10.3481 9.56836 9.77936 9.72739C9.76694 9.73097 9.75556 9.73747 9.74617 9.74634C9.73677 9.75521 9.72964 9.7662 9.72536 9.77839C9.59786 10.1464 9.46986 10.4604 9.23186 10.7744C8.63236 11.5654 7.75086 12.0054 6.75786 11.9999C5.96636 11.9959 5.26486 11.7064 4.65286 11.1319C4.64358 11.1234 4.63225 11.1174 4.61998 11.1146C4.6077 11.1118 4.59491 11.1123 4.58286 11.1159C4.32386 11.1994 4.06286 11.2114 3.78086 11.2084C3.33033 11.2048 2.88658 11.0984 2.48336 10.8974C2.0613 10.688 1.6939 10.3831 1.41036 10.0069C1.30886 9.87239 1.20836 9.74589 1.13486 9.59639C1.03349 9.39033 0.95066 9.17565 0.887357 8.95489C0.754446 8.45324 0.751521 7.92599 0.878857 7.42289C0.882974 7.41102 0.884341 7.39837 0.882857 7.38589C0.88038 7.37348 0.873877 7.36223 0.864357 7.35389C0.556147 7.04213 0.320543 6.66619 0.174357 6.25289C0.0775698 5.99842 0.0213841 5.73031 0.00785682 5.45839C-0.0163229 5.10033 0.0153902 4.74069 0.101857 4.39239C0.326857 3.65039 0.756357 3.06839 1.39036 2.64589C1.53136 2.55189 1.66536 2.47889 1.79136 2.42689C1.93436 2.36689 2.07786 2.31689 2.22186 2.27489C2.23216 2.27184 2.24153 2.26626 2.24913 2.25866C2.25672 2.25107 2.2623 2.24169 2.26536 2.23139C2.37455 1.83888 2.56235 1.47264 2.81736 1.15489C3.15736 0.731893 3.56586 0.422893 4.04286 0.228393ZM3.64086 4.15339C3.58503 4.05573 3.49269 3.98424 3.38415 3.95465C3.27562 3.92507 3.15977 3.93981 3.06211 3.99564C2.96444 4.05147 2.89295 4.14381 2.86337 4.25235C2.83378 4.36088 2.84853 4.47673 2.90436 4.57439L3.75136 6.05689L2.90736 7.48089C2.85561 7.57738 2.84315 7.69014 2.87257 7.7956C2.902 7.90106 2.97104 7.99108 3.06526 8.04684C3.15949 8.1026 3.27162 8.1198 3.37823 8.09484C3.48484 8.06988 3.57768 8.00469 3.63736 7.91289L4.60736 6.27689C4.64561 6.21237 4.66609 6.13887 4.66671 6.06386C4.66732 5.98886 4.64805 5.91503 4.61086 5.84989L3.64086 4.15339ZM6.36386 7.27339C6.25583 7.27982 6.15434 7.32727 6.08012 7.40603C6.00591 7.48479 5.96458 7.58892 5.96458 7.69714C5.96458 7.80536 6.00591 7.90949 6.08012 7.98826C6.15434 8.06702 6.25583 8.11446 6.36386 8.12089H8.78786C8.89675 8.1156 8.99943 8.06862 9.07462 7.98969C9.14982 7.91075 9.19176 7.80591 9.19176 7.69689C9.19176 7.58787 9.14982 7.48303 9.07462 7.4041C8.99943 7.32516 8.89675 7.27818 8.78786 7.27289H6.36386V7.27339Z`,Ee=`0 0 12 12`,De=`M12 0C12.904 6.056 17.944 11.096 24 12C17.944 12.904 12.904 17.944 12 24C11.096 17.944 6.056 12.904 0 12C6.056 11.096 11.096 6.056 12 0Z`,Oe=`0 0 24 24`,ke=3/2;function V({kind:e,size:t=12,className:n,"data-testid":r}){return e===`openhands`?(0,B.jsx)(ae,{width:Math.round(t*ke),height:t,className:C(`shrink-0 [&_path:not([fill=transparent])]:fill-current`,n),"data-testid":r??`agent-brand-icon-openhands`,"aria-hidden":!0}):e===`claude-code`?(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:we,width:t,height:t,className:C(`shrink-0`,n),"data-testid":r??`agent-brand-icon-claude-code`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{fill:`currentColor`,d:Ce})}):e===`codex`?(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:Ee,width:t,height:t,className:C(`shrink-0`,n),"data-testid":r??`agent-brand-icon-codex`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:Te,fill:`currentColor`})}):e===`gemini`?(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:Oe,width:t,height:t,className:C(`shrink-0`,n),"data-testid":r??`agent-brand-icon-gemini`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{fill:`currentColor`,d:De})}):(0,B.jsx)(_e,{width:t,height:t,className:C(`shrink-0`,n),"data-testid":r??`agent-brand-icon-generic`,"aria-hidden":!0})}function H(){return new re(T())}function U(e){return{workspaces:e.workspaces.map(({parentPath:e,...t})=>({...t,...e?{parentPath:e}:{}})),workspaceParents:e.workspaceParents}}var W=class{static async listWorkspaces(){return U(await H().listWorkspaces())}static async addWorkspaces(e){return U(await H().addWorkspaces(e))}static async removeWorkspace(e){await H().deleteWorkspace(e)}static async addWorkspaceParents(e){return U(await H().addWorkspaceParents(e))}static async removeWorkspaceParent(e){await H().deleteWorkspaceParent(e)}};function Ae(){let e=l();return a({mutationFn:e=>W.addWorkspaces(e),onSuccess:()=>e.invalidateQueries({queryKey:k.all})})}function je(){let e=l();return a({mutationFn:e=>W.removeWorkspace(e),onSuccess:()=>e.invalidateQueries({queryKey:k.all})})}function Me(){let e=l();return a({mutationFn:e=>W.addWorkspaceParents(e),onSuccess:()=>e.invalidateQueries({queryKey:k.all})})}function Ne(){let e=l();return a({mutationFn:e=>W.removeWorkspaceParent(e),onSuccess:()=>e.invalidateQueries({queryKey:k.all})})}function G({enabled:e=!0}={}){return r({queryKey:k.all,queryFn:()=>W.listWorkspaces(),enabled:e,retry:(e,t)=>!D(t)&&e<3,meta:{disableToast:!0},staleTime:6e4})}function Pe(){let{data:e,isLoading:t,isError:n,error:r}=G(),i=D(r),a=e?.workspaces??[],s=e?.workspaceParents??[],c=(0,z.useMemo)(()=>{let e=new Set(s.map(e=>e.path)),t=[].filter(t=>!e.has(t.path));return t.length===0?s:[...s,...t]},[s,i]),l=o({queries:i?[]:c.map(e=>({queryKey:[`file`,`search_subdirs`,e.path],queryFn:()=>new O(T()).searchSubdirectories(e.path),retry:!1,meta:{disableToast:!0}}))}),u=t||l.some(e=>e.isLoading),d=n||l.some(e=>e.isError);return{workspaces:(0,z.useMemo)(()=>{let e=new Map,t=new Map(c.map((e,t)=>[e.path,l[t]]));return c.forEach(n=>{(t.get(n.path)?.data?.items??[]).forEach(t=>{e.has(t.path)||e.set(t.path,{id:t.path,name:t.name,path:t.path,parentPath:n.path})})}),a.forEach(t=>{e.set(t.path,t)}),Array.from(e.values())},[a,c,l.map(e=>`${e.dataUpdatedAt??0}:${e.status}`).join(`|`)]),isLoading:u,isError:d,error:r}}function Fe(e,t){return D(e)?t(c.HOME$WORKSPACES_UNSUPPORTED_AGENT_SERVER,{actualVersion:e.actualVersion,requiredVersion:e.requiredVersion}):null}function K(){return new O(T())}var Ie=e=>{let t=E();return r({queryKey:[`file`,`search_subdirs`,e,t.backend.id,t.orgId],queryFn:()=>K().searchSubdirectories(e),enabled:!!e,retry:!1,meta:{disableToast:!0}})},Le=()=>{let e=E();return r({queryKey:[`file`,`home`,e.backend.id,e.orgId],queryFn:async()=>K().getHome(),retry:!1,meta:{disableToast:!0},staleTime:1/0})},q=`/projects`;function J({label:e,entries:t,currentPath:n,onPick:r}){return t.length===0?null:(0,B.jsxs)(`div`,{className:`px-2 pb-3`,children:[(0,B.jsx)(`div`,{className:`px-2 pb-1 text-[11px] uppercase tracking-wide text-[var(--oh-muted)] font-semibold`,children:e}),(0,B.jsx)(`ul`,{children:t.map(e=>{let t=n===e.path;return(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,onClick:()=>r(e.path),"data-testid":`folder-browser-sidebar-${e.label.toLowerCase()}`,className:C(`flex items-center gap-2 w-full px-2 py-1 rounded text-sm cursor-pointer`,t?`bg-tertiary text-white`:`text-[var(--oh-text-tertiary)] hover:bg-[var(--oh-surface-raised)]`),children:[(0,B.jsx)(L,{width:14,height:14,className:`shrink-0`}),(0,B.jsx)(`span`,{className:`truncate`,children:e.label})]})},e.path)})})]})}function Re(e){let t=e.replace(/\/+$/,``);if(!t||t===`/`)return null;let n=t.lastIndexOf(`/`);return n<=0?`/`:t.slice(0,n)}function Y(e){return e?.home===`/home/openhands`}function ze({isOpen:e,onClose:t,onAdd:n,onAddParent:r}){let{t:i}=f(`openhands`),[a,o]=(0,z.useState)(null),s=E(),{data:l}=Le();(0,z.useEffect)(()=>{e&&l?.home&&a===null&&o(Y(l)?q:l.home),e||o(null)},[e,l?.home,a]),(0,z.useEffect)(()=>{o(null)},[s.backend.id,s.orgId]);let{data:u,isLoading:d,isError:p,error:m}=Ie(e?a:null),h=(0,z.useMemo)(()=>{if(!l?.home)return[];let e=[{label:`Home`,path:l.home.replace(/[\\/]+$/,``)||l.home},...l.favorites??[]];return Y(l)&&!e.some(e=>e.path===q)&&e.push({label:q,path:q}),e},[l]),g=l?.locations??[];if(!e)return null;let _=u?.items??[],v=a?Re(a):null,y=l?.home===`/home/openhands`&&(l?.favorites?.length??0)===0&&a===l?.home&&!d&&!p&&_.length===0,b=e=>{let t=e.replace(/\/+$/,``);if(!t)return`/`;let n=t.lastIndexOf(`/`);return n>=0?t.slice(n+1)||`/`:t};return(0,B.jsx)(A,{onClose:t,"aria-label":i(c.HOME$ADD_WORKSPACES_TITLE),children:(0,B.jsxs)(`div`,{"data-testid":`folder-browser-modal`,className:C(`flex flex-col bg-[var(--oh-surface)] border border-[var(--oh-border-input)] rounded-xl`,j(`xl`),M,`h-[480px]`),children:[(0,B.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 border-b border-[var(--oh-border-input)]`,children:(0,B.jsx)(N,{className:P,title:i(c.HOME$ADD_WORKSPACES_TITLE)})}),(0,B.jsxs)(`div`,{className:`flex flex-1 min-h-0`,children:[(0,B.jsxs)(`aside`,{"data-testid":`folder-browser-sidebar`,className:`w-[180px] shrink-0 border-r border-[var(--oh-border-input)] bg-[var(--oh-surface)] py-3 overflow-y-auto`,children:[(0,B.jsx)(J,{label:i(c.HOME$FAVORITES),entries:h,currentPath:a,onPick:o}),(0,B.jsx)(J,{label:i(c.HOME$LOCATIONS),entries:g,currentPath:a,onPick:o})]}),(0,B.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-2 border-b border-[var(--oh-border-input)]`,children:[(0,B.jsx)(`button`,{type:`button`,"data-testid":`folder-browser-up`,onClick:()=>v&&o(v),disabled:!v,"aria-label":`Up`,className:`p-1 rounded hover:bg-[var(--oh-interactive-hover)] text-white disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer`,children:(0,B.jsx)(ve,{width:16,height:16})}),(0,B.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,"data-testid":`folder-browser-current-path`,children:a??``})]}),(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_120px] px-4 py-1 border-b border-[var(--oh-border-input)] text-xs text-[var(--oh-text-secondary)] font-semibold`,children:[(0,B.jsx)(`span`,{children:i(c.HOME$NAME)}),(0,B.jsx)(`span`,{children:i(c.HOME$KIND)})]}),(0,B.jsxs)(`ul`,{className:`flex-1 overflow-auto custom-scrollbar-always`,"data-testid":`folder-browser-list`,children:[d&&(0,B.jsx)(`li`,{className:`px-4 py-2 text-sm text-[var(--oh-text-secondary)]`,children:i(c.HOME$LOADING)}),p&&(0,B.jsx)(`li`,{className:`px-4 py-2 text-sm text-red-400`,"data-testid":`folder-browser-error`,children:m?.message??`Failed to load`}),!d&&!p&&_.length===0&&(0,B.jsx)(`li`,{className:`px-4 py-2 text-sm text-[var(--oh-text-secondary)]`,"data-testid":y?`folder-browser-host-home-hint`:`folder-browser-empty`,children:i(y?c.HOME$HOST_HOME_NOT_MOUNTED_HINT:c.HOME$NO_WORKSPACES)}),_.map(e=>(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,onClick:()=>o(e.path),className:`grid grid-cols-[1fr_120px] items-center w-full text-left px-4 py-1.5 text-sm text-white hover:bg-[var(--oh-interactive-hover)] cursor-pointer`,"data-testid":`folder-browser-entry-${e.name}`,children:[(0,B.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0`,children:[(0,B.jsx)(L,{width:16,height:16,className:`shrink-0`}),(0,B.jsx)(`span`,{className:`truncate`,children:e.name})]}),(0,B.jsx)(`span`,{className:`text-[var(--oh-text-secondary)] text-xs`,children:i(c.HOME$FOLDER)})]})},e.path))]})]})]}),(0,B.jsxs)(`div`,{className:`flex items-center justify-end gap-2 px-5 py-3 border-t border-[var(--oh-border-input)]`,children:[(0,B.jsx)(F,{type:`button`,variant:`secondary`,onClick:t,testId:`folder-browser-cancel`,children:i(c.HOME$CANCEL)}),r&&(0,B.jsx)(F,{type:`button`,variant:`secondary`,onClick:()=>{!a||!r||(r([{id:a,name:b(a),path:a}]),t())},isDisabled:!a||d,testId:`folder-browser-add-all-subdirs`,children:i(c.HOME$ADD_ALL_SUBDIRECTORIES)}),(0,B.jsx)(F,{type:`button`,variant:`primary`,onClick:()=>{a&&(n([{id:a,name:b(a),path:a}]),t())},isDisabled:!a||d,testId:`folder-browser-use`,children:i(c.HOME$ADD_THIS_DIRECTORY)})]})]})})}function Be({isOpen:e,workspaces:t,workspaceParents:n=[],onClose:r,onRemove:i,onRemoveParent:a}){let{t:o}=f(`openhands`),[s,l]=z.useState(null);if(!e)return null;let u=t.filter(e=>!e.parentPath),d=new Map;t.forEach(e=>{if(!e.parentPath)return;let t=d.get(e.parentPath)??[];t.push(e),d.set(e.parentPath,t)});let p=u.length>0||n.length>0;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(A,{onClose:r,"aria-label":o(c.HOME$MANAGE_WORKSPACES),children:(0,B.jsxs)(`div`,{"data-testid":`manage-workspaces-modal`,className:C(`flex flex-col bg-[var(--oh-surface)] border border-[var(--oh-border-input)] rounded-xl`,j(`lg`),M,`max-h-[70vh]`),children:[(0,B.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 border-b border-[var(--oh-border-input)]`,children:(0,B.jsx)(N,{className:P,title:o(c.HOME$MANAGE_WORKSPACES)})}),(0,B.jsxs)(`div`,{className:`flex-1 overflow-auto custom-scrollbar-always`,"data-testid":`manage-workspaces-list`,children:[!p&&(0,B.jsx)(`p`,{className:`px-5 py-6 text-sm text-[var(--oh-text-secondary)] text-center`,children:o(c.HOME$MANAGE_WORKSPACES_EMPTY)}),u.length>0&&(0,B.jsx)(`ul`,{children:u.map(e=>(0,B.jsxs)(`li`,{className:`flex items-center gap-3 px-5 py-2 border-b border-[var(--oh-border-subtle)] last:border-b-0`,"data-testid":`manage-workspaces-row-${e.name}`,children:[(0,B.jsx)(L,{width:16,height:16,className:`shrink-0`}),(0,B.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1`,children:[(0,B.jsx)(`span`,{className:`text-sm text-white truncate`,children:e.name}),(0,B.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,children:e.path})]}),(0,B.jsxs)(`button`,{type:`button`,onClick:()=>l({type:`workspace`,path:e.path,text:o(c.HOME$REMOVE_WORKSPACE_CONFIRMATION,{name:e.name})}),"aria-label":o(c.HOME$REMOVE_WORKSPACE),"data-testid":`manage-workspaces-remove-${e.name}`,className:`flex items-center gap-1 px-2 py-1 rounded text-xs text-[var(--oh-text-tertiary)] hover:bg-[var(--oh-interactive-hover)] hover:text-white cursor-pointer`,children:[(0,B.jsx)(R,{width:12,height:12}),(0,B.jsx)(`span`,{children:o(c.HOME$REMOVE_WORKSPACE)})]})]},e.id))}),n.length>0&&(0,B.jsxs)(`div`,{"data-testid":`manage-workspaces-parents-section`,children:[(0,B.jsx)(`div`,{className:`px-5 pt-3 pb-1 text-[11px] uppercase tracking-wide text-[var(--oh-muted)] font-semibold`,children:o(c.HOME$WORKSPACE_PARENTS)}),(0,B.jsx)(`ul`,{children:n.map(e=>{let t=d.get(e.path)??[];return(0,B.jsxs)(`li`,{className:`border-b border-[var(--oh-border-subtle)] last:border-b-0`,"data-testid":`manage-workspaces-parent-row-${e.name}`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-2`,children:[(0,B.jsx)(L,{width:16,height:16,className:`shrink-0`}),(0,B.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1`,children:[(0,B.jsx)(`span`,{className:`text-sm text-white truncate`,children:e.name}),(0,B.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,children:e.path})]}),a&&(0,B.jsxs)(`button`,{type:`button`,onClick:()=>l({type:`parent`,path:e.path,text:o(c.HOME$REMOVE_WORKSPACE_PARENT_CONFIRMATION,{name:e.name,count:t.length})}),"aria-label":o(c.HOME$REMOVE_WORKSPACE_PARENT),"data-testid":`manage-workspaces-remove-parent-${e.name}`,className:`flex items-center gap-1 px-2 py-1 rounded text-xs text-[var(--oh-text-tertiary)] hover:bg-[var(--oh-interactive-hover)] hover:text-white cursor-pointer`,children:[(0,B.jsx)(R,{width:12,height:12}),(0,B.jsx)(`span`,{children:o(c.HOME$REMOVE_WORKSPACE_PARENT)})]})]}),t.length>0&&(0,B.jsx)(`ul`,{className:`pb-2`,children:t.map(e=>(0,B.jsxs)(`li`,{className:`flex items-center gap-3 px-5 pl-10 py-1 text-xs text-[var(--oh-text-secondary)]`,"data-testid":`manage-workspaces-child-${e.name}`,children:[(0,B.jsx)(L,{width:12,height:12,className:`shrink-0 opacity-70`}),(0,B.jsx)(`span`,{className:`truncate`,children:e.name})]},e.id))})]},e.id)})})]})]}),(0,B.jsx)(`div`,{className:`flex justify-end gap-2 px-5 py-3 border-t border-[var(--oh-border-input)]`,children:(0,B.jsx)(F,{type:`button`,variant:`primary`,onClick:r,testId:`manage-workspaces-done`,children:o(c.HOME$DONE)})})]})}),s&&(0,B.jsx)(fe,{text:s.text,onConfirm:()=>{s&&(s.type===`workspace`?i(s.path):a?.(s.path),l(null))},onCancel:()=>l(null)})]})}function Ve({currentStep:e,totalSteps:t,className:n}){return(0,B.jsx)(`div`,{role:`progressbar`,"aria-valuemin":1,"aria-valuemax":t,"aria-valuenow":e+1,"data-testid":`onboarding-progress-bar`,className:C(`flex w-full items-center gap-2`,n),children:Array.from({length:t},(t,n)=>{let r=n<e,i=n===e;return(0,B.jsx)(`div`,{"data-testid":`onboarding-progress-step-${n}`,"data-state":r?`completed`:i?`current`:`upcoming`,className:C(`h-1.5 flex-1 rounded-full transition-colors duration-300`,r||i?`bg-white`:`bg-white/15`)},n)})})}function He(e){return e===`openhands`?`openhands`:I.find(({key:t})=>t===e)?.icon??`cli-generic`}function Ue({id:e,muted:t}){let n=He(e);return n===`openhands`?(0,B.jsx)(V,{kind:`openhands`,size:16,className:C(`text-white`,t&&`opacity-55`),"data-testid":`onboarding-agent-icon-openhands`}):(0,B.jsx)(V,{kind:n,size:18,className:t?`text-[var(--oh-muted)]`:`text-white`,"data-testid":`onboarding-agent-icon-${n}`})}function We(){return[{id:`openhands`,label:`OpenHands`,descriptionKey:c.ONBOARDING$AGENT_OPENHANDS_DESCRIPTION},...I.map(e=>({id:e.key,label:e.display_name,descriptionKey:e.description_key}))]}function Ge({selectedAgentId:e,onSelect:t,onBack:n,onNext:r}){let{t:i}=f(`openhands`),{mutate:a,isPending:o}=ye();return(0,B.jsxs)(`div`,{"data-testid":`onboarding-step-choose-agent`,className:`flex flex-col gap-6`,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:i(c.ONBOARDING$AGENT_TITLE)}),(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:i(c.ONBOARDING$AGENT_SUBTITLE)})]}),(0,B.jsx)(`div`,{role:`radiogroup`,"aria-label":i(c.ONBOARDING$AGENT_TITLE),className:`flex flex-col gap-3`,children:We().map(n=>{let r=n.id===e;return(0,B.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"data-testid":`onboarding-agent-option-${n.id}`,"data-selected":r,onClick:()=>t(n.id),className:C(`flex items-start justify-between gap-4 rounded-xl border px-4 py-3 text-left transition-colors cursor-pointer`,r?`border-white/45 bg-white/[0.09] shadow-none hover:border-white/45 hover:bg-white/[0.09]`:`border-white/30 bg-white/5 hover:border-white/40 hover:bg-white/[0.08]`),children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,B.jsx)(Ue,{id:n.id,muted:!1}),(0,B.jsx)(`span`,{className:`truncate text-base font-normal text-white`,children:n.label})]}),(0,B.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:i(n.descriptionKey)})]}),(0,B.jsx)(`div`,{className:`flex shrink-0 flex-col items-end gap-1`,children:r?(0,B.jsx)(g,{width:18,height:18,className:`mt-1 shrink-0 text-white`,"aria-hidden":!0}):null})]},n.id)})}),(0,B.jsxs)(`div`,{className:C(`sticky bottom-0 flex items-center gap-2 bg-base-secondary pt-4 pb-7`,n?`justify-between`:`justify-end`),children:[n?(0,B.jsx)(F,{testId:`onboarding-agent-back`,type:`button`,variant:`secondary`,onClick:n,isDisabled:o,children:i(c.ONBOARDING$BACK)}):null,(0,B.jsx)(F,{testId:`onboarding-agent-next`,type:`button`,variant:`primary`,isDisabled:o,onClick:()=>{let t=pe(e);if(!t){r();return}a({agent_settings_diff:t},{onError:e=>{_(p(e)||i(c.ERROR$GENERIC))},onSuccess:()=>{v(i(c.SETTINGS$SAVED)),r()}})},children:i(o?c.SETTINGS$SAVING:c.ONBOARDING$NEXT)})]})]})}function Ke({isConnected:e}){let{t}=f(`openhands`);return e===!0?(0,B.jsxs)(`div`,{role:`status`,"data-testid":`onboarding-backend-connected`,className:C(`flex items-start gap-3 rounded-xl border border-green-500/40 bg-green-500/10 px-4 py-3`),children:[(0,B.jsx)(h,{className:`mt-0.5 size-5 shrink-0 text-green-400`}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`span`,{className:`text-sm font-medium text-green-200`,children:t(c.ONBOARDING$BACKEND_CONNECTED_TITLE)}),(0,B.jsx)(`span`,{className:`text-xs text-green-200/80`,children:t(c.ONBOARDING$BACKEND_CONNECTED_BODY)})]})]}):e===!1?(0,B.jsxs)(`div`,{role:`alert`,"data-testid":`onboarding-backend-disconnected`,className:`flex items-start gap-3 rounded-xl border border-red-500/40 bg-red-500/10 px-4 py-3`,children:[(0,B.jsx)(Se,{className:`mt-0.5 size-5 shrink-0 text-red-400`}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`span`,{className:`text-sm font-medium text-red-200`,children:t(c.ONBOARDING$BACKEND_DISCONNECTED_TITLE)}),(0,B.jsx)(`span`,{className:`text-xs text-red-200/80`,children:t(c.ONBOARDING$BACKEND_DISCONNECTED_BODY)})]})]}):(0,B.jsxs)(`div`,{role:`status`,"data-testid":`onboarding-backend-checking`,className:`flex items-start gap-3 rounded-xl border border-white/10 bg-white/5 px-4 py-3`,children:[(0,B.jsx)(i,{className:`mt-0.5 size-5 shrink-0 animate-spin text-[var(--oh-text-tertiary)]`}),(0,B.jsx)(`span`,{className:`text-sm text-[var(--oh-text-tertiary)]`,children:t(c.ONBOARDING$BACKEND_CHECKING)})]})}function qe({onBack:e,onNext:t}){let{t:n}=f(`openhands`),{active:r}=ne(),{backend:i}=r,a=te(i),o=z.useMemo(()=>w(),[]),s=a?{id:`onboarding-local-backend-draft`,name:ee,host:o.baseUrl,apiKey:o.sessionApiKey,kind:`local`}:i,l=le(a?[]:[i]),u=a?!1:l[i.id]?.isConnected??null,[d,p]=z.useState(!1);z.useEffect(()=>{u===!0&&p(!1)},[u]);let m=u===!0&&!d;return(0,B.jsxs)(`div`,{"data-testid":`onboarding-step-check-backend`,className:`flex flex-col gap-6`,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:n(c.ONBOARDING$BACKEND_TITLE)}),(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:n(c.ONBOARDING$BACKEND_SUBTITLE)})]}),(0,B.jsx)(Ke,{isConnected:u}),u===!0?(0,B.jsxs)(`button`,{type:`button`,onClick:()=>p(e=>!e),"aria-expanded":d,"data-testid":`onboarding-backend-show-configuration`,className:`flex w-full cursor-pointer items-center justify-center gap-1 text-center text-xs text-[var(--oh-muted)] transition-colors hover:text-content-2`,children:[(0,B.jsx)(`span`,{children:n(d?c.ONBOARDING$BACKEND_HIDE_CONFIGURATION:c.ONBOARDING$BACKEND_SHOW_CONFIGURATION)}),(0,B.jsx)(ce,{className:C(`h-4 w-4 shrink-0 text-muted transition-transform`,d&&`rotate-180`),"aria-hidden":!0})]}):null,(0,B.jsx)(ue,{mode:a?`add`:`edit`,backend:s,onSubmitted:t,testIdRoot:`onboarding-backend`,requireApiKey:!0,hideConfigurationFields:m,renderActions:({canSubmit:t,isSubmitting:r})=>(0,B.jsxs)(`div`,{className:C(`sticky bottom-0 mt-2 flex items-center gap-2 bg-base-secondary pt-4 pb-7`,e?`justify-between`:`justify-end`),children:[e?(0,B.jsx)(F,{testId:`onboarding-backend-back`,type:`button`,variant:`secondary`,onClick:e,isDisabled:r,children:n(c.ONBOARDING$BACK)}):null,(0,B.jsx)(F,{testId:`onboarding-backend-next`,type:`submit`,variant:`primary`,isDisabled:!t||r,children:n(r?c.SETTINGS$SAVING:c.ONBOARDING$NEXT)})]})})]})}var Je={"llm.model":`anthropic/claude-opus-4-8`};function Ye({onBack:e,onNext:t}){let{t:n}=f(`openhands`),{backend:r}=E(),i=r.kind===`local`,a=x(),o=b(),[s,l]=z.useState(null),[u,d]=z.useState(!1),p=z.useCallback(async()=>{if(!i||!s)return;let e=s.values,t=typeof e[`llm.model`]==`string`?e[`llm.model`]:``;if(!t)return;let n=typeof e[`llm.api_key`]==`string`?e[`llm.api_key`]:``,r=typeof e[`llm.base_url`]==`string`?e[`llm.base_url`]:``,c=y(t),l={model:t};n&&(l.api_key=n),r&&(l.base_url=r);try{await a.mutateAsync({name:c,request:{llm:l,include_secrets:!0}}),await o.mutateAsync(c)}catch(e){console.error(`Failed to persist onboarding LLM as profile:`,e)}},[i,s,a,o]),m=z.useCallback(async()=>{d(!0);try{await p()}finally{d(!1),t()}},[p,t]);return(0,B.jsxs)(`div`,{"data-testid":`onboarding-step-setup-llm`,className:`flex flex-col gap-6 max-h-[calc(90vh-7rem)]`,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:n(c.ONBOARDING$LLM_TITLE)}),(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:n(c.ONBOARDING$LLM_SUBTITLE)})]}),(0,B.jsx)(`div`,{"data-testid":`onboarding-llm-settings`,className:`flex min-h-0 flex-1 flex-col overflow-y-auto custom-scrollbar-always`,children:(0,B.jsx)(S,{embedded:!0,hideSaveButton:!0,suppressSuccessToast:!0,initialValueOverrides:Je,onSaveSuccess:m,onSaveControlChange:l})}),(0,B.jsxs)(`div`,{className:`sticky bottom-0 flex items-center justify-between gap-2 bg-base-secondary pt-4 pb-7`,children:[(0,B.jsx)(F,{testId:`onboarding-llm-back`,type:`button`,variant:`secondary`,onClick:e,children:n(c.ONBOARDING$BACK)}),(0,B.jsx)(F,{testId:`onboarding-llm-next`,type:`button`,variant:`primary`,isDisabled:(s?.isSaving??!1)||u,onClick:()=>{if(s?.isDirty){s.save();return}t()},children:n(c.ONBOARDING$NEXT)})]})]})}var Xe=10;function Ze(e){return`${e.stdout??``}\n${e.stderr??``}`}function Qe(e){let t;try{t=JSON.parse((e.stdout??``).trim())}catch{return`unknown`}let n=t?.loggedIn;return typeof n==`boolean`?n?`authenticated`:`unauthenticated`:`unknown`}function $e(e){let t=Ze(e).toLowerCase();return t.includes(`not logged in`)?`unauthenticated`:t.includes(`logged in`)?`authenticated`:`unknown`}function et(e){let t=(e.stdout??``).trim();return t===`present`?`authenticated`:t===`absent`?`unauthenticated`:`unknown`}var tt={"claude-code":{command:`claude auth status --json`,classify:Qe},codex:{command:`codex login status`,classify:$e},"gemini-cli":{command:`test -f "$HOME/.gemini/oauth_creds.json" && echo present || echo absent`,classify:et}},nt=class{static async getAuthStatus(e){let t=tt[e];if(!t)return`unknown`;let n=await new ie(T()).executeCommand(t.command,void 0,Xe);return t.classify(n)}};async function rt(e){try{return await nt.getAuthStatus(e)}catch{return`unknown`}}function it(e,t={}){let{enabled:n=!0}=t,i=E(),a=i.backend.kind===`local`,o=n&&a&&!!e,s=r({queryKey:[`acp-auth-status`,i.backend.id,e],queryFn:()=>rt(e),enabled:o,staleTime:1/0,gcTime:1e3*60*15,retry:!1,refetchOnWindowFocus:!1,refetchOnMount:!1});return{status:s.data??`unknown`,isChecking:o&&s.isFetching&&s.data===void 0,isSupported:a}}function at({providerKey:e,isActive:t,onBack:n,onNext:r}){let{t:a}=f(`openhands`),o=l(),{mutateAsync:s}=be(),{data:u}=xe(),{status:d,isChecking:m}=it(e,{enabled:t}),h=z.useMemo(()=>he(e),[e]),[y,b]=z.useState({}),[x,S]=z.useState(!1),C=me(e)??e,w=z.useCallback(e=>(u??[]).some(t=>t.name===e),[u]);return(0,B.jsxs)(`div`,{"data-testid":`onboarding-step-setup-acp-secrets`,className:`flex flex-col gap-6`,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:a(c.ONBOARDING$ACP_SECRETS_TITLE)}),(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:a(c.ONBOARDING$ACP_SECRETS_SUBTITLE,{provider:C})}),d!==`authenticated`&&(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:a(c.ONBOARDING$ACP_SECRETS_SUBSCRIPTION_NOTE)})]}),d===`authenticated`?(0,B.jsxs)(`div`,{"data-testid":`onboarding-acp-auth-detected`,className:`flex items-start gap-2 rounded-xl border border-green-500/40 bg-green-500/10 px-4 py-3 text-sm text-green-200`,children:[(0,B.jsx)(g,{className:`mt-0.5 size-4 shrink-0 text-green-400`,"aria-hidden":!0}),(0,B.jsx)(`span`,{children:a(c.ONBOARDING$ACP_AUTH_DETECTED,{provider:C})})]}):m?(0,B.jsxs)(`div`,{"data-testid":`onboarding-acp-auth-checking`,className:`flex items-center gap-2 text-sm text-[var(--oh-muted)]`,children:[(0,B.jsx)(i,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":!0}),(0,B.jsx)(`span`,{children:a(c.ONBOARDING$ACP_AUTH_CHECKING,{provider:C})})]}):null,(0,B.jsx)(`div`,{className:`flex flex-col gap-5`,children:h.map(e=>{let t=w(e.name);return(0,B.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,B.jsx)(de,{testId:`onboarding-acp-secret-${e.name}`,name:e.name,label:e.name,labelClassName:`font-mono`,type:e.secret?`password`:`text`,value:y[e.name]??``,onChange:t=>b(n=>({...n,[e.name]:t})),showOptionalTag:!0,placeholder:t?a(c.ONBOARDING$ACP_SECRET_ALREADY_SET):``}),(0,B.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:a(e.hint_key)})]},e.name)})}),(0,B.jsxs)(`div`,{className:`sticky bottom-0 flex items-center justify-between gap-2 bg-base-secondary pt-4 pb-7`,children:[(0,B.jsx)(F,{testId:`onboarding-acp-secrets-back`,type:`button`,variant:`secondary`,onClick:n,isDisabled:x,children:a(c.ONBOARDING$BACK)}),(0,B.jsx)(F,{testId:`onboarding-acp-secrets-next`,type:`button`,variant:`primary`,isDisabled:x,onClick:async()=>{let e=h.map(e=>({name:e.name,value:y[e.name]?.trim()})).filter(e=>!!e.value);if(e.length===0){r();return}S(!0);try{for(let{name:t,value:n}of e)await s({name:t,value:n});await o.invalidateQueries({queryKey:[`secrets-search`]}),await o.invalidateQueries({queryKey:[`secrets`]}),v(a(c.SETTINGS$SAVED)),r()}catch(e){_(p(e)||a(c.ERROR$GENERIC))}finally{S(!1)}},children:a(x?c.SETTINGS$SAVING:c.ONBOARDING$NEXT)})]})]})}function ot({onBack:e,onClose:t,onLaunched:n}){let{t:r}=f(`openhands`),{navigate:i}=oe(),a=r(c.ONBOARDING$HELLO_DEFAULT_MESSAGE),[o,s]=z.useState(a),{mutate:l,isPending:p,isSuccess:m}=ge(),h=u(),g=p||m||h,_=z.useRef(!1),v=o.trim().length>0&&!g&&!_.current,y=()=>{!v||_.current||(_.current=!0,l({query:o.trim()},{onSuccess:e=>{n(),i(`/conversations/${e.conversation_id}`)},onError:()=>{_.current=!1}}))};return(0,B.jsxs)(`div`,{"data-testid":`onboarding-step-say-hello`,className:`flex max-h-[calc(90vh-7rem)] flex-col`,children:[(0,B.jsxs)(`header`,{className:`flex shrink-0 flex-col gap-2`,children:[(0,B.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:r(c.ONBOARDING$HELLO_TITLE)}),(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:r(c.ONBOARDING$HELLO_SUBTITLE)})]}),(0,B.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),y()},"data-testid":`onboarding-hello-input-form`,className:`mt-6 box-border flex w-full shrink-0 flex-col items-start justify-center rounded-[15px] border border-[var(--oh-border)] bg-surface-raised p-4`,children:[(0,B.jsx)(`div`,{className:`relative w-full`,children:(0,B.jsx)(`div`,{className:`box-border flex w-full shrink-0 flex-row items-end justify-between gap-2 p-0 pb-[18px]`,children:(0,B.jsx)(`input`,{"data-testid":`onboarding-hello-input`,"aria-label":r(c.ONBOARDING$HELLO_TITLE),type:`text`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),y())},placeholder:a,disabled:g,className:`min-h-[20px] w-full flex-1 bg-transparent text-[16px] font-normal leading-[20px] text-white outline-none placeholder:text-[var(--oh-text-tertiary)] disabled:cursor-not-allowed disabled:opacity-50`})})}),(0,B.jsx)(`div`,{className:`flex w-full min-w-0 items-center justify-end gap-2`,children:(0,B.jsx)(se,{buttonClassName:``,handleSubmit:y,disabled:!v})})]}),(0,B.jsxs)(`div`,{"data-testid":`onboarding-hello-or-separator`,className:`mt-6 flex w-full items-center gap-3`,children:[(0,B.jsx)(`div`,{className:`h-px flex-1 bg-[var(--oh-border)]`}),(0,B.jsx)(`span`,{className:`text-xs uppercase text-[var(--oh-muted)]`,children:r(c.LANDING$OR)}),(0,B.jsx)(`div`,{className:`h-px flex-1 bg-[var(--oh-border)]`})]}),(0,B.jsx)(`div`,{"data-testid":`onboarding-recommended-automations`,className:`flex min-h-0 flex-1 flex-col`,children:(0,B.jsx)(d,{onLaunched:n,scrollableGrid:!0})}),(0,B.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 bg-base-secondary pt-7 pb-7`,children:[(0,B.jsx)(F,{testId:`onboarding-hello-back`,type:`button`,variant:`secondary`,onClick:e,isDisabled:g,children:r(c.ONBOARDING$BACK)}),(0,B.jsx)(F,{testId:`onboarding-hello-close`,type:`button`,variant:`secondary`,onClick:t,isDisabled:g,children:r(c.BUTTON$CLOSE)})]})]})}var X=4,Z=2;function Q({index:e,currentStep:t,children:n}){let r=e===t,i=(e-t)*100;return(0,B.jsx)(`div`,{"data-testid":`onboarding-slide-${e}`,"data-active":r,"aria-hidden":!r,style:{transform:`translateX(${i}%)`},className:C(`w-full transition-transform duration-300 ease-out`,!r&&`pointer-events-none absolute inset-0`),children:n})}function st({onClose:e,initialStep:t=0,isPreview:n=!1}){let{t:r}=f(`openhands`),[i,a]=z.useState(()=>Math.min(Math.max(t,0),X-1)),[o,s]=z.useState(`openhands`),l=o===`openhands`,u=z.useCallback(()=>a(e=>Math.min(e+1,X-1)),[]),d=z.useCallback(()=>a(e=>Math.max(e-1,0)),[]);return(0,B.jsx)(A,{"aria-label":r(c.ONBOARDING$TITLE),children:(0,B.jsxs)(`div`,{className:`relative flex flex-col items-center gap-4`,children:[(0,B.jsxs)(`section`,{"data-testid":`onboarding-modal`,"data-current-step":i,"data-preview":n?`true`:void 0,className:C(`flex flex-col gap-6 overflow-hidden rounded-2xl border border-white/10 bg-base-secondary shadow-2xl`,j(`lg`),M,`max-h-[90vh]`),children:[(0,B.jsx)(`header`,{className:`flex flex-col gap-3 px-7 pt-7 shrink-0`,children:(0,B.jsx)(Ve,{currentStep:i,totalSteps:X})}),(0,B.jsx)(`div`,{"data-testid":`onboarding-scroll-area`,className:`flex-1 min-h-0 overflow-y-auto custom-scrollbar-always px-7`,children:(0,B.jsxs)(`div`,{"data-testid":`onboarding-slide-rail`,"data-current-step":i,className:`relative overflow-clip`,children:[(0,B.jsx)(Q,{index:0,currentStep:i,children:(0,B.jsx)(Ge,{selectedAgentId:o,onSelect:s,onNext:u})}),(0,B.jsx)(Q,{index:1,currentStep:i,children:(0,B.jsx)(qe,{onBack:d,onNext:u})}),(0,B.jsx)(Q,{index:Z,currentStep:i,children:l?(0,B.jsx)(Ye,{onBack:d,onNext:u}):(0,B.jsx)(at,{providerKey:o,isActive:i===Z,onBack:d,onNext:u})}),(0,B.jsx)(Q,{index:3,currentStep:i,children:(0,B.jsx)(ot,{onBack:d,onClose:e,onLaunched:e})})]})})]}),i<X-1?(0,B.jsx)(`button`,{type:`button`,"data-testid":`onboarding-skip`,onClick:e,className:`rounded-md px-3 py-2 text-sm text-[var(--oh-muted)] transition-colors hover:bg-white/5 hover:text-white cursor-pointer`,children:r(c.ONBOARDING$SKIP)}):null]})})}var ct=`previewOnboardingStep`,lt=3;function $(e=typeof window<`u`?window.location.search:``){let t=new URLSearchParams(e).get(ct);if(t==null)return null;let n=Number.parseInt(t,10);return!Number.isFinite(n)||n<0||n>lt?null:n}function ut(e=typeof window<`u`?window.location.search:``){return $(e)!=null}var dt=`openhands-onboarded`;function ft(){if(typeof window>`u`)return!0;try{return window.localStorage.getItem(dt)!==null}catch{return!0}}function pt(){let[e,t]=z.useState(()=>ft());return z.useEffect(()=>{let e=e=>{e.key===`openhands-onboarded`&&t(ft())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),{isCompleted:e,markCompleted:z.useCallback(()=>{try{window.localStorage.setItem(dt,`1`)}catch{}t(!0)},[])}}function mt(){let e=n(),t=$(e.search),r=ut(e.search),{isCompleted:i,markCompleted:a}=pt();return!r&&i?null:(0,B.jsx)(st,{onClose:()=>{r||a()},initialStep:t??0,isPreview:r})}export{Fe as a,Me as c,Ne as d,V as f,ze as i,Ae as l,ut as n,Pe as o,Be as r,G as s,mt as t,je as u};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{C as n,_ as r,b as i,c as a,k as o}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~h07fzaqi-D15MEcqi.js";import{a as s,c,d as l,i as u,l as d,o as f,r as p,s as m,u as h}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{n as g}from"./QueryClientProvider-w1cZWY41.js";import{d as _}from"./agent-server-client-options-9agOSarV.js";import{r as v}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-Fa-nXZ4M.js";import{t as y}from"./proxy-sRh0WKI7.js";function b(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function x(e,t,n){let r=e.slice(0);return r[t]=n,r}var S=class extends o{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,a.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let r=t.map(e=>e.observer),i=r.map(e=>e.getCurrentResult()),a=e.length!==r.length,o=r.some((t,n)=>t!==e[n]),s=a||o,c=s?!0:i.some((e,t)=>{let r=this.#t[t];return!r||!n(e,r)});!s&&!c||(s&&(this.#l=t,this.#i=r),this.#t=i,this.hasListeners()&&(s&&(b(e,r).forEach(e=>{e.destroy()}),b(r,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,a=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||a||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=i(this.#a,t(e))),this.#a}return e}#f(){return this.#r?.combine!==void 0&&this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new l(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=x(this.#t,n,t),this.#h())}#h(){if(this.hasListeners()){let e=this.#u(this.#t,this.#l),t=this.#f(),n=this.#a,r=t?n:this.#d(e,this.#r?.combine);(t||n!==r)&&a.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},C=e(t(),1);function w({queries:e,...t},n){let i=g(n),o=h(),_=d(),v=C.useMemo(()=>e.map(e=>{let t=i.defaultQueryOptions(e);return t._optimisticResults=o?`isRestoring`:`optimistic`,t}),[e,i,o]);v.forEach(e=>{p(e),f(e,_,i.getQueryCache().get(e.queryHash))}),c(_);let[y]=C.useState(()=>new S(i,v,t)),[b,x,w]=y.getOptimisticResult(v,t.combine),T=!o&&t.subscribed!==!1;C.useSyncExternalStore(C.useCallback(e=>T?y.subscribe(a.batchCalls(e)):r,[y,T]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),C.useEffect(()=>{y.setQueries(v,t)},[v,t,y]);let E=b.some((e,t)=>s(v[t],e))?b.flatMap((e,t)=>{let n=v[t];return n&&s(n,e)?u(n,new l(i,n),_):[]}):[];if(E.length>0)throw Promise.all(E);let D=b.find((e,t)=>{let n=v[t];return n&&m({result:e,errorResetBoundary:_,throwOnError:n.throwOnError,query:i.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(D?.error)throw D.error;return x(w())}function T(e){return{items:e?.items??[],currentOrgId:e?.current_org_id??null}}function E(e){if(e)return e;let t=_().backend;if(t.kind!==`cloud`)throw Error(`Cloud organization calls require a cloud backend. Active backend is local.`);return t}async function D(e){return T(await y({backend:E(e),method:`GET`,path:`/api/organizations`}))}async function O(e){let t=E(e);try{return{orgId:(await y({backend:t,method:`GET`,path:`/api/keys/current`}))?.org_id??null,isLegacyKey:!1}}catch(e){if(v.isAxiosError(e)&&e.response?.status===400)return{orgId:null,isLegacyKey:!0};throw e}}async function k(e,t){let n=await y({backend:E(t),method:`GET`,path:`/api/organizations/${encodeURIComponent(e)}/me`});return{orgId:n?.org_id??e,userId:n?.user_id??``}}export{w as i,D as n,O as r,k as t};
@@ -1 +0,0 @@
1
- import{i as e,r as t}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~h07fzaqi-D15MEcqi.js";import{d as n,n as r}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{t as i}from"./createLucideIcon-Ddu8jDOQ.js";import{d as a,n as o}from"./agent-server-client-options-9agOSarV.js";import{r as s,s as c,t as l}from"./agent-server-conversation-service.api-Cagoqq1V.js";var u=class extends n{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(n,r){let{state:i}=n,a=super.createResult(n,r),{isFetching:o,isRefetching:s,isError:c,isRefetchError:l}=a,u=i.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=o&&u===`forward`,p=c&&u===`backward`,m=o&&u===`backward`;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:t(r,i.data),hasPreviousPage:e(r,i.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function d(e,t){return r(e,u,t)}var f=i(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),p=i(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),m=async e=>{let t=(await l.batchGetAppConversations([e]))[0];if(!t)throw Error(`V1 conversation not found: ${e}`);return{conversationUrl:t.conversation_url,sessionApiKey:t.session_api_key,sandboxId:t.sandbox_id}},h=async e=>{let{conversationUrl:t,sessionApiKey:n,sandboxId:r}=await m(e);if(a().backend.kind===`cloud`){if(!r)throw Error(`Cannot stop runtime: cloud conversation ${e} has no sandbox_id.`);return await s(r),{success:!0}}return new c(o({conversationUrl:t,sessionApiKey:n})).interruptConversation(e)},g=async(e,t)=>{let{conversationUrl:n,sessionApiKey:r}=await m(e);return new c(o({conversationUrl:n,sessionApiKey:r})).askAgent(e,t)},_=async e=>{let{conversationUrl:t,sessionApiKey:n}=await m(e);return new c(o({conversationUrl:t,sessionApiKey:n})).runConversation(e)},v=(e,t,n)=>{e.setQueriesData({queryKey:[`user`,`conversation`,t]},e=>e&&{...e,...n}),e.setQueriesData({queryKey:[`user`,`conversations`]},e=>e&&{...e,pages:e.pages.map(e=>({...e,items:e.items.map(e=>e.id===t?{...e,...n}:e)}))})},y=(e,t,n)=>v(e,t,{execution_status:n}),b=(e,t,n)=>v(e,t,{llm_model:n}),x=(e,t)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,t]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]}),e.invalidateQueries({queryKey:[`unified`,`vscode_url`]})},S=e=>{let t=e.match(/^\/workspace\/[^/]+\/(.*)$/);return t?t[1]:e},C=e=>{let t=e.trim();if(!t)return``;let n=t.replace(/[\\/]+$/,``);if(!n||/^[A-Za-z]:$/.test(n))return``;let r=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`));return r>=0?n.slice(r+1):n};export{v as a,y as c,f as d,d as f,x as i,b as l,S as n,h as o,g as r,_ as s,C as t,p as u};
@@ -1 +0,0 @@
1
- import{t as e}from"./createLucideIcon-Ddu8jDOQ.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
@@ -1 +0,0 @@
1
- import{c as e}from"./agent-server-client-options-9agOSarV.js";var t=class{constructor(t){this.host=t.host.replace(/\/$/,``),this.apiKey=t.apiKey,this.client=new e({baseUrl:this.host,apiKey:this.apiKey,timeout:t.timeout||6e4})}async listProfiles(){return(await this.client.get(`/api/profiles`)).data}async getProfile(e,t={}){let n={};return t.exposeSecrets&&(n[`X-Expose-Secrets`]=t.exposeSecrets),(await this.client.get(`/api/profiles/${encodeURIComponent(e)}`,{headers:n})).data}async saveProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}`,t)).data}async deleteProfile(e){return(await this.client.delete(`/api/profiles/${encodeURIComponent(e)}`)).data}async renameProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/rename`,{new_name:t})).data}async activateProfile(e){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/activate`,{})).data}close(){this.client.close()}};export{t};
@@ -1 +0,0 @@
1
- import{E as e,d as t,t as n,w as r}from"./agent-server-client-options-9agOSarV.js";import{r as i}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-Fa-nXZ4M.js";function a(e){return e.apiKey?e.kind===`cloud`?{Authorization:`Bearer ${e.apiKey}`}:{"X-Session-API-Key":e.apiKey}:{}}function o(e){let t=e.authMode??`bearer`;return t===`bearer`?a(e.backend):t===`session-api-key`&&e.sessionApiKey?{"X-Session-API-Key":e.sessionApiKey}:{}}async function s(a){let s=t(),c=s.backend.id===a.backend.id&&s.orgId?{"X-Org-Id":s.orgId}:{},l={...o(a),...c,...a.headers??{}},u=a.hostOverride??a.backend.host;if(!a.hostOverride)return(await i.request({url:`${u.replace(/\/+$/,``)}${a.path}`,method:a.method,headers:l,...a.body===void 0?{}:{data:a.body},timeout:(a.timeoutSeconds??30)*1e3,...a.responseType?{responseType:a.responseType}:{}})).data;let d=r();if(!d)throw new n;let f=e();return(await i.post(`${d.replace(/\/+$/,``)}/api/cloud-proxy`,{host:u,method:a.method,path:a.path,headers:l,body:a.body??null,...a.timeoutSeconds?{timeout_seconds:a.timeoutSeconds}:{}},{headers:f,timeout:3e4,...a.responseType?{responseType:a.responseType}:{}})).data}export{a as n,s as t};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/manage-backends-modal-Ceo_SOcf.js","assets/rolldown-runtime-BFRubm34.js","assets/agent-server-client-options-9agOSarV.js","assets/server-client-DYv_GHPl.js","assets/vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js","assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~h07fzaqi-D15MEcqi.js","assets/QueryClientProvider-w1cZWY41.js","assets/declaration-DaUdB2Wg.js","assets/react-CM_dJw1Z.js","assets/pencil-Dr0b2jL1.js","assets/createLucideIcon-Ddu8jDOQ.js","assets/plus-DT-M0FA1.js","assets/trash-2-CbVljPko.js","assets/useTranslation-CEcjrme-.js","assets/context-CEQZwATj.js","assets/backend-form-modal-CeB983Sj.js","assets/organization-service.api-Dn74hBTH.js","assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-Fa-nXZ4M.js","assets/proxy-sRh0WKI7.js","assets/agent-server-compatibility-B7QStIcH.js","assets/health-store-B5f0S2FY.js","assets/brand-button-LBFNic99.js","assets/utils-CdgBzLA7.js","assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~j8sdb9mk-OFpe9fX_.js","assets/common-DqjLSBOt.js","assets/settings-input-8y5p4kze.js","assets/modal-backdrop-BDqI1zBV.js","assets/react-dom-hVBnwgwZ.js","assets/modal-body-CCLCqX1J.js","assets/modal-close-button-gQgKqUf-.js","assets/navigation-context-aNGUUtdq.js","assets/active-backend-context-I2w666XY.js","assets/modal-classes-DwTdT3IK.js","assets/confirmation-modal-CMAtd9R0.js","assets/api-key-entry-screen-ByXA4hXH.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./preload-helper-CT1Z6Pdu.js";import{L as r,a as i,c as a,d as o,f as s,i as c}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as l,t as u}from"./declaration-DaUdB2Wg.js";import{t as d}from"./useTranslation-CEcjrme-.js";import{r as f}from"./providers-DknP6O2g.js";import{i as p,t as m}from"./custom-toast-handlers-BohXx7uh.js";import{k as h,p as g}from"./agent-server-client-options-9agOSarV.js";import{r as _,t as v}from"./agent-server-compatibility-B7QStIcH.js";import{a as y,i as b,n as x,o as S,r as C,t as w}from"./telemetry-fQFd-8V3.js";import{t as T}from"./modal-backdrop-BDqI1zBV.js";import{n as E}from"./modal-body-CCLCqX1J.js";import{n as D,r as O}from"./base-modal-DZCNv0A4.js";import{t as k}from"./brand-button-LBFNic99.js";import{t as A}from"./loading-spinner-DNwR4--Z.js";import{t as j}from"./use-config-DwfigQ_Y.js";import{i as M,n as N}from"./color-themes-0biOprdo.js";var P=e(t(),1);function F(){let[e,t]=(0,P.useState)(()=>x()),n=(0,P.useRef)(!1);(0,P.useEffect)(()=>{n.current||(n.current=!0,y())},[]),(0,P.useEffect)(()=>{e===`granted`&&S()},[e]);let r=(0,P.useCallback)(async()=>{await C(`granted`),t(`granted`)},[]),i=(0,P.useCallback)(async()=>{await C(`denied`),t(`denied`)},[]),a=(0,P.useCallback)((t,n)=>{e===`granted`&&b(t,n)},[e]),o=(0,P.useCallback)(()=>{w(),t(`pending`)},[]);return{consent:e,isEnabled:e===`granted`,showConsentPrompt:e===`pending`,grantConsent:r,denyConsent:i,track:a,clearData:o}}var I=l();function L({onChoice:e}){let{t,ready:n}=d(`openhands`),{showConsentPrompt:r,grantConsent:i,denyConsent:a}=F(),[o,s]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{if(n&&r){let e=setTimeout(()=>s(!0),50);return()=>clearTimeout(e)}s(!1)},[n,r]),o?(0,I.jsx)(T,{"aria-label":t(u.TELEMETRY$CONSENT_TITLE),children:(0,I.jsx)(`form`,{"data-testid":`telemetry-consent-form`,onSubmit:t=>{t.preventDefault();let n=new FormData(t.currentTarget).get(`analytics`)===`on`;n?i():a(),e?.(n)},className:`flex flex-col gap-2`,children:(0,I.jsxs)(E,{className:`border border-[var(--oh-border)]`,children:[(0,I.jsx)(O,{title:t(u.TELEMETRY$CONSENT_TITLE)}),(0,I.jsx)(D,{children:t(u.TELEMETRY$CONSENT_DESCRIPTION)}),(0,I.jsxs)(`label`,{className:`flex gap-2 items-center self-start text-sm cursor-pointer`,children:[(0,I.jsx)(`input`,{name:`analytics`,type:`checkbox`,defaultChecked:!0,className:`w-4 h-4 cursor-pointer`}),t(u.TELEMETRY$SEND_ANONYMOUS_DATA)]}),(0,I.jsx)(k,{testId:`confirm-telemetry-preferences`,type:`submit`,variant:`primary`,className:`w-full`,children:t(u.TELEMETRY$CONFIRM_PREFERENCES)})]})})}):null}function R(){return P.useEffect(()=>{N(M())},[]),null}var z=P.lazy(()=>n(()=>import(`./manage-backends-modal-Ceo_SOcf.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]))),B=P.lazy(()=>n(()=>import(`./api-key-entry-screen-ByXA4hXH.js`),__vite__mapDeps([34,1,2,7,13,14,8,19,3,15,16,5,4,6,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32])));function V({children:e}){return(0,I.jsxs)(`html`,{lang:`en`,children:[(0,I.jsxs)(`head`,{children:[(0,I.jsx)(`meta`,{charSet:`utf-8`}),(0,I.jsx)(`meta`,{name:`viewport`,content:`width=device-width, initial-scale=1`}),(0,I.jsx)(i,{}),(0,I.jsx)(c,{})]}),(0,I.jsxs)(`body`,{"data-agent-server-ui":``,className:`m-0`,children:[(0,I.jsxs)(f,{contentClassName:`min-h-screen`,children:[(0,I.jsx)(R,{}),e,(0,I.jsx)(p,{toastOptions:m}),(0,I.jsx)(L,{}),(0,I.jsx)(`div`,{id:`modal-portal-exit`})]}),(0,I.jsx)(s,{}),(0,I.jsx)(o,{})]})]})}function H(){return(0,I.jsx)(`main`,{className:`min-h-screen bg-base px-6 py-10 text-white`,children:(0,I.jsx)(`div`,{className:`mx-auto flex min-h-screen max-w-6xl items-center justify-center`,children:(0,I.jsx)(`div`,{className:`rounded-3xl border border-white/10 bg-base/80 px-8 py-10 shadow-2xl`,children:(0,I.jsx)(A,{size:`large`})})})})}function U(){let e=P.useCallback(()=>{},[]);return(0,I.jsx)(`main`,{"data-testid":`agent-server-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,I.jsx)(P.Suspense,{fallback:null,children:(0,I.jsx)(z,{onClose:e})})})}var W=()=>[{rel:`icon`,type:`image/svg+xml`,href:`/favicon.svg`}],G=()=>[{title:`OpenHands`},{name:`description`,content:`Let's Start Building!`}],K=r(function(){let e=h(),t=!!g()?.apiKey,n=e&&!t,r=j({enabled:!n});return n||v(r.error)?(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(H,{}),children:(0,I.jsx)(B,{})}):r.isPending||r.isLoading?(0,I.jsx)(H,{}):_(r.error)?(0,I.jsx)(U,{}):(0,I.jsx)(a,{})});export{V as Layout,K as default,W as links,G as meta};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/settings-modal-DdntdOGP.js","assets/rolldown-runtime-BFRubm34.js","assets/model-selector-CZOi4V7r.js","assets/vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BuCSnjsW.js","assets/preload-helper-CT1Z6Pdu.js","assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-BC9XTECT.js","assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-DSqEbr0N.js","assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~j8sdb9mk-OFpe9fX_.js","assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-B1TKKuuH.js","assets/declaration-DaUdB2Wg.js","assets/react-CM_dJw1Z.js","assets/vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BGWUbqUq.js","assets/react-dom-hVBnwgwZ.js","assets/agent-server-client-options-9agOSarV.js","assets/llm-client-BqyLKgUN.js","assets/vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js","assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~h07fzaqi-D15MEcqi.js","assets/QueryClientProvider-w1cZWY41.js","assets/useTranslation-CEcjrme-.js","assets/context-CEQZwATj.js","assets/proxy-sRh0WKI7.js","assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-Fa-nXZ4M.js","assets/brand-button-LBFNic99.js","assets/utils-CdgBzLA7.js","assets/common-DqjLSBOt.js","assets/combobox-caret-CO7eozIY.js","assets/sdk-settings-schema-DFievvEK.js","assets/dist-xtCm0O6P.js","assets/sdk-settings-field-metadata-C6KMD-jZ.js","assets/map-provider-C3Z5Dx2J.js","assets/settings-input-8y5p4kze.js","assets/base-modal-DZCNv0A4.js","assets/modal-body-CCLCqX1J.js","assets/modal-classes-DwTdT3IK.js","assets/modal-backdrop-BDqI1zBV.js","assets/navigation-context-aNGUUtdq.js","assets/use-save-settings-rE9aA29R.js","assets/useMutation-DDo48A8t.js","assets/mutation-CaJwPR9O.js","assets/settings-service.api-DxIEtvx6.js","assets/settings-DGY6n4J2.js","assets/query-keys-tAsQcc_9.js","assets/use-settings-BPTbE7lg.js","assets/active-backend-context-I2w666XY.js","assets/health-store-B5f0S2FY.js","assets/use-tracking-DQYdZpxi.js","assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-BodGsxSf.js","assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-BPuuVEqr.js","assets/settings-utils-BxzHqLmZ.js","assets/add-backend-modal-BDBDBXsJ.js","assets/backend-form-modal-CeB983Sj.js","assets/server-client-DYv_GHPl.js","assets/organization-service.api-Dn74hBTH.js","assets/agent-server-compatibility-B7QStIcH.js","assets/modal-close-button-gQgKqUf-.js","assets/manage-backends-modal-Ceo_SOcf.js","assets/pencil-Dr0b2jL1.js","assets/createLucideIcon-Ddu8jDOQ.js","assets/plus-DT-M0FA1.js","assets/trash-2-CbVljPko.js","assets/confirmation-modal-CMAtd9R0.js","assets/environment-switch-overlay-CuBuZOaa.js","assets/environment-switch-store-CiurvTtK.js","assets/analytics-consent-form-modal-DxkThW4K.js","assets/telemetry-fQFd-8V3.js","assets/handle-capture-consent-3XrjZ8wi.js","assets/alert-banner-NeUl1-PQ.js","assets/vendor~conversation-panel~conversation~alert-banner-D_hRW_zc.js","assets/vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CcFtthyg.js","assets/iconBase-BVhFI-0E.js","assets/close-D_o3d8QM.js","assets/typography-Bvw0IxaN.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./preload-helper-CT1Z6Pdu.js";import{A as r,C as i,F as a,L as o,M as s,N as c,P as l,R as u,c as d,j as f,k as p}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as m}from"./react-dom-hVBnwgwZ.js";import{t as h}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{d as g,f as _,t as v}from"./path-utils-BjxzIGLp.js";import{o as y,t as b}from"./declaration-DaUdB2Wg.js";import{r as x}from"./recommended-automations-launcher-BIul0osB.js";import{t as S}from"./useTranslation-CEcjrme-.js";import{a as C}from"./i18n-zDndR1Ne.js";import{t as w}from"./createLucideIcon-Ddu8jDOQ.js";import{t as T}from"./vendor~root-layout~home~conversation-panel~conversation-DkwcKRtv.js";import{a as E,i as D,o as O}from"./vendor~root-layout~home~mcp~automations-list-BnIlGhjl.js";import{t as k}from"./check-CZhEL6rP.js";import{a as A,c as j,d as M,f as N,i as P,l as F,o as I,r as L,s as ee,t as R,u as te}from"./sidebar-mobile-menu-toggle-C0mmabKj.js";import{a as ne,c as re,d as ie,f as ae,i as oe,l as z,n as se,o as ce,r as le,s as ue,t as de,u as fe}from"./onboarding-CPCKYvFh.js";import{n as pe,r as me}from"./custom-toast-handlers-BohXx7uh.js";import{t as he}from"./plus-DT-M0FA1.js";import{t as ge}from"./trash-2-CbVljPko.js";import{t as _e}from"./x-JOBEVLW0.js";import{t as B,v as ve,x as ye,y as be}from"./utils-CdgBzLA7.js";import{t as V}from"./common-DqjLSBOt.js";import{g as xe}from"./agent-server-client-options-9agOSarV.js";import{n as Se,r as H}from"./active-backend-context-I2w666XY.js";import{n as Ce}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-BodGsxSf.js";import{t as U}from"./agent-server-conversation-service.api-Cagoqq1V.js";import{t as W}from"./modal-backdrop-BDqI1zBV.js";import{n as we}from"./modal-body-CCLCqX1J.js";import{i as Te,r as G}from"./base-modal-DZCNv0A4.js";import{g as Ee,s as De}from"./brand-button-LBFNic99.js";import{t as Oe}from"./loading-spinner-DNwR4--Z.js";import{t as ke}from"./use-config-DwfigQ_Y.js";import{t as Ae}from"./openhands-logo-CHmtDV-t.js";import{n as je,t as Me}from"./navigation-context-aNGUUtdq.js";import{t as K}from"./navigation-link-CYkF2y3K.js";import{a as Ne,d as Pe,f as Fe,i as Ie,m as Le,n as Re,o as ze,p as Be,s as Ve,t as He}from"./use-cloud-current-user-id-BAKf91Zx.js";import{n as Ue,t as We}from"./sidebar-nav-link-BsYdDFfb.js";import{t as Ge}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-D0XUSHNN.js";import{t as Ke}from"./styled-tooltip-TCp7svY3.js";import{a as qe,d as Je,f as Ye,i as Xe,l as Ze,n as Qe,o as $e,r as et,u as tt}from"./dropdown-classes-Vqz86I0R.js";import{r as nt,t as rt}from"./combobox-caret-CO7eozIY.js";import{_ as it,a as at,c as ot,d as st,f as ct,g as lt,h as ut,i as dt,l as ft,m as pt,n as mt,o as ht,p as gt,r as _t,u as vt,v as yt}from"./chat-send-button-5qz0zj6R.js";import{o as bt,r as xt}from"./backend-form-modal-CeB983Sj.js";import{s as St}from"./environment-switch-store-CiurvTtK.js";import{t as Ct}from"./react-Dy05vyj5.js";import{r as wt,t as Tt}from"./middleware-CfatjPYZ.js";import{t as Et}from"./conversation-store-CC-isCnP.js";import{t as Dt}from"./add-backend-modal-BDBDBXsJ.js";import{t as Ot}from"./manage-backends-modal-Ceo_SOcf.js";import{c as kt,l as At,o as jt}from"./acp-providers-DJr8DlNG.js";import{t as Mt}from"./use-is-authed-hHndEep7.js";import{t as Nt}from"./use-click-outside-element-DhxCUyWl.js";import{r as Pt,t as Ft}from"./use-settings-BPTbE7lg.js";import{t as It}from"./use-tracking-DQYdZpxi.js";import{t as Lt}from"./use-create-conversation-BEzddjXn.js";import{t as Rt}from"./vscode-url-helper-BMq8JBhB.js";import{t as zt}from"./conversation-service.api-B_Pdmwsa.js";import{r as Bt,t as Vt}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-CfAc3nMS.js";import{n as Ht,t as q}from"./context-menu-list-item-D0swnhFt.js";import{a as Ut,o as J,r as Wt}from"./use-llm-profiles-E-jjZMZw.js";import{t as Gt}from"./u-edit-BIYzjs3v.js";import{t as Kt}from"./skills-TYjOUQ2d.js";import{o as qt,s as Jt,t as Yt}from"./vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CcFtthyg.js";import{t as Xt}from"./search-BeVRXvX7.js";import{t as Zt}from"./sidebar-store-DnQAJAE5.js";import{t as Qt}from"./handle-capture-consent-3XrjZ8wi.js";import{t as $t}from"./use-save-settings-rE9aA29R.js";import{t as en}from"./use-user-conversation-BRAseenw.js";import{t as tn}from"./conversation-state-store-D-w0uurj.js";var nn=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`}]]),rn=w(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),an=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`}]]),on=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`}]]),sn=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`}]]),cn=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`}]]),ln=w(`list-filter`,[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]),un=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`}]]),dn=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`}]]),fn=w(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),pn=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`}]]),Y=e(t(),1),X=y(),mn=46,hn=30;function gn({className:e,logoClassName:t,logoWidth:n=mn,logoHeight:r=hn}={}){let{t:i}=S(`openhands`);return(0,X.jsx)(K,{to:`/conversations`,"aria-label":i(b.BRANDING$OPENHANDS_LOGO),className:B(e),children:(0,X.jsx)(Ae,{width:n,height:r,className:B(`shrink-0`,t)})})}function _n(){return(0,X.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-white/20 border-t-white rounded-full`,"data-testid":`dropdown-loading`})}function vn({onClear:e}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-clear`,onClick:e,"aria-label":`Clear selection`,className:`text-white hover:text-[var(--oh-text-tertiary)]`,children:(0,X.jsx)(_e,{size:14})})}function yn({isOpen:e,isDisabled:t,getToggleButtonProps:n}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,...n({disabled:t,className:B(nt,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed`)}),children:(0,X.jsx)(rt,{})})}function bn({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:B(`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:B(`p-0`,Xe)}),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:B($e,`focus:outline-none`,n?.value===e.value&&`bg-[var(--oh-interactive-selected)] text-white`)}),children:[e.prefix?(0,X.jsx)(`span`,{className:tt,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)(yt,{inset:`menu`}),(0,X.jsx)(`div`,{className:`p-0`,children:o})]}):null]})}function xn({placeholder:e,isDisabled:t,getInputProps:n,italicPlaceholder:r=!0,fitContent:i=!1}){return(0,X.jsx)(`input`,{...n({placeholder:e,disabled:t,className:B(`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`,De,`px-0 not-italic text-inherit`)})})}var Sn={position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,border:0};function Cn({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)(``),S=e.filter(e=>e.label.toLowerCase().includes(b.toLowerCase())),{isOpen:C,selectedItem:w,selectItem:E,openMenu:D,closeMenu:O,getToggleButtonProps:k,getMenuProps:A,getItemProps:j,getInputProps:M}=T({items:S,itemToString:e=>e?.label??``,inputValue:v,stateReducer:(e,t)=>t.type===T.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(``))}}),N=r||i,P=w?e.find(e=>e.value===w.value)??w:null,F=e=>M({...e,onChange:e=>{y(e.target.value),x(e.target.value)}});return(0,X.jsxs)(`div`,{className:B(`relative`,g?`inline-block w-auto`:`w-full`),"data-testid":c,onMouseEnter:m?()=>{_.current&&=(clearTimeout(_.current),null),D()}:void 0,onMouseLeave:m?()=>{_.current=setTimeout(()=>O(),150)}:void 0,children:[f?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`input`,{...F({"aria-label":a??`Filter options`,tabIndex:-1}),style:Sn}),(0,X.jsx)(`button`,{type:`button`,...k({tabIndex:-1}),style:Sn,"aria-hidden":!0})]}):(0,X.jsxs)(`div`,{className:B(Ye,g?`w-auto`:`w-full`,N&&`cursor-not-allowed opacity-60`,l),children:[P?.prefix?(0,X.jsx)(`span`,{className:`flex items-center shrink-0`,children:P.prefix}):null,(0,X.jsx)(xn,{placeholder:a,isDisabled:N,getInputProps:F,italicPlaceholder:h,fitContent:g}),r&&(0,X.jsx)(_n,{}),n&&w&&(0,X.jsx)(vn,{onClear:()=>E(null)}),(0,X.jsx)(yn,{isOpen:C,isDisabled:N,getToggleButtonProps:k})]}),(0,X.jsx)(bn,{isOpen:C,filteredOptions:S,selectedItem:w,emptyMessage:t,getMenuProps:A,getItemProps:j,footer:u,openUpward:d,fitContent:g})]})}var wn=`::`;function Tn(e,t){return t?`${e}${wn}${t}`:e}function En(e){let[t,n]=e.split(wn);return{backendId:t,orgId:n??null}}function Dn(e){return(0,X.jsx)(xt,{isConnected:e?.isConnected??null})}function On(){return(0,X.jsx)(xt,{isConnected:`unavailable`})}function kn(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:Tn(e.id,null),label:e.name,prefix:Dn(i[e.id])});for(let e of s){let o=n[e.id],s=Dn(i[e.id]);if(!o||o.orgs.length===0)a.push({value:Tn(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:Tn(e.id,r.id),label:`${e.name} – ${i}`,prefix:s})}}}return a}function An({openUpward:e=!1,hideTrigger:t=!1,defaultOpen:n=!1,onSelectOption:i,onOpenAddBackend:a,onOpenManageBackends:o,sidebarCollapsed:c=!1}={}){let{t:l}=S(`openhands`),{backends:u,active:d,setActive:f}=H(),p=Re(),m=He(),h=bt(u),g=s(),_=r(`/settings`),v=r(`/settings/*`),y=r(`/conversations/:conversationId`),x=r(`/automations/:automationId`),[C,w]=Y.useState(!1),[T,E]=Y.useState(!1),D=l(b.BACKEND$PERSONAL_WORKSPACE),O=Y.useMemo(()=>kn(u,D,p,m,h),[u,D,p,m,h]),k=xe(d.backend),A=l(b.BACKEND$NO_BACKEND_AVAILABLE),j=Tn(d.backend.id,d.orgId),M=k?void 0:O.find(e=>e.value===j),N=!!(_||v),P=l(b.SIDEBAR$SETTINGS),F=Et(e=>e.isRightPanelShown),I=!c||y&&F?`top`:`left`,L=Object.values(p).some(e=>e.isLoading);Y.useEffect(()=>{if(k||d.backend.kind!==`cloud`||d.orgId)return;let{backend:e}=d,t=p[e.id];if(!t||t.orgs.length===0)return;let n=m[e.id]?.userId??null,r=(n?t.orgs.find(e=>e.id===n):void 0)??t.orgs[0];r&&f(e.id,r.id)},[d,p,m,f,k]);let ee=Y.useCallback(()=>{if(a){a(),i?.();return}w(!0)},[a,i]),R=Y.useCallback(()=>{if(o){o(),i?.();return}E(!0)},[o,i]),te=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),ne=(0,X.jsxs)(`div`,{className:Xe,children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`add-backend-menu-item`,onMouseDown:te,onClick:ee,className:B(Qe,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:tt,"aria-hidden":!0,children:(0,X.jsx)(he,{width:16,height:16})}),l(b.BACKEND$ADD)]}),(0,X.jsxs)(`button`,{type:`button`,"data-testid":`manage-backends-menu-item`,onMouseDown:te,onClick:R,className:B(Qe,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:tt,"aria-hidden":!0,children:(0,X.jsx)(fn,{width:16,height:16})}),l(b.BACKEND$MANAGE)]})]}),re=Y.useCallback(async e=>{if(e===j)return;let{backendId:t,orgId:n}=En(e),r=u.find(e=>e.id===t);r&&(St(O.find(t=>t.value===e)?.label??r.name),await new Promise(e=>{setTimeout(e,400)}),y?g(`/conversations`):x&&g(`/automations`),f(r.id,n),i?.())},[j,u,y,x,g,O,f,l,i]);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)(Cn,{testId:`backend-selector`,defaultValue:M??{value:j,label:k?A:d.backend.name,prefix:k?On():Dn(h[d.backend.id])},footer:ne,openUpward:e,hideTrigger:t,defaultOpen:n,openOnHover:!t,onChange:e=>{e&&re(e.value)},placeholder:k?A:d.backend.name,loading:L,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`},`${j}-${M?.label??``}`)}),t?null:(0,X.jsx)(Ke,{content:P,placement:I,offset:10,children:(0,X.jsx)(K,{to:`/settings`,"data-testid":`backend-selector-settings-link`,"data-active":N,"aria-label":P,className:B(N?`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`,Ee),children:(0,X.jsx)(fn,{width:16,height:16})})})]}),C?(0,X.jsx)(Dt,{onClose:()=>w(!1)}):null,T?(0,X.jsx)(Ot,{onClose:()=>E(!1)}):null]})}var jn=(e=20)=>{let{data:t}=Mt(),n=Se(),r=!xe(n.backend);return _({queryKey:[`user`,`conversations`,`paginated`,e,n.backend.id,n.orgId],queryFn:async({pageParam:t})=>await U.searchConversations(e,t),enabled:!!t&&r,getNextPageParam:e=>e.next_page_id,initialPageParam:void 0,refetchInterval:1e4,meta:{backendId:n.backend.id}})},Mn=(e=10)=>h({queryKey:[`start-tasks`,`search`,e],queryFn:()=>[],select:e=>e.filter(e=>e.status!==`READY`&&e.status!==`ERROR`)});function Nn({onConfirm:e,onClose:t,onCancel:n}){let{t:r}=S(`openhands`);return(0,X.jsx)(W,{onClose:n,children:(0,X.jsxs)(we,{testID:`confirm-new-conversation-modal`,children:[(0,X.jsx)(G,{title:r(b.CONVERSATION$EXIT_WARNING)}),(0,X.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,X.jsx)(Te,{text:r(b.BUTTON$CANCEL),onClick:t,className:`bg-tertiary`}),(0,X.jsx)(Te,{text:r(b.ACTION$CONFIRM),onClick:e,className:`bg-[#C63143]`})]})]})})}var Pn=e=>e.includes(`Z`)||e.match(/[+-]\d{2}:\d{2}$/)!==null?new Date(e):new Date(`${e}Z`),Fn=e=>{let t=typeof e==`string`?Pn(e):e,n=new Date().getTime()-t.getTime(),r=Math.floor(n/1e3),i=Math.floor(r/60),a=Math.floor(i/60),o=Math.floor(a/24),s=Math.floor(o/30),c=Math.floor(s/12);return r<60?`${r}s`:i<60?`${i}m`:a<24?`${a}h`:o<30?`${o}d`:s<12?`${s}mo`:`${c}y`};function In({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:B(`text-xs leading-6 font-semibold bg-transparent truncate overflow-hidden`,r&&`opacity-60`),title:t,children:t})}var Ln=e=>{switch(e){case V.FINISHED:return`check`;case V.RUNNING:return`working`;case V.IDLE:case V.WAITING_FOR_CONFIRMATION:return`active`;case V.PAUSED:return`paused`;case V.ERROR:case V.STUCK:return`error`;default:return`unknown`}},Rn=(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 zn(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 Bn({executionStatus:e,sandboxStatus:t,showTooltip:n=!0}){let{t:r}=S(`openhands`),i=t===`MISSING`,a=t===`ERROR`?`error`:i?`paused`:Ln(e),o=r(Rn(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)(Vt,{"data-testid":`conversation-status-archived`,size:10,className:`shrink-0 text-[var(--oh-muted)] opacity-60`,"aria-hidden":!0}):zn(a)});return n?(0,X.jsx)(Ke,{content:o,placement:`right`,showArrow:!0,tooltipClassName:`bg-base text-white text-xs shadow-lg`,children:s}):s}function Vn({title:e,titleMode:t,onTitleSave:n,executionStatus:r,sandboxStatus: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)(Bn,{executionStatus:r,sandboxStatus:i})}),(0,X.jsx)(In,{title:e,titleMode:t,onSave:n,isConversationArchived:i===`MISSING`||i===`ERROR`})]})}var Hn=e(m(),1);function Un({onClose:e,onDelete:t,onStop:n,onEdit:r,onDisplayCost:i,onShowAgentTools:a,onShowSkills:o,onDownloadViaVSCode:s,onDownloadConversation:c,position:l=`bottom`,floatingStyle:u,ignoreOutsideClickRef:d}){let{t:f}=S(`openhands`),{backend:p}=Se(),m=Nt(e,d),h=p.kind===`cloud`?b.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:b.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)(yt,{inset:`menu`})]},t):null},[]),_=u!=null;return(0,X.jsxs)(Ht,{ref:m,testId:`context-menu`,style:_?u:void 0,theme:_?`popover`:`default`,position:_?`none`:l,alignment:_?`none`:`right`,spacing:_?`none`:`default`,className:_?`mt-0 min-w-[200px] w-max max-w-[min(280px,100vw-16px)]`:`z-[200] mt-0`,children:[g([r&&(0,X.jsx)(q,{testId:`edit-button`,onClick:r,children:(0,X.jsx)(J,{icon:(0,X.jsx)(Gt,{width:16,height:16}),text:f(b.BUTTON$RENAME)})},`edit-button`)],`edit-section`),g([a&&(0,X.jsx)(q,{testId:`show-agent-tools-button`,onClick:a,children:(0,X.jsx)(J,{icon:(0,X.jsx)(ut,{width:16,height:16}),text:f(b.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})},`show-agent-tools-button`),o&&(0,X.jsx)(q,{testId:`show-skills-button`,onClick:o,children:(0,X.jsx)(J,{icon:(0,X.jsx)(Kt,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:f(b.CONVERSATION$SHOW_SKILLS)})},`show-skills-button`)],`tools-section`),g([n&&(0,X.jsx)(q,{testId:`stop-button`,onClick:n,children:(0,X.jsx)(J,{icon:(0,X.jsx)(pt,{width:16,height:16}),text:f(h)})},`stop-button`),s&&(0,X.jsx)(q,{testId:`download-vscode-button`,onClick:s,children:(0,X.jsx)(J,{icon:(0,X.jsx)(j,{width:16,height:16}),text:f(b.BUTTON$DOWNLOAD_VIA_VSCODE)})},`download-vscode-button`),c&&(0,X.jsx)(q,{testId:`download-trajectory-button`,onClick:c,children:(0,X.jsx)(J,{icon:(0,X.jsx)(j,{width:16,height:16}),text:f(b.BUTTON$EXPORT_CONVERSATION)})},`download-trajectory-button`)],`control-section`),g([i&&(0,X.jsx)(q,{testId:`display-cost-button`,onClick:i,children:(0,X.jsx)(J,{icon:(0,X.jsx)(ee,{width:16,height:16}),text:f(b.BUTTON$DISPLAY_COST)})},`display-cost-button`),t&&(0,X.jsx)(q,{testId:`delete-button`,onClick:t,children:(0,X.jsx)(J,{icon:(0,X.jsx)(Ut,{width:16,height:16}),text:f(b.COMMON$DELETE_CONVERSATION)})},`delete-button`)],`info-section`,!0)]})}function Wn({contextMenuOpen:e,onContextMenuToggle:t,onDelete:n,onStop:r,onEdit:i,onDownloadViaVSCode:a,onDownloadConversation:o,executionStatus:s,conversationId:c,showOptions:l}){let u=ye(s),d=be(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)(Wt,{ref:f,onClick:n=>{n.preventDefault(),n.stopPropagation(),t(!e)},className:B(u&&`opacity-60`)}),e&&m&&h?(0,Hn.createPortal)((0,X.jsx)(Un,{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]})}var Gn={bitbucket:Yt,bitbucket_data_center:Yt,github:qt,gitlab:Jt};function Kn({selectedRepository:e}){let t=e.git_provider?Gn[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)(gt,{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)(Bt,{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 qn({workspaceWorkingDir:e}){let{t}=S(`openhands`),n=e?v(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)(ct,{width:14,height:14,className:`text-[var(--oh-muted)]`}),(0,X.jsx)(`span`,{className:`truncate min-w-0`,children:t(b.COMMON$NO_REPOSITORY)})]})}function Jn({selectedRepository:e,lastUpdatedAt:t,createdAt:n,executionStatus:r,workspaceWorkingDir:i,showRepositoryMetadata:a=!0,showTimestamp:o=!0,llmModel:s,showAgentChip:c=!1,agentKind:l=null,acpServer:u=null}){let{t:d}=S(`openhands`),f=ye(r),p=null;if(c)if(l===`acp`){let e=jt(u)??d(b.CONVERSATION$ACP_AGENT_GENERIC),t=kt(u,s),n=t??e;p={kind:At(u),text:n,tooltip:t?`${e} · ${t}`:e}}else s&&(p={kind:`openhands`,text:s,tooltip:s});let m=r===void 0?void 0:`pl-[26px]`;return(0,X.jsxs)(`div`,{className:B(`flex flex-col gap-0.5 mt-0.5 w-full min-w-0`,f&&`opacity-60`),children:[p?(0,X.jsx)(`div`,{className:m,children:(0,X.jsxs)(`span`,{"data-testid":`conversation-card-agent-chip`,className:`inline-flex items-center gap-1 text-xs text-[var(--oh-muted)] max-w-full min-w-0`,title:p.tooltip,children:[(0,X.jsx)(ae,{kind:p.kind}),(0,X.jsx)(`span`,{className:`truncate`,children:p.text})]})}):null,(0,X.jsxs)(`div`,{className:B(`flex flex-row items-center gap-2 w-full min-w-0`,a&&m),children:[a&&(e?.selected_repository?(0,X.jsx)(Kn,{selectedRepository:e}):(0,X.jsx)(qn,{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:`${Fn(t??n)} ${d(b.CONVERSATION$AGO)}`})})})]})]})}function Yn(){let{t:e}=S(`openhands`);return(0,X.jsxs)(`span`,{"data-testid":`error-badge`,className:`flex items-center gap-1 px-1.5 py-0.5 bg-[var(--oh-status-error)] text-white text-xs font-medium rounded-full`,children:[(0,X.jsx)(st,{className:`text-white w-3 h-3`}),(0,X.jsx)(`span`,{children:e(b.COMMON$ERROR)})]})}function Xn({onClick:e,onDelete:t,onStop:n,onChangeTitle:r,showOptions:i,title:a,selectedRepository:o,lastUpdatedAt:s,createdAt:c,conversationId:l,executionStatus:u,sandboxStatus:d,contextMenuOpen:f=!1,onContextMenuToggle:p,isActive:m=!1,workspaceWorkingDir:h,showRepositoryMetadata:g=!0,llmModel:_=null,showLlmProfiles:v=!1,agentKind:y=null,acpServer:b=null}){let{trackDownloadVsCodeButtonClicked:x}=It(),[S,C]=Y.useState(`view`),{mutateAsync:w}=vt(),T=e=>{e!==``&&e!==a&&r?.(e),C(`view`)},E=e=>{e.preventDefault(),e.stopPropagation(),t?.(),p?.(!1)},D=e=>{e.preventDefault(),e.stopPropagation(),n?.(),p?.(!1)},O=e=>{e.preventDefault(),e.stopPropagation(),C(`edit`),p?.(!1)},k=async e=>{if(e.preventDefault(),e.stopPropagation(),x(),l)try{let e=await zt.getVSCodeUrl(l);if(e.vscode_url){let t=Rt(e.vscode_url);t&&window.open(t,`_blank`)}}catch{}p?.(!1)},A=async e=>{e.preventDefault(),e.stopPropagation(),l&&await w(l),p?.(!1)},j=!!(t||r||i),M=g||v&&(y===`acp`||!!_);return(0,X.jsxs)(`div`,{"data-testid":`conversation-card`,"data-context-menu-open":f.toString(),"data-active":m?`true`:`false`,onClick:e,className:B(`group relative h-auto w-full cursor-pointer rounded-md py-1 pl-2 pr-1 transition-colors`,`data-[context-menu-open=false]:hover:bg-[var(--oh-surface)]`,`data-[active=true]: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)(Vn,{title:a,titleMode:S,onTitleSave:T,executionStatus:u,sandboxStatus:d}),d===`ERROR`&&(0,X.jsx)(Yn,{})]}),(0,X.jsxs)(`div`,{className:`relative ml-auto pl-2 flex items-center justify-end shrink-0`,children:[(c??s)&&(0,X.jsx)(`p`,{className:B(`text-xs text-[var(--oh-muted)] text-right whitespace-nowrap transition-opacity -translate-x-1.5`,j&&`group-hover:opacity-0 group-focus-within:opacity-0`,f&&`opacity-0`),children:(0,X.jsx)(`time`,{children:Fn(s??c)})}),j&&(0,X.jsx)(`div`,{className:B(`absolute right-0 top-1/2 -translate-y-1/2 transition-opacity`,`opacity-0 invisible group-hover:opacity-100 group-hover:visible`,f&&`visible opacity-100`),children:(0,X.jsx)(Wn,{contextMenuOpen:f,onContextMenuToggle:p||(()=>{}),onDelete:t&&E,onStop:n&&D,onEdit:r&&O,onDownloadViaVSCode:k,onDownloadConversation:A,executionStatus:u,conversationId:l,showOptions:i})})]})]}),M&&(0,X.jsx)(Jn,{selectedRepository:o,lastUpdatedAt:s,createdAt:c,executionStatus:u,workspaceWorkingDir:h,showRepositoryMetadata:g,showTimestamp:!1,llmModel:_,showAgentChip:v,agentKind:y,acpServer:b})]})}function Zn({taskStatus:e}){return(0,X.jsx)(`div`,{className:B(`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 Qn({taskStatus:e}){let{t}=S(`openhands`);return e===`WORKING`?null:(0,X.jsx)(`span`,{className:B(`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(ve(e))})}function $n({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)(Zn,{taskStatus:t})}),(0,X.jsx)(`h3`,{className:`text-sm font-medium text-content-2 truncate flex-1`,children:e}),(0,X.jsx)(Qn,{taskStatus:t})]})}function er({selectedRepository:e,createdAt:t,detail:n}){let{t:r}=S(`openhands`);return(0,X.jsxs)(`div`,{className:B(`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)(Kn,{selectedRepository:e}):(0,X.jsx)(qn,{}),t&&(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] flex-1 text-right`,children:(0,X.jsx)(`time`,{children:`${Fn(t)} ${r(b.CONVERSATION$AGO)}`})})]}),n&&(0,X.jsx)(`div`,{className:`text-xs text-[var(--oh-text-subtle)] truncate`,children:n})]})}function tr({task:e,onClick:t}){let{t:n}=S(`openhands`),r=e.request.title||e.detail||n(b.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:B(`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)($n,{title:r,taskStatus:e.status})}),(0,X.jsx)(er,{selectedRepository:i,createdAt:e.created_at,detail:e.detail})]})}function nr({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 rr({conversationId:e,title:t,selectedRepository:n,executionStatus:r,sandboxStatus:i,lastUpdatedAt:a,createdAt:o,workspaceWorkingDir:s,isActive:c=!1,onClose:l,showRepositoryMetadata:u=!0,llmModel:d=null,showLlmProfiles:f=!1,agentKind:p=null,acpServer:m=null}){return(0,X.jsx)(Ge,{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)(Bn,{executionStatus:r,sandboxStatus:i,showTooltip:!1}),(0,X.jsx)(`span`,{className:`text-sm font-medium text-white truncate`,title:t,children:t||`(untitled)`})]}),(0,X.jsx)(Jn,{selectedRepository:n,lastUpdatedAt:a,createdAt:o,executionStatus:r,workspaceWorkingDir:s,showRepositoryMetadata:u,llmModel:d,showAgentChip:f,agentKind:p,acpServer:m})]}),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)(K,{to:`/conversations/${e}`,onClick:l,"data-testid":`compact-conversation-row`,"data-conversation-id":e,"aria-label":t||e,className:({isActive:e})=>B(`flex items-center justify-center w-10 h-9 mx-auto rounded-md`,`transition-colors cursor-pointer`,e||c?`bg-tertiary`:`hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(Bn,{executionStatus:r,sandboxStatus:i,showTooltip:!1})})})}var ir={showOlderConversations:!0,showRepoBranchMetadata:!1,showLlmProfiles:!1,organizeMode:`chronological`,conversationSort:`updated`,threadScope:`all`},Z=Ct()(wt(e=>({...ir,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})),setOrganizeMode:t=>e(()=>({organizeMode:t})),setConversationSort:t=>e(()=>({conversationSort:t})),setThreadScope:t=>e(()=>({threadScope:t}))}),{name:`conversation-panel-preferences`,storage:Tt(()=>localStorage),partialize:e=>({showOlderConversations:e.showOlderConversations,showRepoBranchMetadata:e.showRepoBranchMetadata,showLlmProfiles:e.showLlmProfiles,organizeMode:e.organizeMode,conversationSort:e.conversationSort,threadScope:e.threadScope})})),ar=e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1):e,or=`px-2 pb-1 pt-1`,sr=`text-[11px] font-semibold uppercase tracking-wide text-[var(--oh-muted)]`;function cr({children:e,suffix:t}){return t==null?(0,X.jsx)(`div`,{role:`presentation`,className:B(or,sr),children:e}):(0,X.jsxs)(`div`,{role:`presentation`,className:B(`flex items-baseline justify-between gap-2`,or),children:[(0,X.jsx)(`span`,{className:B(`min-w-0 truncate text-left`,sr),children:e}),t]})}function lr(){return(0,X.jsx)(yt,{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:B(`group`,$e,`text-[var(--oh-foreground)] disabled:opacity-50`),children:[(0,X.jsx)(e,{className:B(`h-3.5 w-3.5`,Ze),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),n?(0,X.jsx)(k,{className:`ml-auto h-3.5 w-3.5 shrink-0 text-white`,"aria-hidden":!0}):null]})}function ur({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,totalConversationsCount:g,onRequestDeleteAll:_}){let{t:v}=S(`openhands`),y=v(r===`local`?b.CONVERSATION_PANEL$BY_WORKSPACE:b.CONVERSATION_PANEL$BY_REPOSITORY),x=Y.useRef(null),C=Y.useRef(null),w=Y.useRef(e);return Y.useEffect(()=>{e?(C.current?.querySelector(`[role="menuitem"], [role="menuitemradio"]`))?.focus():w.current&&x.current?.focus(),w.current=e},[e]),(0,X.jsxs)(`div`,{ref:n,className:`relative shrink-0 pr-0.5`,children:[(0,X.jsx)(`button`,{ref:x,type:`button`,"data-testid":`older-conversations-filter-toggle`,"aria-label":v(b.CONVERSATION_PANEL$FILTER_LABEL),"aria-haspopup":`menu`,"aria-expanded":e,onClick:()=>t(!e),className:B(`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)]`,et),children:(0,X.jsx)(ln,{className:`lucide lucide-list-filter shrink-0`,width:14,height:14,strokeWidth:2,"aria-hidden":!0})}),e?(0,X.jsxs)(`div`,{ref:C,role:`menu`,"aria-orientation":`vertical`,"aria-label":v(b.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=C.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:B(`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`,Xe,Je),children:[(0,X.jsx)(cr,{children:v(b.CONVERSATION_PANEL$ORGANIZE)}),(0,X.jsx)(Q,{icon:E,label:y,selected:i===`grouped`,onClick:()=>{a(`grouped`),t(!1)}}),(0,X.jsx)(Q,{icon:rn,label:v(b.CONVERSATION_PANEL$CHRONOLOGICAL),selected:i===`chronological`,onClick:()=>{a(`chronological`),t(!1)}}),(0,X.jsx)(lr,{}),(0,X.jsx)(cr,{children:v(b.CONVERSATION_PANEL$SORT_BY)}),(0,X.jsx)(Q,{icon:nn,label:v(b.CONVERSATION_PANEL$SORT_CREATED),selected:o===`created`,onClick:()=>{s(`created`),t(!1)}}),(0,X.jsx)(Q,{icon:an,label:v(b.CONVERSATION_PANEL$SORT_UPDATED),selected:o===`updated`,onClick:()=>{s(`updated`),t(!1)}}),(0,X.jsx)(lr,{}),(0,X.jsx)(cr,{children:v(b.CONVERSATION_PANEL$SHOW)}),(0,X.jsx)(Q,{icon:un,label:v(b.CONVERSATION_PANEL$ALL_THREADS),selected:c===`all`,onClick:()=>{l(`all`),t(!1)}}),(0,X.jsx)(Q,{icon:pn,label:v(b.CONVERSATION_PANEL$RELEVANT_THREADS),selected:c===`relevant`,onClick:()=>{l(`relevant`),t(!1)}}),(0,X.jsx)(lr,{}),(0,X.jsx)(cr,{children:v(b.CONVERSATION_PANEL$METADATA)}),(0,X.jsx)(Q,{icon:O,label:v(b.CONVERSATION_PANEL$LLM_MODEL),selected:m,testId:`toggle-llm-profiles`,onClick:()=>{h(),t(!1)}}),(0,X.jsx)(Q,{icon:D,label:v(b.CONVERSATION_PANEL$REPO_BRANCH),selected:f,testId:`toggle-repo-branch-metadata`,onClick:()=>{p(),t(!1)}}),(0,X.jsx)(lr,{}),(0,X.jsx)(cr,{suffix:(0,X.jsx)(`span`,{className:`shrink-0 text-right text-[10px] font-medium normal-case tracking-normal text-[var(--oh-muted)]/70`,children:v(b.CONVERSATION_PANEL$OLDER_OVER_ONE_HOUR)}),children:v(b.CONVERSATION_PANEL$OLDER_SECTION)}),(0,X.jsx)(Q,{testId:`toggle-older-conversations`,icon:u?on:sn,label:ar(v(u?b.CONVERSATION$HIDE:b.CONVERSATION$SHOW_ALL)),onClick:()=>{d(),t(!1)}}),(0,X.jsx)(lr,{}),(0,X.jsx)(Q,{testId:`delete-all-conversations`,icon:ge,label:ar(v(b.CONVERSATION$DELETE_ALL)),disabled:g===0,onClick:()=>{g!==0&&(_(),t(!1))}})]}):null]})}var dr=B(`z-50 flex flex-col rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-white shadow-lg`,qe);function fr(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 pr({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=S(`openhands`),{navigate:o}=je(),[s,c]=Y.useState(!1),l=Y.useRef(null),u=Y.useRef(null),d=fr(u,{open:s,enabled:i}),{data:f,error:p}=ue(),m=f?.workspaceParents??[],{mutate:h}=z(),{mutate:g}=fe(),{mutate:_}=re(),{mutate:v}=ie(),{workspaces:y}=ce(),C=ne(p,a),[w,T]=Y.useState(!1),[E,D]=Y.useState(!1),{mutate:O,isPending:k}=Lt(),A=x(),j=k||A;Y.useEffect(()=>{if(!s||w||E)return;let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[s,w,E]),Y.useEffect(()=>{if(!s||w||E)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[s,w,E]);let M=e=>{j||O({workingDir:e},{onSuccess:e=>{c(!1),o(`/conversations/${e.conversation_id}`)}})},N=$e,P=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),F=Y.useCallback(()=>{c(e=>!e)},[]),I=s&&(!i||d!==null),L=!!C,ee=i&&d?{position:`fixed`,top:d.top,left:d.left,width:d.width}:void 0,R=(0,X.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,disabled:L,onMouseDown:P,onClick:e=>{e.preventDefault(),e.stopPropagation(),!L&&T(!0)},className:N,children:a(b.HOME$ADD_WORKSPACES)}),te=C?(0,X.jsx)(Ke,{content:C,placement:`top`,children:(0,X.jsx)(`span`,{className:`block`,children:R})}):R;return(0,X.jsxs)(`div`,{className:B(!i&&`relative`,t),ref:l,children:[(0,X.jsx)(`span`,{ref:u,className:`inline-flex`,children:e({onClick:F,"aria-expanded":s,"aria-haspopup":`menu`,disabled:j})}),I&&(0,X.jsxs)(`div`,{"data-testid":r,className:B(dr,!i&&B(`absolute top-full mt-0`,n)),style:ee,children:[(0,X.jsxs)(`ul`,{className:B(`max-h-[40vh] overflow-y-auto sm:max-h-[280px]`,Xe),children:[(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,disabled:j,"data-testid":`launch-no-workspace`,onClick:()=>M(),className:N,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:a(b.HOME$NO_WORKSPACE_OPTION)})})}),y.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,disabled:j,"data-testid":`launch-workspace`,"data-workspace-path":e.path,onClick:()=>M(e.path),className:N,children:[(0,X.jsx)(`span`,{className:tt,"aria-hidden":!0,children:(0,X.jsx)(ft,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.id))]}),(0,X.jsxs)(`div`,{className:B(`flex flex-col`,Xe),"data-testid":`new-conversation-menu-footer`,children:[(0,X.jsx)(yt,{inset:`menu`,testId:`new-conversation-menu-footer-divider`}),te,(y.length>0||m.length>0)&&(0,X.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,onMouseDown:P,onClick:e=>{e.preventDefault(),e.stopPropagation(),D(!0)},className:N,children:a(b.HOME$MANAGE_WORKSPACES)})]})]}),(0,X.jsx)(oe,{isOpen:w,onClose:()=>T(!1),onAdd:e=>h(e),onAddParent:e=>_(e)}),(0,X.jsx)(le,{isOpen:E,workspaces:y,workspaceParents:m,onClose:()=>D(!1),onRemove:e=>g(e),onRemoveParent:e=>v(e)})]})}function mr({repo:e,disabled:t,onSelect:n,itemClass:r}){return(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,disabled:t,"data-testid":`launch-repository`,"data-repo-name":e.full_name,onClick:()=>n(e),className:r,children:[(0,X.jsx)(`span`,{className:tt,"aria-hidden":!0,children:(0,X.jsx)(ft,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.full_name})]})})}function hr({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=S(`openhands`),{navigate:o}=je(),{providers:s}=ot(),{lastSelectedProvider:c,setLastSelectedProvider:l}=_t(),[u,d]=Y.useState(!1),f=Y.useRef(null),p=Y.useRef(null),m=fr(p,{open:u,enabled:i}),[h,g]=Y.useState(c??null),[_,v]=Y.useState(``),y=dt(_,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:C,isLoading:w,isError:T,hasNextPage:E,isFetchingNextPage:D,fetchNextPage:O}=ht({provider:h}),{data:k,isLoading:A}=at(y,h),j=Y.useMemo(()=>C?.pages.flatMap(e=>e.items)??[],[C]),M=y?k??[]:j,{mutate:N,isPending:P}=Lt(),F=x(),I=P||F;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 L=e=>{I||N({repository:{name:e.full_name,gitProvider:e.git_provider,branch:e.main_branch??`main`}},{onSuccess:e=>{d(!1),o(`/conversations/${e.conversation_id}`)}})},ee=e=>{g(e),l(e),v(``)},R=$e;Y.useEffect(()=>{u&&(y||!E||D||w||M.length===0||M.length>=10||O())},[u,y,E,D,w,M.length,O]);let te=y?A:w,ne=!y&&E&&M.length>0,re=Y.useCallback(()=>{d(e=>!e)},[]),ie=u&&(!i||m!==null),ae=i&&m?{position:`fixed`,top:m.top,left:m.left,width:m.width}:void 0;return(0,X.jsxs)(`div`,{className:B(!i&&`relative`,t),ref:f,children:[(0,X.jsx)(`span`,{ref:p,className:`inline-flex`,children:e({onClick:re,"aria-expanded":u,"aria-haspopup":`menu`,disabled:I})}),ie&&(0,X.jsxs)(`div`,{"data-testid":r,className:B(dr,!i&&B(`absolute top-full mt-0`,n)),style:ae,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:B(`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)(mt,{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)(Xt,{width:16,height:16,"aria-hidden":!0,className:`pointer-events-none absolute left-0 top-1/2 -translate-y-1/2 text-[var(--oh-muted)]`}),(0,X.jsx)(`input`,{type:`text`,"data-testid":`cloud-repo-search-input`,value:_,onChange:e=>v(e.target.value),placeholder:a(b.COMMON$SEARCH_REPOSITORIES),disabled:!h,className:B(`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)(yt,{inset:`menu`}),(0,X.jsxs)(`ul`,{className:B(`max-h-[40vh] overflow-y-auto custom-scrollbar-always sm:max-h-[280px]`,Xe),children:[te&&M.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(b.HOME$LOADING_REPOSITORIES)}),T&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[#F87171]`,"data-testid":`cloud-repo-error`,children:a(b.HOME$FAILED_TO_LOAD_REPOSITORIES)}),!te&&!T&&M.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(b.GITHUB$NO_RESULTS)}),M.map(e=>(0,X.jsx)(mr,{repo:e,disabled:I,onSelect:L,itemClass:R},`${e.git_provider}:${e.id}`)),ne&&(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`cloud-repo-load-more`,disabled:D,onClick:()=>O(),className:R,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-text-secondary)]`,children:a(D?b.HOME$LOADING_MORE_REPOSITORIES:b.CONVERSATION$LOAD_MORE)})})})]})]})]})}var gr=B(`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 _r({backendKind:e}){let{t}=S(`openhands`),n=t(b.CONVERSATION_PANEL$NEW_THREAD_FOLDER_ARIA),r=(0,X.jsx)(cn,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0,strokeWidth:2});return e===`local`?(0,X.jsx)(pr,{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:gr,"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)(hr,{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:gr,"aria-label":n,"aria-expanded":t,"aria-haspopup":a,disabled:i,"data-testid":`conversation-panel-new-thread-picker`,onClick:e,children:r})})}function vr(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 yr(e,t,n){if(t===`local`)return e===`__none_workspace`?{}:e.startsWith(`ws:`)?{workingDir:e.slice(3)}:{};if(e===`__none_repo`)return{};if(e.startsWith(`repo:`)){let t=e.slice(5),r=n[0];return{repository:{name:t,gitProvider:r?.git_provider??`github`,branch:r?.selected_branch??`main`}}}return{}}function br(e){if(!e)return 0;let t=Date.parse(e);return Number.isFinite(t)?t:0}function xr(e,t){let n=t===`created`?`created_at`:`updated_at`;return[...e].sort((e,t)=>br(t[n])-br(e[n]))}function Sr(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 Cr(e){let t=e.selected_repository?.trim().replace(/\/+$/,``);if(!t)return{id:`__none_repo`,label:``};let n=t.split(`/`).filter(Boolean),r=n.length?(n[n.length-1]??t).replace(/\.git$/,``):t.replace(/\.git$/,``);return{id:`repo:${t}`,label:r}}function wr(e,t,n,r){let i=new Map;for(let n of e){let{id:e,label:a}=t===`local`?Sr(n):Cr(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=xr(r.conversations,n);return{id:e,label:r.label,conversations:i,launch:yr(e,t,i)}}),o=e=>e.conversations.reduce((e,t)=>Math.max(e,br(n===`created`?t.created_at:t.updated_at)),0);return a.sort((e,t)=>o(t)-o(e)),a}var Tr=()=>{},Er=3600*1e3,Dr=e=>{let t=Date.now()-Er,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 Or({onClose:e,compact:t=!1}){let{t:n}=S(`openhands`),{conversationId:r,navigate:i}=je(),{backend:a}=Se(),o=Nt(e??Tr),[s,c]=Y.useState(!1),[l,u]=Y.useState(!1),[d,f]=Y.useState(!1),[p,m]=Y.useState(!1),h=Z(e=>e.showOlderConversations),g=Z(e=>e.toggleShowOlderConversations),_=Z(e=>e.showRepoBranchMetadata),v=Z(e=>e.toggleShowRepoBranchMetadata),y=Z(e=>e.showLlmProfiles),C=Z(e=>e.toggleShowLlmProfiles),w=Z(e=>e.organizeMode),T=Z(e=>e.setOrganizeMode),D=Z(e=>e.conversationSort),O=Z(e=>e.setConversationSort),k=Z(e=>e.threadScope),A=Z(e=>e.setThreadScope),[j,N]=Y.useState(!1),[P,I]=Y.useState(!1),L=Nt(()=>{N(!1)}),[ee,R]=Y.useState(()=>new Set),[ne,re]=Y.useState(()=>new Set),ie=Y.useCallback(e=>{R(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),ae=Y.useCallback(e=>{re(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);Y.useEffect(()=>{w!==`grouped`&&(R(new Set),re(new Set))},[w]);let oe=Y.useRef(null),[z,se]=Y.useState(null),[ce,le]=Y.useState(null),[ue,de]=Y.useState(null),{data:fe,isLoading:ge,isFetched:_e,hasNextPage:ve,isFetchingNextPage:ye,fetchNextPage:V}=jn(),{data:xe}=Mn(),H=Y.useMemo(()=>fe?.pages.flatMap(e=>e.items)??[],[fe]),Ce=Y.useMemo(()=>k===`relevant`?H.filter(e=>be(e.execution_status)):H,[H,k]),{recent:U,older:W}=Y.useMemo(()=>Dr(Ce),[Ce]),we=Y.useMemo(()=>xr(h?[...U,...W]:U,D),[U,W,h,D]),Te=Y.useMemo(()=>({emptyWorkspace:n(b.CONVERSATION_PANEL$NO_WORKSPACE),emptyRepository:n(b.CONVERSATION_PANEL$NO_REPOSITORY)}),[n]),G=Y.useMemo(()=>t||w!==`grouped`?null:wr([...U,...h?W:[]],a.kind,D,Te),[a.kind,t,D,Te,W,w,U,h]),Ee=Y.useMemo(()=>xr(U.filter(e=>be(e.execution_status)),D),[D,U]),De=we.length,ke=Y.useMemo(()=>G?G.reduce((e,t)=>e+t.conversations.length,0):0,[G]),Ae=w===`grouped`&&!t?ke===0:De===0,{mutate:Me,mutateAsync:Ne}=it(),{mutate:Pe}=lt(),{mutate:Fe}=F(),Ie=W.length>0&&!h,Le=!!ve&&!Ie&&!t&&!Ae,{mutate:Re}=Lt(),ze=x(),Be=Y.useCallback(e=>{ze||Re({workingDir:e.workingDir,repository:e.repository},{onSuccess:e=>{i(`/conversations/${e.conversation_id}`)}})},[Re,ze,i]),Ve=Y.useCallback((e,t)=>{c(!0),se(e),le(t)},[]),He=Y.useCallback(e=>{u(!0),se(e)},[]),Ue=Y.useCallback((e,t)=>{Fe({conversationId:e,newTitle:t},{onSuccess:()=>{me(n(b.CONVERSATION$TITLE_UPDATED))}})},[n,Fe]),We=()=>{z&&Me({conversationId:z},{onSuccess:()=>{z===r&&i(`/conversations`)}})},Ge=()=>{z&&Pe({conversationId:z})},Ke=async()=>{let e=H.map(e=>e.id),t=await Promise.allSettled(e.map(e=>Ne({conversationId:e}))),n=t.flatMap((t,n)=>t.status===`fulfilled`?[e[n]]:[]),a=t.length-n.length;r!==null&&n.includes(r)&&i(`/conversations`),a>0&&pe(`${a} conversation${a===1?``:`s`} could not be deleted.`)},qe=Y.useCallback(n=>t?(0,X.jsx)(rr,{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:_,llmModel:n.llm_model,showLlmProfiles:y,agentKind:n.agent_kind,acpServer:n.acp_server},n.id):(0,X.jsx)(K,{to:`/conversations/${n.id}`,onClick:e,className:`block`,children:(0,X.jsx)(Xn,{onDelete:()=>Ve(n.id,n.title??``),onStop:()=>He(n.id),onChangeTitle:e=>Ue(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:ue===n.id,onContextMenuToggle:e=>de(e?n.id:null),isActive:n.id===r,workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,showRepositoryMetadata:_,llmModel:n.llm_model,showLlmProfiles:y,agentKind:n.agent_kind,acpServer:n.acp_server})},n.id),[t,r,Ue,Ve,He,e,ue,_,y]),Je=ge||!_e,Ye=_e&&!ge&&!t&&Ae&&!xe?.length;return(0,X.jsxs)(`div`,{ref:o,"data-testid":`conversation-panel`,className:`flex h-full min-h-0 w-full flex-col`,children:[!t&&(0,X.jsx)(`div`,{className:B(`-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b`,P?`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(b.SIDEBAR$CONVERSATIONS)}),(0,X.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,X.jsx)(_r,{backendKind:a.kind}),(0,X.jsx)(ur,{filterMenuOpen:j,setFilterMenuOpen:N,menuRef:L,backendKind:a.kind,organizeMode:w,setOrganizeMode:T,conversationSort:D,setConversationSort:O,threadScope:k,setThreadScope:A,showOlderConversations:h,toggleShowOlderConversations:g,showRepoBranchMetadata:_,toggleShowRepoBranchMetadata:v,showLlmProfiles:y,toggleShowLlmProfiles:C,totalConversationsCount:H.length,onRequestDeleteAll:()=>m(!0)})]})]})}),(0,X.jsxs)(`div`,{ref:oe,"data-testid":`conversation-panel-list-scroll`,onScroll:e=>{I(e.currentTarget.scrollTop>0)},className:B(`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:[Je&&(0,X.jsx)(nr,{compact:t}),!t&&Ye&&(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(b.CONVERSATION$NO_CONVERSATIONS)})}),!t&&xe?.map(t=>(0,X.jsx)(K,{to:`/conversations/task-${t.id}`,onClick:e,className:`block`,children:(0,X.jsx)(tr,{task:t})},t.id)),!Je&&t?Ee.map(qe):null,!Je&&!t&&w===`grouped`&&G&&G.length>0?(0,X.jsx)(`nav`,{"aria-label":n(b.SIDEBAR$CONVERSATIONS),className:`space-y-1 md:space-y-0.5 pb-1`,children:G.map(e=>{let t=`thread-folder-${e.id.replace(/[^a-zA-Z0-9_-]/g,`-`)}`,i=e.id.replace(/[^a-zA-Z0-9_-]/g,`-`),a=!ee.has(e.id),o=ne.has(e.id),{visibleConversations:s,isPreviewTruncated:c,isShowingAll:l}=vr(e.conversations,{expanded:o,activeConversationId:r});return(0,X.jsxs)(`section`,{"aria-labelledby":t,children:[(0,X.jsxs)(`div`,{className:B(`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`,id:t,"aria-expanded":a,onClick:()=>ie(e.id),className:`flex min-h-8 min-w-0 flex-1 items-center gap-2 rounded-md py-1 text-left text-inherit outline-none transition-colors focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`,children:[(0,X.jsx)(E,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`truncate`,children:e.label})]}),(0,X.jsx)(`button`,{type:`button`,className:B(`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:ze,"aria-label":n(b.CONVERSATION_PANEL$ADD_CONVERSATION_TO_GROUP,{label:e.label}),"data-testid":`add-conversation-to-group-${e.id.replace(/[^a-zA-Z0-9_-]/g,`-`)}`,onClick:t=>{t.preventDefault(),t.stopPropagation(),Be(e.launch)},children:(0,X.jsx)(he,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0,strokeWidth:2})})]}),a?(0,X.jsxs)(`div`,{className:`mt-0.5 space-y-0.5`,children:[s.map(qe),c?(0,X.jsx)(`div`,{className:`pl-2`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`thread-folder-view-more-${i}`,onClick:()=>ae(e.id),className:`ml-[26px] cursor-pointer text-xs text-[var(--oh-text-dim)] hover:text-white`,children:n(l?b.CONVERSATION_PANEL$LESS:b.CONVERSATION_PANEL$MORE)})}):null]}):null]},e.id)})}):null,!Je&&!t&&w===`chronological`?(0,X.jsx)(`div`,{className:`space-y-0.5`,children:we.map(qe)}):null,Le&&(0,X.jsx)(`div`,{className:`flex justify-center py-4`,children:ye?(0,X.jsx)(Oe,{size:`small`}):(0,X.jsx)(`button`,{type:`button`,"data-testid":`load-more-conversations`,onClick:()=>V(),className:`text-xs text-[var(--oh-muted)] hover:text-white`,children:n(b.CONVERSATION$LOAD_MORE)})})]}),s&&(0,X.jsx)(M,{onConfirm:()=>{We(),c(!1),le(null)},onCancel:()=>{c(!1),le(null)},conversationTitle:ce??void 0}),p&&(0,X.jsx)(M,{title:n(b.CONVERSATION$CONFIRM_DELETE_ALL_TITLE),description:n(b.CONVERSATION$CONFIRM_DELETE_ALL_DESC,{count:H.length}),onConfirm:async()=>{await Ke(),m(!1)},onCancel:()=>m(!1)}),l&&(0,X.jsx)(te,{onConfirm:()=>{Ge(),u(!1)},onCancel:()=>u(!1)}),d&&(0,X.jsx)(Nn,{onConfirm:()=>{e?.()},onClose:()=>f(!1),onCancel:()=>f(!1)})]})}function kr({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)(Or,{})})})}var Ar=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,jr=34,Mr=Math.round(jr*30/46);function Nr({collapsed:e,showCollapseToggle:t,showMobileCloseButton:n=!1,onCloseMobile:r,linkDisabled:i,collapseToggleLabel:a,onCollapse:o,onExpand:s,showCollapsedExpandButton:c,isExtensionsActive:l,currentPath:u,activeBackendHealth:d,collapsedBackendPopoverOpen:f,setCollapsedBackendPopoverOpen:p,collapsedBackendPopoverRef:m,collapsedBackendCloseTimer:h,onOpenAddBackend:_,onOpenManageBackends:v}){let{t:y}=S(`openhands`),x=h;return(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,X.jsxs)(`div`,{className:Pe(e),children:[(0,X.jsxs)(`div`,{className:B(e&&t?Ie:`flex min-w-0 shrink-0 items-center`),children:[(0,X.jsx)(`div`,{className:B(e&&t&&`flex h-full w-full items-center justify-start pl-2.5 transition-opacity duration-150`,e&&c&&`opacity-0`),children:(0,X.jsx)(gn,{logoWidth:jr,logoHeight:Mr,logoClassName:`max-w-none`,className:B(Ve,`overflow-visible`)})}),e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":a,onClick:s,className:B(Ne,c?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`),children:(0,X.jsx)(g,{width:14,height:14})}):null]}),!e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":a,onClick:o,className:B(`hidden md:inline-flex ml-auto`,ze,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(N,{width:14,height:14})}):null,!e&&n?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-drawer-close`,onClick:r,"aria-label":y(b.SIDEBAR$CLOSE_MENU),className:B(`inline-flex ml-auto`,ze,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(N,{width:14,height:14})}):null]}),(0,X.jsxs)(`nav`,{className:Be(e),children:[(0,X.jsx)(We,{to:`/conversations`,end:!0,label:`New Chat`,testId:`sidebar-conversations-link`,disabled:i,collapsed:e,icon:(0,X.jsx)(he,{width:$,height:$})}),(0,X.jsx)(We,{to:`/customize`,label:`Customize`,testId:`sidebar-skills-link`,disabled:i,collapsed:e,forceActive:l,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)(We,{to:`/automations`,label:y(b.SIDEBAR$AUTOMATIONS),testId:`sidebar-automations-link`,disabled:i,collapsed:e,icon:(0,X.jsx)(Ar,{width:$,height:$})})]}),(0,X.jsx)(kr,{collapsed:e}),e&&t?(0,X.jsxs)(`nav`,{className:B(Be(e),`mt-auto pb-2 cursor-pointer`),children:[(0,X.jsx)(Ke,{content:y(b.SIDEBAR$SETTINGS),placement:`right`,children:(0,X.jsxs)(K,{to:`/settings`,"data-testid":`collapsed-settings-link`,"aria-label":y(b.SIDEBAR$SETTINGS),className:Le({collapsed:!0}),children:[(0,X.jsx)(Ue,{active:u.startsWith(`/settings`),children:(0,X.jsx)(fn,{width:$,height:$})}),(0,X.jsx)(`span`,{className:Fe(!0),children:y(b.SIDEBAR$SETTINGS)})]})}),(0,X.jsxs)(`div`,{className:`relative`,ref:m,onMouseEnter:()=>{x.current&&=(clearTimeout(x.current),null),p(!0)},onMouseLeave:()=>{x.current=setTimeout(()=>p(!1),150)},children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`collapsed-backend-selector-link`,"aria-label":y(b.BACKEND$MANAGE),"aria-expanded":f,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>e.stopPropagation(),className:B(Le({collapsed:!0}),`relative`),children:[(0,X.jsx)(Ue,{active:f,children:(0,X.jsxs)(`span`,{className:`relative inline-flex size-[18px] shrink-0 items-center justify-center`,children:[(0,X.jsx)(xt,{isConnected:d?.isConnected??null,className:`absolute -left-0.5 -top-0.5 z-[1] pointer-events-none`}),(0,X.jsx)(dn,{width:$,height:$})]})}),(0,X.jsx)(`span`,{className:Fe(!0),children:y(b.BACKEND$MANAGE)})]}),f?(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)(An,{sidebarCollapsed:e,hideTrigger:!0,defaultOpen:!0,openUpward:!0,onSelectOption:()=>p(!1),onOpenAddBackend:_,onOpenManageBackends:v})}):null]})]}):null,e?null:(0,X.jsx)(`div`,{className:B(`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)(An,{sidebarCollapsed:e,openUpward:!0})})]})}var Pr=Y.lazy(()=>n(()=>import(`./settings-modal-DdntdOGP.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]))),Fr=Y.lazy(()=>n(()=>import(`./add-backend-modal-BDBDBXsJ.js`).then(e=>e.n).then(e=>({default:e.AddBackendModal})),__vite__mapDeps([49,1,9,50,13,51,52,16,15,17,10,21,20,18,19,53,44,22,23,7,24,30,34,12,32,54,35,43,33]))),Ir=Y.lazy(()=>n(()=>import(`./manage-backends-modal-Ceo_SOcf.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__vite__mapDeps([55,1,13,51,15,16,17,9,10,56,57,58,59,18,19,50,52,21,20,53,44,22,23,7,24,30,34,12,32,54,35,43,33,60]))),Lr=250;function Rr(){let{t:e}=S(`openhands`),{currentPath:t}=je(),{data:n}=ke(),{data:r,error:i,isError:a,isFetching:o}=Pt(),{backends:s,active:c}=H(),l=bt(s)[c.backend.id],u=Zt(e=>e.collapsed),d=Zt(e=>e.setCollapsed),[f,p]=Y.useState(!1),[m,h]=Y.useState(!1),g=Y.useRef(null),[_,v]=Y.useState(!1),[y,x]=Y.useState(!1),[C,w]=Y.useState(!1),T=Y.useRef(!1),[,E]=Y.useReducer(e=>e+1,0),{isOpen:D,close:O}=I(),[k,A]=Y.useState(!1),[j,M]=Y.useState(!1),N=Nt(()=>h(!1)),P=Ft(i);Y.useEffect(()=>{O()},[t,O]),Y.useEffect(()=>{if(D){A(!0);let e=requestAnimationFrame(()=>{M(!0)});return()=>cancelAnimationFrame(e)}M(!1);let e=window.setTimeout(()=>{A(!1)},Lr);return()=>window.clearTimeout(e)},[D]),Y.useEffect(()=>{if(!D)return;let e=e=>{e.key===`Escape`&&O()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[D,O]),Y.useEffect(()=>{t===`/settings`?p(!1):!o&&a&&P!==404?pe(`Something went wrong while fetching settings. Please reload the page.`):P===404&&!n?.feature_flags?.hide_llm_settings&&p(!0)},[t,o,a,P,n?.feature_flags?.hide_llm_settings]);let F=r?.email_verified===!1,L=e(u?b.SIDEBAR$EXPAND:b.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]),R={linkDisabled:F,collapseToggleLabel:L,onCollapse:Y.useCallback(()=>{w(!1),T.current=!0,E(),d(!0),window.setTimeout(()=>{T.current=!1,E()},250)},[d]),onExpand:()=>d(!1),showCollapsedExpandButton:u&&C&&!T.current,isExtensionsActive:t===`/customize`||t.startsWith(`/skills`)||t===`/plugins`||t===`/mcp`,currentPath:t,activeBackendHealth:l,collapsedBackendPopoverOpen:m,setCollapsedBackendPopoverOpen:h,collapsedBackendPopoverRef:N,collapsedBackendCloseTimer:g,onOpenAddBackend:()=>v(!0),onOpenManageBackends:()=>x(!0)};return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`aside`,{"aria-label":e(b.SIDEBAR$NAVIGATION_LABEL),"data-collapsed":u?`true`:`false`,onClick:ee,onMouseEnter:()=>{u&&w(!0)},onMouseLeave:()=>{w(!1)},className:B(`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)(Nr,{collapsed:u,showCollapseToggle:!0,...R})}),k?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:B(`fixed inset-0 z-40 bg-black/50 md:hidden`,`transition-opacity ease-in-out motion-reduce:transition-none`,j?`opacity-100`:`pointer-events-none opacity-0`),style:{transitionDuration:`${Lr}ms`},onClick:O,"aria-hidden":!j}),(0,X.jsx)(`aside`,{"aria-label":e(b.SIDEBAR$NAVIGATION_LABEL),"data-testid":`sidebar-mobile-drawer`,"aria-hidden":!j,className:B(`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`,j?`translate-x-0`:`-translate-x-full`),style:{transitionDuration:`${Lr}ms`},children:(0,X.jsx)(Nr,{collapsed:!1,showCollapseToggle:!1,showMobileCloseButton:!0,onCloseMobile:O,...R})})]}):null,f&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(Pr,{settings:r,onClose:()=>p(!1)})}),_&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(Fr,{onClose:()=>v(!1)})}),y&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(Ir,{onClose:()=>x(!1)})})]})}var zr=`/settings`,Br=`/customize`,Vr=[`/skills`,`/mcp`,`/plugins`];function Hr(e){return e===zr?{mode:`menu`}:e.startsWith(`${zr}/`)&&e.length>9?{mode:`back`,backTo:zr,backLabelKey:b.SETTINGS$TITLE}:e===Br?{mode:`menu`}:Vr.some(t=>e===t||e.startsWith(`${t}/`))?{mode:`back`,backTo:Br,backLabelKey:b.NAV$CUSTOMIZE}:{mode:`menu`}}function Ur(){let{t:e}=S(`openhands`),{currentPath:t,navigate:n}=je(),r=Hr(t);return(0,X.jsxs)(`header`,{className:`flex md:hidden h-12 shrink-0 items-center gap-2 px-2.5`,"aria-label":e(b.SIDEBAR$NAVIGATION_LABEL),children:[(0,X.jsx)(R,{}),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??b.COMMON$BACK),className:L,children:(0,X.jsx)(N,{size:20,className:P,"aria-hidden":!0,strokeWidth:2})}):null]})}var Wr=()=>{let e=Ce(),{mutate:t}=$t();return{migrateUserConsent:Y.useCallback(async n=>{let r=localStorage.getItem(`analytics-consent`);r&&(n?.handleAnalyticsWasPresentInLocalStorage(),t({user_consents_to_analytics:r===`true`},{onSuccess:()=>{Qt(e,r===`true`)}}),localStorage.removeItem(`analytics-consent`))},[e,t])}},Gr=()=>{let e=Ce(),{data:t}=Pt();Y.useEffect(()=>{!e||t===void 0||Qt(e,t.user_consents_to_analytics===!0)},[e,t])},Kr=()=>{let e=Ce(),{backend:t}=Se(),{data:n}=Pt(),r=He(),i=Y.useRef(!1),a=t.kind===`cloud`,o=a?r[t.id]?.userId??null:null,s=n?.user_consents_to_analytics;Y.useEffect(()=>{if(!(!e||!a||n===void 0)){if(s===!0&&o){e.identify(o,{email:n.email??void 0}),i.current=!0;return}(s===!1||i.current&&!o)&&(e.reset(),i.current=!1)}},[e,a,s,o,n?.email,n])};function qr(e){switch(e){case V.RUNNING:return`🟢`;case V.FINISHED:case V.IDLE:case V.WAITING_FOR_CONFIRMATION:return`✅`;case V.PAUSED:return`⚪`;case V.ERROR:case V.STUCK:return`🔴`;default:return null}}var Jr=`OpenHands`,Yr=()=>{let{conversationId:e}=l(),{data:t}=en(e??null),n=tn(e=>e.execution_status),r=t?.title,i=e&&r?`${r} | ${Jr}`:Jr;if(!e)return i;let a=qr(n??t?.execution_status??null);return a?`${a} ${i}`:i};function Xr({children:e}){let{pathname:t}=p(),n=s(),r=c(),i=f(),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)(Me,{value:Y.useMemo(()=>({currentPath:t,conversationId:a,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[t,a,r.location,n]),children:e})}var Zr=Y.lazy(()=>n(()=>import(`./environment-switch-overlay-CuBuZOaa.js`),__vite__mapDeps([61,1,12,10,9,18,19,62]))),Qr=Y.lazy(()=>n(()=>import(`./analytics-consent-form-modal-DxkThW4K.js`).then(e=>({default:e.AnalyticsConsentFormModal})),__vite__mapDeps([63,46,1,47,10,9,18,19,64,4,22,23,7,24,31,32,33,34,12,36,37,16,38,17,39,13,20,21,40,41,42,15,43,44,45,65]))),$r=Y.lazy(()=>n(()=>import(`./alert-banner-NeUl1-PQ.js`).then(e=>({default:e.AlertBanner})),__vite__mapDeps([66,1,67,10,9,18,19,68,69,23,7,24,35,70,71,27]))),ei=u(function(){let e=a(),{t}=S(`openhands`);return i(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(b.ERROR$GENERIC)}),(0,X.jsx)(`pre`,{children:e.message})]}):(0,X.jsx)(`div`,{children:(0,X.jsx)(`h1`,{children:t(b.ERROR$UNKNOWN)})})}),ti=o(function(){let e=p(),t=Yr(),{data:n}=Pt(),{migrateUserConsent:r}=Wr(),i=ke(),[a,o]=Y.useState(!1);if(Gr(),Kr(),Y.useEffect(()=>{n?.language&&C.changeLanguage(n.language)},[n?.language]),Y.useEffect(()=>{o(n?.user_consents_to_analytics===null)},[n?.user_consents_to_analytics]),Y.useEffect(()=>{r({handleAnalyticsWasPresentInLocalStorage:()=>{o(!1)}})},[r]),i.isLoading)return(0,X.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-base`,children:(0,X.jsx)(Oe,{size:`large`})});let s=/^\/conversations\/[^/]+/.test(e.pathname),c=se(e.search);return(0,X.jsx)(Xr,{children:(0,X.jsxs)(A,{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)(Rr,{}),(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-col w-full min-w-0 h-full gap-3`,children:[s?null:(0,X.jsx)(Ur,{}),i.data&&(i.data.maintenance_start_time||i.data.faulty_models&&i.data.faulty_models.length>0||i.data.error_message)&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)($r,{maintenanceStartTime:i.data.maintenance_start_time,faultyModels:i.data.faulty_models,errorMessage:i.data.error_message,updatedAt:i.data.updated_at})}),(0,X.jsx)(`div`,{id:`root-outlet`,className:`relative flex-1 overflow-auto px-0 custom-scrollbar`,children:(0,X.jsx)(d,{})})]}),a&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(Qr,{onClose:()=>{o(!1)}})})]}),(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(Zr,{})}),c?(0,X.jsx)(de,{}):null]})})});export{ei as ErrorBoundary,ti as default};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-BFRubm34.js";import{d as t,n,s as r}from"./agent-server-client-options-9agOSarV.js";import{t as i}from"./proxy-sRh0WKI7.js";var a=100;function o(){let e=t().backend;if(e.kind!==`cloud`)throw Error(`Cloud secrets call requires a cloud backend.`);return e}async function s(){let e=o(),t=[],n=null;do{let r=new URLSearchParams({limit:String(a)});n&&r.set(`page_id`,n);let o=await i({backend:e,method:`GET`,path:`/api/v1/secrets/search?${r.toString()}`});t.push(...o.items??[]),n=o.next_page_id}while(n);return t}async function c(e,t,n){await i({backend:o(),method:`POST`,path:`/api/v1/secrets`,body:{name:e,value:t,description:n}})}async function l(e,t,n){await i({backend:o(),method:`PUT`,path:`/api/v1/secrets/${encodeURIComponent(e)}`,body:{name:t,description:n}})}async function u(e){await i({backend:o(),method:`DELETE`,path:`/api/v1/secrets/${encodeURIComponent(e)}`})}var d=e({SecretsService:()=>p});async function f(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 p=class{static async getSecrets(){try{return t().backend.kind===`cloud`?await f(()=>s()):(await f(()=>new r(n()).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,i,a){if(t().backend.kind===`cloud`){await f(()=>c(e,i,a));return}await f(()=>new r(n()).upsertSecret({name:e,value:i,description:a}))}static async updateSecret(e,n,r){if(t().backend.kind===`cloud`){await f(()=>l(e,n,r));return}await this.createSecret(e,n,r)}static async deleteSecret(e){try{if(t().backend.kind===`cloud`){await f(()=>u(e));return}await f(()=>new r(n()).deleteSecret(e))}catch(e){if(e&&typeof e==`object`&&`response`in e&&e.response?.status===404)return;throw e}}};export{d as n,p as t};
@@ -1 +0,0 @@
1
- import{c as e}from"./agent-server-client-options-9agOSarV.js";var t=class{constructor(t){this.host=t.host.replace(/\/$/,``),this.apiKey=t.apiKey,this.client=new e({baseUrl:this.host,apiKey:this.apiKey,timeout:t.timeout||6e4})}async getRoot(){return(await this.client.get(`/`)).data}async getAlive(){return(await this.client.get(`/alive`)).data}async getHealth(){return(await this.client.get(`/health`)).data}async getReady(){return(await this.client.get(`/ready`,{acceptableStatusCodes:new Set([200,503])})).data}async getServerInfo(){return(await this.client.get(`/server_info`)).data}close(){this.client.close()}};export{t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{E as n,L as r,c as i,j as a,k as o}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{r as s}from"./query-client-config-CWWGQWvw.js";import{o as c,t as l}from"./declaration-DaUdB2Wg.js";import{t as u}from"./useTranslation-CEcjrme-.js";import{n as d,t as f}from"./use-settings-nav-items-C7MOWj09.js";import{t as p}from"./utils-CdgBzLA7.js";import{t as m}from"./option-service.api-CGNANEcT.js";import{i as h,t as g}from"./query-keys-tAsQcc_9.js";import"./navigation-link-CYkF2y3K.js";import"./use-cloud-current-user-id-BAKf91Zx.js";import{t as _}from"./sidebar-nav-link-BsYdDFfb.js";import"./close-D_o3d8QM.js";import{r as v}from"./typography-Bvw0IxaN.js";import{t as y}from"./settings-section-header-context-B77tsYlx.js";import"./settings-gear-aNebYlCy.js";import{n as b,r as x}from"./settings-utils-BxzHqLmZ.js";import{t as S}from"./use-breakpoint-DpxHDmuH.js";import{t as C}from"./backend-synced-settings-badge-BktJcGgH.js";import{t as w}from"./settings-like-page-layout-classes-DNg2vKSM.js";import{t as T}from"./acp-route-guard-A__sWgbc.js";var E=e(t(),1),D=c();function O({navigationItems:e}){let{t}=u(`openhands`),n=e.filter(e=>e.type===`item`);return(0,D.jsxs)(`aside`,{"data-testid":`settings-navbar-desktop`,className:p(`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,D.jsx)(v.Text,{className:`px-2 text-sm font-normal text-white`,children:t(l.SETTINGS$TITLE)}),(0,D.jsx)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:n.map(e=>(0,D.jsx)(_,{to:e.item.to,label:t(e.item.text),end:!0,testId:`sidebar-settings-${e.item.to}`,icon:e.item.icon,disabled:e.disabled,disabledReason:e.disabled&&e.disabledAgentName?t(l.SETTINGS$AGENT_DISABLED_TOOLTIP,{agentName:e.disabledAgentName}):void 0},e.item.to))}),(0,D.jsx)(`div`,{className:`px-2 pt-3`,children:(0,D.jsx)(C,{})})]})}function k({children:e,navigationItems:t}){return(0,D.jsx)(`div`,{className:`flex h-full flex-col md:pt-8`,children:(0,D.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-10 md:items-start`,children:[(0,D.jsx)(O,{navigationItems:t}),(0,D.jsx)(`main`,{className:w,children:(0,D.jsx)(`div`,{className:`mx-auto w-full min-w-0 max-w-[800px]`,children:e})})]})})}var A=async({request:e})=>{let{pathname:t}=new URL(e.url),r=(await s.fetchQuery({queryKey:h.WEB_CLIENT_CONFIG,queryFn:m.getConfig,...g}))?.feature_flags;if(x(t,r)){let e=b(r);if(e&&e!==t)return n(e)}if(d.find(e=>e.to===t)?.disabledByAcp){let e=await T();if(e)return e}return null};function j(){let{t:e}=u(`openhands`),t=o(),n=a(),r=f(),s=S(768),[c,l]=(0,E.useState)(!1),{currentSectionTitle:d,currentSectionSubtitle:p}=(0,E.useMemo)(()=>{let e=r.find(e=>e.type===`item`&&e.item.to===t.pathname);if(e?.type===`item`)return{currentSectionTitle:e.item.text,currentSectionSubtitle:e.item.subtitle};let n=r.find(e=>e.type===`item`);return n?.type===`item`?{currentSectionTitle:n.item.text,currentSectionSubtitle:n.item.subtitle}:{currentSectionTitle:`SETTINGS$TITLE`,currentSectionSubtitle:null}},[r,t.pathname]),m=n.find(e=>e.pathname===t.pathname)?.handle,h=s&&t.pathname===`/settings`;return(0,D.jsx)(`main`,{"data-testid":`settings-screen`,className:`min-h-0`,children:(0,D.jsx)(y,{setHideSectionHeader:l,children:(0,D.jsx)(k,{navigationItems:r,children:(0,D.jsxs)(`div`,{className:`flex flex-col gap-6 pb-8`,children:[!(m?.hideTitle===!0||h||c)&&(0,D.jsxs)(`header`,{className:`space-y-1`,children:[(0,D.jsx)(v.H2,{children:e(d)}),p?(0,D.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:e(p)}):null]}),(0,D.jsx)(i,{})]})})})})}var M=r(j);export{A as clientLoader,M as default};
@@ -1 +0,0 @@
1
- import{d as e,n as t,s as n}from"./agent-server-client-options-9agOSarV.js";import{t as r}from"./proxy-sRh0WKI7.js";import{t as i}from"./settings-DGY6n4J2.js";var a=`openhands-agent-server-app-preferences`,o=[`language`,`user_consents_to_analytics`,`enable_sound_notifications`,`git_user_name`,`git_user_email`],s=new Set(o),c=e=>s.has(e),l=(e,t)=>{switch(e){case`language`:case`git_user_name`:case`git_user_email`:return typeof t==`string`?t:void 0;case`enable_sound_notifications`:return typeof t==`boolean`?t:void 0;case`user_consents_to_analytics`:return t===null?null:typeof t==`boolean`?t:void 0;default:return}},u=e=>{let t={};for(let n of o)if(n in e){let r=l(n,e[n]);r!==void 0&&(t[n]=r)}return t},d=()=>{if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(a);if(!e)return{};let t=JSON.parse(e);return!t||typeof t!=`object`||Array.isArray(t)?{}:u(t)}catch{return{}}},f=e=>{if(typeof window>`u`)return;let t=u(e),n={...d(),...t};if(Object.keys(n).length===0){window.localStorage.removeItem(a);return}window.localStorage.setItem(a,JSON.stringify(n))},p=e=>{let t={},n={};for(let[r,i]of Object.entries(e))if(c(r)){let e=l(r,i);e!==void 0&&(t[r]=e)}else n[r]=i;return{extracted:t,rest:n}};function m(){let t=e().backend;if(t.kind!==`cloud`)throw Error(`Cloud settings call requires a cloud backend.`);return t}function h(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),t}function g(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 _(){let e=await r({backend:m(),method:`GET`,path:`/api/v1/settings`});return{...e,agent_settings:h(e),conversation_settings:g(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 v(e){let t=m(),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.disabled_skills!==void 0&&(n.disabled_skills=e.disabled_skills),e.app_preferences)for(let[t,r]of Object.entries(e.app_preferences))n[t]=r;await r({backend:t,method:`POST`,path:`/api/v1/settings`,body:n})}async function y(){return r({backend:m(),method:`GET`,path:`/api/v1/settings/agent-schema`})}async function b(){return r({backend:m(),method:`GET`,path:`/api/v1/settings/conversation-schema`})}var x=e=>JSON.parse(JSON.stringify(e)),S=`openhands-agent-server-disabled-skills`,C=()=>{if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(S);if(!e)return null;let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`string`):null}catch{return null}},w=e=>{if(!(typeof window>`u`))try{window.localStorage.setItem(S,JSON.stringify(e))}catch{}},T=(e,t)=>({...e??{},...t??{}});async function E(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 D={redacted:null,encrypted:null,timestamp:0},O=300*1e3,k=()=>Date.now()-D.timestamp<O,A=()=>{D={redacted:null,encrypted:null,timestamp:0}},j=e=>{let t={agent_settings:e.agent_settings??{},conversation_settings:e.conversation_settings??{},llm_api_key_set:e.llm_api_key_is_set},n=C();return n!==null&&(t.disabled_skills=n),t},M=e=>{let t=T(i.agent_settings??{},e.agent_settings??{}),n=T(i.conversation_settings??{},e.conversation_settings??{}),r=d(),a={...x(i),...r,...e,provider_tokens_set:{...i.provider_tokens_set??{},...e.provider_tokens_set??{}},agent_settings:t,conversation_settings:n},o=t.llm,s=t.condenser;return typeof t.agent==`string`&&(a.agent=t.agent),typeof o?.model==`string`&&o.model.length>0&&(a.llm_model=o.model),typeof o?.base_url==`string`&&(a.llm_base_url=o.base_url),typeof s?.enabled==`boolean`&&(a.enable_default_condenser=s.enabled),typeof s?.max_size==`number`&&(a.condenser_max_size=s.max_size),t.mcp_config&&(a.mcp_config=t.mcp_config),typeof n.confirmation_mode==`boolean`&&(a.confirmation_mode=n.confirmation_mode),(typeof n.security_analyzer==`string`||n.security_analyzer===null)&&(a.security_analyzer=n.security_analyzer),typeof n.max_iterations==`number`&&(a.max_iterations=n.max_iterations),a.search_api_key_set=!!a.search_api_key,a},N=class r{static async fetchSettingsFromApi(e){return E(()=>new n(t()).getSettings({exposeSecrets:e}))}static async getSettings(){if(e().backend.kind===`cloud`)try{return M(await E(()=>_()))}catch(e){return console.warn(`Failed to fetch cloud settings, using defaults:`,e),M({})}if(k()&&D.redacted)return M(j(D.redacted));try{let e=await this.fetchSettingsFromApi();return D.redacted=e,D.timestamp=Date.now(),M(j(e))}catch(e){return console.warn(`Failed to fetch settings from API, using defaults:`,e),M({})}}static async getSettingsForConversation(){if(k()&&D.encrypted)return{agentSettings:D.encrypted.agent_settings,conversationSettings:D.encrypted.conversation_settings,secretsEncrypted:!0};let e=await this.fetchSettingsFromApi(`encrypted`);return D.encrypted=e,D.timestamp||=Date.now(),{agentSettings:e.agent_settings,conversationSettings:e.conversation_settings,secretsEncrypted:!0}}static async getSettingsSchema(){return e().backend.kind===`cloud`?await y():await new n(t()).getAgentSchema()}static async getConversationSettingsSchema(){return e().backend.kind===`cloud`?await b():await new n(t()).getConversationSchema()}static async saveSettings(i){let{extracted:a,rest:o}=p(i),s=Object.keys(a).length>0;s&&f(a);let 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);let d=o.disabled_skills;Array.isArray(d)&&(c.disabled_skills=d);let m=e().backend.kind===`cloud`,h=c.agent_settings_diff,g=!!h&&`mcp_config`in h&&h.mcp_config!==null,y;if(g)try{y=m?(await _())?.agent_settings?.mcp_config:(await r.fetchSettingsFromApi())?.agent_settings?.mcp_config}catch{}if(m){if(!(c.agent_settings_diff||c.conversation_settings_diff||c.disabled_skills!==void 0||s))return!0;g&&await E(()=>v({agent_settings_diff:{mcp_config:null}}));try{await E(()=>v({...c,...s?{app_preferences:a}:{}}))}catch(e){if(g&&y)try{await v({agent_settings_diff:{mcp_config:y}})}catch{}throw e}}else{Array.isArray(d)&&w(d);let e={...c};if(delete e.disabled_skills,!(e.agent_settings_diff||e.conversation_settings_diff))return s&&A(),!0;g&&await E(()=>new n(t()).updateSettings({agent_settings_diff:{mcp_config:null}}));try{await E(()=>new n(t()).updateSettings(e))}catch(e){if(g&&y)try{await new n(t()).updateSettings({agent_settings_diff:{mcp_config:y}})}catch{}throw e}}return A(),!0}static invalidateCache(){A()}};export{N as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n,P as r,r as i}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as a}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{f as o}from"./path-utils-BjxzIGLp.js";import{o as s,t as c}from"./declaration-DaUdB2Wg.js";import{t as l}from"./useTranslation-CEcjrme-.js";import{t as u}from"./messages-Bz9TWjlh.js";import{n as d}from"./agent-server-client-options-9agOSarV.js";import{o as f}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-D8soyAAx.js";import{t as p}from"./loading-spinner-DNwR4--Z.js";import{t as m}from"./openhands-logo-CHmtDV-t.js";import{o as h}from"./conversation-websocket-context-G95yfL81.js";import{n as g}from"./use-event-store-Cxqc45Sw.js";var _=e(t(),1),v=e=>a({queryKey:[`shared-conversation`,e],queryFn:()=>{if(!e)throw Error(`Conversation ID is required`);return new f(d()).getSharedConversation(e)},enabled:!!e,retry:!1}),y=e=>o({queryKey:[`shared-conversation-events`,e],queryFn:({pageParam:t})=>{if(!e)throw Error(`Conversation ID is required`);return new f(d()).searchSharedEvents({conversationId:e,limit:100,pageId:t})},initialPageParam:void 0,getNextPageParam:e=>e.next_page_id??void 0,enabled:!!e,retry:!1}),b=({hasNextPage:e,isFetchingNextPage:t,fetchNextPage:n,threshold:r=100})=>{let i=(0,_.useRef)(null),a=(0,_.useCallback)(()=>{if(!i.current||t||!e)return;let{scrollTop:a,scrollHeight:o,clientHeight:s}=i.current;a+s>=o-r&&n()},[e,t,n,r]);return(0,_.useEffect)(()=>{let e=i.current;if(e)return e.addEventListener(`scroll`,a),()=>{e.removeEventListener(`scroll`,a)}},[a]),i},x=s(),S=n(function(){let{t:e}=l(`openhands`),{conversationId:t}=r(),{data:n,isLoading:a,error:o}=v(t),{data:s,isLoading:d,error:f,hasNextPage:S,fetchNextPage:C,isFetchingNextPage:w}=y(t),T=a||d,E=o||f,D=_.useMemo(()=>s?.pages?s.pages.flatMap(e=>e.items):[],[s?.pages]),O=_.useMemo(()=>D.reduce((e,t)=>g(t,e),[]).filter(h),[D]),k=b({hasNextPage:!!S,isFetchingNextPage:w,fetchNextPage:C});return T?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(p,{size:`large`})}):E||!n?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(`div`,{className:`text-white`,children:e(c.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)(i,{to:`/conversations`,className:`flex-shrink-0`,"aria-label":e(c.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(c.CONVERSATION$SHARED_CONVERSATION)}),n?.selected_branch&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(c.CONVERSATION$BRANCH),`: `,n.selected_branch]}),n?.selected_repository&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(c.CONVERSATION$REPOSITORY),`:`,` `,n.selected_repository]}),n?.llm_model&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(c.LLM$MODEL),`: `,n.llm_model]})]})]})}),(0,x.jsx)(`div`,{ref:k,className:`flex-1 overflow-y-auto custom-scrollbar-always px-4 pt-4 gap-2`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto p-4 border border-[var(--oh-border-subtle)] rounded`,children:[O.length>0?(0,x.jsx)(u,{messages:O,allEvents:D}):(0,x.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,x.jsx)(`div`,{className:`text-center text-[var(--oh-muted)] py-8`,children:e(c.CONVERSATION$NO_HISTORY_AVAILABLE)})}),w&&(0,x.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,x.jsx)(p,{size:`small`})})]})})]})});export{S as default};
@@ -1 +0,0 @@
1
- import{t as e}from"./react-Dy05vyj5.js";import{r as t,t as n}from"./middleware-CfatjPYZ.js";var r=`openhands-sidebar`,i=`openhands-sidebar-collapsed`,a=e()(t(e=>({collapsed:!1,setCollapsed:t=>e(e=>({collapsed:typeof t==`function`?t(e.collapsed):t})),toggleCollapsed:()=>e(e=>({collapsed:!e.collapsed}))}),{name:r,storage:n(()=>localStorage),partialize:e=>({collapsed:e.collapsed})}));if(typeof window<`u`)try{let e=window.localStorage.getItem(i);window.localStorage.getItem(r)===null&&(e===`true`||e===`false`)&&a.setState({collapsed:e===`true`}),e!==null&&window.localStorage.removeItem(i)}catch{}export{a as t};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-BPuuVEqr.js","assets/rolldown-runtime-BFRubm34.js"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./preload-helper-CT1Z6Pdu.js";var t={name:`@openhands/agent-canvas`,version:`1.0.0-rc.1`,description:`Agent Canvas UI for OpenHands - run AI coding agents with a visual interface`,license:`MIT`,private:!1,type:`module`,repository:{type:`git`,url:`https://github.com/OpenHands/agent-canvas`},homepage:`https://github.com/OpenHands/agent-canvas#readme`,bugs:{url:`https://github.com/OpenHands/agent-canvas/issues`},bin:{"agent-canvas":`bin/agent-canvas.mjs`},engines:{node:`>=22.12.0`},dependencies:{"@heroui/react":`2.8.10`,"@microlink/react-json-view":`1.31.20`,"@monaco-editor/react":`4.7.0`,"@openhands/extensions":`git+https://github.com/OpenHands/extensions.git#62594156a187722344736bc2ff5edfb12c0cc75c`,"@openhands/typescript-client":`1.24.3`,"@react-router/node":`7.14.2`,"@react-router/serve":`7.14.2`,"@tailwindcss/vite":`4.2.4`,"@tanstack/react-query":`5.100.9`,"@types/shell-quote":`^1.7.5`,"@uidotdev/usehooks":`2.4.1`,"@xterm/addon-fit":`0.11.0`,"@xterm/xterm":`6.0.0`,axios:`1.16.0`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,downshift:`9.3.2`,"framer-motion":`12.38.0`,i18next:`26.0.8`,"i18next-browser-languagedetector":`8.2.1`,"i18next-http-backend":`4.0.0`,isbot:`5.1.39`,"lucide-react":`1.14.0`,"monaco-editor":`0.55.1`,"posthog-js":`1.372.6`,react:`19.2.5`,"react-dom":`19.2.5`,"react-hot-toast":`2.6.0`,"react-i18next":`17.0.6`,"react-icons":`5.6.0`,"react-markdown":`10.1.0`,"react-router":`7.14.2`,"react-syntax-highlighter":`16.1.1`,"rehype-raw":`7.0.0`,"rehype-sanitize":`6.0.0`,"remark-breaks":`4.0.0`,"remark-gfm":`4.0.1`,"shell-quote":`^1.8.3`,"sirv-cli":`3.0.1`,"socket.io-client":`4.8.3`,"tailwind-merge":`3.5.0`,"tailwind-scrollbar":`4.0.2`,"unist-util-visit":`5.1.0`,uuid:`14.0.0`,vite:`8.0.10`,zustand:`5.0.12`},scripts:{dev:`node --env-file-if-exists=.env scripts/dev-with-automation.mjs`,"dev:static":`node --env-file-if-exists=.env scripts/dev-static.mjs`,"dev:extra-backend":`node --env-file-if-exists=.env scripts/dev-extra-backend.mjs`,"dev:minimal":`node --env-file-if-exists=.env scripts/dev-safe.mjs`,"dev:frontend":`npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev`,"dev:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev`,build:`npm run build:app`,"build:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router build`,start:`npx sirv-cli build/ --single`,test:`npm run make-i18n && vitest run`,"test:e2e":`playwright test --pass-with-no-tests`,"test:e2e:live":`node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs`,"test:e2e:mock-llm":`playwright test --config=playwright.mock-llm.config.ts`,"test:e2e:mock-llm:docker":`playwright test --config=playwright.mock-llm-docker.config.ts`,"test:e2e:snapshots":`playwright test tests/e2e/snapshots --project=chromium --retries=0`,"test:e2e:snapshots:update":`playwright test tests/e2e/snapshots --project=chromium --update-snapshots`,"test:coverage":`npm run make-i18n && vitest run --coverage`,dev_wsl:`VITE_WATCH_USE_POLLING=true vite`,preview:`vite preview`,"make-i18n":`node scripts/make-i18n-translations.cjs`,prelint:`npm run make-i18n`,lint:`npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}`,"lint:fix":`eslint src --fix && prettier --write src/**/*.{ts,tsx}`,prepare:`husky`,typecheck:`react-router typegen && tsc`,"typecheck:staged":`react-router typegen && npx tsc --noEmit --skipLibCheck`,"check-translation-completeness":`node scripts/check-translation-completeness.cjs`,"build:app":`npm run make-i18n && react-router build`,"build:lib":`npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true VITE_APP_ENV=production vite build && tsc -p tsconfig.lib.json`,"build:docker":`node scripts/docker-build.mjs`},"lint-staged":{"src/**/*.{ts,tsx,js}":[`eslint --fix`,`prettier --write`],"src/**/*.{ts,tsx}":[`bash -c 'npm run typecheck:staged'`],"src/**/*":[`npm run check-translation-completeness`]},devDependencies:{"@eslint/eslintrc":`3.3.1`,"@eslint/js":`9.39.4`,"@mswjs/socket.io-binding":`0.2.0`,"@playwright/test":`1.59.1`,"@react-router/dev":`7.14.2`,"@tailwindcss/typography":`0.5.19`,"@tanstack/eslint-plugin-query":`5.100.9`,"@testing-library/dom":`10.4.1`,"@testing-library/jest-dom":`6.9.1`,"@testing-library/react":`16.3.2`,"@testing-library/user-event":`14.6.1`,"@types/mdast":`4.0.4`,"@types/node":`25.6.0`,"@types/react":`19.2.14`,"@types/react-dom":`19.2.3`,"@types/react-syntax-highlighter":`15.5.13`,"@typescript-eslint/eslint-plugin":`8.59.2`,"@typescript-eslint/parser":`8.59.2`,"@vercel/react-router":`1.3.0`,"@vitest/coverage-v8":`4.1.5`,"cross-env":`10.1.0`,eslint:`9.39.4`,"eslint-config-prettier":`10.1.8`,"eslint-import-resolver-typescript":`4.4.4`,"eslint-plugin-i18next":`6.1.4`,"eslint-plugin-import-x":`4.16.2`,"eslint-plugin-jsx-a11y":`6.10.2`,"eslint-plugin-prettier":`5.5.5`,"eslint-plugin-react":`7.37.5`,"eslint-plugin-react-hooks":`7.1.1`,"eslint-plugin-unused-imports":`4.4.1`,globals:`16.5.0`,husky:`9.1.7`,jsdom:`29.1.1`,"lint-staged":`16.4.0`,msw:`2.14.2`,"postcss-prefix-selector":`2.1.1`,prettier:`3.8.3`,tailwindcss:`4.2.4`,typescript:`6.0.3`,"vite-plugin-svgr":`5.2.0`,vitest:`4.1.5`},packageManager:`npm@10.5.0`,volta:{node:`22.12.0`},msw:{workerDirectory:[`public`]},overrides:{dompurify:`3.3.2`},main:`./dist/index.cjs`,module:`./dist/index.js`,types:`./dist/index.d.ts`,files:[`dist`,`bin`,`build`,`config`,`scripts`,`tools`],exports:{".":{types:`./dist/index.d.ts`,import:`./dist/index.js`,require:`./dist/index.cjs`},"./browser":{types:`./dist/components/browser/index.d.ts`,import:`./dist/components/browser/index.js`,require:`./dist/components/browser/index.cjs`},"./conversation":{types:`./dist/components/conversation/index.d.ts`,import:`./dist/components/conversation/index.js`,require:`./dist/components/conversation/index.cjs`},"./files":{types:`./dist/components/files/index.d.ts`,import:`./dist/components/files/index.js`,require:`./dist/components/files/index.cjs`},"./settings":{types:`./dist/components/settings/index.d.ts`,import:`./dist/components/settings/index.js`,require:`./dist/components/settings/index.cjs`},"./sidebar":{types:`./dist/components/sidebar/index.d.ts`,import:`./dist/components/sidebar/index.js`,require:`./dist/components/sidebar/index.cjs`},"./terminal":{types:`./dist/components/terminal/index.d.ts`,import:`./dist/components/terminal/index.js`,require:`./dist/components/terminal/index.cjs`},"./i18n":{types:`./dist/i18n/index.d.ts`,import:`./dist/i18n/index.js`,require:`./dist/i18n/index.cjs`},"./package.json":`./package.json`},peerDependencies:{react:`19.2.5`,"react-dom":`19.2.5`,"react-router":`7.14.2`}},n=`openhands-telemetry-consent`,r=`openhands-telemetry-first-use`,i=`openhands-telemetry-session`,a=`phc_kBtz5nKmxVRRQ7HtPwr2QX9eMC5j65zE86QKocVNwb4U`,o=`https://z.openhands.dev`,s=`https://us.posthog.com`,c=!1,l=null;function u(){return typeof window<`u`&&typeof localStorage<`u`}async function d(){if(!u())return null;if(l)return l;try{let{default:t}=await e(async()=>{let{default:e}=await import(`./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-BPuuVEqr.js`).then(e=>e.n);return{default:e}},__vite__mapDeps([0,1]));return l=t,t}catch{return null}}function f(){return typeof process<`u`&&{}?.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`)}async function p(e=!1){if(c)return l;let n=await d();return n?(n.init(a,{api_host:o,ui_host:s,opt_out_capturing_by_default:!e,capture_pageview:!1,autocapture:!1,persistence:`localStorage`,disable_session_recording:!0,loaded:e=>{e.register({package_name:t.name,package_version:t.version})}}),c=!0,n):null}function m(){if(!u())return`pending`;if(f())return`denied`;try{let e=localStorage.getItem(n);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}async function h(e){if(u())try{localStorage.setItem(n,e);let t=await p();if(!t)return;e===`granted`?t.opt_in_capturing():t.opt_out_capturing()}catch{}}function g(){return m()===`granted`}function _(){if(!u())return!1;try{return localStorage.getItem(r)===`true`}catch{return!1}}function v(){if(u())try{localStorage.setItem(r,`true`)}catch{}}async function y(){if(f()||_())return;let e=await p(!0);e&&((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}),v(),m()!==`granted`&&e.opt_out_capturing())}function b(){if(!u())return!1;try{return sessionStorage.getItem(i)===`true`}catch{return!1}}function x(){if(u())try{sessionStorage.setItem(i,`true`)}catch{}}async function S(){if(!g()||b())return;let e=await p();e&&(e.capture(`canvas_new_session`,{is_first_use:!_()}),x())}async function C(e,t={}){if(!g())return;let n=await p();n&&n.capture(e,t)}async function w(){if(u())try{localStorage.removeItem(n),localStorage.removeItem(r),sessionStorage.removeItem(i),c&&l&&l.reset()}catch{}}export{y as a,C as i,m as n,S as o,h as r,w as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{g as t}from"./agent-server-client-options-9agOSarV.js";import{n}from"./active-backend-context-I2w666XY.js";import{t as r}from"./settings-service.api-DxIEtvx6.js";import{t as i}from"./use-is-authed-hHndEep7.js";var a=(a,o)=>{let{data:s}=i(),{backend:c,orgId:l}=n(),u=!t(c),{data:d,error:f,isLoading:p,isFetching:m}=e({queryKey:[`settings-schema`,a,c.id,l,c.kind,c.host,c.apiKey],queryFn:a===`conversation`?r.getConversationSettingsSchema:r.getSettingsSchema,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,enabled:!o&&!!s&&u,meta:{disableToast:!0}});return o?{data:o,error:null,isLoading:!1,isFetching:!1}:{data:d,error:f,isLoading:p,isFetching:m}},o=e=>a(`agent`,e),s=e=>a(`conversation`,e);export{s as n,o as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{r as t,t as n}from"./agent-server-compatibility-B7QStIcH.js";import{t as r}from"./option-service.api-CGNANEcT.js";import{i,t as a}from"./query-keys-tAsQcc_9.js";var o=o=>e({queryKey:i.WEB_CLIENT_CONFIG,queryFn:r.getConfig,retry:(e,r)=>!t(r)&&!n(r)&&e<3,meta:{disableToast:!0},...a,enabled:o?.enabled});export{o as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./useMutation-DDo48A8t.js";import{n as t}from"./QueryClientProvider-w1cZWY41.js";import{t as n}from"./agent-server-conversation-service.api-Cagoqq1V.js";import{t as r}from"./use-tracking-DQYdZpxi.js";var i=()=>{let i=t(),{trackConversationCreated:a}=r();return e({mutationKey:[`create-conversation`],mutationFn:async e=>{let{query:t,conversationInstructions:r,plugins:i,repository:a,workingDir:o,parentConversationId:s,agentType:c}=e,l=await n.createConversation(t,r,i,a?{selected_repository:a.name,selected_branch:a.branch??null,git_provider:a.gitProvider}:null,o,s,c);return{conversation_id:l.app_conversation_id?l.app_conversation_id:`task-${l.id}`,session_api_key:null,url:l.agent_server_url,task_id:l.id}},onSuccess:async(e,{repository:t})=>{a({hasRepository:!!t}),i.invalidateQueries({queryKey:[`user`,`conversations`]}),i.invalidateQueries({queryKey:[`start-tasks`]})}})};export{i as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./react-Dy05vyj5.js";function t(e){return typeof e==`object`&&!!e&&`id`in e&&`timestamp`in e&&`source`in e&&typeof e.id==`string`&&e.id.length>0&&typeof e.timestamp==`string`&&e.timestamp.length>0&&typeof e.source==`string`&&(e.source===`agent`||e.source===`user`||e.source===`environment`||e.source===`hook`)}var n=e=>e.source===`environment`&&`action_id`in e&&`observation`in e&&e.observation!==null&&typeof e.observation==`object`&&`kind`in e.observation,r=e=>e.source===`agent`&&`tool_name`in e&&`tool_call_id`in e&&`error`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`&&typeof e.error==`string`,i=e=>`llm_message`in e&&typeof e.llm_message==`object`&&e.llm_message!==null&&`role`in e.llm_message&&`content`in e.llm_message,a=e=>i(e)&&e.llm_message.role===`user`,o=e=>e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&`tool_name`in e&&`tool_call_id`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`,s=e=>o(e)&&(e.action.kind===`ExecuteBashAction`||e.action.kind===`TerminalAction`),c=e=>n(e)&&(e.observation.kind===`ExecuteBashObservation`||e.observation.kind===`TerminalObservation`),l=e=>n(e)&&e.observation.kind===`PlanningFileEditorObservation`,u=e=>n(e)&&e.observation.kind===`BrowserObservation`,d=e=>n(e)&&e.observation.kind===`SwitchLLMObservation`,f=e=>o(e)&&e.action.kind===`BrowserNavigateAction`,p=e=>o(e)&&e.tool_name===`canvas_ui`,m=e=>e.source===`agent`&&`system_prompt`in e&&`tools`in e&&typeof e.system_prompt==`object`&&Array.isArray(e.tools),h=e=>`kind`in e&&e.kind===`ConversationStateUpdateEvent`,g=e=>e.key===`full_state`,_=e=>e.key===`execution_status`,v=e=>e.key===`stats`,y=e=>`kind`in e&&e.kind===`ConversationErrorEvent`,b=e=>`kind`in e&&e.kind===`ServerErrorEvent`,x=e=>y(e)||b(e),S=e=>`kind`in e&&e.kind===`HookExecutionEvent`,C=e=>`kind`in e&&e.kind===`ACPToolCallEvent`;function w(e){return t(e)}var T=(e,t)=>{let r=[...t];if(C(e)){let t=r.findIndex(t=>C(t)&&t.tool_call_id===e.tool_call_id);return t===-1?r.push(e):r[t]=e,r}if(n(e)){if(e.observation.kind===`ThinkObservation`||e.observation.kind===`FinishObservation`)return r;let t=r.findIndex(t=>t.id===e.action_id);t===-1?r.push(e):r[t]=e}else r.push(e);return r},E=e=>`id`in e?e.id:void 0,D=e=>`timestamp`in e?e.timestamp:void 0,O=(e,t)=>{let n=D(e),r=D(t);return!n&&!r?0:n?r?n.localeCompare(r):-1:1},k=(e,t)=>{if(e.length===0)return!1;let n=e[e.length-1],r=D(n),i=D(t);return!r||!i?!1:i<r},A=(e,t)=>{let n=E(t);if(n!==void 0&&e.eventIds.has(n))return e;let r=n===void 0?e.eventIds:new Set(e.eventIds).add(n);return{...e,events:[...e.events,t],eventIds:r,uiEvents:T(t,e.uiEvents)}},j=e=>({...e,events:[...e.events].sort(O),uiEvents:[...e.uiEvents].sort(O)}),M=(e,t)=>{let n=A(e,t);return n===e?e:!k(e.events,t)&&!k(e.uiEvents,t)?n:j(n)},N=e()(e=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:null,addEvent:t=>e(e=>M(e,t)),addEvents:t=>e(e=>{if(t.length===0)return e;let n=new Set(e.eventIds),r=[...e.events],i=[...e.uiEvents],a=!1;for(let e of t){let t=E(e);t!==void 0&&n.has(t)||(a=!0,t!==void 0&&n.add(t),r.push(e),i=T(e,i))}return a?j({...e,events:r,eventIds:n,uiEvents:i}):e}),clearEvents:()=>e(()=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:null})),clearEventsForConversation:t=>e(()=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:t}))}));export{a as C,m as S,i as _,r as a,v as b,f as c,h as d,x as f,S as g,g as h,o as i,u as l,c as m,T as n,w as o,s as p,C as r,_ as s,N as t,p as u,n as v,d as x,l as y};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{t as r}from"./useMutation-DDo48A8t.js";import{n as i}from"./active-backend-context-I2w666XY.js";import{t as a}from"./secrets-service-DVtlLWY8.js";var o=()=>r({mutationFn:({name:e,value:t,description:n})=>a.createSecret(e,t,n)}),s=e(t(),1),c=(e={})=>{let{nameContains:t,enabled:r=!0}=e,o=i(),c=n({queryKey:[`secrets`,o.backend.id,o.orgId],queryFn:a.getSecrets,enabled:r,staleTime:1e3*60*5,gcTime:1e3*60*15});return{data:(0,s.useMemo)(()=>{if(!c.data)return[];if(!t)return c.data;let e=t.toLowerCase();return c.data.filter(t=>t.name.toLowerCase().includes(e))},[c.data,t]),isLoading:c.isLoading,isError:c.isError,hasNextPage:!1,isFetchingNextPage:!1,fetchNextPage:()=>{},onLoadMore:()=>{},refetch:c.refetch}};export{o as n,c as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./declaration-DaUdB2Wg.js";import{t as r}from"./useTranslation-CEcjrme-.js";import{r as i}from"./custom-toast-handlers-BohXx7uh.js";import{a,r as o}from"./conversation-local-storage-YmOVXxxW.js";import{t as s}from"./conversation-store-CC-isCnP.js";import{t as c}from"./use-create-conversation-BEzddjXn.js";import{t as l}from"./use-active-conversation-q1wT8LI5.js";var u=e(t(),1),d=()=>{let{t:e}=r(`openhands`),{setConversationMode:t,setSubConversationTaskId:d,subConversationTaskId:f}=s(),{data:p}=l(),{mutate:m,isPending:h}=c();return(0,u.useEffect)(()=>{if(!p?.id)return;let e=o(p.id);e.subConversationTaskId&&!f&&d(e.subConversationTaskId)},[p?.id,f,d]),{handlePlanClick:(0,u.useCallback)(r=>{r?.preventDefault(),r?.stopPropagation(),t(`plan`),!(p?.sub_conversation_ids&&p.sub_conversation_ids.length>0||!p?.id||f)&&m({parentConversationId:p.id,agentType:`plan`},{onSuccess:t=>{i(e(n.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED)),t.task_id&&(d(t.task_id),a(p.id,{subConversationTaskId:t.task_id}))}})},[p,m,t,d,f,e]),isCreatingConversation:h}};export{d as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.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{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{o as r}from"./declaration-DaUdB2Wg.js";import{t as i}from"./utils-CdgBzLA7.js";import{n as a}from"./agent-server-client-options-9agOSarV.js";import{n as o}from"./active-backend-context-I2w666XY.js";import{t as s}from"./profiles-client-BrqNmaDV.js";import{n as c,t as l}from"./query-keys-tAsQcc_9.js";import{g as u,l as d}from"./brand-button-LBFNic99.js";import{c as f,u as p}from"./dropdown-classes-Vqz86I0R.js";var m=r();function h({icon:e,text:t,className:n}){return(0,m.jsxs)(`div`,{className:i(`flex min-w-0 w-full items-center`,f,n),children:[(0,m.jsx)(`span`,{className:p,"aria-hidden":!0,children:e}),(0,m.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t})]})}var g=e(t()),_=e=>(0,m.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,m.jsx)(`path`,{d:`M7 4C7 2.89543 7.89543 2 9 2H15C16.1046 2 17 2.89543 17 4V6H18.9897C18.9959 5.99994 19.0021 5.99994 19.0083 6H21C21.5523 6 22 6.44772 22 7C22 7.55228 21.5523 8 21 8H19.9311L19.0638 20.1425C18.989 21.1891 18.1182 22 17.0689 22H6.93112C5.88184 22 5.01096 21.1891 4.9362 20.1425L4.06888 8H3C2.44772 8 2 7.55228 2 7C2 6.44772 2.44772 6 3 6H4.99174C4.99795 5.99994 5.00414 5.99994 5.01032 6H7V4ZM9 6H15V4H9V6ZM6.07398 8L6.93112 20H17.0689L17.926 8H6.07398ZM10 10C10.5523 10 11 10.4477 11 11V17C11 17.5523 10.5523 18 10 18C9.44772 18 9 17.5523 9 17V11C9 10.4477 9.44772 10 10 10ZM14 10C14.5523 10 15 10.4477 15 11V17C15 17.5523 14.5523 18 14 18C13.4477 18 13 17.5523 13 17V11C13 10.4477 13.4477 10 14 10Z`,fill:`currentColor`})}),v=e=>(0,m.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,m.jsx)(`path`,{d:`M14.25 19.5C14.25 20.7426 13.2426 21.75 12 21.75C10.7574 21.75 9.75 20.7426 9.75 19.5C9.75 18.2574 10.7574 17.25 12 17.25C13.2426 17.25 14.25 18.2574 14.25 19.5ZM14.25 12C14.25 13.2426 13.2426 14.25 12 14.25C10.7574 14.25 9.75 13.2426 9.75 12C9.75 10.7574 10.7574 9.75 12 9.75C13.2426 9.75 14.25 10.7574 14.25 12ZM14.25 4.5C14.25 5.74264 13.2426 6.75 12 6.75C10.7574 6.75 9.75 5.74264 9.75 4.5C9.75 3.25736 10.7574 2.25 12 2.25C13.2426 2.25 14.25 3.25736 14.25 4.5Z`,fill:`currentColor`})}),y=g.forwardRef(function({onClick:e,className:t,iconClassName:n,ariaLabel:r,testId:a=`ellipsis-button`},o){return(0,m.jsx)(`button`,{ref:o,"data-testid":a,type:`button`,onClick:e,"aria-label":r,className:i(`p-1 rounded-md cursor-pointer`,u,`text-[var(--oh-muted)]`,d,`flex items-center justify-center`,t),children:(0,m.jsx)(v,{className:n??`w-4 h-4`})})}),b=class{static async listProfiles(){return new s(a()).listProfiles()}static async getProfile(e,t){let n=t?{exposeSecrets:t}:{};return new s(a()).getProfile(e,n)}static async saveProfile(e,t){return new s(a()).saveProfile(e,t)}static async deleteProfile(e){return new s(a()).deleteProfile(e)}static async renameProfile(e,t){return new s(a()).renameProfile(e,t)}static async activateProfile(e){return new s(a()).activateProfile(e)}};function x(e={}){let{backend:t,orgId:r}=o();return n({queryKey:[...c.all,t.id,r],queryFn:b.listProfiles,...l,enabled:e.enabled??!0,meta:{disableToast:!0}})}export{_ as a,v as i,b as n,h as o,y as r,x as t};
@@ -1 +0,0 @@
1
- import{C as e,w as t,y as n}from"./utils-CdgBzLA7.js";import{t as r}from"./use-active-conversation-q1wT8LI5.js";import{t as i}from"./use-agent-state-CCHlVqvY.js";var a=({allowAgentError:a=!1}={})=>{let{data:o}=r(),{curAgentState:s}=i(),c=a?t:e;return n(o?.execution_status)&&!c.includes(s)};export{a as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{g as t}from"./agent-server-client-options-9agOSarV.js";import{n}from"./active-backend-context-I2w666XY.js";import{a as r}from"./query-keys-tAsQcc_9.js";import{r as i}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-Fa-nXZ4M.js";import{t as a}from"./settings-DGY6n4J2.js";import{t as o}from"./settings-service.api-DxIEtvx6.js";var s=(...e)=>e.find(e=>typeof e==`boolean`),c=(...e)=>e.find(e=>typeof e==`number`),l=(...e)=>{for(let t of e){if(typeof t==`string`)return t;if(t===null)return null}},u={sse_servers:[],stdio_servers:[],shttp_servers:[]};function d(e){if(!e||typeof e!=`object`)return{...u};let t=e;if(!(`mcpServers`in t)||!t.mcpServers||typeof t.mcpServers!=`object`)return{...u};let n=[],r=[],i=[],a=t.mcpServers;for(let[e,t]of Object.entries(a)){if(!t||typeof t!=`object`)continue;let a=t.url;if(a){let e=t.transport,r=t.auth,o=typeof r==`string`&&r!==`oauth`?r:void 0;if(e===`sse`){let e={url:a};o&&(e.api_key=o),n.push(e)}else{let e={url:a};o&&(e.api_key=o),t.timeout!=null&&(e.timeout=t.timeout),i.push(e)}}else{let n={name:e,command:t.command};t.args&&(n.args=t.args),t.env&&(n.env=t.env),r.push(n)}}return{sse_servers:n,stdio_servers:r,shttp_servers:i}}function f(e){let t={},n=e=>{if(!(e in t))return e;let n=1;for(;`${e}_${n}`in t;)n+=1;return`${e}_${n}`};for(let r of e.sse_servers){let e={};typeof r==`string`?e.url=r:(e.url=r.url,r.api_key&&(e.auth=r.api_key)),e.transport=`sse`,t[n(`sse`)]=e}for(let r of e.shttp_servers){let e={};typeof r==`string`?e.url=r:(e.url=r.url,r.api_key&&(e.auth=r.api_key),r.timeout!=null&&(e.timeout=r.timeout)),t[n(`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?{mcpServers:t}:null}var p=e=>{if(typeof e==`object`&&e&&`status`in e){let{status:t}=e;if(typeof t==`number`)return t}if(i.isAxiosError(e))return e.response?.status},m=(e,t)=>{let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r},h=(e,t,n,r=!1)=>{let i=m(e,t);return typeof i==`string`&&(i.length>0||r)?i:n},g=e=>{let t=e.agent_settings??{},n={...a.conversation_settings??{},...e.conversation_settings??{}};return{...a,...e,llm_model:h(t,`llm.model`,a.llm_model),llm_base_url:h(t,`llm.base_url`,a.llm_base_url,!0),agent:h(t,`agent`,a.agent),llm_api_key:e.llm_api_key??null,llm_api_key_set:e.llm_api_key_set??!1,confirmation_mode:s(n.confirmation_mode)??a.confirmation_mode,security_analyzer:l(n.security_analyzer)??a.security_analyzer,max_iterations:c(n.max_iterations)??a.max_iterations,enable_default_condenser:s(m(t,`condenser.enabled`))??a.enable_default_condenser,condenser_max_size:c(m(t,`condenser.max_size`))??a.condenser_max_size,mcp_config:d(e.mcp_config??t.mcp_config),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}},_=async(e=`personal`)=>{if(e!==`personal`)throw Error(`Unsupported settings scope: ${e}`);return g(await o.getSettings())},v=(i=`personal`)=>{let o=n(),s=!t(o.backend),c=e({queryKey:[...r.byScope(i),o.backend.id,o.orgId],queryFn:()=>_(i),retry:(e,t)=>p(t)!==404,enabled:s,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,meta:{disableToast:!0}});return s?p(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{f as a,d as i,_ as n,v as r,p as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{D as t,d as n,n as r}from"./agent-server-client-options-9agOSarV.js";import{c as i}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-D8soyAAx.js";import{t as a}from"./proxy-sRh0WKI7.js";var o=100;function s(){let e=n().backend;if(e.kind!==`cloud`)throw Error(`Cloud skills call requires a cloud backend.`);return e}async function c(){let e=s(),t=[],n=null;do{let r=new URLSearchParams({limit:String(o)});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}var l=class{static async getSkills(e){return n().backend.kind===`cloud`?c():(await new i(r()).getSkills({load_public:!0,load_user:!0,load_project:!0,load_org:!1,project_dir:e??t()})).skills??[]}},u=t=>e({queryKey:[`skills`,t??null],queryFn:()=>l.getSkills(t),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{u as t};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{t}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{o as n,t as r}from"./declaration-DaUdB2Wg.js";import{t as i}from"./useTranslation-CEcjrme-.js";import{d as a}from"./agent-server-client-options-9agOSarV.js";import{n as o}from"./active-backend-context-I2w666XY.js";import{t as s}from"./agent-server-conversation-service.api-Cagoqq1V.js";import{t as c}from"./proxy-sRh0WKI7.js";import{t as l}from"./vscode-url-helper-BMq8JBhB.js";import{t as u}from"./conversation-service.api-B_Pdmwsa.js";import{n as d,t as f}from"./use-active-conversation-q1wT8LI5.js";import{t as p}from"./use-runtime-is-ready-DBWzvAmc.js";e();var m=n(),h=e=>(0,m.jsxs)(`svg`,{viewBox:`0 0 20 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,m.jsx)(`path`,{d:`M12.5063 0.946289L11.4948 2.05386L16.8906 6.98209L11.4928 11.9481L12.5083 13.052L19.1105 6.97807L12.5063 0.946289Z`,fill:`currentColor`}),(0,m.jsx)(`path`,{d:`M7.49476 13.0539L8.50634 11.9463L3.11047 7.01806L8.50834 2.05202L7.49275 0.948125L0.890625 7.02208L7.49476 13.0539Z`,fill:`currentColor`})]});function g(){let e=a().backend;if(e.kind!==`cloud`)throw Error(`Cloud sandboxes call requires a cloud backend.`);return e}async function _(e){if(e.length===0)return[];let t=g(),n=new URLSearchParams;for(let t of e)n.append(`id`,t);return await c({backend:t,method:`GET`,path:`/api/v1/sandboxes?${n.toString()}`})??[]}var v=e=>{let n=o(),r=n.backend.kind===`cloud`;return t({queryKey:[`cloud`,`sandbox`,n.backend.id,n.orgId,e],queryFn:async()=>{if(!e)return null;let[t]=await _([e]);return t??null},enabled:r&&!!e,staleTime:1e3*60*5,gcTime:1e3*60*15})},y=`VSCODE`,b=()=>{let{t:e}=i(`openhands`),{conversationId:n}=d(),a=p({allowAgentError:!0}),{data:c}=f(),m=o(),h=c?.conversation_url??null,g=c?.session_api_key??null,_=c?.sandbox_id??null,b=m.backend.kind===`cloud`,x=v(b?_:null),S=t({queryKey:[`unified`,`vscode_url`,`local`,n,h,g],queryFn:async()=>{if(!n)throw Error(`No conversation ID`);return{url:l((await s.getVSCodeUrl(n,h,g).catch(()=>u.getVSCodeUrl(n))).vscode_url)}},enabled:!b&&a&&!!n,refetchOnMount:!0,retry:3}),C,w,T,E,D,O,k;if(b){let e=x.data?.exposed_urls?.find(e=>e.name===y)?.url??null;C=x.isSuccess?{url:l(e)}:void 0,w=x.isLoading,T=x.isError,E=x.isSuccess,D=x.status,O=x.error,k=async()=>{let e=await x.refetch(),t=e.data?.exposed_urls?.find(e=>e.name===y)?.url??null;return{data:e.data?{url:l(t)}:void 0}}}else C=S.data,w=S.isLoading,T=S.isError,E=S.isSuccess,D=S.status,O=S.error,k=async()=>({data:(await S.refetch()).data});let A=C&&!C.url?e(r.VSCODE$URL_NOT_AVAILABLE):null;return{data:C?{...C,error:A}:void 0,error:O,isLoading:w,isError:T,isSuccess:E,status:D,refetch:k}};export{h as n,b as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js";import{n as r}from"./active-backend-context-I2w666XY.js";import{t as i}from"./agent-server-conversation-service.api-Cagoqq1V.js";var a=e(t(),1),o=1e3*60*5,s=1e3*60*15,c=(e,t)=>{let c=r(),l=(0,a.useRef)({cid:e,backendId:c.backend.id});l.current.cid!==e&&(l.current={cid:e,backendId:c.backend.id});let u=l.current.backendId!==c.backend.id;return n({queryKey:[`user`,`conversation`,e,c.backend.id,c.orgId],queryFn:async()=>e?(await i.batchGetAppConversations([e]))[0]??null:null,enabled:!!e&&!e.startsWith(`task-`)&&!u,retry:!1,refetchInterval:t,staleTime:o,gcTime:s})};export{c as t};