@openhands/agent-canvas 1.15.0 → 1.17.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 (1277) hide show
  1. package/README.md +15 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{acp-providers-BKvmTf82.js → acp-providers-DrjNsPOH.js} +1 -1
  4. package/build/assets/active-backend-context-rZiLJRUc.js +2 -0
  5. package/build/assets/{agent-context-settings-D3PjSTU1.js → agent-context-settings-CJUrcBut.js} +1 -1
  6. package/build/assets/agent-profiles-service.api-Biieml2L.js +1 -0
  7. package/build/assets/agent-profiles-settings-x6RvPsq7.js +1 -0
  8. package/build/assets/agent-server-client-options-BikiNwTa.js +1 -0
  9. package/build/assets/agent-server-conversation-service.api-DYFsNHKf.js +88 -0
  10. package/build/assets/agent-settings-BJyovpJ_.js +1 -0
  11. package/build/assets/agent-settings-CpY3zObk.js +2 -0
  12. package/build/assets/alert-banner-vARz1idS.js +1 -0
  13. package/build/assets/{api-error-message-BJyfWp6p.js → api-error-message-Ve79qDcN.js} +1 -1
  14. package/build/assets/api-key-entry-screen-CsMuBhoP.js +1 -0
  15. package/build/assets/{app-settings-CbHqzQus.js → app-settings-BaJ7nfHt.js} +1 -1
  16. package/build/assets/automation-detail-CVoGDrKq.js +3 -0
  17. package/build/assets/{automation-export-BRopEHMu.js → automation-export-DxY47m3T.js} +1 -1
  18. package/build/assets/automation-git-sync-CRMP9Bbm.js +1 -0
  19. package/build/assets/automation-setup-route-072beLz1.js +3 -0
  20. package/build/assets/{automation-templates-C_0FZgLG.js → automation-templates-4C4PM8K7.js} +1 -1
  21. package/build/assets/automations-list-xuqTSQL4.js +1 -0
  22. package/build/assets/{back-nav-button-Dm9tIjVf.js → back-nav-button-B8tH0BEp.js} +1 -1
  23. package/build/assets/backend-form-modal-0aJmWdsa.js +1 -0
  24. package/build/assets/{backend-synced-settings-badge-3fOwg6Bd.js → backend-synced-settings-badge-B7rKWBir.js} +1 -1
  25. package/build/assets/{badge-D4SqUCsR.js → badge-CcGx2TaV.js} +1 -1
  26. package/build/assets/{base-modal-C7_BDl_U.js → base-modal-DTULovNc.js} +1 -1
  27. package/build/assets/bot-CLMxGFaq.js +1 -0
  28. package/build/assets/{brand-button-Dxv6PDeN.js → brand-button-DxPO4Lf8.js} +1 -1
  29. package/build/assets/browser-C-_qBasq.js +46 -0
  30. package/build/assets/{browser-tab-BAl4ckJE.js → browser-tab-DZanIw5m.js} +1 -1
  31. package/build/assets/canvas-extension-page-o_cWgE9B.js +1 -0
  32. package/build/assets/canvas-extensions-DSgNlCha.js +1 -0
  33. package/build/assets/canvas-extensions-runtime-DdnkgJXV.js +1 -0
  34. package/build/assets/{chat-send-button-DWwR2cgI.js → chat-send-button-B3SFSIg5.js} +1 -1
  35. package/build/assets/check-fDEfgSzj.js +1 -0
  36. package/build/assets/chevron-down-CFrWHqu8.js +1 -0
  37. package/build/assets/chevron-right-C5roOrJu.js +1 -0
  38. package/build/assets/circle-check-ClTzJTdb.js +1 -0
  39. package/build/assets/{circle-plus-check-toggle-CBh_qomE.js → circle-plus-check-toggle-Fr-h-mbL.js} +1 -1
  40. package/build/assets/{cloud-funnel-analytics-287iIERo.js → cloud-funnel-analytics-BQanUEEC.js} +1 -1
  41. package/build/assets/{cog-C4rrw-ZK.js → cog-VBlRo6iw.js} +1 -1
  42. package/build/assets/command-menu-BT3Ia5Ru.js +1 -0
  43. package/build/assets/commits-tab-2jhtaohl.js +1 -0
  44. package/build/assets/{condenser-settings-BcNmYR4s.js → condenser-settings-eVKFMvap.js} +1 -1
  45. package/build/assets/confirmation-modal-gIFHeZt6.js +1 -0
  46. package/build/assets/{context-menu-list-item-lVYETtY5.js → context-menu-list-item-DDROe12Z.js} +1 -1
  47. package/build/assets/conversation-BnjJSFf5.js +93 -0
  48. package/build/assets/conversation-DZ578rOX.js +1 -0
  49. package/build/assets/conversation-panel-DZ578rOX.js +1 -0
  50. package/build/assets/conversation-state-store-D1_G_9I-.js +1 -0
  51. package/build/assets/{conversation-store-Ca3ghXap.js → conversation-store-DVVfkCsk.js} +1 -1
  52. package/build/assets/{conversation-tab-empty-state-HJtkmHZj.js → conversation-tab-empty-state-DKlzAz5c.js} +1 -1
  53. package/build/assets/{copy-to-clipboard-button-Cjkswvnj.js → copy-to-clipboard-button-B3w0X7WH.js} +1 -1
  54. package/build/assets/{device-verify-EZhHhBT7.js → device-verify-BfkCzyFB.js} +1 -1
  55. package/build/assets/{dropdown-classes-DJe-E6MC.js → dropdown-classes-B9kJVDIk.js} +1 -1
  56. package/build/assets/edit-automation-modal-BwhJ39JT.js +1 -0
  57. package/build/assets/empty-state-RZz0OfnY.js +1 -0
  58. package/build/assets/{entry.client-C7Bi2tkU.js → entry.client-Ds8LVp-E.js} +2 -2
  59. package/build/assets/enum-filter-dropdown-C4pW0ORd.js +1 -0
  60. package/build/assets/{environment-switch-overlay-CEKrFiMw.js → environment-switch-overlay-P2ZAuzov.js} +1 -1
  61. package/build/assets/{error-state-BALXiBNy.js → error-state-B_5cgNPJ.js} +1 -1
  62. package/build/assets/extensions-hub-DsaUr4ca.js +1 -0
  63. package/build/assets/extensions-navigation-CRMZd-FE.js +1 -0
  64. package/build/assets/external-link-DQtv7eTh.js +1 -0
  65. package/build/assets/files-tab-CCgAcVdc.js +1 -0
  66. package/build/assets/{form-control-classes-CGw40z5h.js → form-control-classes-B-z85REi.js} +1 -1
  67. package/build/assets/format-model-name-CasAP3nd.js +1 -0
  68. package/build/assets/get-git-path-EHrSDxTM.js +1 -0
  69. package/build/assets/git-repo-dropdown-D2WEQ97X.js +1 -0
  70. package/build/assets/{git-repo-dropdown-ai8qaNkD.js → git-repo-dropdown-DVeCUUXG.js} +1 -1
  71. package/build/assets/{highlighted-source-view-C3sxykQi.js → highlighted-source-view-DjHO3SdW.js} +1 -1
  72. package/build/assets/home-BorS_vdS.js +1 -0
  73. package/build/assets/home-aIMbHw5M.js +1 -0
  74. package/build/assets/home-automation-run-tooltip-CpHNFiFl.js +1 -0
  75. package/build/assets/home-store-DyXz0w6d.js +1 -0
  76. package/build/assets/hooks-service-C6dpRtZM.js +1 -0
  77. package/build/assets/index-home-zKFuKK2B.js +1 -0
  78. package/build/assets/info-CTIdjttz.js +1 -0
  79. package/build/assets/install-server-modal-DUiZMc8u.js +1 -0
  80. package/build/assets/kebab-menu-item-content-mm04SBD3.js +1 -0
  81. package/build/assets/{key-Cn5za3rg.js → key-CfXbJa8w.js} +1 -1
  82. package/build/assets/{launch-C1ieiOGe.js → launch-BSIf9KEg.js} +1 -1
  83. package/build/assets/list-filter-CNpqTWVY.js +1 -0
  84. package/build/assets/{list-todo-Cuu-STFc.js → list-todo-ByXMdY4W.js} +1 -1
  85. package/build/assets/llm-not-configured-banner-z_QRSeV0.js +27 -0
  86. package/build/assets/llm-settings-B-5AHMiX.js +1 -0
  87. package/build/assets/llm-settings-B3SjHDmA.js +1 -0
  88. package/build/assets/llm-subscription-service-aDNBQ7Gq.js +1 -0
  89. package/build/assets/loader-circle-Dex47vVW.js +1 -0
  90. package/build/assets/{loading-spinner-0L3ZTToZ.js → loading-spinner-DfHI77BA.js} +1 -1
  91. package/build/assets/manage-backends-modal-q1NdFisr.js +1 -0
  92. package/build/assets/manifest-8920b615.js +1 -0
  93. package/build/assets/{manifest-subpage-layout-BGhiUQbA.js → manifest-subpage-layout-BQQy5ipR.js} +1 -1
  94. package/build/assets/{map-provider-B9LTm23I.js → map-provider-DXvssjw9.js} +1 -1
  95. package/build/assets/markdown-renderer-rivLvYh-.js +8 -0
  96. package/build/assets/{mcp-CKbR4Vft.js → mcp-CEXDhQWn.js} +1 -1
  97. package/build/assets/{mcp-marketplace-utils-C13fFccR.js → mcp-marketplace-utils-Cn_NIMWM.js} +1 -1
  98. package/build/assets/mcp-page-LGYIICMG.js +9 -0
  99. package/build/assets/messages-DUSeANAh.js +41 -0
  100. package/build/assets/{modal-body-CMOc2tLl.js → modal-body-DJw4xBki.js} +1 -1
  101. package/build/assets/{modal-classes-BAb4Y_BG.js → modal-classes-Dg0ngBPO.js} +1 -1
  102. package/build/assets/{modal-close-button-CkJ0Ktjj.js → modal-close-button-B9j4nasm.js} +1 -1
  103. package/build/assets/{mouse-pointer-click-CsgRs_-r.js → mouse-pointer-click-DEhsSUpu.js} +1 -1
  104. package/build/assets/onboarding-BjFebfs5.js +1 -0
  105. package/build/assets/onboarding-modal-DDTjOpyd.js +1 -0
  106. package/build/assets/organization-service.api-Cyg1Tn03.js +1 -0
  107. package/build/assets/pencil-D5c47kyN.js +1 -0
  108. package/build/assets/pin-C7vMagvf.js +1 -0
  109. package/build/assets/planner-tab-D8f2Y3rn.js +1 -0
  110. package/build/assets/plug-CeaqeF6u.js +1 -0
  111. package/build/assets/plugins-management-service-Bh_pBuf-.js +1 -0
  112. package/build/assets/plus-B3wvU06-.js +1 -0
  113. package/build/assets/profiles-service.api-BbOK0EkF.js +1 -0
  114. package/build/assets/providers-2gIIkz2N.js +1 -0
  115. package/build/assets/proxy-CBgMd2zf.js +1 -0
  116. package/build/assets/{puzzle-A9pGxxai.js → puzzle-DdAqbUrb.js} +1 -1
  117. package/build/assets/recommended-automations-launcher-YLAQTp4s.js +1 -0
  118. package/build/assets/refresh-cw-DEQdPCpH.js +1 -0
  119. package/build/assets/root-Bye_XmEL.js +2 -0
  120. package/build/assets/root-Cnwwzgo0.css +1 -0
  121. package/build/assets/root-layout-CSAwxBGM.js +2 -0
  122. package/build/assets/schema-field-CK0xYNbO.js +1 -0
  123. package/build/assets/scroll-fade-state-Dt_fx2kf.js +1 -0
  124. package/build/assets/sdk-section-page-Da73Rs_o.js +1 -0
  125. package/build/assets/secret-form-CB2VwYYg.js +1 -0
  126. package/build/assets/secrets-service-Cr8g8xuv.js +1 -0
  127. package/build/assets/{secrets-settings-BizaTEr1.js → secrets-settings-Bh0udeKv.js} +1 -1
  128. package/build/assets/settings-CKqk8ZnH.js +1 -0
  129. package/build/assets/settings-DmyIgRxO.js +1 -0
  130. package/build/assets/{settings-dropdown-input-tM0A0ipy.js → settings-dropdown-input-DVpyD87C.js} +1 -1
  131. package/build/assets/settings-index-BSJUFmjE.js +1 -0
  132. package/build/assets/{settings-input-C03KUoSC.js → settings-input-C0dd8Utu.js} +1 -1
  133. package/build/assets/{settings-list-classes-BJ0g8rWj.js → settings-list-classes-Ds4jPBHK.js} +1 -1
  134. package/build/assets/{settings-modal-AzEF1QPP.js → settings-modal-yStgEh2o.js} +1 -1
  135. package/build/assets/settings-service.api-9_xdv_mh.js +1 -0
  136. package/build/assets/{settings-switch-CQE0EGC-.js → settings-switch-B78Khmyz.js} +1 -1
  137. package/build/assets/{settings-utils-ClYOkbbI.js → settings-utils-8GIIgOQL.js} +1 -1
  138. package/build/assets/shared-conversation-DM96X4KV.js +1 -0
  139. package/build/assets/shield-check-DO7wa_eu.js +1 -0
  140. package/build/assets/{sidebar-layout-D3hE08wK.js → sidebar-layout-EPfWxk11.js} +1 -1
  141. package/build/assets/sidebar-mobile-menu-toggle-D5GR5xT9.js +1 -0
  142. package/build/assets/sidebar-nav-link-_t4_Ef-9.js +1 -0
  143. package/build/assets/{sidebar-onboarding-checklist-storage-3qYflszY.js → sidebar-onboarding-checklist-storage-DbDX-Wvj.js} +1 -1
  144. package/build/assets/sidebar-store-CSDFK0W5.js +1 -0
  145. package/build/assets/{skill-card-pill-row-CFxjoqxn.js → skill-card-pill-row-989y15jV.js} +1 -1
  146. package/build/assets/skill-enablement-DXeaImBz.js +1 -0
  147. package/build/assets/skill-filter-BBeZ4JEP.js +2 -0
  148. package/build/assets/{skill-icon-badge-CPQJ6A-I.js → skill-icon-badge-BDhQ-tQ0.js} +1 -1
  149. package/build/assets/skill-scope-Dz3kPH3P.js +1 -0
  150. package/build/assets/skills-plugins-e3CYGdUJ.js +1 -0
  151. package/build/assets/skills-settings-3e-FuHw_.js +1 -0
  152. package/build/assets/styled-tooltip-Pd22BIvr.js +1 -0
  153. package/build/assets/{task-list-tab-04GNQuii.js → task-list-tab-3Jg8ywch.js} +1 -1
  154. package/build/assets/{terminal-Cj0iHIW7.js → terminal-onXx0_Qz.js} +1 -1
  155. package/build/assets/toggle-switch-lwQtxDcm.js +1 -0
  156. package/build/assets/trash-2-ZhKuTLiz.js +1 -0
  157. package/build/assets/trash-B6OIe4yX.js +1 -0
  158. package/build/assets/triangle-alert-BajLPpQg.js +1 -0
  159. package/build/assets/{typography-SgFy466J.js → typography-HLLg_FAn.js} +1 -1
  160. package/build/assets/usage-tab-Cm-9j3UK.js +1 -0
  161. package/build/assets/use-acp-credential-form-BARcvjYE.js +1 -0
  162. package/build/assets/use-activate-agent-profile-BLKML6vQ.js +1 -0
  163. package/build/assets/use-agent-profiles-1P91KSXz.js +1 -0
  164. package/build/assets/{use-automation-health-BxXdzZMP.js → use-automation-health-BZkQNEA8.js} +1 -1
  165. package/build/assets/use-automation-permissions-B_RpvL-s.js +1 -0
  166. package/build/assets/{use-automations-zYb0dUny.js → use-automations-Cg0PDIZr.js} +1 -1
  167. package/build/assets/{use-can-manage-org-profiles-BWMahtUh.js → use-can-manage-org-profiles-BbN6KfDr.js} +1 -1
  168. package/build/assets/use-canvas-extensions-CFUpHat6.js +1 -0
  169. package/build/assets/{use-cloud-current-user-id-CPHMDG-C.js → use-cloud-current-user-id-Dk0rjr63.js} +1 -1
  170. package/build/assets/use-config-DpafU_QP.js +1 -0
  171. package/build/assets/use-create-conversation-1YgmAHt-.js +1 -0
  172. package/build/assets/use-create-secret-D8p9ybQj.js +1 -0
  173. package/build/assets/{use-get-secrets-BT4ihRwj.js → use-get-secrets-CQ4b0qK8.js} +1 -1
  174. package/build/assets/use-is-authed-BRPjCRKM.js +1 -0
  175. package/build/assets/{use-launch-skill-in-chat-BYjYihBP.js → use-launch-skill-in-chat-DeYa1tFM.js} +1 -1
  176. package/build/assets/use-llm-configured-DGm8FiRR.js +1 -0
  177. package/build/assets/use-llm-profiles-BTTtpW4z.js +1 -0
  178. package/build/assets/use-manifest-capabilities-AOWGcu0j.js +1 -0
  179. package/build/assets/use-onboarding-completion-CoINurkm.js +1 -0
  180. package/build/assets/use-pinned-home-route-D6krwXjy.js +1 -0
  181. package/build/assets/use-plugins-marketplace-mLsIDhBv.js +1 -0
  182. package/build/assets/use-save-agent-profile-CxyO9YG-.js +1 -0
  183. package/build/assets/{use-save-settings-CUZW6yXP.js → use-save-settings-3U5K9-8x.js} +1 -1
  184. package/build/assets/use-settings-Dn00UISA.js +1 -0
  185. package/build/assets/use-settings-nav-items-vrjxTqcu.js +16 -0
  186. package/build/assets/use-tracking-B9prBsrq.js +3 -0
  187. package/build/assets/{use-user-conversation-DT0_QCnL.js → use-user-conversation-ZWlXtbZb.js} +1 -1
  188. package/build/assets/{useInfiniteQuery-CgeUQPfs.js → useInfiniteQuery-BzrRqjLg.js} +1 -1
  189. package/build/assets/{useMutation-DFnzkf6f.js → useMutation-CJuK90oc.js} +1 -1
  190. package/build/assets/{useQueries-BhbrGEf1.js → useQueries-CykmpT-a.js} +1 -1
  191. package/build/assets/{useQuery-BXWbZBZl.js → useQuery-S6j94er1.js} +1 -1
  192. package/build/assets/utils-BOco8mxR.js +1 -0
  193. package/build/assets/{vendor~conversation-panel~conversation-CTvDDiXg.js → vendor~conversation-panel~conversation-4eJ0tml3.js} +1 -1
  194. package/build/assets/{vendor~entry.client-BFE7Llz9.js → vendor~entry.client-CoCfUXUF.js} +1 -1
  195. package/build/assets/{vendor~entry.client-BaKt_PIp.js → vendor~entry.client-DA2izTjq.js} +1 -1
  196. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +2 -0
  197. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js +185 -0
  198. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew3u153i-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-DnDoaYNi.js} +1 -1
  199. package/build/assets/{vendor~index-home~home~conversation-panel~conversation-BTyukeM-.js → vendor~index-home~home~conversation-panel~conversation-CSFLzmTN.js} +1 -1
  200. package/build/assets/vendor~root-layout-n8XCEXG8.js +1 -0
  201. package/build/assets/{vendor~root-layout~conversation-panel~conversation-BYAWJwQX.js → vendor~root-layout~conversation-panel~conversation-3Idg1_U3.js} +1 -1
  202. package/build/assets/{vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-CHaLEBVR.js → vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-DkPlXWl9.js} +1 -1
  203. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-DgQ564nC.js +1 -0
  204. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-CxhwKuAd.js +1 -0
  205. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-Dtu7BpYk.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js} +2 -2
  206. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js +1 -0
  207. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-DonTKfQD.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BPjI-atc.js} +125 -15
  208. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-BgxDvUcf.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C7HiY4Ae.js} +42 -3
  209. package/build/assets/{verification-settings-Bj6bo097.js → verification-settings-u2POabjH.js} +1 -1
  210. package/build/assets/{wrench-hi7Q13dF.js → wrench-CkgI4rxA.js} +1 -1
  211. package/build/assets/x-By6qCmtY.js +1 -0
  212. package/build/index.html +4 -4
  213. package/build/locales/ar/openhands.json +94 -25
  214. package/build/locales/ca/openhands.json +94 -25
  215. package/build/locales/de/openhands.json +94 -25
  216. package/build/locales/en/openhands.json +94 -25
  217. package/build/locales/es/openhands.json +94 -25
  218. package/build/locales/fr/openhands.json +94 -25
  219. package/build/locales/it/openhands.json +94 -25
  220. package/build/locales/ja/openhands.json +94 -25
  221. package/build/locales/ko-KR/openhands.json +94 -25
  222. package/build/locales/no/openhands.json +94 -25
  223. package/build/locales/pt/openhands.json +94 -25
  224. package/build/locales/tr/openhands.json +94 -25
  225. package/build/locales/uk/openhands.json +94 -25
  226. package/build/locales/zh-CN/openhands.json +94 -25
  227. package/build/locales/zh-TW/openhands.json +94 -25
  228. package/config/defaults.json +9 -5
  229. package/dist/api/agent-profiles-service/profile-field-support.d.ts +26 -0
  230. package/dist/api/agent-server-adapter.cjs +3 -3
  231. package/dist/api/agent-server-adapter.cjs.map +1 -1
  232. package/dist/api/agent-server-adapter.d.ts +72 -12
  233. package/dist/api/agent-server-adapter.js +249 -145
  234. package/dist/api/agent-server-adapter.js.map +1 -1
  235. package/dist/api/agent-server-compatibility.cjs +1 -1
  236. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  237. package/dist/api/agent-server-compatibility.d.ts +21 -0
  238. package/dist/api/agent-server-compatibility.js +52 -38
  239. package/dist/api/agent-server-compatibility.js.map +1 -1
  240. package/dist/api/agent-server-config.cjs +1 -1
  241. package/dist/api/agent-server-config.cjs.map +1 -1
  242. package/dist/api/agent-server-config.d.ts +32 -0
  243. package/dist/api/agent-server-config.js +21 -5
  244. package/dist/api/agent-server-config.js.map +1 -1
  245. package/dist/api/automation-service/automation-service.api.cjs +1 -1
  246. package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
  247. package/dist/api/automation-service/automation-service.api.d.ts +2 -2
  248. package/dist/api/automation-service/automation-service.api.js +7 -7
  249. package/dist/api/automation-service/automation-service.api.js.map +1 -1
  250. package/dist/api/canvas-extensions-service.cjs +1 -0
  251. package/dist/api/canvas-extensions-service.d.ts +22 -0
  252. package/dist/api/canvas-extensions-service.js +4 -0
  253. package/dist/api/cloud/conversation-service.api.cjs +1 -1
  254. package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
  255. package/dist/api/cloud/conversation-service.api.d.ts +6 -0
  256. package/dist/api/cloud/conversation-service.api.js +14 -6
  257. package/dist/api/cloud/conversation-service.api.js.map +1 -1
  258. package/dist/api/cloud/provider-connections-service.api.cjs +2 -0
  259. package/dist/api/cloud/provider-connections-service.api.cjs.map +1 -0
  260. package/dist/api/cloud/provider-connections-service.api.d.ts +5 -0
  261. package/dist/api/cloud/provider-connections-service.api.js +50 -0
  262. package/dist/api/cloud/provider-connections-service.api.js.map +1 -0
  263. package/dist/api/cloud/skills-service.api.cjs +1 -1
  264. package/dist/api/cloud/skills-service.api.cjs.map +1 -1
  265. package/dist/api/cloud/skills-service.api.d.ts +10 -0
  266. package/dist/api/cloud/skills-service.api.js +11 -1
  267. package/dist/api/cloud/skills-service.api.js.map +1 -1
  268. package/dist/api/conversation-file-upload.api.cjs +1 -1
  269. package/dist/api/conversation-file-upload.api.js +10 -10
  270. package/dist/api/conversation-metadata-store.cjs +1 -1
  271. package/dist/api/conversation-metadata-store.cjs.map +1 -1
  272. package/dist/api/conversation-metadata-store.d.ts +24 -0
  273. package/dist/api/conversation-metadata-store.js +10 -2
  274. package/dist/api/conversation-metadata-store.js.map +1 -1
  275. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  276. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  277. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +31 -0
  278. package/dist/api/conversation-service/agent-server-conversation-service.api.js +188 -128
  279. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  280. package/dist/api/event-service/event-service.api.cjs +1 -1
  281. package/dist/api/event-service/event-service.api.js +12 -12
  282. package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
  283. package/dist/api/git-service/agent-server-git-service.api.js +8 -8
  284. package/dist/api/hooks-service.cjs +2 -0
  285. package/dist/api/hooks-service.cjs.map +1 -0
  286. package/dist/api/hooks-service.d.ts +13 -0
  287. package/dist/api/hooks-service.js +20 -0
  288. package/dist/api/hooks-service.js.map +1 -0
  289. package/dist/api/provider-connections-service/provider-connections-service.api.cjs +1 -1
  290. package/dist/api/provider-connections-service/provider-connections-service.api.cjs.map +1 -1
  291. package/dist/api/provider-connections-service/provider-connections-service.api.js +25 -16
  292. package/dist/api/provider-connections-service/provider-connections-service.api.js.map +1 -1
  293. package/dist/api/runtime-service/agent-server-runtime-service.cjs +1 -1
  294. package/dist/api/runtime-service/agent-server-runtime-service.js +8 -8
  295. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  296. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  297. package/dist/api/settings-service/settings-service.api.d.ts +5 -2
  298. package/dist/api/settings-service/settings-service.api.js +20 -11
  299. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  300. package/dist/api/skills-service.cjs +1 -1
  301. package/dist/api/skills-service.cjs.map +1 -1
  302. package/dist/api/skills-service.d.ts +7 -0
  303. package/dist/api/skills-service.js +11 -8
  304. package/dist/api/skills-service.js.map +1 -1
  305. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
  306. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
  307. package/dist/components/conversation-events/chat/event-message-components/event-group.cjs +1 -1
  308. package/dist/components/conversation-events/chat/event-message-components/event-group.cjs.map +1 -1
  309. package/dist/components/conversation-events/chat/event-message-components/event-group.js +40 -36
  310. package/dist/components/conversation-events/chat/event-message-components/event-group.js.map +1 -1
  311. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs +1 -1
  312. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs.map +1 -1
  313. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js +2 -1
  314. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js.map +1 -1
  315. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
  316. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
  317. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
  318. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +28 -28
  319. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
  320. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs +1 -1
  321. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs.map +1 -1
  322. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js +2 -1
  323. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js.map +1 -1
  324. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs +1 -1
  325. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs.map +1 -1
  326. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +1 -1
  327. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js +37 -37
  328. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js.map +1 -1
  329. package/dist/components/conversation-events/chat/event-message.cjs +2 -2
  330. package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
  331. package/dist/components/conversation-events/chat/event-message.js +79 -70
  332. package/dist/components/conversation-events/chat/event-message.js.map +1 -1
  333. package/dist/components/conversation-events/chat/messages.cjs +1 -1
  334. package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
  335. package/dist/components/conversation-events/chat/messages.js +28 -27
  336. package/dist/components/conversation-events/chat/messages.js.map +1 -1
  337. package/dist/components/features/automations/automation-card.cjs +1 -1
  338. package/dist/components/features/automations/automation-card.cjs.map +1 -1
  339. package/dist/components/features/automations/automation-card.js +118 -102
  340. package/dist/components/features/automations/automation-card.js.map +1 -1
  341. package/dist/components/features/automations/automation-list-row.cjs +1 -1
  342. package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
  343. package/dist/components/features/automations/automation-list-row.js +88 -77
  344. package/dist/components/features/automations/automation-list-row.js.map +1 -1
  345. package/dist/components/features/automations/detail/detail-header.d.ts +3 -1
  346. package/dist/components/features/automations/detail/run-phase.cjs +2 -0
  347. package/dist/components/features/automations/detail/run-phase.cjs.map +1 -0
  348. package/dist/components/features/automations/detail/run-phase.d.ts +89 -0
  349. package/dist/components/features/automations/detail/run-phase.js +72 -0
  350. package/dist/components/features/automations/detail/run-phase.js.map +1 -0
  351. package/dist/components/features/automations/detail/run-status-badge.cjs +1 -1
  352. package/dist/components/features/automations/detail/run-status-badge.cjs.map +1 -1
  353. package/dist/components/features/automations/detail/run-status-badge.d.ts +2 -2
  354. package/dist/components/features/automations/detail/run-status-badge.js +82 -53
  355. package/dist/components/features/automations/detail/run-status-badge.js.map +1 -1
  356. package/dist/components/features/automations/kebab-menu.cjs +1 -1
  357. package/dist/components/features/automations/kebab-menu.cjs.map +1 -1
  358. package/dist/components/features/automations/kebab-menu.js +9 -5
  359. package/dist/components/features/automations/kebab-menu.js.map +1 -1
  360. package/dist/components/features/automations/recommended-automations-launcher.cjs +1 -1
  361. package/dist/components/features/automations/recommended-automations-launcher.cjs.map +1 -1
  362. package/dist/components/features/automations/recommended-automations-launcher.js +12 -12
  363. package/dist/components/features/automations/recommended-automations-launcher.js.map +1 -1
  364. package/dist/components/features/automations/recommended-automations-section.cjs +1 -1
  365. package/dist/components/features/automations/recommended-automations-section.js +9 -9
  366. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  367. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  368. package/dist/components/features/backends/backend-form-modal.js +5 -11
  369. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  370. package/dist/components/features/backends/backend-selector.cjs +1 -1
  371. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  372. package/dist/components/features/backends/backend-selector.js +133 -122
  373. package/dist/components/features/backends/backend-selector.js.map +1 -1
  374. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  375. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  376. package/dist/components/features/backends/manage-backends-modal.js +29 -29
  377. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  378. package/dist/components/features/canvas-extensions/add-canvas-extension-modal.d.ts +6 -0
  379. package/dist/components/features/canvas-extensions/canvas-extension-card.d.ts +9 -0
  380. package/dist/components/features/canvas-extensions/canvas-extensions-runtime.cjs +2 -0
  381. package/dist/components/features/canvas-extensions/canvas-extensions-runtime.cjs.map +1 -0
  382. package/dist/components/features/canvas-extensions/canvas-extensions-runtime.d.ts +23 -0
  383. package/dist/components/features/canvas-extensions/canvas-extensions-runtime.js +19 -0
  384. package/dist/components/features/canvas-extensions/canvas-extensions-runtime.js.map +1 -0
  385. package/dist/components/features/chat/change-agent-button.cjs +1 -1
  386. package/dist/components/features/chat/change-agent-button.js +4 -4
  387. package/dist/components/features/chat/chat-interface.cjs +2 -2
  388. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  389. package/dist/components/features/chat/chat-interface.js +107 -104
  390. package/dist/components/features/chat/chat-interface.js.map +1 -1
  391. package/dist/components/features/chat/chat-markdown-path-code.cjs +3 -0
  392. package/dist/components/features/chat/chat-markdown-path-code.cjs.map +1 -0
  393. package/dist/components/features/chat/chat-markdown-path-code.d.ts +27 -0
  394. package/dist/components/features/chat/chat-markdown-path-code.js +72 -0
  395. package/dist/components/features/chat/chat-markdown-path-code.js.map +1 -0
  396. package/dist/components/features/chat/chat-message.cjs +1 -1
  397. package/dist/components/features/chat/chat-message.cjs.map +1 -1
  398. package/dist/components/features/chat/chat-message.d.ts +2 -1
  399. package/dist/components/features/chat/chat-message.js +88 -79
  400. package/dist/components/features/chat/chat-message.js.map +1 -1
  401. package/dist/components/features/chat/components/context-window-meter.cjs +1 -1
  402. package/dist/components/features/chat/components/context-window-meter.js +4 -4
  403. package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
  404. package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
  405. package/dist/components/features/chat/generic-event-message.cjs +1 -1
  406. package/dist/components/features/chat/generic-event-message.cjs.map +1 -1
  407. package/dist/components/features/chat/generic-event-message.d.ts +2 -1
  408. package/dist/components/features/chat/generic-event-message.js +41 -22
  409. package/dist/components/features/chat/generic-event-message.js.map +1 -1
  410. package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
  411. package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
  412. package/dist/components/features/chat/interactive-chat-box.js +20 -19
  413. package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
  414. package/dist/components/features/chat/path-component.cjs +1 -1
  415. package/dist/components/features/chat/path-component.cjs.map +1 -1
  416. package/dist/components/features/chat/path-component.d.ts +8 -2
  417. package/dist/components/features/chat/path-component.js +33 -21
  418. package/dist/components/features/chat/path-component.js.map +1 -1
  419. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs +1 -1
  420. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs.map +1 -1
  421. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js +38 -43
  422. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js.map +1 -1
  423. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs +1 -1
  424. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs.map +1 -1
  425. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +8 -5
  426. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js +22 -16
  427. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js.map +1 -1
  428. package/dist/components/features/chat/user-message-body.cjs +1 -1
  429. package/dist/components/features/chat/user-message-body.cjs.map +1 -1
  430. package/dist/components/features/chat/user-message-body.d.ts +4 -0
  431. package/dist/components/features/chat/user-message-body.js +30 -24
  432. package/dist/components/features/chat/user-message-body.js.map +1 -1
  433. package/dist/components/features/conversation/conversation-overview-git-section.cjs +1 -1
  434. package/dist/components/features/conversation/conversation-overview-git-section.js +4 -4
  435. package/dist/components/features/conversation/conversation-overview-skills-panel.cjs +1 -1
  436. package/dist/components/features/conversation/conversation-overview-skills-panel.cjs.map +1 -1
  437. package/dist/components/features/conversation/conversation-overview-skills-panel.js +63 -81
  438. package/dist/components/features/conversation/conversation-overview-skills-panel.js.map +1 -1
  439. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
  440. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
  441. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +77 -78
  442. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
  443. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
  444. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
  445. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +96 -96
  446. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
  447. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.cjs +1 -1
  448. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.cjs.map +1 -1
  449. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.d.ts +1 -1
  450. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.js +3 -3
  451. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.js.map +1 -1
  452. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs +2 -0
  453. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs.map +1 -0
  454. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.d.ts +21 -0
  455. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js +239 -0
  456. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js.map +1 -0
  457. package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs +2 -0
  458. package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs.map +1 -0
  459. package/dist/components/features/conversation-panel/conversation-active-tag-filters.d.ts +28 -0
  460. package/dist/components/features/conversation-panel/conversation-active-tag-filters.js +69 -0
  461. package/dist/components/features/conversation-panel/conversation-active-tag-filters.js.map +1 -0
  462. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
  463. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
  464. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +2 -1
  465. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +19 -18
  466. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
  467. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
  468. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
  469. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +2 -1
  470. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +91 -80
  471. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
  472. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs +1 -1
  473. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs.map +1 -1
  474. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js +1 -1
  475. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js.map +1 -1
  476. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
  477. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
  478. package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +7 -1
  479. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +87 -81
  480. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
  481. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs +1 -1
  482. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs.map +1 -1
  483. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.d.ts +2 -1
  484. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js +1 -1
  485. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js.map +1 -1
  486. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs +1 -1
  487. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs.map +1 -1
  488. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.d.ts +2 -1
  489. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js +2 -1
  490. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js.map +1 -1
  491. package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs +2 -0
  492. package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs.map +1 -0
  493. package/dist/components/features/conversation-panel/conversation-layouts-menu.d.ts +29 -0
  494. package/dist/components/features/conversation-panel/conversation-layouts-menu.js +177 -0
  495. package/dist/components/features/conversation-panel/conversation-layouts-menu.js.map +1 -0
  496. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
  497. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
  498. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +37 -0
  499. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +85 -45
  500. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
  501. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  502. package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
  503. package/dist/components/features/conversation-panel/conversation-panel.js +296 -290
  504. package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
  505. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs +2 -0
  506. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs.map +1 -0
  507. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.d.ts +22 -0
  508. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js +153 -0
  509. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js.map +1 -0
  510. package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs +2 -0
  511. package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs.map +1 -0
  512. package/dist/components/features/conversation-panel/hide-older-conversations-row.d.ts +6 -0
  513. package/dist/components/features/conversation-panel/hide-older-conversations-row.js +65 -0
  514. package/dist/components/features/conversation-panel/hide-older-conversations-row.js.map +1 -0
  515. package/dist/components/features/conversation-panel/menu-row.cjs +1 -1
  516. package/dist/components/features/conversation-panel/menu-row.cjs.map +1 -1
  517. package/dist/components/features/conversation-panel/menu-row.d.ts +11 -1
  518. package/dist/components/features/conversation-panel/menu-row.js +27 -16
  519. package/dist/components/features/conversation-panel/menu-row.js.map +1 -1
  520. package/dist/components/features/conversation-panel/skills-modal.cjs +1 -1
  521. package/dist/components/features/conversation-panel/skills-modal.cjs.map +1 -1
  522. package/dist/components/features/conversation-panel/skills-modal.js +29 -28
  523. package/dist/components/features/conversation-panel/skills-modal.js.map +1 -1
  524. package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
  525. package/dist/components/features/files-tab/file-content-viewer.js +5 -5
  526. package/dist/components/features/home/featured-automations/automation-health-indicator.cjs +1 -1
  527. package/dist/components/features/home/featured-automations/automation-health-indicator.cjs.map +1 -1
  528. package/dist/components/features/home/featured-automations/automation-health-indicator.js +1 -1
  529. package/dist/components/features/home/featured-automations/automation-health-indicator.js.map +1 -1
  530. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs +1 -1
  531. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs.map +1 -1
  532. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +4 -3
  533. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js +22 -25
  534. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js.map +1 -1
  535. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs +1 -1
  536. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs.map +1 -1
  537. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +1 -1
  538. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js +15 -15
  539. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js.map +1 -1
  540. package/dist/components/features/home/featured-automations/automation-run-health.cjs +1 -1
  541. package/dist/components/features/home/featured-automations/automation-run-health.cjs.map +1 -1
  542. package/dist/components/features/home/featured-automations/automation-run-health.d.ts +5 -3
  543. package/dist/components/features/home/featured-automations/automation-run-health.js +30 -23
  544. package/dist/components/features/home/featured-automations/automation-run-health.js.map +1 -1
  545. package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +3 -2
  546. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
  547. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
  548. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +1 -1
  549. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +59 -37
  550. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
  551. package/dist/components/features/manifest/manifest-form-field.d.ts +3 -1
  552. package/dist/components/features/manifest/manifest-review-step.d.ts +3 -1
  553. package/dist/components/features/onboarding/onboarding-host.d.ts +3 -4
  554. package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +5 -9
  555. package/dist/components/features/settings/acp-auth-status-banner.d.ts +23 -6
  556. package/dist/components/features/settings/cloud-settings-link.cjs +1 -1
  557. package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
  558. package/dist/components/features/settings/cloud-settings-link.js +5 -3
  559. package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
  560. package/dist/components/features/settings/integrations-settings-link.cjs +1 -1
  561. package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -1
  562. package/dist/components/features/settings/integrations-settings-link.d.ts +3 -1
  563. package/dist/components/features/settings/integrations-settings-link.js +20 -17
  564. package/dist/components/features/settings/integrations-settings-link.js.map +1 -1
  565. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  566. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +2 -1
  567. package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +2 -2
  568. package/dist/components/features/settings/llm-profiles/provider-connection-modal.cjs +1 -1
  569. package/dist/components/features/settings/llm-profiles/provider-connection-modal.js +3 -0
  570. package/dist/components/features/settings/sdk-settings/field-help.cjs +1 -1
  571. package/dist/components/features/settings/sdk-settings/field-help.cjs.map +1 -1
  572. package/dist/components/features/settings/sdk-settings/field-help.d.ts +1 -1
  573. package/dist/components/features/settings/sdk-settings/field-help.js +1 -1
  574. package/dist/components/features/settings/sdk-settings/field-help.js.map +1 -1
  575. package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs +1 -1
  576. package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs.map +1 -1
  577. package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +8 -7
  578. package/dist/components/features/settings/sdk-settings/sdk-section-page.js +172 -142
  579. package/dist/components/features/settings/sdk-settings/sdk-section-page.js.map +1 -1
  580. package/dist/components/features/settings/secrets-settings/secret-form.cjs +1 -1
  581. package/dist/components/features/settings/secrets-settings/secret-form.cjs.map +1 -1
  582. package/dist/components/features/settings/secrets-settings/secret-form.js +38 -25
  583. package/dist/components/features/settings/secrets-settings/secret-form.js.map +1 -1
  584. package/dist/components/features/settings/settings-dropdown-input.cjs +1 -1
  585. package/dist/components/features/settings/settings-dropdown-input.js +6 -6
  586. package/dist/components/features/sidebar/sidebar-nav-link.cjs +1 -1
  587. package/dist/components/features/sidebar/sidebar-nav-link.cjs.map +1 -1
  588. package/dist/components/features/sidebar/sidebar-nav-link.d.ts +10 -1
  589. package/dist/components/features/sidebar/sidebar-nav-link.js +54 -36
  590. package/dist/components/features/sidebar/sidebar-nav-link.js.map +1 -1
  591. package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
  592. package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
  593. package/dist/components/features/sidebar/sidebar-rail-body.d.ts +3 -1
  594. package/dist/components/features/sidebar/sidebar-rail-body.js +98 -58
  595. package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
  596. package/dist/components/features/sidebar/sidebar.cjs +1 -1
  597. package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
  598. package/dist/components/features/sidebar/sidebar.js +44 -43
  599. package/dist/components/features/sidebar/sidebar.js.map +1 -1
  600. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs +1 -1
  601. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js +3 -3
  602. package/dist/components/features/skills/build-skill-pills.cjs +1 -1
  603. package/dist/components/features/skills/build-skill-pills.cjs.map +1 -1
  604. package/dist/components/features/skills/build-skill-pills.js +60 -52
  605. package/dist/components/features/skills/build-skill-pills.js.map +1 -1
  606. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  607. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  608. package/dist/components/features/skills/extensions-navigation.js +54 -43
  609. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  610. package/dist/components/features/skills/skill-filter.cjs +1 -1
  611. package/dist/components/features/skills/skill-filter.cjs.map +1 -1
  612. package/dist/components/features/skills/skill-filter.d.ts +8 -3
  613. package/dist/components/features/skills/skill-filter.js +69 -52
  614. package/dist/components/features/skills/skill-filter.js.map +1 -1
  615. package/dist/components/shared/buttons/styled-tooltip.cjs +1 -1
  616. package/dist/components/shared/buttons/styled-tooltip.cjs.map +1 -1
  617. package/dist/components/shared/buttons/styled-tooltip.d.ts +2 -1
  618. package/dist/components/shared/buttons/styled-tooltip.js +2 -1
  619. package/dist/components/shared/buttons/styled-tooltip.js.map +1 -1
  620. package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
  621. package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
  622. package/dist/components/shared/filters/enum-filter-dropdown.d.ts +5 -1
  623. package/dist/components/shared/filters/enum-filter-dropdown.js +14 -14
  624. package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
  625. package/dist/components/shared/modals/confirmation-modal.cjs +1 -1
  626. package/dist/components/shared/modals/confirmation-modal.cjs.map +1 -1
  627. package/dist/components/shared/modals/confirmation-modal.d.ts +2 -1
  628. package/dist/components/shared/modals/confirmation-modal.js +8 -8
  629. package/dist/components/shared/modals/confirmation-modal.js.map +1 -1
  630. package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
  631. package/dist/components/shared/modals/settings/model-selector.js +27 -27
  632. package/dist/components/shared/modals/settings/settings-form.cjs +1 -1
  633. package/dist/components/shared/modals/settings/settings-form.js +8 -8
  634. package/dist/config/defaults.cjs +1 -1
  635. package/dist/config/defaults.cjs.map +1 -1
  636. package/dist/config/defaults.js +9 -5
  637. package/dist/config/defaults.js.map +1 -1
  638. package/dist/constants/settings-nav.d.ts +8 -0
  639. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  640. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  641. package/dist/contexts/conversation-websocket-context.d.ts +5 -0
  642. package/dist/contexts/conversation-websocket-context.js +194 -198
  643. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  644. package/dist/contexts/websocket-provider-wrapper.cjs +1 -1
  645. package/dist/contexts/websocket-provider-wrapper.cjs.map +1 -1
  646. package/dist/contexts/websocket-provider-wrapper.js +31 -15
  647. package/dist/contexts/websocket-provider-wrapper.js.map +1 -1
  648. package/dist/extensions/canvas-extension-module-loader.d.ts +11 -0
  649. package/dist/hooks/chat/record-model-switch-message.cjs +1 -1
  650. package/dist/hooks/chat/record-model-switch-message.cjs.map +1 -1
  651. package/dist/hooks/chat/record-model-switch-message.d.ts +31 -0
  652. package/dist/hooks/chat/record-model-switch-message.js +25 -12
  653. package/dist/hooks/chat/record-model-switch-message.js.map +1 -1
  654. package/dist/hooks/chat/use-plan-mode-interceptor.cjs +2 -0
  655. package/dist/hooks/chat/use-plan-mode-interceptor.cjs.map +1 -0
  656. package/dist/hooks/chat/use-plan-mode-interceptor.d.ts +16 -0
  657. package/dist/hooks/chat/use-plan-mode-interceptor.js +43 -0
  658. package/dist/hooks/chat/use-plan-mode-interceptor.js.map +1 -0
  659. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  660. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  661. package/dist/hooks/mutation/use-create-conversation.js +5 -1
  662. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  663. package/dist/hooks/mutation/use-manage-canvas-extensions.d.ts +12 -0
  664. package/dist/hooks/mutation/use-read-conversation-file.cjs +1 -1
  665. package/dist/hooks/mutation/use-read-conversation-file.cjs.map +1 -1
  666. package/dist/hooks/mutation/use-read-conversation-file.js +11 -4
  667. package/dist/hooks/mutation/use-read-conversation-file.js.map +1 -1
  668. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  669. package/dist/hooks/mutation/use-save-settings.js +3 -3
  670. package/dist/hooks/mutation/use-switch-llm-profile.cjs +1 -1
  671. package/dist/hooks/mutation/use-switch-llm-profile.cjs.map +1 -1
  672. package/dist/hooks/mutation/use-switch-llm-profile.js +13 -25
  673. package/dist/hooks/mutation/use-switch-llm-profile.js.map +1 -1
  674. package/dist/hooks/mutation/use-update-conversation-tags.cjs +2 -0
  675. package/dist/hooks/mutation/use-update-conversation-tags.cjs.map +1 -0
  676. package/dist/hooks/mutation/use-update-conversation-tags.d.ts +8 -0
  677. package/dist/hooks/mutation/use-update-conversation-tags.js +45 -0
  678. package/dist/hooks/mutation/use-update-conversation-tags.js.map +1 -0
  679. package/dist/hooks/query/concurrency-limiter.cjs +2 -0
  680. package/dist/hooks/query/concurrency-limiter.cjs.map +1 -0
  681. package/dist/hooks/query/concurrency-limiter.d.ts +22 -0
  682. package/dist/hooks/query/concurrency-limiter.js +29 -0
  683. package/dist/hooks/query/concurrency-limiter.js.map +1 -0
  684. package/dist/hooks/query/query-keys.cjs +1 -1
  685. package/dist/hooks/query/query-keys.cjs.map +1 -1
  686. package/dist/hooks/query/query-keys.d.ts +10 -0
  687. package/dist/hooks/query/query-keys.js +2 -2
  688. package/dist/hooks/query/query-keys.js.map +1 -1
  689. package/dist/hooks/query/use-active-conversation.cjs +1 -1
  690. package/dist/hooks/query/use-active-conversation.js +4 -4
  691. package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
  692. package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
  693. package/dist/hooks/query/use-automation-sdk-version.d.ts +0 -1
  694. package/dist/hooks/query/use-automation-sdk-version.js +30 -55
  695. package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
  696. package/dist/hooks/query/use-automations.cjs.map +1 -1
  697. package/dist/hooks/query/use-automations.js.map +1 -1
  698. package/dist/hooks/query/use-backends-health.cjs +1 -1
  699. package/dist/hooks/query/use-backends-health.cjs.map +1 -1
  700. package/dist/hooks/query/use-backends-health.d.ts +1 -1
  701. package/dist/hooks/query/use-backends-health.js +50 -64
  702. package/dist/hooks/query/use-backends-health.js.map +1 -1
  703. package/dist/hooks/query/use-canvas-extensions.cjs +1 -0
  704. package/dist/hooks/query/use-canvas-extensions.d.ts +5 -0
  705. package/dist/hooks/query/use-canvas-extensions.js +3 -0
  706. package/dist/hooks/query/use-commit-changes.cjs +1 -1
  707. package/dist/hooks/query/use-commit-changes.js +4 -4
  708. package/dist/hooks/query/use-conversation-skills.cjs +1 -1
  709. package/dist/hooks/query/use-conversation-skills.cjs.map +1 -1
  710. package/dist/hooks/query/use-conversation-skills.d.ts +14 -5
  711. package/dist/hooks/query/use-conversation-skills.js +20 -4
  712. package/dist/hooks/query/use-conversation-skills.js.map +1 -1
  713. package/dist/hooks/query/use-latest-automation-runs.cjs +1 -1
  714. package/dist/hooks/query/use-latest-automation-runs.js +1 -0
  715. package/dist/hooks/query/use-paginated-conversations.cjs +1 -1
  716. package/dist/hooks/query/use-paginated-conversations.cjs.map +1 -1
  717. package/dist/hooks/query/use-paginated-conversations.js +19 -16
  718. package/dist/hooks/query/use-paginated-conversations.js.map +1 -1
  719. package/dist/hooks/query/use-provider-connections.cjs +1 -1
  720. package/dist/hooks/query/use-provider-connections.cjs.map +1 -1
  721. package/dist/hooks/query/use-provider-connections.d.ts +6 -3
  722. package/dist/hooks/query/use-provider-connections.js +7 -3
  723. package/dist/hooks/query/use-provider-connections.js.map +1 -1
  724. package/dist/hooks/query/use-search-providers.cjs +1 -1
  725. package/dist/hooks/query/use-search-providers.cjs.map +1 -1
  726. package/dist/hooks/query/use-search-providers.js +17 -10
  727. package/dist/hooks/query/use-search-providers.js.map +1 -1
  728. package/dist/hooks/query/use-sub-conversations.cjs +1 -1
  729. package/dist/hooks/query/use-sub-conversations.cjs.map +1 -1
  730. package/dist/hooks/query/use-sub-conversations.js +16 -16
  731. package/dist/hooks/query/use-sub-conversations.js.map +1 -1
  732. package/dist/hooks/query/use-unified-get-git-changes.cjs +1 -1
  733. package/dist/hooks/query/use-unified-get-git-changes.js +4 -4
  734. package/dist/hooks/query/use-unified-git-commits.cjs +1 -1
  735. package/dist/hooks/query/use-unified-git-commits.js +4 -4
  736. package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
  737. package/dist/hooks/query/use-unified-git-diff.js +4 -4
  738. package/dist/hooks/query/use-unified-vscode-url.cjs +1 -1
  739. package/dist/hooks/query/use-unified-vscode-url.cjs.map +1 -1
  740. package/dist/hooks/query/use-unified-vscode-url.d.ts +1 -0
  741. package/dist/hooks/query/use-unified-vscode-url.js +40 -26
  742. package/dist/hooks/query/use-unified-vscode-url.js.map +1 -1
  743. package/dist/hooks/query/use-workspace-file-content.cjs +1 -1
  744. package/dist/hooks/query/use-workspace-file-content.js +5 -5
  745. package/dist/hooks/query/use-workspace-files.cjs +1 -1
  746. package/dist/hooks/query/use-workspace-files.js +6 -6
  747. package/dist/hooks/use-acp-credential-form.d.ts +6 -0
  748. package/dist/hooks/use-acp-model-context.cjs +1 -1
  749. package/dist/hooks/use-acp-model-context.js +3 -3
  750. package/dist/hooks/use-agent-state.cjs +1 -1
  751. package/dist/hooks/use-agent-state.cjs.map +1 -1
  752. package/dist/hooks/use-agent-state.d.ts +17 -1
  753. package/dist/hooks/use-agent-state.js +19 -9
  754. package/dist/hooks/use-agent-state.js.map +1 -1
  755. package/dist/hooks/use-automation-permissions.cjs +2 -0
  756. package/dist/hooks/use-automation-permissions.cjs.map +1 -0
  757. package/dist/hooks/use-automation-permissions.d.ts +43 -0
  758. package/dist/hooks/use-automation-permissions.js +52 -0
  759. package/dist/hooks/use-automation-permissions.js.map +1 -0
  760. package/dist/hooks/use-chat-input-model-state.cjs +1 -1
  761. package/dist/hooks/use-chat-input-model-state.js +3 -3
  762. package/dist/hooks/use-conversation-overview-git-diff-stats.cjs +1 -1
  763. package/dist/hooks/use-conversation-overview-git-diff-stats.js +4 -4
  764. package/dist/hooks/use-handle-plan-click.cjs +1 -1
  765. package/dist/hooks/use-handle-plan-click.cjs.map +1 -1
  766. package/dist/hooks/use-handle-plan-click.d.ts +3 -1
  767. package/dist/hooks/use-handle-plan-click.js +85 -26
  768. package/dist/hooks/use-handle-plan-click.js.map +1 -1
  769. package/dist/hooks/use-home-automation-actions.cjs +1 -1
  770. package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
  771. package/dist/hooks/use-home-automation-actions.js +1 -0
  772. package/dist/hooks/use-home-automation-actions.js.map +1 -1
  773. package/dist/hooks/use-llm-configured.cjs +1 -1
  774. package/dist/hooks/use-llm-configured.js +3 -3
  775. package/dist/hooks/use-manifest-preflight.d.ts +1 -1
  776. package/dist/hooks/use-pinned-home-route.cjs +2 -0
  777. package/dist/hooks/use-pinned-home-route.cjs.map +1 -0
  778. package/dist/hooks/use-pinned-home-route.d.ts +33 -0
  779. package/dist/hooks/use-pinned-home-route.js +34 -0
  780. package/dist/hooks/use-pinned-home-route.js.map +1 -0
  781. package/dist/hooks/use-skill-enablement.cjs +2 -0
  782. package/dist/hooks/use-skill-enablement.cjs.map +1 -0
  783. package/dist/hooks/use-skill-enablement.d.ts +14 -0
  784. package/dist/hooks/use-skill-enablement.js +80 -0
  785. package/dist/hooks/use-skill-enablement.js.map +1 -0
  786. package/dist/hooks/use-unified-websocket-status.cjs +1 -1
  787. package/dist/hooks/use-unified-websocket-status.cjs.map +1 -1
  788. package/dist/hooks/use-unified-websocket-status.d.ts +7 -0
  789. package/dist/hooks/use-unified-websocket-status.js +5 -1
  790. package/dist/hooks/use-unified-websocket-status.js.map +1 -1
  791. package/dist/i18n/declaration.cjs +1 -1
  792. package/dist/i18n/declaration.cjs.map +1 -1
  793. package/dist/i18n/declaration.d.ts +83 -14
  794. package/dist/i18n/declaration.js +1 -1
  795. package/dist/i18n/declaration.js.map +1 -1
  796. package/dist/i18n/translation.cjs +3 -3
  797. package/dist/i18n/translation.cjs.map +1 -1
  798. package/dist/i18n/translation.js +1575 -402
  799. package/dist/i18n/translation.js.map +1 -1
  800. package/dist/index.cjs +1 -1
  801. package/dist/index.js +15 -14
  802. package/dist/lib/index.cjs +1 -1
  803. package/dist/lib/index.d.ts +1 -0
  804. package/dist/lib/index.js +1 -0
  805. package/dist/locales/ar/openhands.json +94 -25
  806. package/dist/locales/ca/openhands.json +94 -25
  807. package/dist/locales/de/openhands.json +94 -25
  808. package/dist/locales/en/openhands.json +94 -25
  809. package/dist/locales/es/openhands.json +94 -25
  810. package/dist/locales/fr/openhands.json +94 -25
  811. package/dist/locales/it/openhands.json +94 -25
  812. package/dist/locales/ja/openhands.json +94 -25
  813. package/dist/locales/ko-KR/openhands.json +94 -25
  814. package/dist/locales/no/openhands.json +94 -25
  815. package/dist/locales/pt/openhands.json +94 -25
  816. package/dist/locales/tr/openhands.json +94 -25
  817. package/dist/locales/uk/openhands.json +94 -25
  818. package/dist/locales/zh-CN/openhands.json +94 -25
  819. package/dist/locales/zh-TW/openhands.json +94 -25
  820. package/dist/manifests/automation-insights.cjs.map +1 -1
  821. package/dist/manifests/automation-insights.d.ts +10 -2
  822. package/dist/manifests/automation-insights.js.map +1 -1
  823. package/dist/manifests/automation-interface.cjs +1 -1
  824. package/dist/manifests/automation-interface.cjs.map +1 -1
  825. package/dist/manifests/automation-interface.d.ts +6 -0
  826. package/dist/manifests/automation-interface.js +11 -8
  827. package/dist/manifests/automation-interface.js.map +1 -1
  828. package/dist/manifests/automation-setup.cjs +1 -1
  829. package/dist/manifests/automation-setup.cjs.map +1 -1
  830. package/dist/manifests/automation-setup.d.ts +9 -16
  831. package/dist/manifests/automation-setup.js +17 -7
  832. package/dist/manifests/automation-setup.js.map +1 -1
  833. package/dist/manifests/manifest-actions.d.ts +1 -1
  834. package/dist/manifests/manifest-capabilities.d.ts +3 -1
  835. package/dist/manifests/manifest-local-validation.cjs +2 -0
  836. package/dist/manifests/manifest-local-validation.cjs.map +1 -0
  837. package/dist/manifests/manifest-local-validation.d.ts +15 -11
  838. package/dist/manifests/manifest-local-validation.js +8 -0
  839. package/dist/manifests/manifest-local-validation.js.map +1 -0
  840. package/dist/manifests/manifest-template.cjs +2 -0
  841. package/dist/manifests/manifest-template.cjs.map +1 -0
  842. package/dist/manifests/manifest-template.d.ts +4 -4
  843. package/dist/manifests/manifest-template.js +12 -0
  844. package/dist/manifests/manifest-template.js.map +1 -0
  845. package/dist/manifests/manifest-validation.cjs +1 -1
  846. package/dist/manifests/manifest-validation.cjs.map +1 -1
  847. package/dist/manifests/manifest-validation.js +106 -28
  848. package/dist/manifests/manifest-validation.js.map +1 -1
  849. package/dist/manifests/types.cjs.map +1 -1
  850. package/dist/manifests/types.d.ts +39 -4
  851. package/dist/manifests/types.js.map +1 -1
  852. package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs +45 -4
  853. package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs.map +1 -1
  854. package/dist/node_modules/@openhands/extensions/automations/bundle-index.js +1 -1
  855. package/dist/node_modules/@openhands/extensions/automations/bundle-index.js.map +1 -1
  856. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs +8 -0
  857. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs.map +1 -0
  858. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js +221 -0
  859. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js.map +1 -0
  860. package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs +1 -1
  861. package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs.map +1 -1
  862. package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js +5 -0
  863. package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js.map +1 -1
  864. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +2 -2
  865. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -1
  866. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +6 -1
  867. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js.map +1 -1
  868. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +2 -2
  869. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -1
  870. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +6 -1
  871. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -1
  872. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs +1 -1
  873. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs.map +1 -1
  874. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js +5 -0
  875. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js.map +1 -1
  876. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.cjs +9 -0
  877. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.cjs.map +1 -0
  878. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.js +21 -0
  879. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.js.map +1 -0
  880. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.cjs +9 -0
  881. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.cjs.map +1 -0
  882. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.js +21 -0
  883. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.js.map +1 -0
  884. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.cjs +9 -0
  885. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.cjs.map +1 -0
  886. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.js +21 -0
  887. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.js.map +1 -0
  888. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.cjs +9 -0
  889. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.cjs.map +1 -0
  890. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.js +21 -0
  891. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.js.map +1 -0
  892. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.cjs +9 -0
  893. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.cjs.map +1 -0
  894. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.js +21 -0
  895. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.js.map +1 -0
  896. package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.cjs +1 -1
  897. package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.cjs.map +1 -1
  898. package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.js +5 -0
  899. package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.js.map +1 -1
  900. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs +30 -0
  901. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs.map +1 -0
  902. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js +65 -0
  903. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js.map +1 -0
  904. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
  905. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
  906. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +28 -14
  907. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
  908. package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
  909. package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
  910. package/dist/node_modules/@openhands/extensions/automations/interface.js +2 -1
  911. package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
  912. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs +1 -1
  913. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs.map +1 -1
  914. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js +2 -2
  915. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js.map +1 -1
  916. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +2 -0
  917. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +1 -0
  918. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +59 -0
  919. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +1 -0
  920. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
  921. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
  922. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +1 -1
  923. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
  924. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
  925. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
  926. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +74 -72
  927. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
  928. package/dist/node_modules/@openhands/extensions/skills/index.cjs +42 -3
  929. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  930. package/dist/node_modules/@openhands/extensions/skills/index.js +22 -3
  931. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  932. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.cjs +1 -1
  933. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.js +1 -1
  934. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs +1 -1
  935. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs.map +1 -1
  936. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js +8 -7
  937. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js.map +1 -1
  938. package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
  939. package/dist/node_modules/@openhands/typescript-client/dist/index.js +2 -2
  940. package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs +1 -1
  941. package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js +1 -1
  942. package/dist/node_modules/lucide-react/dist/esm/icons/blocks.cjs +2 -0
  943. package/dist/node_modules/lucide-react/dist/esm/icons/blocks.cjs.map +1 -0
  944. package/dist/node_modules/lucide-react/dist/esm/icons/blocks.js +16 -0
  945. package/dist/node_modules/lucide-react/dist/esm/icons/blocks.js.map +1 -0
  946. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs +2 -0
  947. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs.map +1 -0
  948. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js +21 -0
  949. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js.map +1 -0
  950. package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.cjs +2 -0
  951. package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.cjs.map +1 -0
  952. package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.js +23 -0
  953. package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.js.map +1 -0
  954. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs +2 -0
  955. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs.map +1 -0
  956. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js +23 -0
  957. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js.map +1 -0
  958. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs +2 -0
  959. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs.map +1 -0
  960. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js +43 -0
  961. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js.map +1 -0
  962. package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs +2 -0
  963. package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs.map +1 -0
  964. package/dist/node_modules/lucide-react/dist/esm/icons/tags.js +22 -0
  965. package/dist/node_modules/lucide-react/dist/esm/icons/tags.js.map +1 -0
  966. package/dist/package.cjs +1 -1
  967. package/dist/package.cjs.map +1 -1
  968. package/dist/package.js +5 -5
  969. package/dist/package.js.map +1 -1
  970. package/dist/routes/agent-settings.d.ts +12 -0
  971. package/dist/routes/app-settings.cjs +1 -1
  972. package/dist/routes/app-settings.cjs.map +1 -1
  973. package/dist/routes/app-settings.js +11 -11
  974. package/dist/routes/files-tab.cjs +1 -1
  975. package/dist/routes/files-tab.cjs.map +1 -1
  976. package/dist/routes/files-tab.js +14 -14
  977. package/dist/routes/files-tab.js.map +1 -1
  978. package/dist/routes/llm-settings.cjs +1 -1
  979. package/dist/routes/llm-settings.cjs.map +1 -1
  980. package/dist/routes/llm-settings.d.ts +3 -1
  981. package/dist/routes/llm-settings.js +100 -91
  982. package/dist/routes/llm-settings.js.map +1 -1
  983. package/dist/routes/planner-tab.cjs +1 -1
  984. package/dist/routes/planner-tab.cjs.map +1 -1
  985. package/dist/routes/planner-tab.js +44 -28
  986. package/dist/routes/planner-tab.js.map +1 -1
  987. package/dist/services/canvas-ui.cjs +1 -1
  988. package/dist/services/canvas-ui.cjs.map +1 -1
  989. package/dist/services/canvas-ui.d.ts +5 -0
  990. package/dist/services/canvas-ui.js +24 -10
  991. package/dist/services/canvas-ui.js.map +1 -1
  992. package/dist/services/settings.cjs +1 -1
  993. package/dist/services/settings.cjs.map +1 -1
  994. package/dist/services/settings.js +3 -2
  995. package/dist/services/settings.js.map +1 -1
  996. package/dist/services/telemetry.cjs +1 -1
  997. package/dist/services/telemetry.cjs.map +1 -1
  998. package/dist/services/telemetry.d.ts +5 -0
  999. package/dist/services/telemetry.js +122 -115
  1000. package/dist/services/telemetry.js.map +1 -1
  1001. package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
  1002. package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
  1003. package/dist/stores/conversation-panel-preferences-store.d.ts +32 -5
  1004. package/dist/stores/conversation-panel-preferences-store.js +29 -12
  1005. package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
  1006. package/dist/stores/conversation-state-store.cjs +1 -1
  1007. package/dist/stores/conversation-state-store.cjs.map +1 -1
  1008. package/dist/stores/conversation-state-store.d.ts +9 -3
  1009. package/dist/stores/conversation-state-store.js +6 -3
  1010. package/dist/stores/conversation-state-store.js.map +1 -1
  1011. package/dist/stores/conversation-store.cjs +1 -1
  1012. package/dist/stores/conversation-store.cjs.map +1 -1
  1013. package/dist/stores/conversation-store.d.ts +2 -0
  1014. package/dist/stores/conversation-store.js +3 -0
  1015. package/dist/stores/conversation-store.js.map +1 -1
  1016. package/dist/stores/model-store.cjs +1 -1
  1017. package/dist/stores/model-store.cjs.map +1 -1
  1018. package/dist/stores/model-store.d.ts +7 -0
  1019. package/dist/stores/model-store.js +4 -0
  1020. package/dist/stores/model-store.js.map +1 -1
  1021. package/dist/types/automation.cjs.map +1 -1
  1022. package/dist/types/automation.d.ts +66 -1
  1023. package/dist/types/automation.js.map +1 -1
  1024. package/dist/types/canvas-extension.cjs +2 -0
  1025. package/dist/types/canvas-extension.cjs.map +1 -0
  1026. package/dist/types/canvas-extension.d.ts +77 -0
  1027. package/dist/types/canvas-extension.js +6 -0
  1028. package/dist/types/canvas-extension.js.map +1 -0
  1029. package/dist/types/settings.d.ts +7 -0
  1030. package/dist/ui/context-menu.d.ts +1 -1
  1031. package/dist/ui/help-link.cjs +1 -1
  1032. package/dist/ui/help-link.cjs.map +1 -1
  1033. package/dist/ui/help-link.d.ts +6 -1
  1034. package/dist/ui/help-link.js +32 -18
  1035. package/dist/ui/help-link.js.map +1 -1
  1036. package/dist/ui/toggle-switch.cjs +1 -1
  1037. package/dist/ui/toggle-switch.cjs.map +1 -1
  1038. package/dist/ui/toggle-switch.d.ts +4 -1
  1039. package/dist/ui/toggle-switch.js +4 -3
  1040. package/dist/ui/toggle-switch.js.map +1 -1
  1041. package/dist/utils/acp-auth-display.d.ts +35 -0
  1042. package/dist/utils/automation-catalog.cjs +1 -1
  1043. package/dist/utils/automation-catalog.cjs.map +1 -1
  1044. package/dist/utils/automation-catalog.d.ts +12 -1
  1045. package/dist/utils/automation-catalog.js +42 -12
  1046. package/dist/utils/automation-catalog.js.map +1 -1
  1047. package/dist/utils/automation-run-display.cjs +2 -0
  1048. package/dist/utils/automation-run-display.cjs.map +1 -0
  1049. package/dist/utils/automation-run-display.d.ts +20 -0
  1050. package/dist/utils/automation-run-display.js +85 -0
  1051. package/dist/utils/automation-run-display.js.map +1 -0
  1052. package/dist/utils/automation-schedule.cjs +1 -1
  1053. package/dist/utils/automation-schedule.cjs.map +1 -1
  1054. package/dist/utils/automation-schedule.d.ts +16 -0
  1055. package/dist/utils/automation-schedule.js +2 -0
  1056. package/dist/utils/automation-schedule.js.map +1 -1
  1057. package/dist/utils/cache-utils.cjs +1 -1
  1058. package/dist/utils/cache-utils.js +5 -5
  1059. package/dist/utils/constants.cjs +1 -1
  1060. package/dist/utils/constants.cjs.map +1 -1
  1061. package/dist/utils/constants.d.ts +4 -0
  1062. package/dist/utils/constants.js +23 -3
  1063. package/dist/utils/constants.js.map +1 -1
  1064. package/dist/utils/format-event-timestamp.cjs +2 -0
  1065. package/dist/utils/format-event-timestamp.cjs.map +1 -0
  1066. package/dist/utils/format-event-timestamp.d.ts +1 -0
  1067. package/dist/utils/format-event-timestamp.js +13 -0
  1068. package/dist/utils/format-event-timestamp.js.map +1 -0
  1069. package/dist/utils/format-model-name.cjs +1 -1
  1070. package/dist/utils/format-model-name.cjs.map +1 -1
  1071. package/dist/utils/format-model-name.d.ts +7 -3
  1072. package/dist/utils/format-model-name.js +6 -11
  1073. package/dist/utils/format-model-name.js.map +1 -1
  1074. package/dist/utils/format-relative-time.cjs +1 -1
  1075. package/dist/utils/format-relative-time.cjs.map +1 -1
  1076. package/dist/utils/format-relative-time.d.ts +7 -0
  1077. package/dist/utils/format-relative-time.js +7 -2
  1078. package/dist/utils/format-relative-time.js.map +1 -1
  1079. package/dist/utils/git-diff-stats.cjs +2 -2
  1080. package/dist/utils/git-diff-stats.cjs.map +1 -1
  1081. package/dist/utils/git-diff-stats.d.ts +4 -0
  1082. package/dist/utils/git-diff-stats.js +12 -2
  1083. package/dist/utils/git-diff-stats.js.map +1 -1
  1084. package/dist/utils/path-utils.cjs +1 -1
  1085. package/dist/utils/path-utils.cjs.map +1 -1
  1086. package/dist/utils/path-utils.d.ts +15 -3
  1087. package/dist/utils/path-utils.js +29 -3
  1088. package/dist/utils/path-utils.js.map +1 -1
  1089. package/dist/utils/plan-file.cjs +4 -0
  1090. package/dist/utils/plan-file.cjs.map +1 -0
  1091. package/dist/utils/plan-file.d.ts +18 -0
  1092. package/dist/utils/plan-file.js +58 -0
  1093. package/dist/utils/plan-file.js.map +1 -0
  1094. package/dist/utils/recommended-automation-rail.cjs +1 -1
  1095. package/dist/utils/recommended-automation-rail.cjs.map +1 -1
  1096. package/dist/utils/recommended-automation-rail.js +1 -0
  1097. package/dist/utils/recommended-automation-rail.js.map +1 -1
  1098. package/dist/utils/scroll-fade-state.cjs +1 -1
  1099. package/dist/utils/scroll-fade-state.cjs.map +1 -1
  1100. package/dist/utils/scroll-fade-state.d.ts +6 -0
  1101. package/dist/utils/scroll-fade-state.js +8 -1
  1102. package/dist/utils/scroll-fade-state.js.map +1 -1
  1103. package/dist/utils/sdk-settings-schema.cjs +1 -1
  1104. package/dist/utils/sdk-settings-schema.cjs.map +1 -1
  1105. package/dist/utils/sdk-settings-schema.d.ts +1 -0
  1106. package/dist/utils/sdk-settings-schema.js +25 -22
  1107. package/dist/utils/sdk-settings-schema.js.map +1 -1
  1108. package/dist/utils/skill-enablement.cjs +2 -0
  1109. package/dist/utils/skill-enablement.cjs.map +1 -0
  1110. package/dist/utils/skill-enablement.d.ts +51 -0
  1111. package/dist/utils/skill-enablement.js +31 -0
  1112. package/dist/utils/skill-enablement.js.map +1 -0
  1113. package/dist/utils/utils.cjs +1 -1
  1114. package/dist/utils/utils.cjs.map +1 -1
  1115. package/dist/utils/utils.js +11 -11
  1116. package/dist/utils/utils.js.map +1 -1
  1117. package/dist/utils/vscode-origin.cjs +2 -0
  1118. package/dist/utils/vscode-origin.cjs.map +1 -0
  1119. package/dist/utils/vscode-origin.d.ts +55 -0
  1120. package/dist/utils/vscode-origin.js +27 -0
  1121. package/dist/utils/vscode-origin.js.map +1 -0
  1122. package/dist/utils/workspace-mode.d.ts +4 -0
  1123. package/package.json +5 -5
  1124. package/scripts/check-sdk-version-sync.mjs +6 -6
  1125. package/scripts/check-translation-completeness.cjs +1 -0
  1126. package/scripts/dev-extra-backend.mjs +28 -9
  1127. package/scripts/dev-safe.mjs +81 -8
  1128. package/scripts/dev-static.mjs +35 -37
  1129. package/scripts/dev-with-automation.mjs +83 -2
  1130. package/scripts/ingress.mjs +27 -1
  1131. package/scripts/static-server.mjs +107 -2
  1132. package/tools/canvas_ui_tool.py +19 -0
  1133. package/build/assets/active-backend-context-DKFSMbn3.js +0 -2
  1134. package/build/assets/agent-profiles-settings-D4cY5U2T.js +0 -1
  1135. package/build/assets/agent-server-conversation-service.api-DozDKIW_.js +0 -86
  1136. package/build/assets/agent-settings-351vXWc9.js +0 -2
  1137. package/build/assets/agent-settings-Ce7BDZ6I.js +0 -1
  1138. package/build/assets/alert-banner-Kyy1YWZU.js +0 -1
  1139. package/build/assets/api-key-entry-screen-INIxqAMs.js +0 -1
  1140. package/build/assets/automation-detail-DXDhUwPq.js +0 -3
  1141. package/build/assets/automation-git-sync-CzyS4cn1.js +0 -1
  1142. package/build/assets/automation-setup-route-FRr05f_g.js +0 -1
  1143. package/build/assets/automations-list-CERuQWE6.js +0 -1
  1144. package/build/assets/backend-form-modal-DK78-jn1.js +0 -1
  1145. package/build/assets/bot-C-0Wu7vQ.js +0 -1
  1146. package/build/assets/browser-11etCQ04.js +0 -7
  1147. package/build/assets/check-Cf2YoT90.js +0 -1
  1148. package/build/assets/chevron-down-C3OQ-ehx.js +0 -1
  1149. package/build/assets/chevron-right-CN1uUiJ1.js +0 -1
  1150. package/build/assets/circle-check-g5yeGMd-.js +0 -1
  1151. package/build/assets/command-menu-BZQ8S3Ke.js +0 -1
  1152. package/build/assets/commits-tab-DZtJgaDM.js +0 -1
  1153. package/build/assets/confirmation-modal-Bk4JRcCM.js +0 -1
  1154. package/build/assets/conversation-CchMzpGl.js +0 -1
  1155. package/build/assets/conversation-Dpzftz57.js +0 -93
  1156. package/build/assets/conversation-panel-CchMzpGl.js +0 -1
  1157. package/build/assets/conversation-state-store-a9d2fxRc.js +0 -1
  1158. package/build/assets/edit-automation-modal-D-urtv8n.js +0 -1
  1159. package/build/assets/empty-state-CvaVahVr.js +0 -1
  1160. package/build/assets/enum-filter-dropdown-DliX_Lo0.js +0 -1
  1161. package/build/assets/extensions-hub-CFduxBnk.js +0 -1
  1162. package/build/assets/extensions-navigation-BeC224yX.js +0 -1
  1163. package/build/assets/external-link-DFpYunfj.js +0 -1
  1164. package/build/assets/files-tab-CL3J9b3p.js +0 -1
  1165. package/build/assets/format-model-name-BNPKVsIq.js +0 -1
  1166. package/build/assets/get-git-path-DlAJa_i6.js +0 -1
  1167. package/build/assets/git-repo-dropdown-DGMEhz7d.js +0 -1
  1168. package/build/assets/home-BCGlNJCA.js +0 -1
  1169. package/build/assets/home-DB1pRqTC.js +0 -1
  1170. package/build/assets/home-automation-run-tooltip-CooFQRIG.js +0 -1
  1171. package/build/assets/home-store-Dl1dPE58.js +0 -1
  1172. package/build/assets/index-home-DB1pRqTC.js +0 -1
  1173. package/build/assets/info-uYSVzX86.js +0 -1
  1174. package/build/assets/install-server-modal-BbJdhzet.js +0 -1
  1175. package/build/assets/kebab-menu-item-content-BYokkRHi.js +0 -1
  1176. package/build/assets/list-filter-OFkpRrmi.js +0 -1
  1177. package/build/assets/llm-not-configured-banner-BqqYnJ1t.js +0 -27
  1178. package/build/assets/llm-settings-CnDbbmVW.js +0 -1
  1179. package/build/assets/llm-settings-S8Yjg__1.js +0 -1
  1180. package/build/assets/llm-subscription-service-BpPfzW4x.js +0 -1
  1181. package/build/assets/loader-circle-nvrwthvj.js +0 -1
  1182. package/build/assets/manage-backends-modal-BCUPswyl.js +0 -1
  1183. package/build/assets/manifest-58597dde.js +0 -1
  1184. package/build/assets/markdown-renderer-Cb2sBWtV.js +0 -8
  1185. package/build/assets/mcp-page-Bm4K2NQq.js +0 -9
  1186. package/build/assets/messages-BTN5thLe.js +0 -40
  1187. package/build/assets/onboarding-Cx_kaiD1.js +0 -1
  1188. package/build/assets/onboarding-modal-vMwn7ihv.js +0 -1
  1189. package/build/assets/organization-service.api-C8XpQ0pM.js +0 -1
  1190. package/build/assets/pencil-Clh1Wjvh.js +0 -1
  1191. package/build/assets/planner-tab-DQvDU3ap.js +0 -1
  1192. package/build/assets/plug-BuQhHSSG.js +0 -1
  1193. package/build/assets/plugins-management-service-BjYeF0b0.js +0 -1
  1194. package/build/assets/plus-CEKne-Yp.js +0 -1
  1195. package/build/assets/profiles-service.api-QB-T_u-g.js +0 -1
  1196. package/build/assets/providers-FfSZ5TXP.js +0 -1
  1197. package/build/assets/proxy-tcFL2yTQ.js +0 -1
  1198. package/build/assets/recommended-automations-launcher-Bw8uC4V6.js +0 -1
  1199. package/build/assets/refresh-cw-Bh69DyYO.js +0 -1
  1200. package/build/assets/root-BLeQfBEq.css +0 -1
  1201. package/build/assets/root-ZKKYPR1Z.js +0 -2
  1202. package/build/assets/root-layout-luJoE9IG.js +0 -2
  1203. package/build/assets/schema-field-Csw5fhtN.js +0 -1
  1204. package/build/assets/scroll-fade-state-Dw-i4SGq.js +0 -1
  1205. package/build/assets/sdk-section-page-HTffvm7Q.js +0 -1
  1206. package/build/assets/secret-form-HTUbYw5o.js +0 -1
  1207. package/build/assets/secrets-service-BTor9uAU.js +0 -1
  1208. package/build/assets/settings-BlmrkwRi.js +0 -1
  1209. package/build/assets/settings-DcNPxz0v.js +0 -1
  1210. package/build/assets/settings-index-CKq0b0Vg.js +0 -1
  1211. package/build/assets/settings-service.api-B2agVfjL.js +0 -1
  1212. package/build/assets/shared-conversation-B55pCyBG.js +0 -1
  1213. package/build/assets/shield-check-CFDViW82.js +0 -1
  1214. package/build/assets/sidebar-mobile-menu-toggle-BOtyJHwE.js +0 -1
  1215. package/build/assets/sidebar-nav-link-CPzhyHQg.js +0 -1
  1216. package/build/assets/sidebar-store-DtpU7zaI.js +0 -1
  1217. package/build/assets/skill-filter-CWZ5kjcg.js +0 -2
  1218. package/build/assets/skill-scope-CV1dkAbW.js +0 -1
  1219. package/build/assets/skills-plugins-DGHULTq6.js +0 -1
  1220. package/build/assets/skills-settings-CM1lFv3e.js +0 -1
  1221. package/build/assets/styled-tooltip-Dl06rkpY.js +0 -1
  1222. package/build/assets/toggle-switch-Fd_QGz0r.js +0 -1
  1223. package/build/assets/trash-2-Dl8_RGz0.js +0 -1
  1224. package/build/assets/trash-_RMt7Ayc.js +0 -1
  1225. package/build/assets/triangle-alert-SM-q4NU_.js +0 -1
  1226. package/build/assets/usage-tab-BcfWV6db.js +0 -1
  1227. package/build/assets/use-acp-credential-form-BsSW5NHG.js +0 -1
  1228. package/build/assets/use-activate-agent-profile-B2NS8nA5.js +0 -1
  1229. package/build/assets/use-agent-profiles-DWBPC0Si.js +0 -1
  1230. package/build/assets/use-config-Bft35DOK.js +0 -1
  1231. package/build/assets/use-create-conversation-DwN5vv2f.js +0 -1
  1232. package/build/assets/use-create-secret-BSxJMxHp.js +0 -1
  1233. package/build/assets/use-has-permission-B3C8rQmR.js +0 -1
  1234. package/build/assets/use-is-authed-CFGkY3-Z.js +0 -1
  1235. package/build/assets/use-llm-configured-BI6obxsc.js +0 -1
  1236. package/build/assets/use-llm-profiles-djGAhTWL.js +0 -1
  1237. package/build/assets/use-manifest-capabilities-3z0-1G59.js +0 -1
  1238. package/build/assets/use-onboarding-completion-BXpyUSsJ.js +0 -1
  1239. package/build/assets/use-plugins-marketplace-DI4_pK56.js +0 -1
  1240. package/build/assets/use-save-agent-profile-DdBSTdpN.js +0 -1
  1241. package/build/assets/use-settings-C5VhGpqd.js +0 -1
  1242. package/build/assets/use-settings-nav-items-DHaUu1Dg.js +0 -16
  1243. package/build/assets/use-tracking-D5t9otIF.js +0 -3
  1244. package/build/assets/utils-DaCIEEQP.js +0 -1
  1245. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js +0 -186
  1246. package/build/assets/vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js +0 -1
  1247. package/build/assets/vendor~root-layout-BlUaZ18v.js +0 -1
  1248. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-B2OLKL7N.js +0 -1
  1249. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js +0 -1
  1250. package/build/assets/x-DkgltWa0.js +0 -1
  1251. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +0 -2
  1252. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +0 -1
  1253. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +0 -35
  1254. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +0 -247
  1255. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +0 -1
  1256. package/dist/components/features/tips/random-tip.d.ts +0 -2
  1257. package/dist/hooks/query/use-skills.cjs +0 -2
  1258. package/dist/hooks/query/use-skills.cjs.map +0 -1
  1259. package/dist/hooks/query/use-skills.d.ts +0 -7
  1260. package/dist/hooks/query/use-skills.js +0 -13
  1261. package/dist/hooks/query/use-skills.js.map +0 -1
  1262. package/dist/hooks/use-has-permission.cjs +0 -2
  1263. package/dist/hooks/use-has-permission.cjs.map +0 -1
  1264. package/dist/hooks/use-has-permission.d.ts +0 -1
  1265. package/dist/hooks/use-has-permission.js +0 -8
  1266. package/dist/hooks/use-has-permission.js.map +0 -1
  1267. package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs +0 -2
  1268. package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs.map +0 -1
  1269. package/dist/node_modules/lucide-react/dist/esm/icons/eye.js +0 -14
  1270. package/dist/node_modules/lucide-react/dist/esm/icons/eye.js.map +0 -1
  1271. package/dist/utils/tips.d.ts +0 -7
  1272. package/dist/utils/workspace-relative-path.cjs +0 -2
  1273. package/dist/utils/workspace-relative-path.cjs.map +0 -1
  1274. package/dist/utils/workspace-relative-path.d.ts +0 -10
  1275. package/dist/utils/workspace-relative-path.js +0 -22
  1276. package/dist/utils/workspace-relative-path.js.map +0 -1
  1277. /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-plan-mode-interceptor.cjs","names":[],"sources":["../../../src/hooks/chat/use-plan-mode-interceptor.ts"],"sourcesContent":["import { useCallback } from \"react\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { useHandlePlanClick } from \"#/hooks/use-handle-plan-click\";\nimport {\n useMainWebSocketStatus,\n useUnifiedWebSocketStatus,\n} from \"#/hooks/use-unified-websocket-status\";\nimport { usePlanningAgentState } from \"#/hooks/use-agent-state\";\nimport { AgentState } from \"#/types/agent-state\";\nimport { PLAN_COMMAND, CODE_COMMAND } from \"#/utils/constants\";\n\nconst PLAN_PREFIX = `${PLAN_COMMAND} `;\nconst CODE_PREFIX = `${CODE_COMMAND} `;\n\n/**\n * Intercepts \"/plan [task]\" and \"/code [task]\" and toggles the conversation's\n * mode like the Code/Plan button, instead of sending them as a chat message.\n * A bare command only switches mode; \"<task>\" is sent immediately (mode is\n * set synchronously first, so the send routes to the new mode — see\n * conversation-websocket-context.tsx's `getState().conversationMode` read),\n * or becomes the new planner's `initial_message` if it doesn't exist yet.\n *\n * Swallows the command while the relevant agent is running, a planner is\n * being created, or the socket it needs is disconnected — \"/code\" gates on\n * the main socket alone (not the main+planning merged status) so a momentary\n * planning reconnect can't swallow it, and \"/plan <task>\" also checks the\n * planner's own running state so it can't be routed into one still mid-run.\n */\nexport const usePlanModeInterceptor = (\n conversationId: string | null | undefined,\n curAgentState: AgentState,\n onSubmit: (message: string) => void,\n) => {\n const setConversationMode = useConversationStore(\n (s) => s.setConversationMode,\n );\n const { handlePlanClick, hasPlanner, isCreatingConversation } =\n useHandlePlanClick();\n const isMainWebSocketConnected = useMainWebSocketStatus() === \"OPEN\";\n const isWebSocketConnected = useUnifiedWebSocketStatus() === \"OPEN\";\n const { isPlanningAgentRunning } = usePlanningAgentState();\n\n return useCallback(\n (message: string) => {\n const trimmed = message.trim();\n const isPlan =\n trimmed === PLAN_COMMAND || trimmed.startsWith(PLAN_PREFIX);\n const isCode =\n trimmed === CODE_COMMAND || trimmed.startsWith(CODE_PREFIX);\n if (!conversationId || (!isPlan && !isCode)) {\n onSubmit(message);\n return;\n }\n\n if (curAgentState === AgentState.RUNNING || isCreatingConversation) {\n return;\n }\n\n if (isPlan) {\n if (isPlanningAgentRunning || !isWebSocketConnected) {\n return;\n }\n const task = trimmed.slice(PLAN_COMMAND.length).trim();\n if (task && hasPlanner) {\n // Planner already exists: switch mode, then send normally — the\n // send path reads the just-set mode synchronously, so this routes\n // to the planner rather than the code agent.\n setConversationMode(\"plan\");\n onSubmit(task);\n } else {\n handlePlanClick(undefined, task || undefined);\n }\n } else {\n if (!isMainWebSocketConnected) {\n return;\n }\n setConversationMode(\"code\");\n const task = trimmed.slice(CODE_COMMAND.length).trim();\n if (task) {\n // The parent (code) conversation always already exists, so this\n // can always send immediately — same synchronous-mode-read routing\n // as the /plan-with-existing-planner case above.\n onSubmit(task);\n }\n }\n },\n [\n conversationId,\n curAgentState,\n hasPlanner,\n isCreatingConversation,\n isMainWebSocketConnected,\n isPlanningAgentRunning,\n isWebSocketConnected,\n onSubmit,\n handlePlanClick,\n setConversationMode,\n ],\n );\n};\n"],"mappings":"6UAWA,IAAM,EAAc,GAAG,EAAA,aAAa,GAC9B,EAAc,GAAG,EAAA,aAAa,GAgBvB,GACX,EACA,EACA,IACG,CACH,IAAM,EAAsB,EAAA,qBACzB,GAAM,EAAE,mBACX,EACM,CAAE,kBAAiB,aAAY,0BACnC,EAAA,mBAAmB,EACf,EAA2B,EAAA,uBAAuB,IAAM,OACxD,EAAuB,EAAA,0BAA0B,IAAM,OACvD,CAAE,0BAA2B,EAAA,sBAAsB,EAEzD,OAAA,EAAA,EAAA,aACG,GAAoB,CACnB,IAAM,EAAU,EAAQ,KAAK,EACvB,EACJ,IAAA,SAA4B,EAAQ,WAAW,CAAW,EACtD,EACJ,IAAA,SAA4B,EAAQ,WAAW,CAAW,EAC5D,GAAI,CAAC,GAAmB,CAAC,GAAU,CAAC,EAAS,CAC3C,EAAS,CAAO,EAChB,MACF,CAEI,SAAkB,EAAA,WAAW,SAAW,GAI5C,GAAI,EAAQ,CACV,GAAI,GAA0B,CAAC,EAC7B,OAEF,IAAM,EAAO,EAAQ,MAAM,EAAA,aAAa,MAAM,EAAE,KAAK,EACjD,GAAQ,GAIV,EAAoB,MAAM,EAC1B,EAAS,CAAI,GAEb,EAAgB,IAAA,GAAW,GAAQ,IAAA,EAAS,CAEhD,KAAO,CACL,GAAI,CAAC,EACH,OAEF,EAAoB,MAAM,EAC1B,IAAM,EAAO,EAAQ,MAAM,EAAA,aAAa,MAAM,EAAE,KAAK,EACjD,GAIF,EAAS,CAAI,CAEjB,CACF,EACA,CACE,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CACF,CACF,CACF"}
@@ -0,0 +1,16 @@
1
+ import { AgentState } from "#/types/agent-state";
2
+ /**
3
+ * Intercepts "/plan [task]" and "/code [task]" and toggles the conversation's
4
+ * mode like the Code/Plan button, instead of sending them as a chat message.
5
+ * A bare command only switches mode; "<task>" is sent immediately (mode is
6
+ * set synchronously first, so the send routes to the new mode — see
7
+ * conversation-websocket-context.tsx's `getState().conversationMode` read),
8
+ * or becomes the new planner's `initial_message` if it doesn't exist yet.
9
+ *
10
+ * Swallows the command while the relevant agent is running, a planner is
11
+ * being created, or the socket it needs is disconnected — "/code" gates on
12
+ * the main socket alone (not the main+planning merged status) so a momentary
13
+ * planning reconnect can't swallow it, and "/plan <task>" also checks the
14
+ * planner's own running state so it can't be routed into one still mid-run.
15
+ */
16
+ export declare const usePlanModeInterceptor: (conversationId: string | null | undefined, curAgentState: AgentState, onSubmit: (message: string) => void) => (message: string) => void;
@@ -0,0 +1,43 @@
1
+ import { CODE_COMMAND as e, PLAN_COMMAND as t } from "../../utils/constants.js";
2
+ import { AgentState as n } from "../../types/agent-state.js";
3
+ import { useConversationStore as r } from "../../stores/conversation-store.js";
4
+ import { usePlanningAgentState as i } from "../use-agent-state.js";
5
+ import { useMainWebSocketStatus as a, useUnifiedWebSocketStatus as o } from "../use-unified-websocket-status.js";
6
+ import { useHandlePlanClick as s } from "../use-handle-plan-click.js";
7
+ import { useCallback as c } from "react";
8
+ //#region src/hooks/chat/use-plan-mode-interceptor.ts
9
+ var l = `${t} `, u = `${e} `, d = (d, f, p) => {
10
+ let m = r((e) => e.setConversationMode), { handlePlanClick: h, hasPlanner: g, isCreatingConversation: _ } = s(), v = a() === "OPEN", y = o() === "OPEN", { isPlanningAgentRunning: b } = i();
11
+ return c((r) => {
12
+ let i = r.trim(), a = i === "/plan" || i.startsWith(l), o = i === "/code" || i.startsWith(u);
13
+ if (!d || !a && !o) {
14
+ p(r);
15
+ return;
16
+ }
17
+ if (!(f === n.RUNNING || _)) if (a) {
18
+ if (b || !y) return;
19
+ let e = i.slice(t.length).trim();
20
+ e && g ? (m("plan"), p(e)) : h(void 0, e || void 0);
21
+ } else {
22
+ if (!v) return;
23
+ m("code");
24
+ let t = i.slice(e.length).trim();
25
+ t && p(t);
26
+ }
27
+ }, [
28
+ d,
29
+ f,
30
+ g,
31
+ _,
32
+ v,
33
+ b,
34
+ y,
35
+ p,
36
+ h,
37
+ m
38
+ ]);
39
+ };
40
+ //#endregion
41
+ export { d as usePlanModeInterceptor };
42
+
43
+ //# sourceMappingURL=use-plan-mode-interceptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-plan-mode-interceptor.js","names":[],"sources":["../../../src/hooks/chat/use-plan-mode-interceptor.ts"],"sourcesContent":["import { useCallback } from \"react\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { useHandlePlanClick } from \"#/hooks/use-handle-plan-click\";\nimport {\n useMainWebSocketStatus,\n useUnifiedWebSocketStatus,\n} from \"#/hooks/use-unified-websocket-status\";\nimport { usePlanningAgentState } from \"#/hooks/use-agent-state\";\nimport { AgentState } from \"#/types/agent-state\";\nimport { PLAN_COMMAND, CODE_COMMAND } from \"#/utils/constants\";\n\nconst PLAN_PREFIX = `${PLAN_COMMAND} `;\nconst CODE_PREFIX = `${CODE_COMMAND} `;\n\n/**\n * Intercepts \"/plan [task]\" and \"/code [task]\" and toggles the conversation's\n * mode like the Code/Plan button, instead of sending them as a chat message.\n * A bare command only switches mode; \"<task>\" is sent immediately (mode is\n * set synchronously first, so the send routes to the new mode — see\n * conversation-websocket-context.tsx's `getState().conversationMode` read),\n * or becomes the new planner's `initial_message` if it doesn't exist yet.\n *\n * Swallows the command while the relevant agent is running, a planner is\n * being created, or the socket it needs is disconnected — \"/code\" gates on\n * the main socket alone (not the main+planning merged status) so a momentary\n * planning reconnect can't swallow it, and \"/plan <task>\" also checks the\n * planner's own running state so it can't be routed into one still mid-run.\n */\nexport const usePlanModeInterceptor = (\n conversationId: string | null | undefined,\n curAgentState: AgentState,\n onSubmit: (message: string) => void,\n) => {\n const setConversationMode = useConversationStore(\n (s) => s.setConversationMode,\n );\n const { handlePlanClick, hasPlanner, isCreatingConversation } =\n useHandlePlanClick();\n const isMainWebSocketConnected = useMainWebSocketStatus() === \"OPEN\";\n const isWebSocketConnected = useUnifiedWebSocketStatus() === \"OPEN\";\n const { isPlanningAgentRunning } = usePlanningAgentState();\n\n return useCallback(\n (message: string) => {\n const trimmed = message.trim();\n const isPlan =\n trimmed === PLAN_COMMAND || trimmed.startsWith(PLAN_PREFIX);\n const isCode =\n trimmed === CODE_COMMAND || trimmed.startsWith(CODE_PREFIX);\n if (!conversationId || (!isPlan && !isCode)) {\n onSubmit(message);\n return;\n }\n\n if (curAgentState === AgentState.RUNNING || isCreatingConversation) {\n return;\n }\n\n if (isPlan) {\n if (isPlanningAgentRunning || !isWebSocketConnected) {\n return;\n }\n const task = trimmed.slice(PLAN_COMMAND.length).trim();\n if (task && hasPlanner) {\n // Planner already exists: switch mode, then send normally — the\n // send path reads the just-set mode synchronously, so this routes\n // to the planner rather than the code agent.\n setConversationMode(\"plan\");\n onSubmit(task);\n } else {\n handlePlanClick(undefined, task || undefined);\n }\n } else {\n if (!isMainWebSocketConnected) {\n return;\n }\n setConversationMode(\"code\");\n const task = trimmed.slice(CODE_COMMAND.length).trim();\n if (task) {\n // The parent (code) conversation always already exists, so this\n // can always send immediately — same synchronous-mode-read routing\n // as the /plan-with-existing-planner case above.\n onSubmit(task);\n }\n }\n },\n [\n conversationId,\n curAgentState,\n hasPlanner,\n isCreatingConversation,\n isMainWebSocketConnected,\n isPlanningAgentRunning,\n isWebSocketConnected,\n onSubmit,\n handlePlanClick,\n setConversationMode,\n ],\n );\n};\n"],"mappings":";;;;;;;;AAWA,IAAM,IAAc,GAAG,EAAa,IAC9B,IAAc,GAAG,EAAa,IAgBvB,KACX,GACA,GACA,MACG;CACH,IAAM,IAAsB,GACzB,MAAM,EAAE,mBACX,GACM,EAAE,oBAAiB,eAAY,8BACnC,EAAmB,GACf,IAA2B,EAAuB,MAAM,QACxD,IAAuB,EAA0B,MAAM,QACvD,EAAE,8BAA2B,EAAsB;CAEzD,OAAO,GACJ,MAAoB;EACnB,IAAM,IAAU,EAAQ,KAAK,GACvB,IACJ,MAAA,WAA4B,EAAQ,WAAW,CAAW,GACtD,IACJ,MAAA,WAA4B,EAAQ,WAAW,CAAW;EAC5D,IAAI,CAAC,KAAmB,CAAC,KAAU,CAAC,GAAS;GAC3C,EAAS,CAAO;GAChB;EACF;EAEI,YAAkB,EAAW,WAAW,IAI5C,IAAI,GAAQ;GACV,IAAI,KAA0B,CAAC,GAC7B;GAEF,IAAM,IAAO,EAAQ,MAAM,EAAa,MAAM,EAAE,KAAK;GACrD,AAAI,KAAQ,KAIV,EAAoB,MAAM,GAC1B,EAAS,CAAI,KAEb,EAAgB,KAAA,GAAW,KAAQ,KAAA,CAAS;EAEhD,OAAO;GACL,IAAI,CAAC,GACH;GAEF,EAAoB,MAAM;GAC1B,IAAM,IAAO,EAAQ,MAAM,EAAa,MAAM,EAAE,KAAK;GACrD,AAAI,KAIF,EAAS,CAAI;EAEjB;CACF,GACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;AACF"}
@@ -1,2 +1,2 @@
1
- require("../../_virtual/_rolldown/runtime.cjs");const e=require("../query/query-keys.cjs"),t=require("../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"),r=require("../../contexts/active-backend-context.cjs"),i=require("../../api/conversation-metadata-store.cjs"),a=require("../../api/profiles-service/profiles-service.api.cjs"),o=require("../../api/conversation-service/agent-server-conversation-service.api.cjs"),s=require("../use-tracking.cjs"),c=require("../query/use-llm-profiles.cjs"),l=require("../../api/agent-profiles-service/agent-profiles-service.api.cjs"),u=require("../query/use-agent-profiles.cjs"),d=require("../../api/plugins-management-service.cjs"),f=require("../../utils/plugin-display.cjs");var p=[`create-conversation`],m=()=>{let m=t.useQueryClient(),{trackConversationCreated:h}=s.useTracking(),{data:g}=c.useLlmProfiles(),{backend:_,orgId:v}=r.useActiveBackend();return u.useAgentProfiles(),n.useMutation({mutationKey:p,mutationFn:async t=>{let{query:n,conversationInstructions:r,plugins:s,repository:c,workingDir:u,workspaceMode:p,parentConversationId:h,agentType:y,agentProfileId:b}=t,x=await m.ensureQueryData({queryKey:[...e.AGENT_PROFILES_QUERY_KEYS.all,_.id,v],queryFn:l.default.listProfiles,...e.AGENT_PROFILES_RETRY_OPTIONS}),S=b??x.active_agent_profile_id??void 0,C=S?x?.profiles?.find(e=>e.id===S):void 0,w=_.kind===`cloud`,T=S,E=null;if(!w&&C?.name==="default"&&C?.agent_kind===`openhands`)T=void 0;else if(C?.agent_kind===`openhands`&&C.llm_profile_ref){let t=!1;try{let n=await m.ensureQueryData({queryKey:[...e.LLM_PROFILES_QUERY_KEYS.all,_.id,v],queryFn:a.default.listProfiles,retry:!1});t=n.profiles.some(e=>e.name===C.llm_profile_ref),E=n.active_profile??null}catch{}t?!w&&!b&&E&&E!==C.llm_profile_ref&&(T=void 0):(console.warn(`Agent profile "${C.name}" references missing LLM profile "${C.llm_profile_ref}"; launching from agent_settings instead.`),T=void 0)}let D=await o.default.createConversation({initialUserMsg:n,conversationInstructions:r,plugins:s,metadata:c?{selected_repository:c.name,selected_branch:c.branch??null,git_provider:c.gitProvider}:null,workingDirOverride:u,workspaceMode:p,parentConversationId:h,agentType:y,...T?{agentProfileId:T,agentProfileKind:C?.agent_kind}:{}}),O=D.app_conversation_id,k=s?.map(i.toPluginCoordinates)??[],A=k;if(O){let t=[];try{t=await m.ensureQueryData({queryKey:e.PLUGINS_QUERY_KEYS.installed,queryFn:()=>d.default.listInstalledPlugins()})}catch{}let n=new Set(k.map(f.pluginReferenceKey)),r=t.filter(e=>e.enabled).map(e=>({source:e.source,ref:e.resolved_ref??null,repo_path:e.repo_path??null,name:e.name})).filter(e=>!n.has(f.pluginReferenceKey(e)));A=[...k,...r]}let j=T&&C?.agent_kind===`openhands`?C.llm_profile_ref:E??g?.active_profile??null;if(O&&(j||A.length)){let e=i.getStoredConversationMetadata(O);i.setStoredConversationMetadata(O,{selected_repository:e?.selected_repository??null,selected_branch:e?.selected_branch??null,git_provider:e?.git_provider??null,selected_workspace:e?.selected_workspace??null,workspace_mode:e?.workspace_mode??null,active_profile:j??e?.active_profile??null,plugins:A.length?A:e?.plugins??null})}return{conversation_id:D.app_conversation_id?D.app_conversation_id:`task-${D.id}`,session_api_key:null,url:D.agent_server_url,task_id:D.id}},onSuccess:async(e,t)=>{h({conversationId:e.conversation_id,taskId:e.task_id,hasRepository:!!t.repository,gitProvider:t.repository?.gitProvider,hasWorkspace:!!t.workingDir,workspaceMode:t.workspaceMode,hasInitialQuery:!!t.query,agentType:t.agentType,hasParentConversation:!!t.parentConversationId,entryPoint:t.entryPoint}),m.invalidateQueries({queryKey:[`user`,`conversations`]}),m.invalidateQueries({queryKey:[`start-tasks`]})}})};exports.CREATE_CONVERSATION_MUTATION_KEY=p,exports.useCreateConversation=m;
1
+ require("../../_virtual/_rolldown/runtime.cjs");const e=require("../query/query-keys.cjs"),t=require("../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"),r=require("../../contexts/active-backend-context.cjs"),i=require("../../api/conversation-metadata-store.cjs"),a=require("../../api/profiles-service/profiles-service.api.cjs"),o=require("../../api/conversation-service/agent-server-conversation-service.api.cjs"),s=require("../use-tracking.cjs"),c=require("../query/use-llm-profiles.cjs"),l=require("../../api/agent-profiles-service/agent-profiles-service.api.cjs"),u=require("../query/use-agent-profiles.cjs"),d=require("../../api/plugins-management-service.cjs"),f=require("../../utils/plugin-display.cjs");var p=[`create-conversation`],m=()=>{let m=t.useQueryClient(),{trackConversationCreated:h}=s.useTracking(),{data:g}=c.useLlmProfiles(),{backend:_,orgId:v}=r.useActiveBackend();return u.useAgentProfiles(),n.useMutation({mutationKey:p,mutationFn:async t=>{let{query:n,conversationInstructions:r,plugins:s,repository:c,workingDir:u,workspaceMode:p,parentConversationId:h,agentType:y,agentProfileId:b}=t,x=await m.ensureQueryData({queryKey:[...e.AGENT_PROFILES_QUERY_KEYS.all,_.id,v],queryFn:l.default.listProfiles,...e.AGENT_PROFILES_RETRY_OPTIONS}),S=b??x.active_agent_profile_id??void 0,C=S?x?.profiles?.find(e=>e.id===S):void 0,w=_.kind===`cloud`,T=S,E=null;if(!w&&C?.name==="default"&&C?.agent_kind===`openhands`)T=void 0;else if(C?.agent_kind===`openhands`&&C.llm_profile_ref){let t=!1;try{let n=await m.ensureQueryData({queryKey:[...e.LLM_PROFILES_QUERY_KEYS.all,_.id,v],queryFn:a.default.listProfiles,retry:!1});t=n.profiles.some(e=>e.name===C.llm_profile_ref),E=n.active_profile??null}catch{}t?!w&&!b&&E&&E!==C.llm_profile_ref&&(T=void 0):(console.warn(`Agent profile "${C.name}" references missing LLM profile "${C.llm_profile_ref}"; launching from agent_settings instead.`),T=void 0)}let D=await o.default.createConversation({initialUserMsg:n,conversationInstructions:r,plugins:s,metadata:c?{selected_repository:c.name,selected_branch:c.branch??null,git_provider:c.gitProvider}:null,workingDirOverride:u,workspaceMode:p,parentConversationId:h,agentType:y,...T?{agentProfileId:T,agentProfileKind:C?.agent_kind}:{}}),O=D.app_conversation_id,k=s?.map(i.toPluginCoordinates)??[],A=k;if(O){let t=[];try{t=await m.ensureQueryData({queryKey:[...e.PLUGINS_QUERY_KEYS.installed,_.id,v],queryFn:()=>d.default.listInstalledPlugins()})}catch{}let n=new Set(k.map(f.pluginReferenceKey)),r=t.filter(e=>e.enabled).map(e=>({source:e.source,ref:e.resolved_ref??null,repo_path:e.repo_path??null,name:e.name})).filter(e=>!n.has(f.pluginReferenceKey(e)));A=[...k,...r]}let j=T&&C?.agent_kind===`openhands`?C.llm_profile_ref:E??g?.active_profile??null;if(O&&(j||A.length)){let e=i.getStoredConversationMetadata(O);i.setStoredConversationMetadata(O,{selected_repository:e?.selected_repository??null,selected_branch:e?.selected_branch??null,git_provider:e?.git_provider??null,selected_workspace:e?.selected_workspace??null,workspace_mode:e?.workspace_mode??null,active_profile:j??e?.active_profile??null,plugins:A.length?A:e?.plugins??null})}return{conversation_id:D.app_conversation_id?D.app_conversation_id:`task-${D.id}`,session_api_key:null,url:D.agent_server_url,task_id:D.id}},onSuccess:async(e,t)=>{h({conversationId:e.conversation_id,taskId:e.task_id,hasRepository:!!t.repository,gitProvider:t.repository?.gitProvider,hasWorkspace:!!t.workingDir,workspaceMode:t.workspaceMode,hasInitialQuery:!!t.query,agentType:t.agentType,hasParentConversation:!!t.parentConversationId,entryPoint:t.entryPoint}),m.invalidateQueries({queryKey:[`user`,`conversations`]}),m.invalidateQueries({queryKey:[`start-tasks`]})}})};exports.CREATE_CONVERSATION_MUTATION_KEY=p,exports.useCreateConversation=m;
2
2
  //# sourceMappingURL=use-create-conversation.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-create-conversation.cjs","names":[],"sources":["../../../src/hooks/mutation/use-create-conversation.ts"],"sourcesContent":["import { useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { PluginSpec } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport { SuggestedTask } from \"#/utils/types\";\nimport { Provider } from \"#/types/settings\";\nimport { useTracking } from \"#/hooks/use-tracking\";\nimport { useLlmProfiles } from \"#/hooks/query/use-llm-profiles\";\nimport { useAgentProfiles } from \"#/hooks/query/use-agent-profiles\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport ProfilesService from \"#/api/profiles-service/profiles-service.api\";\nimport AgentProfilesService, {\n WELL_KNOWN_DEFAULT_AGENT_PROFILE_NAME,\n type AgentProfileListResponse,\n} from \"#/api/agent-profiles-service/agent-profiles-service.api\";\nimport PluginsManagementService, {\n type InstalledPluginInfo,\n} from \"#/api/plugins-management-service\";\nimport {\n PLUGINS_QUERY_KEYS,\n LLM_PROFILES_QUERY_KEYS,\n AGENT_PROFILES_QUERY_KEYS,\n AGENT_PROFILES_RETRY_OPTIONS,\n} from \"#/hooks/query/query-keys\";\nimport { pluginReferenceKey } from \"#/utils/plugin-display\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n toPluginCoordinates,\n type WorkspaceMode,\n} from \"#/api/conversation-metadata-store\";\n\nexport interface CreateConversationVariables {\n query?: string;\n repository?: {\n name: string;\n gitProvider: Provider;\n branch?: string;\n };\n suggestedTask?: SuggestedTask;\n conversationInstructions?: string;\n parentConversationId?: string;\n agentType?: \"default\" | \"plan\";\n plugins?: PluginSpec[];\n workingDir?: string;\n workspaceMode?: WorkspaceMode;\n // Launch from a specific AgentProfile (local backend). When omitted, the\n // active AgentProfile (if any) is used so home-composed conversations\n // launch from the user's selected profile (#3727).\n agentProfileId?: string;\n entryPoint?: string; // analytics only; not forwarded to the service\n}\n\nexport const CREATE_CONVERSATION_MUTATION_KEY = [\"create-conversation\"];\n\ninterface CreateConversationResponse {\n conversation_id: string;\n session_api_key: string | null;\n url: string | null;\n task_id?: string;\n}\n\nexport const useCreateConversation = () => {\n const queryClient = useQueryClient();\n const { trackConversationCreated } = useTracking();\n // Cache-warm on the home page (the profile picker reads the same query).\n // Stamped onto the conversation at creation so the switcher can show the\n // exact profile even when several profiles share a model (#1082).\n const { data: llmProfiles } = useLlmProfiles();\n // Warm the agent-profiles cache too — the launch path below awaits the same\n // query via ensureQueryData, so a warm cache makes home-launch instant. The\n // hook's maybe-unresolved data is deliberately NOT read at launch time:\n // activation is pointer-only (it never writes agent_settings), so racing a\n // cold cache into the agent_settings fallback would silently launch the\n // wrong agent.\n const { backend, orgId } = useActiveBackend();\n useAgentProfiles();\n\n return useMutation({\n mutationKey: CREATE_CONVERSATION_MUTATION_KEY,\n mutationFn: async (\n variables: CreateConversationVariables,\n ): Promise<CreateConversationResponse> => {\n const {\n query,\n conversationInstructions,\n plugins,\n repository,\n workingDir,\n workspaceMode,\n parentConversationId,\n agentType,\n agentProfileId,\n } = variables;\n\n // The active AgentProfile is the default launch profile for new\n // conversations (#3727), on both local and cloud (cloud gained\n // /api/agent-profiles in OpenHands #15060, #3730). Await the list from\n // the shared query cache: a send fired before the home query resolves\n // must still launch from the active profile. Do not fall back to the\n // global agent_settings when profile discovery fails: activation is\n // pointer-only, so those settings may describe a different agent.\n const agentProfiles: AgentProfileListResponse =\n await queryClient.ensureQueryData({\n queryKey: [...AGENT_PROFILES_QUERY_KEYS.all, backend.id, orgId],\n queryFn: AgentProfilesService.listProfiles,\n ...AGENT_PROFILES_RETRY_OPTIONS,\n });\n\n const requestedAgentProfileId =\n agentProfileId ?? agentProfiles.active_agent_profile_id ?? undefined;\n\n // Fall back to the legacy agent_settings launch when the resolved agent\n // profile can't resolve its LLM. The agent-server seeds a `default`\n // openhands profile whose `llm_profile_ref` can point at an LLM profile\n // that doesn't exist (fresh store, or one configured with named profiles\n // only); launching from it 404s (\"LLM profile '<ref>' not found\") and\n // would brick home-launch. agent_settings reflects the active LLM, so the\n // fallback degrades cleanly until the seed mirrors it (SDK #3933).\n // ACP profiles carry no llm_profile_ref, so they're never gated here.\n const resolvedAgentProfile = requestedAgentProfileId\n ? agentProfiles?.profiles?.find(\n (profile) => profile.id === requestedAgentProfileId,\n )\n : undefined;\n // Cloud has no `agent_settings` payload to fall back to — the downgrade\n // below only makes sense on local, where it exists and carries the\n // canvas-only enrichments. Gating it here keeps cloud always launching\n // from the resolved profile id, so the conversation gets\n // `launched_agent_profile` stamped and the profile's config applied\n // (#1571 review).\n const isCloud = backend.kind === \"cloud\";\n let effectiveAgentProfileId = requestedAgentProfileId;\n // The account-wide active LLM profile from the launch-path fetch below\n // (null when that fetch didn't run or failed). Fresher than the\n // `useLlmProfiles()` render snapshot, which a fast send can outrun.\n let fetchedActiveLlmProfile: string | null = null;\n if (\n !isCloud &&\n resolvedAgentProfile?.name === WELL_KNOWN_DEFAULT_AGENT_PROFILE_NAME &&\n resolvedAgentProfile?.agent_kind === \"openhands\"\n ) {\n // The seeded OpenHands `default` profile is the enriched baseline, not a\n // deliberate profile pick — it mirrors global agent_settings. Launch it\n // via agent_settings so the canvas-only enrichments the profile-resolution\n // path drops survive for the common home-launch: the <RUNTIME_SERVICES>\n // system-message suffix and project-skill loading (buildAgentContext).\n // Named profiles are deliberate custom configs and still use the profile\n // path (accepting that enrichment boundary).\n // Trade-off: per-profile fields set on `default` itself don't apply on\n // home-launch — custom per-profile config belongs in a named profile.\n //\n // Scoped to OpenHands: an ACP `default` must keep the profile path.\n // Activation is pointer-only, so global agent_settings is stale (often\n // still OpenHands) when an ACP profile is active — launching it via\n // agent_settings would start the wrong agent. ACP carries no\n // <RUNTIME_SERVICES> enrichment, so there's nothing to preserve.\n //\n // Scoped to local: cloud never writes agent_settings, so it always\n // resolves `default` server-side via agent_profile_id (validated below).\n effectiveAgentProfileId = undefined;\n } else if (\n resolvedAgentProfile?.agent_kind === \"openhands\" &&\n resolvedAgentProfile.llm_profile_ref\n ) {\n // Await the LLM-profile list rather than reading the maybe-unresolved\n // `useLlmProfiles()` result: a send fired before that query loads (or\n // after it errors) must still validate the ref, not launch blind.\n let llmProfileExists = false;\n try {\n const llm = await queryClient.ensureQueryData({\n queryKey: [...LLM_PROFILES_QUERY_KEYS.all, backend.id, orgId],\n queryFn: ProfilesService.listProfiles,\n // Match the agent-profiles fetch above: on a backend where this\n // errors, fall back to agent_settings immediately rather than\n // stalling the send through the default exponential backoff.\n retry: false,\n });\n llmProfileExists = llm.profiles.some(\n (profile) => profile.name === resolvedAgentProfile.llm_profile_ref,\n );\n fetchedActiveLlmProfile = llm.active_profile ?? null;\n } catch {\n // List unavailable → can't validate → fall back to agent_settings.\n }\n if (!llmProfileExists) {\n // Downgrade is silent in the UI; leave a diagnosable trace.\n console.warn(\n `Agent profile \"${resolvedAgentProfile.name}\" references missing ` +\n `LLM profile \"${resolvedAgentProfile.llm_profile_ref}\"; ` +\n \"launching from agent_settings instead.\",\n );\n effectiveAgentProfileId = undefined;\n } else if (\n !isCloud &&\n !agentProfileId &&\n fetchedActiveLlmProfile &&\n fetchedActiveLlmProfile !== resolvedAgentProfile.llm_profile_ref\n ) {\n // The home LLM pill shows — and its dropdown activates — the\n // account-wide active LLM profile, never the pinned ref\n // (useChatInputLlmProfileState), so when the two differ the launch\n // must run the selection or the UI advertises a model the\n // conversation won't use (#16539). Launch via agent_settings, which\n // the dropdown's profile activation syncs to the selection. Scoped\n // to the implicit active-profile launch: an explicit `agentProfileId`\n // (the in-conversation profile picker) is a deliberate profile pick,\n // so its pinned ref stays authoritative. Local-only like the\n // downgrades above — cloud has no agent_settings payload to fall\n // back to. Trade-off: the named profile's non-LLM config doesn't\n // apply to this launch; the start request has no per-launch LLM\n // override that could preserve it (AgentLaunchAdditions carries only\n // a system-message suffix).\n effectiveAgentProfileId = undefined;\n }\n }\n\n // Only extend the call with the profile fields when launching from a\n // profile, so a plain create stays byte-identical to the legacy\n // agent_settings path (#3727). sandboxId is unused here.\n const conversation =\n await AgentServerConversationService.createConversation({\n initialUserMsg: query,\n conversationInstructions,\n plugins,\n metadata: repository\n ? {\n selected_repository: repository.name,\n selected_branch: repository.branch ?? null,\n git_provider: repository.gitProvider,\n }\n : null,\n workingDirOverride: workingDir,\n workspaceMode,\n parentConversationId,\n agentType,\n ...(effectiveAgentProfileId\n ? {\n agentProfileId: effectiveAgentProfileId,\n agentProfileKind: resolvedAgentProfile?.agent_kind,\n }\n : {}),\n });\n\n // Stamp the active LLM profile onto the (local) conversation so the\n // chat switcher shows the exact profile even when several profiles\n // share a model (#1082). Cloud conversations don't use local profiles\n // (app_conversation_id stays null until the sandbox is READY). Merge so\n // the repo/workspace metadata the service just persisted is preserved.\n const localConversationId = conversation.app_conversation_id;\n // Snapshot the conversation's plugins into client-side metadata so the\n // in-conversation plugins view can show what's loaded (coordinates only\n // — strip parameters, which may carry secrets). The agent-server doesn't\n // return a live conversation's loaded plugins, so this snapshot is the\n // source for that view. Two sources, deduped by coordinates:\n // 1. plugins explicitly attached at creation (e.g. the /launch flow);\n // 2. enabled installed plugins, which the SDK auto-loads into every new\n // local conversation (see use-set-plugin-enabled).\n const explicitPlugins = plugins?.map(toPluginCoordinates) ?? [];\n let attachedPlugins: PluginSpec[] = explicitPlugins;\n if (localConversationId) {\n let installed: InstalledPluginInfo[] = [];\n try {\n installed = await queryClient.ensureQueryData({\n queryKey: PLUGINS_QUERY_KEYS.installed,\n queryFn: () => PluginsManagementService.listInstalledPlugins(),\n });\n } catch {\n // Best-effort: never let plugin lookup block conversation creation.\n }\n const seen = new Set(explicitPlugins.map(pluginReferenceKey));\n const enabledInstalled = installed\n .filter((plugin) => plugin.enabled)\n .map((plugin) => ({\n source: plugin.source,\n ref: plugin.resolved_ref ?? null,\n repo_path: plugin.repo_path ?? null,\n // Keep the human-friendly name so the plugins view shows e.g.\n // \"city-weather\" rather than deriving \"local\" from the source.\n name: plugin.name,\n }))\n .filter((plugin) => !seen.has(pluginReferenceKey(plugin)));\n attachedPlugins = [...explicitPlugins, ...enabledInstalled];\n }\n // A launch from a named OpenHands profile runs that profile's\n // `llm_profile_ref`, which can differ from the standalone active LLM\n // profile — stamp the ref so the switcher pill names the exact profile\n // the conversation runs (#1082). The agent_settings paths (the `default`\n // baseline, a dangling ref, or a dropdown override (#16539) — where\n // effectiveAgentProfileId is cleared) run the active LLM, so they stamp\n // the active profile, preferring the launch-path fetch over the hook's\n // render snapshot. ACP profiles carry no LLM profile, so they fall\n // through to the active-profile stamp (unused by the ACP model chip).\n const activeProfile =\n effectiveAgentProfileId &&\n resolvedAgentProfile?.agent_kind === \"openhands\"\n ? resolvedAgentProfile.llm_profile_ref\n : (fetchedActiveLlmProfile ?? llmProfiles?.active_profile ?? null);\n if (localConversationId && (activeProfile || attachedPlugins.length)) {\n const prev = getStoredConversationMetadata(localConversationId);\n setStoredConversationMetadata(localConversationId, {\n selected_repository: prev?.selected_repository ?? null,\n selected_branch: prev?.selected_branch ?? null,\n git_provider: prev?.git_provider ?? null,\n selected_workspace: prev?.selected_workspace ?? null,\n workspace_mode: prev?.workspace_mode ?? null,\n active_profile: activeProfile ?? prev?.active_profile ?? null,\n plugins: attachedPlugins.length\n ? attachedPlugins\n : (prev?.plugins ?? null),\n });\n }\n\n // OpenHands cloud pattern: when the start task isn't immediately\n // READY (cloud sandbox is still provisioning),\n // app_conversation_id is null. We return a `task-{id}` URL so the\n // conversation route's useTaskPolling can drive it to READY and\n // then redirect to the real `/conversations/{app_conversation_id}`.\n const conversationId = conversation.app_conversation_id\n ? conversation.app_conversation_id\n : `task-${conversation.id}`;\n\n return {\n conversation_id: conversationId,\n session_api_key: null,\n url: conversation.agent_server_url,\n task_id: conversation.id,\n };\n },\n onSuccess: async (data, variables) => {\n trackConversationCreated({\n conversationId: data.conversation_id,\n taskId: data.task_id,\n hasRepository: !!variables.repository,\n gitProvider: variables.repository?.gitProvider,\n hasWorkspace: !!variables.workingDir,\n workspaceMode: variables.workspaceMode,\n hasInitialQuery: !!variables.query,\n agentType: variables.agentType,\n hasParentConversation: !!variables.parentConversationId,\n entryPoint: variables.entryPoint,\n });\n\n // Invalidate (rather than remove) so the existing paginated list stays\n // rendered while a background refetch picks up the new conversation.\n // `removeQueries` would wipe the cache and force the panel back to its\n // initial loading state, dropping loaded pages and scroll position.\n queryClient.invalidateQueries({\n queryKey: [\"user\", \"conversations\"],\n });\n // The cloud path returns a start task (no app_conversation_id\n // yet); the sidebar surfaces those via `useStartTasks` which doesn't\n // poll, so invalidate it explicitly so the in-flight task shows up\n // in the conversation list immediately.\n queryClient.invalidateQueries({\n queryKey: [\"start-tasks\"],\n });\n },\n });\n};\n"],"mappings":"szBAoDA,IAAa,EAAmC,CAAC,qBAAqB,EASzD,MAA8B,CACzC,IAAM,EAAc,EAAA,eAAe,EAC7B,CAAE,4BAA6B,EAAA,YAAY,EAI3C,CAAE,KAAM,GAAgB,EAAA,eAAe,EAOvC,CAAE,UAAS,SAAU,EAAA,iBAAiB,EAG5C,OAFA,EAAA,iBAAiB,EAEV,EAAA,YAAY,CACjB,YAAa,EACb,WAAY,KACV,IACwC,CACxC,GAAM,CACJ,QACA,2BACA,UACA,aACA,aACA,gBACA,uBACA,YACA,kBACE,EASE,EACJ,MAAM,EAAY,gBAAgB,CAChC,SAAU,CAAC,GAAG,EAAA,0BAA0B,IAAK,EAAQ,GAAI,CAAK,EAC9D,QAAS,EAAA,QAAqB,aAC9B,GAAG,EAAA,4BACL,CAAC,EAEG,EACJ,GAAkB,EAAc,yBAA2B,IAAA,GAUvD,EAAuB,EACzB,GAAe,UAAU,KACtB,GAAY,EAAQ,KAAO,CAC9B,EACA,IAAA,GAOE,EAAU,EAAQ,OAAS,QAC7B,EAA0B,EAI1B,EAAyC,KAC7C,GACE,CAAC,GACD,GAAsB,OAAA,WACtB,GAAsB,aAAe,YAoBrC,EAA0B,IAAA,QACrB,GACL,GAAsB,aAAe,aACrC,EAAqB,gBACrB,CAIA,IAAI,EAAmB,GACvB,GAAI,CACF,IAAM,EAAM,MAAM,EAAY,gBAAgB,CAC5C,SAAU,CAAC,GAAG,EAAA,wBAAwB,IAAK,EAAQ,GAAI,CAAK,EAC5D,QAAS,EAAA,QAAgB,aAIzB,MAAO,EACT,CAAC,EACD,EAAmB,EAAI,SAAS,KAC7B,GAAY,EAAQ,OAAS,EAAqB,eACrD,EACA,EAA0B,EAAI,gBAAkB,IAClD,MAAQ,CAER,CACK,EASH,CAAC,GACD,CAAC,GACD,GACA,IAA4B,EAAqB,kBAgBjD,EAA0B,IAAA,KA1B1B,QAAQ,KACN,kBAAkB,EAAqB,KAAK,oCAC1B,EAAqB,gBAAgB,0CAEzD,EACA,EAA0B,IAAA,GAuB9B,CAKA,IAAM,EACJ,MAAM,EAAA,QAA+B,mBAAmB,CACtD,eAAgB,EAChB,2BACA,UACA,SAAU,EACN,CACE,oBAAqB,EAAW,KAChC,gBAAiB,EAAW,QAAU,KACtC,aAAc,EAAW,WAC3B,EACA,KACJ,mBAAoB,EACpB,gBACA,uBACA,YACA,GAAI,EACA,CACE,eAAgB,EAChB,iBAAkB,GAAsB,UAC1C,EACA,CAAC,CACP,CAAC,EAOG,EAAsB,EAAa,oBASnC,EAAkB,GAAS,IAAI,EAAA,mBAAmB,GAAK,CAAC,EAC1D,EAAgC,EACpC,GAAI,EAAqB,CACvB,IAAI,EAAmC,CAAC,EACxC,GAAI,CACF,EAAY,MAAM,EAAY,gBAAgB,CAC5C,SAAU,EAAA,mBAAmB,UAC7B,YAAe,EAAA,QAAyB,qBAAqB,CAC/D,CAAC,CACH,MAAQ,CAER,CACA,IAAM,EAAO,IAAI,IAAI,EAAgB,IAAI,EAAA,kBAAkB,CAAC,EACtD,EAAmB,EACtB,OAAQ,GAAW,EAAO,OAAO,EACjC,IAAK,IAAY,CAChB,OAAQ,EAAO,OACf,IAAK,EAAO,cAAgB,KAC5B,UAAW,EAAO,WAAa,KAG/B,KAAM,EAAO,IACf,EAAE,EACD,OAAQ,GAAW,CAAC,EAAK,IAAI,EAAA,mBAAmB,CAAM,CAAC,CAAC,EAC3D,EAAkB,CAAC,GAAG,EAAiB,GAAG,CAAgB,CAC5D,CAUA,IAAM,EACJ,GACA,GAAsB,aAAe,YACjC,EAAqB,gBACpB,GAA2B,GAAa,gBAAkB,KACjE,GAAI,IAAwB,GAAiB,EAAgB,QAAS,CACpE,IAAM,EAAO,EAAA,8BAA8B,CAAmB,EAC9D,EAAA,8BAA8B,EAAqB,CACjD,oBAAqB,GAAM,qBAAuB,KAClD,gBAAiB,GAAM,iBAAmB,KAC1C,aAAc,GAAM,cAAgB,KACpC,mBAAoB,GAAM,oBAAsB,KAChD,eAAgB,GAAM,gBAAkB,KACxC,eAAgB,GAAiB,GAAM,gBAAkB,KACzD,QAAS,EAAgB,OACrB,EACC,GAAM,SAAW,IACxB,CAAC,CACH,CAWA,MAAO,CACL,gBALqB,EAAa,oBAChC,EAAa,oBACb,QAAQ,EAAa,KAIvB,gBAAiB,KACjB,IAAK,EAAa,iBAClB,QAAS,EAAa,EACxB,CACF,EACA,UAAW,MAAO,EAAM,IAAc,CACpC,EAAyB,CACvB,eAAgB,EAAK,gBACrB,OAAQ,EAAK,QACb,cAAe,CAAC,CAAC,EAAU,WAC3B,YAAa,EAAU,YAAY,YACnC,aAAc,CAAC,CAAC,EAAU,WAC1B,cAAe,EAAU,cACzB,gBAAiB,CAAC,CAAC,EAAU,MAC7B,UAAW,EAAU,UACrB,sBAAuB,CAAC,CAAC,EAAU,qBACnC,WAAY,EAAU,UACxB,CAAC,EAMD,EAAY,kBAAkB,CAC5B,SAAU,CAAC,OAAQ,eAAe,CACpC,CAAC,EAKD,EAAY,kBAAkB,CAC5B,SAAU,CAAC,aAAa,CAC1B,CAAC,CACH,CACF,CAAC,CACH"}
1
+ {"version":3,"file":"use-create-conversation.cjs","names":[],"sources":["../../../src/hooks/mutation/use-create-conversation.ts"],"sourcesContent":["import { useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { PluginSpec } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport { SuggestedTask } from \"#/utils/types\";\nimport { Provider } from \"#/types/settings\";\nimport { useTracking } from \"#/hooks/use-tracking\";\nimport { useLlmProfiles } from \"#/hooks/query/use-llm-profiles\";\nimport { useAgentProfiles } from \"#/hooks/query/use-agent-profiles\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport ProfilesService from \"#/api/profiles-service/profiles-service.api\";\nimport AgentProfilesService, {\n WELL_KNOWN_DEFAULT_AGENT_PROFILE_NAME,\n type AgentProfileListResponse,\n} from \"#/api/agent-profiles-service/agent-profiles-service.api\";\nimport PluginsManagementService, {\n type InstalledPluginInfo,\n} from \"#/api/plugins-management-service\";\nimport {\n PLUGINS_QUERY_KEYS,\n LLM_PROFILES_QUERY_KEYS,\n AGENT_PROFILES_QUERY_KEYS,\n AGENT_PROFILES_RETRY_OPTIONS,\n} from \"#/hooks/query/query-keys\";\nimport { pluginReferenceKey } from \"#/utils/plugin-display\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n toPluginCoordinates,\n type WorkspaceMode,\n} from \"#/api/conversation-metadata-store\";\n\nexport interface CreateConversationVariables {\n query?: string;\n repository?: {\n name: string;\n gitProvider: Provider;\n branch?: string;\n };\n suggestedTask?: SuggestedTask;\n conversationInstructions?: string;\n parentConversationId?: string;\n agentType?: \"default\" | \"plan\";\n plugins?: PluginSpec[];\n workingDir?: string;\n workspaceMode?: WorkspaceMode;\n // Launch from a specific AgentProfile (local backend). When omitted, the\n // active AgentProfile (if any) is used so home-composed conversations\n // launch from the user's selected profile (#3727).\n agentProfileId?: string;\n entryPoint?: string; // analytics only; not forwarded to the service\n}\n\nexport const CREATE_CONVERSATION_MUTATION_KEY = [\"create-conversation\"];\n\ninterface CreateConversationResponse {\n conversation_id: string;\n session_api_key: string | null;\n url: string | null;\n task_id?: string;\n}\n\nexport const useCreateConversation = () => {\n const queryClient = useQueryClient();\n const { trackConversationCreated } = useTracking();\n // Cache-warm on the home page (the profile picker reads the same query).\n // Stamped onto the conversation at creation so the switcher can show the\n // exact profile even when several profiles share a model (#1082).\n const { data: llmProfiles } = useLlmProfiles();\n // Warm the agent-profiles cache too — the launch path below awaits the same\n // query via ensureQueryData, so a warm cache makes home-launch instant. The\n // hook's maybe-unresolved data is deliberately NOT read at launch time:\n // activation is pointer-only (it never writes agent_settings), so racing a\n // cold cache into the agent_settings fallback would silently launch the\n // wrong agent.\n const { backend, orgId } = useActiveBackend();\n useAgentProfiles();\n\n return useMutation({\n mutationKey: CREATE_CONVERSATION_MUTATION_KEY,\n mutationFn: async (\n variables: CreateConversationVariables,\n ): Promise<CreateConversationResponse> => {\n const {\n query,\n conversationInstructions,\n plugins,\n repository,\n workingDir,\n workspaceMode,\n parentConversationId,\n agentType,\n agentProfileId,\n } = variables;\n\n // The active AgentProfile is the default launch profile for new\n // conversations (#3727), on both local and cloud (cloud gained\n // /api/agent-profiles in OpenHands #15060, #3730). Await the list from\n // the shared query cache: a send fired before the home query resolves\n // must still launch from the active profile. Do not fall back to the\n // global agent_settings when profile discovery fails: activation is\n // pointer-only, so those settings may describe a different agent.\n const agentProfiles: AgentProfileListResponse =\n await queryClient.ensureQueryData({\n queryKey: [...AGENT_PROFILES_QUERY_KEYS.all, backend.id, orgId],\n queryFn: AgentProfilesService.listProfiles,\n ...AGENT_PROFILES_RETRY_OPTIONS,\n });\n\n const requestedAgentProfileId =\n agentProfileId ?? agentProfiles.active_agent_profile_id ?? undefined;\n\n // Fall back to the legacy agent_settings launch when the resolved agent\n // profile can't resolve its LLM. The agent-server seeds a `default`\n // openhands profile whose `llm_profile_ref` can point at an LLM profile\n // that doesn't exist (fresh store, or one configured with named profiles\n // only); launching from it 404s (\"LLM profile '<ref>' not found\") and\n // would brick home-launch. agent_settings reflects the active LLM, so the\n // fallback degrades cleanly until the seed mirrors it (SDK #3933).\n // ACP profiles carry no llm_profile_ref, so they're never gated here.\n const resolvedAgentProfile = requestedAgentProfileId\n ? agentProfiles?.profiles?.find(\n (profile) => profile.id === requestedAgentProfileId,\n )\n : undefined;\n // Cloud has no `agent_settings` payload to fall back to — the downgrade\n // below only makes sense on local, where it exists and carries the\n // canvas-only enrichments. Gating it here keeps cloud always launching\n // from the resolved profile id, so the conversation gets\n // `launched_agent_profile` stamped and the profile's config applied\n // (#1571 review).\n const isCloud = backend.kind === \"cloud\";\n let effectiveAgentProfileId = requestedAgentProfileId;\n // The account-wide active LLM profile from the launch-path fetch below\n // (null when that fetch didn't run or failed). Fresher than the\n // `useLlmProfiles()` render snapshot, which a fast send can outrun.\n let fetchedActiveLlmProfile: string | null = null;\n if (\n !isCloud &&\n resolvedAgentProfile?.name === WELL_KNOWN_DEFAULT_AGENT_PROFILE_NAME &&\n resolvedAgentProfile?.agent_kind === \"openhands\"\n ) {\n // The seeded OpenHands `default` profile is the enriched baseline, not a\n // deliberate profile pick — it mirrors global agent_settings. Launch it\n // via agent_settings so the canvas-only enrichments the profile-resolution\n // path drops survive for the common home-launch: the <RUNTIME_SERVICES>\n // system-message suffix and project-skill loading (buildAgentContext).\n // Named profiles are deliberate custom configs and still use the profile\n // path (accepting that enrichment boundary).\n // Trade-off: per-profile fields set on `default` itself don't apply on\n // home-launch — custom per-profile config belongs in a named profile.\n //\n // Scoped to OpenHands: an ACP `default` must keep the profile path.\n // Activation is pointer-only, so global agent_settings is stale (often\n // still OpenHands) when an ACP profile is active — launching it via\n // agent_settings would start the wrong agent. ACP carries no\n // <RUNTIME_SERVICES> enrichment, so there's nothing to preserve.\n //\n // Scoped to local: cloud never writes agent_settings, so it always\n // resolves `default` server-side via agent_profile_id (validated below).\n effectiveAgentProfileId = undefined;\n } else if (\n resolvedAgentProfile?.agent_kind === \"openhands\" &&\n resolvedAgentProfile.llm_profile_ref\n ) {\n // Await the LLM-profile list rather than reading the maybe-unresolved\n // `useLlmProfiles()` result: a send fired before that query loads (or\n // after it errors) must still validate the ref, not launch blind.\n let llmProfileExists = false;\n try {\n const llm = await queryClient.ensureQueryData({\n queryKey: [...LLM_PROFILES_QUERY_KEYS.all, backend.id, orgId],\n queryFn: ProfilesService.listProfiles,\n // Match the agent-profiles fetch above: on a backend where this\n // errors, fall back to agent_settings immediately rather than\n // stalling the send through the default exponential backoff.\n retry: false,\n });\n llmProfileExists = llm.profiles.some(\n (profile) => profile.name === resolvedAgentProfile.llm_profile_ref,\n );\n fetchedActiveLlmProfile = llm.active_profile ?? null;\n } catch {\n // List unavailable → can't validate → fall back to agent_settings.\n }\n if (!llmProfileExists) {\n // Downgrade is silent in the UI; leave a diagnosable trace.\n console.warn(\n `Agent profile \"${resolvedAgentProfile.name}\" references missing ` +\n `LLM profile \"${resolvedAgentProfile.llm_profile_ref}\"; ` +\n \"launching from agent_settings instead.\",\n );\n effectiveAgentProfileId = undefined;\n } else if (\n !isCloud &&\n !agentProfileId &&\n fetchedActiveLlmProfile &&\n fetchedActiveLlmProfile !== resolvedAgentProfile.llm_profile_ref\n ) {\n // The home LLM pill shows — and its dropdown activates — the\n // account-wide active LLM profile, never the pinned ref\n // (useChatInputLlmProfileState), so when the two differ the launch\n // must run the selection or the UI advertises a model the\n // conversation won't use (#16539). Launch via agent_settings, which\n // the dropdown's profile activation syncs to the selection. Scoped\n // to the implicit active-profile launch: an explicit `agentProfileId`\n // (the in-conversation profile picker) is a deliberate profile pick,\n // so its pinned ref stays authoritative. Local-only like the\n // downgrades above — cloud has no agent_settings payload to fall\n // back to. Trade-off: the named profile's non-LLM config doesn't\n // apply to this launch; the start request has no per-launch LLM\n // override that could preserve it (AgentLaunchAdditions carries only\n // a system-message suffix).\n effectiveAgentProfileId = undefined;\n }\n }\n\n // Only extend the call with the profile fields when launching from a\n // profile, so a plain create stays byte-identical to the legacy\n // agent_settings path (#3727). sandboxId is unused here.\n const conversation =\n await AgentServerConversationService.createConversation({\n initialUserMsg: query,\n conversationInstructions,\n plugins,\n metadata: repository\n ? {\n selected_repository: repository.name,\n selected_branch: repository.branch ?? null,\n git_provider: repository.gitProvider,\n }\n : null,\n workingDirOverride: workingDir,\n workspaceMode,\n parentConversationId,\n agentType,\n ...(effectiveAgentProfileId\n ? {\n agentProfileId: effectiveAgentProfileId,\n agentProfileKind: resolvedAgentProfile?.agent_kind,\n }\n : {}),\n });\n\n // Stamp the active LLM profile onto the (local) conversation so the\n // chat switcher shows the exact profile even when several profiles\n // share a model (#1082). Cloud conversations don't use local profiles\n // (app_conversation_id stays null until the sandbox is READY). Merge so\n // the repo/workspace metadata the service just persisted is preserved.\n const localConversationId = conversation.app_conversation_id;\n // Snapshot the conversation's plugins into client-side metadata so the\n // in-conversation plugins view can show what's loaded (coordinates only\n // — strip parameters, which may carry secrets). The agent-server doesn't\n // return a live conversation's loaded plugins, so this snapshot is the\n // source for that view. Two sources, deduped by coordinates:\n // 1. plugins explicitly attached at creation (e.g. the /launch flow);\n // 2. enabled installed plugins, which the SDK auto-loads into every new\n // local conversation (see use-set-plugin-enabled).\n const explicitPlugins = plugins?.map(toPluginCoordinates) ?? [];\n let attachedPlugins: PluginSpec[] = explicitPlugins;\n if (localConversationId) {\n let installed: InstalledPluginInfo[] = [];\n try {\n installed = await queryClient.ensureQueryData({\n // Same key `usePlugins` writes. Unscoped, this served the previous\n // backend's list and attached plugins the target server lacks.\n queryKey: [...PLUGINS_QUERY_KEYS.installed, backend.id, orgId],\n queryFn: () => PluginsManagementService.listInstalledPlugins(),\n });\n } catch {\n // Best-effort: never let plugin lookup block conversation creation.\n }\n const seen = new Set(explicitPlugins.map(pluginReferenceKey));\n const enabledInstalled = installed\n .filter((plugin) => plugin.enabled)\n .map((plugin) => ({\n source: plugin.source,\n ref: plugin.resolved_ref ?? null,\n repo_path: plugin.repo_path ?? null,\n // Keep the human-friendly name so the plugins view shows e.g.\n // \"city-weather\" rather than deriving \"local\" from the source.\n name: plugin.name,\n }))\n .filter((plugin) => !seen.has(pluginReferenceKey(plugin)));\n attachedPlugins = [...explicitPlugins, ...enabledInstalled];\n }\n // A launch from a named OpenHands profile runs that profile's\n // `llm_profile_ref`, which can differ from the standalone active LLM\n // profile — stamp the ref so the switcher pill names the exact profile\n // the conversation runs (#1082). The agent_settings paths (the `default`\n // baseline, a dangling ref, or a dropdown override (#16539) — where\n // effectiveAgentProfileId is cleared) run the active LLM, so they stamp\n // the active profile, preferring the launch-path fetch over the hook's\n // render snapshot. ACP profiles carry no LLM profile, so they fall\n // through to the active-profile stamp (unused by the ACP model chip).\n const activeProfile =\n effectiveAgentProfileId &&\n resolvedAgentProfile?.agent_kind === \"openhands\"\n ? resolvedAgentProfile.llm_profile_ref\n : (fetchedActiveLlmProfile ?? llmProfiles?.active_profile ?? null);\n if (localConversationId && (activeProfile || attachedPlugins.length)) {\n const prev = getStoredConversationMetadata(localConversationId);\n setStoredConversationMetadata(localConversationId, {\n selected_repository: prev?.selected_repository ?? null,\n selected_branch: prev?.selected_branch ?? null,\n git_provider: prev?.git_provider ?? null,\n selected_workspace: prev?.selected_workspace ?? null,\n workspace_mode: prev?.workspace_mode ?? null,\n active_profile: activeProfile ?? prev?.active_profile ?? null,\n plugins: attachedPlugins.length\n ? attachedPlugins\n : (prev?.plugins ?? null),\n });\n }\n\n // OpenHands cloud pattern: when the start task isn't immediately\n // READY (cloud sandbox is still provisioning),\n // app_conversation_id is null. We return a `task-{id}` URL so the\n // conversation route's useTaskPolling can drive it to READY and\n // then redirect to the real `/conversations/{app_conversation_id}`.\n const conversationId = conversation.app_conversation_id\n ? conversation.app_conversation_id\n : `task-${conversation.id}`;\n\n return {\n conversation_id: conversationId,\n session_api_key: null,\n url: conversation.agent_server_url,\n task_id: conversation.id,\n };\n },\n onSuccess: async (data, variables) => {\n trackConversationCreated({\n conversationId: data.conversation_id,\n taskId: data.task_id,\n hasRepository: !!variables.repository,\n gitProvider: variables.repository?.gitProvider,\n hasWorkspace: !!variables.workingDir,\n workspaceMode: variables.workspaceMode,\n hasInitialQuery: !!variables.query,\n agentType: variables.agentType,\n hasParentConversation: !!variables.parentConversationId,\n entryPoint: variables.entryPoint,\n });\n\n // Invalidate (rather than remove) so the existing paginated list stays\n // rendered while a background refetch picks up the new conversation.\n // `removeQueries` would wipe the cache and force the panel back to its\n // initial loading state, dropping loaded pages and scroll position.\n queryClient.invalidateQueries({\n queryKey: [\"user\", \"conversations\"],\n });\n // The cloud path returns a start task (no app_conversation_id\n // yet); the sidebar surfaces those via `useStartTasks` which doesn't\n // poll, so invalidate it explicitly so the in-flight task shows up\n // in the conversation list immediately.\n queryClient.invalidateQueries({\n queryKey: [\"start-tasks\"],\n });\n },\n });\n};\n"],"mappings":"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"}
@@ -65,7 +65,11 @@ var v = ["create-conversation"], y = () => {
65
65
  let e = [];
66
66
  try {
67
67
  e = await y.ensureQueryData({
68
- queryKey: r.installed,
68
+ queryKey: [
69
+ ...r.installed,
70
+ S.id,
71
+ C
72
+ ],
69
73
  queryFn: () => g.listInstalledPlugins()
70
74
  });
71
75
  } catch {}
@@ -1 +1 @@
1
- {"version":3,"file":"use-create-conversation.js","names":[],"sources":["../../../src/hooks/mutation/use-create-conversation.ts"],"sourcesContent":["import { useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { PluginSpec } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport { SuggestedTask } from \"#/utils/types\";\nimport { Provider } from \"#/types/settings\";\nimport { useTracking } from \"#/hooks/use-tracking\";\nimport { useLlmProfiles } from \"#/hooks/query/use-llm-profiles\";\nimport { useAgentProfiles } from \"#/hooks/query/use-agent-profiles\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport ProfilesService from \"#/api/profiles-service/profiles-service.api\";\nimport AgentProfilesService, {\n WELL_KNOWN_DEFAULT_AGENT_PROFILE_NAME,\n type AgentProfileListResponse,\n} from \"#/api/agent-profiles-service/agent-profiles-service.api\";\nimport PluginsManagementService, {\n type InstalledPluginInfo,\n} from \"#/api/plugins-management-service\";\nimport {\n PLUGINS_QUERY_KEYS,\n LLM_PROFILES_QUERY_KEYS,\n AGENT_PROFILES_QUERY_KEYS,\n AGENT_PROFILES_RETRY_OPTIONS,\n} from \"#/hooks/query/query-keys\";\nimport { pluginReferenceKey } from \"#/utils/plugin-display\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n toPluginCoordinates,\n type WorkspaceMode,\n} from \"#/api/conversation-metadata-store\";\n\nexport interface CreateConversationVariables {\n query?: string;\n repository?: {\n name: string;\n gitProvider: Provider;\n branch?: string;\n };\n suggestedTask?: SuggestedTask;\n conversationInstructions?: string;\n parentConversationId?: string;\n agentType?: \"default\" | \"plan\";\n plugins?: PluginSpec[];\n workingDir?: string;\n workspaceMode?: WorkspaceMode;\n // Launch from a specific AgentProfile (local backend). When omitted, the\n // active AgentProfile (if any) is used so home-composed conversations\n // launch from the user's selected profile (#3727).\n agentProfileId?: string;\n entryPoint?: string; // analytics only; not forwarded to the service\n}\n\nexport const CREATE_CONVERSATION_MUTATION_KEY = [\"create-conversation\"];\n\ninterface CreateConversationResponse {\n conversation_id: string;\n session_api_key: string | null;\n url: string | null;\n task_id?: string;\n}\n\nexport const useCreateConversation = () => {\n const queryClient = useQueryClient();\n const { trackConversationCreated } = useTracking();\n // Cache-warm on the home page (the profile picker reads the same query).\n // Stamped onto the conversation at creation so the switcher can show the\n // exact profile even when several profiles share a model (#1082).\n const { data: llmProfiles } = useLlmProfiles();\n // Warm the agent-profiles cache too — the launch path below awaits the same\n // query via ensureQueryData, so a warm cache makes home-launch instant. The\n // hook's maybe-unresolved data is deliberately NOT read at launch time:\n // activation is pointer-only (it never writes agent_settings), so racing a\n // cold cache into the agent_settings fallback would silently launch the\n // wrong agent.\n const { backend, orgId } = useActiveBackend();\n useAgentProfiles();\n\n return useMutation({\n mutationKey: CREATE_CONVERSATION_MUTATION_KEY,\n mutationFn: async (\n variables: CreateConversationVariables,\n ): Promise<CreateConversationResponse> => {\n const {\n query,\n conversationInstructions,\n plugins,\n repository,\n workingDir,\n workspaceMode,\n parentConversationId,\n agentType,\n agentProfileId,\n } = variables;\n\n // The active AgentProfile is the default launch profile for new\n // conversations (#3727), on both local and cloud (cloud gained\n // /api/agent-profiles in OpenHands #15060, #3730). Await the list from\n // the shared query cache: a send fired before the home query resolves\n // must still launch from the active profile. Do not fall back to the\n // global agent_settings when profile discovery fails: activation is\n // pointer-only, so those settings may describe a different agent.\n const agentProfiles: AgentProfileListResponse =\n await queryClient.ensureQueryData({\n queryKey: [...AGENT_PROFILES_QUERY_KEYS.all, backend.id, orgId],\n queryFn: AgentProfilesService.listProfiles,\n ...AGENT_PROFILES_RETRY_OPTIONS,\n });\n\n const requestedAgentProfileId =\n agentProfileId ?? agentProfiles.active_agent_profile_id ?? undefined;\n\n // Fall back to the legacy agent_settings launch when the resolved agent\n // profile can't resolve its LLM. The agent-server seeds a `default`\n // openhands profile whose `llm_profile_ref` can point at an LLM profile\n // that doesn't exist (fresh store, or one configured with named profiles\n // only); launching from it 404s (\"LLM profile '<ref>' not found\") and\n // would brick home-launch. agent_settings reflects the active LLM, so the\n // fallback degrades cleanly until the seed mirrors it (SDK #3933).\n // ACP profiles carry no llm_profile_ref, so they're never gated here.\n const resolvedAgentProfile = requestedAgentProfileId\n ? agentProfiles?.profiles?.find(\n (profile) => profile.id === requestedAgentProfileId,\n )\n : undefined;\n // Cloud has no `agent_settings` payload to fall back to — the downgrade\n // below only makes sense on local, where it exists and carries the\n // canvas-only enrichments. Gating it here keeps cloud always launching\n // from the resolved profile id, so the conversation gets\n // `launched_agent_profile` stamped and the profile's config applied\n // (#1571 review).\n const isCloud = backend.kind === \"cloud\";\n let effectiveAgentProfileId = requestedAgentProfileId;\n // The account-wide active LLM profile from the launch-path fetch below\n // (null when that fetch didn't run or failed). Fresher than the\n // `useLlmProfiles()` render snapshot, which a fast send can outrun.\n let fetchedActiveLlmProfile: string | null = null;\n if (\n !isCloud &&\n resolvedAgentProfile?.name === WELL_KNOWN_DEFAULT_AGENT_PROFILE_NAME &&\n resolvedAgentProfile?.agent_kind === \"openhands\"\n ) {\n // The seeded OpenHands `default` profile is the enriched baseline, not a\n // deliberate profile pick — it mirrors global agent_settings. Launch it\n // via agent_settings so the canvas-only enrichments the profile-resolution\n // path drops survive for the common home-launch: the <RUNTIME_SERVICES>\n // system-message suffix and project-skill loading (buildAgentContext).\n // Named profiles are deliberate custom configs and still use the profile\n // path (accepting that enrichment boundary).\n // Trade-off: per-profile fields set on `default` itself don't apply on\n // home-launch — custom per-profile config belongs in a named profile.\n //\n // Scoped to OpenHands: an ACP `default` must keep the profile path.\n // Activation is pointer-only, so global agent_settings is stale (often\n // still OpenHands) when an ACP profile is active — launching it via\n // agent_settings would start the wrong agent. ACP carries no\n // <RUNTIME_SERVICES> enrichment, so there's nothing to preserve.\n //\n // Scoped to local: cloud never writes agent_settings, so it always\n // resolves `default` server-side via agent_profile_id (validated below).\n effectiveAgentProfileId = undefined;\n } else if (\n resolvedAgentProfile?.agent_kind === \"openhands\" &&\n resolvedAgentProfile.llm_profile_ref\n ) {\n // Await the LLM-profile list rather than reading the maybe-unresolved\n // `useLlmProfiles()` result: a send fired before that query loads (or\n // after it errors) must still validate the ref, not launch blind.\n let llmProfileExists = false;\n try {\n const llm = await queryClient.ensureQueryData({\n queryKey: [...LLM_PROFILES_QUERY_KEYS.all, backend.id, orgId],\n queryFn: ProfilesService.listProfiles,\n // Match the agent-profiles fetch above: on a backend where this\n // errors, fall back to agent_settings immediately rather than\n // stalling the send through the default exponential backoff.\n retry: false,\n });\n llmProfileExists = llm.profiles.some(\n (profile) => profile.name === resolvedAgentProfile.llm_profile_ref,\n );\n fetchedActiveLlmProfile = llm.active_profile ?? null;\n } catch {\n // List unavailable → can't validate → fall back to agent_settings.\n }\n if (!llmProfileExists) {\n // Downgrade is silent in the UI; leave a diagnosable trace.\n console.warn(\n `Agent profile \"${resolvedAgentProfile.name}\" references missing ` +\n `LLM profile \"${resolvedAgentProfile.llm_profile_ref}\"; ` +\n \"launching from agent_settings instead.\",\n );\n effectiveAgentProfileId = undefined;\n } else if (\n !isCloud &&\n !agentProfileId &&\n fetchedActiveLlmProfile &&\n fetchedActiveLlmProfile !== resolvedAgentProfile.llm_profile_ref\n ) {\n // The home LLM pill shows — and its dropdown activates — the\n // account-wide active LLM profile, never the pinned ref\n // (useChatInputLlmProfileState), so when the two differ the launch\n // must run the selection or the UI advertises a model the\n // conversation won't use (#16539). Launch via agent_settings, which\n // the dropdown's profile activation syncs to the selection. Scoped\n // to the implicit active-profile launch: an explicit `agentProfileId`\n // (the in-conversation profile picker) is a deliberate profile pick,\n // so its pinned ref stays authoritative. Local-only like the\n // downgrades above — cloud has no agent_settings payload to fall\n // back to. Trade-off: the named profile's non-LLM config doesn't\n // apply to this launch; the start request has no per-launch LLM\n // override that could preserve it (AgentLaunchAdditions carries only\n // a system-message suffix).\n effectiveAgentProfileId = undefined;\n }\n }\n\n // Only extend the call with the profile fields when launching from a\n // profile, so a plain create stays byte-identical to the legacy\n // agent_settings path (#3727). sandboxId is unused here.\n const conversation =\n await AgentServerConversationService.createConversation({\n initialUserMsg: query,\n conversationInstructions,\n plugins,\n metadata: repository\n ? {\n selected_repository: repository.name,\n selected_branch: repository.branch ?? null,\n git_provider: repository.gitProvider,\n }\n : null,\n workingDirOverride: workingDir,\n workspaceMode,\n parentConversationId,\n agentType,\n ...(effectiveAgentProfileId\n ? {\n agentProfileId: effectiveAgentProfileId,\n agentProfileKind: resolvedAgentProfile?.agent_kind,\n }\n : {}),\n });\n\n // Stamp the active LLM profile onto the (local) conversation so the\n // chat switcher shows the exact profile even when several profiles\n // share a model (#1082). Cloud conversations don't use local profiles\n // (app_conversation_id stays null until the sandbox is READY). Merge so\n // the repo/workspace metadata the service just persisted is preserved.\n const localConversationId = conversation.app_conversation_id;\n // Snapshot the conversation's plugins into client-side metadata so the\n // in-conversation plugins view can show what's loaded (coordinates only\n // — strip parameters, which may carry secrets). The agent-server doesn't\n // return a live conversation's loaded plugins, so this snapshot is the\n // source for that view. Two sources, deduped by coordinates:\n // 1. plugins explicitly attached at creation (e.g. the /launch flow);\n // 2. enabled installed plugins, which the SDK auto-loads into every new\n // local conversation (see use-set-plugin-enabled).\n const explicitPlugins = plugins?.map(toPluginCoordinates) ?? [];\n let attachedPlugins: PluginSpec[] = explicitPlugins;\n if (localConversationId) {\n let installed: InstalledPluginInfo[] = [];\n try {\n installed = await queryClient.ensureQueryData({\n queryKey: PLUGINS_QUERY_KEYS.installed,\n queryFn: () => PluginsManagementService.listInstalledPlugins(),\n });\n } catch {\n // Best-effort: never let plugin lookup block conversation creation.\n }\n const seen = new Set(explicitPlugins.map(pluginReferenceKey));\n const enabledInstalled = installed\n .filter((plugin) => plugin.enabled)\n .map((plugin) => ({\n source: plugin.source,\n ref: plugin.resolved_ref ?? null,\n repo_path: plugin.repo_path ?? null,\n // Keep the human-friendly name so the plugins view shows e.g.\n // \"city-weather\" rather than deriving \"local\" from the source.\n name: plugin.name,\n }))\n .filter((plugin) => !seen.has(pluginReferenceKey(plugin)));\n attachedPlugins = [...explicitPlugins, ...enabledInstalled];\n }\n // A launch from a named OpenHands profile runs that profile's\n // `llm_profile_ref`, which can differ from the standalone active LLM\n // profile — stamp the ref so the switcher pill names the exact profile\n // the conversation runs (#1082). The agent_settings paths (the `default`\n // baseline, a dangling ref, or a dropdown override (#16539) — where\n // effectiveAgentProfileId is cleared) run the active LLM, so they stamp\n // the active profile, preferring the launch-path fetch over the hook's\n // render snapshot. ACP profiles carry no LLM profile, so they fall\n // through to the active-profile stamp (unused by the ACP model chip).\n const activeProfile =\n effectiveAgentProfileId &&\n resolvedAgentProfile?.agent_kind === \"openhands\"\n ? resolvedAgentProfile.llm_profile_ref\n : (fetchedActiveLlmProfile ?? llmProfiles?.active_profile ?? null);\n if (localConversationId && (activeProfile || attachedPlugins.length)) {\n const prev = getStoredConversationMetadata(localConversationId);\n setStoredConversationMetadata(localConversationId, {\n selected_repository: prev?.selected_repository ?? null,\n selected_branch: prev?.selected_branch ?? null,\n git_provider: prev?.git_provider ?? null,\n selected_workspace: prev?.selected_workspace ?? null,\n workspace_mode: prev?.workspace_mode ?? null,\n active_profile: activeProfile ?? prev?.active_profile ?? null,\n plugins: attachedPlugins.length\n ? attachedPlugins\n : (prev?.plugins ?? null),\n });\n }\n\n // OpenHands cloud pattern: when the start task isn't immediately\n // READY (cloud sandbox is still provisioning),\n // app_conversation_id is null. We return a `task-{id}` URL so the\n // conversation route's useTaskPolling can drive it to READY and\n // then redirect to the real `/conversations/{app_conversation_id}`.\n const conversationId = conversation.app_conversation_id\n ? conversation.app_conversation_id\n : `task-${conversation.id}`;\n\n return {\n conversation_id: conversationId,\n session_api_key: null,\n url: conversation.agent_server_url,\n task_id: conversation.id,\n };\n },\n onSuccess: async (data, variables) => {\n trackConversationCreated({\n conversationId: data.conversation_id,\n taskId: data.task_id,\n hasRepository: !!variables.repository,\n gitProvider: variables.repository?.gitProvider,\n hasWorkspace: !!variables.workingDir,\n workspaceMode: variables.workspaceMode,\n hasInitialQuery: !!variables.query,\n agentType: variables.agentType,\n hasParentConversation: !!variables.parentConversationId,\n entryPoint: variables.entryPoint,\n });\n\n // Invalidate (rather than remove) so the existing paginated list stays\n // rendered while a background refetch picks up the new conversation.\n // `removeQueries` would wipe the cache and force the panel back to its\n // initial loading state, dropping loaded pages and scroll position.\n queryClient.invalidateQueries({\n queryKey: [\"user\", \"conversations\"],\n });\n // The cloud path returns a start task (no app_conversation_id\n // yet); the sidebar surfaces those via `useStartTasks` which doesn't\n // poll, so invalidate it explicitly so the in-flight task shows up\n // in the conversation list immediately.\n queryClient.invalidateQueries({\n queryKey: [\"start-tasks\"],\n });\n },\n });\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"use-create-conversation.js","names":[],"sources":["../../../src/hooks/mutation/use-create-conversation.ts"],"sourcesContent":["import { useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { PluginSpec } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport { SuggestedTask } from \"#/utils/types\";\nimport { Provider } from \"#/types/settings\";\nimport { useTracking } from \"#/hooks/use-tracking\";\nimport { useLlmProfiles } from \"#/hooks/query/use-llm-profiles\";\nimport { useAgentProfiles } from \"#/hooks/query/use-agent-profiles\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport ProfilesService from \"#/api/profiles-service/profiles-service.api\";\nimport AgentProfilesService, {\n WELL_KNOWN_DEFAULT_AGENT_PROFILE_NAME,\n type AgentProfileListResponse,\n} from \"#/api/agent-profiles-service/agent-profiles-service.api\";\nimport PluginsManagementService, {\n type InstalledPluginInfo,\n} from \"#/api/plugins-management-service\";\nimport {\n PLUGINS_QUERY_KEYS,\n LLM_PROFILES_QUERY_KEYS,\n AGENT_PROFILES_QUERY_KEYS,\n AGENT_PROFILES_RETRY_OPTIONS,\n} from \"#/hooks/query/query-keys\";\nimport { pluginReferenceKey } from \"#/utils/plugin-display\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n toPluginCoordinates,\n type WorkspaceMode,\n} from \"#/api/conversation-metadata-store\";\n\nexport interface CreateConversationVariables {\n query?: string;\n repository?: {\n name: string;\n gitProvider: Provider;\n branch?: string;\n };\n suggestedTask?: SuggestedTask;\n conversationInstructions?: string;\n parentConversationId?: string;\n agentType?: \"default\" | \"plan\";\n plugins?: PluginSpec[];\n workingDir?: string;\n workspaceMode?: WorkspaceMode;\n // Launch from a specific AgentProfile (local backend). When omitted, the\n // active AgentProfile (if any) is used so home-composed conversations\n // launch from the user's selected profile (#3727).\n agentProfileId?: string;\n entryPoint?: string; // analytics only; not forwarded to the service\n}\n\nexport const CREATE_CONVERSATION_MUTATION_KEY = [\"create-conversation\"];\n\ninterface CreateConversationResponse {\n conversation_id: string;\n session_api_key: string | null;\n url: string | null;\n task_id?: string;\n}\n\nexport const useCreateConversation = () => {\n const queryClient = useQueryClient();\n const { trackConversationCreated } = useTracking();\n // Cache-warm on the home page (the profile picker reads the same query).\n // Stamped onto the conversation at creation so the switcher can show the\n // exact profile even when several profiles share a model (#1082).\n const { data: llmProfiles } = useLlmProfiles();\n // Warm the agent-profiles cache too — the launch path below awaits the same\n // query via ensureQueryData, so a warm cache makes home-launch instant. The\n // hook's maybe-unresolved data is deliberately NOT read at launch time:\n // activation is pointer-only (it never writes agent_settings), so racing a\n // cold cache into the agent_settings fallback would silently launch the\n // wrong agent.\n const { backend, orgId } = useActiveBackend();\n useAgentProfiles();\n\n return useMutation({\n mutationKey: CREATE_CONVERSATION_MUTATION_KEY,\n mutationFn: async (\n variables: CreateConversationVariables,\n ): Promise<CreateConversationResponse> => {\n const {\n query,\n conversationInstructions,\n plugins,\n repository,\n workingDir,\n workspaceMode,\n parentConversationId,\n agentType,\n agentProfileId,\n } = variables;\n\n // The active AgentProfile is the default launch profile for new\n // conversations (#3727), on both local and cloud (cloud gained\n // /api/agent-profiles in OpenHands #15060, #3730). Await the list from\n // the shared query cache: a send fired before the home query resolves\n // must still launch from the active profile. Do not fall back to the\n // global agent_settings when profile discovery fails: activation is\n // pointer-only, so those settings may describe a different agent.\n const agentProfiles: AgentProfileListResponse =\n await queryClient.ensureQueryData({\n queryKey: [...AGENT_PROFILES_QUERY_KEYS.all, backend.id, orgId],\n queryFn: AgentProfilesService.listProfiles,\n ...AGENT_PROFILES_RETRY_OPTIONS,\n });\n\n const requestedAgentProfileId =\n agentProfileId ?? agentProfiles.active_agent_profile_id ?? undefined;\n\n // Fall back to the legacy agent_settings launch when the resolved agent\n // profile can't resolve its LLM. The agent-server seeds a `default`\n // openhands profile whose `llm_profile_ref` can point at an LLM profile\n // that doesn't exist (fresh store, or one configured with named profiles\n // only); launching from it 404s (\"LLM profile '<ref>' not found\") and\n // would brick home-launch. agent_settings reflects the active LLM, so the\n // fallback degrades cleanly until the seed mirrors it (SDK #3933).\n // ACP profiles carry no llm_profile_ref, so they're never gated here.\n const resolvedAgentProfile = requestedAgentProfileId\n ? agentProfiles?.profiles?.find(\n (profile) => profile.id === requestedAgentProfileId,\n )\n : undefined;\n // Cloud has no `agent_settings` payload to fall back to — the downgrade\n // below only makes sense on local, where it exists and carries the\n // canvas-only enrichments. Gating it here keeps cloud always launching\n // from the resolved profile id, so the conversation gets\n // `launched_agent_profile` stamped and the profile's config applied\n // (#1571 review).\n const isCloud = backend.kind === \"cloud\";\n let effectiveAgentProfileId = requestedAgentProfileId;\n // The account-wide active LLM profile from the launch-path fetch below\n // (null when that fetch didn't run or failed). Fresher than the\n // `useLlmProfiles()` render snapshot, which a fast send can outrun.\n let fetchedActiveLlmProfile: string | null = null;\n if (\n !isCloud &&\n resolvedAgentProfile?.name === WELL_KNOWN_DEFAULT_AGENT_PROFILE_NAME &&\n resolvedAgentProfile?.agent_kind === \"openhands\"\n ) {\n // The seeded OpenHands `default` profile is the enriched baseline, not a\n // deliberate profile pick — it mirrors global agent_settings. Launch it\n // via agent_settings so the canvas-only enrichments the profile-resolution\n // path drops survive for the common home-launch: the <RUNTIME_SERVICES>\n // system-message suffix and project-skill loading (buildAgentContext).\n // Named profiles are deliberate custom configs and still use the profile\n // path (accepting that enrichment boundary).\n // Trade-off: per-profile fields set on `default` itself don't apply on\n // home-launch — custom per-profile config belongs in a named profile.\n //\n // Scoped to OpenHands: an ACP `default` must keep the profile path.\n // Activation is pointer-only, so global agent_settings is stale (often\n // still OpenHands) when an ACP profile is active — launching it via\n // agent_settings would start the wrong agent. ACP carries no\n // <RUNTIME_SERVICES> enrichment, so there's nothing to preserve.\n //\n // Scoped to local: cloud never writes agent_settings, so it always\n // resolves `default` server-side via agent_profile_id (validated below).\n effectiveAgentProfileId = undefined;\n } else if (\n resolvedAgentProfile?.agent_kind === \"openhands\" &&\n resolvedAgentProfile.llm_profile_ref\n ) {\n // Await the LLM-profile list rather than reading the maybe-unresolved\n // `useLlmProfiles()` result: a send fired before that query loads (or\n // after it errors) must still validate the ref, not launch blind.\n let llmProfileExists = false;\n try {\n const llm = await queryClient.ensureQueryData({\n queryKey: [...LLM_PROFILES_QUERY_KEYS.all, backend.id, orgId],\n queryFn: ProfilesService.listProfiles,\n // Match the agent-profiles fetch above: on a backend where this\n // errors, fall back to agent_settings immediately rather than\n // stalling the send through the default exponential backoff.\n retry: false,\n });\n llmProfileExists = llm.profiles.some(\n (profile) => profile.name === resolvedAgentProfile.llm_profile_ref,\n );\n fetchedActiveLlmProfile = llm.active_profile ?? null;\n } catch {\n // List unavailable → can't validate → fall back to agent_settings.\n }\n if (!llmProfileExists) {\n // Downgrade is silent in the UI; leave a diagnosable trace.\n console.warn(\n `Agent profile \"${resolvedAgentProfile.name}\" references missing ` +\n `LLM profile \"${resolvedAgentProfile.llm_profile_ref}\"; ` +\n \"launching from agent_settings instead.\",\n );\n effectiveAgentProfileId = undefined;\n } else if (\n !isCloud &&\n !agentProfileId &&\n fetchedActiveLlmProfile &&\n fetchedActiveLlmProfile !== resolvedAgentProfile.llm_profile_ref\n ) {\n // The home LLM pill shows — and its dropdown activates — the\n // account-wide active LLM profile, never the pinned ref\n // (useChatInputLlmProfileState), so when the two differ the launch\n // must run the selection or the UI advertises a model the\n // conversation won't use (#16539). Launch via agent_settings, which\n // the dropdown's profile activation syncs to the selection. Scoped\n // to the implicit active-profile launch: an explicit `agentProfileId`\n // (the in-conversation profile picker) is a deliberate profile pick,\n // so its pinned ref stays authoritative. Local-only like the\n // downgrades above — cloud has no agent_settings payload to fall\n // back to. Trade-off: the named profile's non-LLM config doesn't\n // apply to this launch; the start request has no per-launch LLM\n // override that could preserve it (AgentLaunchAdditions carries only\n // a system-message suffix).\n effectiveAgentProfileId = undefined;\n }\n }\n\n // Only extend the call with the profile fields when launching from a\n // profile, so a plain create stays byte-identical to the legacy\n // agent_settings path (#3727). sandboxId is unused here.\n const conversation =\n await AgentServerConversationService.createConversation({\n initialUserMsg: query,\n conversationInstructions,\n plugins,\n metadata: repository\n ? {\n selected_repository: repository.name,\n selected_branch: repository.branch ?? null,\n git_provider: repository.gitProvider,\n }\n : null,\n workingDirOverride: workingDir,\n workspaceMode,\n parentConversationId,\n agentType,\n ...(effectiveAgentProfileId\n ? {\n agentProfileId: effectiveAgentProfileId,\n agentProfileKind: resolvedAgentProfile?.agent_kind,\n }\n : {}),\n });\n\n // Stamp the active LLM profile onto the (local) conversation so the\n // chat switcher shows the exact profile even when several profiles\n // share a model (#1082). Cloud conversations don't use local profiles\n // (app_conversation_id stays null until the sandbox is READY). Merge so\n // the repo/workspace metadata the service just persisted is preserved.\n const localConversationId = conversation.app_conversation_id;\n // Snapshot the conversation's plugins into client-side metadata so the\n // in-conversation plugins view can show what's loaded (coordinates only\n // — strip parameters, which may carry secrets). The agent-server doesn't\n // return a live conversation's loaded plugins, so this snapshot is the\n // source for that view. Two sources, deduped by coordinates:\n // 1. plugins explicitly attached at creation (e.g. the /launch flow);\n // 2. enabled installed plugins, which the SDK auto-loads into every new\n // local conversation (see use-set-plugin-enabled).\n const explicitPlugins = plugins?.map(toPluginCoordinates) ?? [];\n let attachedPlugins: PluginSpec[] = explicitPlugins;\n if (localConversationId) {\n let installed: InstalledPluginInfo[] = [];\n try {\n installed = await queryClient.ensureQueryData({\n // Same key `usePlugins` writes. Unscoped, this served the previous\n // backend's list and attached plugins the target server lacks.\n queryKey: [...PLUGINS_QUERY_KEYS.installed, backend.id, orgId],\n queryFn: () => PluginsManagementService.listInstalledPlugins(),\n });\n } catch {\n // Best-effort: never let plugin lookup block conversation creation.\n }\n const seen = new Set(explicitPlugins.map(pluginReferenceKey));\n const enabledInstalled = installed\n .filter((plugin) => plugin.enabled)\n .map((plugin) => ({\n source: plugin.source,\n ref: plugin.resolved_ref ?? null,\n repo_path: plugin.repo_path ?? null,\n // Keep the human-friendly name so the plugins view shows e.g.\n // \"city-weather\" rather than deriving \"local\" from the source.\n name: plugin.name,\n }))\n .filter((plugin) => !seen.has(pluginReferenceKey(plugin)));\n attachedPlugins = [...explicitPlugins, ...enabledInstalled];\n }\n // A launch from a named OpenHands profile runs that profile's\n // `llm_profile_ref`, which can differ from the standalone active LLM\n // profile — stamp the ref so the switcher pill names the exact profile\n // the conversation runs (#1082). The agent_settings paths (the `default`\n // baseline, a dangling ref, or a dropdown override (#16539) — where\n // effectiveAgentProfileId is cleared) run the active LLM, so they stamp\n // the active profile, preferring the launch-path fetch over the hook's\n // render snapshot. ACP profiles carry no LLM profile, so they fall\n // through to the active-profile stamp (unused by the ACP model chip).\n const activeProfile =\n effectiveAgentProfileId &&\n resolvedAgentProfile?.agent_kind === \"openhands\"\n ? resolvedAgentProfile.llm_profile_ref\n : (fetchedActiveLlmProfile ?? llmProfiles?.active_profile ?? null);\n if (localConversationId && (activeProfile || attachedPlugins.length)) {\n const prev = getStoredConversationMetadata(localConversationId);\n setStoredConversationMetadata(localConversationId, {\n selected_repository: prev?.selected_repository ?? null,\n selected_branch: prev?.selected_branch ?? null,\n git_provider: prev?.git_provider ?? null,\n selected_workspace: prev?.selected_workspace ?? null,\n workspace_mode: prev?.workspace_mode ?? null,\n active_profile: activeProfile ?? prev?.active_profile ?? null,\n plugins: attachedPlugins.length\n ? attachedPlugins\n : (prev?.plugins ?? null),\n });\n }\n\n // OpenHands cloud pattern: when the start task isn't immediately\n // READY (cloud sandbox is still provisioning),\n // app_conversation_id is null. We return a `task-{id}` URL so the\n // conversation route's useTaskPolling can drive it to READY and\n // then redirect to the real `/conversations/{app_conversation_id}`.\n const conversationId = conversation.app_conversation_id\n ? conversation.app_conversation_id\n : `task-${conversation.id}`;\n\n return {\n conversation_id: conversationId,\n session_api_key: null,\n url: conversation.agent_server_url,\n task_id: conversation.id,\n };\n },\n onSuccess: async (data, variables) => {\n trackConversationCreated({\n conversationId: data.conversation_id,\n taskId: data.task_id,\n hasRepository: !!variables.repository,\n gitProvider: variables.repository?.gitProvider,\n hasWorkspace: !!variables.workingDir,\n workspaceMode: variables.workspaceMode,\n hasInitialQuery: !!variables.query,\n agentType: variables.agentType,\n hasParentConversation: !!variables.parentConversationId,\n entryPoint: variables.entryPoint,\n });\n\n // Invalidate (rather than remove) so the existing paginated list stays\n // rendered while a background refetch picks up the new conversation.\n // `removeQueries` would wipe the cache and force the panel back to its\n // initial loading state, dropping loaded pages and scroll position.\n queryClient.invalidateQueries({\n queryKey: [\"user\", \"conversations\"],\n });\n // The cloud path returns a start task (no app_conversation_id\n // yet); the sidebar surfaces those via `useStartTasks` which doesn't\n // poll, so invalidate it explicitly so the in-flight task shows up\n // in the conversation list immediately.\n queryClient.invalidateQueries({\n queryKey: [\"start-tasks\"],\n });\n },\n });\n};\n"],"mappings":"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"}
@@ -0,0 +1,12 @@
1
+ import type { InstallCanvasExtensionRequest } from "#/types/canvas-extension";
2
+ export declare function useInstallCanvasExtension(): import("@tanstack/react-query").UseMutationResult<import("#/types/canvas-extension").InstalledCanvasExtensionInfo, import("axios").AxiosError<unknown, any>, InstallCanvasExtensionRequest, unknown>;
3
+ export declare function useSetCanvasExtensionEnabled(): import("@tanstack/react-query").UseMutationResult<{
4
+ name: string;
5
+ enabled: boolean;
6
+ }, import("axios").AxiosError<unknown, any>, {
7
+ name: string;
8
+ enabled: boolean;
9
+ }, unknown>;
10
+ export declare function useUninstallCanvasExtension(): import("@tanstack/react-query").UseMutationResult<{
11
+ message: string;
12
+ }, import("axios").AxiosError<unknown, any>, string, unknown>;
@@ -1,2 +1,2 @@
1
- require("../../_virtual/_rolldown/runtime.cjs");const e=require("../../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"),t=require("../../api/conversation-service/agent-server-conversation-service.api.cjs");var n=()=>e.useMutation({mutationKey:[`read-conversation-file`],mutationFn:async({conversationId:e,filePath:n})=>t.default.readConversationFile(e,n)});exports.useReadConversationFile=n;
1
+ require("../../_virtual/_rolldown/runtime.cjs");const e=require("../../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"),t=require("../../utils/retrieve-axios-error-message.cjs"),n=require("../../utils/custom-toast-handlers.cjs"),r=require("../../api/conversation-service/agent-server-conversation-service.api.cjs"),i=require("../query/use-settings.cjs");var a=()=>e.useMutation({mutationKey:[`read-conversation-file`],meta:{disableToast:!0},mutationFn:async({conversationId:e,filePath:t})=>r.default.readConversationFile(e,t),onError:e=>{i.getErrorStatus(e)!==404&&n.displayErrorToast(t.retrieveAxiosErrorMessage(e))}});exports.useReadConversationFile=a;
2
2
  //# sourceMappingURL=use-read-conversation-file.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-read-conversation-file.cjs","names":[],"sources":["../../../src/hooks/mutation/use-read-conversation-file.ts"],"sourcesContent":["import { useMutation } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\n\ninterface UseReadConversationFileVariables {\n conversationId: string;\n filePath?: string;\n}\n\nexport const useReadConversationFile = () =>\n useMutation({\n mutationKey: [\"read-conversation-file\"],\n mutationFn: async ({\n conversationId,\n filePath,\n }: UseReadConversationFileVariables): Promise<string> =>\n AgentServerConversationService.readConversationFile(\n conversationId,\n filePath,\n ),\n });\n"],"mappings":"+NAQA,IAAa,MACX,EAAA,YAAY,CACV,YAAa,CAAC,wBAAwB,EACtC,WAAY,MAAO,CACjB,iBACA,cAEA,EAAA,QAA+B,qBAC7B,EACA,CACF,CACJ,CAAC"}
1
+ {"version":3,"file":"use-read-conversation-file.cjs","names":[],"sources":["../../../src/hooks/mutation/use-read-conversation-file.ts"],"sourcesContent":["import { useMutation } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { getErrorStatus } from \"#/hooks/query/use-settings\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\n\ninterface UseReadConversationFileVariables {\n conversationId: string;\n filePath?: string;\n}\n\nexport const useReadConversationFile = () =>\n useMutation({\n mutationKey: [\"read-conversation-file\"],\n // A 404 (no plan yet) is expected and must stay silent; `onError` below\n // re-shows the toast for anything else so real failures still surface.\n meta: { disableToast: true },\n mutationFn: async ({\n conversationId,\n filePath,\n }: UseReadConversationFileVariables): Promise<string> =>\n AgentServerConversationService.readConversationFile(\n conversationId,\n filePath,\n ),\n onError: (error) => {\n if (getErrorStatus(error) === 404) return;\n displayErrorToast(retrieveAxiosErrorMessage(error));\n },\n });\n"],"mappings":"mXAWA,IAAa,MACX,EAAA,YAAY,CACV,YAAa,CAAC,wBAAwB,EAGtC,KAAM,CAAE,aAAc,EAAK,EAC3B,WAAY,MAAO,CACjB,iBACA,cAEA,EAAA,QAA+B,qBAC7B,EACA,CACF,EACF,QAAU,GAAU,CACd,EAAA,eAAe,CAAK,IAAM,KAC9B,EAAA,kBAAkB,EAAA,0BAA0B,CAAK,CAAC,CACpD,CACF,CAAC"}
@@ -1,11 +1,18 @@
1
1
  import { useMutation as e } from "../../node_modules/@tanstack/react-query/build/modern/useMutation.js";
2
- import t from "../../api/conversation-service/agent-server-conversation-service.api.js";
2
+ import { retrieveAxiosErrorMessage as t } from "../../utils/retrieve-axios-error-message.js";
3
+ import { displayErrorToast as n } from "../../utils/custom-toast-handlers.js";
4
+ import r from "../../api/conversation-service/agent-server-conversation-service.api.js";
5
+ import { getErrorStatus as i } from "../query/use-settings.js";
3
6
  //#region src/hooks/mutation/use-read-conversation-file.ts
4
- var n = () => e({
7
+ var a = () => e({
5
8
  mutationKey: ["read-conversation-file"],
6
- mutationFn: async ({ conversationId: e, filePath: n }) => t.readConversationFile(e, n)
9
+ meta: { disableToast: !0 },
10
+ mutationFn: async ({ conversationId: e, filePath: t }) => r.readConversationFile(e, t),
11
+ onError: (e) => {
12
+ i(e) !== 404 && n(t(e));
13
+ }
7
14
  });
8
15
  //#endregion
9
- export { n as useReadConversationFile };
16
+ export { a as useReadConversationFile };
10
17
 
11
18
  //# sourceMappingURL=use-read-conversation-file.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-read-conversation-file.js","names":[],"sources":["../../../src/hooks/mutation/use-read-conversation-file.ts"],"sourcesContent":["import { useMutation } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\n\ninterface UseReadConversationFileVariables {\n conversationId: string;\n filePath?: string;\n}\n\nexport const useReadConversationFile = () =>\n useMutation({\n mutationKey: [\"read-conversation-file\"],\n mutationFn: async ({\n conversationId,\n filePath,\n }: UseReadConversationFileVariables): Promise<string> =>\n AgentServerConversationService.readConversationFile(\n conversationId,\n filePath,\n ),\n });\n"],"mappings":";;;AAQA,IAAa,UACX,EAAY;CACV,aAAa,CAAC,wBAAwB;CACtC,YAAY,OAAO,EACjB,mBACA,kBAEA,EAA+B,qBAC7B,GACA,CACF;AACJ,CAAC"}
1
+ {"version":3,"file":"use-read-conversation-file.js","names":[],"sources":["../../../src/hooks/mutation/use-read-conversation-file.ts"],"sourcesContent":["import { useMutation } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { getErrorStatus } from \"#/hooks/query/use-settings\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\n\ninterface UseReadConversationFileVariables {\n conversationId: string;\n filePath?: string;\n}\n\nexport const useReadConversationFile = () =>\n useMutation({\n mutationKey: [\"read-conversation-file\"],\n // A 404 (no plan yet) is expected and must stay silent; `onError` below\n // re-shows the toast for anything else so real failures still surface.\n meta: { disableToast: true },\n mutationFn: async ({\n conversationId,\n filePath,\n }: UseReadConversationFileVariables): Promise<string> =>\n AgentServerConversationService.readConversationFile(\n conversationId,\n filePath,\n ),\n onError: (error) => {\n if (getErrorStatus(error) === 404) return;\n displayErrorToast(retrieveAxiosErrorMessage(error));\n },\n });\n"],"mappings":";;;;;;AAWA,IAAa,UACX,EAAY;CACV,aAAa,CAAC,wBAAwB;CAGtC,MAAM,EAAE,cAAc,GAAK;CAC3B,YAAY,OAAO,EACjB,mBACA,kBAEA,EAA+B,qBAC7B,GACA,CACF;CACF,UAAU,MAAU;EACd,EAAe,CAAK,MAAM,OAC9B,EAAkB,EAA0B,CAAK,CAAC;CACpD;AACF,CAAC"}
@@ -1,2 +1,2 @@
1
- require("../../_virtual/_rolldown/runtime.cjs");const e=require("../query/query-keys.cjs"),t=require("../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"),r=require("../../api/settings-service/settings-service.api.cjs"),i=require("../use-tracking.cjs"),a=require("../query/use-settings.cjs");var o=async e=>{let t={...e};delete t.agent_settings_schema,delete t.conversation_settings_schema;let n={...t.conversation_settings_diff??{}};Object.keys(n).length>0?t.conversation_settings_diff=n:delete t.conversation_settings_diff,delete t.conversation_settings;let i=t.agent_settings_diff,a=i?.llm;if(a&&typeof a.api_key==`string`){let e=a.api_key.trim();a.api_key=e===``?``:e}i&&Object.keys(i).length>0?t.agent_settings_diff=i:delete t.agent_settings_diff,delete t.agent_settings,typeof t.search_api_key==`string`&&(t.search_api_key=t.search_api_key.trim()),typeof t.git_user_name==`string`&&(t.git_user_name=t.git_user_name.trim()),typeof t.git_user_email==`string`&&(t.git_user_email=t.git_user_email.trim()),await r.default.saveSettings(t)},s=(r=`personal`,{retry:s}={})=>{let{trackMcpConfigUpdated:c}=i.useTracking(),l=t.useQueryClient(),{data:u}=a.useSettings(r);return n.useMutation({...s===void 0?{}:{retry:s},mutationFn:async e=>{let t=e.mcp_config,n=u?.mcp_config;if(t&&n!==t){let e=Object.values(t);c({sseServersCount:e.filter(e=>e.transport===`sse`).length,stdioServersCount:e.filter(e=>e.transport===`stdio`).length})}await o(e)},onSuccess:async()=>{await l.invalidateQueries({queryKey:e.SETTINGS_QUERY_KEYS.byScope(r)})},meta:{disableToast:!0}})};exports.useSaveSettings=s;
1
+ require("../../_virtual/_rolldown/runtime.cjs");const e=require("../query/query-keys.cjs"),t=require("../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"),r=require("../../api/settings-service/settings-service.api.cjs"),i=require("../query/use-settings.cjs"),a=require("../use-tracking.cjs");var o=async e=>{let t={...e};delete t.agent_settings_schema,delete t.conversation_settings_schema;let n={...t.conversation_settings_diff??{}};Object.keys(n).length>0?t.conversation_settings_diff=n:delete t.conversation_settings_diff,delete t.conversation_settings;let i=t.agent_settings_diff,a=i?.llm;if(a&&typeof a.api_key==`string`){let e=a.api_key.trim();a.api_key=e===``?``:e}i&&Object.keys(i).length>0?t.agent_settings_diff=i:delete t.agent_settings_diff,delete t.agent_settings,typeof t.search_api_key==`string`&&(t.search_api_key=t.search_api_key.trim()),typeof t.git_user_name==`string`&&(t.git_user_name=t.git_user_name.trim()),typeof t.git_user_email==`string`&&(t.git_user_email=t.git_user_email.trim()),await r.default.saveSettings(t)},s=(r=`personal`,{retry:s}={})=>{let{trackMcpConfigUpdated:c}=a.useTracking(),l=t.useQueryClient(),{data:u}=i.useSettings(r);return n.useMutation({...s===void 0?{}:{retry:s},mutationFn:async e=>{let t=e.mcp_config,n=u?.mcp_config;if(t&&n!==t){let e=Object.values(t);c({sseServersCount:e.filter(e=>e.transport===`sse`).length,stdioServersCount:e.filter(e=>e.transport===`stdio`).length})}await o(e)},onSuccess:async()=>{await l.invalidateQueries({queryKey:e.SETTINGS_QUERY_KEYS.byScope(r)})},meta:{disableToast:!0}})};exports.useSaveSettings=s;
2
2
  //# sourceMappingURL=use-save-settings.cjs.map
@@ -2,8 +2,8 @@ import { SETTINGS_QUERY_KEYS as e } from "../query/query-keys.js";
2
2
  import { useQueryClient as t } from "../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js";
3
3
  import { useMutation as n } from "../../node_modules/@tanstack/react-query/build/modern/useMutation.js";
4
4
  import r from "../../api/settings-service/settings-service.api.js";
5
- import { useTracking as i } from "../use-tracking.js";
6
- import { useSettings as a } from "../query/use-settings.js";
5
+ import { useSettings as i } from "../query/use-settings.js";
6
+ import { useTracking as a } from "../use-tracking.js";
7
7
  //#region src/hooks/mutation/use-save-settings.ts
8
8
  var o = async (e) => {
9
9
  let t = { ...e };
@@ -17,7 +17,7 @@ var o = async (e) => {
17
17
  }
18
18
  i && Object.keys(i).length > 0 ? t.agent_settings_diff = i : delete t.agent_settings_diff, delete t.agent_settings, typeof t.search_api_key == "string" && (t.search_api_key = t.search_api_key.trim()), typeof t.git_user_name == "string" && (t.git_user_name = t.git_user_name.trim()), typeof t.git_user_email == "string" && (t.git_user_email = t.git_user_email.trim()), await r.saveSettings(t);
19
19
  }, s = (r = "personal", { retry: s } = {}) => {
20
- let { trackMcpConfigUpdated: c } = i(), l = t(), { data: u } = a(r);
20
+ let { trackMcpConfigUpdated: c } = a(), l = t(), { data: u } = i(r);
21
21
  return n({
22
22
  ...s === void 0 ? {} : { retry: s },
23
23
  mutationFn: async (e) => {
@@ -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("../query/query-keys.cjs"),r=require("../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"),i=require("../../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"),a=require("../../utils/retrieve-axios-error-message.cjs"),o=require("../../utils/custom-toast-handlers.cjs"),s=require("../../api/conversation-metadata-store.cjs"),c=require("../../api/settings-service/settings-service.api.cjs"),l=require("../../api/conversation-service/agent-server-conversation-service.api.cjs"),u=require("../chat/model-command-event-anchor.cjs"),d=require("../chat/record-model-switch-message.cjs"),f=require("./conversation-mutation-utils.cjs");var p=[`switch-llm-profile`],m=()=>{let m=r.useQueryClient(),{t:h}=e.useTranslation();return i.useMutation({mutationKey:p,mutationFn:({conversationId:e,profileName:t})=>l.default.switchProfile(e,t),meta:{disableToast:!0},onMutate:({conversationId:e})=>({anchorEventId:e?u.getLastRenderableEventId():null}),onError:(e,{profileName:n})=>{let r=h(t.I18nKey.MODEL$SWITCH_FAILED,{name:n});o.displayErrorToast(a.retrieveAxiosErrorMessage(e)||r)},onSuccess:(e,{conversationId:t,profileName:r},i)=>{if(m.invalidateQueries({queryKey:n.LLM_PROFILES_QUERY_KEYS.all}),t){f.invalidateConversationQueries(m,t),d.recordModelSwitchMessage(t,r,i?.anchorEventId??null);let e=s.getStoredConversationMetadata(t);s.setStoredConversationMetadata(t,{selected_repository:e?.selected_repository??null,selected_branch:e?.selected_branch??null,git_provider:e?.git_provider??null,selected_workspace:e?.selected_workspace??null,active_profile:r,plugins:e?.plugins??null})}else c.default.invalidateCache(),m.invalidateQueries({queryKey:n.SETTINGS_QUERY_KEYS.personal()})}})};exports.SWITCH_LLM_PROFILE_MUTATION_KEY=p,exports.useSwitchLlmProfile=m;
1
+ require("../../_virtual/_rolldown/runtime.cjs");const e=require("../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../i18n/declaration.cjs"),n=require("../query/query-keys.cjs"),r=require("../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"),i=require("../../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"),a=require("../../utils/retrieve-axios-error-message.cjs"),o=require("../../utils/custom-toast-handlers.cjs"),s=require("../../api/settings-service/settings-service.api.cjs"),c=require("../../api/conversation-service/agent-server-conversation-service.api.cjs"),l=require("../chat/model-command-event-anchor.cjs"),u=require("../chat/record-model-switch-message.cjs"),d=require("./conversation-mutation-utils.cjs");var f=[`switch-llm-profile`],p=()=>{let p=r.useQueryClient(),{t:m}=e.useTranslation();return i.useMutation({mutationKey:f,mutationFn:({conversationId:e,profileName:t})=>c.default.switchProfile(e,t),meta:{disableToast:!0},onMutate:({conversationId:e})=>({anchorEventId:e?l.getLastRenderableEventId():null}),onError:(e,{profileName:n})=>{let r=m(t.I18nKey.MODEL$SWITCH_FAILED,{name:n});o.displayErrorToast(a.retrieveAxiosErrorMessage(e)||r)},onSuccess:(e,{conversationId:t,profileName:r},i)=>{p.invalidateQueries({queryKey:n.LLM_PROFILES_QUERY_KEYS.all}),t?(d.invalidateConversationQueries(p,t),u.recordModelSwitchMessage(t,r,i?.anchorEventId??null),u.stampActiveLlmProfile(t,r)):(s.default.invalidateCache(),p.invalidateQueries({queryKey:n.SETTINGS_QUERY_KEYS.personal()}))}})};exports.SWITCH_LLM_PROFILE_MUTATION_KEY=f,exports.useSwitchLlmProfile=p;
2
2
  //# sourceMappingURL=use-switch-llm-profile.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-switch-llm-profile.cjs","names":[],"sources":["../../../src/hooks/mutation/use-switch-llm-profile.ts"],"sourcesContent":["import { useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport { useTranslation } from \"react-i18next\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport SettingsService from \"#/api/settings-service/settings-service.api\";\nimport {\n LLM_PROFILES_QUERY_KEYS,\n SETTINGS_QUERY_KEYS,\n} from \"#/hooks/query/query-keys\";\nimport { getLastRenderableEventId } from \"#/hooks/chat/model-command-event-anchor\";\nimport { recordModelSwitchMessage } from \"#/hooks/chat/record-model-switch-message\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n} from \"#/api/conversation-metadata-store\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { invalidateConversationQueries } from \"./conversation-mutation-utils\";\n\ninterface SwitchLlmProfileVars {\n /**\n * When set, the conversation's running LLM is swapped via /switch_profile and\n * the user's global default profile is untouched. When null (home page),\n * the profile is activated globally instead.\n */\n conversationId: string | null;\n profileName: string;\n}\n\n/**\n * Shared key so any picker instance can observe an in-flight switch via\n * `useIsMutating` — the pill button and the menu that fires the switch are\n * separate hook instances, so per-observer `isPending` wouldn't line up.\n */\nexport const SWITCH_LLM_PROFILE_MUTATION_KEY = [\"switch-llm-profile\"];\n\n/**\n * Switches the LLM profile. Per-conversation when called from inside a\n * conversation; globally activates the profile when called from the home page.\n *\n * The confirmation message, #1082 metadata persist, and error reporting all\n * live in the mutation-level callbacks (not `mutate(..., callbacks)`) so they\n * still run after the switcher menu closes on select — React Query drops\n * mutate-scoped callbacks when the calling component unmounts.\n *\n * `meta.disableToast` + a tailored `onError` (rather than the global mutation\n * toast) so a failed switch keeps the specific \"Switched to {name} failed\"\n * message instead of a generic error (#1571 review) — unlike\n * use-switch-acp-model, which has no per-action message worth tailoring.\n */\nexport const useSwitchLlmProfile = () => {\n const queryClient = useQueryClient();\n const { t } = useTranslation();\n\n return useMutation({\n mutationKey: SWITCH_LLM_PROFILE_MUTATION_KEY,\n mutationFn: ({ conversationId, profileName }: SwitchLlmProfileVars) =>\n AgentServerConversationService.switchProfile(conversationId, profileName),\n meta: { disableToast: true },\n // Anchor the inline message where the user issued the switch; captured\n // synchronously here because the menu unmounts before the switch resolves.\n onMutate: ({ conversationId }) => ({\n anchorEventId: conversationId ? getLastRenderableEventId() : null,\n }),\n onError: (error, { profileName }) => {\n const fallback = t(I18nKey.MODEL$SWITCH_FAILED, { name: profileName });\n displayErrorToast(retrieveAxiosErrorMessage(error) || fallback);\n },\n onSuccess: (_data, { conversationId, profileName }, context) => {\n queryClient.invalidateQueries({\n queryKey: LLM_PROFILES_QUERY_KEYS.all,\n });\n if (conversationId) {\n invalidateConversationQueries(queryClient, conversationId);\n recordModelSwitchMessage(\n conversationId,\n profileName,\n context?.anchorEventId ?? null,\n );\n // Keep the per-conversation profile identity fresh so the chat-header\n // switcher shows the right name after a reload (the agent-server only\n // round-trips the model string). #1082\n const prev = getStoredConversationMetadata(conversationId);\n setStoredConversationMetadata(conversationId, {\n selected_repository: prev?.selected_repository ?? null,\n selected_branch: prev?.selected_branch ?? null,\n git_provider: prev?.git_provider ?? null,\n selected_workspace: prev?.selected_workspace ?? null,\n active_profile: profileName,\n plugins: prev?.plugins ?? null,\n });\n } else {\n // Home-page activate path (same server endpoint as\n // useActivateLlmProfile): clear the SettingsService cache so the next\n // conversation-start reads the newly activated profile's LLM config\n // instead of the stale encrypted settings.\n SettingsService.invalidateCache();\n queryClient.invalidateQueries({\n queryKey: SETTINGS_QUERY_KEYS.personal(),\n });\n }\n },\n });\n};\n"],"mappings":"60BAkCA,IAAa,EAAkC,CAAC,oBAAoB,EAgBvD,MAA4B,CACvC,IAAM,EAAc,EAAA,eAAe,EAC7B,CAAE,KAAM,EAAA,eAAe,EAE7B,OAAO,EAAA,YAAY,CACjB,YAAa,EACb,YAAa,CAAE,iBAAgB,iBAC7B,EAAA,QAA+B,cAAc,EAAgB,CAAW,EAC1E,KAAM,CAAE,aAAc,EAAK,EAG3B,UAAW,CAAE,qBAAsB,CACjC,cAAe,EAAiB,EAAA,yBAAyB,EAAI,IAC/D,GACA,SAAU,EAAO,CAAE,iBAAkB,CACnC,IAAM,EAAW,EAAE,EAAA,QAAQ,oBAAqB,CAAE,KAAM,CAAY,CAAC,EACrE,EAAA,kBAAkB,EAAA,0BAA0B,CAAK,GAAK,CAAQ,CAChE,EACA,WAAY,EAAO,CAAE,iBAAgB,eAAe,IAAY,CAI9D,GAHA,EAAY,kBAAkB,CAC5B,SAAU,EAAA,wBAAwB,GACpC,CAAC,EACG,EAAgB,CAClB,EAAA,8BAA8B,EAAa,CAAc,EACzD,EAAA,yBACE,EACA,EACA,GAAS,eAAiB,IAC5B,EAIA,IAAM,EAAO,EAAA,8BAA8B,CAAc,EACzD,EAAA,8BAA8B,EAAgB,CAC5C,oBAAqB,GAAM,qBAAuB,KAClD,gBAAiB,GAAM,iBAAmB,KAC1C,aAAc,GAAM,cAAgB,KACpC,mBAAoB,GAAM,oBAAsB,KAChD,eAAgB,EAChB,QAAS,GAAM,SAAW,IAC5B,CAAC,CACH,MAKE,EAAA,QAAgB,gBAAgB,EAChC,EAAY,kBAAkB,CAC5B,SAAU,EAAA,oBAAoB,SAAS,CACzC,CAAC,CAEL,CACF,CAAC,CACH"}
1
+ {"version":3,"file":"use-switch-llm-profile.cjs","names":[],"sources":["../../../src/hooks/mutation/use-switch-llm-profile.ts"],"sourcesContent":["import { useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport { useTranslation } from \"react-i18next\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport SettingsService from \"#/api/settings-service/settings-service.api\";\nimport {\n LLM_PROFILES_QUERY_KEYS,\n SETTINGS_QUERY_KEYS,\n} from \"#/hooks/query/query-keys\";\nimport { getLastRenderableEventId } from \"#/hooks/chat/model-command-event-anchor\";\nimport {\n recordModelSwitchMessage,\n stampActiveLlmProfile,\n} from \"#/hooks/chat/record-model-switch-message\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { invalidateConversationQueries } from \"./conversation-mutation-utils\";\n\ninterface SwitchLlmProfileVars {\n /**\n * When set, the conversation's running LLM is swapped via /switch_profile and\n * the user's global default profile is untouched. When null (home page),\n * the profile is activated globally instead.\n */\n conversationId: string | null;\n profileName: string;\n}\n\n/**\n * Shared key so any picker instance can observe an in-flight switch via\n * `useIsMutating` — the pill button and the menu that fires the switch are\n * separate hook instances, so per-observer `isPending` wouldn't line up.\n */\nexport const SWITCH_LLM_PROFILE_MUTATION_KEY = [\"switch-llm-profile\"];\n\n/**\n * Switches the LLM profile. Per-conversation when called from inside a\n * conversation; globally activates the profile when called from the home page.\n *\n * The confirmation message, #1082 metadata persist, and error reporting all\n * live in the mutation-level callbacks (not `mutate(..., callbacks)`) so they\n * still run after the switcher menu closes on select — React Query drops\n * mutate-scoped callbacks when the calling component unmounts.\n *\n * `meta.disableToast` + a tailored `onError` (rather than the global mutation\n * toast) so a failed switch keeps the specific \"Switched to {name} failed\"\n * message instead of a generic error (#1571 review) — unlike\n * use-switch-acp-model, which has no per-action message worth tailoring.\n */\nexport const useSwitchLlmProfile = () => {\n const queryClient = useQueryClient();\n const { t } = useTranslation();\n\n return useMutation({\n mutationKey: SWITCH_LLM_PROFILE_MUTATION_KEY,\n mutationFn: ({ conversationId, profileName }: SwitchLlmProfileVars) =>\n AgentServerConversationService.switchProfile(conversationId, profileName),\n meta: { disableToast: true },\n // Anchor the inline message where the user issued the switch; captured\n // synchronously here because the menu unmounts before the switch resolves.\n onMutate: ({ conversationId }) => ({\n anchorEventId: conversationId ? getLastRenderableEventId() : null,\n }),\n onError: (error, { profileName }) => {\n const fallback = t(I18nKey.MODEL$SWITCH_FAILED, { name: profileName });\n displayErrorToast(retrieveAxiosErrorMessage(error) || fallback);\n },\n onSuccess: (_data, { conversationId, profileName }, context) => {\n queryClient.invalidateQueries({\n queryKey: LLM_PROFILES_QUERY_KEYS.all,\n });\n if (conversationId) {\n invalidateConversationQueries(queryClient, conversationId);\n recordModelSwitchMessage(\n conversationId,\n profileName,\n context?.anchorEventId ?? null,\n );\n // Keep the per-conversation profile identity fresh so the chat-header\n // switcher shows the right name after a reload (the agent-server only\n // round-trips the model string). #1082\n stampActiveLlmProfile(conversationId, profileName);\n } else {\n // Home-page activate path (same server endpoint as\n // useActivateLlmProfile): clear the SettingsService cache so the next\n // conversation-start reads the newly activated profile's LLM config\n // instead of the stale encrypted settings.\n SettingsService.invalidateCache();\n queryClient.invalidateQueries({\n queryKey: SETTINGS_QUERY_KEYS.personal(),\n });\n }\n },\n });\n};\n"],"mappings":"sxBAiCA,IAAa,EAAkC,CAAC,oBAAoB,EAgBvD,MAA4B,CACvC,IAAM,EAAc,EAAA,eAAe,EAC7B,CAAE,KAAM,EAAA,eAAe,EAE7B,OAAO,EAAA,YAAY,CACjB,YAAa,EACb,YAAa,CAAE,iBAAgB,iBAC7B,EAAA,QAA+B,cAAc,EAAgB,CAAW,EAC1E,KAAM,CAAE,aAAc,EAAK,EAG3B,UAAW,CAAE,qBAAsB,CACjC,cAAe,EAAiB,EAAA,yBAAyB,EAAI,IAC/D,GACA,SAAU,EAAO,CAAE,iBAAkB,CACnC,IAAM,EAAW,EAAE,EAAA,QAAQ,oBAAqB,CAAE,KAAM,CAAY,CAAC,EACrE,EAAA,kBAAkB,EAAA,0BAA0B,CAAK,GAAK,CAAQ,CAChE,EACA,WAAY,EAAO,CAAE,iBAAgB,eAAe,IAAY,CAC9D,EAAY,kBAAkB,CAC5B,SAAU,EAAA,wBAAwB,GACpC,CAAC,EACG,GACF,EAAA,8BAA8B,EAAa,CAAc,EACzD,EAAA,yBACE,EACA,EACA,GAAS,eAAiB,IAC5B,EAIA,EAAA,sBAAsB,EAAgB,CAAW,IAMjD,EAAA,QAAgB,gBAAgB,EAChC,EAAY,kBAAkB,CAC5B,SAAU,EAAA,oBAAoB,SAAS,CACzC,CAAC,EAEL,CACF,CAAC,CACH"}
@@ -5,41 +5,29 @@ import { useQueryClient as i } from "../../node_modules/@tanstack/react-query/bu
5
5
  import { useMutation as a } from "../../node_modules/@tanstack/react-query/build/modern/useMutation.js";
6
6
  import { retrieveAxiosErrorMessage as o } from "../../utils/retrieve-axios-error-message.js";
7
7
  import { displayErrorToast as s } from "../../utils/custom-toast-handlers.js";
8
- import { getStoredConversationMetadata as c, setStoredConversationMetadata as l } from "../../api/conversation-metadata-store.js";
9
- import u from "../../api/settings-service/settings-service.api.js";
10
- import d from "../../api/conversation-service/agent-server-conversation-service.api.js";
11
- import { getLastRenderableEventId as f } from "../chat/model-command-event-anchor.js";
12
- import { recordModelSwitchMessage as p } from "../chat/record-model-switch-message.js";
13
- import { invalidateConversationQueries as m } from "./conversation-mutation-utils.js";
8
+ import c from "../../api/settings-service/settings-service.api.js";
9
+ import l from "../../api/conversation-service/agent-server-conversation-service.api.js";
10
+ import { getLastRenderableEventId as u } from "../chat/model-command-event-anchor.js";
11
+ import { recordModelSwitchMessage as d, stampActiveLlmProfile as f } from "../chat/record-model-switch-message.js";
12
+ import { invalidateConversationQueries as p } from "./conversation-mutation-utils.js";
14
13
  //#region src/hooks/mutation/use-switch-llm-profile.ts
15
- var h = ["switch-llm-profile"], g = () => {
16
- let g = i(), { t: _ } = e();
14
+ var m = ["switch-llm-profile"], h = () => {
15
+ let h = i(), { t: g } = e();
17
16
  return a({
18
- mutationKey: h,
19
- mutationFn: ({ conversationId: e, profileName: t }) => d.switchProfile(e, t),
17
+ mutationKey: m,
18
+ mutationFn: ({ conversationId: e, profileName: t }) => l.switchProfile(e, t),
20
19
  meta: { disableToast: !0 },
21
- onMutate: ({ conversationId: e }) => ({ anchorEventId: e ? f() : null }),
20
+ onMutate: ({ conversationId: e }) => ({ anchorEventId: e ? u() : null }),
22
21
  onError: (e, { profileName: n }) => {
23
- let r = _(t.MODEL$SWITCH_FAILED, { name: n });
22
+ let r = g(t.MODEL$SWITCH_FAILED, { name: n });
24
23
  s(o(e) || r);
25
24
  },
26
25
  onSuccess: (e, { conversationId: t, profileName: i }, a) => {
27
- if (g.invalidateQueries({ queryKey: n.all }), t) {
28
- m(g, t), p(t, i, a?.anchorEventId ?? null);
29
- let e = c(t);
30
- l(t, {
31
- selected_repository: e?.selected_repository ?? null,
32
- selected_branch: e?.selected_branch ?? null,
33
- git_provider: e?.git_provider ?? null,
34
- selected_workspace: e?.selected_workspace ?? null,
35
- active_profile: i,
36
- plugins: e?.plugins ?? null
37
- });
38
- } else u.invalidateCache(), g.invalidateQueries({ queryKey: r.personal() });
26
+ h.invalidateQueries({ queryKey: n.all }), t ? (p(h, t), d(t, i, a?.anchorEventId ?? null), f(t, i)) : (c.invalidateCache(), h.invalidateQueries({ queryKey: r.personal() }));
39
27
  }
40
28
  });
41
29
  };
42
30
  //#endregion
43
- export { h as SWITCH_LLM_PROFILE_MUTATION_KEY, g as useSwitchLlmProfile };
31
+ export { m as SWITCH_LLM_PROFILE_MUTATION_KEY, h as useSwitchLlmProfile };
44
32
 
45
33
  //# sourceMappingURL=use-switch-llm-profile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-switch-llm-profile.js","names":[],"sources":["../../../src/hooks/mutation/use-switch-llm-profile.ts"],"sourcesContent":["import { useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport { useTranslation } from \"react-i18next\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport SettingsService from \"#/api/settings-service/settings-service.api\";\nimport {\n LLM_PROFILES_QUERY_KEYS,\n SETTINGS_QUERY_KEYS,\n} from \"#/hooks/query/query-keys\";\nimport { getLastRenderableEventId } from \"#/hooks/chat/model-command-event-anchor\";\nimport { recordModelSwitchMessage } from \"#/hooks/chat/record-model-switch-message\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n} from \"#/api/conversation-metadata-store\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { invalidateConversationQueries } from \"./conversation-mutation-utils\";\n\ninterface SwitchLlmProfileVars {\n /**\n * When set, the conversation's running LLM is swapped via /switch_profile and\n * the user's global default profile is untouched. When null (home page),\n * the profile is activated globally instead.\n */\n conversationId: string | null;\n profileName: string;\n}\n\n/**\n * Shared key so any picker instance can observe an in-flight switch via\n * `useIsMutating` — the pill button and the menu that fires the switch are\n * separate hook instances, so per-observer `isPending` wouldn't line up.\n */\nexport const SWITCH_LLM_PROFILE_MUTATION_KEY = [\"switch-llm-profile\"];\n\n/**\n * Switches the LLM profile. Per-conversation when called from inside a\n * conversation; globally activates the profile when called from the home page.\n *\n * The confirmation message, #1082 metadata persist, and error reporting all\n * live in the mutation-level callbacks (not `mutate(..., callbacks)`) so they\n * still run after the switcher menu closes on select — React Query drops\n * mutate-scoped callbacks when the calling component unmounts.\n *\n * `meta.disableToast` + a tailored `onError` (rather than the global mutation\n * toast) so a failed switch keeps the specific \"Switched to {name} failed\"\n * message instead of a generic error (#1571 review) — unlike\n * use-switch-acp-model, which has no per-action message worth tailoring.\n */\nexport const useSwitchLlmProfile = () => {\n const queryClient = useQueryClient();\n const { t } = useTranslation();\n\n return useMutation({\n mutationKey: SWITCH_LLM_PROFILE_MUTATION_KEY,\n mutationFn: ({ conversationId, profileName }: SwitchLlmProfileVars) =>\n AgentServerConversationService.switchProfile(conversationId, profileName),\n meta: { disableToast: true },\n // Anchor the inline message where the user issued the switch; captured\n // synchronously here because the menu unmounts before the switch resolves.\n onMutate: ({ conversationId }) => ({\n anchorEventId: conversationId ? getLastRenderableEventId() : null,\n }),\n onError: (error, { profileName }) => {\n const fallback = t(I18nKey.MODEL$SWITCH_FAILED, { name: profileName });\n displayErrorToast(retrieveAxiosErrorMessage(error) || fallback);\n },\n onSuccess: (_data, { conversationId, profileName }, context) => {\n queryClient.invalidateQueries({\n queryKey: LLM_PROFILES_QUERY_KEYS.all,\n });\n if (conversationId) {\n invalidateConversationQueries(queryClient, conversationId);\n recordModelSwitchMessage(\n conversationId,\n profileName,\n context?.anchorEventId ?? null,\n );\n // Keep the per-conversation profile identity fresh so the chat-header\n // switcher shows the right name after a reload (the agent-server only\n // round-trips the model string). #1082\n const prev = getStoredConversationMetadata(conversationId);\n setStoredConversationMetadata(conversationId, {\n selected_repository: prev?.selected_repository ?? null,\n selected_branch: prev?.selected_branch ?? null,\n git_provider: prev?.git_provider ?? null,\n selected_workspace: prev?.selected_workspace ?? null,\n active_profile: profileName,\n plugins: prev?.plugins ?? null,\n });\n } else {\n // Home-page activate path (same server endpoint as\n // useActivateLlmProfile): clear the SettingsService cache so the next\n // conversation-start reads the newly activated profile's LLM config\n // instead of the stale encrypted settings.\n SettingsService.invalidateCache();\n queryClient.invalidateQueries({\n queryKey: SETTINGS_QUERY_KEYS.personal(),\n });\n }\n },\n });\n};\n"],"mappings":";;;;;;;;;;;;;;AAkCA,IAAa,IAAkC,CAAC,oBAAoB,GAgBvD,UAA4B;CACvC,IAAM,IAAc,EAAe,GAC7B,EAAE,SAAM,EAAe;CAE7B,OAAO,EAAY;EACjB,aAAa;EACb,aAAa,EAAE,mBAAgB,qBAC7B,EAA+B,cAAc,GAAgB,CAAW;EAC1E,MAAM,EAAE,cAAc,GAAK;EAG3B,WAAW,EAAE,yBAAsB,EACjC,eAAe,IAAiB,EAAyB,IAAI,KAC/D;EACA,UAAU,GAAO,EAAE,qBAAkB;GACnC,IAAM,IAAW,EAAE,EAAQ,qBAAqB,EAAE,MAAM,EAAY,CAAC;GACrE,EAAkB,EAA0B,CAAK,KAAK,CAAQ;EAChE;EACA,YAAY,GAAO,EAAE,mBAAgB,kBAAe,MAAY;GAI9D,IAHA,EAAY,kBAAkB,EAC5B,UAAU,EAAwB,IACpC,CAAC,GACG,GAAgB;IAElB,AADA,EAA8B,GAAa,CAAc,GACzD,EACE,GACA,GACA,GAAS,iBAAiB,IAC5B;IAIA,IAAM,IAAO,EAA8B,CAAc;IACzD,EAA8B,GAAgB;KAC5C,qBAAqB,GAAM,uBAAuB;KAClD,iBAAiB,GAAM,mBAAmB;KAC1C,cAAc,GAAM,gBAAgB;KACpC,oBAAoB,GAAM,sBAAsB;KAChD,gBAAgB;KAChB,SAAS,GAAM,WAAW;IAC5B,CAAC;GACH,OAME,AADA,EAAgB,gBAAgB,GAChC,EAAY,kBAAkB,EAC5B,UAAU,EAAoB,SAAS,EACzC,CAAC;EAEL;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"use-switch-llm-profile.js","names":[],"sources":["../../../src/hooks/mutation/use-switch-llm-profile.ts"],"sourcesContent":["import { useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport { useTranslation } from \"react-i18next\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport SettingsService from \"#/api/settings-service/settings-service.api\";\nimport {\n LLM_PROFILES_QUERY_KEYS,\n SETTINGS_QUERY_KEYS,\n} from \"#/hooks/query/query-keys\";\nimport { getLastRenderableEventId } from \"#/hooks/chat/model-command-event-anchor\";\nimport {\n recordModelSwitchMessage,\n stampActiveLlmProfile,\n} from \"#/hooks/chat/record-model-switch-message\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { invalidateConversationQueries } from \"./conversation-mutation-utils\";\n\ninterface SwitchLlmProfileVars {\n /**\n * When set, the conversation's running LLM is swapped via /switch_profile and\n * the user's global default profile is untouched. When null (home page),\n * the profile is activated globally instead.\n */\n conversationId: string | null;\n profileName: string;\n}\n\n/**\n * Shared key so any picker instance can observe an in-flight switch via\n * `useIsMutating` — the pill button and the menu that fires the switch are\n * separate hook instances, so per-observer `isPending` wouldn't line up.\n */\nexport const SWITCH_LLM_PROFILE_MUTATION_KEY = [\"switch-llm-profile\"];\n\n/**\n * Switches the LLM profile. Per-conversation when called from inside a\n * conversation; globally activates the profile when called from the home page.\n *\n * The confirmation message, #1082 metadata persist, and error reporting all\n * live in the mutation-level callbacks (not `mutate(..., callbacks)`) so they\n * still run after the switcher menu closes on select — React Query drops\n * mutate-scoped callbacks when the calling component unmounts.\n *\n * `meta.disableToast` + a tailored `onError` (rather than the global mutation\n * toast) so a failed switch keeps the specific \"Switched to {name} failed\"\n * message instead of a generic error (#1571 review) — unlike\n * use-switch-acp-model, which has no per-action message worth tailoring.\n */\nexport const useSwitchLlmProfile = () => {\n const queryClient = useQueryClient();\n const { t } = useTranslation();\n\n return useMutation({\n mutationKey: SWITCH_LLM_PROFILE_MUTATION_KEY,\n mutationFn: ({ conversationId, profileName }: SwitchLlmProfileVars) =>\n AgentServerConversationService.switchProfile(conversationId, profileName),\n meta: { disableToast: true },\n // Anchor the inline message where the user issued the switch; captured\n // synchronously here because the menu unmounts before the switch resolves.\n onMutate: ({ conversationId }) => ({\n anchorEventId: conversationId ? getLastRenderableEventId() : null,\n }),\n onError: (error, { profileName }) => {\n const fallback = t(I18nKey.MODEL$SWITCH_FAILED, { name: profileName });\n displayErrorToast(retrieveAxiosErrorMessage(error) || fallback);\n },\n onSuccess: (_data, { conversationId, profileName }, context) => {\n queryClient.invalidateQueries({\n queryKey: LLM_PROFILES_QUERY_KEYS.all,\n });\n if (conversationId) {\n invalidateConversationQueries(queryClient, conversationId);\n recordModelSwitchMessage(\n conversationId,\n profileName,\n context?.anchorEventId ?? null,\n );\n // Keep the per-conversation profile identity fresh so the chat-header\n // switcher shows the right name after a reload (the agent-server only\n // round-trips the model string). #1082\n stampActiveLlmProfile(conversationId, profileName);\n } else {\n // Home-page activate path (same server endpoint as\n // useActivateLlmProfile): clear the SettingsService cache so the next\n // conversation-start reads the newly activated profile's LLM config\n // instead of the stale encrypted settings.\n SettingsService.invalidateCache();\n queryClient.invalidateQueries({\n queryKey: SETTINGS_QUERY_KEYS.personal(),\n });\n }\n },\n });\n};\n"],"mappings":";;;;;;;;;;;;;AAiCA,IAAa,IAAkC,CAAC,oBAAoB,GAgBvD,UAA4B;CACvC,IAAM,IAAc,EAAe,GAC7B,EAAE,SAAM,EAAe;CAE7B,OAAO,EAAY;EACjB,aAAa;EACb,aAAa,EAAE,mBAAgB,qBAC7B,EAA+B,cAAc,GAAgB,CAAW;EAC1E,MAAM,EAAE,cAAc,GAAK;EAG3B,WAAW,EAAE,yBAAsB,EACjC,eAAe,IAAiB,EAAyB,IAAI,KAC/D;EACA,UAAU,GAAO,EAAE,qBAAkB;GACnC,IAAM,IAAW,EAAE,EAAQ,qBAAqB,EAAE,MAAM,EAAY,CAAC;GACrE,EAAkB,EAA0B,CAAK,KAAK,CAAQ;EAChE;EACA,YAAY,GAAO,EAAE,mBAAgB,kBAAe,MAAY;GAI9D,AAHA,EAAY,kBAAkB,EAC5B,UAAU,EAAwB,IACpC,CAAC,GACG,KACF,EAA8B,GAAa,CAAc,GACzD,EACE,GACA,GACA,GAAS,iBAAiB,IAC5B,GAIA,EAAsB,GAAgB,CAAW,MAMjD,EAAgB,gBAAgB,GAChC,EAAY,kBAAkB,EAC5B,UAAU,EAAoB,SAAS,EACzC,CAAC;EAEL;CACF,CAAC;AACH"}
@@ -0,0 +1,2 @@
1
+ require("../../_virtual/_rolldown/runtime.cjs");const e=require("../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"),t=require("../../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"),n=require("../../api/conversation-service/agent-server-conversation-service.api.cjs");var r=()=>{let r=e.useQueryClient();return t.useMutation({mutationFn:e=>n.default.updateConversationTags(e.conversationId,e.tags),onMutate:async e=>{let t=[`user`,`conversation`,e.conversationId];await r.cancelQueries({queryKey:t}),await r.cancelQueries({queryKey:[`user`,`conversations`]});let n=r.getQueriesData({queryKey:t}),i=r.getQueryData([`user`,`conversations`]);return r.setQueriesData({queryKey:t},t=>t&&{...t,tags:e.tags}),r.setQueryData([`user`,`conversations`],t=>t?.map(t=>t.id===e.conversationId?{...t,tags:e.tags}:t)),{previousEntries:n,previousConversations:i}},onError:(e,t,n)=>{n?.previousEntries.forEach(([e,t])=>{r.setQueryData(e,t)}),n?.previousConversations&&r.setQueryData([`user`,`conversations`],n.previousConversations)},onSettled:(e,t,n)=>{r.invalidateQueries({queryKey:[`user`,`conversations`]}),r.invalidateQueries({queryKey:[`user`,`conversation`,n.conversationId]})}})};exports.useUpdateConversationTags=r;
2
+ //# sourceMappingURL=use-update-conversation-tags.cjs.map