@openhands/agent-canvas 1.0.0-beta.6 → 1.0.0-beta.8
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 +24 -7
- package/README.windows.md +27 -0
- package/bin/agent-canvas.mjs +26 -3
- package/build/assets/{QueryClientProvider-CkGuhXg-.js → QueryClientProvider-Cnr-Yl3j.js} +1 -1
- package/build/assets/{Trans-Cvm_-SMi.js → Trans-4jmk54WC.js} +1 -1
- package/build/assets/acp-providers-BAX8OU5C.js +1 -0
- package/build/assets/{acp-route-guard-B2yoBZ_4.js → acp-route-guard-HPk6TV-L.js} +1 -1
- package/build/assets/active-backend-context-BSPE-W72.js +1 -0
- package/build/assets/add-backend-modal-mXKmfMI2.js +1 -0
- package/build/assets/agent-server-client-options-9agOSarV.js +1 -0
- package/build/assets/agent-server-compatibility-B7QStIcH.js +1 -0
- package/build/assets/agent-server-conversation-service.api-B9TUYJon.js +5 -0
- package/build/assets/{agent-settings-CnGSCmK8.js → agent-settings-g3F623RJ.js} +1 -1
- package/build/assets/{alert-banner-DtzAX654.js → alert-banner-DFnn_lC6.js} +1 -1
- package/build/assets/{analytics-consent-form-modal-CHZ3I37v.js → analytics-consent-form-modal-BQCNeNVt.js} +1 -1
- package/build/assets/api-key-entry-screen-myuWMqzW.js +1 -0
- package/build/assets/{app-settings-Db9ITeJH.js → app-settings-CCcX8ZEH.js} +1 -1
- package/build/assets/automation-detail-BDHLHSJd.js +1 -0
- package/build/assets/automations-list-CiNtQhq_.js +1 -0
- package/build/assets/back-nav-button-7dQJ2k3O.js +1 -0
- package/build/assets/backend-form-modal-D3bDMO3C.js +1 -0
- package/build/assets/{backend-synced-settings-badge-Dc6c7GT4.js → backend-synced-settings-badge-BkW5evM0.js} +1 -1
- package/build/assets/base-modal-C2oy2EBG.js +1 -0
- package/build/assets/brand-button-DJ_S16rO.js +1 -0
- package/build/assets/{browser-D810xUYt.js → browser-CGM-k-sH.js} +2 -2
- package/build/assets/browser-store-DAsixKdU.js +1 -0
- package/build/assets/{browser-tab-B-aIqXRl.js → browser-tab-dvSPdvkm.js} +1 -1
- package/build/assets/{checkmark-DL7acQA7.js → checkmark-Dus0b6jt.js} +1 -1
- package/build/assets/{chevron-left-small-CVWf8TI6.js → chevron-left-small-_uvG7RVM.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-P7ZZToV4.js → circle-plus-check-toggle-DKS8MAVV.js} +1 -1
- package/build/assets/{close-B5LROHR3.js → close-BU5iTc66.js} +1 -1
- package/build/assets/code-tag-BzyqOtPD.js +1 -0
- package/build/assets/combobox-caret-BJC7XJsz.js +1 -0
- package/build/assets/{command-store-DFN_17p1.js → command-store-CE1weJy8.js} +1 -1
- package/build/assets/{condenser-settings-wnEKhBof.js → condenser-settings-DCTulgLO.js} +1 -1
- package/build/assets/{confirmation-modal-Dau3w_sa.js → confirmation-modal-B5Ca6qFE.js} +1 -1
- package/build/assets/context-menu-list-item-7tAcm2c3.js +1 -0
- package/build/assets/conversation-BKhikfYl.js +1 -0
- package/build/assets/conversation-DTn8jN8L.js +19 -0
- package/build/assets/conversation-panel-DfHR42mG.js +1 -0
- package/build/assets/conversation-service.api-B6CkzaKD.js +1 -0
- package/build/assets/conversation-state-store-D-w0uurj.js +1 -0
- package/build/assets/conversation-store-CC-isCnP.js +1 -0
- package/build/assets/{conversation-tab-empty-state-DyssnnWa.js → conversation-tab-empty-state-CStQLPVW.js} +1 -1
- package/build/assets/conversation-websocket-context-DShEuLjh.js +3 -0
- package/build/assets/{copy-DYgmUdIw.js → copy-Chg-sFu3.js} +1 -1
- package/build/assets/{custom-toast-handlers-C-SZFmto.js → custom-toast-handlers-ufGJ6_Rc.js} +1 -1
- package/build/assets/declaration-CR6HMp29.js +1 -0
- package/build/assets/{device-verify-DqDlphsG.js → device-verify-C6mj28zv.js} +1 -1
- package/build/assets/dist-DNeWJ2bh.js +1 -0
- package/build/assets/dropdown-classes-BsVmxlNG.js +1 -0
- package/build/assets/edit-automation-modal-DamwL0s0.js +1 -0
- package/build/assets/ellipsis-button-Vh5MvRZa.js +1 -0
- package/build/assets/entry.client-Cn71WM8q.js +2 -0
- package/build/assets/enum-filter-dropdown-5JeF2RLb.js +1 -0
- package/build/assets/{environment-switch-overlay-XL8yCGP6.js → environment-switch-overlay-Tf_BIfeR.js} +1 -1
- package/build/assets/extensions-hub-CUEmfvGy.js +1 -0
- package/build/assets/{extensions-navigation-BYR8Giqq.js → extensions-navigation-VQ-3umJ7.js} +1 -1
- package/build/assets/file-BTY6Gyy9.js +1 -0
- package/build/assets/files-tab-C47fQEeL.js +1 -0
- package/build/assets/files-tab-store-m0ARqX_E.js +1 -0
- package/build/assets/{folder-ZZJVGgd7.js → folder-D1T2W1cj.js} +1 -1
- package/build/assets/git-control-bar-branch-button-BT0aWH-o.js +27 -0
- package/build/assets/git-provider-icon-Pi-Cxpgv.js +1 -0
- package/build/assets/globe-Bzj_0oXT.js +1 -0
- package/build/assets/home-C3k6sFvB.js +1 -0
- package/build/assets/{i18n-CTohRuoO.js → i18n-DET2iOyh.js} +1 -1
- package/build/assets/install-server-modal-6fuq-TU6.js +1 -0
- package/build/assets/launch-DGghLfGx.js +1 -0
- package/build/assets/{lesson-plan-dH5Bj0pN.js → lesson-plan-duSsqWVs.js} +1 -1
- package/build/assets/link-external-DGxVm4Ps.js +1 -0
- package/build/assets/{llm-client-DaH1TuyR.js → llm-client-BqyLKgUN.js} +1 -1
- package/build/assets/llm-settings-BKraGtOu.js +1 -0
- package/build/assets/llm-settings-DRQTgOF1.js +1 -0
- package/build/assets/{loading-spinner-BPtYORNK.js → loading-spinner-5GT9q1xy.js} +1 -1
- package/build/assets/manage-backends-modal-CRMwyU0t.js +1 -0
- package/build/assets/manage-workspaces-modal-BYmGD1W7.js +1 -0
- package/build/assets/manifest-99b06a11.js +1 -0
- package/build/assets/{markdown-renderer-DMzf2i4x.js → markdown-renderer-B3IAVfv4.js} +1 -1
- package/build/assets/mcp-CfDRAmPn.js +9 -0
- package/build/assets/messages-Ba1vaw6t.js +36 -0
- package/build/assets/{modal-backdrop-BAbgYsqB.js → modal-backdrop-RfNCrSpK.js} +1 -1
- package/build/assets/{modal-body-BI6Ru2Qr.js → modal-body-aoa2fx5W.js} +1 -1
- package/build/assets/modal-classes-6YqcqA6y.js +1 -0
- package/build/assets/{modal-close-button-t1Gh3qmL.js → modal-close-button-CtWOUMmw.js} +1 -1
- package/build/assets/{model-selector-SM9IUz-q.js → model-selector-DcztJSxT.js} +1 -1
- package/build/assets/{navigation-context-D0YWpT8d.js → navigation-context-BdKYH32C.js} +1 -1
- package/build/assets/{navigation-link-Cn7KP3c5.js → navigation-link-U4vY9i_C.js} +1 -1
- package/build/assets/{openhands-logo-CnrF6LKb.js → openhands-logo-CCo0wJZX.js} +1 -1
- package/build/assets/{option-service.api-KvY_mZMY.js → option-service.api-CGNANEcT.js} +1 -1
- package/build/assets/{organization-service.api-DzYTHTYC.js → organization-service.api-BeuMC9QL.js} +1 -1
- package/build/assets/{path-utils-C3bQf6lJ.js → path-utils-z12iCrQO.js} +1 -1
- package/build/assets/{plan-components-atxXCF0R.js → plan-components-CRDMQzsS.js} +1 -1
- package/build/assets/{planner-tab-BlrCpv-7.js → planner-tab-Dte6Vzza.js} +1 -1
- package/build/assets/{profiles-client-D6IkTJof.js → profiles-client-BrqNmaDV.js} +1 -1
- package/build/assets/{providers-Bx6EfrzZ.js → providers-eUyo6pgr.js} +1 -1
- package/build/assets/proxy-BqDMnUY-.js +1 -0
- package/build/assets/{query-client-config-B7u9asM0.js → query-client-config-CRnGSujB.js} +1 -1
- package/build/assets/{recommended-automations-launcher-CgV8FyPK.js → recommended-automations-launcher-D5ADbXao.js} +3 -3
- package/build/assets/{root-dNntxffj.js → root-BmhaEJJ8.js} +2 -2
- package/build/assets/root-Z2VHU4R3.css +1 -0
- package/build/assets/root-layout-CNggm0d8.js +2 -0
- package/build/assets/{sdk-section-page-DOIKvwSL.js → sdk-section-page-CRCRY3PG.js} +1 -1
- package/build/assets/{sdk-settings-schema-DsUf9wu1.js → sdk-settings-schema-CLmJ9sho.js} +1 -1
- package/build/assets/{search-27Owlc3A.js → search-SuJctqNJ.js} +1 -1
- package/build/assets/secrets-service-B9AFn9OE.js +1 -0
- package/build/assets/secrets-settings-0UrKMS60.js +1 -0
- package/build/assets/{server-client-DyAQ3NZ_.js → server-client-DYv_GHPl.js} +1 -1
- package/build/assets/{settings-BYkVX7vW.js → settings-6t6LGW04.js} +1 -1
- package/build/assets/{settings-dropdown-input-BJYvGdg-.js → settings-dropdown-input-BtoovFre.js} +1 -1
- package/build/assets/{settings-gear-C77PgE_O.js → settings-gear-Dd8K2_8B.js} +1 -1
- package/build/assets/settings-index-CR6Ou73o.js +1 -0
- package/build/assets/{settings-input-Bn7F5C75.js → settings-input-CehsXnb3.js} +1 -1
- package/build/assets/settings-list-classes-E3v_f6QG.js +1 -0
- package/build/assets/settings-modal-T_Yk1Zfo.js +1 -0
- package/build/assets/{settings-section-header-context-BgZe5YkE.js → settings-section-header-context-DewwJ0-F.js} +1 -1
- package/build/assets/settings-service.api-DwtyDeGh.js +1 -0
- package/build/assets/{settings-switch-BeIKrWms.js → settings-switch-BiBuS3xa.js} +1 -1
- package/build/assets/{settings-utils-B6Nl07io.js → settings-utils-DY04tWG1.js} +1 -1
- package/build/assets/{shared-conversation-AMyqXvpk.js → shared-conversation-BzccsVej.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-DGlRg6jG.js +1 -0
- package/build/assets/{sidebar-nav-link-BGjiJq-4.js → sidebar-nav-link-dgVb8Fpy.js} +1 -1
- package/build/assets/{sidebar-store-Uy3v0AOV.js → sidebar-store-DnQAJAE5.js} +1 -1
- package/build/assets/{skill-card-pill-row-DF1axQCG.js → skill-card-pill-row-BW9qvhoK.js} +1 -1
- package/build/assets/{skills-ChIKZPK4.js → skills-0GRKX5Xj.js} +1 -1
- package/build/assets/{skills-plugins-CcI_19lM.js → skills-plugins-DctDrZ8Y.js} +1 -1
- package/build/assets/skills-settings-rvxImDj_.js +2 -0
- package/build/assets/{styled-tooltip-CBzrri6o.js → styled-tooltip-hdfMXPQC.js} +1 -1
- package/build/assets/{switch-skeleton-DnC9wLp7.js → switch-skeleton-DSKqSx2A.js} +1 -1
- package/build/assets/{task-list-tab-DUJn1sgz.js → task-list-tab-DT6_zfUs.js} +1 -1
- package/build/assets/{terminal-RmuaSdhJ.js → terminal-CPYWdo4j.js} +1 -1
- package/build/assets/{terminal-DgQk1Ay6.js → terminal-KldRPIRT.js} +2 -2
- package/build/assets/{toggle-switch-Pvyp2RAN.js → toggle-switch-T2v6sJ6l.js} +1 -1
- package/build/assets/{typography-gpuWmrQO.js → typography-BDgnT7Yp.js} +1 -1
- package/build/assets/{u-check-circle-IUIfACQQ.js → u-check-circle-DOauqQKb.js} +1 -1
- package/build/assets/{u-check-circle-half-C1YxB6py.js → u-check-circle-half-steSK_JB.js} +1 -1
- package/build/assets/{u-circuit-BmVikJHu.js → u-circuit-x3ExjBbU.js} +1 -1
- package/build/assets/{u-edit-CFvXHqZk.js → u-edit-BbrptMCa.js} +1 -1
- package/build/assets/{use-active-conversation-BEFNwnFk.js → use-active-conversation-sPgfSkql.js} +1 -1
- package/build/assets/use-agent-settings-schema-B66kGIi_.js +1 -0
- package/build/assets/{use-agent-state-Bkrd1FZq.js → use-agent-state-Dp3pD1h3.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-CvkXFnTT.js → use-cloud-current-user-id-ClKFPjFz.js} +1 -1
- package/build/assets/{use-config-Co1O8-Ey.js → use-config-C9pvb0Sm.js} +1 -1
- package/build/assets/{use-create-conversation-CEgXpkfH.js → use-create-conversation-B-lwTnfE.js} +1 -1
- package/build/assets/{use-event-store-BT_gV3ut.js → use-event-store-BomO7ywK.js} +1 -1
- package/build/assets/{use-get-secrets-DuhdIA59.js → use-get-secrets-oyC7PFRz.js} +1 -1
- package/build/assets/{use-handle-plan-click-Ckkm5eIY.js → use-handle-plan-click-DP6Rs-YP.js} +1 -1
- package/build/assets/use-is-authed-dw2026rR.js +1 -0
- package/build/assets/{use-is-creating-conversation-BZ5hB_Bg.js → use-is-creating-conversation-DX2qSlfL.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-fNN_xGZG.js → use-launch-skill-in-chat-sQNEOLGD.js} +1 -1
- package/build/assets/use-llm-profiles-Bh5JqZUZ.js +1 -0
- package/build/assets/use-runtime-is-ready-BakOUVU-.js +1 -0
- package/build/assets/{use-save-settings-VUrj_QNG.js → use-save-settings-uXXkqvD7.js} +1 -1
- package/build/assets/use-settings-DeO7nvpM.js +1 -0
- package/build/assets/{use-settings-nav-items-1ZvovKSr.js → use-settings-nav-items-BGMFn25b.js} +1 -1
- package/build/assets/{use-skills-DAMLFjKU.js → use-skills-DWIK3l3a.js} +1 -1
- package/build/assets/{use-task-list-CLJbuJgM.js → use-task-list-CsT10CBb.js} +1 -1
- package/build/assets/{use-unified-vscode-url-DdSRw-6P.js → use-unified-vscode-url-DXPtB317.js} +1 -1
- package/build/assets/use-user-conversation-DJen4YIP.js +1 -0
- package/build/assets/{useMutation-DqrumCWD.js → useMutation-GSSKKebK.js} +1 -1
- package/build/assets/{useTranslation-DCOdSSMl.js → useTranslation-B6voJV4y.js} +1 -1
- package/build/assets/utils-DCVfKFRt.js +1 -0
- package/build/assets/{vendor~browser-BNjNhjFU.js → vendor~browser-BrOJLj3y.js} +1 -1
- package/build/assets/vendor~conversation-panel~conversation-C9o-K1hW.js +1 -0
- package/build/assets/vendor~conversation-panel~conversation~index-RXYdJYxU.js +1 -0
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-DJS-rJdI.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DpAdkv8m.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-6ByzelMS.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B92czPCF.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BED5W_c4.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-By5W2oHN.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CCbqAFiI.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BbFOrAjI.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CG96FCly.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-smY2r837.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-E4d6IEfI.js} +1 -1
- package/build/assets/{vendor~home~mcp~automations-list-Cs-TO3fK.js → vendor~home~mcp~automations-list-CZSK-lT2.js} +1 -1
- package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-Z3nsiNNq.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-CjJdFLoM.js} +1 -1
- package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-DbfELDJu.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-m8dOii0J.js} +2 -2
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-DjAjXS5J.js → vendor~root-layout~home~conversation-panel~conversation-B5WNMnt4.js} +1 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-CbAhtEMv.js +1 -0
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-6Rm8U_Sr.js +9 -0
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-BkQGKpye.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-tTR8C6m0.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-Bbs7UJ5U.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-BJbu9kpL.js} +2 -2
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-DTwbEEcX.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-D8soyAAx.js} +1 -1
- package/build/assets/{vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-CDXvdvb2.js → vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js} +1 -1
- package/build/assets/{verification-settings-CsbvQcYS.js → verification-settings-C_zHuDx9.js} +1 -1
- package/build/assets/{vscode-tab-DjNArCgY.js → vscode-tab-DH9x7xXS.js} +1 -1
- package/build/assets/{waiting-for-runtime-message-CntjExbU.js → waiting-for-runtime-message-CdK3btDZ.js} +1 -1
- package/build/assets/{x-mark-CrpjscNc.js → x-mark-BrkSPIiT.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +20 -2
- package/build/locales/ca/openhands.json +20 -2
- package/build/locales/de/openhands.json +20 -2
- package/build/locales/en/openhands.json +20 -2
- package/build/locales/es/openhands.json +20 -2
- package/build/locales/fr/openhands.json +20 -2
- package/build/locales/it/openhands.json +20 -2
- package/build/locales/ja/openhands.json +20 -2
- package/build/locales/ko-KR/openhands.json +20 -2
- package/build/locales/no/openhands.json +20 -2
- package/build/locales/pt/openhands.json +20 -2
- package/build/locales/tr/openhands.json +20 -2
- package/build/locales/uk/openhands.json +20 -2
- package/build/locales/zh-CN/openhands.json +20 -2
- package/build/locales/zh-TW/openhands.json +20 -2
- package/dist/api/acp-service/acp-service.api.d.ts +18 -0
- 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 +54 -55
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/agent-server-client-options.cjs +1 -1
- package/dist/api/agent-server-client-options.cjs.map +1 -1
- package/dist/api/agent-server-client-options.d.ts +4 -0
- package/dist/api/agent-server-client-options.js +18 -12
- package/dist/api/agent-server-client-options.js.map +1 -1
- package/dist/api/agent-server-compatibility.cjs +1 -1
- package/dist/api/agent-server-compatibility.cjs.map +1 -1
- package/dist/api/agent-server-compatibility.d.ts +1 -1
- package/dist/api/agent-server-compatibility.js +30 -25
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/agent-server-config.cjs +1 -1
- package/dist/api/agent-server-config.cjs.map +1 -1
- package/dist/api/agent-server-config.d.ts +15 -48
- package/dist/api/agent-server-config.js +25 -69
- package/dist/api/agent-server-config.js.map +1 -1
- package/dist/api/backend-registry/active-store.cjs +1 -1
- package/dist/api/backend-registry/active-store.cjs.map +1 -1
- package/dist/api/backend-registry/active-store.d.ts +11 -5
- package/dist/api/backend-registry/active-store.js +36 -27
- package/dist/api/backend-registry/active-store.js.map +1 -1
- package/dist/api/backend-registry/auth.cjs +1 -1
- package/dist/api/backend-registry/auth.cjs.map +1 -1
- package/dist/api/backend-registry/auth.js +3 -9
- package/dist/api/backend-registry/auth.js.map +1 -1
- package/dist/api/backend-registry/default-backend.cjs +1 -1
- package/dist/api/backend-registry/default-backend.cjs.map +1 -1
- package/dist/api/backend-registry/default-backend.d.ts +9 -16
- package/dist/api/backend-registry/default-backend.js +5 -4
- package/dist/api/backend-registry/default-backend.js.map +1 -1
- package/dist/api/backend-registry/storage.cjs +1 -1
- package/dist/api/backend-registry/storage.cjs.map +1 -1
- package/dist/api/backend-registry/storage.js +67 -34
- package/dist/api/backend-registry/storage.js.map +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.d.ts +8 -13
- package/dist/api/cloud/conversation-service.api.js.map +1 -1
- package/dist/api/cloud/organization-service.api.cjs.map +1 -1
- package/dist/api/cloud/organization-service.api.d.ts +1 -2
- package/dist/api/cloud/organization-service.api.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 +6 -6
- package/dist/api/cloud/proxy.js +33 -24
- package/dist/api/cloud/proxy.js.map +1 -1
- package/dist/api/cloud/sandbox-service.api.cjs.map +1 -1
- package/dist/api/cloud/sandbox-service.api.d.ts +3 -3
- package/dist/api/cloud/sandbox-service.api.js.map +1 -1
- package/dist/api/cloud/secrets-service.api.cjs.map +1 -1
- package/dist/api/cloud/secrets-service.api.d.ts +3 -4
- package/dist/api/cloud/secrets-service.api.js.map +1 -1
- package/dist/api/cloud/settings-service.api.cjs +1 -1
- package/dist/api/cloud/settings-service.api.cjs.map +1 -1
- package/dist/api/cloud/settings-service.api.js +5 -1
- package/dist/api/cloud/settings-service.api.js.map +1 -1
- package/dist/api/cloud/skills-service.api.cjs.map +1 -1
- package/dist/api/cloud/skills-service.api.d.ts +5 -5
- package/dist/api/cloud/skills-service.api.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +115 -108
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/device-flow-client.cjs +1 -1
- package/dist/api/device-flow-client.cjs.map +1 -1
- package/dist/api/device-flow-client.d.ts +3 -5
- package/dist/api/device-flow-client.js +55 -66
- package/dist/api/device-flow-client.js.map +1 -1
- package/dist/api/event-service/event-service.api.cjs +1 -1
- package/dist/api/event-service/event-service.api.cjs.map +1 -1
- package/dist/api/event-service/event-service.api.d.ts +3 -3
- package/dist/api/event-service/event-service.api.js +17 -17
- package/dist/api/event-service/event-service.api.js.map +1 -1
- package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
- package/dist/api/git-service/agent-server-git-service.api.js +11 -11
- package/dist/api/runtime-service/agent-server-runtime-service.cjs +1 -1
- package/dist/api/runtime-service/agent-server-runtime-service.js +6 -6
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-content.cjs +2 -2
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-content.js +10 -10
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-result.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-result.d.ts +5 -5
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-result.js.map +1 -1
- 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 +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js.map +1 -1
- package/dist/components/features/automations/automation-action-button-classes.d.ts +2 -2
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +1 -0
- package/dist/components/features/backends/backend-form-modal.js +203 -140
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +117 -105
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/backends/backend-status-dot.cjs +1 -1
- package/dist/components/features/backends/backend-status-dot.cjs.map +1 -1
- package/dist/components/features/backends/backend-status-dot.d.ts +1 -1
- package/dist/components/features/backends/backend-status-dot.js +1 -1
- package/dist/components/features/backends/backend-status-dot.js.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.js +81 -70
- package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
- package/dist/components/features/chat/change-agent-button.cjs +1 -1
- package/dist/components/features/chat/change-agent-button.cjs.map +1 -1
- package/dist/components/features/chat/change-agent-button.js +59 -57
- package/dist/components/features/chat/change-agent-button.js.map +1 -1
- package/dist/components/features/chat/change-agent-context-menu.cjs +1 -1
- package/dist/components/features/chat/change-agent-context-menu.cjs.map +1 -1
- package/dist/components/features/chat/change-agent-context-menu.d.ts +3 -1
- package/dist/components/features/chat/change-agent-context-menu.js +30 -25
- package/dist/components/features/chat/change-agent-context-menu.js.map +1 -1
- package/dist/components/features/chat/chat-add-file-button.cjs +1 -1
- package/dist/components/features/chat/chat-add-file-button.cjs.map +1 -1
- package/dist/components/features/chat/chat-add-file-button.js +39 -38
- package/dist/components/features/chat/chat-add-file-button.js.map +1 -1
- package/dist/components/features/chat/chat-message.cjs +1 -1
- package/dist/components/features/chat/chat-message.cjs.map +1 -1
- package/dist/components/features/chat/chat-message.d.ts +2 -1
- package/dist/components/features/chat/chat-message.js +185 -57
- package/dist/components/features/chat/chat-message.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.js +113 -113
- package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-model.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-model.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-model.js +52 -51
- package/dist/components/features/chat/components/chat-input-model.js.map +1 -1
- package/dist/components/features/chat/components/slash-command-menu.cjs +2 -2
- package/dist/components/features/chat/components/slash-command-menu.cjs.map +1 -1
- package/dist/components/features/chat/components/slash-command-menu.js +38 -34
- package/dist/components/features/chat/components/slash-command-menu.js.map +1 -1
- package/dist/components/features/chat/git-control-bar-pr-button.cjs +1 -1
- package/dist/components/features/chat/git-control-bar-pr-button.cjs.map +1 -1
- package/dist/components/features/chat/git-control-bar-pr-button.js +16 -15
- package/dist/components/features/chat/git-control-bar-pr-button.js.map +1 -1
- package/dist/components/features/chat/git-control-bar-pull-button.cjs +1 -1
- package/dist/components/features/chat/git-control-bar-pull-button.cjs.map +1 -1
- package/dist/components/features/chat/git-control-bar-pull-button.js +16 -15
- package/dist/components/features/chat/git-control-bar-pull-button.js.map +1 -1
- package/dist/components/features/chat/git-control-bar-push-button.cjs +1 -1
- package/dist/components/features/chat/git-control-bar-push-button.cjs.map +1 -1
- package/dist/components/features/chat/git-control-bar-push-button.js +16 -15
- package/dist/components/features/chat/git-control-bar-push-button.js.map +1 -1
- package/dist/components/features/chat/git-control-bar.cjs +1 -1
- package/dist/components/features/chat/git-control-bar.cjs.map +1 -1
- package/dist/components/features/chat/git-control-bar.js +63 -62
- package/dist/components/features/chat/git-control-bar.js.map +1 -1
- package/dist/components/features/chat/pending-user-messages.cjs +1 -1
- package/dist/components/features/chat/pending-user-messages.cjs.map +1 -1
- package/dist/components/features/chat/pending-user-messages.js +27 -23
- package/dist/components/features/chat/pending-user-messages.js.map +1 -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 +26 -25
- package/dist/components/features/chat/switch-profile-button.js.map +1 -1
- package/dist/components/features/chat/switch-profile-context-menu.cjs +1 -1
- package/dist/components/features/chat/switch-profile-context-menu.cjs.map +1 -1
- package/dist/components/features/chat/switch-profile-context-menu.js +77 -67
- package/dist/components/features/chat/switch-profile-context-menu.js.map +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.cjs +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.cjs.map +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.d.ts +2 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.js +3 -2
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.js.map +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text.cjs +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text.cjs.map +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text.d.ts +2 -1
- package/dist/components/features/context-menu/context-menu-icon-text.js +20 -10
- package/dist/components/features/context-menu/context-menu-icon-text.js.map +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs.map +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.js +10 -9
- package/dist/components/features/context-menu/context-menu-list-item.js.map +1 -1
- package/dist/components/features/controls/agent-status.cjs +1 -1
- package/dist/components/features/controls/agent-status.js +12 -12
- package/dist/components/features/controls/git-tools-submenu.cjs +1 -1
- package/dist/components/features/controls/git-tools-submenu.cjs.map +1 -1
- package/dist/components/features/controls/git-tools-submenu.js +1 -1
- package/dist/components/features/controls/git-tools-submenu.js.map +1 -1
- package/dist/components/features/controls/macros-submenu.cjs +1 -1
- package/dist/components/features/controls/macros-submenu.cjs.map +1 -1
- package/dist/components/features/controls/macros-submenu.js +1 -1
- package/dist/components/features/controls/macros-submenu.js.map +1 -1
- package/dist/components/features/controls/server-status-context-menu-icon-text.cjs +1 -1
- package/dist/components/features/controls/server-status-context-menu-icon-text.cjs.map +1 -1
- package/dist/components/features/controls/server-status-context-menu-icon-text.js +14 -15
- package/dist/components/features/controls/server-status-context-menu-icon-text.js.map +1 -1
- package/dist/components/features/controls/server-status-context-menu.cjs +1 -1
- package/dist/components/features/controls/server-status-context-menu.js +4 -4
- package/dist/components/features/controls/server-status.cjs +1 -1
- package/dist/components/features/controls/server-status.js +7 -7
- package/dist/components/features/controls/tools-context-menu-icon-text.cjs +1 -1
- package/dist/components/features/controls/tools-context-menu-icon-text.cjs.map +1 -1
- package/dist/components/features/controls/tools-context-menu-icon-text.js +16 -16
- package/dist/components/features/controls/tools-context-menu-icon-text.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.js +11 -11
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.js +11 -11
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +60 -47
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.js +86 -82
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +4 -4
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +9 -9
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +93 -93
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +177 -177
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/ellipsis-button.cjs +1 -1
- package/dist/components/features/conversation-panel/ellipsis-button.cjs.map +1 -1
- package/dist/components/features/conversation-panel/ellipsis-button.js +13 -13
- package/dist/components/features/conversation-panel/ellipsis-button.js.map +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.js +57 -53
- package/dist/components/features/conversation-panel/local-new-conversation-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/new-conversation-dropdown-styles.cjs +1 -1
- package/dist/components/features/conversation-panel/new-conversation-dropdown-styles.cjs.map +1 -1
- package/dist/components/features/conversation-panel/new-conversation-dropdown-styles.js +3 -2
- package/dist/components/features/conversation-panel/new-conversation-dropdown-styles.js.map +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.cjs +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.cjs.map +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.js +11 -8
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.js.map +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-content.cjs.map +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-content.d.ts +2 -5
- package/dist/components/features/conversation-panel/system-message-modal/tab-content.js.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.js +45 -42
- package/dist/components/features/files-tab/file-content-viewer.js.map +1 -1
- package/dist/components/features/home/llm-not-configured-banner.d.ts +11 -0
- package/dist/components/features/home/shared/dropdown-item.cjs +1 -1
- package/dist/components/features/home/shared/dropdown-item.cjs.map +1 -1
- package/dist/components/features/home/shared/dropdown-item.js +20 -16
- package/dist/components/features/home/shared/dropdown-item.js.map +1 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.cjs +1 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.cjs.map +1 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.js +23 -22
- package/dist/components/features/home/shared/generic-dropdown-menu.js.map +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.cjs +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.cjs.map +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.js +103 -102
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.js.map +1 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.cjs +1 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.cjs.map +1 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.js +68 -67
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.js.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +62 -60
- package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
- package/dist/components/features/mcp-page/index.cjs +1 -1
- package/dist/components/features/mcp-page/index.d.ts +1 -0
- package/dist/components/features/mcp-page/index.js +1 -0
- package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.js +141 -121
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/save-as-secret-toggle.cjs +2 -0
- package/dist/components/features/mcp-page/save-as-secret-toggle.cjs.map +1 -0
- package/dist/components/features/mcp-page/save-as-secret-toggle.d.ts +7 -0
- package/dist/components/features/mcp-page/save-as-secret-toggle.js +50 -0
- package/dist/components/features/mcp-page/save-as-secret-toggle.js.map +1 -0
- package/dist/components/features/onboarding/onboarding-modal.d.ts +2 -2
- package/dist/components/features/onboarding/steps/check-backend-step.d.ts +1 -1
- package/dist/components/features/onboarding/steps/choose-agent-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-acp-secrets-step.d.ts +19 -10
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.d.ts +5 -0
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +2 -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/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.js +1 -1
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/components/shared/buttons/back-nav-button.cjs +2 -0
- package/dist/components/shared/buttons/back-nav-button.cjs.map +1 -0
- package/dist/components/shared/buttons/back-nav-button.d.ts +17 -0
- package/dist/components/shared/buttons/back-nav-button.js +33 -0
- package/dist/components/shared/buttons/back-nav-button.js.map +1 -0
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js +5 -5
- package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.js +32 -31
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.js +14 -13
- package/dist/components/shared/modals/confirmation-modals/base-modal.js.map +1 -1
- package/dist/components/shared/modals/settings/settings-modal.cjs +1 -1
- package/dist/components/shared/modals/settings/settings-modal.cjs.map +1 -1
- package/dist/components/shared/modals/settings/settings-modal.js +17 -16
- package/dist/components/shared/modals/settings/settings-modal.js.map +1 -1
- package/dist/components/shared/text-shimmer.cjs +2 -0
- package/dist/components/shared/text-shimmer.cjs.map +1 -0
- package/dist/components/shared/text-shimmer.d.ts +11 -0
- package/dist/components/shared/text-shimmer.js +43 -0
- package/dist/components/shared/text-shimmer.js.map +1 -0
- package/dist/constants/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +16 -3
- package/dist/constants/acp-providers.js +0 -1
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/contexts/active-backend-context.cjs +1 -1
- package/dist/contexts/active-backend-context.cjs.map +1 -1
- package/dist/contexts/active-backend-context.js +32 -32
- package/dist/contexts/active-backend-context.js.map +1 -1
- package/dist/hooks/chat/use-chat-input-logic.cjs +1 -1
- package/dist/hooks/chat/use-chat-input-logic.cjs.map +1 -1
- package/dist/hooks/chat/use-chat-input-logic.js +13 -6
- package/dist/hooks/chat/use-chat-input-logic.js.map +1 -1
- package/dist/hooks/mutation/use-save-fields-as-secrets.cjs +2 -0
- package/dist/hooks/mutation/use-save-fields-as-secrets.cjs.map +1 -0
- package/dist/hooks/mutation/use-save-fields-as-secrets.d.ts +9 -0
- package/dist/hooks/mutation/use-save-fields-as-secrets.js +24 -0
- package/dist/hooks/mutation/use-save-fields-as-secrets.js.map +1 -0
- package/dist/hooks/mutation/use-unified-start-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-unified-start-conversation.js +8 -8
- package/dist/hooks/mutation/use-unified-stop-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-unified-stop-conversation.js +15 -15
- package/dist/hooks/query/use-acp-auth-status.d.ts +36 -0
- package/dist/hooks/query/use-agent-settings-schema.cjs +1 -1
- package/dist/hooks/query/use-agent-settings-schema.cjs.map +1 -1
- package/dist/hooks/query/use-agent-settings-schema.js +26 -16
- package/dist/hooks/query/use-agent-settings-schema.js.map +1 -1
- package/dist/hooks/query/use-backends-health.cjs +1 -1
- package/dist/hooks/query/use-backends-health.cjs.map +1 -1
- package/dist/hooks/query/use-backends-health.d.ts +2 -0
- package/dist/hooks/query/use-backends-health.js +31 -21
- package/dist/hooks/query/use-backends-health.js.map +1 -1
- package/dist/hooks/query/use-paginated-conversations.cjs +1 -1
- package/dist/hooks/query/use-paginated-conversations.cjs.map +1 -1
- package/dist/hooks/query/use-paginated-conversations.js +15 -14
- package/dist/hooks/query/use-paginated-conversations.js.map +1 -1
- package/dist/hooks/query/use-settings.cjs +1 -1
- package/dist/hooks/query/use-settings.cjs.map +1 -1
- package/dist/hooks/query/use-settings.js +65 -52
- package/dist/hooks/query/use-settings.js.map +1 -1
- package/dist/hooks/query/use-user-conversation.cjs +1 -1
- package/dist/hooks/query/use-user-conversation.cjs.map +1 -1
- package/dist/hooks/query/use-user-conversation.js +20 -11
- package/dist/hooks/query/use-user-conversation.js.map +1 -1
- package/dist/hooks/use-agent-state.cjs +1 -1
- package/dist/hooks/use-agent-state.js +13 -13
- package/dist/hooks/use-conversation-name-context-menu.cjs +1 -1
- package/dist/hooks/use-conversation-name-context-menu.js +10 -10
- package/dist/hooks/use-conversation-name-context-menu.js.map +1 -1
- package/dist/hooks/use-llm-configured.d.ts +25 -0
- package/dist/hooks/use-runtime-is-ready.cjs +1 -1
- package/dist/hooks/use-runtime-is-ready.js +5 -5
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +19 -1
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +3 -3
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +321 -15
- package/dist/i18n/translation.js.map +1 -1
- package/dist/icons/stop-circle.cjs +1 -1
- package/dist/icons/stop-circle.cjs.map +1 -1
- package/dist/icons/stop-circle.js +7 -10
- package/dist/icons/stop-circle.js.map +1 -1
- package/dist/locales/ar/openhands.json +20 -2
- package/dist/locales/ca/openhands.json +20 -2
- package/dist/locales/de/openhands.json +20 -2
- package/dist/locales/en/openhands.json +20 -2
- package/dist/locales/es/openhands.json +20 -2
- package/dist/locales/fr/openhands.json +20 -2
- package/dist/locales/it/openhands.json +20 -2
- package/dist/locales/ja/openhands.json +20 -2
- package/dist/locales/ko-KR/openhands.json +20 -2
- package/dist/locales/no/openhands.json +20 -2
- package/dist/locales/pt/openhands.json +20 -2
- package/dist/locales/tr/openhands.json +20 -2
- package/dist/locales/uk/openhands.json +20 -2
- package/dist/locales/zh-CN/openhands.json +20 -2
- package/dist/locales/zh-TW/openhands.json +20 -2
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.cjs +2 -0
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.cjs.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +15 -0
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/dist/routes/conversation.cjs +1 -1
- package/dist/routes/conversation.cjs.map +1 -1
- package/dist/routes/conversation.js +1 -1
- package/dist/routes/conversation.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 +55 -54
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/routes/secrets-settings.cjs +1 -1
- package/dist/routes/secrets-settings.cjs.map +1 -1
- package/dist/routes/secrets-settings.js +19 -27
- package/dist/routes/secrets-settings.js.map +1 -1
- package/dist/stores/conversation-store.cjs +1 -1
- package/dist/stores/conversation-store.cjs.map +1 -1
- package/dist/stores/conversation-store.d.ts +4 -0
- package/dist/stores/conversation-store.js +6 -0
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/types/agent-server/core/events/acp-tool-call-event.d.ts +6 -4
- package/dist/types/agent-server/core/events/system-event.d.ts +5 -0
- package/dist/types/automation.d.ts +15 -0
- package/dist/types/settings.d.ts +3 -1
- package/dist/ui/combobox-caret.cjs +1 -1
- package/dist/ui/combobox-caret.cjs.map +1 -1
- package/dist/ui/combobox-caret.d.ts +1 -1
- package/dist/ui/combobox-caret.js +9 -8
- package/dist/ui/combobox-caret.js.map +1 -1
- package/dist/ui/context-menu.cjs +1 -1
- package/dist/ui/context-menu.cjs.map +1 -1
- package/dist/ui/context-menu.js +9 -8
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/dropdown/dropdown-menu.cjs +1 -1
- package/dist/ui/dropdown/dropdown-menu.cjs.map +1 -1
- package/dist/ui/dropdown/dropdown-menu.js +21 -17
- package/dist/ui/dropdown/dropdown-menu.js.map +1 -1
- package/dist/ui/dropdown/dropdown.cjs +1 -1
- package/dist/ui/dropdown/dropdown.cjs.map +1 -1
- package/dist/ui/dropdown/dropdown.js +2 -2
- package/dist/ui/dropdown/dropdown.js.map +1 -1
- package/dist/utils/automation-schedule.d.ts +1 -0
- package/dist/utils/dropdown-classes.cjs +2 -0
- package/dist/utils/dropdown-classes.cjs.map +1 -0
- package/dist/utils/dropdown-classes.d.ts +32 -0
- package/dist/utils/dropdown-classes.js +8 -0
- package/dist/utils/dropdown-classes.js.map +1 -0
- package/dist/utils/form-control-classes.cjs +1 -1
- package/dist/utils/form-control-classes.cjs.map +1 -1
- package/dist/utils/form-control-classes.d.ts +18 -2
- package/dist/utils/form-control-classes.js +4 -3
- package/dist/utils/form-control-classes.js.map +1 -1
- package/dist/utils/git-control-bar-classes.cjs +2 -0
- package/dist/utils/git-control-bar-classes.cjs.map +1 -0
- package/dist/utils/git-control-bar-classes.d.ts +4 -0
- package/dist/utils/git-control-bar-classes.js +14 -0
- package/dist/utils/git-control-bar-classes.js.map +1 -0
- package/dist/utils/handle-event-for-ui.cjs.map +1 -1
- package/dist/utils/handle-event-for-ui.d.ts +6 -3
- package/dist/utils/handle-event-for-ui.js.map +1 -1
- package/dist/utils/mobile-top-bar-icon-button-classes.cjs +1 -1
- package/dist/utils/mobile-top-bar-icon-button-classes.cjs.map +1 -1
- package/dist/utils/mobile-top-bar-icon-button-classes.js +3 -3
- package/dist/utils/mobile-top-bar-icon-button-classes.js.map +1 -1
- package/dist/utils/modal-classes.cjs +2 -0
- package/dist/utils/modal-classes.cjs.map +1 -0
- package/dist/utils/modal-classes.d.ts +8 -0
- package/dist/utils/modal-classes.js +7 -0
- package/dist/utils/modal-classes.js.map +1 -0
- package/dist/utils/openhands-llm.cjs +2 -0
- package/dist/utils/openhands-llm.cjs.map +1 -0
- package/dist/utils/openhands-llm.d.ts +2 -0
- package/dist/utils/openhands-llm.js +9 -0
- package/dist/utils/openhands-llm.js.map +1 -0
- package/dist/utils/redact-custom-secrets.cjs +2 -0
- package/dist/utils/redact-custom-secrets.cjs.map +1 -0
- package/dist/utils/redact-custom-secrets.d.ts +6 -0
- package/dist/utils/redact-custom-secrets.js +10 -0
- package/dist/utils/redact-custom-secrets.js.map +1 -0
- package/dist/utils/status.cjs +1 -1
- package/dist/utils/status.cjs.map +1 -1
- package/dist/utils/status.d.ts +2 -1
- package/dist/utils/status.js +9 -8
- package/dist/utils/status.js.map +1 -1
- package/dist/utils/system-message-adapter.cjs +1 -1
- package/dist/utils/system-message-adapter.cjs.map +1 -1
- package/dist/utils/system-message-adapter.js +10 -7
- package/dist/utils/system-message-adapter.js.map +1 -1
- package/dist/utils/utils.cjs +1 -1
- package/dist/utils/utils.cjs.map +1 -1
- package/dist/utils/utils.d.ts +2 -1
- package/dist/utils/utils.js +21 -20
- package/dist/utils/utils.js.map +1 -1
- package/package.json +1 -1
- package/scripts/dev-safe.mjs +3 -1
- package/scripts/dev-static.mjs +2 -2
- package/scripts/dev-with-automation.mjs +283 -108
- package/scripts/static-build.mjs +20 -19
- package/scripts/static-server.mjs +65 -6
- package/build/assets/acp-providers-CbiRekh9.js +0 -1
- package/build/assets/active-backend-context-cCM1vYYZ.js +0 -1
- package/build/assets/add-backend-modal-DIUQzMPa.js +0 -1
- package/build/assets/agent-server-client-options-Bc5ZorQZ.js +0 -1
- package/build/assets/agent-server-compatibility-BlkUsrX2.js +0 -1
- package/build/assets/agent-server-conversation-service.api-C2V5SlHu.js +0 -5
- package/build/assets/api-key-entry-screen-B2gynaCp.js +0 -1
- package/build/assets/automation-detail-DJvbVSYK.js +0 -1
- package/build/assets/automations-list-6FDbI5dc.js +0 -1
- package/build/assets/backend-form-modal-Dnk33xA_.js +0 -1
- package/build/assets/base-modal-_dYTw1ri.js +0 -1
- package/build/assets/brand-button-Br7f0kZJ.js +0 -1
- package/build/assets/browser-store-Couc4S5D.js +0 -1
- package/build/assets/clock-BRjCgHTc.js +0 -1
- package/build/assets/combobox-caret-to1O8irE.js +0 -1
- package/build/assets/context-menu-list-item-CWNFpuiC.js +0 -1
- package/build/assets/conversation-DVrKU0oz.js +0 -19
- package/build/assets/conversation-Dlys-D5A.js +0 -1
- package/build/assets/conversation-panel-iF09WjZ4.js +0 -1
- package/build/assets/conversation-service.api-CCfztilW.js +0 -1
- package/build/assets/conversation-state-store-u5jepov0.js +0 -1
- package/build/assets/conversation-store-Z5iMCRpc.js +0 -1
- package/build/assets/conversation-websocket-context-DhJhqUna.js +0 -3
- package/build/assets/declaration-BNMqORFE.js +0 -1
- package/build/assets/dist-BxBP7tFD.js +0 -1
- package/build/assets/edit-automation-modal-BGzR3nfZ.js +0 -1
- package/build/assets/ellipsis-button-ZyLMPURn.js +0 -1
- package/build/assets/entry.client-1VMHpktY.js +0 -2
- package/build/assets/enum-filter-dropdown-CEgCdu4A.js +0 -1
- package/build/assets/extensions-hub-C651jsVh.js +0 -1
- package/build/assets/files-tab-R5z0lLdY.js +0 -1
- package/build/assets/files-tab-store-CDyVTXNT.js +0 -1
- package/build/assets/git-control-bar-branch-button-COdRAYHb.js +0 -27
- package/build/assets/git-provider-icon-BzLbc0yC.js +0 -1
- package/build/assets/home-e-egNUXZ.js +0 -1
- package/build/assets/install-server-modal-DHlbgqVH.js +0 -1
- package/build/assets/launch-CshDse3e.js +0 -1
- package/build/assets/link-external-D2POYx4c.js +0 -1
- package/build/assets/llm-settings-Bql-vydt.js +0 -1
- package/build/assets/llm-settings-C_tal6Ds.js +0 -1
- package/build/assets/manage-backends-modal-l7RkKfwX.js +0 -1
- package/build/assets/manage-workspaces-modal-DhKF_8z3.js +0 -1
- package/build/assets/manifest-3bf30d69.js +0 -1
- package/build/assets/mcp-ByeBfdfU.js +0 -9
- package/build/assets/messages-D0rWot7s.js +0 -36
- package/build/assets/proxy-CxydCnis.js +0 -1
- package/build/assets/root-DHeCXo9N.css +0 -1
- package/build/assets/root-layout-Czo9Ma6Q.js +0 -2
- package/build/assets/secrets-service-BsnKFc2x.js +0 -1
- package/build/assets/secrets-settings-Bz_UohPJ.js +0 -1
- package/build/assets/settings-client-C73C7IgV.js +0 -1
- package/build/assets/settings-index-Dz0BmdJD.js +0 -1
- package/build/assets/settings-list-classes-Bf80tWtc.js +0 -1
- package/build/assets/settings-modal-Brzgh5Yw.js +0 -1
- package/build/assets/settings-service.api-CZ3uWx4v.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-Do_aA9Zm.js +0 -1
- package/build/assets/skills-settings-DlA5hlXw.js +0 -2
- package/build/assets/status-hp6M6E7E.js +0 -1
- package/build/assets/use-agent-settings-schema-33Un7UF2.js +0 -1
- package/build/assets/use-is-authed-BggE5wPj.js +0 -1
- package/build/assets/use-llm-profiles-DDOol3gK.js +0 -1
- package/build/assets/use-runtime-is-ready-B7EF4BKU.js +0 -1
- package/build/assets/use-settings-DQIZmIov.js +0 -1
- package/build/assets/use-user-conversation-C6hrMMtn.js +0 -1
- package/build/assets/utils-i18rdUj2.js +0 -1
- package/build/assets/vendor~conversation-panel~conversation-a9SyrrhV.js +0 -1
- package/build/assets/vendor~conversation-panel~conversation~index-C23ZXO4R.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-BebWhFNT.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-DzIXV3Ui.js +0 -9
- /package/build/assets/{automation-IdgZq6ZK.js → automation-XDPAjiZi.js} +0 -0
- /package/build/assets/{color-themes-DSaoIL6A.js → color-themes-B9pm9c-R.js} +0 -0
- /package/build/assets/{common-DR1t-EeP.js → common-DqjLSBOt.js} +0 -0
- /package/build/assets/{conversation-local-storage-UYl-SX-r.js → conversation-local-storage-YmOVXxxW.js} +0 -0
- /package/build/assets/{dist-C6t0EXL7.js → dist-C3NfioQC.js} +0 -0
- /package/build/assets/{environment-switch-store-C4ulFJKp.js → environment-switch-store-CiurvTtK.js} +0 -0
- /package/build/assets/{health-store-BDC2rM-X.js → health-store-B5f0S2FY.js} +0 -0
- /package/build/assets/{map-provider-COBVzZYo.js → map-provider-BJ_8KZKU.js} +0 -0
- /package/build/assets/{middleware-BC9EwbB9.js → middleware-CfatjPYZ.js} +0 -0
- /package/build/assets/{objectWithoutPropertiesLoose-Du6eBn-V.js → objectWithoutPropertiesLoose-DSQKyRhw.js} +0 -0
- /package/build/assets/{react-Do0CT17Y.js → react-Dy05vyj5.js} +0 -0
- /package/build/assets/{sdk-settings-field-metadata-CBPmeqYa.js → sdk-settings-field-metadata-DQiaIBie.js} +0 -0
- /package/build/assets/{settings-D_H-qsRm.js → settings-DGY6n4J2.js} +0 -0
- /package/build/assets/{settings-like-page-layout-classes-I0BDBEoq.js → settings-like-page-layout-classes-D7YjdTd0.js} +0 -0
- /package/build/assets/{use-breakpoint-DbJ6FkQ-.js → use-breakpoint-DF_RiQ6s.js} +0 -0
- /package/build/assets/{use-click-outside-element-DffgWWoZ.js → use-click-outside-element-DhxCUyWl.js} +0 -0
- /package/build/assets/{v4-CNn21NXa.js → v4-khGvL7i2.js} +0 -0
- /package/build/assets/{vendor~browser-DDiZgqD3.js → vendor~browser-DisFGEp9.js} +0 -0
- /package/build/assets/{vendor~browser-tab-BgwV1mxF.js → vendor~browser-tab-BxhTtM9_.js} +0 -0
- /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-DbvX3OcM.js → vendor~conversation-panel~conversation~alert-banner-w-I2sY6c.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-iOsylxCS.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-BClAMeFe.js} +0 -0
- /package/build/assets/{vendor~files-tab-BGKayPiK.js → vendor~files-tab-BtkpAiMX.js} +0 -0
- /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BW6261Sb.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CyZ-3lDQ.js} +0 -0
- /package/build/assets/{vendor~home~mcp~automations-list-DoPfwaXj.js → vendor~home~mcp~automations-list-BgV86Sti.js} +0 -0
- /package/build/assets/{vendor~launch-vdeRTWFu.js → vendor~launch-BXgl67Re.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~ninslayh-D9P8e98a.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~ninslayh-CLlsvdNP.js} +0 -0
- /package/build/assets/{vendor~terminal-DUrOWGFE.js → vendor~terminal-DZaJIY8A.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-user-messages.cjs","names":[],"sources":["../../../../src/components/features/chat/pending-user-messages.tsx"],"sourcesContent":["import React from \"react\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { useSendMessage } from \"#/hooks/use-send-message\";\nimport { createChatMessage } from \"#/services/chat-service\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { matchesPendingConversationId } from \"#/utils/pending-task-message-link\";\nimport { ImageCarousel } from \"#/components/features/images/image-carousel\";\nimport { ChatMessage } from \"./chat-message\";\n\n/**\n * Renders the queue of locally-tracked user messages that have been submitted\n * but not yet echoed back through the WebSocket. Each message shows a faded\n * \"sending\" treatment until the server echoes a real `UserMessageEvent`\n * (which removes it via `consumeMatchingPendingMessage`). If the API rejects the\n * send, the message switches to an \"error\" state with a retry button.\n *\n * The queue is global but each entry is tagged with the conversation id it\n * was enqueued from; this component filters to only entries belonging to the\n * active conversation, so switching conversations never carries pending\n * bubbles over.\n */\nexport function PendingUserMessages() {\n const { conversationId } = useOptionalConversationId();\n const pendingMessages = useOptimisticUserMessageStore(\n (state) => state.pendingMessages,\n );\n const markPendingMessageError = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageError,\n );\n const markPendingMessageSending = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageSending,\n );\n const { send } = useSendMessage();\n\n const visibleMessages = React.useMemo(\n () =>\n conversationId\n ? pendingMessages.filter((message) =>\n matchesPendingConversationId(\n conversationId,\n message.conversationId,\n ),\n )\n : [],\n [pendingMessages, conversationId],\n );\n\n const handleRetry = React.useCallback(\n async (id: string) => {\n const message = useOptimisticUserMessageStore\n .getState()\n .pendingMessages.find((entry) => entry.id === id);\n if (!message) return;\n\n markPendingMessageSending(id);\n\n try {\n await send(\n createChatMessage(\n message.text,\n message.imageUrls,\n message.fileUrls,\n message.timestamp,\n ),\n );\n } catch (error) {\n const errorMessage =\n error instanceof Error ? error.message : \"Failed to send message\";\n markPendingMessageError(id, errorMessage);\n }\n },\n [send, markPendingMessageError, markPendingMessageSending],\n );\n\n if (visibleMessages.length === 0) {\n return null;\n }\n\n return (\n <>\n {visibleMessages.map((message) => (\n <ChatMessage\n key={message.id}\n type=\"user\"\n message={message.text}\n pendingStatus={message.status}\n onRetry={\n message.status === \"error\"\n ? () => handleRetry(message.id)\n : undefined\n }\n >\n {message.imageUrls.length > 0 && (\n <ImageCarousel size=\"small\" images={message.imageUrls} />\n )}\n </ChatMessage>\n ))}\n </>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"pending-user-messages.cjs","names":[],"sources":["../../../../src/components/features/chat/pending-user-messages.tsx"],"sourcesContent":["import React from \"react\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { useSendMessage } from \"#/hooks/use-send-message\";\nimport { createChatMessage } from \"#/services/chat-service\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { matchesPendingConversationId } from \"#/utils/pending-task-message-link\";\nimport { ImageCarousel } from \"#/components/features/images/image-carousel\";\nimport { ChatMessage } from \"./chat-message\";\n\n/**\n * Renders the queue of locally-tracked user messages that have been submitted\n * but not yet echoed back through the WebSocket. Each message shows a faded\n * \"sending\" treatment until the server echoes a real `UserMessageEvent`\n * (which removes it via `consumeMatchingPendingMessage`). If the API rejects the\n * send, the message switches to an \"error\" state with a retry button.\n *\n * The queue is global but each entry is tagged with the conversation id it\n * was enqueued from; this component filters to only entries belonging to the\n * active conversation, so switching conversations never carries pending\n * bubbles over.\n */\nexport function PendingUserMessages() {\n const { conversationId } = useOptionalConversationId();\n const pendingMessages = useOptimisticUserMessageStore(\n (state) => state.pendingMessages,\n );\n const markPendingMessageError = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageError,\n );\n const markPendingMessageSending = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageSending,\n );\n const removePendingMessage = useOptimisticUserMessageStore(\n (state) => state.removePendingMessage,\n );\n const restoreMessageToInputIfEmpty = useConversationStore(\n (state) => state.restoreMessageToInputIfEmpty,\n );\n const { send } = useSendMessage();\n\n const visibleMessages = React.useMemo(\n () =>\n conversationId\n ? pendingMessages.filter((message) =>\n matchesPendingConversationId(\n conversationId,\n message.conversationId,\n ),\n )\n : [],\n [pendingMessages, conversationId],\n );\n\n const handleRetry = React.useCallback(\n async (id: string) => {\n const message = useOptimisticUserMessageStore\n .getState()\n .pendingMessages.find((entry) => entry.id === id);\n if (!message) return;\n\n markPendingMessageSending(id);\n\n try {\n await send(\n createChatMessage(\n message.text,\n message.imageUrls,\n message.fileUrls,\n message.timestamp,\n ),\n );\n } catch (error) {\n const errorMessage =\n error instanceof Error ? error.message : \"Failed to send message\";\n markPendingMessageError(id, errorMessage);\n }\n },\n [send, markPendingMessageError, markPendingMessageSending],\n );\n\n const handleStop = React.useCallback(\n (id: string, text: string) => {\n restoreMessageToInputIfEmpty(text);\n removePendingMessage(id);\n },\n [restoreMessageToInputIfEmpty, removePendingMessage],\n );\n\n if (visibleMessages.length === 0) {\n return null;\n }\n\n return (\n <>\n {visibleMessages.map((message) => (\n <ChatMessage\n key={message.id}\n type=\"user\"\n message={message.text}\n pendingStatus={message.status}\n onRetry={\n message.status === \"error\"\n ? () => handleRetry(message.id)\n : undefined\n }\n onStop={\n message.status === \"sending\"\n ? () => handleStop(message.id, message.text)\n : undefined\n }\n >\n {message.imageUrls.length > 0 && (\n <ImageCarousel size=\"small\" images={message.imageUrls} />\n )}\n </ChatMessage>\n ))}\n </>\n );\n}\n"],"mappings":"khBAsBA,SAAgB,GAAsB,CACpC,GAAM,CAAE,kBAAmB,EAAA,2BAA2B,CAChD,EAAkB,EAAA,8BACrB,GAAU,EAAM,gBAClB,CACK,EAA0B,EAAA,8BAC7B,GAAU,EAAM,wBAClB,CACK,EAA4B,EAAA,8BAC/B,GAAU,EAAM,0BAClB,CACK,EAAuB,EAAA,8BAC1B,GAAU,EAAM,qBAClB,CACK,EAA+B,EAAA,qBAClC,GAAU,EAAM,6BAClB,CACK,CAAE,QAAS,EAAA,gBAAgB,CAE3B,EAAkB,EAAA,QAAM,YAE1B,EACI,EAAgB,OAAQ,GACtB,EAAA,6BACE,EACA,EAAQ,eACT,CACF,CACD,EAAE,CACR,CAAC,EAAiB,EAAe,CAClC,CAEK,EAAc,EAAA,QAAM,YACxB,KAAO,IAAe,CACpB,IAAM,EAAU,EAAA,8BACb,UAAU,CACV,gBAAgB,KAAM,GAAU,EAAM,KAAO,EAAG,CAC9C,KAEL,GAA0B,EAAG,CAE7B,GAAI,CACF,MAAM,EACJ,EAAA,kBACE,EAAQ,KACR,EAAQ,UACR,EAAQ,SACR,EAAQ,UACT,CACF,OACM,EAAO,CAGd,EAAwB,EADtB,aAAiB,MAAQ,EAAM,QAAU,yBACF,IAG7C,CAAC,EAAM,EAAyB,EAA0B,CAC3D,CAEK,EAAa,EAAA,QAAM,aACtB,EAAY,IAAiB,CAC5B,EAA6B,EAAK,CAClC,EAAqB,EAAG,EAE1B,CAAC,EAA8B,EAAqB,CACrD,CAMD,OAJI,EAAgB,SAAW,EACtB,MAIP,EAAA,EAAA,KAAA,EAAA,SAAA,CAAA,SACG,EAAgB,IAAK,IACpB,EAAA,EAAA,KAAC,EAAA,YAAD,CAEE,KAAK,OACL,QAAS,EAAQ,KACjB,cAAe,EAAQ,OACvB,QACE,EAAQ,SAAW,YACT,EAAY,EAAQ,GAAG,CAC7B,IAAA,GAEN,OACE,EAAQ,SAAW,cACT,EAAW,EAAQ,GAAI,EAAQ,KAAK,CAC1C,IAAA,YAGL,EAAQ,UAAU,OAAS,IAC1B,EAAA,EAAA,KAAC,EAAA,cAAD,CAAe,KAAK,QAAQ,OAAQ,EAAQ,UAAa,CAAA,CAE/C,CAlBP,EAAQ,GAkBD,CACd,CACD,CAAA"}
|
|
@@ -1,41 +1,45 @@
|
|
|
1
1
|
import { useOptionalConversationId as e } from "../../../hooks/use-conversation-id.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import s from "
|
|
9
|
-
import
|
|
2
|
+
import { useConversationStore as t } from "../../../stores/conversation-store.js";
|
|
3
|
+
import { useOptimisticUserMessageStore as n } from "../../../stores/optimistic-user-message-store.js";
|
|
4
|
+
import { useSendMessage as r } from "../../../hooks/use-send-message.js";
|
|
5
|
+
import { matchesPendingConversationId as i } from "../../../utils/pending-task-message-link.js";
|
|
6
|
+
import { createChatMessage as a } from "../../../services/chat-service.js";
|
|
7
|
+
import { ChatMessage as o } from "./chat-message.js";
|
|
8
|
+
import { ImageCarousel as s } from "../images/image-carousel.js";
|
|
9
|
+
import c from "react";
|
|
10
|
+
import { Fragment as l, jsx as u } from "react/jsx-runtime";
|
|
10
11
|
//#region src/components/features/chat/pending-user-messages.tsx
|
|
11
|
-
function
|
|
12
|
-
let { conversationId:
|
|
13
|
-
let
|
|
14
|
-
if (
|
|
15
|
-
|
|
12
|
+
function d() {
|
|
13
|
+
let { conversationId: d } = e(), f = n((e) => e.pendingMessages), p = n((e) => e.markPendingMessageError), m = n((e) => e.markPendingMessageSending), h = n((e) => e.removePendingMessage), g = t((e) => e.restoreMessageToInputIfEmpty), { send: _ } = r(), v = c.useMemo(() => d ? f.filter((e) => i(d, e.conversationId)) : [], [f, d]), y = c.useCallback(async (e) => {
|
|
14
|
+
let t = n.getState().pendingMessages.find((t) => t.id === e);
|
|
15
|
+
if (t) {
|
|
16
|
+
m(e);
|
|
16
17
|
try {
|
|
17
|
-
await
|
|
18
|
+
await _(a(t.text, t.imageUrls, t.fileUrls, t.timestamp));
|
|
18
19
|
} catch (t) {
|
|
19
|
-
|
|
20
|
+
p(e, t instanceof Error ? t.message : "Failed to send message");
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
}, [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
])
|
|
27
|
-
|
|
24
|
+
_,
|
|
25
|
+
p,
|
|
26
|
+
m
|
|
27
|
+
]), b = c.useCallback((e, t) => {
|
|
28
|
+
g(t), h(e);
|
|
29
|
+
}, [g, h]);
|
|
30
|
+
return v.length === 0 ? null : /* @__PURE__ */ u(l, { children: v.map((e) => /* @__PURE__ */ u(o, {
|
|
28
31
|
type: "user",
|
|
29
32
|
message: e.text,
|
|
30
33
|
pendingStatus: e.status,
|
|
31
|
-
onRetry: e.status === "error" ? () =>
|
|
32
|
-
|
|
34
|
+
onRetry: e.status === "error" ? () => y(e.id) : void 0,
|
|
35
|
+
onStop: e.status === "sending" ? () => b(e.id, e.text) : void 0,
|
|
36
|
+
children: e.imageUrls.length > 0 && /* @__PURE__ */ u(s, {
|
|
33
37
|
size: "small",
|
|
34
38
|
images: e.imageUrls
|
|
35
39
|
})
|
|
36
40
|
}, e.id)) });
|
|
37
41
|
}
|
|
38
42
|
//#endregion
|
|
39
|
-
export {
|
|
43
|
+
export { d as PendingUserMessages };
|
|
40
44
|
|
|
41
45
|
//# sourceMappingURL=pending-user-messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-user-messages.js","names":[],"sources":["../../../../src/components/features/chat/pending-user-messages.tsx"],"sourcesContent":["import React from \"react\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { useSendMessage } from \"#/hooks/use-send-message\";\nimport { createChatMessage } from \"#/services/chat-service\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { matchesPendingConversationId } from \"#/utils/pending-task-message-link\";\nimport { ImageCarousel } from \"#/components/features/images/image-carousel\";\nimport { ChatMessage } from \"./chat-message\";\n\n/**\n * Renders the queue of locally-tracked user messages that have been submitted\n * but not yet echoed back through the WebSocket. Each message shows a faded\n * \"sending\" treatment until the server echoes a real `UserMessageEvent`\n * (which removes it via `consumeMatchingPendingMessage`). If the API rejects the\n * send, the message switches to an \"error\" state with a retry button.\n *\n * The queue is global but each entry is tagged with the conversation id it\n * was enqueued from; this component filters to only entries belonging to the\n * active conversation, so switching conversations never carries pending\n * bubbles over.\n */\nexport function PendingUserMessages() {\n const { conversationId } = useOptionalConversationId();\n const pendingMessages = useOptimisticUserMessageStore(\n (state) => state.pendingMessages,\n );\n const markPendingMessageError = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageError,\n );\n const markPendingMessageSending = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageSending,\n );\n const { send } = useSendMessage();\n\n const visibleMessages = React.useMemo(\n () =>\n conversationId\n ? pendingMessages.filter((message) =>\n matchesPendingConversationId(\n conversationId,\n message.conversationId,\n ),\n )\n : [],\n [pendingMessages, conversationId],\n );\n\n const handleRetry = React.useCallback(\n async (id: string) => {\n const message = useOptimisticUserMessageStore\n .getState()\n .pendingMessages.find((entry) => entry.id === id);\n if (!message) return;\n\n markPendingMessageSending(id);\n\n try {\n await send(\n createChatMessage(\n message.text,\n message.imageUrls,\n message.fileUrls,\n message.timestamp,\n ),\n );\n } catch (error) {\n const errorMessage =\n error instanceof Error ? error.message : \"Failed to send message\";\n markPendingMessageError(id, errorMessage);\n }\n },\n [send, markPendingMessageError, markPendingMessageSending],\n );\n\n if (visibleMessages.length === 0) {\n return null;\n }\n\n return (\n <>\n {visibleMessages.map((message) => (\n <ChatMessage\n key={message.id}\n type=\"user\"\n message={message.text}\n pendingStatus={message.status}\n onRetry={\n message.status === \"error\"\n ? () => handleRetry(message.id)\n : undefined\n }\n >\n {message.imageUrls.length > 0 && (\n <ImageCarousel size=\"small\" images={message.imageUrls} />\n )}\n </ChatMessage>\n ))}\n </>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"pending-user-messages.js","names":[],"sources":["../../../../src/components/features/chat/pending-user-messages.tsx"],"sourcesContent":["import React from \"react\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { useSendMessage } from \"#/hooks/use-send-message\";\nimport { createChatMessage } from \"#/services/chat-service\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { matchesPendingConversationId } from \"#/utils/pending-task-message-link\";\nimport { ImageCarousel } from \"#/components/features/images/image-carousel\";\nimport { ChatMessage } from \"./chat-message\";\n\n/**\n * Renders the queue of locally-tracked user messages that have been submitted\n * but not yet echoed back through the WebSocket. Each message shows a faded\n * \"sending\" treatment until the server echoes a real `UserMessageEvent`\n * (which removes it via `consumeMatchingPendingMessage`). If the API rejects the\n * send, the message switches to an \"error\" state with a retry button.\n *\n * The queue is global but each entry is tagged with the conversation id it\n * was enqueued from; this component filters to only entries belonging to the\n * active conversation, so switching conversations never carries pending\n * bubbles over.\n */\nexport function PendingUserMessages() {\n const { conversationId } = useOptionalConversationId();\n const pendingMessages = useOptimisticUserMessageStore(\n (state) => state.pendingMessages,\n );\n const markPendingMessageError = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageError,\n );\n const markPendingMessageSending = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageSending,\n );\n const removePendingMessage = useOptimisticUserMessageStore(\n (state) => state.removePendingMessage,\n );\n const restoreMessageToInputIfEmpty = useConversationStore(\n (state) => state.restoreMessageToInputIfEmpty,\n );\n const { send } = useSendMessage();\n\n const visibleMessages = React.useMemo(\n () =>\n conversationId\n ? pendingMessages.filter((message) =>\n matchesPendingConversationId(\n conversationId,\n message.conversationId,\n ),\n )\n : [],\n [pendingMessages, conversationId],\n );\n\n const handleRetry = React.useCallback(\n async (id: string) => {\n const message = useOptimisticUserMessageStore\n .getState()\n .pendingMessages.find((entry) => entry.id === id);\n if (!message) return;\n\n markPendingMessageSending(id);\n\n try {\n await send(\n createChatMessage(\n message.text,\n message.imageUrls,\n message.fileUrls,\n message.timestamp,\n ),\n );\n } catch (error) {\n const errorMessage =\n error instanceof Error ? error.message : \"Failed to send message\";\n markPendingMessageError(id, errorMessage);\n }\n },\n [send, markPendingMessageError, markPendingMessageSending],\n );\n\n const handleStop = React.useCallback(\n (id: string, text: string) => {\n restoreMessageToInputIfEmpty(text);\n removePendingMessage(id);\n },\n [restoreMessageToInputIfEmpty, removePendingMessage],\n );\n\n if (visibleMessages.length === 0) {\n return null;\n }\n\n return (\n <>\n {visibleMessages.map((message) => (\n <ChatMessage\n key={message.id}\n type=\"user\"\n message={message.text}\n pendingStatus={message.status}\n onRetry={\n message.status === \"error\"\n ? () => handleRetry(message.id)\n : undefined\n }\n onStop={\n message.status === \"sending\"\n ? () => handleStop(message.id, message.text)\n : undefined\n }\n >\n {message.imageUrls.length > 0 && (\n <ImageCarousel size=\"small\" images={message.imageUrls} />\n )}\n </ChatMessage>\n ))}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;AAsBA,SAAgB,IAAsB;CACpC,IAAM,EAAE,sBAAmB,GAA2B,EAChD,IAAkB,GACrB,MAAU,EAAM,gBAClB,EACK,IAA0B,GAC7B,MAAU,EAAM,wBAClB,EACK,IAA4B,GAC/B,MAAU,EAAM,0BAClB,EACK,IAAuB,GAC1B,MAAU,EAAM,qBAClB,EACK,IAA+B,GAClC,MAAU,EAAM,6BAClB,EACK,EAAE,YAAS,GAAgB,EAE3B,IAAkB,EAAM,cAE1B,IACI,EAAgB,QAAQ,MACtB,EACE,GACA,EAAQ,eACT,CACF,GACD,EAAE,EACR,CAAC,GAAiB,EAAe,CAClC,EAEK,IAAc,EAAM,YACxB,OAAO,MAAe;EACpB,IAAM,IAAU,EACb,UAAU,CACV,gBAAgB,MAAM,MAAU,EAAM,OAAO,EAAG;AAC9C,SAEL;KAA0B,EAAG;AAE7B,OAAI;AACF,UAAM,EACJ,EACE,EAAQ,MACR,EAAQ,WACR,EAAQ,UACR,EAAQ,UACT,CACF;YACM,GAAO;AAGd,MAAwB,GADtB,aAAiB,QAAQ,EAAM,UAAU,yBACF;;;IAG7C;EAAC;EAAM;EAAyB;EAA0B,CAC3D,EAEK,IAAa,EAAM,aACtB,GAAY,MAAiB;AAE5B,EADA,EAA6B,EAAK,EAClC,EAAqB,EAAG;IAE1B,CAAC,GAA8B,EAAqB,CACrD;AAMD,QAJI,EAAgB,WAAW,IACtB,OAIP,kBAAA,GAAA,EAAA,UACG,EAAgB,KAAK,MACpB,kBAAC,GAAD;EAEE,MAAK;EACL,SAAS,EAAQ;EACjB,eAAe,EAAQ;EACvB,SACE,EAAQ,WAAW,gBACT,EAAY,EAAQ,GAAG,GAC7B,KAAA;EAEN,QACE,EAAQ,WAAW,kBACT,EAAW,EAAQ,IAAI,EAAQ,KAAK,GAC1C,KAAA;YAGL,EAAQ,UAAU,SAAS,KAC1B,kBAAC,GAAD;GAAe,MAAK;GAAQ,QAAQ,EAAQ;GAAa,CAAA;EAE/C,EAlBP,EAAQ,GAkBD,CACd,EACD,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../../../i18n/declaration.cjs`),r=require(`../../../utils/utils.cjs`),i=require(`../../../hooks/use-conversation-id.cjs`),a=require(`../../../stores/model-store.cjs`),o=require(`../../../hooks/query/use-active-conversation.cjs`),s=require(`../../../hooks/query/use-llm-profiles.cjs`),
|
|
1
|
+
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../../../i18n/declaration.cjs`),r=require(`../../../utils/utils.cjs`),i=require(`../../../hooks/use-conversation-id.cjs`),a=require(`../../../stores/model-store.cjs`),o=require(`../../../hooks/query/use-active-conversation.cjs`),s=require(`../../../utils/form-control-classes.cjs`),c=require(`../../../hooks/query/use-llm-profiles.cjs`),l=require(`../../../hooks/query/use-settings.cjs`),u=require(`../../../ui/combobox-caret.cjs`),d=require(`../../../hooks/mutation/use-switch-llm-profile-and-log.cjs`),f=require(`./switch-profile-context-menu.cjs`);let p=require(`react`);p=e.__toESM(p,1);let m=require(`react/jsx-runtime`);function h(){let{t:e}=t.useTranslation(`openhands`),[h,g]=p.default.useState(!1),{conversationId:_}=i.useOptionalConversationId(),{data:v}=c.useLlmProfiles(),{data:y}=o.useActiveConversation(),{data:b}=l.useSettings(),{switchAndLog:x,isPending:S}=d.useSwitchLlmProfileAndLog(),C=a.useModelStore(e=>_?e.activeProfileByConversation[_]:void 0),w=v?.profiles??[],T=y?.llm_model??null,E=y?.agent_kind===`acp`||!y&&b?.agent_settings?.agent_kind===`acp`,D=C??(T?w.find(e=>e.model===T)?.name??null:v?.active_profile??null),O=w.find(e=>e.name===D)?.model??T??null;return w.length===0||E?null:(0,m.jsxs)(`div`,{className:`relative`,children:[(0,m.jsxs)(`button`,{type:`button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),g(e=>!e)},disabled:S,"data-testid":`switch-profile-button`,title:O??void 0,"aria-haspopup":`menu`,"aria-expanded":h,className:r.cn(s.chatInputPillButtonClassName,`max-w-[200px]`,`disabled:opacity-50 disabled:cursor-not-allowed`),children:[(0,m.jsx)(`span`,{className:`truncate`,children:D??e(n.I18nKey.LLM$SELECT_MODEL_PLACEHOLDER)}),(0,m.jsx)(u.ComboboxCaretInline,{isOpen:h})]}),h&&(0,m.jsx)(f.SwitchProfileContextMenu,{profiles:w,activeProfileName:D,onSelect:e=>{e!==D&&x(_,e)},onClose:()=>g(!1)})]})}exports.SwitchProfileButton=h;
|
|
2
2
|
//# sourceMappingURL=switch-profile-button.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-profile-button.cjs","names":[],"sources":["../../../../src/components/features/chat/switch-profile-button.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ComboboxCaretInline } from \"#/ui/combobox-caret\";\nimport { useLlmProfiles } from \"#/hooks/query/use-llm-profiles\";\nimport { useSwitchLlmProfileAndLog } from \"#/hooks/mutation/use-switch-llm-profile-and-log\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useModelStore } from \"#/stores/model-store\";\nimport { cn } from \"#/utils/utils\";\nimport { SwitchProfileContextMenu } from \"./switch-profile-context-menu\";\n\nexport function SwitchProfileButton() {\n const { t } = useTranslation(\"openhands\");\n const [contextMenuOpen, setContextMenuOpen] = React.useState(false);\n // Null on the home page; `useSwitchLlmProfileAndLog` is fine with that\n // because /api/profiles/<name>/activate is a global endpoint.\n const { conversationId } = useOptionalConversationId();\n const { data } = useLlmProfiles();\n const { data: conversation } = useActiveConversation();\n const { data: settings } = useSettings();\n const { switchAndLog, isPending } = useSwitchLlmProfileAndLog();\n // Optimistic value written by recordSwitch on a successful switch — gives\n // instant in-conversation feedback before the conversation refetch lands\n // with the new `llm_model`.\n const optimisticActiveProfile = useModelStore((s) =>\n conversationId ? s.activeProfileByConversation[conversationId] : undefined,\n );\n\n const profiles = data?.profiles ?? [];\n const conversationModel = conversation?.llm_model ?? null;\n // ACPAgent conversations route prompts to a CLI subprocess whose model is\n // controlled by ``acp_model`` (set in Settings → Agent), not by the LLM\n // profile picker. Surfacing the switcher here would let the user \"change\n // the model\" while the running subprocess silently keeps its own — a\n // confusing no-op. Hide the button even when ``llm_model`` carries an ACP\n // display model for chips/headers.\n //\n // On the home screen ``conversation`` is undefined; fall back to\n // ``settings.agent_settings.agent_kind`` so the picker also hides when\n // ACP is the *default* the next-created conversation would inherit.\n // Otherwise an ACP user lands on a home page with an LLM-switch\n // control that contradicts the ACP nav gating everywhere else.\n const isAcpActive =\n conversation?.agent_kind === \"acp\" ||\n (!conversation && settings?.agent_settings?.agent_kind === \"acp\");\n\n // Resolution priority for the active profile name:\n // 1. Optimistic (just-clicked) — instant feedback before the refetch.\n // 2. Profile whose model matches the running llm_model — cold loads.\n // 3. User-level active_profile — home page / before the conversation has\n // sent any messages.\n const activeProfileName =\n optimisticActiveProfile ??\n (conversationModel\n ? (profiles.find((p) => p.model === conversationModel)?.name ?? null)\n : (data?.active_profile ?? null));\n const activeProfileModel =\n profiles.find((p) => p.name === activeProfileName)?.model ??\n conversationModel ??\n null;\n\n if (profiles.length === 0 || isAcpActive) {\n return null;\n }\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n setContextMenuOpen((open) => !open);\n };\n\n const handleSelect = (profileName: string) => {\n if (profileName === activeProfileName) return;\n switchAndLog(conversationId, profileName);\n };\n\n return (\n <div className=\"relative\">\n <button\n type=\"button\"\n onClick={handleClick}\n disabled={isPending}\n data-testid=\"switch-profile-button\"\n title={activeProfileModel ?? undefined}\n aria-haspopup=\"menu\"\n aria-expanded={contextMenuOpen}\n className={cn(\n \"
|
|
1
|
+
{"version":3,"file":"switch-profile-button.cjs","names":[],"sources":["../../../../src/components/features/chat/switch-profile-button.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ComboboxCaretInline } from \"#/ui/combobox-caret\";\nimport { useLlmProfiles } from \"#/hooks/query/use-llm-profiles\";\nimport { useSwitchLlmProfileAndLog } from \"#/hooks/mutation/use-switch-llm-profile-and-log\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useModelStore } from \"#/stores/model-store\";\nimport { cn } from \"#/utils/utils\";\nimport { chatInputPillButtonClassName } from \"#/utils/form-control-classes\";\nimport { SwitchProfileContextMenu } from \"./switch-profile-context-menu\";\n\nexport function SwitchProfileButton() {\n const { t } = useTranslation(\"openhands\");\n const [contextMenuOpen, setContextMenuOpen] = React.useState(false);\n // Null on the home page; `useSwitchLlmProfileAndLog` is fine with that\n // because /api/profiles/<name>/activate is a global endpoint.\n const { conversationId } = useOptionalConversationId();\n const { data } = useLlmProfiles();\n const { data: conversation } = useActiveConversation();\n const { data: settings } = useSettings();\n const { switchAndLog, isPending } = useSwitchLlmProfileAndLog();\n // Optimistic value written by recordSwitch on a successful switch — gives\n // instant in-conversation feedback before the conversation refetch lands\n // with the new `llm_model`.\n const optimisticActiveProfile = useModelStore((s) =>\n conversationId ? s.activeProfileByConversation[conversationId] : undefined,\n );\n\n const profiles = data?.profiles ?? [];\n const conversationModel = conversation?.llm_model ?? null;\n // ACPAgent conversations route prompts to a CLI subprocess whose model is\n // controlled by ``acp_model`` (set in Settings → Agent), not by the LLM\n // profile picker. Surfacing the switcher here would let the user \"change\n // the model\" while the running subprocess silently keeps its own — a\n // confusing no-op. Hide the button even when ``llm_model`` carries an ACP\n // display model for chips/headers.\n //\n // On the home screen ``conversation`` is undefined; fall back to\n // ``settings.agent_settings.agent_kind`` so the picker also hides when\n // ACP is the *default* the next-created conversation would inherit.\n // Otherwise an ACP user lands on a home page with an LLM-switch\n // control that contradicts the ACP nav gating everywhere else.\n const isAcpActive =\n conversation?.agent_kind === \"acp\" ||\n (!conversation && settings?.agent_settings?.agent_kind === \"acp\");\n\n // Resolution priority for the active profile name:\n // 1. Optimistic (just-clicked) — instant feedback before the refetch.\n // 2. Profile whose model matches the running llm_model — cold loads.\n // 3. User-level active_profile — home page / before the conversation has\n // sent any messages.\n const activeProfileName =\n optimisticActiveProfile ??\n (conversationModel\n ? (profiles.find((p) => p.model === conversationModel)?.name ?? null)\n : (data?.active_profile ?? null));\n const activeProfileModel =\n profiles.find((p) => p.name === activeProfileName)?.model ??\n conversationModel ??\n null;\n\n if (profiles.length === 0 || isAcpActive) {\n return null;\n }\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n setContextMenuOpen((open) => !open);\n };\n\n const handleSelect = (profileName: string) => {\n if (profileName === activeProfileName) return;\n switchAndLog(conversationId, profileName);\n };\n\n return (\n <div className=\"relative\">\n <button\n type=\"button\"\n onClick={handleClick}\n disabled={isPending}\n data-testid=\"switch-profile-button\"\n title={activeProfileModel ?? undefined}\n aria-haspopup=\"menu\"\n aria-expanded={contextMenuOpen}\n className={cn(\n chatInputPillButtonClassName,\n \"max-w-[200px]\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n )}\n >\n <span className=\"truncate\">\n {activeProfileName ?? t(I18nKey.LLM$SELECT_MODEL_PLACEHOLDER)}\n </span>\n <ComboboxCaretInline isOpen={contextMenuOpen} />\n </button>\n {contextMenuOpen && (\n <SwitchProfileContextMenu\n profiles={profiles}\n activeProfileName={activeProfileName}\n onSelect={handleSelect}\n onClose={() => setContextMenuOpen(false)}\n />\n )}\n </div>\n );\n}\n"],"mappings":"owBAcA,SAAgB,GAAsB,CACpC,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CACnC,CAAC,EAAiB,GAAsB,EAAA,QAAM,SAAS,GAAM,CAG7D,CAAE,kBAAmB,EAAA,2BAA2B,CAChD,CAAE,QAAS,EAAA,gBAAgB,CAC3B,CAAE,KAAM,GAAiB,EAAA,uBAAuB,CAChD,CAAE,KAAM,GAAa,EAAA,aAAa,CAClC,CAAE,eAAc,aAAc,EAAA,2BAA2B,CAIzD,EAA0B,EAAA,cAAe,GAC7C,EAAiB,EAAE,4BAA4B,GAAkB,IAAA,GAClE,CAEK,EAAW,GAAM,UAAY,EAAE,CAC/B,EAAoB,GAAc,WAAa,KAa/C,EACJ,GAAc,aAAe,OAC5B,CAAC,GAAgB,GAAU,gBAAgB,aAAe,MAOvD,EACJ,IACC,EACI,EAAS,KAAM,GAAM,EAAE,QAAU,EAAkB,EAAE,MAAQ,KAC7D,GAAM,gBAAkB,MACzB,EACJ,EAAS,KAAM,GAAM,EAAE,OAAS,EAAkB,EAAE,OACpD,GACA,KAiBF,OAfI,EAAS,SAAW,GAAK,EACpB,MAeP,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,oBAAf,EACE,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,SACL,QAfe,GAA+C,CAClE,EAAM,gBAAgB,CACtB,EAAM,iBAAiB,CACvB,EAAoB,GAAS,CAAC,EAAK,EAa/B,SAAU,EACV,cAAY,wBACZ,MAAO,GAAsB,IAAA,GAC7B,gBAAc,OACd,gBAAe,EACf,UAAW,EAAA,GACT,EAAA,6BACA,gBACA,kDACD,UAZH,EAcE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,oBACb,GAAqB,EAAE,EAAA,QAAQ,6BAA6B,CACxD,CAAA,EACP,EAAA,EAAA,KAAC,EAAA,oBAAD,CAAqB,OAAQ,EAAmB,CAAA,CACzC,GACR,IACC,EAAA,EAAA,KAAC,EAAA,yBAAD,CACY,WACS,oBACnB,SA9Bc,GAAwB,CACxC,IAAgB,GACpB,EAAa,EAAgB,EAAY,EA6BnC,YAAe,EAAmB,GAAM,CACxC,CAAA,CAEA"}
|
|
@@ -4,44 +4,45 @@ import { cn as n } from "../../../utils/utils.js";
|
|
|
4
4
|
import { useOptionalConversationId as r } from "../../../hooks/use-conversation-id.js";
|
|
5
5
|
import { useModelStore as i } from "../../../stores/model-store.js";
|
|
6
6
|
import { useActiveConversation as a } from "../../../hooks/query/use-active-conversation.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import d from "
|
|
13
|
-
import
|
|
7
|
+
import { chatInputPillButtonClassName as o } from "../../../utils/form-control-classes.js";
|
|
8
|
+
import { useLlmProfiles as s } from "../../../hooks/query/use-llm-profiles.js";
|
|
9
|
+
import { useSettings as c } from "../../../hooks/query/use-settings.js";
|
|
10
|
+
import { ComboboxCaretInline as l } from "../../../ui/combobox-caret.js";
|
|
11
|
+
import { useSwitchLlmProfileAndLog as u } from "../../../hooks/mutation/use-switch-llm-profile-and-log.js";
|
|
12
|
+
import { SwitchProfileContextMenu as d } from "./switch-profile-context-menu.js";
|
|
13
|
+
import f from "react";
|
|
14
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
15
|
//#region src/components/features/chat/switch-profile-button.tsx
|
|
15
|
-
function
|
|
16
|
-
let { t:
|
|
17
|
-
return
|
|
16
|
+
function h() {
|
|
17
|
+
let { t: h } = e("openhands"), [g, _] = f.useState(!1), { conversationId: v } = r(), { data: y } = s(), { data: b } = a(), { data: x } = c(), { switchAndLog: S, isPending: C } = u(), w = i((e) => v ? e.activeProfileByConversation[v] : void 0), T = y?.profiles ?? [], E = b?.llm_model ?? null, D = b?.agent_kind === "acp" || !b && x?.agent_settings?.agent_kind === "acp", O = w ?? (E ? T.find((e) => e.model === E)?.name ?? null : y?.active_profile ?? null), k = T.find((e) => e.name === O)?.model ?? E ?? null;
|
|
18
|
+
return T.length === 0 || D ? null : /* @__PURE__ */ m("div", {
|
|
18
19
|
className: "relative",
|
|
19
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ m("button", {
|
|
20
21
|
type: "button",
|
|
21
22
|
onClick: (e) => {
|
|
22
|
-
e.preventDefault(), e.stopPropagation(),
|
|
23
|
+
e.preventDefault(), e.stopPropagation(), _((e) => !e);
|
|
23
24
|
},
|
|
24
|
-
disabled:
|
|
25
|
+
disabled: C,
|
|
25
26
|
"data-testid": "switch-profile-button",
|
|
26
|
-
title:
|
|
27
|
+
title: k ?? void 0,
|
|
27
28
|
"aria-haspopup": "menu",
|
|
28
|
-
"aria-expanded":
|
|
29
|
-
className: n(
|
|
30
|
-
children: [/* @__PURE__ */
|
|
29
|
+
"aria-expanded": g,
|
|
30
|
+
className: n(o, "max-w-[200px]", "disabled:opacity-50 disabled:cursor-not-allowed"),
|
|
31
|
+
children: [/* @__PURE__ */ p("span", {
|
|
31
32
|
className: "truncate",
|
|
32
|
-
children:
|
|
33
|
-
}), /* @__PURE__ */
|
|
34
|
-
}),
|
|
35
|
-
profiles:
|
|
36
|
-
activeProfileName:
|
|
33
|
+
children: O ?? h(t.LLM$SELECT_MODEL_PLACEHOLDER)
|
|
34
|
+
}), /* @__PURE__ */ p(l, { isOpen: g })]
|
|
35
|
+
}), g && /* @__PURE__ */ p(d, {
|
|
36
|
+
profiles: T,
|
|
37
|
+
activeProfileName: O,
|
|
37
38
|
onSelect: (e) => {
|
|
38
|
-
e !==
|
|
39
|
+
e !== O && S(v, e);
|
|
39
40
|
},
|
|
40
|
-
onClose: () =>
|
|
41
|
+
onClose: () => _(!1)
|
|
41
42
|
})]
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
//#endregion
|
|
45
|
-
export {
|
|
46
|
+
export { h as SwitchProfileButton };
|
|
46
47
|
|
|
47
48
|
//# sourceMappingURL=switch-profile-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-profile-button.js","names":[],"sources":["../../../../src/components/features/chat/switch-profile-button.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ComboboxCaretInline } from \"#/ui/combobox-caret\";\nimport { useLlmProfiles } from \"#/hooks/query/use-llm-profiles\";\nimport { useSwitchLlmProfileAndLog } from \"#/hooks/mutation/use-switch-llm-profile-and-log\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useModelStore } from \"#/stores/model-store\";\nimport { cn } from \"#/utils/utils\";\nimport { SwitchProfileContextMenu } from \"./switch-profile-context-menu\";\n\nexport function SwitchProfileButton() {\n const { t } = useTranslation(\"openhands\");\n const [contextMenuOpen, setContextMenuOpen] = React.useState(false);\n // Null on the home page; `useSwitchLlmProfileAndLog` is fine with that\n // because /api/profiles/<name>/activate is a global endpoint.\n const { conversationId } = useOptionalConversationId();\n const { data } = useLlmProfiles();\n const { data: conversation } = useActiveConversation();\n const { data: settings } = useSettings();\n const { switchAndLog, isPending } = useSwitchLlmProfileAndLog();\n // Optimistic value written by recordSwitch on a successful switch — gives\n // instant in-conversation feedback before the conversation refetch lands\n // with the new `llm_model`.\n const optimisticActiveProfile = useModelStore((s) =>\n conversationId ? s.activeProfileByConversation[conversationId] : undefined,\n );\n\n const profiles = data?.profiles ?? [];\n const conversationModel = conversation?.llm_model ?? null;\n // ACPAgent conversations route prompts to a CLI subprocess whose model is\n // controlled by ``acp_model`` (set in Settings → Agent), not by the LLM\n // profile picker. Surfacing the switcher here would let the user \"change\n // the model\" while the running subprocess silently keeps its own — a\n // confusing no-op. Hide the button even when ``llm_model`` carries an ACP\n // display model for chips/headers.\n //\n // On the home screen ``conversation`` is undefined; fall back to\n // ``settings.agent_settings.agent_kind`` so the picker also hides when\n // ACP is the *default* the next-created conversation would inherit.\n // Otherwise an ACP user lands on a home page with an LLM-switch\n // control that contradicts the ACP nav gating everywhere else.\n const isAcpActive =\n conversation?.agent_kind === \"acp\" ||\n (!conversation && settings?.agent_settings?.agent_kind === \"acp\");\n\n // Resolution priority for the active profile name:\n // 1. Optimistic (just-clicked) — instant feedback before the refetch.\n // 2. Profile whose model matches the running llm_model — cold loads.\n // 3. User-level active_profile — home page / before the conversation has\n // sent any messages.\n const activeProfileName =\n optimisticActiveProfile ??\n (conversationModel\n ? (profiles.find((p) => p.model === conversationModel)?.name ?? null)\n : (data?.active_profile ?? null));\n const activeProfileModel =\n profiles.find((p) => p.name === activeProfileName)?.model ??\n conversationModel ??\n null;\n\n if (profiles.length === 0 || isAcpActive) {\n return null;\n }\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n setContextMenuOpen((open) => !open);\n };\n\n const handleSelect = (profileName: string) => {\n if (profileName === activeProfileName) return;\n switchAndLog(conversationId, profileName);\n };\n\n return (\n <div className=\"relative\">\n <button\n type=\"button\"\n onClick={handleClick}\n disabled={isPending}\n data-testid=\"switch-profile-button\"\n title={activeProfileModel ?? undefined}\n aria-haspopup=\"menu\"\n aria-expanded={contextMenuOpen}\n className={cn(\n \"
|
|
1
|
+
{"version":3,"file":"switch-profile-button.js","names":[],"sources":["../../../../src/components/features/chat/switch-profile-button.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ComboboxCaretInline } from \"#/ui/combobox-caret\";\nimport { useLlmProfiles } from \"#/hooks/query/use-llm-profiles\";\nimport { useSwitchLlmProfileAndLog } from \"#/hooks/mutation/use-switch-llm-profile-and-log\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useModelStore } from \"#/stores/model-store\";\nimport { cn } from \"#/utils/utils\";\nimport { chatInputPillButtonClassName } from \"#/utils/form-control-classes\";\nimport { SwitchProfileContextMenu } from \"./switch-profile-context-menu\";\n\nexport function SwitchProfileButton() {\n const { t } = useTranslation(\"openhands\");\n const [contextMenuOpen, setContextMenuOpen] = React.useState(false);\n // Null on the home page; `useSwitchLlmProfileAndLog` is fine with that\n // because /api/profiles/<name>/activate is a global endpoint.\n const { conversationId } = useOptionalConversationId();\n const { data } = useLlmProfiles();\n const { data: conversation } = useActiveConversation();\n const { data: settings } = useSettings();\n const { switchAndLog, isPending } = useSwitchLlmProfileAndLog();\n // Optimistic value written by recordSwitch on a successful switch — gives\n // instant in-conversation feedback before the conversation refetch lands\n // with the new `llm_model`.\n const optimisticActiveProfile = useModelStore((s) =>\n conversationId ? s.activeProfileByConversation[conversationId] : undefined,\n );\n\n const profiles = data?.profiles ?? [];\n const conversationModel = conversation?.llm_model ?? null;\n // ACPAgent conversations route prompts to a CLI subprocess whose model is\n // controlled by ``acp_model`` (set in Settings → Agent), not by the LLM\n // profile picker. Surfacing the switcher here would let the user \"change\n // the model\" while the running subprocess silently keeps its own — a\n // confusing no-op. Hide the button even when ``llm_model`` carries an ACP\n // display model for chips/headers.\n //\n // On the home screen ``conversation`` is undefined; fall back to\n // ``settings.agent_settings.agent_kind`` so the picker also hides when\n // ACP is the *default* the next-created conversation would inherit.\n // Otherwise an ACP user lands on a home page with an LLM-switch\n // control that contradicts the ACP nav gating everywhere else.\n const isAcpActive =\n conversation?.agent_kind === \"acp\" ||\n (!conversation && settings?.agent_settings?.agent_kind === \"acp\");\n\n // Resolution priority for the active profile name:\n // 1. Optimistic (just-clicked) — instant feedback before the refetch.\n // 2. Profile whose model matches the running llm_model — cold loads.\n // 3. User-level active_profile — home page / before the conversation has\n // sent any messages.\n const activeProfileName =\n optimisticActiveProfile ??\n (conversationModel\n ? (profiles.find((p) => p.model === conversationModel)?.name ?? null)\n : (data?.active_profile ?? null));\n const activeProfileModel =\n profiles.find((p) => p.name === activeProfileName)?.model ??\n conversationModel ??\n null;\n\n if (profiles.length === 0 || isAcpActive) {\n return null;\n }\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n setContextMenuOpen((open) => !open);\n };\n\n const handleSelect = (profileName: string) => {\n if (profileName === activeProfileName) return;\n switchAndLog(conversationId, profileName);\n };\n\n return (\n <div className=\"relative\">\n <button\n type=\"button\"\n onClick={handleClick}\n disabled={isPending}\n data-testid=\"switch-profile-button\"\n title={activeProfileModel ?? undefined}\n aria-haspopup=\"menu\"\n aria-expanded={contextMenuOpen}\n className={cn(\n chatInputPillButtonClassName,\n \"max-w-[200px]\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n )}\n >\n <span className=\"truncate\">\n {activeProfileName ?? t(I18nKey.LLM$SELECT_MODEL_PLACEHOLDER)}\n </span>\n <ComboboxCaretInline isOpen={contextMenuOpen} />\n </button>\n {contextMenuOpen && (\n <SwitchProfileContextMenu\n profiles={profiles}\n activeProfileName={activeProfileName}\n onSelect={handleSelect}\n onClose={() => setContextMenuOpen(false)}\n />\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAcA,SAAgB,IAAsB;CACpC,IAAM,EAAE,SAAM,EAAe,YAAY,EACnC,CAAC,GAAiB,KAAsB,EAAM,SAAS,GAAM,EAG7D,EAAE,sBAAmB,GAA2B,EAChD,EAAE,YAAS,GAAgB,EAC3B,EAAE,MAAM,MAAiB,GAAuB,EAChD,EAAE,MAAM,MAAa,GAAa,EAClC,EAAE,iBAAc,iBAAc,GAA2B,EAIzD,IAA0B,GAAe,MAC7C,IAAiB,EAAE,4BAA4B,KAAkB,KAAA,EAClE,EAEK,IAAW,GAAM,YAAY,EAAE,EAC/B,IAAoB,GAAc,aAAa,MAa/C,IACJ,GAAc,eAAe,SAC5B,CAAC,KAAgB,GAAU,gBAAgB,eAAe,OAOvD,IACJ,MACC,IACI,EAAS,MAAM,MAAM,EAAE,UAAU,EAAkB,EAAE,QAAQ,OAC7D,GAAM,kBAAkB,OACzB,IACJ,EAAS,MAAM,MAAM,EAAE,SAAS,EAAkB,EAAE,SACpD,KACA;AAiBF,QAfI,EAAS,WAAW,KAAK,IACpB,OAeP,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,UAAD;GACE,MAAK;GACL,UAfe,MAA+C;AAGlE,IAFA,EAAM,gBAAgB,EACtB,EAAM,iBAAiB,EACvB,GAAoB,MAAS,CAAC,EAAK;;GAa/B,UAAU;GACV,eAAY;GACZ,OAAO,KAAsB,KAAA;GAC7B,iBAAc;GACd,iBAAe;GACf,WAAW,EACT,GACA,iBACA,kDACD;aAZH,CAcE,kBAAC,QAAD;IAAM,WAAU;cACb,KAAqB,EAAE,EAAQ,6BAA6B;IACxD,CAAA,EACP,kBAAC,GAAD,EAAqB,QAAQ,GAAmB,CAAA,CACzC;MACR,KACC,kBAAC,GAAD;GACY;GACS;GACnB,WA9Bc,MAAwB;AACxC,UAAgB,KACpB,EAAa,GAAgB,EAAY;;GA6BnC,eAAe,EAAmB,GAAM;GACxC,CAAA,CAEA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../../../i18n/declaration.cjs`),r=require(`../../../utils/utils.cjs`),i=require(`../../../icons/checkmark.cjs`),a=require(`../../../ui/typography.cjs`),o=require(`../../../ui/context-menu.cjs`),
|
|
1
|
+
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../../../i18n/declaration.cjs`),r=require(`../../../utils/utils.cjs`),i=require(`../../../icons/checkmark.cjs`),a=require(`../../../ui/typography.cjs`),o=require(`../../../utils/dropdown-classes.cjs`),s=require(`../../../ui/context-menu.cjs`),c=require(`../context-menu/context-menu-list-item.cjs`),l=require(`../../../hooks/use-click-outside-element.cjs`),u=require(`../../shared/navigation-link.cjs`),d=require(`../../../ui/divider.cjs`),f=require(`../../../icons/u-circuit.cjs`),p=require(`../../../icons/settings.cjs`);let m=require(`react`);m=e.__toESM(m,1);let h=require(`react/jsx-runtime`);var g=r.cn(r.cn(`w-full flex flex-col gap-0.5 p-2 rounded`,`text-start hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-nowrap`),`h-auto items-stretch`),_=r.cn(`group w-full flex items-center p-2 rounded`,o.dropdownMenuRowGapClassName,`text-start hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-nowrap`);function v({profiles:e,activeProfileName:v,onSelect:y,onClose:b}){let{t:x}=t.useTranslation(`openhands`),S=l.useClickOutsideElement(b);m.default.useEffect(()=>{let e=e=>{e.key===`Escape`&&b()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[b]);let C=(e,t)=>{e.preventDefault(),e.stopPropagation(),y(t),b()};return(0,h.jsxs)(s.ContextMenu,{ref:S,testId:`switch-profile-context-menu`,position:`top`,alignment:`left`,className:`z-[60] left-0 mb-2 bottom-full min-w-[280px] pt-0`,children:[(0,h.jsx)(`div`,{className:`px-2 pb-0.5`,children:(0,h.jsx)(a.Typography.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4`,children:x(n.I18nKey.SETTINGS$AVAILABLE_PROFILES)})}),(0,h.jsx)(`div`,{"data-testid":`switch-profile-options-list`,className:o.switchProfileMenuListScrollClassName,children:e.map(e=>{let t=e.name===v;return(0,h.jsxs)(c.ContextMenuListItem,{testId:`switch-profile-option-${e.name}`,onClick:t=>C(t,e.name),className:r.cn(g,t&&`bg-[var(--oh-interactive-hover)]`),children:[(0,h.jsxs)(`span`,{className:r.cn(`flex items-center min-w-0`,o.dropdownMenuRowGapClassName),title:e.model??void 0,children:[(0,h.jsx)(`span`,{className:o.dropdownMenuRowIconWrapperClassName,"aria-hidden":!0,children:(0,h.jsx)(f.default,{width:16,height:16})}),(0,h.jsx)(`span`,{className:`flex-1 truncate text-sm leading-5`,children:e.name}),t&&(0,h.jsx)(i.default,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]}),e.model&&(0,h.jsx)(`span`,{className:`block truncate text-xs leading-4 text-[var(--oh-muted)] pl-6`,children:e.model})]},e.name)})}),(0,h.jsx)(d.Divider,{}),(0,h.jsxs)(u.NavigationLink,{to:`/settings`,onClick:b,"data-testid":`switch-profile-open-settings`,className:_,children:[(0,h.jsx)(`span`,{className:o.dropdownMenuRowIconWrapperClassName,"aria-hidden":!0,children:(0,h.jsx)(p.default,{width:16,height:16})}),(0,h.jsx)(`span`,{className:`text-sm leading-5`,children:x(n.I18nKey.MODEL$OPEN_SETTINGS)})]})]})}exports.SwitchProfileContextMenu=v;
|
|
2
2
|
//# sourceMappingURL=switch-profile-context-menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-profile-context-menu.cjs","names":[],"sources":["../../../../src/components/features/chat/switch-profile-context-menu.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { Divider } from \"#/ui/divider\";\nimport { Typography } from \"#/ui/typography\";\nimport { NavigationLink } from \"#/components/shared/navigation-link\";\nimport { ContextMenuListItem } from \"../context-menu/context-menu-list-item\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport CircuitIcon from \"#/icons/u-circuit.svg?react\";\nimport SettingsIcon from \"#/icons/settings.svg?react\";\nimport CheckIcon from \"#/icons/checkmark.svg?react\";\nimport { cn } from \"#/utils/utils\";\nimport type { ProfileInfo } from \"#/api/profiles-service/profiles-service.api\";\n\nconst rowBaseClassName = cn(\n \"w-full flex flex-col gap-0.5 p-2 rounded\",\n \"text-start hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-nowrap\",\n);\nconst profileRowClassName = cn(rowBaseClassName, \"h-auto\");\nconst linkRowClassName = cn(\n \"w-full flex items-center
|
|
1
|
+
{"version":3,"file":"switch-profile-context-menu.cjs","names":[],"sources":["../../../../src/components/features/chat/switch-profile-context-menu.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { Divider } from \"#/ui/divider\";\nimport { Typography } from \"#/ui/typography\";\nimport { NavigationLink } from \"#/components/shared/navigation-link\";\nimport { ContextMenuListItem } from \"../context-menu/context-menu-list-item\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport CircuitIcon from \"#/icons/u-circuit.svg?react\";\nimport SettingsIcon from \"#/icons/settings.svg?react\";\nimport CheckIcon from \"#/icons/checkmark.svg?react\";\nimport { cn } from \"#/utils/utils\";\nimport type { ProfileInfo } from \"#/api/profiles-service/profiles-service.api\";\nimport {\n dropdownMenuRowGapClassName,\n dropdownMenuRowIconWrapperClassName,\n switchProfileMenuListScrollClassName,\n} from \"#/utils/dropdown-classes\";\n\nconst rowBaseClassName = cn(\n \"w-full flex flex-col gap-0.5 p-2 rounded\",\n \"text-start hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-nowrap\",\n);\nconst profileRowClassName = cn(rowBaseClassName, \"h-auto items-stretch\");\nconst linkRowClassName = cn(\n \"group w-full flex items-center p-2 rounded\",\n dropdownMenuRowGapClassName,\n \"text-start hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-nowrap\",\n);\n\ninterface SwitchProfileContextMenuProps {\n profiles: ProfileInfo[];\n activeProfileName: string | null;\n onSelect: (profileName: string) => void;\n onClose: () => void;\n}\n\nexport function SwitchProfileContextMenu({\n profiles,\n activeProfileName,\n onSelect,\n onClose,\n}: SwitchProfileContextMenuProps) {\n const { t } = useTranslation(\"openhands\");\n const ref = useClickOutsideElement<HTMLUListElement>(onClose);\n\n React.useEffect(() => {\n const onKey = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") onClose();\n };\n document.addEventListener(\"keydown\", onKey);\n return () => document.removeEventListener(\"keydown\", onKey);\n }, [onClose]);\n\n const handleSelect = (\n event: React.MouseEvent<HTMLButtonElement>,\n name: string,\n ) => {\n event.preventDefault();\n event.stopPropagation();\n onSelect(name);\n onClose();\n };\n\n return (\n <ContextMenu\n ref={ref}\n testId=\"switch-profile-context-menu\"\n position=\"top\"\n alignment=\"left\"\n className=\"z-[60] left-0 mb-2 bottom-full min-w-[280px] pt-0\"\n >\n <div className=\"px-2 pb-0.5\">\n <Typography.Text className=\"text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4\">\n {t(I18nKey.SETTINGS$AVAILABLE_PROFILES)}\n </Typography.Text>\n </div>\n <div\n data-testid=\"switch-profile-options-list\"\n className={switchProfileMenuListScrollClassName}\n >\n {profiles.map((profile) => {\n const isActive = profile.name === activeProfileName;\n return (\n <ContextMenuListItem\n key={profile.name}\n testId={`switch-profile-option-${profile.name}`}\n onClick={(event) => handleSelect(event, profile.name)}\n className={cn(\n profileRowClassName,\n isActive && \"bg-[var(--oh-interactive-hover)]\",\n )}\n >\n <span\n className={cn(\n \"flex items-center min-w-0\",\n dropdownMenuRowGapClassName,\n )}\n title={profile.model ?? undefined}\n >\n <span\n className={dropdownMenuRowIconWrapperClassName}\n aria-hidden\n >\n <CircuitIcon width={16} height={16} />\n </span>\n <span className=\"flex-1 truncate text-sm leading-5\">\n {profile.name}\n </span>\n {isActive && (\n <CheckIcon\n width={14}\n height={14}\n className=\"shrink-0\"\n aria-hidden\n />\n )}\n </span>\n {profile.model && (\n <span className=\"block truncate text-xs leading-4 text-[var(--oh-muted)] pl-6\">\n {profile.model}\n </span>\n )}\n </ContextMenuListItem>\n );\n })}\n </div>\n <Divider />\n <NavigationLink\n to=\"/settings\"\n onClick={onClose}\n data-testid=\"switch-profile-open-settings\"\n className={linkRowClassName}\n >\n <span className={dropdownMenuRowIconWrapperClassName} aria-hidden>\n <SettingsIcon width={16} height={16} />\n </span>\n <span className=\"text-sm leading-5\">\n {t(I18nKey.MODEL$OPEN_SETTINGS)}\n </span>\n </NavigationLink>\n </ContextMenu>\n );\n}\n"],"mappings":"wuBAwBA,IAAM,EAAsB,EAAA,GAJH,EAAA,GACvB,2CACA,+EAE6B,CAAkB,uBAAuB,CAClE,EAAmB,EAAA,GACvB,6CACA,EAAA,4BACA,+EACD,CASD,SAAgB,EAAyB,CACvC,WACA,oBACA,WACA,WACgC,CAChC,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CACnC,EAAM,EAAA,uBAAyC,EAAQ,CAE7D,EAAA,QAAM,cAAgB,CACpB,IAAM,EAAS,GAAqB,CAC9B,EAAE,MAAQ,UAAU,GAAS,EAGnC,OADA,SAAS,iBAAiB,UAAW,EAAM,KAC9B,SAAS,oBAAoB,UAAW,EAAM,EAC1D,CAAC,EAAQ,CAAC,CAEb,IAAM,GACJ,EACA,IACG,CACH,EAAM,gBAAgB,CACtB,EAAM,iBAAiB,CACvB,EAAS,EAAK,CACd,GAAS,EAGX,OACE,EAAA,EAAA,MAAC,EAAA,YAAD,CACO,MACL,OAAO,8BACP,SAAS,MACT,UAAU,OACV,UAAU,6DALZ,EAOE,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,wBACb,EAAA,EAAA,KAAC,EAAA,WAAW,KAAZ,CAAiB,UAAU,+FACxB,EAAE,EAAA,QAAQ,4BAA4B,CACvB,CAAA,CACd,CAAA,EACN,EAAA,EAAA,KAAC,MAAD,CACE,cAAY,8BACZ,UAAW,EAAA,8CAEV,EAAS,IAAK,GAAY,CACzB,IAAM,EAAW,EAAQ,OAAS,EAClC,OACE,EAAA,EAAA,MAAC,EAAA,oBAAD,CAEE,OAAQ,yBAAyB,EAAQ,OACzC,QAAU,GAAU,EAAa,EAAO,EAAQ,KAAK,CACrD,UAAW,EAAA,GACT,EACA,GAAY,mCACb,UAPH,EASE,EAAA,EAAA,MAAC,OAAD,CACE,UAAW,EAAA,GACT,4BACA,EAAA,4BACD,CACD,MAAO,EAAQ,OAAS,IAAA,YAL1B,EAOE,EAAA,EAAA,KAAC,OAAD,CACE,UAAW,EAAA,oCACX,cAAA,aAEA,EAAA,EAAA,KAAC,EAAA,QAAD,CAAa,MAAO,GAAI,OAAQ,GAAM,CAAA,CACjC,CAAA,EACP,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,6CACb,EAAQ,KACJ,CAAA,CACN,IACC,EAAA,EAAA,KAAC,EAAA,QAAD,CACE,MAAO,GACP,OAAQ,GACR,UAAU,WACV,cAAA,GACA,CAAA,CAEC,GACN,EAAQ,QACP,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,wEACb,EAAQ,MACJ,CAAA,CAEW,EAtCf,EAAQ,KAsCO,EAExB,CACE,CAAA,EACN,EAAA,EAAA,KAAC,EAAA,QAAD,EAAW,CAAA,EACX,EAAA,EAAA,MAAC,EAAA,eAAD,CACE,GAAG,YACH,QAAS,EACT,cAAY,+BACZ,UAAW,WAJb,EAME,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,oCAAqC,cAAA,aACpD,EAAA,EAAA,KAAC,EAAA,QAAD,CAAc,MAAO,GAAI,OAAQ,GAAM,CAAA,CAClC,CAAA,EACP,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,6BACb,EAAE,EAAA,QAAQ,oBAAoB,CAC1B,CAAA,CACQ,GACL"}
|
|
@@ -3,94 +3,104 @@ import { I18nKey as t } from "../../../i18n/declaration.js";
|
|
|
3
3
|
import { cn as n } from "../../../utils/utils.js";
|
|
4
4
|
import r from "../../../icons/checkmark.js";
|
|
5
5
|
import { Typography as i } from "../../../ui/typography.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
6
|
+
import { dropdownMenuRowGapClassName as a, dropdownMenuRowIconWrapperClassName as o, switchProfileMenuListScrollClassName as s } from "../../../utils/dropdown-classes.js";
|
|
7
|
+
import { ContextMenu as c } from "../../../ui/context-menu.js";
|
|
8
|
+
import { ContextMenuListItem as l } from "../context-menu/context-menu-list-item.js";
|
|
9
|
+
import { useClickOutsideElement as u } from "../../../hooks/use-click-outside-element.js";
|
|
10
|
+
import { NavigationLink as d } from "../../shared/navigation-link.js";
|
|
11
|
+
import { Divider as f } from "../../../ui/divider.js";
|
|
12
|
+
import p from "../../../icons/u-circuit.js";
|
|
13
|
+
import m from "../../../icons/settings.js";
|
|
14
|
+
import h from "react";
|
|
15
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
15
16
|
//#region src/components/features/chat/switch-profile-context-menu.tsx
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
let { t:
|
|
19
|
-
|
|
17
|
+
var v = n(n("w-full flex flex-col gap-0.5 p-2 rounded", "text-start hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-nowrap"), "h-auto items-stretch"), y = n("group w-full flex items-center p-2 rounded", a, "text-start hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-nowrap");
|
|
18
|
+
function b({ profiles: b, activeProfileName: x, onSelect: S, onClose: C }) {
|
|
19
|
+
let { t: w } = e("openhands"), T = u(C);
|
|
20
|
+
h.useEffect(() => {
|
|
20
21
|
let e = (e) => {
|
|
21
|
-
e.key === "Escape" &&
|
|
22
|
+
e.key === "Escape" && C();
|
|
22
23
|
};
|
|
23
24
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
24
|
-
}, [
|
|
25
|
-
let
|
|
26
|
-
e.preventDefault(), e.stopPropagation(),
|
|
25
|
+
}, [C]);
|
|
26
|
+
let E = (e, t) => {
|
|
27
|
+
e.preventDefault(), e.stopPropagation(), S(t), C();
|
|
27
28
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
ref:
|
|
29
|
+
return /* @__PURE__ */ _(c, {
|
|
30
|
+
ref: T,
|
|
30
31
|
testId: "switch-profile-context-menu",
|
|
31
32
|
position: "top",
|
|
32
33
|
alignment: "left",
|
|
33
|
-
className: "z-[60] left-0 mb-2 bottom-full min-w-[280px]
|
|
34
|
+
className: "z-[60] left-0 mb-2 bottom-full min-w-[280px] pt-0",
|
|
34
35
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
className: "px-2
|
|
37
|
-
children: /* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ g("div", {
|
|
37
|
+
className: "px-2 pb-0.5",
|
|
38
|
+
children: /* @__PURE__ */ g(i.Text, {
|
|
38
39
|
className: "text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4",
|
|
39
|
-
children:
|
|
40
|
+
children: w(t.SETTINGS$AVAILABLE_PROFILES)
|
|
40
41
|
})
|
|
41
42
|
}),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
children: [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
43
|
+
/* @__PURE__ */ g("div", {
|
|
44
|
+
"data-testid": "switch-profile-options-list",
|
|
45
|
+
className: s,
|
|
46
|
+
children: b.map((e) => {
|
|
47
|
+
let t = e.name === x;
|
|
48
|
+
return /* @__PURE__ */ _(l, {
|
|
49
|
+
testId: `switch-profile-option-${e.name}`,
|
|
50
|
+
onClick: (t) => E(t, e.name),
|
|
51
|
+
className: n(v, t && "bg-[var(--oh-interactive-hover)]"),
|
|
52
|
+
children: [/* @__PURE__ */ _("span", {
|
|
53
|
+
className: n("flex items-center min-w-0", a),
|
|
54
|
+
title: e.model ?? void 0,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ g("span", {
|
|
57
|
+
className: o,
|
|
58
|
+
"aria-hidden": !0,
|
|
59
|
+
children: /* @__PURE__ */ g(p, {
|
|
60
|
+
width: 16,
|
|
61
|
+
height: 16
|
|
62
|
+
})
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ g("span", {
|
|
65
|
+
className: "flex-1 truncate text-sm leading-5",
|
|
66
|
+
children: e.name
|
|
67
|
+
}),
|
|
68
|
+
t && /* @__PURE__ */ g(r, {
|
|
69
|
+
width: 14,
|
|
70
|
+
height: 14,
|
|
71
|
+
className: "shrink-0",
|
|
72
|
+
"aria-hidden": !0
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
}), e.model && /* @__PURE__ */ g("span", {
|
|
76
|
+
className: "block truncate text-xs leading-4 text-[var(--oh-muted)] pl-6",
|
|
77
|
+
children: e.model
|
|
78
|
+
})]
|
|
79
|
+
}, e.name);
|
|
80
|
+
})
|
|
74
81
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ g(f, {}),
|
|
83
|
+
/* @__PURE__ */ _(d, {
|
|
77
84
|
to: "/settings",
|
|
78
|
-
onClick:
|
|
85
|
+
onClick: C,
|
|
79
86
|
"data-testid": "switch-profile-open-settings",
|
|
80
|
-
className:
|
|
81
|
-
children: [/* @__PURE__ */
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
className: y,
|
|
88
|
+
children: [/* @__PURE__ */ g("span", {
|
|
89
|
+
className: o,
|
|
90
|
+
"aria-hidden": !0,
|
|
91
|
+
children: /* @__PURE__ */ g(m, {
|
|
92
|
+
width: 16,
|
|
93
|
+
height: 16
|
|
94
|
+
})
|
|
95
|
+
}), /* @__PURE__ */ g("span", {
|
|
86
96
|
className: "text-sm leading-5",
|
|
87
|
-
children:
|
|
97
|
+
children: w(t.MODEL$OPEN_SETTINGS)
|
|
88
98
|
})]
|
|
89
99
|
})
|
|
90
100
|
]
|
|
91
101
|
});
|
|
92
102
|
}
|
|
93
103
|
//#endregion
|
|
94
|
-
export {
|
|
104
|
+
export { b as SwitchProfileContextMenu };
|
|
95
105
|
|
|
96
106
|
//# sourceMappingURL=switch-profile-context-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-profile-context-menu.js","names":[],"sources":["../../../../src/components/features/chat/switch-profile-context-menu.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { Divider } from \"#/ui/divider\";\nimport { Typography } from \"#/ui/typography\";\nimport { NavigationLink } from \"#/components/shared/navigation-link\";\nimport { ContextMenuListItem } from \"../context-menu/context-menu-list-item\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport CircuitIcon from \"#/icons/u-circuit.svg?react\";\nimport SettingsIcon from \"#/icons/settings.svg?react\";\nimport CheckIcon from \"#/icons/checkmark.svg?react\";\nimport { cn } from \"#/utils/utils\";\nimport type { ProfileInfo } from \"#/api/profiles-service/profiles-service.api\";\n\nconst rowBaseClassName = cn(\n \"w-full flex flex-col gap-0.5 p-2 rounded\",\n \"text-start hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-nowrap\",\n);\nconst profileRowClassName = cn(rowBaseClassName, \"h-auto\");\nconst linkRowClassName = cn(\n \"w-full flex items-center
|
|
1
|
+
{"version":3,"file":"switch-profile-context-menu.js","names":[],"sources":["../../../../src/components/features/chat/switch-profile-context-menu.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { Divider } from \"#/ui/divider\";\nimport { Typography } from \"#/ui/typography\";\nimport { NavigationLink } from \"#/components/shared/navigation-link\";\nimport { ContextMenuListItem } from \"../context-menu/context-menu-list-item\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport CircuitIcon from \"#/icons/u-circuit.svg?react\";\nimport SettingsIcon from \"#/icons/settings.svg?react\";\nimport CheckIcon from \"#/icons/checkmark.svg?react\";\nimport { cn } from \"#/utils/utils\";\nimport type { ProfileInfo } from \"#/api/profiles-service/profiles-service.api\";\nimport {\n dropdownMenuRowGapClassName,\n dropdownMenuRowIconWrapperClassName,\n switchProfileMenuListScrollClassName,\n} from \"#/utils/dropdown-classes\";\n\nconst rowBaseClassName = cn(\n \"w-full flex flex-col gap-0.5 p-2 rounded\",\n \"text-start hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-nowrap\",\n);\nconst profileRowClassName = cn(rowBaseClassName, \"h-auto items-stretch\");\nconst linkRowClassName = cn(\n \"group w-full flex items-center p-2 rounded\",\n dropdownMenuRowGapClassName,\n \"text-start hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-nowrap\",\n);\n\ninterface SwitchProfileContextMenuProps {\n profiles: ProfileInfo[];\n activeProfileName: string | null;\n onSelect: (profileName: string) => void;\n onClose: () => void;\n}\n\nexport function SwitchProfileContextMenu({\n profiles,\n activeProfileName,\n onSelect,\n onClose,\n}: SwitchProfileContextMenuProps) {\n const { t } = useTranslation(\"openhands\");\n const ref = useClickOutsideElement<HTMLUListElement>(onClose);\n\n React.useEffect(() => {\n const onKey = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") onClose();\n };\n document.addEventListener(\"keydown\", onKey);\n return () => document.removeEventListener(\"keydown\", onKey);\n }, [onClose]);\n\n const handleSelect = (\n event: React.MouseEvent<HTMLButtonElement>,\n name: string,\n ) => {\n event.preventDefault();\n event.stopPropagation();\n onSelect(name);\n onClose();\n };\n\n return (\n <ContextMenu\n ref={ref}\n testId=\"switch-profile-context-menu\"\n position=\"top\"\n alignment=\"left\"\n className=\"z-[60] left-0 mb-2 bottom-full min-w-[280px] pt-0\"\n >\n <div className=\"px-2 pb-0.5\">\n <Typography.Text className=\"text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4\">\n {t(I18nKey.SETTINGS$AVAILABLE_PROFILES)}\n </Typography.Text>\n </div>\n <div\n data-testid=\"switch-profile-options-list\"\n className={switchProfileMenuListScrollClassName}\n >\n {profiles.map((profile) => {\n const isActive = profile.name === activeProfileName;\n return (\n <ContextMenuListItem\n key={profile.name}\n testId={`switch-profile-option-${profile.name}`}\n onClick={(event) => handleSelect(event, profile.name)}\n className={cn(\n profileRowClassName,\n isActive && \"bg-[var(--oh-interactive-hover)]\",\n )}\n >\n <span\n className={cn(\n \"flex items-center min-w-0\",\n dropdownMenuRowGapClassName,\n )}\n title={profile.model ?? undefined}\n >\n <span\n className={dropdownMenuRowIconWrapperClassName}\n aria-hidden\n >\n <CircuitIcon width={16} height={16} />\n </span>\n <span className=\"flex-1 truncate text-sm leading-5\">\n {profile.name}\n </span>\n {isActive && (\n <CheckIcon\n width={14}\n height={14}\n className=\"shrink-0\"\n aria-hidden\n />\n )}\n </span>\n {profile.model && (\n <span className=\"block truncate text-xs leading-4 text-[var(--oh-muted)] pl-6\">\n {profile.model}\n </span>\n )}\n </ContextMenuListItem>\n );\n })}\n </div>\n <Divider />\n <NavigationLink\n to=\"/settings\"\n onClick={onClose}\n data-testid=\"switch-profile-open-settings\"\n className={linkRowClassName}\n >\n <span className={dropdownMenuRowIconWrapperClassName} aria-hidden>\n <SettingsIcon width={16} height={16} />\n </span>\n <span className=\"text-sm leading-5\">\n {t(I18nKey.MODEL$OPEN_SETTINGS)}\n </span>\n </NavigationLink>\n </ContextMenu>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,IAAM,IAAsB,EAJH,EACvB,4CACA,+EAE6B,EAAkB,uBAAuB,EAClE,IAAmB,EACvB,8CACA,GACA,+EACD;AASD,SAAgB,EAAyB,EACvC,aACA,sBACA,aACA,cACgC;CAChC,IAAM,EAAE,SAAM,EAAe,YAAY,EACnC,IAAM,EAAyC,EAAQ;AAE7D,GAAM,gBAAgB;EACpB,IAAM,KAAS,MAAqB;AAClC,GAAI,EAAE,QAAQ,YAAU,GAAS;;AAGnC,SADA,SAAS,iBAAiB,WAAW,EAAM,QAC9B,SAAS,oBAAoB,WAAW,EAAM;IAC1D,CAAC,EAAQ,CAAC;CAEb,IAAM,KACJ,GACA,MACG;AAIH,EAHA,EAAM,gBAAgB,EACtB,EAAM,iBAAiB,EACvB,EAAS,EAAK,EACd,GAAS;;AAGX,QACE,kBAAC,GAAD;EACO;EACL,QAAO;EACP,UAAS;EACT,WAAU;EACV,WAAU;YALZ;GAOE,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,EAAW,MAAZ;KAAiB,WAAU;eACxB,EAAE,EAAQ,4BAA4B;KACvB,CAAA;IACd,CAAA;GACN,kBAAC,OAAD;IACE,eAAY;IACZ,WAAW;cAEV,EAAS,KAAK,MAAY;KACzB,IAAM,IAAW,EAAQ,SAAS;AAClC,YACE,kBAAC,GAAD;MAEE,QAAQ,yBAAyB,EAAQ;MACzC,UAAU,MAAU,EAAa,GAAO,EAAQ,KAAK;MACrD,WAAW,EACT,GACA,KAAY,mCACb;gBAPH,CASE,kBAAC,QAAD;OACE,WAAW,EACT,6BACA,EACD;OACD,OAAO,EAAQ,SAAS,KAAA;iBAL1B;QAOE,kBAAC,QAAD;SACE,WAAW;SACX,eAAA;mBAEA,kBAAC,GAAD;UAAa,OAAO;UAAI,QAAQ;UAAM,CAAA;SACjC,CAAA;QACP,kBAAC,QAAD;SAAM,WAAU;mBACb,EAAQ;SACJ,CAAA;QACN,KACC,kBAAC,GAAD;SACE,OAAO;SACP,QAAQ;SACR,WAAU;SACV,eAAA;SACA,CAAA;QAEC;UACN,EAAQ,SACP,kBAAC,QAAD;OAAM,WAAU;iBACb,EAAQ;OACJ,CAAA,CAEW;QAtCf,EAAQ,KAsCO;MAExB;IACE,CAAA;GACN,kBAAC,GAAD,EAAW,CAAA;GACX,kBAAC,GAAD;IACE,IAAG;IACH,SAAS;IACT,eAAY;IACZ,WAAW;cAJb,CAME,kBAAC,QAAD;KAAM,WAAW;KAAqC,eAAA;eACpD,kBAAC,GAAD;MAAc,OAAO;MAAI,QAAQ;MAAM,CAAA;KAClC,CAAA,EACP,kBAAC,QAAD;KAAM,WAAU;eACb,EAAE,EAAQ,oBAAoB;KAC1B,CAAA,CACQ;;GACL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../utils/utils.cjs`),n=require(`../../../ui/typography.cjs`),r=require(`./context-menu-icon-text.cjs`);let i=require(`react`);i=e.__toESM(i,1);let a=require(`react/jsx-runtime`);function o({icon:e,title:i,description:o,className:s,iconClassName:c}){return(0,a.jsxs)(`div`,{className:t.cn(`flex min-w-0 w-full flex-col justify-center gap-1`,s),children:[(0,a.jsx)(r.ContextMenuIconText,{icon:e,text:i,className:`px-0`,iconClassName:c}),(0,a.jsx)(n.Typography.Text,{className:`text-[var(--oh-muted)] text-[10px] font-normal whitespace-pre-wrap break-words`,children:o})]})}exports.ContextMenuIconTextWithDescription=o;
|
|
1
|
+
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../utils/utils.cjs`),n=require(`../../../ui/typography.cjs`),r=require(`./context-menu-icon-text.cjs`);let i=require(`react`);i=e.__toESM(i,1);let a=require(`react/jsx-runtime`);function o({icon:e,title:i,description:o,className:s,iconClassName:c,isActive:l=!1}){return(0,a.jsxs)(`div`,{className:t.cn(`flex min-w-0 w-full flex-col justify-center gap-1`,s),children:[(0,a.jsx)(r.ContextMenuIconText,{icon:e,text:i,className:`px-0`,iconClassName:c,isActive:l}),(0,a.jsx)(n.Typography.Text,{className:`text-[var(--oh-muted)] text-[10px] font-normal whitespace-pre-wrap break-words`,children:o})]})}exports.ContextMenuIconTextWithDescription=o;
|
|
2
2
|
//# sourceMappingURL=context-menu-icon-text-with-description.cjs.map
|
package/dist/components/features/context-menu/context-menu-icon-text-with-description.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu-icon-text-with-description.cjs","names":[],"sources":["../../../../src/components/features/context-menu/context-menu-icon-text-with-description.tsx"],"sourcesContent":["import React from \"react\";\nimport { ContextMenuIconText } from \"./context-menu-icon-text\";\nimport { Typography } from \"#/ui/typography\";\nimport { cn } from \"#/utils/utils\";\n\ninterface ContextMenuIconTextWithDescriptionProps {\n icon: React.ComponentType<{ className?: string }>;\n title: string;\n description: string;\n className?: string;\n iconClassName?: string;\n}\n\nexport function ContextMenuIconTextWithDescription({\n icon,\n title,\n description,\n className,\n iconClassName,\n}: ContextMenuIconTextWithDescriptionProps) {\n return (\n <div\n className={cn(\n \"flex min-w-0 w-full flex-col justify-center gap-1\",\n className,\n )}\n >\n <ContextMenuIconText\n icon={icon}\n text={title}\n className=\"px-0\"\n iconClassName={iconClassName}\n />\n <Typography.Text className=\"text-[var(--oh-muted)] text-[10px] font-normal whitespace-pre-wrap break-words\">\n {description}\n </Typography.Text>\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context-menu-icon-text-with-description.cjs","names":[],"sources":["../../../../src/components/features/context-menu/context-menu-icon-text-with-description.tsx"],"sourcesContent":["import React from \"react\";\nimport { ContextMenuIconText } from \"./context-menu-icon-text\";\nimport { Typography } from \"#/ui/typography\";\nimport { cn } from \"#/utils/utils\";\n\ninterface ContextMenuIconTextWithDescriptionProps {\n icon: React.ComponentType<{ className?: string }>;\n title: string;\n description: string;\n className?: string;\n iconClassName?: string;\n isActive?: boolean;\n}\n\nexport function ContextMenuIconTextWithDescription({\n icon,\n title,\n description,\n className,\n iconClassName,\n isActive = false,\n}: ContextMenuIconTextWithDescriptionProps) {\n return (\n <div\n className={cn(\n \"flex min-w-0 w-full flex-col justify-center gap-1\",\n className,\n )}\n >\n <ContextMenuIconText\n icon={icon}\n text={title}\n className=\"px-0\"\n iconClassName={iconClassName}\n isActive={isActive}\n />\n <Typography.Text className=\"text-[var(--oh-muted)] text-[10px] font-normal whitespace-pre-wrap break-words\">\n {description}\n </Typography.Text>\n </div>\n );\n}\n"],"mappings":"8PAcA,SAAgB,EAAmC,CACjD,OACA,QACA,cACA,YACA,gBACA,WAAW,IAC+B,CAC1C,OACE,EAAA,EAAA,MAAC,MAAD,CACE,UAAW,EAAA,GACT,oDACA,EACD,UAJH,EAME,EAAA,EAAA,KAAC,EAAA,oBAAD,CACQ,OACN,KAAM,EACN,UAAU,OACK,gBACL,WACV,CAAA,EACF,EAAA,EAAA,KAAC,EAAA,WAAW,KAAZ,CAAiB,UAAU,0FACxB,EACe,CAAA,CACd"}
|