@openhands/agent-canvas 1.16.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{acp-providers-CX3Lh9gj.js → acp-providers-DcY_mKYa.js} +1 -1
- package/build/assets/active-backend-context-BnH4-L8h.js +2 -0
- package/build/assets/{agent-context-settings-DSZlXrLj.js → agent-context-settings-D3peZkjX.js} +1 -1
- package/build/assets/agent-profiles-service.api-DkeZaqIl.js +1 -0
- package/build/assets/agent-profiles-settings-7yMWYjGF.js +1 -0
- package/build/assets/agent-server-client-options-EHB23gyx.js +1 -0
- package/build/assets/agent-server-config-C_x8Otd9.js +1 -0
- package/build/assets/agent-server-conversation-service.api-jiCopc2E.js +88 -0
- package/build/assets/agent-settings-BF8hM6wb.js +2 -0
- package/build/assets/agent-settings-YPutBAeR.js +1 -0
- package/build/assets/alert-banner-eYyqvHL3.js +1 -0
- package/build/assets/{api-error-message-B-XdSk3b.js → api-error-message-BXo0lCI5.js} +1 -1
- package/build/assets/api-key-entry-screen-CCBvBD8u.js +1 -0
- package/build/assets/app-settings-BtYDs-Be.js +1 -0
- package/build/assets/automation-detail-BxXhb_m2.js +3 -0
- package/build/assets/{automation-export-D3a3of4G.js → automation-export-BJsfi7n2.js} +1 -1
- package/build/assets/automation-git-sync-B7o_Nbl-.js +1 -0
- package/build/assets/automation-setup-route-qaJ6lLCf.js +3 -0
- package/build/assets/{automation-templates-BRppNh99.js → automation-templates-Bb98r-kx.js} +1 -1
- package/build/assets/automations-list-DEPVNud3.js +1 -0
- package/build/assets/{back-nav-button-Cjl_hoxq.js → back-nav-button-B2yBiVMB.js} +1 -1
- package/build/assets/backend-form-modal-DxisQV_6.js +1 -0
- package/build/assets/backend-synced-settings-badge-DLEp6cq7.js +1 -0
- package/build/assets/badge-ehL-kgeO.js +1 -0
- package/build/assets/{base-modal-D_L0oEbG.js → base-modal-C1a0TsSx.js} +1 -1
- package/build/assets/bot-ByolqPEr.js +1 -0
- package/build/assets/{brand-button-BAfk4wGP.js → brand-button-CUMfjb99.js} +1 -1
- package/build/assets/browser-SE24Tk8g.js +46 -0
- package/build/assets/browser-tab-HjJxHA0V.js +1 -0
- package/build/assets/canvas-extension-page-BsUGBb1T.js +1 -0
- package/build/assets/canvas-extensions-C9Tm6s_E.js +1 -0
- package/build/assets/{canvas-extensions-runtime-2_x5Ezmi.js → canvas-extensions-runtime-B8kxM4rO.js} +1 -1
- package/build/assets/{chat-send-button-MUQqCZCS.js → chat-send-button-CGvc2wpE.js} +1 -1
- package/build/assets/check-Bo8s5Ylg.js +1 -0
- package/build/assets/chevron-down-Cr6Fn_wS.js +1 -0
- package/build/assets/chevron-right-CfdfRn-8.js +1 -0
- package/build/assets/circle-check-5pH3qCji.js +1 -0
- package/build/assets/circle-plus-check-toggle-BDX_ctNs.js +1 -0
- package/build/assets/{cloud-funnel-analytics-CztBCCPp.js → cloud-funnel-analytics-D5uJ_4JE.js} +1 -1
- package/build/assets/{cog-D-MPQW6G.js → cog-CAEugqtV.js} +1 -1
- package/build/assets/command-menu-CQxs4mtX.js +1 -0
- package/build/assets/commits-tab-D0xgjipP.js +1 -0
- package/build/assets/{condenser-settings-DmEOje-7.js → condenser-settings-D63NJRBT.js} +1 -1
- package/build/assets/confirmation-modal-78sd9Vny.js +1 -0
- package/build/assets/{context-menu-list-item-I86vKcmM.js → context-menu-list-item-Cm7-7Y-7.js} +1 -1
- package/build/assets/conversation-B_nweu5p.js +93 -0
- package/build/assets/conversation-edjzrv5w.js +1 -0
- package/build/assets/conversation-panel-edjzrv5w.js +1 -0
- package/build/assets/conversation-state-store-9D_3P7q4.js +1 -0
- package/build/assets/conversation-store-DC-JlJuq.js +6 -0
- package/build/assets/{conversation-tab-empty-state-FIbh_lc8.js → conversation-tab-empty-state-B3dpJXX0.js} +1 -1
- package/build/assets/copy-to-clipboard-button-B1ljgNxO.js +1 -0
- package/build/assets/device-verify-D5QRIS_x.js +1 -0
- package/build/assets/{dropdown-classes-Bc1djN0-.js → dropdown-classes-BGvOvW2_.js} +1 -1
- package/build/assets/edit-automation-modal-D_JWSmxT.js +1 -0
- package/build/assets/empty-state-FK_s1B60.js +1 -0
- package/build/assets/{entry.client-CqyPPjOq.js → entry.client-BMafTpjO.js} +2 -2
- package/build/assets/enum-filter-dropdown-UNaom12H.js +1 -0
- package/build/assets/environment-switch-overlay-COibRUA-.js +1 -0
- package/build/assets/error-state-Cf8LRuuY.js +1 -0
- package/build/assets/extensions-hub-C_6ahIua.js +1 -0
- package/build/assets/extensions-navigation-C5GfpzFe.js +1 -0
- package/build/assets/external-link-Bd7Tga-1.js +1 -0
- package/build/assets/files-tab-D5PPIWI1.js +1 -0
- package/build/assets/{form-control-classes-Bkh5FGrD.js → form-control-classes-Dbq-7YP_.js} +1 -1
- package/build/assets/format-model-name-Dfh9Udrx.js +1 -0
- package/build/assets/get-git-path-jU2zjqIB.js +1 -0
- package/build/assets/git-repo-dropdown-BoDDWXfX.js +1 -0
- package/build/assets/git-repo-dropdown-uxlFw2gn.js +1 -0
- package/build/assets/highlighted-source-view-C7pAXrT0.js +1 -0
- package/build/assets/home-BM5_Wz_R.js +1 -0
- package/build/assets/home-Ivfm7KC4.js +1 -0
- package/build/assets/home-automation-run-tooltip-B1N2uO9p.js +1 -0
- package/build/assets/home-store-DCbei3DX.js +1 -0
- package/build/assets/hooks-service-Dnmhqc0Z.js +1 -0
- package/build/assets/index-home-td9BN2T3.js +1 -0
- package/build/assets/info-BcajzHn1.js +1 -0
- package/build/assets/install-server-modal-B81I-5OE.js +1 -0
- package/build/assets/kebab-menu-item-content-SCJBwZnp.js +1 -0
- package/build/assets/{key-BmVyxs-2.js → key-O84CMFHb.js} +1 -1
- package/build/assets/launch-ZLxI4opd.js +1 -0
- package/build/assets/list-filter-B8PQk3RA.js +1 -0
- package/build/assets/{list-todo-apgLVjMw.js → list-todo-Caa8E1X_.js} +1 -1
- package/build/assets/llm-not-configured-banner-Dh_ajcM8.js +27 -0
- package/build/assets/llm-settings-CODhjQzy.js +1 -0
- package/build/assets/llm-settings-CZaXYgtw.js +1 -0
- package/build/assets/llm-subscription-service-CgIDc38n.js +1 -0
- package/build/assets/loader-circle-BxJgk73D.js +1 -0
- package/build/assets/{loading-spinner-BY9N3pOe.js → loading-spinner-BeLV0IXf.js} +1 -1
- package/build/assets/manage-backends-modal-cMXqCb-B.js +1 -0
- package/build/assets/manifest-bfeccb98.js +1 -0
- package/build/assets/manifest-subpage-layout-CVZgVKoY.js +1 -0
- package/build/assets/{map-provider-Cu3Zgumb.js → map-provider-iRs80q_6.js} +1 -1
- package/build/assets/markdown-renderer-DyFl9-mL.js +8 -0
- package/build/assets/mcp-CraxoXQv.js +1 -0
- package/build/assets/{mcp-marketplace-utils-AIBzzHTO.js → mcp-marketplace-utils-C7PYr293.js} +1 -1
- package/build/assets/mcp-page-CteH_K0N.js +9 -0
- package/build/assets/messages-Bk1xhbU2.js +41 -0
- package/build/assets/{modal-body-BxZjsju9.js → modal-body-C24WsdFb.js} +1 -1
- package/build/assets/{modal-classes-C8eycCwG.js → modal-classes-B0b9eiL8.js} +1 -1
- package/build/assets/modal-close-button-DfqfB2Nj.js +1 -0
- package/build/assets/{mouse-pointer-click-Co2uyaPA.js → mouse-pointer-click-BXlRN92t.js} +1 -1
- package/build/assets/onboarding-DXFBRqEy.js +1 -0
- package/build/assets/onboarding-modal-BT3Gx_sZ.js +1 -0
- package/build/assets/organization-service.api-B5CvmnYQ.js +1 -0
- package/build/assets/pencil-q-ihqDYv.js +1 -0
- package/build/assets/pin-BdroVQdN.js +1 -0
- package/build/assets/planner-tab-CstoOlAB.js +1 -0
- package/build/assets/plug-7ACOEbMs.js +1 -0
- package/build/assets/plugins-management-service-5rqVPEGN.js +1 -0
- package/build/assets/plus-C2e21TFC.js +1 -0
- package/build/assets/profiles-service.api-D1XKMgr0.js +1 -0
- package/build/assets/providers-XmZ9HM4Q.js +1 -0
- package/build/assets/proxy-XP6U1Dhv.js +1 -0
- package/build/assets/{puzzle-JM_QaRm0.js → puzzle-LJYnuxKe.js} +1 -1
- package/build/assets/react-BX7IV650.js +1 -0
- package/build/assets/recommended-automations-launcher-DEHRKIAg.js +1 -0
- package/build/assets/refresh-cw-BtdC3T8P.js +1 -0
- package/build/assets/root-CM6IZHlg.css +1 -0
- package/build/assets/root-DdFkodKW.js +2 -0
- package/build/assets/root-layout-DUquNZTU.js +2 -0
- package/build/assets/schema-field-Y3F8JvXd.js +1 -0
- package/build/assets/scroll-fade-state-Dt_fx2kf.js +1 -0
- package/build/assets/sdk-section-page-CNZTLwH9.js +1 -0
- package/build/assets/secret-form-9-BoGA40.js +1 -0
- package/build/assets/secrets-service-BOIsfD9j.js +1 -0
- package/build/assets/secrets-settings-CBJgFr42.js +1 -0
- package/build/assets/settings-D4hdToD4.js +1 -0
- package/build/assets/settings-dropdown-input-DBvsZ7-Q.js +1 -0
- package/build/assets/settings-index-DeQphyBK.js +1 -0
- package/build/assets/settings-input-dVuzapBA.js +1 -0
- package/build/assets/{settings-list-classes-BzeSZbF2.js → settings-list-classes-DhAPuXm6.js} +1 -1
- package/build/assets/settings-modal-tHiJ8iYV.js +1 -0
- package/build/assets/settings-nav-GAQjW1a-.js +16 -0
- package/build/assets/settings-service.api-C1vZH9Vh.js +1 -0
- package/build/assets/settings-switch-DDd1cQ8t.js +1 -0
- package/build/assets/{settings-utils-UYpEdPuD.js → settings-utils-BTaaRhLZ.js} +1 -1
- package/build/assets/shared-conversation-Cyg7m7ns.js +1 -0
- package/build/assets/shield-check-C3Rl0NF8.js +1 -0
- package/build/assets/{sidebar-layout-D6fS8-Gl.js → sidebar-layout-DH0E-5KW.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-CQ4iky__.js +1 -0
- package/build/assets/{sidebar-nav-link-DQQcMf1A.js → sidebar-nav-link-oLQiKUBu.js} +1 -1
- package/build/assets/{sidebar-onboarding-checklist-storage-BBkeI6Bp.js → sidebar-onboarding-checklist-storage-TfvNNnnr.js} +1 -1
- package/build/assets/sidebar-store-DAZVH-DR.js +1 -0
- package/build/assets/skill-card-pill-row-DfjIfj0K.js +1 -0
- package/build/assets/{skill-filter-w__3UCEE.js → skill-filter-DsNLmn76.js} +2 -2
- package/build/assets/{skill-icon-badge-RQkq8wvl.js → skill-icon-badge-0MK_68Nc.js} +1 -1
- package/build/assets/skill-scope-BE-H9TSZ.js +1 -0
- package/build/assets/skills-plugins-vzSdxSk_.js +1 -0
- package/build/assets/skills-settings-BiPOH9H9.js +1 -0
- package/build/assets/styled-tooltip-CejG0rqv.js +1 -0
- package/build/assets/task-list-tab-OkZSqnTp.js +1 -0
- package/build/assets/{terminal-CNElN42a.js → terminal-Dph60VFZ.js} +2 -2
- package/build/assets/toggle-switch-B2uXaAUS.js +1 -0
- package/build/assets/trash-2-Bb40zQzs.js +1 -0
- package/build/assets/trash-Ckh7yCaB.js +1 -0
- package/build/assets/triangle-alert-DEdu-b_L.js +1 -0
- package/build/assets/{typography-v1KN0tzi.js → typography-DgcLGdHk.js} +1 -1
- package/build/assets/usage-tab-MCmNRAnR.js +1 -0
- package/build/assets/use-acp-credential-form-ychoGqjC.js +1 -0
- package/build/assets/use-activate-agent-profile-8L8Xdghy.js +1 -0
- package/build/assets/use-agent-profiles-Bi8hSkze.js +1 -0
- package/build/assets/{use-automation-health-E6NZi9rb.js → use-automation-health-U99vvHxx.js} +1 -1
- package/build/assets/use-automation-permissions-Buus0R6h.js +1 -0
- package/build/assets/{use-automations-xijQKIl9.js → use-automations-Bq5hVuv0.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-CrJP5262.js → use-can-manage-org-profiles-MzIeEV8F.js} +1 -1
- package/build/assets/use-canvas-extensions-Ca9KoVEm.js +1 -0
- package/build/assets/{use-cloud-current-user-id-CDfAHpPX.js → use-cloud-current-user-id-B4ZLUZSa.js} +1 -1
- package/build/assets/use-config-l5tkDHyD.js +1 -0
- package/build/assets/use-create-conversation-i_PdFdIs.js +1 -0
- package/build/assets/use-create-secret-CjWq0J4O.js +1 -0
- package/build/assets/use-free-models-gCsJ5BV0.js +1 -0
- package/build/assets/{use-get-secrets-K3jmk-LH.js → use-get-secrets-CMTuWEp_.js} +1 -1
- package/build/assets/use-is-authed-A2Yinlt0.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-BYjYihBP.js → use-launch-skill-in-chat-QbXDhiHr.js} +1 -1
- package/build/assets/use-llm-configured-Dl4zg8ht.js +1 -0
- package/build/assets/use-llm-profiles-SWsuFmFu.js +1 -0
- package/build/assets/use-manifest-capabilities-CdqYfUAC.js +1 -0
- package/build/assets/use-onboarding-completion-Xl63ZvzQ.js +1 -0
- package/build/assets/use-pinned-home-route-BXDIUaxQ.js +1 -0
- package/build/assets/use-plugins-marketplace-BIIaPiaB.js +1 -0
- package/build/assets/use-save-agent-profile-D-ZHHE94.js +1 -0
- package/build/assets/{use-save-settings-DYqkKv7T.js → use-save-settings-Dapkf4cC.js} +1 -1
- package/build/assets/use-settings-C2KKQKVC.js +1 -0
- package/build/assets/use-settings-nav-items-TOc0Rsfd.js +1 -0
- package/build/assets/use-tracking-j4uo9VEW.js +3 -0
- package/build/assets/{use-user-conversation-B9Gebw_g.js → use-user-conversation-5UFqMoO4.js} +1 -1
- package/build/assets/{useInfiniteQuery-C926xzY4.js → useInfiniteQuery-CtSRG7uW.js} +1 -1
- package/build/assets/{useMutation-B-qc391N.js → useMutation-Cszf8mKy.js} +1 -1
- package/build/assets/useQueries-pUohFMSP.js +1 -0
- package/build/assets/useQuery-DAAacS7O.js +1 -0
- package/build/assets/useTranslation-CCgUjPJF.js +1 -0
- package/build/assets/utils-BgLSZdyy.js +1 -0
- package/build/assets/{vendor~conversation-panel~conversation-C8Fn4XOf.js → vendor~conversation-panel~conversation-C22sJuWZ.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +2 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js +185 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js +1 -0
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-hWywRBaR.js → vendor~index-home~home~conversation-panel~conversation-UTl7gUo9.js} +1 -1
- package/build/assets/vendor~root-layout-CcdIqs-C.js +1 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js → vendor~root-layout~conversation-panel~conversation-C3EBV3kp.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BCe0JJVy.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-j5MFqfSy.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BGGbPcYh.js} +1 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-CxhwKuAd.js +1 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js} +12 -6
- package/build/assets/{verification-settings-gw_q6vkL.js → verification-settings-DdBpaVPz.js} +1 -1
- package/build/assets/{wrench-CUEI1krB.js → wrench-B8Wg_nbp.js} +1 -1
- package/build/assets/x-CX8lVGwm.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +79 -22
- package/build/locales/ca/openhands.json +79 -22
- package/build/locales/de/openhands.json +79 -22
- package/build/locales/en/openhands.json +79 -22
- package/build/locales/es/openhands.json +79 -22
- package/build/locales/fr/openhands.json +79 -22
- package/build/locales/it/openhands.json +79 -22
- package/build/locales/ja/openhands.json +79 -22
- package/build/locales/ko-KR/openhands.json +79 -22
- package/build/locales/no/openhands.json +79 -22
- package/build/locales/pt/openhands.json +79 -22
- package/build/locales/tr/openhands.json +79 -22
- package/build/locales/uk/openhands.json +79 -22
- package/build/locales/zh-CN/openhands.json +79 -22
- package/build/locales/zh-TW/openhands.json +79 -22
- package/config/defaults.json +3 -3
- 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.d.ts +72 -12
- package/dist/api/agent-server-adapter.js +234 -132
- package/dist/api/agent-server-adapter.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 +6 -0
- package/dist/api/agent-server-config.js +6 -3
- package/dist/api/agent-server-config.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +2 -2
- package/dist/api/automation-service/automation-service.api.js +7 -7
- package/dist/api/automation-service/automation-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 +9 -1
- package/dist/api/cloud/organization-service.api.js.map +1 -1
- package/dist/api/cloud/provider-connections-service.api.cjs +2 -0
- package/dist/api/cloud/provider-connections-service.api.cjs.map +1 -0
- package/dist/api/cloud/provider-connections-service.api.d.ts +5 -0
- package/dist/api/cloud/provider-connections-service.api.js +50 -0
- package/dist/api/cloud/provider-connections-service.api.js.map +1 -0
- package/dist/api/cloud/skills-service.api.cjs +1 -1
- package/dist/api/cloud/skills-service.api.cjs.map +1 -1
- package/dist/api/cloud/skills-service.api.d.ts +10 -0
- package/dist/api/cloud/skills-service.api.js +11 -1
- package/dist/api/cloud/skills-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.api.cjs +1 -1
- package/dist/api/config-service/config-service.api.cjs.map +1 -1
- package/dist/api/config-service/config-service.api.js +6 -2
- package/dist/api/config-service/config-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.types.d.ts +13 -0
- package/dist/api/conversation-metadata-store.cjs +1 -1
- package/dist/api/conversation-metadata-store.cjs.map +1 -1
- package/dist/api/conversation-metadata-store.d.ts +24 -0
- package/dist/api/conversation-metadata-store.js +10 -2
- package/dist/api/conversation-metadata-store.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.d.ts +20 -0
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +126 -77
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/hooks-service.cjs +2 -0
- package/dist/api/hooks-service.cjs.map +1 -0
- package/dist/api/hooks-service.d.ts +13 -0
- package/dist/api/hooks-service.js +20 -0
- package/dist/api/hooks-service.js.map +1 -0
- package/dist/api/provider-connections-service/provider-connections-service.api.cjs +1 -1
- package/dist/api/provider-connections-service/provider-connections-service.api.cjs.map +1 -1
- package/dist/api/provider-connections-service/provider-connections-service.api.js +25 -16
- package/dist/api/provider-connections-service/provider-connections-service.api.js.map +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.d.ts +2 -0
- package/dist/api/settings-service/settings-service.api.js +18 -10
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/api/skills-service.cjs +1 -1
- package/dist/api/skills-service.cjs.map +1 -1
- package/dist/api/skills-service.d.ts +7 -0
- package/dist/api/skills-service.js +11 -8
- package/dist/api/skills-service.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js +2 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +28 -28
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js +2 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js +37 -37
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message.cjs +2 -2
- package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message.js +79 -70
- package/dist/components/conversation-events/chat/event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/messages.cjs +1 -1
- package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
- package/dist/components/conversation-events/chat/messages.js +28 -27
- package/dist/components/conversation-events/chat/messages.js.map +1 -1
- package/dist/components/features/automations/automation-card.cjs +1 -1
- package/dist/components/features/automations/automation-card.cjs.map +1 -1
- package/dist/components/features/automations/automation-card.js +104 -97
- package/dist/components/features/automations/automation-card.js.map +1 -1
- package/dist/components/features/automations/automation-list-row.cjs +1 -1
- package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
- package/dist/components/features/automations/automation-list-row.js +89 -77
- package/dist/components/features/automations/automation-list-row.js.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.d.ts +3 -1
- package/dist/components/features/automations/build-automation-menu-items.js +12 -11
- package/dist/components/features/automations/build-automation-menu-items.js.map +1 -1
- package/dist/components/features/automations/detail/configuration-section.d.ts +7 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +10 -5
- package/dist/components/features/automations/detail/run-status-badge.cjs +1 -1
- package/dist/components/features/automations/detail/run-status-badge.cjs.map +1 -1
- package/dist/components/features/automations/detail/run-status-badge.d.ts +2 -2
- package/dist/components/features/automations/detail/run-status-badge.js +82 -53
- package/dist/components/features/automations/detail/run-status-badge.js.map +1 -1
- package/dist/components/features/automations/kebab-menu.cjs +1 -1
- package/dist/components/features/automations/kebab-menu.cjs.map +1 -1
- package/dist/components/features/automations/kebab-menu.js +9 -5
- package/dist/components/features/automations/kebab-menu.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.cjs +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.cjs.map +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.js +12 -12
- package/dist/components/features/automations/recommended-automations-launcher.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-section.cjs +1 -1
- package/dist/components/features/automations/recommended-automations-section.js +9 -9
- 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 +123 -112
- package/dist/components/features/backends/backend-selector.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 +29 -29
- 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.js +4 -4
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +137 -137
- package/dist/components/features/chat/chat-interface.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 +88 -79
- package/dist/components/features/chat/chat-message.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +62 -61
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -1
- package/dist/components/features/chat/components/context-window-meter.cjs +1 -1
- package/dist/components/features/chat/components/context-window-meter.js +4 -4
- package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
- package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
- package/dist/components/features/chat/generic-event-message.cjs +1 -1
- package/dist/components/features/chat/generic-event-message.cjs.map +1 -1
- package/dist/components/features/chat/generic-event-message.d.ts +2 -1
- package/dist/components/features/chat/generic-event-message.js +41 -22
- package/dist/components/features/chat/generic-event-message.js.map +1 -1
- package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
- package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
- package/dist/components/features/chat/interactive-chat-box.js +20 -19
- package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
- package/dist/components/features/chat/model-messages.cjs +1 -1
- package/dist/components/features/chat/model-messages.cjs.map +1 -1
- package/dist/components/features/chat/model-messages.js +27 -26
- package/dist/components/features/chat/model-messages.js.map +1 -1
- package/dist/components/features/conversation/conversation-overview-git-section.cjs +1 -1
- package/dist/components/features/conversation/conversation-overview-git-section.js +4 -4
- package/dist/components/features/conversation/conversation-overview-skills-panel.cjs +1 -1
- package/dist/components/features/conversation/conversation-overview-skills-panel.js +4 -4
- 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 +77 -78
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +88 -88
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.d.ts +21 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js +239 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
- package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
- package/dist/components/features/conversation-panel/budget-display.d.ts +1 -2
- package/dist/components/features/conversation-panel/budget-display.js +12 -19
- package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.d.ts +28 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.js +69 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.js.map +1 -0
- 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.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +19 -18
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +91 -80
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
- 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.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +45 -44
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +7 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +87 -81
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.d.ts +29 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.js +177 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +37 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +85 -45
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.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 +296 -290
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.d.ts +22 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js +153 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs +2 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs.map +1 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.d.ts +6 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.js +65 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.js.map +1 -0
- package/dist/components/features/conversation-panel/menu-row.cjs +1 -1
- package/dist/components/features/conversation-panel/menu-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/menu-row.d.ts +11 -1
- package/dist/components/features/conversation-panel/menu-row.js +27 -16
- package/dist/components/features/conversation-panel/menu-row.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.js +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +4 -3
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js +22 -25
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js +15 -15
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.d.ts +5 -3
- package/dist/components/features/home/featured-automations/automation-run-health.js +30 -23
- package/dist/components/features/home/featured-automations/automation-run-health.js.map +1 -1
- package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +1 -2
- package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +0 -1
- package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +3 -2
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +42 -42
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
- package/dist/components/features/images/image-lightbox.cjs +2 -0
- package/dist/components/features/images/image-lightbox.cjs.map +1 -0
- package/dist/components/features/images/image-lightbox.d.ts +11 -0
- package/dist/components/features/images/image-lightbox.js +37 -0
- package/dist/components/features/images/image-lightbox.js.map +1 -0
- package/dist/components/features/images/image-preview.cjs +1 -1
- package/dist/components/features/images/image-preview.cjs.map +1 -1
- package/dist/components/features/images/image-preview.d.ts +2 -1
- package/dist/components/features/images/image-preview.js +33 -13
- package/dist/components/features/images/image-preview.js.map +1 -1
- package/dist/components/features/manifest/manifest-form-field.d.ts +3 -1
- package/dist/components/features/manifest/manifest-review-step.d.ts +3 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +3 -4
- package/dist/components/features/settings/cloud-settings-link.cjs +1 -1
- package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
- package/dist/components/features/settings/cloud-settings-link.d.ts +3 -1
- package/dist/components/features/settings/cloud-settings-link.js +22 -19
- package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
- package/dist/components/features/settings/integrations-settings-link.cjs +1 -1
- package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -1
- package/dist/components/features/settings/integrations-settings-link.d.ts +3 -1
- package/dist/components/features/settings/integrations-settings-link.js +20 -17
- package/dist/components/features/settings/integrations-settings-link.js.map +1 -1
- 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.js +3 -2
- package/dist/components/features/settings/llm-profiles/profile-row.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.js +1 -1
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +2 -2
- package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs.map +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +8 -7
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js +172 -142
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js.map +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.cjs +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.cjs.map +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.js +38 -25
- package/dist/components/features/settings/secrets-settings/secret-form.js.map +1 -1
- package/dist/components/features/settings/settings-dropdown-input.cjs +1 -1
- package/dist/components/features/settings/settings-dropdown-input.js +6 -6
- package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.d.ts +4 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +157 -139
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.cjs +1 -1
- package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar.js +28 -26
- package/dist/components/features/sidebar/sidebar.js.map +1 -1
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs +1 -1
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js +3 -3
- 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 +3 -3
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.js +33 -29
- package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
- package/dist/components/shared/buttons/remove-button.cjs +1 -1
- package/dist/components/shared/buttons/remove-button.cjs.map +1 -1
- package/dist/components/shared/buttons/remove-button.d.ts +2 -1
- package/dist/components/shared/buttons/remove-button.js +2 -1
- package/dist/components/shared/buttons/remove-button.js.map +1 -1
- package/dist/components/shared/buttons/styled-tooltip.cjs +1 -1
- package/dist/components/shared/buttons/styled-tooltip.cjs.map +1 -1
- package/dist/components/shared/buttons/styled-tooltip.d.ts +2 -1
- package/dist/components/shared/buttons/styled-tooltip.js +2 -1
- package/dist/components/shared/buttons/styled-tooltip.js.map +1 -1
- 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.d.ts +5 -1
- package/dist/components/shared/filters/enum-filter-dropdown.js +14 -14
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/free-models-note.cjs +2 -0
- package/dist/components/shared/free-models-note.cjs.map +1 -0
- package/dist/components/shared/free-models-note.d.ts +3 -0
- package/dist/components/shared/free-models-note.js +20 -0
- package/dist/components/shared/free-models-note.js.map +1 -0
- package/dist/components/shared/modals/confirmation-modal.cjs +1 -1
- package/dist/components/shared/modals/confirmation-modal.cjs.map +1 -1
- package/dist/components/shared/modals/confirmation-modal.d.ts +2 -1
- package/dist/components/shared/modals/confirmation-modal.js +8 -8
- package/dist/components/shared/modals/confirmation-modal.js.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.js +102 -112
- package/dist/components/shared/modals/settings/model-selector.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +12 -0
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/constants/settings-nav.d.ts +8 -0
- package/dist/contexts/conversation-websocket-context.cjs +3 -3
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.d.ts +5 -0
- package/dist/contexts/conversation-websocket-context.js +194 -198
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/contexts/websocket-provider-wrapper.cjs +1 -1
- package/dist/contexts/websocket-provider-wrapper.cjs.map +1 -1
- package/dist/contexts/websocket-provider-wrapper.js +31 -15
- package/dist/contexts/websocket-provider-wrapper.js.map +1 -1
- package/dist/hooks/chat/record-model-switch-message.cjs +1 -1
- package/dist/hooks/chat/record-model-switch-message.cjs.map +1 -1
- package/dist/hooks/chat/record-model-switch-message.d.ts +31 -0
- package/dist/hooks/chat/record-model-switch-message.js +25 -12
- package/dist/hooks/chat/record-model-switch-message.js.map +1 -1
- package/dist/hooks/chat/use-plan-mode-interceptor.cjs +2 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.cjs.map +1 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.d.ts +16 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.js +43 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.js.map +1 -0
- package/dist/hooks/chat/use-slash-command.cjs +1 -1
- package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
- package/dist/hooks/chat/use-slash-command.js +63 -62
- package/dist/hooks/chat/use-slash-command.js.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.js +5 -1
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-read-conversation-file.cjs +1 -1
- package/dist/hooks/mutation/use-read-conversation-file.cjs.map +1 -1
- package/dist/hooks/mutation/use-read-conversation-file.js +11 -4
- package/dist/hooks/mutation/use-read-conversation-file.js.map +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.js +3 -3
- package/dist/hooks/mutation/use-switch-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile.cjs.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile.js +13 -25
- package/dist/hooks/mutation/use-switch-llm-profile.js.map +1 -1
- package/dist/hooks/mutation/use-update-conversation-tags.cjs +2 -0
- package/dist/hooks/mutation/use-update-conversation-tags.cjs.map +1 -0
- package/dist/hooks/mutation/use-update-conversation-tags.d.ts +8 -0
- package/dist/hooks/mutation/use-update-conversation-tags.js +45 -0
- package/dist/hooks/mutation/use-update-conversation-tags.js.map +1 -0
- package/dist/hooks/query/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +6 -0
- package/dist/hooks/query/query-keys.js +2 -2
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.d.ts +0 -1
- package/dist/hooks/query/use-automation-sdk-version.js +30 -55
- package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
- package/dist/hooks/query/use-conversation-skills.cjs +1 -1
- package/dist/hooks/query/use-conversation-skills.cjs.map +1 -1
- package/dist/hooks/query/use-conversation-skills.d.ts +14 -5
- package/dist/hooks/query/use-conversation-skills.js +20 -4
- package/dist/hooks/query/use-conversation-skills.js.map +1 -1
- package/dist/hooks/query/use-free-models.cjs +2 -0
- package/dist/hooks/query/use-free-models.cjs.map +1 -0
- package/dist/hooks/query/use-free-models.d.ts +23 -0
- package/dist/hooks/query/use-free-models.js +67 -0
- package/dist/hooks/query/use-free-models.js.map +1 -0
- package/dist/hooks/query/use-local-git-info.cjs.map +1 -1
- package/dist/hooks/query/use-local-git-info.js.map +1 -1
- package/dist/hooks/query/use-provider-connections.cjs +1 -1
- package/dist/hooks/query/use-provider-connections.cjs.map +1 -1
- package/dist/hooks/query/use-provider-connections.d.ts +6 -3
- package/dist/hooks/query/use-provider-connections.js +7 -3
- package/dist/hooks/query/use-provider-connections.js.map +1 -1
- package/dist/hooks/query/use-provider-models.cjs +1 -1
- package/dist/hooks/query/use-provider-models.cjs.map +1 -1
- package/dist/hooks/query/use-provider-models.js +34 -25
- package/dist/hooks/query/use-provider-models.js.map +1 -1
- package/dist/hooks/query/use-search-providers.cjs +1 -1
- package/dist/hooks/query/use-search-providers.cjs.map +1 -1
- package/dist/hooks/query/use-search-providers.js +31 -19
- package/dist/hooks/query/use-search-providers.js.map +1 -1
- package/dist/hooks/query/use-sub-conversations.cjs +1 -1
- package/dist/hooks/query/use-sub-conversations.cjs.map +1 -1
- package/dist/hooks/query/use-sub-conversations.js +16 -16
- package/dist/hooks/query/use-sub-conversations.js.map +1 -1
- package/dist/hooks/use-acp-model-context.cjs +1 -1
- package/dist/hooks/use-acp-model-context.js +3 -3
- package/dist/hooks/use-agent-state.cjs +1 -1
- package/dist/hooks/use-agent-state.cjs.map +1 -1
- package/dist/hooks/use-agent-state.d.ts +17 -1
- package/dist/hooks/use-agent-state.js +19 -9
- package/dist/hooks/use-agent-state.js.map +1 -1
- package/dist/hooks/use-automation-permissions.cjs +2 -0
- package/dist/hooks/use-automation-permissions.cjs.map +1 -0
- package/dist/hooks/use-automation-permissions.d.ts +43 -0
- package/dist/hooks/use-automation-permissions.js +52 -0
- package/dist/hooks/use-automation-permissions.js.map +1 -0
- package/dist/hooks/use-chat-input-model-state.cjs +1 -1
- package/dist/hooks/use-chat-input-model-state.js +3 -3
- package/dist/hooks/use-handle-plan-click.cjs +1 -1
- package/dist/hooks/use-handle-plan-click.cjs.map +1 -1
- package/dist/hooks/use-handle-plan-click.d.ts +3 -1
- package/dist/hooks/use-handle-plan-click.js +85 -26
- package/dist/hooks/use-handle-plan-click.js.map +1 -1
- package/dist/hooks/use-home-automation-actions.cjs +1 -1
- package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
- package/dist/hooks/use-home-automation-actions.d.ts +1 -2
- package/dist/hooks/use-home-automation-actions.js +1 -1
- package/dist/hooks/use-home-automation-actions.js.map +1 -1
- package/dist/hooks/use-llm-configured.cjs +1 -1
- package/dist/hooks/use-llm-configured.js +3 -3
- package/dist/hooks/use-manifest-preflight.d.ts +1 -1
- package/dist/hooks/use-unified-websocket-status.cjs +1 -1
- package/dist/hooks/use-unified-websocket-status.cjs.map +1 -1
- package/dist/hooks/use-unified-websocket-status.d.ts +7 -0
- package/dist/hooks/use-unified-websocket-status.js +5 -1
- package/dist/hooks/use-unified-websocket-status.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +71 -14
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +1281 -312
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +79 -22
- package/dist/locales/ca/openhands.json +79 -22
- package/dist/locales/de/openhands.json +79 -22
- package/dist/locales/en/openhands.json +79 -22
- package/dist/locales/es/openhands.json +79 -22
- package/dist/locales/fr/openhands.json +79 -22
- package/dist/locales/it/openhands.json +79 -22
- package/dist/locales/ja/openhands.json +79 -22
- package/dist/locales/ko-KR/openhands.json +79 -22
- package/dist/locales/no/openhands.json +79 -22
- package/dist/locales/pt/openhands.json +79 -22
- package/dist/locales/tr/openhands.json +79 -22
- package/dist/locales/uk/openhands.json +79 -22
- package/dist/locales/zh-CN/openhands.json +79 -22
- package/dist/locales/zh-TW/openhands.json +79 -22
- package/dist/manifests/automation-insights.cjs.map +1 -1
- package/dist/manifests/automation-insights.d.ts +10 -2
- package/dist/manifests/automation-insights.js.map +1 -1
- package/dist/manifests/automation-setup.cjs +1 -1
- package/dist/manifests/automation-setup.cjs.map +1 -1
- package/dist/manifests/automation-setup.d.ts +9 -16
- package/dist/manifests/automation-setup.js +17 -7
- package/dist/manifests/automation-setup.js.map +1 -1
- package/dist/manifests/manifest-actions.d.ts +1 -1
- package/dist/manifests/manifest-capabilities.d.ts +3 -1
- package/dist/manifests/manifest-local-validation.cjs +2 -0
- package/dist/manifests/manifest-local-validation.cjs.map +1 -0
- package/dist/manifests/manifest-local-validation.d.ts +15 -11
- package/dist/manifests/manifest-local-validation.js +8 -0
- package/dist/manifests/manifest-local-validation.js.map +1 -0
- package/dist/manifests/manifest-template.cjs +2 -0
- package/dist/manifests/manifest-template.cjs.map +1 -0
- package/dist/manifests/manifest-template.d.ts +4 -4
- package/dist/manifests/manifest-template.js +12 -0
- package/dist/manifests/manifest-template.js.map +1 -0
- package/dist/manifests/manifest-validation.cjs +1 -1
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js +106 -28
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/manifests/types.cjs.map +1 -1
- package/dist/manifests/types.d.ts +39 -4
- package/dist/manifests/types.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs +8 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js +221 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +22 -20
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.js +2 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +24 -5
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +4 -4
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +2 -0
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +53 -48
- package/dist/routes/app-settings.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.d.ts +3 -1
- package/dist/routes/llm-settings.js +120 -127
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/routes/planner-tab.cjs +1 -1
- package/dist/routes/planner-tab.cjs.map +1 -1
- package/dist/routes/planner-tab.js +44 -28
- package/dist/routes/planner-tab.js.map +1 -1
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.d.ts +5 -0
- package/dist/services/telemetry.js +122 -115
- package/dist/services/telemetry.js.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.d.ts +32 -5
- package/dist/stores/conversation-panel-preferences-store.js +29 -12
- package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
- package/dist/stores/conversation-state-store.cjs +1 -1
- package/dist/stores/conversation-state-store.cjs.map +1 -1
- package/dist/stores/conversation-state-store.d.ts +9 -3
- package/dist/stores/conversation-state-store.js +6 -3
- package/dist/stores/conversation-state-store.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 +2 -0
- package/dist/stores/conversation-store.js +3 -0
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/stores/free-models-store.cjs +2 -0
- package/dist/stores/free-models-store.cjs.map +1 -0
- package/dist/stores/free-models-store.d.ts +30 -0
- package/dist/stores/free-models-store.js +22 -0
- package/dist/stores/free-models-store.js.map +1 -0
- package/dist/stores/model-store.cjs +1 -1
- package/dist/stores/model-store.cjs.map +1 -1
- package/dist/stores/model-store.d.ts +7 -0
- package/dist/stores/model-store.js +4 -0
- package/dist/stores/model-store.js.map +1 -1
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +46 -1
- package/dist/types/automation.js.map +1 -1
- package/dist/ui/context-menu.d.ts +1 -1
- package/dist/ui/toggle-switch.cjs +1 -1
- package/dist/ui/toggle-switch.cjs.map +1 -1
- package/dist/ui/toggle-switch.d.ts +4 -1
- package/dist/ui/toggle-switch.js +4 -3
- package/dist/ui/toggle-switch.js.map +1 -1
- package/dist/utils/automation-catalog.cjs +1 -1
- package/dist/utils/automation-catalog.cjs.map +1 -1
- package/dist/utils/automation-catalog.d.ts +12 -1
- package/dist/utils/automation-catalog.js +42 -12
- package/dist/utils/automation-catalog.js.map +1 -1
- package/dist/utils/automation-run-display.cjs +2 -0
- package/dist/utils/automation-run-display.cjs.map +1 -0
- package/dist/utils/automation-run-display.d.ts +20 -0
- package/dist/utils/automation-run-display.js +85 -0
- package/dist/utils/automation-run-display.js.map +1 -0
- package/dist/utils/automation-schedule.cjs +1 -1
- package/dist/utils/automation-schedule.cjs.map +1 -1
- package/dist/utils/automation-schedule.d.ts +16 -0
- package/dist/utils/automation-schedule.js +2 -0
- package/dist/utils/automation-schedule.js.map +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.cjs.map +1 -1
- package/dist/utils/constants.d.ts +4 -0
- package/dist/utils/constants.js +23 -3
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/format-event-timestamp.cjs +2 -0
- package/dist/utils/format-event-timestamp.cjs.map +1 -0
- package/dist/utils/format-event-timestamp.d.ts +1 -0
- package/dist/utils/format-event-timestamp.js +13 -0
- package/dist/utils/format-event-timestamp.js.map +1 -0
- package/dist/utils/format-model-name.cjs +1 -1
- package/dist/utils/format-model-name.cjs.map +1 -1
- package/dist/utils/format-model-name.d.ts +27 -6
- package/dist/utils/format-model-name.js +14 -6
- package/dist/utils/format-model-name.js.map +1 -1
- package/dist/utils/git-diff-stats.cjs +2 -2
- package/dist/utils/git-diff-stats.cjs.map +1 -1
- package/dist/utils/git-diff-stats.d.ts +4 -0
- package/dist/utils/git-diff-stats.js +12 -2
- package/dist/utils/git-diff-stats.js.map +1 -1
- package/dist/utils/plan-file.cjs +4 -0
- package/dist/utils/plan-file.cjs.map +1 -0
- package/dist/utils/plan-file.d.ts +18 -0
- package/dist/utils/plan-file.js +58 -0
- package/dist/utils/plan-file.js.map +1 -0
- package/dist/utils/recommended-automation-rail.cjs +1 -1
- package/dist/utils/recommended-automation-rail.cjs.map +1 -1
- package/dist/utils/recommended-automation-rail.js +1 -0
- package/dist/utils/recommended-automation-rail.js.map +1 -1
- package/dist/utils/scroll-fade-state.cjs +1 -1
- package/dist/utils/scroll-fade-state.cjs.map +1 -1
- package/dist/utils/scroll-fade-state.d.ts +6 -0
- package/dist/utils/scroll-fade-state.js +8 -1
- package/dist/utils/scroll-fade-state.js.map +1 -1
- package/dist/utils/sdk-settings-schema.cjs +1 -1
- package/dist/utils/sdk-settings-schema.cjs.map +1 -1
- package/dist/utils/sdk-settings-schema.d.ts +1 -0
- package/dist/utils/sdk-settings-schema.js +25 -22
- package/dist/utils/sdk-settings-schema.js.map +1 -1
- package/dist/utils/utils.cjs +1 -1
- package/dist/utils/utils.cjs.map +1 -1
- package/dist/utils/utils.js +11 -11
- package/dist/utils/utils.js.map +1 -1
- package/package.json +4 -4
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +1 -1
- package/scripts/dev-with-automation.mjs +1 -1
- package/scripts/static-server.mjs +33 -1
- package/build/assets/active-backend-context-CrHTlgvN.js +0 -2
- package/build/assets/agent-profiles-settings-Dzgb7G9z.js +0 -1
- package/build/assets/agent-server-conversation-service.api-tnqNjbpE.js +0 -86
- package/build/assets/agent-settings-DLtsqaOs.js +0 -2
- package/build/assets/agent-settings-fFvR-XC2.js +0 -1
- package/build/assets/alert-banner-HP6mX-Vr.js +0 -1
- package/build/assets/api-key-entry-screen-qTzrmJcr.js +0 -1
- package/build/assets/app-settings-dbnneVaV.js +0 -1
- package/build/assets/automation-detail-BmwlCUAB.js +0 -3
- package/build/assets/automation-git-sync-CprN5DcU.js +0 -1
- package/build/assets/automation-setup-route-C40kXjMY.js +0 -1
- package/build/assets/automations-list-DuNcRawl.js +0 -1
- package/build/assets/backend-form-modal-lhGwzXFI.js +0 -1
- package/build/assets/backend-synced-settings-badge-DPkz30BE.js +0 -1
- package/build/assets/badge-BU3S0VtE.js +0 -1
- package/build/assets/bot-dMYHVfYM.js +0 -1
- package/build/assets/browser-DSAo0tz1.js +0 -46
- package/build/assets/browser-tab-C9vy56R5.js +0 -1
- package/build/assets/canvas-extension-page-dx1gFrfW.js +0 -1
- package/build/assets/canvas-extensions-8A-XhpgP.js +0 -1
- package/build/assets/check-CS0vmpQQ.js +0 -1
- package/build/assets/chevron-down-e1QBpjVy.js +0 -1
- package/build/assets/chevron-right-ZG4R5G4Q.js +0 -1
- package/build/assets/circle-check-DzWLNsbE.js +0 -1
- package/build/assets/circle-plus-check-toggle-BO_kFZt3.js +0 -1
- package/build/assets/command-menu--UIlGL72.js +0 -1
- package/build/assets/commits-tab-AnZwLvh-.js +0 -1
- package/build/assets/confirmation-modal-Dv1ktp8K.js +0 -1
- package/build/assets/conversation-BbGrAO4Z.js +0 -93
- package/build/assets/conversation-mYT6NAoj.js +0 -1
- package/build/assets/conversation-panel-mYT6NAoj.js +0 -1
- package/build/assets/conversation-state-store-B0ImPLHO.js +0 -1
- package/build/assets/conversation-store-Ca3ghXap.js +0 -6
- package/build/assets/copy-to-clipboard-button-Ca8iSkkA.js +0 -1
- package/build/assets/device-verify-Bhn2e_Ye.js +0 -1
- package/build/assets/edit-automation-modal-DadGbJ2u.js +0 -1
- package/build/assets/empty-state-BoGVDecT.js +0 -1
- package/build/assets/enum-filter-dropdown-Bgca129f.js +0 -1
- package/build/assets/environment-switch-overlay-BmBRT7gv.js +0 -1
- package/build/assets/error-state-Body8Ngd.js +0 -1
- package/build/assets/extensions-hub-CcDqq_vR.js +0 -1
- package/build/assets/extensions-navigation-Cr4yzYk4.js +0 -1
- package/build/assets/external-link-DKUlnCQV.js +0 -1
- package/build/assets/files-tab-D4o2VyE_.js +0 -1
- package/build/assets/format-model-name-CasAP3nd.js +0 -1
- package/build/assets/get-git-path-ChKDVHZp.js +0 -1
- package/build/assets/git-repo-dropdown-4ROKl2cB.js +0 -1
- package/build/assets/git-repo-dropdown-BkqzkMmM.js +0 -1
- package/build/assets/highlighted-source-view-BFRxGT_Q.js +0 -1
- package/build/assets/home-ChpSuepX.js +0 -1
- package/build/assets/home-DIsB440S.js +0 -1
- package/build/assets/home-automation-run-tooltip-BVNDWjAH.js +0 -1
- package/build/assets/home-store-CY9Ej0ux.js +0 -1
- package/build/assets/index-home-BdlrFIif.js +0 -1
- package/build/assets/info-B6RQawoW.js +0 -1
- package/build/assets/install-server-modal-Dpy89p4g.js +0 -1
- package/build/assets/kebab-menu-item-content-D8hSNGmm.js +0 -1
- package/build/assets/launch-IrTDEFCs.js +0 -1
- package/build/assets/list-filter-DsEK7NFC.js +0 -1
- package/build/assets/llm-not-configured-banner-CIFABh3K.js +0 -27
- package/build/assets/llm-settings-B9juXhIa.js +0 -1
- package/build/assets/llm-settings-De1d5dfr.js +0 -1
- package/build/assets/llm-subscription-service-BpJ0ouQo.js +0 -1
- package/build/assets/loader-circle-CC1au6hc.js +0 -1
- package/build/assets/manage-backends-modal-BrPV3oB-.js +0 -1
- package/build/assets/manifest-80fb1c29.js +0 -1
- package/build/assets/manifest-subpage-layout-CAOYzrYp.js +0 -1
- package/build/assets/markdown-renderer-BzTlxI8x.js +0 -8
- package/build/assets/mcp-BTs_SXfZ.js +0 -1
- package/build/assets/mcp-page-BEBYqH_K.js +0 -9
- package/build/assets/messages-DKV9cRc2.js +0 -41
- package/build/assets/modal-close-button-DDzdRvCs.js +0 -1
- package/build/assets/onboarding-DV_OXoeP.js +0 -1
- package/build/assets/onboarding-modal-rkyBYkeQ.js +0 -1
- package/build/assets/organization-service.api-DrYNkEN_.js +0 -1
- package/build/assets/pencil-47jAZH_V.js +0 -1
- package/build/assets/pin-By41Vl5J.js +0 -1
- package/build/assets/planner-tab-C9uZmhme.js +0 -1
- package/build/assets/plug-CG5HFcNG.js +0 -1
- package/build/assets/plugins-management-service-BMJgC3Ga.js +0 -1
- package/build/assets/plus-C7Slq-0I.js +0 -1
- package/build/assets/profiles-service.api-ChoKrL0l.js +0 -1
- package/build/assets/providers-BhMcY5nv.js +0 -1
- package/build/assets/proxy-9Fe1v5na.js +0 -1
- package/build/assets/recommended-automations-launcher-6ABrI9Cy.js +0 -1
- package/build/assets/refresh-cw-3q3Frrii.js +0 -1
- package/build/assets/root-Dc8YmC9F.js +0 -2
- package/build/assets/root-VDaypvK4.css +0 -1
- package/build/assets/root-layout-CXkhSPYh.js +0 -2
- package/build/assets/schema-field-D-y9-LDb.js +0 -1
- package/build/assets/scroll-fade-state-Dw-i4SGq.js +0 -1
- package/build/assets/sdk-section-page-BlFiizlG.js +0 -1
- package/build/assets/secret-form-BB7the8W.js +0 -1
- package/build/assets/secrets-service-ByZVENbp.js +0 -1
- package/build/assets/secrets-settings-B_GpxKW2.js +0 -1
- package/build/assets/settings-C0EWuBtA.js +0 -1
- package/build/assets/settings-dropdown-input-BcwylHs2.js +0 -1
- package/build/assets/settings-index-5w5UW2K3.js +0 -1
- package/build/assets/settings-input-Db-1g8Ql.js +0 -1
- package/build/assets/settings-modal-DfJ3tcJQ.js +0 -1
- package/build/assets/settings-service.api-DJ1r62Zr.js +0 -1
- package/build/assets/settings-switch-CS-dJDmA.js +0 -1
- package/build/assets/shared-conversation-CA5ISEDy.js +0 -1
- package/build/assets/shield-check-D2aCRd16.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-C_fb0Jki.js +0 -1
- package/build/assets/sidebar-store-DGqHkVLw.js +0 -1
- package/build/assets/skill-card-pill-row-B27-xyig.js +0 -1
- package/build/assets/skill-scope-B42H-XOc.js +0 -1
- package/build/assets/skills-plugins-tgF8EiXC.js +0 -1
- package/build/assets/skills-settings-BgJ9PaOe.js +0 -1
- package/build/assets/styled-tooltip-C4jf5Fv9.js +0 -1
- package/build/assets/task-list-tab-C5zcaktH.js +0 -1
- package/build/assets/toggle-switch-ChOLXv2n.js +0 -1
- package/build/assets/trash-2-D7K26eDO.js +0 -1
- package/build/assets/trash-D-HYiVYM.js +0 -1
- package/build/assets/triangle-alert-CtdXWHUI.js +0 -1
- package/build/assets/usage-tab-CVDffLPt.js +0 -1
- package/build/assets/use-acp-credential-form-XIQmpX6M.js +0 -1
- package/build/assets/use-activate-agent-profile-BLfmvDiG.js +0 -1
- package/build/assets/use-agent-profiles-Bd9Bvvp1.js +0 -1
- package/build/assets/use-canvas-extensions-Bi693ujJ.js +0 -1
- package/build/assets/use-config-A9QovgXO.js +0 -1
- package/build/assets/use-create-conversation-Dx3l7mFZ.js +0 -1
- package/build/assets/use-create-secret-B9cUFWRG.js +0 -1
- package/build/assets/use-has-permission-B3C8rQmR.js +0 -1
- package/build/assets/use-is-authed-nTBcM7dE.js +0 -1
- package/build/assets/use-llm-configured-BV9nZ1_j.js +0 -1
- package/build/assets/use-llm-profiles-BO-P4Oyo.js +0 -1
- package/build/assets/use-manifest-capabilities-Cw_flwEz.js +0 -1
- package/build/assets/use-onboarding-completion-D8U7k4Qb.js +0 -1
- package/build/assets/use-pinned-home-route-CckOZrmb.js +0 -1
- package/build/assets/use-plugins-marketplace-7i94Zu3Z.js +0 -1
- package/build/assets/use-save-agent-profile-BUjSsDXK.js +0 -1
- package/build/assets/use-settings-DSXLbvBl.js +0 -1
- package/build/assets/use-settings-nav-items-CwRw-CmX.js +0 -16
- package/build/assets/use-tracking-D53y3TH9.js +0 -3
- package/build/assets/useQueries-DlbhlH9I.js +0 -1
- package/build/assets/useQuery-BSTgq1rl.js +0 -1
- package/build/assets/utils-CN5ZfZy1.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js +0 -186
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js +0 -1
- package/build/assets/vendor~root-layout-C9Ju9DQg.js +0 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BWir3rJs.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js +0 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js +0 -1
- package/build/assets/x-DJdhbdmt.js +0 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +0 -2
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +0 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +0 -35
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +0 -247
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +0 -1
- package/dist/hooks/query/use-skills.cjs +0 -2
- package/dist/hooks/query/use-skills.cjs.map +0 -1
- package/dist/hooks/query/use-skills.d.ts +0 -7
- package/dist/hooks/query/use-skills.js +0 -13
- package/dist/hooks/query/use-skills.js.map +0 -1
- package/dist/hooks/use-has-permission.cjs +0 -2
- package/dist/hooks/use-has-permission.cjs.map +0 -1
- package/dist/hooks/use-has-permission.d.ts +0 -1
- package/dist/hooks/use-has-permission.js +0 -8
- package/dist/hooks/use-has-permission.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js +0 -14
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message.js","names":[],"sources":["../../../../src/components/features/chat/chat-message.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { cn } from \"#/utils/utils\";\nimport { CopyToClipboardButton } from \"#/components/shared/buttons/copy-to-clipboard-button\";\nimport type { SourceType } from \"#/types/agent-server/core/base/common\";\nimport { StyledTooltip } from \"#/components/shared/buttons/styled-tooltip\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { TextShimmer } from \"#/components/shared/text-shimmer\";\nimport { MarkdownRenderer } from \"../markdown/markdown-renderer\";\nimport { PendingStopIcon } from \"./pending-stop-icon\";\nimport {\n UserMessageBody,\n chatBubbleMarkdownComponents,\n USER_MESSAGE_LINE_HEIGHT_PX,\n} from \"./user-message-body\";\n\nexport type ChatMessagePendingStatus = \"sending\" | \"error\";\n\ninterface ChatMessageProps {\n type: SourceType;\n message: string;\n actions?: Array<{\n icon: React.ReactNode;\n onClick: () => void;\n tooltip?: string;\n }>;\n isFromPlanningAgent?: boolean;\n pendingStatus?: ChatMessagePendingStatus;\n onRetry?: () => void;\n onDismiss?: () => void;\n onStop?: () => void;\n}\n\nexport function ChatMessage({\n type,\n message,\n children,\n actions,\n isFromPlanningAgent = false,\n pendingStatus,\n onRetry,\n onDismiss,\n onStop,\n}: React.PropsWithChildren<ChatMessageProps>) {\n const { t } = useTranslation(\"openhands\");\n const [isHovering, setIsHovering] = React.useState(false);\n const [isCopy, setIsCopy] = React.useState(false);\n const [isExpanded, setIsExpanded] = React.useState(false);\n const [isTruncatable, setIsTruncatable] = React.useState(false);\n const [isSingleLinePendingMessage, setIsSingleLinePendingMessage] =\n React.useState(true);\n const pendingMessageContentRef = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n setIsExpanded(false);\n }, [message]);\n\n const handleCopyToClipboard = async () => {\n await navigator.clipboard.writeText(message);\n setIsCopy(true);\n };\n\n React.useEffect(() => {\n let timeout: NodeJS.Timeout;\n\n if (isCopy) {\n timeout = setTimeout(() => {\n setIsCopy(false);\n }, 2000);\n }\n\n return () => {\n clearTimeout(timeout);\n };\n }, [isCopy]);\n\n const isPendingUserMessage =\n type === \"user\" &&\n (pendingStatus === \"error\" || pendingStatus === \"sending\");\n const canStopPendingMessage = pendingStatus === \"sending\" && onStop != null;\n const showStopButton = canStopPendingMessage && isHovering;\n const useTruncatedUserBody = type === \"user\" && pendingStatus == null;\n const isCollapsed = useTruncatedUserBody && isTruncatable && !isExpanded;\n const hasBubbleChildren = React.Children.count(children) > 0;\n\n React.useLayoutEffect(() => {\n if (!canStopPendingMessage || useTruncatedUserBody) {\n return undefined;\n }\n\n const content = pendingMessageContentRef.current;\n if (!content) {\n return undefined;\n }\n\n const measure = () => {\n const lineHeight = Number.parseFloat(\n getComputedStyle(content).lineHeight,\n );\n const linePx =\n Number.isFinite(lineHeight) && lineHeight > 0\n ? lineHeight\n : USER_MESSAGE_LINE_HEIGHT_PX;\n\n setIsSingleLinePendingMessage(content.scrollHeight <= linePx + 1);\n };\n\n measure();\n\n const observer = new ResizeObserver(measure);\n observer.observe(content);\n\n return () => observer.disconnect();\n }, [message, canStopPendingMessage, useTruncatedUserBody]);\n\n const messageContent = useTruncatedUserBody ? (\n <UserMessageBody\n message={message}\n isHovering={isHovering}\n isExpanded={isExpanded}\n onTruncatableChange={setIsTruncatable}\n />\n ) : (\n <div\n ref={pendingMessageContentRef}\n className=\"min-w-0 text-sm leading-6 whitespace-normal [word-break:break-word]\"\n >\n <MarkdownRenderer\n includeStandard\n includeHeadings\n allowHtml={type !== \"user\"}\n components={chatBubbleMarkdownComponents}\n >\n {message}\n </MarkdownRenderer>\n </div>\n );\n\n const renderedMessageContent = messageContent;\n\n const messageBubble = (\n <article\n data-testid={`${type}-message`}\n data-pending-status={pendingStatus}\n onMouseEnter={() => setIsHovering(true)}\n onMouseLeave={() => setIsHovering(false)}\n className={cn(\n \"rounded-xl relative w-fit max-w-full flex flex-col\",\n hasBubbleChildren && \"gap-2\",\n type === \"user\" && \"mt-6 bg-tertiary self-end px-4 py-2.5\",\n type === \"agent\" && \"mt-6 w-full max-w-full bg-transparent\",\n isFromPlanningAgent &&\n type === \"agent\" &&\n \"border border-[#597ff4] bg-tertiary p-4 mt-2\",\n pendingStatus === \"error\" &&\n \"border border-[var(--oh-status-error)]/40\",\n !isPendingUserMessage && \"last:mb-4\",\n )}\n >\n <div\n className={cn(\n \"absolute -top-2.5 -right-2.5 z-10\",\n !isHovering || pendingStatus === \"sending\" ? \"hidden\" : \"flex\",\n \"items-center gap-1\",\n )}\n onClick={(event) => event.stopPropagation()}\n >\n {actions?.map((action, index) =>\n action.tooltip ? (\n <StyledTooltip key={index} content={action.tooltip} placement=\"top\">\n <button\n type=\"button\"\n onClick={action.onClick}\n className=\"button-base p-1 cursor-pointer\"\n aria-label={action.tooltip}\n >\n {action.icon}\n </button>\n </StyledTooltip>\n ) : (\n <button\n key={index}\n type=\"button\"\n onClick={action.onClick}\n className=\"button-base p-1 cursor-pointer\"\n aria-label={`Action ${index + 1}`}\n >\n {action.icon}\n </button>\n ),\n )}\n\n <CopyToClipboardButton\n isHidden={!isHovering}\n isDisabled={isCopy}\n onClick={handleCopyToClipboard}\n mode={isCopy ? \"copied\" : \"copy\"}\n />\n </div>\n\n {renderedMessageContent}\n\n {canStopPendingMessage ? (\n <button\n type=\"button\"\n onClick={(event) => {\n event.stopPropagation();\n onStop?.();\n }}\n data-testid=\"chat-message-stop\"\n aria-label={t(I18nKey.BUTTON$STOP)}\n aria-hidden={!showStopButton}\n tabIndex={showStopButton ? 0 : -1}\n className={cn(\n \"group absolute z-10 inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-full bg-[var(--oh-color-tertiary)] text-[var(--oh-foreground)] transition-opacity duration-150\",\n isSingleLinePendingMessage\n ? \"right-3 top-1/2 -translate-y-1/2\"\n : \"right-3 bottom-2.5\",\n showStopButton ? \"opacity-100\" : \"pointer-events-none opacity-0\",\n )}\n >\n <PendingStopIcon className=\"block h-7 w-7 max-w-none\" />\n </button>\n ) : null}\n\n {isCollapsed ? (\n <button\n type=\"button\"\n data-testid=\"chat-message-expand\"\n aria-expanded={false}\n aria-label={t(I18nKey.COMMON$VIEW_MORE)}\n className=\"absolute inset-0 z-[1] cursor-pointer rounded-xl border-0 bg-transparent p-0\"\n onClick={() => setIsExpanded(true)}\n />\n ) : null}\n\n {children}\n </article>\n );\n\n if (type === \"user\" && pendingStatus === \"error\") {\n return (\n <div className=\"flex w-fit max-w-full flex-col items-end gap-1.5 self-end last:mb-4\">\n {messageBubble}\n <div\n role=\"alert\"\n data-testid=\"chat-message-error\"\n className=\"flex items-center gap-2 text-xs text-[var(--oh-status-error)]\"\n >\n <span>{t(I18nKey.CHAT_INTERFACE$MESSAGE_SEND_FAILED)}</span>\n {onRetry ? (\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]\"\n data-testid=\"chat-message-retry\"\n >\n {t(I18nKey.CHAT_INTERFACE$MESSAGE_RETRY)}\n </button>\n ) : null}\n {onDismiss ? (\n <button\n type=\"button\"\n onClick={onDismiss}\n className=\"cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]\"\n data-testid=\"chat-message-dismiss\"\n >\n {t(I18nKey.CHAT_INTERFACE$MESSAGE_DISMISS)}\n </button>\n ) : null}\n </div>\n </div>\n );\n }\n\n if (type === \"user\" && pendingStatus === \"sending\") {\n return (\n <div className=\"flex w-full max-w-full flex-col last:mb-4\">\n {messageBubble}\n <div className=\"my-1 w-full py-1 text-sm\">\n <TextShimmer\n as=\"p\"\n role=\"status\"\n aria-live=\"polite\"\n data-testid=\"chat-message-sending\"\n className=\"block w-full text-sm font-normal\"\n duration={1}\n spread={2}\n >\n {t(I18nKey.CHAT_INTERFACE$MESSAGE_SENDING)}\n </TextShimmer>\n </div>\n </div>\n );\n }\n\n return messageBubble;\n}\n"],"mappings":";;;;;;;;;;;;AAiCA,SAAgB,EAAY,EAC1B,SACA,YACA,aACA,YACA,yBAAsB,IACtB,kBACA,YACA,cACA,aAC4C;CAC5C,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,CAAC,GAAY,KAAiB,EAAM,SAAS,EAAK,GAClD,CAAC,GAAQ,KAAa,EAAM,SAAS,EAAK,GAC1C,CAAC,GAAY,KAAiB,EAAM,SAAS,EAAK,GAClD,CAAC,G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;IACf,cAAY,EAAE,EAAQ,gBAAgB;IACtC,WAAU;IACV,eAAe,EAAc,EAAI;GAClC,CAAA,IACC;GAEH;EACM;;CA2DX,OAxDI,MAAS,UAAU,MAAkB,UAErC,kBAAC,OAAD;EAAK,WAAU;YAAf,CACG,GACD,kBAAC,OAAD;GACE,MAAK;GACL,eAAY;GACZ,WAAU;aAHZ;IAKE,kBAAC,QAAD,EAAA,UAAO,EAAE,EAAQ,kCAAkC,EAAQ,CAAA;IAC1D,IACC,kBAAC,UAAD;KACE,MAAK;KACL,SAAS;KACT,WAAU;KACV,eAAY;eAEX,EAAE,EAAQ,4BAA4B;IACjC,CAAA,IACN;IACH,IACC,kBAAC,UAAD;KACE,MAAK;KACL,SAAS;KACT,WAAU;KACV,eAAY;eAEX,EAAE,EAAQ,8BAA8B;IACnC,CAAA,IACN;GACD;IACF;MAIL,MAAS,UAAU,MAAkB,YAErC,kBAAC,OAAD;EAAK,WAAU;YAAf,CACG,GACD,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,GAAD;IACE,IAAG;IACH,MAAK;IACL,aAAU;IACV,eAAY;IACZ,WAAU;IACV,UAAU;IACV,QAAQ;cAEP,EAAE,EAAQ,8BAA8B;GAC9B,CAAA;EACV,CAAA,CACF;MAIF;AACT"}
|
|
1
|
+
{"version":3,"file":"chat-message.js","names":[],"sources":["../../../../src/components/features/chat/chat-message.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { cn } from \"#/utils/utils\";\nimport { CopyToClipboardButton } from \"#/components/shared/buttons/copy-to-clipboard-button\";\nimport type { SourceType } from \"#/types/agent-server/core/base/common\";\nimport { StyledTooltip } from \"#/components/shared/buttons/styled-tooltip\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { TextShimmer } from \"#/components/shared/text-shimmer\";\nimport { formatEventTimestamp } from \"#/utils/format-event-timestamp\";\nimport { MarkdownRenderer } from \"../markdown/markdown-renderer\";\nimport { PendingStopIcon } from \"./pending-stop-icon\";\nimport {\n UserMessageBody,\n chatBubbleMarkdownComponents,\n USER_MESSAGE_LINE_HEIGHT_PX,\n} from \"./user-message-body\";\n\nexport type ChatMessagePendingStatus = \"sending\" | \"error\";\n\ninterface ChatMessageProps {\n type: SourceType;\n message: string;\n actions?: Array<{\n icon: React.ReactNode;\n onClick: () => void;\n tooltip?: string;\n }>;\n isFromPlanningAgent?: boolean;\n pendingStatus?: ChatMessagePendingStatus;\n onRetry?: () => void;\n onDismiss?: () => void;\n onStop?: () => void;\n timestamp?: string;\n}\n\nexport function ChatMessage({\n type,\n message,\n children,\n actions,\n isFromPlanningAgent = false,\n pendingStatus,\n onRetry,\n onDismiss,\n onStop,\n timestamp,\n}: React.PropsWithChildren<ChatMessageProps>) {\n const { t, i18n } = useTranslation(\"openhands\");\n const [isHovering, setIsHovering] = React.useState(false);\n const [isCopy, setIsCopy] = React.useState(false);\n const [isExpanded, setIsExpanded] = React.useState(false);\n const [isTruncatable, setIsTruncatable] = React.useState(false);\n const [isSingleLinePendingMessage, setIsSingleLinePendingMessage] =\n React.useState(true);\n const pendingMessageContentRef = React.useRef<HTMLDivElement>(null);\n const timestampLabel = formatEventTimestamp(timestamp, i18n?.language);\n\n React.useEffect(() => {\n setIsExpanded(false);\n }, [message]);\n\n const handleCopyToClipboard = async () => {\n await navigator.clipboard.writeText(message);\n setIsCopy(true);\n };\n\n React.useEffect(() => {\n let timeout: NodeJS.Timeout;\n\n if (isCopy) {\n timeout = setTimeout(() => {\n setIsCopy(false);\n }, 2000);\n }\n\n return () => {\n clearTimeout(timeout);\n };\n }, [isCopy]);\n\n const isPendingUserMessage =\n type === \"user\" &&\n (pendingStatus === \"error\" || pendingStatus === \"sending\");\n const canStopPendingMessage = pendingStatus === \"sending\" && onStop != null;\n const showStopButton = canStopPendingMessage && isHovering;\n const useTruncatedUserBody = type === \"user\" && pendingStatus == null;\n const isCollapsed = useTruncatedUserBody && isTruncatable && !isExpanded;\n const hasBubbleChildren = React.Children.count(children) > 0;\n\n React.useLayoutEffect(() => {\n if (!canStopPendingMessage || useTruncatedUserBody) {\n return undefined;\n }\n\n const content = pendingMessageContentRef.current;\n if (!content) {\n return undefined;\n }\n\n const measure = () => {\n const lineHeight = Number.parseFloat(\n getComputedStyle(content).lineHeight,\n );\n const linePx =\n Number.isFinite(lineHeight) && lineHeight > 0\n ? lineHeight\n : USER_MESSAGE_LINE_HEIGHT_PX;\n\n setIsSingleLinePendingMessage(content.scrollHeight <= linePx + 1);\n };\n\n measure();\n\n const observer = new ResizeObserver(measure);\n observer.observe(content);\n\n return () => observer.disconnect();\n }, [message, canStopPendingMessage, useTruncatedUserBody]);\n\n const messageContent = useTruncatedUserBody ? (\n <UserMessageBody\n message={message}\n isHovering={isHovering}\n isExpanded={isExpanded}\n onTruncatableChange={setIsTruncatable}\n />\n ) : (\n <div\n ref={pendingMessageContentRef}\n className=\"min-w-0 text-sm leading-6 whitespace-normal [word-break:break-word]\"\n >\n <MarkdownRenderer\n includeStandard\n includeHeadings\n allowHtml={type !== \"user\"}\n components={chatBubbleMarkdownComponents}\n >\n {message}\n </MarkdownRenderer>\n </div>\n );\n\n const renderedMessageContent = messageContent;\n\n const messageBubble = (\n <article\n data-testid={`${type}-message`}\n data-pending-status={pendingStatus}\n onMouseEnter={() => setIsHovering(true)}\n onMouseLeave={() => setIsHovering(false)}\n className={cn(\n \"rounded-xl relative w-fit max-w-full flex flex-col\",\n hasBubbleChildren && \"gap-2\",\n type === \"user\" && \"mt-6 bg-tertiary self-end px-4 py-2.5\",\n type === \"agent\" && \"mt-6 w-full max-w-full bg-transparent\",\n isFromPlanningAgent &&\n type === \"agent\" &&\n \"border border-[#597ff4] bg-tertiary p-4 mt-2\",\n pendingStatus === \"error\" &&\n \"border border-[var(--oh-status-error)]/40\",\n !isPendingUserMessage && \"last:mb-4\",\n )}\n >\n <div\n className={cn(\n \"absolute -top-2.5 -right-2.5 z-10\",\n !isHovering || pendingStatus === \"sending\" ? \"hidden\" : \"flex\",\n \"items-center gap-1\",\n )}\n onClick={(event) => event.stopPropagation()}\n >\n {actions?.map((action, index) =>\n action.tooltip ? (\n <StyledTooltip key={index} content={action.tooltip} placement=\"top\">\n <button\n type=\"button\"\n onClick={action.onClick}\n className=\"button-base p-1 cursor-pointer\"\n aria-label={action.tooltip}\n >\n {action.icon}\n </button>\n </StyledTooltip>\n ) : (\n <button\n key={index}\n type=\"button\"\n onClick={action.onClick}\n className=\"button-base p-1 cursor-pointer\"\n aria-label={`Action ${index + 1}`}\n >\n {action.icon}\n </button>\n ),\n )}\n\n <CopyToClipboardButton\n isHidden={!isHovering}\n isDisabled={isCopy}\n onClick={handleCopyToClipboard}\n mode={isCopy ? \"copied\" : \"copy\"}\n />\n </div>\n\n {renderedMessageContent}\n\n {canStopPendingMessage ? (\n <button\n type=\"button\"\n onClick={(event) => {\n event.stopPropagation();\n onStop?.();\n }}\n data-testid=\"chat-message-stop\"\n aria-label={t(I18nKey.BUTTON$STOP)}\n aria-hidden={!showStopButton}\n tabIndex={showStopButton ? 0 : -1}\n className={cn(\n \"group absolute z-10 inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-full bg-[var(--oh-color-tertiary)] text-[var(--oh-foreground)] transition-opacity duration-150\",\n isSingleLinePendingMessage\n ? \"right-3 top-1/2 -translate-y-1/2\"\n : \"right-3 bottom-2.5\",\n showStopButton ? \"opacity-100\" : \"pointer-events-none opacity-0\",\n )}\n >\n <PendingStopIcon className=\"block h-7 w-7 max-w-none\" />\n </button>\n ) : null}\n\n {isCollapsed ? (\n <button\n type=\"button\"\n data-testid=\"chat-message-expand\"\n aria-expanded={false}\n aria-label={t(I18nKey.COMMON$VIEW_MORE)}\n className=\"absolute inset-0 z-[1] cursor-pointer rounded-xl border-0 bg-transparent p-0\"\n onClick={() => setIsExpanded(true)}\n />\n ) : null}\n\n {children}\n </article>\n );\n\n const messageBubbleWithTimestamp = timestampLabel ? (\n <StyledTooltip\n content={<time dateTime={timestamp}>{timestampLabel}</time>}\n placement=\"top\"\n isOpen={isHovering}\n >\n {messageBubble}\n </StyledTooltip>\n ) : (\n messageBubble\n );\n\n if (type === \"user\" && pendingStatus === \"error\") {\n return (\n <div className=\"flex w-fit max-w-full flex-col items-end gap-1.5 self-end last:mb-4\">\n {messageBubbleWithTimestamp}\n <div\n role=\"alert\"\n data-testid=\"chat-message-error\"\n className=\"flex items-center gap-2 text-xs text-[var(--oh-status-error)]\"\n >\n <span>{t(I18nKey.CHAT_INTERFACE$MESSAGE_SEND_FAILED)}</span>\n {onRetry ? (\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]\"\n data-testid=\"chat-message-retry\"\n >\n {t(I18nKey.CHAT_INTERFACE$MESSAGE_RETRY)}\n </button>\n ) : null}\n {onDismiss ? (\n <button\n type=\"button\"\n onClick={onDismiss}\n className=\"cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]\"\n data-testid=\"chat-message-dismiss\"\n >\n {t(I18nKey.CHAT_INTERFACE$MESSAGE_DISMISS)}\n </button>\n ) : null}\n </div>\n </div>\n );\n }\n\n if (type === \"user\" && pendingStatus === \"sending\") {\n return (\n <div className=\"flex w-full max-w-full flex-col last:mb-4\">\n {messageBubbleWithTimestamp}\n <div className=\"my-1 w-full py-1 text-sm\">\n <TextShimmer\n as=\"p\"\n role=\"status\"\n aria-live=\"polite\"\n data-testid=\"chat-message-sending\"\n className=\"block w-full text-sm font-normal\"\n duration={1}\n spread={2}\n >\n {t(I18nKey.CHAT_INTERFACE$MESSAGE_SENDING)}\n </TextShimmer>\n </div>\n </div>\n );\n }\n\n return messageBubbleWithTimestamp;\n}\n"],"mappings":";;;;;;;;;;;;;AAmCA,SAAgB,EAAY,EAC1B,SACA,YACA,aACA,YACA,yBAAsB,IACtB,kBACA,Y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tual/_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("../../../../utils/form-control-classes.cjs"),o=require("../../../../utils/format-model-name.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("../../../../utils/form-control-classes.cjs"),o=require("../../../../hooks/query/use-free-models.cjs"),s=require("../../../../utils/format-model-name.cjs"),c=require("../../../../ui/typography.cjs"),l=require("../../../../ui/combobox-caret.cjs"),u=require("../../../../ui/context-menu.cjs"),d=require("../../context-menu/context-menu-list-item.cjs"),f=require("../../../../hooks/use-click-outside-element.cjs"),p=require("../../../../icons/settings-gear.cjs"),m=require("../../../shared/navigation-link.cjs"),h=require("../../../../ui/divider.cjs"),g=require("../../../../hooks/use-chat-input-llm-profile-state.cjs");let _=require("react");_=e.__toESM(_,1);let v=require("react/jsx-runtime");var y=18;function b(e){return e.length<=y?e:`${e.slice(0,y)}…`}function x({onClose:e,dividerInset:a,settingsLinkClassName:l,settingsIconClassName:u}){let{t:f}=t.useTranslation(`openhands`),_=o.useFreeModels(),{profiles:y,currentProfileName:b,currentProfileModel:x,canSwitchProfile:S,selectProfile:C}=g.useChatInputLlmProfileState(),w=S&&y.length>0,T=S?null:b,E=t=>{C(t),e()};return(0,v.jsxs)(v.Fragment,{children:[w&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`li`,{role:`presentation`,className:`px-2 pt-1 pb-0.5`,children:(0,v.jsx)(c.Typography.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4`,children:f(n.I18nKey.SETTINGS$AVAILABLE_PROFILES)})}),y.map(t=>{let n=t.name===b,a=s.formatModelPillLabel(t.model,_);return(0,v.jsxs)(d.ContextMenuListItem,{testId:`chat-input-llm-profile-option-${t.name}`,onClick:r=>{if(r.preventDefault(),r.stopPropagation(),n){e();return}E(t.name)},className:r.cn(`flex flex-col items-stretch gap-0.5`,n&&`bg-[var(--oh-interactive-hover)]`),children:[(0,v.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`span`,{className:`flex-1 truncate text-sm leading-5`,title:t.model??t.name,children:t.name}),n&&(0,v.jsx)(i.default,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]}),a&&(0,v.jsx)(`span`,{className:`block truncate text-xs leading-4 text-[var(--oh-muted)]`,children:a})]},t.name)})]}),T&&(0,v.jsx)(`li`,{className:`text-sm`,"data-testid":`chat-input-llm-profile-current`,children:(0,v.jsxs)(`div`,{className:`flex flex-col gap-0.5 p-2 leading-5 text-[var(--oh-foreground)]`,children:[(0,v.jsx)(`span`,{className:`truncate`,title:T,children:T}),x&&(0,v.jsx)(`span`,{className:`truncate text-xs leading-4 text-[var(--oh-muted)]`,children:s.formatModelPillLabel(x,_)})]})}),(w||T)&&(0,v.jsx)(h.Divider,{inset:a}),(0,v.jsx)(`li`,{className:`text-sm`,children:(0,v.jsxs)(m.NavigationLink,{to:`/settings/llm`,onClick:e,className:r.cn(`flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors`,l),children:[(0,v.jsx)(p.default,{width:16,height:16,className:r.cn(`shrink-0`,u),"aria-hidden":!0}),(0,v.jsx)(`span`,{children:f(n.I18nKey.SETTINGS$LLM_PROFILES)})]})})]})}function S(){let{t:e}=t.useTranslation(`openhands`),{profiles:i,currentProfileName:o,isLoading:s,isSwitching:c}=g.useChatInputLlmProfileState(),[d,p]=_.default.useState(!1),m=_.default.useRef(null),h=f.useClickOutsideElement(()=>p(!1),m);if(s||i.length===0)return null;let y=o??e(n.I18nKey.LLM$SELECT_MODEL_PLACEHOLDER);return(0,v.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,v.jsxs)(`button`,{ref:m,type:`button`,className:r.cn(a.chatInputPillButtonClassName,`max-w-[200px]`),title:o??void 0,"data-testid":`chat-input-llm-profile`,"aria-expanded":d,"aria-haspopup":`dialog`,disabled:c,"aria-busy":c,onClick:e=>{e.preventDefault(),e.stopPropagation(),p(e=>!e)},children:[(0,v.jsx)(`span`,{className:`truncate`,children:b(y)}),(0,v.jsx)(l.ComboboxCaretInline,{isOpen:d})]}),d&&(0,v.jsx)(u.ContextMenu,{ref:h,testId:`chat-input-llm-profile-popover`,position:`top`,alignment:`left`,spacing:`none`,className:`z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto`,children:(0,v.jsx)(x,{onClose:()=>p(!1)})})]})}exports.ChatInputLlmProfileMenuContent=x,exports.ChatInputLlmProfilePicker=S;
|
|
2
2
|
//# sourceMappingURL=chat-input-llm-profile-picker.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-input-llm-profile-picker.cjs","names":[],"sources":["../../../../../src/components/features/chat/components/chat-input-llm-profile-picker.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useChatInputLlmProfileState } from \"#/hooks/use-chat-input-llm-profile-state\";\nimport { ComboboxCaretInline } from \"#/ui/combobox-caret\";\nimport SettingsGearIcon from \"#/icons/settings-gear.svg?react\";\nimport CheckIcon from \"#/icons/checkmark.svg?react\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { NavigationLink } from \"#/components/shared/navigation-link\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { ContextMenuListItem } from \"#/components/features/context-menu/context-menu-list-item\";\nimport { Divider } from \"#/ui/divider\";\nimport { Typography } from \"#/ui/typography\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { chatInputPillButtonClassName } from \"#/utils/form-control-classes\";\nimport { formatModelNameForDisplay } from \"#/utils/format-model-name\";\n\nconst PROFILE_LABEL_MAX_CHARS = 18;\n\nfunction truncateLabel(label: string): string {\n return label.length <= PROFILE_LABEL_MAX_CHARS\n ? label\n : `${label.slice(0, PROFILE_LABEL_MAX_CHARS)}…`;\n}\n\ninterface ChatInputLlmProfileMenuContentProps {\n onClose: () => void;\n dividerInset?: \"menu\";\n settingsLinkClassName?: string;\n settingsIconClassName?: string;\n}\n\n/**\n * The in-conversation OpenHands LLM-profile switcher list. Selecting a profile\n * live-swaps the running conversation's LLM via `/switch_profile` (the ACP\n * analog is {@link ChatInputModelMenuContent}). Shared by the inline pill and\n * the chat-input overflow submenu.\n */\nexport function ChatInputLlmProfileMenuContent({\n onClose,\n dividerInset,\n settingsLinkClassName,\n settingsIconClassName,\n}: ChatInputLlmProfileMenuContentProps) {\n const { t } = useTranslation(\"openhands\");\n const {\n profiles,\n currentProfileName,\n currentProfileModel,\n canSwitchProfile,\n selectProfile,\n } = useChatInputLlmProfileState();\n // Read-only surfaces (a cloud member on the home page, or a start-task route)\n // still name the active profile — the same shape ChatInputModelMenuContent\n // uses when the ACP picker is gated off.\n const showProfileList = canSwitchProfile && profiles.length > 0;\n const readOnlyProfileName = canSwitchProfile ? null : currentProfileName;\n\n const handleSelect = (profileName: string) => {\n selectProfile(profileName);\n onClose();\n };\n\n return (\n <>\n {showProfileList && (\n <>\n {/* role=\"presentation\" keeps this a valid <li> child of the\n ContextMenu <ul> without exposing the label as a menu item. */}\n <li role=\"presentation\" className=\"px-2 pt-1 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 </li>\n {profiles.map((profile) => {\n const isCurrent = profile.name === currentProfileName;\n const displayModel = formatModelNameForDisplay(profile.model);\n return (\n <ContextMenuListItem\n key={profile.name}\n testId={`chat-input-llm-profile-option-${profile.name}`}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n if (isCurrent) {\n onClose();\n return;\n }\n handleSelect(profile.name);\n }}\n className={cn(\n \"flex flex-col items-stretch gap-0.5\",\n isCurrent && \"bg-[var(--oh-interactive-hover)]\",\n )}\n >\n <span className=\"flex items-center gap-2\">\n <span\n className=\"flex-1 truncate text-sm leading-5\"\n title={profile.model ?? profile.name}\n >\n {profile.name}\n </span>\n {isCurrent && (\n <CheckIcon\n width={14}\n height={14}\n className=\"shrink-0\"\n aria-hidden\n />\n )}\n </span>\n {displayModel && (\n <span className=\"block truncate text-xs leading-4 text-[var(--oh-muted)]\">\n {displayModel}\n </span>\n )}\n </ContextMenuListItem>\n );\n })}\n </>\n )}\n {readOnlyProfileName && (\n <li className=\"text-sm\" data-testid=\"chat-input-llm-profile-current\">\n <div className=\"flex flex-col gap-0.5 p-2 leading-5 text-[var(--oh-foreground)]\">\n <span className=\"truncate\" title={readOnlyProfileName}>\n {readOnlyProfileName}\n </span>\n {currentProfileModel && (\n <span className=\"truncate text-xs leading-4 text-[var(--oh-muted)]\">\n {formatModelNameForDisplay(currentProfileModel)}\n </span>\n )}\n </div>\n </li>\n )}\n {(showProfileList || readOnlyProfileName) && (\n <Divider inset={dividerInset} />\n )}\n <li className=\"text-sm\">\n <NavigationLink\n to=\"/settings/llm\"\n onClick={onClose}\n className={cn(\n \"flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors\",\n settingsLinkClassName,\n )}\n >\n <SettingsGearIcon\n width={16}\n height={16}\n className={cn(\"shrink-0\", settingsIconClassName)}\n aria-hidden\n />\n <span>{t(I18nKey.SETTINGS$LLM_PROFILES)}</span>\n </NavigationLink>\n </li>\n </>\n );\n}\n\nexport function ChatInputLlmProfilePicker() {\n const { t } = useTranslation(\"openhands\");\n const { profiles, currentProfileName, isLoading, isSwitching } =\n useChatInputLlmProfileState();\n const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const popoverRef = useClickOutsideElement<HTMLUListElement>(\n () => setIsPopoverOpen(false),\n triggerRef,\n );\n\n // No LLM profiles yet (or the agent-server lacks the surface): stay out of\n // the way, exactly like the ACP/AgentProfile pickers.\n if (isLoading || profiles.length === 0) {\n return null;\n }\n\n const label = currentProfileName ?? t(I18nKey.LLM$SELECT_MODEL_PLACEHOLDER);\n\n return (\n <div className=\"relative min-w-0\">\n <button\n ref={triggerRef}\n type=\"button\"\n className={cn(chatInputPillButtonClassName, \"max-w-[200px]\")}\n title={currentProfileName ?? undefined}\n data-testid=\"chat-input-llm-profile\"\n aria-expanded={isPopoverOpen}\n aria-haspopup=\"dialog\"\n // Disabled mid-switch so re-opening can't fire a second /switch_profile.\n disabled={isSwitching}\n aria-busy={isSwitching}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n setIsPopoverOpen((open) => !open);\n }}\n >\n <span className=\"truncate\">{truncateLabel(label)}</span>\n <ComboboxCaretInline isOpen={isPopoverOpen} />\n </button>\n\n {isPopoverOpen && (\n <ContextMenu\n ref={popoverRef}\n testId=\"chat-input-llm-profile-popover\"\n position=\"top\"\n alignment=\"left\"\n spacing=\"none\"\n className=\"z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto\"\n >\n <ChatInputLlmProfileMenuContent\n onClose={() => setIsPopoverOpen(false)}\n />\n </ContextMenu>\n )}\n </div>\n );\n}\n"],"mappings":"s5BAiBA,IAAM,EAA0B,GAEhC,SAAS,EAAc,EAAuB,CAC5C,OAAO,EAAM,QAAU,EACnB,EACA,GAAG,EAAM,MAAM,EAAG,CAAuB,EAAE,EACjD,CAeA,SAAgB,EAA+B,CAC7C,UACA,eACA,wBACA,yBACsC,CACtC,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,CACJ,WACA,qBACA,sBACA,mBACA,iBACE,EAAA,4BAA4B,EAI1B,EAAkB,GAAoB,EAAS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ACtB,EAAkB,GAAS,CAAC,CAAI,CAClC,WAfF,EAiBE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,oBAAY,EAAc,CAAK,CAAQ,CAAA,GACvD,EAAA,EAAA,KAAC,EAAA,oBAAD,CAAqB,OAAQ,CAAgB,CAAA,CACvC,IAEP,IACC,EAAA,EAAA,KAAC,EAAA,YAAD,CACE,IAAK,EACL,OAAO,iCACP,SAAS,MACT,UAAU,OACV,QAAQ,OACR,UAAU,iFAEV,EAAA,EAAA,KAAC,EAAD,CACE,YAAe,EAAiB,EAAK,CACtC,CAAA,CACU,CAAA,CAEZ,GAET"}
|
|
1
|
+
{"version":3,"file":"chat-input-llm-profile-picker.cjs","names":[],"sources":["../../../../../src/components/features/chat/components/chat-input-llm-profile-picker.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useChatInputLlmProfileState } from \"#/hooks/use-chat-input-llm-profile-state\";\nimport { ComboboxCaretInline } from \"#/ui/combobox-caret\";\nimport SettingsGearIcon from \"#/icons/settings-gear.svg?react\";\nimport CheckIcon from \"#/icons/checkmark.svg?react\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { NavigationLink } from \"#/components/shared/navigation-link\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { ContextMenuListItem } from \"#/components/features/context-menu/context-menu-list-item\";\nimport { Divider } from \"#/ui/divider\";\nimport { Typography } from \"#/ui/typography\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { chatInputPillButtonClassName } from \"#/utils/form-control-classes\";\nimport { useFreeModels } from \"#/hooks/query/use-free-models\";\nimport { formatModelPillLabel } from \"#/utils/format-model-name\";\n\nconst PROFILE_LABEL_MAX_CHARS = 18;\n\nfunction truncateLabel(label: string): string {\n return label.length <= PROFILE_LABEL_MAX_CHARS\n ? label\n : `${label.slice(0, PROFILE_LABEL_MAX_CHARS)}…`;\n}\n\ninterface ChatInputLlmProfileMenuContentProps {\n onClose: () => void;\n dividerInset?: \"menu\";\n settingsLinkClassName?: string;\n settingsIconClassName?: string;\n}\n\n/**\n * The in-conversation OpenHands LLM-profile switcher list. Selecting a profile\n * live-swaps the running conversation's LLM via `/switch_profile` (the ACP\n * analog is {@link ChatInputModelMenuContent}). Shared by the inline pill and\n * the chat-input overflow submenu.\n */\nexport function ChatInputLlmProfileMenuContent({\n onClose,\n dividerInset,\n settingsLinkClassName,\n settingsIconClassName,\n}: ChatInputLlmProfileMenuContentProps) {\n const { t } = useTranslation(\"openhands\");\n const freeModels = useFreeModels();\n const {\n profiles,\n currentProfileName,\n currentProfileModel,\n canSwitchProfile,\n selectProfile,\n } = useChatInputLlmProfileState();\n // Read-only surfaces (a cloud member on the home page, or a start-task route)\n // still name the active profile — the same shape ChatInputModelMenuContent\n // uses when the ACP picker is gated off.\n const showProfileList = canSwitchProfile && profiles.length > 0;\n const readOnlyProfileName = canSwitchProfile ? null : currentProfileName;\n\n const handleSelect = (profileName: string) => {\n selectProfile(profileName);\n onClose();\n };\n\n return (\n <>\n {showProfileList && (\n <>\n {/* role=\"presentation\" keeps this a valid <li> child of the\n ContextMenu <ul> without exposing the label as a menu item. */}\n <li role=\"presentation\" className=\"px-2 pt-1 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 </li>\n {profiles.map((profile) => {\n const isCurrent = profile.name === currentProfileName;\n const displayModel = formatModelPillLabel(\n profile.model,\n freeModels,\n );\n return (\n <ContextMenuListItem\n key={profile.name}\n testId={`chat-input-llm-profile-option-${profile.name}`}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n if (isCurrent) {\n onClose();\n return;\n }\n handleSelect(profile.name);\n }}\n className={cn(\n \"flex flex-col items-stretch gap-0.5\",\n isCurrent && \"bg-[var(--oh-interactive-hover)]\",\n )}\n >\n <span className=\"flex items-center gap-2\">\n <span\n className=\"flex-1 truncate text-sm leading-5\"\n title={profile.model ?? profile.name}\n >\n {profile.name}\n </span>\n {isCurrent && (\n <CheckIcon\n width={14}\n height={14}\n className=\"shrink-0\"\n aria-hidden\n />\n )}\n </span>\n {displayModel && (\n <span className=\"block truncate text-xs leading-4 text-[var(--oh-muted)]\">\n {displayModel}\n </span>\n )}\n </ContextMenuListItem>\n );\n })}\n </>\n )}\n {readOnlyProfileName && (\n <li className=\"text-sm\" data-testid=\"chat-input-llm-profile-current\">\n <div className=\"flex flex-col gap-0.5 p-2 leading-5 text-[var(--oh-foreground)]\">\n <span className=\"truncate\" title={readOnlyProfileName}>\n {readOnlyProfileName}\n </span>\n {currentProfileModel && (\n <span className=\"truncate text-xs leading-4 text-[var(--oh-muted)]\">\n {formatModelPillLabel(currentProfileModel, freeModels)}\n </span>\n )}\n </div>\n </li>\n )}\n {(showProfileList || readOnlyProfileName) && (\n <Divider inset={dividerInset} />\n )}\n <li className=\"text-sm\">\n <NavigationLink\n to=\"/settings/llm\"\n onClick={onClose}\n className={cn(\n \"flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors\",\n settingsLinkClassName,\n )}\n >\n <SettingsGearIcon\n width={16}\n height={16}\n className={cn(\"shrink-0\", settingsIconClassName)}\n aria-hidden\n />\n <span>{t(I18nKey.SETTINGS$LLM_PROFILES)}</span>\n </NavigationLink>\n </li>\n </>\n );\n}\n\nexport function ChatInputLlmProfilePicker() {\n const { t } = useTranslation(\"openhands\");\n const { profiles, currentProfileName, isLoading, isSwitching } =\n useChatInputLlmProfileState();\n const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const popoverRef = useClickOutsideElement<HTMLUListElement>(\n () => setIsPopoverOpen(false),\n triggerRef,\n );\n\n // No LLM profiles yet (or the agent-server lacks the surface): stay out of\n // the way, exactly like the ACP/AgentProfile pickers.\n if (isLoading || profiles.length === 0) {\n return null;\n }\n\n const label = currentProfileName ?? t(I18nKey.LLM$SELECT_MODEL_PLACEHOLDER);\n\n return (\n <div className=\"relative min-w-0\">\n <button\n ref={triggerRef}\n type=\"button\"\n className={cn(chatInputPillButtonClassName, \"max-w-[200px]\")}\n title={currentProfileName ?? undefined}\n data-testid=\"chat-input-llm-profile\"\n aria-expanded={isPopoverOpen}\n aria-haspopup=\"dialog\"\n // Disabled mid-switch so re-opening can't fire a second /switch_profile.\n disabled={isSwitching}\n aria-busy={isSwitching}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n setIsPopoverOpen((open) => !open);\n }}\n >\n <span className=\"truncate\">{truncateLabel(label)}</span>\n <ComboboxCaretInline isOpen={isPopoverOpen} />\n </button>\n\n {isPopoverOpen && (\n <ContextMenu\n ref={popoverRef}\n testId=\"chat-input-llm-profile-popover\"\n position=\"top\"\n alignment=\"left\"\n spacing=\"none\"\n className=\"z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto\"\n >\n <ChatInputLlmProfileMenuContent\n onClose={() => setIsPopoverOpen(false)}\n />\n </ContextMenu>\n )}\n </div>\n );\n}\n"],"mappings":"+8BAkBA,IAAM,EAA0B,GAEhC,SAAS,EAAc,EAAuB,CAC5C,OAAO,EAAM,QAAU,EACnB,EACA,GAAG,EAAM,MAAM,EAAG,CAAuB,EAAE,EACjD,CAeA,SAAgB,EAA+B,CAC7C,UACA,eACA,wBACA,yBACsC,CACtC,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,EAAa,EAAA,cAAc,EAC3B,CACJ,WACA,qBACA,sBACA,mBACA,iBACE,EAAA,4BAA4B,EAI1B,EAAkB,GAAoB,EAAS,OAAS,EACxD,EAAsB,EAAmB,KAAO,EAEhD,EAAgB,GAAwB,CAC5C,EAAc,CAAW,EACzB,EAAQ,CACV,EAEA,OACE,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAA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AC,EAAA,oBAAD,CAAqB,OAAQ,CAAgB,CAAA,CACvC,IAEP,IACC,EAAA,EAAA,KAAC,EAAA,YAAD,CACE,IAAK,EACL,OAAO,iCACP,SAAS,MACT,UAAU,OACV,QAAQ,OACR,UAAU,iFAEV,EAAA,EAAA,KAAC,EAAD,CACE,YAAe,EAAiB,EAAK,CACtC,CAAA,CACU,CAAA,CAEZ,GAET"}
|
|
@@ -3,132 +3,133 @@ 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 { chatInputPillButtonClassName as i } from "../../../../utils/form-control-classes.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import d from "../../../../
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import h from "
|
|
17
|
-
import
|
|
6
|
+
import { useFreeModels as a } from "../../../../hooks/query/use-free-models.js";
|
|
7
|
+
import { formatModelPillLabel as o } from "../../../../utils/format-model-name.js";
|
|
8
|
+
import { Typography as s } from "../../../../ui/typography.js";
|
|
9
|
+
import { ComboboxCaretInline as c } from "../../../../ui/combobox-caret.js";
|
|
10
|
+
import { ContextMenu as l } from "../../../../ui/context-menu.js";
|
|
11
|
+
import { ContextMenuListItem as u } from "../../context-menu/context-menu-list-item.js";
|
|
12
|
+
import { useClickOutsideElement as d } from "../../../../hooks/use-click-outside-element.js";
|
|
13
|
+
import f from "../../../../icons/settings-gear.js";
|
|
14
|
+
import { NavigationLink as p } from "../../../shared/navigation-link.js";
|
|
15
|
+
import { Divider as m } from "../../../../ui/divider.js";
|
|
16
|
+
import { useChatInputLlmProfileState as h } from "../../../../hooks/use-chat-input-llm-profile-state.js";
|
|
17
|
+
import g from "react";
|
|
18
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
18
19
|
//#region src/components/features/chat/components/chat-input-llm-profile-picker.tsx
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
return e.length <=
|
|
20
|
+
var b = 18;
|
|
21
|
+
function x(e) {
|
|
22
|
+
return e.length <= b ? e : `${e.slice(0, b)}…`;
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
-
let { t:
|
|
25
|
-
|
|
24
|
+
function S({ onClose: i, dividerInset: c, settingsLinkClassName: l, settingsIconClassName: d }) {
|
|
25
|
+
let { t: g } = e("openhands"), b = a(), { profiles: x, currentProfileName: S, currentProfileModel: C, canSwitchProfile: w, selectProfile: T } = h(), E = w && x.length > 0, D = w ? null : S, O = (e) => {
|
|
26
|
+
T(e), i();
|
|
26
27
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
|
|
28
|
+
return /* @__PURE__ */ y(_, { children: [
|
|
29
|
+
E && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("li", {
|
|
29
30
|
role: "presentation",
|
|
30
31
|
className: "px-2 pt-1 pb-0.5",
|
|
31
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ v(s.Text, {
|
|
32
33
|
className: "text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4",
|
|
33
|
-
children:
|
|
34
|
+
children: g(t.SETTINGS$AVAILABLE_PROFILES)
|
|
34
35
|
})
|
|
35
|
-
}),
|
|
36
|
-
let t = e.name ===
|
|
37
|
-
return /* @__PURE__ */
|
|
36
|
+
}), x.map((e) => {
|
|
37
|
+
let t = e.name === S, a = o(e.model, b);
|
|
38
|
+
return /* @__PURE__ */ y(u, {
|
|
38
39
|
testId: `chat-input-llm-profile-option-${e.name}`,
|
|
39
40
|
onClick: (n) => {
|
|
40
41
|
if (n.preventDefault(), n.stopPropagation(), t) {
|
|
41
42
|
i();
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
+
O(e.name);
|
|
45
46
|
},
|
|
46
47
|
className: n("flex flex-col items-stretch gap-0.5", t && "bg-[var(--oh-interactive-hover)]"),
|
|
47
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ y("span", {
|
|
48
49
|
className: "flex items-center gap-2",
|
|
49
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ v("span", {
|
|
50
51
|
className: "flex-1 truncate text-sm leading-5",
|
|
51
52
|
title: e.model ?? e.name,
|
|
52
53
|
children: e.name
|
|
53
|
-
}), t && /* @__PURE__ */
|
|
54
|
+
}), t && /* @__PURE__ */ v(r, {
|
|
54
55
|
width: 14,
|
|
55
56
|
height: 14,
|
|
56
57
|
className: "shrink-0",
|
|
57
58
|
"aria-hidden": !0
|
|
58
59
|
})]
|
|
59
|
-
}),
|
|
60
|
+
}), a && /* @__PURE__ */ v("span", {
|
|
60
61
|
className: "block truncate text-xs leading-4 text-[var(--oh-muted)]",
|
|
61
|
-
children:
|
|
62
|
+
children: a
|
|
62
63
|
})]
|
|
63
64
|
}, e.name);
|
|
64
65
|
})] }),
|
|
65
|
-
|
|
66
|
+
D && /* @__PURE__ */ v("li", {
|
|
66
67
|
className: "text-sm",
|
|
67
68
|
"data-testid": "chat-input-llm-profile-current",
|
|
68
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ y("div", {
|
|
69
70
|
className: "flex flex-col gap-0.5 p-2 leading-5 text-[var(--oh-foreground)]",
|
|
70
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ v("span", {
|
|
71
72
|
className: "truncate",
|
|
72
|
-
title:
|
|
73
|
-
children:
|
|
74
|
-
}),
|
|
73
|
+
title: D,
|
|
74
|
+
children: D
|
|
75
|
+
}), C && /* @__PURE__ */ v("span", {
|
|
75
76
|
className: "truncate text-xs leading-4 text-[var(--oh-muted)]",
|
|
76
|
-
children:
|
|
77
|
+
children: o(C, b)
|
|
77
78
|
})]
|
|
78
79
|
})
|
|
79
80
|
}),
|
|
80
|
-
(
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
(E || D) && /* @__PURE__ */ v(m, { inset: c }),
|
|
82
|
+
/* @__PURE__ */ v("li", {
|
|
82
83
|
className: "text-sm",
|
|
83
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ y(p, {
|
|
84
85
|
to: "/settings/llm",
|
|
85
86
|
onClick: i,
|
|
86
|
-
className: n("flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
87
|
+
className: n("flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors", l),
|
|
88
|
+
children: [/* @__PURE__ */ v(f, {
|
|
88
89
|
width: 16,
|
|
89
90
|
height: 16,
|
|
90
|
-
className: n("shrink-0",
|
|
91
|
+
className: n("shrink-0", d),
|
|
91
92
|
"aria-hidden": !0
|
|
92
|
-
}), /* @__PURE__ */
|
|
93
|
+
}), /* @__PURE__ */ v("span", { children: g(t.SETTINGS$LLM_PROFILES) })]
|
|
93
94
|
})
|
|
94
95
|
})
|
|
95
96
|
] });
|
|
96
97
|
}
|
|
97
|
-
function
|
|
98
|
-
let { t: r } = e("openhands"), { profiles: a, currentProfileName: o, isLoading:
|
|
99
|
-
if (
|
|
100
|
-
let
|
|
101
|
-
return /* @__PURE__ */
|
|
98
|
+
function C() {
|
|
99
|
+
let { t: r } = e("openhands"), { profiles: a, currentProfileName: o, isLoading: s, isSwitching: u } = h(), [f, p] = g.useState(!1), m = g.useRef(null), _ = d(() => p(!1), m);
|
|
100
|
+
if (s || a.length === 0) return null;
|
|
101
|
+
let b = o ?? r(t.LLM$SELECT_MODEL_PLACEHOLDER);
|
|
102
|
+
return /* @__PURE__ */ y("div", {
|
|
102
103
|
className: "relative min-w-0",
|
|
103
|
-
children: [/* @__PURE__ */
|
|
104
|
-
ref:
|
|
104
|
+
children: [/* @__PURE__ */ y("button", {
|
|
105
|
+
ref: m,
|
|
105
106
|
type: "button",
|
|
106
107
|
className: n(i, "max-w-[200px]"),
|
|
107
108
|
title: o ?? void 0,
|
|
108
109
|
"data-testid": "chat-input-llm-profile",
|
|
109
110
|
"aria-expanded": f,
|
|
110
111
|
"aria-haspopup": "dialog",
|
|
111
|
-
disabled:
|
|
112
|
-
"aria-busy":
|
|
112
|
+
disabled: u,
|
|
113
|
+
"aria-busy": u,
|
|
113
114
|
onClick: (e) => {
|
|
114
115
|
e.preventDefault(), e.stopPropagation(), p((e) => !e);
|
|
115
116
|
},
|
|
116
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ v("span", {
|
|
117
118
|
className: "truncate",
|
|
118
|
-
children: b
|
|
119
|
-
}), /* @__PURE__ */
|
|
120
|
-
}), f && /* @__PURE__ */
|
|
121
|
-
ref:
|
|
119
|
+
children: x(b)
|
|
120
|
+
}), /* @__PURE__ */ v(c, { isOpen: f })]
|
|
121
|
+
}), f && /* @__PURE__ */ v(l, {
|
|
122
|
+
ref: _,
|
|
122
123
|
testId: "chat-input-llm-profile-popover",
|
|
123
124
|
position: "top",
|
|
124
125
|
alignment: "left",
|
|
125
126
|
spacing: "none",
|
|
126
127
|
className: "z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto",
|
|
127
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ v(S, { onClose: () => p(!1) })
|
|
128
129
|
})]
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
132
|
//#endregion
|
|
132
|
-
export {
|
|
133
|
+
export { S as ChatInputLlmProfileMenuContent, C as ChatInputLlmProfilePicker };
|
|
133
134
|
|
|
134
135
|
//# sourceMappingURL=chat-input-llm-profile-picker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-input-llm-profile-picker.js","names":[],"sources":["../../../../../src/components/features/chat/components/chat-input-llm-profile-picker.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useChatInputLlmProfileState } from \"#/hooks/use-chat-input-llm-profile-state\";\nimport { ComboboxCaretInline } from \"#/ui/combobox-caret\";\nimport SettingsGearIcon from \"#/icons/settings-gear.svg?react\";\nimport CheckIcon from \"#/icons/checkmark.svg?react\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { NavigationLink } from \"#/components/shared/navigation-link\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { ContextMenuListItem } from \"#/components/features/context-menu/context-menu-list-item\";\nimport { Divider } from \"#/ui/divider\";\nimport { Typography } from \"#/ui/typography\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { chatInputPillButtonClassName } from \"#/utils/form-control-classes\";\nimport { formatModelNameForDisplay } from \"#/utils/format-model-name\";\n\nconst PROFILE_LABEL_MAX_CHARS = 18;\n\nfunction truncateLabel(label: string): string {\n return label.length <= PROFILE_LABEL_MAX_CHARS\n ? label\n : `${label.slice(0, PROFILE_LABEL_MAX_CHARS)}…`;\n}\n\ninterface ChatInputLlmProfileMenuContentProps {\n onClose: () => void;\n dividerInset?: \"menu\";\n settingsLinkClassName?: string;\n settingsIconClassName?: string;\n}\n\n/**\n * The in-conversation OpenHands LLM-profile switcher list. Selecting a profile\n * live-swaps the running conversation's LLM via `/switch_profile` (the ACP\n * analog is {@link ChatInputModelMenuContent}). Shared by the inline pill and\n * the chat-input overflow submenu.\n */\nexport function ChatInputLlmProfileMenuContent({\n onClose,\n dividerInset,\n settingsLinkClassName,\n settingsIconClassName,\n}: ChatInputLlmProfileMenuContentProps) {\n const { t } = useTranslation(\"openhands\");\n const {\n profiles,\n currentProfileName,\n currentProfileModel,\n canSwitchProfile,\n selectProfile,\n } = useChatInputLlmProfileState();\n // Read-only surfaces (a cloud member on the home page, or a start-task route)\n // still name the active profile — the same shape ChatInputModelMenuContent\n // uses when the ACP picker is gated off.\n const showProfileList = canSwitchProfile && profiles.length > 0;\n const readOnlyProfileName = canSwitchProfile ? null : currentProfileName;\n\n const handleSelect = (profileName: string) => {\n selectProfile(profileName);\n onClose();\n };\n\n return (\n <>\n {showProfileList && (\n <>\n {/* role=\"presentation\" keeps this a valid <li> child of the\n ContextMenu <ul> without exposing the label as a menu item. */}\n <li role=\"presentation\" className=\"px-2 pt-1 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 </li>\n {profiles.map((profile) => {\n const isCurrent = profile.name === currentProfileName;\n const displayModel = formatModelNameForDisplay(profile.model);\n return (\n <ContextMenuListItem\n key={profile.name}\n testId={`chat-input-llm-profile-option-${profile.name}`}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n if (isCurrent) {\n onClose();\n return;\n }\n handleSelect(profile.name);\n }}\n className={cn(\n \"flex flex-col items-stretch gap-0.5\",\n isCurrent && \"bg-[var(--oh-interactive-hover)]\",\n )}\n >\n <span className=\"flex items-center gap-2\">\n <span\n className=\"flex-1 truncate text-sm leading-5\"\n title={profile.model ?? profile.name}\n >\n {profile.name}\n </span>\n {isCurrent && (\n <CheckIcon\n width={14}\n height={14}\n className=\"shrink-0\"\n aria-hidden\n />\n )}\n </span>\n {displayModel && (\n <span className=\"block truncate text-xs leading-4 text-[var(--oh-muted)]\">\n {displayModel}\n </span>\n )}\n </ContextMenuListItem>\n );\n })}\n </>\n )}\n {readOnlyProfileName && (\n <li className=\"text-sm\" data-testid=\"chat-input-llm-profile-current\">\n <div className=\"flex flex-col gap-0.5 p-2 leading-5 text-[var(--oh-foreground)]\">\n <span className=\"truncate\" title={readOnlyProfileName}>\n {readOnlyProfileName}\n </span>\n {currentProfileModel && (\n <span className=\"truncate text-xs leading-4 text-[var(--oh-muted)]\">\n {formatModelNameForDisplay(currentProfileModel)}\n </span>\n )}\n </div>\n </li>\n )}\n {(showProfileList || readOnlyProfileName) && (\n <Divider inset={dividerInset} />\n )}\n <li className=\"text-sm\">\n <NavigationLink\n to=\"/settings/llm\"\n onClick={onClose}\n className={cn(\n \"flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors\",\n settingsLinkClassName,\n )}\n >\n <SettingsGearIcon\n width={16}\n height={16}\n className={cn(\"shrink-0\", settingsIconClassName)}\n aria-hidden\n />\n <span>{t(I18nKey.SETTINGS$LLM_PROFILES)}</span>\n </NavigationLink>\n </li>\n </>\n );\n}\n\nexport function ChatInputLlmProfilePicker() {\n const { t } = useTranslation(\"openhands\");\n const { profiles, currentProfileName, isLoading, isSwitching } =\n useChatInputLlmProfileState();\n const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const popoverRef = useClickOutsideElement<HTMLUListElement>(\n () => setIsPopoverOpen(false),\n triggerRef,\n );\n\n // No LLM profiles yet (or the agent-server lacks the surface): stay out of\n // the way, exactly like the ACP/AgentProfile pickers.\n if (isLoading || profiles.length === 0) {\n return null;\n }\n\n const label = currentProfileName ?? t(I18nKey.LLM$SELECT_MODEL_PLACEHOLDER);\n\n return (\n <div className=\"relative min-w-0\">\n <button\n ref={triggerRef}\n type=\"button\"\n className={cn(chatInputPillButtonClassName, \"max-w-[200px]\")}\n title={currentProfileName ?? undefined}\n data-testid=\"chat-input-llm-profile\"\n aria-expanded={isPopoverOpen}\n aria-haspopup=\"dialog\"\n // Disabled mid-switch so re-opening can't fire a second /switch_profile.\n disabled={isSwitching}\n aria-busy={isSwitching}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n setIsPopoverOpen((open) => !open);\n }}\n >\n <span className=\"truncate\">{truncateLabel(label)}</span>\n <ComboboxCaretInline isOpen={isPopoverOpen} />\n </button>\n\n {isPopoverOpen && (\n <ContextMenu\n ref={popoverRef}\n testId=\"chat-input-llm-profile-popover\"\n position=\"top\"\n alignment=\"left\"\n spacing=\"none\"\n className=\"z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto\"\n >\n <ChatInputLlmProfileMenuContent\n onClose={() => setIsPopoverOpen(false)}\n />\n </ContextMenu>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,IAAM,IAA0B;AAEhC,SAAS,EAAc,GAAuB;CAC5C,OAAO,EAAM,UAAU,IACnB,IACA,GAAG,EAAM,MAAM,GAAG,CAAuB,EAAE;AACjD;AAeA,SAAgB,EAA+B,EAC7C,YACA,iBACA,0BACA,4BACsC;CACtC,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,EACJ,aACA,uBACA,wBACA,qBACA,qBACE,EAA4B,GAI1B,IAAkB,KAAoB,EAAS,SAAS,GACxD,IAAsB,IAAmB,OAAO,GAEhD,KAAgB,MAAwB;EAE5C,AADA,EAAc,CAAW,GACzB,EAAQ;CACV;CAEA,OACE,kBAAA,GAAA,EAAA,UAAA;EACG,KACC,kBAAA,GAAA,EAAA,UAAA,CAGE,kBAAC,MAAD;GAAI,MAAK;GAAe,WAAU;aAChC,kBAAC,EAAW,MAAZ;IAAiB,WAAU;cACxB,EAAE,EAAQ,2BAA2B;GACvB,CAAA;EACf,CAAA,GACH,EAAS,KAAK,MAAY;GACzB,IAAM,IAAY,EAAQ,SAAS,GAC7B,IAAe,EAA0B,EAAQ,KAAK;GAC5D,OACE,kBAAC,GAAD;IAEE,QAAQ,iCAAiC,EAAQ;IACjD,UAAU,MAAU;KAGlB,IAFA,EAAM,eAAe,GACrB,EAAM,gBAAgB,GAClB,GAAW;MACb,EAAQ;MACR;KACF;KACA,EAAa,EAAQ,IAAI;IAC3B;IACA,WAAW,EACT,uCACA,KAAa,kCACf;cAfF,CAiBE,kBAAC,QAAD;KAAM,WAAU;eAAhB,CACE,kBAAC,QAAD;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ACE,KAAK;GACL,MAAK;GACL,WAAW,EAAG,GAA8B,eAAe;GAC3D,OAAO,KAAsB,KAAA;GAC7B,eAAY;GACZ,iBAAe;GACf,iBAAc;GAEd,UAAU;GACV,aAAW;GACX,UAAU,MAAU;IAGlB,AAFA,EAAM,eAAe,GACrB,EAAM,gBAAgB,GACtB,GAAkB,MAAS,CAAC,CAAI;GAClC;aAfF,CAiBE,kBAAC,QAAD;IAAM,WAAU;cAAY,EAAc,CAAK;GAAQ,CAAA,GACvD,kBAAC,GAAD,EAAqB,QAAQ,EAAgB,CAAA,CACvC;MAEP,KACC,kBAAC,GAAD;GACE,KAAK;GACL,QAAO;GACP,UAAS;GACT,WAAU;GACV,SAAQ;GACR,WAAU;aAEV,kBAAC,GAAD,EACE,eAAe,EAAiB,EAAK,EACtC,CAAA;EACU,CAAA,CAEZ;;AAET"}
|
|
1
|
+
{"version":3,"file":"chat-input-llm-profile-picker.js","names":[],"sources":["../../../../../src/components/features/chat/components/chat-input-llm-profile-picker.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useChatInputLlmProfileState } from \"#/hooks/use-chat-input-llm-profile-state\";\nimport { ComboboxCaretInline } from \"#/ui/combobox-caret\";\nimport SettingsGearIcon from \"#/icons/settings-gear.svg?react\";\nimport CheckIcon from \"#/icons/checkmark.svg?react\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { NavigationLink } from \"#/components/shared/navigation-link\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { ContextMenuListItem } from \"#/components/features/context-menu/context-menu-list-item\";\nimport { Divider } from \"#/ui/divider\";\nimport { Typography } from \"#/ui/typography\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { chatInputPillButtonClassName } from \"#/utils/form-control-classes\";\nimport { useFreeModels } from \"#/hooks/query/use-free-models\";\nimport { formatModelPillLabel } from \"#/utils/format-model-name\";\n\nconst PROFILE_LABEL_MAX_CHARS = 18;\n\nfunction truncateLabel(label: string): string {\n return label.length <= PROFILE_LABEL_MAX_CHARS\n ? label\n : `${label.slice(0, PROFILE_LABEL_MAX_CHARS)}…`;\n}\n\ninterface ChatInputLlmProfileMenuContentProps {\n onClose: () => void;\n dividerInset?: \"menu\";\n settingsLinkClassName?: string;\n settingsIconClassName?: string;\n}\n\n/**\n * The in-conversation OpenHands LLM-profile switcher list. Selecting a profile\n * live-swaps the running conversation's LLM via `/switch_profile` (the ACP\n * analog is {@link ChatInputModelMenuContent}). Shared by the inline pill and\n * the chat-input overflow submenu.\n */\nexport function ChatInputLlmProfileMenuContent({\n onClose,\n dividerInset,\n settingsLinkClassName,\n settingsIconClassName,\n}: ChatInputLlmProfileMenuContentProps) {\n const { t } = useTranslation(\"openhands\");\n const freeModels = useFreeModels();\n const {\n profiles,\n currentProfileName,\n currentProfileModel,\n canSwitchProfile,\n selectProfile,\n } = useChatInputLlmProfileState();\n // Read-only surfaces (a cloud member on the home page, or a start-task route)\n // still name the active profile — the same shape ChatInputModelMenuContent\n // uses when the ACP picker is gated off.\n const showProfileList = canSwitchProfile && profiles.length > 0;\n const readOnlyProfileName = canSwitchProfile ? null : currentProfileName;\n\n const handleSelect = (profileName: string) => {\n selectProfile(profileName);\n onClose();\n };\n\n return (\n <>\n {showProfileList && (\n <>\n {/* role=\"presentation\" keeps this a valid <li> child of the\n ContextMenu <ul> without exposing the label as a menu item. */}\n <li role=\"presentation\" className=\"px-2 pt-1 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 </li>\n {profiles.map((profile) => {\n const isCurrent = profile.name === currentProfileName;\n const displayModel = formatModelPillLabel(\n profile.model,\n freeModels,\n );\n return (\n <ContextMenuListItem\n key={profile.name}\n testId={`chat-input-llm-profile-option-${profile.name}`}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n if (isCurrent) {\n onClose();\n return;\n }\n handleSelect(profile.name);\n }}\n className={cn(\n \"flex flex-col items-stretch gap-0.5\",\n isCurrent && \"bg-[var(--oh-interactive-hover)]\",\n )}\n >\n <span className=\"flex items-center gap-2\">\n <span\n className=\"flex-1 truncate text-sm leading-5\"\n title={profile.model ?? profile.name}\n >\n {profile.name}\n </span>\n {isCurrent && (\n <CheckIcon\n width={14}\n height={14}\n className=\"shrink-0\"\n aria-hidden\n />\n )}\n </span>\n {displayModel && (\n <span className=\"block truncate text-xs leading-4 text-[var(--oh-muted)]\">\n {displayModel}\n </span>\n )}\n </ContextMenuListItem>\n );\n })}\n </>\n )}\n {readOnlyProfileName && (\n <li className=\"text-sm\" data-testid=\"chat-input-llm-profile-current\">\n <div className=\"flex flex-col gap-0.5 p-2 leading-5 text-[var(--oh-foreground)]\">\n <span className=\"truncate\" title={readOnlyProfileName}>\n {readOnlyProfileName}\n </span>\n {currentProfileModel && (\n <span className=\"truncate text-xs leading-4 text-[var(--oh-muted)]\">\n {formatModelPillLabel(currentProfileModel, freeModels)}\n </span>\n )}\n </div>\n </li>\n )}\n {(showProfileList || readOnlyProfileName) && (\n <Divider inset={dividerInset} />\n )}\n <li className=\"text-sm\">\n <NavigationLink\n to=\"/settings/llm\"\n onClick={onClose}\n className={cn(\n \"flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors\",\n settingsLinkClassName,\n )}\n >\n <SettingsGearIcon\n width={16}\n height={16}\n className={cn(\"shrink-0\", settingsIconClassName)}\n aria-hidden\n />\n <span>{t(I18nKey.SETTINGS$LLM_PROFILES)}</span>\n </NavigationLink>\n </li>\n </>\n );\n}\n\nexport function ChatInputLlmProfilePicker() {\n const { t } = useTranslation(\"openhands\");\n const { profiles, currentProfileName, isLoading, isSwitching } =\n useChatInputLlmProfileState();\n const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const popoverRef = useClickOutsideElement<HTMLUListElement>(\n () => setIsPopoverOpen(false),\n triggerRef,\n );\n\n // No LLM profiles yet (or the agent-server lacks the surface): stay out of\n // the way, exactly like the ACP/AgentProfile pickers.\n if (isLoading || profiles.length === 0) {\n return null;\n }\n\n const label = currentProfileName ?? t(I18nKey.LLM$SELECT_MODEL_PLACEHOLDER);\n\n return (\n <div className=\"relative min-w-0\">\n <button\n ref={triggerRef}\n type=\"button\"\n className={cn(chatInputPillButtonClassName, \"max-w-[200px]\")}\n title={currentProfileName ?? undefined}\n data-testid=\"chat-input-llm-profile\"\n aria-expanded={isPopoverOpen}\n aria-haspopup=\"dialog\"\n // Disabled mid-switch so re-opening can't fire a second /switch_profile.\n disabled={isSwitching}\n aria-busy={isSwitching}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n setIsPopoverOpen((open) => !open);\n }}\n >\n <span className=\"truncate\">{truncateLabel(label)}</span>\n <ComboboxCaretInline isOpen={isPopoverOpen} />\n </button>\n\n {isPopoverOpen && (\n <ContextMenu\n ref={popoverRef}\n testId=\"chat-input-llm-profile-popover\"\n position=\"top\"\n alignment=\"left\"\n spacing=\"none\"\n className=\"z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto\"\n >\n <ChatInputLlmProfileMenuContent\n onClose={() => setIsPopoverOpen(false)}\n />\n </ContextMenu>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,IAAM,IAA0B;AAEhC,SAAS,EAAc,GAAuB;CAC5C,OAAO,EAAM,UAAU,IACnB,IACA,GAAG,EAAM,MAAM,GAAG,CAAuB,EAAE;AACjD;AAeA,SAAgB,EAA+B,EAC7C,YACA,iBACA,0BACA,4BACsC;CACtC,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,IAAa,EAAc,GAC3B,EACJ,aACA,uBACA,wBACA,qBACA,qBACE,EAA4B,GAI1B,IAAkB,KAAoB,EAAS,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
|
|
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("../../../../node_modules/lucide-react/dist/esm/icons/gauge.cjs"),i=require("../../../../node_modules/lucide-react/dist/esm/icons/loader-circle.cjs"),a=require("../../../../node_modules/lucide-react/dist/esm/icons/minimize.cjs"),o=require("../../../../utils/utils.cjs"),s=require("
|
|
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("../../../../node_modules/lucide-react/dist/esm/icons/gauge.cjs"),i=require("../../../../node_modules/lucide-react/dist/esm/icons/loader-circle.cjs"),a=require("../../../../node_modules/lucide-react/dist/esm/icons/minimize.cjs"),o=require("../../../../utils/utils.cjs"),s=require("../../../shared/buttons/styled-tooltip.cjs"),c=require("../../../../utils/form-control-classes.cjs"),l=require("../../context-menu/context-menu-list-item.cjs"),u=require("../../../../hooks/use-click-outside-element.cjs"),d=require("../../../../ui/divider.cjs"),f=require("../../../../hooks/use-select-conversation-tab.cjs"),p=require("../../../../hooks/use-context-window-usage.cjs"),m=require("../../../../utils/format-token-count.cjs"),h=require("../../../../hooks/use-compact-context-action.cjs"),g=require("../../conversation/conversation-name-context-menu-icon-text.cjs"),_=require("../../conversation/usage-panel/context-meter.cjs"),v=require("./context-window-ring.cjs");let y=require("react");y=e.__toESM(y,1);let b=require("react/jsx-runtime");var x={neutral:`bg-foreground`,warning:`bg-amber-500`,danger:`bg-red-500`},S={neutral:`text-[var(--oh-muted)]`,warning:`text-amber-500`,danger:`text-red-500`};function C(){let{t:e}=t.useTranslation(`openhands`),C=p.useContextWindowUsage(),{navigateToTab:w}=f.useSelectConversationTab(),[T,E]=y.default.useState(!1),D=y.default.useRef(null),O=u.useClickOutsideElement(()=>E(!1),D),{handleCompact:k,isCompacting:A,isDisabled:j}=h.useCompactContextAction(C?.perTurnToken??0);if(!C)return null;let M=m.getContextWindowUsagePercentage(C.perTurnToken,C.contextWindow),N=Math.round(M),P=Math.max(0,100-N),F=`${N}% ${e(n.I18nKey.CONVERSATION$USED)} (${P}% ${e(n.I18nKey.CONVERSATION$LEFT)})`,I=`${m.formatCompactTokenCount(C.perTurnToken)} / ${m.formatCompactTokenCount(C.contextWindow)}`,L=_.getContextFillTone(M),R=()=>{E(!1),w(`usage`)};return(0,b.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,b.jsx)(s.StyledTooltip,{content:e(n.I18nKey.CHAT_INTERFACE$SHOW_CONTEXT),placement:`top`,children:(0,b.jsx)(`button`,{ref:D,type:`button`,className:o.cn(c.chatInputIconButtonClassName,`size-8`),"aria-label":`${e(n.I18nKey.CHAT_INTERFACE$CONTEXT_WINDOW_METER_LABEL)}: ${F}`,"aria-expanded":T,"aria-haspopup":`dialog`,"data-testid":`context-window-meter`,onClick:e=>{e.preventDefault(),e.stopPropagation(),E(e=>!e)},children:(0,b.jsx)(v.ContextWindowRing,{percentage:M})})}),T&&(0,b.jsxs)(`div`,{ref:O,"data-testid":`context-window-meter-popover`,className:o.cn(`absolute bottom-full right-0 z-[60] mb-2 w-[280px]`,`flex flex-col gap-0.5 rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg`),children:[(0,b.jsxs)(`div`,{className:`flex flex-col gap-2 px-2 py-1.5`,children:[(0,b.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-sm`,children:[(0,b.jsx)(`span`,{className:`font-semibold text-[var(--oh-foreground)]`,children:e(n.I18nKey.CONVERSATION$CONTEXT_WINDOW)}),(0,b.jsx)(`span`,{className:o.cn(`shrink-0 text-xs`,S[L]),children:F})]}),(0,b.jsx)(`button`,{type:`button`,"data-testid":`context-window-meter-bar-button`,className:`relative h-1.5 w-full rounded-full cursor-pointer`,style:{backgroundColor:v.CONTEXT_WINDOW_TRACK_COLOR},"aria-label":e(n.I18nKey.COMMON$USAGE),onClick:e=>{e.preventDefault(),e.stopPropagation(),R()},children:(0,b.jsx)(`span`,{className:o.cn(`absolute inset-y-0 left-0 rounded-full transition-all duration-300`,x[L]),style:{width:`${Math.min(100,M)}%`}})}),(0,b.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,b.jsxs)(`button`,{type:`button`,"data-testid":`context-window-compact-button`,disabled:j,"aria-busy":A,"aria-label":e(n.I18nKey.CONVERSATION$COMPACT_CONTEXT),className:o.cn(`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs`,`text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]`,`transition-colors disabled:cursor-not-allowed disabled:opacity-50`),onClick:e=>{e.preventDefault(),e.stopPropagation(),k()},children:[A?(0,b.jsx)(i.LoaderCircle,{className:`size-3 animate-spin`,"aria-hidden":!0}):(0,b.jsx)(a.Minimize,{className:`size-3`,"aria-hidden":!0}),(0,b.jsx)(`span`,{children:e(n.I18nKey.CONVERSATION$COMPACT_CONTEXT)})]}),(0,b.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:I})]})]}),(0,b.jsx)(d.Divider,{inset:`menu`}),(0,b.jsx)(l.ContextMenuListItem,{testId:`context-window-plan-usage`,onClick:e=>{e.preventDefault(),e.stopPropagation(),R()},children:(0,b.jsx)(g.ConversationNameContextMenuIconText,{icon:(0,b.jsx)(r.Gauge,{size:16}),text:e(n.I18nKey.COMMON$USAGE)})})]})]})}exports.ContextWindowMeter=C;
|
|
2
2
|
//# sourceMappingURL=context-window-meter.cjs.map
|
|
@@ -4,8 +4,8 @@ import { Gauge as n } from "../../../../node_modules/lucide-react/dist/esm/icons
|
|
|
4
4
|
import { LoaderCircle as r } from "../../../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
|
|
5
5
|
import { Minimize as i } from "../../../../node_modules/lucide-react/dist/esm/icons/minimize.js";
|
|
6
6
|
import { cn as a } from "../../../../utils/utils.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { StyledTooltip as o } from "../../../shared/buttons/styled-tooltip.js";
|
|
8
|
+
import { chatInputIconButtonClassName as s } from "../../../../utils/form-control-classes.js";
|
|
9
9
|
import { ContextMenuListItem as c } from "../../context-menu/context-menu-list-item.js";
|
|
10
10
|
import { useClickOutsideElement as l } from "../../../../hooks/use-click-outside-element.js";
|
|
11
11
|
import { Divider as u } from "../../../../ui/divider.js";
|
|
@@ -36,13 +36,13 @@ function T() {
|
|
|
36
36
|
};
|
|
37
37
|
return /* @__PURE__ */ S("div", {
|
|
38
38
|
className: "relative shrink-0",
|
|
39
|
-
children: [/* @__PURE__ */ x(
|
|
39
|
+
children: [/* @__PURE__ */ x(o, {
|
|
40
40
|
content: T(t.CHAT_INTERFACE$SHOW_CONTEXT),
|
|
41
41
|
placement: "top",
|
|
42
42
|
children: /* @__PURE__ */ x("button", {
|
|
43
43
|
ref: A,
|
|
44
44
|
type: "button",
|
|
45
|
-
className: a(
|
|
45
|
+
className: a(s, "size-8"),
|
|
46
46
|
"aria-label": `${T(t.CHAT_INTERFACE$CONTEXT_WINDOW_METER_LABEL)}: ${R}`,
|
|
47
47
|
"aria-expanded": O,
|
|
48
48
|
"aria-haspopup": "dialog",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../i18n/declaration.cjs"),n=require("
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../i18n/declaration.cjs"),n=require("../../../hooks/query/use-settings.cjs"),r=require("../../shared/buttons/styled-tooltip.cjs"),i=require("../../../icons/lock.cjs");let a=require("react/jsx-runtime");function o(){let{t:o}=e.useTranslation(`openhands`),{data:s}=n.useSettings();return s?.confirmation_mode?(0,a.jsx)(r.StyledTooltip,{closeDelay:100,content:o(t.I18nKey.COMMON$CONFIRMATION_MODE_ENABLED),tooltipClassName:`bg-white text-black hover:bg-transparent`,children:(0,a.jsx)(`div`,{className:`flex items-center justify-center w-[26px] h-[26px] rounded-lg bg-[var(--oh-surface)]`,children:(0,a.jsx)(i.default,{width:15,height:15})})}):null}exports.default=o;
|
|
2
2
|
//# sourceMappingURL=confirmation-mode-enabled.cjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useTranslation as e } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
2
2
|
import { I18nKey as t } from "../../../i18n/declaration.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useSettings as n } from "../../../hooks/query/use-settings.js";
|
|
4
|
+
import { StyledTooltip as r } from "../../shared/buttons/styled-tooltip.js";
|
|
5
5
|
import i from "../../../icons/lock.js";
|
|
6
6
|
import { jsx as a } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/features/chat/confirmation-mode-enabled.tsx
|
|
8
8
|
function o() {
|
|
9
|
-
let { t: o } = e("openhands"), { data: s } =
|
|
10
|
-
return s?.confirmation_mode ? /* @__PURE__ */ a(
|
|
9
|
+
let { t: o } = e("openhands"), { data: s } = n();
|
|
10
|
+
return s?.confirmation_mode ? /* @__PURE__ */ a(r, {
|
|
11
11
|
closeDelay: 100,
|
|
12
12
|
content: o(t.COMMON$CONFIRMATION_MODE_ENABLED),
|
|
13
13
|
tooltipClassName: "bg-white text-black hover:bg-transparent",
|
|
@@ -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/angle-down-solid.cjs"),a=require("../../../icons/angle-up-solid.cjs"),o=require("./success-indicator.cjs"),s=require("../markdown/markdown-renderer.cjs");let
|
|
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/angle-down-solid.cjs"),a=require("../../../icons/angle-up-solid.cjs"),o=require("./success-indicator.cjs"),s=require("../markdown/markdown-renderer.cjs"),c=require("../../shared/buttons/styled-tooltip.cjs"),l=require("../../../utils/format-event-timestamp.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("react/jsx-runtime");function f({title:e,details:f,success:p,initiallyExpanded:m=!1,chevronPosition:h=`after`,titleTrailing:g,titleIcon:_,timestamp:v}){let{t:y,i18n:b}=t.useTranslation(`openhands`),[x,S]=u.default.useState(m),[C,w]=u.default.useState(!1),[T,E]=u.default.useState(!1),D=l.formatEventTimestamp(v,b?.language),O=f?(0,d.jsx)(`button`,{type:`button`,onClick:e=>{S(e=>!e),e.detail>0&&(w(!1),e.currentTarget.blur())},className:`cursor-pointer text-left`,"aria-label":y(x?n.I18nKey.BUTTON$COLLAPSE:n.I18nKey.BUTTON$EXPAND),children:x?(0,d.jsx)(a.default,{className:r.cn(`h-4 w-4 inline fill-[var(--oh-muted)]`,h===`after`?`ml-2`:`mr-2`)}):(0,d.jsx)(i.default,{className:r.cn(`h-4 w-4 inline fill-[var(--oh-muted)]`,h===`after`?`ml-2`:`mr-2`)})}):null,k=(0,d.jsxs)(`div`,{"data-testid":`generic-event-message-title`,className:`flex items-center`,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),onFocusCapture:()=>E(!0),onBlurCapture:e=>{e.currentTarget.contains(e.relatedTarget)||E(!1)},children:[h===`before`&&O,_,(0,d.jsx)(`span`,{children:e}),h===`after`&&O]});return(0,d.jsxs)(`div`,{className:`flex flex-col gap-1.5 my-1 py-1 text-sm w-full`,children:[(0,d.jsxs)(`div`,{className:`flex items-center justify-between font-normal text-[var(--oh-muted)]`,children:[D?(0,d.jsx)(c.StyledTooltip,{content:(0,d.jsx)(`time`,{dateTime:v,children:D}),placement:`top`,isOpen:C||T,children:k}):k,(0,d.jsxs)(`div`,{className:`flex items-center`,children:[g,p&&(0,d.jsx)(o.SuccessIndicator,{status:p})]})]}),x&&(typeof f==`string`?(0,d.jsx)(s.MarkdownRenderer,{children:f}):f)]})}exports.GenericEventMessage=f;
|
|
2
2
|
//# sourceMappingURL=generic-event-message.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-event-message.cjs","names":[],"sources":["../../../../src/components/features/chat/generic-event-message.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport ArrowDown from \"#/icons/angle-down-solid.svg?react\";\nimport ArrowUp from \"#/icons/angle-up-solid.svg?react\";\nimport { SuccessIndicator } from \"./success-indicator\";\nimport { ObservationResultStatus } from \"#/components/conversation-events/chat/event-content-helpers/get-observation-result\";\nimport { MarkdownRenderer } from \"../markdown/markdown-renderer\";\nimport { cn } from \"#/utils/utils\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\ninterface GenericEventMessageProps {\n title: React.ReactNode;\n details: string | React.ReactNode;\n success?: ObservationResultStatus;\n initiallyExpanded?: boolean;\n /** Where to place the expand/collapse chevron relative to the title. */\n chevronPosition?: \"before\" | \"after\";\n /** Extra content rendered at the end of the title row (right side). */\n titleTrailing?: React.ReactNode;\n /** Optional icon rendered before the title text. */\n titleIcon?: React.ReactNode;\n}\n\nexport function GenericEventMessage({\n title,\n details,\n success,\n initiallyExpanded = false,\n chevronPosition = \"after\",\n titleTrailing,\n titleIcon,\n}: GenericEventMessageProps) {\n const { t } = useTranslation(\"openhands\");\n const [showDetails, setShowDetails] = React.useState(initiallyExpanded);\n\n const chevron = details ? (\n <button\n type=\"button\"\n onClick={() => setShowDetails((prev) => !prev)}\n className=\"cursor-pointer text-left\"\n aria-label={\n showDetails ? t(I18nKey.BUTTON$COLLAPSE) : t(I18nKey.BUTTON$EXPAND)\n }\n >\n {showDetails ? (\n <ArrowUp\n className={cn(\n \"h-4 w-4 inline fill-[var(--oh-muted)]\",\n chevronPosition === \"after\" ? \"ml-2\" : \"mr-2\",\n )}\n />\n ) : (\n <ArrowDown\n className={cn(\n \"h-4 w-4 inline fill-[var(--oh-muted)]\",\n chevronPosition === \"after\" ? \"ml-2\" : \"mr-2\",\n )}\n />\n )}\n </button>\n ) : null;\n\n
|
|
1
|
+
{"version":3,"file":"generic-event-message.cjs","names":[],"sources":["../../../../src/components/features/chat/generic-event-message.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport ArrowDown from \"#/icons/angle-down-solid.svg?react\";\nimport ArrowUp from \"#/icons/angle-up-solid.svg?react\";\nimport { SuccessIndicator } from \"./success-indicator\";\nimport { ObservationResultStatus } from \"#/components/conversation-events/chat/event-content-helpers/get-observation-result\";\nimport { MarkdownRenderer } from \"../markdown/markdown-renderer\";\nimport { cn } from \"#/utils/utils\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { StyledTooltip } from \"#/components/shared/buttons/styled-tooltip\";\nimport { formatEventTimestamp } from \"#/utils/format-event-timestamp\";\n\ninterface GenericEventMessageProps {\n title: React.ReactNode;\n details: string | React.ReactNode;\n success?: ObservationResultStatus;\n initiallyExpanded?: boolean;\n /** Where to place the expand/collapse chevron relative to the title. */\n chevronPosition?: \"before\" | \"after\";\n /** Extra content rendered at the end of the title row (right side). */\n titleTrailing?: React.ReactNode;\n /** Optional icon rendered before the title text. */\n titleIcon?: React.ReactNode;\n timestamp?: string;\n}\n\nexport function GenericEventMessage({\n title,\n details,\n success,\n initiallyExpanded = false,\n chevronPosition = \"after\",\n titleTrailing,\n titleIcon,\n timestamp,\n}: GenericEventMessageProps) {\n const { t, i18n } = useTranslation(\"openhands\");\n const [showDetails, setShowDetails] = React.useState(initiallyExpanded);\n const [isHovered, setIsHovered] = React.useState(false);\n const [hasFocusWithin, setHasFocusWithin] = React.useState(false);\n const timestampLabel = formatEventTimestamp(timestamp, i18n?.language);\n\n const chevron = details ? (\n <button\n type=\"button\"\n onClick={(event) => {\n setShowDetails((prev) => !prev);\n if (event.detail > 0) {\n setIsHovered(false);\n event.currentTarget.blur();\n }\n }}\n className=\"cursor-pointer text-left\"\n aria-label={\n showDetails ? t(I18nKey.BUTTON$COLLAPSE) : t(I18nKey.BUTTON$EXPAND)\n }\n >\n {showDetails ? (\n <ArrowUp\n className={cn(\n \"h-4 w-4 inline fill-[var(--oh-muted)]\",\n chevronPosition === \"after\" ? \"ml-2\" : \"mr-2\",\n )}\n />\n ) : (\n <ArrowDown\n className={cn(\n \"h-4 w-4 inline fill-[var(--oh-muted)]\",\n chevronPosition === \"after\" ? \"ml-2\" : \"mr-2\",\n )}\n />\n )}\n </button>\n ) : null;\n\n const titleContent = (\n <div\n data-testid=\"generic-event-message-title\"\n className=\"flex items-center\"\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n onFocusCapture={() => setHasFocusWithin(true)}\n onBlurCapture={(event) => {\n if (!event.currentTarget.contains(event.relatedTarget)) {\n setHasFocusWithin(false);\n }\n }}\n >\n {chevronPosition === \"before\" && chevron}\n {titleIcon}\n {/* Wrap the title in a span so any whitespace inside Trans-rendered\n fragments (e.g. \"Editing <path>...</path>\") is preserved by\n normal inline flow instead of being collapsed between\n anonymous flex items. */}\n <span>{title}</span>\n {chevronPosition === \"after\" && chevron}\n </div>\n );\n\n const titleContentWithTimestamp = timestampLabel ? (\n <StyledTooltip\n content={<time dateTime={timestamp}>{timestampLabel}</time>}\n placement=\"top\"\n isOpen={isHovered || hasFocusWithin}\n >\n {titleContent}\n </StyledTooltip>\n ) : (\n titleContent\n );\n\n const titleRow = (\n <div className=\"flex items-center justify-between font-normal text-[var(--oh-muted)]\">\n {titleContentWithTimestamp}\n <div className=\"flex items-center\">\n {titleTrailing}\n {success && <SuccessIndicator status={success} />}\n </div>\n </div>\n );\n\n return (\n <div className=\"flex flex-col gap-1.5 my-1 py-1 text-sm w-full\">\n {titleRow}\n {showDetails &&\n (typeof details === \"string\" ? (\n <MarkdownRen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AC,MAAD,CAAK,UAAU,0DAAf,EACG,EAAA,EAAA,MAXF,MAAD,CAAK,UAAU,gFAAf,CAbgC,GAChC,EAAA,EAAA,KAAC,EAAA,cAAD,CACE,SAAS,EAAA,EAAA,KAAC,OAAD,CAAM,SAAU,WAAY,CAAqB,CAAA,EAC1D,UAAU,MACV,OAAQ,GAAa,WAEpB,CACY,CAAA,EAEf,GAME,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,6BAAf,CACG,EACA,IAAW,EAAA,EAAA,KAAC,EAAA,iBAAD,CAAkB,OAAQ,CAAU,CAAA,CAC7C,GACF,EAKF,EACA,IACE,OAAO,GAAY,UAClB,EAAA,EAAA,KAAC,EAAA,iBAAD,CAAA,SAAmB,CAA0B,CAAA,EAE7C,EAED,GAET"}
|
|
@@ -11,6 +11,7 @@ interface GenericEventMessageProps {
|
|
|
11
11
|
titleTrailing?: React.ReactNode;
|
|
12
12
|
/** Optional icon rendered before the title text. */
|
|
13
13
|
titleIcon?: React.ReactNode;
|
|
14
|
+
timestamp?: string;
|
|
14
15
|
}
|
|
15
|
-
export declare function GenericEventMessage({ title, details, success, initiallyExpanded, chevronPosition, titleTrailing, titleIcon, }: GenericEventMessageProps): React.JSX.Element;
|
|
16
|
+
export declare function GenericEventMessage({ title, details, success, initiallyExpanded, chevronPosition, titleTrailing, titleIcon, timestamp, }: GenericEventMessageProps): React.JSX.Element;
|
|
16
17
|
export {};
|