@openhands/agent-canvas 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (710) hide show
  1. package/README.md +11 -12
  2. package/README.windows.md +4 -2
  3. package/build/assets/{Trans-Ch-OVWEA.js → Trans-DqF_OEZB.js} +1 -1
  4. package/build/assets/{acp-providers-Sy2LKyMa.js → acp-providers-DerAmTyY.js} +1 -1
  5. package/build/assets/active-backend-context-B8rMv0X9.js +1 -0
  6. package/build/assets/{add-backend-modal-Bgy8anoR.js → add-backend-modal-CxC7BNEc.js} +1 -1
  7. package/build/assets/{agent-profiles-settings-3mmXljZX.js → agent-profiles-settings-BJb8YXR1.js} +1 -1
  8. package/build/assets/agent-server-compatibility-BWN-EIQn.js +1 -0
  9. package/build/assets/agent-server-conversation-service.api-DSPIkMwJ.js +41 -0
  10. package/build/assets/{agent-settings-B-W10B4E.js → agent-settings-CgCnqaAA.js} +2 -2
  11. package/build/assets/agent-settings-DDkSavD7.js +1 -0
  12. package/build/assets/{alert-banner-Bpf2NQJq.js → alert-banner-Dh51WURQ.js} +1 -1
  13. package/build/assets/api-key-entry-screen-iZc7n8AI.js +1 -0
  14. package/build/assets/app-settings-B5zyipxJ.js +1 -0
  15. package/build/assets/automation-detail-CZsu2CoM.js +2 -0
  16. package/build/assets/automation-export-BwRX6H32.js +2 -0
  17. package/build/assets/automations-list-lHAVzMoA.js +1 -0
  18. package/build/assets/{back-nav-button-CUS2mi-U.js → back-nav-button-DVknCcSP.js} +1 -1
  19. package/build/assets/backend-form-modal-RGcu909r.js +1 -0
  20. package/build/assets/{backend-synced-settings-badge-D9hZx05w.js → backend-synced-settings-badge-BSfN0AZA.js} +1 -1
  21. package/build/assets/{base-modal-BuF2f0YL.js → base-modal-CIF_785P.js} +1 -1
  22. package/build/assets/{bot-D7eUAuSB.js → bot-C-EA6685.js} +1 -1
  23. package/build/assets/{brand-button-vMVuyDXu.js → brand-button-B1izLAdR.js} +1 -1
  24. package/build/assets/{browser-BifzWIBd.js → browser-DKaeq_sT.js} +3 -3
  25. package/build/assets/{browser-tab-CkkqJnqw.js → browser-tab-qb_ftCxW.js} +1 -1
  26. package/build/assets/canvas-ui-COgjltGz.js +1 -0
  27. package/build/assets/{chat-send-button-B_jc5z5C.js → chat-send-button-BZHG2hAW.js} +1 -1
  28. package/build/assets/check-TbOEtHKj.js +1 -0
  29. package/build/assets/{chevron-down-CI8A6tet.js → chevron-down-D7IvFMBM.js} +1 -1
  30. package/build/assets/{circle-plus-check-toggle-C5YxjxvI.js → circle-plus-check-toggle-DoFIjVE0.js} +1 -1
  31. package/build/assets/client-source-BZK8vRs2.js +1 -0
  32. package/build/assets/cloud-funnel-analytics-Zcv57hfT.js +1 -0
  33. package/build/assets/{color-themes-DPBzNtVg.js → color-themes-CHizm1xF.js} +1 -1
  34. package/build/assets/{combobox-caret-DoObzqf4.js → combobox-caret-CxZpqoSR.js} +1 -1
  35. package/build/assets/{command-menu-D-JV3Wqm.js → command-menu-oTvKDU3Y.js} +1 -1
  36. package/build/assets/condenser-settings-BGlWn93P.js +1 -0
  37. package/build/assets/{confirmation-modal-BGLu6XJN.js → confirmation-modal-DGBWM2Ls.js} +1 -1
  38. package/build/assets/{context-menu-list-item-BD5_EaKN.js → context-menu-list-item-6psNyl7X.js} +1 -1
  39. package/build/assets/conversation-BoCYx8n2.js +89 -0
  40. package/build/assets/conversation-DgHqMjnY.js +1 -0
  41. package/build/assets/conversation-panel-78Rxh_-I.js +1 -0
  42. package/build/assets/conversation-service.api-_f9GlIEi.js +1 -0
  43. package/build/assets/{conversation-tab-empty-state-B2dDYEwf.js → conversation-tab-empty-state-CNUmIms2.js} +1 -1
  44. package/build/assets/{copy-3JCw_XFB.js → copy-D1YGjP-C.js} +1 -1
  45. package/build/assets/{copy-to-clipboard-button-CaR52OnA.js → copy-to-clipboard-button-CFzH_NOX.js} +1 -1
  46. package/build/assets/declaration-BGsHjPEW.js +1 -0
  47. package/build/assets/{device-verify-Dj6I4Iqe.js → device-verify-WBSjJBLH.js} +1 -1
  48. package/build/assets/{dropdown-classes-DJSXeLqc.js → dropdown-classes-D3wMJlXT.js} +1 -1
  49. package/build/assets/{ellipsis-button-C5Z-tPFp.js → ellipsis-button-CbNnHlIq.js} +1 -1
  50. package/build/assets/{entry.client-2_3ePAm0.js → entry.client-DNlPGxsu.js} +2 -2
  51. package/build/assets/{enum-filter-dropdown-DXbVwiNZ.js → enum-filter-dropdown-JLYv1t8L.js} +1 -1
  52. package/build/assets/{environment-switch-overlay-DZQfRGTx.js → environment-switch-overlay-B1PFO8P8.js} +1 -1
  53. package/build/assets/{extensions-hub-CLjmOGqS.js → extensions-hub-CCbLA7IM.js} +1 -1
  54. package/build/assets/{extensions-navigation-B5MeUiMq.js → extensions-navigation-CPNjMNvR.js} +1 -1
  55. package/build/assets/{external-link-D2zJjE9G.js → external-link-lhdITPqq.js} +1 -1
  56. package/build/assets/files-tab-y4K7EXBO.js +1 -0
  57. package/build/assets/{form-control-classes-ChpNBe9n.js → form-control-classes-CbdN5aO3.js} +1 -1
  58. package/build/assets/format-time-delta-DhDbkD7V.js +1 -0
  59. package/build/assets/git-provider-icon-ITvsH4Ko.js +1 -0
  60. package/build/assets/home-BwbeOWwU.js +1 -0
  61. package/build/assets/home-DKPGQ5P3.js +1 -0
  62. package/build/assets/index-home-Bko2Itv5.js +1 -0
  63. package/build/assets/install-server-modal-Qk1gwyI8.js +1 -0
  64. package/build/assets/{launch-V_3Rp7WS.js → launch-CAGavYl-.js} +1 -1
  65. package/build/assets/lesson-plan-DMCPdtrf.js +4 -0
  66. package/build/assets/{list-todo-BfH6yYUK.js → list-todo-CAtvkzcy.js} +1 -1
  67. package/build/assets/llm-not-configured-banner-C1ktyb3C.js +27 -0
  68. package/build/assets/llm-settings-BBsZFi9l.js +1 -0
  69. package/build/assets/llm-settings-DFkJQr_w.js +1 -0
  70. package/build/assets/llm-subscription-service-Casyzgn1.js +1 -0
  71. package/build/assets/loader-circle-CsAsfLIs.js +1 -0
  72. package/build/assets/{loading-spinner-BLdswi6q.js → loading-spinner-BcdnT0mN.js} +1 -1
  73. package/build/assets/manage-backends-modal-CKQ46rvw.js +1 -0
  74. package/build/assets/manifest-03478bbf.js +1 -0
  75. package/build/assets/{map-provider-BM2SJarp.js → map-provider-BbIb12oh.js} +1 -1
  76. package/build/assets/{markdown-renderer-DMT7Zkpd.js → markdown-renderer-B4V2OMFP.js} +1 -1
  77. package/build/assets/{mcp-BQufNPZ6.js → mcp-BapoJsDc.js} +2 -2
  78. package/build/assets/{messages-BnJCqnFf.js → messages-CUBFMY5o.js} +26 -26
  79. package/build/assets/{modal-body-DouOE5KH.js → modal-body-Cc2zp0xb.js} +1 -1
  80. package/build/assets/{modal-classes-Cf-4tbHz.js → modal-classes-3qT9Ap7Q.js} +1 -1
  81. package/build/assets/{modal-close-button-B6CfxxJj.js → modal-close-button-BcIBUdSq.js} +1 -1
  82. package/build/assets/model-selector-DJrMrFAr.js +1 -0
  83. package/build/assets/onboarding-6NMkdNxV.js +1 -0
  84. package/build/assets/onboarding-modal-Q4AnpIdg.js +1 -0
  85. package/build/assets/organization-service.api-vrRNwOma.js +1 -0
  86. package/build/assets/path-utils-PNfCKQDV.js +1 -0
  87. package/build/assets/{pencil-Dj2XjKmI.js → pencil-CWhApFIT.js} +1 -1
  88. package/build/assets/{plan-components-CcCBmCzW.js → plan-components-BdZXPyZU.js} +1 -1
  89. package/build/assets/{planner-tab-Dhyqcqmb.js → planner-tab-ByOw1he8.js} +1 -1
  90. package/build/assets/plugins-management-service-B75jyC56.js +1 -0
  91. package/build/assets/profiles-service.api-BQTklD5D.js +1 -0
  92. package/build/assets/providers-DfTB2gPd.js +1 -0
  93. package/build/assets/proxy-B3tCGf0X.js +1 -0
  94. package/build/assets/{recommended-automations-launcher-CTcGTl4d.js → recommended-automations-launcher-Bj7PuHY1.js} +1 -1
  95. package/build/assets/{refresh-cw-DM82EIyx.js → refresh-cw-B9B7-vsy.js} +1 -1
  96. package/build/assets/root-CDnuTToz.js +2 -0
  97. package/build/assets/root-CYWeTrWE.css +1 -0
  98. package/build/assets/root-layout-DfYVlcRG.js +2 -0
  99. package/build/assets/{runtime-waiting-state-BsXLElvN.js → runtime-waiting-state-CnyVhX4T.js} +1 -1
  100. package/build/assets/schema-field-CUwk4wrQ.js +1 -0
  101. package/build/assets/sdk-section-page-DLLNrYjI.js +1 -0
  102. package/build/assets/{sdk-settings-schema-Cv7M9eSe.js → sdk-settings-schema-CLR01YIK.js} +1 -1
  103. package/build/assets/search-dIQ09UY2.js +1 -0
  104. package/build/assets/secrets-service-CvyPWJhg.js +1 -0
  105. package/build/assets/{secrets-settings-Cx6yJlyb.js → secrets-settings-CHy72A5C.js} +1 -1
  106. package/build/assets/{segmented-toggle-DyQqPhoD.js → segmented-toggle-kzwZkLaj.js} +1 -1
  107. package/build/assets/settings-B9S8UVQr.js +1 -0
  108. package/build/assets/{settings-dropdown-input-BjunGXJb.js → settings-dropdown-input-Dhx9ErGd.js} +1 -1
  109. package/build/assets/{settings-index-D6sxWSRk.js → settings-index-BKDl2CQ-.js} +1 -1
  110. package/build/assets/{settings-input-bD6npsDm.js → settings-input-BsgQWS5R.js} +1 -1
  111. package/build/assets/{settings-list-classes-Dp_OgzN0.js → settings-list-classes-DSJJX99U.js} +1 -1
  112. package/build/assets/settings-modal-DeK11CyT.js +1 -0
  113. package/build/assets/settings-service.api-DXk5TdeJ.js +1 -0
  114. package/build/assets/{settings-switch-5cuxl8Dc.js → settings-switch-Bes8dIlV.js} +1 -1
  115. package/build/assets/{settings-utils-BMdG65By.js → settings-utils-DzCVfiR3.js} +1 -1
  116. package/build/assets/shared-conversation-9atDzTR4.js +1 -0
  117. package/build/assets/{sidebar-layout-DuzJMMw-.js → sidebar-layout-Bm7pa3Vk.js} +1 -1
  118. package/build/assets/{sidebar-mobile-menu-toggle-VvvX32iF.js → sidebar-mobile-menu-toggle-giMMZctn.js} +1 -1
  119. package/build/assets/{sidebar-nav-link-5AlTT5-j.js → sidebar-nav-link-CHqyFXwV.js} +1 -1
  120. package/build/assets/{sidebar-store-CZuE8AH5.js → sidebar-store-uiUXBU1N.js} +1 -1
  121. package/build/assets/{skill-card-pill-row-eTIkE4nz.js → skill-card-pill-row-BPYKQ3IN.js} +1 -1
  122. package/build/assets/skills-plugins-Tropusio.js +1 -0
  123. package/build/assets/{skills-settings-BUv04tSc.js → skills-settings-BvzBBCWk.js} +2 -2
  124. package/build/assets/{square-chevron-right-Czw3FFWc.js → square-chevron-right-DE-JN-2Z.js} +1 -1
  125. package/build/assets/{styled-tooltip-CgX2oRaK.js → styled-tooltip-B14i_Uac.js} +1 -1
  126. package/build/assets/{suspense-BO1Tl_Vf.js → suspense-DmZ3MSSh.js} +1 -1
  127. package/build/assets/{task-list-tab-0k9PhuqO.js → task-list-tab-DyfgG4MC.js} +1 -1
  128. package/build/assets/telemetry-C5JMEfqB.js +2 -0
  129. package/build/assets/{terminal-B61WrJdS.js → terminal-DRXt2Lr4.js} +1 -1
  130. package/build/assets/{toggle-switch-2j5wwR85.js → toggle-switch-DX_k418f.js} +1 -1
  131. package/build/assets/{trash-2-Be_7y3Mn.js → trash-2-BU6BlW4i.js} +1 -1
  132. package/build/assets/{typography-D8mHDeNG.js → typography-CzfoD9DY.js} +1 -1
  133. package/build/assets/use-acp-credential-form-Bm8qXdlc.js +1 -0
  134. package/build/assets/{use-activate-agent-profile-20v1xU0H.js → use-activate-agent-profile-DlykqEfN.js} +1 -1
  135. package/build/assets/{use-active-agent-profile-BkJN7Xsy.js → use-active-agent-profile-hI-x-UBa.js} +1 -1
  136. package/build/assets/{use-active-conversation-DOZVSVtU.js → use-active-conversation-2qeez40F.js} +1 -1
  137. package/build/assets/use-agent-profiles-0pr5bLS7.js +1 -0
  138. package/build/assets/{use-agent-state-DHZO1obC.js → use-agent-state-C6peDXUm.js} +1 -1
  139. package/build/assets/use-backends-health-CLHPitJM.js +1 -0
  140. package/build/assets/{use-can-manage-org-profiles-C-OhWVBS.js → use-can-manage-org-profiles-Ck_bsNbH.js} +1 -1
  141. package/build/assets/use-cloud-current-user-id-DUCSxNjY.js +1 -0
  142. package/build/assets/use-config-B5r8erYt.js +1 -0
  143. package/build/assets/use-create-conversation-r1JHfKO5.js +1 -0
  144. package/build/assets/{use-create-secret-D0HCOZFu.js → use-create-secret-Cf2N11d2.js} +1 -1
  145. package/build/assets/{use-event-store-DjgU4wfO.js → use-event-store-Bbaz51GR.js} +1 -1
  146. package/build/assets/{use-handle-plan-click-DyRASKMC.js → use-handle-plan-click-CsAW3FlH.js} +1 -1
  147. package/build/assets/use-is-authed-BezEyfeh.js +1 -0
  148. package/build/assets/use-llm-profiles-Dr5__SlZ.js +1 -0
  149. package/build/assets/use-plugins-marketplace-BplU65ae.js +1 -0
  150. package/build/assets/use-runtime-is-ready-vCFOcLFa.js +1 -0
  151. package/build/assets/use-save-agent-profile-RqUGqTv6.js +1 -0
  152. package/build/assets/use-save-settings-Chvzeu2s.js +1 -0
  153. package/build/assets/use-settings-CyxSlyTQ.js +1 -0
  154. package/build/assets/use-settings-nav-items-zEkSO_Bf.js +16 -0
  155. package/build/assets/use-skills-xrVoKYrF.js +1 -0
  156. package/build/assets/{use-task-list-AVBLbbcR.js → use-task-list-CfisapBW.js} +1 -1
  157. package/build/assets/use-tracking-D2Qg5Lpd.js +1 -0
  158. package/build/assets/{use-user-conversation-zpx7I18x.js → use-user-conversation-CnE4zhOA.js} +1 -1
  159. package/build/assets/{useMutation-DrCAVg5w.js → useMutation-u8UgRgDK.js} +1 -1
  160. package/build/assets/{useMutationState-D8QN0ZCy.js → useMutationState-OnAsCLA_.js} +1 -1
  161. package/build/assets/{useQueries-DClgUTc7.js → useQueries-BpIlT8Mt.js} +1 -1
  162. package/build/assets/{useQuery-CRBP8vIS.js → useQuery-D5pEZbY0.js} +1 -1
  163. package/build/assets/{useTranslation-CDRCKC9-.js → useTranslation-Cbf5AGg_.js} +1 -1
  164. package/build/assets/{utils-D3U3rlqr.js → utils-DB9LsAzA.js} +1 -1
  165. package/build/assets/{vendor~browser-tab-Di0kh5Zw.js → vendor~browser-tab-CsMb-pta.js} +1 -1
  166. package/build/assets/{vendor~browser-Cvg7jXCP.js → vendor~browser-wXQ-WZEC.js} +1 -1
  167. package/build/assets/{vendor~entry.client-9tWQ_Ugw.js → vendor~entry.client-DDuH4--y.js} +1 -1
  168. package/build/assets/{vendor~entry.client-D6BtSOtn.js → vendor~entry.client-DQGrNspu.js} +1 -1
  169. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js +2 -0
  170. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js +185 -0
  171. package/build/assets/{vendor~files-tab-B02k3xvx.js → vendor~files-tab-B-5fBohe.js} +1 -1
  172. package/build/assets/{vendor~home~conversation-panel~conversation-CYMF9JYB.js → vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js} +1 -1
  173. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js +2 -0
  174. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD0GaRGa.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js} +1 -1
  175. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-D7EUmQ8Y.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js} +1 -1
  176. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-d8aETPbZ.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js} +1 -1
  177. package/build/assets/{vendor~launch-CHXA9cJu.js → vendor~launch-_Km3J77E.js} +1 -1
  178. package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~ivvrgjsa-BlIZPCXX.js → vendor~module-D5a_AClf.js} +1 -1
  179. package/build/assets/{vendor~root-layout~conversation-panel~conversation-CpiTHpHl.js → vendor~root-layout~conversation-panel~conversation-8tIsyrPj.js} +1 -1
  180. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-_TdZcNMD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js} +1 -1
  181. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-Cn2jwSga.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js} +1 -1
  182. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CZM4hwUT.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js} +1 -1
  183. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~enjl5xdm-B0EIDu4M.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js} +2 -2
  184. package/build/assets/{verification-settings-D576N2xa.js → verification-settings-CfkrXoSa.js} +1 -1
  185. package/build/assets/x-ZE4iplpF.js +1 -0
  186. package/build/index.html +4 -4
  187. package/build/locales/ar/openhands.json +9 -0
  188. package/build/locales/ca/openhands.json +9 -0
  189. package/build/locales/de/openhands.json +9 -0
  190. package/build/locales/en/openhands.json +9 -0
  191. package/build/locales/es/openhands.json +9 -0
  192. package/build/locales/fr/openhands.json +9 -0
  193. package/build/locales/it/openhands.json +9 -0
  194. package/build/locales/ja/openhands.json +9 -0
  195. package/build/locales/ko-KR/openhands.json +9 -0
  196. package/build/locales/no/openhands.json +9 -0
  197. package/build/locales/pt/openhands.json +9 -0
  198. package/build/locales/tr/openhands.json +9 -0
  199. package/build/locales/uk/openhands.json +9 -0
  200. package/build/locales/zh-CN/openhands.json +9 -0
  201. package/build/locales/zh-TW/openhands.json +9 -0
  202. package/config/defaults.json +5 -4
  203. package/dist/api/agent-server-adapter.cjs +3 -3
  204. package/dist/api/agent-server-adapter.cjs.map +1 -1
  205. package/dist/api/agent-server-adapter.d.ts +9 -1
  206. package/dist/api/agent-server-adapter.js +105 -102
  207. package/dist/api/agent-server-adapter.js.map +1 -1
  208. package/dist/api/agent-server-config.cjs +1 -1
  209. package/dist/api/agent-server-config.cjs.map +1 -1
  210. package/dist/api/agent-server-config.d.ts +3 -0
  211. package/dist/api/agent-server-config.js +45 -23
  212. package/dist/api/agent-server-config.js.map +1 -1
  213. package/dist/api/backend-registry/auth.cjs +1 -1
  214. package/dist/api/backend-registry/auth.cjs.map +1 -1
  215. package/dist/api/backend-registry/auth.js +1 -1
  216. package/dist/api/backend-registry/auth.js.map +1 -1
  217. package/dist/api/backend-registry/default-backend.cjs +1 -1
  218. package/dist/api/backend-registry/default-backend.cjs.map +1 -1
  219. package/dist/api/backend-registry/default-backend.d.ts +3 -0
  220. package/dist/api/backend-registry/default-backend.js +22 -10
  221. package/dist/api/backend-registry/default-backend.js.map +1 -1
  222. package/dist/api/backend-registry/storage.cjs +1 -1
  223. package/dist/api/backend-registry/storage.cjs.map +1 -1
  224. package/dist/api/backend-registry/storage.js +38 -33
  225. package/dist/api/backend-registry/storage.js.map +1 -1
  226. package/dist/api/backend-registry/types.d.ts +2 -0
  227. package/dist/api/canvas-ui-client-tool.cjs +38 -0
  228. package/dist/api/canvas-ui-client-tool.cjs.map +1 -0
  229. package/dist/api/canvas-ui-client-tool.d.ts +14 -0
  230. package/dist/api/canvas-ui-client-tool.js +47 -0
  231. package/dist/api/canvas-ui-client-tool.js.map +1 -0
  232. package/dist/api/client-source.cjs +2 -0
  233. package/dist/api/client-source.cjs.map +1 -0
  234. package/dist/api/client-source.d.ts +9 -0
  235. package/dist/api/client-source.js +10 -0
  236. package/dist/api/client-source.js.map +1 -0
  237. package/dist/api/cloud/client.cjs +2 -0
  238. package/dist/api/cloud/client.cjs.map +1 -0
  239. package/dist/api/cloud/client.d.ts +4 -0
  240. package/dist/api/cloud/client.js +38 -0
  241. package/dist/api/cloud/client.js.map +1 -0
  242. package/dist/api/cloud/conversation-service.api.cjs +1 -1
  243. package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
  244. package/dist/api/cloud/conversation-service.api.js +35 -33
  245. package/dist/api/cloud/conversation-service.api.js.map +1 -1
  246. package/dist/api/cloud/organization-service.api.cjs +1 -1
  247. package/dist/api/cloud/organization-service.api.cjs.map +1 -1
  248. package/dist/api/cloud/organization-service.api.js +11 -10
  249. package/dist/api/cloud/organization-service.api.js.map +1 -1
  250. package/dist/api/cloud/proxy.cjs +1 -1
  251. package/dist/api/cloud/proxy.cjs.map +1 -1
  252. package/dist/api/cloud/proxy.d.ts +2 -40
  253. package/dist/api/cloud/proxy.js +14 -39
  254. package/dist/api/cloud/proxy.js.map +1 -1
  255. package/dist/api/conversation-metadata-store.cjs +1 -1
  256. package/dist/api/conversation-metadata-store.cjs.map +1 -1
  257. package/dist/api/conversation-metadata-store.d.ts +2 -9
  258. package/dist/api/conversation-metadata-store.js +13 -9
  259. package/dist/api/conversation-metadata-store.js.map +1 -1
  260. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  261. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  262. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +2 -1
  263. package/dist/api/conversation-service/agent-server-conversation-service.api.js +98 -88
  264. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  265. package/dist/api/conversation-service/agent-server-conversation-service.types.d.ts +5 -0
  266. package/dist/api/device-flow-client.cjs +1 -1
  267. package/dist/api/device-flow-client.cjs.map +1 -1
  268. package/dist/api/device-flow-client.d.ts +4 -58
  269. package/dist/api/device-flow-client.js +8 -98
  270. package/dist/api/device-flow-client.js.map +1 -1
  271. package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
  272. package/dist/api/git-service/agent-server-git-service.api.cjs.map +1 -1
  273. package/dist/api/git-service/agent-server-git-service.api.d.ts +10 -2
  274. package/dist/api/git-service/agent-server-git-service.api.js +107 -40
  275. package/dist/api/git-service/agent-server-git-service.api.js.map +1 -1
  276. package/dist/api/open-hands.types.d.ts +11 -0
  277. package/dist/api/option-service/option-service.api.cjs +1 -1
  278. package/dist/api/option-service/option-service.api.cjs.map +1 -1
  279. package/dist/api/option-service/option-service.api.js +0 -1
  280. package/dist/api/option-service/option-service.api.js.map +1 -1
  281. package/dist/api/option-service/option.types.d.ts +0 -1
  282. package/dist/api/secrets-service.cjs +1 -1
  283. package/dist/api/secrets-service.cjs.map +1 -1
  284. package/dist/api/secrets-service.js +15 -14
  285. package/dist/api/secrets-service.js.map +1 -1
  286. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
  287. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
  288. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +73 -64
  289. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
  290. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.cjs +2 -2
  291. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.cjs.map +1 -1
  292. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.js +2 -0
  293. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.js.map +1 -1
  294. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  295. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  296. package/dist/components/features/backends/backend-form-modal.d.ts +4 -2
  297. package/dist/components/features/backends/backend-form-modal.js +108 -101
  298. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  299. package/dist/components/features/backends/backend-row.cjs +1 -1
  300. package/dist/components/features/backends/backend-row.cjs.map +1 -1
  301. package/dist/components/features/backends/backend-row.js +2 -1
  302. package/dist/components/features/backends/backend-row.js.map +1 -1
  303. package/dist/components/features/backends/backend-selector.cjs +1 -1
  304. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  305. package/dist/components/features/backends/backend-selector.js +51 -51
  306. package/dist/components/features/backends/backend-selector.js.map +1 -1
  307. package/dist/components/features/backends/device-flow-auth.cjs +1 -1
  308. package/dist/components/features/backends/device-flow-auth.cjs.map +1 -1
  309. package/dist/components/features/backends/device-flow-auth.d.ts +4 -1
  310. package/dist/components/features/backends/device-flow-auth.js +38 -38
  311. package/dist/components/features/backends/device-flow-auth.js.map +1 -1
  312. package/dist/components/features/chat/chat-interface.cjs +2 -2
  313. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  314. package/dist/components/features/chat/chat-interface.js +173 -165
  315. package/dist/components/features/chat/chat-interface.js.map +1 -1
  316. package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
  317. package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
  318. package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
  319. package/dist/components/features/chat/components/chat-input-actions.js +44 -43
  320. package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
  321. package/dist/components/features/chat/components/chat-input-container.cjs +1 -1
  322. package/dist/components/features/chat/components/chat-input-container.cjs.map +1 -1
  323. package/dist/components/features/chat/components/chat-input-container.d.ts +2 -1
  324. package/dist/components/features/chat/components/chat-input-container.js +20 -19
  325. package/dist/components/features/chat/components/chat-input-container.js.map +1 -1
  326. package/dist/components/features/chat/components/chat-input-profile-picker.cjs +1 -1
  327. package/dist/components/features/chat/components/chat-input-profile-picker.cjs.map +1 -1
  328. package/dist/components/features/chat/components/chat-input-profile-picker.js +44 -32
  329. package/dist/components/features/chat/components/chat-input-profile-picker.js.map +1 -1
  330. package/dist/components/features/chat/components/resolve-picker-kind.cjs +1 -1
  331. package/dist/components/features/chat/components/resolve-picker-kind.cjs.map +1 -1
  332. package/dist/components/features/chat/components/resolve-picker-kind.d.ts +10 -22
  333. package/dist/components/features/chat/components/resolve-picker-kind.js +6 -3
  334. package/dist/components/features/chat/components/resolve-picker-kind.js.map +1 -1
  335. package/dist/components/features/chat/custom-chat-input.cjs +1 -1
  336. package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
  337. package/dist/components/features/chat/custom-chat-input.d.ts +2 -1
  338. package/dist/components/features/chat/custom-chat-input.js +52 -51
  339. package/dist/components/features/chat/custom-chat-input.js.map +1 -1
  340. package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
  341. package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
  342. package/dist/components/features/chat/interactive-chat-box.d.ts +2 -1
  343. package/dist/components/features/chat/interactive-chat-box.js +9 -8
  344. package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
  345. package/dist/components/features/diff-viewer/commit-list.cjs +2 -0
  346. package/dist/components/features/diff-viewer/commit-list.cjs.map +1 -0
  347. package/dist/components/features/diff-viewer/commit-list.d.ts +13 -0
  348. package/dist/components/features/diff-viewer/commit-list.js +27 -0
  349. package/dist/components/features/diff-viewer/commit-list.js.map +1 -0
  350. package/dist/components/features/diff-viewer/commit-row.cjs +2 -0
  351. package/dist/components/features/diff-viewer/commit-row.cjs.map +1 -0
  352. package/dist/components/features/diff-viewer/commit-row.d.ts +14 -0
  353. package/dist/components/features/diff-viewer/commit-row.js +59 -0
  354. package/dist/components/features/diff-viewer/commit-row.js.map +1 -0
  355. package/dist/components/features/diff-viewer/file-diff-viewer.cjs +1 -1
  356. package/dist/components/features/diff-viewer/file-diff-viewer.cjs.map +1 -1
  357. package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +7 -1
  358. package/dist/components/features/diff-viewer/file-diff-viewer.js +40 -39
  359. package/dist/components/features/diff-viewer/file-diff-viewer.js.map +1 -1
  360. package/dist/components/features/plugins/plugin-detail-modal.d.ts +2 -1
  361. package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
  362. package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
  363. package/dist/components/providers/agent-server-ui-providers.d.ts +4 -2
  364. package/dist/components/providers/agent-server-ui-providers.js +9 -2
  365. package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
  366. package/dist/components/providers/index.cjs +1 -1
  367. package/dist/components/providers/index.d.ts +1 -2
  368. package/dist/components/providers/index.js +0 -1
  369. package/dist/components/providers/telemetry-provider.cjs +2 -0
  370. package/dist/components/providers/telemetry-provider.cjs.map +1 -0
  371. package/dist/components/providers/telemetry-provider.d.ts +6 -0
  372. package/dist/components/providers/telemetry-provider.js +64 -0
  373. package/dist/components/providers/telemetry-provider.js.map +1 -0
  374. package/dist/components/shared/modals/settings/settings-modal.cjs +1 -1
  375. package/dist/components/shared/modals/settings/settings-modal.cjs.map +1 -1
  376. package/dist/components/shared/modals/settings/settings-modal.js +23 -22
  377. package/dist/components/shared/modals/settings/settings-modal.js.map +1 -1
  378. package/dist/config/defaults.cjs +1 -1
  379. package/dist/config/defaults.cjs.map +1 -1
  380. package/dist/config/defaults.js +5 -4
  381. package/dist/config/defaults.js.map +1 -1
  382. package/dist/constants/acp-providers.cjs.map +1 -1
  383. package/dist/constants/acp-providers.d.ts +1 -1
  384. package/dist/constants/acp-providers.js.map +1 -1
  385. package/dist/constants/canvas-ui.cjs +2 -0
  386. package/dist/constants/canvas-ui.cjs.map +1 -0
  387. package/dist/constants/canvas-ui.d.ts +8 -0
  388. package/dist/constants/canvas-ui.js +6 -0
  389. package/dist/constants/canvas-ui.js.map +1 -0
  390. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  391. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  392. package/dist/contexts/conversation-websocket-context.js +197 -204
  393. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  394. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  395. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  396. package/dist/hooks/mutation/use-create-conversation.d.ts +2 -1
  397. package/dist/hooks/mutation/use-create-conversation.js +52 -52
  398. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  399. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  400. package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
  401. package/dist/hooks/mutation/use-save-settings.d.ts +3 -1
  402. package/dist/hooks/mutation/use-save-settings.js +6 -5
  403. package/dist/hooks/mutation/use-save-settings.js.map +1 -1
  404. package/dist/hooks/query/query-keys.cjs +1 -1
  405. package/dist/hooks/query/query-keys.cjs.map +1 -1
  406. package/dist/hooks/query/query-keys.d.ts +2 -0
  407. package/dist/hooks/query/query-keys.js +4 -1
  408. package/dist/hooks/query/query-keys.js.map +1 -1
  409. package/dist/hooks/query/use-backends-health.cjs +1 -1
  410. package/dist/hooks/query/use-backends-health.cjs.map +1 -1
  411. package/dist/hooks/query/use-backends-health.js +50 -48
  412. package/dist/hooks/query/use-backends-health.js.map +1 -1
  413. package/dist/hooks/query/use-cloud-organizations.cjs +1 -1
  414. package/dist/hooks/query/use-cloud-organizations.cjs.map +1 -1
  415. package/dist/hooks/query/use-cloud-organizations.d.ts +1 -0
  416. package/dist/hooks/query/use-cloud-organizations.js +5 -2
  417. package/dist/hooks/query/use-cloud-organizations.js.map +1 -1
  418. package/dist/hooks/query/use-commit-changes.cjs +2 -0
  419. package/dist/hooks/query/use-commit-changes.cjs.map +1 -0
  420. package/dist/hooks/query/use-commit-changes.d.ts +5 -0
  421. package/dist/hooks/query/use-commit-changes.js +34 -0
  422. package/dist/hooks/query/use-commit-changes.js.map +1 -0
  423. package/dist/hooks/query/use-task-polling.cjs +1 -1
  424. package/dist/hooks/query/use-task-polling.cjs.map +1 -1
  425. package/dist/hooks/query/use-task-polling.d.ts +3 -2
  426. package/dist/hooks/query/use-task-polling.js +53 -40
  427. package/dist/hooks/query/use-task-polling.js.map +1 -1
  428. package/dist/hooks/query/use-unified-git-commits.cjs +2 -0
  429. package/dist/hooks/query/use-unified-git-commits.cjs.map +1 -0
  430. package/dist/hooks/query/use-unified-git-commits.d.ts +10 -0
  431. package/dist/hooks/query/use-unified-git-commits.js +41 -0
  432. package/dist/hooks/query/use-unified-git-commits.js.map +1 -0
  433. package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
  434. package/dist/hooks/query/use-unified-git-diff.cjs.map +1 -1
  435. package/dist/hooks/query/use-unified-git-diff.d.ts +5 -0
  436. package/dist/hooks/query/use-unified-git-diff.js +11 -4
  437. package/dist/hooks/query/use-unified-git-diff.js.map +1 -1
  438. package/dist/hooks/use-acp-model-context.cjs +1 -1
  439. package/dist/hooks/use-acp-model-context.cjs.map +1 -1
  440. package/dist/hooks/use-acp-model-context.d.ts +4 -1
  441. package/dist/hooks/use-acp-model-context.js +9 -8
  442. package/dist/hooks/use-acp-model-context.js.map +1 -1
  443. package/dist/hooks/use-auto-refresh-files-on-edit.cjs +1 -1
  444. package/dist/hooks/use-auto-refresh-files-on-edit.cjs.map +1 -1
  445. package/dist/hooks/use-auto-refresh-files-on-edit.js +1 -1
  446. package/dist/hooks/use-auto-refresh-files-on-edit.js.map +1 -1
  447. package/dist/hooks/use-chat-input-model-state.cjs.map +1 -1
  448. package/dist/hooks/use-chat-input-model-state.d.ts +2 -1
  449. package/dist/hooks/use-chat-input-model-state.js.map +1 -1
  450. package/dist/hooks/use-chat-input-profile-state.cjs +1 -1
  451. package/dist/hooks/use-chat-input-profile-state.cjs.map +1 -1
  452. package/dist/hooks/use-chat-input-profile-state.d.ts +1 -10
  453. package/dist/hooks/use-chat-input-profile-state.js +42 -15
  454. package/dist/hooks/use-chat-input-profile-state.js.map +1 -1
  455. package/dist/hooks/use-device-flow.cjs +1 -1
  456. package/dist/hooks/use-device-flow.cjs.map +1 -1
  457. package/dist/hooks/use-device-flow.d.ts +4 -1
  458. package/dist/hooks/use-device-flow.js +42 -40
  459. package/dist/hooks/use-device-flow.js.map +1 -1
  460. package/dist/hooks/use-telemetry.cjs +1 -1
  461. package/dist/hooks/use-telemetry.cjs.map +1 -1
  462. package/dist/hooks/use-telemetry.d.ts +3 -3
  463. package/dist/hooks/use-telemetry.js +16 -22
  464. package/dist/hooks/use-telemetry.js.map +1 -1
  465. package/dist/hooks/use-tracking.cjs +1 -1
  466. package/dist/hooks/use-tracking.cjs.map +1 -1
  467. package/dist/hooks/use-tracking.d.ts +5 -5
  468. package/dist/hooks/use-tracking.js +37 -37
  469. package/dist/hooks/use-tracking.js.map +1 -1
  470. package/dist/i18n/declaration.cjs +1 -1
  471. package/dist/i18n/declaration.cjs.map +1 -1
  472. package/dist/i18n/declaration.d.ts +9 -0
  473. package/dist/i18n/declaration.js +1 -1
  474. package/dist/i18n/declaration.js.map +1 -1
  475. package/dist/i18n/index.cjs +1 -1
  476. package/dist/i18n/index.cjs.map +1 -1
  477. package/dist/i18n/index.js +19 -18
  478. package/dist/i18n/index.js.map +1 -1
  479. package/dist/i18n/translation.cjs +2 -2
  480. package/dist/i18n/translation.cjs.map +1 -1
  481. package/dist/i18n/translation.js +153 -0
  482. package/dist/i18n/translation.js.map +1 -1
  483. package/dist/index.cjs +1 -1
  484. package/dist/index.js +32 -32
  485. package/dist/lib/index.cjs +1 -1
  486. package/dist/lib/index.d.ts +2 -2
  487. package/dist/lib/index.js +1 -1
  488. package/dist/locales/ar/openhands.json +9 -0
  489. package/dist/locales/ca/openhands.json +9 -0
  490. package/dist/locales/de/openhands.json +9 -0
  491. package/dist/locales/en/openhands.json +9 -0
  492. package/dist/locales/es/openhands.json +9 -0
  493. package/dist/locales/fr/openhands.json +9 -0
  494. package/dist/locales/it/openhands.json +9 -0
  495. package/dist/locales/ja/openhands.json +9 -0
  496. package/dist/locales/ko-KR/openhands.json +9 -0
  497. package/dist/locales/no/openhands.json +9 -0
  498. package/dist/locales/pt/openhands.json +9 -0
  499. package/dist/locales/tr/openhands.json +9 -0
  500. package/dist/locales/uk/openhands.json +9 -0
  501. package/dist/locales/zh-CN/openhands.json +9 -0
  502. package/dist/locales/zh-TW/openhands.json +9 -0
  503. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.cjs +2 -0
  504. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.cjs.map +1 -0
  505. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.js +351 -0
  506. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.js.map +1 -0
  507. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.cjs +2 -0
  508. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.cjs.map +1 -0
  509. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.js +106 -0
  510. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.js.map +1 -0
  511. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +2 -0
  512. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -0
  513. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +69 -0
  514. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -0
  515. package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -1
  516. package/dist/node_modules/@openhands/typescript-client/dist/clients.js +3 -0
  517. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
  518. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
  519. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +18 -2
  520. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
  521. package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs.map +1 -1
  522. package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js.map +1 -1
  523. package/dist/node_modules/axios/index.cjs +1 -1
  524. package/dist/node_modules/axios/index.js +1 -1
  525. package/dist/package.cjs +1 -1
  526. package/dist/package.cjs.map +1 -1
  527. package/dist/package.js +3 -3
  528. package/dist/package.js.map +1 -1
  529. package/dist/routes/app-settings.cjs +1 -1
  530. package/dist/routes/app-settings.cjs.map +1 -1
  531. package/dist/routes/app-settings.js +59 -60
  532. package/dist/routes/app-settings.js.map +1 -1
  533. package/dist/routes/commits-tab.cjs +2 -0
  534. package/dist/routes/commits-tab.cjs.map +1 -0
  535. package/dist/routes/commits-tab.d.ts +8 -0
  536. package/dist/routes/commits-tab.js +45 -0
  537. package/dist/routes/commits-tab.js.map +1 -0
  538. package/dist/routes/files-tab.cjs +1 -1
  539. package/dist/routes/files-tab.cjs.map +1 -1
  540. package/dist/routes/files-tab.js +148 -127
  541. package/dist/routes/files-tab.js.map +1 -1
  542. package/dist/routes/llm-settings.cjs +1 -1
  543. package/dist/routes/llm-settings.cjs.map +1 -1
  544. package/dist/routes/llm-settings.js +4 -1
  545. package/dist/routes/llm-settings.js.map +1 -1
  546. package/dist/services/cloud-funnel-analytics.cjs +2 -0
  547. package/dist/services/cloud-funnel-analytics.cjs.map +1 -0
  548. package/dist/services/cloud-funnel-analytics.d.ts +4 -0
  549. package/dist/services/cloud-funnel-analytics.js +39 -0
  550. package/dist/services/cloud-funnel-analytics.js.map +1 -0
  551. package/dist/services/telemetry.cjs +1 -1
  552. package/dist/services/telemetry.cjs.map +1 -1
  553. package/dist/services/telemetry.d.ts +46 -9
  554. package/dist/services/telemetry.js +182 -71
  555. package/dist/services/telemetry.js.map +1 -1
  556. package/dist/themes/color-themes.cjs.map +1 -1
  557. package/dist/themes/color-themes.d.ts +3 -6
  558. package/dist/themes/color-themes.js.map +1 -1
  559. package/dist/types/agent-server/core/base/action.d.ts +5 -4
  560. package/dist/types/agent-server/core/base/base.d.ts +3 -2
  561. package/dist/types/agent-server/core/base/observation.d.ts +1 -1
  562. package/dist/types/agent-server/type-guards.cjs +1 -1
  563. package/dist/types/agent-server/type-guards.cjs.map +1 -1
  564. package/dist/types/agent-server/type-guards.d.ts +3 -5
  565. package/dist/types/agent-server/type-guards.js +2 -1
  566. package/dist/types/agent-server/type-guards.js.map +1 -1
  567. package/dist/types/automation.d.ts +5 -0
  568. package/dist/utils/api-error-message.d.ts +11 -0
  569. package/dist/utils/automation-timeout.d.ts +19 -0
  570. package/dist/utils/base-path.cjs +2 -0
  571. package/dist/utils/base-path.cjs.map +1 -0
  572. package/dist/utils/base-path.d.ts +2 -0
  573. package/dist/utils/base-path.js +23 -0
  574. package/dist/utils/base-path.js.map +1 -0
  575. package/dist/utils/error-handler.cjs +1 -1
  576. package/dist/utils/error-handler.cjs.map +1 -1
  577. package/dist/utils/error-handler.d.ts +1 -4
  578. package/dist/utils/error-handler.js +6 -7
  579. package/dist/utils/error-handler.js.map +1 -1
  580. package/dist/utils/map-provider.cjs +1 -1
  581. package/dist/utils/map-provider.cjs.map +1 -1
  582. package/dist/utils/map-provider.d.ts +1 -0
  583. package/dist/utils/map-provider.js +2 -1
  584. package/dist/utils/map-provider.js.map +1 -1
  585. package/package.json +3 -3
  586. package/scripts/check-sdk-version-sync.mjs +6 -6
  587. package/scripts/dev-safe.mjs +7 -8
  588. package/scripts/dev-static.mjs +3 -0
  589. package/scripts/dev-with-automation.mjs +3 -0
  590. package/scripts/docker-build.mjs +4 -0
  591. package/scripts/static-server.mjs +93 -7
  592. package/tools/canvas_ui_tool.py +14 -8
  593. package/build/assets/active-backend-context-hxq31W25.js +0 -1
  594. package/build/assets/agent-server-client-options-DVLRd9sw.js +0 -1
  595. package/build/assets/agent-server-conversation-service.api-CuSdr4Qb.js +0 -5
  596. package/build/assets/agent-settings-D_yOy8XB.js +0 -1
  597. package/build/assets/api-key-entry-screen-Dl0qVYi4.js +0 -1
  598. package/build/assets/app-settings-yVizGXox.js +0 -1
  599. package/build/assets/automation-detail-dvJfLs5u.js +0 -2
  600. package/build/assets/automation-export-BPcgLqPD.js +0 -2
  601. package/build/assets/automations-list-CUXogTe0.js +0 -1
  602. package/build/assets/backend-form-modal-CQJGmItq.js +0 -1
  603. package/build/assets/check-Bvi71siz.js +0 -1
  604. package/build/assets/condenser-settings-Ca8fYZ_Z.js +0 -1
  605. package/build/assets/conversation-9NBSRoR9.js +0 -1
  606. package/build/assets/conversation-BXg6Oti2.js +0 -89
  607. package/build/assets/conversation-panel-CZri9Rup.js +0 -1
  608. package/build/assets/conversation-service.api-DPBQvTKD.js +0 -1
  609. package/build/assets/declaration-gq8V5eTU.js +0 -1
  610. package/build/assets/files-tab-UVoray88.js +0 -1
  611. package/build/assets/git-provider-icon-o6hdnJUB.js +0 -1
  612. package/build/assets/handle-capture-consent-CPMXU29K.js +0 -1
  613. package/build/assets/home-D1IHvGTN.js +0 -1
  614. package/build/assets/index-redirect-CUUJiNki.js +0 -1
  615. package/build/assets/install-server-modal-BbuQaA2w.js +0 -1
  616. package/build/assets/lesson-plan-jC0HBoe6.js +0 -4
  617. package/build/assets/llm-not-configured-banner-DoARbcdL.js +0 -27
  618. package/build/assets/llm-settings-4JMLV8mq.js +0 -1
  619. package/build/assets/llm-settings-D91gMw3U.js +0 -1
  620. package/build/assets/llm-subscription-service-CKyaV24y.js +0 -1
  621. package/build/assets/loader-circle-BEykUKYG.js +0 -1
  622. package/build/assets/manage-backends-modal-DkWAMSle.js +0 -1
  623. package/build/assets/manifest-aa5c29f6.js +0 -1
  624. package/build/assets/model-selector-BfqpMkSJ.js +0 -1
  625. package/build/assets/mouse-pointer-click-PdEQPL6v.js +0 -1
  626. package/build/assets/onboarding-Bu-HN1ze.js +0 -1
  627. package/build/assets/onboarding-modal-CZgjs5Bx.js +0 -1
  628. package/build/assets/option-service.api-BrZ5q87N.js +0 -1
  629. package/build/assets/organization-service.api-Bk4pCGU1.js +0 -1
  630. package/build/assets/path-utils-CSmuZoix.js +0 -1
  631. package/build/assets/plugins-management-service-BRBLxvUl.js +0 -1
  632. package/build/assets/profiles-service.api-BMXQ9pZC.js +0 -1
  633. package/build/assets/providers-BpO967xS.js +0 -1
  634. package/build/assets/proxy-BgJLtxu7.js +0 -1
  635. package/build/assets/root-BM5WgQ4_.js +0 -2
  636. package/build/assets/root-V8fkplMy.css +0 -1
  637. package/build/assets/root-layout-BdoyoobY.js +0 -2
  638. package/build/assets/schema-field-BSHrUMme.js +0 -1
  639. package/build/assets/sdk-section-page-t82gsOqa.js +0 -1
  640. package/build/assets/search-4DHskuhE.js +0 -1
  641. package/build/assets/secrets-service-B2GqPV0N.js +0 -1
  642. package/build/assets/settings-DmPLkgq0.js +0 -1
  643. package/build/assets/settings-modal-CwrZKrTq.js +0 -1
  644. package/build/assets/settings-service.api-Ce-ub11I.js +0 -1
  645. package/build/assets/shared-conversation-BDREQPnE.js +0 -1
  646. package/build/assets/skills-plugins-2Y44YHbO.js +0 -1
  647. package/build/assets/use-acp-credential-form-MzZM6D7D.js +0 -1
  648. package/build/assets/use-agent-profiles-DwZxnwO5.js +0 -1
  649. package/build/assets/use-backends-health-CRHzuvxO.js +0 -1
  650. package/build/assets/use-cloud-current-user-id-utFreJ0i.js +0 -1
  651. package/build/assets/use-config-mJrtZHP1.js +0 -1
  652. package/build/assets/use-create-conversation-DdqsP78F.js +0 -1
  653. package/build/assets/use-is-authed-B6M0mcGL.js +0 -1
  654. package/build/assets/use-llm-profiles-RC-PkpBl.js +0 -1
  655. package/build/assets/use-plugins-marketplace-FHlbeQ4c.js +0 -1
  656. package/build/assets/use-runtime-is-ready-RKj2WmEh.js +0 -1
  657. package/build/assets/use-save-agent-profile-tvDP15mh.js +0 -1
  658. package/build/assets/use-save-settings-BGlSfuYn.js +0 -1
  659. package/build/assets/use-settings-CH5LzXD8.js +0 -1
  660. package/build/assets/use-settings-nav-items-Dwktv8wo.js +0 -16
  661. package/build/assets/use-skills-CSzSL6HG.js +0 -1
  662. package/build/assets/use-tracking-BIXzagSI.js +0 -1
  663. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~lf310vj7-CSVPGId3.js +0 -10
  664. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nfpll1wp-BCpa95De.js +0 -177
  665. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jewnulst-C57fm7C-.js +0 -1
  666. package/build/assets/vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CqXiHwjU.js +0 -2
  667. package/build/assets/x-Cb0WAtak.js +0 -1
  668. package/dist/components/providers/posthog-wrapper.cjs +0 -2
  669. package/dist/components/providers/posthog-wrapper.cjs.map +0 -1
  670. package/dist/components/providers/posthog-wrapper.d.ts +0 -4
  671. package/dist/components/providers/posthog-wrapper.js +0 -49
  672. package/dist/components/providers/posthog-wrapper.js.map +0 -1
  673. package/dist/node_modules/posthog-js/react/dist/esm/index.cjs +0 -2
  674. package/dist/node_modules/posthog-js/react/dist/esm/index.cjs.map +0 -1
  675. package/dist/node_modules/posthog-js/react/dist/esm/index.js +0 -113
  676. package/dist/node_modules/posthog-js/react/dist/esm/index.js.map +0 -1
  677. package/dist/utils/handle-capture-consent.cjs +0 -2
  678. package/dist/utils/handle-capture-consent.cjs.map +0 -1
  679. package/dist/utils/handle-capture-consent.d.ts +0 -7
  680. package/dist/utils/handle-capture-consent.js +0 -8
  681. package/dist/utils/handle-capture-consent.js.map +0 -1
  682. /package/build/assets/{__vite-browser-external-4xJsU2-u.js → __vite-browser-external-BQUj0sYu.js} +0 -0
  683. /package/build/assets/{agent-server-ui-style-scope-COnDHTm5.js → agent-server-ui-style-scope-qhnhZHBV.js} +0 -0
  684. /package/build/assets/{automation-BU8zu-FP.js → automation-LZB0MjdV.js} +0 -0
  685. /package/build/assets/{close-p3Op5lxI.js → close-DLFb5kfv.js} +0 -0
  686. /package/build/assets/{common-Dh7OqABE.js → common-CxbUL3nR.js} +0 -0
  687. /package/build/assets/{createLucideIcon-CVAsW2Yo.js → createLucideIcon-D4Tak8A1.js} +0 -0
  688. /package/build/assets/{folder-mMWFvaw0.js → folder-Bk311brm.js} +0 -0
  689. /package/build/assets/{get-language-from-path-CPNnuVhI.js → get-language-from-path-DBqBsCWH.js} +0 -0
  690. /package/build/assets/{git-status-mapper-BI8FyUVp.js → git-status-mapper-DnL9OC8_.js} +0 -0
  691. /package/build/assets/{iconBase-DaTRRUjy.js → iconBase-Dz51Zn5x.js} +0 -0
  692. /package/build/assets/{link-external-DfKQroKX.js → link-external-CaBmUEs_.js} +0 -0
  693. /package/build/assets/{search-BsjCEFNf.js → search-BgOCR7_c.js} +0 -0
  694. /package/build/assets/{settings-like-page-layout-classes-DENKlZpD.js → settings-like-page-layout-classes-Cdl6jOe5.js} +0 -0
  695. /package/build/assets/{skills-9cDZONKh.js → skills-EqzxYBvT.js} +0 -0
  696. /package/build/assets/{terminal-BuLtIrb9.js → terminal-Cgf___rK.js} +0 -0
  697. /package/build/assets/{u-check-circle-half-LiwZkuFe.js → u-check-circle-half-MsShT8Ec.js} +0 -0
  698. /package/build/assets/{u-edit-DJ90xc8Z.js → u-edit-DL5LgKon.js} +0 -0
  699. /package/build/assets/{use-breakpoint-B-O0lQ84.js → use-breakpoint-BP3lqLMx.js} +0 -0
  700. /package/build/assets/{use-click-outside-element-Bf4Omzot.js → use-click-outside-element-D9BYdANT.js} +0 -0
  701. /package/build/assets/{use-launch-skill-in-chat-BnoDgvAy.js → use-launch-skill-in-chat-DJWEfVc5.js} +0 -0
  702. /package/build/assets/{vendor~browser-Dqd33JyP.js → vendor~browser-By2MVv_N.js} +0 -0
  703. /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js → vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js} +0 -0
  704. /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~epa72zsm-B4rXs7Zd.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js} +0 -0
  705. /package/build/assets/{vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js} +0 -0
  706. /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-9UMeuPV6.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js} +0 -0
  707. /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DTzw2x50.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js} +0 -0
  708. /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-rV6d1Iv_.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js} +0 -0
  709. /package/build/assets/{vendor~root-layout~home~mcp~automations-list~onboarding-modal-CXyYYvYh.js → vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js} +0 -0
  710. /package/build/assets/{vendor~terminal-aeP3PnKf.js → vendor~terminal-CnKZILnC.js} +0 -0
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-CDRCKC9-.js";import{t as i}from"./declaration-gq8V5eTU.js";import{t as a}from"./utils-D3U3rlqr.js";import{i as o}from"./extension-module-card-classes-9V3J9J_b.js";var s=e(t(),1),c=n(),l=o,u=6,d=40;function f(e,t){if(e.length===0||t<=0)return 0;let n=0;for(let r=0;r<e.length;r+=1){let i=e[r],a=r>0?u:0,o=e.length-r-1>0?d+u:0;if(n+a+i+o>t)return Math.max(1,r);n+=a+i}return e.length}function p({pills:e,testId:t}){let{t:n}=r(`openhands`),l=s.useRef(null),u=s.useRef(null),[d,p]=s.useState(e.length),m=s.useCallback(()=>{let e=l.current,t=u.current;!e||!t||p(f(Array.from(t.children).map(e=>e.offsetWidth),e.clientWidth))},[]);if(s.useLayoutEffect(()=>{m()},[e,m]),s.useEffect(()=>{let e=l.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>m());return t.observe(e),()=>t.disconnect()},[m]),e.length===0)return null;let h=Math.max(0,e.length-d);return(0,c.jsxs)(`div`,{className:`min-w-0 overflow-hidden`,children:[(0,c.jsx)(`div`,{ref:u,"aria-hidden":!0,className:`pointer-events-none fixed top-0 -left-[10000px] z-[-1] flex flex-nowrap items-center gap-1.5 opacity-0`,children:e.map(e=>(0,c.jsx)(`span`,{className:`inline-flex shrink-0`,children:e.node},e.id))}),(0,c.jsxs)(`div`,{ref:l,"data-testid":t,className:`flex w-full min-w-0 max-w-full flex-nowrap items-center gap-1.5 overflow-hidden`,children:[e.slice(0,d).map(e=>(0,c.jsx)(`span`,{className:`inline-flex shrink-0`,children:e.node},e.id)),h>0?(0,c.jsx)(`span`,{"data-testid":`${t}-overflow`,className:a(o,`font-medium text-tertiary-alt`),title:e.slice(d).map(e=>e.id).join(`, `),children:n(i.SETTINGS$SKILLS_PILLS_MORE,{count:h})}):null]})]})}export{p as n,l as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./utils-DB9LsAzA.js";import{i as o}from"./extension-module-card-classes-9V3J9J_b.js";var s=e(t(),1),c=n(),l=o,u=6,d=40;function f(e,t){if(e.length===0||t<=0)return 0;let n=0;for(let r=0;r<e.length;r+=1){let i=e[r],a=r>0?u:0,o=e.length-r-1>0?d+u:0;if(n+a+i+o>t)return Math.max(1,r);n+=a+i}return e.length}function p({pills:e,testId:t}){let{t:n}=r(`openhands`),l=s.useRef(null),u=s.useRef(null),[d,p]=s.useState(e.length),m=s.useCallback(()=>{let e=l.current,t=u.current;!e||!t||p(f(Array.from(t.children).map(e=>e.offsetWidth),e.clientWidth))},[]);if(s.useLayoutEffect(()=>{m()},[e,m]),s.useEffect(()=>{let e=l.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>m());return t.observe(e),()=>t.disconnect()},[m]),e.length===0)return null;let h=Math.max(0,e.length-d);return(0,c.jsxs)(`div`,{className:`min-w-0 overflow-hidden`,children:[(0,c.jsx)(`div`,{ref:u,"aria-hidden":!0,className:`pointer-events-none fixed top-0 -left-[10000px] z-[-1] flex flex-nowrap items-center gap-1.5 opacity-0`,children:e.map(e=>(0,c.jsx)(`span`,{className:`inline-flex shrink-0`,children:e.node},e.id))}),(0,c.jsxs)(`div`,{ref:l,"data-testid":t,className:`flex w-full min-w-0 max-w-full flex-nowrap items-center gap-1.5 overflow-hidden`,children:[e.slice(0,d).map(e=>(0,c.jsx)(`span`,{className:`inline-flex shrink-0`,children:e.node},e.id)),h>0?(0,c.jsx)(`span`,{"data-testid":`${t}-overflow`,className:a(o,`font-medium text-tertiary-alt`),title:e.slice(d).map(e=>e.id).join(`, `),children:n(i.SETTINGS$SKILLS_PILLS_MORE,{count:h})}):null]})]})}export{p as n,l as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as a}from"./useMutation-u8UgRgDK.js";import{t as o}from"./useQuery-D5pEZbY0.js";import{t as s}from"./useTranslation-Cbf5AGg_.js";import{t as c}from"./declaration-BGsHjPEW.js";import{C as l,E as u,S as d,n as f,u as p}from"./active-backend-context-B8rMv0X9.js";import{t as m}from"./search-dIQ09UY2.js";import{t as h}from"./x-ZE4iplpF.js";import{t as g}from"./utils-DB9LsAzA.js";import{t as _}from"./modal-backdrop-zVwfOJZr.js";import{n as v}from"./modal-classes-3qT9Ap7Q.js";import{t as y}from"./brand-button-B1izLAdR.js";import{n as b}from"./navigation-context-DPs2G0X8.js";import{t as x}from"./modal-close-button-BcIBUdSq.js";import{t as S}from"./settings-input-BsgQWS5R.js";import{t as C}from"./plugins-management-service-B75jyC56.js";import{a as w,i as T,r as E}from"./extension-module-card-classes-9V3J9J_b.js";import{t as D}from"./settings-switch-Bes8dIlV.js";import{n as O}from"./circle-plus-check-toggle-DoFIjVE0.js";import{n as k,t as A}from"./use-plugins-marketplace-BplU65ae.js";import{n as j}from"./extensions-navigation-CPNjMNvR.js";import{n as M}from"./settings-like-page-layout-classes-Cdl6jOe5.js";var N=e(t(),1),P=n();function F({plugin:e,isBusy:t=!1,isDisabled:n=!1,onOpen:r,onInstall:i,onToggle:a}){let{t:o}=s(`openhands`);return(0,P.jsxs)(`div`,{"data-testid":`plugin-card-${e.name}`,role:`button`,tabIndex:0,onClick:r,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:g(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,w,E),children:[(0,P.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,P.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,P.jsx)(`h3`,{"data-testid":`plugin-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,P.jsx)(`p`,{"data-testid":`plugin-source-${e.name}`,className:`mt-0.5 min-w-0 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}):null]}),e.installed?(0,P.jsx)(O,{testId:`plugin-toggle-${e.name}`,isSelected:e.enabled,isDisabled:n||t,onToggle:a,disableTooltipKey:c.COMMON$DISABLE}):e.isLocal?(0,P.jsx)(`span`,{"data-testid":`plugin-local-badge-${e.name}`,className:g(T,`flex-shrink-0`),children:o(c.SETTINGS$PLUGINS_FILTER_LOCAL)}):(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-install-${e.name}`,isDisabled:n||t,className:`flex-shrink-0 whitespace-nowrap`,onClick:e=>{e?.stopPropagation(),i()},children:o(t?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)})]}),e.description?(0,P.jsx)(`p`,{"data-testid":`plugin-description-${e.name}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:e.description}):null,(e.installed||e.isLocal)&&e.version?(0,P.jsx)(`span`,{"data-testid":`plugin-version-${e.name}`,className:g(T,`self-start`),children:o(c.SETTINGS$SKILLS_VERSION,{version:e.version})}):null]})}var I=[{value:`all`,labelKey:c.SETTINGS$PLUGINS_FILTER_ALL},{value:`installed`,labelKey:c.SETTINGS$PLUGINS_FILTER_INSTALLED},{value:`available`,labelKey:c.SETTINGS$PLUGINS_FILTER_AVAILABLE},{value:`local`,labelKey:c.SETTINGS$PLUGINS_FILTER_LOCAL}];function ee({search:e,onSearchChange:t,statusFilter:n,onStatusFilterChange:r}){let{t:i}=s(`openhands`);return(0,P.jsxs)(`div`,{"data-testid":`plugins-toolbar`,className:`flex items-stretch gap-2`,children:[(0,P.jsxs)(`div`,{className:g(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,P.jsx)(m,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,P.jsx)(`input`,{"data-testid":`plugins-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(c.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),"aria-label":i(c.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),className:g(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,P.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(c.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,P.jsx)(h,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,P.jsx)(`div`,{"data-testid":`plugins-status-filter`,className:`flex shrink-0 items-center gap-1 rounded-lg border border-[var(--oh-border)] bg-base-secondary p-1`,children:I.map(e=>(0,P.jsx)(`button`,{type:`button`,"data-testid":`plugins-filter-${e.value}`,"aria-pressed":n===e.value,onClick:()=>r(e.value),className:g(`cursor-pointer rounded-md px-3 py-1 text-xs transition-colors`,n===e.value?`bg-surface-raised text-white`:`text-tertiary-alt hover:text-white`),children:i(e.labelKey)},e.value))})]})}function L({plugin:e,isBusy:t=!1,isDisabled:n=!1,onToggle:r,onInstall:i,onUninstall:a,onRefresh:o,onClose:l,onStartConversation:u}){let{t:d}=s(`openhands`),f=n||t;return(0,P.jsx)(_,{onClose:l,"aria-label":e.name,children:(0,P.jsxs)(`div`,{"data-testid":`plugin-detail-modal`,"data-plugin-name":e.name,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,P.jsx)(x,{onClose:l,testId:`plugin-detail-modal-close`}),(0,P.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,P.jsx)(`h2`,{className:g(`pr-6`,v),children:e.name}),e.source?(0,P.jsx)(`p`,{className:`mt-1 break-all text-xs text-tertiary-alt`,children:e.source}):null]}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[e.description?(0,P.jsx)(`p`,{className:`text-sm leading-relaxed text-tertiary-light`,children:e.description}):null,(0,P.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.isLocal?(0,P.jsx)(`span`,{className:T,children:d(c.SETTINGS$PLUGINS_FILTER_LOCAL)}):null,e.version?(0,P.jsx)(`span`,{className:T,children:d(c.SETTINGS$SKILLS_VERSION,{version:e.version})}):null,e.ref?(0,P.jsxs)(`span`,{className:T,children:[d(c.SETTINGS$PLUGINS_REF_LABEL),` `,e.ref]}):null,e.repoPath?(0,P.jsxs)(`span`,{className:T,children:[d(c.SETTINGS$PLUGINS_REPO_PATH_LABEL),` `,e.repoPath]}):null]}),e.installed?(0,P.jsx)(D,{testId:`plugin-modal-toggle-${e.name}`,isToggled:e.enabled,onToggle:r,isDisabled:f,togglePosition:`right`,children:d(e.enabled?c.SETTINGS$SKILLS_ENABLED:c.SETTINGS$SKILLS_DISABLED)}):null]}),(0,P.jsxs)(`footer`,{className:`flex flex-shrink-0 flex-wrap justify-end gap-2 px-6 pb-6 pt-4`,children:[e.installed?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-refresh-${e.name}`,isDisabled:f,onClick:o,children:d(c.SETTINGS$PLUGINS_REFRESH)}),(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-uninstall-${e.name}`,isDisabled:f,onClick:a,children:d(c.SETTINGS$PLUGINS_UNINSTALL)})]}):e.isLocal?null:(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-install-${e.name}`,isDisabled:f,onClick:i,children:d(t?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)}),e.source&&u?(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-start-conversation-${e.name}`,onClick:u,children:d(c.COMMON$START_CONVERSATION)}):null,(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-modal-dismiss`,onClick:l,children:d(c.BUTTON$CLOSE)})]})]})})}function R(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.installPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),e.invalidateQueries({queryKey:p.marketplace}),l(t(c.SETTINGS$PLUGINS_INSTALL_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function z({onClose:e,onInstalled:t}){let{t:n}=s(`openhands`),r=R(),[i,a]=N.useState(``),[o,l]=N.useState(``),[u,d]=N.useState(``),f=i.trim(),p=f.length>0&&!r.isPending;return(0,P.jsx)(_,{onClose:e,"aria-label":n(c.SETTINGS$PLUGINS_ADD_MODAL_TITLE),children:(0,P.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),p&&r.mutate({source:f,ref:o.trim()||null,repo_path:u.trim()||null},{onSuccess:()=>{t?.(),e()}})},"data-testid":`add-plugin-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,P.jsx)(x,{onClose:e,testId:`add-plugin-modal-close`}),(0,P.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,P.jsx)(`h2`,{className:g(`pr-6`,v),children:n(c.SETTINGS$PLUGINS_ADD_MODAL_TITLE)}),(0,P.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:n(c.SETTINGS$PLUGINS_ADD_MODAL_INTRO)})]}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,P.jsx)(S,{testId:`add-plugin-source-input`,label:n(c.SETTINGS$PLUGINS_SOURCE_LABEL),type:`text`,value:i,onChange:a,placeholder:n(c.SETTINGS$PLUGINS_SOURCE_PLACEHOLDER),showRequiredTag:!0}),(0,P.jsx)(S,{testId:`add-plugin-ref-input`,label:n(c.SETTINGS$PLUGINS_REF_LABEL),type:`text`,value:o,onChange:l,showOptionalTag:!0}),(0,P.jsx)(S,{testId:`add-plugin-repo-path-input`,label:n(c.SETTINGS$PLUGINS_REPO_PATH_LABEL),type:`text`,value:u,onChange:d,showOptionalTag:!0})]}),(0,P.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,P.jsx)(y,{type:`button`,variant:`secondary`,onClick:e,testId:`add-plugin-modal-dismiss`,children:n(c.BUTTON$CLOSE)}),(0,P.jsx)(y,{type:`submit`,variant:`primary`,testId:`add-plugin-submit`,isDisabled:!p,children:n(r.isPending?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)})]})]})})}function B(e,t,n=void 0){let r=new Map;for(let t of e??[])r.set(t.name,{name:t.name,description:t.description,source:t.source,ref:t.ref??null,repoPath:t.repo_path??null,installed:t.installed,enabled:!1,version:null,inCatalog:!0,isLocal:!1});for(let e of t??[]){let t=r.get(e.name);r.set(e.name,{name:e.name,description:t?.description??e.description??null,source:e.source??t?.source??null,ref:e.resolved_ref??t?.ref??null,repoPath:e.repo_path??t?.repoPath??null,installed:!0,enabled:e.enabled,version:e.version??null,inCatalog:t?.inCatalog??!1,isLocal:!1})}for(let e of n??[])r.has(e.name)||r.set(e.name,{name:e.name,description:e.description||null,source:null,ref:null,repoPath:null,installed:!1,enabled:!1,version:e.version||null,inCatalog:!1,isLocal:!0});let i=e=>e.installed?0:e.isLocal?1:2;return Array.from(r.values()).sort((e,t)=>{let n=i(e)-i(t);return n===0?e.name.localeCompare(t.name):n})}function V(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description??``,e.source??``,e.repoPath??``,e.ref??``].some(e=>e.toLowerCase().includes(n)):!0}function H(e,t){return t===`installed`?e.installed:t===`available`?!e.installed&&!e.isLocal:t===`local`?e.isLocal:!0}var U=()=>o({queryKey:p.installed,queryFn:()=>C.listInstalledPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1}),W=()=>o({queryKey:p.local,queryFn:()=>k.getLocalPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});function G(){let e=i(),{t}=s(`openhands`);return a({mutationFn:({name:e,enabled:t})=>C.setPluginEnabled(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed})},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function K(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.uninstallPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),e.invalidateQueries({queryKey:p.marketplace}),l(t(c.SETTINGS$PLUGINS_UNINSTALL_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function q(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.refreshPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),l(t(c.SETTINGS$PLUGINS_REFRESH_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function J(e){let t=btoa(JSON.stringify(e));return`/launch?${new URLSearchParams({plugins:t}).toString()}`}var Y=r(function(){let{t:e}=s(`openhands`),{backend:t}=f(),{navigate:n}=b(),r=t.kind===`local`,{data:i,isLoading:a}=A(),{data:o,isLoading:l}=U(),{data:u,isLoading:d}=W(),p=R(),m=G(),h=K(),_=q(),[v,x]=N.useState(``),[S,C]=N.useState(`all`),[w,T]=N.useState(null),[E,D]=N.useState(!1),O=N.useMemo(()=>B(i,o,u),[i,o,u]),k=N.useMemo(()=>O.filter(e=>H(e,S)&&V(e,v)),[O,S,v]),I=w?O.find(e=>e.name===w)??null:null,Y=a||l||d,X=(m.isPending?m.variables?.name:void 0)??(h.isPending?h.variables:void 0)??(_.isPending?_.variables:void 0)??null,Z=e=>X===e.name||p.isPending&&p.variables?.source===e.source,Q=e=>{e.source&&p.mutate({source:e.source,ref:e.ref,repo_path:e.repoPath})},$=(e,t)=>{m.mutate({name:e.name,enabled:t})},te=e=>{h.mutate(e.name,{onSuccess:()=>T(null)})},ne=e=>{_.mutate(e.name)},re=e=>{e.source&&n(J([{source:e.source,ref:e.ref,repo_path:e.repoPath}]))};return(0,P.jsxs)(`div`,{"data-testid":`skills-plugins-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,P.jsx)(j,{}),(0,P.jsx)(`main`,{className:g(M,`h-full`),children:(0,P.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,P.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,P.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(c.SETTINGS$PLUGINS_TITLE)}),(0,P.jsx)(`div`,{"data-testid":`plugins-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_PAGE_DESCRIPTION)})]}),(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugins-add-plugin-button`,isDisabled:!r,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>D(!0),children:e(c.SETTINGS$PLUGINS_ADD_BUTTON)})]}),Y&&(0,P.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,P.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!Y&&O.length===0&&(0,P.jsx)(`div`,{"data-testid":`plugins-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,P.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_NO_PLUGINS)})}),!Y&&O.length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(ee,{search:v,onSearchChange:x,statusFilter:S,onStatusFilterChange:C}),k.length===0?(0,P.jsx)(`div`,{"data-testid":`plugins-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,P.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_NO_MATCH)})}):(0,P.jsx)(`section`,{className:g(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,P.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:k.map(e=>(0,P.jsx)(F,{plugin:e,isBusy:Z(e),isDisabled:!r,onOpen:()=>T(e.name),onInstall:()=>Q(e),onToggle:t=>$(e,t)},e.name))})})]}),I&&(0,P.jsx)(L,{plugin:I,isBusy:Z(I),isDisabled:!r,onToggle:e=>$(I,e),onInstall:()=>Q(I),onUninstall:()=>te(I),onRefresh:()=>ne(I),onStartConversation:()=>re(I),onClose:()=>T(null)}),E&&(0,P.jsx)(z,{onClose:()=>D(!1)})]})})]})});export{Y as default};
@@ -1,2 +1,2 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js";import{t as i}from"./Trans-Ch-OVWEA.js";import{t as a}from"./useTranslation-CDRCKC9-.js";import{t as o}from"./declaration-gq8V5eTU.js";import{A as s,P as c}from"./active-backend-context-hxq31W25.js";import{t as l}from"./search-4DHskuhE.js";import{t as u}from"./x-Cb0WAtak.js";import{t as d}from"./utils-D3U3rlqr.js";import{t as f}from"./modal-backdrop-zVwfOJZr.js";import{n as p}from"./modal-classes-Cf-4tbHz.js";import{t as m}from"./brand-button-vMVuyDXu.js";import{t as h}from"./modal-close-button-B6CfxxJj.js";import{r as g}from"./use-settings-CH5LzXD8.js";import{t as _}from"./skills-9cDZONKh.js";import{t as v}from"./use-save-settings-BGlSfuYn.js";import{t as y}from"./checkmark-h7udgXMM.js";import{t as b}from"./copy-BLmGeJcd.js";import{a as x,r as S}from"./extension-module-card-classes-9V3J9J_b.js";import{t as C}from"./settings-switch-5cuxl8Dc.js";import{n as w,t as T}from"./skill-card-pill-row-eTIkE4nz.js";import{n as E}from"./circle-plus-check-toggle-C5YxjxvI.js";import{t as D}from"./use-skills-CSzSL6HG.js";import{n as O}from"./extensions-navigation-B5MeUiMq.js";import{n as k,t as A}from"./use-launch-skill-in-chat-BnoDgvAy.js";import{t as j}from"./enum-filter-dropdown-DXbVwiNZ.js";import{n as ee}from"./settings-like-page-layout-classes-DENKlZpD.js";var M=e(t(),1),N=n();function P({skillName:e,className:t}){return(0,N.jsx)(`span`,{"aria-hidden":`true`,title:e,"data-testid":`skill-icon-${e}`,className:d(`inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden`,`rounded-lg border border-white/10 bg-surface-raised text-white`,`shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,`[&>svg]:h-5 [&>svg]:w-5`,t),children:(0,N.jsx)(_,{})})}var F=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function te(e){let t=e.match(/^description:\s*\|\s*\r?\n((?:[ \t].*(?:\r?\n|$))+)/m);if(t)return t[1].replace(/^[ \t]+/gm,``).trim();let n=e.match(/^description:\s*['"](.+?)['"]\s*$/m);if(n)return n[1].trim();let r=e.match(/^description:\s*(.+)\s*$/m);return r?r[1].trim():null}function ne(e){let t=e.match(F);return t?e.slice(t[0].length).trim():e.trim()}function re(e){let t=e.replace(/^#+\s+[^\n]+\n+/,``).trim();return t.split(/\n\s*\n/).map(e=>e.replace(/\s+/g,` `).trim()).find(e=>e.length>0)??t.replace(/\s+/g,` `).trim()}function I(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(F);if(r){let e=te(r[1]);if(e)return e}return re(ne(n))}var L=`inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-text-secondary/35 bg-text-secondary/12 px-2 py-0.5 text-[11px] font-medium leading-4 text-tertiary-light`,R={agentskills:{labelKey:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:o.SETTINGS$SKILLS_TYPE_REPO}};function z({type:e}){let{t}=a(`openhands`),n=R[e];return(0,N.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:L,children:t(n.labelKey)})}function B(e,t,n){if(e)return`${e}-${t}-${n}`}function V(e,t,n={}){let{variant:r=`card`,testIdPrefix:i}=n,a=[{id:`type-${e.type}`,node:(0,N.jsx)(z,{type:e.type})}];if(e.version&&a.push({id:`version-${e.version}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`version`)??`skill-version-${e.name}`,className:T,children:t(o.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&a.push({id:`license-${e.license}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`license`),className:T,children:e.license})}),r===`detail`&&e.compatibility&&a.push({id:`compatibility-${e.compatibility}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`compatibility`),className:T,children:e.compatibility})}),e.disable_model_invocation&&a.push({id:`disable-model-invocation`,node:(0,N.jsxs)(`span`,{"data-testid":B(i,e.name,`disable-model-invocation`)??`skill-disable-model-invocation-${e.name}`,className:`inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[rgba(248,113,113,0.35)] bg-[rgba(248,113,113,0.12)] px-2 py-0.5 text-[11px] font-medium leading-4 text-[#fca5a5]`,children:[(0,N.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(o.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)a.push({id:`allowed-tool-${t}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`tool-${t}`),className:d(T,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))a.push({id:`metadata-${t}`,node:(0,N.jsxs)(`span`,{"data-testid":B(i,e.name,`metadata-${t}`),className:T,children:[(0,N.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])a.push({id:`trigger-${t}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`trigger-${t}`),className:T,children:t})});return a}function H(e){let t=e?.trim();return t?!!(/^https?:\/\//i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~`)||/^[A-Za-z]:[\\/]/.test(t)||t.includes(`/`)||t.includes(`\\`)):!1}function U({skill:e,enabled:t,onOpen:n,onToggle:r}){let{t:i}=a(`openhands`),[s,c]=M.useState(!1),l=I(e),u=M.useMemo(()=>V(e,i),[e,i]),f=H(e.source);return M.useEffect(()=>{if(!s)return;let e=setTimeout(()=>c(!1),2e3);return()=>clearTimeout(e)},[s]),(0,N.jsx)(`div`,{"data-testid":`skill-card-${e.name}`,role:`button`,tabIndex:0,onClick:n,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())},className:d(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,x,S),children:(0,N.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,N.jsx)(P,{skillName:e.name}),(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,N.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,N.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,N.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,N.jsx)(`p`,{"data-testid":`skill-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),f?(0,N.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":i(s?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:s,onClick:async t=>{t.stopPropagation(),e.source&&(await navigator.clipboard.writeText(e.source),c(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:s?(0,N.jsx)(y,{width:12,height:12}):(0,N.jsx)(b,{width:12,height:12})}):null]}):null]}),(0,N.jsx)(E,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:r,disableTooltipKey:o.COMMON$DISABLE})]}),l?(0,N.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,N.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:l})}):null,u.length>0?(0,N.jsx)(w,{pills:u,testId:`skill-triggers-${e.name}`}):null]})]})})}var W=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,G=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`;function K(e){return e.name===`add-skill`?G:`/${e.name} `}function q({testId:e,label:t,value:n}){return(0,N.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,N.jsx)(`span`,{className:`text-sm`,children:t}),(0,N.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
2
- `).length)),className:d(`bg-[var(--oh-surface-raised)] border border-[var(--oh-border-subtle)] w-full min-w-0 rounded-sm p-2 text-sm`,`cursor-not-allowed resize-none custom-scrollbar`)})]})}function J({skill:e,enabled:t,onToggle:n,onClose:r}){let{t:i}=a(`openhands`),s=A(),[c,l]=M.useState(!1),u=M.useMemo(()=>K(e),[e]),d=I(e),g=M.useMemo(()=>V(e,i,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,i]),_=H(e.source);return M.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,N.jsx)(f,{onClose:r,"aria-label":e.name,children:(0,N.jsxs)(`div`,{"data-testid":`skill-detail-modal`,"data-skill-name":e.name,className:`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[85vh] overflow-y-auto custom-scrollbar`,children:[(0,N.jsx)(h,{onClose:r,testId:`skill-detail-modal-close`}),(0,N.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,N.jsx)(P,{skillName:e.name}),(0,N.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,N.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:p,children:e.name}),e.source?(0,N.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,N.jsx)(`p`,{"data-testid":`skill-modal-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),_?(0,N.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":i(c?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async()=>{e.source&&(await navigator.clipboard.writeText(e.source),l(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:c?(0,N.jsx)(y,{width:12,height:12}):(0,N.jsx)(b,{width:12,height:12})}):null]}):null]})]}),(0,N.jsx)(`div`,{"data-testid":`skill-modal-enable-row-${e.name}`,className:`flex w-full items-center rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:(0,N.jsx)(C,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:i(t?o.SETTINGS$SKILLS_ENABLED:o.SETTINGS$SKILLS_DISABLED)})}),d?(0,N.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`text-xs text-tertiary-light`,children:d}):null,g.length>0?(0,N.jsx)(w,{pills:g,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,N.jsx)(q,{testId:`skill-modal-field-content-${e.name}`,label:i(o.SETTINGS$SKILLS_CONTENT),value:e.content}):null,(0,N.jsxs)(`div`,{className:`mt-2 flex justify-end gap-2`,children:[(0,N.jsx)(m,{type:`button`,variant:`secondary`,onClick:r,testId:`skill-detail-close`,children:i(o.BUTTON$CLOSE)}),(0,N.jsx)(m,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>s(u,r),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,N.jsx)(k,{className:`size-4`,"aria-hidden":!0}),children:i(o.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}var Y=[o.SETTINGS$SKILLS_ADD_MODAL_STEP_1,o.SETTINGS$SKILLS_ADD_MODAL_STEP_2,o.SETTINGS$SKILLS_ADD_MODAL_STEP_3,o.SETTINGS$SKILLS_ADD_MODAL_STEP_4,o.SETTINGS$SKILLS_ADD_MODAL_STEP_5],X={cmd:(0,N.jsx)(Z,{}),path:(0,N.jsx)(Z,{}),env:(0,N.jsx)(Z,{})};function Z({children:e}){return(0,N.jsx)(`code`,{className:d(`mx-0.5 inline-block rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 align-baseline font-mono text-[11px] text-white`),children:e})}function ie(){let{t:e}=a(`openhands`),[t,n]=M.useState(!1);return M.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,N.jsxs)(`div`,{className:`relative`,children:[(0,N.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:d(`overflow-x-auto rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] p-2 pr-10 text-xs text-white`),children:G}),(0,N.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?o.BUTTON$COPIED:o.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(G),n(!0)},className:d(`absolute right-2 top-2 cursor-pointer rounded-sm border border-[var(--oh-border-subtle)]`,`bg-base-secondary p-1 text-tertiary-alt transition-colors`,`hover:bg-[var(--oh-surface)] hover:text-white disabled:cursor-default [&_path]:fill-current`),children:t?(0,N.jsx)(y,{width:14,height:14}):(0,N.jsx)(b,{width:14,height:14})})]})}function Q({i18nKey:e}){return(0,N.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,N.jsx)(i,{ns:`openhands`,i18nKey:e,components:X})})}function ae({onClose:e}){let{t}=a(`openhands`);return(0,N.jsx)(f,{onClose:e,"aria-label":t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,N.jsxs)(`div`,{"data-testid":`add-skill-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,N.jsx)(h,{onClose:e,testId:`add-skill-modal-close`}),(0,N.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,N.jsx)(`h2`,{className:d(`pr-6`,p),children:t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,N.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,N.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,N.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,N.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,N.jsx)(ie,{}),(0,N.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:Y.map(e=>(0,N.jsx)(`li`,{children:e===o.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,N.jsx)(i,{ns:`openhands`,i18nKey:e,components:X}):t(e)},e))})]}),(0,N.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,N.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,N.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,N.jsx)(`a`,{href:W,target:`_blank`,rel:`noreferrer`,"data-testid":`add-skill-modal-docs-link`,className:`self-start text-xs text-[var(--oh-muted)] transition-colors hover:text-white hover:underline`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,N.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,N.jsx)(m,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(o.BUTTON$CLOSE)})})]})})}var oe=[`all`,`agentskills`,`knowledge`,`repo`],$={all:o.SETTINGS$SKILLS_TYPE_ALL,agentskills:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:o.SETTINGS$SKILLS_TYPE_REPO};function se({value:e,onChange:t}){return(0,N.jsx)(j,{testId:`skills-type-filter`,value:e,onChange:t,options:oe,labelKeyByValue:$})}function ce({search:e,onSearchChange:t,typeFilter:n,onTypeFilterChange:r}){let{t:i}=a(`openhands`);return(0,N.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,N.jsxs)(`div`,{className:d(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,N.jsx)(l,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,N.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":i(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:d(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,N.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(o.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,N.jsx)(u,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,N.jsx)(se,{value:n,onChange:r})]})}function le(e,t){if(!t)return!0;let n=[e.name,I(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],r=t.toLowerCase();return n.some(e=>e.toLowerCase().includes(r))}function ue(){let{t:e}=a(`openhands`),{mutate:t}=v(),{data:n,isLoading:r}=g(),{data:i,isLoading:l}=D(),[u,f]=M.useState(new Set),[p,h]=M.useState(!1),[_,y]=M.useState(``),[b,x]=M.useState(`all`),[S,C]=M.useState(null),[w,T]=M.useState(!1);M.useEffect(()=>{r||!n||(f(new Set(n.disabled_skills??[])),h(!0))},[r,n?.disabled_skills]);let E=(e,t)=>{f(n=>{let r=new Set(n);return t?r.delete(e):r.add(e),r})};M.useEffect(()=>{p&&t({disabled_skills:Array.from(u)},{onError:t=>{s(c(t)||e(o.ERROR$GENERIC))}})},[u,p,t,e]);let k=r||l||!n,A=M.useMemo(()=>i?i.filter(e=>(b===`all`||e.type===b)&&le(e,_)):[],[i,b,_]);return(0,N.jsxs)(`div`,{"data-testid":`skills-settings-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,N.jsx)(O,{}),(0,N.jsx)(`main`,{className:d(ee,`h-full`),children:(0,N.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,N.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,N.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(o.SETTINGS$SKILLS_TITLE)}),(0,N.jsx)(`div`,{"data-testid":`skills-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_PAGE_DESCRIPTION)})]}),(0,N.jsx)(m,{type:`button`,variant:`secondary`,testId:`skills-add-skill-button`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>T(!0),children:e(o.SETTINGS$SKILLS_ADD_BUTTON)})]}),k&&(0,N.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,N.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!k&&(!i||i.length===0)&&(0,N.jsx)(`div`,{"data-testid":`skills-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,N.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_NO_SKILLS)})}),!k&&i&&i.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ce,{search:_,onSearchChange:y,typeFilter:b,onTypeFilterChange:x}),A.length===0?(0,N.jsx)(`div`,{"data-testid":`skills-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,N.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_NO_MATCH)})}):(0,N.jsx)(`section`,{className:d(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,N.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:A.map(e=>(0,N.jsx)(U,{skill:e,enabled:!u.has(e.name),onOpen:()=>C(e),onToggle:t=>E(e.name,t)},e.name))})})]}),S&&(0,N.jsx)(J,{skill:S,enabled:!u.has(S.name),onToggle:e=>E(S.name,e),onClose:()=>C(null)}),w&&(0,N.jsx)(ae,{onClose:()=>T(!1)})]})})]})}var de=r(ue);export{de as default};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as i}from"./Trans-DqF_OEZB.js";import{t as a}from"./useTranslation-Cbf5AGg_.js";import{t as o}from"./declaration-BGsHjPEW.js";import{E as s,S as c}from"./active-backend-context-B8rMv0X9.js";import{t as l}from"./search-dIQ09UY2.js";import{t as u}from"./x-ZE4iplpF.js";import{t as d}from"./utils-DB9LsAzA.js";import{t as f}from"./modal-backdrop-zVwfOJZr.js";import{n as p}from"./modal-classes-3qT9Ap7Q.js";import{t as m}from"./brand-button-B1izLAdR.js";import{t as h}from"./modal-close-button-BcIBUdSq.js";import{r as g}from"./use-settings-CyxSlyTQ.js";import{t as _}from"./skills-EqzxYBvT.js";import{t as v}from"./use-save-settings-Chvzeu2s.js";import{t as y}from"./checkmark-h7udgXMM.js";import{t as b}from"./copy-BLmGeJcd.js";import{a as x,r as S}from"./extension-module-card-classes-9V3J9J_b.js";import{t as C}from"./settings-switch-Bes8dIlV.js";import{n as w,t as T}from"./skill-card-pill-row-BPYKQ3IN.js";import{n as E}from"./circle-plus-check-toggle-DoFIjVE0.js";import{t as D}from"./use-skills-xrVoKYrF.js";import{n as O}from"./extensions-navigation-CPNjMNvR.js";import{n as k,t as A}from"./use-launch-skill-in-chat-DJWEfVc5.js";import{t as j}from"./enum-filter-dropdown-JLYv1t8L.js";import{n as ee}from"./settings-like-page-layout-classes-Cdl6jOe5.js";var M=e(t(),1),N=n();function P({skillName:e,className:t}){return(0,N.jsx)(`span`,{"aria-hidden":`true`,title:e,"data-testid":`skill-icon-${e}`,className:d(`inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden`,`rounded-lg border border-white/10 bg-surface-raised text-white`,`shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,`[&>svg]:h-5 [&>svg]:w-5`,t),children:(0,N.jsx)(_,{})})}var F=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function te(e){let t=e.match(/^description:\s*\|\s*\r?\n((?:[ \t].*(?:\r?\n|$))+)/m);if(t)return t[1].replace(/^[ \t]+/gm,``).trim();let n=e.match(/^description:\s*['"](.+?)['"]\s*$/m);if(n)return n[1].trim();let r=e.match(/^description:\s*(.+)\s*$/m);return r?r[1].trim():null}function ne(e){let t=e.match(F);return t?e.slice(t[0].length).trim():e.trim()}function re(e){let t=e.replace(/^#+\s+[^\n]+\n+/,``).trim();return t.split(/\n\s*\n/).map(e=>e.replace(/\s+/g,` `).trim()).find(e=>e.length>0)??t.replace(/\s+/g,` `).trim()}function I(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(F);if(r){let e=te(r[1]);if(e)return e}return re(ne(n))}var L=`inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-text-secondary/35 bg-text-secondary/12 px-2 py-0.5 text-[11px] font-medium leading-4 text-tertiary-light`,R={agentskills:{labelKey:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:o.SETTINGS$SKILLS_TYPE_REPO}};function z({type:e}){let{t}=a(`openhands`),n=R[e];return(0,N.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:L,children:t(n.labelKey)})}function B(e,t,n){if(e)return`${e}-${t}-${n}`}function V(e,t,n={}){let{variant:r=`card`,testIdPrefix:i}=n,a=[{id:`type-${e.type}`,node:(0,N.jsx)(z,{type:e.type})}];if(e.version&&a.push({id:`version-${e.version}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`version`)??`skill-version-${e.name}`,className:T,children:t(o.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&a.push({id:`license-${e.license}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`license`),className:T,children:e.license})}),r===`detail`&&e.compatibility&&a.push({id:`compatibility-${e.compatibility}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`compatibility`),className:T,children:e.compatibility})}),e.disable_model_invocation&&a.push({id:`disable-model-invocation`,node:(0,N.jsxs)(`span`,{"data-testid":B(i,e.name,`disable-model-invocation`)??`skill-disable-model-invocation-${e.name}`,className:`inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[rgba(248,113,113,0.35)] bg-[rgba(248,113,113,0.12)] px-2 py-0.5 text-[11px] font-medium leading-4 text-[#fca5a5]`,children:[(0,N.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(o.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)a.push({id:`allowed-tool-${t}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`tool-${t}`),className:d(T,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))a.push({id:`metadata-${t}`,node:(0,N.jsxs)(`span`,{"data-testid":B(i,e.name,`metadata-${t}`),className:T,children:[(0,N.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])a.push({id:`trigger-${t}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`trigger-${t}`),className:T,children:t})});return a}function H(e){let t=e?.trim();return t?!!(/^https?:\/\//i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~`)||/^[A-Za-z]:[\\/]/.test(t)||t.includes(`/`)||t.includes(`\\`)):!1}function U({skill:e,enabled:t,onOpen:n,onToggle:r}){let{t:i}=a(`openhands`),[s,c]=M.useState(!1),l=I(e),u=M.useMemo(()=>V(e,i),[e,i]),f=H(e.source);return M.useEffect(()=>{if(!s)return;let e=setTimeout(()=>c(!1),2e3);return()=>clearTimeout(e)},[s]),(0,N.jsx)(`div`,{"data-testid":`skill-card-${e.name}`,role:`button`,tabIndex:0,onClick:n,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())},className:d(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,x,S),children:(0,N.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,N.jsx)(P,{skillName:e.name}),(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,N.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,N.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,N.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,N.jsx)(`p`,{"data-testid":`skill-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),f?(0,N.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":i(s?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:s,onClick:async t=>{t.stopPropagation(),e.source&&(await navigator.clipboard.writeText(e.source),c(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:s?(0,N.jsx)(y,{width:12,height:12}):(0,N.jsx)(b,{width:12,height:12})}):null]}):null]}),(0,N.jsx)(E,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:r,disableTooltipKey:o.COMMON$DISABLE})]}),l?(0,N.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,N.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:l})}):null,u.length>0?(0,N.jsx)(w,{pills:u,testId:`skill-triggers-${e.name}`}):null]})]})})}var W=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,G=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`;function K(e){return e.name===`add-skill`?G:`/${e.name} `}function q({testId:e,label:t,value:n}){return(0,N.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,N.jsx)(`span`,{className:`text-sm`,children:t}),(0,N.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
2
+ `).length)),className:d(`bg-[var(--oh-surface-raised)] border border-[var(--oh-border-subtle)] w-full min-w-0 rounded-sm p-2 text-sm`,`cursor-not-allowed resize-none custom-scrollbar`)})]})}function J({skill:e,enabled:t,onToggle:n,onClose:r}){let{t:i}=a(`openhands`),s=A(),[c,l]=M.useState(!1),u=M.useMemo(()=>K(e),[e]),d=I(e),g=M.useMemo(()=>V(e,i,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,i]),_=H(e.source);return M.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,N.jsx)(f,{onClose:r,"aria-label":e.name,children:(0,N.jsxs)(`div`,{"data-testid":`skill-detail-modal`,"data-skill-name":e.name,className:`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[85vh] overflow-y-auto custom-scrollbar`,children:[(0,N.jsx)(h,{onClose:r,testId:`skill-detail-modal-close`}),(0,N.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,N.jsx)(P,{skillName:e.name}),(0,N.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,N.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:p,children:e.name}),e.source?(0,N.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,N.jsx)(`p`,{"data-testid":`skill-modal-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),_?(0,N.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":i(c?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async()=>{e.source&&(await navigator.clipboard.writeText(e.source),l(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:c?(0,N.jsx)(y,{width:12,height:12}):(0,N.jsx)(b,{width:12,height:12})}):null]}):null]})]}),(0,N.jsx)(`div`,{"data-testid":`skill-modal-enable-row-${e.name}`,className:`flex w-full items-center rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:(0,N.jsx)(C,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:i(t?o.SETTINGS$SKILLS_ENABLED:o.SETTINGS$SKILLS_DISABLED)})}),d?(0,N.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`text-xs text-tertiary-light`,children:d}):null,g.length>0?(0,N.jsx)(w,{pills:g,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,N.jsx)(q,{testId:`skill-modal-field-content-${e.name}`,label:i(o.SETTINGS$SKILLS_CONTENT),value:e.content}):null,(0,N.jsxs)(`div`,{className:`mt-2 flex justify-end gap-2`,children:[(0,N.jsx)(m,{type:`button`,variant:`secondary`,onClick:r,testId:`skill-detail-close`,children:i(o.BUTTON$CLOSE)}),(0,N.jsx)(m,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>s(u,r),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,N.jsx)(k,{className:`size-4`,"aria-hidden":!0}),children:i(o.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}var Y=[o.SETTINGS$SKILLS_ADD_MODAL_STEP_1,o.SETTINGS$SKILLS_ADD_MODAL_STEP_2,o.SETTINGS$SKILLS_ADD_MODAL_STEP_3,o.SETTINGS$SKILLS_ADD_MODAL_STEP_4,o.SETTINGS$SKILLS_ADD_MODAL_STEP_5],X={cmd:(0,N.jsx)(Z,{}),path:(0,N.jsx)(Z,{}),env:(0,N.jsx)(Z,{})};function Z({children:e}){return(0,N.jsx)(`code`,{className:d(`mx-0.5 inline-block rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 align-baseline font-mono text-[11px] text-white`),children:e})}function ie(){let{t:e}=a(`openhands`),[t,n]=M.useState(!1);return M.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,N.jsxs)(`div`,{className:`relative`,children:[(0,N.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:d(`overflow-x-auto rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] p-2 pr-10 text-xs text-white`),children:G}),(0,N.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?o.BUTTON$COPIED:o.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(G),n(!0)},className:d(`absolute right-2 top-2 cursor-pointer rounded-sm border border-[var(--oh-border-subtle)]`,`bg-base-secondary p-1 text-tertiary-alt transition-colors`,`hover:bg-[var(--oh-surface)] hover:text-white disabled:cursor-default [&_path]:fill-current`),children:t?(0,N.jsx)(y,{width:14,height:14}):(0,N.jsx)(b,{width:14,height:14})})]})}function Q({i18nKey:e}){return(0,N.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,N.jsx)(i,{ns:`openhands`,i18nKey:e,components:X})})}function ae({onClose:e}){let{t}=a(`openhands`);return(0,N.jsx)(f,{onClose:e,"aria-label":t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,N.jsxs)(`div`,{"data-testid":`add-skill-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,N.jsx)(h,{onClose:e,testId:`add-skill-modal-close`}),(0,N.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,N.jsx)(`h2`,{className:d(`pr-6`,p),children:t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,N.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,N.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,N.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,N.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,N.jsx)(ie,{}),(0,N.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:Y.map(e=>(0,N.jsx)(`li`,{children:e===o.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,N.jsx)(i,{ns:`openhands`,i18nKey:e,components:X}):t(e)},e))})]}),(0,N.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,N.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,N.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,N.jsx)(`a`,{href:W,target:`_blank`,rel:`noreferrer`,"data-testid":`add-skill-modal-docs-link`,className:`self-start text-xs text-[var(--oh-muted)] transition-colors hover:text-white hover:underline`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,N.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,N.jsx)(m,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(o.BUTTON$CLOSE)})})]})})}var oe=[`all`,`agentskills`,`knowledge`,`repo`],$={all:o.SETTINGS$SKILLS_TYPE_ALL,agentskills:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:o.SETTINGS$SKILLS_TYPE_REPO};function se({value:e,onChange:t}){return(0,N.jsx)(j,{testId:`skills-type-filter`,value:e,onChange:t,options:oe,labelKeyByValue:$})}function ce({search:e,onSearchChange:t,typeFilter:n,onTypeFilterChange:r}){let{t:i}=a(`openhands`);return(0,N.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,N.jsxs)(`div`,{className:d(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,N.jsx)(l,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,N.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":i(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:d(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,N.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(o.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,N.jsx)(u,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,N.jsx)(se,{value:n,onChange:r})]})}function le(e,t){if(!t)return!0;let n=[e.name,I(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],r=t.toLowerCase();return n.some(e=>e.toLowerCase().includes(r))}function ue(){let{t:e}=a(`openhands`),{mutate:t}=v(),{data:n,isLoading:r}=g(),{data:i,isLoading:l}=D(),[u,f]=M.useState(new Set),[p,h]=M.useState(!1),[_,y]=M.useState(``),[b,x]=M.useState(`all`),[S,C]=M.useState(null),[w,T]=M.useState(!1);M.useEffect(()=>{r||!n||(f(new Set(n.disabled_skills??[])),h(!0))},[r,n?.disabled_skills]);let E=(e,t)=>{f(n=>{let r=new Set(n);return t?r.delete(e):r.add(e),r})};M.useEffect(()=>{p&&t({disabled_skills:Array.from(u)},{onError:t=>{c(s(t)||e(o.ERROR$GENERIC))}})},[u,p,t,e]);let k=r||l||!n,A=M.useMemo(()=>i?i.filter(e=>(b===`all`||e.type===b)&&le(e,_)):[],[i,b,_]);return(0,N.jsxs)(`div`,{"data-testid":`skills-settings-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,N.jsx)(O,{}),(0,N.jsx)(`main`,{className:d(ee,`h-full`),children:(0,N.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,N.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,N.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(o.SETTINGS$SKILLS_TITLE)}),(0,N.jsx)(`div`,{"data-testid":`skills-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_PAGE_DESCRIPTION)})]}),(0,N.jsx)(m,{type:`button`,variant:`secondary`,testId:`skills-add-skill-button`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>T(!0),children:e(o.SETTINGS$SKILLS_ADD_BUTTON)})]}),k&&(0,N.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,N.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!k&&(!i||i.length===0)&&(0,N.jsx)(`div`,{"data-testid":`skills-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,N.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_NO_SKILLS)})}),!k&&i&&i.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ce,{search:_,onSearchChange:y,typeFilter:b,onTypeFilterChange:x}),A.length===0?(0,N.jsx)(`div`,{"data-testid":`skills-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,N.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_NO_MATCH)})}):(0,N.jsx)(`section`,{className:d(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,N.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:A.map(e=>(0,N.jsx)(U,{skill:e,enabled:!u.has(e.name),onOpen:()=>C(e),onToggle:t=>E(e.name,t)},e.name))})})]}),S&&(0,N.jsx)(J,{skill:S,enabled:!u.has(S.name),onToggle:e=>E(S.name,e),onClose:()=>C(null)}),w&&(0,N.jsx)(ae,{onClose:()=>T(!1)})]})})]})}var de=r(ue);export{de as default};
@@ -1 +1 @@
1
- import{t as e}from"./createLucideIcon-CVAsW2Yo.js";var t=e(`square-chevron-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`m10 8 4 4-4 4`,key:`1wy4r4`}]]);export{t};
1
+ import{t as e}from"./createLucideIcon-D4Tak8A1.js";var t=e(`square-chevron-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`m10 8 4 4-4 4`,key:`1wy4r4`}]]);export{t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,a as n,bt as r}from"./vendor-styling-CI0PQ3ab.js";import{t as i}from"./utils-D3U3rlqr.js";var a=e(t(),1),o=r();function s(e){return a.Children.count(e)===1&&a.isValidElement(e)?e:(0,o.jsx)(`span`,{className:`inline-flex`,children:e})}function c({children:e,content:t,tooltipClassName:r,placement:a=`right`,showArrow:c=!1,closeDelay:l=100,shouldFlip:u,offset:d=7}){return(0,o.jsx)(n,{content:t,closeDelay:l,placement:a,offset:d,shouldFlip:u,className:i(`bg-white text-black`,r),showArrow:c,disableAnimation:!1,classNames:{content:i(`z-[9999] rounded-md px-2 py-1 text-xs font-medium shadow-md`,`!bg-white !text-black`,r)},children:s(e)})}export{c as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,a as n,bt as r}from"./vendor-styling-CI0PQ3ab.js";import{t as i}from"./utils-DB9LsAzA.js";var a=e(t(),1),o=r();function s(e){return a.Children.count(e)===1&&a.isValidElement(e)?e:(0,o.jsx)(`span`,{className:`inline-flex`,children:e})}function c({children:e,content:t,tooltipClassName:r,placement:a=`right`,showArrow:c=!1,closeDelay:l=100,shouldFlip:u,offset:d=7}){return(0,o.jsx)(n,{content:t,closeDelay:l,placement:a,offset:d,shouldFlip:u,className:i(`bg-white text-black`,r),showArrow:c,disableAnimation:!1,classNames:{content:i(`z-[9999] rounded-md px-2 py-1 text-xs font-medium shadow-md`,`!bg-white !text-black`,r)},children:s(e)})}export{c as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{A as r,C as i,E as a,O as o,T as s,d as c,f as l,g as u,i as d,j as f,k as p,u as m,w as h,x as g,y as _}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~epa72zsm-B4rXs7Zd.js";var v=class extends f{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=c(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),b(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return x(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return x(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof i(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!s(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&S(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||i(this.options.enabled,this.#t)!==i(t.enabled,this.#t)||h(this.options.staleTime,this.#t)!==h(t.staleTime,this.#t))&&this.#g();let a=this.#_();r&&(this.#t!==n||i(this.options.enabled,this.#t)!==i(t.enabled,this.#t)||a!==this.#p)&&this.#v(a)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return w(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(_)),t}#g(){this.#b();let e=h(this.options.staleTime,this.#t);if(l.isServer()||this.#r.isStale||!u(e))return;let t=o(this.#r.dataUpdatedAt,e)+1;this.#d=p.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(l.isServer()||i(this.options.enabled,this.#t)===!1||!u(this.#p)||this.#p===0)&&(this.#f=p.setInterval(()=>{(this.options.refetchIntervalInBackground||r.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(p.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(p.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,a=this.#r,o=this.#i,s=this.#a,l=e===n?this.#n:e.state,{state:u}=e,f={...u},p=!1,m;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&b(e,t),o=i&&S(e,n,t,r);(a||o)&&(f={...f,...d(u.data,e.options)}),t._optimisticResults===`isRestoring`&&(f.fetchStatus=`idle`)}let{error:h,errorUpdatedAt:_,status:v}=f;m=f.data;let y=!1;if(t.placeholderData!==void 0&&m===void 0&&v===`pending`){let e;a?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(e=a.data,y=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(v=`success`,m=g(a?.data,e,t),p=!0)}if(t.select&&m!==void 0&&!y)if(a&&m===o?.data&&t.select===this.#c)m=this.#l;else try{this.#c=t.select,m=t.select(m),m=g(a?.data,m,t),this.#l=m,this.#s=null}catch(e){this.#s=e}this.#s&&(h=this.#s,m=this.#l,_=Date.now(),v=`error`);let x=f.fetchStatus===`fetching`,w=v===`pending`,T=v===`error`,E=w&&x,D=m!==void 0,O={status:v,fetchStatus:f.fetchStatus,isPending:w,isSuccess:v===`success`,isError:T,isInitialLoading:E,isLoading:E,data:m,dataUpdatedAt:f.dataUpdatedAt,error:h,errorUpdatedAt:_,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:x,isRefetching:x&&!w,isLoadingError:T&&!D,isPaused:f.fetchStatus===`paused`,isPlaceholderData:p,isRefetchError:T&&D,isStale:C(e,t),refetch:this.refetch,promise:this.#o,isEnabled:i(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=O.data!==void 0,r=O.status===`error`&&!t,i=e=>{r?e.reject(O.error):t&&e.resolve(O.data)},a=()=>{i(this.#o=O.promise=c())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||O.data!==o.value)&&a();break;case`rejected`:(!r||O.error!==o.reason)&&a();break}}return O}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!s(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){m.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function y(e,t){return i(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&i(t.retryOnMount,e)===!1)}function b(e,t){return y(e,t)||e.state.data!==void 0&&x(e,t,t.refetchOnMount)}function x(e,t,n){if(i(t.enabled,e)!==!1&&h(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&C(e,t)}return!1}function S(e,t,n,r){return(e!==t||i(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&C(e,n)}function C(e,t){return i(t.enabled,e)!==!1&&e.isStaleByTime(h(t.staleTime,e))}function w(e,t){return!s(e.getCurrentResult(),t)}var T=e(t(),1),E=T.createContext(!1),D=()=>T.useContext(E);E.Provider,n();function O(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var k=T.createContext(O()),A=()=>T.useContext(k),j=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?a(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},M=e=>{T.useEffect(()=>{e.clearReset()},[e])},N=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||a(n,[e.error,r])),P=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},F=(e,t)=>e.isLoading&&e.isFetching&&!t,I=(e,t)=>e?.suspense&&t.isPending,L=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});export{j as a,A as c,F as i,D as l,L as n,N as o,I as r,M as s,P as t,v as u};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{A as r,C as i,E as a,O as o,T as s,d as c,f as l,g as u,i as d,j as f,k as p,u as m,w as h,x as g,y as _}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";var v=class extends f{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=c(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),b(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return x(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return x(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof i(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!s(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&S(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||i(this.options.enabled,this.#t)!==i(t.enabled,this.#t)||h(this.options.staleTime,this.#t)!==h(t.staleTime,this.#t))&&this.#g();let a=this.#_();r&&(this.#t!==n||i(this.options.enabled,this.#t)!==i(t.enabled,this.#t)||a!==this.#p)&&this.#v(a)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return w(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(_)),t}#g(){this.#b();let e=h(this.options.staleTime,this.#t);if(l.isServer()||this.#r.isStale||!u(e))return;let t=o(this.#r.dataUpdatedAt,e)+1;this.#d=p.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(l.isServer()||i(this.options.enabled,this.#t)===!1||!u(this.#p)||this.#p===0)&&(this.#f=p.setInterval(()=>{(this.options.refetchIntervalInBackground||r.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(p.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(p.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,a=this.#r,o=this.#i,s=this.#a,l=e===n?this.#n:e.state,{state:u}=e,f={...u},p=!1,m;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&b(e,t),o=i&&S(e,n,t,r);(a||o)&&(f={...f,...d(u.data,e.options)}),t._optimisticResults===`isRestoring`&&(f.fetchStatus=`idle`)}let{error:h,errorUpdatedAt:_,status:v}=f;m=f.data;let y=!1;if(t.placeholderData!==void 0&&m===void 0&&v===`pending`){let e;a?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(e=a.data,y=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(v=`success`,m=g(a?.data,e,t),p=!0)}if(t.select&&m!==void 0&&!y)if(a&&m===o?.data&&t.select===this.#c)m=this.#l;else try{this.#c=t.select,m=t.select(m),m=g(a?.data,m,t),this.#l=m,this.#s=null}catch(e){this.#s=e}this.#s&&(h=this.#s,m=this.#l,_=Date.now(),v=`error`);let x=f.fetchStatus===`fetching`,w=v===`pending`,T=v===`error`,E=w&&x,D=m!==void 0,O={status:v,fetchStatus:f.fetchStatus,isPending:w,isSuccess:v===`success`,isError:T,isInitialLoading:E,isLoading:E,data:m,dataUpdatedAt:f.dataUpdatedAt,error:h,errorUpdatedAt:_,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:x,isRefetching:x&&!w,isLoadingError:T&&!D,isPaused:f.fetchStatus===`paused`,isPlaceholderData:p,isRefetchError:T&&D,isStale:C(e,t),refetch:this.refetch,promise:this.#o,isEnabled:i(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=O.data!==void 0,r=O.status===`error`&&!t,i=e=>{r?e.reject(O.error):t&&e.resolve(O.data)},a=()=>{i(this.#o=O.promise=c())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||O.data!==o.value)&&a();break;case`rejected`:(!r||O.error!==o.reason)&&a();break}}return O}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!s(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){m.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function y(e,t){return i(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&i(t.retryOnMount,e)===!1)}function b(e,t){return y(e,t)||e.state.data!==void 0&&x(e,t,t.refetchOnMount)}function x(e,t,n){if(i(t.enabled,e)!==!1&&h(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&C(e,t)}return!1}function S(e,t,n,r){return(e!==t||i(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&C(e,n)}function C(e,t){return i(t.enabled,e)!==!1&&e.isStaleByTime(h(t.staleTime,e))}function w(e,t){return!s(e.getCurrentResult(),t)}var T=e(t(),1),E=T.createContext(!1),D=()=>T.useContext(E);E.Provider,n();function O(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var k=T.createContext(O()),A=()=>T.useContext(k),j=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?a(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},M=e=>{T.useEffect(()=>{e.clearReset()},[e])},N=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||a(n,[e.error,r])),P=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},F=(e,t)=>e.isLoading&&e.isFetching&&!t,I=(e,t)=>e?.suspense&&t.isPending,L=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});export{j as a,A as c,F as i,D as l,L as n,N as o,I as r,M as s,P as t,v as u};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-CDRCKC9-.js";import{t as i}from"./declaration-gq8V5eTU.js";import{t as a}from"./utils-D3U3rlqr.js";import{r as o}from"./typography-D8mHDeNG.js";import{t as s}from"./u-check-circle-BqoIxNz_.js";import{n as c,t as l}from"./u-check-circle-half-LiwZkuFe.js";import{t as u}from"./use-task-list-AVBLbbcR.js";import{t as d}from"./conversation-tab-empty-state-B2dDYEwf.js";var f=e(t(),1),p=n();function m({task:e}){let{t}=r(`openhands`),n=(0,f.useMemo)(()=>{switch(e.status){case`todo`:return(0,p.jsx)(c,{className:`w-4 h-4 text-[#ffffff]`});case`in_progress`:return(0,p.jsx)(l,{className:`w-4 h-4 text-[#ffffff]`});case`done`:return(0,p.jsx)(s,{className:`w-4 h-4 text-[var(--oh-muted)]`});default:return(0,p.jsx)(c,{className:`w-4 h-4 text-[#ffffff]`})}},[e.status]),u=e.status===`done`;return(0,p.jsxs)(`div`,{className:`flex gap-2 items-center w-full`,"data-name":`item`,children:[(0,p.jsx)(`div`,{className:`shrink-0`,children:n}),(0,p.jsxs)(`div`,{className:`flex flex-col items-start justify-center leading-[16px] text-nowrap whitespace-pre font-normal`,children:[(0,p.jsx)(o.Text,{className:a(`text-[12px]`,u?`text-[var(--oh-muted)]`:`text-white`),children:e.title}),e.notes&&(0,p.jsxs)(o.Text,{className:`text-[10px] text-[var(--oh-muted)]`,children:[t(i.TASK_TRACKING_OBSERVATION$TASK_NOTES),`: `,e.notes]})]})]})}function h(){let{t:e}=r(`openhands`),{taskList:t}=u();return t.length===0?(0,p.jsx)(d,{icon:(0,p.jsx)(s,{}),children:e(i.COMMON$NO_TASKS)}):(0,p.jsx)(`main`,{className:`h-full overflow-y-auto flex flex-col custom-scrollbar-always`,children:t.map(e=>(0,p.jsx)(`div`,{"data-active":e.status===`in_progress`?`true`:`false`,className:a(`px-4 py-2`,e.status===`in_progress`&&`bg-[var(--oh-surface-raised)]`),children:(0,p.jsx)(m,{task:e})},e.id))})}export{h as default};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./utils-DB9LsAzA.js";import{r as o}from"./typography-CzfoD9DY.js";import{t as s}from"./u-check-circle-BqoIxNz_.js";import{n as c,t as l}from"./u-check-circle-half-MsShT8Ec.js";import{t as u}from"./use-task-list-CfisapBW.js";import{t as d}from"./conversation-tab-empty-state-CNUmIms2.js";var f=e(t(),1),p=n();function m({task:e}){let{t}=r(`openhands`),n=(0,f.useMemo)(()=>{switch(e.status){case`todo`:return(0,p.jsx)(c,{className:`w-4 h-4 text-[#ffffff]`});case`in_progress`:return(0,p.jsx)(l,{className:`w-4 h-4 text-[#ffffff]`});case`done`:return(0,p.jsx)(s,{className:`w-4 h-4 text-[var(--oh-muted)]`});default:return(0,p.jsx)(c,{className:`w-4 h-4 text-[#ffffff]`})}},[e.status]),u=e.status===`done`;return(0,p.jsxs)(`div`,{className:`flex gap-2 items-center w-full`,"data-name":`item`,children:[(0,p.jsx)(`div`,{className:`shrink-0`,children:n}),(0,p.jsxs)(`div`,{className:`flex flex-col items-start justify-center leading-[16px] text-nowrap whitespace-pre font-normal`,children:[(0,p.jsx)(o.Text,{className:a(`text-[12px]`,u?`text-[var(--oh-muted)]`:`text-white`),children:e.title}),e.notes&&(0,p.jsxs)(o.Text,{className:`text-[10px] text-[var(--oh-muted)]`,children:[t(i.TASK_TRACKING_OBSERVATION$TASK_NOTES),`: `,e.notes]})]})]})}function h(){let{t:e}=r(`openhands`),{taskList:t}=u();return t.length===0?(0,p.jsx)(d,{icon:(0,p.jsx)(s,{}),children:e(i.COMMON$NO_TASKS)}):(0,p.jsx)(`main`,{className:`h-full overflow-y-auto flex flex-col custom-scrollbar-always`,children:t.map(e=>(0,p.jsx)(`div`,{"data-active":e.status===`in_progress`?`true`:`false`,className:a(`px-4 py-2`,e.status===`in_progress`&&`bg-[var(--oh-surface-raised)]`),children:(0,p.jsx)(m,{task:e})},e.id))})}export{h as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor~module-D5a_AClf.js","assets/rolldown-runtime-BFRubm34.js"])))=>i.map(i=>d[i]);
2
+ import{St as e}from"./vendor-styling-CI0PQ3ab.js";import{i as t,n,r}from"./client-source-BZK8vRs2.js";var i=`openhands-telemetry-consent`,a=`openhands-telemetry-consent-pending-cloud-sync`,o=`openhands-telemetry-consent-change`,s=`openhands-telemetry-first-use`,c=`openhands-telemetry-session`,l=`agent-canvas`,u=`phc_BgzfxKdgsYMLFTmJqt424ZoyVHvKFfrwttLimzdYTKFK`,d=`https://z.openhands.dev`,f=`https://us.posthog.com`,p=null,m=null,h,g={},_=!1,v,y=0,b=-1,x=Object.freeze({client_source:n,client_version:r,package_name:t.name,package_version:t.version});function S(e){return e?{...e,properties:{...e.properties,...x}}:null}function C(e){_||P()!==`granted`?e.opt_out_capturing():e.opt_in_capturing()}function w(e,t=!1){e.reset(t),b=-1,C(e)}function T(e){if(v===void 0||!H())return;let t=v?.distinctId,n=e.get_property(`$user_id`);if(n!=null&&n!==t&&w(e),v===null){b=y;return}(e.get_property(`$user_id`)!==v.distinctId||b!==y)&&(e.identify(v.distinctId,v.properties),b=y)}function E(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}function D(e){if(e===!1){if(_)return;_=!0,p?.opt_out_capturing(),L();return}let t=_;if(_=!1,!p&&!m){let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));g={...g,...t}}t&&(p&&(C(p),T(p)),L())}function O(){return _?null:{apiKey:g.apiKey||u,apiHost:g.apiHost||d,uiHost:g.uiHost||f}}function k(){return typeof window<`u`&&typeof localStorage<`u`}async function A(){if(!k())return null;if(p)return p;try{let{default:t}=await e(async()=>{let{default:e}=await import(`./vendor~module-D5a_AClf.js`).then(e=>e.t);return{default:e}},__vite__mapDeps([0,1]));return t}catch{return null}}function j(){return!!(_||typeof process<`u`&&{}?.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`))}function M(e){p||(h=e)}async function N(e=!1){if(p)return p;if(m)return m;m=(async()=>{let t=O();if(!t)return null;let n=await A();if(!n)return null;let r=n.init(t.apiKey,{api_host:t.apiHost,ui_host:t.uiHost,opt_out_capturing_by_default:!e,capture_pageview:!1,autocapture:!1,persistence:`localStorage`,persistence_name:l,consent_persistence_name:`${l}-consent`,person_profiles:`identified_only`,disable_session_recording:!0,bootstrap:h,before_send:S},l);return r?(p=r,h=void 0,_?p.opt_out_capturing():P()===`granted`?(p.opt_in_capturing(),T(p)):e||p.opt_out_capturing(),p):null})();try{return await m}finally{p||(m=null)}}function P(){if(!k())return`pending`;if(j())return`denied`;try{let e=localStorage.getItem(i);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}function F(){if(!k())return null;try{let e=localStorage.getItem(a);return e===`granted`||e===`denied`?e:null}catch{return null}}function I(e){if(!k())return()=>{};let t=t=>{(t.key===i||t.key===a)&&e()};return window.addEventListener(o,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(o,e),window.removeEventListener(`storage`,t)}}function L(){k()&&window.dispatchEvent(new Event(o))}function R(e){if(k())try{localStorage.setItem(a,e)}catch{}}function z(e){if(k())try{if(e!==void 0&&localStorage.getItem(a)!==e)return;localStorage.removeItem(a),L()}catch{}}async function B(e,{syncToCloud:t=!0}={}){if(k())try{if(localStorage.setItem(i,e),_)return;let t=p??await N();if(!t)return;e===`granted`?(t.opt_in_capturing(),T(t)):t.get_property(`$user_id`)==null?t.opt_out_capturing():w(t)}catch{}finally{t&&R(e),L()}}async function V(e,t={}){let n=e===null?null:{distinctId:e,properties:t};if(v===n||v!=null&&n!==null&&v.distinctId===n.distinctId&&E(v.properties,t)||(v=n,y+=1,b=-1,!H()))return;let r=p??await N();r&&H()&&T(r)}function H(){return P()===`granted`}function U(){if(!k())return!1;try{return localStorage.getItem(s)===`true`}catch{return!1}}function W(){if(k())try{localStorage.setItem(s,`true`)}catch{}}async function G(){if(j()||U())return;let e=await N(!0);!e||j()||((e.has_opted_out_capturing?.()??!1)&&e.opt_in_capturing(),e.capture(`canvas_install`,{platform:typeof navigator<`u`?navigator.platform:`unknown`,user_agent:typeof navigator<`u`?navigator.userAgent:`unknown`,referrer:typeof document<`u`?document.referrer:``,url_origin:typeof window<`u`?window.location.origin:``,embedded:typeof window<`u`&&window.self!==window.top}),W(),P()!==`granted`&&e.opt_out_capturing())}function K(){if(!k())return!1;try{return sessionStorage.getItem(c)===`true`}catch{return!1}}function q(){if(k())try{sessionStorage.setItem(c,`true`)}catch{}}async function J(){if(!H())return null;let e=await N();return!e||!H()?null:(e.has_opted_out_capturing?.()&&e.opt_in_capturing(),T(e),e)}async function Y(){if(K())return;let e=await J();e&&(e.capture(`canvas_new_session`,{is_first_use:!U()}),q())}async function X(e,t={}){let n=await J();n&&n.capture(e,t)}async function Z(e,t={}){let n=await J();n&&n.captureException(e,t)}async function Q(){if(k()){try{localStorage.removeItem(i),localStorage.removeItem(s)}catch{}z();try{sessionStorage.removeItem(c)}catch{}v=null,y+=1,b=-1;try{p&&w(p,!0)}catch{try{p?.opt_out_capturing()}catch{}}}}export{F as a,B as c,X as d,Z as f,D as i,V as l,Y as m,Q as n,P as o,G as p,M as r,N as s,z as t,I as u};
@@ -1,3 +1,3 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-CDRCKC9-.js";import{t as i}from"./declaration-gq8V5eTU.js";import{t as a}from"./square-chevron-right-Czw3FFWc.js";import{t as o,w as s}from"./utils-D3U3rlqr.js";import{t as c}from"./use-agent-state-DHZO1obC.js";import{t as l}from"./command-store-D8J5LMW1.js";import{t as u}from"./runtime-waiting-state-BsXLElvN.js";import{n as d,t as f}from"./vendor~terminal-aeP3PnKf.js";import{t as p}from"./conversation-tab-empty-state-B2dDYEwf.js";var m=e(t(),1),h=`[Python Interpreter: `,g=e=>{let t=e.indexOf(h);if(t<0)return e;let n=t+21;return e.indexOf(`]`,n)<=n?e:e.substring(0,t).trim()},_=(e,t,n=!1)=>{let{content:r,type:i}=e;if(i===`input`&&n)return;let a=(r||``).replaceAll(`
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./square-chevron-right-DE-JN-2Z.js";import{t as o,w as s}from"./utils-DB9LsAzA.js";import{t as c}from"./use-agent-state-C6peDXUm.js";import{t as l}from"./command-store-D8J5LMW1.js";import{t as u}from"./runtime-waiting-state-CnyVhX4T.js";import{n as d,t as f}from"./vendor~terminal-CnKZILnC.js";import{t as p}from"./conversation-tab-empty-state-CNUmIms2.js";var m=e(t(),1),h=`[Python Interpreter: `,g=e=>{let t=e.indexOf(h);if(t<0)return e;let n=t+21;return e.indexOf(`]`,n)<=n?e:e.substring(0,t).trim()},_=(e,t,n=!1)=>{let{content:r,type:i}=e;if(i===`input`&&n)return;let a=(r||``).replaceAll(`
2
2
  `,`\r
3
3
  `).trim();a&&t.writeln(g(a))},v=(e,t,n)=>{if(!e||!t||!n||window.getComputedStyle(n).display===`none`)return!1;let{clientWidth:r,clientHeight:i}=n;return!(r===0||i===0||!e.element)};function y(e){let t=e.ownerDocument.createElement(`span`);t.style.color=`var(--oh-surface-foreground)`,t.style.position=`absolute`,t.style.visibility=`hidden`,t.style.pointerEvents=`none`,e.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n&&n!==`rgba(0, 0, 0, 0)`?n:getComputedStyle(e).color}var b={current:0},x=()=>{let e=l(e=>e.commands),t=m.useRef(null),n=m.useRef(null),r=m.useRef(null),i=b,a=m.useRef(!1),o=e=>new f({fontFamily:`Menlo, Monaco, 'Courier New', monospace`,fontSize:14,scrollback:1e4,scrollSensitivity:1,fastScrollSensitivity:5,disableStdin:!0,allowTransparency:!0,theme:{background:`rgba(0, 0, 0, 0)`,foreground:y(e)}}),s=m.useCallback(()=>{a.current||v(t.current,n.current,r.current)&&n.current.fit()},[]),c=()=>{t.current&&(n.current&&t.current.loadAddon(n.current),r.current&&(t.current.open(r.current),t.current.write(`\x1B[?25l`),s()))};return m.useEffect(()=>{a.current=!1;let s=r.current;if(s){if(t.current=o(s),n.current=new d,r.current&&(c(),e.length>0)){for(let n=0;n<e.length;n+=1)e[n].type===`input`&&t.current.write(`$ `),_(e[n],t.current,!1);i.current=e.length}return()=>{a.current=!0,t.current?.dispose(),i.current=0}}},[]),m.useEffect(()=>{if(t.current&&e.length>0&&i.current<e.length){for(let n=i.current;n<e.length;n+=1)e[n].type===`input`&&t.current.write(`$ `),_(e[n],t.current,!1);i.current=e.length}},[e]),m.useEffect(()=>{let e=null;return e=new ResizeObserver(()=>{requestAnimationFrame(()=>{s()})}),r.current&&e.observe(r.current),()=>{e?.disconnect()}},[s]),r},S=n();function C({className:e,testId:t}){return(0,S.jsx)(u,{testId:t,className:e})}function w(){let{t:e}=r(`openhands`);return(0,S.jsx)(p,{className:`h-full`,icon:(0,S.jsx)(a,{"aria-hidden":!0,strokeWidth:2,className:`size-full`}),children:e(i.TERMINAL$NO_OUTPUT)})}function T(){let{curAgentState:e}=c(),t=l(e=>e.commands),n=s.includes(e),r=t.length>0,i=n||!r,a=x();return(0,S.jsxs)(`div`,{className:`relative flex h-full min-h-0 flex-col`,children:[n&&(0,S.jsx)(C,{className:`pt-16`}),!n&&!r&&(0,S.jsx)(w,{}),(0,S.jsx)(`div`,{className:o(`flex-1 min-h-0 p-4`,i&&`pointer-events-none absolute inset-0 h-0 w-0 overflow-hidden p-0 opacity-0`),children:(0,S.jsx)(`div`,{ref:a,className:`h-full w-full`})})]})}export{T as default};
@@ -1 +1 @@
1
- import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./utils-D3U3rlqr.js";var n=e();function r({enabled:e,className:r}){return(0,n.jsx)(`span`,{"aria-hidden":`true`,className:t(`relative inline-flex h-[22px] w-[40px] shrink-0 items-center rounded-full border`,`transition-colors duration-200 ease-in-out motion-reduce:transition-none`,e?`border-white bg-white`:`border-[var(--oh-border)] bg-surface-raised`,r),children:(0,n.jsx)(`span`,{className:t(`inline-block size-4 rounded-full`,`transition-transform duration-200 ease-in-out motion-reduce:transition-none`,e?`translate-x-[21px] bg-base-secondary`:`translate-x-[2px] bg-[var(--oh-muted)]`)})})}function i({enabled:e,label:i,onToggle:a,className:o}){return(0,n.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-label":i,onClick:e=>{e.stopPropagation(),a()},className:t(`cursor-pointer`,o),children:(0,n.jsx)(r,{enabled:e})})}export{r as n,i as t};
1
+ import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./utils-DB9LsAzA.js";var n=e();function r({enabled:e,className:r}){return(0,n.jsx)(`span`,{"aria-hidden":`true`,className:t(`relative inline-flex h-[22px] w-[40px] shrink-0 items-center rounded-full border`,`transition-colors duration-200 ease-in-out motion-reduce:transition-none`,e?`border-white bg-white`:`border-[var(--oh-border)] bg-surface-raised`,r),children:(0,n.jsx)(`span`,{className:t(`inline-block size-4 rounded-full`,`transition-transform duration-200 ease-in-out motion-reduce:transition-none`,e?`translate-x-[21px] bg-base-secondary`:`translate-x-[2px] bg-[var(--oh-muted)]`)})})}function i({enabled:e,label:i,onToggle:a,className:o}){return(0,n.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-label":i,onClick:e=>{e.stopPropagation(),a()},className:t(`cursor-pointer`,o),children:(0,n.jsx)(r,{enabled:e})})}export{r as n,i as t};
@@ -1 +1 @@
1
- import{t as e}from"./createLucideIcon-CVAsW2Yo.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
1
+ import{t as e}from"./createLucideIcon-D4Tak8A1.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
@@ -1 +1 @@
1
- import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./utils-D3U3rlqr.js";import{t as n}from"./dist-CodhvuAP.js";var r=e(),i=n(``,{variants:{variant:{h1:`text-[32px] text-white font-medium leading-5`,h2:`text-xl font-medium leading-6 -tracking-[0.02em] text-white`,h3:`text-sm font-medium text-[var(--oh-text-tertiary)]`,span:`text-sm font-normal text-white leading-5.5`,p:`text-sm font-normal text-white leading-5.5`,codeBlock:`font-mono text-sm leading-relaxed text-[var(--oh-text-tertiary)] whitespace-pre-wrap`}},defaultVariants:{variant:`h1`}});function a({variant:e,className:n,testId:a,children:o}){return(0,r.jsx)(e,{"data-testid":a,className:t(i({variant:e}),n),children:o})}function o({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h1`,className:e,testId:t,children:n})}function s({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h2`,className:e,testId:t,children:n})}function c({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h3`,className:e,testId:t,children:n})}function l({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`span`,className:e,testId:t,children:n})}function u({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`codeBlock`,className:e,testId:t,children:n})}function d({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`p`,className:e,testId:t,children:n})}a.H1=o,a.H2=s,a.H3=c,a.Text=l,a.CodeBlock=u,a.Paragraph=d;export{l as n,a as r,o as t};
1
+ import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./utils-DB9LsAzA.js";import{t as n}from"./dist-CodhvuAP.js";var r=e(),i=n(``,{variants:{variant:{h1:`text-[32px] text-white font-medium leading-5`,h2:`text-xl font-medium leading-6 -tracking-[0.02em] text-white`,h3:`text-sm font-medium text-[var(--oh-text-tertiary)]`,span:`text-sm font-normal text-white leading-5.5`,p:`text-sm font-normal text-white leading-5.5`,codeBlock:`font-mono text-sm leading-relaxed text-[var(--oh-text-tertiary)] whitespace-pre-wrap`}},defaultVariants:{variant:`h1`}});function a({variant:e,className:n,testId:a,children:o}){return(0,r.jsx)(e,{"data-testid":a,className:t(i({variant:e}),n),children:o})}function o({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h1`,className:e,testId:t,children:n})}function s({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h2`,className:e,testId:t,children:n})}function c({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h3`,className:e,testId:t,children:n})}function l({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`span`,className:e,testId:t,children:n})}function u({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`codeBlock`,className:e,testId:t,children:n})}function d({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`p`,className:e,testId:t,children:n})}a.H1=o,a.H2=s,a.H3=c,a.Text=l,a.CodeBlock=u,a.Paragraph=d;export{l as n,a as r,o as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as i}from"./useQuery-D5pEZbY0.js";import{t as a}from"./useTranslation-Cbf5AGg_.js";import{t as o}from"./declaration-BGsHjPEW.js";import{C as s,E as c,S as l,T as u,n as d}from"./active-backend-context-B8rMv0X9.js";import{t as f}from"./check-TbOEtHKj.js";import{t as p}from"./loader-circle-CsAsfLIs.js";import{t as m}from"./utils-DB9LsAzA.js";import{d as h}from"./agent-server-compatibility-BWN-EIQn.js";import{v as g}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{l as _}from"./form-control-classes-CbdN5aO3.js";import{n as v,t as y}from"./settings-input-BsgQWS5R.js";import{a as b,l as x}from"./acp-providers-DerAmTyY.js";import{n as S,t as C}from"./use-create-secret-Cf2N11d2.js";var w=e(t(),1),T=n();function E({conflicts:e}){let{t}=a(`openhands`);return(0,T.jsx)(T.Fragment,{children:e.map(([e,n])=>(0,T.jsx)(`p`,{"data-testid":`acp-credential-conflict-warning`,className:`text-sm text-amber-300`,children:t(o.SETTINGS$ACP_CREDENTIAL_CONFLICT_WARNING,{credential:e,conflicting:n})},`${e}:${n}`))})}function D({status:e,isChecking:t,providerName:n,testIdPrefix:r}){let{t:i}=a(`openhands`);return e===`authenticated`?(0,T.jsxs)(`div`,{"data-testid":`${r}-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,T.jsx)(f,{className:`mt-0.5 size-4 shrink-0 text-green-400`,"aria-hidden":!0}),(0,T.jsx)(`span`,{children:i(o.ONBOARDING$ACP_AUTH_DETECTED,{provider:n})})]}):t?(0,T.jsxs)(`div`,{"data-testid":`${r}-checking`,className:`flex items-center gap-2 text-sm text-[var(--oh-muted)]`,children:[(0,T.jsx)(p,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":!0}),(0,T.jsx)(`span`,{children:i(o.ONBOARDING$ACP_AUTH_CHECKING,{provider:n})})]}):null}function O({field:e,value:t,onChange:n,alreadySet:r,testId:i,showOptionalTag:s}){let{t:c}=a(`openhands`),l=r?c(o.ONBOARDING$ACP_SECRET_ALREADY_SET):``;return(0,T.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e.multiline?(0,T.jsxs)(`label`,{className:`flex flex-col gap-2.5`,children:[(0,T.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`span`,{className:`text-sm font-mono text-white`,children:e.name}),s&&(0,T.jsx)(v,{})]}),(0,T.jsx)(`textarea`,{"data-testid":i,name:e.name,rows:4,spellCheck:!1,autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,value:t,placeholder:l,onChange:e=>n(e.target.value),className:m(_,`font-mono text-xs`)})]}):(0,T.jsx)(y,{testId:i,name:e.name,label:e.name,labelClassName:`font-mono`,type:e.secret?`password`:`text`,value:t,onChange:n,showOptionalTag:s,placeholder:l}),(0,T.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:c(e.hint_key,e.hint_values)})]})}var k=10;function A(e){return`${e.stdout??``}\n${e.stderr??``}`}function j(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 M(e){let t=A(e).toLowerCase();return t.includes(`not logged in`)?`unauthenticated`:t.includes(`logged in`)?`authenticated`:`unknown`}function N(e){let t=(e.stdout??``).trim();return t===`present`?`authenticated`:t===`absent`?`unauthenticated`:`unknown`}var P={"claude-code":{command:`claude auth status --json`,classify:j},codex:{command:`codex login status`,classify:M},"gemini-cli":{command:`test -f "$HOME/.gemini/oauth_creds.json" && echo present || echo absent`,classify:N}},F=class{static async getAuthStatus(e){let t=P[e];if(!t)return`unknown`;let n=await new g(h()).executeCommand(t.command,void 0,k);return t.classify(n)}};async function I(e){try{return await F.getAuthStatus(e)}catch{return`unknown`}}function L(e,t={}){let{enabled:n=!0}=t,r=d(),a=r.backend.kind===`local`,o=n&&a&&!!e,s=i({queryKey:[`acp-auth-status`,r.backend.id,e],queryFn:()=>I(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 R(e,t){let{t:n}=a(`openhands`),i=r(),{mutateAsync:d}=C(),[f,p]=w.useState(!1);return{saveFilled:async(r,{silent:a=!1}={})=>{let f=e.map(e=>({field:e,value:r[e.name]?.trim()})).filter(e=>!!e.value);if(f.length===0)return!0;p(!0);try{for(let{field:e,value:t}of f)await d({name:e.name,value:t});return await i.invalidateQueries({queryKey:[`secrets-search`]}),await i.invalidateQueries({queryKey:[`secrets`]}),!t&&f.some(({field:e})=>e.multiline)?u(n(o.ONBOARDING$ACP_SECRETS_ORPHANED_WARNING)):a||s(n(o.SETTINGS$SAVED)),!0}catch(e){return l(c(e)||n(o.ERROR$GENERIC)),!1}finally{p(!1)}},isSaving:f}}function z(e){let{data:t}=S(),n=w.useMemo(()=>x(e),[e]),[r,i]=w.useState({}),{saveFilled:a,isSaving:o}=R(n,!0);w.useEffect(()=>{i({})},[e]);let s=w.useCallback(e=>(t??[]).some(t=>t.name===e),[t]),c=w.useCallback(e=>!!r[e]?.trim()||s(e),[r,s]),l=w.useCallback((e,t)=>i(n=>({...n,[e]:t})),[]),u=w.useCallback(()=>i({}),[]);return{fields:n,values:r,setValue:l,secretExists:s,hasValueFor:c,conflicts:b(e,c),consumesFileCredentials:!0,isDirty:n.some(e=>!!r[e.name]?.trim()),save:e=>a(r,e),reset:u,isSaving:o}}export{E as a,D as i,L as n,O as r,z as t};
@@ -1 +1 @@
1
- import{n as e}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~epa72zsm-B4rXs7Zd.js";import{t}from"./useMutation-DrCAVg5w.js";import{f as n,i as r}from"./active-backend-context-hxq31W25.js";import{t as i}from"./settings-service.api-Ce-ub11I.js";import{n as a}from"./use-agent-profiles-DwZxnwO5.js";var o=[`activate-agent-profile`];function s(){let s=e();return t({mutationKey:o,mutationFn:e=>a.activateProfile(e),onMutate:async e=>{await s.cancelQueries({queryKey:r.all});let t=s.getQueriesData({queryKey:r.all});return s.setQueriesData({queryKey:r.all},t=>t&&{...t,active_agent_profile_id:e}),{snapshots:t}},onError:(e,t,n)=>{n?.snapshots?.forEach(([e,t])=>{s.setQueryData(e,t)})},onSuccess:async()=>{i.invalidateCache(),await s.invalidateQueries({queryKey:r.all}),await s.invalidateQueries({queryKey:n.personal()})}})}export{s as n,o as t};
1
+ import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{f as n,i as r}from"./active-backend-context-B8rMv0X9.js";import{t as i}from"./settings-service.api-DXk5TdeJ.js";import{n as a}from"./use-agent-profiles-0pr5bLS7.js";var o=[`activate-agent-profile`];function s(){let s=e();return t({mutationKey:o,mutationFn:e=>a.activateProfile(e),onMutate:async e=>{await s.cancelQueries({queryKey:r.all});let t=s.getQueriesData({queryKey:r.all});return s.setQueriesData({queryKey:r.all},t=>t&&{...t,active_agent_profile_id:e}),{snapshots:t}},onError:(e,t,n)=>{n?.snapshots?.forEach(([e,t])=>{s.setQueryData(e,t)})},onSuccess:async()=>{i.invalidateCache(),await s.invalidateQueries({queryKey:r.all}),await s.invalidateQueries({queryKey:n.personal()})}})}export{s as n,o as t};
@@ -1 +1 @@
1
- import{t as e}from"./use-agent-profiles-DwZxnwO5.js";function t(){let{data:t,isLoading:n}=e(),r=t?.active_agent_profile_id??null;return{activeProfile:t?.profiles?.find(e=>e.id!=null&&e.id===r)??null,isLoading:n}}function n(){let{activeProfile:e}=t();return e?.agent_kind}export{t as n,n as t};
1
+ import{t as e}from"./use-agent-profiles-0pr5bLS7.js";function t(){let{data:t,isLoading:n}=e(),r=t?.active_agent_profile_id??null;return{activeProfile:t?.profiles?.find(e=>e.id!=null&&e.id===r)??null,isLoading:n}}function n(){let{activeProfile:e}=t();return e?.agent_kind}export{t as n,n as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{b as n}from"./utils-D3U3rlqr.js";import{n as r}from"./navigation-context-DPs2G0X8.js";import{t as i}from"./conversation-service.api-DPBQvTKD.js";import{t as a}from"./use-user-conversation-zpx7I18x.js";var o=e(t(),1);function s(){let{conversationId:e}=r();return{conversationId:e}}function c(){let{conversationId:e}=s();if(!e)throw Error(`useConversationId must be used within a route that has a conversationId parameter`);return{conversationId:e}}var l=()=>{let{conversationId:e}=s(),t=!!e&&e.startsWith(`task-`),r=a(!e||t?null:e,e=>{let t=e.state.data;return t&&(!t.conversation_url||t.sandbox_status===`PAUSED`||!t.title&&n(t.execution_status))?3e3:3e4});return(0,o.useEffect)(()=>{let e=r.data;i.setCurrentConversation(e||null)},[e,r.isFetched,r?.data?.execution_status]),r};export{c as n,s as r,l as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{b as n}from"./utils-DB9LsAzA.js";import{n as r}from"./navigation-context-DPs2G0X8.js";import{t as i}from"./conversation-service.api-_f9GlIEi.js";import{t as a}from"./use-user-conversation-CnE4zhOA.js";var o=e(t(),1);function s(){let{conversationId:e}=r();return{conversationId:e}}function c(){let{conversationId:e}=s();if(!e)throw Error(`useConversationId must be used within a route that has a conversationId parameter`);return{conversationId:e}}var l=()=>{let{conversationId:e}=s(),t=!!e&&e.startsWith(`task-`),r=a(!e||t?null:e,e=>{let t=e.state.data;return t&&(!t.conversation_url||t.sandbox_status===`PAUSED`||!t.title&&n(t.execution_status))?3e3:3e4});return(0,o.useEffect)(()=>{let e=r.data;i.setCurrentConversation(e||null)},[e,r.isFetched,r?.data?.execution_status]),r};export{c as n,s as r,l as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./useQuery-D5pEZbY0.js";import{a as t,i as n,n as r,o as i}from"./active-backend-context-B8rMv0X9.js";import{_ as a,d as o}from"./agent-server-compatibility-BWN-EIQn.js";import{b as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{t as c}from"./proxy-B3tCGf0X.js";var l=`/api/agent-profiles`;function u(){let e=a().backend;if(e.kind!==`cloud`)throw Error(`Cloud agent-profile call requires a cloud backend.`);return e}async function d(){return c({backend:u(),method:`GET`,path:l})}async function f(e){return c({backend:u(),method:`GET`,path:`${l}/${encodeURIComponent(e)}`})}async function p(e,t){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}`,body:t})}async function m(e){return c({backend:u(),method:`DELETE`,path:`${l}/${encodeURIComponent(e)}`})}async function h(e,t){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}/rename`,body:{new_name:t}})}async function g(e){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}/activate`,body:{}})}function _(){return a().backend.kind===`cloud`}var v=`default`,y=class{static async listProfiles(){return _()?d():new s(o()).listAgentProfiles()}static async getProfile(e,t){if(_())return f(e);let n=t?{exposeSecrets:t}:{};return new s(o()).getAgentProfile(e,n)}static async saveProfile(e,t){return _()?p(e,t):new s(o()).saveAgentProfile(e,t)}static async deleteProfile(e){return _()?m(e):new s(o()).deleteAgentProfile(e)}static async renameProfile(e,t){return _()?h(e,t):new s(o()).renameAgentProfile(e,t)}static async activateProfile(e){return _()?g(e):new s(o()).activateAgentProfile(e)}};function b(a={}){let{backend:o,orgId:s}=r();return e({queryKey:[...n.all,o.id,s],queryFn:y.listProfiles,...i,...t,enabled:a.enabled??!0,meta:{disableToast:!0}})}export{y as n,v as r,b as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{C as n}from"./utils-D3U3rlqr.js";import{t as r}from"./common-Dh7OqABE.js";import{t as i}from"./conversation-state-store-B2Bp32XI.js";import{t as a}from"./use-active-conversation-DOZVSVtU.js";var o=e(t(),1);function s(e){if(!e)return n.LOADING;switch(e){case r.IDLE:return n.AWAITING_USER_INPUT;case r.RUNNING:return n.RUNNING;case r.PAUSED:return n.PAUSED;case r.WAITING_FOR_CONFIRMATION:return n.AWAITING_USER_CONFIRMATION;case r.FINISHED:return n.FINISHED;case r.ERROR:return n.ERROR;case r.STUCK:return n.ERROR;default:return n.LOADING}}function c(){let e=i(e=>e.execution_status),t=a().data?.execution_status??null,n=e??t;return{curAgentState:(0,o.useMemo)(()=>s(n),[n]),executionStatus:n}}export{c as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{C as n}from"./utils-DB9LsAzA.js";import{t as r}from"./common-CxbUL3nR.js";import{t as i}from"./conversation-state-store-B2Bp32XI.js";import{t as a}from"./use-active-conversation-2qeez40F.js";var o=e(t(),1);function s(e){if(!e)return n.LOADING;switch(e){case r.IDLE:return n.AWAITING_USER_INPUT;case r.RUNNING:return n.RUNNING;case r.PAUSED:return n.PAUSED;case r.WAITING_FOR_CONFIRMATION:return n.AWAITING_USER_CONFIRMATION;case r.FINISHED:return n.FINISHED;case r.ERROR:return n.ERROR;case r.STUCK:return n.ERROR;default:return n.LOADING}}function c(){let e=i(e=>e.execution_status),t=a().data?.execution_status??null,n=e??t;return{curAgentState:(0,o.useMemo)(()=>s(n),[n]),executionStatus:n}}export{c as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{c as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t as r}from"./useQueries-BpIlT8Mt.js";import{A as i,_ as a,b as o,k as s,v as c,y as l}from"./active-backend-context-B8rMv0X9.js";import{c as u,d,t as f}from"./agent-server-compatibility-BWN-EIQn.js";import{S as p,d as m,y as h}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js";import{n as g,r as _}from"./organization-service.api-vrRNwOma.js";var v=e(t(),1),y=1e4,b=4e3,x=`Invalid API key`,S=`API key required`,C=`Cloud API key or network issue`,w=`Logged out`;function T(e){return e===x}function E(e){return e===S}function D(e){return e===C}function O(e){return e.kind===`cloud`&&e.authMode!==`cookie`&&!e.apiKey.trim()}function k(e){return e===w}async function A(e){if(e.kind===`cloud`){if(e.authMode!==`cookie`&&!e.apiKey?.trim())throw Error(S);try{e.authMode===`cookie`?await g(e):await _(e)}catch(e){throw n.isAxiosError(e)&&e.response?.status===401||e instanceof p&&e.status===401?Error(w):s(e)?Error(C):e}return!0}try{let t=d({host:e.host,sessionApiKey:e.apiKey||null,timeout:b});await new m(t).getSettings(),f(await new h(t).getServerInfo())}catch(e){throw u(e,401)?Error(x):e}return!0}var j=2,M=300;function N(e){return e instanceof Error?e.message!==`Invalid API key`&&e.message!==`API key required`&&e.message!==`Logged out`:!0}async function P(e){for(let t=0;;t+=1)try{return await A(e)}catch(e){if(t>=j||!N(e))throw e;await new Promise(e=>{setTimeout(e,M)})}}function F(e,t={}){let{probeDisabledOnce:n=!1}=t,s=v.useSyncExternalStore(o,a,a),u=r({queries:e.map(e=>{let t=s[e.id],r=O(e),a=t?.disabled===!0,o=a&&e.kind===`cloud`&&i(t?.lastError),u=!r&&(!a||n||o);return{queryKey:[`backend-health`,e.id,e.kind,e.host,e.apiKey??``],queryFn:async()=>{try{let t=await P(e);return l(e.id),t}catch(t){throw c(e.id,t),t}},enabled:u,refetchInterval:a||r?!1:y,refetchIntervalInBackground:!1,refetchOnMount:a&&n?`always`:!0,refetchOnReconnect:!a&&!r,refetchOnWindowFocus:!a&&!r,retry:!1,staleTime:a?0:y,meta:{disableToast:!0}}})}),d={};return e.forEach((e,t)=>{let n=u[t],r=s[e.id],i=O(e),a=i?!1:r?.disabled===!0,o=i?0:r?.consecutiveFailures??0,c=i?S:r?.lastError??null,l;l=i||a?!1:n.isSuccess?!0:n.isError?!1:null,d[e.id]={isConnected:l,consecutiveFailures:o,lastError:c,disabled:a}}),d}export{F as a,E as i,k as n,T as r,D as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useQuery-CRBP8vIS.js";import{t as i}from"./useTranslation-CDRCKC9-.js";import{t as a}from"./declaration-gq8V5eTU.js";import{n as o}from"./active-backend-context-hxq31W25.js";import{t as s}from"./utils-D3U3rlqr.js";import{t as c}from"./organization-service.api-Bk4pCGU1.js";import{t as l}from"./modal-backdrop-zVwfOJZr.js";import{r as u,t as d}from"./modal-body-DouOE5KH.js";import{r as f}from"./base-modal-BuF2f0YL.js";import{t as p}from"./settings-input-bD6npsDm.js";import{i as m}from"./ellipsis-button-C5Z-tPFp.js";var h=e(t(),1),g=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;function _(e,{isRequired:t=!1}={}){return e===``?!t:g.test(e)}function v(e){let t=e.split(`/`),n=(t[t.length-1]||e).replace(/[^A-Za-z0-9._-]/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``);return n&&!/^[A-Za-z0-9]/.test(n)&&(n=`profile-${n}`),n.length>64&&(n=n.substring(0,64).replace(/-+$/,``)),n||`default-profile`}var y=n(),b=(0,h.forwardRef)(function({testId:e,ruleTestId:t,value:n,onChange:r,onKeyDown:o,placeholder:c,isDisabled:l,isOptional:u,isRequired:d=!1},f){let{t:m}=i(`openhands`),g=_(n,{isRequired:d}),v=u?`${m(a.SETTINGS$PROFILE_NAME_LABEL)} (${m(a.COMMON$OPTIONAL)})`:m(a.SETTINGS$PROFILE_NAME_LABEL),b=h.useId(),x=t??`${b}-rule`;return(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,y.jsx)(p,{ref:f,testId:e,label:v,type:`text`,className:`w-full`,value:n,placeholder:c??m(a.SETTINGS$PROFILE_NAME_PLACEHOLDER),onChange:r,onKeyDown:o,isDisabled:l,ariaDescribedBy:x,ariaInvalid:!g}),(0,y.jsx)(`p`,{id:x,"data-testid":t,className:s(`text-xs`,g?`text-[var(--oh-muted)]`:`text-red-400`),children:m(a.SETTINGS$PROFILE_NAME_RULE)})]})});function x({isOpen:e,title:t,width:n=`md`,children:r,footer:i,onClose:a,initialFocusRef:o}){let c=(0,h.useRef)(null);return(0,h.useEffect)(()=>{if(!e)return;let t=o?.current??c.current;if(t){let e=setTimeout(()=>{t.focus()},0);return()=>clearTimeout(e)}},[e,o]),(0,h.useEffect)(()=>{if(!e||!c.current)return;let t=c.current,n=e=>{if(e.key!==`Tab`)return;let n=t.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`),r=n[0],i=n[n.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),i?.focus()):!e.shiftKey&&document.activeElement===i&&(e.preventDefault(),r?.focus())};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e]),e?(0,y.jsx)(l,{onClose:a,children:(0,y.jsxs)(`div`,{ref:c,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`modal-title`,className:s(`bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)]`,u(n),d),children:[(0,y.jsx)(f,{id:`modal-title`,title:t}),r,(0,y.jsx)(`div`,{className:`w-full flex justify-end gap-2 mt-2`,children:i})]})}):null}function S({index:e,icon:t,label:n,onClick:r,onKeyDown:i,menuItemsRef:a,disabled:o,testId:c}){return(0,y.jsx)(`button`,{ref:t=>{a.current[e]=t},type:`button`,onClick:r,onKeyDown:t=>i(t,e),disabled:o,className:s(`group w-full cursor-pointer rounded px-2 py-2 text-start text-nowrap text-sm font-normal`,`text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent`),role:`menuitem`,"data-testid":c,children:(0,y.jsx)(m,{icon:t,text:n})})}function C({children:e,className:t,...n}){return(0,y.jsx)(`span`,{className:s(`text-sm leading-4 text-black font-semibold tracking-tighter bg-primary p-1 rounded-full`,t),...n,children:e})}var w=`edit_org_settings`;function T(){let{backend:e,orgId:t}=o(),n=e.kind===`cloud`,{data:i}=r({queryKey:[`cloud-current-user`,e.id,t],queryFn:()=>c(t,e),enabled:n&&!!t,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}});return n?i?.permissions?i.permissions.includes(w):i?.role===`owner`||i?.role===`admin`:!0}export{b as a,x as i,C as n,v as o,S as r,_ as s,T as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useQuery-D5pEZbY0.js";import{t as i}from"./useTranslation-Cbf5AGg_.js";import{t as a}from"./declaration-BGsHjPEW.js";import{n as o}from"./active-backend-context-B8rMv0X9.js";import{t as s}from"./utils-DB9LsAzA.js";import{t as c}from"./organization-service.api-vrRNwOma.js";import{t as l}from"./modal-backdrop-zVwfOJZr.js";import{r as u,t as d}from"./modal-body-Cc2zp0xb.js";import{r as f}from"./base-modal-CIF_785P.js";import{t as p}from"./settings-input-BsgQWS5R.js";import{i as m}from"./ellipsis-button-CbNnHlIq.js";var h=e(t(),1),g=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;function _(e,{isRequired:t=!1}={}){return e===``?!t:g.test(e)}function v(e){let t=e.split(`/`),n=(t[t.length-1]||e).replace(/[^A-Za-z0-9._-]/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``);return n&&!/^[A-Za-z0-9]/.test(n)&&(n=`profile-${n}`),n.length>64&&(n=n.substring(0,64).replace(/-+$/,``)),n||`default-profile`}var y=n(),b=(0,h.forwardRef)(function({testId:e,ruleTestId:t,value:n,onChange:r,onKeyDown:o,placeholder:c,isDisabled:l,isOptional:u,isRequired:d=!1},f){let{t:m}=i(`openhands`),g=_(n,{isRequired:d}),v=u?`${m(a.SETTINGS$PROFILE_NAME_LABEL)} (${m(a.COMMON$OPTIONAL)})`:m(a.SETTINGS$PROFILE_NAME_LABEL),b=h.useId(),x=t??`${b}-rule`;return(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,y.jsx)(p,{ref:f,testId:e,label:v,type:`text`,className:`w-full`,value:n,placeholder:c??m(a.SETTINGS$PROFILE_NAME_PLACEHOLDER),onChange:r,onKeyDown:o,isDisabled:l,ariaDescribedBy:x,ariaInvalid:!g}),(0,y.jsx)(`p`,{id:x,"data-testid":t,className:s(`text-xs`,g?`text-[var(--oh-muted)]`:`text-red-400`),children:m(a.SETTINGS$PROFILE_NAME_RULE)})]})});function x({isOpen:e,title:t,width:n=`md`,children:r,footer:i,onClose:a,initialFocusRef:o}){let c=(0,h.useRef)(null);return(0,h.useEffect)(()=>{if(!e)return;let t=o?.current??c.current;if(t){let e=setTimeout(()=>{t.focus()},0);return()=>clearTimeout(e)}},[e,o]),(0,h.useEffect)(()=>{if(!e||!c.current)return;let t=c.current,n=e=>{if(e.key!==`Tab`)return;let n=t.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`),r=n[0],i=n[n.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),i?.focus()):!e.shiftKey&&document.activeElement===i&&(e.preventDefault(),r?.focus())};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e]),e?(0,y.jsx)(l,{onClose:a,children:(0,y.jsxs)(`div`,{ref:c,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`modal-title`,className:s(`bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)]`,u(n),d),children:[(0,y.jsx)(f,{id:`modal-title`,title:t}),r,(0,y.jsx)(`div`,{className:`w-full flex justify-end gap-2 mt-2`,children:i})]})}):null}function S({index:e,icon:t,label:n,onClick:r,onKeyDown:i,menuItemsRef:a,disabled:o,testId:c}){return(0,y.jsx)(`button`,{ref:t=>{a.current[e]=t},type:`button`,onClick:r,onKeyDown:t=>i(t,e),disabled:o,className:s(`group w-full cursor-pointer rounded px-2 py-2 text-start text-nowrap text-sm font-normal`,`text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent`),role:`menuitem`,"data-testid":c,children:(0,y.jsx)(m,{icon:t,text:n})})}function C({children:e,className:t,...n}){return(0,y.jsx)(`span`,{className:s(`text-sm leading-4 text-black font-semibold tracking-tighter bg-primary p-1 rounded-full`,t),...n,children:e})}var w=`edit_org_settings`;function T(){let{backend:e,orgId:t}=o(),n=e.kind===`cloud`,{data:i}=r({queryKey:[`cloud-current-user`,e.id,t],queryFn:()=>c(t,e),enabled:n&&!!t,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}});return n?i?.permissions?i.permissions.includes(w):i?.role===`owner`||i?.role===`admin`:!0}export{b as a,x as i,C as n,v as o,S as r,_ as s,T as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./useQueries-BpIlT8Mt.js";import{n as t,r as n}from"./active-backend-context-B8rMv0X9.js";import{n as r,r as i,t as a}from"./organization-service.api-vrRNwOma.js";function o(){let{backends:t}=n(),a=t.filter(e=>e.kind===`cloud`),o=e({queries:a.map(e=>({queryKey:[`cloud-organizations`,e.id],queryFn:async()=>{let t=await r(e);if(e.authMode===`cookie`)return t;let n=await i(e);return n.isLegacyKey||n.orgId===null?t:{...t,items:t.items.filter(e=>e.id===n.orgId)}},staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}))}),s={};return a.forEach((e,t)=>{let n=o[t];s[e.id]={backend:e,isLoading:n.isLoading,orgs:n.data?.items??[],currentOrgId:n.data?.currentOrgId??null}}),s}function s(){let{backends:r}=n(),i=t(),s=o(),c=[];for(let e of r)if(e.kind===`cloud`){let t=s[e.id],n=e.id===i.backend.id&&i.orgId?i.orgId:t?.orgs[0]?.id??null;n&&c.push({backendId:e.id,orgIdForMe:n})}let l=e({queries:c.map(({backendId:e,orgIdForMe:t})=>{let n=r.find(t=>t.id===e);return{queryKey:[`cloud-current-user`,e,t],queryFn:async()=>n?a(t,n):{orgId:t,userId:``},enabled:!!n,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}})}),u={};return c.forEach((e,t)=>{let n=l[t];u[e.backendId]={isLoading:n.isLoading,userId:n.data?.userId??null}}),u}export{o as n,s as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./useQuery-D5pEZbY0.js";import{d as t,o as n}from"./active-backend-context-B8rMv0X9.js";import{d as r,i,l as a,o}from"./agent-server-compatibility-BWN-EIQn.js";import{m as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";var c=class{static async getModels(){let e=new s(r()),[t,n,i]=await Promise.all([e.getModels(),e.getVerifiedModels(),e.getProviders()]),a=Object.keys(n??{}).sort(),o=a.flatMap(e=>n[e]??[]);return{models:t??[],verified_models:o,verified_providers:i?.filter(e=>a.includes(e))??a,default_model:o[0]??t?.[0]??``}}static async getConfig(){return await a(),{feature_flags:{hide_llm_settings:!1,hide_users_page:!0},providers_configured:[],maintenance_start_time:null,recaptcha_site_key:null,faulty_models:[],error_message:null,updated_at:new Date().toISOString()}}},l=r=>e({queryKey:t.WEB_CLIENT_CONFIG,queryFn:c.getConfig,retry:(e,t)=>!o(t)&&!i(t)&&e<3,meta:{disableToast:!0},...n,enabled:r?.enabled});export{c as n,l as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{a as n,i as r,n as i,s as a,u as o}from"./active-backend-context-B8rMv0X9.js";import{t as s}from"./use-tracking-D2Qg5Lpd.js";import{c,o as l,s as u,t as d}from"./agent-server-conversation-service.api-DSPIkMwJ.js";import{t as f}from"./profiles-service.api-BQTklD5D.js";import{t as p}from"./use-llm-profiles-Dr5__SlZ.js";import{n as m,t as h}from"./use-agent-profiles-0pr5bLS7.js";import{t as g}from"./plugins-management-service-B75jyC56.js";function _(e){if(e.name)return e.name;if(e.repo_path){let t=e.repo_path.split(`/`).filter(Boolean);if(t.length>0)return t[t.length-1]}let{source:t}=e;return t.startsWith(`github:`)?t.replace(`github:`,``):t.includes(`/`)&&t.split(`/`).pop()?.replace(/\.git$/,``)||t}function v(e){let{source:t}=e;return!(t.startsWith(`github:`)||/^[a-z][a-z0-9+.-]*:\/\//i.test(t))}function y(e){let t=e.source.startsWith(`github:`)?e.source.replace(`github:`,``):e.source;return e.ref?`${t} @ ${e.ref}`:t}function b(e){return[e.source,e.ref??``,e.repo_path??``].join(` `)}var x=[`create-conversation`],S=()=>{let _=e(),{trackConversationCreated:v}=s(),{data:y}=p(),{backend:S,orgId:C}=i();return h(),t({mutationKey:x,mutationFn:async e=>{let{query:t,conversationInstructions:i,plugins:s,repository:p,workingDir:h,workspaceMode:v,parentConversationId:x,agentType:w,agentProfileId:T}=e,E;try{E=await _.ensureQueryData({queryKey:[...r.all,S.id,C],queryFn:m.listProfiles,...n})}catch{}let D=T??E?.active_agent_profile_id??void 0,O=D?E?.profiles?.find(e=>e.id===D):void 0,k=S.kind===`cloud`,A=D;if(!k&&O?.name===`default`&&O?.agent_kind===`openhands`)A=void 0;else if(O?.agent_kind===`openhands`&&O.llm_profile_ref){let e=!1;try{e=(await _.ensureQueryData({queryKey:[...a.all,S.id,C],queryFn:f.listProfiles,retry:!1})).profiles.some(e=>e.name===O.llm_profile_ref)}catch{}e||(console.warn(`Agent profile "${O.name}" references missing LLM profile "${O.llm_profile_ref}"; launching from agent_settings instead.`),A=void 0)}let j=A?[void 0,A,O?.agent_kind]:[],M=await d.createConversation(t,i,s,p?{selected_repository:p.name,selected_branch:p.branch??null,git_provider:p.gitProvider}:null,h,v,x,w,...j),N=M.app_conversation_id,P=s?.map(c)??[],F=P;if(N){let e=[];try{e=await _.ensureQueryData({queryKey:o.installed,queryFn:()=>g.listInstalledPlugins()})}catch{}let t=new Set(P.map(b)),n=e.filter(e=>e.enabled).map(e=>({source:e.source,ref:e.resolved_ref??null,repo_path:e.repo_path??null,name:e.name})).filter(e=>!t.has(b(e)));F=[...P,...n]}let I=A&&O?.agent_kind===`openhands`?O.llm_profile_ref:y?.active_profile??null;if(N&&(I||F.length)){let e=l(N);u(N,{selected_repository:e?.selected_repository??null,selected_branch:e?.selected_branch??null,git_provider:e?.git_provider??null,selected_workspace:e?.selected_workspace??null,workspace_mode:e?.workspace_mode??null,active_profile:I??e?.active_profile??null,plugins:F.length?F:e?.plugins??null})}return{conversation_id:M.app_conversation_id?M.app_conversation_id:`task-${M.id}`,session_api_key:null,url:M.agent_server_url,task_id:M.id}},onSuccess:async(e,t)=>{v({conversationId:e.conversation_id,taskId:e.task_id,hasRepository:!!t.repository,gitProvider:t.repository?.gitProvider,hasWorkspace:!!t.workingDir,workspaceMode:t.workspaceMode,hasInitialQuery:!!t.query,agentType:t.agentType,hasParentConversation:!!t.parentConversationId,entryPoint:t.entryPoint}),_.invalidateQueries({queryKey:[`user`,`conversations`]}),_.invalidateQueries({queryKey:[`start-tasks`]})}})};export{v as a,y as i,S as n,b as o,_ as r,x as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useMutation-DrCAVg5w.js";import{t as r}from"./useQuery-CRBP8vIS.js";import{n as i}from"./active-backend-context-hxq31W25.js";import{t as a}from"./secrets-service-B2GqPV0N.js";var o=e(t(),1),s=(e={})=>{let{nameContains:t,enabled:n=!0}=e,s=i(),c=r({queryKey:[`secrets`,s.backend.id,s.orgId],queryFn:a.getSecrets,enabled:n,staleTime:1e3*60*5,gcTime:1e3*60*15});return{data:(0,o.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}},c=()=>n({mutationFn:({name:e,value:t,description:n})=>a.createSecret(e,t,n)});export{s as n,c as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useMutation-u8UgRgDK.js";import{t as r}from"./useQuery-D5pEZbY0.js";import{n as i}from"./active-backend-context-B8rMv0X9.js";import{t as a}from"./secrets-service-CvyPWJhg.js";var o=e(t(),1),s=(e={})=>{let{nameContains:t,enabled:n=!0}=e,s=i(),c=r({queryKey:[`secrets`,s.backend.id,s.orgId],queryFn:a.getSecrets,enabled:n,staleTime:1e3*60*5,gcTime:1e3*60*15});return{data:(0,o.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}},c=()=>n({mutationFn:({name:e,value:t,description:n})=>a.createSecret(e,t,n)});export{s as n,c as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./react-DPDgL6du.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=>e.key===`goal`,b=e=>`kind`in e&&e.kind===`ConversationErrorEvent`,x=e=>`kind`in e&&e.kind===`ServerErrorEvent`,S=e=>b(e)||x(e),C=e=>`kind`in e&&e.kind===`HookExecutionEvent`,w=e=>`kind`in e&&e.kind===`ACPToolCallEvent`,T=e=>`kind`in e&&e.kind===`StreamingDeltaEvent`;function E(e){return t(e)}var D=e=>e.thought.filter(e=>e.type===`text`).map(e=>e.text).join(`
1
+ import{t as e}from"./react-DPDgL6du.js";import"./canvas-ui-COgjltGz.js";function t(e){return typeof e==`object`&&!!e&&`id`in e&&`timestamp`in e&&`source`in e&&typeof e.id==`string`&&e.id.length>0&&typeof e.timestamp==`string`&&e.timestamp.length>0&&typeof e.source==`string`&&(e.source===`agent`||e.source===`user`||e.source===`environment`||e.source===`hook`)}var n=e=>e.source===`environment`&&`action_id`in e&&`observation`in e&&e.observation!==null&&typeof e.observation==`object`&&`kind`in e.observation,r=e=>e.source===`agent`&&`tool_name`in e&&`tool_call_id`in e&&`error`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`&&typeof e.error==`string`,i=e=>`llm_message`in e&&typeof e.llm_message==`object`&&e.llm_message!==null&&`role`in e.llm_message&&`content`in e.llm_message,a=e=>i(e)&&e.llm_message.role===`user`,o=e=>e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&`tool_name`in e&&`tool_call_id`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`,s=e=>o(e)&&(e.action.kind===`ExecuteBashAction`||e.action.kind===`TerminalAction`),c=e=>n(e)&&(e.observation.kind===`ExecuteBashObservation`||e.observation.kind===`TerminalObservation`),l=e=>n(e)&&e.observation.kind===`PlanningFileEditorObservation`,u=e=>n(e)&&e.observation.kind===`BrowserObservation`,d=e=>n(e)&&e.observation.kind===`SwitchLLMObservation`,f=e=>o(e)&&e.action.kind===`BrowserNavigateAction`,p=e=>o(e)&&(e.tool_name===`canvas_ui`||e.tool_name===`canvas_ui_control`),m=e=>e.source===`agent`&&`system_prompt`in e&&`tools`in e&&typeof e.system_prompt==`object`&&Array.isArray(e.tools),h=e=>`kind`in e&&e.kind===`ConversationStateUpdateEvent`,g=e=>e.key===`full_state`,_=e=>e.key===`execution_status`,v=e=>e.key===`stats`,y=e=>e.key===`goal`,b=e=>`kind`in e&&e.kind===`ConversationErrorEvent`,x=e=>`kind`in e&&e.kind===`ServerErrorEvent`,S=e=>b(e)||x(e),C=e=>`kind`in e&&e.kind===`HookExecutionEvent`,w=e=>`kind`in e&&e.kind===`ACPToolCallEvent`,T=e=>`kind`in e&&e.kind===`StreamingDeltaEvent`;function E(e){return t(e)}var D=e=>e.thought.filter(e=>e.type===`text`).map(e=>e.text).join(`
2
2
  `),O=e=>e.reasoning_content?e.reasoning_content:e.thinking_blocks?.length?e.thinking_blocks.filter(e=>e.type===`thinking`).map(e=>e.thinking).join(`
3
3
 
4
4
  `):``,k=e=>D(e).trim().length>0,A=(e,t)=>{let n=e.replace(/^\s+/,``);if(!n.startsWith(`<think>`))return{reasoning:``,message:e};let r=n.slice(7),i=r.indexOf(`</think>`);return i===-1?t?.streaming?{reasoning:r.trim(),message:``}:{reasoning:``,message:e}:{reasoning:r.slice(0,i).trim(),message:r.slice(i+8).trim()}},j=(e,t)=>{if(o(e))return e.action.kind===`ThinkAction`?null:k(e)?e:null;if(n(e)){let n=t.find(t=>o(t)&&t.id===e.action_id);return!n||n.action.kind===`ThinkAction`?null:k(n)?n:null}return null},M=(e,t)=>({...t,content:`${t.content??``}${e.content??``}`||null,reasoning_content:`${t.reasoning_content??``}${e.reasoning_content??``}`||null}),N=(e,t)=>({...e,content:`${e.content??``}${t}`||null}),P=e=>{for(let t=e.length-1;t>=0;--t){let n=e[t];if(i(n)&&n.source===`user`)return t}return-1},F=e=>e.filter(e=>e.type===`text`).map(e=>e.text).join(``),I=e=>o(e)&&e.action.kind===`FinishAction`?e.action.message:i(e)&&e.source===`agent`?F(e.llm_message.content):null,L=(e,t)=>{let n=0,r=0;for(let i of t){let t=e.indexOf(i,n);if(t===-1)return{matched:!1,lastMatchEnd:r};r=t+i.length,n=r}return{matched:!0,lastMatchEnd:r}},R=e=>{let t=P(e);return e.map((e,t)=>({event:e,index:t})).filter(e=>e.index>t&&T(e.event)&&(e.event.content?.length??0)>0)},z=e=>{let t=[];for(let n=e.length-1;n>=0;--n){let r=e[n];if(!T(r))break;(r.content?.length??0)>0&&t.unshift({event:r,index:n})}return t},B=(e,t)=>{let n=t.join(``);for(let t of[n,n.trimEnd()])if(t&&e.startsWith(t))return{matched:!0,lastMatchEnd:t.length};let r=t.length-1;return L(e,t.map((e,t)=>t===r?e.trimEnd():e))},V=(e,t)=>{let n=R(t);if(n.length===0)return null;let r=I(e);if(!r)return null;let{matched:i,lastMatchEnd:a}=B(r,n.map(({event:e})=>e.content??``));if(!i)return null;let o=[...t],s=r.slice(a),c=n.at(-1)?.index,l=c===void 0?void 0:o[c];return s&&c!==void 0&&l&&T(l)&&(o[c]=N(l,s)),o},H=(e,t)=>{let n=F(e.thought);if(!n)return null;let r=z(t);if(r.length===0||!B(n,r.map(({event:e})=>e.content??``)).matched)return null;let i=O(e).trim().length>0,a=new Set(r.map(({index:e})=>e)),o=[];return t.forEach((e,t)=>{if(!a.has(t)||!T(e)){o.push(e);return}!i&&e.reasoning_content&&o.push({...e,content:null})}),o},U=(e,t)=>{let r=[...t];if(T(e)){if(e.content===null&&e.reasoning_content===null)return r;let t=r.length-1,n=r[t];return n&&T(n)?(r[t]=M(e,n),r):(r.push(e),r)}if(o(e)&&e.action.kind===`FinishAction`||i(e)&&e.source===`agent`){let t=V(e,r);if(t)return t}if(o(e)&&e.action.kind!==`FinishAction`&&e.action.kind!==`ThinkAction`){let t=H(e,r);if(t)return t.push(e),t}if(w(e)){let t=r.findIndex(t=>w(t)&&t.tool_call_id===e.tool_call_id);return t===-1?r.push(e):r[t]=e,r}if(n(e)){if(e.observation.kind===`ThinkObservation`||e.observation.kind===`FinishObservation`)return r;let t=r.findIndex(t=>t.id===e.action_id);t===-1?r.push(e):r[t]=e}else r.push(e);return r},W=e=>`id`in e?e.id:void 0,G=e=>`timestamp`in e?e.timestamp:void 0,K=(e,t)=>{let n=G(e),r=G(t);return!n&&!r?0:n?r?n.localeCompare(r):-1:1},q=(e,t)=>{if(e.length===0)return!1;let n=e[e.length-1],r=G(n),i=G(t);return!r||!i?!1:i<r},J=(e,t)=>{let n=W(t);if(n!==void 0&&e.eventIds.has(n))return e;let r=n===void 0?e.eventIds:new Set(e.eventIds).add(n),i=e.events.length-1,a=e.events[i],o=a&&T(t)&&T(a),s=[...e.events];return o?s[i]=M(t,a):s.push(t),{...e,events:s,eventIds:r,uiEvents:U(t,e.uiEvents)}},Y=e=>({...e,events:[...e.events].sort(K),uiEvents:[...e.uiEvents].sort(K)}),X=(e,t)=>{let n=J(e,t);return n===e?e:!q(e.events,t)&&!q(e.uiEvents,t)?n:Y(n)},Z=e()(e=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:null,addEvent:t=>e(e=>X(e,t)),addEvents:t=>e(e=>{if(t.length===0)return e;let n=new Set(e.eventIds),r=[...e.events],i=[...e.uiEvents],a=!1;for(let e of t){let t=W(e);if(!(t!==void 0&&n.has(t))){a=!0,t!==void 0&&n.add(t);let o=r.length-1,s=r[o];s&&T(e)&&T(s)?r[o]=M(e,s):r.push(e),i=U(e,i)}}return a?Y({...e,events:r,eventIds:n,uiEvents:i}):e}),clearEvents:()=>e(()=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:null})),clearEventsForConversation:t=>e(()=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:t}))}));export{n as C,d as D,T as E,m as O,i as S,v as T,s as _,j as a,y as b,o as c,_ as d,f,S as g,h,O as i,a as k,r as l,p as m,U as n,A as o,u as p,D as r,w as s,Z as t,E as u,c as v,l as w,C as x,g as y};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-CDRCKC9-.js";import{t as r}from"./declaration-gq8V5eTU.js";import{j as i}from"./active-backend-context-hxq31W25.js";import{a,r as o}from"./conversation-local-storage-F6zVMM--.js";import{t as s}from"./conversation-store-LptbOvKa.js";import{t as c}from"./use-create-conversation-DdqsP78F.js";import{t as l}from"./use-active-conversation-DOZVSVtU.js";var u=e(t(),1),d=()=>{let{t:e}=n(`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)(n=>{n?.preventDefault(),n?.stopPropagation(),t(`plan`),!(p?.sub_conversation_ids&&p.sub_conversation_ids.length>0||!p?.id||f)&&m({parentConversationId:p.id,agentType:`plan`,entryPoint:`plan_sub_conversation`},{onSuccess:t=>{i(e(r.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
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-Cbf5AGg_.js";import{t as r}from"./declaration-BGsHjPEW.js";import{C as i}from"./active-backend-context-B8rMv0X9.js";import{a,r as o}from"./conversation-local-storage-F6zVMM--.js";import{t as s}from"./conversation-store-LptbOvKa.js";import{n as c}from"./use-create-conversation-r1JHfKO5.js";import{t as l}from"./use-active-conversation-2qeez40F.js";var u=e(t(),1),d=()=>{let{t:e}=n(`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)(n=>{n?.preventDefault(),n?.stopPropagation(),t(`plan`),!(p?.sub_conversation_ids&&p.sub_conversation_ids.length>0||!p?.id||f)&&m({parentConversationId:p.id,agentType:`plan`,entryPoint:`plan_sub_conversation`},{onSuccess:t=>{i(e(r.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};
@@ -0,0 +1 @@
1
+ import{t as e}from"./useQuery-D5pEZbY0.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};
@@ -0,0 +1 @@
1
+ import{t as e}from"./useQuery-D5pEZbY0.js";import{n as t,o as n,s as r}from"./active-backend-context-B8rMv0X9.js";import{t as i}from"./profiles-service.api-BQTklD5D.js";function a(a={}){let{backend:o,orgId:s}=t();return e({queryKey:[...r.all,o.id,s],queryFn:i.listProfiles,...n,enabled:a.enabled??!0,meta:{disableToast:!0}})}export{a as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./useQuery-D5pEZbY0.js";import{_ as t,d as n}from"./agent-server-compatibility-BWN-EIQn.js";import{l as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";var i=class{static async getPluginsMarketplace(){if(t().backend.kind===`cloud`)return[];try{return(await new r(n()).getPluginsMarketplace()).plugins??[]}catch{return[]}}static async getLocalPlugins(){if(t().backend.kind===`cloud`)return[];try{return(await new r(n()).getPlugins({load_user:!0,load_project:!1})).plugins??[]}catch{return[]}}},a=()=>e({queryKey:[`plugins-marketplace`],queryFn:()=>i.getPluginsMarketplace(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{i as n,a as t};
@@ -0,0 +1 @@
1
+ import{T as e,b as t,w as n}from"./utils-DB9LsAzA.js";import{t as r}from"./use-active-conversation-2qeez40F.js";import{t as i}from"./use-agent-state-C6peDXUm.js";var a=({allowAgentError:a=!1}={})=>{let{data:o}=r(),{curAgentState:s}=i(),c=a?e:n;return t(o?.execution_status)&&!c.includes(s)};export{a as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{i as n}from"./active-backend-context-B8rMv0X9.js";import{n as r}from"./use-agent-profiles-0pr5bLS7.js";function i(){let i=e();return t({mutationFn:({name:e,profile:t})=>r.saveProfile(e,t),onSuccess:async()=>{await i.invalidateQueries({queryKey:n.all})},meta:{disableToast:!0}})}export{i as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{f as n}from"./active-backend-context-B8rMv0X9.js";import{t as r}from"./settings-service.api-DXk5TdeJ.js";import{r as i}from"./use-settings-CyxSlyTQ.js";import{t as a}from"./use-tracking-D2Qg5Lpd.js";var o=async e=>{let t={...e};delete t.agent_settings_schema,delete t.conversation_settings_schema;let n={...t.conversation_settings_diff??{}};Object.keys(n).length>0?t.conversation_settings_diff=n:delete t.conversation_settings_diff,delete t.conversation_settings;let i=t.agent_settings_diff,a=i?.llm;if(a&&typeof a.api_key==`string`){let e=a.api_key.trim();a.api_key=e===``?``:e}i&&Object.keys(i).length>0?t.agent_settings_diff=i:delete t.agent_settings_diff,delete t.agent_settings,typeof t.search_api_key==`string`&&(t.search_api_key=t.search_api_key.trim()),typeof t.git_user_name==`string`&&(t.git_user_name=t.git_user_name.trim()),typeof t.git_user_email==`string`&&(t.git_user_email=t.git_user_email.trim()),await r.saveSettings(t)},s=(r=`personal`,{retry:s}={})=>{let{trackMcpConfigUpdated:c}=a(),l=e(),{data:u}=i(r);return t({...s===void 0?{}:{retry:s},mutationFn:async e=>{let t=e.mcp_config,n=u?.mcp_config;t&&n!==t&&c({sseServersCount:t.sse_servers?.length??0,stdioServersCount:t.stdio_servers?.length??0}),await o(e)},onSuccess:async()=>{await l.invalidateQueries({queryKey:n.byScope(r)})},meta:{disableToast:!0}})};export{s as t};
@@ -0,0 +1 @@
1
+ import{c as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t}from"./useQuery-D5pEZbY0.js";import{f as n,n as r}from"./active-backend-context-B8rMv0X9.js";import{S as i}from"./agent-server-compatibility-BWN-EIQn.js";import{t as a}from"./settings-mQUckT0g.js";import{i as o,t as s}from"./settings-service.api-DXk5TdeJ.js";var c=(...e)=>e.find(e=>typeof e==`boolean`),l=(...e)=>e.find(e=>typeof e==`number`),u=(...e)=>{for(let t of e){if(typeof t==`string`)return t;if(t===null)return null}},d=t=>{if(typeof t==`object`&&t&&`status`in t){let{status:e}=t;if(typeof e==`number`)return e}if(e.isAxiosError(t))return t.response?.status},f=(e,t)=>{let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r},p=(e,t,n,r=!1)=>{let i=f(e,t);return typeof i==`string`&&(i.length>0||r)?i:n},m=e=>{let t=e.agent_settings??{},n={...a.conversation_settings??{},...e.conversation_settings??{}},r=t.mcp_config===void 0?e.mcp_config??a.mcp_config:o(t.mcp_config);return{...a,...e,llm_model:p(t,`llm.model`,a.llm_model),llm_base_url:p(t,`llm.base_url`,a.llm_base_url,!0),agent:p(t,`agent`,a.agent),llm_api_key:e.llm_api_key??null,llm_api_key_set:e.llm_api_key_set??!1,confirmation_mode:c(n.confirmation_mode)??a.confirmation_mode,security_analyzer:u(n.security_analyzer)??a.security_analyzer,max_iterations:l(n.max_iterations)??a.max_iterations,enable_default_condenser:c(f(t,`condenser.enabled`))??a.enable_default_condenser,condenser_max_size:l(f(t,`condenser.max_size`))??a.condenser_max_size,mcp_config:r,search_api_key:e.search_api_key||``,email:e.email||``,git_user_name:e.git_user_name||a.git_user_name,git_user_email:e.git_user_email||a.git_user_email,is_new_user:!1,disabled_skills:e.disabled_skills??a.disabled_skills,agent_settings_schema:e.agent_settings_schema??null,agent_settings:e.agent_settings??a.agent_settings,conversation_settings_schema:e.conversation_settings_schema??a.conversation_settings_schema,conversation_settings:n}},h=async(e=`personal`)=>{if(e!==`personal`)throw Error(`Unsupported settings scope: ${e}`);return m(await s.getSettings())},g=(e=`personal`)=>{let o=r(),s=!i(o.backend),c=t({queryKey:[...n.byScope(e),o.backend.id,o.orgId],queryFn:()=>h(e),retry:(e,t)=>d(t)!==404,enabled:s,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,meta:{disableToast:!0}});return s?d(c.error)===404?{data:a,error:c.error,isError:c.isError,isLoading:c.isLoading,isFetching:c.isFetching,isFetched:c.isFetched,isSuccess:c.isSuccess,status:c.status,fetchStatus:c.fetchStatus,refetch:c.refetch}:c:{data:a,error:null,isError:!1,isLoading:!1,isFetching:!1,isFetched:!1,isSuccess:!0,status:`success`,fetchStatus:`idle`,refetch:c.refetch}};export{h as n,g as r,d as t};
@@ -0,0 +1,16 @@
1
+ import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-Cbf5AGg_.js";import{t as r}from"./declaration-BGsHjPEW.js";import{n as i,r as a}from"./active-backend-context-B8rMv0X9.js";import{t as o}from"./createLucideIcon-D4Tak8A1.js";import{t as s}from"./external-link-lhdITPqq.js";import{t as c}from"./utils-DB9LsAzA.js";import{S as l}from"./agent-server-compatibility-BWN-EIQn.js";import{t as u}from"./use-config-B5r8erYt.js";import{a as d,f,o as p,u as m}from"./sidebar-layout-Bm7pa3Vk.js";import{r as h}from"./use-settings-CyxSlyTQ.js";import{n as g}from"./acp-providers-DerAmTyY.js";import{n as _}from"./use-active-agent-profile-hI-x-UBa.js";import{r as v}from"./settings-utils-DzCVfiR3.js";var y=o(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),b=o(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),x=o(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),S=t();function C(){let{t:e}=n(`openhands`),{active:t}=a(),{backend:i}=t;return l(i)||i.kind!==`cloud`?null:(0,S.jsxs)(`a`,{"data-testid":`settings-cloud-link`,href:`${i.host.replace(/\/+$/,``)}/settings`,target:`_blank`,rel:`noopener noreferrer`,className:c(f({collapsed:!1}),p.idle),children:[(0,S.jsx)(`span`,{className:d,children:(0,S.jsx)(b,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,S.jsx)(`span`,{className:c(m(!1),`flex-1`),children:e(r.SETTINGS$CLOUD_SETTINGS_LINK)}),(0,S.jsx)(s,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}e();var w=[{icon:(0,S.jsx)(e=>(0,S.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,S.jsx)(`path`,{d:`M9 15C8.80222 15 8.60888 15.0586 8.44443 15.1685C8.27998 15.2784 8.15181 15.4346 8.07612 15.6173C8.00043 15.8 7.98063 16.0011 8.01921 16.1951C8.0578 16.3891 8.15304 16.5673 8.29289 16.7071C8.43275 16.847 8.61093 16.9422 8.80491 16.9808C8.99889 17.0194 9.19996 16.9996 9.38268 16.9239C9.56541 16.8482 9.72159 16.72 9.83147 16.5556C9.94135 16.3911 10 16.1978 10 16C10 15.7348 9.89464 15.4804 9.70711 15.2929C9.51957 15.1054 9.26522 15 9 15ZM2 14C1.73478 14 1.48043 14.1054 1.29289 14.2929C1.10536 14.4804 1 14.7348 1 15V17C1 17.2652 1.10536 17.5196 1.29289 17.7071C1.48043 17.8946 1.73478 18 2 18C2.26522 18 2.51957 17.8946 2.70711 17.7071C2.89464 17.5196 3 17.2652 3 17V15C3 14.7348 2.89464 14.4804 2.70711 14.2929C2.51957 14.1054 2.26522 14 2 14ZM22 14C21.7348 14 21.4804 14.1054 21.2929 14.2929C21.1054 14.4804 21 14.7348 21 15V17C21 17.2652 21.1054 17.5196 21.2929 17.7071C21.4804 17.8946 21.7348 18 22 18C22.2652 18 22.5196 17.8946 22.7071 17.7071C22.8946 17.5196 23 17.2652 23 17V15C23 14.7348 22.8946 14.4804 22.7071 14.2929C22.5196 14.1054 22.2652 14 22 14ZM17 7H13V5.72C13.3023 5.54549 13.5536 5.29491 13.7291 4.99317C13.9045 4.69143 13.9979 4.34903 14 4C14 3.46957 13.7893 2.96086 13.4142 2.58579C13.0391 2.21071 12.5304 2 12 2C11.4696 2 10.9609 2.21071 10.5858 2.58579C10.2107 2.96086 10 3.46957 10 4C10.0021 4.34903 10.0955 4.69143 10.2709 4.99317C10.4464 5.29491 10.6977 5.54549 11 5.72V7H7C6.20435 7 5.44129 7.31607 4.87868 7.87868C4.31607 8.44129 4 9.20435 4 10V19C4 19.7956 4.31607 20.5587 4.87868 21.1213C5.44129 21.6839 6.20435 22 7 22H17C17.7956 22 18.5587 21.6839 19.1213 21.1213C19.6839 20.5587 20 19.7956 20 19V10C20 9.20435 19.6839 8.44129 19.1213 7.87868C18.5587 7.31607 17.7956 7 17 7ZM13.72 9L13.22 11H10.78L10.28 9H13.72ZM18 19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H7C6.73478 20 6.48043 19.8946 6.29289 19.7071C6.10536 19.5196 6 19.2652 6 19V10C6 9.73478 6.10536 9.48043 6.29289 9.29289C6.48043 9.10536 6.73478 9 7 9H8.22L9 12.24C9.05475 12.4619 9.18385 12.6583 9.36579 12.7966C9.54774 12.9349 9.77157 13.0067 10 13H14C14.2284 13.0067 14.4523 12.9349 14.6342 12.7966C14.8162 12.6583 14.9452 12.4619 15 12.24L15.78 9H17C17.2652 9 17.5196 9.10536 17.7071 9.29289C17.8946 9.48043 18 9.73478 18 10V19ZM15 15C14.8022 15 14.6089 15.0586 14.4444 15.1685C14.28 15.2784 14.1518 15.4346 14.0761 15.6173C14.0004 15.8 13.9806 16.0011 14.0192 16.1951C14.0578 16.3891 14.153 16.5673 14.2929 16.7071C14.4327 16.847 14.6109 16.9422 14.8049 16.9808C14.9989 17.0194 15.2 16.9996 15.3827 16.9239C15.5654 16.8482 15.7216 16.72 15.8315 16.5556C15.9414 16.3911 16 16.1978 16 16C16 15.7348 15.8946 15.4804 15.7071 15.2929C15.5196 15.1054 15.2652 15 15 15Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/agents`,text:`SETTINGS$NAV_AGENT`,subtitle:`SETTINGS$PAGE_AGENT_PROFILES_SUBLINE`},{icon:(0,S.jsx)(e=>(0,S.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,S.jsx)(`path`,{d:`M10 13C9.80222 13 9.60888 13.0586 9.44443 13.1685C9.27998 13.2784 9.15181 13.4346 9.07612 13.6173C9.00043 13.8 8.98063 14.0011 9.01921 14.1951C9.0578 14.3891 9.15304 14.5673 9.29289 14.7071C9.43275 14.847 9.61093 14.9422 9.80491 14.9808C9.99889 15.0194 10.2 14.9996 10.3827 14.9239C10.5654 14.8482 10.7216 14.72 10.8315 14.5556C10.9414 14.3911 11 14.1978 11 14C11 13.7348 10.8946 13.4804 10.7071 13.2929C10.5196 13.1054 10.2652 13 10 13ZM10 9C9.80222 9 9.60888 9.05865 9.44443 9.16853C9.27998 9.27841 9.15181 9.43459 9.07612 9.61732C9.00043 9.80004 8.98063 10.0011 9.01921 10.1951C9.0578 10.3891 9.15304 10.5673 9.29289 10.7071C9.43275 10.847 9.61093 10.9422 9.80491 10.9808C9.99889 11.0194 10.2 10.9996 10.3827 10.9239C10.5654 10.8482 10.7216 10.72 10.8315 10.5556C10.9414 10.3911 11 10.1978 11 10C11 9.73478 10.8946 9.48043 10.7071 9.29289C10.5196 9.10536 10.2652 9 10 9ZM14 9C13.8022 9 13.6089 9.05865 13.4444 9.16853C13.28 9.27841 13.1518 9.43459 13.0761 9.61732C13.0004 9.80004 12.9806 10.0011 13.0192 10.1951C13.0578 10.3891 13.153 10.5673 13.2929 10.7071C13.4327 10.847 13.6109 10.9422 13.8049 10.9808C13.9989 11.0194 14.2 10.9996 14.3827 10.9239C14.5654 10.8482 14.7216 10.72 14.8315 10.5556C14.9414 10.3911 15 10.1978 15 10C15 9.73478 14.8946 9.48043 14.7071 9.29289C14.5196 9.10536 14.2652 9 14 9ZM21 13C21.2652 13 21.5196 12.8946 21.7071 12.7071C21.8946 12.5196 22 12.2652 22 12C22 11.7348 21.8946 11.4804 21.7071 11.2929C21.5196 11.1054 21.2652 11 21 11H19V9H21C21.2652 9 21.5196 8.89464 21.7071 8.70711C21.8946 8.51957 22 8.26522 22 8C22 7.73478 21.8946 7.48043 21.7071 7.29289C21.5196 7.10536 21.2652 7 21 7H18.82C18.6707 6.5806 18.4299 6.19969 18.1151 5.8849C17.8003 5.57011 17.4194 5.32932 17 5.18V3C17 2.73478 16.8946 2.48043 16.7071 2.29289C16.5196 2.10536 16.2652 2 16 2C15.7348 2 15.4804 2.10536 15.2929 2.29289C15.1054 2.48043 15 2.73478 15 3V5H13V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V5H9V3C9 2.73478 8.89464 2.48043 8.70711 2.29289C8.51957 2.10536 8.26522 2 8 2C7.73478 2 7.48043 2.10536 7.29289 2.29289C7.10536 2.48043 7 2.73478 7 3V5.18C6.5806 5.32932 6.19969 5.57011 5.8849 5.8849C5.57011 6.19969 5.32932 6.5806 5.18 7H3C2.73478 7 2.48043 7.10536 2.29289 7.29289C2.10536 7.48043 2 7.73478 2 8C2 8.26522 2.10536 8.51957 2.29289 8.70711C2.48043 8.89464 2.73478 9 3 9H5V11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H5V15H3C2.73478 15 2.48043 15.1054 2.29289 15.2929C2.10536 15.4804 2 15.7348 2 16C2 16.2652 2.10536 16.5196 2.29289 16.7071C2.48043 16.8946 2.73478 17 3 17H5.18C5.32932 17.4194 5.57011 17.8003 5.8849 18.1151C6.19969 18.4299 6.5806 18.6707 7 18.82V21C7 21.2652 7.10536 21.5196 7.29289 21.7071C7.48043 21.8946 7.73478 22 8 22C8.26522 22 8.51957 21.8946 8.70711 21.7071C8.89464 21.5196 9 21.2652 9 21V19H11V21C11 21.2652 11.1054 21.5196 11.2929 21.7071C11.4804 21.8946 11.7348 22 12 22C12.2652 22 12.5196 21.8946 12.7071 21.7071C12.8946 21.5196 13 21.2652 13 21V19H15V21C15 21.2652 15.1054 21.5196 15.2929 21.7071C15.4804 21.8946 15.7348 22 16 22C16.2652 22 16.5196 21.8946 16.7071 21.7071C16.8946 21.5196 17 21.2652 17 21V18.82C17.4194 18.6707 17.8003 18.4299 18.1151 18.1151C18.4299 17.8003 18.6707 17.4194 18.82 17H21C21.2652 17 21.5196 16.8946 21.7071 16.7071C21.8946 16.5196 22 16.2652 22 16C22 15.7348 21.8946 15.4804 21.7071 15.2929C21.5196 15.1054 21.2652 15 21 15H19V13H21ZM17 16C17 16.2652 16.8946 16.5196 16.7071 16.7071C16.5196 16.8946 16.2652 17 16 17H8C7.73478 17 7.48043 16.8946 7.29289 16.7071C7.10536 16.5196 7 16.2652 7 16V8C7 7.73478 7.10536 7.48043 7.29289 7.29289C7.48043 7.10536 7.73478 7 8 7H16C16.2652 7 16.5196 7.10536 16.7071 7.29289C16.8946 7.48043 17 7.73478 17 8V16ZM14 13C13.8022 13 13.6089 13.0586 13.4444 13.1685C13.28 13.2784 13.1518 13.4346 13.0761 13.6173C13.0004 13.8 12.9806 14.0011 13.0192 14.1951C13.0578 14.3891 13.153 14.5673 13.2929 14.7071C13.4327 14.847 13.6109 14.9422 13.8049 14.9808C13.9989 15.0194 14.2 14.9996 14.3827 14.9239C14.5654 14.8482 14.7216 14.72 14.8315 14.5556C14.9414 14.3911 15 14.1978 15 14C15 13.7348 14.8946 13.4804 14.7071 13.2929C14.5196 13.1054 14.2652 13 14 13Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/llm`,text:`SETTINGS$NAV_LLM`,subtitle:`SETTINGS$PAGE_LLM_SUBLINE`,disabledByAcp:!0},{icon:(0,S.jsx)(e=>(0,S.jsxs)(`svg`,{id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 22.3 18.66`,...e,children:[(0,S.jsx)(`defs`,{children:(0,S.jsx)(`style`,{children:`
2
+ .st0 {
3
+ stroke-miterlimit: 10;
4
+ }
5
+
6
+ .st0, .st1 {
7
+ fill: none;
8
+ stroke: currentColor;
9
+ stroke-linecap: round;
10
+ stroke-width: 2px;
11
+ }
12
+
13
+ .st1 {
14
+ stroke-linejoin: round;
15
+ }
16
+ `})}),(0,S.jsx)(`path`,{className:`st1`,d:`M15.15,12.54h3.26c1.58,0,2.93-1.29,2.9-2.88-.03-1.53-1.28-2.77-2.82-2.77-.04,0-.08,0-.11,0,.13-.44.16-.92.04-1.43-.27-1.17-1.27-2.05-2.46-2.17-.74-.07-1.43.14-1.97.55,0,0,0-.02,0-.03,0-1.56-1.26-2.82-2.82-2.82s-2.82,1.26-2.82,2.82c0,0,0,.02,0,.03-.54-.4-1.23-.62-1.97-.55-1.19.12-2.19,1-2.46,2.17-.12.5-.09.99.04,1.43-.04,0-.08,0-.11,0-1.56,0-2.82,1.26-2.82,2.82s1.26,2.82,2.82,2.82l1.29.03c.41,0,.74.34.74.75v1.85c0,1.38,1.12,2.5,2.5,2.5h.29c1.44,0,2.6-1.17,2.6-2.6V6.49`}),(0,S.jsx)(`polyline`,{className:`st0`,points:`7.97 9.74 11.22 6.49 14.47 9.74`})]}),{width:16,height:16}),to:`/settings/condenser`,text:`SETTINGS$NAV_CONDENSER`,subtitle:`SETTINGS$PAGE_CONDENSER_SUBLINE`,disabledByAcp:!0},{icon:(0,S.jsx)(x,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),to:`/settings/verification`,text:`SETTINGS$NAV_VERIFICATION`,subtitle:`SETTINGS$PAGE_VERIFICATION_SUBLINE`,disabledByAcp:!0},{icon:(0,S.jsx)(y,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),to:`/settings/app`,text:`SETTINGS$NAV_APPLICATION`,subtitle:`SETTINGS$PAGE_APPLICATION_SUBLINE`},{icon:(0,S.jsx)(e=>(0,S.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,S.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M17.0265 1.63647C18.2362 1.88301 19.3557 2.45458 20.2649 3.28974C21.1741 4.12489 21.8384 5.19205 22.1865 6.37647C22.509 7.46247 22.557 8.61147 22.326 9.72147C21.9921 11.2422 21.1518 12.6046 19.9428 13.5856C18.7337 14.5666 17.2274 15.1081 15.6705 15.1215C15.0135 15.1215 14.3595 15.027 13.731 14.8365L12.531 16.2435L11.9625 16.506H10.5V18.756L9.75 19.506H7.5V21.756L6.75 22.506H2.25L1.5 21.756V18.2955L1.719 17.766L9.18 10.305C8.96826 9.62297 8.86698 8.91148 8.88 8.19747C8.89367 7.19853 9.12754 6.2149 9.56495 5.3167C10.0024 4.4185 10.6325 3.62786 11.4105 3.00113C12.1885 2.3744 13.0952 1.92702 14.0659 1.69088C15.0367 1.45473 16.0475 1.43565 17.0265 1.63497V1.63647ZM19.0035 12.4365C19.9458 11.6734 20.6011 10.6131 20.862 9.42897L20.868 9.43647C21.0538 8.57068 21.0204 7.67216 20.7707 6.82258C20.521 5.97299 20.063 5.19926 19.4383 4.57169C18.8135 3.94412 18.0419 3.4826 17.1934 3.22908C16.345 2.97555 15.4466 2.93804 14.58 3.11997C13.4112 3.3794 12.3627 4.0224 11.6016 4.94661C10.8405 5.87082 10.4105 7.02309 10.38 8.21997C10.365 8.90397 10.485 9.58197 10.7385 10.215L10.5735 11.0295L3 18.606V21.006H6V18.756L6.75 18.006H9V15.756L9.75 15.006H11.6175L12.9315 13.482L13.773 13.272C14.3796 13.509 15.0253 13.6301 15.6765 13.629C16.8885 13.6197 18.0615 13.1992 19.0035 12.4365ZM17.7465 8.33847C17.8648 8.17505 17.9489 7.98945 17.9937 7.79277C18.0386 7.59609 18.0434 7.39239 18.0077 7.19384C17.972 6.99528 17.8967 6.80597 17.7861 6.63721C17.6756 6.46845 17.5322 6.32373 17.3644 6.21169C17.1967 6.09965 17.008 6.0226 16.8098 5.98514C16.6116 5.94769 16.4078 5.95061 16.2108 5.99372C16.0137 6.03683 15.8273 6.11925 15.6629 6.23605C15.4984 6.35285 15.3592 6.50162 15.2535 6.67347C15.0503 7.00406 14.983 7.40054 15.066 7.77963C15.1489 8.15872 15.3755 8.49093 15.6982 8.70645C16.0209 8.92198 16.4146 9.00405 16.7966 8.93543C17.1785 8.86682 17.519 8.65285 17.7465 8.33847Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/secrets`,text:`SETTINGS$NAV_SECRETS`,subtitle:`SETTINGS$PAGE_SECRETS_SUBLINE`}];function T(){let{data:e}=u(),{data:t}=h(),{backend:n}=i(),a=e?.feature_flags,o=t?.agent_settings??null,{activeProfile:s}=_(),c=(s?.agent_kind??o?.agent_kind)===`acp`,l=typeof o?.acp_server==`string`?o.acp_server:void 0,d=c?s?.name??g.find(({key:e})=>e===l)?.display_name??`ACP Agent`:void 0;return w.filter(e=>!v(e.to,a)).map(e=>{let t=e.to===`/settings`?{...e,text:n.kind===`local`?r.SETTINGS$LLM_PROFILES:e.text,subtitle:n.kind===`local`?r.SETTINGS$PAGE_LLM_PROFILES_SUBLINE:e.subtitle}:e;return c&&e.disabledByAcp?{type:`item`,item:t,disabled:!0,disabledAgentName:d}:{type:`item`,item:t}})}export{w as n,C as r,T as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./useQuery-D5pEZbY0.js";import{N as t,_ as n,d as r}from"./agent-server-compatibility-BWN-EIQn.js";import{u as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{t as a}from"./proxy-B3tCGf0X.js";import{t as o}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js";var s=100;function c(){let e=n().backend;if(e.kind!==`cloud`)throw Error(`Cloud skills call requires a cloud backend.`);return e}async function l(){let e=c(),t=[],n=null;do{let r=new URLSearchParams({limit:String(s)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/skills/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}function u(e){return{name:e.name,type:`knowledge`,source:`public`,description:e.description,triggers:e.triggers,content:e.content,license:e.license??null,compatibility:e.compatibility??null}}var d=o.map(u),f=class{static async getSkills(e){if(n().backend.kind===`cloud`)return l();let a=[];try{a=(await new i(r()).getSkills({load_public:!1,load_user:!0,load_project:!0,load_org:!1,project_dir:e??t()})).skills??[]}catch{}return[...a,...d]}},p=t=>e({queryKey:[`skills`,t??null],queryFn:()=>f.getSkills(t),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{p as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{C as n,t as r}from"./use-event-store-DjgU4wfO.js";var i=e(t(),1);function a(e){if(n(e)&&e.observation.kind===`TaskTrackerObservation`){let t=e.observation;if(t.command===`plan`)return t.task_list.map((e,t)=>({id:String(t+1),title:e.title,status:e.status,notes:e.notes||void 0}))}return null}function o(){let e=r(e=>e.events);return(0,i.useMemo)(()=>{for(let t=e.length-1;t>=0;--t){let n=a(e[t]);if(n)return{taskList:n,hasTaskList:n.length>0}}return{taskList:[],hasTaskList:!1}},[e])}export{o as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{C as n,t as r}from"./use-event-store-Bbaz51GR.js";var i=e(t(),1);function a(e){if(n(e)&&e.observation.kind===`TaskTrackerObservation`){let t=e.observation;if(t.command===`plan`)return t.task_list.map((e,t)=>({id:String(t+1),title:e.title,status:e.status,notes:e.notes||void 0}))}return null}function o(){let e=r(e=>e.events);return(0,i.useMemo)(()=>{for(let t=e.length-1;t>=0;--t){let n=a(e[t]);if(n)return{taskList:n,hasTaskList:n.length>0}}return{taskList:[],hasTaskList:!1}},[e])}export{o as t};
@@ -0,0 +1 @@
1
+ import{d as e}from"./telemetry-C5JMEfqB.js";import{r as t}from"./use-settings-CyxSlyTQ.js";var n=()=>{let{data:n}=t(),r={current_url:window.location.href,user_email:n?.email||n?.git_user_email||null},i=(t,n={})=>{e(t,{...n,...r})};return{trackLoginButtonClick:({provider:e})=>{i(`login_button_clicked`,{provider:e})},trackConversationCreated:({conversationId:e,taskId:t,hasRepository:n,gitProvider:r,hasWorkspace:a,workspaceMode:o,hasInitialQuery:s,agentType:c,hasParentConversation:l,entryPoint:u})=>{i(`conversation_created`,{conversation_id:e,task_id:t,is_start_task:e.startsWith(`task-`),has_repository:n,git_provider:r,has_workspace:a,workspace_mode:o,has_initial_query:s,agent_type:c,has_parent_conversation:l,entry_point:u})},trackPushButtonClick:()=>{i(`push_button_clicked`)},trackPullButtonClick:()=>{i(`pull_button_clicked`)},trackCreatePrButtonClick:()=>{i(`create_pr_button_clicked`)},trackUserSignupCompleted:()=>{i(`user_signup_completed`,{signup_timestamp:new Date().toISOString()})},trackPrebuiltAutomationEnabled:({automationId:e,automationName:t,automationCategory:n})=>{i(`prebuilt_automation_enabled`,{automation_id:e,automation_name:t,automation_category:n})},trackInitialQuerySubmitted:({entryPoint:e,queryCharacterLength:t,replayJsonSize:n})=>{i(`initial_query_submitted`,{entry_point:e,query_character_length:t,replay_json_size:n})},trackUserMessageSent:({sessionMessageCount:e,currentMessageLength:t})=>{i(`user_message_sent`,{session_message_count:e,current_message_length:t})},trackDownloadVsCodeButtonClicked:()=>{i(`download_via_vscode_button_clicked`)},trackSettingsSaved:({llmModel:e,llmApiKeySet:t,searchApiKeySet:n,remoteRuntimeResourceFactor:r})=>{i(`settings_saved`,{LLM_MODEL:e,LLM_API_KEY_SET:t,SEARCH_API_KEY_SET:n,REMOTE_RUNTIME_RESOURCE_FACTOR:r})},trackMcpConfigUpdated:({sseServersCount:e,stdioServersCount:t})=>{i(`mcp_config_updated`,{has_mcp_config:!0,sse_servers_count:e,stdio_servers_count:t})},trackDownloadTrajectoryButtonClicked:()=>{i(`download_trajectory_button_clicked`)},trackConversationExported:e=>{i(`conversation_exported`,{format:e})},trackAutomationCreated:({backendKind:e})=>{i(`automation_created`,{backend_kind:e})},trackAutomationExecuted:({backendKind:e})=>{i(`automation_executed`,{backend_kind:e})},trackAutomationDeleted:({backendKind:e})=>{i(`automation_deleted`,{backend_kind:e})},trackAutomationDeactivated:({backendKind:e})=>{i(`automation_deactivated`,{backend_kind:e})},trackAutomationEdited:({backendKind:e})=>{i(`automation_edited`,{backend_kind:e})},trackAutomationExported:({backendKind:e})=>{i(`automation_exported`,{backend_kind:e})},trackAutomationImported:({backendKind:e})=>{i(`automation_imported`,{backend_kind:e})},trackBackendAdded:({backendKind:e,connectionMethod:t,isOpenhandsCloud:n,isCustomHost:r,hasApiKey:a,source:o})=>{i(`backend_added`,{backend_kind:e,connection_method:t,is_openhands_cloud:n,is_custom_host:r,has_api_key:a,source:o})},trackOnboardingStarted:()=>{i(`onboarding_started`)},trackOnboardingStepViewed:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{i(`onboarding_step_viewed`,{step:e,step_index:t,total_steps:n,agent:r})},trackOnboardingCompleted:({agent:e})=>{i(`onboarding_completed`,{agent:e})},trackOnboardingSkipped:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{i(`onboarding_skipped`,{step:e,step_index:t,total_steps:n,agent:r})}}};export{n as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useQuery-CRBP8vIS.js";import{n as r}from"./active-backend-context-hxq31W25.js";import{t as i}from"./agent-server-conversation-service.api-CuSdr4Qb.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};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useQuery-D5pEZbY0.js";import{n as r}from"./active-backend-context-B8rMv0X9.js";import{t as i}from"./agent-server-conversation-service.api-DSPIkMwJ.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};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{E as n,T as r,j as i,m as a,n as o,u as s,y as c}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~epa72zsm-B4rXs7Zd.js";import{d as l}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nfpll1wp-BCpa95De.js";var u=class extends i{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),r(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&a(t.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??l();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){s.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},d=e(t(),1);function f(e,t){let r=o(t),[i]=d.useState(()=>new u(r,e));d.useEffect(()=>{i.setOptions(e)},[i,e]);let a=d.useSyncExternalStore(d.useCallback(e=>i.subscribe(s.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=d.useCallback((e,t)=>{i.mutate(e,t).catch(c)},[i]);if(a.error&&n(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}export{f as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{E as n,T as r,j as i,m as a,n as o,u as s,y as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{m as l}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";var u=class extends i{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),r(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&a(t.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??l();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){s.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},d=e(t(),1);function f(e,t){let r=o(t),[i]=d.useState(()=>new u(r,e));d.useEffect(()=>{i.setOptions(e)},[i,e]);let a=d.useSyncExternalStore(d.useCallback(e=>i.subscribe(s.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=d.useCallback((e,t)=>{i.mutate(e,t).catch(c)},[i]);if(a.error&&n(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}export{f as t};