@openhands/agent-canvas 1.5.1 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (720) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{Trans-DqF_OEZB.js → Trans-52HCczKK.js} +1 -1
  4. package/build/assets/{acp-providers-DerAmTyY.js → acp-providers-xACMK9ZP.js} +1 -1
  5. package/build/assets/{active-backend-context-B8rMv0X9.js → active-backend-context-Cd1qcZsb.js} +1 -1
  6. package/build/assets/{add-backend-modal-CxC7BNEc.js → add-backend-modal-5chsfln3.js} +1 -1
  7. package/build/assets/{agent-profiles-settings-BJb8YXR1.js → agent-profiles-settings-BWK4H3kR.js} +1 -1
  8. package/build/assets/agent-server-compatibility-DMY0CihN.js +1 -0
  9. package/build/assets/agent-server-conversation-service.api-CI5-xmIX.js +41 -0
  10. package/build/assets/agent-settings-CMd8-O4f.js +2 -0
  11. package/build/assets/agent-settings-CdrhQJXX.js +1 -0
  12. package/build/assets/{alert-banner-Dh51WURQ.js → alert-banner-CLfWuIAX.js} +1 -1
  13. package/build/assets/api-key-entry-screen-Cc3aC7DZ.js +1 -0
  14. package/build/assets/app-settings-B-DQcBoB.js +1 -0
  15. package/build/assets/{automation-detail-CZsu2CoM.js → automation-detail-BgxBIpyK.js} +2 -2
  16. package/build/assets/automation-export-Dbur8OHa.js +2 -0
  17. package/build/assets/automations-list-BWfjizlp.js +1 -0
  18. package/build/assets/{back-nav-button-DVknCcSP.js → back-nav-button-CaKvsD1E.js} +1 -1
  19. package/build/assets/backend-form-modal-YcfpuBZo.js +1 -0
  20. package/build/assets/{backend-synced-settings-badge-BSfN0AZA.js → backend-synced-settings-badge-BellMmgC.js} +1 -1
  21. package/build/assets/{base-modal-CIF_785P.js → base-modal-Cw7enAHz.js} +1 -1
  22. package/build/assets/{brand-button-B1izLAdR.js → brand-button-BulEFHr3.js} +1 -1
  23. package/build/assets/{browser-DKaeq_sT.js → browser-DfVgUREb.js} +2 -2
  24. package/build/assets/browser-store-CBqI3tNR.js +1 -0
  25. package/build/assets/{browser-tab-qb_ftCxW.js → browser-tab-CmIKQB7S.js} +1 -1
  26. package/build/assets/chat-send-button-BchSSwuD.js +1 -0
  27. package/build/assets/circle-check-BXbQ5nEH.js +1 -0
  28. package/build/assets/{circle-plus-check-toggle-DoFIjVE0.js → circle-plus-check-toggle-BhpPjkh9.js} +1 -1
  29. package/build/assets/client-source-DAUgyJsi.js +1 -0
  30. package/build/assets/cloud-funnel-analytics-B5OeWh4y.js +1 -0
  31. package/build/assets/{color-themes-CHizm1xF.js → color-themes-QKMSVfDU.js} +1 -1
  32. package/build/assets/{combobox-caret-CxZpqoSR.js → combobox-caret-kNZtp53R.js} +1 -1
  33. package/build/assets/{command-menu-oTvKDU3Y.js → command-menu-tUsn23zy.js} +1 -1
  34. package/build/assets/{command-store-D8J5LMW1.js → command-store-B0hrIWMN.js} +1 -1
  35. package/build/assets/{condenser-settings-BGlWn93P.js → condenser-settings-BBizzfIH.js} +1 -1
  36. package/build/assets/{confirmation-modal-DGBWM2Ls.js → confirmation-modal-108xng7X.js} +1 -1
  37. package/build/assets/{context-menu-list-item-6psNyl7X.js → context-menu-list-item-BbKfFuN1.js} +1 -1
  38. package/build/assets/conversation-CTzSrLMq.js +1 -0
  39. package/build/assets/conversation-CgcXNb-Z.js +90 -0
  40. package/build/assets/conversation-panel-bscjGQda.js +1 -0
  41. package/build/assets/{conversation-service.api-_f9GlIEi.js → conversation-service.api-DbBvscJA.js} +1 -1
  42. package/build/assets/conversation-state-store-C5GagZHT.js +1 -0
  43. package/build/assets/{conversation-store-LptbOvKa.js → conversation-store-CyVqoa0d.js} +1 -1
  44. package/build/assets/{conversation-tab-empty-state-CNUmIms2.js → conversation-tab-empty-state-2KYlk5Bh.js} +1 -1
  45. package/build/assets/{copy-to-clipboard-button-CFzH_NOX.js → copy-to-clipboard-button-C54YRPMg.js} +1 -1
  46. package/build/assets/declaration-_yumYLEx.js +1 -0
  47. package/build/assets/{device-verify-WBSjJBLH.js → device-verify-D6FW_KZq.js} +1 -1
  48. package/build/assets/{dropdown-classes-D3wMJlXT.js → dropdown-classes-9uONlOg1.js} +1 -1
  49. package/build/assets/{ellipsis-button-CbNnHlIq.js → ellipsis-button-CoaUrKmQ.js} +1 -1
  50. package/build/assets/{entry.client-DNlPGxsu.js → entry.client-BJSVzw7V.js} +2 -2
  51. package/build/assets/{enum-filter-dropdown-JLYv1t8L.js → enum-filter-dropdown-qQzyjk_q.js} +1 -1
  52. package/build/assets/{environment-switch-overlay-B1PFO8P8.js → environment-switch-overlay-XRWCClLu.js} +1 -1
  53. package/build/assets/extensions-hub-DUp9sWQY.js +1 -0
  54. package/build/assets/extensions-navigation-DmkftjAx.js +1 -0
  55. package/build/assets/file-tUAzhmJ3.js +1 -0
  56. package/build/assets/files-tab-GV5hwiIM.js +1 -0
  57. package/build/assets/files-tab-store-DehyITNC.js +1 -0
  58. package/build/assets/{form-control-classes-CbdN5aO3.js → form-control-classes-BPUnoYyg.js} +1 -1
  59. package/build/assets/git-provider-icon-DDkru3b_.js +1 -0
  60. package/build/assets/highlighted-source-view-CYkPZUxr.js +1 -0
  61. package/build/assets/home-C53WekZ2.js +1 -0
  62. package/build/assets/home-EAwq8ah2.js +1 -0
  63. package/build/assets/index-home-kBdZGKtu.js +1 -0
  64. package/build/assets/install-server-modal-DYk4VP3-.js +1 -0
  65. package/build/assets/{launch-CAGavYl-.js → launch-CIecOy_y.js} +1 -1
  66. package/build/assets/lesson-plan-BSEUwflx.js +4 -0
  67. package/build/assets/llm-not-configured-banner-C8uv1PHT.js +27 -0
  68. package/build/assets/llm-settings-0Bb97NCk.js +1 -0
  69. package/build/assets/llm-settings-D4toJ90k.js +1 -0
  70. package/build/assets/{llm-subscription-service-Casyzgn1.js → llm-subscription-service-BPRw3u3H.js} +1 -1
  71. package/build/assets/{loading-spinner-BcdnT0mN.js → loading-spinner-BCInDEXB.js} +1 -1
  72. package/build/assets/manage-backends-modal-Bon32JYr.js +1 -0
  73. package/build/assets/manifest-ec000ae3.js +1 -0
  74. package/build/assets/markdown-renderer-BlaJOAI2.js +2 -0
  75. package/build/assets/mcp-CFIpOkn2.js +9 -0
  76. package/build/assets/messages-eRPeR4pW.js +40 -0
  77. package/build/assets/{modal-body-Cc2zp0xb.js → modal-body-Bg9UCeoV.js} +1 -1
  78. package/build/assets/{modal-classes-3qT9Ap7Q.js → modal-classes-H1KbJkeC.js} +1 -1
  79. package/build/assets/{modal-close-button-BcIBUdSq.js → modal-close-button-BMLYvo0C.js} +1 -1
  80. package/build/assets/{model-selector-DJrMrFAr.js → model-selector-BqX2RvEr.js} +1 -1
  81. package/build/assets/{navigation-link-D8hfwvxI.js → navigation-link-DoJzTCEz.js} +1 -1
  82. package/build/assets/onboarding-3KO4qE6R.js +1 -0
  83. package/build/assets/onboarding-modal-D4vqkJeT.js +1 -0
  84. package/build/assets/{organization-service.api-vrRNwOma.js → organization-service.api-CvfQugOt.js} +1 -1
  85. package/build/assets/{path-utils-PNfCKQDV.js → path-utils-DRgexxnX.js} +1 -1
  86. package/build/assets/{plan-components-BdZXPyZU.js → plan-components-qkMiGs_-.js} +1 -1
  87. package/build/assets/{planner-tab-ByOw1he8.js → planner-tab-ZrjiirRr.js} +1 -1
  88. package/build/assets/{plugins-management-service-B75jyC56.js → plugins-management-service-9qT-r_37.js} +1 -1
  89. package/build/assets/plus-CzE1b-wl.js +1 -0
  90. package/build/assets/{profiles-service.api-BQTklD5D.js → profiles-service.api-CRVlrQpT.js} +1 -1
  91. package/build/assets/{providers-DfTB2gPd.js → providers-C2DFGBrf.js} +1 -1
  92. package/build/assets/{proxy-B3tCGf0X.js → proxy-DnnDqkwn.js} +1 -1
  93. package/build/assets/puzzle-IHQnD54C.js +1 -0
  94. package/build/assets/recommended-automations-launcher-B97vgHuN.js +58 -0
  95. package/build/assets/refresh-cw-DxbAs3SK.js +1 -0
  96. package/build/assets/root-BbONavTg.css +1 -0
  97. package/build/assets/root-D01rpqZU.js +2 -0
  98. package/build/assets/root-layout-BiHbCIkS.js +2 -0
  99. package/build/assets/{runtime-waiting-state-CnyVhX4T.js → runtime-waiting-state-CbUV9txX.js} +1 -1
  100. package/build/assets/{schema-field-CUwk4wrQ.js → schema-field-B9-9Ta9u.js} +1 -1
  101. package/build/assets/sdk-section-page-DG1s25Pr.js +1 -0
  102. package/build/assets/{sdk-settings-schema-CLR01YIK.js → sdk-settings-schema-B42JFr5Y.js} +1 -1
  103. package/build/assets/{secrets-service-CvyPWJhg.js → secrets-service-DvyS6-mV.js} +1 -1
  104. package/build/assets/secrets-settings-CeSq6cQw.js +1 -0
  105. package/build/assets/{segmented-toggle-kzwZkLaj.js → segmented-toggle-DRVJBNy0.js} +1 -1
  106. package/build/assets/settings-Dzo0dJKM.js +1 -0
  107. package/build/assets/{settings-mQUckT0g.js → settings-HcwfqMjJ.js} +1 -1
  108. package/build/assets/{settings-dropdown-input-Dhx9ErGd.js → settings-dropdown-input-B6RL_mt0.js} +1 -1
  109. package/build/assets/settings-index-uAKHyijw.js +1 -0
  110. package/build/assets/{settings-input-BsgQWS5R.js → settings-input-ZoaAPNQh.js} +1 -1
  111. package/build/assets/{settings-list-classes-DSJJX99U.js → settings-list-classes-Dr8LgITi.js} +1 -1
  112. package/build/assets/settings-modal-BVX2G_IT.js +1 -0
  113. package/build/assets/{settings-service.api-DXk5TdeJ.js → settings-service.api-BY7ncxIz.js} +1 -1
  114. package/build/assets/{settings-switch-Bes8dIlV.js → settings-switch-DUlGnP0B.js} +1 -1
  115. package/build/assets/{settings-utils-DzCVfiR3.js → settings-utils-kWEEvcdv.js} +1 -1
  116. package/build/assets/shared-conversation-CV4Rtdz2.js +1 -0
  117. package/build/assets/{sidebar-layout-Bm7pa3Vk.js → sidebar-layout-BhGooCga.js} +1 -1
  118. package/build/assets/sidebar-mobile-menu-toggle-BntOJphE.js +1 -0
  119. package/build/assets/{sidebar-nav-link-CHqyFXwV.js → sidebar-nav-link-DkA1XWV8.js} +1 -1
  120. package/build/assets/{sidebar-store-uiUXBU1N.js → sidebar-store-CF3b12-m.js} +1 -1
  121. package/build/assets/{skill-card-pill-row-BPYKQ3IN.js → skill-card-pill-row-_gWe1Tws.js} +1 -1
  122. package/build/assets/skill-icon-badge-C-zbaXbD.js +1 -0
  123. package/build/assets/skills-plugins-BwoXKtrR.js +1 -0
  124. package/build/assets/skills-settings-Crq-fZSt.js +2 -0
  125. package/build/assets/{styled-tooltip-B14i_Uac.js → styled-tooltip-CdnCJ67u.js} +1 -1
  126. package/build/assets/syntax-highlighter-CZK2ab-O.js +1 -0
  127. package/build/assets/{task-list-tab-DyfgG4MC.js → task-list-tab-CONOO9iI.js} +1 -1
  128. package/build/assets/telemetry-CC32dJYW.js +2 -0
  129. package/build/assets/{terminal-DRXt2Lr4.js → terminal-CTkDpIU-.js} +1 -1
  130. package/build/assets/{toggle-switch-DX_k418f.js → toggle-switch-yVIzmJLM.js} +1 -1
  131. package/build/assets/{typography-CzfoD9DY.js → typography-BBVEW0un.js} +1 -1
  132. package/build/assets/{use-acp-credential-form-Bm8qXdlc.js → use-acp-credential-form-CIsp8hJe.js} +1 -1
  133. package/build/assets/use-activate-agent-profile-BfcTTJJG.js +1 -0
  134. package/build/assets/{use-active-agent-profile-hI-x-UBa.js → use-active-agent-profile-CCeFtmk9.js} +1 -1
  135. package/build/assets/{use-active-conversation-2qeez40F.js → use-active-conversation-Badxj8w4.js} +1 -1
  136. package/build/assets/{use-agent-profiles-0pr5bLS7.js → use-agent-profiles-BSWVN6hH.js} +1 -1
  137. package/build/assets/{use-agent-state-C6peDXUm.js → use-agent-state-BzRrhoPd.js} +1 -1
  138. package/build/assets/use-backends-health-BsZikyFW.js +1 -0
  139. package/build/assets/{use-can-manage-org-profiles-Ck_bsNbH.js → use-can-manage-org-profiles-Do6mYf6P.js} +1 -1
  140. package/build/assets/{use-cloud-current-user-id-DUCSxNjY.js → use-cloud-current-user-id-Cx3B_0-w.js} +1 -1
  141. package/build/assets/use-config-D9zUVw5b.js +1 -0
  142. package/build/assets/{use-create-conversation-r1JHfKO5.js → use-create-conversation-vvl0kvu7.js} +1 -1
  143. package/build/assets/{use-create-secret-Cf2N11d2.js → use-create-secret-CB7Dvd4s.js} +1 -1
  144. package/build/assets/use-event-store-BlpSUF7N.js +4 -0
  145. package/build/assets/{use-handle-plan-click-CsAW3FlH.js → use-handle-plan-click-DDZkew9p.js} +1 -1
  146. package/build/assets/use-is-creating-conversation-fxSzN778.js +1 -0
  147. package/build/assets/{use-launch-skill-in-chat-DJWEfVc5.js → use-launch-skill-in-chat-D6_n1fs3.js} +1 -1
  148. package/build/assets/use-llm-profiles-CNQm7HYS.js +1 -0
  149. package/build/assets/use-plugins-marketplace-CloojomS.js +1 -0
  150. package/build/assets/use-runtime-is-ready-Bx_4cfar.js +1 -0
  151. package/build/assets/{use-save-agent-profile-RqUGqTv6.js → use-save-agent-profile-Bj7N-1jS.js} +1 -1
  152. package/build/assets/{use-save-settings-Chvzeu2s.js → use-save-settings-BMsb2wk_.js} +1 -1
  153. package/build/assets/use-settings-B9XEmh7i.js +1 -0
  154. package/build/assets/use-settings-nav-items-BGfBS0yL.js +16 -0
  155. package/build/assets/{use-skills-xrVoKYrF.js → use-skills-CSRbvPle.js} +1 -1
  156. package/build/assets/{use-task-list-CfisapBW.js → use-task-list-CTIVLrQA.js} +1 -1
  157. package/build/assets/use-tracking-DjdCssvp.js +1 -0
  158. package/build/assets/{use-user-conversation-CnE4zhOA.js → use-user-conversation-BCpFn-Ei.js} +1 -1
  159. package/build/assets/{useTranslation-Cbf5AGg_.js → useTranslation-CHm_6BRr.js} +1 -1
  160. package/build/assets/{utils-DB9LsAzA.js → utils-CrRpzbM2.js} +1 -1
  161. package/build/assets/vendor-markdown-DzO4uO_0.js +37 -0
  162. package/build/assets/{vendor~browser-wXQ-WZEC.js → vendor~browser-Byfuq5J-.js} +1 -1
  163. package/build/assets/{vendor~browser-tab-CsMb-pta.js → vendor~browser-tab-BLk3qxhw.js} +1 -1
  164. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js} +2 -2
  165. package/build/assets/{vendor~files-tab-B-5fBohe.js → vendor~files-tab-XmnauIZI.js} +1 -1
  166. package/build/assets/{vendor~launch-_Km3J77E.js → vendor~launch-DeC8QhXQ.js} +1 -1
  167. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DDmLzCzm.js} +1 -1
  168. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-YrfJYTQw.js +1 -0
  169. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DoaS51iW.js} +123 -3
  170. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-DEYwoy8u.js} +1 -1
  171. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-DZHLw5Sr.js +1 -0
  172. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-UJ4BNDJP.js} +1 -1
  173. package/build/assets/{verification-settings-CfkrXoSa.js → verification-settings-uwOfc16F.js} +1 -1
  174. package/build/index.html +4 -4
  175. package/build/locales/ar/openhands.json +38 -4
  176. package/build/locales/ca/openhands.json +38 -4
  177. package/build/locales/de/openhands.json +38 -4
  178. package/build/locales/en/openhands.json +38 -4
  179. package/build/locales/es/openhands.json +38 -4
  180. package/build/locales/fr/openhands.json +38 -4
  181. package/build/locales/it/openhands.json +38 -4
  182. package/build/locales/ja/openhands.json +38 -4
  183. package/build/locales/ko-KR/openhands.json +38 -4
  184. package/build/locales/no/openhands.json +38 -4
  185. package/build/locales/pt/openhands.json +38 -4
  186. package/build/locales/tr/openhands.json +38 -4
  187. package/build/locales/uk/openhands.json +38 -4
  188. package/build/locales/zh-CN/openhands.json +38 -4
  189. package/build/locales/zh-TW/openhands.json +38 -4
  190. package/config/defaults.json +7 -3
  191. package/dist/api/agent-canvas-updates.cjs +2 -0
  192. package/dist/api/agent-canvas-updates.cjs.map +1 -0
  193. package/dist/api/agent-canvas-updates.d.ts +7 -0
  194. package/dist/api/agent-canvas-updates.js +19 -0
  195. package/dist/api/agent-canvas-updates.js.map +1 -0
  196. package/dist/api/agent-server-adapter.cjs +1 -1
  197. package/dist/api/agent-server-adapter.cjs.map +1 -1
  198. package/dist/api/agent-server-adapter.d.ts +3 -0
  199. package/dist/api/agent-server-adapter.js +1 -0
  200. package/dist/api/agent-server-adapter.js.map +1 -1
  201. package/dist/api/agent-server-compatibility.cjs +1 -1
  202. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  203. package/dist/api/agent-server-compatibility.d.ts +5 -0
  204. package/dist/api/agent-server-compatibility.js +24 -15
  205. package/dist/api/agent-server-compatibility.js.map +1 -1
  206. package/dist/api/agent-server-config.cjs +1 -1
  207. package/dist/api/agent-server-config.cjs.map +1 -1
  208. package/dist/api/agent-server-config.js +11 -8
  209. package/dist/api/agent-server-config.js.map +1 -1
  210. package/dist/api/automation-service/automation-service.api.cjs +2 -0
  211. package/dist/api/automation-service/automation-service.api.cjs.map +1 -0
  212. package/dist/api/automation-service/automation-service.api.d.ts +3 -0
  213. package/dist/api/automation-service/automation-service.api.js +283 -0
  214. package/dist/api/automation-service/automation-service.api.js.map +1 -0
  215. package/dist/api/client-source.cjs +1 -1
  216. package/dist/api/client-source.cjs.map +1 -1
  217. package/dist/api/client-source.d.ts +3 -0
  218. package/dist/api/client-source.js +4 -4
  219. package/dist/api/client-source.js.map +1 -1
  220. package/dist/api/cloud/settings-service.api.cjs.map +1 -1
  221. package/dist/api/cloud/settings-service.api.js.map +1 -1
  222. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  223. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  224. package/dist/api/conversation-service/agent-server-conversation-service.api.js +111 -109
  225. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  226. package/dist/api/mcp-health/mcp-health-store.cjs +2 -0
  227. package/dist/api/mcp-health/mcp-health-store.cjs.map +1 -0
  228. package/dist/api/mcp-health/mcp-health-store.d.ts +22 -0
  229. package/dist/api/mcp-health/mcp-health-store.js +45 -0
  230. package/dist/api/mcp-health/mcp-health-store.js.map +1 -0
  231. package/dist/api/mcp-health/probe-mcp-server-health.cjs +2 -0
  232. package/dist/api/mcp-health/probe-mcp-server-health.cjs.map +1 -0
  233. package/dist/api/mcp-health/probe-mcp-server-health.d.ts +31 -0
  234. package/dist/api/mcp-health/probe-mcp-server-health.js +57 -0
  235. package/dist/api/mcp-health/probe-mcp-server-health.js.map +1 -0
  236. package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
  237. package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
  238. package/dist/api/mcp-service/mcp-service.api.js +66 -46
  239. package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
  240. package/dist/api/plugins-management-service.cjs.map +1 -1
  241. package/dist/api/plugins-management-service.d.ts +6 -1
  242. package/dist/api/plugins-management-service.js.map +1 -1
  243. package/dist/api/plugins-service.d.ts +30 -2
  244. package/dist/api/secrets-service.cjs +1 -1
  245. package/dist/api/secrets-service.cjs.map +1 -1
  246. package/dist/api/secrets-service.d.ts +6 -6
  247. package/dist/api/secrets-service.js +8 -3
  248. package/dist/api/secrets-service.js.map +1 -1
  249. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  250. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  251. package/dist/api/settings-service/settings-service.api.d.ts +1 -1
  252. package/dist/api/settings-service/settings-service.api.js +1 -0
  253. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  254. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
  255. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
  256. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  257. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  258. package/dist/components/features/backends/backend-form-modal.d.ts +4 -1
  259. package/dist/components/features/backends/backend-form-modal.js +15 -16
  260. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  261. package/dist/components/features/backends/backend-selector.cjs +1 -1
  262. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  263. package/dist/components/features/backends/backend-selector.js +103 -102
  264. package/dist/components/features/backends/backend-selector.js.map +1 -1
  265. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  266. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  267. package/dist/components/features/backends/manage-backends-modal.js +85 -73
  268. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  269. package/dist/components/features/chat/chat-interface.cjs +2 -2
  270. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  271. package/dist/components/features/chat/chat-interface.js +131 -129
  272. package/dist/components/features/chat/chat-interface.js.map +1 -1
  273. package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
  274. package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
  275. package/dist/components/features/chat/skill-install-restart-banner.cjs +2 -0
  276. package/dist/components/features/chat/skill-install-restart-banner.cjs.map +1 -0
  277. package/dist/components/features/chat/skill-install-restart-banner.d.ts +11 -0
  278. package/dist/components/features/chat/skill-install-restart-banner.js +63 -0
  279. package/dist/components/features/chat/skill-install-restart-banner.js.map +1 -0
  280. package/dist/components/features/conversation/right-panel-toggle.cjs +1 -1
  281. package/dist/components/features/conversation/right-panel-toggle.cjs.map +1 -1
  282. package/dist/components/features/conversation/right-panel-toggle.js +1 -1
  283. package/dist/components/features/conversation/right-panel-toggle.js.map +1 -1
  284. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  285. package/dist/components/features/conversation-panel/conversation-panel.js +10 -10
  286. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  287. package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
  288. package/dist/components/features/mcp-page/custom-server-editor.js +78 -77
  289. package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
  290. package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
  291. package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
  292. package/dist/components/features/mcp-page/install-server-modal.d.ts +4 -1
  293. package/dist/components/features/mcp-page/install-server-modal.js +135 -136
  294. package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
  295. package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
  296. package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
  297. package/dist/components/features/mcp-page/installed-server-card.js +40 -34
  298. package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
  299. package/dist/components/features/mcp-page/mcp-server-health.cjs +2 -0
  300. package/dist/components/features/mcp-page/mcp-server-health.cjs.map +1 -0
  301. package/dist/components/features/mcp-page/mcp-server-health.d.ts +18 -0
  302. package/dist/components/features/mcp-page/mcp-server-health.js +117 -0
  303. package/dist/components/features/mcp-page/mcp-server-health.js.map +1 -0
  304. package/dist/components/features/plugins/build-plugins-view-model.d.ts +10 -1
  305. package/dist/components/features/plugins/plugin-files-section.d.ts +13 -0
  306. package/dist/components/features/settings/agent-canvas-update-card.cjs +2 -0
  307. package/dist/components/features/settings/agent-canvas-update-card.cjs.map +1 -0
  308. package/dist/components/features/settings/agent-canvas-update-card.d.ts +7 -0
  309. package/dist/components/features/settings/agent-canvas-update-card.js +170 -0
  310. package/dist/components/features/settings/agent-canvas-update-card.js.map +1 -0
  311. package/dist/components/features/settings/integrations-settings-link.cjs +2 -0
  312. package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -0
  313. package/dist/components/features/settings/integrations-settings-link.d.ts +5 -0
  314. package/dist/components/features/settings/integrations-settings-link.js +41 -0
  315. package/dist/components/features/settings/integrations-settings-link.js.map +1 -0
  316. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  317. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +1 -1
  318. package/dist/components/features/settings/settings-desktop-sidebar.cjs +1 -1
  319. package/dist/components/features/settings/settings-desktop-sidebar.cjs.map +1 -1
  320. package/dist/components/features/settings/settings-desktop-sidebar.js +31 -21
  321. package/dist/components/features/settings/settings-desktop-sidebar.js.map +1 -1
  322. package/dist/components/features/settings/settings-mobile-drawer.cjs +1 -1
  323. package/dist/components/features/settings/settings-mobile-drawer.cjs.map +1 -1
  324. package/dist/components/features/settings/settings-mobile-drawer.js +40 -30
  325. package/dist/components/features/settings/settings-mobile-drawer.js.map +1 -1
  326. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  327. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  328. package/dist/components/features/skills/extensions-navigation.js +54 -33
  329. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  330. package/dist/config/defaults.cjs +1 -1
  331. package/dist/config/defaults.cjs.map +1 -1
  332. package/dist/config/defaults.js +7 -3
  333. package/dist/config/defaults.js.map +1 -1
  334. package/dist/constants/acp-providers.cjs.map +1 -1
  335. package/dist/constants/acp-providers.js.map +1 -1
  336. package/dist/contexts/conversation-websocket-context.cjs +2 -2
  337. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  338. package/dist/contexts/conversation-websocket-context.js +169 -166
  339. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  340. package/dist/hooks/mutation/use-delete-llm-profile.cjs +1 -1
  341. package/dist/hooks/mutation/use-delete-llm-profile.js +1 -0
  342. package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
  343. package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
  344. package/dist/hooks/mutation/use-delete-mcp-server.js +8 -6
  345. package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
  346. package/dist/hooks/mutation/use-rename-llm-profile.cjs +1 -1
  347. package/dist/hooks/mutation/use-rename-llm-profile.js +1 -0
  348. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  349. package/dist/hooks/mutation/use-save-settings.js +3 -3
  350. package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
  351. package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
  352. package/dist/hooks/mutation/use-update-mcp-server.js +11 -9
  353. package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
  354. package/dist/hooks/query/query-keys.cjs +1 -1
  355. package/dist/hooks/query/query-keys.cjs.map +1 -1
  356. package/dist/hooks/query/query-keys.d.ts +4 -0
  357. package/dist/hooks/query/query-keys.js +2 -2
  358. package/dist/hooks/query/query-keys.js.map +1 -1
  359. package/dist/hooks/query/use-automation-sdk-version.cjs +2 -0
  360. package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -0
  361. package/dist/hooks/query/use-automation-sdk-version.d.ts +3 -0
  362. package/dist/hooks/query/use-automation-sdk-version.js +63 -0
  363. package/dist/hooks/query/use-automation-sdk-version.js.map +1 -0
  364. package/dist/hooks/query/use-latest-agent-canvas-version.cjs +2 -0
  365. package/dist/hooks/query/use-latest-agent-canvas-version.cjs.map +1 -0
  366. package/dist/hooks/query/use-latest-agent-canvas-version.d.ts +10 -0
  367. package/dist/hooks/query/use-latest-agent-canvas-version.js +19 -0
  368. package/dist/hooks/query/use-latest-agent-canvas-version.js.map +1 -0
  369. package/dist/hooks/query/use-plugin-file-content.d.ts +7 -0
  370. package/dist/hooks/query/use-resolved-workspaces.cjs +1 -1
  371. package/dist/hooks/query/use-resolved-workspaces.cjs.map +1 -1
  372. package/dist/hooks/query/use-resolved-workspaces.js +25 -26
  373. package/dist/hooks/query/use-resolved-workspaces.js.map +1 -1
  374. package/dist/hooks/query/use-search-subdirs.cjs +1 -1
  375. package/dist/hooks/query/use-search-subdirs.cjs.map +1 -1
  376. package/dist/hooks/query/use-search-subdirs.d.ts +5 -0
  377. package/dist/hooks/query/use-search-subdirs.js +16 -4
  378. package/dist/hooks/query/use-search-subdirs.js.map +1 -1
  379. package/dist/hooks/query/use-task-polling.cjs +1 -1
  380. package/dist/hooks/query/use-task-polling.cjs.map +1 -1
  381. package/dist/hooks/query/use-task-polling.d.ts +19 -3
  382. package/dist/hooks/query/use-task-polling.js +36 -35
  383. package/dist/hooks/query/use-task-polling.js.map +1 -1
  384. package/dist/hooks/use-device-flow.cjs +1 -1
  385. package/dist/hooks/use-device-flow.js +6 -6
  386. package/dist/hooks/use-llm-configured.cjs +1 -1
  387. package/dist/hooks/use-llm-configured.js +3 -3
  388. package/dist/hooks/use-mcp-server-health.cjs +2 -0
  389. package/dist/hooks/use-mcp-server-health.cjs.map +1 -0
  390. package/dist/hooks/use-mcp-server-health.d.ts +11 -0
  391. package/dist/hooks/use-mcp-server-health.js +18 -0
  392. package/dist/hooks/use-mcp-server-health.js.map +1 -0
  393. package/dist/hooks/use-skill-installs.cjs +2 -0
  394. package/dist/hooks/use-skill-installs.cjs.map +1 -0
  395. package/dist/hooks/use-skill-installs.d.ts +10 -0
  396. package/dist/hooks/use-skill-installs.js +21 -0
  397. package/dist/hooks/use-skill-installs.js.map +1 -0
  398. package/dist/hooks/use-tracking.cjs +1 -1
  399. package/dist/hooks/use-tracking.cjs.map +1 -1
  400. package/dist/hooks/use-tracking.d.ts +3 -3
  401. package/dist/hooks/use-tracking.js +67 -52
  402. package/dist/hooks/use-tracking.js.map +1 -1
  403. package/dist/i18n/declaration.cjs +1 -1
  404. package/dist/i18n/declaration.cjs.map +1 -1
  405. package/dist/i18n/declaration.d.ts +35 -1
  406. package/dist/i18n/declaration.js +1 -1
  407. package/dist/i18n/declaration.js.map +1 -1
  408. package/dist/i18n/translation.cjs +3 -3
  409. package/dist/i18n/translation.cjs.map +1 -1
  410. package/dist/i18n/translation.js +623 -45
  411. package/dist/i18n/translation.js.map +1 -1
  412. package/dist/index.cjs +1 -1
  413. package/dist/index.js +1 -2
  414. package/dist/lib/index.cjs +1 -1
  415. package/dist/lib/index.d.ts +0 -1
  416. package/dist/lib/index.js +0 -1
  417. package/dist/locales/ar/openhands.json +38 -4
  418. package/dist/locales/ca/openhands.json +38 -4
  419. package/dist/locales/de/openhands.json +38 -4
  420. package/dist/locales/en/openhands.json +38 -4
  421. package/dist/locales/es/openhands.json +38 -4
  422. package/dist/locales/fr/openhands.json +38 -4
  423. package/dist/locales/it/openhands.json +38 -4
  424. package/dist/locales/ja/openhands.json +38 -4
  425. package/dist/locales/ko-KR/openhands.json +38 -4
  426. package/dist/locales/no/openhands.json +38 -4
  427. package/dist/locales/pt/openhands.json +38 -4
  428. package/dist/locales/tr/openhands.json +38 -4
  429. package/dist/locales/uk/openhands.json +38 -4
  430. package/dist/locales/zh-CN/openhands.json +38 -4
  431. package/dist/locales/zh-TW/openhands.json +38 -4
  432. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs +2 -0
  433. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs.map +1 -0
  434. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js +44 -0
  435. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js.map +1 -0
  436. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs +1 -1
  437. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs.map +1 -1
  438. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js +13 -0
  439. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js.map +1 -1
  440. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
  441. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
  442. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +21 -1
  443. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
  444. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs +1 -1
  445. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs.map +1 -1
  446. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js +1 -1
  447. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js.map +1 -1
  448. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs +1 -1
  449. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs.map +1 -1
  450. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js +13 -0
  451. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js.map +1 -1
  452. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs +1 -1
  453. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs.map +1 -1
  454. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js +13 -0
  455. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js.map +1 -1
  456. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
  457. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
  458. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +13 -0
  459. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
  460. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs +1 -1
  461. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs.map +1 -1
  462. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js +13 -0
  463. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js.map +1 -1
  464. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs +1 -1
  465. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs.map +1 -1
  466. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js +13 -0
  467. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js.map +1 -1
  468. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +1 -1
  469. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -1
  470. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +16 -2
  471. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -1
  472. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs +2 -0
  473. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs.map +1 -0
  474. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js +46 -0
  475. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js.map +1 -0
  476. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
  477. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
  478. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +74 -70
  479. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
  480. package/dist/node_modules/@openhands/extensions/skills/index.cjs +123 -3
  481. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  482. package/dist/node_modules/@openhands/extensions/skills/index.js +7 -1
  483. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  484. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs +2 -0
  485. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs.map +1 -0
  486. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +9 -0
  487. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -0
  488. package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs +2 -0
  489. package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs.map +1 -0
  490. package/dist/node_modules/lucide-react/dist/esm/icons/info.js +21 -0
  491. package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
  492. package/dist/package.cjs +1 -1
  493. package/dist/package.cjs.map +1 -1
  494. package/dist/package.js +10 -3
  495. package/dist/package.js.map +1 -1
  496. package/dist/routes/app-settings.cjs +1 -1
  497. package/dist/routes/app-settings.cjs.map +1 -1
  498. package/dist/routes/app-settings.js +113 -67
  499. package/dist/routes/app-settings.js.map +1 -1
  500. package/dist/routes/conversation.cjs +1 -1
  501. package/dist/routes/conversation.cjs.map +1 -1
  502. package/dist/routes/conversation.js +1 -1
  503. package/dist/routes/conversation.js.map +1 -1
  504. package/dist/routes/mcp.cjs +1 -1
  505. package/dist/routes/mcp.cjs.map +1 -1
  506. package/dist/routes/mcp.js +1 -0
  507. package/dist/routes/mcp.js.map +1 -1
  508. package/dist/services/cloud-funnel-analytics.cjs +1 -1
  509. package/dist/services/cloud-funnel-analytics.cjs.map +1 -1
  510. package/dist/services/cloud-funnel-analytics.d.ts +2 -2
  511. package/dist/services/cloud-funnel-analytics.js +18 -16
  512. package/dist/services/cloud-funnel-analytics.js.map +1 -1
  513. package/dist/services/settings.cjs +1 -1
  514. package/dist/services/settings.cjs.map +1 -1
  515. package/dist/services/settings.js +1 -0
  516. package/dist/services/settings.js.map +1 -1
  517. package/dist/services/telemetry-context.cjs +2 -0
  518. package/dist/services/telemetry-context.cjs.map +1 -0
  519. package/dist/services/telemetry-context.d.ts +17 -0
  520. package/dist/services/telemetry-context.js +27 -0
  521. package/dist/services/telemetry-context.js.map +1 -0
  522. package/dist/services/telemetry.cjs +1 -1
  523. package/dist/services/telemetry.cjs.map +1 -1
  524. package/dist/services/telemetry.d.ts +7 -5
  525. package/dist/services/telemetry.js +132 -123
  526. package/dist/services/telemetry.js.map +1 -1
  527. package/dist/stores/skill-install-banner-store.cjs +2 -0
  528. package/dist/stores/skill-install-banner-store.cjs.map +1 -0
  529. package/dist/stores/skill-install-banner-store.d.ts +32 -0
  530. package/dist/stores/skill-install-banner-store.js +14 -0
  531. package/dist/stores/skill-install-banner-store.js.map +1 -0
  532. package/dist/stores/use-event-store.cjs +1 -1
  533. package/dist/stores/use-event-store.cjs.map +1 -1
  534. package/dist/stores/use-event-store.js +35 -35
  535. package/dist/stores/use-event-store.js.map +1 -1
  536. package/dist/types/mcp-health.cjs +2 -0
  537. package/dist/types/mcp-health.cjs.map +1 -0
  538. package/dist/types/mcp-health.d.ts +21 -0
  539. package/dist/types/mcp-health.js +6 -0
  540. package/dist/types/mcp-health.js.map +1 -0
  541. package/dist/types/settings.d.ts +1 -0
  542. package/dist/utils/handle-event-for-ui.cjs +1 -1
  543. package/dist/utils/handle-event-for-ui.cjs.map +1 -1
  544. package/dist/utils/handle-event-for-ui.d.ts +5 -0
  545. package/dist/utils/handle-event-for-ui.js +71 -57
  546. package/dist/utils/handle-event-for-ui.js.map +1 -1
  547. package/dist/utils/mcp-credential-validation.cjs +1 -1
  548. package/dist/utils/mcp-credential-validation.cjs.map +1 -1
  549. package/dist/utils/mcp-credential-validation.js +32 -16
  550. package/dist/utils/mcp-credential-validation.js.map +1 -1
  551. package/dist/utils/mcp-server-health-key.cjs +2 -0
  552. package/dist/utils/mcp-server-health-key.cjs.map +1 -0
  553. package/dist/utils/mcp-server-health-key.d.ts +16 -0
  554. package/dist/utils/mcp-server-health-key.js +23 -0
  555. package/dist/utils/mcp-server-health-key.js.map +1 -0
  556. package/dist/utils/mcp-test-error-message.cjs +2 -0
  557. package/dist/utils/mcp-test-error-message.cjs.map +1 -0
  558. package/dist/utils/mcp-test-error-message.d.ts +8 -0
  559. package/dist/utils/mcp-test-error-message.js +14 -0
  560. package/dist/utils/mcp-test-error-message.js.map +1 -0
  561. package/dist/utils/redact-mcp-secrets.cjs +2 -0
  562. package/dist/utils/redact-mcp-secrets.cjs.map +1 -0
  563. package/dist/utils/redact-mcp-secrets.d.ts +13 -0
  564. package/dist/utils/redact-mcp-secrets.js +57 -0
  565. package/dist/utils/redact-mcp-secrets.js.map +1 -0
  566. package/dist/utils/settings-utils.cjs.map +1 -1
  567. package/dist/utils/settings-utils.js.map +1 -1
  568. package/dist/utils/skill-install-events.cjs +3 -0
  569. package/dist/utils/skill-install-events.cjs.map +1 -0
  570. package/dist/utils/skill-install-events.d.ts +16 -0
  571. package/dist/utils/skill-install-events.js +26 -0
  572. package/dist/utils/skill-install-events.js.map +1 -0
  573. package/dist/utils/title-llm-profile.cjs +2 -0
  574. package/dist/utils/title-llm-profile.cjs.map +1 -0
  575. package/dist/utils/title-llm-profile.d.ts +2 -0
  576. package/dist/utils/title-llm-profile.js +11 -0
  577. package/dist/utils/title-llm-profile.js.map +1 -0
  578. package/package.json +10 -3
  579. package/scripts/check-sdk-version-sync.mjs +6 -6
  580. package/scripts/check-translation-completeness.cjs +2 -0
  581. package/scripts/dev-process-utils.mjs +62 -1
  582. package/scripts/dev-safe.mjs +2 -2
  583. package/scripts/dev-static.mjs +5 -3
  584. package/scripts/dev-with-automation.mjs +98 -14
  585. package/scripts/download-node.mjs +382 -0
  586. package/scripts/download-uv.mjs +204 -0
  587. package/scripts/logger.mjs +64 -35
  588. package/build/assets/agent-server-compatibility-BWN-EIQn.js +0 -1
  589. package/build/assets/agent-server-conversation-service.api-DSPIkMwJ.js +0 -41
  590. package/build/assets/agent-settings-CgCnqaAA.js +0 -2
  591. package/build/assets/agent-settings-DDkSavD7.js +0 -1
  592. package/build/assets/api-key-entry-screen-iZc7n8AI.js +0 -1
  593. package/build/assets/app-settings-B5zyipxJ.js +0 -1
  594. package/build/assets/automation-export-BwRX6H32.js +0 -2
  595. package/build/assets/automations-list-lHAVzMoA.js +0 -1
  596. package/build/assets/backend-form-modal-RGcu909r.js +0 -1
  597. package/build/assets/browser-store-BI6uklCG.js +0 -1
  598. package/build/assets/chat-send-button-BZHG2hAW.js +0 -1
  599. package/build/assets/client-source-BZK8vRs2.js +0 -1
  600. package/build/assets/cloud-funnel-analytics-Zcv57hfT.js +0 -1
  601. package/build/assets/conversation-BoCYx8n2.js +0 -89
  602. package/build/assets/conversation-DgHqMjnY.js +0 -1
  603. package/build/assets/conversation-panel-78Rxh_-I.js +0 -1
  604. package/build/assets/conversation-state-store-B2Bp32XI.js +0 -1
  605. package/build/assets/declaration-BGsHjPEW.js +0 -1
  606. package/build/assets/extensions-hub-CCbLA7IM.js +0 -1
  607. package/build/assets/extensions-navigation-CPNjMNvR.js +0 -1
  608. package/build/assets/files-tab-store-DJsPxYdg.js +0 -1
  609. package/build/assets/files-tab-y4K7EXBO.js +0 -1
  610. package/build/assets/git-provider-icon-ITvsH4Ko.js +0 -1
  611. package/build/assets/home-BwbeOWwU.js +0 -1
  612. package/build/assets/home-DKPGQ5P3.js +0 -1
  613. package/build/assets/index-home-Bko2Itv5.js +0 -1
  614. package/build/assets/install-server-modal-Qk1gwyI8.js +0 -1
  615. package/build/assets/lesson-plan-DMCPdtrf.js +0 -4
  616. package/build/assets/llm-not-configured-banner-C1ktyb3C.js +0 -27
  617. package/build/assets/llm-settings-BBsZFi9l.js +0 -1
  618. package/build/assets/llm-settings-DFkJQr_w.js +0 -1
  619. package/build/assets/manage-backends-modal-CKQ46rvw.js +0 -1
  620. package/build/assets/manifest-03478bbf.js +0 -1
  621. package/build/assets/markdown-renderer-B4V2OMFP.js +0 -2
  622. package/build/assets/mcp-BapoJsDc.js +0 -9
  623. package/build/assets/messages-CUBFMY5o.js +0 -40
  624. package/build/assets/objectWithoutPropertiesLoose-BgYIAs2y.js +0 -1
  625. package/build/assets/onboarding-6NMkdNxV.js +0 -1
  626. package/build/assets/onboarding-modal-Q4AnpIdg.js +0 -1
  627. package/build/assets/recommended-automations-launcher-Bj7PuHY1.js +0 -58
  628. package/build/assets/refresh-cw-B9B7-vsy.js +0 -1
  629. package/build/assets/root-CDnuTToz.js +0 -2
  630. package/build/assets/root-CYWeTrWE.css +0 -1
  631. package/build/assets/root-layout-DfYVlcRG.js +0 -2
  632. package/build/assets/sdk-section-page-DLLNrYjI.js +0 -1
  633. package/build/assets/secrets-settings-CHy72A5C.js +0 -1
  634. package/build/assets/settings-B9S8UVQr.js +0 -1
  635. package/build/assets/settings-index-BKDl2CQ-.js +0 -1
  636. package/build/assets/settings-modal-DeK11CyT.js +0 -1
  637. package/build/assets/shared-conversation-9atDzTR4.js +0 -1
  638. package/build/assets/sidebar-mobile-menu-toggle-giMMZctn.js +0 -1
  639. package/build/assets/skills-plugins-Tropusio.js +0 -1
  640. package/build/assets/skills-settings-BvzBBCWk.js +0 -2
  641. package/build/assets/telemetry-C5JMEfqB.js +0 -2
  642. package/build/assets/use-activate-agent-profile-DlykqEfN.js +0 -1
  643. package/build/assets/use-backends-health-CLHPitJM.js +0 -1
  644. package/build/assets/use-config-B5r8erYt.js +0 -1
  645. package/build/assets/use-event-store-Bbaz51GR.js +0 -4
  646. package/build/assets/use-llm-profiles-Dr5__SlZ.js +0 -1
  647. package/build/assets/use-plugins-marketplace-BplU65ae.js +0 -1
  648. package/build/assets/use-runtime-is-ready-vCFOcLFa.js +0 -1
  649. package/build/assets/use-settings-CyxSlyTQ.js +0 -1
  650. package/build/assets/use-settings-nav-items-zEkSO_Bf.js +0 -16
  651. package/build/assets/use-tracking-D2Qg5Lpd.js +0 -1
  652. package/build/assets/useMutationState-OnAsCLA_.js +0 -1
  653. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js +0 -2
  654. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js +0 -28
  655. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js +0 -2
  656. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js +0 -2
  657. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js +0 -7
  658. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js +0 -1
  659. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js +0 -1
  660. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js +0 -1
  661. package/dist/components/features/analytics/telemetry-consent-banner.cjs +0 -2
  662. package/dist/components/features/analytics/telemetry-consent-banner.cjs.map +0 -1
  663. package/dist/components/features/analytics/telemetry-consent-banner.d.ts +0 -29
  664. package/dist/components/features/analytics/telemetry-consent-banner.js +0 -59
  665. package/dist/components/features/analytics/telemetry-consent-banner.js.map +0 -1
  666. /package/build/assets/{__vite-browser-external-BQUj0sYu.js → __vite-browser-external-CKHVBTNC.js} +0 -0
  667. /package/build/assets/{agent-server-ui-style-scope-qhnhZHBV.js → agent-server-ui-style-scope-BvSa9on7.js} +0 -0
  668. /package/build/assets/{automation-LZB0MjdV.js → automation-BGiPmxFR.js} +0 -0
  669. /package/build/assets/{canvas-ui-COgjltGz.js → canvas-ui-CC4EJo-H.js} +0 -0
  670. /package/build/assets/{checkmark-h7udgXMM.js → checkmark-ygQB1AtV.js} +0 -0
  671. /package/build/assets/{close-DLFb5kfv.js → close-BjSA0HWT.js} +0 -0
  672. /package/build/assets/{code-tag-DYlAhEQY.js → code-tag-D9aPPbOe.js} +0 -0
  673. /package/build/assets/{common-CxbUL3nR.js → common-CCuqQy_S.js} +0 -0
  674. /package/build/assets/{conversation-local-storage-F6zVMM--.js → conversation-local-storage-BDjWPg0Z.js} +0 -0
  675. /package/build/assets/{copy-BLmGeJcd.js → copy-Dce7sOvS.js} +0 -0
  676. /package/build/assets/{copy-D1YGjP-C.js → copy-iPJAncAj.js} +0 -0
  677. /package/build/assets/{dist-CodhvuAP.js → dist-D9PhjOaq.js} +0 -0
  678. /package/build/assets/{environment-switch-store-DkjlKWzN.js → environment-switch-store-DHfcz4M4.js} +0 -0
  679. /package/build/assets/{extension-module-card-classes-9V3J9J_b.js → extension-module-card-classes-BpebKiN6.js} +0 -0
  680. /package/build/assets/{external-link-lhdITPqq.js → external-link-CpPMXxrV.js} +0 -0
  681. /package/build/assets/{folder-Bk311brm.js → folder-BabbYnbF.js} +0 -0
  682. /package/build/assets/{format-time-delta-DhDbkD7V.js → format-time-delta-BkAmJEPT.js} +0 -0
  683. /package/build/assets/{get-language-from-path-DBqBsCWH.js → get-language-from-path-CPNnuVhI.js} +0 -0
  684. /package/build/assets/{git-status-mapper-DnL9OC8_.js → git-status-mapper-BIXK0AAG.js} +0 -0
  685. /package/build/assets/{iconBase-Dz51Zn5x.js → iconBase-Ch-fOe8B.js} +0 -0
  686. /package/build/assets/{link-external-CaBmUEs_.js → link-external-DfKQroKX.js} +0 -0
  687. /package/build/assets/{list-todo-CAtvkzcy.js → list-todo-6J6zc8oS.js} +0 -0
  688. /package/build/assets/{llm-subscription-DtsX5Lhg.js → llm-subscription-Bvu8BLXc.js} +0 -0
  689. /package/build/assets/{loader-circle-CsAsfLIs.js → loader-circle-DGsqG5qw.js} +0 -0
  690. /package/build/assets/{map-provider-BbIb12oh.js → map-provider-BSvXvVR0.js} +0 -0
  691. /package/build/assets/{middleware-DYHYNAnP.js → middleware-_izt7V6U.js} +0 -0
  692. /package/build/assets/{modal-backdrop-zVwfOJZr.js → modal-backdrop-B7H42xHG.js} +0 -0
  693. /package/build/assets/{navigation-context-DPs2G0X8.js → navigation-context-cvyvI1WA.js} +0 -0
  694. /package/build/assets/{openhands-logo-bcNw5bkY.js → openhands-logo-pEw0nKFP.js} +0 -0
  695. /package/build/assets/{pencil-CWhApFIT.js → pencil-DmSqWUA3.js} +0 -0
  696. /package/build/assets/{react-DPDgL6du.js → react-MKQOkha9.js} +0 -0
  697. /package/build/assets/{search-BgOCR7_c.js → search-B5D5EuSn.js} +0 -0
  698. /package/build/assets/{search-dIQ09UY2.js → search-vnYL5jwV.js} +0 -0
  699. /package/build/assets/{settings-gear-MXCyZW0x.js → settings-gear-BOwF59Bs.js} +0 -0
  700. /package/build/assets/{settings-section-header-context-COMOIaxV.js → settings-section-header-context-CGgHZXrf.js} +0 -0
  701. /package/build/assets/{skills-EqzxYBvT.js → skills-arUOHLcS.js} +0 -0
  702. /package/build/assets/{square-chevron-right-DE-JN-2Z.js → square-chevron-right-EizCGtgq.js} +0 -0
  703. /package/build/assets/{switch-skeleton-DqQwalyu.js → switch-skeleton-BjPRx1QD.js} +0 -0
  704. /package/build/assets/{terminal-Cgf___rK.js → terminal-a57bHgZs.js} +0 -0
  705. /package/build/assets/{trash-2-BU6BlW4i.js → trash-2-CF3hilrY.js} +0 -0
  706. /package/build/assets/{u-check-circle-BqoIxNz_.js → u-check-circle-WGqHdtfO.js} +0 -0
  707. /package/build/assets/{u-check-circle-half-MsShT8Ec.js → u-check-circle-half-LiwZkuFe.js} +0 -0
  708. /package/build/assets/{u-edit-DL5LgKon.js → u-edit-BwHepAPi.js} +0 -0
  709. /package/build/assets/{use-breakpoint-BP3lqLMx.js → use-breakpoint-B-O0lQ84.js} +0 -0
  710. /package/build/assets/{use-click-outside-element-D9BYdANT.js → use-click-outside-element-DLQIMQrz.js} +0 -0
  711. /package/build/assets/{use-is-authed-BezEyfeh.js → use-is-authed-BSeo4coy.js} +0 -0
  712. /package/build/assets/{use-onboarding-completion-C_Swglzp.js → use-onboarding-completion-C0hPNGpw.js} +0 -0
  713. /package/build/assets/{v4-DbCkTSoU.js → v4-q4yWTlMz.js} +0 -0
  714. /package/build/assets/{vendor~browser-By2MVv_N.js → vendor~browser-UwB1jbAZ.js} +0 -0
  715. /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js → vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js} +0 -0
  716. /package/build/assets/{vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js → vendor~index-home~home~conversation-panel~conversation-Bff9cq5J.js} +0 -0
  717. /package/build/assets/{vendor~module-D5a_AClf.js → vendor~module-D4DeFV4J.js} +0 -0
  718. /package/build/assets/{vendor~terminal-CnKZILnC.js → vendor~terminal-B7Eiak0-.js} +0 -0
  719. /package/build/assets/{x-ZE4iplpF.js → x-DQB_00VJ.js} +0 -0
  720. /package/build/assets/{x-mark-Batp6gXa.js → x-mark-B32XuEwS.js} +0 -0
@@ -0,0 +1,2 @@
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../../api/backend-registry/active-store.cjs`),n=require(`../../contexts/active-backend-context.cjs`),r=require(`../../api/automation-service/automation-service.api.cjs`);let i=require(`react`);i=e.__toESM(i,1);var a=`automation-sdk-version`,o=3600*1e3,s=`\0`,c=new Map,l=new Map;function u(e){let t=c.get(e);if(t){if(t.expiresAt<=Date.now()){c.delete(e);return}return t.version}}function d(e,t){c.set(e,{expiresAt:Date.now()+o,version:t})}function f(e){let t=u(e);if(t!==void 0)return Promise.resolve(t);let n=l.get(e);if(n)return n;if(typeof r.default.getSdkVersion!=`function`)return d(e,null),Promise.resolve(null);let i=r.default.getSdkVersion().then(t=>(d(e,t),t)).catch(()=>(d(e,null),null)).finally(()=>{l.delete(e)});return l.set(e,i),i}function p(){let e=n.useActiveBackend(),{backend:r}=e,o=[a,r.id,r.kind,r.host,e.orgId??``].join(s),[c,l]=i.default.useState(()=>u(o)??null);return i.default.useEffect(()=>{if(t.isNoBackend(r)){l(null);return}let e=u(o);if(e!==void 0){l(e);return}let n=!0;return l(null),f(o).then(e=>{n&&l(e)}),()=>{n=!1}},[r,o]),c}exports.useAutomationSdkVersion=p;
2
+ //# sourceMappingURL=use-automation-sdk-version.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-automation-sdk-version.cjs","names":[],"sources":["../../../src/hooks/query/use-automation-sdk-version.ts"],"sourcesContent":["import React from \"react\";\nimport AutomationService from \"#/api/automation-service/automation-service.api\";\nimport { isNoBackend } from \"#/api/backend-registry/active-store\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\n\nexport const AUTOMATION_SDK_VERSION_CACHE_NAMESPACE = \"automation-sdk-version\";\n\nconst AUTOMATION_SDK_VERSION_CACHE_TIME_MS = 60 * 60 * 1000;\nconst CACHE_KEY_SEPARATOR = \"\\u0000\";\n\ninterface AutomationSdkVersionCacheEntry {\n expiresAt: number;\n version: string | null;\n}\n\nconst sdkVersionCache = new Map<string, AutomationSdkVersionCacheEntry>();\nconst sdkVersionRequests = new Map<string, Promise<string | null>>();\n\nexport function __resetAutomationSdkVersionCacheForTests() {\n sdkVersionCache.clear();\n sdkVersionRequests.clear();\n}\n\nfunction readCachedSdkVersion(cacheKey: string): string | null | undefined {\n const cached = sdkVersionCache.get(cacheKey);\n if (!cached) return undefined;\n\n if (cached.expiresAt <= Date.now()) {\n sdkVersionCache.delete(cacheKey);\n return undefined;\n }\n\n return cached.version;\n}\n\nfunction writeCachedSdkVersion(cacheKey: string, version: string | null) {\n sdkVersionCache.set(cacheKey, {\n expiresAt: Date.now() + AUTOMATION_SDK_VERSION_CACHE_TIME_MS,\n version,\n });\n}\n\nfunction getCachedOrFetchSdkVersion(cacheKey: string) {\n const cached = readCachedSdkVersion(cacheKey);\n if (cached !== undefined) return Promise.resolve(cached);\n\n const existingRequest = sdkVersionRequests.get(cacheKey);\n if (existingRequest) return existingRequest;\n\n if (typeof AutomationService.getSdkVersion !== \"function\") {\n writeCachedSdkVersion(cacheKey, null);\n return Promise.resolve(null);\n }\n\n const request = AutomationService.getSdkVersion()\n .then((version) => {\n writeCachedSdkVersion(cacheKey, version);\n return version;\n })\n .catch(() => {\n writeCachedSdkVersion(cacheKey, null);\n return null;\n })\n .finally(() => {\n sdkVersionRequests.delete(cacheKey);\n });\n sdkVersionRequests.set(cacheKey, request);\n return request;\n}\n\nexport function useAutomationSdkVersion() {\n const active = useActiveBackend();\n const { backend } = active;\n const cacheKey = [\n AUTOMATION_SDK_VERSION_CACHE_NAMESPACE,\n backend.id,\n backend.kind,\n backend.host,\n active.orgId ?? \"\",\n ].join(CACHE_KEY_SEPARATOR);\n\n const [automationSdkVersion, setAutomationSdkVersion] = React.useState<\n string | null\n >(() => readCachedSdkVersion(cacheKey) ?? null);\n\n React.useEffect(() => {\n if (isNoBackend(backend)) {\n setAutomationSdkVersion(null);\n return undefined;\n }\n\n const cached = readCachedSdkVersion(cacheKey);\n if (cached !== undefined) {\n setAutomationSdkVersion(cached);\n return undefined;\n }\n\n let isMounted = true;\n setAutomationSdkVersion(null);\n void getCachedOrFetchSdkVersion(cacheKey).then((version) => {\n if (isMounted) {\n setAutomationSdkVersion(version);\n }\n });\n\n return () => {\n isMounted = false;\n };\n }, [backend, cacheKey]);\n\n return automationSdkVersion;\n}\n"],"mappings":"qRAKA,IAAa,EAAyC,yBAEhD,EAAuC,KAAU,IACjD,EAAsB,KAOtB,EAAkB,IAAI,IACtB,EAAqB,IAAI,IAO/B,SAAS,EAAqB,EAA6C,CACzE,IAAM,EAAS,EAAgB,IAAI,EAAS,CACvC,KAEL,IAAI,EAAO,WAAa,KAAK,KAAK,CAAE,CAClC,EAAgB,OAAO,EAAS,CAChC,OAGF,OAAO,EAAO,SAGhB,SAAS,EAAsB,EAAkB,EAAwB,CACvE,EAAgB,IAAI,EAAU,CAC5B,UAAW,KAAK,KAAK,CAAG,EACxB,UACD,CAAC,CAGJ,SAAS,EAA2B,EAAkB,CACpD,IAAM,EAAS,EAAqB,EAAS,CAC7C,GAAI,IAAW,IAAA,GAAW,OAAO,QAAQ,QAAQ,EAAO,CAExD,IAAM,EAAkB,EAAmB,IAAI,EAAS,CACxD,GAAI,EAAiB,OAAO,EAE5B,GAAI,OAAO,EAAA,QAAkB,eAAkB,WAE7C,OADA,EAAsB,EAAU,KAAK,CAC9B,QAAQ,QAAQ,KAAK,CAG9B,IAAM,EAAU,EAAA,QAAkB,eAAe,CAC9C,KAAM,IACL,EAAsB,EAAU,EAAQ,CACjC,GACP,CACD,WACC,EAAsB,EAAU,KAAK,CAC9B,MACP,CACD,YAAc,CACb,EAAmB,OAAO,EAAS,EACnC,CAEJ,OADA,EAAmB,IAAI,EAAU,EAAQ,CAClC,EAGT,SAAgB,GAA0B,CACxC,IAAM,EAAS,EAAA,kBAAkB,CAC3B,CAAE,WAAY,EACd,EAAW,CACf,EACA,EAAQ,GACR,EAAQ,KACR,EAAQ,KACR,EAAO,OAAS,GACjB,CAAC,KAAK,EAAoB,CAErB,CAAC,EAAsB,GAA2B,EAAA,QAAM,aAEtD,EAAqB,EAAS,EAAI,KAAK,CA2B/C,OAzBA,EAAA,QAAM,cAAgB,CACpB,GAAI,EAAA,YAAY,EAAQ,CAAE,CACxB,EAAwB,KAAK,CAC7B,OAGF,IAAM,EAAS,EAAqB,EAAS,CAC7C,GAAI,IAAW,IAAA,GAAW,CACxB,EAAwB,EAAO,CAC/B,OAGF,IAAI,EAAY,GAQhB,OAPA,EAAwB,KAAK,CACxB,EAA2B,EAAS,CAAC,KAAM,GAAY,CACtD,GACF,EAAwB,EAAQ,EAElC,KAEW,CACX,EAAY,KAEb,CAAC,EAAS,EAAS,CAAC,CAEhB"}
@@ -0,0 +1,3 @@
1
+ export declare const AUTOMATION_SDK_VERSION_CACHE_NAMESPACE = "automation-sdk-version";
2
+ export declare function __resetAutomationSdkVersionCacheForTests(): void;
3
+ export declare function useAutomationSdkVersion(): string | null;
@@ -0,0 +1,63 @@
1
+ import { isNoBackend as e } from "../../api/backend-registry/active-store.js";
2
+ import { useActiveBackend as t } from "../../contexts/active-backend-context.js";
3
+ import n from "../../api/automation-service/automation-service.api.js";
4
+ import r from "react";
5
+ //#region src/hooks/query/use-automation-sdk-version.ts
6
+ var i = "automation-sdk-version", a = 3600 * 1e3, o = "\0", s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
7
+ function l(e) {
8
+ let t = s.get(e);
9
+ if (t) {
10
+ if (t.expiresAt <= Date.now()) {
11
+ s.delete(e);
12
+ return;
13
+ }
14
+ return t.version;
15
+ }
16
+ }
17
+ function u(e, t) {
18
+ s.set(e, {
19
+ expiresAt: Date.now() + a,
20
+ version: t
21
+ });
22
+ }
23
+ function d(e) {
24
+ let t = l(e);
25
+ if (t !== void 0) return Promise.resolve(t);
26
+ let r = c.get(e);
27
+ if (r) return r;
28
+ if (typeof n.getSdkVersion != "function") return u(e, null), Promise.resolve(null);
29
+ let i = n.getSdkVersion().then((t) => (u(e, t), t)).catch(() => (u(e, null), null)).finally(() => {
30
+ c.delete(e);
31
+ });
32
+ return c.set(e, i), i;
33
+ }
34
+ function f() {
35
+ let n = t(), { backend: a } = n, s = [
36
+ i,
37
+ a.id,
38
+ a.kind,
39
+ a.host,
40
+ n.orgId ?? ""
41
+ ].join(o), [c, u] = r.useState(() => l(s) ?? null);
42
+ return r.useEffect(() => {
43
+ if (e(a)) {
44
+ u(null);
45
+ return;
46
+ }
47
+ let t = l(s);
48
+ if (t !== void 0) {
49
+ u(t);
50
+ return;
51
+ }
52
+ let n = !0;
53
+ return u(null), d(s).then((e) => {
54
+ n && u(e);
55
+ }), () => {
56
+ n = !1;
57
+ };
58
+ }, [a, s]), c;
59
+ }
60
+ //#endregion
61
+ export { f as useAutomationSdkVersion };
62
+
63
+ //# sourceMappingURL=use-automation-sdk-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-automation-sdk-version.js","names":[],"sources":["../../../src/hooks/query/use-automation-sdk-version.ts"],"sourcesContent":["import React from \"react\";\nimport AutomationService from \"#/api/automation-service/automation-service.api\";\nimport { isNoBackend } from \"#/api/backend-registry/active-store\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\n\nexport const AUTOMATION_SDK_VERSION_CACHE_NAMESPACE = \"automation-sdk-version\";\n\nconst AUTOMATION_SDK_VERSION_CACHE_TIME_MS = 60 * 60 * 1000;\nconst CACHE_KEY_SEPARATOR = \"\\u0000\";\n\ninterface AutomationSdkVersionCacheEntry {\n expiresAt: number;\n version: string | null;\n}\n\nconst sdkVersionCache = new Map<string, AutomationSdkVersionCacheEntry>();\nconst sdkVersionRequests = new Map<string, Promise<string | null>>();\n\nexport function __resetAutomationSdkVersionCacheForTests() {\n sdkVersionCache.clear();\n sdkVersionRequests.clear();\n}\n\nfunction readCachedSdkVersion(cacheKey: string): string | null | undefined {\n const cached = sdkVersionCache.get(cacheKey);\n if (!cached) return undefined;\n\n if (cached.expiresAt <= Date.now()) {\n sdkVersionCache.delete(cacheKey);\n return undefined;\n }\n\n return cached.version;\n}\n\nfunction writeCachedSdkVersion(cacheKey: string, version: string | null) {\n sdkVersionCache.set(cacheKey, {\n expiresAt: Date.now() + AUTOMATION_SDK_VERSION_CACHE_TIME_MS,\n version,\n });\n}\n\nfunction getCachedOrFetchSdkVersion(cacheKey: string) {\n const cached = readCachedSdkVersion(cacheKey);\n if (cached !== undefined) return Promise.resolve(cached);\n\n const existingRequest = sdkVersionRequests.get(cacheKey);\n if (existingRequest) return existingRequest;\n\n if (typeof AutomationService.getSdkVersion !== \"function\") {\n writeCachedSdkVersion(cacheKey, null);\n return Promise.resolve(null);\n }\n\n const request = AutomationService.getSdkVersion()\n .then((version) => {\n writeCachedSdkVersion(cacheKey, version);\n return version;\n })\n .catch(() => {\n writeCachedSdkVersion(cacheKey, null);\n return null;\n })\n .finally(() => {\n sdkVersionRequests.delete(cacheKey);\n });\n sdkVersionRequests.set(cacheKey, request);\n return request;\n}\n\nexport function useAutomationSdkVersion() {\n const active = useActiveBackend();\n const { backend } = active;\n const cacheKey = [\n AUTOMATION_SDK_VERSION_CACHE_NAMESPACE,\n backend.id,\n backend.kind,\n backend.host,\n active.orgId ?? \"\",\n ].join(CACHE_KEY_SEPARATOR);\n\n const [automationSdkVersion, setAutomationSdkVersion] = React.useState<\n string | null\n >(() => readCachedSdkVersion(cacheKey) ?? null);\n\n React.useEffect(() => {\n if (isNoBackend(backend)) {\n setAutomationSdkVersion(null);\n return undefined;\n }\n\n const cached = readCachedSdkVersion(cacheKey);\n if (cached !== undefined) {\n setAutomationSdkVersion(cached);\n return undefined;\n }\n\n let isMounted = true;\n setAutomationSdkVersion(null);\n void getCachedOrFetchSdkVersion(cacheKey).then((version) => {\n if (isMounted) {\n setAutomationSdkVersion(version);\n }\n });\n\n return () => {\n isMounted = false;\n };\n }, [backend, cacheKey]);\n\n return automationSdkVersion;\n}\n"],"mappings":";;;;;AAKA,IAAa,IAAyC,0BAEhD,IAAuC,OAAU,KACjD,IAAsB,MAOtB,oBAAkB,IAAI,KAA6C,EACnE,oBAAqB,IAAI,KAAqC;AAOpE,SAAS,EAAqB,GAA6C;CACzE,IAAM,IAAS,EAAgB,IAAI,EAAS;AACvC,QAEL;MAAI,EAAO,aAAa,KAAK,KAAK,EAAE;AAClC,KAAgB,OAAO,EAAS;AAChC;;AAGF,SAAO,EAAO;;;AAGhB,SAAS,EAAsB,GAAkB,GAAwB;AACvE,GAAgB,IAAI,GAAU;EAC5B,WAAW,KAAK,KAAK,GAAG;EACxB;EACD,CAAC;;AAGJ,SAAS,EAA2B,GAAkB;CACpD,IAAM,IAAS,EAAqB,EAAS;AAC7C,KAAI,MAAW,KAAA,EAAW,QAAO,QAAQ,QAAQ,EAAO;CAExD,IAAM,IAAkB,EAAmB,IAAI,EAAS;AACxD,KAAI,EAAiB,QAAO;AAE5B,KAAI,OAAO,EAAkB,iBAAkB,WAE7C,QADA,EAAsB,GAAU,KAAK,EAC9B,QAAQ,QAAQ,KAAK;CAG9B,IAAM,IAAU,EAAkB,eAAe,CAC9C,MAAM,OACL,EAAsB,GAAU,EAAQ,EACjC,GACP,CACD,aACC,EAAsB,GAAU,KAAK,EAC9B,MACP,CACD,cAAc;AACb,IAAmB,OAAO,EAAS;GACnC;AAEJ,QADA,EAAmB,IAAI,GAAU,EAAQ,EAClC;;AAGT,SAAgB,IAA0B;CACxC,IAAM,IAAS,GAAkB,EAC3B,EAAE,eAAY,GACd,IAAW;EACf;EACA,EAAQ;EACR,EAAQ;EACR,EAAQ;EACR,EAAO,SAAS;EACjB,CAAC,KAAK,EAAoB,EAErB,CAAC,GAAsB,KAA2B,EAAM,eAEtD,EAAqB,EAAS,IAAI,KAAK;AA2B/C,QAzBA,EAAM,gBAAgB;AACpB,MAAI,EAAY,EAAQ,EAAE;AACxB,KAAwB,KAAK;AAC7B;;EAGF,IAAM,IAAS,EAAqB,EAAS;AAC7C,MAAI,MAAW,KAAA,GAAW;AACxB,KAAwB,EAAO;AAC/B;;EAGF,IAAI,IAAY;AAQhB,SAPA,EAAwB,KAAK,EACxB,EAA2B,EAAS,CAAC,MAAM,MAAY;AAC1D,GAAI,KACF,EAAwB,EAAQ;IAElC,QAEW;AACX,OAAY;;IAEb,CAAC,GAAS,EAAS,CAAC,EAEhB"}
@@ -0,0 +1,2 @@
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./query-keys.cjs`),t=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),n=require(`../../api/agent-canvas-updates.cjs`);function r({enabled:r=!0}={}){return t.useQuery({queryKey:e.APP_UPDATE_QUERY_KEYS.latestVersion,queryFn:({signal:e})=>n.fetchLatestAgentCanvasVersion(e),enabled:r,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*60,meta:{disableToast:!0}})}exports.useLatestAgentCanvasVersion=r;
2
+ //# sourceMappingURL=use-latest-agent-canvas-version.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-latest-agent-canvas-version.cjs","names":[],"sources":["../../../src/hooks/query/use-latest-agent-canvas-version.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { fetchLatestAgentCanvasVersion } from \"#/api/agent-canvas-updates\";\nimport { APP_UPDATE_QUERY_KEYS } from \"./query-keys\";\n\n/**\n * Latest published Agent Canvas version (npm `latest` dist-tag).\n *\n * Information-only: failures must stay quiet (`meta.disableToast`) — the\n * settings update card renders them inline. The card's \"Check for updates\"\n * button is `refetch()`, which bypasses `staleTime`.\n */\nexport function useLatestAgentCanvasVersion({\n enabled = true,\n}: { enabled?: boolean } = {}) {\n return useQuery({\n queryKey: APP_UPDATE_QUERY_KEYS.latestVersion,\n queryFn: ({ signal }) => fetchLatestAgentCanvasVersion(signal),\n enabled,\n // Offline/air-gapped must settle into the quiet inline state immediately\n // rather than sitting through exponential backoff.\n retry: false,\n refetchOnWindowFocus: false,\n staleTime: 1000 * 60 * 60, // the settings sidebar remounts per navigation; don't hammer npm\n meta: { disableToast: true },\n });\n}\n"],"mappings":"oNAWA,SAAgB,EAA4B,CAC1C,UAAU,IACe,EAAE,CAAE,CAC7B,OAAO,EAAA,SAAS,CACd,SAAU,EAAA,sBAAsB,cAChC,SAAU,CAAE,YAAa,EAAA,8BAA8B,EAAO,CAC9D,UAGA,MAAO,GACP,qBAAsB,GACtB,UAAW,IAAO,GAAK,GACvB,KAAM,CAAE,aAAc,GAAM,CAC7B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Latest published Agent Canvas version (npm `latest` dist-tag).
3
+ *
4
+ * Information-only: failures must stay quiet (`meta.disableToast`) — the
5
+ * settings update card renders them inline. The card's "Check for updates"
6
+ * button is `refetch()`, which bypasses `staleTime`.
7
+ */
8
+ export declare function useLatestAgentCanvasVersion({ enabled, }?: {
9
+ enabled?: boolean;
10
+ }): import("@tanstack/react-query").UseQueryResult<string, import("axios").AxiosError<unknown, any>>;
@@ -0,0 +1,19 @@
1
+ import { APP_UPDATE_QUERY_KEYS as e } from "./query-keys.js";
2
+ import { useQuery as t } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
3
+ import { fetchLatestAgentCanvasVersion as n } from "../../api/agent-canvas-updates.js";
4
+ //#region src/hooks/query/use-latest-agent-canvas-version.ts
5
+ function r({ enabled: r = !0 } = {}) {
6
+ return t({
7
+ queryKey: e.latestVersion,
8
+ queryFn: ({ signal: e }) => n(e),
9
+ enabled: r,
10
+ retry: !1,
11
+ refetchOnWindowFocus: !1,
12
+ staleTime: 1e3 * 60 * 60,
13
+ meta: { disableToast: !0 }
14
+ });
15
+ }
16
+ //#endregion
17
+ export { r as useLatestAgentCanvasVersion };
18
+
19
+ //# sourceMappingURL=use-latest-agent-canvas-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-latest-agent-canvas-version.js","names":[],"sources":["../../../src/hooks/query/use-latest-agent-canvas-version.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { fetchLatestAgentCanvasVersion } from \"#/api/agent-canvas-updates\";\nimport { APP_UPDATE_QUERY_KEYS } from \"./query-keys\";\n\n/**\n * Latest published Agent Canvas version (npm `latest` dist-tag).\n *\n * Information-only: failures must stay quiet (`meta.disableToast`) — the\n * settings update card renders them inline. The card's \"Check for updates\"\n * button is `refetch()`, which bypasses `staleTime`.\n */\nexport function useLatestAgentCanvasVersion({\n enabled = true,\n}: { enabled?: boolean } = {}) {\n return useQuery({\n queryKey: APP_UPDATE_QUERY_KEYS.latestVersion,\n queryFn: ({ signal }) => fetchLatestAgentCanvasVersion(signal),\n enabled,\n // Offline/air-gapped must settle into the quiet inline state immediately\n // rather than sitting through exponential backoff.\n retry: false,\n refetchOnWindowFocus: false,\n staleTime: 1000 * 60 * 60, // the settings sidebar remounts per navigation; don't hammer npm\n meta: { disableToast: true },\n });\n}\n"],"mappings":";;;;AAWA,SAAgB,EAA4B,EAC1C,aAAU,OACe,EAAE,EAAE;AAC7B,QAAO,EAAS;EACd,UAAU,EAAsB;EAChC,UAAU,EAAE,gBAAa,EAA8B,EAAO;EAC9D;EAGA,OAAO;EACP,sBAAsB;EACtB,WAAW,MAAO,KAAK;EACvB,MAAM,EAAE,cAAc,IAAM;EAC7B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type PluginFileContent } from "#/api/plugins-service";
2
+ /**
3
+ * Query hook for one plugin file's content, shown in the plugin detail
4
+ * modal's file viewer. Disabled until a file is selected. Local backend only
5
+ * (on cloud the plugins page carries no contents, so this never fires).
6
+ */
7
+ export declare const usePluginFileContent: (basePath: string | null, relativePath: string | null) => import("@tanstack/react-query").UseQueryResult<PluginFileContent, import("axios").AxiosError<unknown, any>>;
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@openhands/typescript-client/dist/client/file-client.cjs`),t=require(`../../node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs`);require(`../../node_modules/@openhands/typescript-client/dist/clients.cjs`);const n=require(`../../api/agent-server-client-options.cjs`),r=require(`../../node_modules/@tanstack/react-query/build/modern/useQueries.cjs`),i=require(`./use-local-workspaces.cjs`);let a=require(`react`);function o(){let{data:o,isLoading:s,isError:c,error:l}=i.useLocalWorkspaces(),u=t.isAgentServerVersionError(l),d=o?.workspaces??[],f=o?.workspaceParents??[],p=(0,a.useMemo)(()=>{let e=new Set(f.map(e=>e.path)),t=[].filter(t=>!e.has(t.path));return t.length===0?f:[...f,...t]},[f,u]),m=r.useQueries({queries:u?[]:p.map(t=>({queryKey:[`file`,`search_subdirs`,t.path],queryFn:()=>new e.FileClient(n.getAgentServerClientOptions()).searchSubdirectories(t.path),retry:!1,meta:{disableToast:!0}}))}),h=s||m.some(e=>e.isLoading),g=c||m.some(e=>e.isError);return{workspaces:(0,a.useMemo)(()=>{let e=new Map,t=new Map(p.map((e,t)=>[e.path,m[t]]));return p.forEach(n=>{(t.get(n.path)?.data?.items??[]).forEach(t=>{e.has(t.path)||e.set(t.path,{id:t.path,name:t.name,path:t.path,parentPath:n.path})})}),d.forEach(t=>{e.set(t.path,t)}),Array.from(e.values())},[d,p,m.map(e=>`${e.dataUpdatedAt??0}:${e.status}`).join(`|`)]),parents:p,isLoading:h,isError:g,error:l}}exports.useResolvedWorkspaces=o;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs`);require(`../../node_modules/@openhands/typescript-client/dist/clients.cjs`);const t=require(`../../node_modules/@tanstack/react-query/build/modern/useQueries.cjs`),n=require(`./use-local-workspaces.cjs`),r=require(`./use-search-subdirs.cjs`);let i=require(`react`);function a(){let{data:a,isLoading:o,isError:s,error:c}=n.useLocalWorkspaces(),l=e.isAgentServerVersionError(c),u=a?.workspaces??[],d=a?.workspaceParents??[],f=(0,i.useMemo)(()=>{let e=new Set(d.map(e=>e.path)),t=[].filter(t=>!e.has(t.path));return t.length===0?d:[...d,...t]},[d,l]),p=t.useQueries({queries:l?[]:f.map(e=>({queryKey:[`file`,`search_subdirs`,e.path],queryFn:()=>r.searchAllSubdirectories(e.path),retry:!1,meta:{disableToast:!0}}))}),m=o||p.some(e=>e.isLoading),h=s||p.some(e=>e.isError);return{workspaces:(0,i.useMemo)(()=>{let e=new Map,t=new Map(f.map((e,t)=>[e.path,p[t]]));return f.forEach(n=>{(t.get(n.path)?.data?.items??[]).forEach(t=>{e.has(t.path)||e.set(t.path,{id:t.path,name:t.name,path:t.path,parentPath:n.path})})}),u.forEach(t=>{e.set(t.path,t)}),Array.from(e.values())},[u,f,p.map(e=>`${e.dataUpdatedAt??0}:${e.status}`).join(`|`)]),parents:f,isLoading:m,isError:h,error:c}}exports.useResolvedWorkspaces=a;
2
2
  //# sourceMappingURL=use-resolved-workspaces.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-resolved-workspaces.cjs","names":[],"sources":["../../../src/hooks/query/use-resolved-workspaces.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport {\n FileClient,\n isAgentServerVersionError,\n} from \"@openhands/typescript-client/clients\";\n\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { useLocalWorkspaces } from \"#/hooks/query/use-local-workspaces\";\nimport { LocalWorkspace, LocalWorkspaceParent } from \"#/types/workspace\";\n\ninterface UseResolvedWorkspacesResult {\n workspaces: LocalWorkspace[];\n /**\n * The merged workspace parents that produced the dynamic children above:\n * the user's stored parents plus any implicit built-in parents (currently\n * `/projects` in dev). Consumers use this to label a child's group by its\n * parent's `name` — `parentPath` alone only yields a path. Includes the\n * implicit parents that `useLocalWorkspaces` does not expose on its own.\n */\n parents: LocalWorkspaceParent[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n}\n\n/**\n * Implicit workspace parents that are always considered when resolving\n * workspaces. `/projects` is a well-known directory that some agent-server\n * setups use as the projects root. We surface its immediate subdirectories\n * as workspaces automatically in dev mode.\n *\n * This is a development convenience only. Production previews may point at\n * arbitrary remote agent servers that do not expose the file-browser endpoint;\n * probing `/projects` there creates noisy 404s before the user has added any\n * workspace parent explicitly.\n */\nconst INCLUDE_IMPLICIT_WORKSPACE_PARENTS = import.meta.env.DEV;\n\nconst IMPLICIT_WORKSPACE_PARENTS: LocalWorkspaceParent[] = [\n { id: \"implicit:/projects\", name: \"/projects\", path: \"/projects\" },\n];\n\n/**\n * Returns the merged list of workspaces to display:\n * - workspaces explicitly added by the user (from the persisted store),\n * - the immediate subdirectories of every saved \"workspace parent\",\n * fetched dynamically, and\n * - the immediate subdirectories of any implicit, built-in parents\n * (currently just `/projects`).\n *\n * Static workspaces always take precedence over a dynamic child with the\n * same path so that user-selected names/ids are preserved.\n */\nexport function useResolvedWorkspaces(): UseResolvedWorkspacesResult {\n const {\n data,\n isLoading: isLoadingList,\n isError: isErrorList,\n error: listError,\n } = useLocalWorkspaces();\n const workspacesUnsupported = isAgentServerVersionError(listError);\n const workspaces = data?.workspaces ?? [];\n const storedParents = data?.workspaceParents ?? [];\n\n // Merge stored parents with the implicit ones, deduping on path so a\n // user-added `/projects` doesn't trigger a second query.\n const workspaceParents = useMemo(() => {\n const seen = new Set(storedParents.map((p) => p.path));\n // Filter out implicit parents that conflict with user-added ones (by path)\n // so custom names/ids are preserved.\n const implicitParents =\n INCLUDE_IMPLICIT_WORKSPACE_PARENTS && !workspacesUnsupported\n ? IMPLICIT_WORKSPACE_PARENTS\n : [];\n const extras = implicitParents.filter((p) => !seen.has(p.path));\n return extras.length === 0 ? storedParents : [...storedParents, ...extras];\n }, [storedParents, workspacesUnsupported]);\n\n const parentQueries = useQueries({\n queries: workspacesUnsupported\n ? []\n : workspaceParents.map((parent) => ({\n queryKey: [\"file\", \"search_subdirs\", parent.path],\n queryFn: () =>\n new FileClient(getAgentServerClientOptions()).searchSubdirectories(\n parent.path,\n ),\n retry: false,\n meta: { disableToast: true },\n })),\n });\n\n const isLoading = isLoadingList || parentQueries.some((q) => q.isLoading);\n const isError = isErrorList || parentQueries.some((q) => q.isError);\n\n // Stable string fingerprint that changes whenever any parent's subdir\n // results change. Avoids spreading timestamps into the `useMemo` deps,\n // which would change the array length as parents are added/removed.\n const queriesFingerprint = parentQueries\n .map((q) => `${q.dataUpdatedAt ?? 0}:${q.status}`)\n .join(\"|\");\n\n const merged = useMemo(() => {\n const byPath = new Map<string, LocalWorkspace>();\n const resultsByParent = new Map(\n workspaceParents.map((parent, index) => [\n parent.path,\n parentQueries[index],\n ]),\n );\n\n workspaceParents.forEach((parent) => {\n const result = resultsByParent.get(parent.path);\n const items = result?.data?.items ?? [];\n items.forEach((entry) => {\n if (byPath.has(entry.path)) return;\n byPath.set(entry.path, {\n id: entry.path,\n name: entry.name,\n path: entry.path,\n parentPath: parent.path,\n });\n });\n });\n\n // Static workspaces win on duplicate paths.\n workspaces.forEach((w) => {\n byPath.set(w.path, w);\n });\n\n return Array.from(byPath.values());\n }, [workspaces, workspaceParents, queriesFingerprint]);\n\n return {\n workspaces: merged,\n parents: workspaceParents,\n isLoading,\n isError,\n error: listError,\n };\n}\n"],"mappings":"ihBAsDA,SAAgB,GAAqD,CACnE,GAAM,CACJ,OACA,UAAW,EACX,QAAS,EACT,MAAO,GACL,EAAA,oBAAoB,CAClB,EAAwB,EAAA,0BAA0B,EAAU,CAC5D,EAAa,GAAM,YAAc,EAAE,CACnC,EAAgB,GAAM,kBAAoB,EAAE,CAI5C,GAAA,EAAA,EAAA,aAAiC,CACrC,IAAM,EAAO,IAAI,IAAI,EAAc,IAAK,GAAM,EAAE,KAAK,CAAC,CAOhD,EAAS,EAAA,CAAgB,OAAQ,GAAM,CAAC,EAAK,IAAI,EAAE,KAAK,CAAC,CAC/D,OAAO,EAAO,SAAW,EAAI,EAAgB,CAAC,GAAG,EAAe,GAAG,EAAO,EACzE,CAAC,EAAe,EAAsB,CAAC,CAEpC,EAAgB,EAAA,WAAW,CAC/B,QAAS,EACL,EAAE,CACF,EAAiB,IAAK,IAAY,CAChC,SAAU,CAAC,OAAQ,iBAAkB,EAAO,KAAK,CACjD,YACE,IAAI,EAAA,WAAW,EAAA,6BAA6B,CAAC,CAAC,qBAC5C,EAAO,KACR,CACH,MAAO,GACP,KAAM,CAAE,aAAc,GAAM,CAC7B,EAAE,CACR,CAAC,CAEI,EAAY,GAAiB,EAAc,KAAM,GAAM,EAAE,UAAU,CACnE,EAAU,GAAe,EAAc,KAAM,GAAM,EAAE,QAAQ,CAwCnE,MAAO,CACL,YAAA,EAAA,EAAA,aAhC2B,CAC3B,IAAM,EAAS,IAAI,IACb,EAAkB,IAAI,IAC1B,EAAiB,KAAK,EAAQ,IAAU,CACtC,EAAO,KACP,EAAc,GACf,CAAC,CACH,CAqBD,OAnBA,EAAiB,QAAS,GAAW,EACpB,EAAgB,IAAI,EAAO,KAC5B,EAAQ,MAAM,OAAS,EAAE,EACjC,QAAS,GAAU,CACnB,EAAO,IAAI,EAAM,KAAK,EAC1B,EAAO,IAAI,EAAM,KAAM,CACrB,GAAI,EAAM,KACV,KAAM,EAAM,KACZ,KAAM,EAAM,KACZ,WAAY,EAAO,KACpB,CAAC,EACF,EACF,CAGF,EAAW,QAAS,GAAM,CACxB,EAAO,IAAI,EAAE,KAAM,EAAE,EACrB,CAEK,MAAM,KAAK,EAAO,QAAQ,CAAC,EACjC,CAAC,EAAY,EAjCW,EACxB,IAAK,GAAM,GAAG,EAAE,eAAiB,EAAE,GAAG,EAAE,SAAS,CACjD,KAAK,IA+B0B,CAAmB,CAGvC,CACZ,QAAS,EACT,YACA,UACA,MAAO,EACR"}
1
+ {"version":3,"file":"use-resolved-workspaces.cjs","names":[],"sources":["../../../src/hooks/query/use-resolved-workspaces.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport { isAgentServerVersionError } from \"@openhands/typescript-client/clients\";\n\nimport { useLocalWorkspaces } from \"#/hooks/query/use-local-workspaces\";\nimport { searchAllSubdirectories } from \"#/hooks/query/use-search-subdirs\";\nimport { LocalWorkspace, LocalWorkspaceParent } from \"#/types/workspace\";\n\ninterface UseResolvedWorkspacesResult {\n workspaces: LocalWorkspace[];\n /**\n * The merged workspace parents that produced the dynamic children above:\n * the user's stored parents plus any implicit built-in parents (currently\n * `/projects` in dev). Consumers use this to label a child's group by its\n * parent's `name` — `parentPath` alone only yields a path. Includes the\n * implicit parents that `useLocalWorkspaces` does not expose on its own.\n */\n parents: LocalWorkspaceParent[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n}\n\n/**\n * Implicit workspace parents that are always considered when resolving\n * workspaces. `/projects` is a well-known directory that some agent-server\n * setups use as the projects root. We surface its immediate subdirectories\n * as workspaces automatically in dev mode.\n *\n * This is a development convenience only. Production previews may point at\n * arbitrary remote agent servers that do not expose the file-browser endpoint;\n * probing `/projects` there creates noisy 404s before the user has added any\n * workspace parent explicitly.\n */\nconst INCLUDE_IMPLICIT_WORKSPACE_PARENTS = import.meta.env.DEV;\n\nconst IMPLICIT_WORKSPACE_PARENTS: LocalWorkspaceParent[] = [\n { id: \"implicit:/projects\", name: \"/projects\", path: \"/projects\" },\n];\n\n/**\n * Returns the merged list of workspaces to display:\n * - workspaces explicitly added by the user (from the persisted store),\n * - the immediate subdirectories of every saved \"workspace parent\",\n * fetched dynamically, and\n * - the immediate subdirectories of any implicit, built-in parents\n * (currently just `/projects`).\n *\n * Static workspaces always take precedence over a dynamic child with the\n * same path so that user-selected names/ids are preserved.\n */\nexport function useResolvedWorkspaces(): UseResolvedWorkspacesResult {\n const {\n data,\n isLoading: isLoadingList,\n isError: isErrorList,\n error: listError,\n } = useLocalWorkspaces();\n const workspacesUnsupported = isAgentServerVersionError(listError);\n const workspaces = data?.workspaces ?? [];\n const storedParents = data?.workspaceParents ?? [];\n\n // Merge stored parents with the implicit ones, deduping on path so a\n // user-added `/projects` doesn't trigger a second query.\n const workspaceParents = useMemo(() => {\n const seen = new Set(storedParents.map((p) => p.path));\n // Filter out implicit parents that conflict with user-added ones (by path)\n // so custom names/ids are preserved.\n const implicitParents =\n INCLUDE_IMPLICIT_WORKSPACE_PARENTS && !workspacesUnsupported\n ? IMPLICIT_WORKSPACE_PARENTS\n : [];\n const extras = implicitParents.filter((p) => !seen.has(p.path));\n return extras.length === 0 ? storedParents : [...storedParents, ...extras];\n }, [storedParents, workspacesUnsupported]);\n\n const parentQueries = useQueries({\n queries: workspacesUnsupported\n ? []\n : workspaceParents.map((parent) => ({\n queryKey: [\"file\", \"search_subdirs\", parent.path],\n queryFn: () => searchAllSubdirectories(parent.path),\n retry: false,\n meta: { disableToast: true },\n })),\n });\n\n const isLoading = isLoadingList || parentQueries.some((q) => q.isLoading);\n const isError = isErrorList || parentQueries.some((q) => q.isError);\n\n // Stable string fingerprint that changes whenever any parent's subdir\n // results change. Avoids spreading timestamps into the `useMemo` deps,\n // which would change the array length as parents are added/removed.\n const queriesFingerprint = parentQueries\n .map((q) => `${q.dataUpdatedAt ?? 0}:${q.status}`)\n .join(\"|\");\n\n const merged = useMemo(() => {\n const byPath = new Map<string, LocalWorkspace>();\n const resultsByParent = new Map(\n workspaceParents.map((parent, index) => [\n parent.path,\n parentQueries[index],\n ]),\n );\n\n workspaceParents.forEach((parent) => {\n const result = resultsByParent.get(parent.path);\n const items = result?.data?.items ?? [];\n items.forEach((entry) => {\n if (byPath.has(entry.path)) return;\n byPath.set(entry.path, {\n id: entry.path,\n name: entry.name,\n path: entry.path,\n parentPath: parent.path,\n });\n });\n });\n\n // Static workspaces win on duplicate paths.\n workspaces.forEach((w) => {\n byPath.set(w.path, w);\n });\n\n return Array.from(byPath.values());\n }, [workspaces, workspaceParents, queriesFingerprint]);\n\n return {\n workspaces: merged,\n parents: workspaceParents,\n isLoading,\n isError,\n error: listError,\n };\n}\n"],"mappings":"uaAmDA,SAAgB,GAAqD,CACnE,GAAM,CACJ,OACA,UAAW,EACX,QAAS,EACT,MAAO,GACL,EAAA,oBAAoB,CAClB,EAAwB,EAAA,0BAA0B,EAAU,CAC5D,EAAa,GAAM,YAAc,EAAE,CACnC,EAAgB,GAAM,kBAAoB,EAAE,CAI5C,GAAA,EAAA,EAAA,aAAiC,CACrC,IAAM,EAAO,IAAI,IAAI,EAAc,IAAK,GAAM,EAAE,KAAK,CAAC,CAOhD,EAAS,EAAA,CAAgB,OAAQ,GAAM,CAAC,EAAK,IAAI,EAAE,KAAK,CAAC,CAC/D,OAAO,EAAO,SAAW,EAAI,EAAgB,CAAC,GAAG,EAAe,GAAG,EAAO,EACzE,CAAC,EAAe,EAAsB,CAAC,CAEpC,EAAgB,EAAA,WAAW,CAC/B,QAAS,EACL,EAAE,CACF,EAAiB,IAAK,IAAY,CAChC,SAAU,CAAC,OAAQ,iBAAkB,EAAO,KAAK,CACjD,YAAe,EAAA,wBAAwB,EAAO,KAAK,CACnD,MAAO,GACP,KAAM,CAAE,aAAc,GAAM,CAC7B,EAAE,CACR,CAAC,CAEI,EAAY,GAAiB,EAAc,KAAM,GAAM,EAAE,UAAU,CACnE,EAAU,GAAe,EAAc,KAAM,GAAM,EAAE,QAAQ,CAwCnE,MAAO,CACL,YAAA,EAAA,EAAA,aAhC2B,CAC3B,IAAM,EAAS,IAAI,IACb,EAAkB,IAAI,IAC1B,EAAiB,KAAK,EAAQ,IAAU,CACtC,EAAO,KACP,EAAc,GACf,CAAC,CACH,CAqBD,OAnBA,EAAiB,QAAS,GAAW,EACpB,EAAgB,IAAI,EAAO,KAC5B,EAAQ,MAAM,OAAS,EAAE,EACjC,QAAS,GAAU,CACnB,EAAO,IAAI,EAAM,KAAK,EAC1B,EAAO,IAAI,EAAM,KAAM,CACrB,GAAI,EAAM,KACV,KAAM,EAAM,KACZ,KAAM,EAAM,KACZ,WAAY,EAAO,KACpB,CAAC,EACF,EACF,CAGF,EAAW,QAAS,GAAM,CACxB,EAAO,IAAI,EAAE,KAAM,EAAE,EACrB,CAEK,MAAM,KAAK,EAAO,QAAQ,CAAC,EACjC,CAAC,EAAY,EAjCW,EACxB,IAAK,GAAM,GAAG,EAAE,eAAiB,EAAE,GAAG,EAAE,SAAS,CACjD,KAAK,IA+B0B,CAAmB,CAGvC,CACZ,QAAS,EACT,YACA,UACA,MAAO,EACR"}
@@ -1,29 +1,28 @@
1
- import { FileClient as e } from "../../node_modules/@openhands/typescript-client/dist/client/file-client.js";
2
- import { isAgentServerVersionError as t } from "../../node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js";
1
+ import { isAgentServerVersionError as e } from "../../node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js";
3
2
  import "../../node_modules/@openhands/typescript-client/dist/clients.js";
4
- import { getAgentServerClientOptions as n } from "../../api/agent-server-client-options.js";
5
- import { useQueries as r } from "../../node_modules/@tanstack/react-query/build/modern/useQueries.js";
6
- import { useLocalWorkspaces as i } from "./use-local-workspaces.js";
7
- import { useMemo as a } from "react";
3
+ import { useQueries as t } from "../../node_modules/@tanstack/react-query/build/modern/useQueries.js";
4
+ import { useLocalWorkspaces as n } from "./use-local-workspaces.js";
5
+ import { searchAllSubdirectories as r } from "./use-search-subdirs.js";
6
+ import { useMemo as i } from "react";
8
7
  //#region src/hooks/query/use-resolved-workspaces.ts
9
- function o() {
10
- let { data: o, isLoading: s, isError: c, error: l } = i(), u = t(l), d = o?.workspaces ?? [], f = o?.workspaceParents ?? [], p = a(() => {
11
- let e = new Set(f.map((e) => e.path)), t = [].filter((t) => !e.has(t.path));
12
- return t.length === 0 ? f : [...f, ...t];
13
- }, [f, u]), m = r({ queries: u ? [] : p.map((t) => ({
8
+ function a() {
9
+ let { data: a, isLoading: o, isError: s, error: c } = n(), l = e(c), u = a?.workspaces ?? [], d = a?.workspaceParents ?? [], f = i(() => {
10
+ let e = new Set(d.map((e) => e.path)), t = [].filter((t) => !e.has(t.path));
11
+ return t.length === 0 ? d : [...d, ...t];
12
+ }, [d, l]), p = t({ queries: l ? [] : f.map((e) => ({
14
13
  queryKey: [
15
14
  "file",
16
15
  "search_subdirs",
17
- t.path
16
+ e.path
18
17
  ],
19
- queryFn: () => new e(n()).searchSubdirectories(t.path),
18
+ queryFn: () => r(e.path),
20
19
  retry: !1,
21
20
  meta: { disableToast: !0 }
22
- })) }), h = s || m.some((e) => e.isLoading), g = c || m.some((e) => e.isError);
21
+ })) }), m = o || p.some((e) => e.isLoading), h = s || p.some((e) => e.isError);
23
22
  return {
24
- workspaces: a(() => {
25
- let e = /* @__PURE__ */ new Map(), t = new Map(p.map((e, t) => [e.path, m[t]]));
26
- return p.forEach((n) => {
23
+ workspaces: i(() => {
24
+ let e = /* @__PURE__ */ new Map(), t = new Map(f.map((e, t) => [e.path, p[t]]));
25
+ return f.forEach((n) => {
27
26
  (t.get(n.path)?.data?.items ?? []).forEach((t) => {
28
27
  e.has(t.path) || e.set(t.path, {
29
28
  id: t.path,
@@ -32,21 +31,21 @@ function o() {
32
31
  parentPath: n.path
33
32
  });
34
33
  });
35
- }), d.forEach((t) => {
34
+ }), u.forEach((t) => {
36
35
  e.set(t.path, t);
37
36
  }), Array.from(e.values());
38
37
  }, [
39
- d,
40
- p,
41
- m.map((e) => `${e.dataUpdatedAt ?? 0}:${e.status}`).join("|")
38
+ u,
39
+ f,
40
+ p.map((e) => `${e.dataUpdatedAt ?? 0}:${e.status}`).join("|")
42
41
  ]),
43
- parents: p,
44
- isLoading: h,
45
- isError: g,
46
- error: l
42
+ parents: f,
43
+ isLoading: m,
44
+ isError: h,
45
+ error: c
47
46
  };
48
47
  }
49
48
  //#endregion
50
- export { o as useResolvedWorkspaces };
49
+ export { a as useResolvedWorkspaces };
51
50
 
52
51
  //# sourceMappingURL=use-resolved-workspaces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-resolved-workspaces.js","names":[],"sources":["../../../src/hooks/query/use-resolved-workspaces.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport {\n FileClient,\n isAgentServerVersionError,\n} from \"@openhands/typescript-client/clients\";\n\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { useLocalWorkspaces } from \"#/hooks/query/use-local-workspaces\";\nimport { LocalWorkspace, LocalWorkspaceParent } from \"#/types/workspace\";\n\ninterface UseResolvedWorkspacesResult {\n workspaces: LocalWorkspace[];\n /**\n * The merged workspace parents that produced the dynamic children above:\n * the user's stored parents plus any implicit built-in parents (currently\n * `/projects` in dev). Consumers use this to label a child's group by its\n * parent's `name` — `parentPath` alone only yields a path. Includes the\n * implicit parents that `useLocalWorkspaces` does not expose on its own.\n */\n parents: LocalWorkspaceParent[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n}\n\n/**\n * Implicit workspace parents that are always considered when resolving\n * workspaces. `/projects` is a well-known directory that some agent-server\n * setups use as the projects root. We surface its immediate subdirectories\n * as workspaces automatically in dev mode.\n *\n * This is a development convenience only. Production previews may point at\n * arbitrary remote agent servers that do not expose the file-browser endpoint;\n * probing `/projects` there creates noisy 404s before the user has added any\n * workspace parent explicitly.\n */\nconst INCLUDE_IMPLICIT_WORKSPACE_PARENTS = import.meta.env.DEV;\n\nconst IMPLICIT_WORKSPACE_PARENTS: LocalWorkspaceParent[] = [\n { id: \"implicit:/projects\", name: \"/projects\", path: \"/projects\" },\n];\n\n/**\n * Returns the merged list of workspaces to display:\n * - workspaces explicitly added by the user (from the persisted store),\n * - the immediate subdirectories of every saved \"workspace parent\",\n * fetched dynamically, and\n * - the immediate subdirectories of any implicit, built-in parents\n * (currently just `/projects`).\n *\n * Static workspaces always take precedence over a dynamic child with the\n * same path so that user-selected names/ids are preserved.\n */\nexport function useResolvedWorkspaces(): UseResolvedWorkspacesResult {\n const {\n data,\n isLoading: isLoadingList,\n isError: isErrorList,\n error: listError,\n } = useLocalWorkspaces();\n const workspacesUnsupported = isAgentServerVersionError(listError);\n const workspaces = data?.workspaces ?? [];\n const storedParents = data?.workspaceParents ?? [];\n\n // Merge stored parents with the implicit ones, deduping on path so a\n // user-added `/projects` doesn't trigger a second query.\n const workspaceParents = useMemo(() => {\n const seen = new Set(storedParents.map((p) => p.path));\n // Filter out implicit parents that conflict with user-added ones (by path)\n // so custom names/ids are preserved.\n const implicitParents =\n INCLUDE_IMPLICIT_WORKSPACE_PARENTS && !workspacesUnsupported\n ? IMPLICIT_WORKSPACE_PARENTS\n : [];\n const extras = implicitParents.filter((p) => !seen.has(p.path));\n return extras.length === 0 ? storedParents : [...storedParents, ...extras];\n }, [storedParents, workspacesUnsupported]);\n\n const parentQueries = useQueries({\n queries: workspacesUnsupported\n ? []\n : workspaceParents.map((parent) => ({\n queryKey: [\"file\", \"search_subdirs\", parent.path],\n queryFn: () =>\n new FileClient(getAgentServerClientOptions()).searchSubdirectories(\n parent.path,\n ),\n retry: false,\n meta: { disableToast: true },\n })),\n });\n\n const isLoading = isLoadingList || parentQueries.some((q) => q.isLoading);\n const isError = isErrorList || parentQueries.some((q) => q.isError);\n\n // Stable string fingerprint that changes whenever any parent's subdir\n // results change. Avoids spreading timestamps into the `useMemo` deps,\n // which would change the array length as parents are added/removed.\n const queriesFingerprint = parentQueries\n .map((q) => `${q.dataUpdatedAt ?? 0}:${q.status}`)\n .join(\"|\");\n\n const merged = useMemo(() => {\n const byPath = new Map<string, LocalWorkspace>();\n const resultsByParent = new Map(\n workspaceParents.map((parent, index) => [\n parent.path,\n parentQueries[index],\n ]),\n );\n\n workspaceParents.forEach((parent) => {\n const result = resultsByParent.get(parent.path);\n const items = result?.data?.items ?? [];\n items.forEach((entry) => {\n if (byPath.has(entry.path)) return;\n byPath.set(entry.path, {\n id: entry.path,\n name: entry.name,\n path: entry.path,\n parentPath: parent.path,\n });\n });\n });\n\n // Static workspaces win on duplicate paths.\n workspaces.forEach((w) => {\n byPath.set(w.path, w);\n });\n\n return Array.from(byPath.values());\n }, [workspaces, workspaceParents, queriesFingerprint]);\n\n return {\n workspaces: merged,\n parents: workspaceParents,\n isLoading,\n isError,\n error: listError,\n };\n}\n"],"mappings":";;;;;;;;AAsDA,SAAgB,IAAqD;CACnE,IAAM,EACJ,SACA,WAAW,GACX,SAAS,GACT,OAAO,MACL,GAAoB,EAClB,IAAwB,EAA0B,EAAU,EAC5D,IAAa,GAAM,cAAc,EAAE,EACnC,IAAgB,GAAM,oBAAoB,EAAE,EAI5C,IAAmB,QAAc;EACrC,IAAM,IAAO,IAAI,IAAI,EAAc,KAAK,MAAM,EAAE,KAAK,CAAC,EAOhD,IAAS,EAAA,CAAgB,QAAQ,MAAM,CAAC,EAAK,IAAI,EAAE,KAAK,CAAC;AAC/D,SAAO,EAAO,WAAW,IAAI,IAAgB,CAAC,GAAG,GAAe,GAAG,EAAO;IACzE,CAAC,GAAe,EAAsB,CAAC,EAEpC,IAAgB,EAAW,EAC/B,SAAS,IACL,EAAE,GACF,EAAiB,KAAK,OAAY;EAChC,UAAU;GAAC;GAAQ;GAAkB,EAAO;GAAK;EACjD,eACE,IAAI,EAAW,GAA6B,CAAC,CAAC,qBAC5C,EAAO,KACR;EACH,OAAO;EACP,MAAM,EAAE,cAAc,IAAM;EAC7B,EAAE,EACR,CAAC,EAEI,IAAY,KAAiB,EAAc,MAAM,MAAM,EAAE,UAAU,EACnE,IAAU,KAAe,EAAc,MAAM,MAAM,EAAE,QAAQ;AAwCnE,QAAO;EACL,YAhCa,QAAc;GAC3B,IAAM,oBAAS,IAAI,KAA6B,EAC1C,IAAkB,IAAI,IAC1B,EAAiB,KAAK,GAAQ,MAAU,CACtC,EAAO,MACP,EAAc,GACf,CAAC,CACH;AAqBD,UAnBA,EAAiB,SAAS,MAAW;AAGnC,KAFe,EAAgB,IAAI,EAAO,KAC5B,EAAQ,MAAM,SAAS,EAAE,EACjC,SAAS,MAAU;AACnB,OAAO,IAAI,EAAM,KAAK,IAC1B,EAAO,IAAI,EAAM,MAAM;MACrB,IAAI,EAAM;MACV,MAAM,EAAM;MACZ,MAAM,EAAM;MACZ,YAAY,EAAO;MACpB,CAAC;MACF;KACF,EAGF,EAAW,SAAS,MAAM;AACxB,MAAO,IAAI,EAAE,MAAM,EAAE;KACrB,EAEK,MAAM,KAAK,EAAO,QAAQ,CAAC;KACjC;GAAC;GAAY;GAjCW,EACxB,KAAK,MAAM,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,CACjD,KAAK,IA+B0B;GAAmB,CAGvC;EACZ,SAAS;EACT;EACA;EACA,OAAO;EACR"}
1
+ {"version":3,"file":"use-resolved-workspaces.js","names":[],"sources":["../../../src/hooks/query/use-resolved-workspaces.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport { isAgentServerVersionError } from \"@openhands/typescript-client/clients\";\n\nimport { useLocalWorkspaces } from \"#/hooks/query/use-local-workspaces\";\nimport { searchAllSubdirectories } from \"#/hooks/query/use-search-subdirs\";\nimport { LocalWorkspace, LocalWorkspaceParent } from \"#/types/workspace\";\n\ninterface UseResolvedWorkspacesResult {\n workspaces: LocalWorkspace[];\n /**\n * The merged workspace parents that produced the dynamic children above:\n * the user's stored parents plus any implicit built-in parents (currently\n * `/projects` in dev). Consumers use this to label a child's group by its\n * parent's `name` — `parentPath` alone only yields a path. Includes the\n * implicit parents that `useLocalWorkspaces` does not expose on its own.\n */\n parents: LocalWorkspaceParent[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n}\n\n/**\n * Implicit workspace parents that are always considered when resolving\n * workspaces. `/projects` is a well-known directory that some agent-server\n * setups use as the projects root. We surface its immediate subdirectories\n * as workspaces automatically in dev mode.\n *\n * This is a development convenience only. Production previews may point at\n * arbitrary remote agent servers that do not expose the file-browser endpoint;\n * probing `/projects` there creates noisy 404s before the user has added any\n * workspace parent explicitly.\n */\nconst INCLUDE_IMPLICIT_WORKSPACE_PARENTS = import.meta.env.DEV;\n\nconst IMPLICIT_WORKSPACE_PARENTS: LocalWorkspaceParent[] = [\n { id: \"implicit:/projects\", name: \"/projects\", path: \"/projects\" },\n];\n\n/**\n * Returns the merged list of workspaces to display:\n * - workspaces explicitly added by the user (from the persisted store),\n * - the immediate subdirectories of every saved \"workspace parent\",\n * fetched dynamically, and\n * - the immediate subdirectories of any implicit, built-in parents\n * (currently just `/projects`).\n *\n * Static workspaces always take precedence over a dynamic child with the\n * same path so that user-selected names/ids are preserved.\n */\nexport function useResolvedWorkspaces(): UseResolvedWorkspacesResult {\n const {\n data,\n isLoading: isLoadingList,\n isError: isErrorList,\n error: listError,\n } = useLocalWorkspaces();\n const workspacesUnsupported = isAgentServerVersionError(listError);\n const workspaces = data?.workspaces ?? [];\n const storedParents = data?.workspaceParents ?? [];\n\n // Merge stored parents with the implicit ones, deduping on path so a\n // user-added `/projects` doesn't trigger a second query.\n const workspaceParents = useMemo(() => {\n const seen = new Set(storedParents.map((p) => p.path));\n // Filter out implicit parents that conflict with user-added ones (by path)\n // so custom names/ids are preserved.\n const implicitParents =\n INCLUDE_IMPLICIT_WORKSPACE_PARENTS && !workspacesUnsupported\n ? IMPLICIT_WORKSPACE_PARENTS\n : [];\n const extras = implicitParents.filter((p) => !seen.has(p.path));\n return extras.length === 0 ? storedParents : [...storedParents, ...extras];\n }, [storedParents, workspacesUnsupported]);\n\n const parentQueries = useQueries({\n queries: workspacesUnsupported\n ? []\n : workspaceParents.map((parent) => ({\n queryKey: [\"file\", \"search_subdirs\", parent.path],\n queryFn: () => searchAllSubdirectories(parent.path),\n retry: false,\n meta: { disableToast: true },\n })),\n });\n\n const isLoading = isLoadingList || parentQueries.some((q) => q.isLoading);\n const isError = isErrorList || parentQueries.some((q) => q.isError);\n\n // Stable string fingerprint that changes whenever any parent's subdir\n // results change. Avoids spreading timestamps into the `useMemo` deps,\n // which would change the array length as parents are added/removed.\n const queriesFingerprint = parentQueries\n .map((q) => `${q.dataUpdatedAt ?? 0}:${q.status}`)\n .join(\"|\");\n\n const merged = useMemo(() => {\n const byPath = new Map<string, LocalWorkspace>();\n const resultsByParent = new Map(\n workspaceParents.map((parent, index) => [\n parent.path,\n parentQueries[index],\n ]),\n );\n\n workspaceParents.forEach((parent) => {\n const result = resultsByParent.get(parent.path);\n const items = result?.data?.items ?? [];\n items.forEach((entry) => {\n if (byPath.has(entry.path)) return;\n byPath.set(entry.path, {\n id: entry.path,\n name: entry.name,\n path: entry.path,\n parentPath: parent.path,\n });\n });\n });\n\n // Static workspaces win on duplicate paths.\n workspaces.forEach((w) => {\n byPath.set(w.path, w);\n });\n\n return Array.from(byPath.values());\n }, [workspaces, workspaceParents, queriesFingerprint]);\n\n return {\n workspaces: merged,\n parents: workspaceParents,\n isLoading,\n isError,\n error: listError,\n };\n}\n"],"mappings":";;;;;;;AAmDA,SAAgB,IAAqD;CACnE,IAAM,EACJ,SACA,WAAW,GACX,SAAS,GACT,OAAO,MACL,GAAoB,EAClB,IAAwB,EAA0B,EAAU,EAC5D,IAAa,GAAM,cAAc,EAAE,EACnC,IAAgB,GAAM,oBAAoB,EAAE,EAI5C,IAAmB,QAAc;EACrC,IAAM,IAAO,IAAI,IAAI,EAAc,KAAK,MAAM,EAAE,KAAK,CAAC,EAOhD,IAAS,EAAA,CAAgB,QAAQ,MAAM,CAAC,EAAK,IAAI,EAAE,KAAK,CAAC;AAC/D,SAAO,EAAO,WAAW,IAAI,IAAgB,CAAC,GAAG,GAAe,GAAG,EAAO;IACzE,CAAC,GAAe,EAAsB,CAAC,EAEpC,IAAgB,EAAW,EAC/B,SAAS,IACL,EAAE,GACF,EAAiB,KAAK,OAAY;EAChC,UAAU;GAAC;GAAQ;GAAkB,EAAO;GAAK;EACjD,eAAe,EAAwB,EAAO,KAAK;EACnD,OAAO;EACP,MAAM,EAAE,cAAc,IAAM;EAC7B,EAAE,EACR,CAAC,EAEI,IAAY,KAAiB,EAAc,MAAM,MAAM,EAAE,UAAU,EACnE,IAAU,KAAe,EAAc,MAAM,MAAM,EAAE,QAAQ;AAwCnE,QAAO;EACL,YAhCa,QAAc;GAC3B,IAAM,oBAAS,IAAI,KAA6B,EAC1C,IAAkB,IAAI,IAC1B,EAAiB,KAAK,GAAQ,MAAU,CACtC,EAAO,MACP,EAAc,GACf,CAAC,CACH;AAqBD,UAnBA,EAAiB,SAAS,MAAW;AAGnC,KAFe,EAAgB,IAAI,EAAO,KAC5B,EAAQ,MAAM,SAAS,EAAE,EACjC,SAAS,MAAU;AACnB,OAAO,IAAI,EAAM,KAAK,IAC1B,EAAO,IAAI,EAAM,MAAM;MACrB,IAAI,EAAM;MACV,MAAM,EAAM;MACZ,MAAM,EAAM;MACZ,YAAY,EAAO;MACpB,CAAC;MACF;KACF,EAGF,EAAW,SAAS,MAAM;AACxB,MAAO,IAAI,EAAE,MAAM,EAAE;KACrB,EAEK,MAAM,KAAK,EAAO,QAAQ,CAAC;KACjC;GAAC;GAAY;GAjCW,EACxB,KAAK,MAAM,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,CACjD,KAAK,IA+B0B;GAAmB,CAGvC;EACZ,SAAS;EACT;EACA;EACA,OAAO;EACR"}
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@openhands/typescript-client/dist/client/file-client.cjs`);require(`../../node_modules/@openhands/typescript-client/dist/clients.cjs`);const t=require(`../../api/agent-server-client-options.cjs`),n=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),r=require(`../../contexts/active-backend-context.cjs`);function i(){return new e.FileClient(t.getAgentServerClientOptions())}var a=e=>{let t=r.useActiveBackend();return n.useQuery({queryKey:[`file`,`search_subdirs`,e,t.backend.id,t.orgId],queryFn:()=>i().searchSubdirectories(e),enabled:!!e,retry:!1,meta:{disableToast:!0}})},o=()=>{let e=r.useActiveBackend();return n.useQuery({queryKey:[`file`,`home`,e.backend.id,e.orgId],queryFn:async()=>i().getHome(),retry:!1,meta:{disableToast:!0},staleTime:1/0})};exports.useHomeDirectory=o,exports.useSearchSubdirs=a;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@openhands/typescript-client/dist/client/file-client.cjs`);require(`../../node_modules/@openhands/typescript-client/dist/clients.cjs`);const t=require(`../../api/agent-server-client-options.cjs`),n=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),r=require(`../../contexts/active-backend-context.cjs`);function i(){return new e.FileClient(t.getAgentServerClientOptions())}async function a(e,t=i()){let n=[],r=new Set,a;for(;;){let i=await t.searchSubdirectories(e,a?{pageId:a}:void 0);if(n.push(...i.items),a=i.next_page_id,!a)return{items:n,next_page_id:null};if(r.has(a))throw Error(`File search returned a repeated page id`);r.add(a)}}var o=e=>{let t=r.useActiveBackend();return n.useQuery({queryKey:[`file`,`search_subdirs`,e,t.backend.id,t.orgId],queryFn:()=>a(e),enabled:!!e,retry:!1,meta:{disableToast:!0}})},s=()=>{let e=r.useActiveBackend();return n.useQuery({queryKey:[`file`,`home`,e.backend.id,e.orgId],queryFn:async()=>i().getHome(),retry:!1,meta:{disableToast:!0},staleTime:1/0})};exports.searchAllSubdirectories=a,exports.useHomeDirectory=s,exports.useSearchSubdirs=o;
2
2
  //# sourceMappingURL=use-search-subdirs.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-search-subdirs.cjs","names":[],"sources":["../../../src/hooks/query/use-search-subdirs.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { FileClient } from \"@openhands/typescript-client/clients\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\n\nexport interface FileBrowserEntry {\n label: string;\n path: string;\n}\n\nexport interface HomeDirectoryResponse {\n home: string;\n favorites?: FileBrowserEntry[];\n locations?: FileBrowserEntry[];\n}\n\nfunction getFileClient() {\n return new FileClient(getAgentServerClientOptions());\n}\n\nexport const useSearchSubdirs = (path: string | null) => {\n const active = useActiveBackend();\n return useQuery({\n queryKey: [\"file\", \"search_subdirs\", path, active.backend.id, active.orgId],\n queryFn: () => getFileClient().searchSubdirectories(path as string),\n enabled: !!path,\n retry: false,\n meta: { disableToast: true },\n });\n};\n\nexport const useHomeDirectory = () => {\n const active = useActiveBackend();\n return useQuery({\n queryKey: [\"file\", \"home\", active.backend.id, active.orgId],\n queryFn: async (): Promise<HomeDirectoryResponse> =>\n getFileClient().getHome(),\n retry: false,\n meta: { disableToast: true },\n staleTime: Infinity,\n });\n};\n"],"mappings":"+ZAgBA,SAAS,GAAgB,CACvB,OAAO,IAAI,EAAA,WAAW,EAAA,6BAA6B,CAAC,CAGtD,IAAa,EAAoB,GAAwB,CACvD,IAAM,EAAS,EAAA,kBAAkB,CACjC,OAAO,EAAA,SAAS,CACd,SAAU,CAAC,OAAQ,iBAAkB,EAAM,EAAO,QAAQ,GAAI,EAAO,MAAM,CAC3E,YAAe,GAAe,CAAC,qBAAqB,EAAe,CACnE,QAAS,CAAC,CAAC,EACX,MAAO,GACP,KAAM,CAAE,aAAc,GAAM,CAC7B,CAAC,EAGS,MAAyB,CACpC,IAAM,EAAS,EAAA,kBAAkB,CACjC,OAAO,EAAA,SAAS,CACd,SAAU,CAAC,OAAQ,OAAQ,EAAO,QAAQ,GAAI,EAAO,MAAM,CAC3D,QAAS,SACP,GAAe,CAAC,SAAS,CAC3B,MAAO,GACP,KAAM,CAAE,aAAc,GAAM,CAC5B,UAAW,IACZ,CAAC"}
1
+ {"version":3,"file":"use-search-subdirs.cjs","names":[],"sources":["../../../src/hooks/query/use-search-subdirs.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { FileClient } from \"@openhands/typescript-client/clients\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\n\ntype FileSubdirectoryPage = Awaited<\n ReturnType<FileClient[\"searchSubdirectories\"]>\n>;\ntype FileClientLike = Pick<FileClient, \"searchSubdirectories\">;\n\nexport interface FileBrowserEntry {\n label: string;\n path: string;\n}\n\nexport interface HomeDirectoryResponse {\n home: string;\n favorites?: FileBrowserEntry[];\n locations?: FileBrowserEntry[];\n}\n\nfunction getFileClient() {\n return new FileClient(getAgentServerClientOptions());\n}\n\nexport async function searchAllSubdirectories(\n path: string,\n fileClient: FileClientLike = getFileClient(),\n): Promise<FileSubdirectoryPage> {\n const items: FileSubdirectoryPage[\"items\"] = [];\n const seenPageIds = new Set<string>();\n let pageId: string | null | undefined;\n\n while (true) {\n const page = await fileClient.searchSubdirectories(\n path,\n pageId ? { pageId } : undefined,\n );\n items.push(...page.items);\n pageId = page.next_page_id;\n\n if (!pageId) {\n return { items, next_page_id: null };\n }\n\n if (seenPageIds.has(pageId)) {\n throw new Error(\"File search returned a repeated page id\");\n }\n seenPageIds.add(pageId);\n }\n}\n\nexport const useSearchSubdirs = (path: string | null) => {\n const active = useActiveBackend();\n return useQuery({\n queryKey: [\"file\", \"search_subdirs\", path, active.backend.id, active.orgId],\n queryFn: () => searchAllSubdirectories(path as string),\n enabled: !!path,\n retry: false,\n meta: { disableToast: true },\n });\n};\n\nexport const useHomeDirectory = () => {\n const active = useActiveBackend();\n return useQuery({\n queryKey: [\"file\", \"home\", active.backend.id, active.orgId],\n queryFn: async (): Promise<HomeDirectoryResponse> =>\n getFileClient().getHome(),\n retry: false,\n meta: { disableToast: true },\n staleTime: Infinity,\n });\n};\n"],"mappings":"+ZAqBA,SAAS,GAAgB,CACvB,OAAO,IAAI,EAAA,WAAW,EAAA,6BAA6B,CAAC,CAGtD,eAAsB,EACpB,EACA,EAA6B,GAAe,CACb,CAC/B,IAAM,EAAuC,EAAE,CACzC,EAAc,IAAI,IACpB,EAEJ,OAAa,CACX,IAAM,EAAO,MAAM,EAAW,qBAC5B,EACA,EAAS,CAAE,SAAQ,CAAG,IAAA,GACvB,CAID,GAHA,EAAM,KAAK,GAAG,EAAK,MAAM,CACzB,EAAS,EAAK,aAEV,CAAC,EACH,MAAO,CAAE,QAAO,aAAc,KAAM,CAGtC,GAAI,EAAY,IAAI,EAAO,CACzB,MAAU,MAAM,0CAA0C,CAE5D,EAAY,IAAI,EAAO,EAI3B,IAAa,EAAoB,GAAwB,CACvD,IAAM,EAAS,EAAA,kBAAkB,CACjC,OAAO,EAAA,SAAS,CACd,SAAU,CAAC,OAAQ,iBAAkB,EAAM,EAAO,QAAQ,GAAI,EAAO,MAAM,CAC3E,YAAe,EAAwB,EAAe,CACtD,QAAS,CAAC,CAAC,EACX,MAAO,GACP,KAAM,CAAE,aAAc,GAAM,CAC7B,CAAC,EAGS,MAAyB,CACpC,IAAM,EAAS,EAAA,kBAAkB,CACjC,OAAO,EAAA,SAAS,CACd,SAAU,CAAC,OAAQ,OAAQ,EAAO,QAAQ,GAAI,EAAO,MAAM,CAC3D,QAAS,SACP,GAAe,CAAC,SAAS,CAC3B,MAAO,GACP,KAAM,CAAE,aAAc,GAAM,CAC5B,UAAW,IACZ,CAAC"}
@@ -1,3 +1,6 @@
1
+ import { FileClient } from "@openhands/typescript-client/clients";
2
+ type FileSubdirectoryPage = Awaited<ReturnType<FileClient["searchSubdirectories"]>>;
3
+ type FileClientLike = Pick<FileClient, "searchSubdirectories">;
1
4
  export interface FileBrowserEntry {
2
5
  label: string;
3
6
  path: string;
@@ -7,5 +10,7 @@ export interface HomeDirectoryResponse {
7
10
  favorites?: FileBrowserEntry[];
8
11
  locations?: FileBrowserEntry[];
9
12
  }
13
+ export declare function searchAllSubdirectories(path: string, fileClient?: FileClientLike): Promise<FileSubdirectoryPage>;
10
14
  export declare const useSearchSubdirs: (path: string | null) => import("@tanstack/react-query").UseQueryResult<import("@openhands/typescript-client").FileSubdirectoryPage, import("axios").AxiosError<unknown, any>>;
11
15
  export declare const useHomeDirectory: () => import("@tanstack/react-query").UseQueryResult<HomeDirectoryResponse, import("axios").AxiosError<unknown, any>>;
16
+ export {};
@@ -7,7 +7,19 @@ import { useActiveBackend as r } from "../../contexts/active-backend-context.js"
7
7
  function i() {
8
8
  return new e(t());
9
9
  }
10
- var a = (e) => {
10
+ async function a(e, t = i()) {
11
+ let n = [], r = /* @__PURE__ */ new Set(), a;
12
+ for (;;) {
13
+ let i = await t.searchSubdirectories(e, a ? { pageId: a } : void 0);
14
+ if (n.push(...i.items), a = i.next_page_id, !a) return {
15
+ items: n,
16
+ next_page_id: null
17
+ };
18
+ if (r.has(a)) throw Error("File search returned a repeated page id");
19
+ r.add(a);
20
+ }
21
+ }
22
+ var o = (e) => {
11
23
  let t = r();
12
24
  return n({
13
25
  queryKey: [
@@ -17,12 +29,12 @@ var a = (e) => {
17
29
  t.backend.id,
18
30
  t.orgId
19
31
  ],
20
- queryFn: () => i().searchSubdirectories(e),
32
+ queryFn: () => a(e),
21
33
  enabled: !!e,
22
34
  retry: !1,
23
35
  meta: { disableToast: !0 }
24
36
  });
25
- }, o = () => {
37
+ }, s = () => {
26
38
  let e = r();
27
39
  return n({
28
40
  queryKey: [
@@ -38,6 +50,6 @@ var a = (e) => {
38
50
  });
39
51
  };
40
52
  //#endregion
41
- export { o as useHomeDirectory, a as useSearchSubdirs };
53
+ export { a as searchAllSubdirectories, s as useHomeDirectory, o as useSearchSubdirs };
42
54
 
43
55
  //# sourceMappingURL=use-search-subdirs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-search-subdirs.js","names":[],"sources":["../../../src/hooks/query/use-search-subdirs.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { FileClient } from \"@openhands/typescript-client/clients\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\n\nexport interface FileBrowserEntry {\n label: string;\n path: string;\n}\n\nexport interface HomeDirectoryResponse {\n home: string;\n favorites?: FileBrowserEntry[];\n locations?: FileBrowserEntry[];\n}\n\nfunction getFileClient() {\n return new FileClient(getAgentServerClientOptions());\n}\n\nexport const useSearchSubdirs = (path: string | null) => {\n const active = useActiveBackend();\n return useQuery({\n queryKey: [\"file\", \"search_subdirs\", path, active.backend.id, active.orgId],\n queryFn: () => getFileClient().searchSubdirectories(path as string),\n enabled: !!path,\n retry: false,\n meta: { disableToast: true },\n });\n};\n\nexport const useHomeDirectory = () => {\n const active = useActiveBackend();\n return useQuery({\n queryKey: [\"file\", \"home\", active.backend.id, active.orgId],\n queryFn: async (): Promise<HomeDirectoryResponse> =>\n getFileClient().getHome(),\n retry: false,\n meta: { disableToast: true },\n staleTime: Infinity,\n });\n};\n"],"mappings":";;;;;;AAgBA,SAAS,IAAgB;AACvB,QAAO,IAAI,EAAW,GAA6B,CAAC;;AAGtD,IAAa,KAAoB,MAAwB;CACvD,IAAM,IAAS,GAAkB;AACjC,QAAO,EAAS;EACd,UAAU;GAAC;GAAQ;GAAkB;GAAM,EAAO,QAAQ;GAAI,EAAO;GAAM;EAC3E,eAAe,GAAe,CAAC,qBAAqB,EAAe;EACnE,SAAS,CAAC,CAAC;EACX,OAAO;EACP,MAAM,EAAE,cAAc,IAAM;EAC7B,CAAC;GAGS,UAAyB;CACpC,IAAM,IAAS,GAAkB;AACjC,QAAO,EAAS;EACd,UAAU;GAAC;GAAQ;GAAQ,EAAO,QAAQ;GAAI,EAAO;GAAM;EAC3D,SAAS,YACP,GAAe,CAAC,SAAS;EAC3B,OAAO;EACP,MAAM,EAAE,cAAc,IAAM;EAC5B,WAAW;EACZ,CAAC"}
1
+ {"version":3,"file":"use-search-subdirs.js","names":[],"sources":["../../../src/hooks/query/use-search-subdirs.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { FileClient } from \"@openhands/typescript-client/clients\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\n\ntype FileSubdirectoryPage = Awaited<\n ReturnType<FileClient[\"searchSubdirectories\"]>\n>;\ntype FileClientLike = Pick<FileClient, \"searchSubdirectories\">;\n\nexport interface FileBrowserEntry {\n label: string;\n path: string;\n}\n\nexport interface HomeDirectoryResponse {\n home: string;\n favorites?: FileBrowserEntry[];\n locations?: FileBrowserEntry[];\n}\n\nfunction getFileClient() {\n return new FileClient(getAgentServerClientOptions());\n}\n\nexport async function searchAllSubdirectories(\n path: string,\n fileClient: FileClientLike = getFileClient(),\n): Promise<FileSubdirectoryPage> {\n const items: FileSubdirectoryPage[\"items\"] = [];\n const seenPageIds = new Set<string>();\n let pageId: string | null | undefined;\n\n while (true) {\n const page = await fileClient.searchSubdirectories(\n path,\n pageId ? { pageId } : undefined,\n );\n items.push(...page.items);\n pageId = page.next_page_id;\n\n if (!pageId) {\n return { items, next_page_id: null };\n }\n\n if (seenPageIds.has(pageId)) {\n throw new Error(\"File search returned a repeated page id\");\n }\n seenPageIds.add(pageId);\n }\n}\n\nexport const useSearchSubdirs = (path: string | null) => {\n const active = useActiveBackend();\n return useQuery({\n queryKey: [\"file\", \"search_subdirs\", path, active.backend.id, active.orgId],\n queryFn: () => searchAllSubdirectories(path as string),\n enabled: !!path,\n retry: false,\n meta: { disableToast: true },\n });\n};\n\nexport const useHomeDirectory = () => {\n const active = useActiveBackend();\n return useQuery({\n queryKey: [\"file\", \"home\", active.backend.id, active.orgId],\n queryFn: async (): Promise<HomeDirectoryResponse> =>\n getFileClient().getHome(),\n retry: false,\n meta: { disableToast: true },\n staleTime: Infinity,\n });\n};\n"],"mappings":";;;;;;AAqBA,SAAS,IAAgB;AACvB,QAAO,IAAI,EAAW,GAA6B,CAAC;;AAGtD,eAAsB,EACpB,GACA,IAA6B,GAAe,EACb;CAC/B,IAAM,IAAuC,EAAE,EACzC,oBAAc,IAAI,KAAa,EACjC;AAEJ,UAAa;EACX,IAAM,IAAO,MAAM,EAAW,qBAC5B,GACA,IAAS,EAAE,WAAQ,GAAG,KAAA,EACvB;AAID,MAHA,EAAM,KAAK,GAAG,EAAK,MAAM,EACzB,IAAS,EAAK,cAEV,CAAC,EACH,QAAO;GAAE;GAAO,cAAc;GAAM;AAGtC,MAAI,EAAY,IAAI,EAAO,CACzB,OAAU,MAAM,0CAA0C;AAE5D,IAAY,IAAI,EAAO;;;AAI3B,IAAa,KAAoB,MAAwB;CACvD,IAAM,IAAS,GAAkB;AACjC,QAAO,EAAS;EACd,UAAU;GAAC;GAAQ;GAAkB;GAAM,EAAO,QAAQ;GAAI,EAAO;GAAM;EAC3E,eAAe,EAAwB,EAAe;EACtD,SAAS,CAAC,CAAC;EACX,OAAO;EACP,MAAM,EAAE,cAAc,IAAM;EAC7B,CAAC;GAGS,UAAyB;CACpC,IAAM,IAAS,GAAkB;AACjC,QAAO,EAAS;EACd,UAAU;GAAC;GAAQ;GAAQ,EAAO,QAAQ;GAAI,EAAO;GAAM;EAC3D,SAAS,YACP,GAAe,CAAC,SAAS;EAC3B,OAAO;EACP,MAAM,EAAE,cAAc,IAAM;EAC5B,WAAW;EACZ,CAAC"}
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../context/navigation-context.cjs`),t=require(`../use-conversation-id.cjs`),n=require(`../../utils/conversation-local-storage.cjs`),r=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),i=require(`../../stores/optimistic-user-message-store.cjs`),a=require(`../../api/conversation-metadata-store.cjs`),o=require(`../../api/conversation-service/agent-server-conversation-service.api.cjs`),s=require(`../../services/cloud-funnel-analytics.cjs`),c=require(`../../utils/flush-pending-task-attachments.cjs`),l=require(`../../utils/pending-task-message-link.cjs`);let u=require(`react`);var d=(e,t)=>{let n=e.request.plugins?.map(a.toPluginCoordinates);if(!n?.length)return;let r=a.getStoredConversationMetadata(t);a.setStoredConversationMetadata(t,{...r,selected_repository:r?.selected_repository??e.request.selected_repository??null,selected_branch:r?.selected_branch??e.request.selected_branch??null,git_provider:r?.git_provider??e.request.git_provider??null,plugins:n})},f=()=>{let{conversationId:a}=t.useOptionalConversationId(),{navigate:f}=e.useNavigation(),p=!!a&&a.startsWith(`task-`),m=p?a.replace(`task-`,``):null,h=r.useQuery({queryKey:[`start-task`,m],queryFn:async()=>m?o.default.getStartTask(m):null,enabled:!!m,refetchInterval:e=>{let t=e.state.data;return!t||t.status===`READY`||t.status===`ERROR`?!1:3e3},retry:!1}),g=(0,u.useRef)(null);return(0,u.useLayoutEffect)(()=>{if(!a)return;let e=l.consumeScheduledPendingTaskMessageReassign(a);e&&(i.useOptimisticUserMessageStore.getState().reassignPendingMessages(e.fromConversationId,e.toConversationId),l.clearPendingTaskMessageLink(e.toConversationId))},[a]),(0,u.useEffect)(()=>{let e=h.data,t=e?.app_conversation_id;!m||e?.status!==`READY`||!t||g.current===m||(g.current=m,s.trackCloudConversationReady(m,t),d(e,t),(async()=>{await c.flushPendingTaskAttachments(m,t);let e=`task-${m}`;l.linkPendingTaskMessages(t,e),l.schedulePendingTaskMessageReassign(e,t);let r=n.consumePendingTaskDraft(m);r&&n.setConversationState(t,{draftMessage:r}),f(`/conversations/${t}`,{replace:!0})})())},[h.data,f,m]),(0,u.useEffect)(()=>{g.current=null},[m]),{isTask:p,taskId:m,conversationId:p?null:a??null,task:h.data,taskStatus:h.data?.status,taskDetail:h.data?.detail,taskError:h.error,isLoadingTask:h.isLoading,repositoryInfo:{selectedRepository:h.data?.request?.selected_repository,selectedBranch:h.data?.request?.selected_branch,gitProvider:h.data?.request?.git_provider}}};exports.useTaskPolling=f;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../context/navigation-context.cjs`),t=require(`../use-conversation-id.cjs`),n=require(`../../utils/conversation-local-storage.cjs`),r=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),i=require(`../../stores/optimistic-user-message-store.cjs`),a=require(`../../api/conversation-metadata-store.cjs`),o=require(`../../api/conversation-service/agent-server-conversation-service.api.cjs`),s=require(`../../services/cloud-funnel-analytics.cjs`),c=require(`../../utils/flush-pending-task-attachments.cjs`),l=require(`../../utils/pending-task-message-link.cjs`);let u=require(`react`);var d=(e,t)=>{let n=e.request.plugins?.map(a.toPluginCoordinates);if(!n?.length)return;let r=a.getStoredConversationMetadata(t);a.setStoredConversationMetadata(t,{...r,selected_repository:r?.selected_repository??e.request.selected_repository??null,selected_branch:r?.selected_branch??e.request.selected_branch??null,git_provider:r?.git_provider??e.request.git_provider??null,plugins:n})},f=()=>{let{conversationId:e}=t.useOptionalConversationId(),n=!!e&&e.startsWith(`task-`),i=n?e.replace(`task-`,``):null,a=r.useQuery({queryKey:[`start-task`,i],queryFn:async()=>i?o.default.getStartTask(i):null,enabled:!!i,refetchInterval:e=>{let t=e.state.data;return!t||t.status===`READY`||t.status===`ERROR`?!1:3e3},retry:!1});return{isTask:n,taskId:i,conversationId:n?null:e??null,task:a.data,taskStatus:a.data?.status,taskDetail:a.data?.detail,taskError:a.error,isLoadingTask:a.isLoading,repositoryInfo:{selectedRepository:a.data?.request?.selected_repository,selectedBranch:a.data?.request?.selected_branch,gitProvider:a.data?.request?.git_provider}}},p=()=>{let r=f(),{task:a,taskId:o}=r,{conversationId:p}=t.useOptionalConversationId(),{navigate:m}=e.useNavigation(),h=(0,u.useRef)(null);return(0,u.useLayoutEffect)(()=>{if(!p)return;let e=l.consumeScheduledPendingTaskMessageReassign(p);e&&(i.useOptimisticUserMessageStore.getState().reassignPendingMessages(e.fromConversationId,e.toConversationId),l.clearPendingTaskMessageLink(e.toConversationId))},[p]),(0,u.useEffect)(()=>{let e=a?.app_conversation_id;!o||a?.status!==`READY`||!e||h.current===o||(h.current=o,s.trackCloudConversationReady(o,e),d(a,e),(async()=>{await c.flushPendingTaskAttachments(o,e);let t=`task-${o}`;l.linkPendingTaskMessages(e,t),l.schedulePendingTaskMessageReassign(t,e);let r=n.consumePendingTaskDraft(o);r&&n.setConversationState(e,{draftMessage:r}),m(`/conversations/${e}`,{replace:!0})})())},[a,o,m]),r};exports.useTaskPolling=f,exports.useTaskPollingController=p;
2
2
  //# sourceMappingURL=use-task-polling.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-task-polling.cjs","names":[],"sources":["../../../src/hooks/query/use-task-polling.ts"],"sourcesContent":["import { useEffect, useLayoutEffect, useRef } from \"react\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport type { AppConversationStartTask } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n toPluginCoordinates,\n} from \"#/api/conversation-metadata-store\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport {\n consumePendingTaskDraft,\n setConversationState,\n} from \"#/utils/conversation-local-storage\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { trackCloudConversationReady } from \"#/services/cloud-funnel-analytics\";\nimport { flushPendingTaskAttachments } from \"#/utils/flush-pending-task-attachments\";\nimport {\n clearPendingTaskMessageLink,\n consumeScheduledPendingTaskMessageReassign,\n linkPendingTaskMessages,\n schedulePendingTaskMessageReassign,\n} from \"#/utils/pending-task-message-link\";\n\nconst storeTaskPlugins = (\n task: AppConversationStartTask,\n conversationId: string,\n) => {\n const plugins = task.request.plugins?.map(toPluginCoordinates);\n if (!plugins?.length) return;\n\n const metadata = getStoredConversationMetadata(conversationId);\n setStoredConversationMetadata(conversationId, {\n ...metadata,\n selected_repository:\n metadata?.selected_repository ?? task.request.selected_repository ?? null,\n selected_branch:\n metadata?.selected_branch ?? task.request.selected_branch ?? null,\n git_provider: metadata?.git_provider ?? task.request.git_provider ?? null,\n plugins,\n });\n};\n\n/**\n * Hook that polls V1 conversation start tasks and navigates when ready.\n *\n * This hook:\n * - Detects if the conversationId URL param is a task ID (format: \"task-{uuid}\")\n * - Polls the V1 start task API every 3 seconds until status is READY or ERROR\n * - Automatically navigates to the conversation URL when the task becomes READY\n * - Exposes task status and details for UI components to show loading states and errors\n *\n * URL patterns:\n * - /conversations/task-{uuid} → Polls start task, then navigates to /conversations/{conversation-id}\n * - /conversations/{uuid or hex} → No polling (handled by useActiveConversation)\n *\n * Note: This hook does NOT fetch conversation data. It only handles task polling and navigation.\n */\nexport const useTaskPolling = () => {\n // Optional: the chat input shell renders on the home page too; polling\n // simply no-ops when there's no conversation id yet.\n const { conversationId } = useOptionalConversationId();\n const { navigate } = useNavigation();\n\n // Check if this is a task ID (format: \"task-{uuid}\")\n const isTask = !!conversationId && conversationId.startsWith(\"task-\");\n const taskId = isTask ? conversationId!.replace(\"task-\", \"\") : null;\n\n // Poll the task if this is a task ID\n const taskQuery = useQuery({\n queryKey: [\"start-task\", taskId],\n queryFn: async () => {\n if (!taskId) return null;\n return AgentServerConversationService.getStartTask(taskId);\n },\n enabled: !!taskId,\n refetchInterval: (query) => {\n const task = query.state.data;\n if (!task) return false;\n\n // Stop polling if ready or error\n if (task.status === \"READY\" || task.status === \"ERROR\") {\n return false;\n }\n\n // Poll every 3 seconds while task is in progress\n return 3000;\n },\n retry: false,\n });\n\n const handledReadyTaskIdRef = useRef<string | null>(null);\n\n // Reassign optimistic pending messages before paint on the real conversation\n // route. Doing this in the ready handler before navigate leaves a frame where\n // the URL still points at `task-{uuid}` but pending is keyed to the real id.\n useLayoutEffect(() => {\n if (!conversationId) {\n return;\n }\n\n const pendingReassign =\n consumeScheduledPendingTaskMessageReassign(conversationId);\n if (!pendingReassign) {\n return;\n }\n\n useOptimisticUserMessageStore\n .getState()\n .reassignPendingMessages(\n pendingReassign.fromConversationId,\n pendingReassign.toConversationId,\n );\n clearPendingTaskMessageLink(pendingReassign.toConversationId);\n }, [conversationId]);\n\n // Navigate to conversation ID when task is ready\n useEffect(() => {\n const task = taskQuery.data;\n const appConversationId = task?.app_conversation_id;\n if (\n !taskId ||\n task?.status !== \"READY\" ||\n !appConversationId ||\n handledReadyTaskIdRef.current === taskId\n ) {\n return;\n }\n\n handledReadyTaskIdRef.current = taskId;\n trackCloudConversationReady(taskId, appConversationId);\n storeTaskPlugins(task, appConversationId);\n\n void (async () => {\n await flushPendingTaskAttachments(taskId, appConversationId);\n\n const taskConversationId = `task-${taskId}`;\n linkPendingTaskMessages(appConversationId, taskConversationId);\n schedulePendingTaskMessageReassign(taskConversationId, appConversationId);\n\n const pendingDraft = consumePendingTaskDraft(taskId);\n if (pendingDraft) {\n setConversationState(appConversationId, {\n draftMessage: pendingDraft,\n });\n }\n\n navigate(`/conversations/${appConversationId}`, { replace: true });\n })();\n }, [taskQuery.data, navigate, taskId]);\n\n useEffect(() => {\n handledReadyTaskIdRef.current = null;\n }, [taskId]);\n\n return {\n isTask,\n taskId,\n conversationId: isTask ? null : (conversationId ?? null),\n task: taskQuery.data,\n taskStatus: taskQuery.data?.status,\n taskDetail: taskQuery.data?.detail,\n taskError: taskQuery.error,\n isLoadingTask: taskQuery.isLoading,\n // Repository information from task request\n repositoryInfo: {\n selectedRepository: taskQuery.data?.request?.selected_repository,\n selectedBranch: taskQuery.data?.request?.selected_branch,\n gitProvider: taskQuery.data?.request?.git_provider,\n },\n };\n};\n"],"mappings":"kqBAyBA,IAAM,GACJ,EACA,IACG,CACH,IAAM,EAAU,EAAK,QAAQ,SAAS,IAAI,EAAA,oBAAoB,CAC9D,GAAI,CAAC,GAAS,OAAQ,OAEtB,IAAM,EAAW,EAAA,8BAA8B,EAAe,CAC9D,EAAA,8BAA8B,EAAgB,CAC5C,GAAG,EACH,oBACE,GAAU,qBAAuB,EAAK,QAAQ,qBAAuB,KACvE,gBACE,GAAU,iBAAmB,EAAK,QAAQ,iBAAmB,KAC/D,aAAc,GAAU,cAAgB,EAAK,QAAQ,cAAgB,KACrE,UACD,CAAC,EAkBS,MAAuB,CAGlC,GAAM,CAAE,kBAAmB,EAAA,2BAA2B,CAChD,CAAE,YAAa,EAAA,eAAe,CAG9B,EAAS,CAAC,CAAC,GAAkB,EAAe,WAAW,QAAQ,CAC/D,EAAS,EAAS,EAAgB,QAAQ,QAAS,GAAG,CAAG,KAGzD,EAAY,EAAA,SAAS,CACzB,SAAU,CAAC,aAAc,EAAO,CAChC,QAAS,SACF,EACE,EAAA,QAA+B,aAAa,EAAO,CADtC,KAGtB,QAAS,CAAC,CAAC,EACX,gBAAkB,GAAU,CAC1B,IAAM,EAAO,EAAM,MAAM,KASzB,MARI,CAAC,GAGD,EAAK,SAAW,SAAW,EAAK,SAAW,QACtC,GAIF,KAET,MAAO,GACR,CAAC,CAEI,GAAA,EAAA,EAAA,QAA8C,KAAK,CAgEzD,OA3DA,EAAA,EAAA,qBAAsB,CACpB,GAAI,CAAC,EACH,OAGF,IAAM,EACJ,EAAA,2CAA2C,EAAe,CACvD,IAIL,EAAA,8BACG,UAAU,CACV,wBACC,EAAgB,mBAChB,EAAgB,iBACjB,CACH,EAAA,4BAA4B,EAAgB,iBAAiB,GAC5D,CAAC,EAAe,CAAC,EAGpB,EAAA,EAAA,eAAgB,CACd,IAAM,EAAO,EAAU,KACjB,EAAoB,GAAM,oBAE9B,CAAC,GACD,GAAM,SAAW,SACjB,CAAC,GACD,EAAsB,UAAY,IAKpC,EAAsB,QAAU,EAChC,EAAA,4BAA4B,EAAQ,EAAkB,CACtD,EAAiB,EAAM,EAAkB,EAEnC,SAAY,CAChB,MAAM,EAAA,4BAA4B,EAAQ,EAAkB,CAE5D,IAAM,EAAqB,QAAQ,IACnC,EAAA,wBAAwB,EAAmB,EAAmB,CAC9D,EAAA,mCAAmC,EAAoB,EAAkB,CAEzE,IAAM,EAAe,EAAA,wBAAwB,EAAO,CAChD,GACF,EAAA,qBAAqB,EAAmB,CACtC,aAAc,EACf,CAAC,CAGJ,EAAS,kBAAkB,IAAqB,CAAE,QAAS,GAAM,CAAC,IAChE,GACH,CAAC,EAAU,KAAM,EAAU,EAAO,CAAC,EAEtC,EAAA,EAAA,eAAgB,CACd,EAAsB,QAAU,MAC/B,CAAC,EAAO,CAAC,CAEL,CACL,SACA,SACA,eAAgB,EAAS,KAAQ,GAAkB,KACnD,KAAM,EAAU,KAChB,WAAY,EAAU,MAAM,OAC5B,WAAY,EAAU,MAAM,OAC5B,UAAW,EAAU,MACrB,cAAe,EAAU,UAEzB,eAAgB,CACd,mBAAoB,EAAU,MAAM,SAAS,oBAC7C,eAAgB,EAAU,MAAM,SAAS,gBACzC,YAAa,EAAU,MAAM,SAAS,aACvC,CACF"}
1
+ {"version":3,"file":"use-task-polling.cjs","names":[],"sources":["../../../src/hooks/query/use-task-polling.ts"],"sourcesContent":["import { useEffect, useLayoutEffect, useRef } from \"react\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport type { AppConversationStartTask } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n toPluginCoordinates,\n} from \"#/api/conversation-metadata-store\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport {\n consumePendingTaskDraft,\n setConversationState,\n} from \"#/utils/conversation-local-storage\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { trackCloudConversationReady } from \"#/services/cloud-funnel-analytics\";\nimport { flushPendingTaskAttachments } from \"#/utils/flush-pending-task-attachments\";\nimport {\n clearPendingTaskMessageLink,\n consumeScheduledPendingTaskMessageReassign,\n linkPendingTaskMessages,\n schedulePendingTaskMessageReassign,\n} from \"#/utils/pending-task-message-link\";\n\nconst storeTaskPlugins = (\n task: AppConversationStartTask,\n conversationId: string,\n) => {\n const plugins = task.request.plugins?.map(toPluginCoordinates);\n if (!plugins?.length) return;\n\n const metadata = getStoredConversationMetadata(conversationId);\n setStoredConversationMetadata(conversationId, {\n ...metadata,\n selected_repository:\n metadata?.selected_repository ?? task.request.selected_repository ?? null,\n selected_branch:\n metadata?.selected_branch ?? task.request.selected_branch ?? null,\n git_provider: metadata?.git_provider ?? task.request.git_provider ?? null,\n plugins,\n });\n};\n\n/**\n * Read the shared polling state for a V1 conversation start task.\n *\n * This hook:\n * - Detects if the conversationId URL param is a task ID (format: \"task-{uuid}\")\n * - Polls the V1 start task API every 3 seconds until status is READY or ERROR\n * - Exposes task status and details for UI components to show loading states and errors\n *\n * URL patterns:\n * - /conversations/task-{uuid} → Polls start task, then navigates to /conversations/{conversation-id}\n * - /conversations/{uuid or hex} → No polling (handled by useActiveConversation)\n *\n * The conversation route mounts useTaskPollingController once to own READY\n * side effects; other components can consume this hook without repeating them.\n */\nexport const useTaskPolling = () => {\n // Optional: the chat input shell renders on the home page too; polling\n // simply no-ops when there's no conversation id yet.\n const { conversationId } = useOptionalConversationId();\n\n // Check if this is a task ID (format: \"task-{uuid}\")\n const isTask = !!conversationId && conversationId.startsWith(\"task-\");\n const taskId = isTask ? conversationId!.replace(\"task-\", \"\") : null;\n\n // Poll the task if this is a task ID\n const taskQuery = useQuery({\n queryKey: [\"start-task\", taskId],\n queryFn: async () => {\n if (!taskId) return null;\n return AgentServerConversationService.getStartTask(taskId);\n },\n enabled: !!taskId,\n refetchInterval: (query) => {\n const task = query.state.data;\n if (!task) return false;\n\n // Stop polling if ready or error\n if (task.status === \"READY\" || task.status === \"ERROR\") {\n return false;\n }\n\n // Poll every 3 seconds while task is in progress\n return 3000;\n },\n retry: false,\n });\n\n return {\n isTask,\n taskId,\n conversationId: isTask ? null : (conversationId ?? null),\n task: taskQuery.data,\n taskStatus: taskQuery.data?.status,\n taskDetail: taskQuery.data?.detail,\n taskError: taskQuery.error,\n isLoadingTask: taskQuery.isLoading,\n // Repository information from task request\n repositoryInfo: {\n selectedRepository: taskQuery.data?.request?.selected_repository,\n selectedBranch: taskQuery.data?.request?.selected_branch,\n gitProvider: taskQuery.data?.request?.git_provider,\n },\n };\n};\n\n/** Own the task lifecycle side effects once at the conversation route. */\nexport const useTaskPollingController = () => {\n const polling = useTaskPolling();\n const { task, taskId } = polling;\n const { conversationId } = useOptionalConversationId();\n const { navigate } = useNavigation();\n const handledReadyTaskIdRef = useRef<string | null>(null);\n\n // Reassign optimistic pending messages before paint on the real conversation\n // route. Doing this in the ready handler before navigate leaves a frame where\n // the URL still points at `task-{uuid}` but pending is keyed to the real id.\n useLayoutEffect(() => {\n if (!conversationId) {\n return;\n }\n\n const pendingReassign =\n consumeScheduledPendingTaskMessageReassign(conversationId);\n if (!pendingReassign) {\n return;\n }\n\n useOptimisticUserMessageStore\n .getState()\n .reassignPendingMessages(\n pendingReassign.fromConversationId,\n pendingReassign.toConversationId,\n );\n clearPendingTaskMessageLink(pendingReassign.toConversationId);\n }, [conversationId]);\n\n // Navigate to conversation ID when task is ready\n useEffect(() => {\n const appConversationId = task?.app_conversation_id;\n if (\n !taskId ||\n task?.status !== \"READY\" ||\n !appConversationId ||\n handledReadyTaskIdRef.current === taskId\n ) {\n return;\n }\n\n handledReadyTaskIdRef.current = taskId;\n trackCloudConversationReady(taskId, appConversationId);\n storeTaskPlugins(task, appConversationId);\n\n void (async () => {\n await flushPendingTaskAttachments(taskId, appConversationId);\n\n const taskConversationId = `task-${taskId}`;\n linkPendingTaskMessages(appConversationId, taskConversationId);\n schedulePendingTaskMessageReassign(taskConversationId, appConversationId);\n\n const pendingDraft = consumePendingTaskDraft(taskId);\n if (pendingDraft) {\n setConversationState(appConversationId, {\n draftMessage: pendingDraft,\n });\n }\n\n navigate(`/conversations/${appConversationId}`, { replace: true });\n })();\n }, [task, taskId, navigate]);\n\n return polling;\n};\n"],"mappings":"kqBAyBA,IAAM,GACJ,EACA,IACG,CACH,IAAM,EAAU,EAAK,QAAQ,SAAS,IAAI,EAAA,oBAAoB,CAC9D,GAAI,CAAC,GAAS,OAAQ,OAEtB,IAAM,EAAW,EAAA,8BAA8B,EAAe,CAC9D,EAAA,8BAA8B,EAAgB,CAC5C,GAAG,EACH,oBACE,GAAU,qBAAuB,EAAK,QAAQ,qBAAuB,KACvE,gBACE,GAAU,iBAAmB,EAAK,QAAQ,iBAAmB,KAC/D,aAAc,GAAU,cAAgB,EAAK,QAAQ,cAAgB,KACrE,UACD,CAAC,EAkBS,MAAuB,CAGlC,GAAM,CAAE,kBAAmB,EAAA,2BAA2B,CAGhD,EAAS,CAAC,CAAC,GAAkB,EAAe,WAAW,QAAQ,CAC/D,EAAS,EAAS,EAAgB,QAAQ,QAAS,GAAG,CAAG,KAGzD,EAAY,EAAA,SAAS,CACzB,SAAU,CAAC,aAAc,EAAO,CAChC,QAAS,SACF,EACE,EAAA,QAA+B,aAAa,EAAO,CADtC,KAGtB,QAAS,CAAC,CAAC,EACX,gBAAkB,GAAU,CAC1B,IAAM,EAAO,EAAM,MAAM,KASzB,MARI,CAAC,GAGD,EAAK,SAAW,SAAW,EAAK,SAAW,QACtC,GAIF,KAET,MAAO,GACR,CAAC,CAEF,MAAO,CACL,SACA,SACA,eAAgB,EAAS,KAAQ,GAAkB,KACnD,KAAM,EAAU,KAChB,WAAY,EAAU,MAAM,OAC5B,WAAY,EAAU,MAAM,OAC5B,UAAW,EAAU,MACrB,cAAe,EAAU,UAEzB,eAAgB,CACd,mBAAoB,EAAU,MAAM,SAAS,oBAC7C,eAAgB,EAAU,MAAM,SAAS,gBACzC,YAAa,EAAU,MAAM,SAAS,aACvC,CACF,EAIU,MAAiC,CAC5C,IAAM,EAAU,GAAgB,CAC1B,CAAE,OAAM,UAAW,EACnB,CAAE,kBAAmB,EAAA,2BAA2B,CAChD,CAAE,YAAa,EAAA,eAAe,CAC9B,GAAA,EAAA,EAAA,QAA8C,KAAK,CA2DzD,OAtDA,EAAA,EAAA,qBAAsB,CACpB,GAAI,CAAC,EACH,OAGF,IAAM,EACJ,EAAA,2CAA2C,EAAe,CACvD,IAIL,EAAA,8BACG,UAAU,CACV,wBACC,EAAgB,mBAChB,EAAgB,iBACjB,CACH,EAAA,4BAA4B,EAAgB,iBAAiB,GAC5D,CAAC,EAAe,CAAC,EAGpB,EAAA,EAAA,eAAgB,CACd,IAAM,EAAoB,GAAM,oBAE9B,CAAC,GACD,GAAM,SAAW,SACjB,CAAC,GACD,EAAsB,UAAY,IAKpC,EAAsB,QAAU,EAChC,EAAA,4BAA4B,EAAQ,EAAkB,CACtD,EAAiB,EAAM,EAAkB,EAEnC,SAAY,CAChB,MAAM,EAAA,4BAA4B,EAAQ,EAAkB,CAE5D,IAAM,EAAqB,QAAQ,IACnC,EAAA,wBAAwB,EAAmB,EAAmB,CAC9D,EAAA,mCAAmC,EAAoB,EAAkB,CAEzE,IAAM,EAAe,EAAA,wBAAwB,EAAO,CAChD,GACF,EAAA,qBAAqB,EAAmB,CACtC,aAAc,EACf,CAAC,CAGJ,EAAS,kBAAkB,IAAqB,CAAE,QAAS,GAAM,CAAC,IAChE,GACH,CAAC,EAAM,EAAQ,EAAS,CAAC,CAErB"}
@@ -1,18 +1,18 @@
1
1
  import type { AppConversationStartTask } from "#/api/conversation-service/agent-server-conversation-service.types";
2
2
  /**
3
- * Hook that polls V1 conversation start tasks and navigates when ready.
3
+ * Read the shared polling state for a V1 conversation start task.
4
4
  *
5
5
  * This hook:
6
6
  * - Detects if the conversationId URL param is a task ID (format: "task-{uuid}")
7
7
  * - Polls the V1 start task API every 3 seconds until status is READY or ERROR
8
- * - Automatically navigates to the conversation URL when the task becomes READY
9
8
  * - Exposes task status and details for UI components to show loading states and errors
10
9
  *
11
10
  * URL patterns:
12
11
  * - /conversations/task-{uuid} → Polls start task, then navigates to /conversations/{conversation-id}
13
12
  * - /conversations/{uuid or hex} → No polling (handled by useActiveConversation)
14
13
  *
15
- * Note: This hook does NOT fetch conversation data. It only handles task polling and navigation.
14
+ * The conversation route mounts useTaskPollingController once to own READY
15
+ * side effects; other components can consume this hook without repeating them.
16
16
  */
17
17
  export declare const useTaskPolling: () => {
18
18
  isTask: boolean;
@@ -29,3 +29,19 @@ export declare const useTaskPolling: () => {
29
29
  gitProvider: "github" | "gitlab" | "bitbucket" | "bitbucket_data_center" | "azure_devops" | "forgejo" | null | undefined;
30
30
  };
31
31
  };
32
+ /** Own the task lifecycle side effects once at the conversation route. */
33
+ export declare const useTaskPollingController: () => {
34
+ isTask: boolean;
35
+ taskId: string | null;
36
+ conversationId: string | null;
37
+ task: AppConversationStartTask | null | undefined;
38
+ taskStatus: import("#/api/conversation-service/agent-server-conversation-service.types").AppConversationStartTaskStatus | undefined;
39
+ taskDetail: string | null | undefined;
40
+ taskError: import("axios").AxiosError<unknown, any> | null;
41
+ isLoadingTask: boolean;
42
+ repositoryInfo: {
43
+ selectedRepository: string | null | undefined;
44
+ selectedBranch: string | null | undefined;
45
+ gitProvider: "github" | "gitlab" | "bitbucket" | "bitbucket_data_center" | "azure_devops" | "forgejo" | null | undefined;
46
+ };
47
+ };