@openhands/agent-canvas 1.12.0 → 1.13.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-BkL3HWa3.js → acp-providers-D1PORKc0.js} +1 -1
- package/build/assets/active-backend-context-IqOjobNK.js +2 -0
- package/build/assets/{agent-context-settings-CzWS1DgR.js → agent-context-settings-DMrObcIS.js} +1 -1
- package/build/assets/agent-profiles-settings-DororXN5.js +1 -0
- package/build/assets/agent-server-conversation-service.api-DWBe0rbX.js +86 -0
- package/build/assets/{agent-settings-D2J1dKVd.js → agent-settings-BJVk92PU.js} +1 -1
- package/build/assets/agent-settings-COfJsQ1d.js +1 -0
- package/build/assets/{alert-banner-lrK-2_0Y.js → alert-banner-CzZsm7ms.js} +1 -1
- package/build/assets/{api-key-entry-screen-D70oJj2c.js → api-key-entry-screen-D8Fade_-.js} +1 -1
- package/build/assets/{app-settings-D0OKHB3M.js → app-settings-CpyGB3AT.js} +1 -1
- package/build/assets/{automation-detail-C0SxWTnQ.js → automation-detail-B-jQ39Mm.js} +1 -1
- package/build/assets/{automation-export-BjQa_fT6.js → automation-export-B1dywoqk.js} +1 -1
- package/build/assets/{automation-setup-route-BzCNpljP.js → automation-setup-route-C-bWUZBi.js} +1 -1
- package/build/assets/{automation-templates-D9gs6ihu.js → automation-templates-DgpCGOJV.js} +1 -1
- package/build/assets/{automations-list-dZg8zOCl.js → automations-list-DnMxlxsL.js} +1 -1
- package/build/assets/{back-nav-button-B3pYwmUJ.js → back-nav-button-HHEneWMw.js} +1 -1
- package/build/assets/{backend-form-modal-HwclKrUS.js → backend-form-modal-DiVrD4Cm.js} +1 -1
- package/build/assets/{backend-synced-settings-badge-YI3k09Wr.js → backend-synced-settings-badge-7MIjpr8M.js} +1 -1
- package/build/assets/{badge-Dpn3-LTV.js → badge-CpYmcVZV.js} +1 -1
- package/build/assets/{base-modal-3NmIOKDm.js → base-modal-Fnh6Uln9.js} +1 -1
- package/build/assets/bot-BQZx8e2i.js +1 -0
- package/build/assets/{brand-button-CJcwjnfb.js → brand-button-swT1RyO0.js} +1 -1
- package/build/assets/browser-B9AbV6kG.js +7 -0
- package/build/assets/{browser-tab-4CPdj3J3.js → browser-tab-zAY12m_i.js} +1 -1
- package/build/assets/{chat-send-button-B8n6-DQA.js → chat-send-button-DsJtivmL.js} +1 -1
- package/build/assets/check-WAFXrrs_.js +1 -0
- package/build/assets/chevron-down-CifNWzme.js +1 -0
- package/build/assets/circle-check-CtnimJa8.js +1 -0
- package/build/assets/{circle-plus-check-toggle-BVzv5EkZ.js → circle-plus-check-toggle-Cuzx55bo.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-CcSez21r.js → cloud-funnel-analytics-86CwNdSh.js} +1 -1
- package/build/assets/{combobox-caret-BlmRwiM8.js → combobox-caret-D0fRotFi.js} +1 -1
- package/build/assets/{command-menu-BKOLj-TC.js → command-menu-BXy03FBl.js} +1 -1
- package/build/assets/{condenser-settings-DLQogFnB.js → condenser-settings-BmZa0ui_.js} +1 -1
- package/build/assets/{confirmation-modal-DAH0XtOp.js → confirmation-modal-BgoN6lbN.js} +1 -1
- package/build/assets/{context-menu-list-item-BQhmFVEK.js → context-menu-list-item-Bq02tc-P.js} +1 -1
- package/build/assets/conversation-BPo8SvLN.js +1 -0
- package/build/assets/conversation-CPCVsCUY.js +90 -0
- package/build/assets/conversation-panel-BPo8SvLN.js +1 -0
- package/build/assets/{conversation-state-store-CtgILxWF.js → conversation-state-store-C5YpjMNy.js} +1 -1
- package/build/assets/conversation-store-Blc5xysY.js +6 -0
- package/build/assets/{conversation-tab-empty-state-C9sfDOlt.js → conversation-tab-empty-state-CMqo_0Bd.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-DatoElj8.js → copy-to-clipboard-button-Cg1pF0xn.js} +1 -1
- package/build/assets/{device-verify-BIjXeW9N.js → device-verify-BfQLgNyq.js} +1 -1
- package/build/assets/{dropdown-classes-zFW7qPSK.js → dropdown-classes-BIqQr5mx.js} +1 -1
- package/build/assets/{entry.client-EBn3ZtNP.js → entry.client-CxFjRYqH.js} +2 -2
- package/build/assets/{enum-filter-dropdown-CctILg5t.js → enum-filter-dropdown-C_yV4_bo.js} +1 -1
- package/build/assets/{environment-switch-overlay-Cvmo6clk.js → environment-switch-overlay-Bi4qbh2g.js} +1 -1
- package/build/assets/{extensions-hub-BZ3HYztk.js → extensions-hub-BqUINAhp.js} +1 -1
- package/build/assets/{extensions-navigation-Bnx32WAb.js → extensions-navigation-lraj88Wk.js} +1 -1
- package/build/assets/external-link-CgtpA_a1.js +1 -0
- package/build/assets/{file-text-RecuaId_.js → file-text-DEK4LSVw.js} +1 -1
- package/build/assets/files-tab-DV0L-lFE.js +1 -0
- package/build/assets/{form-control-classes-DLN3Qgub.js → form-control-classes-7yFSQJq_.js} +1 -1
- package/build/assets/{format-relative-time-BerVamGl.js → format-relative-time-DSErAuVr.js} +1 -1
- package/build/assets/git-provider-icon-BvlLAche.js +1 -0
- package/build/assets/{git-repo-dropdown-B5VnMftu.js → git-repo-dropdown-ByMzpNko.js} +1 -1
- package/build/assets/git-repo-dropdown-C6R7hgM8.js +1 -0
- package/build/assets/{highlighted-source-view-CgJfD5VT.js → highlighted-source-view-C_sfncLZ.js} +1 -1
- package/build/assets/{home-Y0aDou-a.js → home-BOrlwLqG.js} +1 -1
- package/build/assets/home-BvMNC6E-.js +1 -0
- package/build/assets/{home-store-Cubdq0uP.js → home-store-CxqsY9Fi.js} +1 -1
- package/build/assets/index-home-BvMNC6E-.js +1 -0
- package/build/assets/info-BRVcJAUg.js +1 -0
- package/build/assets/{install-server-modal-DW6dSyGr.js → install-server-modal-Bl4G1zF4.js} +1 -1
- package/build/assets/{kebab-menu-item-content-CKydZrbH.js → kebab-menu-item-content-BGoGFEAg.js} +1 -1
- package/build/assets/{launch-c4GEP8oo.js → launch-CkqiSCqi.js} +1 -1
- package/build/assets/{list-todo-CheUtB7F.js → list-todo-DNWlzfaM.js} +1 -1
- package/build/assets/llm-not-configured-banner-DLw_tu-G.js +27 -0
- package/build/assets/llm-settings-B-pkVCrt.js +1 -0
- package/build/assets/llm-settings-DSC0-IQ7.js +1 -0
- package/build/assets/llm-subscription-service-BAdOl5Xx.js +1 -0
- package/build/assets/loader-circle-B47W9XqT.js +1 -0
- package/build/assets/{loading-spinner-CN3riY7k.js → loading-spinner-xhnrGP4Y.js} +1 -1
- package/build/assets/{manage-backends-modal-DTCME_Pu.js → manage-backends-modal-DhGk5mJt.js} +1 -1
- package/build/assets/manifest-653b89aa.js +1 -0
- package/build/assets/{manifest-subpage-layout-Ds7G5GZ8.js → manifest-subpage-layout-CKWvL2ig.js} +1 -1
- package/build/assets/{map-provider-7Bp2aih5.js → map-provider-Mx8mZuE-.js} +1 -1
- package/build/assets/markdown-renderer-DUmk7pFc.js +8 -0
- package/build/assets/{mcp-Da7wFU7A.js → mcp-DCkvl6K0.js} +2 -2
- package/build/assets/mcp-marketplace-utils-DEbMXlQr.js +1 -0
- package/build/assets/messages-DSXvyc21.js +40 -0
- package/build/assets/{modal-body-duRaxj_K.js → modal-body-gIe21fDv.js} +1 -1
- package/build/assets/{modal-classes-CLEXO6dj.js → modal-classes-D66dlgZ7.js} +1 -1
- package/build/assets/{modal-close-button-D0aT02hs.js → modal-close-button-B6iOGYpI.js} +1 -1
- package/build/assets/{mouse-pointer-click-Px-dXWcS.js → mouse-pointer-click-BYX1Pw5W.js} +1 -1
- package/build/assets/{npm-Cswluf6-.js → npm-DLckoeJc.js} +1 -1
- package/build/assets/{onboarding-BKbTYlW1.js → onboarding-D7WDG66N.js} +1 -1
- package/build/assets/{onboarding-modal-DrrGlEQq.js → onboarding-modal-C_xVrFNv.js} +1 -1
- package/build/assets/{organization-service.api-DK8csGvK.js → organization-service.api-D-s9z18a.js} +1 -1
- package/build/assets/pencil-BGOCPRyu.js +1 -0
- package/build/assets/{planner-tab-D-mZ1I7n.js → planner-tab-AKaXIIfg.js} +1 -1
- package/build/assets/{plugins-management-service-CywqyfLK.js → plugins-management-service-wtmY4QQw.js} +1 -1
- package/build/assets/plus-zNEL8rcX.js +1 -0
- package/build/assets/{profiles-service.api-vcE_jJCe.js → profiles-service.api-DCMYxHMi.js} +1 -1
- package/build/assets/{providers-CdrPPm0z.js → providers-BjrtjX4L.js} +1 -1
- package/build/assets/{proxy-b4aqL4SX.js → proxy-9Z_WZggZ.js} +1 -1
- package/build/assets/{puzzle-B3v361yY.js → puzzle-BWLmN8z4.js} +1 -1
- package/build/assets/recommended-automations-launcher-CFlzhu1o.js +1 -0
- package/build/assets/refresh-cw-CXtFWpwv.js +1 -0
- package/build/assets/root-CanxKlNV.css +1 -0
- package/build/assets/{root-CBBi6IAe.js → root-DkfG_UWR.js} +2 -2
- package/build/assets/root-layout-D75LHYhh.js +2 -0
- package/build/assets/{schema-field-Z-rMg9ti.js → schema-field-OnM5Uob_.js} +1 -1
- package/build/assets/{sdk-section-page-m_cjygxR.js → sdk-section-page-m5WQm2sy.js} +1 -1
- package/build/assets/search-CycosyjN.js +1 -0
- package/build/assets/{secrets-service-BHF4fxML.js → secrets-service-B26R61C1.js} +1 -1
- package/build/assets/{secrets-settings-aBGXtQhX.js → secrets-settings-CbLYCKOX.js} +1 -1
- package/build/assets/{segmented-toggle-SmvsR3jW.js → segmented-toggle-DCspm2U5.js} +1 -1
- package/build/assets/{settings-CZPGNens.js → settings-BJQI_iBM.js} +1 -1
- package/build/assets/{settings-dropdown-input-TWIeiG02.js → settings-dropdown-input-BI8V_Nov.js} +1 -1
- package/build/assets/{settings-index-Dtlegd6s.js → settings-index-BiTqJoH7.js} +1 -1
- package/build/assets/{settings-input-D61Vzp9e.js → settings-input-Cz62hWVW.js} +1 -1
- package/build/assets/{settings-list-classes-sE0ASr1s.js → settings-list-classes-z_3FW5H3.js} +1 -1
- package/build/assets/{settings-modal-CalzJP2l.js → settings-modal-BIrIVn97.js} +1 -1
- package/build/assets/{settings-service.api-DfPYaxZJ.js → settings-service.api--rJmnuLa.js} +1 -1
- package/build/assets/{settings-switch-Drt-rF5s.js → settings-switch-BRsSI8Vs.js} +1 -1
- package/build/assets/{settings-utils-gw2ppAvw.js → settings-utils-Ba7vel6T.js} +1 -1
- package/build/assets/shared-conversation-CQK_PqHx.js +1 -0
- package/build/assets/shield-check-T3JsDJiM.js +1 -0
- package/build/assets/{sidebar-layout-Dxg6zc2K.js → sidebar-layout-Bhi3hVcu.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-C6HpQ55l.js → sidebar-mobile-menu-toggle-YWJNRN4p.js} +1 -1
- package/build/assets/{sidebar-nav-link-CxLoG-dG.js → sidebar-nav-link-BSUlY5Ml.js} +1 -1
- package/build/assets/{sidebar-store-BJeYY-E9.js → sidebar-store-Cl1cUv_F.js} +1 -1
- package/build/assets/{skill-card-pill-row-B_BYBONu.js → skill-card-pill-row-BXz8L8Rn.js} +1 -1
- package/build/assets/{skill-icon-badge-CN41Hy9l.js → skill-icon-badge-QgfKv31M.js} +1 -1
- package/build/assets/{skill-scope-Dt1V5X2p.js → skill-scope-Dc3JPW-8.js} +1 -1
- package/build/assets/{skills-plugins-B-H0cCOP.js → skills-plugins-CpTV27n3.js} +1 -1
- package/build/assets/{skills-settings-DthdIDUb.js → skills-settings-CSW__IW4.js} +1 -1
- package/build/assets/{sparkles-g7y3r-Ut.js → sparkles-TJ0mdECe.js} +1 -1
- package/build/assets/{styled-tooltip-C5C07RQC.js → styled-tooltip-BUMSbgrF.js} +1 -1
- package/build/assets/{task-list-tab-BTde81Iu.js → task-list-tab-mAHMOkUz.js} +1 -1
- package/build/assets/{terminal-DRrJo-cR.js → terminal-BzxBaHx2.js} +1 -1
- package/build/assets/{toggle-switch-CIioisto.js → toggle-switch-O5v1FgxW.js} +1 -1
- package/build/assets/trash-2-C0xNVp9c.js +1 -0
- package/build/assets/{typography-D9tiHct7.js → typography-NOKSk9_R.js} +1 -1
- package/build/assets/usage-tab-tEmVN0KD.js +1 -0
- package/build/assets/{use-acp-credential-form-DGyo0QvL.js → use-acp-credential-form-BPNi0Zbm.js} +1 -1
- package/build/assets/{use-activate-agent-profile-DrPzIKJF.js → use-activate-agent-profile-D9YRQPTF.js} +1 -1
- package/build/assets/{use-agent-profiles-B37XWDLq.js → use-agent-profiles-Cb2zUW3l.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-BzE28H3x.js → use-can-manage-org-profiles-Dxzq2AEd.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-U6HPjy50.js → use-cloud-current-user-id-Co2eJk2A.js} +1 -1
- package/build/assets/{use-config-DapX3pjC.js → use-config-DKAMiI5R.js} +1 -1
- package/build/assets/use-create-conversation-CoHTiCbI.js +1 -0
- package/build/assets/{use-create-secret-DcpT3RPw.js → use-create-secret-2zBlCDsF.js} +1 -1
- package/build/assets/use-is-authed-C52-ivnB.js +1 -0
- package/build/assets/{use-is-creating-conversation-CVefC9Ns.js → use-is-creating-conversation-DdaAE6jV.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-BcKNjxxd.js → use-launch-skill-in-chat-COnDpxCQ.js} +1 -1
- package/build/assets/use-llm-profiles-C_BHue65.js +1 -0
- package/build/assets/{use-manifest-capabilities-zihHDbMW.js → use-manifest-capabilities-DPrQsaPP.js} +1 -1
- package/build/assets/{use-onboarding-completion-6kWOW3ul.js → use-onboarding-completion-CCE8OQgV.js} +1 -1
- package/build/assets/{use-plugins-marketplace-CqkR8kLE.js → use-plugins-marketplace-CEiak69h.js} +1 -1
- package/build/assets/use-save-agent-profile-DK9idD6a.js +1 -0
- package/build/assets/{use-save-settings-DIEurJ3D.js → use-save-settings-DNmnbG6f.js} +1 -1
- package/build/assets/{use-settings-nav-items-DV9qgeu7.js → use-settings-nav-items-BlFL7YhM.js} +1 -1
- package/build/assets/{use-settings-BmLzQjnC.js → use-settings-wCwPaSIv.js} +1 -1
- package/build/assets/{use-tracking-salbPJxT.js → use-tracking-CVwPmhlX.js} +1 -1
- package/build/assets/{use-user-conversation-Dt-W6uNw.js → use-user-conversation-DVtfg0B_.js} +1 -1
- package/build/assets/{useInfiniteQuery-DbCv0Jzd.js → useInfiniteQuery-p1xq35r2.js} +1 -1
- package/build/assets/{useMutation-ChpkYxI5.js → useMutation-BFDQmgk9.js} +1 -1
- package/build/assets/{useQueries-Cjv3E8_1.js → useQueries-DF1NAAeC.js} +1 -1
- package/build/assets/{useQuery-BCnzy4LX.js → useQuery-DRv--6bK.js} +1 -1
- package/build/assets/utils-zxEjKE70.js +1 -0
- package/build/assets/{vendor~browser-DJ1pl_wn.js → vendor~browser-B-fae1JU.js} +14 -14
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js} +3 -3
- package/build/assets/{vendor~files-tab-C87pjSpi.js → vendor~files-tab-D9wR9yM2.js} +1 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-Ipoe6hvY.js +13 -0
- package/build/assets/vendor~root-layout-C-IgVx6e.js +1 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js → vendor~root-layout~conversation-panel~conversation-Dhd_I4H4.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js → vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-Cc0f9kPP.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-d7svw-BB.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-4WsUP-tz.js} +2 -2
- package/build/assets/{verification-settings-oi54wEc1.js → verification-settings-B8UMQ7MG.js} +1 -1
- package/build/assets/{wrench-B1_H-tL1.js → wrench-DIka3hCq.js} +1 -1
- package/build/assets/x-BWKA2Ver.js +1 -0
- package/build/assets/zap-DHddTPc0.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +28 -1
- package/build/locales/ca/openhands.json +28 -1
- package/build/locales/de/openhands.json +28 -1
- package/build/locales/en/openhands.json +28 -1
- package/build/locales/es/openhands.json +28 -1
- package/build/locales/fr/openhands.json +28 -1
- package/build/locales/it/openhands.json +28 -1
- package/build/locales/ja/openhands.json +28 -1
- package/build/locales/ko-KR/openhands.json +28 -1
- package/build/locales/no/openhands.json +28 -1
- package/build/locales/pt/openhands.json +28 -1
- package/build/locales/tr/openhands.json +28 -1
- package/build/locales/uk/openhands.json +28 -1
- package/build/locales/zh-CN/openhands.json +28 -1
- package/build/locales/zh-TW/openhands.json +28 -1
- package/config/defaults.json +3 -3
- package/dist/api/agent-server-compatibility.cjs +1 -1
- package/dist/api/agent-server-compatibility.cjs.map +1 -1
- package/dist/api/agent-server-compatibility.js +1 -1
- package/dist/api/agent-server-compatibility.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 +24 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +116 -97
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/llm-balance-service.cjs +2 -0
- package/dist/api/llm-balance-service.cjs.map +1 -0
- package/dist/api/llm-balance-service.d.ts +33 -0
- package/dist/api/llm-balance-service.js +53 -0
- package/dist/api/llm-balance-service.js.map +1 -0
- package/dist/api/llm-subscription-service.cjs +1 -1
- package/dist/api/llm-subscription-service.cjs.map +1 -1
- package/dist/api/llm-subscription-service.js +42 -34
- package/dist/api/llm-subscription-service.js.map +1 -1
- package/dist/components/conversation/index.cjs +1 -1
- package/dist/components/conversation/index.d.ts +0 -1
- package/dist/components/conversation/index.js +0 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.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.js +24 -23
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
- package/dist/components/conversation-events/chat/group-events.cjs +1 -1
- package/dist/components/conversation-events/chat/group-events.cjs.map +1 -1
- package/dist/components/conversation-events/chat/group-events.d.ts +3 -3
- package/dist/components/conversation-events/chat/group-events.js +27 -26
- package/dist/components/conversation-events/chat/group-events.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-section.d.ts +7 -0
- package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.js +123 -118
- package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-grip.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-grip.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-grip.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-grip.js +7 -7
- package/dist/components/features/chat/components/chat-input-grip.js.map +1 -1
- package/dist/components/features/chat/components/context-window-meter.cjs +2 -0
- package/dist/components/features/chat/components/context-window-meter.cjs.map +1 -0
- package/dist/components/features/chat/components/context-window-meter.d.ts +2 -0
- package/dist/components/features/chat/components/context-window-meter.js +131 -0
- package/dist/components/features/chat/components/context-window-meter.js.map +1 -0
- package/dist/components/features/chat/components/context-window-ring.cjs +2 -0
- package/dist/components/features/chat/components/context-window-ring.cjs.map +1 -0
- package/dist/components/features/chat/components/context-window-ring.d.ts +26 -0
- package/dist/components/features/chat/components/context-window-ring.js +45 -0
- package/dist/components/features/chat/components/context-window-ring.js.map +1 -0
- package/dist/components/features/chat/custom-chat-input.cjs +1 -1
- package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
- package/dist/components/features/chat/custom-chat-input.js +68 -67
- package/dist/components/features/chat/custom-chat-input.js.map +1 -1
- package/dist/components/features/chat/path-component.cjs +1 -1
- package/dist/components/features/chat/path-component.cjs.map +1 -1
- package/dist/components/features/chat/path-component.js +9 -6
- package/dist/components/features/chat/path-component.js.map +1 -1
- package/dist/components/features/chat/plan-preview.cjs +1 -1
- package/dist/components/features/chat/plan-preview.js +4 -4
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.d.ts +0 -8
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js +92 -50
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +7 -2
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js +15 -9
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs +2 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs.map +1 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.d.ts +20 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js +76 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js.map +1 -0
- package/dist/components/features/controls/server-status-context-menu.cjs +1 -1
- package/dist/components/features/controls/server-status-context-menu.cjs.map +1 -1
- package/dist/components/features/controls/server-status-context-menu.d.ts +5 -3
- package/dist/components/features/controls/server-status-context-menu.js +8 -8
- package/dist/components/features/controls/server-status-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.js +58 -61
- package/dist/components/features/conversation/conversation-name-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.js +74 -46
- package/dist/components/features/conversation/conversation-name-with-status.js.map +1 -1
- package/dist/components/features/conversation/conversation-name.cjs +1 -1
- package/dist/components/features/conversation/conversation-name.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name.js +69 -71
- package/dist/components/features/conversation/conversation-name.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js +7 -6
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js.map +1 -1
- 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 +92 -86
- 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 +81 -71
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.js +6 -6
- package/dist/components/features/conversation/metrics-modal/cost-section.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +2 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.js +10 -9
- package/dist/components/features/conversation/metrics-modal/metric-row.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.js +2 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.js.map +1 -1
- package/dist/components/features/conversation/usage-panel/compact-context-button.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.d.ts +16 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.js +59 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/context-meter.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/context-meter.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/context-meter.d.ts +19 -0
- package/dist/components/features/conversation/usage-panel/context-meter.js +46 -0
- package/dist/components/features/conversation/usage-panel/context-meter.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.d.ts +7 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.js +57 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.d.ts +9 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.js +68 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.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.js +10 -13
- package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.cjs +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.cjs.map +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.js +2 -2
- package/dist/components/features/conversation-panel/budget-progress-bar.js.map +1 -1
- package/dist/components/features/conversation-panel/confirm-archive-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.d.ts +8 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.js +48 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.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 +3 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +39 -34
- 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 +3 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +104 -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.d.ts +7 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +25 -17
- 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.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 +9 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +94 -84
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.js +32 -31
- package/dist/components/features/conversation-panel/conversation-group-folder-list.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.js +27 -26
- package/dist/components/features/conversation-panel/conversation-group-folder-row.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +3 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +116 -106
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +1 -1
- 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 +27 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +69 -46
- 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 +230 -165
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.js +22 -25
- package/dist/components/features/files-tab/file-content-viewer.js.map +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.cjs +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.cjs.map +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.js +2 -2
- package/dist/components/features/markdown/markdown-table-scroll.js.map +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs.map +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js +2 -2
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.js +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.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/llm-balance.cjs +2 -0
- package/dist/constants/llm-balance.cjs.map +1 -0
- package/dist/constants/llm-balance.d.ts +13 -0
- package/dist/constants/llm-balance.js +6 -0
- package/dist/constants/llm-balance.js.map +1 -0
- package/dist/contexts/conversation-websocket-context.cjs +2 -2
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +217 -209
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/chat/use-grip-resize.cjs +1 -1
- package/dist/hooks/chat/use-grip-resize.cjs.map +1 -1
- package/dist/hooks/chat/use-grip-resize.d.ts +1 -0
- package/dist/hooks/chat/use-grip-resize.js +39 -30
- package/dist/hooks/chat/use-grip-resize.js.map +1 -1
- package/dist/hooks/mutation/use-condense-conversation.cjs +2 -0
- package/dist/hooks/mutation/use-condense-conversation.cjs.map +1 -0
- package/dist/hooks/mutation/use-condense-conversation.d.ts +12 -0
- package/dist/hooks/mutation/use-condense-conversation.js +17 -0
- package/dist/hooks/mutation/use-condense-conversation.js.map +1 -0
- 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 +30 -21
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.cjs +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.cjs.map +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.js +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.js.map +1 -1
- package/dist/hooks/query/use-conversation-metrics.cjs +1 -1
- package/dist/hooks/query/use-conversation-metrics.cjs.map +1 -1
- package/dist/hooks/query/use-conversation-metrics.js +1 -1
- package/dist/hooks/query/use-conversation-metrics.js.map +1 -1
- package/dist/hooks/query/use-llm-balance.cjs +2 -0
- package/dist/hooks/query/use-llm-balance.cjs.map +1 -0
- package/dist/hooks/query/use-llm-balance.d.ts +10 -0
- package/dist/hooks/query/use-llm-balance.js +24 -0
- package/dist/hooks/query/use-llm-balance.js.map +1 -0
- 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 +1 -1
- package/dist/hooks/query/use-search-providers.js.map +1 -1
- package/dist/hooks/use-await-context-compaction.cjs +2 -0
- package/dist/hooks/use-await-context-compaction.cjs.map +1 -0
- package/dist/hooks/use-await-context-compaction.d.ts +38 -0
- package/dist/hooks/use-await-context-compaction.js +61 -0
- package/dist/hooks/use-await-context-compaction.js.map +1 -0
- package/dist/hooks/use-compact-context-action.cjs +2 -0
- package/dist/hooks/use-compact-context-action.cjs.map +1 -0
- package/dist/hooks/use-compact-context-action.d.ts +10 -0
- package/dist/hooks/use-compact-context-action.js +61 -0
- package/dist/hooks/use-compact-context-action.js.map +1 -0
- package/dist/hooks/use-context-window-usage.cjs +2 -0
- package/dist/hooks/use-context-window-usage.cjs.map +1 -0
- package/dist/hooks/use-context-window-usage.d.ts +5 -0
- package/dist/hooks/use-context-window-usage.js +20 -0
- package/dist/hooks/use-context-window-usage.js.map +1 -0
- package/dist/hooks/use-conversation-name-context-menu.cjs +1 -1
- package/dist/hooks/use-conversation-name-context-menu.cjs.map +1 -1
- package/dist/hooks/use-conversation-name-context-menu.d.ts +0 -3
- package/dist/hooks/use-conversation-name-context-menu.js +54 -57
- package/dist/hooks/use-conversation-name-context-menu.js.map +1 -1
- package/dist/hooks/use-drag-resize.cjs +1 -1
- package/dist/hooks/use-drag-resize.cjs.map +1 -1
- package/dist/hooks/use-drag-resize.d.ts +8 -0
- package/dist/hooks/use-drag-resize.js +21 -18
- package/dist/hooks/use-drag-resize.js.map +1 -1
- package/dist/hooks/use-live-conversation-metrics.cjs +2 -0
- package/dist/hooks/use-live-conversation-metrics.cjs.map +1 -0
- package/dist/hooks/use-live-conversation-metrics.d.ts +18 -0
- package/dist/hooks/use-live-conversation-metrics.js +37 -0
- package/dist/hooks/use-live-conversation-metrics.js.map +1 -0
- package/dist/hooks/use-select-conversation-tab.cjs +1 -1
- package/dist/hooks/use-select-conversation-tab.cjs.map +1 -1
- package/dist/hooks/use-select-conversation-tab.js +2 -2
- package/dist/hooks/use-select-conversation-tab.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 +27 -0
- 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 +474 -15
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +28 -29
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +0 -1
- package/dist/locales/ar/openhands.json +28 -1
- package/dist/locales/ca/openhands.json +28 -1
- package/dist/locales/de/openhands.json +28 -1
- package/dist/locales/en/openhands.json +28 -1
- package/dist/locales/es/openhands.json +28 -1
- package/dist/locales/fr/openhands.json +28 -1
- package/dist/locales/it/openhands.json +28 -1
- package/dist/locales/ja/openhands.json +28 -1
- package/dist/locales/ko-KR/openhands.json +28 -1
- package/dist/locales/no/openhands.json +28 -1
- package/dist/locales/pt/openhands.json +28 -1
- package/dist/locales/tr/openhands.json +28 -1
- package/dist/locales/uk/openhands.json +28 -1
- package/dist/locales/zh-CN/openhands.json +28 -1
- package/dist/locales/zh-TW/openhands.json +28 -1
- package/dist/node_modules/@microlink/react-json-view/dist/main.cjs +5 -5
- package/dist/node_modules/@microlink/react-json-view/dist/main.cjs.map +1 -1
- package/dist/node_modules/@microlink/react-json-view/dist/main.js +5194 -5187
- package/dist/node_modules/@microlink/react-json-view/dist/main.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js +22 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js +33 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +56 -22
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js +3 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js +31 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +9 -5
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.cjs +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.cjs.map +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.js +2 -2
- package/dist/node_modules/i18next-http-backend/esm/index.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js +31 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js.map +1 -0
- package/dist/node_modules/zustand/esm/middleware.cjs +3 -3
- package/dist/node_modules/zustand/esm/middleware.cjs.map +1 -1
- package/dist/node_modules/zustand/esm/middleware.js +33 -31
- package/dist/node_modules/zustand/esm/middleware.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +17 -16
- package/dist/package.js.map +1 -1
- package/dist/routes/usage-tab.cjs +2 -0
- package/dist/routes/usage-tab.cjs.map +1 -0
- package/dist/routes/usage-tab.d.ts +2 -0
- package/dist/routes/usage-tab.js +10 -0
- package/dist/routes/usage-tab.js.map +1 -0
- package/dist/services/child-conversation-launch.cjs +1 -1
- package/dist/services/child-conversation-launch.cjs.map +1 -1
- package/dist/services/child-conversation-launch.js +11 -5
- package/dist/services/child-conversation-launch.js.map +1 -1
- package/dist/stores/archived-conversations-store.cjs +2 -0
- package/dist/stores/archived-conversations-store.cjs.map +1 -0
- package/dist/stores/archived-conversations-store.d.ts +24 -0
- package/dist/stores/archived-conversations-store.js +33 -0
- package/dist/stores/archived-conversations-store.js.map +1 -0
- 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 +3 -0
- package/dist/stores/conversation-panel-preferences-store.js +4 -0
- package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
- package/dist/stores/conversation-store.cjs.map +1 -1
- package/dist/stores/conversation-store.d.ts +1 -1
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/stores/metrics-store.cjs +1 -1
- package/dist/stores/metrics-store.cjs.map +1 -1
- package/dist/stores/metrics-store.d.ts +1 -0
- package/dist/stores/metrics-store.js +7 -4
- package/dist/stores/metrics-store.js.map +1 -1
- package/dist/types/agent-server/core/events/condensation-event.d.ts +3 -0
- package/dist/types/agent-server/core/events/conversation-state-event.d.ts +4 -6
- package/dist/types/agent-server/type-guards.cjs +1 -1
- package/dist/types/agent-server/type-guards.cjs.map +1 -1
- package/dist/types/agent-server/type-guards.d.ts +5 -0
- package/dist/types/agent-server/type-guards.js +3 -3
- package/dist/types/agent-server/type-guards.js.map +1 -1
- package/dist/utils/conversation-local-storage.cjs +1 -1
- package/dist/utils/conversation-local-storage.cjs.map +1 -1
- package/dist/utils/conversation-local-storage.js +2 -1
- package/dist/utils/conversation-local-storage.js.map +1 -1
- package/dist/utils/format-token-count.cjs +2 -0
- package/dist/utils/format-token-count.cjs.map +1 -0
- package/dist/utils/format-token-count.d.ts +3 -0
- package/dist/utils/format-token-count.js +19 -0
- package/dist/utils/format-token-count.js.map +1 -0
- package/dist/utils/hover-reveal-classes.cjs +2 -0
- package/dist/utils/hover-reveal-classes.cjs.map +1 -0
- package/dist/utils/hover-reveal-classes.d.ts +34 -0
- package/dist/utils/hover-reveal-classes.js +41 -0
- package/dist/utils/hover-reveal-classes.js.map +1 -0
- package/dist/utils/is-markdown-file-path.cjs +2 -0
- package/dist/utils/is-markdown-file-path.cjs.map +1 -0
- package/dist/utils/is-markdown-file-path.d.ts +4 -0
- package/dist/utils/is-markdown-file-path.js +14 -0
- package/dist/utils/is-markdown-file-path.js.map +1 -0
- package/dist/utils/mcp-marketplace-utils.cjs +1 -1
- package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
- package/dist/utils/mcp-marketplace-utils.d.ts +7 -0
- package/dist/utils/mcp-marketplace-utils.js +19 -16
- package/dist/utils/mcp-marketplace-utils.js.map +1 -1
- package/dist/utils/transcript-export/index.cjs +3 -3
- package/dist/utils/transcript-export/index.cjs.map +1 -1
- package/dist/utils/transcript-export/index.js +12 -12
- package/dist/utils/transcript-export/index.js.map +1 -1
- package/dist/utils/transcript-export/load-complete-events.cjs +1 -1
- package/dist/utils/transcript-export/load-complete-events.cjs.map +1 -1
- package/dist/utils/transcript-export/load-complete-events.js +4 -4
- package/dist/utils/transcript-export/load-complete-events.js.map +1 -1
- package/dist/utils/workspace-relative-path.cjs +2 -0
- package/dist/utils/workspace-relative-path.cjs.map +1 -0
- package/dist/utils/workspace-relative-path.d.ts +10 -0
- package/dist/utils/workspace-relative-path.js +22 -0
- package/dist/utils/workspace-relative-path.js.map +1 -0
- package/package.json +17 -16
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-process-utils.mjs +6 -1
- package/scripts/dev-safe.mjs +57 -2
- package/build/assets/active-backend-context-B_bg5h9O.js +0 -2
- package/build/assets/agent-profiles-settings-hd2cAIZM.js +0 -1
- package/build/assets/agent-server-conversation-service.api-BheU4HX3.js +0 -86
- package/build/assets/agent-settings-D_SVrWhI.js +0 -1
- package/build/assets/bot-DuN83i3p.js +0 -1
- package/build/assets/browser--eoQOo4M.js +0 -6
- package/build/assets/check-DLOKoFU9.js +0 -1
- package/build/assets/chevron-down-CnIbtM6i.js +0 -1
- package/build/assets/circle-check-CxCYJrpZ.js +0 -1
- package/build/assets/conversation-Cmyw9bFh.js +0 -90
- package/build/assets/conversation-CvoGZ5vC.js +0 -1
- package/build/assets/conversation-panel-CvoGZ5vC.js +0 -1
- package/build/assets/conversation-store-B8Eahyeg.js +0 -6
- package/build/assets/external-link-zWbg5KXS.js +0 -1
- package/build/assets/files-tab-D5zuU5TY.js +0 -1
- package/build/assets/git-provider-icon-zuKz2cwo.js +0 -1
- package/build/assets/git-repo-dropdown-Bo7ciSNX.js +0 -1
- package/build/assets/home-DqyeeFA_.js +0 -1
- package/build/assets/index-home-DqyeeFA_.js +0 -1
- package/build/assets/info-C9lpK5pw.js +0 -1
- package/build/assets/llm-not-configured-banner-DCE_0B4I.js +0 -27
- package/build/assets/llm-settings-8eWBF3Ij.js +0 -1
- package/build/assets/llm-settings-D9ko42Pi.js +0 -1
- package/build/assets/llm-subscription-service-B3K-97lP.js +0 -1
- package/build/assets/loader-circle-C5AnEN8r.js +0 -1
- package/build/assets/manifest-e1c3bc3b.js +0 -1
- package/build/assets/markdown-renderer-DzvgdZey.js +0 -8
- package/build/assets/mcp-marketplace-utils-DSLou4n7.js +0 -1
- package/build/assets/messages-B2l0qLVk.js +0 -40
- package/build/assets/pencil-Bl3GWhgq.js +0 -1
- package/build/assets/plus-CtzlyAoF.js +0 -1
- package/build/assets/recommended-automations-launcher-DIYgUdMm.js +0 -1
- package/build/assets/refresh-cw-B9GhC3QC.js +0 -1
- package/build/assets/root-CRK9fOFd.css +0 -1
- package/build/assets/root-layout-BFN2rCOy.js +0 -2
- package/build/assets/search-CYaiKHRp.js +0 -1
- package/build/assets/shared-conversation-BIAcuORk.js +0 -1
- package/build/assets/shield-check-D2cpEpv3.js +0 -1
- package/build/assets/trash-2-CzDVN-Iw.js +0 -1
- package/build/assets/use-create-conversation-CRf1dCm5.js +0 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +0 -1
- package/build/assets/use-llm-profiles-CHxqoHiN.js +0 -1
- package/build/assets/use-save-agent-profile-CH9_EXQG.js +0 -1
- package/build/assets/utils-DPQfkd-7.js +0 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js +0 -13
- package/build/assets/x-RYDBg-e2.js +0 -1
- package/build/assets/zap-tbKDzCe3.js +0 -1
- package/dist/components/features/conversation/metrics-modal/context-window-section.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/context-window-section.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +0 -6
- package/dist/components/features/conversation/metrics-modal/context-window-section.js +0 -46
- package/dist/components/features/conversation/metrics-modal/context-window-section.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/empty-state.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.js +0 -18
- package/dist/components/features/conversation/metrics-modal/empty-state.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +0 -5
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js +0 -20
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +0 -6
- package/dist/components/features/conversation/metrics-modal/metrics-modal.js +0 -57
- package/dist/components/features/conversation/metrics-modal/metrics-modal.js.map +0 -1
- package/dist/icons/u-credit-card.cjs +0 -2
- package/dist/icons/u-credit-card.cjs.map +0 -1
- package/dist/icons/u-credit-card.js +0 -21
- package/dist/icons/u-credit-card.js.map +0 -1
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js} +0 -0
|
@@ -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("../../../../node_modules/lucide-react/dist/esm/icons/cpu.cjs"),i=require("../../../../types/agent-state.cjs"),a=require("../../../../utils/utils.cjs"),o=require("../../../../hooks/use-conversation-id.cjs"),s=require("../../../../stores/conversation-store.cjs"),c=require("../../../../contexts/active-backend-context.cjs"),ee=require("../../../../hooks/use-agent-state.cjs"),l=require("../../../../utils/form-control-classes.cjs"),te=require("../../../../hooks/use-unified-websocket-status.cjs"),ne=require("../../controls/agent-status.cjs"),re=require("../../../../icons/lesson-plan.cjs"),u=require("../../../../icons/code-pill.cjs"),d=require("../../../../ui/context-menu.cjs"),f=require("../../context-menu/context-menu-list-item.cjs"),ie=require("../../../../hooks/use-click-outside-element.cjs"),ae=require("../../../../hooks/query/use-agent-profiles.cjs"),oe=require("../../../../hooks/use-handle-plan-click.cjs"),se=require("../change-agent-button.cjs"),ce=require("../../../../hooks/use-chat-input-model-state.cjs"),p=require("./chat-input-model.cjs"),m=require("./chat-input-llm-profile-picker.cjs"),le=require("./resolve-picker-kind.cjs"),ue=require("../../../../hooks/mutation/use-unified-stop-conversation.cjs"),h=require("../../../../icons/carret-right-fill.cjs"),g=require("../../controls/tools-context-menu-icon-text.cjs"),de=require("../chat-add-file-button.cjs"),fe=require("../chat-send-button.cjs"),pe=require("../../../../icons/three-dots-vertical.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("../../../../node_modules/lucide-react/dist/esm/icons/cpu.cjs"),i=require("../../../../types/agent-state.cjs"),a=require("../../../../utils/utils.cjs"),o=require("../../../../hooks/use-conversation-id.cjs"),s=require("../../../../stores/conversation-store.cjs"),c=require("../../../../contexts/active-backend-context.cjs"),ee=require("../../../../hooks/use-agent-state.cjs"),l=require("../../../../utils/form-control-classes.cjs"),te=require("../../../../hooks/use-unified-websocket-status.cjs"),ne=require("../../controls/agent-status.cjs"),re=require("../../../../icons/lesson-plan.cjs"),u=require("../../../../icons/code-pill.cjs"),d=require("../../../../ui/context-menu.cjs"),f=require("../../context-menu/context-menu-list-item.cjs"),ie=require("../../../../hooks/use-click-outside-element.cjs"),ae=require("../../../../hooks/query/use-agent-profiles.cjs"),oe=require("../../../../hooks/use-handle-plan-click.cjs"),se=require("../change-agent-button.cjs"),ce=require("../../../../hooks/use-chat-input-model-state.cjs"),p=require("./chat-input-model.cjs"),m=require("./chat-input-llm-profile-picker.cjs"),le=require("./resolve-picker-kind.cjs"),ue=require("../../../../hooks/mutation/use-unified-stop-conversation.cjs"),h=require("../../../../icons/carret-right-fill.cjs"),g=require("../../controls/tools-context-menu-icon-text.cjs"),de=require("../chat-add-file-button.cjs"),fe=require("../chat-send-button.cjs"),pe=require("./context-window-meter.cjs"),me=require("../../../../icons/three-dots-vertical.cjs"),he=require("../../../../hooks/mutation/use-pause-conversation.cjs"),ge=require("../../../../hooks/mutation/use-resume-conversation.cjs");let _=require("react");_=e.__toESM(_,1);let v=require("react/jsx-runtime"),y=require("react-dom");y=e.__toESM(y,1);function b({disabled:e,canSubmit:b=!0,hasStartedConversation:_e,onAddFileClick:ve=()=>{},showButton:ye=!0,buttonClassName:be=``,handleSubmit:xe=()=>{}}){let{t:x}=t.useTranslation(`openhands`),Se=ue.useUnifiedPauseConversation(),S=he.usePauseConversation(),Ce=ge.useResumeConversation(),{conversationId:C}=o.useOptionalConversationId(),{backend:we}=c.useActiveBackend(),Te=we.kind===`cloud`,w=ce.useChatInputModelState(),T=!C||_e===!1,Ee=ae.useAgentProfiles({enabled:T}),De=T&&!(C?.startsWith(`task-`)??!1)&&(Ee.data?.profiles?.length??0)>0,E=Te&&!w.isAcpContext,Oe=te.useUnifiedWebSocketStatus(),{curAgentState:ke}=ee.useAgentState(),{conversationMode:Ae,setConversationMode:je}=s.useConversationStore(),{handlePlanClick:Me,isCreatingConversation:Ne}=oe.useHandlePlanClick(),D=_.default.useRef(null),O=_.default.useRef(null),k=_.default.useRef(null),A=_.default.useRef(null),j=_.default.useRef(null),M=_.default.useRef(null),[N,Pe]=_.default.useState(1/0),[Fe,P]=_.default.useState(0),[Ie,Le]=_.default.useState(32),[F,Re]=_.default.useState(96),[I,ze]=_.default.useState(120),[L,R]=_.default.useState(!1),[z,B]=_.default.useState(null),[V,Be]=_.default.useState();_.default.useEffect(()=>{let e=D.current,t=O.current,n=k.current,r=A.current,i=j.current;if(!e||!t||!n||!i||E&&!r||typeof ResizeObserver>`u`)return;let a=()=>{let a=e.getBoundingClientRect().width,o=t.getBoundingClientRect().width,s=n.getBoundingClientRect().width,c=i.getBoundingClientRect().width;if(a>0&&Pe(a),o>0&&P(o),s>0&&Le(s),c>0&&ze(c),r){let e=r.getBoundingClientRect().width;e>0&&Re(e)}},o=new ResizeObserver(()=>{a()});return o.observe(e),o.observe(t),o.observe(n),o.observe(i),r&&o.observe(r),a(),()=>o.disconnect()},[E]);let Ve=()=>{C&&S.mutate({conversationId:C})},He=()=>{C&&Ce.mutate({conversationId:C})},Ue=Se.isPending||S.isPending,H=_.default.useCallback(e=>{let t=e,n={showCodeInline:!1,showModelInline:!1};return E&&t>=F&&(n.showCodeInline=!0,t-=F+12),t>=I&&(n.showModelInline=!0),n},[E,F,I]),U=N-Fe-8-Ie-12,W=H(U),G=(!E||W.showCodeInline)&&W.showModelInline?W:H(U-28-12),K=E?G.showCodeInline:!1,q=G.showModelInline,We=N>=360,J=E&&!K||!q;_.default.useEffect(()=>{J||(R(!1),B(null))},[J]);let Ge=ie.useClickOutsideElement(()=>{R(!1),B(null)}),Y=ke===i.AgentState.RUNNING||Ne||Oe!==`OPEN`,X=()=>{B(null),R(!1)},Z=le.resolvePickerKind({isAcp:w.isAcpContext}),Q=a.cn(`group`,l.formControlTransitionClassName),$=a.cn(`text-[var(--oh-muted)] group-hover:text-[var(--oh-foreground)]`,l.formControlTransitionClassName);_.default.useLayoutEffect(()=>{if(!L||!M.current)return;let e=M.current,t=()=>{let t=e.getBoundingClientRect();Be({position:`fixed`,top:t.top-8,left:t.left,transform:`translateY(-100%)`,zIndex:9999})};return t(),window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[L]);let Ke=(0,v.jsxs)(d.ContextMenu,{ref:Ge,testId:`chat-input-overflow-menu`,position:`top`,alignment:`left`,className:`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0 overflow-visible min-w-[200px]`,children:[E&&!K&&(0,v.jsxs)(`div`,{className:`relative group/overflow-agent`,children:[(0,v.jsx)(f.ContextMenuListItem,{testId:`overflow-agent-button`,onClick:()=>B(e=>e===`agent`?null:`agent`),isDisabled:Y,children:(0,v.jsx)(g.ToolsContextMenuIconText,{icon:(0,v.jsx)(u.CodePillIcon,{className:`h-[11px] w-[11px]`}),text:x(Ae===`code`?n.I18nKey.COMMON$CODE:n.I18nKey.COMMON$PLAN),rightIcon:(0,v.jsx)(h.default,{width:10,height:10})})}),!Y&&(0,v.jsx)(`div`,{className:a.cn(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/overflow-agent:opacity-100 group-hover/overflow-agent:visible group-hover/overflow-agent:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,z===`agent`&&`opacity-100 visible pointer-events-auto`),children:(0,v.jsxs)(d.ContextMenu,{testId:`overflow-agent-submenu`,className:`overflow-visible min-w-[195px]`,children:[(0,v.jsx)(f.ContextMenuListItem,{testId:`overflow-agent-code`,onClick:e=>{e.preventDefault(),e.stopPropagation(),je(`code`),X()},children:(0,v.jsx)(g.ToolsContextMenuIconText,{icon:(0,v.jsx)(u.CodePillIcon,{className:`h-[11px] w-[11px]`}),text:x(n.I18nKey.COMMON$CODE)})}),(0,v.jsx)(f.ContextMenuListItem,{testId:`overflow-agent-plan`,onClick:e=>{Me(e),X()},children:(0,v.jsx)(g.ToolsContextMenuIconText,{icon:(0,v.jsx)(re.default,{width:16,height:16,color:`currentColor`}),text:x(n.I18nKey.COMMON$PLAN)})})]})})]}),!q&&(0,v.jsxs)(`div`,{className:`relative group/overflow-model`,children:[(0,v.jsx)(f.ContextMenuListItem,{testId:`overflow-model-button`,onClick:()=>B(e=>e===`model`?null:`model`),children:(0,v.jsx)(g.ToolsContextMenuIconText,{icon:(0,v.jsx)(r.Cpu,{width:16,height:16,strokeWidth:2,"aria-hidden":!0}),text:x(n.I18nKey.SETTINGS$AGENT_MODEL),rightIcon:(0,v.jsx)(h.default,{width:10,height:10})})}),(0,v.jsx)(`div`,{className:a.cn(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/overflow-model:opacity-100 group-hover/overflow-model:visible group-hover/overflow-model:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,z===`model`&&`opacity-100 visible pointer-events-auto`),children:(0,v.jsx)(d.ContextMenu,{testId:`overflow-model-submenu`,className:`min-w-[220px] max-w-[320px] max-h-[60vh] overflow-y-auto gap-0`,children:Z===`model`?(0,v.jsx)(p.ChatInputModelMenuContent,{model:w,onClose:X,dividerInset:`menu`,settingsLinkClassName:Q,settingsIconClassName:$}):(0,v.jsx)(m.ChatInputLlmProfileMenuContent,{onClose:X,dividerInset:`menu`,settingsLinkClassName:Q,settingsIconClassName:$})})})]})]});return(0,v.jsxs)(`div`,{ref:D,className:`w-full min-w-0 flex items-center justify-between gap-2`,children:[(0,v.jsx)(`div`,{className:`flex min-w-0 items-center gap-1`,children:(0,v.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,v.jsx)(`div`,{ref:k,className:a.cn(!1),children:(0,v.jsx)(de.ChatAddFileButton,{disabled:e,handleFileIconClick:ve,showAgentProfileSwitch:De})}),E&&(0,v.jsx)(`div`,{ref:A,className:a.cn(!K&&`hidden`),children:(0,v.jsx)(se.ChangeAgentButton,{})}),(0,v.jsx)(`div`,{ref:j,className:a.cn(!q&&`hidden`),children:Z===`model`?(0,v.jsx)(p.ChatInputModel,{}):(0,v.jsx)(m.ChatInputLlmProfilePicker,{})}),J&&(0,v.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,v.jsx)(`button`,{ref:M,type:`button`,className:a.cn(l.chatInputIconButtonClassName,`size-6`),"aria-label":x(n.I18nKey.CHAT_INTERFACE$MORE_INPUT_ACTIONS),"aria-expanded":L,"aria-haspopup":`menu`,onClick:e=>{e.preventDefault(),e.stopPropagation(),R(e=>!e)},children:(0,v.jsx)(me.default,{width:16,height:16,color:`currentColor`})}),L&&typeof document<`u`&&V&&y.default.createPortal((0,v.jsx)(`div`,{style:V,children:Ke}),document.body)]})]})}),(0,v.jsxs)(`div`,{ref:O,className:`ml-auto flex shrink-0 items-center gap-2`,children:[We&&C&&(0,v.jsx)(ne.default,{handleStop:Ve,handleResumeAgent:He,disabled:e,isPausing:Ue}),(0,v.jsx)(pe.ContextWindowMeter,{}),ye&&(0,v.jsx)(fe.ChatSendButton,{buttonClassName:be,handleSubmit:xe,disabled:e||!b})]})]})}exports.ChatInputActions=b;
|
|
2
2
|
//# sourceMappingURL=chat-input-actions.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-input-actions.cjs","names":[],"sources":["../../../../../src/components/features/chat/components/chat-input-actions.tsx"],"sourcesContent":["import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { useTranslation } from \"react-i18next\";\nimport { Cpu } from \"lucide-react\";\nimport { AgentStatus } from \"#/components/features/controls/agent-status\";\nimport { ChangeAgentButton } from \"../change-agent-button\";\nimport { ChatInputModel, ChatInputModelMenuContent } from \"./chat-input-model\";\nimport {\n ChatInputLlmProfilePicker,\n ChatInputLlmProfileMenuContent,\n} from \"./chat-input-llm-profile-picker\";\nimport { resolvePickerKind } from \"./resolve-picker-kind\";\nimport { ChatAddFileButton } from \"../chat-add-file-button\";\nimport { ChatSendButton } from \"../chat-send-button\";\nimport CarretRightFillIcon from \"#/icons/carret-right-fill.svg?react\";\nimport LessonPlanIcon from \"#/icons/lesson-plan.svg?react\";\nimport ThreeDotsVerticalIcon from \"#/icons/three-dots-vertical.svg?react\";\nimport { CodePillIcon } from \"#/icons/code-pill\";\nimport { useUnifiedPauseConversation } from \"#/hooks/mutation/use-unified-stop-conversation\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { usePauseConversation } from \"#/hooks/mutation/use-pause-conversation\";\nimport { useResumeConversation } from \"#/hooks/mutation/use-resume-conversation\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useAgentProfiles } from \"#/hooks/query/use-agent-profiles\";\nimport { useChatInputModelState } from \"#/hooks/use-chat-input-model-state\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { useAgentState } from \"#/hooks/use-agent-state\";\nimport { AgentState } from \"#/types/agent-state\";\nimport { useUnifiedWebSocketStatus } from \"#/hooks/use-unified-websocket-status\";\nimport { useHandlePlanClick } from \"#/hooks/use-handle-plan-click\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ToolsContextMenuIconText } from \"../../controls/tools-context-menu-icon-text\";\nimport { ContextMenuListItem } from \"../../context-menu/context-menu-list-item\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { cn } from \"#/utils/utils\";\nimport {\n chatInputIconButtonClassName,\n formControlTransitionClassName,\n} from \"#/utils/form-control-classes\";\n\ninterface ChatInputActionsProps {\n disabled: boolean;\n canSubmit?: boolean;\n hasStartedConversation?: boolean;\n onAddFileClick?: () => void;\n showButton?: boolean;\n buttonClassName?: string;\n handleSubmit?: () => void;\n}\n\nexport function ChatInputActions({\n disabled,\n canSubmit = true,\n hasStartedConversation,\n onAddFileClick = () => {},\n showButton = true,\n buttonClassName = \"\",\n handleSubmit = () => {},\n}: ChatInputActionsProps) {\n const { t } = useTranslation(\"openhands\");\n const unifiedPauseMutation = useUnifiedPauseConversation();\n const pauseConversationMutation = usePauseConversation();\n const resumeConversationMutation = useResumeConversation();\n const { conversationId } = useOptionalConversationId();\n const { backend } = useActiveBackend();\n const isCloud = backend.kind === \"cloud\";\n const modelState = useChatInputModelState();\n // Agent-profile switching lives in the \"+\" tools menu while the conversation\n // hasn't started (OSS-5735) — the pill itself is always an LLM selector. The\n // gate is computed here (not in the menu) so ToolsContextMenu only mounts the\n // profile submenu when it can actually be used: pre-start, not on a task\n // route, and only when the backend has profiles (#1571 fallback). Fetch is\n // limited to the pre-start window.\n const isPreStart = !conversationId || hasStartedConversation === false;\n const agentProfilesForStart = useAgentProfiles({ enabled: isPreStart });\n const showAgentProfileSwitch =\n isPreStart &&\n !(conversationId?.startsWith(\"task-\") ?? false) &&\n (agentProfilesForStart.data?.profiles?.length ?? 0) > 0;\n // Code/Plan mode switching is a cloud OpenHands feature — it doesn't apply\n // to ACP conversations (which have no \"plan\" mode), so hide it when ACP.\n const showChangeAgentButton = isCloud && !modelState.isAcpContext;\n const webSocketStatus = useUnifiedWebSocketStatus();\n const { curAgentState } = useAgentState();\n const { conversationMode, setConversationMode } = useConversationStore();\n const { handlePlanClick, isCreatingConversation } = useHandlePlanClick();\n\n const actionsRowRef = React.useRef<HTMLDivElement>(null);\n const rightSectionRef = React.useRef<HTMLDivElement>(null);\n const addFileRef = React.useRef<HTMLDivElement>(null);\n const codeRef = React.useRef<HTMLDivElement>(null);\n const modelRef = React.useRef<HTMLDivElement>(null);\n const overflowTriggerRef = React.useRef<HTMLButtonElement>(null);\n const [actionsRowWidth, setActionsRowWidth] = React.useState<number>(\n Number.POSITIVE_INFINITY,\n );\n const [rightSectionWidth, setRightSectionWidth] = React.useState(0);\n const [addFileWidth, setAddFileWidth] = React.useState(32);\n const [codeWidth, setCodeWidth] = React.useState(96);\n const [modelWidth, setModelWidth] = React.useState(120);\n const [isOverflowOpen, setIsOverflowOpen] = React.useState(false);\n const [activeSubmenu, setActiveSubmenu] = React.useState<\n \"agent\" | \"model\" | null\n >(null);\n const [overflowPortalStyle, setOverflowPortalStyle] =\n React.useState<React.CSSProperties>();\n\n React.useEffect(() => {\n const rowEl = actionsRowRef.current;\n const rightEl = rightSectionRef.current;\n const addEl = addFileRef.current;\n const codeEl = codeRef.current;\n const modelEl = modelRef.current;\n\n if (\n !rowEl ||\n !rightEl ||\n !addEl ||\n !modelEl ||\n (showChangeAgentButton && !codeEl) ||\n typeof ResizeObserver === \"undefined\"\n ) {\n return;\n }\n\n const syncWidths = () => {\n const nextRowWidth = rowEl.getBoundingClientRect().width;\n const nextRightWidth = rightEl.getBoundingClientRect().width;\n const nextAddWidth = addEl.getBoundingClientRect().width;\n const nextModelWidth = modelEl.getBoundingClientRect().width;\n\n if (nextRowWidth > 0) setActionsRowWidth(nextRowWidth);\n if (nextRightWidth > 0) setRightSectionWidth(nextRightWidth);\n if (nextAddWidth > 0) setAddFileWidth(nextAddWidth);\n if (nextModelWidth > 0) setModelWidth(nextModelWidth);\n\n if (codeEl) {\n const nextCodeWidth = codeEl.getBoundingClientRect().width;\n if (nextCodeWidth > 0) setCodeWidth(nextCodeWidth);\n }\n };\n\n const observer = new ResizeObserver(() => {\n syncWidths();\n });\n\n observer.observe(rowEl);\n observer.observe(rightEl);\n observer.observe(addEl);\n observer.observe(modelEl);\n if (codeEl) {\n observer.observe(codeEl);\n }\n\n syncWidths();\n\n return () => observer.disconnect();\n }, [showChangeAgentButton]);\n\n const handlePauseAgent = () => {\n if (!conversationId) return;\n pauseConversationMutation.mutate({ conversationId });\n };\n\n const handleResumeAgentClick = () => {\n if (!conversationId) return;\n resumeConversationMutation.mutate({ conversationId });\n };\n\n const isPausing =\n unifiedPauseMutation.isPending || pauseConversationMutation.isPending;\n\n const OVERFLOW_BUTTON_WIDTH = 28;\n const INLINE_GAP = 12;\n const ROOT_GAP = 8;\n\n const fitOptionalItems = React.useCallback(\n (availableWidth: number) => {\n let remaining = availableWidth;\n const next = {\n showCodeInline: false,\n showModelInline: false,\n };\n\n if (showChangeAgentButton && remaining >= codeWidth) {\n next.showCodeInline = true;\n remaining -= codeWidth + INLINE_GAP;\n }\n\n if (remaining >= modelWidth) {\n next.showModelInline = true;\n }\n\n return next;\n },\n [showChangeAgentButton, codeWidth, modelWidth],\n );\n\n const leftBaseWidth =\n actionsRowWidth - rightSectionWidth - ROOT_GAP - addFileWidth - INLINE_GAP;\n\n const fitWithoutOverflow = fitOptionalItems(leftBaseWidth);\n const allOptionalFit =\n (!showChangeAgentButton || fitWithoutOverflow.showCodeInline) &&\n fitWithoutOverflow.showModelInline;\n\n const fitWithOverflow = allOptionalFit\n ? fitWithoutOverflow\n : fitOptionalItems(leftBaseWidth - OVERFLOW_BUTTON_WIDTH - INLINE_GAP);\n\n const showCodeInline = !showChangeAgentButton\n ? false\n : fitWithOverflow.showCodeInline;\n const showModelInline = fitWithOverflow.showModelInline;\n const showAddFileInline = true;\n const showAgentStatusInline = actionsRowWidth >= 360;\n\n const hasOverflowItems =\n !showAddFileInline ||\n (showChangeAgentButton && !showCodeInline) ||\n !showModelInline;\n\n React.useEffect(() => {\n if (!hasOverflowItems) {\n setIsOverflowOpen(false);\n setActiveSubmenu(null);\n }\n }, [hasOverflowItems]);\n\n const overflowMenuRef = useClickOutsideElement<HTMLUListElement>(() => {\n setIsOverflowOpen(false);\n setActiveSubmenu(null);\n });\n\n const isAgentSwitcherDisabled =\n curAgentState === AgentState.RUNNING ||\n isCreatingConversation ||\n webSocketStatus !== \"OPEN\";\n\n const closeOverflowMenus = () => {\n setActiveSubmenu(null);\n setIsOverflowOpen(false);\n };\n\n // Which chat-input LLM picker to show — the constrained ACP model picker or\n // the LLM-profile picker (unit-tested in `resolve-picker-kind.test.ts`).\n const pickerKind = resolvePickerKind({ isAcp: modelState.isAcpContext });\n\n // Shared styling for the settings link inside the overflow submenu content.\n const overflowSettingsLinkClassName = cn(\n \"group\",\n formControlTransitionClassName,\n );\n const overflowSettingsIconClassName = cn(\n \"text-[var(--oh-muted)] group-hover:text-[var(--oh-foreground)]\",\n formControlTransitionClassName,\n );\n\n React.useLayoutEffect(() => {\n if (!isOverflowOpen || !overflowTriggerRef.current) {\n return;\n }\n\n const trigger = overflowTriggerRef.current;\n\n const updatePosition = () => {\n const rect = trigger.getBoundingClientRect();\n const GAP = 8;\n setOverflowPortalStyle({\n position: \"fixed\",\n top: rect.top - GAP,\n left: rect.left,\n transform: \"translateY(-100%)\",\n zIndex: 9999,\n });\n };\n\n updatePosition();\n window.addEventListener(\"resize\", updatePosition);\n window.addEventListener(\"scroll\", updatePosition, true);\n\n return () => {\n window.removeEventListener(\"resize\", updatePosition);\n window.removeEventListener(\"scroll\", updatePosition, true);\n };\n }, [isOverflowOpen]);\n\n const overflowMenu = (\n <ContextMenu\n ref={overflowMenuRef}\n testId=\"chat-input-overflow-menu\"\n position=\"top\"\n alignment=\"left\"\n className=\"!static !top-auto !bottom-auto !left-auto !right-auto !mt-0 overflow-visible min-w-[200px]\"\n >\n {showChangeAgentButton && !showCodeInline && (\n <div className=\"relative group/overflow-agent\">\n <ContextMenuListItem\n testId=\"overflow-agent-button\"\n onClick={() =>\n setActiveSubmenu((current) =>\n current === \"agent\" ? null : \"agent\",\n )\n }\n isDisabled={isAgentSwitcherDisabled}\n >\n <ToolsContextMenuIconText\n icon={<CodePillIcon className=\"h-[11px] w-[11px]\" />}\n text={\n conversationMode === \"code\"\n ? t(I18nKey.COMMON$CODE)\n : t(I18nKey.COMMON$PLAN)\n }\n rightIcon={<CarretRightFillIcon width={10} height={10} />}\n />\n </ContextMenuListItem>\n {!isAgentSwitcherDisabled && (\n <div\n className={cn(\n \"absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]\",\n \"group-hover/overflow-agent:opacity-100 group-hover/overflow-agent:visible group-hover/overflow-agent:pointer-events-auto\",\n \"hover:opacity-100 hover:visible hover:pointer-events-auto\",\n activeSubmenu === \"agent\" &&\n \"opacity-100 visible pointer-events-auto\",\n )}\n >\n <ContextMenu\n testId=\"overflow-agent-submenu\"\n className=\"overflow-visible min-w-[195px]\"\n >\n <ContextMenuListItem\n testId=\"overflow-agent-code\"\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n setConversationMode(\"code\");\n closeOverflowMenus();\n }}\n >\n <ToolsContextMenuIconText\n icon={<CodePillIcon className=\"h-[11px] w-[11px]\" />}\n text={t(I18nKey.COMMON$CODE)}\n />\n </ContextMenuListItem>\n <ContextMenuListItem\n testId=\"overflow-agent-plan\"\n onClick={(event) => {\n handlePlanClick(event);\n closeOverflowMenus();\n }}\n >\n <ToolsContextMenuIconText\n icon={\n <LessonPlanIcon\n width={16}\n height={16}\n color=\"currentColor\"\n />\n }\n text={t(I18nKey.COMMON$PLAN)}\n />\n </ContextMenuListItem>\n </ContextMenu>\n </div>\n )}\n </div>\n )}\n {!showModelInline && (\n <div className=\"relative group/overflow-model\">\n <ContextMenuListItem\n testId=\"overflow-model-button\"\n onClick={() =>\n setActiveSubmenu((current) =>\n current === \"model\" ? null : \"model\",\n )\n }\n >\n <ToolsContextMenuIconText\n icon={<Cpu width={16} height={16} strokeWidth={2} aria-hidden />}\n text={t(I18nKey.SETTINGS$AGENT_MODEL)}\n rightIcon={<CarretRightFillIcon width={10} height={10} />}\n />\n </ContextMenuListItem>\n <div\n className={cn(\n \"absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]\",\n \"group-hover/overflow-model:opacity-100 group-hover/overflow-model:visible group-hover/overflow-model:pointer-events-auto\",\n \"hover:opacity-100 hover:visible hover:pointer-events-auto\",\n activeSubmenu === \"model\" &&\n \"opacity-100 visible pointer-events-auto\",\n )}\n >\n {/* overflow-y-auto (not overflow-visible) so a long ACP model list\n scrolls within the menu instead of overflowing the viewport.\n Safe because this menu has no floating children (tooltips /\n nested popovers) that would be clipped — only a flat model list\n + Settings link. Revisit if floating children are added here. */}\n <ContextMenu\n testId=\"overflow-model-submenu\"\n className=\"min-w-[220px] max-w-[320px] max-h-[60vh] overflow-y-auto gap-0\"\n >\n {pickerKind === \"model\" ? (\n <ChatInputModelMenuContent\n model={modelState}\n onClose={closeOverflowMenus}\n dividerInset=\"menu\"\n settingsLinkClassName={overflowSettingsLinkClassName}\n settingsIconClassName={overflowSettingsIconClassName}\n />\n ) : (\n <ChatInputLlmProfileMenuContent\n onClose={closeOverflowMenus}\n dividerInset=\"menu\"\n settingsLinkClassName={overflowSettingsLinkClassName}\n settingsIconClassName={overflowSettingsIconClassName}\n />\n )}\n </ContextMenu>\n </div>\n </div>\n )}\n </ContextMenu>\n );\n\n return (\n <div\n ref={actionsRowRef}\n className=\"w-full min-w-0 flex items-center justify-between gap-2\"\n >\n <div className=\"flex min-w-0 items-center gap-1\">\n <div className=\"flex min-w-0 items-center gap-3\">\n <div ref={addFileRef} className={cn(!showAddFileInline && \"hidden\")}>\n <ChatAddFileButton\n disabled={disabled}\n handleFileIconClick={onAddFileClick}\n showAgentProfileSwitch={showAgentProfileSwitch}\n />\n </div>\n {showChangeAgentButton && (\n <div ref={codeRef} className={cn(!showCodeInline && \"hidden\")}>\n <ChangeAgentButton />\n </div>\n )}\n <div ref={modelRef} className={cn(!showModelInline && \"hidden\")}>\n {/* Picker depends on backend + ACP context; see the `pickerKind`\n cases above. */}\n {pickerKind === \"model\" ? (\n <ChatInputModel />\n ) : (\n <ChatInputLlmProfilePicker />\n )}\n </div>\n\n {hasOverflowItems && (\n <div className=\"relative shrink-0\">\n <button\n ref={overflowTriggerRef}\n type=\"button\"\n className={cn(chatInputIconButtonClassName, \"size-6\")}\n aria-label={t(I18nKey.CHAT_INTERFACE$MORE_INPUT_ACTIONS)}\n aria-expanded={isOverflowOpen}\n aria-haspopup=\"menu\"\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n setIsOverflowOpen((open) => !open);\n }}\n >\n <ThreeDotsVerticalIcon\n width={16}\n height={16}\n color=\"currentColor\"\n />\n </button>\n\n {isOverflowOpen &&\n typeof document !== \"undefined\" &&\n overflowPortalStyle &&\n ReactDOM.createPortal(\n <div style={overflowPortalStyle}>{overflowMenu}</div>,\n document.body,\n )}\n </div>\n )}\n </div>\n </div>\n <div\n ref={rightSectionRef}\n className=\"ml-auto flex shrink-0 items-center gap-2\"\n >\n {showAgentStatusInline && conversationId && (\n <AgentStatus\n handleStop={handlePauseAgent}\n handleResumeAgent={handleResumeAgentClick}\n disabled={disabled}\n isPausing={isPausing}\n />\n )}\n {showButton && (\n <ChatSendButton\n buttonClassName={buttonClassName}\n handleSubmit={handleSubmit}\n disabled={disabled || !canSubmit}\n />\n )}\n </div>\n </div>\n );\n}\n"],"mappings":"m4DAmDA,SAAgB,EAAiB,CAC/B,WACA,YAAY,GACZ,0BACA,sBAAuB,CAAC,EACxB,cAAa,GACb,mBAAkB,GAClB,oBAAqB,CAAC,GACE,CACxB,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,GAAuB,GAAA,4BAA4B,EACnD,EAA4B,GAAA,qBAAqB,EACjD,GAA6B,GAAA,sBAAsB,EACnD,CAAE,kBAAmB,EAAA,0BAA0B,EAC/C,CAAE,YAAY,EAAA,iBAAiB,EAC/B,GAAU,GAAQ,OAAS,QAC3B,EAAa,GAAA,uBAAuB,EAOpC,EAAa,CAAC,GAAkB,KAA2B,GAC3D,GAAwB,GAAA,iBAAiB,CAAE,QAAS,CAAW,CAAC,EAChE,GACJ,GACA,EAAE,GAAgB,WAAW,OAAO,GAAK,MACxC,GAAsB,MAAM,UAAU,QAAU,GAAK,EAGlD,EAAwB,IAAW,CAAC,EAAW,aAC/C,GAAkB,GAAA,0BAA0B,EAC5C,CAAE,kBAAkB,GAAA,cAAc,EAClC,CAAE,oBAAkB,wBAAwB,EAAA,qBAAqB,EACjE,CAAE,mBAAiB,2BAA2B,GAAA,mBAAmB,EAEjE,EAAgB,EAAA,QAAM,OAAuB,IAAI,EACjD,EAAkB,EAAA,QAAM,OAAuB,IAAI,EACnD,EAAa,EAAA,QAAM,OAAuB,IAAI,EAC9C,EAAU,EAAA,QAAM,OAAuB,IAAI,EAC3C,EAAW,EAAA,QAAM,OAAuB,IAAI,EAC5C,EAAqB,EAAA,QAAM,OAA0B,IAAI,EACzD,CAAC,EAAiB,IAAsB,EAAA,QAAM,SAClD,GACF,EACM,CAAC,GAAmB,I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A,EACpD,SAAS,IACX,CACC,GAEJ,GACF,CAAA,GACL,EAAA,EAAA,MAAC,MAAD,CACE,IAAK,EACL,UAAU,oDAFZ,CAIG,GAAyB,IACxB,EAAA,EAAA,KAAC,GAAA,QAAD,CACE,WAAY,GACZ,kBAAmB,GACT,WACC,YACZ,CAAA,EAEF,KACC,EAAA,EAAA,KAAC,GAAA,eAAD,CACmB,mBACH,gBACd,SAAU,GAAY,CAAC,CACxB,CAAA,CAEA,GACF,GAET"}
|
|
1
|
+
{"version":3,"file":"chat-input-actions.cjs","names":[],"sources":["../../../../../src/components/features/chat/components/chat-input-actions.tsx"],"sourcesContent":["import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { useTranslation } from \"react-i18next\";\nimport { Cpu } from \"lucide-react\";\nimport { AgentStatus } from \"#/components/features/controls/agent-status\";\nimport { ChangeAgentButton } from \"../change-agent-button\";\nimport { ChatInputModel, ChatInputModelMenuContent } from \"./chat-input-model\";\nimport {\n ChatInputLlmProfilePicker,\n ChatInputLlmProfileMenuContent,\n} from \"./chat-input-llm-profile-picker\";\nimport { resolvePickerKind } from \"./resolve-picker-kind\";\nimport { ChatAddFileButton } from \"../chat-add-file-button\";\nimport { ChatSendButton } from \"../chat-send-button\";\nimport { ContextWindowMeter } from \"./context-window-meter\";\nimport CarretRightFillIcon from \"#/icons/carret-right-fill.svg?react\";\nimport LessonPlanIcon from \"#/icons/lesson-plan.svg?react\";\nimport ThreeDotsVerticalIcon from \"#/icons/three-dots-vertical.svg?react\";\nimport { CodePillIcon } from \"#/icons/code-pill\";\nimport { useUnifiedPauseConversation } from \"#/hooks/mutation/use-unified-stop-conversation\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { usePauseConversation } from \"#/hooks/mutation/use-pause-conversation\";\nimport { useResumeConversation } from \"#/hooks/mutation/use-resume-conversation\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useAgentProfiles } from \"#/hooks/query/use-agent-profiles\";\nimport { useChatInputModelState } from \"#/hooks/use-chat-input-model-state\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { useAgentState } from \"#/hooks/use-agent-state\";\nimport { AgentState } from \"#/types/agent-state\";\nimport { useUnifiedWebSocketStatus } from \"#/hooks/use-unified-websocket-status\";\nimport { useHandlePlanClick } from \"#/hooks/use-handle-plan-click\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ToolsContextMenuIconText } from \"../../controls/tools-context-menu-icon-text\";\nimport { ContextMenuListItem } from \"../../context-menu/context-menu-list-item\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { cn } from \"#/utils/utils\";\nimport {\n chatInputIconButtonClassName,\n formControlTransitionClassName,\n} from \"#/utils/form-control-classes\";\n\ninterface ChatInputActionsProps {\n disabled: boolean;\n canSubmit?: boolean;\n hasStartedConversation?: boolean;\n onAddFileClick?: () => void;\n showButton?: boolean;\n buttonClassName?: string;\n handleSubmit?: () => void;\n}\n\nexport function ChatInputActions({\n disabled,\n canSubmit = true,\n hasStartedConversation,\n onAddFileClick = () => {},\n showButton = true,\n buttonClassName = \"\",\n handleSubmit = () => {},\n}: ChatInputActionsProps) {\n const { t } = useTranslation(\"openhands\");\n const unifiedPauseMutation = useUnifiedPauseConversation();\n const pauseConversationMutation = usePauseConversation();\n const resumeConversationMutation = useResumeConversation();\n const { conversationId } = useOptionalConversationId();\n const { backend } = useActiveBackend();\n const isCloud = backend.kind === \"cloud\";\n const modelState = useChatInputModelState();\n // Agent-profile switching lives in the \"+\" tools menu while the conversation\n // hasn't started (OSS-5735) — the pill itself is always an LLM selector. The\n // gate is computed here (not in the menu) so ToolsContextMenu only mounts the\n // profile submenu when it can actually be used: pre-start, not on a task\n // route, and only when the backend has profiles (#1571 fallback). Fetch is\n // limited to the pre-start window.\n const isPreStart = !conversationId || hasStartedConversation === false;\n const agentProfilesForStart = useAgentProfiles({ enabled: isPreStart });\n const showAgentProfileSwitch =\n isPreStart &&\n !(conversationId?.startsWith(\"task-\") ?? false) &&\n (agentProfilesForStart.data?.profiles?.length ?? 0) > 0;\n // Code/Plan mode switching is a cloud OpenHands feature — it doesn't apply\n // to ACP conversations (which have no \"plan\" mode), so hide it when ACP.\n const showChangeAgentButton = isCloud && !modelState.isAcpContext;\n const webSocketStatus = useUnifiedWebSocketStatus();\n const { curAgentState } = useAgentState();\n const { conversationMode, setConversationMode } = useConversationStore();\n const { handlePlanClick, isCreatingConversation } = useHandlePlanClick();\n\n const actionsRowRef = React.useRef<HTMLDivElement>(null);\n const rightSectionRef = React.useRef<HTMLDivElement>(null);\n const addFileRef = React.useRef<HTMLDivElement>(null);\n const codeRef = React.useRef<HTMLDivElement>(null);\n const modelRef = React.useRef<HTMLDivElement>(null);\n const overflowTriggerRef = React.useRef<HTMLButtonElement>(null);\n const [actionsRowWidth, setActionsRowWidth] = React.useState<number>(\n Number.POSITIVE_INFINITY,\n );\n const [rightSectionWidth, setRightSectionWidth] = React.useState(0);\n const [addFileWidth, setAddFileWidth] = React.useState(32);\n const [codeWidth, setCodeWidth] = React.useState(96);\n const [modelWidth, setModelWidth] = React.useState(120);\n const [isOverflowOpen, setIsOverflowOpen] = React.useState(false);\n const [activeSubmenu, setActiveSubmenu] = React.useState<\n \"agent\" | \"model\" | null\n >(null);\n const [overflowPortalStyle, setOverflowPortalStyle] =\n React.useState<React.CSSProperties>();\n\n React.useEffect(() => {\n const rowEl = actionsRowRef.current;\n const rightEl = rightSectionRef.current;\n const addEl = addFileRef.current;\n const codeEl = codeRef.current;\n const modelEl = modelRef.current;\n\n if (\n !rowEl ||\n !rightEl ||\n !addEl ||\n !modelEl ||\n (showChangeAgentButton && !codeEl) ||\n typeof ResizeObserver === \"undefined\"\n ) {\n return;\n }\n\n const syncWidths = () => {\n const nextRowWidth = rowEl.getBoundingClientRect().width;\n const nextRightWidth = rightEl.getBoundingClientRect().width;\n const nextAddWidth = addEl.getBoundingClientRect().width;\n const nextModelWidth = modelEl.getBoundingClientRect().width;\n\n if (nextRowWidth > 0) setActionsRowWidth(nextRowWidth);\n if (nextRightWidth > 0) setRightSectionWidth(nextRightWidth);\n if (nextAddWidth > 0) setAddFileWidth(nextAddWidth);\n if (nextModelWidth > 0) setModelWidth(nextModelWidth);\n\n if (codeEl) {\n const nextCodeWidth = codeEl.getBoundingClientRect().width;\n if (nextCodeWidth > 0) setCodeWidth(nextCodeWidth);\n }\n };\n\n const observer = new ResizeObserver(() => {\n syncWidths();\n });\n\n observer.observe(rowEl);\n observer.observe(rightEl);\n observer.observe(addEl);\n observer.observe(modelEl);\n if (codeEl) {\n observer.observe(codeEl);\n }\n\n syncWidths();\n\n return () => observer.disconnect();\n }, [showChangeAgentButton]);\n\n const handlePauseAgent = () => {\n if (!conversationId) return;\n pauseConversationMutation.mutate({ conversationId });\n };\n\n const handleResumeAgentClick = () => {\n if (!conversationId) return;\n resumeConversationMutation.mutate({ conversationId });\n };\n\n const isPausing =\n unifiedPauseMutation.isPending || pauseConversationMutation.isPending;\n\n const OVERFLOW_BUTTON_WIDTH = 28;\n const INLINE_GAP = 12;\n const ROOT_GAP = 8;\n\n const fitOptionalItems = React.useCallback(\n (availableWidth: number) => {\n let remaining = availableWidth;\n const next = {\n showCodeInline: false,\n showModelInline: false,\n };\n\n if (showChangeAgentButton && remaining >= codeWidth) {\n next.showCodeInline = true;\n remaining -= codeWidth + INLINE_GAP;\n }\n\n if (remaining >= modelWidth) {\n next.showModelInline = true;\n }\n\n return next;\n },\n [showChangeAgentButton, codeWidth, modelWidth],\n );\n\n const leftBaseWidth =\n actionsRowWidth - rightSectionWidth - ROOT_GAP - addFileWidth - INLINE_GAP;\n\n const fitWithoutOverflow = fitOptionalItems(leftBaseWidth);\n const allOptionalFit =\n (!showChangeAgentButton || fitWithoutOverflow.showCodeInline) &&\n fitWithoutOverflow.showModelInline;\n\n const fitWithOverflow = allOptionalFit\n ? fitWithoutOverflow\n : fitOptionalItems(leftBaseWidth - OVERFLOW_BUTTON_WIDTH - INLINE_GAP);\n\n const showCodeInline = !showChangeAgentButton\n ? false\n : fitWithOverflow.showCodeInline;\n const showModelInline = fitWithOverflow.showModelInline;\n const showAddFileInline = true;\n const showAgentStatusInline = actionsRowWidth >= 360;\n\n const hasOverflowItems =\n !showAddFileInline ||\n (showChangeAgentButton && !showCodeInline) ||\n !showModelInline;\n\n React.useEffect(() => {\n if (!hasOverflowItems) {\n setIsOverflowOpen(false);\n setActiveSubmenu(null);\n }\n }, [hasOverflowItems]);\n\n const overflowMenuRef = useClickOutsideElement<HTMLUListElement>(() => {\n setIsOverflowOpen(false);\n setActiveSubmenu(null);\n });\n\n const isAgentSwitcherDisabled =\n curAgentState === AgentState.RUNNING ||\n isCreatingConversation ||\n webSocketStatus !== \"OPEN\";\n\n const closeOverflowMenus = () => {\n setActiveSubmenu(null);\n setIsOverflowOpen(false);\n };\n\n // Which chat-input LLM picker to show — the constrained ACP model picker or\n // the LLM-profile picker (unit-tested in `resolve-picker-kind.test.ts`).\n const pickerKind = resolvePickerKind({ isAcp: modelState.isAcpContext });\n\n // Shared styling for the settings link inside the overflow submenu content.\n const overflowSettingsLinkClassName = cn(\n \"group\",\n formControlTransitionClassName,\n );\n const overflowSettingsIconClassName = cn(\n \"text-[var(--oh-muted)] group-hover:text-[var(--oh-foreground)]\",\n formControlTransitionClassName,\n );\n\n React.useLayoutEffect(() => {\n if (!isOverflowOpen || !overflowTriggerRef.current) {\n return;\n }\n\n const trigger = overflowTriggerRef.current;\n\n const updatePosition = () => {\n const rect = trigger.getBoundingClientRect();\n const GAP = 8;\n setOverflowPortalStyle({\n position: \"fixed\",\n top: rect.top - GAP,\n left: rect.left,\n transform: \"translateY(-100%)\",\n zIndex: 9999,\n });\n };\n\n updatePosition();\n window.addEventListener(\"resize\", updatePosition);\n window.addEventListener(\"scroll\", updatePosition, true);\n\n return () => {\n window.removeEventListener(\"resize\", updatePosition);\n window.removeEventListener(\"scroll\", updatePosition, true);\n };\n }, [isOverflowOpen]);\n\n const overflowMenu = (\n <ContextMenu\n ref={overflowMenuRef}\n testId=\"chat-input-overflow-menu\"\n position=\"top\"\n alignment=\"left\"\n className=\"!static !top-auto !bottom-auto !left-auto !right-auto !mt-0 overflow-visible min-w-[200px]\"\n >\n {showChangeAgentButton && !showCodeInline && (\n <div className=\"relative group/overflow-agent\">\n <ContextMenuListItem\n testId=\"overflow-agent-button\"\n onClick={() =>\n setActiveSubmenu((current) =>\n current === \"agent\" ? null : \"agent\",\n )\n }\n isDisabled={isAgentSwitcherDisabled}\n >\n <ToolsContextMenuIconText\n icon={<CodePillIcon className=\"h-[11px] w-[11px]\" />}\n text={\n conversationMode === \"code\"\n ? t(I18nKey.COMMON$CODE)\n : t(I18nKey.COMMON$PLAN)\n }\n rightIcon={<CarretRightFillIcon width={10} height={10} />}\n />\n </ContextMenuListItem>\n {!isAgentSwitcherDisabled && (\n <div\n className={cn(\n \"absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]\",\n \"group-hover/overflow-agent:opacity-100 group-hover/overflow-agent:visible group-hover/overflow-agent:pointer-events-auto\",\n \"hover:opacity-100 hover:visible hover:pointer-events-auto\",\n activeSubmenu === \"agent\" &&\n \"opacity-100 visible pointer-events-auto\",\n )}\n >\n <ContextMenu\n testId=\"overflow-agent-submenu\"\n className=\"overflow-visible min-w-[195px]\"\n >\n <ContextMenuListItem\n testId=\"overflow-agent-code\"\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n setConversationMode(\"code\");\n closeOverflowMenus();\n }}\n >\n <ToolsContextMenuIconText\n icon={<CodePillIcon className=\"h-[11px] w-[11px]\" />}\n text={t(I18nKey.COMMON$CODE)}\n />\n </ContextMenuListItem>\n <ContextMenuListItem\n testId=\"overflow-agent-plan\"\n onClick={(event) => {\n handlePlanClick(event);\n closeOverflowMenus();\n }}\n >\n <ToolsContextMenuIconText\n icon={\n <LessonPlanIcon\n width={16}\n height={16}\n color=\"currentColor\"\n />\n }\n text={t(I18nKey.COMMON$PLAN)}\n />\n </ContextMenuListItem>\n </ContextMenu>\n </div>\n )}\n </div>\n )}\n {!showModelInline && (\n <div className=\"relative group/overflow-model\">\n <ContextMenuListItem\n testId=\"overflow-model-button\"\n onClick={() =>\n setActiveSubmenu((current) =>\n current === \"model\" ? null : \"model\",\n )\n }\n >\n <ToolsContextMenuIconText\n icon={<Cpu width={16} height={16} strokeWidth={2} aria-hidden />}\n text={t(I18nKey.SETTINGS$AGENT_MODEL)}\n rightIcon={<CarretRightFillIcon width={10} height={10} />}\n />\n </ContextMenuListItem>\n <div\n className={cn(\n \"absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]\",\n \"group-hover/overflow-model:opacity-100 group-hover/overflow-model:visible group-hover/overflow-model:pointer-events-auto\",\n \"hover:opacity-100 hover:visible hover:pointer-events-auto\",\n activeSubmenu === \"model\" &&\n \"opacity-100 visible pointer-events-auto\",\n )}\n >\n {/* overflow-y-auto (not overflow-visible) so a long ACP model list\n scrolls within the menu instead of overflowing the viewport.\n Safe because this menu has no floating children (tooltips /\n nested popovers) that would be clipped — only a flat model list\n + Settings link. Revisit if floating children are added here. */}\n <ContextMenu\n testId=\"overflow-model-submenu\"\n className=\"min-w-[220px] max-w-[320px] max-h-[60vh] overflow-y-auto gap-0\"\n >\n {pickerKind === \"model\" ? (\n <ChatInputModelMenuContent\n model={modelState}\n onClose={closeOverflowMenus}\n dividerInset=\"menu\"\n settingsLinkClassName={overflowSettingsLinkClassName}\n settingsIconClassName={overflowSettingsIconClassName}\n />\n ) : (\n <ChatInputLlmProfileMenuContent\n onClose={closeOverflowMenus}\n dividerInset=\"menu\"\n settingsLinkClassName={overflowSettingsLinkClassName}\n settingsIconClassName={overflowSettingsIconClassName}\n />\n )}\n </ContextMenu>\n </div>\n </div>\n )}\n </ContextMenu>\n );\n\n return (\n <div\n ref={actionsRowRef}\n className=\"w-full min-w-0 flex items-center justify-between gap-2\"\n >\n <div className=\"flex min-w-0 items-center gap-1\">\n <div className=\"flex min-w-0 items-center gap-3\">\n <div ref={addFileRef} className={cn(!showAddFileInline && \"hidden\")}>\n <ChatAddFileButton\n disabled={disabled}\n handleFileIconClick={onAddFileClick}\n showAgentProfileSwitch={showAgentProfileSwitch}\n />\n </div>\n {showChangeAgentButton && (\n <div ref={codeRef} className={cn(!showCodeInline && \"hidden\")}>\n <ChangeAgentButton />\n </div>\n )}\n <div ref={modelRef} className={cn(!showModelInline && \"hidden\")}>\n {/* Picker depends on backend + ACP context; see the `pickerKind`\n cases above. */}\n {pickerKind === \"model\" ? (\n <ChatInputModel />\n ) : (\n <ChatInputLlmProfilePicker />\n )}\n </div>\n\n {hasOverflowItems && (\n <div className=\"relative shrink-0\">\n <button\n ref={overflowTriggerRef}\n type=\"button\"\n className={cn(chatInputIconButtonClassName, \"size-6\")}\n aria-label={t(I18nKey.CHAT_INTERFACE$MORE_INPUT_ACTIONS)}\n aria-expanded={isOverflowOpen}\n aria-haspopup=\"menu\"\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n setIsOverflowOpen((open) => !open);\n }}\n >\n <ThreeDotsVerticalIcon\n width={16}\n height={16}\n color=\"currentColor\"\n />\n </button>\n\n {isOverflowOpen &&\n typeof document !== \"undefined\" &&\n overflowPortalStyle &&\n ReactDOM.createPortal(\n <div style={overflowPortalStyle}>{overflowMenu}</div>,\n document.body,\n )}\n </div>\n )}\n </div>\n </div>\n <div\n ref={rightSectionRef}\n className=\"ml-auto flex shrink-0 items-center gap-2\"\n >\n {showAgentStatusInline && conversationId && (\n <AgentStatus\n handleStop={handlePauseAgent}\n handleResumeAgent={handleResumeAgentClick}\n disabled={disabled}\n isPausing={isPausing}\n />\n )}\n <ContextWindowMeter />\n {showButton && (\n <ChatSendButton\n buttonClassName={buttonClassName}\n handleSubmit={handleSubmit}\n disabled={disabled || !canSubmit}\n />\n )}\n </div>\n </div>\n );\n}\n"],"mappings":"46DAoDA,SAAgB,EAAiB,CAC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qB,CAAA,EACpB,KACC,EAAA,EAAA,KAAC,GAAA,eAAD,CACmB,mBACH,gBACd,SAAU,GAAY,CAAC,CACxB,CAAA,CAEA,GACF,GAET"}
|
|
@@ -10,74 +10,75 @@ import { useAgentState as c } from "../../../../hooks/use-agent-state.js";
|
|
|
10
10
|
import { chatInputIconButtonClassName as ee, formControlTransitionClassName as l } from "../../../../utils/form-control-classes.js";
|
|
11
11
|
import { useUnifiedWebSocketStatus as te } from "../../../../hooks/use-unified-websocket-status.js";
|
|
12
12
|
import ne from "../../controls/agent-status.js";
|
|
13
|
-
import
|
|
14
|
-
import { CodePillIcon as
|
|
15
|
-
import { ContextMenu as
|
|
16
|
-
import { ContextMenuListItem as
|
|
17
|
-
import { useClickOutsideElement as
|
|
18
|
-
import { useAgentProfiles as
|
|
19
|
-
import { useHandlePlanClick as
|
|
20
|
-
import { ChangeAgentButton as
|
|
21
|
-
import { useChatInputModelState as
|
|
22
|
-
import { ChatInputModel as
|
|
23
|
-
import { ChatInputLlmProfileMenuContent as
|
|
24
|
-
import { resolvePickerKind as
|
|
25
|
-
import { useUnifiedPauseConversation as
|
|
26
|
-
import
|
|
27
|
-
import { ToolsContextMenuIconText as
|
|
28
|
-
import { ChatAddFileButton as
|
|
29
|
-
import { ChatSendButton as
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
13
|
+
import re from "../../../../icons/lesson-plan.js";
|
|
14
|
+
import { CodePillIcon as u } from "../../../../icons/code-pill.js";
|
|
15
|
+
import { ContextMenu as d } from "../../../../ui/context-menu.js";
|
|
16
|
+
import { ContextMenuListItem as f } from "../../context-menu/context-menu-list-item.js";
|
|
17
|
+
import { useClickOutsideElement as ie } from "../../../../hooks/use-click-outside-element.js";
|
|
18
|
+
import { useAgentProfiles as p } from "../../../../hooks/query/use-agent-profiles.js";
|
|
19
|
+
import { useHandlePlanClick as ae } from "../../../../hooks/use-handle-plan-click.js";
|
|
20
|
+
import { ChangeAgentButton as oe } from "../change-agent-button.js";
|
|
21
|
+
import { useChatInputModelState as se } from "../../../../hooks/use-chat-input-model-state.js";
|
|
22
|
+
import { ChatInputModel as ce, ChatInputModelMenuContent as le } from "./chat-input-model.js";
|
|
23
|
+
import { ChatInputLlmProfileMenuContent as ue, ChatInputLlmProfilePicker as de } from "./chat-input-llm-profile-picker.js";
|
|
24
|
+
import { resolvePickerKind as fe } from "./resolve-picker-kind.js";
|
|
25
|
+
import { useUnifiedPauseConversation as pe } from "../../../../hooks/mutation/use-unified-stop-conversation.js";
|
|
26
|
+
import m from "../../../../icons/carret-right-fill.js";
|
|
27
|
+
import { ToolsContextMenuIconText as h } from "../../controls/tools-context-menu-icon-text.js";
|
|
28
|
+
import { ChatAddFileButton as me } from "../chat-add-file-button.js";
|
|
29
|
+
import { ChatSendButton as he } from "../chat-send-button.js";
|
|
30
|
+
import { ContextWindowMeter as ge } from "./context-window-meter.js";
|
|
31
|
+
import _e from "../../../../icons/three-dots-vertical.js";
|
|
32
|
+
import { usePauseConversation as ve } from "../../../../hooks/mutation/use-pause-conversation.js";
|
|
33
|
+
import { useResumeConversation as ye } from "../../../../hooks/mutation/use-resume-conversation.js";
|
|
34
|
+
import g from "react";
|
|
35
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
36
|
+
import be from "react-dom";
|
|
36
37
|
//#region src/components/features/chat/components/chat-input-actions.tsx
|
|
37
|
-
function
|
|
38
|
-
let { t:
|
|
39
|
-
|
|
38
|
+
function y({ disabled: y, canSubmit: xe = !0, hasStartedConversation: Se, onAddFileClick: Ce = () => {}, showButton: we = !0, buttonClassName: Te = "", handleSubmit: Ee = () => {} }) {
|
|
39
|
+
let { t: b } = e("openhands"), De = pe(), x = ve(), Oe = ye(), { conversationId: S } = a(), { backend: ke } = s(), C = ke.kind === "cloud", w = se(), T = !S || Se === !1, Ae = p({ enabled: T }), je = T && !(S?.startsWith("task-") ?? !1) && (Ae.data?.profiles?.length ?? 0) > 0, E = C && !w.isAcpContext, Me = te(), { curAgentState: Ne } = c(), { conversationMode: Pe, setConversationMode: Fe } = o(), { handlePlanClick: Ie, isCreatingConversation: Le } = ae(), D = g.useRef(null), O = g.useRef(null), k = g.useRef(null), A = g.useRef(null), j = g.useRef(null), M = g.useRef(null), [N, Re] = g.useState(Infinity), [ze, Be] = g.useState(0), [Ve, He] = g.useState(32), [P, Ue] = g.useState(96), [F, We] = g.useState(120), [I, L] = g.useState(!1), [R, z] = g.useState(null), [B, Ge] = g.useState();
|
|
40
|
+
g.useEffect(() => {
|
|
40
41
|
let e = D.current, t = O.current, n = k.current, r = A.current, i = j.current;
|
|
41
42
|
if (!e || !t || !n || !i || E && !r || typeof ResizeObserver > "u") return;
|
|
42
43
|
let a = () => {
|
|
43
44
|
let a = e.getBoundingClientRect().width, o = t.getBoundingClientRect().width, s = n.getBoundingClientRect().width, c = i.getBoundingClientRect().width;
|
|
44
|
-
if (a > 0 &&
|
|
45
|
+
if (a > 0 && Re(a), o > 0 && Be(o), s > 0 && He(s), c > 0 && We(c), r) {
|
|
45
46
|
let e = r.getBoundingClientRect().width;
|
|
46
|
-
e > 0 &&
|
|
47
|
+
e > 0 && Ue(e);
|
|
47
48
|
}
|
|
48
49
|
}, o = new ResizeObserver(() => {
|
|
49
50
|
a();
|
|
50
51
|
});
|
|
51
52
|
return o.observe(e), o.observe(t), o.observe(n), o.observe(i), r && o.observe(r), a(), () => o.disconnect();
|
|
52
53
|
}, [E]);
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
},
|
|
54
|
+
let Ke = () => {
|
|
55
|
+
S && x.mutate({ conversationId: S });
|
|
56
|
+
}, qe = () => {
|
|
57
|
+
S && Oe.mutate({ conversationId: S });
|
|
58
|
+
}, Je = De.isPending || x.isPending, V = g.useCallback((e) => {
|
|
58
59
|
let t = e, n = {
|
|
59
60
|
showCodeInline: !1,
|
|
60
61
|
showModelInline: !1
|
|
61
62
|
};
|
|
62
|
-
return E && t >=
|
|
63
|
+
return E && t >= P && (n.showCodeInline = !0, t -= P + 12), t >= F && (n.showModelInline = !0), n;
|
|
63
64
|
}, [
|
|
64
65
|
E,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
]),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, [
|
|
71
|
-
let
|
|
72
|
-
|
|
73
|
-
}), Y =
|
|
74
|
-
|
|
75
|
-
}, Z =
|
|
76
|
-
|
|
77
|
-
if (!
|
|
66
|
+
P,
|
|
67
|
+
F
|
|
68
|
+
]), H = N - ze - 8 - Ve - 12, U = V(H), W = (!E || U.showCodeInline) && U.showModelInline ? U : V(H - 28 - 12), G = E ? W.showCodeInline : !1, K = W.showModelInline, Ye = N >= 360, q = E && !G || !K;
|
|
69
|
+
g.useEffect(() => {
|
|
70
|
+
q || (L(!1), z(null));
|
|
71
|
+
}, [q]);
|
|
72
|
+
let J = ie(() => {
|
|
73
|
+
L(!1), z(null);
|
|
74
|
+
}), Y = Ne === r.RUNNING || Le || Me !== "OPEN", X = () => {
|
|
75
|
+
z(null), L(!1);
|
|
76
|
+
}, Z = fe({ isAcp: w.isAcpContext }), Q = i("group", l), $ = i("text-[var(--oh-muted)] group-hover:text-[var(--oh-foreground)]", l);
|
|
77
|
+
g.useLayoutEffect(() => {
|
|
78
|
+
if (!I || !M.current) return;
|
|
78
79
|
let e = M.current, t = () => {
|
|
79
80
|
let t = e.getBoundingClientRect();
|
|
80
|
-
|
|
81
|
+
Ge({
|
|
81
82
|
position: "fixed",
|
|
82
83
|
top: t.top - 8,
|
|
83
84
|
left: t.left,
|
|
@@ -88,87 +89,87 @@ function b({ disabled: b, canSubmit: ye = !0, hasStartedConversation: be, onAddF
|
|
|
88
89
|
return t(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
|
|
89
90
|
window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
|
|
90
91
|
};
|
|
91
|
-
}, [
|
|
92
|
-
let
|
|
93
|
-
ref:
|
|
92
|
+
}, [I]);
|
|
93
|
+
let Xe = /* @__PURE__ */ v(d, {
|
|
94
|
+
ref: J,
|
|
94
95
|
testId: "chat-input-overflow-menu",
|
|
95
96
|
position: "top",
|
|
96
97
|
alignment: "left",
|
|
97
98
|
className: "!static !top-auto !bottom-auto !left-auto !right-auto !mt-0 overflow-visible min-w-[200px]",
|
|
98
|
-
children: [E && !
|
|
99
|
+
children: [E && !G && /* @__PURE__ */ v("div", {
|
|
99
100
|
className: "relative group/overflow-agent",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ _(f, {
|
|
101
102
|
testId: "overflow-agent-button",
|
|
102
|
-
onClick: () =>
|
|
103
|
+
onClick: () => z((e) => e === "agent" ? null : "agent"),
|
|
103
104
|
isDisabled: Y,
|
|
104
|
-
children: /* @__PURE__ */
|
|
105
|
-
icon: /* @__PURE__ */
|
|
106
|
-
text:
|
|
107
|
-
rightIcon: /* @__PURE__ */
|
|
105
|
+
children: /* @__PURE__ */ _(h, {
|
|
106
|
+
icon: /* @__PURE__ */ _(u, { className: "h-[11px] w-[11px]" }),
|
|
107
|
+
text: b(Pe === "code" ? t.COMMON$CODE : t.COMMON$PLAN),
|
|
108
|
+
rightIcon: /* @__PURE__ */ _(m, {
|
|
108
109
|
width: 10,
|
|
109
110
|
height: 10
|
|
110
111
|
})
|
|
111
112
|
})
|
|
112
|
-
}), !Y && /* @__PURE__ */
|
|
113
|
-
className: i("absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]", "group-hover/overflow-agent:opacity-100 group-hover/overflow-agent:visible group-hover/overflow-agent:pointer-events-auto", "hover:opacity-100 hover:visible hover:pointer-events-auto",
|
|
114
|
-
children: /* @__PURE__ */
|
|
113
|
+
}), !Y && /* @__PURE__ */ _("div", {
|
|
114
|
+
className: i("absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]", "group-hover/overflow-agent:opacity-100 group-hover/overflow-agent:visible group-hover/overflow-agent:pointer-events-auto", "hover:opacity-100 hover:visible hover:pointer-events-auto", R === "agent" && "opacity-100 visible pointer-events-auto"),
|
|
115
|
+
children: /* @__PURE__ */ v(d, {
|
|
115
116
|
testId: "overflow-agent-submenu",
|
|
116
117
|
className: "overflow-visible min-w-[195px]",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ _(f, {
|
|
118
119
|
testId: "overflow-agent-code",
|
|
119
120
|
onClick: (e) => {
|
|
120
|
-
e.preventDefault(), e.stopPropagation(),
|
|
121
|
+
e.preventDefault(), e.stopPropagation(), Fe("code"), X();
|
|
121
122
|
},
|
|
122
|
-
children: /* @__PURE__ */
|
|
123
|
-
icon: /* @__PURE__ */
|
|
124
|
-
text:
|
|
123
|
+
children: /* @__PURE__ */ _(h, {
|
|
124
|
+
icon: /* @__PURE__ */ _(u, { className: "h-[11px] w-[11px]" }),
|
|
125
|
+
text: b(t.COMMON$CODE)
|
|
125
126
|
})
|
|
126
|
-
}), /* @__PURE__ */
|
|
127
|
+
}), /* @__PURE__ */ _(f, {
|
|
127
128
|
testId: "overflow-agent-plan",
|
|
128
129
|
onClick: (e) => {
|
|
129
|
-
|
|
130
|
+
Ie(e), X();
|
|
130
131
|
},
|
|
131
|
-
children: /* @__PURE__ */
|
|
132
|
-
icon: /* @__PURE__ */
|
|
132
|
+
children: /* @__PURE__ */ _(h, {
|
|
133
|
+
icon: /* @__PURE__ */ _(re, {
|
|
133
134
|
width: 16,
|
|
134
135
|
height: 16,
|
|
135
136
|
color: "currentColor"
|
|
136
137
|
}),
|
|
137
|
-
text:
|
|
138
|
+
text: b(t.COMMON$PLAN)
|
|
138
139
|
})
|
|
139
140
|
})]
|
|
140
141
|
})
|
|
141
142
|
})]
|
|
142
|
-
}), !
|
|
143
|
+
}), !K && /* @__PURE__ */ v("div", {
|
|
143
144
|
className: "relative group/overflow-model",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ _(f, {
|
|
145
146
|
testId: "overflow-model-button",
|
|
146
|
-
onClick: () =>
|
|
147
|
-
children: /* @__PURE__ */
|
|
148
|
-
icon: /* @__PURE__ */
|
|
147
|
+
onClick: () => z((e) => e === "model" ? null : "model"),
|
|
148
|
+
children: /* @__PURE__ */ _(h, {
|
|
149
|
+
icon: /* @__PURE__ */ _(n, {
|
|
149
150
|
width: 16,
|
|
150
151
|
height: 16,
|
|
151
152
|
strokeWidth: 2,
|
|
152
153
|
"aria-hidden": !0
|
|
153
154
|
}),
|
|
154
|
-
text:
|
|
155
|
-
rightIcon: /* @__PURE__ */
|
|
155
|
+
text: b(t.SETTINGS$AGENT_MODEL),
|
|
156
|
+
rightIcon: /* @__PURE__ */ _(m, {
|
|
156
157
|
width: 10,
|
|
157
158
|
height: 10
|
|
158
159
|
})
|
|
159
160
|
})
|
|
160
|
-
}), /* @__PURE__ */
|
|
161
|
-
className: i("absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]", "group-hover/overflow-model:opacity-100 group-hover/overflow-model:visible group-hover/overflow-model:pointer-events-auto", "hover:opacity-100 hover:visible hover:pointer-events-auto",
|
|
162
|
-
children: /* @__PURE__ */
|
|
161
|
+
}), /* @__PURE__ */ _("div", {
|
|
162
|
+
className: i("absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]", "group-hover/overflow-model:opacity-100 group-hover/overflow-model:visible group-hover/overflow-model:pointer-events-auto", "hover:opacity-100 hover:visible hover:pointer-events-auto", R === "model" && "opacity-100 visible pointer-events-auto"),
|
|
163
|
+
children: /* @__PURE__ */ _(d, {
|
|
163
164
|
testId: "overflow-model-submenu",
|
|
164
165
|
className: "min-w-[220px] max-w-[320px] max-h-[60vh] overflow-y-auto gap-0",
|
|
165
|
-
children: Z === "model" ? /* @__PURE__ */
|
|
166
|
+
children: Z === "model" ? /* @__PURE__ */ _(le, {
|
|
166
167
|
model: w,
|
|
167
168
|
onClose: X,
|
|
168
169
|
dividerInset: "menu",
|
|
169
170
|
settingsLinkClassName: Q,
|
|
170
171
|
settingsIconClassName: $
|
|
171
|
-
}) : /* @__PURE__ */
|
|
172
|
+
}) : /* @__PURE__ */ _(ue, {
|
|
172
173
|
onClose: X,
|
|
173
174
|
dividerInset: "menu",
|
|
174
175
|
settingsLinkClassName: Q,
|
|
@@ -178,74 +179,78 @@ function b({ disabled: b, canSubmit: ye = !0, hasStartedConversation: be, onAddF
|
|
|
178
179
|
})]
|
|
179
180
|
})]
|
|
180
181
|
});
|
|
181
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ v("div", {
|
|
182
183
|
ref: D,
|
|
183
184
|
className: "w-full min-w-0 flex items-center justify-between gap-2",
|
|
184
|
-
children: [/* @__PURE__ */
|
|
185
|
+
children: [/* @__PURE__ */ _("div", {
|
|
185
186
|
className: "flex min-w-0 items-center gap-1",
|
|
186
|
-
children: /* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ v("div", {
|
|
187
188
|
className: "flex min-w-0 items-center gap-3",
|
|
188
189
|
children: [
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ _("div", {
|
|
190
191
|
ref: k,
|
|
191
192
|
className: i(!1),
|
|
192
|
-
children: /* @__PURE__ */
|
|
193
|
-
disabled:
|
|
194
|
-
handleFileIconClick:
|
|
195
|
-
showAgentProfileSwitch:
|
|
193
|
+
children: /* @__PURE__ */ _(me, {
|
|
194
|
+
disabled: y,
|
|
195
|
+
handleFileIconClick: Ce,
|
|
196
|
+
showAgentProfileSwitch: je
|
|
196
197
|
})
|
|
197
198
|
}),
|
|
198
|
-
E && /* @__PURE__ */
|
|
199
|
+
E && /* @__PURE__ */ _("div", {
|
|
199
200
|
ref: A,
|
|
200
|
-
className: i(!
|
|
201
|
-
children: /* @__PURE__ */
|
|
201
|
+
className: i(!G && "hidden"),
|
|
202
|
+
children: /* @__PURE__ */ _(oe, {})
|
|
202
203
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ _("div", {
|
|
204
205
|
ref: j,
|
|
205
|
-
className: i(!
|
|
206
|
-
children:
|
|
206
|
+
className: i(!K && "hidden"),
|
|
207
|
+
children: _(Z === "model" ? ce : de, {})
|
|
207
208
|
}),
|
|
208
|
-
|
|
209
|
+
q && /* @__PURE__ */ v("div", {
|
|
209
210
|
className: "relative shrink-0",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ _("button", {
|
|
211
212
|
ref: M,
|
|
212
213
|
type: "button",
|
|
213
214
|
className: i(ee, "size-6"),
|
|
214
|
-
"aria-label":
|
|
215
|
-
"aria-expanded":
|
|
215
|
+
"aria-label": b(t.CHAT_INTERFACE$MORE_INPUT_ACTIONS),
|
|
216
|
+
"aria-expanded": I,
|
|
216
217
|
"aria-haspopup": "menu",
|
|
217
218
|
onClick: (e) => {
|
|
218
|
-
e.preventDefault(), e.stopPropagation(),
|
|
219
|
+
e.preventDefault(), e.stopPropagation(), L((e) => !e);
|
|
219
220
|
},
|
|
220
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ _(_e, {
|
|
221
222
|
width: 16,
|
|
222
223
|
height: 16,
|
|
223
224
|
color: "currentColor"
|
|
224
225
|
})
|
|
225
|
-
}),
|
|
226
|
-
style:
|
|
227
|
-
children:
|
|
226
|
+
}), I && typeof document < "u" && B && be.createPortal(/* @__PURE__ */ _("div", {
|
|
227
|
+
style: B,
|
|
228
|
+
children: Xe
|
|
228
229
|
}), document.body)]
|
|
229
230
|
})
|
|
230
231
|
]
|
|
231
232
|
})
|
|
232
|
-
}), /* @__PURE__ */
|
|
233
|
+
}), /* @__PURE__ */ v("div", {
|
|
233
234
|
ref: O,
|
|
234
235
|
className: "ml-auto flex shrink-0 items-center gap-2",
|
|
235
|
-
children: [
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
236
|
+
children: [
|
|
237
|
+
Ye && S && /* @__PURE__ */ _(ne, {
|
|
238
|
+
handleStop: Ke,
|
|
239
|
+
handleResumeAgent: qe,
|
|
240
|
+
disabled: y,
|
|
241
|
+
isPausing: Je
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ _(ge, {}),
|
|
244
|
+
we && /* @__PURE__ */ _(he, {
|
|
245
|
+
buttonClassName: Te,
|
|
246
|
+
handleSubmit: Ee,
|
|
247
|
+
disabled: y || !xe
|
|
248
|
+
})
|
|
249
|
+
]
|
|
245
250
|
})]
|
|
246
251
|
});
|
|
247
252
|
}
|
|
248
253
|
//#endregion
|
|
249
|
-
export {
|
|
254
|
+
export { y as ChatInputActions };
|
|
250
255
|
|
|
251
256
|
//# sourceMappingURL=chat-input-actions.js.map
|