@openhands/agent-canvas 1.0.0-rc.1 → 1.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/README.windows.md +2 -2
- package/build/assets/{QueryClientProvider-w1cZWY41.js → QueryClientProvider-7oLZ1RtQ.js} +1 -1
- package/build/assets/{Trans-BJeYqz2A.js → Trans-rF21Jwln.js} +1 -1
- package/build/assets/acp-providers-C55k29rf.js +1 -0
- package/build/assets/active-backend-context-CQTk4wD8.js +1 -0
- package/build/assets/add-backend-modal-BdYxoUdL.js +1 -0
- package/build/assets/agent-server-client-options-Dvgeb3x4.js +1 -0
- package/build/assets/agent-server-compatibility-BANjmMTo.js +1 -0
- package/build/assets/agent-server-conversation-service.api-js3oYcdU.js +5 -0
- package/build/assets/{agent-settings-BXBaybB_.js → agent-settings-BNrffu3I.js} +1 -1
- package/build/assets/{alert-banner-NeUl1-PQ.js → alert-banner-BzU93oDh.js} +1 -1
- package/build/assets/{analytics-consent-form-modal-DxkThW4K.js → analytics-consent-form-modal-Ce-_Skcd.js} +1 -1
- package/build/assets/api-key-entry-screen-CGyS-Cna.js +1 -0
- package/build/assets/{app-settings-C-U6jONZ.js → app-settings-DmOs4oik.js} +1 -1
- package/build/assets/automation-detail-DLbCVJCw.js +1 -0
- package/build/assets/{automations-list-BLJzAd-p.js → automations-list-Ces5shz5.js} +1 -1
- package/build/assets/{back-nav-button-DgkK0Ka6.js → back-nav-button-BDM9vr_o.js} +1 -1
- package/build/assets/backend-form-modal-BUy-PzZN.js +1 -0
- package/build/assets/{backend-synced-settings-badge-BktJcGgH.js → backend-synced-settings-badge-1A63yxGs.js} +1 -1
- package/build/assets/{base-modal-DZCNv0A4.js → base-modal-Ba5WcNb6.js} +1 -1
- package/build/assets/{brand-button-LBFNic99.js → brand-button-BoiPxAGm.js} +1 -1
- package/build/assets/browser-B8bp1IqT.js +5 -0
- package/build/assets/browser-store-C5uQbbIi.js +1 -0
- package/build/assets/{browser-tab-be3QvXg9.js → browser-tab-CiBRWB4X.js} +1 -1
- package/build/assets/chat-send-button-qKFZuB9E.js +1 -0
- package/build/assets/check-BDAbW7je.js +1 -0
- package/build/assets/{checkmark-Rmpruj7q.js → checkmark-SEZPnU2I.js} +1 -1
- package/build/assets/{chevron-down-KhWYEjeW.js → chevron-down-DUxWwzTm.js} +1 -1
- package/build/assets/{chevron-left-small-6nyFCWVQ.js → chevron-left-small-x9_-ucHG.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-DquBwJ_6.js → circle-plus-check-toggle-CboDp7XB.js} +1 -1
- package/build/assets/{close-D_o3d8QM.js → close-CbOsKMRg.js} +1 -1
- package/build/assets/{code-tag-DhsjDB-v.js → code-tag-C0vR_IQH.js} +1 -1
- package/build/assets/{color-themes-0biOprdo.js → color-themes-B9n7pBQl.js} +1 -1
- package/build/assets/{combobox-caret-CO7eozIY.js → combobox-caret-DwMmhrrA.js} +1 -1
- package/build/assets/{command-store-UzKGSUC2.js → command-store-BUWgE-vZ.js} +1 -1
- package/build/assets/{condenser-settings-BulzYEuW.js → condenser-settings-FCBjvqSo.js} +1 -1
- package/build/assets/{confirmation-modal-CMAtd9R0.js → confirmation-modal-BPgWqWRI.js} +1 -1
- package/build/assets/{context-menu-list-item-D0swnhFt.js → context-menu-list-item-CHWCx1Mc.js} +1 -1
- package/build/assets/conversation-CT8AvxEH.js +1 -0
- package/build/assets/conversation-panel-DqDDs4WZ.js +1 -0
- package/build/assets/conversation-service.api-y_eB_43m.js +1 -0
- package/build/assets/conversation-state-store-DpgQaK_O.js +1 -0
- package/build/assets/conversation-store-CiYGBud3.js +6 -0
- package/build/assets/{conversation-tab-empty-state-DYjKsg_c.js → conversation-tab-empty-state-Ba5hbJhn.js} +1 -1
- package/build/assets/conversation-vNuLKgz6.js +19 -0
- package/build/assets/conversation-websocket-context-Bb4XBXoc.js +3 -0
- package/build/assets/{copy-BM0RpLez.js → copy-CAxUvM-U.js} +1 -1
- package/build/assets/{custom-toast-handlers-BohXx7uh.js → custom-toast-handlers-fgD4IYsu.js} +1 -1
- package/build/assets/{declaration-DaUdB2Wg.js → declaration-IA661TBv.js} +1 -1
- package/build/assets/{device-verify-DiEJqpJb.js → device-verify-BOQz2LJQ.js} +1 -1
- package/build/assets/{dist-xtCm0O6P.js → dist-B-SKiGDl.js} +1 -1
- package/build/assets/dist-CeJSjcAI.js +1 -0
- package/build/assets/{dropdown-classes-Vqz86I0R.js → dropdown-classes-lT1LUsbO.js} +1 -1
- package/build/assets/edit-automation-modal-C-oC5tis.js +1 -0
- package/build/assets/ellipsis-button-CiLx8dqc.js +1 -0
- package/build/assets/{entry.client-BvKgdCQ9.js → entry.client-Db3BpFL_.js} +2 -2
- package/build/assets/{enum-filter-dropdown-DdFgk0EM.js → enum-filter-dropdown-DFwoVtOw.js} +1 -1
- package/build/assets/{environment-switch-overlay-CuBuZOaa.js → environment-switch-overlay-Cow6h62p.js} +1 -1
- package/build/assets/{extensions-hub-Dayqvv0n.js → extensions-hub-BxZbAtjP.js} +1 -1
- package/build/assets/extensions-navigation-BIb-vAa2.js +1 -0
- package/build/assets/{file-DwHCkWZT.js → file-BJCSojij.js} +1 -1
- package/build/assets/files-tab-DpulQlIo.js +1 -0
- package/build/assets/files-tab-store-CZAEwv3x.js +1 -0
- package/build/assets/{folder-2h1hR1Qb.js → folder-wShAU0y7.js} +1 -1
- package/build/assets/git-control-bar-branch-button-D1uam-nI.js +27 -0
- package/build/assets/{globe-qFjFNG6J.js → globe-CQ_5xwpo.js} +1 -1
- package/build/assets/home-sJAFzI6v.js +1 -0
- package/build/assets/{i18n-zDndR1Ne.js → i18n-CyvU1o95.js} +1 -1
- package/build/assets/install-server-modal-BjEzlLF5.js +1 -0
- package/build/assets/{launch-I00QV8YT.js → launch-DgtB1JTX.js} +1 -1
- package/build/assets/{lesson-plan-C18uB_56.js → lesson-plan-B607buca.js} +1 -1
- package/build/assets/{link-external-DtcdPFbw.js → link-external-DCsHkAj4.js} +1 -1
- package/build/assets/llm-client-BnqeDPua.js +1 -0
- package/build/assets/llm-settings-B8kPJ0Of.js +1 -0
- package/build/assets/llm-settings-CjUpPsvA.js +1 -0
- package/build/assets/{loading-spinner-DNwR4--Z.js → loading-spinner-CFuA0UNt.js} +1 -1
- package/build/assets/manage-backends-modal-CTA-2x4F.js +1 -0
- package/build/assets/manifest-d3e8504d.js +1 -0
- package/build/assets/{markdown-renderer-D6B-u2nM.js → markdown-renderer-oOUs3tw5.js} +1 -1
- package/build/assets/mcp-client-xEdbDxOL.js +1 -0
- package/build/assets/mcp-kJYdM8aJ.js +9 -0
- package/build/assets/messages-BFJXB6MW.js +36 -0
- package/build/assets/{modal-backdrop-BDqI1zBV.js → modal-backdrop-B1si6TUd.js} +1 -1
- package/build/assets/{modal-body-CCLCqX1J.js → modal-body-2Po2nl1e.js} +1 -1
- package/build/assets/{modal-classes-DwTdT3IK.js → modal-classes-9XTtWCtF.js} +1 -1
- package/build/assets/{modal-close-button-gQgKqUf-.js → modal-close-button-DY-rVmld.js} +1 -1
- package/build/assets/model-selector-z_QOzaRV.js +1 -0
- package/build/assets/{navigation-context-aNGUUtdq.js → navigation-context-CszaA-CJ.js} +1 -1
- package/build/assets/{navigation-link-CYkF2y3K.js → navigation-link-DXg4oo29.js} +1 -1
- package/build/assets/onboarding-CZ_7nd-M.js +1 -0
- package/build/assets/{openhands-logo-CHmtDV-t.js → openhands-logo-B-IDE1ER.js} +1 -1
- package/build/assets/{option-service.api-CGNANEcT.js → option-service.api-DHOGfYKh.js} +1 -1
- package/build/assets/organization-service.api-D79cdERN.js +1 -0
- package/build/assets/path-utils-0KWEiRs9.js +1 -0
- package/build/assets/{pencil-Dr0b2jL1.js → pencil-COslZGUC.js} +1 -1
- package/build/assets/{plan-components--aLlpASH.js → plan-components-DsiDjcDi.js} +1 -1
- package/build/assets/{planner-tab-B-5EeCEm.js → planner-tab-CNmJiZ22.js} +1 -1
- package/build/assets/plus-D8aJZRkD.js +1 -0
- package/build/assets/profiles-client-CesbAK-7.js +1 -0
- package/build/assets/{providers-DknP6O2g.js → providers-Bpq3xFRA.js} +1 -1
- package/build/assets/proxy-wIasY2Po.js +1 -0
- package/build/assets/{query-client-config-CWWGQWvw.js → query-client-config-CITeuHD7.js} +1 -1
- package/build/assets/{recommended-automations-launcher-BIul0osB.js → recommended-automations-launcher-B1kfmFTQ.js} +8 -10
- package/build/assets/root-CIZ7Rv1X.js +2 -0
- package/build/assets/root-layout-B5ijp9At.js +2 -0
- package/build/assets/{sdk-section-page-VmtJWH3A.js → sdk-section-page-DTyvCc52.js} +1 -1
- package/build/assets/{sdk-settings-schema-DFievvEK.js → sdk-settings-schema-B0KrqqPX.js} +1 -1
- package/build/assets/{search-BeVRXvX7.js → search-BqXT2Ied.js} +1 -1
- package/build/assets/secrets-service-rJqZtDmI.js +1 -0
- package/build/assets/{secrets-settings-BLMvCkKm.js → secrets-settings-BQNSDLKS.js} +1 -1
- package/build/assets/server-client-Cz8PyIbN.js +1 -0
- package/build/assets/settings-BUlJrO_h.js +1 -0
- package/build/assets/settings-client-BUlG0Gzq.js +1 -0
- package/build/assets/{settings-dropdown-input-DA_pzHWE.js → settings-dropdown-input-BUk4m23x.js} +1 -1
- package/build/assets/{settings-gear-aNebYlCy.js → settings-gear-DFmoMp-6.js} +1 -1
- package/build/assets/{settings-index-CycvkOoq.js → settings-index-DE91Eahc.js} +1 -1
- package/build/assets/{settings-input-8y5p4kze.js → settings-input-DsoZj8Dm.js} +1 -1
- package/build/assets/{settings-list-classes-Qk7zl0Wu.js → settings-list-classes-D8VAVZmi.js} +1 -1
- package/build/assets/{settings-modal-DdntdOGP.js → settings-modal-CCaPYVqW.js} +1 -1
- package/build/assets/{settings-section-header-context-B77tsYlx.js → settings-section-header-context-D61smD-W.js} +1 -1
- package/build/assets/settings-service.api-4u2RKC8k.js +1 -0
- package/build/assets/{settings-switch-ba4DuiNO.js → settings-switch-BQiAS9ga.js} +1 -1
- package/build/assets/{settings-utils-BxzHqLmZ.js → settings-utils-chxTa1vn.js} +1 -1
- package/build/assets/shared-conversation-sBPLAawM.js +1 -0
- package/build/assets/{sidebar-mobile-menu-toggle-C0mmabKj.js → sidebar-mobile-menu-toggle-BDXWzhyB.js} +1 -1
- package/build/assets/{sidebar-nav-link-BsYdDFfb.js → sidebar-nav-link-Bhlzlhp8.js} +1 -1
- package/build/assets/{skill-card-pill-row-BhUlGcYB.js → skill-card-pill-row-Bg5joQf6.js} +1 -1
- package/build/assets/{skills-TYjOUQ2d.js → skills-BDOWVle-.js} +1 -1
- package/build/assets/skills-client-Cr9F5306.js +1 -0
- package/build/assets/{skills-plugins-D0pdqgKa.js → skills-plugins-fihjo1KZ.js} +1 -1
- package/build/assets/{skills-settings-VqKTkmVl.js → skills-settings-NQnuMwZP.js} +1 -1
- package/build/assets/{styled-tooltip-TCp7svY3.js → styled-tooltip-GXy1qxsO.js} +1 -1
- package/build/assets/suspense-C9MBE_9N.js +1 -0
- package/build/assets/{switch-skeleton-cKrdaYGj.js → switch-skeleton-QpdcdxRP.js} +1 -1
- package/build/assets/{task-list-tab-BiizRsY3.js → task-list-tab-Hl9BuVfq.js} +1 -1
- package/build/assets/telemetry-j9SLrtY7.js +2 -0
- package/build/assets/{terminal-BSYITdM0.js → terminal-BUww3Ssl.js} +1 -1
- package/build/assets/{terminal-CpgZx6go.js → terminal-DRwe8--D.js} +1 -1
- package/build/assets/{toggle-switch-CUgOZqZu.js → toggle-switch-DDr-DnEc.js} +1 -1
- package/build/assets/{trash-2-CbVljPko.js → trash-2-DAKXV2Wm.js} +1 -1
- package/build/assets/{typography-Bvw0IxaN.js → typography-Cx7uw7z3.js} +1 -1
- package/build/assets/{u-check-circle-u9QiS4Fr.js → u-check-circle-CftRwky1.js} +1 -1
- package/build/assets/{u-check-circle-half-DjpjzWu3.js → u-check-circle-half-sGVk0BtL.js} +1 -1
- package/build/assets/{u-circuit-DlBlOwx9.js → u-circuit-Cg9tH5qb.js} +1 -1
- package/build/assets/{u-edit-BIYzjs3v.js → u-edit-foF02hwH.js} +1 -1
- package/build/assets/{use-active-conversation-q1wT8LI5.js → use-active-conversation-DJGoI9Mc.js} +1 -1
- package/build/assets/use-agent-settings-schema-DtusObuC.js +1 -0
- package/build/assets/{use-agent-state-CCHlVqvY.js → use-agent-state-BXgWhFh6.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-BAKf91Zx.js → use-cloud-current-user-id-e1Pk7NxQ.js} +1 -1
- package/build/assets/use-config-DSzkljTq.js +1 -0
- package/build/assets/use-create-conversation-CzvaVA5A.js +1 -0
- package/build/assets/use-event-store-DSpvASbC.js +1 -0
- package/build/assets/use-get-secrets-DiLgP147.js +1 -0
- package/build/assets/use-handle-plan-click-CUZwmKIk.js +1 -0
- package/build/assets/use-is-authed-fNsj-Adj.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-3ydwpi_M.js → use-launch-skill-in-chat-ClRJlIx7.js} +1 -1
- package/build/assets/use-llm-profiles-CyNVoVqm.js +1 -0
- package/build/assets/use-runtime-is-ready-CWkGQFsb.js +1 -0
- package/build/assets/{use-save-settings-rE9aA29R.js → use-save-settings-CP23emUY.js} +1 -1
- package/build/assets/use-settings-0qFqC-r6.js +1 -0
- package/build/assets/{use-settings-nav-items-C7MOWj09.js → use-settings-nav-items-C6YxUn4h.js} +1 -1
- package/build/assets/use-skills-BWHATXK-.js +1 -0
- package/build/assets/{use-task-list-YMkSzdDv.js → use-task-list-JPudBRv3.js} +1 -1
- package/build/assets/{use-tracking-DQYdZpxi.js → use-tracking-CjLZgh8X.js} +1 -1
- package/build/assets/use-unified-vscode-url-DSn2tT08.js +1 -0
- package/build/assets/use-user-conversation-CQ5IwnZk.js +1 -0
- package/build/assets/{useMutation-DDo48A8t.js → useMutation-7hG0GuPx.js} +1 -1
- package/build/assets/useQuery-JDs8UaWj.js +1 -0
- package/build/assets/{useTranslation-CEcjrme-.js → useTranslation-CbJtty1g.js} +1 -1
- package/build/assets/{utils-CdgBzLA7.js → utils-CVcuFUYj.js} +1 -1
- package/build/assets/{vendor~browser-DWk6fNtJ.js → vendor~browser-Dwwc84Zf.js} +1 -1
- package/build/assets/{vendor~browser-tab-NZdVoI2Z.js → vendor~browser-tab-Bhohe29F.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation-gp03cWZW.js → vendor~conversation-panel~conversation-DYHL7QoY.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~index-BZ5C6Xpz.js → vendor~conversation-panel~conversation~index-Be58Romv.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-BodGsxSf.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-CBEOG8NF.js} +1 -1
- package/build/assets/{vendor~files-tab-Buz36Y-q.js → vendor~files-tab-B447_Zns.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation-DG0H5SkJ.js → vendor~home~conversation-panel~conversation-DZ-F7J6T.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CXivI4Ym.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B4oeCCli.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-9Il_wz8U.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CQQAW8hY.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-1pTajrpX.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DFsI4CLy.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Ceeqkj0k.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DcvlNgbn.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B7I1ZxCx.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-ojk_J4bB.js} +1 -1
- package/build/assets/{vendor~launch-DXL78kBf.js → vendor~launch-BdXJCmwc.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-CfAc3nMS.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DToubnIU.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-DkwcKRtv.js → vendor~root-layout~home~conversation-panel~conversation-Cg0nXqVs.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-DSqEbr0N.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-Dr8Ly0at.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-BC9XTECT.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-DveauQfg.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-D0XUSHNN.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~jpfhx3ls-zdl_Rltz.js} +2 -2
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~jxrvuot9-BaCzvZac.js +48 -0
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CcFtthyg.js → vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-BwbkftxT.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~automations-list-cNHi83v_.js → vendor~root-layout~home~mcp~automations-list-CtdIEhjQ.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~automations-list-BnIlGhjl.js → vendor~root-layout~home~mcp~automations-list-DGOI7kQz.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BGWUbqUq.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-CbuXadI-.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BuCSnjsW.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-iPAfRWNQ.js} +2 -2
- package/build/assets/{verification-settings-CIqtxWat.js → verification-settings-Cm02KmeI.js} +1 -1
- package/build/assets/{vscode-tab-DEt72yJX.js → vscode-tab-AF70Yke0.js} +1 -1
- package/build/assets/{waiting-for-runtime-message-DSjJfeoj.js → waiting-for-runtime-message-Bg27u9JB.js} +1 -1
- package/build/assets/x-8AbJWTbX.js +1 -0
- package/build/assets/{x-mark-DsJ9tDD0.js → x-mark-Cn-YJVbN.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +2 -1
- package/build/locales/ca/openhands.json +2 -1
- package/build/locales/de/openhands.json +2 -1
- package/build/locales/en/openhands.json +2 -1
- package/build/locales/es/openhands.json +2 -1
- package/build/locales/fr/openhands.json +2 -1
- package/build/locales/it/openhands.json +2 -1
- package/build/locales/ja/openhands.json +2 -1
- package/build/locales/ko-KR/openhands.json +2 -1
- package/build/locales/no/openhands.json +2 -1
- package/build/locales/pt/openhands.json +2 -1
- package/build/locales/tr/openhands.json +2 -1
- package/build/locales/uk/openhands.json +2 -1
- package/build/locales/zh-CN/openhands.json +2 -1
- package/build/locales/zh-TW/openhands.json +2 -1
- package/config/defaults.json +1 -1
- package/dist/api/agent-server-adapter.cjs +3 -3
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.js +94 -86
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/app-preferences-store.cjs.map +1 -1
- package/dist/api/app-preferences-store.d.ts +6 -2
- package/dist/api/app-preferences-store.js.map +1 -1
- package/dist/api/cloud/proxy.cjs +1 -1
- package/dist/api/cloud/proxy.cjs.map +1 -1
- package/dist/api/cloud/proxy.d.ts +18 -6
- package/dist/api/cloud/proxy.js +1 -1
- package/dist/api/cloud/proxy.js.map +1 -1
- package/dist/api/conversation-metadata-store.cjs.map +1 -1
- package/dist/api/conversation-metadata-store.d.ts +8 -0
- package/dist/api/conversation-metadata-store.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.types.d.ts +9 -0
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js +9 -9
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message.js +80 -71
- package/dist/components/conversation-events/chat/event-message.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.d.ts +7 -1
- package/dist/components/features/chat/switch-profile-button.cjs +1 -1
- package/dist/components/features/chat/switch-profile-button.cjs.map +1 -1
- package/dist/components/features/chat/switch-profile-button.js +5 -5
- package/dist/components/features/chat/switch-profile-button.js.map +1 -1
- package/dist/components/features/conversation-panel/skills-modal.cjs +1 -1
- package/dist/components/features/conversation-panel/skills-modal.cjs.map +1 -1
- package/dist/components/features/conversation-panel/skills-modal.js +34 -37
- package/dist/components/features/conversation-panel/skills-modal.js.map +1 -1
- package/dist/components/features/home/workspace-selection-form.d.ts +1 -0
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +8 -0
- package/dist/components/features/settings/llm-profiles/profile-actions-menu.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu.js +1 -0
- package/dist/components/features/sidebar/sidebar.cjs +1 -1
- package/dist/components/features/sidebar/sidebar.js +6 -6
- package/dist/components/features/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.d.ts +1 -9
- package/dist/components/features/skills/extensions-navigation.js +31 -50
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/constants/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.js +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.js +26 -14
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.js +26 -15
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +1 -0
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +1 -1
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +32 -15
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +10 -10
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/locales/ar/openhands.json +2 -1
- package/dist/locales/ca/openhands.json +2 -1
- package/dist/locales/de/openhands.json +2 -1
- package/dist/locales/en/openhands.json +2 -1
- package/dist/locales/es/openhands.json +2 -1
- package/dist/locales/fr/openhands.json +2 -1
- package/dist/locales/it/openhands.json +2 -1
- package/dist/locales/ja/openhands.json +2 -1
- package/dist/locales/ko-KR/openhands.json +2 -1
- package/dist/locales/no/openhands.json +2 -1
- package/dist/locales/pt/openhands.json +2 -1
- package/dist/locales/tr/openhands.json +2 -1
- package/dist/locales/uk/openhands.json +2 -1
- package/dist/locales/zh-CN/openhands.json +2 -1
- package/dist/locales/zh-TW/openhands.json +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js +10 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.js +21 -21
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.d.ts +0 -1
- package/dist/routes/mcp.js +0 -1
- package/dist/routes/mcp.js.map +1 -1
- package/dist/types/agent-server/core/events/index.d.ts +1 -0
- package/dist/types/agent-server/core/events/streaming-delta-event.d.ts +7 -0
- package/dist/types/agent-server/core/openhands-event.d.ts +2 -2
- package/dist/types/agent-server/type-guards.cjs +1 -1
- package/dist/types/agent-server/type-guards.cjs.map +1 -1
- package/dist/types/agent-server/type-guards.d.ts +2 -0
- package/dist/types/agent-server/type-guards.js +3 -3
- package/dist/types/agent-server/type-guards.js.map +1 -1
- package/dist/utils/handle-event-for-ui.cjs +1 -1
- package/dist/utils/handle-event-for-ui.cjs.map +1 -1
- package/dist/utils/handle-event-for-ui.js +69 -13
- package/dist/utils/handle-event-for-ui.js.map +1 -1
- package/dist/utils/mcp-config.cjs +1 -1
- package/dist/utils/mcp-config.cjs.map +1 -1
- package/dist/utils/mcp-config.js +27 -19
- package/dist/utils/mcp-config.js.map +1 -1
- package/dist/utils/mcp-marketplace-utils.cjs +1 -1
- package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
- package/dist/utils/mcp-marketplace-utils.js +38 -18
- package/dist/utils/mcp-marketplace-utils.js.map +1 -1
- package/dist/utils/normalize-display-model.cjs +1 -1
- package/dist/utils/normalize-display-model.cjs.map +1 -1
- package/dist/utils/normalize-display-model.js +8 -7
- package/dist/utils/normalize-display-model.js.map +1 -1
- package/dist/utils/openhands-llm.cjs +1 -1
- package/dist/utils/openhands-llm.cjs.map +1 -1
- package/dist/utils/openhands-llm.d.ts +13 -0
- package/dist/utils/openhands-llm.js +9 -3
- package/dist/utils/openhands-llm.js.map +1 -1
- package/package.json +2 -2
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +71 -120
- package/scripts/dev-with-automation.mjs +58 -4
- package/scripts/runtime-services-info.mjs +199 -0
- package/scripts/static-server.mjs +42 -4
- package/build/assets/acp-providers-DJr8DlNG.js +0 -1
- package/build/assets/acp-route-guard-A__sWgbc.js +0 -1
- package/build/assets/active-backend-context-I2w666XY.js +0 -1
- package/build/assets/add-backend-modal-BDBDBXsJ.js +0 -1
- package/build/assets/agent-server-client-options-9agOSarV.js +0 -1
- package/build/assets/agent-server-compatibility-B7QStIcH.js +0 -1
- package/build/assets/agent-server-conversation-service.api-Cagoqq1V.js +0 -5
- package/build/assets/api-key-entry-screen-ByXA4hXH.js +0 -1
- package/build/assets/automation-detail-Dbmgt974.js +0 -1
- package/build/assets/backend-form-modal-CeB983Sj.js +0 -1
- package/build/assets/browser-D08Sp3ZY.js +0 -5
- package/build/assets/browser-store-JRrcGdlk.js +0 -1
- package/build/assets/chat-send-button-5qz0zj6R.js +0 -1
- package/build/assets/check-CZhEL6rP.js +0 -1
- package/build/assets/conversation-BrjF2-Ky.js +0 -1
- package/build/assets/conversation-HgR_TTPE.js +0 -19
- package/build/assets/conversation-panel-BlRcO5AC.js +0 -1
- package/build/assets/conversation-service.api-B_Pdmwsa.js +0 -1
- package/build/assets/conversation-state-store-D-w0uurj.js +0 -1
- package/build/assets/conversation-store-CC-isCnP.js +0 -1
- package/build/assets/conversation-websocket-context-G95yfL81.js +0 -3
- package/build/assets/dist-Bl-1K5Tv.js +0 -1
- package/build/assets/edit-automation-modal-CNZgSSiH.js +0 -1
- package/build/assets/extensions-navigation-yFLAU06N.js +0 -1
- package/build/assets/files-tab-CMredyYX.js +0 -1
- package/build/assets/files-tab-store-DLU28g8C.js +0 -1
- package/build/assets/git-control-bar-branch-button-D8blTNXh.js +0 -27
- package/build/assets/home-CWw845Rz.js +0 -1
- package/build/assets/install-server-modal-D8Q0xZcN.js +0 -1
- package/build/assets/llm-client-BqyLKgUN.js +0 -1
- package/build/assets/llm-settings-CAnFYAEG.js +0 -1
- package/build/assets/llm-settings-DotqpmCF.js +0 -1
- package/build/assets/manage-backends-modal-Ceo_SOcf.js +0 -1
- package/build/assets/manifest-61ec2d68.js +0 -1
- package/build/assets/mcp-EvrLVTla.js +0 -9
- package/build/assets/messages-Bz9TWjlh.js +0 -36
- package/build/assets/middleware-CfatjPYZ.js +0 -6
- package/build/assets/model-selector-CZOi4V7r.js +0 -1
- package/build/assets/onboarding-CPCKYvFh.js +0 -1
- package/build/assets/organization-service.api-Dn74hBTH.js +0 -1
- package/build/assets/path-utils-BjxzIGLp.js +0 -1
- package/build/assets/plus-DT-M0FA1.js +0 -1
- package/build/assets/profiles-client-BrqNmaDV.js +0 -1
- package/build/assets/proxy-sRh0WKI7.js +0 -1
- package/build/assets/root-CklXEh3W.js +0 -2
- package/build/assets/root-layout-BCA_X8XL.js +0 -2
- package/build/assets/secrets-service-DVtlLWY8.js +0 -1
- package/build/assets/server-client-DYv_GHPl.js +0 -1
- package/build/assets/settings-CXvJUx_j.js +0 -1
- package/build/assets/settings-service.api-DxIEtvx6.js +0 -1
- package/build/assets/shared-conversation-x41nZQi7.js +0 -1
- package/build/assets/sidebar-store-DnQAJAE5.js +0 -1
- package/build/assets/telemetry-fQFd-8V3.js +0 -2
- package/build/assets/use-agent-settings-schema-Yxf7KGyG.js +0 -1
- package/build/assets/use-config-DwfigQ_Y.js +0 -1
- package/build/assets/use-create-conversation-BEzddjXn.js +0 -1
- package/build/assets/use-event-store-Cxqc45Sw.js +0 -1
- package/build/assets/use-get-secrets-BlO1BfUo.js +0 -1
- package/build/assets/use-handle-plan-click-Bfl0zIBr.js +0 -1
- package/build/assets/use-is-authed-hHndEep7.js +0 -1
- package/build/assets/use-llm-profiles-E-jjZMZw.js +0 -1
- package/build/assets/use-runtime-is-ready-DBWzvAmc.js +0 -1
- package/build/assets/use-settings-BPTbE7lg.js +0 -1
- package/build/assets/use-skills-QhoaIYGF.js +0 -1
- package/build/assets/use-unified-vscode-url-DFtNIC1Q.js +0 -1
- package/build/assets/use-user-conversation-BRAseenw.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-D8soyAAx.js +0 -48
- package/build/assets/vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js +0 -1
- package/build/assets/x-JOBEVLW0.js +0 -1
- package/dist/components/features/conversation-panel/skills-runtime-waiting-state.cjs +0 -2
- package/dist/components/features/conversation-panel/skills-runtime-waiting-state.cjs.map +0 -1
- package/dist/components/features/conversation-panel/skills-runtime-waiting-state.d.ts +0 -1
- package/dist/components/features/conversation-panel/skills-runtime-waiting-state.js +0 -21
- package/dist/components/features/conversation-panel/skills-runtime-waiting-state.js.map +0 -1
- package/dist/utils/acp-route-guard.cjs +0 -1
- package/dist/utils/acp-route-guard.d.ts +0 -26
- package/dist/utils/acp-route-guard.js +0 -4
- /package/build/assets/{agent-server-ui-style-scope-BwIZYdC1.js → agent-server-ui-style-scope-Bhc5vpWO.js} +0 -0
- /package/build/assets/{automation-DJ_3GeXD.js → automation-BzmydDjr.js} +0 -0
- /package/build/assets/{common-DqjLSBOt.js → common-Cfviy7yT.js} +0 -0
- /package/build/assets/{context-CEQZwATj.js → context-BBqptpXX.js} +0 -0
- /package/build/assets/{conversation-local-storage-YmOVXxxW.js → conversation-local-storage-D5Tre_GA.js} +0 -0
- /package/build/assets/{createLucideIcon-Ddu8jDOQ.js → createLucideIcon-C9OEnwvX.js} +0 -0
- /package/build/assets/{environment-switch-store-CiurvTtK.js → environment-switch-store-BpKxp6Xq.js} +0 -0
- /package/build/assets/{git-status-mapper-DnL9OC8_.js → git-status-mapper-C3rfzUex.js} +0 -0
- /package/build/assets/{handle-capture-consent-3XrjZ8wi.js → handle-capture-consent-DDnXMC9Y.js} +0 -0
- /package/build/assets/{health-store-B5f0S2FY.js → health-store-d-d2ssv4.js} +0 -0
- /package/build/assets/{iconBase-BVhFI-0E.js → iconBase-1A_WRQ4E.js} +0 -0
- /package/build/assets/{map-provider-C3Z5Dx2J.js → map-provider-XSFHmdDs.js} +0 -0
- /package/build/assets/{objectWithoutPropertiesLoose-DSQKyRhw.js → objectWithoutPropertiesLoose-B-IA9dU9.js} +0 -0
- /package/build/assets/{query-keys-tAsQcc_9.js → query-keys-CQaji0wJ.js} +0 -0
- /package/build/assets/{react-Dy05vyj5.js → react-CuAHzoGi.js} +0 -0
- /package/build/assets/{retrieve-axios-error-message-BY-yIkIq.js → retrieve-axios-error-message-DbnSBc_1.js} +0 -0
- /package/build/assets/{sdk-settings-field-metadata-C6KMD-jZ.js → sdk-settings-field-metadata-CETNItbo.js} +0 -0
- /package/build/assets/{settings-DGY6n4J2.js → settings-BgL2HUsU.js} +0 -0
- /package/build/assets/{settings-like-page-layout-classes-DNg2vKSM.js → settings-like-page-layout-classes-DENKlZpD.js} +0 -0
- /package/build/assets/{use-breakpoint-DpxHDmuH.js → use-breakpoint-Dt2knceC.js} +0 -0
- /package/build/assets/{use-click-outside-element-DhxCUyWl.js → use-click-outside-element-Bu2A3s59.js} +0 -0
- /package/build/assets/{v4-khGvL7i2.js → v4-BygpdDmc.js} +0 -0
- /package/build/assets/{vendor~browser-BDNLFng6.js → vendor~browser-BYEwwJqV.js} +0 -0
- /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-D_hRW_zc.js → vendor~conversation-panel~conversation~alert-banner-BnHToS5O.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~j8sdb9mk-OFpe9fX_.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~j8sdb9mk-oCzr0-9g.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-BPuuVEqr.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-CTmh4bwd.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~skills-settings~m~o9nrx3fm-D44TR8hL.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~skills-settings~m~o9nrx3fm-87v-LliW.js} +0 -0
- /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dr3Ow7Ms.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-D8cqyq4k.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-B1TKKuuH.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ntycl9e1-DspdqGPW.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-Fa-nXZ4M.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-DMH1jSwL.js} +0 -0
- /package/build/assets/{vendor~terminal-0ObOedYm.js → vendor~terminal-aeP3PnKf.js} +0 -0
- /package/build/assets/{vscode-url-helper-BMq8JBhB.js → vscode-url-helper-DOCkV_-G.js} +0 -0
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import { useTranslation as e } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
2
2
|
import { I18nKey as t } from "../../../i18n/declaration.js";
|
|
3
3
|
import { cn as n } from "../../../utils/utils.js";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import { SIDEBAR_ROW_INTERACTIVE_CLASS as l, sidebarNavRowClassName as u } from "../sidebar/sidebar-layout.js";
|
|
11
|
-
import { BackendSyncedSettingsBadge as d } from "../settings/backend-synced-settings-badge.js";
|
|
12
|
-
import f from "../../../icons/server-process.js";
|
|
13
|
-
import { useSidebarStore as p } from "../../../stores/sidebar-store.js";
|
|
14
|
-
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
4
|
+
import { NavigationLink as r } from "../../shared/navigation-link.js";
|
|
5
|
+
import i from "../../../icons/skills.js";
|
|
6
|
+
import { SIDEBAR_ROW_INTERACTIVE_CLASS as a, sidebarNavRowClassName as o } from "../sidebar/sidebar-layout.js";
|
|
7
|
+
import { BackendSyncedSettingsBadge as s } from "../settings/backend-synced-settings-badge.js";
|
|
8
|
+
import c from "../../../icons/server-process.js";
|
|
9
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
15
10
|
//#region src/components/features/skills/extensions-navigation.tsx
|
|
16
|
-
var
|
|
11
|
+
var d = [
|
|
17
12
|
{
|
|
18
13
|
to: "/skills",
|
|
19
14
|
label: "Skills",
|
|
20
|
-
icon: /* @__PURE__ */
|
|
15
|
+
icon: /* @__PURE__ */ l(i, {
|
|
21
16
|
width: 16,
|
|
22
17
|
height: 16,
|
|
23
18
|
"aria-hidden": "true"
|
|
@@ -27,17 +22,16 @@ var g = [
|
|
|
27
22
|
{
|
|
28
23
|
to: "/mcp",
|
|
29
24
|
label: "MCP Servers",
|
|
30
|
-
icon: /* @__PURE__ */
|
|
25
|
+
icon: /* @__PURE__ */ l(c, {
|
|
31
26
|
width: 16,
|
|
32
27
|
height: 16
|
|
33
28
|
}),
|
|
34
|
-
end: !0
|
|
35
|
-
disabledByAcp: !0
|
|
29
|
+
end: !0
|
|
36
30
|
},
|
|
37
31
|
{
|
|
38
32
|
to: "/plugins",
|
|
39
33
|
label: "Plugins",
|
|
40
|
-
icon: /* @__PURE__ */
|
|
34
|
+
icon: /* @__PURE__ */ u("svg", {
|
|
41
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
36
|
viewBox: "0 0 24 24",
|
|
43
37
|
fill: "none",
|
|
@@ -49,72 +43,59 @@ var g = [
|
|
|
49
43
|
height: 16,
|
|
50
44
|
"aria-hidden": "true",
|
|
51
45
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ l("path", { d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" }),
|
|
47
|
+
/* @__PURE__ */ l("path", { d: "m3.3 7 8.7 5 8.7-5" }),
|
|
48
|
+
/* @__PURE__ */ l("path", { d: "M12 22V12" })
|
|
55
49
|
]
|
|
56
50
|
}),
|
|
57
51
|
end: !0,
|
|
58
52
|
comingSoon: !0
|
|
59
53
|
}
|
|
60
54
|
];
|
|
61
|
-
function
|
|
62
|
-
let { t:
|
|
63
|
-
return
|
|
55
|
+
function f() {
|
|
56
|
+
let { t: i } = e("openhands");
|
|
57
|
+
return /* @__PURE__ */ u("aside", {
|
|
64
58
|
"data-testid": "extensions-navbar-desktop",
|
|
65
59
|
className: "hidden md:flex md:w-[260px] md:shrink-0 md:flex-col md:gap-2 md:sticky md:top-8 md:self-start",
|
|
66
60
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ l("span", {
|
|
68
62
|
className: "px-2 text-sm font-normal text-white",
|
|
69
|
-
children:
|
|
63
|
+
children: i(t.NAV$CUSTOMIZE)
|
|
70
64
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ l("div", {
|
|
72
66
|
className: "flex flex-col gap-0.5 pt-0.5",
|
|
73
|
-
children:
|
|
74
|
-
let
|
|
67
|
+
children: d.map((e) => {
|
|
68
|
+
let s = /* @__PURE__ */ l("span", {
|
|
75
69
|
className: "shrink-0 flex items-center justify-center",
|
|
76
70
|
children: e.icon
|
|
77
|
-
}), c = /* @__PURE__ */
|
|
71
|
+
}), c = /* @__PURE__ */ l("span", {
|
|
78
72
|
className: "truncate",
|
|
79
73
|
children: e.label
|
|
80
|
-
}), d = e.comingSoon && /* @__PURE__ */
|
|
74
|
+
}), d = e.comingSoon && /* @__PURE__ */ l("span", {
|
|
81
75
|
className: "ml-auto shrink-0 rounded-full border border-white/20 bg-white/5 px-1.5 py-0.5 text-[10px] font-medium text-[var(--oh-text-dim)]",
|
|
82
|
-
children:
|
|
76
|
+
children: i(t.NAV$COMING_SOON)
|
|
83
77
|
});
|
|
84
|
-
return
|
|
85
|
-
content: s(t.SETTINGS$AGENT_DISABLED_TOOLTIP, { agentName: C }),
|
|
86
|
-
placement: "right",
|
|
87
|
-
children: /* @__PURE__ */ h("span", {
|
|
88
|
-
"aria-disabled": "true",
|
|
89
|
-
"data-testid": `sidebar-extensions-${e.to}`,
|
|
90
|
-
className: n(u(), "truncate text-[var(--oh-muted)] opacity-50 cursor-not-allowed"),
|
|
91
|
-
children: [
|
|
92
|
-
i,
|
|
93
|
-
c,
|
|
94
|
-
d
|
|
95
|
-
]
|
|
96
|
-
})
|
|
97
|
-
}, e.to) : /* @__PURE__ */ h(o, {
|
|
78
|
+
return /* @__PURE__ */ u(r, {
|
|
98
79
|
to: e.to,
|
|
99
80
|
end: e.end,
|
|
100
81
|
"data-testid": `sidebar-extensions-${e.to}`,
|
|
101
|
-
className: ({ isActive: e }) => n(
|
|
82
|
+
className: ({ isActive: e }) => n(o(), "truncate", e ? a.active : a.idle),
|
|
102
83
|
children: [
|
|
103
|
-
|
|
84
|
+
s,
|
|
104
85
|
c,
|
|
105
86
|
d
|
|
106
87
|
]
|
|
107
88
|
}, e.to);
|
|
108
89
|
})
|
|
109
90
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ l("div", {
|
|
111
92
|
className: "px-2 pt-3",
|
|
112
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ l(s, {})
|
|
113
94
|
})
|
|
114
95
|
]
|
|
115
96
|
});
|
|
116
97
|
}
|
|
117
98
|
//#endregion
|
|
118
|
-
export {
|
|
99
|
+
export { f as ExtensionsNavigation };
|
|
119
100
|
|
|
120
101
|
//# sourceMappingURL=extensions-navigation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions-navigation.js","names":[],"sources":["../../../../src/components/features/skills/extensions-navigation.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { NavigationLink } from \"#/components/shared/navigation-link\";\nimport {
|
|
1
|
+
{"version":3,"file":"extensions-navigation.js","names":[],"sources":["../../../../src/components/features/skills/extensions-navigation.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { NavigationLink } from \"#/components/shared/navigation-link\";\nimport { cn } from \"#/utils/utils\";\nimport SkillsIcon from \"#/icons/skills.svg?react\";\nimport ServerProcessIcon from \"#/icons/server-process.svg?react\";\nimport { BackendSyncedSettingsBadge } from \"#/components/features/settings/backend-synced-settings-badge\";\nimport {\n SIDEBAR_ROW_INTERACTIVE_CLASS,\n sidebarNavRowClassName,\n} from \"#/components/features/sidebar/sidebar-layout\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\ninterface ExtensionNavItem {\n to: string;\n label: string;\n icon: React.ReactElement;\n end?: boolean;\n comingSoon?: boolean;\n}\n\nexport const EXTENSIONS_NAV_ITEMS: ExtensionNavItem[] = [\n {\n to: \"/skills\",\n label: \"Skills\",\n icon: <SkillsIcon width={16} height={16} aria-hidden=\"true\" />,\n end: true,\n },\n {\n to: \"/mcp\",\n label: \"MCP Servers\",\n icon: <ServerProcessIcon width={16} height={16} />,\n end: true,\n },\n {\n to: \"/plugins\",\n label: \"Plugins\",\n icon: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width={16}\n height={16}\n aria-hidden=\"true\"\n >\n <path d=\"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z\" />\n <path d=\"m3.3 7 8.7 5 8.7-5\" />\n <path d=\"M12 22V12\" />\n </svg>\n ),\n end: true,\n comingSoon: true,\n },\n];\n\nexport function ExtensionsNavigation() {\n const { t } = useTranslation(\"openhands\");\n\n return (\n <aside\n data-testid=\"extensions-navbar-desktop\"\n className=\"hidden md:flex md:w-[260px] md:shrink-0 md:flex-col md:gap-2 md:sticky md:top-8 md:self-start\"\n >\n <span className=\"px-2 text-sm font-normal text-white\">\n {t(I18nKey.NAV$CUSTOMIZE)}\n </span>\n <div className=\"flex flex-col gap-0.5 pt-0.5\">\n {EXTENSIONS_NAV_ITEMS.map((item) => {\n const baseRow = (\n <span className=\"shrink-0 flex items-center justify-center\">\n {item.icon}\n </span>\n );\n const label = <span className=\"truncate\">{item.label}</span>;\n const comingSoonBadge = item.comingSoon && (\n <span className=\"ml-auto shrink-0 rounded-full border border-white/20 bg-white/5 px-1.5 py-0.5 text-[10px] font-medium text-[var(--oh-text-dim)]\">\n {t(I18nKey.NAV$COMING_SOON)}\n </span>\n );\n\n return (\n <NavigationLink\n key={item.to}\n to={item.to}\n end={item.end}\n data-testid={`sidebar-extensions-${item.to}`}\n className={({ isActive }) =>\n cn(\n sidebarNavRowClassName(),\n \"truncate\",\n isActive\n ? SIDEBAR_ROW_INTERACTIVE_CLASS.active\n : SIDEBAR_ROW_INTERACTIVE_CLASS.idle,\n )\n }\n >\n {baseRow}\n {label}\n {comingSoonBadge}\n </NavigationLink>\n );\n })}\n </div>\n <div className=\"px-2 pt-3\">\n <BackendSyncedSettingsBadge />\n </div>\n </aside>\n );\n}\n"],"mappings":";;;;;;;;;;AAoBA,IAAa,IAA2C;CACtD;EACE,IAAI;EACJ,OAAO;EACP,MAAM,kBAAC,GAAD;GAAY,OAAO;GAAI,QAAQ;GAAI,eAAY;GAAS,CAAA;EAC9D,KAAK;EACN;CACD;EACE,IAAI;EACJ,OAAO;EACP,MAAM,kBAAC,GAAD;GAAmB,OAAO;GAAI,QAAQ;GAAM,CAAA;EAClD,KAAK;EACN;CACD;EACE,IAAI;EACJ,OAAO;EACP,MACE,kBAAC,OAAD;GACE,OAAM;GACN,SAAQ;GACR,MAAK;GACL,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;GACf,OAAO;GACP,QAAQ;GACR,eAAY;aAVd;IAYE,kBAAC,QAAD,EAAM,GAAE,0HAA2H,CAAA;IACnI,kBAAC,QAAD,EAAM,GAAE,sBAAuB,CAAA;IAC/B,kBAAC,QAAD,EAAM,GAAE,aAAc,CAAA;IAClB;;EAER,KAAK;EACL,YAAY;EACb;CACF;AAED,SAAgB,IAAuB;CACrC,IAAM,EAAE,SAAM,EAAe,YAAY;AAEzC,QACE,kBAAC,SAAD;EACE,eAAY;EACZ,WAAU;YAFZ;GAIE,kBAAC,QAAD;IAAM,WAAU;cACb,EAAE,EAAQ,cAAc;IACpB,CAAA;GACP,kBAAC,OAAD;IAAK,WAAU;cACZ,EAAqB,KAAK,MAAS;KAClC,IAAM,IACJ,kBAAC,QAAD;MAAM,WAAU;gBACb,EAAK;MACD,CAAA,EAEH,IAAQ,kBAAC,QAAD;MAAM,WAAU;gBAAY,EAAK;MAAa,CAAA,EACtD,IAAkB,EAAK,cAC3B,kBAAC,QAAD;MAAM,WAAU;gBACb,EAAE,EAAQ,gBAAgB;MACtB,CAAA;AAGT,YACE,kBAAC,GAAD;MAEE,IAAI,EAAK;MACT,KAAK,EAAK;MACV,eAAa,sBAAsB,EAAK;MACxC,YAAY,EAAE,kBACZ,EACE,GAAwB,EACxB,YACA,IACI,EAA8B,SAC9B,EAA8B,KACnC;gBAZL;OAeG;OACA;OACA;OACc;QAjBV,EAAK,GAiBK;MAEnB;IACE,CAAA;GACN,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,GAAD,EAA8B,CAAA;IAC1B,CAAA;GACA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../i18n/declaration.cjs`),t=require(`../node_modules/@openhands/typescript-client/dist/models/acp.cjs`);require(`../node_modules/@openhands/typescript-client/dist/index.cjs`);var n=new Set([`default`,`default (recommended)`]);function r(e){if(typeof e!=`string`)return null;let t=e.trim();return!t||n.has(t.toLowerCase())||t===`acp-managed`?null:t}function i(e){for(let t of[e.runtimeName,e.runtimeId,e.configured,e.sdkLlm]){let e=r(t);if(e)return e}return e.providerDefault??null}var a={"claude-code":{icon:`claude-code`,description_key:e.I18nKey.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION},codex:{icon:`codex`,description_key:e.I18nKey.ONBOARDING$AGENT_CODEX_DESCRIPTION},"gemini-cli":{icon:`gemini`,description_key:e.I18nKey.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION}},o=Object.entries(a).map(([e,n])=>{let r=t.getAcpProvider(e);return{key:e,display_name:r?.display_name??e,default_command:r?[...r.default_command]:[],available_models:r?.available_models?.map(e=>({id:e.id,label:e.label})),default_model:r?.default_model??void 0,description_key:n.description_key,icon:n.icon}});function s(e){if(e)return o.find(t=>t.key===e)}function c(e){let t=s(e);return t?t.display_name:null}function l(e){return s(e)?.icon??`cli-generic`}function u(e,t){return t?s(e)?.available_models?.find(e=>e.id===t)?.label??t:null}exports.
|
|
1
|
+
require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../i18n/declaration.cjs`),t=require(`../node_modules/@openhands/typescript-client/dist/models/acp.cjs`);require(`../node_modules/@openhands/typescript-client/dist/index.cjs`);var n=new Set([`default`,`default (recommended)`]);function r(e){if(typeof e!=`string`)return null;let t=e.trim();return!t||n.has(t.toLowerCase())||t===`acp-managed`?null:t}function i(e){for(let t of[e.runtimeName,e.runtimeId,e.configured,e.sdkLlm]){let e=r(t);if(e)return e}return e.providerDefault??null}var a={"claude-code":{icon:`claude-code`,description_key:e.I18nKey.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION},codex:{icon:`codex`,description_key:e.I18nKey.ONBOARDING$AGENT_CODEX_DESCRIPTION},"gemini-cli":{icon:`gemini`,description_key:e.I18nKey.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION}},o=Object.entries(a).map(([e,n])=>{let r=t.getAcpProvider(e);return{key:e,display_name:r?.display_name??e,default_command:r?[...r.default_command]:[],available_models:r?.available_models?.map(e=>({id:e.id,label:e.label})),default_model:r?.default_model??void 0,description_key:n.description_key,icon:n.icon}});function s(e){if(e)return o.find(t=>t.key===e)}function c(e){let t=s(e);return t?t.display_name:null}function l(e){return s(e)?.icon??`cli-generic`}function u(e,t){return t?s(e)?.available_models?.find(e=>e.id===t)?.label??t:null}exports.getAcpProvider=s,exports.getAcpProviderDisplayName=c,exports.labelForAcpModel=u,exports.resolveAcpProviderIcon=l,exports.resolveEffectiveAcpModel=i;
|
|
2
2
|
//# sourceMappingURL=acp-providers.cjs.map
|
|
@@ -61,6 +61,6 @@ function u(e, t) {
|
|
|
61
61
|
return t ? s(e)?.available_models?.find((e) => e.id === t)?.label ?? t : null;
|
|
62
62
|
}
|
|
63
63
|
//#endregion
|
|
64
|
-
export {
|
|
64
|
+
export { s as getAcpProvider, c as getAcpProviderDisplayName, u as labelForAcpModel, l as resolveAcpProviderIcon, i as resolveEffectiveAcpModel };
|
|
65
65
|
|
|
66
66
|
//# sourceMappingURL=acp-providers.js.map
|
|
@@ -1,2 +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`),
|
|
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-metadata-store.cjs`),r=require(`../../api/conversation-service/agent-server-conversation-service.api.cjs`),i=require(`../use-tracking.cjs`),a=require(`../query/use-llm-profiles.cjs`);var o=()=>{let o=e.useQueryClient(),{trackConversationCreated:s}=i.useTracking(),{data:c}=a.useLlmProfiles();return t.useMutation({mutationKey:[`create-conversation`],mutationFn:async e=>{let{query:t,conversationInstructions:i,plugins:a,repository:o,workingDir:s,parentConversationId:l,agentType:u}=e,d=await r.default.createConversation(t,i,a,o?{selected_repository:o.name,selected_branch:o.branch??null,git_provider:o.gitProvider}:null,s,l,u),f=d.app_conversation_id;if(f&&c?.active_profile){let e=n.getStoredConversationMetadata(f);n.setStoredConversationMetadata(f,{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:c.active_profile})}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,{repository:t})=>{s({hasRepository:!!t}),o.invalidateQueries({queryKey:[`user`,`conversations`]}),o.invalidateQueries({queryKey:[`start-tasks`]})}})};exports.useCreateConversation=o;
|
|
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\";\n\ninterface 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}\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\n return useMutation({\n mutationKey: [\"create-conversation\"],\n mutationFn: async (\n variables: CreateConversationVariables,\n ): Promise<CreateConversationResponse> => {\n const {\n query,\n conversationInstructions,\n plugins,\n repository,\n workingDir,\n parentConversationId,\n agentType,\n } = variables;\n\n const conversation =\n await AgentServerConversationService.createConversation(\n query,\n conversationInstructions,\n plugins,\n repository\n ? {\n selected_repository: repository.name,\n selected_branch: repository.branch ?? null,\n git_provider: repository.gitProvider,\n }\n : null,\n workingDir,\n parentConversationId,\n agentType,\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 (_, { repository }) => {\n trackConversationCreated({\n hasRepository: !!repository,\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":"
|
|
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 {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n} from \"#/api/conversation-metadata-store\";\n\ninterface 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}\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\n return useMutation({\n mutationKey: [\"create-conversation\"],\n mutationFn: async (\n variables: CreateConversationVariables,\n ): Promise<CreateConversationResponse> => {\n const {\n query,\n conversationInstructions,\n plugins,\n repository,\n workingDir,\n parentConversationId,\n agentType,\n } = variables;\n\n const conversation =\n await AgentServerConversationService.createConversation(\n query,\n conversationInstructions,\n plugins,\n repository\n ? {\n selected_repository: repository.name,\n selected_branch: repository.branch ?? null,\n git_provider: repository.gitProvider,\n }\n : null,\n workingDir,\n parentConversationId,\n agentType,\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 if (localConversationId && llmProfiles?.active_profile) {\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 active_profile: llmProfiles.active_profile,\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 (_, { repository }) => {\n trackConversationCreated({\n hasRepository: !!repository,\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":"6bAkCA,IAAa,MAA8B,CACzC,IAAM,EAAc,EAAA,gBAAgB,CAC9B,CAAE,4BAA6B,EAAA,aAAa,CAI5C,CAAE,KAAM,GAAgB,EAAA,gBAAgB,CAE9C,OAAO,EAAA,YAAY,CACjB,YAAa,CAAC,sBAAsB,CACpC,WAAY,KACV,IACwC,CACxC,GAAM,CACJ,QACA,2BACA,UACA,aACA,aACA,uBACA,aACE,EAEE,EACJ,MAAM,EAAA,QAA+B,mBACnC,EACA,EACA,EACA,EACI,CACE,oBAAqB,EAAW,KAChC,gBAAiB,EAAW,QAAU,KACtC,aAAc,EAAW,YAC1B,CACD,KACJ,EACA,EACA,EACD,CAOG,EAAsB,EAAa,oBACzC,GAAI,GAAuB,GAAa,eAAgB,CACtD,IAAM,EAAO,EAAA,8BAA8B,EAAoB,CAC/D,EAAA,8BAA8B,EAAqB,CACjD,oBAAqB,GAAM,qBAAuB,KAClD,gBAAiB,GAAM,iBAAmB,KAC1C,aAAc,GAAM,cAAgB,KACpC,mBAAoB,GAAM,oBAAsB,KAChD,eAAgB,EAAY,eAC7B,CAAC,CAYJ,MAAO,CACL,gBALqB,EAAa,oBAChC,EAAa,oBACb,QAAQ,EAAa,KAIvB,gBAAiB,KACjB,IAAK,EAAa,iBAClB,QAAS,EAAa,GACvB,EAEH,UAAW,MAAO,EAAG,CAAE,gBAAiB,CACtC,EAAyB,CACvB,cAAe,CAAC,CAAC,EAClB,CAAC,CAMF,EAAY,kBAAkB,CAC5B,SAAU,CAAC,OAAQ,gBAAgB,CACpC,CAAC,CAKF,EAAY,kBAAkB,CAC5B,SAAU,CAAC,cAAc,CAC1B,CAAC,EAEL,CAAC"}
|
|
@@ -1,31 +1,43 @@
|
|
|
1
1
|
import { useQueryClient as e } from "../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js";
|
|
2
2
|
import { useMutation as t } from "../../node_modules/@tanstack/react-query/build/modern/useMutation.js";
|
|
3
|
-
import n from "../../api/conversation-
|
|
4
|
-
import
|
|
3
|
+
import { getStoredConversationMetadata as n, setStoredConversationMetadata as r } from "../../api/conversation-metadata-store.js";
|
|
4
|
+
import i from "../../api/conversation-service/agent-server-conversation-service.api.js";
|
|
5
|
+
import { useTracking as a } from "../use-tracking.js";
|
|
6
|
+
import { useLlmProfiles as o } from "../query/use-llm-profiles.js";
|
|
5
7
|
//#region src/hooks/mutation/use-create-conversation.ts
|
|
6
|
-
var
|
|
7
|
-
let
|
|
8
|
+
var s = () => {
|
|
9
|
+
let s = e(), { trackConversationCreated: c } = a(), { data: l } = o();
|
|
8
10
|
return t({
|
|
9
11
|
mutationKey: ["create-conversation"],
|
|
10
12
|
mutationFn: async (e) => {
|
|
11
|
-
let { query: t, conversationInstructions:
|
|
12
|
-
selected_repository:
|
|
13
|
-
selected_branch:
|
|
14
|
-
git_provider:
|
|
15
|
-
} : null,
|
|
13
|
+
let { query: t, conversationInstructions: a, plugins: o, repository: s, workingDir: c, parentConversationId: u, agentType: d } = e, f = await i.createConversation(t, a, o, s ? {
|
|
14
|
+
selected_repository: s.name,
|
|
15
|
+
selected_branch: s.branch ?? null,
|
|
16
|
+
git_provider: s.gitProvider
|
|
17
|
+
} : null, c, u, d), p = f.app_conversation_id;
|
|
18
|
+
if (p && l?.active_profile) {
|
|
19
|
+
let e = n(p);
|
|
20
|
+
r(p, {
|
|
21
|
+
selected_repository: e?.selected_repository ?? null,
|
|
22
|
+
selected_branch: e?.selected_branch ?? null,
|
|
23
|
+
git_provider: e?.git_provider ?? null,
|
|
24
|
+
selected_workspace: e?.selected_workspace ?? null,
|
|
25
|
+
active_profile: l.active_profile
|
|
26
|
+
});
|
|
27
|
+
}
|
|
16
28
|
return {
|
|
17
|
-
conversation_id:
|
|
29
|
+
conversation_id: f.app_conversation_id ? f.app_conversation_id : `task-${f.id}`,
|
|
18
30
|
session_api_key: null,
|
|
19
|
-
url:
|
|
20
|
-
task_id:
|
|
31
|
+
url: f.agent_server_url,
|
|
32
|
+
task_id: f.id
|
|
21
33
|
};
|
|
22
34
|
},
|
|
23
35
|
onSuccess: async (e, { repository: t }) => {
|
|
24
|
-
|
|
36
|
+
c({ hasRepository: !!t }), s.invalidateQueries({ queryKey: ["user", "conversations"] }), s.invalidateQueries({ queryKey: ["start-tasks"] });
|
|
25
37
|
}
|
|
26
38
|
});
|
|
27
39
|
};
|
|
28
40
|
//#endregion
|
|
29
|
-
export {
|
|
41
|
+
export { s as useCreateConversation };
|
|
30
42
|
|
|
31
43
|
//# sourceMappingURL=use-create-conversation.js.map
|
|
@@ -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\";\n\ninterface 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}\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\n return useMutation({\n mutationKey: [\"create-conversation\"],\n mutationFn: async (\n variables: CreateConversationVariables,\n ): Promise<CreateConversationResponse> => {\n const {\n query,\n conversationInstructions,\n plugins,\n repository,\n workingDir,\n parentConversationId,\n agentType,\n } = variables;\n\n const conversation =\n await AgentServerConversationService.createConversation(\n query,\n conversationInstructions,\n plugins,\n repository\n ? {\n selected_repository: repository.name,\n selected_branch: repository.branch ?? null,\n git_provider: repository.gitProvider,\n }\n : null,\n workingDir,\n parentConversationId,\n agentType,\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 (_, { repository }) => {\n trackConversationCreated({\n hasRepository: !!repository,\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":"
|
|
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 {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n} from \"#/api/conversation-metadata-store\";\n\ninterface 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}\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\n return useMutation({\n mutationKey: [\"create-conversation\"],\n mutationFn: async (\n variables: CreateConversationVariables,\n ): Promise<CreateConversationResponse> => {\n const {\n query,\n conversationInstructions,\n plugins,\n repository,\n workingDir,\n parentConversationId,\n agentType,\n } = variables;\n\n const conversation =\n await AgentServerConversationService.createConversation(\n query,\n conversationInstructions,\n plugins,\n repository\n ? {\n selected_repository: repository.name,\n selected_branch: repository.branch ?? null,\n git_provider: repository.gitProvider,\n }\n : null,\n workingDir,\n parentConversationId,\n agentType,\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 if (localConversationId && llmProfiles?.active_profile) {\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 active_profile: llmProfiles.active_profile,\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 (_, { repository }) => {\n trackConversationCreated({\n hasRepository: !!repository,\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":";;;;;;;AAkCA,IAAa,UAA8B;CACzC,IAAM,IAAc,GAAgB,EAC9B,EAAE,gCAA6B,GAAa,EAI5C,EAAE,MAAM,MAAgB,GAAgB;AAE9C,QAAO,EAAY;EACjB,aAAa,CAAC,sBAAsB;EACpC,YAAY,OACV,MACwC;GACxC,IAAM,EACJ,UACA,6BACA,YACA,eACA,eACA,yBACA,iBACE,GAEE,IACJ,MAAM,EAA+B,mBACnC,GACA,GACA,GACA,IACI;IACE,qBAAqB,EAAW;IAChC,iBAAiB,EAAW,UAAU;IACtC,cAAc,EAAW;IAC1B,GACD,MACJ,GACA,GACA,EACD,EAOG,IAAsB,EAAa;AACzC,OAAI,KAAuB,GAAa,gBAAgB;IACtD,IAAM,IAAO,EAA8B,EAAoB;AAC/D,MAA8B,GAAqB;KACjD,qBAAqB,GAAM,uBAAuB;KAClD,iBAAiB,GAAM,mBAAmB;KAC1C,cAAc,GAAM,gBAAgB;KACpC,oBAAoB,GAAM,sBAAsB;KAChD,gBAAgB,EAAY;KAC7B,CAAC;;AAYJ,UAAO;IACL,iBALqB,EAAa,sBAChC,EAAa,sBACb,QAAQ,EAAa;IAIvB,iBAAiB;IACjB,KAAK,EAAa;IAClB,SAAS,EAAa;IACvB;;EAEH,WAAW,OAAO,GAAG,EAAE,oBAAiB;AAgBtC,GAfA,EAAyB,EACvB,eAAe,CAAC,CAAC,GAClB,CAAC,EAMF,EAAY,kBAAkB,EAC5B,UAAU,CAAC,QAAQ,gBAAgB,EACpC,CAAC,EAKF,EAAY,kBAAkB,EAC5B,UAAU,CAAC,cAAc,EAC1B,CAAC;;EAEL,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/react-i18next/dist/es/useTranslation.cjs`),t=require(`../../i18n/declaration.cjs`),n=require(`../../utils/custom-toast-handlers.cjs`),r=require(`../chat/model-command-event-anchor.cjs`),
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/react-i18next/dist/es/useTranslation.cjs`),t=require(`../../i18n/declaration.cjs`),n=require(`../../utils/custom-toast-handlers.cjs`),r=require(`../../api/conversation-metadata-store.cjs`),i=require(`../chat/model-command-event-anchor.cjs`),a=require(`../chat/record-model-switch-message.cjs`),o=require(`./use-switch-llm-profile.cjs`);let s=require(`react`);function c(){let{mutate:c,isPending:l}=o.useSwitchLlmProfile(),{t:u}=e.useTranslation();return{switchAndLog:(0,s.useCallback)((e,o)=>{let s=i.getLastRenderableEventId();c({conversationId:e,profileName:o},{onSuccess:()=>{if(e){a.recordModelSwitchMessage(e,o,s);let t=r.getStoredConversationMetadata(e);r.setStoredConversationMetadata(e,{selected_repository:t?.selected_repository??null,selected_branch:t?.selected_branch??null,git_provider:t?.git_provider??null,selected_workspace:t?.selected_workspace??null,active_profile:o})}},onError:e=>{let r=u(t.I18nKey.MODEL$SWITCH_FAILED,{name:o});n.displayErrorToast(e instanceof Error&&e.message?e.message:r)}})},[c,u]),isPending:l}}exports.useSwitchLlmProfileAndLog=c;
|
|
2
2
|
//# sourceMappingURL=use-switch-llm-profile-and-log.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-switch-llm-profile-and-log.cjs","names":[],"sources":["../../../src/hooks/mutation/use-switch-llm-profile-and-log.ts"],"sourcesContent":["import { useCallback } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { getLastRenderableEventId } from \"#/hooks/chat/model-command-event-anchor\";\nimport { recordModelSwitchMessage } from \"#/hooks/chat/record-model-switch-message\";\nimport { useSwitchLlmProfile } from \"#/hooks/mutation/use-switch-llm-profile\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\n/**\n * Switch the conversation's LLM profile and render the result inline (same\n * UX as `/model <name>`). On success the switch is recorded against the\n * last rendered event so the confirmation lines up with where the user\n * issued the command.\n */\nexport function useSwitchLlmProfileAndLog() {\n const { mutate, isPending } = useSwitchLlmProfile();\n const { t } = useTranslation();\n\n const switchAndLog = useCallback(\n (conversationId: string | null, profileName: string) => {\n const anchorEventId = getLastRenderableEventId();\n\n mutate(\n { conversationId, profileName },\n {\n onSuccess: () => {\n // The inline \"Switched to\" message is scoped to a conversation;\n // skip it when activating from the home page (no convo yet).\n if (conversationId) {\n recordModelSwitchMessage(\n conversationId,\n profileName,\n anchorEventId,\n );\n }\n },\n onError: (err: unknown) => {\n const fallback = t(I18nKey.MODEL$SWITCH_FAILED, {\n name: profileName,\n });\n const message =\n err instanceof Error && err.message ? err.message : fallback;\n displayErrorToast(message);\n },\n },\n );\n },\n [mutate, t],\n );\n\n return { switchAndLog, isPending };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-switch-llm-profile-and-log.cjs","names":[],"sources":["../../../src/hooks/mutation/use-switch-llm-profile-and-log.ts"],"sourcesContent":["import { useCallback } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { getLastRenderableEventId } from \"#/hooks/chat/model-command-event-anchor\";\nimport { recordModelSwitchMessage } from \"#/hooks/chat/record-model-switch-message\";\nimport { useSwitchLlmProfile } from \"#/hooks/mutation/use-switch-llm-profile\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n} from \"#/api/conversation-metadata-store\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\n/**\n * Switch the conversation's LLM profile and render the result inline (same\n * UX as `/model <name>`). On success the switch is recorded against the\n * last rendered event so the confirmation lines up with where the user\n * issued the command.\n */\nexport function useSwitchLlmProfileAndLog() {\n const { mutate, isPending } = useSwitchLlmProfile();\n const { t } = useTranslation();\n\n const switchAndLog = useCallback(\n (conversationId: string | null, profileName: string) => {\n const anchorEventId = getLastRenderableEventId();\n\n mutate(\n { conversationId, profileName },\n {\n onSuccess: () => {\n // The inline \"Switched to\" message is scoped to a conversation;\n // skip it when activating from the home page (no convo yet).\n if (conversationId) {\n recordModelSwitchMessage(\n conversationId,\n profileName,\n anchorEventId,\n );\n // Keep the per-conversation profile identity fresh so the\n // chat-header switcher shows the right name after a reload\n // (the agent-server only 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 });\n }\n },\n onError: (err: unknown) => {\n const fallback = t(I18nKey.MODEL$SWITCH_FAILED, {\n name: profileName,\n });\n const message =\n err instanceof Error && err.message ? err.message : fallback;\n displayErrorToast(message);\n },\n },\n );\n },\n [mutate, t],\n );\n\n return { switchAndLog, isPending };\n}\n"],"mappings":"2bAkBA,SAAgB,GAA4B,CAC1C,GAAM,CAAE,SAAQ,aAAc,EAAA,qBAAqB,CAC7C,CAAE,KAAM,EAAA,gBAAgB,CA6C9B,MAAO,CAAE,cAAA,EAAA,EAAA,cA1CN,EAA+B,IAAwB,CACtD,IAAM,EAAgB,EAAA,0BAA0B,CAEhD,EACE,CAAE,iBAAgB,cAAa,CAC/B,CACE,cAAiB,CAGf,GAAI,EAAgB,CAClB,EAAA,yBACE,EACA,EACA,EACD,CAID,IAAM,EAAO,EAAA,8BAA8B,EAAe,CAC1D,EAAA,8BAA8B,EAAgB,CAC5C,oBAAqB,GAAM,qBAAuB,KAClD,gBAAiB,GAAM,iBAAmB,KAC1C,aAAc,GAAM,cAAgB,KACpC,mBAAoB,GAAM,oBAAsB,KAChD,eAAgB,EACjB,CAAC,GAGN,QAAU,GAAiB,CACzB,IAAM,EAAW,EAAE,EAAA,QAAQ,oBAAqB,CAC9C,KAAM,EACP,CAAC,CAGF,EAAA,kBADE,aAAe,OAAS,EAAI,QAAU,EAAI,QAAU,EAC5B,EAE7B,CACF,EAEH,CAAC,EAAQ,EAAE,CAGJ,CAAc,YAAW"}
|
|
@@ -1,33 +1,44 @@
|
|
|
1
1
|
import { useTranslation as e } from "../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
2
2
|
import { I18nKey as t } from "../../i18n/declaration.js";
|
|
3
3
|
import { displayErrorToast as n } from "../../utils/custom-toast-handlers.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { getStoredConversationMetadata as r, setStoredConversationMetadata as i } from "../../api/conversation-metadata-store.js";
|
|
5
|
+
import { getLastRenderableEventId as a } from "../chat/model-command-event-anchor.js";
|
|
6
|
+
import { recordModelSwitchMessage as o } from "../chat/record-model-switch-message.js";
|
|
7
|
+
import { useSwitchLlmProfile as s } from "./use-switch-llm-profile.js";
|
|
8
|
+
import { useCallback as c } from "react";
|
|
8
9
|
//#region src/hooks/mutation/use-switch-llm-profile-and-log.ts
|
|
9
|
-
function
|
|
10
|
-
let { mutate:
|
|
10
|
+
function l() {
|
|
11
|
+
let { mutate: l, isPending: u } = s(), { t: d } = e();
|
|
11
12
|
return {
|
|
12
|
-
switchAndLog:
|
|
13
|
-
let
|
|
14
|
-
|
|
13
|
+
switchAndLog: c((e, s) => {
|
|
14
|
+
let c = a();
|
|
15
|
+
l({
|
|
15
16
|
conversationId: e,
|
|
16
|
-
profileName:
|
|
17
|
+
profileName: s
|
|
17
18
|
}, {
|
|
18
19
|
onSuccess: () => {
|
|
19
|
-
|
|
20
|
+
if (e) {
|
|
21
|
+
o(e, s, c);
|
|
22
|
+
let t = r(e);
|
|
23
|
+
i(e, {
|
|
24
|
+
selected_repository: t?.selected_repository ?? null,
|
|
25
|
+
selected_branch: t?.selected_branch ?? null,
|
|
26
|
+
git_provider: t?.git_provider ?? null,
|
|
27
|
+
selected_workspace: t?.selected_workspace ?? null,
|
|
28
|
+
active_profile: s
|
|
29
|
+
});
|
|
30
|
+
}
|
|
20
31
|
},
|
|
21
32
|
onError: (e) => {
|
|
22
|
-
let r =
|
|
33
|
+
let r = d(t.MODEL$SWITCH_FAILED, { name: s });
|
|
23
34
|
n(e instanceof Error && e.message ? e.message : r);
|
|
24
35
|
}
|
|
25
36
|
});
|
|
26
|
-
}, [
|
|
27
|
-
isPending:
|
|
37
|
+
}, [l, d]),
|
|
38
|
+
isPending: u
|
|
28
39
|
};
|
|
29
40
|
}
|
|
30
41
|
//#endregion
|
|
31
|
-
export {
|
|
42
|
+
export { l as useSwitchLlmProfileAndLog };
|
|
32
43
|
|
|
33
44
|
//# sourceMappingURL=use-switch-llm-profile-and-log.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-switch-llm-profile-and-log.js","names":[],"sources":["../../../src/hooks/mutation/use-switch-llm-profile-and-log.ts"],"sourcesContent":["import { useCallback } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { getLastRenderableEventId } from \"#/hooks/chat/model-command-event-anchor\";\nimport { recordModelSwitchMessage } from \"#/hooks/chat/record-model-switch-message\";\nimport { useSwitchLlmProfile } from \"#/hooks/mutation/use-switch-llm-profile\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\n/**\n * Switch the conversation's LLM profile and render the result inline (same\n * UX as `/model <name>`). On success the switch is recorded against the\n * last rendered event so the confirmation lines up with where the user\n * issued the command.\n */\nexport function useSwitchLlmProfileAndLog() {\n const { mutate, isPending } = useSwitchLlmProfile();\n const { t } = useTranslation();\n\n const switchAndLog = useCallback(\n (conversationId: string | null, profileName: string) => {\n const anchorEventId = getLastRenderableEventId();\n\n mutate(\n { conversationId, profileName },\n {\n onSuccess: () => {\n // The inline \"Switched to\" message is scoped to a conversation;\n // skip it when activating from the home page (no convo yet).\n if (conversationId) {\n recordModelSwitchMessage(\n conversationId,\n profileName,\n anchorEventId,\n );\n }\n },\n onError: (err: unknown) => {\n const fallback = t(I18nKey.MODEL$SWITCH_FAILED, {\n name: profileName,\n });\n const message =\n err instanceof Error && err.message ? err.message : fallback;\n displayErrorToast(message);\n },\n },\n );\n },\n [mutate, t],\n );\n\n return { switchAndLog, isPending };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-switch-llm-profile-and-log.js","names":[],"sources":["../../../src/hooks/mutation/use-switch-llm-profile-and-log.ts"],"sourcesContent":["import { useCallback } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { getLastRenderableEventId } from \"#/hooks/chat/model-command-event-anchor\";\nimport { recordModelSwitchMessage } from \"#/hooks/chat/record-model-switch-message\";\nimport { useSwitchLlmProfile } from \"#/hooks/mutation/use-switch-llm-profile\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n} from \"#/api/conversation-metadata-store\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\n/**\n * Switch the conversation's LLM profile and render the result inline (same\n * UX as `/model <name>`). On success the switch is recorded against the\n * last rendered event so the confirmation lines up with where the user\n * issued the command.\n */\nexport function useSwitchLlmProfileAndLog() {\n const { mutate, isPending } = useSwitchLlmProfile();\n const { t } = useTranslation();\n\n const switchAndLog = useCallback(\n (conversationId: string | null, profileName: string) => {\n const anchorEventId = getLastRenderableEventId();\n\n mutate(\n { conversationId, profileName },\n {\n onSuccess: () => {\n // The inline \"Switched to\" message is scoped to a conversation;\n // skip it when activating from the home page (no convo yet).\n if (conversationId) {\n recordModelSwitchMessage(\n conversationId,\n profileName,\n anchorEventId,\n );\n // Keep the per-conversation profile identity fresh so the\n // chat-header switcher shows the right name after a reload\n // (the agent-server only 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 });\n }\n },\n onError: (err: unknown) => {\n const fallback = t(I18nKey.MODEL$SWITCH_FAILED, {\n name: profileName,\n });\n const message =\n err instanceof Error && err.message ? err.message : fallback;\n displayErrorToast(message);\n },\n },\n );\n },\n [mutate, t],\n );\n\n return { switchAndLog, isPending };\n}\n"],"mappings":";;;;;;;;;AAkBA,SAAgB,IAA4B;CAC1C,IAAM,EAAE,WAAQ,iBAAc,GAAqB,EAC7C,EAAE,SAAM,GAAgB;AA6C9B,QAAO;EAAE,cA3CY,GAClB,GAA+B,MAAwB;GACtD,IAAM,IAAgB,GAA0B;AAEhD,KACE;IAAE;IAAgB;IAAa,EAC/B;IACE,iBAAiB;AAGf,SAAI,GAAgB;AAClB,QACE,GACA,GACA,EACD;MAID,IAAM,IAAO,EAA8B,EAAe;AAC1D,QAA8B,GAAgB;OAC5C,qBAAqB,GAAM,uBAAuB;OAClD,iBAAiB,GAAM,mBAAmB;OAC1C,cAAc,GAAM,gBAAgB;OACpC,oBAAoB,GAAM,sBAAsB;OAChD,gBAAgB;OACjB,CAAC;;;IAGN,UAAU,MAAiB;KACzB,IAAM,IAAW,EAAE,EAAQ,qBAAqB,EAC9C,MAAM,GACP,CAAC;AAGF,OADE,aAAe,SAAS,EAAI,UAAU,EAAI,UAAU,EAC5B;;IAE7B,CACF;KAEH,CAAC,GAAQ,EAAE,CAGJ;EAAc;EAAW"}
|