@openhands/agent-canvas 1.11.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-Bno1nwPL.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-h8hQz-IU.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-Qsb83VX1.js → api-key-entry-screen-D8Fade_-.js} +1 -1
- package/build/assets/app-settings-CpyGB3AT.js +1 -0
- package/build/assets/{automation-detail-7LkL91j9.js → automation-detail-B-jQ39Mm.js} +1 -1
- package/build/assets/{automation-export-U2QNyNy6.js → automation-export-B1dywoqk.js} +1 -1
- package/build/assets/{automation-setup-route-Bel9_Lue.js → automation-setup-route-C-bWUZBi.js} +1 -1
- package/build/assets/{automation-templates-CRLDssaI.js → automation-templates-DgpCGOJV.js} +1 -1
- package/build/assets/{automations-list-B2iV3ZKW.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-DiVrD4Cm.js +1 -0
- package/build/assets/{backend-synced-settings-badge-DB4717Iu.js → backend-synced-settings-badge-7MIjpr8M.js} +1 -1
- package/build/assets/{badge-yR53enbU.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-A94o33Vn.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-CBQdPZl_.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-PsRXVBz2.js → command-menu-BXy03FBl.js} +1 -1
- package/build/assets/{condenser-settings-w7L3EFvm.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-Bs8gA263.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-DzbDyLkV.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-DOmHPGTA.js → extensions-hub-BqUINAhp.js} +1 -1
- package/build/assets/{extensions-navigation-6zU5M1pa.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-model-name-BN_rx1Y3.js +1 -0
- package/build/assets/{format-relative-time-DGPQlPx0.js → format-relative-time-DSErAuVr.js} +1 -1
- package/build/assets/git-provider-icon-BvlLAche.js +1 -0
- package/build/assets/{git-repo-dropdown-B7RvO70z.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-DEZaZqYv.js → home-BOrlwLqG.js} +1 -1
- package/build/assets/home-BvMNC6E-.js +1 -0
- package/build/assets/{home-store-D7CjMN_-.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-BTwK5lbi.js → install-server-modal-Bl4G1zF4.js} +1 -1
- package/build/assets/{kebab-menu-item-content-C4CkeiJO.js → kebab-menu-item-content-BGoGFEAg.js} +1 -1
- package/build/assets/{launch-DVlx4v9o.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-HNWKLYhq.js → manage-backends-modal-DhGk5mJt.js} +1 -1
- package/build/assets/manifest-653b89aa.js +1 -0
- package/build/assets/{manifest-subpage-layout-D-m-h8_t.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-gLgPP7AS.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-DRzJF5Zn.js → npm-DLckoeJc.js} +1 -1
- package/build/assets/{onboarding-DSr8hOpk.js → onboarding-D7WDG66N.js} +1 -1
- package/build/assets/{onboarding-modal-C6Euf7N4.js → onboarding-modal-C_xVrFNv.js} +1 -1
- package/build/assets/{organization-service.api-C4GYWwj9.js → organization-service.api-D-s9z18a.js} +1 -1
- package/build/assets/pencil-BGOCPRyu.js +1 -0
- package/build/assets/{planner-tab-CZcguxTK.js → planner-tab-AKaXIIfg.js} +1 -1
- package/build/assets/{plugins-management-service-BmDzOQsd.js → plugins-management-service-wtmY4QQw.js} +1 -1
- package/build/assets/plus-zNEL8rcX.js +1 -0
- package/build/assets/{profiles-service.api-CoLTwjc1.js → profiles-service.api-DCMYxHMi.js} +1 -1
- package/build/assets/{providers-tBzTpz1w.js → providers-BjrtjX4L.js} +1 -1
- package/build/assets/{proxy-DCI9S-LA.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-DkfG_UWR.js +2 -0
- package/build/assets/root-layout-D75LHYhh.js +2 -0
- package/build/assets/{schema-field-zhsVDllR.js → schema-field-OnM5Uob_.js} +1 -1
- package/build/assets/{sdk-section-page-CS4GWn0y.js → sdk-section-page-m5WQm2sy.js} +1 -1
- package/build/assets/search-CycosyjN.js +1 -0
- package/build/assets/{secrets-service-DjgGduXk.js → secrets-service-B26R61C1.js} +1 -1
- package/build/assets/{secrets-settings-f-qahfbi.js → secrets-settings-CbLYCKOX.js} +1 -1
- package/build/assets/{segmented-toggle-SmvsR3jW.js → segmented-toggle-DCspm2U5.js} +1 -1
- package/build/assets/{settings-DQd0xLEw.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-BVwy9JEp.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-D6D5ngET.js → settings-modal-BIrIVn97.js} +1 -1
- package/build/assets/{settings-service.api-DZp7E7A9.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-OoZBHxaT.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-B1Per5XI.js → skill-scope-Dc3JPW-8.js} +1 -1
- package/build/assets/{skills-plugins-B3AO6sMz.js → skills-plugins-CpTV27n3.js} +1 -1
- package/build/assets/{skills-settings-DmmgJ6CT.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-C19Q_JNf.js → task-list-tab-mAHMOkUz.js} +1 -1
- package/build/assets/{terminal-CbuMRYal.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-DJmmJKMo.js → use-acp-credential-form-BPNi0Zbm.js} +1 -1
- package/build/assets/{use-activate-agent-profile-CeFfYwu_.js → use-activate-agent-profile-D9YRQPTF.js} +1 -1
- package/build/assets/{use-agent-profiles-BHLkLbRR.js → use-agent-profiles-Cb2zUW3l.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-Bu4y8gSx.js → use-can-manage-org-profiles-Dxzq2AEd.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-QD9x3ySO.js → use-cloud-current-user-id-Co2eJk2A.js} +1 -1
- package/build/assets/{use-config-CPwqciXN.js → use-config-DKAMiI5R.js} +1 -1
- package/build/assets/use-create-conversation-CoHTiCbI.js +1 -0
- package/build/assets/{use-create-secret-BsOfOLvg.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-DBYPjyV6.js → use-manifest-capabilities-DPrQsaPP.js} +1 -1
- package/build/assets/{use-onboarding-completion-CtNJxkXG.js → use-onboarding-completion-CCE8OQgV.js} +1 -1
- package/build/assets/{use-plugins-marketplace-ZEA-gyM9.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-pSjRhD_m.js → use-save-settings-DNmnbG6f.js} +1 -1
- package/build/assets/{use-settings-nav-items-CQgkxUbV.js → use-settings-nav-items-BlFL7YhM.js} +1 -1
- package/build/assets/{use-settings-BHWsOcIG.js → use-settings-wCwPaSIv.js} +1 -1
- package/build/assets/{use-tracking-CGCsBWhg.js → use-tracking-CVwPmhlX.js} +1 -1
- package/build/assets/{use-user-conversation-DRfEU8x0.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-BItwt998.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/chat-input-llm-profile-picker.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +61 -60
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -1
- package/dist/components/features/chat/components/context-window-meter.cjs +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/model-messages.cjs +1 -1
- package/dist/components/features/chat/model-messages.cjs.map +1 -1
- package/dist/components/features/chat/model-messages.js +26 -25
- package/dist/components/features/chat/model-messages.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 +28 -20
- 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/features/settings/llm-profiles/profile-row.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.js +1 -0
- 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/components/shared/modals/settings/model-selector.cjs +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.js +154 -98
- package/dist/components/shared/modals/settings/model-selector.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/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/chat/use-slash-command.cjs +1 -1
- package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
- package/dist/hooks/chat/use-slash-command.js +61 -60
- package/dist/hooks/chat/use-slash-command.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/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +94 -93
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.js +131 -119
- package/dist/routes/llm-settings.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-model-name.cjs +1 -1
- package/dist/utils/format-model-name.cjs.map +1 -1
- package/dist/utils/format-model-name.d.ts +11 -0
- package/dist/utils/format-model-name.js +11 -3
- package/dist/utils/format-model-name.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-BBvP-bI2.js +0 -2
- package/build/assets/agent-profiles-settings-DqoS7RL3.js +0 -1
- package/build/assets/agent-server-conversation-service.api-0RztSdJJ.js +0 -86
- package/build/assets/agent-settings-BJHryp65.js +0 -1
- package/build/assets/app-settings-r1RUbgGi.js +0 -1
- package/build/assets/backend-form-modal-OroTqnAv.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-BUzBZAc-.js +0 -90
- package/build/assets/conversation-panel-pzAKsSDb.js +0 -1
- package/build/assets/conversation-pzAKsSDb.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-BzofBmF4.js +0 -1
- package/build/assets/git-provider-icon-BLMlwy02.js +0 -1
- package/build/assets/git-repo-dropdown-B_PTq4ol.js +0 -1
- package/build/assets/home-r89Vj2td.js +0 -1
- package/build/assets/index-home-r89Vj2td.js +0 -1
- package/build/assets/llm-not-configured-banner-CwKu8C6g.js +0 -27
- package/build/assets/llm-settings-BJotLQND.js +0 -1
- package/build/assets/llm-settings-CDM-5H2A.js +0 -1
- package/build/assets/llm-subscription-service-7eVfDIE1.js +0 -1
- package/build/assets/loader-circle-C5AnEN8r.js +0 -1
- package/build/assets/manifest-2a36a8f8.js +0 -1
- package/build/assets/markdown-renderer-BiiiIznl.js +0 -8
- package/build/assets/mcp-marketplace-utils-Dr_HG_ol.js +0 -1
- package/build/assets/messages-D1cbVhRK.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-BbJAJVED.js +0 -1
- package/build/assets/refresh-cw-B9GhC3QC.js +0 -1
- package/build/assets/root-BfM_kC_d.css +0 -1
- package/build/assets/root-gstBEjty.js +0 -2
- package/build/assets/root-layout-BIAFLP9p.js +0 -2
- package/build/assets/search-CYaiKHRp.js +0 -1
- package/build/assets/shared-conversation-DIxZjElr.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-DWaSVUOB.js +0 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +0 -1
- package/build/assets/use-llm-profiles-CU8ah1pz.js +0 -1
- package/build/assets/use-save-agent-profile-DgI_Uz9a.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,27 +1,27 @@
|
|
|
1
1
|
import { useTranslation as e } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
2
2
|
import { I18nKey as t } from "../../../i18n/declaration.js";
|
|
3
3
|
import { ExternalLink as n } from "../../../node_modules/lucide-react/dist/esm/icons/external-link.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import o from "../../../
|
|
9
|
-
import s from "../../../icons/
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import f from "../../../
|
|
15
|
-
import p from "../../../icons/
|
|
4
|
+
import { Gauge as r } from "../../../node_modules/lucide-react/dist/esm/icons/gauge.js";
|
|
5
|
+
import { Share2 as i } from "../../../node_modules/lucide-react/dist/esm/icons/share-2.js";
|
|
6
|
+
import { cn as a } from "../../../utils/utils.js";
|
|
7
|
+
import { useActiveBackend as ee } from "../../../contexts/active-backend-context.js";
|
|
8
|
+
import { useActiveConversation as o } from "../../../hooks/query/use-active-conversation.js";
|
|
9
|
+
import s from "../../../icons/copy.js";
|
|
10
|
+
import c from "../../../icons/u-close.js";
|
|
11
|
+
import { ContextMenu as l } from "../../../ui/context-menu.js";
|
|
12
|
+
import { ContextMenuListItem as u } from "../context-menu/context-menu-list-item.js";
|
|
13
|
+
import { useClickOutsideElement as d } from "../../../hooks/use-click-outside-element.js";
|
|
14
|
+
import { Divider as f } from "../../../ui/divider.js";
|
|
15
|
+
import p from "../../../icons/skills.js";
|
|
16
|
+
import m from "../../../icons/fishing-hook.js";
|
|
16
17
|
import te from "../../../icons/u-tools.js";
|
|
17
|
-
import { ArchivedDisabledTooltip as
|
|
18
|
+
import { ArchivedDisabledTooltip as h } from "../context-menu/archived-disabled-tooltip.js";
|
|
18
19
|
import { useIsArchivedConversation as ne } from "../../../hooks/use-is-archived-conversation.js";
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import { ConversationNameContextMenuIconText as b } from "./conversation-name-context-menu-icon-text.js";
|
|
20
|
+
import { ConversationNameContextMenuIconText as g } from "./conversation-name-context-menu-icon-text.js";
|
|
21
|
+
import { useBreakpoint as _ } from "../../../hooks/use-breakpoint.js";
|
|
22
|
+
import v from "../../../icons/u-edit.js";
|
|
23
|
+
import y from "../../../icons/u-download.js";
|
|
24
|
+
import b from "../../../icons/u-delete.js";
|
|
25
25
|
import x from "react";
|
|
26
26
|
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
27
27
|
import w from "react-dom";
|
|
@@ -38,13 +38,13 @@ function T({ isPublic: e, onToggle: t, ariaLabel: n }) {
|
|
|
38
38
|
onChange: (e) => t(e.target.checked)
|
|
39
39
|
}), /* @__PURE__ */ S("span", {
|
|
40
40
|
"aria-hidden": !0,
|
|
41
|
-
className:
|
|
42
|
-
children: /* @__PURE__ */ S("span", { className:
|
|
41
|
+
className: a("inline-flex h-3.5 w-7 items-center rounded-full px-0.5 py-px transition-colors duration-200 ease-in-out", e ? "bg-white" : "bg-base-secondary"),
|
|
42
|
+
children: /* @__PURE__ */ S("span", { className: a("block h-2 w-2 shrink-0 rounded-full transition-transform duration-200 ease-in-out", e ? "translate-x-[calc(1rem-1px)] bg-base-secondary" : "translate-x-px bg-tertiary-light") })
|
|
43
43
|
})]
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
function E({ onClose: E, onRename: D, onDelete: O, onStop: k, onDisplayCost: A, onShowAgentTools: j, onShowSkills: M, onShowHooks: N, onTogglePublic: P, onCopyShareLink: F, onExportTranscript: I, onDownloadConversation: L, shareUrl: R, position: z = "bottom", anchorRef: B }) {
|
|
47
|
-
let V =
|
|
47
|
+
let V = _(), { t: H } = e("openhands"), { backend: U } = ee(), { data: W } = o(), G = ne(), K = d(E, B), q = B?.current ?? null, [J, Y] = x.useState();
|
|
48
48
|
x.useLayoutEffect(() => {
|
|
49
49
|
if (!q) return;
|
|
50
50
|
let e = () => {
|
|
@@ -60,36 +60,36 @@ function E({ onClose: E, onRename: D, onDelete: O, onStop: k, onDisplayCost: A,
|
|
|
60
60
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
61
61
|
};
|
|
62
62
|
}, [q, z]);
|
|
63
|
-
let X = !!(j || M || N), re = !!A, ie = !!(k || O), ae = U.kind === "cloud" ? t.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME : t.COMMON$STOP_CONVERSATION, oe = U.kind === "cloud" && !!P, Z = W?.public || !1, Q = !!q, $ = /* @__PURE__ */ C(
|
|
63
|
+
let X = !!(j || M || N), re = !!A, ie = !!(k || O), ae = U.kind === "cloud" ? t.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME : t.COMMON$STOP_CONVERSATION, oe = U.kind === "cloud" && !!P, Z = W?.public || !1, Q = !!q, $ = /* @__PURE__ */ C(l, {
|
|
64
64
|
ref: K,
|
|
65
65
|
testId: "conversation-name-context-menu",
|
|
66
66
|
position: z,
|
|
67
67
|
alignment: "left",
|
|
68
|
-
className:
|
|
68
|
+
className: a(V ? "right-0 translate-x-[34%] left-auto" : "", Q ? "!static !top-auto !bottom-auto !left-auto !right-auto !mt-0" : ""),
|
|
69
69
|
children: [
|
|
70
|
-
D && /* @__PURE__ */ S(
|
|
70
|
+
D && /* @__PURE__ */ S(u, {
|
|
71
71
|
testId: "rename-button",
|
|
72
72
|
onClick: D,
|
|
73
|
-
children: /* @__PURE__ */ S(
|
|
74
|
-
icon: /* @__PURE__ */ S(
|
|
73
|
+
children: /* @__PURE__ */ S(g, {
|
|
74
|
+
icon: /* @__PURE__ */ S(v, {
|
|
75
75
|
width: 16,
|
|
76
76
|
height: 16
|
|
77
77
|
}),
|
|
78
78
|
text: H(t.BUTTON$RENAME)
|
|
79
79
|
})
|
|
80
80
|
}),
|
|
81
|
-
X && /* @__PURE__ */ S(
|
|
81
|
+
X && /* @__PURE__ */ S(f, {
|
|
82
82
|
testId: "separator-tools",
|
|
83
83
|
inset: "menu"
|
|
84
84
|
}),
|
|
85
|
-
M && /* @__PURE__ */ S(
|
|
85
|
+
M && /* @__PURE__ */ S(h, {
|
|
86
86
|
isDisabled: G,
|
|
87
|
-
children: /* @__PURE__ */ S(
|
|
87
|
+
children: /* @__PURE__ */ S(u, {
|
|
88
88
|
testId: "show-skills-button",
|
|
89
89
|
onClick: M,
|
|
90
90
|
isDisabled: G,
|
|
91
|
-
children: /* @__PURE__ */ S(
|
|
92
|
-
icon: /* @__PURE__ */ S(
|
|
91
|
+
children: /* @__PURE__ */ S(g, {
|
|
92
|
+
icon: /* @__PURE__ */ S(p, {
|
|
93
93
|
width: 16,
|
|
94
94
|
height: 16,
|
|
95
95
|
className: "stroke-[1.75]",
|
|
@@ -99,14 +99,14 @@ function E({ onClose: E, onRename: D, onDelete: O, onStop: k, onDisplayCost: A,
|
|
|
99
99
|
})
|
|
100
100
|
})
|
|
101
101
|
}),
|
|
102
|
-
N && /* @__PURE__ */ S(
|
|
102
|
+
N && /* @__PURE__ */ S(h, {
|
|
103
103
|
isDisabled: G,
|
|
104
|
-
children: /* @__PURE__ */ S(
|
|
104
|
+
children: /* @__PURE__ */ S(u, {
|
|
105
105
|
testId: "show-hooks-button",
|
|
106
106
|
onClick: N,
|
|
107
107
|
isDisabled: G,
|
|
108
|
-
children: /* @__PURE__ */ S(
|
|
109
|
-
icon: /* @__PURE__ */ S(
|
|
108
|
+
children: /* @__PURE__ */ S(g, {
|
|
109
|
+
icon: /* @__PURE__ */ S(m, {
|
|
110
110
|
width: 16,
|
|
111
111
|
height: 16,
|
|
112
112
|
"aria-hidden": !0
|
|
@@ -115,13 +115,13 @@ function E({ onClose: E, onRename: D, onDelete: O, onStop: k, onDisplayCost: A,
|
|
|
115
115
|
})
|
|
116
116
|
})
|
|
117
117
|
}),
|
|
118
|
-
j && /* @__PURE__ */ S(
|
|
118
|
+
j && /* @__PURE__ */ S(h, {
|
|
119
119
|
isDisabled: G,
|
|
120
|
-
children: /* @__PURE__ */ S(
|
|
120
|
+
children: /* @__PURE__ */ S(u, {
|
|
121
121
|
testId: "show-agent-tools-button",
|
|
122
122
|
onClick: j,
|
|
123
123
|
isDisabled: G,
|
|
124
|
-
children: /* @__PURE__ */ S(
|
|
124
|
+
children: /* @__PURE__ */ S(g, {
|
|
125
125
|
icon: /* @__PURE__ */ S(te, {
|
|
126
126
|
width: 16,
|
|
127
127
|
height: 16
|
|
@@ -130,40 +130,37 @@ function E({ onClose: E, onRename: D, onDelete: O, onStop: k, onDisplayCost: A,
|
|
|
130
130
|
})
|
|
131
131
|
})
|
|
132
132
|
}),
|
|
133
|
-
I && /* @__PURE__ */ S(
|
|
133
|
+
I && /* @__PURE__ */ S(u, {
|
|
134
134
|
testId: "export-transcript-button",
|
|
135
135
|
onClick: I,
|
|
136
|
-
children: /* @__PURE__ */ S(
|
|
137
|
-
icon: /* @__PURE__ */ S(
|
|
136
|
+
children: /* @__PURE__ */ S(g, {
|
|
137
|
+
icon: /* @__PURE__ */ S(y, {
|
|
138
138
|
width: 16,
|
|
139
139
|
height: 16
|
|
140
140
|
}),
|
|
141
141
|
text: H(t.BUTTON$EXPORT_TRANSCRIPT)
|
|
142
142
|
})
|
|
143
143
|
}),
|
|
144
|
-
L && /* @__PURE__ */ S(
|
|
144
|
+
L && /* @__PURE__ */ S(u, {
|
|
145
145
|
testId: "download-trajectory-button",
|
|
146
146
|
onClick: L,
|
|
147
|
-
children: /* @__PURE__ */ S(
|
|
148
|
-
icon: /* @__PURE__ */ S(
|
|
147
|
+
children: /* @__PURE__ */ S(g, {
|
|
148
|
+
icon: /* @__PURE__ */ S(y, {
|
|
149
149
|
width: 16,
|
|
150
150
|
height: 16
|
|
151
151
|
}),
|
|
152
152
|
text: H(t.BUTTON$DOWNLOAD_CONVERSATION_DATA)
|
|
153
153
|
})
|
|
154
154
|
}),
|
|
155
|
-
(re || ie) && /* @__PURE__ */ S(
|
|
155
|
+
(re || ie) && /* @__PURE__ */ S(f, {
|
|
156
156
|
testId: "separator-info-control",
|
|
157
157
|
inset: "menu"
|
|
158
158
|
}),
|
|
159
|
-
A && /* @__PURE__ */ S(
|
|
159
|
+
A && /* @__PURE__ */ S(u, {
|
|
160
160
|
testId: "display-cost-button",
|
|
161
161
|
onClick: A,
|
|
162
|
-
children: /* @__PURE__ */ S(
|
|
163
|
-
icon: /* @__PURE__ */ S(
|
|
164
|
-
width: 16,
|
|
165
|
-
height: 16
|
|
166
|
-
}),
|
|
162
|
+
children: /* @__PURE__ */ S(g, {
|
|
163
|
+
icon: /* @__PURE__ */ S(r, { size: 16 }),
|
|
167
164
|
text: H(t.BUTTON$DISPLAY_COST)
|
|
168
165
|
})
|
|
169
166
|
}),
|
|
@@ -173,7 +170,7 @@ function E({ onClose: E, onRename: D, onDelete: O, onStop: k, onDisplayCost: A,
|
|
|
173
170
|
/* @__PURE__ */ S("span", {
|
|
174
171
|
className: "flex shrink-0 items-center text-[var(--oh-muted)]",
|
|
175
172
|
"aria-hidden": !0,
|
|
176
|
-
children: /* @__PURE__ */ S(
|
|
173
|
+
children: /* @__PURE__ */ S(i, { size: 16 })
|
|
177
174
|
}),
|
|
178
175
|
/* @__PURE__ */ S("span", {
|
|
179
176
|
className: "min-w-0 flex-1 truncate text-sm",
|
|
@@ -189,7 +186,7 @@ function E({ onClose: E, onRename: D, onDelete: O, onStop: k, onDisplayCost: A,
|
|
|
189
186
|
onClick: F,
|
|
190
187
|
className: "rounded p-0.5 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current",
|
|
191
188
|
title: H(t.BUTTON$COPY_TO_CLIPBOARD),
|
|
192
|
-
children: /* @__PURE__ */ S(
|
|
189
|
+
children: /* @__PURE__ */ S(s, {
|
|
193
190
|
width: 14,
|
|
194
191
|
height: 14
|
|
195
192
|
})
|
|
@@ -214,14 +211,14 @@ function E({ onClose: E, onRename: D, onDelete: O, onStop: k, onDisplayCost: A,
|
|
|
214
211
|
})
|
|
215
212
|
]
|
|
216
213
|
}),
|
|
217
|
-
k && /* @__PURE__ */ S(
|
|
214
|
+
k && /* @__PURE__ */ S(h, {
|
|
218
215
|
isDisabled: G,
|
|
219
|
-
children: /* @__PURE__ */ S(
|
|
216
|
+
children: /* @__PURE__ */ S(u, {
|
|
220
217
|
testId: "stop-button",
|
|
221
218
|
onClick: k,
|
|
222
219
|
isDisabled: G,
|
|
223
|
-
children: /* @__PURE__ */ S(
|
|
224
|
-
icon: /* @__PURE__ */ S(
|
|
220
|
+
children: /* @__PURE__ */ S(g, {
|
|
221
|
+
icon: /* @__PURE__ */ S(c, {
|
|
225
222
|
width: 16,
|
|
226
223
|
height: 16
|
|
227
224
|
}),
|
|
@@ -229,11 +226,11 @@ function E({ onClose: E, onRename: D, onDelete: O, onStop: k, onDisplayCost: A,
|
|
|
229
226
|
})
|
|
230
227
|
})
|
|
231
228
|
}),
|
|
232
|
-
O && /* @__PURE__ */ S(
|
|
229
|
+
O && /* @__PURE__ */ S(u, {
|
|
233
230
|
testId: "delete-button",
|
|
234
231
|
onClick: O,
|
|
235
|
-
children: /* @__PURE__ */ S(
|
|
236
|
-
icon: /* @__PURE__ */ S(
|
|
232
|
+
children: /* @__PURE__ */ S(g, {
|
|
233
|
+
icon: /* @__PURE__ */ S(b, {
|
|
237
234
|
width: 16,
|
|
238
235
|
height: 16
|
|
239
236
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-name-context-menu.js","names":[],"sources":["../../../../src/components/features/conversation/conversation-name-context-menu.tsx"],"sourcesContent":["import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { ExternalLink, Share2 } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { cn } from \"#/utils/utils\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { ContextMenuListItem } from \"../context-menu/context-menu-list-item\";\nimport { Divider } from \"#/ui/divider\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\nimport EditIcon from \"#/icons/u-edit.svg?react\";\nimport SkillsIcon from \"#/icons/skills.svg?react\";\nimport FishingHookIcon from \"#/icons/fishing-hook.svg?react\";\nimport ToolsIcon from \"#/icons/u-tools.svg?react\";\nimport DownloadIcon from \"#/icons/u-download.svg?react\";\nimport CreditCardIcon from \"#/icons/u-credit-card.svg?react\";\nimport CloseIcon from \"#/icons/u-close.svg?react\";\nimport DeleteIcon from \"#/icons/u-delete.svg?react\";\nimport CopyIcon from \"#/icons/copy.svg?react\";\nimport { ConversationNameContextMenuIconText } from \"./conversation-name-context-menu-icon-text\";\nimport { ArchivedDisabledTooltip } from \"../context-menu/archived-disabled-tooltip\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface ConversationNameContextMenuProps {\n onClose: () => void;\n onRename?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDelete?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onStop?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDisplayCost?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowAgentTools?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowSkills?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowHooks?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onTogglePublic?: (nextIsPublic: boolean) => void;\n onCopyShareLink?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onExportTranscript?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDownloadConversation?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n shareUrl?: string;\n position?: \"top\" | \"bottom\";\n /**\n * Element the menu should anchor against. When provided, the menu renders\n * into a portal at the document body using fixed positioning so it cannot be\n * clipped by ancestors with `overflow: hidden` (e.g. the chat panel that\n * sits next to the right-side tabs panel).\n */\n anchorRef?: React.RefObject<HTMLElement | null>;\n}\n\nfunction PublicShareToggle({\n isPublic,\n onToggle,\n ariaLabel,\n}: {\n isPublic: boolean;\n onToggle: (nextIsPublic: boolean) => void;\n ariaLabel: string;\n}) {\n return (\n <label className=\"relative inline-flex shrink-0 cursor-pointer items-center\">\n <input\n hidden\n type=\"checkbox\"\n data-testid=\"share-publicly-button\"\n checked={isPublic}\n aria-label={ariaLabel}\n onChange={(event) => onToggle(event.target.checked)}\n />\n <span\n aria-hidden\n className={cn(\n \"inline-flex h-3.5 w-7 items-center rounded-full px-0.5 py-px transition-colors duration-200 ease-in-out\",\n isPublic ? \"bg-white\" : \"bg-base-secondary\",\n )}\n >\n <span\n className={cn(\n \"block h-2 w-2 shrink-0 rounded-full transition-transform duration-200 ease-in-out\",\n isPublic\n ? \"translate-x-[calc(1rem-1px)] bg-base-secondary\"\n : \"translate-x-px bg-tertiary-light\",\n )}\n />\n </span>\n </label>\n );\n}\n\nexport function ConversationNameContextMenu({\n onClose,\n onRename,\n onDelete,\n onStop,\n onDisplayCost,\n onShowAgentTools,\n onShowSkills,\n onShowHooks,\n onTogglePublic,\n onCopyShareLink,\n onExportTranscript,\n onDownloadConversation,\n shareUrl,\n position = \"bottom\",\n anchorRef,\n}: ConversationNameContextMenuProps) {\n const isMobile = useBreakpoint();\n\n const { t } = useTranslation(\"openhands\");\n const { backend } = useActiveBackend();\n const { data: conversation } = useActiveConversation();\n const isArchivedConversation = useIsArchivedConversation();\n const ref = useClickOutsideElement<HTMLUListElement>(onClose);\n\n const anchorElement = anchorRef?.current ?? null;\n const [portalStyle, setPortalStyle] = React.useState<React.CSSProperties>();\n React.useLayoutEffect(() => {\n if (!anchorElement) return undefined;\n\n const updatePosition = () => {\n const rect = anchorElement.getBoundingClientRect();\n if (!rect) return;\n const gap = 8;\n const style: React.CSSProperties = {\n position: \"fixed\",\n zIndex: 9999,\n };\n if (position === \"top\") {\n style.bottom = window.innerHeight - rect.top + gap;\n } else {\n style.top = rect.bottom + gap;\n }\n style.left = rect.left;\n setPortalStyle(style);\n };\n\n updatePosition();\n window.addEventListener(\"resize\", updatePosition);\n window.addEventListener(\"scroll\", updatePosition, true);\n return () => {\n window.removeEventListener(\"resize\", updatePosition);\n window.removeEventListener(\"scroll\", updatePosition, true);\n };\n }, [anchorElement, position]);\n const hasTools = Boolean(onShowAgentTools || onShowSkills || onShowHooks);\n const hasInfo = Boolean(onDisplayCost);\n const hasControl = Boolean(onStop || onDelete);\n const stopLabelKey =\n backend.kind === \"cloud\"\n ? I18nKey.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME\n : I18nKey.COMMON$STOP_CONVERSATION;\n const shouldShowPublicSharing =\n backend.kind === \"cloud\" && Boolean(onTogglePublic);\n const isPublic = conversation?.public || false;\n\n const isPortaled = Boolean(anchorElement);\n const portalClassName = isPortaled\n ? \"!static !top-auto !bottom-auto !left-auto !right-auto !mt-0\"\n : \"\";\n\n const menu = (\n <ContextMenu\n ref={ref}\n testId=\"conversation-name-context-menu\"\n position={position}\n alignment=\"left\"\n className={cn(\n isMobile ? \"right-0 translate-x-[34%] left-auto\" : \"\",\n portalClassName,\n )}\n >\n {onRename && (\n <ContextMenuListItem testId=\"rename-button\" onClick={onRename}>\n <ConversationNameContextMenuIconText\n icon={<EditIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$RENAME)}\n />\n </ContextMenuListItem>\n )}\n\n {hasTools && <Divider testId=\"separator-tools\" inset=\"menu\" />}\n\n {onShowSkills && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-skills-button\"\n onClick={onShowSkills}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={\n <SkillsIcon\n width={16}\n height={16}\n className=\"stroke-[1.75]\"\n aria-hidden\n />\n }\n text={t(I18nKey.CONVERSATION$SHOW_SKILLS)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onShowHooks && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-hooks-button\"\n onClick={onShowHooks}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<FishingHookIcon width={16} height={16} aria-hidden />}\n text={t(I18nKey.CONVERSATION$SHOW_HOOKS)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onShowAgentTools && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-agent-tools-button\"\n onClick={onShowAgentTools}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<ToolsIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onExportTranscript && (\n <ContextMenuListItem\n testId=\"export-transcript-button\"\n onClick={onExportTranscript}\n >\n <ConversationNameContextMenuIconText\n icon={<DownloadIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$EXPORT_TRANSCRIPT)}\n />\n </ContextMenuListItem>\n )}\n\n {onDownloadConversation && (\n <ContextMenuListItem\n testId=\"download-trajectory-button\"\n onClick={onDownloadConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<DownloadIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$DOWNLOAD_CONVERSATION_DATA)}\n />\n </ContextMenuListItem>\n )}\n\n {(hasInfo || hasControl) && (\n <Divider testId=\"separator-info-control\" inset=\"menu\" />\n )}\n\n {onDisplayCost && (\n <ContextMenuListItem\n testId=\"display-cost-button\"\n onClick={onDisplayCost}\n >\n <ConversationNameContextMenuIconText\n icon={<CreditCardIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$DISPLAY_COST)}\n />\n </ContextMenuListItem>\n )}\n\n {shouldShowPublicSharing && onTogglePublic && (\n <li className=\"flex w-full items-center gap-2 rounded px-2 py-2 hover:bg-[var(--oh-interactive-hover)]\">\n <span\n className=\"flex shrink-0 items-center text-[var(--oh-muted)]\"\n aria-hidden\n >\n <Share2 size={16} />\n </span>\n <span className=\"min-w-0 flex-1 truncate text-sm\">\n {t(I18nKey.CONVERSATION$SHARE_PUBLICLY)}\n </span>\n <div className=\"flex shrink-0 items-center\">\n {isPublic && shareUrl && onCopyShareLink && (\n <div className=\"mr-2 flex items-center gap-0.5\">\n <button\n type=\"button\"\n data-testid=\"copy-share-link-button\"\n onClick={onCopyShareLink}\n className=\"rounded p-0.5 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current\"\n title={t(I18nKey.BUTTON$COPY_TO_CLIPBOARD)}\n >\n <CopyIcon width={14} height={14} />\n </button>\n <a\n data-testid=\"open-share-link-button\"\n href={shareUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={(event) => event.stopPropagation()}\n className=\"rounded p-0.5 text-[var(--oh-muted)] no-underline visited:text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current\"\n title={t(I18nKey.BUTTON$OPEN_IN_NEW_TAB)}\n >\n <ExternalLink size={14} aria-hidden />\n </a>\n </div>\n )}\n <PublicShareToggle\n isPublic={isPublic}\n onToggle={onTogglePublic}\n ariaLabel={t(I18nKey.CONVERSATION$SHARE_PUBLICLY)}\n />\n </div>\n </li>\n )}\n\n {onStop && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"stop-button\"\n onClick={onStop}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<CloseIcon width={16} height={16} />}\n text={t(stopLabelKey)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onDelete && (\n <ContextMenuListItem testId=\"delete-button\" onClick={onDelete}>\n <ConversationNameContextMenuIconText\n icon={<DeleteIcon width={16} height={16} />}\n text={t(I18nKey.COMMON$DELETE_CONVERSATION)}\n />\n </ContextMenuListItem>\n )}\n </ContextMenu>\n );\n\n if (isPortaled) {\n if (typeof document === \"undefined\" || !portalStyle) {\n return null;\n }\n return ReactDOM.createPortal(\n <div style={portalStyle}>{menu}</div>,\n document.body,\n );\n }\n\n return menu;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,SAAS,EAAkB,EACzB,aACA,aACA,gBAKC;CACD,OACE,kBAAC,SAAD;EAAO,WAAU;YAAjB,CACE,kBAAC,SAAD;GACE,QAAA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AO,EAAE,EAAQ,sBAAsB;kBAEvC,kBAAC,GAAD;SAAc,MAAM;SAAI,eAAA;QAAa,CAAA;OACpC,CAAA,CACA;UAEP,kBAAC,GAAD;OACY;OACV,UAAU;OACV,WAAW,EAAE,EAAQ,2BAA2B;MACjD,CAAA,CACE;;IACH;;GAGL,KACC,kBAAC,GAAD;IAAyB,YAAY;cACnC,kBAAC,GAAD;KACE,QAAO;KACP,SAAS;KACT,YAAY;eAEZ,kBAAC,GAAD;MACE,MAAM,kBAAC,GAAD;OAAW,OAAO;OAAI,QAAQ;MAAK,CAAA;MACzC,MAAM,EAAE,EAAY;KACrB,CAAA;IACkB,CAAA;GACE,CAAA;GAG1B,KACC,kBAAC,GAAD;IAAqB,QAAO;IAAgB,SAAS;cACnD,kBAAC,GAAD;KACE,MAAM,kBAAC,GAAD;MAAY,OAAO;MAAI,QAAQ;KAAK,CAAA;KAC1C,MAAM,EAAE,EAAQ,0BAA0B;IAC3C,CAAA;GACkB,CAAA;EAEZ;;CAaf,OAVI,IACE,OAAO,WAAa,OAAe,CAAC,IAC/B,OAEF,EAAS,aACd,kBAAC,OAAD;EAAK,OAAO;YAAc;CAAU,CAAA,GACpC,SAAS,IACX,IAGK;AACT"}
|
|
1
|
+
{"version":3,"file":"conversation-name-context-menu.js","names":[],"sources":["../../../../src/components/features/conversation/conversation-name-context-menu.tsx"],"sourcesContent":["import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { ExternalLink, Gauge, Share2 } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { cn } from \"#/utils/utils\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { ContextMenuListItem } from \"../context-menu/context-menu-list-item\";\nimport { Divider } from \"#/ui/divider\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\nimport EditIcon from \"#/icons/u-edit.svg?react\";\nimport SkillsIcon from \"#/icons/skills.svg?react\";\nimport FishingHookIcon from \"#/icons/fishing-hook.svg?react\";\nimport ToolsIcon from \"#/icons/u-tools.svg?react\";\nimport DownloadIcon from \"#/icons/u-download.svg?react\";\nimport CloseIcon from \"#/icons/u-close.svg?react\";\nimport DeleteIcon from \"#/icons/u-delete.svg?react\";\nimport CopyIcon from \"#/icons/copy.svg?react\";\nimport { ConversationNameContextMenuIconText } from \"./conversation-name-context-menu-icon-text\";\nimport { ArchivedDisabledTooltip } from \"../context-menu/archived-disabled-tooltip\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface ConversationNameContextMenuProps {\n onClose: () => void;\n onRename?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDelete?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onStop?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDisplayCost?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowAgentTools?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowSkills?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowHooks?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onTogglePublic?: (nextIsPublic: boolean) => void;\n onCopyShareLink?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onExportTranscript?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDownloadConversation?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n shareUrl?: string;\n position?: \"top\" | \"bottom\";\n /**\n * Element the menu should anchor against. When provided, the menu renders\n * into a portal at the document body using fixed positioning so it cannot be\n * clipped by ancestors with `overflow: hidden` (e.g. the chat panel that\n * sits next to the right-side tabs panel).\n */\n anchorRef?: React.RefObject<HTMLElement | null>;\n}\n\nfunction PublicShareToggle({\n isPublic,\n onToggle,\n ariaLabel,\n}: {\n isPublic: boolean;\n onToggle: (nextIsPublic: boolean) => void;\n ariaLabel: string;\n}) {\n return (\n <label className=\"relative inline-flex shrink-0 cursor-pointer items-center\">\n <input\n hidden\n type=\"checkbox\"\n data-testid=\"share-publicly-button\"\n checked={isPublic}\n aria-label={ariaLabel}\n onChange={(event) => onToggle(event.target.checked)}\n />\n <span\n aria-hidden\n className={cn(\n \"inline-flex h-3.5 w-7 items-center rounded-full px-0.5 py-px transition-colors duration-200 ease-in-out\",\n isPublic ? \"bg-white\" : \"bg-base-secondary\",\n )}\n >\n <span\n className={cn(\n \"block h-2 w-2 shrink-0 rounded-full transition-transform duration-200 ease-in-out\",\n isPublic\n ? \"translate-x-[calc(1rem-1px)] bg-base-secondary\"\n : \"translate-x-px bg-tertiary-light\",\n )}\n />\n </span>\n </label>\n );\n}\n\nexport function ConversationNameContextMenu({\n onClose,\n onRename,\n onDelete,\n onStop,\n onDisplayCost,\n onShowAgentTools,\n onShowSkills,\n onShowHooks,\n onTogglePublic,\n onCopyShareLink,\n onExportTranscript,\n onDownloadConversation,\n shareUrl,\n position = \"bottom\",\n anchorRef,\n}: ConversationNameContextMenuProps) {\n const isMobile = useBreakpoint();\n\n const { t } = useTranslation(\"openhands\");\n const { backend } = useActiveBackend();\n const { data: conversation } = useActiveConversation();\n const isArchivedConversation = useIsArchivedConversation();\n const ref = useClickOutsideElement<HTMLUListElement>(onClose, anchorRef);\n\n const anchorElement = anchorRef?.current ?? null;\n const [portalStyle, setPortalStyle] = React.useState<React.CSSProperties>();\n React.useLayoutEffect(() => {\n if (!anchorElement) return undefined;\n\n const updatePosition = () => {\n const rect = anchorElement.getBoundingClientRect();\n if (!rect) return;\n const gap = 8;\n const style: React.CSSProperties = {\n position: \"fixed\",\n zIndex: 9999,\n };\n if (position === \"top\") {\n style.bottom = window.innerHeight - rect.top + gap;\n } else {\n style.top = rect.bottom + gap;\n }\n style.left = rect.left;\n setPortalStyle(style);\n };\n\n updatePosition();\n window.addEventListener(\"resize\", updatePosition);\n window.addEventListener(\"scroll\", updatePosition, true);\n return () => {\n window.removeEventListener(\"resize\", updatePosition);\n window.removeEventListener(\"scroll\", updatePosition, true);\n };\n }, [anchorElement, position]);\n const hasTools = Boolean(onShowAgentTools || onShowSkills || onShowHooks);\n const hasInfo = Boolean(onDisplayCost);\n const hasControl = Boolean(onStop || onDelete);\n const stopLabelKey =\n backend.kind === \"cloud\"\n ? I18nKey.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME\n : I18nKey.COMMON$STOP_CONVERSATION;\n const shouldShowPublicSharing =\n backend.kind === \"cloud\" && Boolean(onTogglePublic);\n const isPublic = conversation?.public || false;\n\n const isPortaled = Boolean(anchorElement);\n const portalClassName = isPortaled\n ? \"!static !top-auto !bottom-auto !left-auto !right-auto !mt-0\"\n : \"\";\n\n const menu = (\n <ContextMenu\n ref={ref}\n testId=\"conversation-name-context-menu\"\n position={position}\n alignment=\"left\"\n className={cn(\n isMobile ? \"right-0 translate-x-[34%] left-auto\" : \"\",\n portalClassName,\n )}\n >\n {onRename && (\n <ContextMenuListItem testId=\"rename-button\" onClick={onRename}>\n <ConversationNameContextMenuIconText\n icon={<EditIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$RENAME)}\n />\n </ContextMenuListItem>\n )}\n\n {hasTools && <Divider testId=\"separator-tools\" inset=\"menu\" />}\n\n {onShowSkills && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-skills-button\"\n onClick={onShowSkills}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={\n <SkillsIcon\n width={16}\n height={16}\n className=\"stroke-[1.75]\"\n aria-hidden\n />\n }\n text={t(I18nKey.CONVERSATION$SHOW_SKILLS)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onShowHooks && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-hooks-button\"\n onClick={onShowHooks}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<FishingHookIcon width={16} height={16} aria-hidden />}\n text={t(I18nKey.CONVERSATION$SHOW_HOOKS)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onShowAgentTools && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-agent-tools-button\"\n onClick={onShowAgentTools}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<ToolsIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onExportTranscript && (\n <ContextMenuListItem\n testId=\"export-transcript-button\"\n onClick={onExportTranscript}\n >\n <ConversationNameContextMenuIconText\n icon={<DownloadIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$EXPORT_TRANSCRIPT)}\n />\n </ContextMenuListItem>\n )}\n\n {onDownloadConversation && (\n <ContextMenuListItem\n testId=\"download-trajectory-button\"\n onClick={onDownloadConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<DownloadIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$DOWNLOAD_CONVERSATION_DATA)}\n />\n </ContextMenuListItem>\n )}\n\n {(hasInfo || hasControl) && (\n <Divider testId=\"separator-info-control\" inset=\"menu\" />\n )}\n\n {onDisplayCost && (\n <ContextMenuListItem\n testId=\"display-cost-button\"\n onClick={onDisplayCost}\n >\n <ConversationNameContextMenuIconText\n icon={<Gauge size={16} />}\n text={t(I18nKey.BUTTON$DISPLAY_COST)}\n />\n </ContextMenuListItem>\n )}\n\n {shouldShowPublicSharing && onTogglePublic && (\n <li className=\"flex w-full items-center gap-2 rounded px-2 py-2 hover:bg-[var(--oh-interactive-hover)]\">\n <span\n className=\"flex shrink-0 items-center text-[var(--oh-muted)]\"\n aria-hidden\n >\n <Share2 size={16} />\n </span>\n <span className=\"min-w-0 flex-1 truncate text-sm\">\n {t(I18nKey.CONVERSATION$SHARE_PUBLICLY)}\n </span>\n <div className=\"flex shrink-0 items-center\">\n {isPublic && shareUrl && onCopyShareLink && (\n <div className=\"mr-2 flex items-center gap-0.5\">\n <button\n type=\"button\"\n data-testid=\"copy-share-link-button\"\n onClick={onCopyShareLink}\n className=\"rounded p-0.5 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current\"\n title={t(I18nKey.BUTTON$COPY_TO_CLIPBOARD)}\n >\n <CopyIcon width={14} height={14} />\n </button>\n <a\n data-testid=\"open-share-link-button\"\n href={shareUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={(event) => event.stopPropagation()}\n className=\"rounded p-0.5 text-[var(--oh-muted)] no-underline visited:text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current\"\n title={t(I18nKey.BUTTON$OPEN_IN_NEW_TAB)}\n >\n <ExternalLink size={14} aria-hidden />\n </a>\n </div>\n )}\n <PublicShareToggle\n isPublic={isPublic}\n onToggle={onTogglePublic}\n ariaLabel={t(I18nKey.CONVERSATION$SHARE_PUBLICLY)}\n />\n </div>\n </li>\n )}\n\n {onStop && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"stop-button\"\n onClick={onStop}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<CloseIcon width={16} height={16} />}\n text={t(stopLabelKey)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onDelete && (\n <ContextMenuListItem testId=\"delete-button\" onClick={onDelete}>\n <ConversationNameContextMenuIconText\n icon={<DeleteIcon width={16} height={16} />}\n text={t(I18nKey.COMMON$DELETE_CONVERSATION)}\n />\n </ContextMenuListItem>\n )}\n </ContextMenu>\n );\n\n if (isPortaled) {\n if (typeof document === \"undefined\" || !portalStyle) {\n return null;\n }\n return ReactDOM.createPortal(\n <div style={portalStyle}>{menu}</div>,\n document.body,\n );\n }\n\n return menu;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,SAAS,EAAkB,EACzB,aACA,aACA,gBAKC;CACD,OACE,kBAAC,SAAD;EAAO,WAAU;YAAjB,CACE,kBAAC,SAAD;GACE,QAAA;GACA,MAAK;GACL,eAAY;GACZ,SAAS;GACT,cAAY;GACZ,WAAW,MAAU,EAAS,EAAM,OAAO,OAAO;EACnD,CAAA,GACD,kBAAC,QAAD;GACE,eAAA;GACA,WAAW,EACT,2GACA,IAAW,aAAa,mBAC1B;aAEA,kBAAC,QAAD,EACE,WAAW,EACT,qFACA,IACI,mDACA,kCACN,EACD,CAAA;EACG,CAAA,CACD;;AAEX;AAEA,SAAgB,EAA4B,EAC1C,YACA,aACA,aACA,WACA,kBACA,qBACA,iBACA,gBACA,mBACA,oBACA,uBACA,2BACA,aACA,cAAW,UACX,gBACmC;CACnC,IAAM,IAAW,EAAc,GAEzB,EAAE,SAAM,EAAe,WAAW,GAClC,EAAE,eAAY,GAAiB,GAC/B,EAAE,MAAM,MAAiB,EAAsB,GAC/C,IAAyB,GAA0B,GACnD,IAAM,EAAyC,GAAS,CAAS,GAEjE,IAAgB,GAAW,WAAW,MACtC,CAAC,GAAa,KAAkB,EAAM,SAA8B;CAC1E,EAAM,sBAAsB;EAC1B,IAAI,CAAC,GAAe;EAEpB,IAAM,UAAuB;GAC3B,IAAM,IAAO,EAAc,sBAAsB;GACjD,IAAI,CAAC,GAAM;GACX,IACM,IAA6B;IACjC,UAAU;IACV,QAAQ;GACV;GAOA,AANI,MAAa,QACf,EAAM,SAAS,OAAO,cAAc,EAAK,MAAM,IAE/C,EAAM,MAAM,EAAK,SAAS,GAE5B,EAAM,OAAO,EAAK,MAClB,EAAe,CAAK;EACtB;EAKA,OAHA,EAAe,GACf,OAAO,iBAAiB,UAAU,CAAc,GAChD,OAAO,iBAA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AS;QACT,WAAU;QACV,OAAO,EAAE,EAAQ,wBAAwB;kBAEzC,kBAAC,GAAD;SAAU,OAAO;SAAI,QAAQ;QAAK,CAAA;OAC5B,CAAA,GACR,kBAAC,KAAD;QACE,eAAY;QACZ,MAAM;QACN,QAAO;QACP,KAAI;QACJ,UAAU,MAAU,EAAM,gBAAgB;QAC1C,WAAU;QACV,OAAO,EAAE,EAAQ,sBAAsB;kBAEvC,kBAAC,GAAD;SAAc,MAAM;SAAI,eAAA;QAAa,CAAA;OACpC,CAAA,CACA;UAEP,kBAAC,GAAD;OACY;OACV,UAAU;OACV,WAAW,EAAE,EAAQ,2BAA2B;MACjD,CAAA,CACE;;IACH;;GAGL,KACC,kBAAC,GAAD;IAAyB,YAAY;cACnC,kBAAC,GAAD;KACE,QAAO;KACP,SAAS;KACT,YAAY;eAEZ,kBAAC,GAAD;MACE,MAAM,kBAAC,GAAD;OAAW,OAAO;OAAI,QAAQ;MAAK,CAAA;MACzC,MAAM,EAAE,EAAY;KACrB,CAAA;IACkB,CAAA;GACE,CAAA;GAG1B,KACC,kBAAC,GAAD;IAAqB,QAAO;IAAgB,SAAS;cACnD,kBAAC,GAAD;KACE,MAAM,kBAAC,GAAD;MAAY,OAAO;MAAI,QAAQ;KAAK,CAAA;KAC1C,MAAM,EAAE,EAAQ,0BAA0B;IAC3C,CAAA;GACkB,CAAA;EAEZ;;CAaf,OAVI,IACE,OAAO,WAAa,OAAe,CAAC,IAC/B,OAEF,EAAS,aACd,kBAAC,OAAD;EAAK,OAAO;YAAc;CAAU,CAAA,GACpC,SAAS,IACX,IAGK;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../types/agent-state.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("../../../types/agent-state.cjs"),i=require("../../../utils/status.cjs"),a=require("../../../utils/utils.cjs"),o=require("../../../hooks/use-conversation-id.cjs"),s=require("../../../hooks/query/use-active-conversation.cjs"),c=require("../../../hooks/use-agent-state.cjs"),l=require("../../../hooks/query/use-task-polling.cjs"),u=require("../../../hooks/mutation/use-unified-stop-conversation.cjs"),d=require("../../../hooks/use-user-providers.cjs"),f=require("../../../icons/debug-stackframe-dot.cjs"),p=require("../../../hooks/mutation/use-unified-start-conversation.cjs"),m=require("../controls/server-status-context-menu.cjs"),h=require("./conversation-name.cjs"),g=require("./right-panel-toggle.cjs");let _=require("react");_=e.__toESM(_,1);let v=require("react/jsx-runtime");function y(){let{t:e}=t.useTranslation(`openhands`),{conversationId:y}=o.useConversationId(),{data:b}=s.useActiveConversation(),{curAgentState:x}=c.useAgentState(),{isTask:S,taskStatus:C}=l.useTaskPolling(),{mutate:w}=u.useUnifiedPauseConversation(),{mutate:T}=p.useUnifiedResumeConversation(),{providers:E}=d.useUserProviders(),[D,O]=_.default.useState(!1),[k,A]=_.default.useState(!1),j=_.default.useRef(null),M=b?.execution_status??null,N=a.getStatusColor({isPausing:!1,isTask:S,taskStatus:C,isStartingStatus:x===r.AgentState.LOADING||x===r.AgentState.INIT,isStopStatus:i.isExecutionErrored(M),curAgentState:x}),P=D||k,F=()=>{O(!1),A(!1)};return(0,v.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,v.jsxs)(`div`,{className:`flex items-center min-w-0`,children:[(0,v.jsxs)(`div`,{className:`relative shrink-0`,onPointerEnter:e=>{e.pointerType===`mouse`&&A(!0)},onPointerLeave:e=>{e.pointerType===`mouse`&&A(!1)},children:[(0,v.jsx)(`button`,{ref:j,type:`button`,"data-testid":`server-status-menu-trigger`,"aria-label":e(n.I18nKey.COMMON$SERVER_STATUS),"aria-expanded":P,"aria-haspopup":`menu`,onClick:e=>{if(e.preventDefault(),e.stopPropagation(),P){F();return}O(!0)},className:a.cn(`flex items-center justify-center rounded-md`,`text-[var(--oh-muted)] hover:bg-white/10`),children:(0,v.jsx)(f.default,{className:`ml-[3.5px] w-6 h-6 cursor-pointer`,color:N,"aria-hidden":!0})}),P?(0,v.jsx)(m.ServerStatusContextMenu,{onClose:F,ignoreOutsideClickRef:j,onStopServer:i.isExecutionActive(M)?e=>{e.preventDefault(),e.stopPropagation(),y&&w({conversationId:y}),F()}:void 0,onStartServer:i.isExecutionPaused(M)?e=>{e.preventDefault(),e.stopPropagation(),y&&T({conversationId:y,providers:E}),F()}:void 0,executionStatus:M,position:`bottom`,className:`bottom-full left-0 mt-0 min-h-fit`,isPausing:!1}):null]}),(0,v.jsx)(h.ConversationName,{})]}),(0,v.jsx)(g.RightPanelToggle,{className:`mr-2`})]})}exports.ConversationNameWithStatus=y;
|
|
2
2
|
//# sourceMappingURL=conversation-name-with-status.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-name-with-status.cjs","names":[],"sources":["../../../../src/components/features/conversation/conversation-name-with-status.tsx"],"sourcesContent":["import React from \"react\";\nimport { useAgentState } from \"#/hooks/use-agent-state\";\nimport { useTaskPolling } from \"#/hooks/query/use-task-polling\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useUnifiedPauseConversation } from \"#/hooks/mutation/use-unified-stop-conversation\";\nimport { useUnifiedResumeConversation } from \"#/hooks/mutation/use-unified-start-conversation\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useUserProviders } from \"#/hooks/use-user-providers\";\nimport { getStatusColor } from \"#/utils/utils\";\nimport { AgentState } from \"#/types/agent-state\";\nimport DebugStackframeDot from \"#/icons/debug-stackframe-dot.svg?react\";\nimport { ServerStatusContextMenu } from \"../controls/server-status-context-menu\";\nimport { ConversationName } from \"./conversation-name\";\nimport { RightPanelToggle } from \"./right-panel-toggle\";\nimport {\n isExecutionActive,\n isExecutionErrored,\n isExecutionPaused,\n} from \"#/utils/status\";\n\nexport function ConversationNameWithStatus() {\n const { conversationId } = useConversationId();\n const { data: conversation } = useActiveConversation();\n const { curAgentState } = useAgentState();\n const { isTask, taskStatus } = useTaskPolling();\n const { mutate: pauseConversation } = useUnifiedPauseConversation();\n const { mutate: resumeConversation } = useUnifiedResumeConversation();\n const { providers } = useUserProviders();\n\n const executionStatus = conversation?.execution_status ?? null;\n const isStartingStatus =\n curAgentState === AgentState.LOADING || curAgentState === AgentState.INIT;\n const isStopStatus = isExecutionErrored(executionStatus);\n\n const statusColor = getStatusColor({\n isPausing: false,\n isTask,\n taskStatus,\n isStartingStatus,\n isStopStatus,\n curAgentState,\n });\n\n const handleStopServer = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n if (conversationId) {\n pauseConversation({ conversationId });\n }\n };\n\n const handleStartServer = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n if (conversationId) {\n resumeConversation({ conversationId, providers });\n }\n };\n\n return (\n <div className=\"flex items-center justify-between w-full\">\n <div className=\"flex items-center min-w-0\">\n <div
|
|
1
|
+
{"version":3,"file":"conversation-name-with-status.cjs","names":[],"sources":["../../../../src/components/features/conversation/conversation-name-with-status.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAgentState } from \"#/hooks/use-agent-state\";\nimport { useTaskPolling } from \"#/hooks/query/use-task-polling\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useUnifiedPauseConversation } from \"#/hooks/mutation/use-unified-stop-conversation\";\nimport { useUnifiedResumeConversation } from \"#/hooks/mutation/use-unified-start-conversation\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useUserProviders } from \"#/hooks/use-user-providers\";\nimport { getStatusColor, cn } from \"#/utils/utils\";\nimport { AgentState } from \"#/types/agent-state\";\nimport DebugStackframeDot from \"#/icons/debug-stackframe-dot.svg?react\";\nimport { ServerStatusContextMenu } from \"../controls/server-status-context-menu\";\nimport { ConversationName } from \"./conversation-name\";\nimport { RightPanelToggle } from \"./right-panel-toggle\";\nimport {\n isExecutionActive,\n isExecutionErrored,\n isExecutionPaused,\n} from \"#/utils/status\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\nexport function ConversationNameWithStatus() {\n const { t } = useTranslation(\"openhands\");\n const { conversationId } = useConversationId();\n const { data: conversation } = useActiveConversation();\n const { curAgentState } = useAgentState();\n const { isTask, taskStatus } = useTaskPolling();\n const { mutate: pauseConversation } = useUnifiedPauseConversation();\n const { mutate: resumeConversation } = useUnifiedResumeConversation();\n const { providers } = useUserProviders();\n const [menuOpen, setMenuOpen] = React.useState(false);\n const [hoveredOpen, setHoveredOpen] = React.useState(false);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n\n const executionStatus = conversation?.execution_status ?? null;\n const isStartingStatus =\n curAgentState === AgentState.LOADING || curAgentState === AgentState.INIT;\n const isStopStatus = isExecutionErrored(executionStatus);\n\n const statusColor = getStatusColor({\n isPausing: false,\n isTask,\n taskStatus,\n isStartingStatus,\n isStopStatus,\n curAgentState,\n });\n\n const isMenuVisible = menuOpen || hoveredOpen;\n\n const closeMenu = () => {\n setMenuOpen(false);\n setHoveredOpen(false);\n };\n\n const handleStopServer = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n if (conversationId) {\n pauseConversation({ conversationId });\n }\n closeMenu();\n };\n\n const handleStartServer = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n if (conversationId) {\n resumeConversation({ conversationId, providers });\n }\n closeMenu();\n };\n\n const handleStatusClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n // Click toggles for touch; on desktop it also dismisses a hover-opened menu\n // instead of \"pinning\" it open under the cursor.\n if (isMenuVisible) {\n closeMenu();\n return;\n }\n setMenuOpen(true);\n };\n\n return (\n <div className=\"flex items-center justify-between w-full\">\n <div className=\"flex items-center min-w-0\">\n <div\n className=\"relative shrink-0\"\n onPointerEnter={(event) => {\n // Gate on this event's pointer, not device-primary matchMedia — hybrid\n // laptops can emit compatibility mouseenter for touchscreen taps.\n if (event.pointerType === \"mouse\") {\n setHoveredOpen(true);\n }\n }}\n onPointerLeave={(event) => {\n if (event.pointerType === \"mouse\") {\n setHoveredOpen(false);\n }\n }}\n >\n <button\n ref={triggerRef}\n type=\"button\"\n data-testid=\"server-status-menu-trigger\"\n aria-label={t(I18nKey.COMMON$SERVER_STATUS)}\n aria-expanded={isMenuVisible}\n aria-haspopup=\"menu\"\n onClick={handleStatusClick}\n className={cn(\n \"flex items-center justify-center rounded-md\",\n \"text-[var(--oh-muted)] hover:bg-white/10\",\n )}\n >\n <DebugStackframeDot\n className=\"ml-[3.5px] w-6 h-6 cursor-pointer\"\n color={statusColor}\n aria-hidden\n />\n </button>\n {isMenuVisible ? (\n <ServerStatusContextMenu\n onClose={closeMenu}\n ignoreOutsideClickRef={triggerRef}\n onStopServer={\n isExecutionActive(executionStatus)\n ? handleStopServer\n : undefined\n }\n onStartServer={\n isExecutionPaused(executionStatus)\n ? handleStartServer\n : undefined\n }\n executionStatus={executionStatus}\n position=\"bottom\"\n className=\"bottom-full left-0 mt-0 min-h-fit\"\n isPausing={false}\n />\n ) : null}\n </div>\n <ConversationName />\n </div>\n <RightPanelToggle className=\"mr-2\" />\n </div>\n );\n}\n"],"mappings":"y8BAsBA,SAAgB,GAA6B,CAC3C,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,CAAE,kBAAmB,EAAA,kBAAkB,EACvC,CAAE,KAAM,GAAiB,EAAA,sBAAsB,EAC/C,CAAE,iBAAkB,EAAA,cAAc,EAClC,CAAE,SAAQ,cAAe,EAAA,eAAe,EACxC,CAAE,OAAQ,GAAsB,EAAA,4BAA4B,EAC5D,CAAE,OAAQ,GAAuB,EAAA,6BAA6B,EAC9D,CAAE,aAAc,EAAA,iBAAiB,EACjC,CAAC,EAAU,GAAe,EAAA,QAAM,SAAS,EAAK,EAC9C,CAAC,EAA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CAAe,EApEpB,GAA+C,CACxE,EAAM,eAAe,EACrB,EAAM,gBAAgB,EAClB,GACF,EAAmB,CAAE,iBAAgB,WAAU,CAAC,EAElD,EAAU,CACZ,EA+DkB,IAAA,GAEW,kBACjB,SAAS,SACT,UAAU,oCACV,UAAW,EACZ,CAAA,EACC,IACD,KACL,EAAA,EAAA,KAAC,EAAA,iBAAD,CAAmB,CAAA,CAChB,KACL,EAAA,EAAA,KAAC,EAAA,iBAAD,CAAkB,UAAU,MAAQ,CAAA,CACjC,GAET"}
|
|
@@ -1,59 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import "
|
|
16
|
-
import {
|
|
1
|
+
import { useTranslation as e } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
2
|
+
import { I18nKey as t } from "../../../i18n/declaration.js";
|
|
3
|
+
import { AgentState as n } from "../../../types/agent-state.js";
|
|
4
|
+
import { isExecutionActive as r, isExecutionErrored as i, isExecutionPaused as a } from "../../../utils/status.js";
|
|
5
|
+
import { cn as o, getStatusColor as s } from "../../../utils/utils.js";
|
|
6
|
+
import { useConversationId as c } from "../../../hooks/use-conversation-id.js";
|
|
7
|
+
import { useActiveConversation as l } from "../../../hooks/query/use-active-conversation.js";
|
|
8
|
+
import { useAgentState as u } from "../../../hooks/use-agent-state.js";
|
|
9
|
+
import { useTaskPolling as d } from "../../../hooks/query/use-task-polling.js";
|
|
10
|
+
import { useUnifiedPauseConversation as f } from "../../../hooks/mutation/use-unified-stop-conversation.js";
|
|
11
|
+
import { useUserProviders as p } from "../../../hooks/use-user-providers.js";
|
|
12
|
+
import m from "../../../icons/debug-stackframe-dot.js";
|
|
13
|
+
import { useUnifiedResumeConversation as h } from "../../../hooks/mutation/use-unified-start-conversation.js";
|
|
14
|
+
import { ServerStatusContextMenu as g } from "../controls/server-status-context-menu.js";
|
|
15
|
+
import { ConversationName as _ } from "./conversation-name.js";
|
|
16
|
+
import { RightPanelToggle as v } from "./right-panel-toggle.js";
|
|
17
|
+
import y from "react";
|
|
18
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
17
19
|
//#region src/components/features/conversation/conversation-name-with-status.tsx
|
|
18
|
-
function
|
|
19
|
-
let { conversationId:
|
|
20
|
-
|
|
20
|
+
function S() {
|
|
21
|
+
let { t: S } = e("openhands"), { conversationId: C } = c(), { data: w } = l(), { curAgentState: T } = u(), { isTask: E, taskStatus: D } = d(), { mutate: O } = f(), { mutate: k } = h(), { providers: A } = p(), [j, M] = y.useState(!1), [N, P] = y.useState(!1), F = y.useRef(null), I = w?.execution_status ?? null, L = s({
|
|
22
|
+
isPausing: !1,
|
|
23
|
+
isTask: E,
|
|
24
|
+
taskStatus: D,
|
|
25
|
+
isStartingStatus: T === n.LOADING || T === n.INIT,
|
|
26
|
+
isStopStatus: i(I),
|
|
27
|
+
curAgentState: T
|
|
28
|
+
}), R = j || N, z = () => {
|
|
29
|
+
M(!1), P(!1);
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ x("div", {
|
|
21
32
|
className: "flex items-center justify-between w-full",
|
|
22
|
-
children: [/* @__PURE__ */
|
|
33
|
+
children: [/* @__PURE__ */ x("div", {
|
|
23
34
|
className: "flex items-center min-w-0",
|
|
24
|
-
children: [/* @__PURE__ */
|
|
25
|
-
className: "
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
children: [/* @__PURE__ */ x("div", {
|
|
36
|
+
className: "relative shrink-0",
|
|
37
|
+
onPointerEnter: (e) => {
|
|
38
|
+
e.pointerType === "mouse" && P(!0);
|
|
39
|
+
},
|
|
40
|
+
onPointerLeave: (e) => {
|
|
41
|
+
e.pointerType === "mouse" && P(!1);
|
|
42
|
+
},
|
|
43
|
+
children: [/* @__PURE__ */ b("button", {
|
|
44
|
+
ref: F,
|
|
45
|
+
type: "button",
|
|
46
|
+
"data-testid": "server-status-menu-trigger",
|
|
47
|
+
"aria-label": S(t.COMMON$SERVER_STATUS),
|
|
48
|
+
"aria-expanded": R,
|
|
49
|
+
"aria-haspopup": "menu",
|
|
50
|
+
onClick: (e) => {
|
|
51
|
+
if (e.preventDefault(), e.stopPropagation(), R) {
|
|
52
|
+
z();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
M(!0);
|
|
56
|
+
},
|
|
57
|
+
className: o("flex items-center justify-center rounded-md", "text-[var(--oh-muted)] hover:bg-white/10"),
|
|
58
|
+
children: /* @__PURE__ */ b(m, {
|
|
59
|
+
className: "ml-[3.5px] w-6 h-6 cursor-pointer",
|
|
60
|
+
color: L,
|
|
61
|
+
"aria-hidden": !0
|
|
35
62
|
})
|
|
36
|
-
}), /* @__PURE__ */ g
|
|
37
|
-
onClose:
|
|
38
|
-
|
|
39
|
-
|
|
63
|
+
}), R ? /* @__PURE__ */ b(g, {
|
|
64
|
+
onClose: z,
|
|
65
|
+
ignoreOutsideClickRef: F,
|
|
66
|
+
onStopServer: r(I) ? (e) => {
|
|
67
|
+
e.preventDefault(), e.stopPropagation(), C && O({ conversationId: C }), z();
|
|
40
68
|
} : void 0,
|
|
41
|
-
onStartServer:
|
|
42
|
-
e.preventDefault(), e.stopPropagation(),
|
|
43
|
-
conversationId:
|
|
44
|
-
providers:
|
|
45
|
-
});
|
|
69
|
+
onStartServer: a(I) ? (e) => {
|
|
70
|
+
e.preventDefault(), e.stopPropagation(), C && k({
|
|
71
|
+
conversationId: C,
|
|
72
|
+
providers: A
|
|
73
|
+
}), z();
|
|
46
74
|
} : void 0,
|
|
47
|
-
executionStatus:
|
|
75
|
+
executionStatus: I,
|
|
48
76
|
position: "bottom",
|
|
49
|
-
className: "
|
|
77
|
+
className: "bottom-full left-0 mt-0 min-h-fit",
|
|
50
78
|
isPausing: !1
|
|
51
|
-
})]
|
|
52
|
-
}), /* @__PURE__ */
|
|
53
|
-
}), /* @__PURE__ */
|
|
79
|
+
}) : null]
|
|
80
|
+
}), /* @__PURE__ */ b(_, {})]
|
|
81
|
+
}), /* @__PURE__ */ b(v, { className: "mr-2" })]
|
|
54
82
|
});
|
|
55
83
|
}
|
|
56
84
|
//#endregion
|
|
57
|
-
export {
|
|
85
|
+
export { S as ConversationNameWithStatus };
|
|
58
86
|
|
|
59
87
|
//# sourceMappingURL=conversation-name-with-status.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-name-with-status.js","names":[],"sources":["../../../../src/components/features/conversation/conversation-name-with-status.tsx"],"sourcesContent":["import React from \"react\";\nimport { useAgentState } from \"#/hooks/use-agent-state\";\nimport { useTaskPolling } from \"#/hooks/query/use-task-polling\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useUnifiedPauseConversation } from \"#/hooks/mutation/use-unified-stop-conversation\";\nimport { useUnifiedResumeConversation } from \"#/hooks/mutation/use-unified-start-conversation\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useUserProviders } from \"#/hooks/use-user-providers\";\nimport { getStatusColor } from \"#/utils/utils\";\nimport { AgentState } from \"#/types/agent-state\";\nimport DebugStackframeDot from \"#/icons/debug-stackframe-dot.svg?react\";\nimport { ServerStatusContextMenu } from \"../controls/server-status-context-menu\";\nimport { ConversationName } from \"./conversation-name\";\nimport { RightPanelToggle } from \"./right-panel-toggle\";\nimport {\n isExecutionActive,\n isExecutionErrored,\n isExecutionPaused,\n} from \"#/utils/status\";\n\nexport function ConversationNameWithStatus() {\n const { conversationId } = useConversationId();\n const { data: conversation } = useActiveConversation();\n const { curAgentState } = useAgentState();\n const { isTask, taskStatus } = useTaskPolling();\n const { mutate: pauseConversation } = useUnifiedPauseConversation();\n const { mutate: resumeConversation } = useUnifiedResumeConversation();\n const { providers } = useUserProviders();\n\n const executionStatus = conversation?.execution_status ?? null;\n const isStartingStatus =\n curAgentState === AgentState.LOADING || curAgentState === AgentState.INIT;\n const isStopStatus = isExecutionErrored(executionStatus);\n\n const statusColor = getStatusColor({\n isPausing: false,\n isTask,\n taskStatus,\n isStartingStatus,\n isStopStatus,\n curAgentState,\n });\n\n const handleStopServer = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n if (conversationId) {\n pauseConversation({ conversationId });\n }\n };\n\n const handleStartServer = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n if (conversationId) {\n resumeConversation({ conversationId, providers });\n }\n };\n\n return (\n <div className=\"flex items-center justify-between w-full\">\n <div className=\"flex items-center min-w-0\">\n <div
|
|
1
|
+
{"version":3,"file":"conversation-name-with-status.js","names":[],"sources":["../../../../src/components/features/conversation/conversation-name-with-status.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAgentState } from \"#/hooks/use-agent-state\";\nimport { useTaskPolling } from \"#/hooks/query/use-task-polling\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useUnifiedPauseConversation } from \"#/hooks/mutation/use-unified-stop-conversation\";\nimport { useUnifiedResumeConversation } from \"#/hooks/mutation/use-unified-start-conversation\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useUserProviders } from \"#/hooks/use-user-providers\";\nimport { getStatusColor, cn } from \"#/utils/utils\";\nimport { AgentState } from \"#/types/agent-state\";\nimport DebugStackframeDot from \"#/icons/debug-stackframe-dot.svg?react\";\nimport { ServerStatusContextMenu } from \"../controls/server-status-context-menu\";\nimport { ConversationName } from \"./conversation-name\";\nimport { RightPanelToggle } from \"./right-panel-toggle\";\nimport {\n isExecutionActive,\n isExecutionErrored,\n isExecutionPaused,\n} from \"#/utils/status\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\nexport function ConversationNameWithStatus() {\n const { t } = useTranslation(\"openhands\");\n const { conversationId } = useConversationId();\n const { data: conversation } = useActiveConversation();\n const { curAgentState } = useAgentState();\n const { isTask, taskStatus } = useTaskPolling();\n const { mutate: pauseConversation } = useUnifiedPauseConversation();\n const { mutate: resumeConversation } = useUnifiedResumeConversation();\n const { providers } = useUserProviders();\n const [menuOpen, setMenuOpen] = React.useState(false);\n const [hoveredOpen, setHoveredOpen] = React.useState(false);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n\n const executionStatus = conversation?.execution_status ?? null;\n const isStartingStatus =\n curAgentState === AgentState.LOADING || curAgentState === AgentState.INIT;\n const isStopStatus = isExecutionErrored(executionStatus);\n\n const statusColor = getStatusColor({\n isPausing: false,\n isTask,\n taskStatus,\n isStartingStatus,\n isStopStatus,\n curAgentState,\n });\n\n const isMenuVisible = menuOpen || hoveredOpen;\n\n const closeMenu = () => {\n setMenuOpen(false);\n setHoveredOpen(false);\n };\n\n const handleStopServer = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n if (conversationId) {\n pauseConversation({ conversationId });\n }\n closeMenu();\n };\n\n const handleStartServer = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n if (conversationId) {\n resumeConversation({ conversationId, providers });\n }\n closeMenu();\n };\n\n const handleStatusClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n // Click toggles for touch; on desktop it also dismisses a hover-opened menu\n // instead of \"pinning\" it open under the cursor.\n if (isMenuVisible) {\n closeMenu();\n return;\n }\n setMenuOpen(true);\n };\n\n return (\n <div className=\"flex items-center justify-between w-full\">\n <div className=\"flex items-center min-w-0\">\n <div\n className=\"relative shrink-0\"\n onPointerEnter={(event) => {\n // Gate on this event's pointer, not device-primary matchMedia — hybrid\n // laptops can emit compatibility mouseenter for touchscreen taps.\n if (event.pointerType === \"mouse\") {\n setHoveredOpen(true);\n }\n }}\n onPointerLeave={(event) => {\n if (event.pointerType === \"mouse\") {\n setHoveredOpen(false);\n }\n }}\n >\n <button\n ref={triggerRef}\n type=\"button\"\n data-testid=\"server-status-menu-trigger\"\n aria-label={t(I18nKey.COMMON$SERVER_STATUS)}\n aria-expanded={isMenuVisible}\n aria-haspopup=\"menu\"\n onClick={handleStatusClick}\n className={cn(\n \"flex items-center justify-center rounded-md\",\n \"text-[var(--oh-muted)] hover:bg-white/10\",\n )}\n >\n <DebugStackframeDot\n className=\"ml-[3.5px] w-6 h-6 cursor-pointer\"\n color={statusColor}\n aria-hidden\n />\n </button>\n {isMenuVisible ? (\n <ServerStatusContextMenu\n onClose={closeMenu}\n ignoreOutsideClickRef={triggerRef}\n onStopServer={\n isExecutionActive(executionStatus)\n ? handleStopServer\n : undefined\n }\n onStartServer={\n isExecutionPaused(executionStatus)\n ? handleStartServer\n : undefined\n }\n executionStatus={executionStatus}\n position=\"bottom\"\n className=\"bottom-full left-0 mt-0 min-h-fit\"\n isPausing={false}\n />\n ) : null}\n </div>\n <ConversationName />\n </div>\n <RightPanelToggle className=\"mr-2\" />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsBA,SAAgB,IAA6B;CAC3C,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,EAAE,sBAAmB,EAAkB,GACvC,EAAE,MAAM,MAAiB,EAAsB,GAC/C,EAAE,qBAAkB,EAAc,GAClC,EAAE,WAAQ,kBAAe,EAAe,GACxC,EAAE,QAAQ,MAAsB,EAA4B,GAC5D,EAAE,QAAQ,MAAuB,EAA6B,GAC9D,EAAE,iBAAc,EAAiB,GACjC,CAAC,GAAU,KAAe,EAAM,SAAS,EAAK,GAC9C,CAAC,GAAa,KAAkB,EAAM,SAAS,EAAK,GACpD,IAAa,EAAM,OAA0B,IAAI,GAEjD,IAAkB,GAAc,oBAAoB,MAKpD,IAAc,EAAe;EACjC,WAAW;EAC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ACL,kBAAC,GAAD,EAAkB,WAAU,OAAQ,CAAA,CACjC;;AAET"}
|
|
@@ -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("../../../hooks/use-conversation-id.cjs"),i=require("../../../utils/custom-toast-handlers.cjs"),a=require("../../../hooks/query/use-active-conversation.cjs"),o=require("../../../hooks/use-conversation-name-context-menu.cjs"),s=require("../conversation-panel/system-message-modal.cjs"),c=require("../conversation-panel/skills-modal.cjs"),l=require("../conversation-panel/hooks-modal.cjs"),u=require("../../../hooks/mutation/use-update-conversation.cjs"),d=require("../conversation-panel/ellipsis-button.cjs"),f=require("./conversation-name-context-menu.cjs"),p=require("../conversation-panel/confirm-delete-modal.cjs"),m=require("../conversation-panel/confirm-stop-modal.cjs"),h=require("./
|
|
1
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),n=require("../../../i18n/declaration.cjs"),r=require("../../../hooks/use-conversation-id.cjs"),i=require("../../../utils/custom-toast-handlers.cjs"),a=require("../../../hooks/query/use-active-conversation.cjs"),o=require("../../../hooks/use-conversation-name-context-menu.cjs"),s=require("../conversation-panel/system-message-modal.cjs"),c=require("../conversation-panel/skills-modal.cjs"),l=require("../conversation-panel/hooks-modal.cjs"),u=require("../../../hooks/mutation/use-update-conversation.cjs"),d=require("../conversation-panel/ellipsis-button.cjs"),f=require("./conversation-name-context-menu.cjs"),p=require("../conversation-panel/confirm-delete-modal.cjs"),m=require("../conversation-panel/confirm-stop-modal.cjs"),h=require("./transcript-export-modal.cjs");let g=require("react");g=e.__toESM(g,1);let _=require("react/jsx-runtime");function v(){let{t:e}=t.useTranslation(`openhands`),{conversationId:v}=r.useConversationId(),{data:y}=a.useActiveConversation(),{mutate:b}=u.useUpdateConversation(),[x,S]=g.default.useState(`view`),[C,w]=g.default.useState(!1),[T,E]=g.default.useState(!1),D=g.default.useRef(null),O=g.default.useRef(null),{handleDelete:k,handleStop:A,handleDownloadConversation:j,handleDisplayCost:M,handleShowAgentTools:N,handleShowSkills:P,handleShowHooks:ee,handleTogglePublic:F,handleCopyShareLink:I,shareUrl:L,handleConfirmDelete:R,handleConfirmStop:z,systemModalVisible:B,setSystemModalVisible:V,skillsModalVisible:H,setSkillsModalVisible:U,hooksModalVisible:W,setHooksModalVisible:G,confirmDeleteModalVisible:K,setConfirmDeleteModalVisible:q,confirmStopModalVisible:J,setConfirmStopModalVisible:Y,systemMessage:X,shouldShowStop:Z,shouldShowDownloadConversation:Q,shouldShowDisplayCost:$,shouldShowAgentTools:te,shouldShowSkills:ne,shouldShowHooks:re}=o.useConversationNameContextMenu({conversationId:v,executionStatus:y?.execution_status,showOptions:!0,onContextMenuToggle:w});return g.default.useEffect(()=>{x===`edit`&&D.current?.focus()},[x]),y?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2 h-[22px] text-base font-normal text-left pl-0 lg:pl-1 min-w-0`,"data-testid":`conversation-name`,children:[x===`edit`?(0,_.jsx)(`input`,{ref:D,"data-testid":`conversation-name-input`,onClick:e=>{x===`edit`&&(e.preventDefault(),e.stopPropagation())},onBlur:()=>{if(D.current?.value&&v){let t=D.current.value.trim();t!==y?.title&&b({conversationId:v,newTitle:t},{onSuccess:()=>{i.displaySuccessToast(e(n.I18nKey.CONVERSATION$TITLE_UPDATED))}})}else D.current&&(D.current.value=y?.title??``);S(`view`)},onKeyUp:e=>{e.nativeEvent.isComposing||e.key===`Enter`&&e.currentTarget.blur()},type:`text`,defaultValue:y.title||``,className:`text-white leading-5 bg-transparent border-none outline-none text-base font-normal w-fit max-w-fit field-sizing-content`}):(0,_.jsx)(`div`,{className:`text-white leading-5 truncate`,"data-testid":`conversation-name-title`,onDoubleClick:()=>{S(`edit`)},title:y.title||``,children:y.title}),x!==`edit`&&(0,_.jsxs)(`div`,{ref:O,className:`relative flex items-center shrink-0`,children:[(0,_.jsx)(d.EllipsisButton,{onClick:e=>{e.preventDefault(),e.stopPropagation(),w(!C)},ariaLabel:e(n.I18nKey.COMMON$MORE_OPTIONS)}),C&&(0,_.jsx)(f.ConversationNameContextMenu,{onClose:()=>w(!1),onRename:e=>{e.preventDefault(),e.stopPropagation(),S(`edit`),w(!1)},onDelete:k,onStop:Z?A:void 0,onDisplayCost:$?M:void 0,onShowAgentTools:te?N:void 0,onShowSkills:ne?P:void 0,onShowHooks:re?ee:void 0,onTogglePublic:F,onCopyShareLink:I,shareUrl:L,onExportTranscript:e=>{e.preventDefault(),e.stopPropagation(),E(!0),w(!1)},onDownloadConversation:Q?j:void 0,position:`bottom`,anchorRef:O})]})]}),T&&v&&(0,_.jsx)(h.TranscriptExportModal,{conversationId:v,conversationUrl:y.conversation_url,sessionApiKey:y.session_api_key,conversationTitle:y.title,model:y.llm_model,onClose:()=>E(!1)}),(0,_.jsx)(s.SystemMessageModal,{isOpen:B,onClose:()=>V(!1),systemMessage:X||null}),H&&(0,_.jsx)(c.SkillsModal,{onClose:()=>U(!1)}),W&&(0,_.jsx)(l.HooksModal,{onClose:()=>G(!1)}),K&&(0,_.jsx)(p.ConfirmDeleteModal,{onConfirm:R,onCancel:()=>q(!1),conversationTitle:y?.title||``}),J&&(0,_.jsx)(m.ConfirmStopModal,{onConfirm:z,onCancel:()=>Y(!1)})]}):null}exports.ConversationName=v;
|
|
2
2
|
//# sourceMappingURL=conversation-name.cjs.map
|