@openhands/agent-canvas 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (674) hide show
  1. package/README.md +11 -12
  2. package/README.windows.md +4 -2
  3. package/build/assets/{Trans-Ch-OVWEA.js → Trans-DqF_OEZB.js} +1 -1
  4. package/build/assets/{acp-providers-Sy2LKyMa.js → acp-providers-BQwoUBpe.js} +1 -1
  5. package/build/assets/active-backend-context-BCXRv5pm.js +1 -0
  6. package/build/assets/{add-backend-modal-Bgy8anoR.js → add-backend-modal-BKHzq5no.js} +1 -1
  7. package/build/assets/{agent-profiles-settings-3mmXljZX.js → agent-profiles-settings-CEp5CIz8.js} +1 -1
  8. package/build/assets/agent-server-compatibility-D6DSanlx.js +1 -0
  9. package/build/assets/agent-server-conversation-service.api-cylugfDz.js +41 -0
  10. package/build/assets/{agent-settings-B-W10B4E.js → agent-settings-C-tann3x.js} +2 -2
  11. package/build/assets/agent-settings-DGUKNSnU.js +1 -0
  12. package/build/assets/{alert-banner-Bpf2NQJq.js → alert-banner-Dd4woGbm.js} +1 -1
  13. package/build/assets/api-key-entry-screen-Bll_CkuQ.js +1 -0
  14. package/build/assets/app-settings-BpViWwpC.js +1 -0
  15. package/build/assets/automation-detail-Z9dN2f5l.js +2 -0
  16. package/build/assets/automation-export-D5uL0Tf8.js +2 -0
  17. package/build/assets/automations-list-BMOWcqzZ.js +1 -0
  18. package/build/assets/{back-nav-button-CUS2mi-U.js → back-nav-button-ZUDTMOTB.js} +1 -1
  19. package/build/assets/backend-form-modal-DhBT8P4g.js +1 -0
  20. package/build/assets/{backend-synced-settings-badge-D9hZx05w.js → backend-synced-settings-badge-Db_REKVw.js} +1 -1
  21. package/build/assets/{base-modal-BuF2f0YL.js → base-modal-Cb0C6m0Q.js} +1 -1
  22. package/build/assets/{bot-D7eUAuSB.js → bot-C-EA6685.js} +1 -1
  23. package/build/assets/{brand-button-vMVuyDXu.js → brand-button-2Tp3aXk1.js} +1 -1
  24. package/build/assets/{browser-BifzWIBd.js → browser-QYLVr1kS.js} +2 -2
  25. package/build/assets/browser-store-BGXOGo-R.js +1 -0
  26. package/build/assets/{browser-tab-CkkqJnqw.js → browser-tab-BTTP1OE2.js} +1 -1
  27. package/build/assets/canvas-ui-BhxjoA1f.js +1 -0
  28. package/build/assets/{chat-send-button-B_jc5z5C.js → chat-send-button-BZHG2hAW.js} +1 -1
  29. package/build/assets/check-TbOEtHKj.js +1 -0
  30. package/build/assets/{chevron-down-CI8A6tet.js → chevron-down-D7IvFMBM.js} +1 -1
  31. package/build/assets/{circle-plus-check-toggle-C5YxjxvI.js → circle-plus-check-toggle-QQJKUnF6.js} +1 -1
  32. package/build/assets/client-source-Biqarhgr.js +1 -0
  33. package/build/assets/cloud-funnel-analytics-D-27T5Ao.js +1 -0
  34. package/build/assets/{combobox-caret-DoObzqf4.js → combobox-caret-A5jMVHgE.js} +1 -1
  35. package/build/assets/{command-menu-D-JV3Wqm.js → command-menu-BMVEme4H.js} +1 -1
  36. package/build/assets/{command-store-D8J5LMW1.js → command-store-jrWX_CcW.js} +1 -1
  37. package/build/assets/condenser-settings-CIa6eyB4.js +1 -0
  38. package/build/assets/{confirmation-modal-BGLu6XJN.js → confirmation-modal-4n_944zq.js} +1 -1
  39. package/build/assets/{context-menu-list-item-BD5_EaKN.js → context-menu-list-item-DvfFic5I.js} +1 -1
  40. package/build/assets/conversation-CHnEXGRM.js +1 -0
  41. package/build/assets/conversation-D4o4dG2t.js +89 -0
  42. package/build/assets/conversation-panel-11FjLCId.js +1 -0
  43. package/build/assets/conversation-service.api-0JG_fF9d.js +1 -0
  44. package/build/assets/conversation-state-store-JiUQp02U.js +1 -0
  45. package/build/assets/{conversation-store-LptbOvKa.js → conversation-store-BCSpLuEf.js} +1 -1
  46. package/build/assets/{conversation-tab-empty-state-B2dDYEwf.js → conversation-tab-empty-state-BUhKVwoi.js} +1 -1
  47. package/build/assets/{copy-3JCw_XFB.js → copy-D1YGjP-C.js} +1 -1
  48. package/build/assets/{copy-to-clipboard-button-CaR52OnA.js → copy-to-clipboard-button-Dp4Q_hXi.js} +1 -1
  49. package/build/assets/declaration-BGsHjPEW.js +1 -0
  50. package/build/assets/{device-verify-Dj6I4Iqe.js → device-verify-CM086oKs.js} +1 -1
  51. package/build/assets/{dropdown-classes-DJSXeLqc.js → dropdown-classes-DZq0BQjb.js} +1 -1
  52. package/build/assets/{ellipsis-button-C5Z-tPFp.js → ellipsis-button-TPJdyxnK.js} +1 -1
  53. package/build/assets/{entry.client-2_3ePAm0.js → entry.client-DypYHsYm.js} +2 -2
  54. package/build/assets/{enum-filter-dropdown-DXbVwiNZ.js → enum-filter-dropdown-CW_mBg0e.js} +1 -1
  55. package/build/assets/{environment-switch-overlay-DZQfRGTx.js → environment-switch-overlay-6laJch-9.js} +1 -1
  56. package/build/assets/{extensions-hub-CLjmOGqS.js → extensions-hub-BJFbFfKS.js} +1 -1
  57. package/build/assets/{extensions-navigation-B5MeUiMq.js → extensions-navigation-DqSl7CJw.js} +1 -1
  58. package/build/assets/{external-link-D2zJjE9G.js → external-link-lhdITPqq.js} +1 -1
  59. package/build/assets/files-tab-c316dKAq.js +1 -0
  60. package/build/assets/{files-tab-store-DJsPxYdg.js → files-tab-store-tfCav6bB.js} +1 -1
  61. package/build/assets/{form-control-classes-ChpNBe9n.js → form-control-classes-CvUaw8_L.js} +1 -1
  62. package/build/assets/format-time-delta-DhDbkD7V.js +1 -0
  63. package/build/assets/git-provider-icon-DUb2pEos.js +1 -0
  64. package/build/assets/home-BQ-DC06B.js +1 -0
  65. package/build/assets/home-D7ds4Jyw.js +1 -0
  66. package/build/assets/index-home-BRFDWs_4.js +1 -0
  67. package/build/assets/install-server-modal-CvHvzZj3.js +1 -0
  68. package/build/assets/{launch-V_3Rp7WS.js → launch-A47TK2Me.js} +1 -1
  69. package/build/assets/lesson-plan-DSf95kQ2.js +4 -0
  70. package/build/assets/{list-todo-BfH6yYUK.js → list-todo-CAtvkzcy.js} +1 -1
  71. package/build/assets/llm-not-configured-banner-B7DR8SPs.js +27 -0
  72. package/build/assets/llm-settings-Ch4ZbW3c.js +1 -0
  73. package/build/assets/llm-settings-Cvi7q4ox.js +1 -0
  74. package/build/assets/llm-subscription-service-Cz1yBBvE.js +1 -0
  75. package/build/assets/loader-circle-CsAsfLIs.js +1 -0
  76. package/build/assets/{loading-spinner-BLdswi6q.js → loading-spinner-Txxx1I1p.js} +1 -1
  77. package/build/assets/manage-backends-modal-DAVhNUCe.js +1 -0
  78. package/build/assets/manifest-958c741a.js +1 -0
  79. package/build/assets/{markdown-renderer-DMT7Zkpd.js → markdown-renderer-B6cJJ_MN.js} +1 -1
  80. package/build/assets/{mcp-BQufNPZ6.js → mcp-BwssgMpg.js} +2 -2
  81. package/build/assets/{messages-BnJCqnFf.js → messages-D8MeG2ZQ.js} +26 -26
  82. package/build/assets/{modal-body-DouOE5KH.js → modal-body-CDZdZ-eT.js} +1 -1
  83. package/build/assets/{modal-classes-Cf-4tbHz.js → modal-classes-B4oit_4c.js} +1 -1
  84. package/build/assets/{modal-close-button-B6CfxxJj.js → modal-close-button-DQElFMPo.js} +1 -1
  85. package/build/assets/model-selector-BxTbbKub.js +1 -0
  86. package/build/assets/{navigation-link-D8hfwvxI.js → navigation-link-imH6S7h2.js} +1 -1
  87. package/build/assets/onboarding-CyicadGt.js +1 -0
  88. package/build/assets/onboarding-modal-DQwihcTz.js +1 -0
  89. package/build/assets/option-service.api-DAkg_F7p.js +1 -0
  90. package/build/assets/organization-service.api-QknzKDh3.js +1 -0
  91. package/build/assets/package-Dk_VtWJ4.js +1 -0
  92. package/build/assets/path-utils-BECGet7G.js +1 -0
  93. package/build/assets/{pencil-Dj2XjKmI.js → pencil-CWhApFIT.js} +1 -1
  94. package/build/assets/{plan-components-CcCBmCzW.js → plan-components-CgPHWz3E.js} +1 -1
  95. package/build/assets/{planner-tab-Dhyqcqmb.js → planner-tab-DPKHmMAX.js} +1 -1
  96. package/build/assets/plugins-management-service-DuTTxquo.js +1 -0
  97. package/build/assets/profiles-service.api-D6jvZOWu.js +1 -0
  98. package/build/assets/providers-B8pxQK8x.js +1 -0
  99. package/build/assets/proxy-CuhhyjdX.js +1 -0
  100. package/build/assets/{recommended-automations-launcher-CTcGTl4d.js → recommended-automations-launcher-DA6DWS7V.js} +1 -1
  101. package/build/assets/{refresh-cw-DM82EIyx.js → refresh-cw-B9B7-vsy.js} +1 -1
  102. package/build/assets/root-BhP6bTBB.js +2 -0
  103. package/build/assets/root-CYWeTrWE.css +1 -0
  104. package/build/assets/root-layout-oBaHHW4s.js +2 -0
  105. package/build/assets/{runtime-waiting-state-BsXLElvN.js → runtime-waiting-state-DeD9G7yJ.js} +1 -1
  106. package/build/assets/schema-field-BOLdL_U7.js +1 -0
  107. package/build/assets/sdk-section-page-ZIltERxf.js +1 -0
  108. package/build/assets/{sdk-settings-schema-Cv7M9eSe.js → sdk-settings-schema-Ba_Pa9uf.js} +1 -1
  109. package/build/assets/search-dIQ09UY2.js +1 -0
  110. package/build/assets/secrets-service-50DElFny.js +1 -0
  111. package/build/assets/{secrets-settings-Cx6yJlyb.js → secrets-settings-Digl7JLe.js} +1 -1
  112. package/build/assets/{segmented-toggle-DyQqPhoD.js → segmented-toggle-C1-ZVyr5.js} +1 -1
  113. package/build/assets/settings-BfgLHsgd.js +1 -0
  114. package/build/assets/{settings-dropdown-input-BjunGXJb.js → settings-dropdown-input-BD5C9fBn.js} +1 -1
  115. package/build/assets/{settings-index-D6sxWSRk.js → settings-index-CODBijya.js} +1 -1
  116. package/build/assets/{settings-input-bD6npsDm.js → settings-input-CzNOq-Pj.js} +1 -1
  117. package/build/assets/{settings-list-classes-Dp_OgzN0.js → settings-list-classes-CuxH9ZoR.js} +1 -1
  118. package/build/assets/settings-modal-BcSWpKI0.js +1 -0
  119. package/build/assets/settings-service.api-Bsu1PvYO.js +1 -0
  120. package/build/assets/{settings-switch-5cuxl8Dc.js → settings-switch-DqmHAfWJ.js} +1 -1
  121. package/build/assets/{settings-utils-BMdG65By.js → settings-utils-B1lBErvV.js} +1 -1
  122. package/build/assets/shared-conversation-CDskdmrb.js +1 -0
  123. package/build/assets/{sidebar-layout-DuzJMMw-.js → sidebar-layout-Cn6eQaEI.js} +1 -1
  124. package/build/assets/{sidebar-mobile-menu-toggle-VvvX32iF.js → sidebar-mobile-menu-toggle-DmCmZgq1.js} +1 -1
  125. package/build/assets/{sidebar-nav-link-5AlTT5-j.js → sidebar-nav-link-DMc8AIe7.js} +1 -1
  126. package/build/assets/{sidebar-store-CZuE8AH5.js → sidebar-store-DXWSCFpa.js} +1 -1
  127. package/build/assets/{skill-card-pill-row-eTIkE4nz.js → skill-card-pill-row-DOIWjiMF.js} +1 -1
  128. package/build/assets/skills-plugins-DLgINYuY.js +1 -0
  129. package/build/assets/{skills-settings-BUv04tSc.js → skills-settings-DPiCWalR.js} +2 -2
  130. package/build/assets/{square-chevron-right-Czw3FFWc.js → square-chevron-right-DE-JN-2Z.js} +1 -1
  131. package/build/assets/{styled-tooltip-CgX2oRaK.js → styled-tooltip-CvsjHuIf.js} +1 -1
  132. package/build/assets/{suspense-BO1Tl_Vf.js → suspense-DmZ3MSSh.js} +1 -1
  133. package/build/assets/{task-list-tab-0k9PhuqO.js → task-list-tab-CuhcDycu.js} +1 -1
  134. package/build/assets/telemetry-DHiTRl5_.js +2 -0
  135. package/build/assets/{terminal-B61WrJdS.js → terminal-CVqF-tCD.js} +1 -1
  136. package/build/assets/{toggle-switch-2j5wwR85.js → toggle-switch-CS0ClOy2.js} +1 -1
  137. package/build/assets/{trash-2-Be_7y3Mn.js → trash-2-BU6BlW4i.js} +1 -1
  138. package/build/assets/{typography-D8mHDeNG.js → typography-CQn9wyEX.js} +1 -1
  139. package/build/assets/use-acp-credential-form-LlfZO_DD.js +1 -0
  140. package/build/assets/{use-activate-agent-profile-20v1xU0H.js → use-activate-agent-profile-DpQjsXM0.js} +1 -1
  141. package/build/assets/{use-active-agent-profile-BkJN7Xsy.js → use-active-agent-profile-Gw_uJujV.js} +1 -1
  142. package/build/assets/{use-active-conversation-DOZVSVtU.js → use-active-conversation-B0sttISF.js} +1 -1
  143. package/build/assets/use-agent-profiles-LHZEK0Gg.js +1 -0
  144. package/build/assets/{use-agent-state-DHZO1obC.js → use-agent-state-C5uA0bRj.js} +1 -1
  145. package/build/assets/use-backends-health-DKt1SmiU.js +1 -0
  146. package/build/assets/{use-can-manage-org-profiles-C-OhWVBS.js → use-can-manage-org-profiles-BAtqsbCi.js} +1 -1
  147. package/build/assets/use-cloud-current-user-id-C8m1oBy4.js +1 -0
  148. package/build/assets/use-config-CXy4vD0H.js +1 -0
  149. package/build/assets/use-create-conversation-CWQGNQ9J.js +1 -0
  150. package/build/assets/{use-create-secret-D0HCOZFu.js → use-create-secret-BIrsX3OB.js} +1 -1
  151. package/build/assets/{use-event-store-DjgU4wfO.js → use-event-store-CsD17BKu.js} +1 -1
  152. package/build/assets/{use-handle-plan-click-DyRASKMC.js → use-handle-plan-click-DEuO7Byo.js} +1 -1
  153. package/build/assets/use-is-authed-Dvbpiu3B.js +1 -0
  154. package/build/assets/{use-launch-skill-in-chat-BnoDgvAy.js → use-launch-skill-in-chat-CdHOoQGM.js} +1 -1
  155. package/build/assets/use-llm-profiles-DQpQxVOD.js +1 -0
  156. package/build/assets/use-plugins-marketplace-Bkk07W_M.js +1 -0
  157. package/build/assets/use-runtime-is-ready-D4pkGT6E.js +1 -0
  158. package/build/assets/use-save-agent-profile-BxEsjnW0.js +1 -0
  159. package/build/assets/{use-save-settings-BGlSfuYn.js → use-save-settings-ioSUMqbE.js} +1 -1
  160. package/build/assets/use-settings-DNJC4gqu.js +1 -0
  161. package/build/assets/use-settings-nav-items-BUsrDbVR.js +16 -0
  162. package/build/assets/use-skills-BsmKm23M.js +1 -0
  163. package/build/assets/{use-task-list-AVBLbbcR.js → use-task-list-rs7Xbzl8.js} +1 -1
  164. package/build/assets/{use-tracking-BIXzagSI.js → use-tracking-poxQHMwR.js} +1 -1
  165. package/build/assets/{use-user-conversation-zpx7I18x.js → use-user-conversation-B337kUKB.js} +1 -1
  166. package/build/assets/{useMutation-DrCAVg5w.js → useMutation-u8UgRgDK.js} +1 -1
  167. package/build/assets/{useMutationState-D8QN0ZCy.js → useMutationState-OnAsCLA_.js} +1 -1
  168. package/build/assets/{useQueries-DClgUTc7.js → useQueries-BpIlT8Mt.js} +1 -1
  169. package/build/assets/{useQuery-CRBP8vIS.js → useQuery-D5pEZbY0.js} +1 -1
  170. package/build/assets/{useTranslation-CDRCKC9-.js → useTranslation-Cbf5AGg_.js} +1 -1
  171. package/build/assets/{utils-D3U3rlqr.js → utils-DB9LsAzA.js} +1 -1
  172. package/build/assets/{vendor~browser-Cvg7jXCP.js → vendor~browser-5Njjw1Cl.js} +1 -1
  173. package/build/assets/{vendor~browser-tab-Di0kh5Zw.js → vendor~browser-tab-Xn94EtUo.js} +1 -1
  174. package/build/assets/{vendor~entry.client-9tWQ_Ugw.js → vendor~entry.client-DDuH4--y.js} +1 -1
  175. package/build/assets/{vendor~entry.client-D6BtSOtn.js → vendor~entry.client-DQGrNspu.js} +1 -1
  176. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-BIieS_OD.js +2 -0
  177. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js +185 -0
  178. package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jewnulst-C57fm7C-.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ljq5gbus-B2XD4bi2.js} +1 -1
  179. package/build/assets/{vendor~files-tab-B02k3xvx.js → vendor~files-tab-CiC3-lGh.js} +1 -1
  180. package/build/assets/{vendor~home~conversation-panel~conversation-CYMF9JYB.js → vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js} +1 -1
  181. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-9UMeuPV6.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B8XNNEQZ.js} +1 -1
  182. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-d8aETPbZ.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CnJRLn5s.js} +1 -1
  183. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DWteoTyr.js +2 -0
  184. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-D7EUmQ8Y.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dc5nKwLO.js} +1 -1
  185. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD0GaRGa.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-tlf6AnDe.js} +1 -1
  186. package/build/assets/{vendor~launch-CHXA9cJu.js → vendor~launch-28DK5Rsl.js} +1 -1
  187. package/build/assets/{vendor~root-layout~conversation-panel~conversation-CpiTHpHl.js → vendor~root-layout~conversation-panel~conversation-8tIsyrPj.js} +1 -1
  188. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-_TdZcNMD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-lYNG9C1U.js} +1 -1
  189. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-Cn2jwSga.js → vendor~root-layout~index-home~home~conversation-panel~conversation-Zhq6xAxR.js} +1 -1
  190. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CZM4hwUT.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-B81b08bw.js} +1 -1
  191. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~enjl5xdm-B0EIDu4M.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-jpyLM1Nn.js} +2 -2
  192. package/build/assets/{verification-settings-D576N2xa.js → verification-settings-HRgEM-_3.js} +1 -1
  193. package/build/assets/x-ZE4iplpF.js +1 -0
  194. package/build/index.html +4 -4
  195. package/build/locales/ar/openhands.json +9 -0
  196. package/build/locales/ca/openhands.json +9 -0
  197. package/build/locales/de/openhands.json +9 -0
  198. package/build/locales/en/openhands.json +9 -0
  199. package/build/locales/es/openhands.json +9 -0
  200. package/build/locales/fr/openhands.json +9 -0
  201. package/build/locales/it/openhands.json +9 -0
  202. package/build/locales/ja/openhands.json +9 -0
  203. package/build/locales/ko-KR/openhands.json +9 -0
  204. package/build/locales/no/openhands.json +9 -0
  205. package/build/locales/pt/openhands.json +9 -0
  206. package/build/locales/tr/openhands.json +9 -0
  207. package/build/locales/uk/openhands.json +9 -0
  208. package/build/locales/zh-CN/openhands.json +9 -0
  209. package/build/locales/zh-TW/openhands.json +9 -0
  210. package/config/defaults.json +5 -4
  211. package/dist/api/agent-server-adapter.cjs +3 -3
  212. package/dist/api/agent-server-adapter.cjs.map +1 -1
  213. package/dist/api/agent-server-adapter.d.ts +9 -1
  214. package/dist/api/agent-server-adapter.js +105 -102
  215. package/dist/api/agent-server-adapter.js.map +1 -1
  216. package/dist/api/agent-server-config.cjs +1 -1
  217. package/dist/api/agent-server-config.cjs.map +1 -1
  218. package/dist/api/agent-server-config.d.ts +3 -0
  219. package/dist/api/agent-server-config.js +45 -23
  220. package/dist/api/agent-server-config.js.map +1 -1
  221. package/dist/api/backend-registry/auth.cjs +1 -1
  222. package/dist/api/backend-registry/auth.cjs.map +1 -1
  223. package/dist/api/backend-registry/auth.js +1 -1
  224. package/dist/api/backend-registry/auth.js.map +1 -1
  225. package/dist/api/backend-registry/default-backend.cjs +1 -1
  226. package/dist/api/backend-registry/default-backend.cjs.map +1 -1
  227. package/dist/api/backend-registry/default-backend.d.ts +3 -0
  228. package/dist/api/backend-registry/default-backend.js +22 -10
  229. package/dist/api/backend-registry/default-backend.js.map +1 -1
  230. package/dist/api/backend-registry/storage.cjs +1 -1
  231. package/dist/api/backend-registry/storage.cjs.map +1 -1
  232. package/dist/api/backend-registry/storage.js +38 -33
  233. package/dist/api/backend-registry/storage.js.map +1 -1
  234. package/dist/api/backend-registry/types.d.ts +2 -0
  235. package/dist/api/canvas-ui-client-tool.cjs +38 -0
  236. package/dist/api/canvas-ui-client-tool.cjs.map +1 -0
  237. package/dist/api/canvas-ui-client-tool.d.ts +14 -0
  238. package/dist/api/canvas-ui-client-tool.js +47 -0
  239. package/dist/api/canvas-ui-client-tool.js.map +1 -0
  240. package/dist/api/client-source.cjs +2 -0
  241. package/dist/api/client-source.cjs.map +1 -0
  242. package/dist/api/client-source.d.ts +9 -0
  243. package/dist/api/client-source.js +10 -0
  244. package/dist/api/client-source.js.map +1 -0
  245. package/dist/api/cloud/client.cjs +2 -0
  246. package/dist/api/cloud/client.cjs.map +1 -0
  247. package/dist/api/cloud/client.d.ts +4 -0
  248. package/dist/api/cloud/client.js +38 -0
  249. package/dist/api/cloud/client.js.map +1 -0
  250. package/dist/api/cloud/conversation-service.api.cjs +1 -1
  251. package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
  252. package/dist/api/cloud/conversation-service.api.js +33 -31
  253. package/dist/api/cloud/conversation-service.api.js.map +1 -1
  254. package/dist/api/cloud/organization-service.api.cjs +1 -1
  255. package/dist/api/cloud/organization-service.api.cjs.map +1 -1
  256. package/dist/api/cloud/organization-service.api.js +11 -10
  257. package/dist/api/cloud/organization-service.api.js.map +1 -1
  258. package/dist/api/cloud/proxy.cjs +1 -1
  259. package/dist/api/cloud/proxy.cjs.map +1 -1
  260. package/dist/api/cloud/proxy.d.ts +2 -40
  261. package/dist/api/cloud/proxy.js +14 -39
  262. package/dist/api/cloud/proxy.js.map +1 -1
  263. package/dist/api/conversation-metadata-store.cjs +1 -1
  264. package/dist/api/conversation-metadata-store.cjs.map +1 -1
  265. package/dist/api/conversation-metadata-store.d.ts +2 -9
  266. package/dist/api/conversation-metadata-store.js +13 -9
  267. package/dist/api/conversation-metadata-store.js.map +1 -1
  268. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  269. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  270. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +2 -1
  271. package/dist/api/conversation-service/agent-server-conversation-service.api.js +98 -88
  272. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  273. package/dist/api/conversation-service/agent-server-conversation-service.types.d.ts +5 -0
  274. package/dist/api/device-flow-client.cjs +1 -1
  275. package/dist/api/device-flow-client.cjs.map +1 -1
  276. package/dist/api/device-flow-client.d.ts +4 -58
  277. package/dist/api/device-flow-client.js +8 -98
  278. package/dist/api/device-flow-client.js.map +1 -1
  279. package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
  280. package/dist/api/git-service/agent-server-git-service.api.cjs.map +1 -1
  281. package/dist/api/git-service/agent-server-git-service.api.d.ts +10 -2
  282. package/dist/api/git-service/agent-server-git-service.api.js +107 -40
  283. package/dist/api/git-service/agent-server-git-service.api.js.map +1 -1
  284. package/dist/api/open-hands.types.d.ts +11 -0
  285. package/dist/api/secrets-service.cjs +1 -1
  286. package/dist/api/secrets-service.cjs.map +1 -1
  287. package/dist/api/secrets-service.js +15 -14
  288. package/dist/api/secrets-service.js.map +1 -1
  289. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
  290. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
  291. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +73 -64
  292. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
  293. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.cjs +2 -2
  294. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.cjs.map +1 -1
  295. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.js +2 -0
  296. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.js.map +1 -1
  297. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  298. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  299. package/dist/components/features/backends/backend-form-modal.d.ts +4 -2
  300. package/dist/components/features/backends/backend-form-modal.js +202 -188
  301. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  302. package/dist/components/features/backends/backend-row.cjs +1 -1
  303. package/dist/components/features/backends/backend-row.cjs.map +1 -1
  304. package/dist/components/features/backends/backend-row.js +2 -1
  305. package/dist/components/features/backends/backend-row.js.map +1 -1
  306. package/dist/components/features/backends/backend-selector.cjs +1 -1
  307. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  308. package/dist/components/features/backends/backend-selector.js +51 -51
  309. package/dist/components/features/backends/backend-selector.js.map +1 -1
  310. package/dist/components/features/backends/device-flow-auth.cjs +1 -1
  311. package/dist/components/features/backends/device-flow-auth.cjs.map +1 -1
  312. package/dist/components/features/backends/device-flow-auth.d.ts +4 -1
  313. package/dist/components/features/backends/device-flow-auth.js +38 -38
  314. package/dist/components/features/backends/device-flow-auth.js.map +1 -1
  315. package/dist/components/features/chat/chat-interface.cjs +2 -2
  316. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  317. package/dist/components/features/chat/chat-interface.js +173 -165
  318. package/dist/components/features/chat/chat-interface.js.map +1 -1
  319. package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
  320. package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
  321. package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
  322. package/dist/components/features/chat/components/chat-input-actions.js +44 -43
  323. package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
  324. package/dist/components/features/chat/components/chat-input-container.cjs +1 -1
  325. package/dist/components/features/chat/components/chat-input-container.cjs.map +1 -1
  326. package/dist/components/features/chat/components/chat-input-container.d.ts +2 -1
  327. package/dist/components/features/chat/components/chat-input-container.js +20 -19
  328. package/dist/components/features/chat/components/chat-input-container.js.map +1 -1
  329. package/dist/components/features/chat/components/chat-input-profile-picker.cjs +1 -1
  330. package/dist/components/features/chat/components/chat-input-profile-picker.cjs.map +1 -1
  331. package/dist/components/features/chat/components/chat-input-profile-picker.js +44 -32
  332. package/dist/components/features/chat/components/chat-input-profile-picker.js.map +1 -1
  333. package/dist/components/features/chat/components/resolve-picker-kind.cjs +1 -1
  334. package/dist/components/features/chat/components/resolve-picker-kind.cjs.map +1 -1
  335. package/dist/components/features/chat/components/resolve-picker-kind.d.ts +10 -22
  336. package/dist/components/features/chat/components/resolve-picker-kind.js +6 -3
  337. package/dist/components/features/chat/components/resolve-picker-kind.js.map +1 -1
  338. package/dist/components/features/chat/custom-chat-input.cjs +1 -1
  339. package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
  340. package/dist/components/features/chat/custom-chat-input.d.ts +2 -1
  341. package/dist/components/features/chat/custom-chat-input.js +52 -51
  342. package/dist/components/features/chat/custom-chat-input.js.map +1 -1
  343. package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
  344. package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
  345. package/dist/components/features/chat/interactive-chat-box.d.ts +2 -1
  346. package/dist/components/features/chat/interactive-chat-box.js +9 -8
  347. package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
  348. package/dist/components/features/diff-viewer/commit-list.cjs +2 -0
  349. package/dist/components/features/diff-viewer/commit-list.cjs.map +1 -0
  350. package/dist/components/features/diff-viewer/commit-list.d.ts +13 -0
  351. package/dist/components/features/diff-viewer/commit-list.js +27 -0
  352. package/dist/components/features/diff-viewer/commit-list.js.map +1 -0
  353. package/dist/components/features/diff-viewer/commit-row.cjs +2 -0
  354. package/dist/components/features/diff-viewer/commit-row.cjs.map +1 -0
  355. package/dist/components/features/diff-viewer/commit-row.d.ts +14 -0
  356. package/dist/components/features/diff-viewer/commit-row.js +59 -0
  357. package/dist/components/features/diff-viewer/commit-row.js.map +1 -0
  358. package/dist/components/features/diff-viewer/file-diff-viewer.cjs +1 -1
  359. package/dist/components/features/diff-viewer/file-diff-viewer.cjs.map +1 -1
  360. package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +7 -1
  361. package/dist/components/features/diff-viewer/file-diff-viewer.js +40 -39
  362. package/dist/components/features/diff-viewer/file-diff-viewer.js.map +1 -1
  363. package/dist/components/features/plugins/plugin-detail-modal.d.ts +2 -1
  364. package/dist/components/shared/modals/settings/settings-modal.cjs +1 -1
  365. package/dist/components/shared/modals/settings/settings-modal.cjs.map +1 -1
  366. package/dist/components/shared/modals/settings/settings-modal.js +23 -22
  367. package/dist/components/shared/modals/settings/settings-modal.js.map +1 -1
  368. package/dist/config/defaults.cjs +1 -1
  369. package/dist/config/defaults.cjs.map +1 -1
  370. package/dist/config/defaults.js +5 -4
  371. package/dist/config/defaults.js.map +1 -1
  372. package/dist/constants/acp-providers.cjs.map +1 -1
  373. package/dist/constants/acp-providers.d.ts +1 -1
  374. package/dist/constants/acp-providers.js.map +1 -1
  375. package/dist/constants/canvas-ui.cjs +2 -0
  376. package/dist/constants/canvas-ui.cjs.map +1 -0
  377. package/dist/constants/canvas-ui.d.ts +8 -0
  378. package/dist/constants/canvas-ui.js +6 -0
  379. package/dist/constants/canvas-ui.js.map +1 -0
  380. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  381. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  382. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  383. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  384. package/dist/hooks/mutation/use-create-conversation.d.ts +2 -1
  385. package/dist/hooks/mutation/use-create-conversation.js +52 -52
  386. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  387. package/dist/hooks/query/query-keys.cjs +1 -1
  388. package/dist/hooks/query/query-keys.cjs.map +1 -1
  389. package/dist/hooks/query/query-keys.d.ts +2 -0
  390. package/dist/hooks/query/query-keys.js +4 -1
  391. package/dist/hooks/query/query-keys.js.map +1 -1
  392. package/dist/hooks/query/use-backends-health.cjs +1 -1
  393. package/dist/hooks/query/use-backends-health.cjs.map +1 -1
  394. package/dist/hooks/query/use-backends-health.js +50 -48
  395. package/dist/hooks/query/use-backends-health.js.map +1 -1
  396. package/dist/hooks/query/use-cloud-organizations.cjs +1 -1
  397. package/dist/hooks/query/use-cloud-organizations.cjs.map +1 -1
  398. package/dist/hooks/query/use-cloud-organizations.d.ts +1 -0
  399. package/dist/hooks/query/use-cloud-organizations.js +5 -2
  400. package/dist/hooks/query/use-cloud-organizations.js.map +1 -1
  401. package/dist/hooks/query/use-commit-changes.cjs +2 -0
  402. package/dist/hooks/query/use-commit-changes.cjs.map +1 -0
  403. package/dist/hooks/query/use-commit-changes.d.ts +5 -0
  404. package/dist/hooks/query/use-commit-changes.js +34 -0
  405. package/dist/hooks/query/use-commit-changes.js.map +1 -0
  406. package/dist/hooks/query/use-task-polling.cjs +1 -1
  407. package/dist/hooks/query/use-task-polling.cjs.map +1 -1
  408. package/dist/hooks/query/use-task-polling.d.ts +3 -2
  409. package/dist/hooks/query/use-task-polling.js +53 -40
  410. package/dist/hooks/query/use-task-polling.js.map +1 -1
  411. package/dist/hooks/query/use-unified-git-commits.cjs +2 -0
  412. package/dist/hooks/query/use-unified-git-commits.cjs.map +1 -0
  413. package/dist/hooks/query/use-unified-git-commits.d.ts +10 -0
  414. package/dist/hooks/query/use-unified-git-commits.js +41 -0
  415. package/dist/hooks/query/use-unified-git-commits.js.map +1 -0
  416. package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
  417. package/dist/hooks/query/use-unified-git-diff.cjs.map +1 -1
  418. package/dist/hooks/query/use-unified-git-diff.d.ts +5 -0
  419. package/dist/hooks/query/use-unified-git-diff.js +11 -4
  420. package/dist/hooks/query/use-unified-git-diff.js.map +1 -1
  421. package/dist/hooks/use-acp-model-context.cjs +1 -1
  422. package/dist/hooks/use-acp-model-context.cjs.map +1 -1
  423. package/dist/hooks/use-acp-model-context.d.ts +4 -1
  424. package/dist/hooks/use-acp-model-context.js +9 -8
  425. package/dist/hooks/use-acp-model-context.js.map +1 -1
  426. package/dist/hooks/use-auto-refresh-files-on-edit.cjs +1 -1
  427. package/dist/hooks/use-auto-refresh-files-on-edit.cjs.map +1 -1
  428. package/dist/hooks/use-auto-refresh-files-on-edit.js +1 -1
  429. package/dist/hooks/use-auto-refresh-files-on-edit.js.map +1 -1
  430. package/dist/hooks/use-chat-input-model-state.cjs.map +1 -1
  431. package/dist/hooks/use-chat-input-model-state.d.ts +2 -1
  432. package/dist/hooks/use-chat-input-model-state.js.map +1 -1
  433. package/dist/hooks/use-chat-input-profile-state.cjs +1 -1
  434. package/dist/hooks/use-chat-input-profile-state.cjs.map +1 -1
  435. package/dist/hooks/use-chat-input-profile-state.d.ts +1 -10
  436. package/dist/hooks/use-chat-input-profile-state.js +42 -15
  437. package/dist/hooks/use-chat-input-profile-state.js.map +1 -1
  438. package/dist/hooks/use-device-flow.cjs +1 -1
  439. package/dist/hooks/use-device-flow.cjs.map +1 -1
  440. package/dist/hooks/use-device-flow.d.ts +4 -1
  441. package/dist/hooks/use-device-flow.js +42 -40
  442. package/dist/hooks/use-device-flow.js.map +1 -1
  443. package/dist/hooks/use-tracking.cjs.map +1 -1
  444. package/dist/hooks/use-tracking.d.ts +2 -1
  445. package/dist/hooks/use-tracking.js.map +1 -1
  446. package/dist/i18n/declaration.cjs +1 -1
  447. package/dist/i18n/declaration.cjs.map +1 -1
  448. package/dist/i18n/declaration.d.ts +9 -0
  449. package/dist/i18n/declaration.js +1 -1
  450. package/dist/i18n/declaration.js.map +1 -1
  451. package/dist/i18n/index.cjs +1 -1
  452. package/dist/i18n/index.cjs.map +1 -1
  453. package/dist/i18n/index.js +19 -18
  454. package/dist/i18n/index.js.map +1 -1
  455. package/dist/i18n/translation.cjs +2 -2
  456. package/dist/i18n/translation.cjs.map +1 -1
  457. package/dist/i18n/translation.js +153 -0
  458. package/dist/i18n/translation.js.map +1 -1
  459. package/dist/index.cjs +1 -1
  460. package/dist/index.js +32 -32
  461. package/dist/lib/index.cjs +1 -1
  462. package/dist/lib/index.js +1 -1
  463. package/dist/locales/ar/openhands.json +9 -0
  464. package/dist/locales/ca/openhands.json +9 -0
  465. package/dist/locales/de/openhands.json +9 -0
  466. package/dist/locales/en/openhands.json +9 -0
  467. package/dist/locales/es/openhands.json +9 -0
  468. package/dist/locales/fr/openhands.json +9 -0
  469. package/dist/locales/it/openhands.json +9 -0
  470. package/dist/locales/ja/openhands.json +9 -0
  471. package/dist/locales/ko-KR/openhands.json +9 -0
  472. package/dist/locales/no/openhands.json +9 -0
  473. package/dist/locales/pt/openhands.json +9 -0
  474. package/dist/locales/tr/openhands.json +9 -0
  475. package/dist/locales/uk/openhands.json +9 -0
  476. package/dist/locales/zh-CN/openhands.json +9 -0
  477. package/dist/locales/zh-TW/openhands.json +9 -0
  478. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.cjs +2 -0
  479. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.cjs.map +1 -0
  480. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.js +351 -0
  481. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.js.map +1 -0
  482. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.cjs +2 -0
  483. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.cjs.map +1 -0
  484. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.js +106 -0
  485. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.js.map +1 -0
  486. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +2 -0
  487. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -0
  488. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +69 -0
  489. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -0
  490. package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -1
  491. package/dist/node_modules/@openhands/typescript-client/dist/clients.js +3 -0
  492. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
  493. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
  494. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +18 -2
  495. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
  496. package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs.map +1 -1
  497. package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js.map +1 -1
  498. package/dist/node_modules/axios/index.cjs +1 -1
  499. package/dist/node_modules/axios/index.js +1 -1
  500. package/dist/package.cjs +1 -1
  501. package/dist/package.cjs.map +1 -1
  502. package/dist/package.js +2 -2
  503. package/dist/package.js.map +1 -1
  504. package/dist/routes/app-settings.cjs +1 -1
  505. package/dist/routes/app-settings.cjs.map +1 -1
  506. package/dist/routes/app-settings.js +67 -66
  507. package/dist/routes/app-settings.js.map +1 -1
  508. package/dist/routes/commits-tab.cjs +2 -0
  509. package/dist/routes/commits-tab.cjs.map +1 -0
  510. package/dist/routes/commits-tab.d.ts +8 -0
  511. package/dist/routes/commits-tab.js +45 -0
  512. package/dist/routes/commits-tab.js.map +1 -0
  513. package/dist/routes/files-tab.cjs +1 -1
  514. package/dist/routes/files-tab.cjs.map +1 -1
  515. package/dist/routes/files-tab.js +148 -127
  516. package/dist/routes/files-tab.js.map +1 -1
  517. package/dist/services/cloud-funnel-analytics.cjs +2 -0
  518. package/dist/services/cloud-funnel-analytics.cjs.map +1 -0
  519. package/dist/services/cloud-funnel-analytics.d.ts +12 -0
  520. package/dist/services/cloud-funnel-analytics.js +53 -0
  521. package/dist/services/cloud-funnel-analytics.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.js +49 -47
  525. package/dist/services/telemetry.js.map +1 -1
  526. package/dist/types/agent-server/core/base/action.d.ts +5 -4
  527. package/dist/types/agent-server/core/base/base.d.ts +3 -2
  528. package/dist/types/agent-server/core/base/observation.d.ts +1 -1
  529. package/dist/types/agent-server/type-guards.cjs +1 -1
  530. package/dist/types/agent-server/type-guards.cjs.map +1 -1
  531. package/dist/types/agent-server/type-guards.d.ts +3 -5
  532. package/dist/types/agent-server/type-guards.js +2 -1
  533. package/dist/types/agent-server/type-guards.js.map +1 -1
  534. package/dist/types/automation.d.ts +5 -0
  535. package/dist/utils/api-error-message.d.ts +11 -0
  536. package/dist/utils/automation-timeout.d.ts +19 -0
  537. package/dist/utils/base-path.cjs +2 -0
  538. package/dist/utils/base-path.cjs.map +1 -0
  539. package/dist/utils/base-path.d.ts +2 -0
  540. package/dist/utils/base-path.js +23 -0
  541. package/dist/utils/base-path.js.map +1 -0
  542. package/package.json +2 -2
  543. package/scripts/check-sdk-version-sync.mjs +6 -6
  544. package/scripts/dev-safe.mjs +7 -8
  545. package/scripts/dev-static.mjs +3 -0
  546. package/scripts/dev-with-automation.mjs +3 -0
  547. package/scripts/docker-build.mjs +4 -0
  548. package/scripts/static-server.mjs +93 -7
  549. package/tools/canvas_ui_tool.py +14 -8
  550. package/build/assets/active-backend-context-hxq31W25.js +0 -1
  551. package/build/assets/agent-server-client-options-DVLRd9sw.js +0 -1
  552. package/build/assets/agent-server-conversation-service.api-CuSdr4Qb.js +0 -5
  553. package/build/assets/agent-settings-D_yOy8XB.js +0 -1
  554. package/build/assets/api-key-entry-screen-Dl0qVYi4.js +0 -1
  555. package/build/assets/app-settings-yVizGXox.js +0 -1
  556. package/build/assets/automation-detail-dvJfLs5u.js +0 -2
  557. package/build/assets/automation-export-BPcgLqPD.js +0 -2
  558. package/build/assets/automations-list-CUXogTe0.js +0 -1
  559. package/build/assets/backend-form-modal-CQJGmItq.js +0 -1
  560. package/build/assets/browser-store-BI6uklCG.js +0 -1
  561. package/build/assets/check-Bvi71siz.js +0 -1
  562. package/build/assets/condenser-settings-Ca8fYZ_Z.js +0 -1
  563. package/build/assets/conversation-9NBSRoR9.js +0 -1
  564. package/build/assets/conversation-BXg6Oti2.js +0 -89
  565. package/build/assets/conversation-panel-CZri9Rup.js +0 -1
  566. package/build/assets/conversation-service.api-DPBQvTKD.js +0 -1
  567. package/build/assets/conversation-state-store-B2Bp32XI.js +0 -1
  568. package/build/assets/declaration-gq8V5eTU.js +0 -1
  569. package/build/assets/files-tab-UVoray88.js +0 -1
  570. package/build/assets/git-provider-icon-o6hdnJUB.js +0 -1
  571. package/build/assets/home-D1IHvGTN.js +0 -1
  572. package/build/assets/index-redirect-CUUJiNki.js +0 -1
  573. package/build/assets/install-server-modal-BbuQaA2w.js +0 -1
  574. package/build/assets/lesson-plan-jC0HBoe6.js +0 -4
  575. package/build/assets/llm-not-configured-banner-DoARbcdL.js +0 -27
  576. package/build/assets/llm-settings-4JMLV8mq.js +0 -1
  577. package/build/assets/llm-settings-D91gMw3U.js +0 -1
  578. package/build/assets/llm-subscription-service-CKyaV24y.js +0 -1
  579. package/build/assets/loader-circle-BEykUKYG.js +0 -1
  580. package/build/assets/manage-backends-modal-DkWAMSle.js +0 -1
  581. package/build/assets/manifest-aa5c29f6.js +0 -1
  582. package/build/assets/model-selector-BfqpMkSJ.js +0 -1
  583. package/build/assets/mouse-pointer-click-PdEQPL6v.js +0 -1
  584. package/build/assets/onboarding-Bu-HN1ze.js +0 -1
  585. package/build/assets/onboarding-modal-CZgjs5Bx.js +0 -1
  586. package/build/assets/option-service.api-BrZ5q87N.js +0 -1
  587. package/build/assets/organization-service.api-Bk4pCGU1.js +0 -1
  588. package/build/assets/path-utils-CSmuZoix.js +0 -1
  589. package/build/assets/plugins-management-service-BRBLxvUl.js +0 -1
  590. package/build/assets/profiles-service.api-BMXQ9pZC.js +0 -1
  591. package/build/assets/providers-BpO967xS.js +0 -1
  592. package/build/assets/proxy-BgJLtxu7.js +0 -1
  593. package/build/assets/root-BM5WgQ4_.js +0 -2
  594. package/build/assets/root-V8fkplMy.css +0 -1
  595. package/build/assets/root-layout-BdoyoobY.js +0 -2
  596. package/build/assets/schema-field-BSHrUMme.js +0 -1
  597. package/build/assets/sdk-section-page-t82gsOqa.js +0 -1
  598. package/build/assets/search-4DHskuhE.js +0 -1
  599. package/build/assets/secrets-service-B2GqPV0N.js +0 -1
  600. package/build/assets/settings-DmPLkgq0.js +0 -1
  601. package/build/assets/settings-modal-CwrZKrTq.js +0 -1
  602. package/build/assets/settings-service.api-Ce-ub11I.js +0 -1
  603. package/build/assets/shared-conversation-BDREQPnE.js +0 -1
  604. package/build/assets/skills-plugins-2Y44YHbO.js +0 -1
  605. package/build/assets/use-acp-credential-form-MzZM6D7D.js +0 -1
  606. package/build/assets/use-agent-profiles-DwZxnwO5.js +0 -1
  607. package/build/assets/use-backends-health-CRHzuvxO.js +0 -1
  608. package/build/assets/use-cloud-current-user-id-utFreJ0i.js +0 -1
  609. package/build/assets/use-config-mJrtZHP1.js +0 -1
  610. package/build/assets/use-create-conversation-DdqsP78F.js +0 -1
  611. package/build/assets/use-is-authed-B6M0mcGL.js +0 -1
  612. package/build/assets/use-llm-profiles-RC-PkpBl.js +0 -1
  613. package/build/assets/use-plugins-marketplace-FHlbeQ4c.js +0 -1
  614. package/build/assets/use-runtime-is-ready-RKj2WmEh.js +0 -1
  615. package/build/assets/use-save-agent-profile-tvDP15mh.js +0 -1
  616. package/build/assets/use-settings-CH5LzXD8.js +0 -1
  617. package/build/assets/use-settings-nav-items-Dwktv8wo.js +0 -16
  618. package/build/assets/use-skills-CSzSL6HG.js +0 -1
  619. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~lf310vj7-CSVPGId3.js +0 -10
  620. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nfpll1wp-BCpa95De.js +0 -177
  621. package/build/assets/vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CqXiHwjU.js +0 -2
  622. package/build/assets/x-Cb0WAtak.js +0 -1
  623. /package/build/assets/{__vite-browser-external-4xJsU2-u.js → __vite-browser-external-DU-Cb_sT.js} +0 -0
  624. /package/build/assets/{automation-BU8zu-FP.js → automation-BVEmGghX.js} +0 -0
  625. /package/build/assets/{checkmark-h7udgXMM.js → checkmark-DhcMGwtO.js} +0 -0
  626. /package/build/assets/{close-p3Op5lxI.js → close-DO5Rq_CS.js} +0 -0
  627. /package/build/assets/{code-tag-DYlAhEQY.js → code-tag-BvjtzUsr.js} +0 -0
  628. /package/build/assets/{color-themes-DPBzNtVg.js → color-themes-bVMmJJG6.js} +0 -0
  629. /package/build/assets/{common-Dh7OqABE.js → common-CxbUL3nR.js} +0 -0
  630. /package/build/assets/{conversation-local-storage-F6zVMM--.js → conversation-local-storage-B31voBg7.js} +0 -0
  631. /package/build/assets/{copy-BLmGeJcd.js → copy-DLUw2us-.js} +0 -0
  632. /package/build/assets/{createLucideIcon-CVAsW2Yo.js → createLucideIcon-D4Tak8A1.js} +0 -0
  633. /package/build/assets/{dist-CodhvuAP.js → dist-Dj01FXbZ.js} +0 -0
  634. /package/build/assets/{environment-switch-store-DkjlKWzN.js → environment-switch-store-D9hB9PvY.js} +0 -0
  635. /package/build/assets/{extension-module-card-classes-9V3J9J_b.js → extension-module-card-classes-BlO4w702.js} +0 -0
  636. /package/build/assets/{folder-mMWFvaw0.js → folder-ynxP2EIL.js} +0 -0
  637. /package/build/assets/{get-language-from-path-CPNnuVhI.js → get-language-from-path-rWEQrOGU.js} +0 -0
  638. /package/build/assets/{git-status-mapper-BI8FyUVp.js → git-status-mapper-C3rfzUex.js} +0 -0
  639. /package/build/assets/{handle-capture-consent-CPMXU29K.js → handle-capture-consent-DDnXMC9Y.js} +0 -0
  640. /package/build/assets/{iconBase-DaTRRUjy.js → iconBase-CuvxAQZ5.js} +0 -0
  641. /package/build/assets/{link-external-DfKQroKX.js → link-external-BVDiJfZt.js} +0 -0
  642. /package/build/assets/{llm-subscription-DtsX5Lhg.js → llm-subscription-BkdHwtQe.js} +0 -0
  643. /package/build/assets/{map-provider-BM2SJarp.js → map-provider-XSFHmdDs.js} +0 -0
  644. /package/build/assets/{middleware-DYHYNAnP.js → middleware-CWYDMVuG.js} +0 -0
  645. /package/build/assets/{modal-backdrop-zVwfOJZr.js → modal-backdrop-Dsmzgr5s.js} +0 -0
  646. /package/build/assets/{navigation-context-DPs2G0X8.js → navigation-context-SjzfpygH.js} +0 -0
  647. /package/build/assets/{objectWithoutPropertiesLoose-BgYIAs2y.js → objectWithoutPropertiesLoose-CQwg6tC0.js} +0 -0
  648. /package/build/assets/{openhands-logo-bcNw5bkY.js → openhands-logo-C-gDp1wr.js} +0 -0
  649. /package/build/assets/{react-DPDgL6du.js → react-ao3tWj6K.js} +0 -0
  650. /package/build/assets/{search-BsjCEFNf.js → search-pb4UKTfK.js} +0 -0
  651. /package/build/assets/{settings-mQUckT0g.js → settings-DksoDv5z.js} +0 -0
  652. /package/build/assets/{settings-gear-MXCyZW0x.js → settings-gear-D_HVvE5L.js} +0 -0
  653. /package/build/assets/{settings-like-page-layout-classes-DENKlZpD.js → settings-like-page-layout-classes-DLrsPCaI.js} +0 -0
  654. /package/build/assets/{settings-section-header-context-COMOIaxV.js → settings-section-header-context-C2MUIG88.js} +0 -0
  655. /package/build/assets/{skills-9cDZONKh.js → skills-CH4xgIh-.js} +0 -0
  656. /package/build/assets/{switch-skeleton-DqQwalyu.js → switch-skeleton-BpSOvZ-n.js} +0 -0
  657. /package/build/assets/{terminal-BuLtIrb9.js → terminal-Dokfkxn0.js} +0 -0
  658. /package/build/assets/{u-check-circle-BqoIxNz_.js → u-check-circle-DPWVO-9N.js} +0 -0
  659. /package/build/assets/{u-check-circle-half-LiwZkuFe.js → u-check-circle-half-BGNAAjOW.js} +0 -0
  660. /package/build/assets/{u-edit-DJ90xc8Z.js → u-edit-BIskOoEG.js} +0 -0
  661. /package/build/assets/{use-breakpoint-B-O0lQ84.js → use-breakpoint-OjLm94cF.js} +0 -0
  662. /package/build/assets/{use-click-outside-element-Bf4Omzot.js → use-click-outside-element-Jpt2WWd7.js} +0 -0
  663. /package/build/assets/{use-onboarding-completion-C_Swglzp.js → use-onboarding-completion-DkRpDTsD.js} +0 -0
  664. /package/build/assets/{v4-DbCkTSoU.js → v4-DPgam_jW.js} +0 -0
  665. /package/build/assets/{vendor~browser-Dqd33JyP.js → vendor~browser-BvEKaLBz.js} +0 -0
  666. /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js → vendor~conversation-panel~conversation~alert-banner-CznX01nZ.js} +0 -0
  667. /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~epa72zsm-B4rXs7Zd.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js} +0 -0
  668. /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~ivvrgjsa-BlIZPCXX.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g9hift2g-DmmpG9SI.js} +0 -0
  669. /package/build/assets/{vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js} +0 -0
  670. /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DTzw2x50.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BuL5kjfS.js} +0 -0
  671. /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-rV6d1Iv_.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DUYl8gbZ.js} +0 -0
  672. /package/build/assets/{vendor~root-layout~home~mcp~automations-list~onboarding-modal-CXyYYvYh.js → vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-pIgQDxTc.js} +0 -0
  673. /package/build/assets/{vendor~terminal-aeP3PnKf.js → vendor~terminal-jAaNQWS9.js} +0 -0
  674. /package/build/assets/{x-mark-Batp6gXa.js → x-mark-C5przfXl.js} +0 -0
@@ -72,103 +72,104 @@ var x = [
72
72
  }
73
73
  });
74
74
  };
75
- function T({ path: c, type: l }) {
76
- let { t: u } = e("openhands"), [d, f] = v.useState(!0), [p, T] = v.useState(400), [E, D] = v.useState("diff"), O = v.useRef(null), k = v.useRef(null), A = l === "A" || l === "U", j = l === "D", M = v.useMemo(() => {
75
+ function T({ path: c, type: l, commit: u }) {
76
+ let { t: d } = e("openhands"), [f, p] = v.useState(!0), [T, E] = v.useState(400), [D, O] = v.useState("diff"), k = v.useRef(null), A = v.useRef(null), j = l === "A" || l === "U", M = l === "D", N = v.useMemo(() => {
77
77
  if (l === "R") {
78
78
  let e = c.split(/\s+/).slice(1);
79
79
  return e[e.length - 1];
80
80
  }
81
81
  return c;
82
- }, [c, l]), { data: N, isLoading: P, isSuccess: F, isRefetching: I } = h({
83
- filePath: M,
82
+ }, [c, l]), { data: P, isLoading: F, isSuccess: I, isRefetching: L } = h({
83
+ filePath: N,
84
84
  type: l,
85
- enabled: !d
86
- }), L = v.useCallback(() => {
87
- if (!O.current) return;
88
- let e = O.current.getOriginalEditor(), t = O.current.getModifiedEditor();
89
- e && t && T(Math.max(e.getContentHeight(), t.getContentHeight()) + 20);
90
- }, []), R = v.useCallback(() => {
91
- k.current && T(k.current.getContentHeight() + 20);
92
- }, []), z = (e) => {
93
- O.current = e, L(), e.getOriginalEditor().onDidContentSizeChange(L), e.getModifiedEditor().onDidContentSizeChange(L);
94
- }, B = (e) => {
95
- k.current = e, R(), e.onDidContentSizeChange(R);
96
- }, V = (l === "U" ? C.A : C[l]) || "?", H = typeof V == "string" ? /* @__PURE__ */ y(i.Text, { children: V }) : v.createElement(V, { className: "w-5 h-5" }), U = P || I, W = a(M), G = W === "markdown", K = E === "old" ? N?.original ?? "" : N?.modified ?? "";
85
+ enabled: !f,
86
+ commit: u
87
+ }), R = v.useCallback(() => {
88
+ if (!k.current) return;
89
+ let e = k.current.getOriginalEditor(), t = k.current.getModifiedEditor();
90
+ e && t && E(Math.max(e.getContentHeight(), t.getContentHeight()) + 20);
91
+ }, []), z = v.useCallback(() => {
92
+ A.current && E(A.current.getContentHeight() + 20);
93
+ }, []), B = (e) => {
94
+ k.current = e, R(), e.getOriginalEditor().onDidContentSizeChange(R), e.getModifiedEditor().onDidContentSizeChange(R);
95
+ }, V = (e) => {
96
+ A.current = e, z(), e.onDidContentSizeChange(z);
97
+ }, H = (l === "U" ? C.A : C[l]) || "?", U = typeof H == "string" ? /* @__PURE__ */ y(i.Text, { children: H }) : v.createElement(H, { className: "w-5 h-5" }), W = F || L, G = a(N), K = G === "markdown", q = D === "old" ? P?.original ?? "" : P?.modified ?? "";
97
98
  return /* @__PURE__ */ b("div", {
98
99
  "data-testid": "file-diff-viewer-outer",
99
100
  className: "w-full flex flex-col",
100
101
  children: [
101
102
  /* @__PURE__ */ y("div", {
102
103
  className: "flex justify-between items-center px-3 py-2.5 border-b border-[var(--oh-border)] hover:cursor-pointer",
103
- onClick: () => f((e) => !e),
104
+ onClick: () => p((e) => !e),
104
105
  children: /* @__PURE__ */ b("span", {
105
106
  className: "text-sm w-full text-content flex items-center gap-2",
106
107
  children: [
107
- U ? /* @__PURE__ */ y(g, { className: "w-4 h-4" }) : H,
108
+ W ? /* @__PURE__ */ y(g, { className: "w-4 h-4" }) : U,
108
109
  /* @__PURE__ */ y("strong", {
109
110
  className: "w-full truncate font-medium",
110
- children: M
111
+ children: N
111
112
  }),
112
- !d && !j && /* @__PURE__ */ y("span", {
113
+ !f && !M && /* @__PURE__ */ y("span", {
113
114
  className: "flex items-center gap-0.5 shrink-0",
114
115
  onClick: (e) => e.stopPropagation(),
115
116
  children: x.map(({ mode: e, icon: t }) => /* @__PURE__ */ y("button", {
116
117
  "data-testid": `view-mode-${e}`,
117
118
  type: "button",
118
- "aria-pressed": E === e,
119
- onClick: () => D(e),
120
- className: n("p-1 rounded transition-colors cursor-pointer", E === e ? "bg-[var(--oh-interactive-hover)] text-white" : "text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-white"),
119
+ "aria-pressed": D === e,
120
+ onClick: () => O(e),
121
+ className: n("p-1 rounded transition-colors cursor-pointer", D === e ? "bg-[var(--oh-interactive-hover)] text-white" : "text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-white"),
121
122
  children: /* @__PURE__ */ y(t, { className: "w-4 h-4" })
122
123
  }, e))
123
124
  }),
124
125
  /* @__PURE__ */ y("button", {
125
126
  "data-testid": "collapse",
126
127
  type: "button",
127
- children: /* @__PURE__ */ y(m, { className: n("w-4 h-4 transition-transform", d && "transform rotate-180") })
128
+ children: /* @__PURE__ */ y(m, { className: n("w-4 h-4 transition-transform", f && "transform rotate-180") })
128
129
  })
129
130
  ]
130
131
  })
131
132
  }),
132
- !d && j && /* @__PURE__ */ y("div", {
133
+ !f && M && !u && /* @__PURE__ */ y("div", {
133
134
  "data-testid": "file-deleted-message",
134
135
  className: "w-full border-b border-[var(--oh-border)] p-4 bg-base text-[var(--oh-text-dim)] text-sm",
135
- children: u(t.DIFF_VIEWER$FILE_DELETED)
136
+ children: d(t.DIFF_VIEWER$FILE_DELETED)
136
137
  }),
137
- !d && !j && F && (E === "diff" ? /* @__PURE__ */ y(_, {
138
- height: p,
138
+ !f && (!M || !!u) && I && (D === "diff" ? /* @__PURE__ */ y(_, {
139
+ height: T,
139
140
  children: /* @__PURE__ */ y(s, {
140
141
  "data-testid": "file-diff-viewer",
141
142
  className: "w-full h-full",
142
- language: W,
143
- original: A ? "" : N?.original ?? "",
144
- modified: j ? "" : N?.modified ?? "",
143
+ language: G,
144
+ original: j ? "" : P?.original ?? "",
145
+ modified: M ? "" : P?.modified ?? "",
145
146
  theme: "custom-diff-theme",
146
- onMount: z,
147
+ onMount: B,
147
148
  beforeMount: w,
148
149
  options: {
149
150
  ...S,
150
- renderSideBySide: !A && !j,
151
+ renderSideBySide: !j && !M,
151
152
  hideUnchangedRegions: { enabled: !0 }
152
153
  }
153
154
  })
154
- }) : G ? /* @__PURE__ */ y("div", {
155
+ }) : K ? /* @__PURE__ */ y("div", {
155
156
  className: "w-full border-b border-[var(--oh-border)] overflow-auto p-4 bg-base prose prose-invert max-w-none",
156
157
  "data-testid": "markdown-preview",
157
158
  children: /* @__PURE__ */ y(r, {
158
- content: K,
159
+ content: q,
159
160
  includeStandard: !0,
160
161
  includeHeadings: !0
161
162
  })
162
163
  }) : /* @__PURE__ */ y(_, {
163
- height: p,
164
+ height: T,
164
165
  children: /* @__PURE__ */ y(o, {
165
166
  "data-testid": "file-single-viewer",
166
167
  className: "w-full h-full",
167
- language: W,
168
- value: K,
168
+ language: G,
169
+ value: q,
169
170
  theme: "custom-diff-theme",
170
171
  beforeMount: w,
171
- onMount: B,
172
+ onMount: V,
172
173
  options: S
173
174
  })
174
175
  }))
@@ -1 +1 @@
1
- {"version":3,"file":"file-diff-viewer.js","names":[],"sources":["../../../../src/components/features/diff-viewer/file-diff-viewer.tsx"],"sourcesContent":["import { DiffEditor, Editor, Monaco } from \"@monaco-editor/react\";\nimport React from \"react\";\nimport { editor as editor_t } from \"monaco-editor\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n LuFileDiff,\n LuFileMinus,\n LuFilePlus,\n LuHistory,\n LuGitCompareArrows,\n LuFileCheck,\n} from \"react-icons/lu\";\nimport { IconType } from \"react-icons/lib\";\nimport { GitChangeStatus } from \"#/api/open-hands.types\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { getLanguageFromPath } from \"#/utils/get-language-from-path\";\nimport { cn } from \"#/utils/utils\";\nimport ChevronUp from \"#/icons/chveron-up.svg?react\";\nimport { useUnifiedGitDiff } from \"#/hooks/query/use-unified-git-diff\";\nimport { MarkdownRenderer } from \"#/components/features/markdown/markdown-renderer\";\nimport { Typography } from \"#/ui/typography\";\nimport { LoadingSpinner } from \"./loading-spinner\";\nimport { EditorContainer } from \"./editor-container\";\n\ntype ViewMode = \"diff\" | \"old\" | \"new\";\n\nconst VIEW_MODES: { mode: ViewMode; icon: IconType }[] = [\n { mode: \"old\", icon: LuHistory },\n { mode: \"diff\", icon: LuGitCompareArrows },\n { mode: \"new\", icon: LuFileCheck },\n];\n\nconst SHARED_EDITOR_OPTIONS: editor_t.IEditorOptions = {\n renderValidationDecorations: \"off\",\n readOnly: true,\n scrollBeyondLastLine: false,\n minimap: { enabled: false },\n automaticLayout: true,\n scrollbar: { alwaysConsumeMouseWheel: false },\n};\n\nconst STATUS_MAP: Record<GitChangeStatus, string | IconType> = {\n A: LuFilePlus,\n D: LuFileMinus,\n M: LuFileDiff,\n R: \"Renamed\",\n U: \"Untracked\",\n};\n\nconst beforeMount = (monaco: Monaco) => {\n monaco.editor.defineTheme(\"custom-diff-theme\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n { token: \"comment\", foreground: \"6a9955\" },\n { token: \"keyword\", foreground: \"569cd6\" },\n { token: \"string\", foreground: \"ce9178\" },\n { token: \"number\", foreground: \"b5cea8\" },\n ],\n colors: {\n \"diffEditor.insertedTextBackground\": \"#014b01AA\",\n \"diffEditor.removedTextBackground\": \"#750000AA\",\n \"diffEditor.insertedLineBackground\": \"#003f00AA\",\n \"diffEditor.removedLineBackground\": \"#5a0000AA\",\n \"diffEditor.border\": \"var(--oh-border-subtle)\",\n \"editorUnnecessaryCode.border\": \"#00000000\",\n \"editorUnnecessaryCode.opacity\": \"rgba(0, 0, 0, 0.467)\",\n },\n });\n};\n\nexport interface FileDiffViewerProps {\n path: string;\n type: GitChangeStatus;\n}\n\nexport function FileDiffViewer({ path, type }: FileDiffViewerProps) {\n const { t } = useTranslation(\"openhands\");\n const [isCollapsed, setIsCollapsed] = React.useState(true);\n const [editorHeight, setEditorHeight] = React.useState(400);\n const [viewMode, setViewMode] = React.useState<ViewMode>(\"diff\");\n const diffEditorRef = React.useRef<editor_t.IStandaloneDiffEditor>(null);\n const singleEditorRef = React.useRef<editor_t.IStandaloneCodeEditor>(null);\n\n const isAdded = type === \"A\" || type === \"U\";\n const isDeleted = type === \"D\";\n\n const filePath = React.useMemo(() => {\n if (type === \"R\") {\n const parts = path.split(/\\s+/).slice(1);\n return parts[parts.length - 1];\n }\n return path;\n }, [path, type]);\n\n const {\n data: diff,\n isLoading,\n isSuccess,\n isRefetching,\n } = useUnifiedGitDiff({\n filePath,\n type,\n enabled: !isCollapsed,\n });\n\n const updateEditorHeight = React.useCallback(() => {\n if (!diffEditorRef.current) return;\n const originalEditor = diffEditorRef.current.getOriginalEditor();\n const modifiedEditor = diffEditorRef.current.getModifiedEditor();\n if (originalEditor && modifiedEditor) {\n setEditorHeight(\n Math.max(\n originalEditor.getContentHeight(),\n modifiedEditor.getContentHeight(),\n ) + 20,\n );\n }\n }, []);\n\n const updateSingleEditorHeight = React.useCallback(() => {\n if (singleEditorRef.current) {\n setEditorHeight(singleEditorRef.current.getContentHeight() + 20);\n }\n }, []);\n\n const handleDiffEditorMount = (editor: editor_t.IStandaloneDiffEditor) => {\n diffEditorRef.current = editor;\n updateEditorHeight();\n editor.getOriginalEditor().onDidContentSizeChange(updateEditorHeight);\n editor.getModifiedEditor().onDidContentSizeChange(updateEditorHeight);\n };\n\n const handleSingleEditorMount = (editor: editor_t.IStandaloneCodeEditor) => {\n singleEditorRef.current = editor;\n updateSingleEditorHeight();\n editor.onDidContentSizeChange(updateSingleEditorHeight);\n };\n\n const status = (type === \"U\" ? STATUS_MAP.A : STATUS_MAP[type]) || \"?\";\n const statusIcon =\n typeof status === \"string\" ? (\n <Typography.Text>{status}</Typography.Text>\n ) : (\n React.createElement(status, { className: \"w-5 h-5\" })\n );\n\n const isFetchingData = isLoading || isRefetching;\n const language = getLanguageFromPath(filePath);\n const isMarkdownFile = language === \"markdown\";\n const singleViewContent =\n viewMode === \"old\" ? (diff?.original ?? \"\") : (diff?.modified ?? \"\");\n\n const renderContent = () => {\n if (viewMode === \"diff\") {\n return (\n <EditorContainer height={editorHeight}>\n <DiffEditor\n data-testid=\"file-diff-viewer\"\n className=\"w-full h-full\"\n language={language}\n original={isAdded ? \"\" : (diff?.original ?? \"\")}\n modified={isDeleted ? \"\" : (diff?.modified ?? \"\")}\n theme=\"custom-diff-theme\"\n onMount={handleDiffEditorMount}\n beforeMount={beforeMount}\n options={{\n ...SHARED_EDITOR_OPTIONS,\n renderSideBySide: !isAdded && !isDeleted,\n hideUnchangedRegions: { enabled: true },\n }}\n />\n </EditorContainer>\n );\n }\n\n if (isMarkdownFile) {\n return (\n <div\n className=\"w-full border-b border-[var(--oh-border)] overflow-auto p-4 bg-base prose prose-invert max-w-none\"\n data-testid=\"markdown-preview\"\n >\n <MarkdownRenderer\n content={singleViewContent}\n includeStandard\n includeHeadings\n />\n </div>\n );\n }\n\n return (\n <EditorContainer height={editorHeight}>\n <Editor\n data-testid=\"file-single-viewer\"\n className=\"w-full h-full\"\n language={language}\n value={singleViewContent}\n theme=\"custom-diff-theme\"\n beforeMount={beforeMount}\n onMount={handleSingleEditorMount}\n options={SHARED_EDITOR_OPTIONS}\n />\n </EditorContainer>\n );\n };\n\n return (\n <div data-testid=\"file-diff-viewer-outer\" className=\"w-full flex flex-col\">\n <div\n className=\"flex justify-between items-center px-3 py-2.5 border-b border-[var(--oh-border)] hover:cursor-pointer\"\n onClick={() => setIsCollapsed((prev) => !prev)}\n >\n <span className=\"text-sm w-full text-content flex items-center gap-2\">\n {isFetchingData ? <LoadingSpinner className=\"w-4 h-4\" /> : statusIcon}\n <strong className=\"w-full truncate font-medium\">{filePath}</strong>\n {!isCollapsed && !isDeleted && (\n <span\n className=\"flex items-center gap-0.5 shrink-0\"\n onClick={(e) => e.stopPropagation()}\n >\n {VIEW_MODES.map(({ mode, icon: Icon }) => (\n <button\n key={mode}\n data-testid={`view-mode-${mode}`}\n type=\"button\"\n aria-pressed={viewMode === mode}\n onClick={() => setViewMode(mode)}\n className={cn(\n \"p-1 rounded transition-colors cursor-pointer\",\n viewMode === mode\n ? \"bg-[var(--oh-interactive-hover)] text-white\"\n : \"text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-white\",\n )}\n >\n <Icon className=\"w-4 h-4\" />\n </button>\n ))}\n </span>\n )}\n <button data-testid=\"collapse\" type=\"button\">\n <ChevronUp\n className={cn(\n \"w-4 h-4 transition-transform\",\n isCollapsed && \"transform rotate-180\",\n )}\n />\n </button>\n </span>\n </div>\n\n {!isCollapsed && isDeleted && (\n <div\n data-testid=\"file-deleted-message\"\n className=\"w-full border-b border-[var(--oh-border)] p-4 bg-base text-[var(--oh-text-dim)] text-sm\"\n >\n {t(I18nKey.DIFF_VIEWER$FILE_DELETED)}\n </div>\n )}\n\n {!isCollapsed && !isDeleted && isSuccess && renderContent()}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,IAAM,IAAmD;CACvD;EAAE,MAAM;EAAO,MAAM;EAAW;CAChC;EAAE,MAAM;EAAQ,MAAM;EAAoB;CAC1C;EAAE,MAAM;EAAO,MAAM;EAAa;CACnC,EAEK,IAAiD;CACrD,6BAA6B;CAC7B,UAAU;CACV,sBAAsB;CACtB,SAAS,EAAE,SAAS,IAAO;CAC3B,iBAAiB;CACjB,WAAW,EAAE,yBAAyB,IAAO;CAC9C,EAEK,IAAyD;CAC7D,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ,EAEK,KAAe,MAAmB;AACtC,GAAO,OAAO,YAAY,qBAAqB;EAC7C,MAAM;EACN,SAAS;EACT,OAAO;GACL;IAAE,OAAO;IAAW,YAAY;IAAU;GAC1C;IAAE,OAAO;IAAW,YAAY;IAAU;GAC1C;IAAE,OAAO;IAAU,YAAY;IAAU;GACzC;IAAE,OAAO;IAAU,YAAY;IAAU;GAC1C;EACD,QAAQ;GACN,qCAAqC;GACrC,oCAAoC;GACpC,qCAAqC;GACrC,oCAAoC;GACpC,qBAAqB;GACrB,gCAAgC;GAChC,iCAAiC;GAClC;EACF,CAAC;;AAQJ,SAAgB,EAAe,EAAE,SAAM,WAA6B;CAClE,IAAM,EAAE,SAAM,EAAe,YAAY,EACnC,CAAC,GAAa,KAAkB,EAAM,SAAS,GAAK,EACpD,CAAC,GAAc,KAAmB,EAAM,SAAS,IAAI,EACrD,CAAC,GAAU,KAAe,EAAM,SAAmB,OAAO,EAC1D,IAAgB,EAAM,OAAuC,KAAK,EAClE,IAAkB,EAAM,OAAuC,KAAK,EAEpE,IAAU,MAAS,OAAO,MAAS,KACnC,IAAY,MAAS,KAErB,IAAW,EAAM,cAAc;AACnC,MAAI,MAAS,KAAK;GAChB,IAAM,IAAQ,EAAK,MAAM,MAAM,CAAC,MAAM,EAAE;AACxC,UAAO,EAAM,EAAM,SAAS;;AAE9B,SAAO;IACN,CAAC,GAAM,EAAK,CAAC,EAEV,EACJ,MAAM,GACN,cACA,cACA,oBACE,EAAkB;EACpB;EACA;EACA,SAAS,CAAC;EACX,CAAC,EAEI,IAAqB,EAAM,kBAAkB;AACjD,MAAI,CAAC,EAAc,QAAS;EAC5B,IAAM,IAAiB,EAAc,QAAQ,mBAAmB,EAC1D,IAAiB,EAAc,QAAQ,mBAAmB;AAChE,EAAI,KAAkB,KACpB,EACE,KAAK,IACH,EAAe,kBAAkB,EACjC,EAAe,kBAAkB,CAClC,GAAG,GACL;IAEF,EAAE,CAAC,EAEA,IAA2B,EAAM,kBAAkB;AACvD,EAAI,EAAgB,WAClB,EAAgB,EAAgB,QAAQ,kBAAkB,GAAG,GAAG;IAEjE,EAAE,CAAC,EAEA,KAAyB,MAA2C;AAIxE,EAHA,EAAc,UAAU,GACxB,GAAoB,EACpB,EAAO,mBAAmB,CAAC,uBAAuB,EAAmB,EACrE,EAAO,mBAAmB,CAAC,uBAAuB,EAAmB;IAGjE,KAA2B,MAA2C;AAG1E,EAFA,EAAgB,UAAU,GAC1B,GAA0B,EAC1B,EAAO,uBAAuB,EAAyB;IAGnD,KAAU,MAAS,MAAM,EAAW,IAAI,EAAW,OAAU,KAC7D,IACJ,OAAO,KAAW,WAChB,kBAAC,EAAW,MAAZ,EAAA,UAAkB,GAAyB,CAAA,GAE3C,EAAM,cAAc,GAAQ,EAAE,WAAW,WAAW,CAAC,EAGnD,IAAiB,KAAa,GAC9B,IAAW,EAAoB,EAAS,EACxC,IAAiB,MAAa,YAC9B,IACJ,MAAa,QAAS,GAAM,YAAY,KAAO,GAAM,YAAY;AAwDnE,QACE,kBAAC,OAAD;EAAK,eAAY;EAAyB,WAAU;YAApD;GACE,kBAAC,OAAD;IACE,WAAU;IACV,eAAe,GAAgB,MAAS,CAAC,EAAK;cAE9C,kBAAC,QAAD;KAAM,WAAU;eAAhB;MACG,IAAiB,kBAAC,GAAD,EAAgB,WAAU,WAAY,CAAA,GAAG;MAC3D,kBAAC,UAAD;OAAQ,WAAU;iBAA+B;OAAkB,CAAA;MAClE,CAAC,KAAe,CAAC,KAChB,kBAAC,QAAD;OACE,WAAU;OACV,UAAU,MAAM,EAAE,iBAAiB;iBAElC,EAAW,KAAK,EAAE,SAAM,MAAM,QAC7B,kBAAC,UAAD;QAEE,eAAa,aAAa;QAC1B,MAAK;QACL,gBAAc,MAAa;QAC3B,eAAe,EAAY,EAAK;QAChC,WAAW,EACT,gDACA,MAAa,IACT,gDACA,iFACL;kBAED,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA;QACrB,EAbF,EAaE,CACT;OACG,CAAA;MAET,kBAAC,UAAD;OAAQ,eAAY;OAAW,MAAK;iBAClC,kBAAC,GAAD,EACE,WAAW,EACT,gCACA,KAAe,uBAChB,EACD,CAAA;OACK,CAAA;MACJ;;IACH,CAAA;GAEL,CAAC,KAAe,KACf,kBAAC,OAAD;IACE,eAAY;IACZ,WAAU;cAET,EAAE,EAAQ,yBAAyB;IAChC,CAAA;GAGP,CAAC,KAAe,CAAC,KAAa,MA1G7B,MAAa,SAEb,kBAAC,GAAD;IAAiB,QAAQ;cACvB,kBAAC,GAAD;KACE,eAAY;KACZ,WAAU;KACA;KACV,UAAU,IAAU,KAAM,GAAM,YAAY;KAC5C,UAAU,IAAY,KAAM,GAAM,YAAY;KAC9C,OAAM;KACN,SAAS;KACI;KACb,SAAS;MACP,GAAG;MACH,kBAAkB,CAAC,KAAW,CAAC;MAC/B,sBAAsB,EAAE,SAAS,IAAM;MACxC;KACD,CAAA;IACc,CAAA,GAIlB,IAEA,kBAAC,OAAD;IACE,WAAU;IACV,eAAY;cAEZ,kBAAC,GAAD;KACE,SAAS;KACT,iBAAA;KACA,iBAAA;KACA,CAAA;IACE,CAAA,GAKR,kBAAC,GAAD;IAAiB,QAAQ;cACvB,kBAAC,GAAD;KACE,eAAY;KACZ,WAAU;KACA;KACV,OAAO;KACP,OAAM;KACO;KACb,SAAS;KACT,SAAS;KACT,CAAA;IACc,CAAA;GA0Dd"}
1
+ {"version":3,"file":"file-diff-viewer.js","names":[],"sources":["../../../../src/components/features/diff-viewer/file-diff-viewer.tsx"],"sourcesContent":["import { DiffEditor, Editor, Monaco } from \"@monaco-editor/react\";\nimport React from \"react\";\nimport { editor as editor_t } from \"monaco-editor\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n LuFileDiff,\n LuFileMinus,\n LuFilePlus,\n LuHistory,\n LuGitCompareArrows,\n LuFileCheck,\n} from \"react-icons/lu\";\nimport { IconType } from \"react-icons/lib\";\nimport { GitChangeStatus } from \"#/api/open-hands.types\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { getLanguageFromPath } from \"#/utils/get-language-from-path\";\nimport { cn } from \"#/utils/utils\";\nimport ChevronUp from \"#/icons/chveron-up.svg?react\";\nimport { useUnifiedGitDiff } from \"#/hooks/query/use-unified-git-diff\";\nimport { MarkdownRenderer } from \"#/components/features/markdown/markdown-renderer\";\nimport { Typography } from \"#/ui/typography\";\nimport { LoadingSpinner } from \"./loading-spinner\";\nimport { EditorContainer } from \"./editor-container\";\n\ntype ViewMode = \"diff\" | \"old\" | \"new\";\n\nconst VIEW_MODES: { mode: ViewMode; icon: IconType }[] = [\n { mode: \"old\", icon: LuHistory },\n { mode: \"diff\", icon: LuGitCompareArrows },\n { mode: \"new\", icon: LuFileCheck },\n];\n\nconst SHARED_EDITOR_OPTIONS: editor_t.IEditorOptions = {\n renderValidationDecorations: \"off\",\n readOnly: true,\n scrollBeyondLastLine: false,\n minimap: { enabled: false },\n automaticLayout: true,\n scrollbar: { alwaysConsumeMouseWheel: false },\n};\n\nconst STATUS_MAP: Record<GitChangeStatus, string | IconType> = {\n A: LuFilePlus,\n D: LuFileMinus,\n M: LuFileDiff,\n R: \"Renamed\",\n U: \"Untracked\",\n};\n\nconst beforeMount = (monaco: Monaco) => {\n monaco.editor.defineTheme(\"custom-diff-theme\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n { token: \"comment\", foreground: \"6a9955\" },\n { token: \"keyword\", foreground: \"569cd6\" },\n { token: \"string\", foreground: \"ce9178\" },\n { token: \"number\", foreground: \"b5cea8\" },\n ],\n colors: {\n \"diffEditor.insertedTextBackground\": \"#014b01AA\",\n \"diffEditor.removedTextBackground\": \"#750000AA\",\n \"diffEditor.insertedLineBackground\": \"#003f00AA\",\n \"diffEditor.removedLineBackground\": \"#5a0000AA\",\n \"diffEditor.border\": \"var(--oh-border-subtle)\",\n \"editorUnnecessaryCode.border\": \"#00000000\",\n \"editorUnnecessaryCode.opacity\": \"rgba(0, 0, 0, 0.467)\",\n },\n });\n};\n\nexport interface FileDiffViewerProps {\n path: string;\n type: GitChangeStatus;\n /**\n * When set, show the file's diff as changed by this commit instead of\n * the working-tree-vs-base diff. Deleted files render their content in\n * commit mode (both sides come from git objects).\n */\n commit?: string;\n}\n\nexport function FileDiffViewer({ path, type, commit }: FileDiffViewerProps) {\n const { t } = useTranslation(\"openhands\");\n const [isCollapsed, setIsCollapsed] = React.useState(true);\n const [editorHeight, setEditorHeight] = React.useState(400);\n const [viewMode, setViewMode] = React.useState<ViewMode>(\"diff\");\n const diffEditorRef = React.useRef<editor_t.IStandaloneDiffEditor>(null);\n const singleEditorRef = React.useRef<editor_t.IStandaloneCodeEditor>(null);\n\n const isAdded = type === \"A\" || type === \"U\";\n const isDeleted = type === \"D\";\n\n const filePath = React.useMemo(() => {\n if (type === \"R\") {\n const parts = path.split(/\\s+/).slice(1);\n return parts[parts.length - 1];\n }\n return path;\n }, [path, type]);\n\n const {\n data: diff,\n isLoading,\n isSuccess,\n isRefetching,\n } = useUnifiedGitDiff({\n filePath,\n type,\n enabled: !isCollapsed,\n commit,\n });\n\n const updateEditorHeight = React.useCallback(() => {\n if (!diffEditorRef.current) return;\n const originalEditor = diffEditorRef.current.getOriginalEditor();\n const modifiedEditor = diffEditorRef.current.getModifiedEditor();\n if (originalEditor && modifiedEditor) {\n setEditorHeight(\n Math.max(\n originalEditor.getContentHeight(),\n modifiedEditor.getContentHeight(),\n ) + 20,\n );\n }\n }, []);\n\n const updateSingleEditorHeight = React.useCallback(() => {\n if (singleEditorRef.current) {\n setEditorHeight(singleEditorRef.current.getContentHeight() + 20);\n }\n }, []);\n\n const handleDiffEditorMount = (editor: editor_t.IStandaloneDiffEditor) => {\n diffEditorRef.current = editor;\n updateEditorHeight();\n editor.getOriginalEditor().onDidContentSizeChange(updateEditorHeight);\n editor.getModifiedEditor().onDidContentSizeChange(updateEditorHeight);\n };\n\n const handleSingleEditorMount = (editor: editor_t.IStandaloneCodeEditor) => {\n singleEditorRef.current = editor;\n updateSingleEditorHeight();\n editor.onDidContentSizeChange(updateSingleEditorHeight);\n };\n\n const status = (type === \"U\" ? STATUS_MAP.A : STATUS_MAP[type]) || \"?\";\n const statusIcon =\n typeof status === \"string\" ? (\n <Typography.Text>{status}</Typography.Text>\n ) : (\n React.createElement(status, { className: \"w-5 h-5\" })\n );\n\n const isFetchingData = isLoading || isRefetching;\n const language = getLanguageFromPath(filePath);\n const isMarkdownFile = language === \"markdown\";\n const singleViewContent =\n viewMode === \"old\" ? (diff?.original ?? \"\") : (diff?.modified ?? \"\");\n\n const renderContent = () => {\n if (viewMode === \"diff\") {\n return (\n <EditorContainer height={editorHeight}>\n <DiffEditor\n data-testid=\"file-diff-viewer\"\n className=\"w-full h-full\"\n language={language}\n original={isAdded ? \"\" : (diff?.original ?? \"\")}\n modified={isDeleted ? \"\" : (diff?.modified ?? \"\")}\n theme=\"custom-diff-theme\"\n onMount={handleDiffEditorMount}\n beforeMount={beforeMount}\n options={{\n ...SHARED_EDITOR_OPTIONS,\n renderSideBySide: !isAdded && !isDeleted,\n hideUnchangedRegions: { enabled: true },\n }}\n />\n </EditorContainer>\n );\n }\n\n if (isMarkdownFile) {\n return (\n <div\n className=\"w-full border-b border-[var(--oh-border)] overflow-auto p-4 bg-base prose prose-invert max-w-none\"\n data-testid=\"markdown-preview\"\n >\n <MarkdownRenderer\n content={singleViewContent}\n includeStandard\n includeHeadings\n />\n </div>\n );\n }\n\n return (\n <EditorContainer height={editorHeight}>\n <Editor\n data-testid=\"file-single-viewer\"\n className=\"w-full h-full\"\n language={language}\n value={singleViewContent}\n theme=\"custom-diff-theme\"\n beforeMount={beforeMount}\n onMount={handleSingleEditorMount}\n options={SHARED_EDITOR_OPTIONS}\n />\n </EditorContainer>\n );\n };\n\n return (\n <div data-testid=\"file-diff-viewer-outer\" className=\"w-full flex flex-col\">\n <div\n className=\"flex justify-between items-center px-3 py-2.5 border-b border-[var(--oh-border)] hover:cursor-pointer\"\n onClick={() => setIsCollapsed((prev) => !prev)}\n >\n <span className=\"text-sm w-full text-content flex items-center gap-2\">\n {isFetchingData ? <LoadingSpinner className=\"w-4 h-4\" /> : statusIcon}\n <strong className=\"w-full truncate font-medium\">{filePath}</strong>\n {!isCollapsed && !isDeleted && (\n <span\n className=\"flex items-center gap-0.5 shrink-0\"\n onClick={(e) => e.stopPropagation()}\n >\n {VIEW_MODES.map(({ mode, icon: Icon }) => (\n <button\n key={mode}\n data-testid={`view-mode-${mode}`}\n type=\"button\"\n aria-pressed={viewMode === mode}\n onClick={() => setViewMode(mode)}\n className={cn(\n \"p-1 rounded transition-colors cursor-pointer\",\n viewMode === mode\n ? \"bg-[var(--oh-interactive-hover)] text-white\"\n : \"text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-white\",\n )}\n >\n <Icon className=\"w-4 h-4\" />\n </button>\n ))}\n </span>\n )}\n <button data-testid=\"collapse\" type=\"button\">\n <ChevronUp\n className={cn(\n \"w-4 h-4 transition-transform\",\n isCollapsed && \"transform rotate-180\",\n )}\n />\n </button>\n </span>\n </div>\n\n {!isCollapsed && isDeleted && !commit && (\n <div\n data-testid=\"file-deleted-message\"\n className=\"w-full border-b border-[var(--oh-border)] p-4 bg-base text-[var(--oh-text-dim)] text-sm\"\n >\n {t(I18nKey.DIFF_VIEWER$FILE_DELETED)}\n </div>\n )}\n\n {!isCollapsed && (!isDeleted || !!commit) && isSuccess && renderContent()}\n </div>\n );\n}\n"],"mappings":"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"}
@@ -8,6 +8,7 @@ interface PluginDetailModalProps {
8
8
  onUninstall: () => void;
9
9
  onRefresh: () => void;
10
10
  onClose: () => void;
11
+ onStartConversation?: () => void;
11
12
  }
12
- export declare function PluginDetailModal({ plugin, isBusy, isDisabled, onToggle, onInstall, onUninstall, onRefresh, onClose, }: PluginDetailModalProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function PluginDetailModal({ plugin, isBusy, isDisabled, onToggle, onInstall, onUninstall, onRefresh, onClose, onStartConversation, }: PluginDetailModalProps): import("react/jsx-runtime").JSX.Element;
13
14
  export {};
@@ -1,2 +1,2 @@
1
- require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),t=require(`../../../../i18n/declaration.cjs`),n=require(`../../../../utils/utils.cjs`),r=require(`../../../../services/settings.cjs`),i=require(`../modal-backdrop.cjs`),a=require(`../modal-body.cjs`),o=require(`../../../../utils/modal-classes.cjs`),s=require(`../../../../ui/help-link.cjs`),c=require(`./settings-form.cjs`);let l=require(`react/jsx-runtime`);function u({onClose:u,settings:d}){let{t:f}=e.useTranslation(`openhands`);return(0,l.jsx)(i.ModalBackdrop,{children:(0,l.jsxs)(`div`,{"data-testid":`ai-config-modal`,className:n.cn(`bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal`,a.modalWidthClassName(`md`),a.MODAL_MAX_WIDTH_VIEWPORT),children:[(0,l.jsx)(`span`,{className:o.modalTitleClassName,children:f(t.I18nKey.AI_SETTINGS$TITLE)}),(0,l.jsx)(s.HelpLink,{testId:`advanced-settings-link`,text:`${f(t.I18nKey.SETTINGS$DESCRIPTION)}. ${f(t.I18nKey.SETTINGS$FOR_OTHER_OPTIONS)} ${f(t.I18nKey.COMMON$SEE)}`,linkText:f(t.I18nKey.COMMON$ADVANCED_SETTINGS),href:`/settings`,suffix:`.`,size:`settings`,linkColor:`white`,suffixClassName:`text-white`}),(0,l.jsx)(c.SettingsForm,{settings:d||r.DEFAULT_SETTINGS,onClose:u})]})})}exports.SettingsModal=u;
1
+ require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),t=require(`../../../../i18n/declaration.cjs`),n=require(`../../../../utils/utils.cjs`),r=require(`../../../../utils/base-path.cjs`),i=require(`../../../../services/settings.cjs`),a=require(`../modal-backdrop.cjs`),o=require(`../modal-body.cjs`),s=require(`../../../../utils/modal-classes.cjs`),c=require(`../../../../ui/help-link.cjs`),l=require(`./settings-form.cjs`);let u=require(`react/jsx-runtime`);function d({onClose:d,settings:f}){let{t:p}=e.useTranslation(`openhands`);return(0,u.jsx)(a.ModalBackdrop,{children:(0,u.jsxs)(`div`,{"data-testid":`ai-config-modal`,className:n.cn(`bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal`,o.modalWidthClassName(`md`),o.MODAL_MAX_WIDTH_VIEWPORT),children:[(0,u.jsx)(`span`,{className:s.modalTitleClassName,children:p(t.I18nKey.AI_SETTINGS$TITLE)}),(0,u.jsx)(c.HelpLink,{testId:`advanced-settings-link`,text:`${p(t.I18nKey.SETTINGS$DESCRIPTION)}. ${p(t.I18nKey.SETTINGS$FOR_OTHER_OPTIONS)} ${p(t.I18nKey.COMMON$SEE)}`,linkText:p(t.I18nKey.COMMON$ADVANCED_SETTINGS),href:r.buildAgentCanvasPath(`/settings`),suffix:`.`,size:`settings`,linkColor:`white`,suffixClassName:`text-white`}),(0,u.jsx)(l.SettingsForm,{settings:f||i.DEFAULT_SETTINGS,onClose:d})]})})}exports.SettingsModal=d;
2
2
  //# sourceMappingURL=settings-modal.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings-modal.cjs","names":[],"sources":["../../../../../src/components/shared/modals/settings/settings-modal.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ModalBackdrop } from \"../modal-backdrop\";\nimport { MODAL_MAX_WIDTH_VIEWPORT, modalWidthClassName } from \"../modal-body\";\nimport { cn } from \"#/utils/utils\";\nimport { SettingsForm } from \"./settings-form\";\nimport { Settings } from \"#/types/settings\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { HelpLink } from \"#/ui/help-link\";\nimport { modalTitleClassName } from \"#/utils/modal-classes\";\n\ninterface SettingsModalProps {\n settings?: Settings;\n onClose: () => void;\n}\n\nexport function SettingsModal({ onClose, settings }: SettingsModalProps) {\n const { t } = useTranslation(\"openhands\");\n\n return (\n <ModalBackdrop>\n <div\n data-testid=\"ai-config-modal\"\n className={cn(\n \"bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal\",\n modalWidthClassName(\"md\"),\n MODAL_MAX_WIDTH_VIEWPORT,\n )}\n >\n <span className={modalTitleClassName}>\n {t(I18nKey.AI_SETTINGS$TITLE)}\n </span>\n <HelpLink\n testId=\"advanced-settings-link\"\n text={`${t(I18nKey.SETTINGS$DESCRIPTION)}. ${t(I18nKey.SETTINGS$FOR_OTHER_OPTIONS)} ${t(I18nKey.COMMON$SEE)}`}\n linkText={t(I18nKey.COMMON$ADVANCED_SETTINGS)}\n href=\"/settings\"\n suffix=\".\"\n size=\"settings\"\n linkColor=\"white\"\n suffixClassName=\"text-white\"\n />\n\n <SettingsForm\n settings={settings || DEFAULT_SETTINGS}\n onClose={onClose}\n />\n </div>\n </ModalBackdrop>\n );\n}\n"],"mappings":"kfAgBA,SAAgB,EAAc,CAAE,UAAS,YAAgC,CACvE,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CAEzC,OACE,EAAA,EAAA,KAAC,EAAA,cAAD,CAAA,UACE,EAAA,EAAA,MAAC,MAAD,CACE,cAAY,kBACZ,UAAW,EAAA,GACT,8HACA,EAAA,oBAAoB,KAAK,CACzB,EAAA,yBACD,UANH,EAQE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,6BACd,EAAE,EAAA,QAAQ,kBAAkB,CACxB,CAAA,EACP,EAAA,EAAA,KAAC,EAAA,SAAD,CACE,OAAO,yBACP,KAAM,GAAG,EAAE,EAAA,QAAQ,qBAAqB,CAAC,IAAI,EAAE,EAAA,QAAQ,2BAA2B,CAAC,GAAG,EAAE,EAAA,QAAQ,WAAW,GAC3G,SAAU,EAAE,EAAA,QAAQ,yBAAyB,CAC7C,KAAK,YACL,OAAO,IACP,KAAK,WACL,UAAU,QACV,gBAAgB,aAChB,CAAA,EAEF,EAAA,EAAA,KAAC,EAAA,aAAD,CACE,SAAU,GAAY,EAAA,iBACb,UACT,CAAA,CACE,GACQ,CAAA"}
1
+ {"version":3,"file":"settings-modal.cjs","names":[],"sources":["../../../../../src/components/shared/modals/settings/settings-modal.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ModalBackdrop } from \"../modal-backdrop\";\nimport { MODAL_MAX_WIDTH_VIEWPORT, modalWidthClassName } from \"../modal-body\";\nimport { cn } from \"#/utils/utils\";\nimport { SettingsForm } from \"./settings-form\";\nimport { Settings } from \"#/types/settings\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { HelpLink } from \"#/ui/help-link\";\nimport { modalTitleClassName } from \"#/utils/modal-classes\";\nimport { buildAgentCanvasPath } from \"#/utils/base-path\";\n\ninterface SettingsModalProps {\n settings?: Settings;\n onClose: () => void;\n}\n\nexport function SettingsModal({ onClose, settings }: SettingsModalProps) {\n const { t } = useTranslation(\"openhands\");\n\n return (\n <ModalBackdrop>\n <div\n data-testid=\"ai-config-modal\"\n className={cn(\n \"bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal\",\n modalWidthClassName(\"md\"),\n MODAL_MAX_WIDTH_VIEWPORT,\n )}\n >\n <span className={modalTitleClassName}>\n {t(I18nKey.AI_SETTINGS$TITLE)}\n </span>\n <HelpLink\n testId=\"advanced-settings-link\"\n text={`${t(I18nKey.SETTINGS$DESCRIPTION)}. ${t(I18nKey.SETTINGS$FOR_OTHER_OPTIONS)} ${t(I18nKey.COMMON$SEE)}`}\n linkText={t(I18nKey.COMMON$ADVANCED_SETTINGS)}\n href={buildAgentCanvasPath(\"/settings\")}\n suffix=\".\"\n size=\"settings\"\n linkColor=\"white\"\n suffixClassName=\"text-white\"\n />\n\n <SettingsForm\n settings={settings || DEFAULT_SETTINGS}\n onClose={onClose}\n />\n </div>\n </ModalBackdrop>\n );\n}\n"],"mappings":"+hBAiBA,SAAgB,EAAc,CAAE,UAAS,YAAgC,CACvE,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CAEzC,OACE,EAAA,EAAA,KAAC,EAAA,cAAD,CAAA,UACE,EAAA,EAAA,MAAC,MAAD,CACE,cAAY,kBACZ,UAAW,EAAA,GACT,8HACA,EAAA,oBAAoB,KAAK,CACzB,EAAA,yBACD,UANH,EAQE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,6BACd,EAAE,EAAA,QAAQ,kBAAkB,CACxB,CAAA,EACP,EAAA,EAAA,KAAC,EAAA,SAAD,CACE,OAAO,yBACP,KAAM,GAAG,EAAE,EAAA,QAAQ,qBAAqB,CAAC,IAAI,EAAE,EAAA,QAAQ,2BAA2B,CAAC,GAAG,EAAE,EAAA,QAAQ,WAAW,GAC3G,SAAU,EAAE,EAAA,QAAQ,yBAAyB,CAC7C,KAAM,EAAA,qBAAqB,YAAY,CACvC,OAAO,IACP,KAAK,WACL,UAAU,QACV,gBAAgB,aAChB,CAAA,EAEF,EAAA,EAAA,KAAC,EAAA,aAAD,CACE,SAAU,GAAY,EAAA,iBACb,UACT,CAAA,CACE,GACQ,CAAA"}
@@ -1,42 +1,43 @@
1
1
  import { useTranslation as e } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
2
2
  import { I18nKey as t } from "../../../../i18n/declaration.js";
3
3
  import { cn as n } from "../../../../utils/utils.js";
4
- import { DEFAULT_SETTINGS as r } from "../../../../services/settings.js";
5
- import { ModalBackdrop as i } from "../modal-backdrop.js";
6
- import { MODAL_MAX_WIDTH_VIEWPORT as a, modalWidthClassName as o } from "../modal-body.js";
7
- import { modalTitleClassName as s } from "../../../../utils/modal-classes.js";
8
- import { HelpLink as c } from "../../../../ui/help-link.js";
9
- import { SettingsForm as l } from "./settings-form.js";
10
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
4
+ import { buildAgentCanvasPath as r } from "../../../../utils/base-path.js";
5
+ import { DEFAULT_SETTINGS as i } from "../../../../services/settings.js";
6
+ import { ModalBackdrop as a } from "../modal-backdrop.js";
7
+ import { MODAL_MAX_WIDTH_VIEWPORT as o, modalWidthClassName as s } from "../modal-body.js";
8
+ import { modalTitleClassName as c } from "../../../../utils/modal-classes.js";
9
+ import { HelpLink as l } from "../../../../ui/help-link.js";
10
+ import { SettingsForm as u } from "./settings-form.js";
11
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
11
12
  //#region src/components/shared/modals/settings/settings-modal.tsx
12
- function f({ onClose: f, settings: p }) {
13
- let { t: m } = e("openhands");
14
- return /* @__PURE__ */ u(i, { children: /* @__PURE__ */ d("div", {
13
+ function p({ onClose: p, settings: m }) {
14
+ let { t: h } = e("openhands");
15
+ return /* @__PURE__ */ d(a, { children: /* @__PURE__ */ f("div", {
15
16
  "data-testid": "ai-config-modal",
16
- className: n("bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal", o("md"), a),
17
+ className: n("bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal", s("md"), o),
17
18
  children: [
18
- /* @__PURE__ */ u("span", {
19
- className: s,
20
- children: m(t.AI_SETTINGS$TITLE)
19
+ /* @__PURE__ */ d("span", {
20
+ className: c,
21
+ children: h(t.AI_SETTINGS$TITLE)
21
22
  }),
22
- /* @__PURE__ */ u(c, {
23
+ /* @__PURE__ */ d(l, {
23
24
  testId: "advanced-settings-link",
24
- text: `${m(t.SETTINGS$DESCRIPTION)}. ${m(t.SETTINGS$FOR_OTHER_OPTIONS)} ${m(t.COMMON$SEE)}`,
25
- linkText: m(t.COMMON$ADVANCED_SETTINGS),
26
- href: "/settings",
25
+ text: `${h(t.SETTINGS$DESCRIPTION)}. ${h(t.SETTINGS$FOR_OTHER_OPTIONS)} ${h(t.COMMON$SEE)}`,
26
+ linkText: h(t.COMMON$ADVANCED_SETTINGS),
27
+ href: r("/settings"),
27
28
  suffix: ".",
28
29
  size: "settings",
29
30
  linkColor: "white",
30
31
  suffixClassName: "text-white"
31
32
  }),
32
- /* @__PURE__ */ u(l, {
33
- settings: p || r,
34
- onClose: f
33
+ /* @__PURE__ */ d(u, {
34
+ settings: m || i,
35
+ onClose: p
35
36
  })
36
37
  ]
37
38
  }) });
38
39
  }
39
40
  //#endregion
40
- export { f as SettingsModal };
41
+ export { p as SettingsModal };
41
42
 
42
43
  //# sourceMappingURL=settings-modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings-modal.js","names":[],"sources":["../../../../../src/components/shared/modals/settings/settings-modal.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ModalBackdrop } from \"../modal-backdrop\";\nimport { MODAL_MAX_WIDTH_VIEWPORT, modalWidthClassName } from \"../modal-body\";\nimport { cn } from \"#/utils/utils\";\nimport { SettingsForm } from \"./settings-form\";\nimport { Settings } from \"#/types/settings\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { HelpLink } from \"#/ui/help-link\";\nimport { modalTitleClassName } from \"#/utils/modal-classes\";\n\ninterface SettingsModalProps {\n settings?: Settings;\n onClose: () => void;\n}\n\nexport function SettingsModal({ onClose, settings }: SettingsModalProps) {\n const { t } = useTranslation(\"openhands\");\n\n return (\n <ModalBackdrop>\n <div\n data-testid=\"ai-config-modal\"\n className={cn(\n \"bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal\",\n modalWidthClassName(\"md\"),\n MODAL_MAX_WIDTH_VIEWPORT,\n )}\n >\n <span className={modalTitleClassName}>\n {t(I18nKey.AI_SETTINGS$TITLE)}\n </span>\n <HelpLink\n testId=\"advanced-settings-link\"\n text={`${t(I18nKey.SETTINGS$DESCRIPTION)}. ${t(I18nKey.SETTINGS$FOR_OTHER_OPTIONS)} ${t(I18nKey.COMMON$SEE)}`}\n linkText={t(I18nKey.COMMON$ADVANCED_SETTINGS)}\n href=\"/settings\"\n suffix=\".\"\n size=\"settings\"\n linkColor=\"white\"\n suffixClassName=\"text-white\"\n />\n\n <SettingsForm\n settings={settings || DEFAULT_SETTINGS}\n onClose={onClose}\n />\n </div>\n </ModalBackdrop>\n );\n}\n"],"mappings":";;;;;;;;;;;AAgBA,SAAgB,EAAc,EAAE,YAAS,eAAgC;CACvE,IAAM,EAAE,SAAM,EAAe,YAAY;AAEzC,QACE,kBAAC,GAAD,EAAA,UACE,kBAAC,OAAD;EACE,eAAY;EACZ,WAAW,EACT,+HACA,EAAoB,KAAK,EACzB,EACD;YANH;GAQE,kBAAC,QAAD;IAAM,WAAW;cACd,EAAE,EAAQ,kBAAkB;IACxB,CAAA;GACP,kBAAC,GAAD;IACE,QAAO;IACP,MAAM,GAAG,EAAE,EAAQ,qBAAqB,CAAC,IAAI,EAAE,EAAQ,2BAA2B,CAAC,GAAG,EAAE,EAAQ,WAAW;IAC3G,UAAU,EAAE,EAAQ,yBAAyB;IAC7C,MAAK;IACL,QAAO;IACP,MAAK;IACL,WAAU;IACV,iBAAgB;IAChB,CAAA;GAEF,kBAAC,GAAD;IACE,UAAU,KAAY;IACb;IACT,CAAA;GACE;KACQ,CAAA"}
1
+ {"version":3,"file":"settings-modal.js","names":[],"sources":["../../../../../src/components/shared/modals/settings/settings-modal.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ModalBackdrop } from \"../modal-backdrop\";\nimport { MODAL_MAX_WIDTH_VIEWPORT, modalWidthClassName } from \"../modal-body\";\nimport { cn } from \"#/utils/utils\";\nimport { SettingsForm } from \"./settings-form\";\nimport { Settings } from \"#/types/settings\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { HelpLink } from \"#/ui/help-link\";\nimport { modalTitleClassName } from \"#/utils/modal-classes\";\nimport { buildAgentCanvasPath } from \"#/utils/base-path\";\n\ninterface SettingsModalProps {\n settings?: Settings;\n onClose: () => void;\n}\n\nexport function SettingsModal({ onClose, settings }: SettingsModalProps) {\n const { t } = useTranslation(\"openhands\");\n\n return (\n <ModalBackdrop>\n <div\n data-testid=\"ai-config-modal\"\n className={cn(\n \"bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal\",\n modalWidthClassName(\"md\"),\n MODAL_MAX_WIDTH_VIEWPORT,\n )}\n >\n <span className={modalTitleClassName}>\n {t(I18nKey.AI_SETTINGS$TITLE)}\n </span>\n <HelpLink\n testId=\"advanced-settings-link\"\n text={`${t(I18nKey.SETTINGS$DESCRIPTION)}. ${t(I18nKey.SETTINGS$FOR_OTHER_OPTIONS)} ${t(I18nKey.COMMON$SEE)}`}\n linkText={t(I18nKey.COMMON$ADVANCED_SETTINGS)}\n href={buildAgentCanvasPath(\"/settings\")}\n suffix=\".\"\n size=\"settings\"\n linkColor=\"white\"\n suffixClassName=\"text-white\"\n />\n\n <SettingsForm\n settings={settings || DEFAULT_SETTINGS}\n onClose={onClose}\n />\n </div>\n </ModalBackdrop>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAiBA,SAAgB,EAAc,EAAE,YAAS,eAAgC;CACvE,IAAM,EAAE,SAAM,EAAe,YAAY;AAEzC,QACE,kBAAC,GAAD,EAAA,UACE,kBAAC,OAAD;EACE,eAAY;EACZ,WAAW,EACT,+HACA,EAAoB,KAAK,EACzB,EACD;YANH;GAQE,kBAAC,QAAD;IAAM,WAAW;cACd,EAAE,EAAQ,kBAAkB;IACxB,CAAA;GACP,kBAAC,GAAD;IACE,QAAO;IACP,MAAM,GAAG,EAAE,EAAQ,qBAAqB,CAAC,IAAI,EAAE,EAAQ,2BAA2B,CAAC,GAAG,EAAE,EAAQ,WAAW;IAC3G,UAAU,EAAE,EAAQ,yBAAyB;IAC7C,MAAM,EAAqB,YAAY;IACvC,QAAO;IACP,MAAK;IACL,WAAU;IACV,iBAAgB;IAChB,CAAA;GAEF,kBAAC,GAAD;IACE,UAAU,KAAY;IACb;IACT,CAAA;GACE;KACQ,CAAA"}
@@ -1,2 +1,2 @@
1
- require(`../_virtual/_rolldown/runtime.cjs`);var e={_comment:`Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.`,versions:{agentServer:`1.35.0`,agentCanvas:`1.4.0`,automation:`1.1.6`},compatibility:{minimumAgentServer:`1.28.0`},constraints:{_comment:`Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).`,agentClientProtocol:`agent-client-protocol<0.11`},images:{agentServer:`ghcr.io/openhands/agent-server`,agentCanvas:`ghcr.io/openhands/agent-canvas`},ports:{agentServer:18e3,automation:18001,proxy:8e3},paths:{stateSubdir:`agent-canvas`,conversations:`agent-canvas/conversations`,bashEvents:`agent-canvas/bash_events`,automationDb:`automation/automations.db`},packages:{agentServer:`openhands-agent-server`,automation:`openhands-automation`,tools:`openhands-tools`,workspace:`openhands-workspace`}};exports.default=e;
1
+ require(`../_virtual/_rolldown/runtime.cjs`);var e={_comment:`Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.`,versions:{agentServer:`1.36.1`,agentCanvas:`1.5.0`,automation:`1.1.7`},compatibility:{minimumAgentServer:`1.28.0`},constraints:{_comment:`Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).`,agentClientProtocol:`agent-client-protocol<0.11`},images:{agentServer:`ghcr.io/openhands/agent-server`,agentCanvas:`ghcr.io/openhands/agent-canvas`},ports:{agentServer:18e3,automation:18001,proxy:8e3},paths:{stateSubdir:`agent-canvas`,conversations:`agent-canvas/conversations`,bashEvents:`agent-canvas/bash_events`,automationDb:`automation/automations.db`,canvasBasePath:`/canvas`},packages:{agentServer:`openhands-agent-server`,automation:`openhands-automation`,tools:`openhands-tools`,workspace:`openhands-workspace`}};exports.default=e;
2
2
  //# sourceMappingURL=defaults.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.cjs","names":[],"sources":["../../config/defaults.json"],"sourcesContent":["{\n \"_comment\": \"Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.\",\n \"versions\": {\n \"agentServer\": \"1.35.0\",\n \"agentCanvas\": \"1.4.0\",\n \"automation\": \"1.1.6\"\n },\n \"compatibility\": {\n \"minimumAgentServer\": \"1.28.0\"\n },\n \"constraints\": {\n \"_comment\": \"Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).\",\n \"agentClientProtocol\": \"agent-client-protocol<0.11\"\n },\n \"images\": {\n \"agentServer\": \"ghcr.io/openhands/agent-server\",\n \"agentCanvas\": \"ghcr.io/openhands/agent-canvas\"\n },\n \"ports\": {\n \"agentServer\": 18000,\n \"automation\": 18001,\n \"proxy\": 8000\n },\n \"paths\": {\n \"stateSubdir\": \"agent-canvas\",\n \"conversations\": \"agent-canvas/conversations\",\n \"bashEvents\": \"agent-canvas/bash_events\",\n \"automationDb\": \"automation/automations.db\"\n },\n \"packages\": {\n \"agentServer\": \"openhands-agent-server\",\n \"automation\": \"openhands-automation\",\n \"tools\": \"openhands-tools\",\n \"workspace\": \"openhands-workspace\"\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"defaults.cjs","names":[],"sources":["../../config/defaults.json"],"sourcesContent":["{\n \"_comment\": \"Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.\",\n \"versions\": {\n \"agentServer\": \"1.36.1\",\n \"agentCanvas\": \"1.5.0\",\n \"automation\": \"1.1.7\"\n },\n \"compatibility\": {\n \"minimumAgentServer\": \"1.28.0\"\n },\n \"constraints\": {\n \"_comment\": \"Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).\",\n \"agentClientProtocol\": \"agent-client-protocol<0.11\"\n },\n \"images\": {\n \"agentServer\": \"ghcr.io/openhands/agent-server\",\n \"agentCanvas\": \"ghcr.io/openhands/agent-canvas\"\n },\n \"ports\": {\n \"agentServer\": 18000,\n \"automation\": 18001,\n \"proxy\": 8000\n },\n \"paths\": {\n \"stateSubdir\": \"agent-canvas\",\n \"conversations\": \"agent-canvas/conversations\",\n \"bashEvents\": \"agent-canvas/bash_events\",\n \"automationDb\": \"automation/automations.db\",\n \"canvasBasePath\": \"/canvas\"\n },\n \"packages\": {\n \"agentServer\": \"openhands-agent-server\",\n \"automation\": \"openhands-automation\",\n \"tools\": \"openhands-tools\",\n \"workspace\": \"openhands-workspace\"\n }\n}\n"],"mappings":""}
@@ -1,9 +1,9 @@
1
1
  var e = {
2
2
  _comment: "Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.",
3
3
  versions: {
4
- agentServer: "1.35.0",
5
- agentCanvas: "1.4.0",
6
- automation: "1.1.6"
4
+ agentServer: "1.36.1",
5
+ agentCanvas: "1.5.0",
6
+ automation: "1.1.7"
7
7
  },
8
8
  compatibility: { minimumAgentServer: "1.28.0" },
9
9
  constraints: {
@@ -23,7 +23,8 @@ var e = {
23
23
  stateSubdir: "agent-canvas",
24
24
  conversations: "agent-canvas/conversations",
25
25
  bashEvents: "agent-canvas/bash_events",
26
- automationDb: "automation/automations.db"
26
+ automationDb: "automation/automations.db",
27
+ canvasBasePath: "/canvas"
27
28
  },
28
29
  packages: {
29
30
  agentServer: "openhands-agent-server",
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","names":[],"sources":["../../config/defaults.json"],"sourcesContent":["{\n \"_comment\": \"Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.\",\n \"versions\": {\n \"agentServer\": \"1.35.0\",\n \"agentCanvas\": \"1.4.0\",\n \"automation\": \"1.1.6\"\n },\n \"compatibility\": {\n \"minimumAgentServer\": \"1.28.0\"\n },\n \"constraints\": {\n \"_comment\": \"Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).\",\n \"agentClientProtocol\": \"agent-client-protocol<0.11\"\n },\n \"images\": {\n \"agentServer\": \"ghcr.io/openhands/agent-server\",\n \"agentCanvas\": \"ghcr.io/openhands/agent-canvas\"\n },\n \"ports\": {\n \"agentServer\": 18000,\n \"automation\": 18001,\n \"proxy\": 8000\n },\n \"paths\": {\n \"stateSubdir\": \"agent-canvas\",\n \"conversations\": \"agent-canvas/conversations\",\n \"bashEvents\": \"agent-canvas/bash_events\",\n \"automationDb\": \"automation/automations.db\"\n },\n \"packages\": {\n \"agentServer\": \"openhands-agent-server\",\n \"automation\": \"openhands-automation\",\n \"tools\": \"openhands-tools\",\n \"workspace\": \"openhands-workspace\"\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"defaults.js","names":[],"sources":["../../config/defaults.json"],"sourcesContent":["{\n \"_comment\": \"Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.\",\n \"versions\": {\n \"agentServer\": \"1.36.1\",\n \"agentCanvas\": \"1.5.0\",\n \"automation\": \"1.1.7\"\n },\n \"compatibility\": {\n \"minimumAgentServer\": \"1.28.0\"\n },\n \"constraints\": {\n \"_comment\": \"Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).\",\n \"agentClientProtocol\": \"agent-client-protocol<0.11\"\n },\n \"images\": {\n \"agentServer\": \"ghcr.io/openhands/agent-server\",\n \"agentCanvas\": \"ghcr.io/openhands/agent-canvas\"\n },\n \"ports\": {\n \"agentServer\": 18000,\n \"automation\": 18001,\n \"proxy\": 8000\n },\n \"paths\": {\n \"stateSubdir\": \"agent-canvas\",\n \"conversations\": \"agent-canvas/conversations\",\n \"bashEvents\": \"agent-canvas/bash_events\",\n \"automationDb\": \"automation/automations.db\",\n \"canvasBasePath\": \"/canvas\"\n },\n \"packages\": {\n \"agentServer\": \"openhands-agent-server\",\n \"automation\": \"openhands-automation\",\n \"tools\": \"openhands-tools\",\n \"workspace\": \"openhands-workspace\"\n }\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"acp-providers.cjs","names":[],"sources":["../../src/constants/acp-providers.ts"],"sourcesContent":["import { getAcpProvider as getClientAcpProvider } from \"@openhands/typescript-client\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\n/** Upstream registry fields not yet on the pinned client's exported type. */\ntype ClientAcpProviderRegistry = NonNullable<\n ReturnType<typeof getClientAcpProvider>\n> & {\n available_models?: Array<{ id: string; label: string }>;\n default_model?: string;\n};\n\nexport type ACPProviderIcon =\n | \"claude-code\"\n | \"codex\"\n | \"gemini\"\n | \"cli-generic\";\n\nexport const ACP_PROVIDER_FALLBACK_ICON: ACPProviderIcon = \"cli-generic\";\n\n// Sentinel ``agent.llm.model`` returned by older SDKs for ACP conversations\n// in lieu of a real model. Suppressed at every consumer that resolves a\n// display string.\n//\n// NB: ``\"default\"`` is NOT a placeholder. claude-agent-acp 0.44+ exposes\n// ``default`` (\"Default (recommended)\") as a real, selectable model in its\n// configOptions select — the server reports it as ``currentModelId`` and lists\n// it in ``availableModels`` — so it must surface like any other model id.\nexport const ACP_MANAGED_SENTINEL = \"acp-managed\";\n\n/**\n * Filter for \"real\" ACP model strings — non-empty and not the legacy\n * ``acp-managed`` sentinel. Returns the trimmed value on success, ``null``\n * otherwise.\n */\nfunction realAcpModel(value: unknown): string | null {\n if (typeof value !== \"string\") return null;\n const trimmed = value.trim();\n if (!trimmed) return null;\n if (trimmed === ACP_MANAGED_SENTINEL) return null;\n return trimmed;\n}\n\n/**\n * Single source of truth for resolving the model string to surface for an\n * ACP conversation/settings context. Consumed by the conversation adapter\n * (chip text), the conversation-creation path (concrete ``acp_model``\n * payload), the Settings → Agent form (initial value), and the chat-input\n * model label.\n *\n * Precedence: SDK runtime fields → user-configured ``acp_model`` →\n * legacy ``agent.llm.model`` → provider default (when ``providerDefault``\n * is passed). Pass ``providerDefault`` only on surfaces that should\n * silently substitute the registry default; omit it for the conversation\n * chip, which must distinguish \"no concrete model\" from \"default\".\n */\nexport function resolveEffectiveAcpModel(inputs: {\n runtimeName?: string | null;\n runtimeId?: string | null;\n configured?: string | null;\n sdkLlm?: string | null;\n providerDefault?: string | null;\n}): string | null {\n for (const candidate of [\n inputs.runtimeName,\n inputs.runtimeId,\n inputs.configured,\n inputs.sdkLlm,\n ]) {\n const value = realAcpModel(candidate);\n if (value) return value;\n }\n return inputs.providerDefault ?? null;\n}\n\n/**\n * Shape of a built-in ACP (Agent Client Protocol) provider as Canvas consumes\n * it. The data fields (display name, launch command, model picker + default)\n * are sourced at module load from ``@openhands/typescript-client``'s ACP\n * registry — the generated mirror of the Python source of truth\n * ``openhands.sdk.settings.acp_providers``. This config only adds the\n * Canvas-specific UI fields ({@link ACPProviderConfig.icon} +\n * {@link ACPProviderConfig.description_key}); see {@link ACP_PROVIDER_UI}.\n */\nexport interface ACPProviderConfig {\n /** Stable registry key, also stored on conversations as ``tags.acpserver``. */\n key: string;\n /** Human-readable name shown in dropdowns and conversation chips. */\n display_name: string;\n /**\n * Tokens passed to the agent-server as ``acp_command`` when this preset\n * is picked. Each entry must be a real ACP-protocol stdio server — the\n * SDK validates this against the {@link ACPProviderConfig.key}.\n *\n * NB: ``npx -y @openai/codex acp`` looks plausible but is **not** an\n * ACP server — the codex CLI has no ``acp`` subcommand and exits with\n * ``Error: stdin is not a terminal`` when spawned without a TTY, which\n * silently deadlocks the agent-server's ACP handshake. Use\n * ``@zed-industries/codex-acp`` (the Zed-shipped wrapper) instead.\n */\n default_command: string[];\n /**\n * Suggested ACP model IDs for the provider's picker, sourced from the\n * typescript-client registry. Not authoritative access checks; users can\n * still enter a custom override in Settings -> Agent.\n */\n available_models?: ACPModelOption[];\n /** Model ID preselected for built-in providers so Canvas never saves blank. */\n default_model?: string;\n /**\n * i18n key for the one-line provider description rendered under the\n * onboarding tile. Stored on the registry so adding a new ACP\n * provider only requires editing this file (not the onboarding tile\n * list separately).\n */\n description_key: I18nKey;\n /**\n * Serializable icon key used by UI surfaces that render provider\n * choices. Kept as a string so the SDK mirror check can continue to\n * parse this registry without importing React components.\n */\n icon?: ACPProviderIcon;\n}\n\nexport interface ACPModelOption {\n /** Exact model ID sent as ``acp_model``. */\n id: string;\n /** Human-readable label shown in Settings -> Agent. */\n label: string;\n}\n\n// Canvas-only UI metadata per built-in provider, keyed by the ACP registry\n// key. Everything else — display name, launch command, model picker list and\n// default — comes from the typescript-client registry below. Adding a model\n// or a provider happens upstream in the SDK; Canvas only owns the brand icon\n// and the onboarding-tile description here. A provider with no entry here is\n// intentionally not surfaced in the UI.\nconst ACP_PROVIDER_UI: Record<\n string,\n { icon: ACPProviderIcon; description_key: I18nKey }\n> = {\n \"claude-code\": {\n icon: \"claude-code\",\n description_key: I18nKey.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION,\n },\n codex: {\n icon: \"codex\",\n description_key: I18nKey.ONBOARDING$AGENT_CODEX_DESCRIPTION,\n },\n \"gemini-cli\": {\n icon: \"gemini\",\n description_key: I18nKey.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION,\n },\n};\n\n// Built-in ACP providers Canvas surfaces, built by enriching each upstream\n// registry record (``@openhands/typescript-client`` → Python SDK) with the\n// Canvas UI metadata above. Model lists + defaults are no longer hand-kept\n// here (closes agent-canvas#740) — they track the SDK via the pinned client.\nexport const ACP_PROVIDERS: ACPProviderConfig[] = Object.entries(\n ACP_PROVIDER_UI,\n).map(([key, ui]) => {\n const info = getClientAcpProvider(key) as ClientAcpProviderRegistry | null;\n return {\n key,\n display_name: info?.display_name ?? key,\n default_command: info ? [...info.default_command] : [],\n available_models: info?.available_models?.map((model) => ({\n id: model.id,\n label: model.label,\n })),\n default_model: info?.default_model ?? undefined,\n description_key: ui.description_key,\n icon: ui.icon,\n };\n});\n\nexport const ACP_CUSTOM_PRESET_KEY = \"custom\";\n\n/**\n * A credential an ACP provider authenticates with, surfaced during onboarding\n * so the user can populate it without leaving the flow. The {@link name} is\n * both the global-secret name and the environment variable the agent-server\n * exports into the ACP subprocess — keeping them identical is what makes a\n * saved secret actually reach the provider CLI.\n */\nexport interface ACPProviderSecretField {\n /** Secret name and env var (e.g. ``\"ANTHROPIC_API_KEY\"``). Must satisfy the\n * secret-name pattern ``^[a-zA-Z][a-zA-Z0-9_]{0,63}$``. */\n name: string;\n /** Render as a masked password input (API keys, OAuth tokens, credential\n * blobs) rather than a plain-text input (base URLs, project IDs). Doubles as\n * \"this is an actual credential\": when the onboarding step is required, only\n * a ``secret`` field satisfies it — a base URL or GCP scalar alone can't\n * authenticate anything. */\n secret?: boolean;\n /** Render as a multi-line textarea rather than a single-line input. Set for\n * file-content credentials the user pastes verbatim (Codex ``auth.json``,\n * Gemini Vertex service-account / ADC JSON) — the ones the SDK materialises\n * to disk, which a cloud backend can't consume yet (agent-canvas#1016). */\n multiline?: boolean;\n /** i18n key for the one-line helper text under the field. */\n hint_key: I18nKey;\n /**\n * Interpolation values for {@link hint_key} (e.g. ``{ file: \"~/.codex/auth.json\" }``\n * for the shared \"paste the file contents\" hint). Omitted for hints that\n * take no parameters.\n */\n hint_values?: Record<string, string>;\n}\n\n/**\n * Container credentials — beyond the registry's API key / base URL — that\n * canvas collects per provider so a *containerized* agent-server (no host login\n * state) can authenticate the ACP CLI: subscription tokens plus the file-content\n * blobs and Vertex config the SDK's ``acp_file_secrets`` materialisation\n * consumes (agent-canvas#1013/#1014). They have no registry env-var entry\n * because they're a deployment concern, not a model registry field. The Gemini\n * project/location/flag are plain config, not secrets — grouped here because\n * they travel with the SA blob.\n *\n * The blob *names* (``CODEX_AUTH_JSON`` / ``GOOGLE_APPLICATION_CREDENTIALS_JSON``)\n * duplicate the SDK registry's ``file_secrets`` specs; derive them from the\n * client registry once the pinned ``@openhands/typescript-client`` mirrors that\n * field (same bump that unblocks ``acp_isolate_data_dir``, see #1019).\n */\nconst ACP_RESERVED_CREDENTIALS: Record<string, ACPProviderSecretField[]> = {\n codex: [\n {\n name: \"CODEX_AUTH_JSON\",\n secret: true,\n multiline: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,\n hint_values: { file: \"~/.codex/auth.json\" },\n },\n ],\n \"claude-code\": [\n {\n name: \"CLAUDE_CODE_OAUTH_TOKEN\",\n secret: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_OAUTH_TOKEN_HINT,\n },\n ],\n \"gemini-cli\": [\n {\n name: \"GOOGLE_APPLICATION_CREDENTIALS_JSON\",\n secret: true,\n multiline: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,\n hint_values: {\n file: \"~/.config/gcloud/application_default_credentials.json\",\n },\n },\n {\n name: \"GOOGLE_CLOUD_PROJECT\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_GCP_PROJECT_HINT,\n },\n {\n name: \"GOOGLE_CLOUD_LOCATION\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_GCP_LOCATION_HINT,\n },\n {\n name: \"GOOGLE_GENAI_USE_VERTEXAI\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_VERTEXAI_FLAG_HINT,\n },\n ],\n};\n\n/**\n * Credential pairs that break each other at runtime, keyed by provider —\n * mirrors the SDK's ``_ENV_CONFLICT_MAP`` (software-agent-sdk#3588). Claude's\n * OAuth token (``CLAUDE_CODE_OAUTH_TOKEN``) authenticates against Anthropic\n * directly, so when it is set the SDK strips:\n * - ``ANTHROPIC_API_KEY`` — otherwise it takes precedence and silently\n * bypasses the subscription;\n * - ``ANTHROPIC_BASE_URL`` — otherwise it proxies the bearer to an endpoint\n * that rejects it (see docs/ACP_AGENTS.md).\n * Either one set alongside the token is silently ignored at runtime, so warn.\n */\nconst ACP_CREDENTIAL_CONFLICTS: Record<string, Array<[string, string]>> = {\n \"claude-code\": [\n [\"CLAUDE_CODE_OAUTH_TOKEN\", \"ANTHROPIC_API_KEY\"],\n [\"CLAUDE_CODE_OAUTH_TOKEN\", \"ANTHROPIC_BASE_URL\"],\n ],\n};\n\n/**\n * The ``[credential, conflicting]`` pairs the user currently has set for\n * ``providerKey``. ``hasValue`` should cover both typed and already-saved\n * values, since a previously saved secret conflicts just the same.\n */\nexport function getAcpCredentialConflicts(\n key: string | null | undefined,\n hasValue: (name: string) => boolean,\n): Array<[string, string]> {\n if (!key) return [];\n return (ACP_CREDENTIAL_CONFLICTS[key] ?? []).filter(\n ([credential, conflicting]) =>\n hasValue(credential) && hasValue(conflicting),\n );\n}\n\n/**\n * Vertex AI-safe ``acp_model`` for Gemini.\n *\n * Left unset, gemini-cli falls back to its own internal default — a preview\n * flash model that 404s on Google Cloud projects without preview access. And a\n * ``*-flash`` id is no safer to pin: gemini-cli re-resolves flash ids at\n * generation time to its *current default* flash (software-agent-sdk#3532), so\n * a pinned ``gemini-2.5-flash`` still ran ``gemini-3-flash``. Only a non-flash\n * id sticks; ``gemini-2.5-pro`` is broadly available on Vertex and the\n * API-key / Google-login paths, so canvas preselects it. Kept as a named\n * constant so every model-default consumer agrees.\n */\nexport const ACP_VERTEX_SAFE_MODEL = \"gemini-2.5-pro\";\n\n/**\n * The default ``acp_model`` canvas substitutes for ``providerKey`` wherever no\n * concrete model is configured — settings seeding (onboarding, Settings →\n * Agent), the {@link buildAcpAgentSettingsDiff} fallback, and the start-request\n * fallback for a saved ``null``. Overrides only Gemini (→\n * {@link ACP_VERTEX_SAFE_MODEL}, see why above); every other provider keeps its\n * registry {@link ACPProviderConfig.default_model}. Returns ``null`` when\n * there's no override and no registry default, letting the ACP server pick its\n * own.\n *\n * Distinct from {@link ACPProviderConfig.default_model} (which mirrors the SDK\n * registry verbatim, closing agent-canvas#740): this is the *preferred* default,\n * deliberately diverging for Gemini where the registry value isn't safe on\n * every backend — so every default-model surface must route through this, not\n * read ``default_model`` directly.\n */\nexport function getAcpPreferredDefaultModel(\n key: string | null | undefined,\n): string | null {\n if (key === \"gemini-cli\") return ACP_VERTEX_SAFE_MODEL;\n return getAcpProvider(key)?.default_model ?? null;\n}\n\n/**\n * List the credentials Canvas should prompt for when onboarding the given ACP\n * provider. The API-key and base-URL field *names* track the SDK registry's\n * ``api_key_env_var`` / ``base_url_env_var`` (mirrored via\n * ``@openhands/typescript-client``) so they can't drift as providers are added\n * or renamed; the per-provider container credentials (subscription / Vertex\n * blobs) come from {@link ACP_RESERVED_CREDENTIALS}, since those are a\n * containerized-deployment concern with no model-registry entry. Each field\n * name equals the env var the agent-server exports into the provider subprocess\n * (which is what makes a saved secret reach the CLI). On the wire none of this\n * is special — every saved credential travels uniformly as a ``LookupSecret``.\n *\n * Field order is: container subscription/Vertex credentials → API key →\n * optional base URL. Every field is optional at the UI level — the step is\n * skippable, and a subscription / OAuth login on the backend takes precedence\n * over a key at runtime. (Whether the *step* is required is a\n * backend-capability decision the onboarding modal makes; see\n * ``backendRequiresAcpCredentials``.)\n *\n * NB: the base URL is rendered plain-text (not ``secret``), so it never counts\n * toward a required credential step — setting ``ANTHROPIC_BASE_URL`` alongside\n * a ``CLAUDE_CODE_OAUTH_TOKEN`` breaks the token's bearer auth, which the forms\n * surface via {@link getAcpCredentialConflicts}.\n *\n * Returns ``[]`` for OpenHands, the ``\"custom\"`` preset, any unknown key, and a\n * future OAuth-only provider whose registry entry has no ``api_key_env_var`` —\n * callers treat an empty list as \"no credentials step for this provider\".\n */\nexport function getAcpProviderSecrets(\n key: string | null | undefined,\n): ACPProviderSecretField[] {\n if (!key) return [];\n const info = getClientAcpProvider(key);\n if (!info) return [];\n // Subscription / Vertex credentials first — they're the primary auth path for\n // ACP providers (Claude Pro/Max OAuth token, Codex ChatGPT auth.json), with\n // the API key as the fallback below.\n const fields: ACPProviderSecretField[] = [\n ...(ACP_RESERVED_CREDENTIALS[key] ?? []),\n ];\n if (info.api_key_env_var) {\n fields.push({\n name: info.api_key_env_var,\n secret: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_API_KEY_HINT,\n });\n }\n if (info.base_url_env_var) {\n fields.push({\n name: info.base_url_env_var,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_BASE_URL_HINT,\n });\n }\n return fields;\n}\n\n/**\n * Look up a built-in ACP provider config by its registry key.\n *\n * Returns ``undefined`` for an empty / null key, for the ``\"custom\"`` preset\n * (which has no registry entry), and for any forward-compatible key Canvas's\n * registry doesn't know about yet. Centralizes the ``ACP_PROVIDERS.find(...)``\n * lookup shared by the resolvers below and by the adapter / settings surfaces\n * so the key-comparison shape lives in one place.\n */\nexport function getAcpProvider(\n key: string | null | undefined,\n): ACPProviderConfig | undefined {\n if (!key) return undefined;\n return ACP_PROVIDERS.find((provider) => provider.key === key);\n}\n\n/**\n * Resolve an ACP provider registry key (the value stored under\n * ``tags.acpserver`` on a conversation) to a human display name for the\n * sidebar chip.\n *\n * Returns ``null`` for an empty / null key and for keys not in\n * {@link ACP_PROVIDERS} — most notably ``\"custom\"`` (the user-supplied\n * command preset has no canonical brand name) and any forward-compatible\n * value Canvas's registry doesn't know about yet. Callers should fall\n * back to a generic ``\"ACP\"`` label in that case so the chip still\n * communicates \"this is an ACP conversation\".\n *\n * Kept separate from {@link buildAcpAgentSettingsDiff}'s lookup so the\n * conversation-card render path can resolve display names without\n * importing the settings-payload builder.\n */\nexport function getAcpProviderDisplayName(\n key: string | null | undefined,\n): string | null {\n const found = getAcpProvider(key);\n return found ? found.display_name : null;\n}\n\n/**\n * Resolve an ACP provider registry key to the icon discriminator the\n * conversation chip should render alongside the model text.\n *\n * Falls back to {@link ACP_PROVIDER_FALLBACK_ICON} for ``\"custom\"``,\n * unknown keys, or a missing key — the chip then shows a neutral\n * terminal glyph that still communicates \"this is an ACP conversation\"\n * without claiming a brand identity we don't know.\n */\nexport function resolveAcpProviderIcon(\n key: string | null | undefined,\n): ACPProviderIcon {\n return getAcpProvider(key)?.icon ?? ACP_PROVIDER_FALLBACK_ICON;\n}\n\n/**\n * Resolve a raw ``acp_model`` ID to the human-readable label the provider's\n * picker shows for it (e.g. ``\"claude-opus-4-7\"`` → ``\"Claude Opus 4.7\"``).\n *\n * Falls back to the raw ID when the provider is unknown or the ID isn't one\n * of its registered {@link ACPModelOption}s — so a user's custom override\n * still renders something meaningful rather than nothing. Returns ``null``\n * only when there is no model to show, letting the conversation chip decide\n * to display the provider name instead.\n */\nexport function labelForAcpModel(\n serverKey: string | null | undefined,\n modelId: string | null | undefined,\n): string | null {\n if (!modelId) return null;\n const provider = getAcpProvider(serverKey);\n const match = provider?.available_models?.find((m) => m.id === modelId);\n return match?.label ?? modelId;\n}\n\n/**\n * Build the ``agent_settings_diff`` payload PATCH /api/settings expects\n * for the agent-kind/provider choice the user just made.\n *\n * Used by both the Settings → Agent page and the onboarding \"choose\n * agent\" step — keeping the shape in one helper means a future change\n * (e.g. always seeding ``acp_command`` from the registry instead of\n * sending ``[]``, or adding new ``acp_*`` reset fields) lands in both\n * surfaces atomically.\n *\n * Returns ``null`` for an unknown ACP provider key by default — the\n * caller can skip the save (the UI shouldn't surface unknown options,\n * but the defensive path keeps a buggy preset list from corrupting\n * settings).\n *\n * Pass ``allowUnknownServer: true`` to opt into pass-through for keys\n * that aren't in {@link ACP_PROVIDERS} or ``ACP_CUSTOM_PRESET_KEY``.\n * The Settings → Agent page uses this when the user opens settings\n * that already carry an ``acp_server`` value canvas's registry\n * doesn't know about (e.g. set out-of-band via the API for a provider\n * we haven't mirrored yet) and saves without changing the command —\n * otherwise the original key would be silently demoted to ``\"custom\"``.\n */\nexport function buildAcpAgentSettingsDiff(\n providerKey: string,\n options: {\n command?: string[];\n model?: string | null;\n allowUnknownServer?: boolean;\n } = {},\n): Record<string, unknown> | null {\n if (providerKey === \"openhands\") {\n // Switching back to OpenHands. The agent-server's ``Settings.update``\n // applies a fresh ``{'agent_kind': ...}`` base whenever the kind\n // flips, so any ``acp_*`` fields would be discarded before\n // validation. Send the kind alone.\n return { agent_kind: \"openhands\" };\n }\n\n const isCustom = providerKey === ACP_CUSTOM_PRESET_KEY;\n const provider = isCustom ? undefined : getAcpProvider(providerKey);\n if (!isCustom && !provider && !options.allowUnknownServer) {\n return null;\n }\n\n // Undefined model → the *preferred* default (Vertex-safe for Gemini), not\n // the raw registry default — see getAcpPreferredDefaultModel.\n const model =\n options.model === undefined\n ? getAcpPreferredDefaultModel(providerKey)\n : options.model;\n\n // ``acp_args: []`` resets any API-set ``acp_args`` that would\n // otherwise survive and concatenate to ``acp_command`` at spawn time\n // (the agent-server merges the two before exec). Callers building the\n // payload from a textarea that already shows the merged command\n // (Settings → Agent) round-trip correctly — the merged tokens land in\n // ``acp_command`` here, so no args are lost.\n return {\n agent_kind: \"acp\",\n acp_server: providerKey,\n acp_command: options.command ?? [],\n acp_args: [],\n acp_model: model ?? null,\n };\n}\n"],"mappings":"6OAkCA,SAAS,EAAa,EAA+B,CACnD,GAAI,OAAO,GAAU,SAAU,OAAO,KACtC,IAAM,EAAU,EAAM,MAAM,CAG5B,MAFI,CAAC,GACD,IAAA,cAAyC,KACtC,EAgBT,SAAgB,EAAyB,EAMvB,CAChB,IAAK,IAAM,IAAa,CACtB,EAAO,YACP,EAAO,UACP,EAAO,WACP,EAAO,OACR,CAAE,CACD,IAAM,EAAQ,EAAa,EAAU,CACrC,GAAI,EAAO,OAAO,EAEpB,OAAO,EAAO,iBAAmB,KAiEnC,IAAM,EAGF,CACF,cAAe,CACb,KAAM,cACN,gBAAiB,EAAA,QAAQ,yCAC1B,CACD,MAAO,CACL,KAAM,QACN,gBAAiB,EAAA,QAAQ,mCAC1B,CACD,aAAc,CACZ,KAAM,SACN,gBAAiB,EAAA,QAAQ,wCAC1B,CACF,CAMY,EAAqC,OAAO,QACvD,EACD,CAAC,KAAK,CAAC,EAAK,KAAQ,CACnB,IAAM,EAAO,EAAA,eAAqB,EAAI,CACtC,MAAO,CACL,MACA,aAAc,GAAM,cAAgB,EACpC,gBAAiB,EAAO,CAAC,GAAG,EAAK,gBAAgB,CAAG,EAAE,CACtD,iBAAkB,GAAM,kBAAkB,IAAK,IAAW,CACxD,GAAI,EAAM,GACV,MAAO,EAAM,MACd,EAAE,CACH,cAAe,GAAM,eAAiB,IAAA,GACtC,gBAAiB,EAAG,gBACpB,KAAM,EAAG,KACV,EACD,CAyDc,EAAA,QAAQ,qCAQR,EAAA,QAAQ,uCAQR,EAAA,QAAQ,qCAOR,EAAA,QAAQ,uCAIR,EAAA,QAAQ,wCAIR,EAAA,QAAQ,yCAmDxB,IAAa,EAAwB,iBAkBrC,SAAgB,EACd,EACe,CAEf,OADI,IAAQ,aAAqB,EAC1B,EAAe,EAAI,EAAE,eAAiB,KAoE/C,SAAgB,EACd,EAC+B,CAC1B,KACL,OAAO,EAAc,KAAM,GAAa,EAAS,MAAQ,EAAI,CAmB/D,SAAgB,EACd,EACe,CACf,IAAM,EAAQ,EAAe,EAAI,CACjC,OAAO,EAAQ,EAAM,aAAe,KAYtC,SAAgB,EACd,EACiB,CACjB,OAAO,EAAe,EAAI,EAAE,MAAA,cAa9B,SAAgB,EACd,EACA,EACe,CAIf,OAHK,EACY,EAAe,EAClB,EAAU,kBAAkB,KAAM,GAAM,EAAE,KAAO,EAAQ,EACzD,OAAS,EAHF"}
1
+ {"version":3,"file":"acp-providers.cjs","names":[],"sources":["../../src/constants/acp-providers.ts"],"sourcesContent":["import { getAcpProvider as getClientAcpProvider } from \"@openhands/typescript-client\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\n/** Upstream registry fields not yet on the pinned client's exported type. */\ntype ClientAcpProviderRegistry = NonNullable<\n ReturnType<typeof getClientAcpProvider>\n> & {\n available_models?: Array<{ id: string; label: string }>;\n default_model?: string;\n};\n\nexport type ACPProviderIcon =\n | \"claude-code\"\n | \"codex\"\n | \"gemini\"\n | \"cli-generic\";\n\nexport const ACP_PROVIDER_FALLBACK_ICON: ACPProviderIcon = \"cli-generic\";\n\n// Sentinel ``agent.llm.model`` returned by older SDKs for ACP conversations\n// in lieu of a real model. Suppressed at every consumer that resolves a\n// display string.\n//\n// NB: ``\"default\"`` is NOT a placeholder. claude-agent-acp 0.44+ exposes\n// ``default`` (\"Default (recommended)\") as a real, selectable model in its\n// configOptions select — the server reports it as ``currentModelId`` and lists\n// it in ``availableModels`` — so it must surface like any other model id.\nexport const ACP_MANAGED_SENTINEL = \"acp-managed\";\n\n/**\n * Filter for \"real\" ACP model strings — non-empty and not the legacy\n * ``acp-managed`` sentinel. Returns the trimmed value on success, ``null``\n * otherwise.\n */\nfunction realAcpModel(value: unknown): string | null {\n if (typeof value !== \"string\") return null;\n const trimmed = value.trim();\n if (!trimmed) return null;\n if (trimmed === ACP_MANAGED_SENTINEL) return null;\n return trimmed;\n}\n\n/**\n * Single source of truth for resolving the model string to surface for an\n * ACP conversation/settings context. Consumed by the conversation adapter\n * (chip text), the conversation-creation path (concrete ``acp_model``\n * payload), the Settings → Agent form (initial value), and the chat-input\n * model label.\n *\n * Precedence: SDK runtime fields → user-configured ``acp_model`` →\n * legacy ``agent.llm.model`` → provider default (when ``providerDefault``\n * is passed). Pass ``providerDefault`` only on surfaces that should\n * silently substitute the registry default; omit it for the conversation\n * chip, which must distinguish \"no concrete model\" from \"default\".\n */\nexport function resolveEffectiveAcpModel(inputs: {\n runtimeName?: string | null;\n runtimeId?: string | null;\n configured?: string | null;\n sdkLlm?: string | null;\n providerDefault?: string | null;\n}): string | null {\n for (const candidate of [\n inputs.runtimeName,\n inputs.runtimeId,\n inputs.configured,\n inputs.sdkLlm,\n ]) {\n const value = realAcpModel(candidate);\n if (value) return value;\n }\n return inputs.providerDefault ?? null;\n}\n\n/**\n * Shape of a built-in ACP (Agent Client Protocol) provider as Canvas consumes\n * it. The data fields (display name, launch command, model picker + default)\n * are sourced at module load from ``@openhands/typescript-client``'s ACP\n * registry — the generated mirror of the Python source of truth\n * ``openhands.sdk.settings.acp_providers``. This config only adds the\n * Canvas-specific UI fields ({@link ACPProviderConfig.icon} +\n * {@link ACPProviderConfig.description_key}); see {@link ACP_PROVIDER_UI}.\n */\nexport interface ACPProviderConfig {\n /** Stable registry key, also stored on conversations as ``tags.acpserver``. */\n key: string;\n /** Human-readable name shown in dropdowns and conversation chips. */\n display_name: string;\n /**\n * Tokens passed to the agent-server as ``acp_command`` when this preset\n * is picked. Each entry must be a real ACP-protocol stdio server — the\n * SDK validates this against the {@link ACPProviderConfig.key}.\n *\n * NB: ``npx -y @openai/codex acp`` looks plausible but is **not** an\n * ACP server — the codex CLI has no ``acp`` subcommand and exits with\n * ``Error: stdin is not a terminal`` when spawned without a TTY, which\n * silently deadlocks the agent-server's ACP handshake. Use\n * ``@agentclientprotocol/codex-acp`` (the codex ACP wrapper) instead.\n */\n default_command: string[];\n /**\n * Suggested ACP model IDs for the provider's picker, sourced from the\n * typescript-client registry. Not authoritative access checks; users can\n * still enter a custom override in Settings -> Agent.\n */\n available_models?: ACPModelOption[];\n /** Model ID preselected for built-in providers so Canvas never saves blank. */\n default_model?: string;\n /**\n * i18n key for the one-line provider description rendered under the\n * onboarding tile. Stored on the registry so adding a new ACP\n * provider only requires editing this file (not the onboarding tile\n * list separately).\n */\n description_key: I18nKey;\n /**\n * Serializable icon key used by UI surfaces that render provider\n * choices. Kept as a string so the SDK mirror check can continue to\n * parse this registry without importing React components.\n */\n icon?: ACPProviderIcon;\n}\n\nexport interface ACPModelOption {\n /** Exact model ID sent as ``acp_model``. */\n id: string;\n /** Human-readable label shown in Settings -> Agent. */\n label: string;\n}\n\n// Canvas-only UI metadata per built-in provider, keyed by the ACP registry\n// key. Everything else — display name, launch command, model picker list and\n// default — comes from the typescript-client registry below. Adding a model\n// or a provider happens upstream in the SDK; Canvas only owns the brand icon\n// and the onboarding-tile description here. A provider with no entry here is\n// intentionally not surfaced in the UI.\nconst ACP_PROVIDER_UI: Record<\n string,\n { icon: ACPProviderIcon; description_key: I18nKey }\n> = {\n \"claude-code\": {\n icon: \"claude-code\",\n description_key: I18nKey.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION,\n },\n codex: {\n icon: \"codex\",\n description_key: I18nKey.ONBOARDING$AGENT_CODEX_DESCRIPTION,\n },\n \"gemini-cli\": {\n icon: \"gemini\",\n description_key: I18nKey.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION,\n },\n};\n\n// Built-in ACP providers Canvas surfaces, built by enriching each upstream\n// registry record (``@openhands/typescript-client`` → Python SDK) with the\n// Canvas UI metadata above. Model lists + defaults are no longer hand-kept\n// here (closes agent-canvas#740) — they track the SDK via the pinned client.\nexport const ACP_PROVIDERS: ACPProviderConfig[] = Object.entries(\n ACP_PROVIDER_UI,\n).map(([key, ui]) => {\n const info = getClientAcpProvider(key) as ClientAcpProviderRegistry | null;\n return {\n key,\n display_name: info?.display_name ?? key,\n default_command: info ? [...info.default_command] : [],\n available_models: info?.available_models?.map((model) => ({\n id: model.id,\n label: model.label,\n })),\n default_model: info?.default_model ?? undefined,\n description_key: ui.description_key,\n icon: ui.icon,\n };\n});\n\nexport const ACP_CUSTOM_PRESET_KEY = \"custom\";\n\n/**\n * A credential an ACP provider authenticates with, surfaced during onboarding\n * so the user can populate it without leaving the flow. The {@link name} is\n * both the global-secret name and the environment variable the agent-server\n * exports into the ACP subprocess — keeping them identical is what makes a\n * saved secret actually reach the provider CLI.\n */\nexport interface ACPProviderSecretField {\n /** Secret name and env var (e.g. ``\"ANTHROPIC_API_KEY\"``). Must satisfy the\n * secret-name pattern ``^[a-zA-Z][a-zA-Z0-9_]{0,63}$``. */\n name: string;\n /** Render as a masked password input (API keys, OAuth tokens, credential\n * blobs) rather than a plain-text input (base URLs, project IDs). Doubles as\n * \"this is an actual credential\": when the onboarding step is required, only\n * a ``secret`` field satisfies it — a base URL or GCP scalar alone can't\n * authenticate anything. */\n secret?: boolean;\n /** Render as a multi-line textarea rather than a single-line input. Set for\n * file-content credentials the user pastes verbatim (Codex ``auth.json``,\n * Gemini Vertex service-account / ADC JSON) — the ones the SDK materialises\n * to disk, which a cloud backend can't consume yet (agent-canvas#1016). */\n multiline?: boolean;\n /** i18n key for the one-line helper text under the field. */\n hint_key: I18nKey;\n /**\n * Interpolation values for {@link hint_key} (e.g. ``{ file: \"~/.codex/auth.json\" }``\n * for the shared \"paste the file contents\" hint). Omitted for hints that\n * take no parameters.\n */\n hint_values?: Record<string, string>;\n}\n\n/**\n * Container credentials — beyond the registry's API key / base URL — that\n * canvas collects per provider so a *containerized* agent-server (no host login\n * state) can authenticate the ACP CLI: subscription tokens plus the file-content\n * blobs and Vertex config the SDK's ``acp_file_secrets`` materialisation\n * consumes (agent-canvas#1013/#1014). They have no registry env-var entry\n * because they're a deployment concern, not a model registry field. The Gemini\n * project/location/flag are plain config, not secrets — grouped here because\n * they travel with the SA blob.\n *\n * The blob *names* (``CODEX_AUTH_JSON`` / ``GOOGLE_APPLICATION_CREDENTIALS_JSON``)\n * duplicate the SDK registry's ``file_secrets`` specs; derive them from the\n * client registry once the pinned ``@openhands/typescript-client`` mirrors that\n * field (same bump that unblocks ``acp_isolate_data_dir``, see #1019).\n */\nconst ACP_RESERVED_CREDENTIALS: Record<string, ACPProviderSecretField[]> = {\n codex: [\n {\n name: \"CODEX_AUTH_JSON\",\n secret: true,\n multiline: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,\n hint_values: { file: \"~/.codex/auth.json\" },\n },\n ],\n \"claude-code\": [\n {\n name: \"CLAUDE_CODE_OAUTH_TOKEN\",\n secret: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_OAUTH_TOKEN_HINT,\n },\n ],\n \"gemini-cli\": [\n {\n name: \"GOOGLE_APPLICATION_CREDENTIALS_JSON\",\n secret: true,\n multiline: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,\n hint_values: {\n file: \"~/.config/gcloud/application_default_credentials.json\",\n },\n },\n {\n name: \"GOOGLE_CLOUD_PROJECT\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_GCP_PROJECT_HINT,\n },\n {\n name: \"GOOGLE_CLOUD_LOCATION\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_GCP_LOCATION_HINT,\n },\n {\n name: \"GOOGLE_GENAI_USE_VERTEXAI\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_VERTEXAI_FLAG_HINT,\n },\n ],\n};\n\n/**\n * Credential pairs that break each other at runtime, keyed by provider —\n * mirrors the SDK's ``_ENV_CONFLICT_MAP`` (software-agent-sdk#3588). Claude's\n * OAuth token (``CLAUDE_CODE_OAUTH_TOKEN``) authenticates against Anthropic\n * directly, so when it is set the SDK strips:\n * - ``ANTHROPIC_API_KEY`` — otherwise it takes precedence and silently\n * bypasses the subscription;\n * - ``ANTHROPIC_BASE_URL`` — otherwise it proxies the bearer to an endpoint\n * that rejects it (see docs/ACP_AGENTS.md).\n * Either one set alongside the token is silently ignored at runtime, so warn.\n */\nconst ACP_CREDENTIAL_CONFLICTS: Record<string, Array<[string, string]>> = {\n \"claude-code\": [\n [\"CLAUDE_CODE_OAUTH_TOKEN\", \"ANTHROPIC_API_KEY\"],\n [\"CLAUDE_CODE_OAUTH_TOKEN\", \"ANTHROPIC_BASE_URL\"],\n ],\n};\n\n/**\n * The ``[credential, conflicting]`` pairs the user currently has set for\n * ``providerKey``. ``hasValue`` should cover both typed and already-saved\n * values, since a previously saved secret conflicts just the same.\n */\nexport function getAcpCredentialConflicts(\n key: string | null | undefined,\n hasValue: (name: string) => boolean,\n): Array<[string, string]> {\n if (!key) return [];\n return (ACP_CREDENTIAL_CONFLICTS[key] ?? []).filter(\n ([credential, conflicting]) =>\n hasValue(credential) && hasValue(conflicting),\n );\n}\n\n/**\n * Vertex AI-safe ``acp_model`` for Gemini.\n *\n * Left unset, gemini-cli falls back to its own internal default — a preview\n * flash model that 404s on Google Cloud projects without preview access. And a\n * ``*-flash`` id is no safer to pin: gemini-cli re-resolves flash ids at\n * generation time to its *current default* flash (software-agent-sdk#3532), so\n * a pinned ``gemini-2.5-flash`` still ran ``gemini-3-flash``. Only a non-flash\n * id sticks; ``gemini-2.5-pro`` is broadly available on Vertex and the\n * API-key / Google-login paths, so canvas preselects it. Kept as a named\n * constant so every model-default consumer agrees.\n */\nexport const ACP_VERTEX_SAFE_MODEL = \"gemini-2.5-pro\";\n\n/**\n * The default ``acp_model`` canvas substitutes for ``providerKey`` wherever no\n * concrete model is configured — settings seeding (onboarding, Settings →\n * Agent), the {@link buildAcpAgentSettingsDiff} fallback, and the start-request\n * fallback for a saved ``null``. Overrides only Gemini (→\n * {@link ACP_VERTEX_SAFE_MODEL}, see why above); every other provider keeps its\n * registry {@link ACPProviderConfig.default_model}. Returns ``null`` when\n * there's no override and no registry default, letting the ACP server pick its\n * own.\n *\n * Distinct from {@link ACPProviderConfig.default_model} (which mirrors the SDK\n * registry verbatim, closing agent-canvas#740): this is the *preferred* default,\n * deliberately diverging for Gemini where the registry value isn't safe on\n * every backend — so every default-model surface must route through this, not\n * read ``default_model`` directly.\n */\nexport function getAcpPreferredDefaultModel(\n key: string | null | undefined,\n): string | null {\n if (key === \"gemini-cli\") return ACP_VERTEX_SAFE_MODEL;\n return getAcpProvider(key)?.default_model ?? null;\n}\n\n/**\n * List the credentials Canvas should prompt for when onboarding the given ACP\n * provider. The API-key and base-URL field *names* track the SDK registry's\n * ``api_key_env_var`` / ``base_url_env_var`` (mirrored via\n * ``@openhands/typescript-client``) so they can't drift as providers are added\n * or renamed; the per-provider container credentials (subscription / Vertex\n * blobs) come from {@link ACP_RESERVED_CREDENTIALS}, since those are a\n * containerized-deployment concern with no model-registry entry. Each field\n * name equals the env var the agent-server exports into the provider subprocess\n * (which is what makes a saved secret reach the CLI). On the wire none of this\n * is special — every saved credential travels uniformly as a ``LookupSecret``.\n *\n * Field order is: container subscription/Vertex credentials → API key →\n * optional base URL. Every field is optional at the UI level — the step is\n * skippable, and a subscription / OAuth login on the backend takes precedence\n * over a key at runtime. (Whether the *step* is required is a\n * backend-capability decision the onboarding modal makes; see\n * ``backendRequiresAcpCredentials``.)\n *\n * NB: the base URL is rendered plain-text (not ``secret``), so it never counts\n * toward a required credential step — setting ``ANTHROPIC_BASE_URL`` alongside\n * a ``CLAUDE_CODE_OAUTH_TOKEN`` breaks the token's bearer auth, which the forms\n * surface via {@link getAcpCredentialConflicts}.\n *\n * Returns ``[]`` for OpenHands, the ``\"custom\"`` preset, any unknown key, and a\n * future OAuth-only provider whose registry entry has no ``api_key_env_var`` —\n * callers treat an empty list as \"no credentials step for this provider\".\n */\nexport function getAcpProviderSecrets(\n key: string | null | undefined,\n): ACPProviderSecretField[] {\n if (!key) return [];\n const info = getClientAcpProvider(key);\n if (!info) return [];\n // Subscription / Vertex credentials first — they're the primary auth path for\n // ACP providers (Claude Pro/Max OAuth token, Codex ChatGPT auth.json), with\n // the API key as the fallback below.\n const fields: ACPProviderSecretField[] = [\n ...(ACP_RESERVED_CREDENTIALS[key] ?? []),\n ];\n if (info.api_key_env_var) {\n fields.push({\n name: info.api_key_env_var,\n secret: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_API_KEY_HINT,\n });\n }\n if (info.base_url_env_var) {\n fields.push({\n name: info.base_url_env_var,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_BASE_URL_HINT,\n });\n }\n return fields;\n}\n\n/**\n * Look up a built-in ACP provider config by its registry key.\n *\n * Returns ``undefined`` for an empty / null key, for the ``\"custom\"`` preset\n * (which has no registry entry), and for any forward-compatible key Canvas's\n * registry doesn't know about yet. Centralizes the ``ACP_PROVIDERS.find(...)``\n * lookup shared by the resolvers below and by the adapter / settings surfaces\n * so the key-comparison shape lives in one place.\n */\nexport function getAcpProvider(\n key: string | null | undefined,\n): ACPProviderConfig | undefined {\n if (!key) return undefined;\n return ACP_PROVIDERS.find((provider) => provider.key === key);\n}\n\n/**\n * Resolve an ACP provider registry key (the value stored under\n * ``tags.acpserver`` on a conversation) to a human display name for the\n * sidebar chip.\n *\n * Returns ``null`` for an empty / null key and for keys not in\n * {@link ACP_PROVIDERS} — most notably ``\"custom\"`` (the user-supplied\n * command preset has no canonical brand name) and any forward-compatible\n * value Canvas's registry doesn't know about yet. Callers should fall\n * back to a generic ``\"ACP\"`` label in that case so the chip still\n * communicates \"this is an ACP conversation\".\n *\n * Kept separate from {@link buildAcpAgentSettingsDiff}'s lookup so the\n * conversation-card render path can resolve display names without\n * importing the settings-payload builder.\n */\nexport function getAcpProviderDisplayName(\n key: string | null | undefined,\n): string | null {\n const found = getAcpProvider(key);\n return found ? found.display_name : null;\n}\n\n/**\n * Resolve an ACP provider registry key to the icon discriminator the\n * conversation chip should render alongside the model text.\n *\n * Falls back to {@link ACP_PROVIDER_FALLBACK_ICON} for ``\"custom\"``,\n * unknown keys, or a missing key — the chip then shows a neutral\n * terminal glyph that still communicates \"this is an ACP conversation\"\n * without claiming a brand identity we don't know.\n */\nexport function resolveAcpProviderIcon(\n key: string | null | undefined,\n): ACPProviderIcon {\n return getAcpProvider(key)?.icon ?? ACP_PROVIDER_FALLBACK_ICON;\n}\n\n/**\n * Resolve a raw ``acp_model`` ID to the human-readable label the provider's\n * picker shows for it (e.g. ``\"claude-opus-4-7\"`` → ``\"Claude Opus 4.7\"``).\n *\n * Falls back to the raw ID when the provider is unknown or the ID isn't one\n * of its registered {@link ACPModelOption}s — so a user's custom override\n * still renders something meaningful rather than nothing. Returns ``null``\n * only when there is no model to show, letting the conversation chip decide\n * to display the provider name instead.\n */\nexport function labelForAcpModel(\n serverKey: string | null | undefined,\n modelId: string | null | undefined,\n): string | null {\n if (!modelId) return null;\n const provider = getAcpProvider(serverKey);\n const match = provider?.available_models?.find((m) => m.id === modelId);\n return match?.label ?? modelId;\n}\n\n/**\n * Build the ``agent_settings_diff`` payload PATCH /api/settings expects\n * for the agent-kind/provider choice the user just made.\n *\n * Used by both the Settings → Agent page and the onboarding \"choose\n * agent\" step — keeping the shape in one helper means a future change\n * (e.g. always seeding ``acp_command`` from the registry instead of\n * sending ``[]``, or adding new ``acp_*`` reset fields) lands in both\n * surfaces atomically.\n *\n * Returns ``null`` for an unknown ACP provider key by default — the\n * caller can skip the save (the UI shouldn't surface unknown options,\n * but the defensive path keeps a buggy preset list from corrupting\n * settings).\n *\n * Pass ``allowUnknownServer: true`` to opt into pass-through for keys\n * that aren't in {@link ACP_PROVIDERS} or ``ACP_CUSTOM_PRESET_KEY``.\n * The Settings → Agent page uses this when the user opens settings\n * that already carry an ``acp_server`` value canvas's registry\n * doesn't know about (e.g. set out-of-band via the API for a provider\n * we haven't mirrored yet) and saves without changing the command —\n * otherwise the original key would be silently demoted to ``\"custom\"``.\n */\nexport function buildAcpAgentSettingsDiff(\n providerKey: string,\n options: {\n command?: string[];\n model?: string | null;\n allowUnknownServer?: boolean;\n } = {},\n): Record<string, unknown> | null {\n if (providerKey === \"openhands\") {\n // Switching back to OpenHands. The agent-server's ``Settings.update``\n // applies a fresh ``{'agent_kind': ...}`` base whenever the kind\n // flips, so any ``acp_*`` fields would be discarded before\n // validation. Send the kind alone.\n return { agent_kind: \"openhands\" };\n }\n\n const isCustom = providerKey === ACP_CUSTOM_PRESET_KEY;\n const provider = isCustom ? undefined : getAcpProvider(providerKey);\n if (!isCustom && !provider && !options.allowUnknownServer) {\n return null;\n }\n\n // Undefined model → the *preferred* default (Vertex-safe for Gemini), not\n // the raw registry default — see getAcpPreferredDefaultModel.\n const model =\n options.model === undefined\n ? getAcpPreferredDefaultModel(providerKey)\n : options.model;\n\n // ``acp_args: []`` resets any API-set ``acp_args`` that would\n // otherwise survive and concatenate to ``acp_command`` at spawn time\n // (the agent-server merges the two before exec). Callers building the\n // payload from a textarea that already shows the merged command\n // (Settings → Agent) round-trip correctly — the merged tokens land in\n // ``acp_command`` here, so no args are lost.\n return {\n agent_kind: \"acp\",\n acp_server: providerKey,\n acp_command: options.command ?? [],\n acp_args: [],\n acp_model: model ?? null,\n };\n}\n"],"mappings":"6OAkCA,SAAS,EAAa,EAA+B,CACnD,GAAI,OAAO,GAAU,SAAU,OAAO,KACtC,IAAM,EAAU,EAAM,MAAM,CAG5B,MAFI,CAAC,GACD,IAAA,cAAyC,KACtC,EAgBT,SAAgB,EAAyB,EAMvB,CAChB,IAAK,IAAM,IAAa,CACtB,EAAO,YACP,EAAO,UACP,EAAO,WACP,EAAO,OACR,CAAE,CACD,IAAM,EAAQ,EAAa,EAAU,CACrC,GAAI,EAAO,OAAO,EAEpB,OAAO,EAAO,iBAAmB,KAiEnC,IAAM,EAGF,CACF,cAAe,CACb,KAAM,cACN,gBAAiB,EAAA,QAAQ,yCAC1B,CACD,MAAO,CACL,KAAM,QACN,gBAAiB,EAAA,QAAQ,mCAC1B,CACD,aAAc,CACZ,KAAM,SACN,gBAAiB,EAAA,QAAQ,wCAC1B,CACF,CAMY,EAAqC,OAAO,QACvD,EACD,CAAC,KAAK,CAAC,EAAK,KAAQ,CACnB,IAAM,EAAO,EAAA,eAAqB,EAAI,CACtC,MAAO,CACL,MACA,aAAc,GAAM,cAAgB,EACpC,gBAAiB,EAAO,CAAC,GAAG,EAAK,gBAAgB,CAAG,EAAE,CACtD,iBAAkB,GAAM,kBAAkB,IAAK,IAAW,CACxD,GAAI,EAAM,GACV,MAAO,EAAM,MACd,EAAE,CACH,cAAe,GAAM,eAAiB,IAAA,GACtC,gBAAiB,EAAG,gBACpB,KAAM,EAAG,KACV,EACD,CAyDc,EAAA,QAAQ,qCAQR,EAAA,QAAQ,uCAQR,EAAA,QAAQ,qCAOR,EAAA,QAAQ,uCAIR,EAAA,QAAQ,wCAIR,EAAA,QAAQ,yCAmDxB,IAAa,EAAwB,iBAkBrC,SAAgB,EACd,EACe,CAEf,OADI,IAAQ,aAAqB,EAC1B,EAAe,EAAI,EAAE,eAAiB,KAoE/C,SAAgB,EACd,EAC+B,CAC1B,KACL,OAAO,EAAc,KAAM,GAAa,EAAS,MAAQ,EAAI,CAmB/D,SAAgB,EACd,EACe,CACf,IAAM,EAAQ,EAAe,EAAI,CACjC,OAAO,EAAQ,EAAM,aAAe,KAYtC,SAAgB,EACd,EACiB,CACjB,OAAO,EAAe,EAAI,EAAE,MAAA,cAa9B,SAAgB,EACd,EACA,EACe,CAIf,OAHK,EACY,EAAe,EAClB,EAAU,kBAAkB,KAAM,GAAM,EAAE,KAAO,EAAQ,EACzD,OAAS,EAHF"}
@@ -45,7 +45,7 @@ export interface ACPProviderConfig {
45
45
  * ACP server — the codex CLI has no ``acp`` subcommand and exits with
46
46
  * ``Error: stdin is not a terminal`` when spawned without a TTY, which
47
47
  * silently deadlocks the agent-server's ACP handshake. Use
48
- * ``@zed-industries/codex-acp`` (the Zed-shipped wrapper) instead.
48
+ * ``@agentclientprotocol/codex-acp`` (the codex ACP wrapper) instead.
49
49
  */
50
50
  default_command: string[];
51
51
  /**