@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openhands/agent-canvas",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Agent Canvas UI for OpenHands - run AI coding agents with a visual interface",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@heroui/react": "2.8.10",
|
|
24
|
-
"@microlink/react-json-view": "1.31.
|
|
24
|
+
"@microlink/react-json-view": "1.31.25",
|
|
25
25
|
"@monaco-editor/react": "4.7.0",
|
|
26
26
|
"@openhands/extensions": "0.16.0",
|
|
27
|
-
"@openhands/typescript-client": "1.
|
|
27
|
+
"@openhands/typescript-client": "1.38.0",
|
|
28
28
|
"@react-router/node": "7.18.2",
|
|
29
29
|
"@react-router/serve": "7.18.2",
|
|
30
30
|
"@tailwindcss/vite": "4.3.3",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"httpxy": "0.5.3",
|
|
42
42
|
"i18next": "26.3.6",
|
|
43
43
|
"i18next-browser-languagedetector": "8.2.1",
|
|
44
|
-
"i18next-http-backend": "4.0.
|
|
44
|
+
"i18next-http-backend": "4.0.1",
|
|
45
45
|
"isbot": "5.1.39",
|
|
46
46
|
"lucide-react": "1.25.0",
|
|
47
47
|
"monaco-editor": "0.56.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"vite": "8.0.16",
|
|
70
70
|
"winston": "3.19.0",
|
|
71
71
|
"winston-daily-rotate-file": "5.0.0",
|
|
72
|
-
"zustand": "5.0.
|
|
72
|
+
"zustand": "5.0.14"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"dev": "node --env-file-if-exists=.env scripts/dev-with-automation.mjs",
|
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
"prelint": "npm run make-i18n",
|
|
97
97
|
"lint": "npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}",
|
|
98
98
|
"lint:fix": "eslint src --fix && prettier --write src/**/*.{ts,tsx}",
|
|
99
|
+
"postinstall": "node -e \"if (process.env.npm_config_global === 'true') { console.log('\\n\\x1b[32m\\x1b[1m\\u2713 @openhands/agent-canvas installed!\\x1b[0m\\n\\nTo start Agent Canvas, run:\\n\\n \\x1b[36m\\x1b[1magent-canvas\\x1b[0m\\n\\nThis launches the full stack at \\x1b[36mhttp://localhost:8000\\x1b[0m.\\n\\nDocs: https://docs.openhands.dev/openhands/usage/agent-canvas/setup\\n') }\"",
|
|
99
100
|
"prepare": "husky",
|
|
100
101
|
"typecheck": "react-router typegen && tsc",
|
|
101
102
|
"typecheck:staged": "react-router typegen && npx tsc --noEmit --skipLibCheck",
|
|
@@ -125,10 +126,10 @@
|
|
|
125
126
|
]
|
|
126
127
|
},
|
|
127
128
|
"devDependencies": {
|
|
128
|
-
"@eslint/eslintrc": "3.3.
|
|
129
|
+
"@eslint/eslintrc": "3.3.6",
|
|
129
130
|
"@eslint/js": "9.39.4",
|
|
130
131
|
"@mswjs/socket.io-binding": "0.2.0",
|
|
131
|
-
"@playwright/test": "1.62.
|
|
132
|
+
"@playwright/test": "1.62.1",
|
|
132
133
|
"@react-router/dev": "7.18.2",
|
|
133
134
|
"@stryker-mutator/core": "9.6.1",
|
|
134
135
|
"@stryker-mutator/vitest-runner": "9.6.1",
|
|
@@ -140,30 +141,30 @@
|
|
|
140
141
|
"@testing-library/user-event": "14.6.1",
|
|
141
142
|
"@types/mdast": "4.0.4",
|
|
142
143
|
"@types/node": "26.1.2",
|
|
143
|
-
"@types/react": "19.2.
|
|
144
|
-
"@types/react-dom": "19.2.
|
|
144
|
+
"@types/react": "19.2.18",
|
|
145
|
+
"@types/react-dom": "19.2.4",
|
|
145
146
|
"@types/react-syntax-highlighter": "15.5.13",
|
|
146
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
147
|
-
"@typescript-eslint/parser": "8.
|
|
147
|
+
"@typescript-eslint/eslint-plugin": "8.65.0",
|
|
148
|
+
"@typescript-eslint/parser": "8.65.0",
|
|
148
149
|
"@vercel/react-router": "1.3.0",
|
|
149
150
|
"@vitest/coverage-v8": "4.1.10",
|
|
150
151
|
"cross-env": "10.1.0",
|
|
151
152
|
"electron": "42.3.3",
|
|
152
153
|
"electron-builder": "26.15.3",
|
|
153
|
-
"eslint": "9.39.
|
|
154
|
+
"eslint": "9.39.5",
|
|
154
155
|
"eslint-config-prettier": "10.1.8",
|
|
155
156
|
"eslint-import-resolver-typescript": "4.4.5",
|
|
156
157
|
"eslint-plugin-i18next": "6.1.5",
|
|
157
|
-
"eslint-plugin-import-x": "4.
|
|
158
|
+
"eslint-plugin-import-x": "4.17.1",
|
|
158
159
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
159
|
-
"eslint-plugin-prettier": "5.5.
|
|
160
|
+
"eslint-plugin-prettier": "5.5.6",
|
|
160
161
|
"eslint-plugin-react": "7.37.5",
|
|
161
162
|
"eslint-plugin-react-hooks": "7.1.1",
|
|
162
163
|
"eslint-plugin-unused-imports": "4.4.1",
|
|
163
164
|
"globals": "16.5.0",
|
|
164
165
|
"husky": "9.1.7",
|
|
165
|
-
"jsdom": "30.0.
|
|
166
|
-
"lint-staged": "
|
|
166
|
+
"jsdom": "30.0.1",
|
|
167
|
+
"lint-staged": "17.3.0",
|
|
167
168
|
"msw": "2.15.0",
|
|
168
169
|
"png2icons": "2.0.1",
|
|
169
170
|
"postcss-prefix-selector": "2.1.1",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*
|
|
20
20
|
* Usage:
|
|
21
21
|
* node scripts/check-sdk-version-sync.mjs
|
|
22
|
-
* EXPECTED_SDK_VERSION=1.
|
|
22
|
+
* EXPECTED_SDK_VERSION=1.42.1 node scripts/check-sdk-version-sync.mjs
|
|
23
23
|
* node scripts/check-sdk-version-sync.mjs --check-pypi
|
|
24
24
|
*
|
|
25
25
|
* Environment variables:
|
|
@@ -78,7 +78,7 @@ Triggering from other repos:
|
|
|
78
78
|
-H "Authorization: token \$GITHUB_TOKEN" \\
|
|
79
79
|
-H "Accept: application/vnd.github.v3+json" \\
|
|
80
80
|
https://api.github.com/repos/OpenHands/OpenHands/dispatches \\
|
|
81
|
-
-d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.
|
|
81
|
+
-d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.42.1"}}'
|
|
82
82
|
`);
|
|
83
83
|
process.exit(0);
|
|
84
84
|
}
|
|
@@ -260,9 +260,9 @@ async function fetchPyPIDependencies(packageName, version) {
|
|
|
260
260
|
* Parse PyPI requires_dist array and extract SDK package versions
|
|
261
261
|
*
|
|
262
262
|
* PyPI returns dependencies in PEP 508 format like:
|
|
263
|
-
* "openhands-sdk>=1.
|
|
264
|
-
* "openhands-tools==1.
|
|
265
|
-
* "openhands-workspace (>=1.
|
|
263
|
+
* "openhands-sdk>=1.42.1,<2.0.0"
|
|
264
|
+
* "openhands-tools==1.42.1"
|
|
265
|
+
* "openhands-workspace (>=1.42.1)"
|
|
266
266
|
*/
|
|
267
267
|
function parseSdkVersionsFromRequiresDist(requiresDist) {
|
|
268
268
|
const versions = {};
|
|
@@ -276,7 +276,7 @@ function parseSdkVersionsFromRequiresDist(requiresDist) {
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
// Extract the version number - look for patterns like:
|
|
279
|
-
// ">=1.
|
|
279
|
+
// ">=1.42.1", "==1.42.1", "(>=1.42.1)", "~=1.42.1"
|
|
280
280
|
// After the package name and before any comma or closing paren
|
|
281
281
|
const versionPattern = /[><=~!]+\s*([0-9]+(?:\.[0-9]+)*)/;
|
|
282
282
|
const match = dep.match(versionPattern);
|
|
@@ -15,7 +15,11 @@ export function isProcessRunning(proc) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Add spawn options needed for process-tree cleanup.
|
|
18
|
+
* Add spawn options needed for safe service launches and process-tree cleanup.
|
|
19
|
+
*
|
|
20
|
+
* Arguments must bypass shell parsing so values such as version constraints
|
|
21
|
+
* containing `<` are forwarded literally. Callers that need shell behavior
|
|
22
|
+
* must invoke the shell explicitly as the command.
|
|
19
23
|
*
|
|
20
24
|
* On POSIX, `detached: true` makes the spawned service the leader of a new
|
|
21
25
|
* process group. Later we can signal `-pid` to terminate that whole group,
|
|
@@ -30,6 +34,7 @@ export function isProcessRunning(proc) {
|
|
|
30
34
|
export function getProcessTreeSpawnOptions(options = {}) {
|
|
31
35
|
return {
|
|
32
36
|
...options,
|
|
37
|
+
shell: false,
|
|
33
38
|
detached: process.platform !== "win32",
|
|
34
39
|
};
|
|
35
40
|
}
|
package/scripts/dev-safe.mjs
CHANGED
|
@@ -53,6 +53,11 @@ const DEFAULT_AGENT_SERVER_VERSION = SHARED_DEFAULTS.versions.agentServer;
|
|
|
53
53
|
// the SDK's ACP client. Hold acp <0.11 until a fixed SDK ships. See config/defaults.json.
|
|
54
54
|
const AGENT_CLIENT_PROTOCOL_CONSTRAINT =
|
|
55
55
|
SHARED_DEFAULTS.constraints?.agentClientProtocol;
|
|
56
|
+
const DEFAULT_AGENT_SERVER_TELEMETRY_POSTHOG_API_KEY =
|
|
57
|
+
SHARED_DEFAULTS.telemetry.posthogApiKey;
|
|
58
|
+
const DEFAULT_AGENT_SERVER_TELEMETRY_POSTHOG_HOST =
|
|
59
|
+
SHARED_DEFAULTS.telemetry.posthogHost;
|
|
60
|
+
const AGENT_SERVER_POSTHOG_CONSTRAINT = "posthog>=6,<7";
|
|
56
61
|
const FRONTEND_REQUIRED_BINS = ["cross-env", "react-router"];
|
|
57
62
|
|
|
58
63
|
/**
|
|
@@ -401,7 +406,7 @@ export function validateFrontendDependencies(
|
|
|
401
406
|
* edits are picked up without a manual reinstall. The agent-server itself
|
|
402
407
|
* is rebuilt from local source on each invocation (--reinstall).
|
|
403
408
|
* - OH_AGENT_SERVER_GIT_REF: Git commit SHA or branch name
|
|
404
|
-
* - OH_AGENT_SERVER_VERSION: Specific PyPI version (e.g., "1.
|
|
409
|
+
* - OH_AGENT_SERVER_VERSION: Specific PyPI version (e.g., "1.42.1")
|
|
405
410
|
*
|
|
406
411
|
* If none are set, defaults to the released version specified by
|
|
407
412
|
* DEFAULT_AGENT_SERVER_VERSION. Set OH_AGENT_SERVER_GIT_REF to use a
|
|
@@ -434,6 +439,8 @@ export function buildAgentServerCommand(env = process.env) {
|
|
|
434
439
|
path.join(localPath, "openhands-tools"),
|
|
435
440
|
"--with-editable",
|
|
436
441
|
path.join(localPath, "openhands-workspace"),
|
|
442
|
+
"--with",
|
|
443
|
+
AGENT_SERVER_POSTHOG_CONSTRAINT,
|
|
437
444
|
"agent-server",
|
|
438
445
|
);
|
|
439
446
|
source = `local (${localPath})`;
|
|
@@ -458,6 +465,8 @@ export function buildAgentServerCommand(env = process.env) {
|
|
|
458
465
|
`${baseGitUrl}#subdirectory=openhands-tools`,
|
|
459
466
|
"--with",
|
|
460
467
|
`${baseGitUrl}#subdirectory=openhands-workspace`,
|
|
468
|
+
"--with",
|
|
469
|
+
AGENT_SERVER_POSTHOG_CONSTRAINT,
|
|
461
470
|
"agent-server",
|
|
462
471
|
);
|
|
463
472
|
source = `git (${gitRef})`;
|
|
@@ -478,6 +487,7 @@ export function buildAgentServerCommand(env = process.env) {
|
|
|
478
487
|
if (AGENT_CLIENT_PROTOCOL_CONSTRAINT) {
|
|
479
488
|
uvxArgs.push("--with", AGENT_CLIENT_PROTOCOL_CONSTRAINT);
|
|
480
489
|
}
|
|
490
|
+
uvxArgs.push("--with", AGENT_SERVER_POSTHOG_CONSTRAINT);
|
|
481
491
|
uvxArgs.push("agent-server");
|
|
482
492
|
source = `PyPI (${version})`;
|
|
483
493
|
} else {
|
|
@@ -496,6 +506,7 @@ export function buildAgentServerCommand(env = process.env) {
|
|
|
496
506
|
if (AGENT_CLIENT_PROTOCOL_CONSTRAINT) {
|
|
497
507
|
uvxArgs.push("--with", AGENT_CLIENT_PROTOCOL_CONSTRAINT);
|
|
498
508
|
}
|
|
509
|
+
uvxArgs.push("--with", AGENT_SERVER_POSTHOG_CONSTRAINT);
|
|
499
510
|
uvxArgs.push("agent-server");
|
|
500
511
|
source = `PyPI (${DEFAULT_AGENT_SERVER_VERSION}, default)`;
|
|
501
512
|
}
|
|
@@ -685,8 +696,52 @@ function buildConfigFromPorts(ports, cwd, env) {
|
|
|
685
696
|
* @param {ReturnType<typeof buildSafeDevConfig>} config - Config from buildSafeDevConfig
|
|
686
697
|
* @returns {Record<string, string>} Environment variables for agent-server
|
|
687
698
|
*/
|
|
688
|
-
export function
|
|
699
|
+
export function buildAgentServerTelemetryEnv(env = process.env) {
|
|
700
|
+
const telemetryDisabled =
|
|
701
|
+
env.VITE_DO_NOT_TRACK === "1" || env.DO_NOT_TRACK === "1";
|
|
702
|
+
const result = {};
|
|
703
|
+
|
|
704
|
+
for (const key of [
|
|
705
|
+
"OH_TELEMETRY_EXPORTER",
|
|
706
|
+
"OH_TELEMETRY_POSTHOG_API_KEY",
|
|
707
|
+
"OH_TELEMETRY_POSTHOG_HOST",
|
|
708
|
+
"OH_TELEMETRY_HTTP_ENDPOINT",
|
|
709
|
+
"OH_TELEMETRY_HTTP_TOKEN",
|
|
710
|
+
"OH_TELEMETRY_CONSENT",
|
|
711
|
+
"OH_TELEMETRY_CONSENT_MODE",
|
|
712
|
+
"OH_TELEMETRY_SALT",
|
|
713
|
+
]) {
|
|
714
|
+
if (env[key]) result[key] = env[key];
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
if (telemetryDisabled) {
|
|
718
|
+
result.DO_NOT_TRACK = "1";
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
const apiKey =
|
|
722
|
+
env.OH_TELEMETRY_POSTHOG_API_KEY ||
|
|
723
|
+
env.VITE_POSTHOG_API_KEY ||
|
|
724
|
+
(telemetryDisabled ? "" : DEFAULT_AGENT_SERVER_TELEMETRY_POSTHOG_API_KEY);
|
|
725
|
+
const exporter = env.OH_TELEMETRY_EXPORTER || (apiKey ? "posthog" : "");
|
|
726
|
+
|
|
727
|
+
if (exporter) {
|
|
728
|
+
result.OH_TELEMETRY_EXPORTER = exporter;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
if (exporter === "posthog" && apiKey) {
|
|
732
|
+
result.OH_TELEMETRY_POSTHOG_API_KEY = apiKey;
|
|
733
|
+
result.OH_TELEMETRY_POSTHOG_HOST =
|
|
734
|
+
env.OH_TELEMETRY_POSTHOG_HOST ||
|
|
735
|
+
env.VITE_POSTHOG_HOST ||
|
|
736
|
+
DEFAULT_AGENT_SERVER_TELEMETRY_POSTHOG_HOST;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
return result;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
export function buildAgentServerEnv(config, env = process.env) {
|
|
689
743
|
return {
|
|
744
|
+
...buildAgentServerTelemetryEnv(env),
|
|
690
745
|
// Force Python to use UTF-8 for all file I/O and streams.
|
|
691
746
|
//
|
|
692
747
|
// On Windows, Python defaults to the system ANSI codepage (e.g. cp1252).
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor~module-DyG7x7JT.js","assets/rolldown-runtime-Cyuzqnbw.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,xt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{r as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{D as a,F as o,I as s,M as ee,O as te,P as ne,T as re,d as ie,k as ae,w as c,y as oe}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";import{R as se,t as ce,z as l}from"./utils-DPQfkd-7.js";var u=e(t(),1),le=`__AGENT_CANVAS_BASE_PATH__`;function ue(e){let t=e?.trim();return!t||t===`/`?``:(t.startsWith(`/`)?t:`/${t}`).replace(/\/+$/,``)}function de(){let e=ue(void 0);if(e)return e;if(typeof window<`u`){let e=window[le];if(typeof e==`string`)return ue(e)}return``}function fe(e){let t=de();return t?`${t}${e.startsWith(`/`)?e:`/${e}`}`:e.startsWith(`/`)?e:`/${e}`}var d=`openhands`,pe=[{label:`English`,value:`en`},{label:`日本語`,value:`ja`},{label:`简体中文`,value:`zh-CN`},{label:`繁體中文`,value:`zh-TW`},{label:`한국어`,value:`ko-KR`},{label:`Norsk`,value:`no`},{label:`Arabic`,value:`ar`},{label:`Deutsch`,value:`de`},{label:`Français`,value:`fr`},{label:`Italiano`,value:`it`},{label:`Português`,value:`pt`},{label:`Español`,value:`es`},{label:`Català`,value:`ca`},{label:`Türkçe`,value:`tr`},{label:`Українська`,value:`uk`}],me=new WeakMap,he=e=>{if(!me.has(e)){let t=e.use(te).use(a).use(i).init({fallbackLng:`en`,debug:!1,supportedLngs:pe.map(e=>e.value),nonExplicitSupportedLngs:!1,ns:[d],defaultNS:d,fallbackNS:d,backend:{loadPath:fe(`/locales/{{lng}}/{{ns}}.json`)},interpolation:{escapeValue:!1}});me.set(e,t)}return e},ge=()=>he(ee()),_e=null,ve=null,f=()=>(_e||=ge(),_e),ye=()=>ve??f(),be=e=>(ve=e??f(),ve),xe=async(e=f())=>(await me.get(e),e),Se=e=>e?typeof e==`object`&&!Array.isArray(e)?{ns:d,...e}:e:{ns:d},p=new Proxy({},{get:(e,t)=>{let n=ye();if(t===`t`)return(e,t)=>n.t(e,Se(t));if(t===`exists`)return(e,t)=>n.exists(e,Se(t));let r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=ye();return Reflect.set(r,t,n,r)}}),Ce=e=>typeof e.response?.data==`object`&&e.response?.data!==null&&`error`in e.response.data&&typeof e.response?.data?.error==`string`,we=e=>typeof e.response?.data==`object`&&e.response?.data!==null&&`message`in e.response.data&&typeof e.response?.data?.message==`string`,Te=`Disconnected (check URL or network). Check that the backend URL is correct and the backend server is reachable. If the backend is on another origin, check that it allows this frontend origin.`,Ee=`Disconnected (request timed out). Check that the backend URL is correct and reachable.`,De=4;function Oe(e){return typeof e==`object`&&!!e}function ke(e){let t=[],n=new Set,r=e,i=0;for(;r!=null&&i<De&&!n.has(r);){if(n.add(r),r instanceof Error)r.message&&t.push(r.message),r=r.cause;else if(typeof r==`string`){r&&t.push(r);break}else if(Oe(r)){let e=r.message;typeof e==`string`&&e&&t.push(e),r=r.cause}else break;i+=1}return t}function m(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`disconnected (check cors or network)`)||t.includes(`disconnected (check url or network)`)||t.includes(`blocked by cors`)||t.includes(`failed to fetch`)||t.includes(`network error`)||t.includes(`load failed`)||t.includes(`networkerror when attempting to fetch resource`)||t.includes(`cors`)&&t.includes(`blocked`)}function Ae(e){return ke(e).some(m)}function je(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`request timeout`)||t.includes(`timeout after`)||t.includes(`backend request timed out`)}function Me(e){let t=ke(e);return t.some(m)?Te:t.some(je)?Ee:t[0]??null}function Ne(e){return typeof e==`object`&&!!e&&`isAxiosError`in e&&e.isAxiosError===!0}var Pe=e=>{let t=null,n=!1;return Ne(e)?(n=!0,t=Ce(e)&&e.response?.data.error?e.response?.data.error:we(e)&&e.response?.data.message?e.response?.data.message:e.message):t=e instanceof Error?e.message:typeof e==`string`?e:null,Me(n?t??e:e)??t??``},h=(e,t=5e3,n=1e4)=>{if(!e)return t;let r=e.length/(1e3/60)*1e3*1.5;return Math.min(Math.max(r,t),n)},g=r(),Fe={background:`var(--oh-color-tertiary)`,border:`1px solid var(--oh-border-input)`,color:`#fff`,borderRadius:`var(--oh-radius)`,maxWidth:`400px`,wordBreak:`break-word`,overflowWrap:`anywhere`,whiteSpace:`pre-wrap`},_={position:`top-right`,style:Fe},Ie={...Fe,color:`var(--oh-muted)`};function Le({message:e}){let t=u.useRef(null),[n,r]=u.useState(!1);return u.useLayoutEffect(()=>{let e=t.current;if(!e)return;let n=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight);if(!Number.isFinite(t)||t<=0){r(!1);return}r(e.getBoundingClientRect().height>t*1.5)};n();let i=new ResizeObserver(n);return i.observe(e),()=>i.disconnect()},[e]),(0,g.jsxs)(`div`,{className:ce(`flex min-w-0 gap-2`,n?`items-start`:`items-center`),children:[(0,g.jsx)(re,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`,strokeWidth:2,style:{color:se}}),(0,g.jsx)(`span`,{ref:t,className:`min-w-0 flex-1 text-sm leading-5 [word-break:break-word] [overflow-wrap:anywhere]`,children:e})]})}var Re={..._,icon:null,style:Ie},ze=e=>{let t=e||p.t(l.STATUS$ERROR);m(t)?t=p.t(l.ERROR$CORS_OR_NETWORK):je(t)&&(t=p.t(l.ERROR$BACKEND_REQUEST_TIMEOUT));let n=h(t,4e3);c((0,g.jsx)(Le,{message:t}),{...Re,duration:n})},Be=e=>{let t=h(e,5e3);c.success((0,g.jsx)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:e}),{..._,duration:t})},Ve=(e,t,n)=>{let r=h(`${e} ${t}`,5e3);c.success((0,g.jsxs)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:[e,` `,(0,g.jsx)(`a`,{className:`underline hover:no-underline`,href:n,children:t})]}),{..._,duration:r})},He=e=>{let t=h(e,6e3);c((0,g.jsx)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:e}),{..._,icon:`⚠️`,duration:t})},Ue=`openhands-backend-health`,We=500;function Ge(e){if(typeof e!=`object`||!e)return!1;let t=e;return Number.isInteger(t.consecutiveFailures)&&t.consecutiveFailures>=0&&t.consecutiveFailures<=5&&(t.lastError===null||typeof t.lastError==`string`)&&(t.lastFailureAt===null||typeof t.lastFailureAt==`number`)&&typeof t.disabled==`boolean`}function Ke(){if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(Ue);if(!e)return{};let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let n={};for(let[e,r]of Object.entries(t))typeof e==`string`&&e.length>0&&Ge(r)&&(n[e]=r);return n}catch{return{}}}function qe(e){if(!(typeof window>`u`))try{if(Object.keys(e).length===0){window.localStorage.removeItem(Ue);return}window.localStorage.setItem(Ue,JSON.stringify(e))}catch{}}function Je(e){let t=Me(e)??`Unknown error`;return t.length>We?`${t.slice(0,We)}…`:t}var v=Ke(),Ye=new Set;function Xe(){Ye.forEach(e=>e())}function y(e){v=e,qe(e),Xe()}function Ze(){return v}function Qe(e){return v[e]??null}function $e(e){return Ye.add(e),()=>{Ye.delete(e)}}function et(e,t){let n=v[e],r=Math.min((n?.consecutiveFailures??0)+1,5),i=n?.disabled===!0||r>=5,a={consecutiveFailures:r,lastError:Je(t),lastFailureAt:Date.now(),disabled:i};y({...v,[e]:a})}function tt(e){if(!(e in v))return;let{[e]:t,...n}=v;y(n)}function nt(e){if(!(e in v))return;let{[e]:t,...n}=v;y(n)}function rt(e){if(!(e in v))return;let{[e]:t,...n}=v;y(n)}var it=`workspace/project`,at=`__AGENT_CANVAS_LOCK_TO_CLOUD__`,ot=`all-hands.dev`,b=`openhands.dev`,st=`app.${ot}`,ct=b,lt=`app.${b}`;function ut(e){return e?.trim()||null}function dt(e){if(!e)return null;let t=e.trim().replace(/\/$/,``);return t?/^https?:\/\//i.test(t)?t:typeof window<`u`?`${window.location.protocol}//${t}`:`http://${t}`:null}function ft(e){if(!e)return null;let t=e.trim().replace(/\/+$/,``);return t?/^https?:\/\//i.test(t)?t:`https://${t}`:null}function pt(e){let t=e.toLowerCase();return t===st||t===lt?ct:t===ot?b:t.endsWith(`.${ot}`)?`${t.slice(0,-13)}${b}`:t}function mt(e){let t=ft(e);if(!t)return null;try{let e=new URL(t),n=e.port?`:${e.port}`:``;return`${e.protocol}//${pt(e.hostname)}${n}`}catch{return t.toLowerCase()}}function ht(){let e=x();return!e||typeof window>`u`||!yt(window.location.origin,e)?null:window.location.origin}function gt(){return dt(void 0)}function _t(){let e=ut(void 0);if(e)return e;if(typeof window<`u`){let e=window.__AGENT_CANVAS_SESSION_API_KEY__;if(typeof e==`string`)return ut(e)}return null}function vt(){return{baseUrl:xt()??``,sessionApiKey:S()??``}}function x(){let e=ft(void 0);if(e)return e;if(typeof window<`u`){let e=window[at];if(typeof e==`string`)return ft(e)}return null}function yt(e,t){let n=mt(e),r=mt(t);return!n||!r?!1:n===r}function bt(){return ht()?`cookie`:`api-key`}function xt(){return gt()||(typeof window<`u`?window.location.origin:null)}function S(){return _t()}function St(){return it}function Ct(e){return`${St().replace(/\/+$/,``)}/${e.replace(/-/g,``)}`}function wt(){let e=S();return e?{"X-Session-API-Key":e}:{}}function C(){return typeof window<`u`&&window.__AGENT_CANVAS_AUTH_REQUIRED__===!0}function Tt(){return C()?!S():!1}var Et=`default-local`,Dt=`Local`,Ot=`locked-cloud`,kt=`OpenHands Cloud`;function At(){if(!x())return null;let e=ht();return e?{id:Ot,name:kt,host:e,apiKey:``,kind:`cloud`,authMode:`cookie`}:null}function w(){if(x())return null;let e=xt(),t=S();return!e||!t?null:{id:Et,name:Dt,host:e,apiKey:t,kind:`local`}}var jt=`openhands-backends`,T=`openhands-active-backend`;function Mt(e){return e===`local`||e===`cloud`}function Nt(e){return e===void 0||e===`api-key`||e===`cookie`}function Pt(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&t.id.length>0&&typeof t.name==`string`&&typeof t.host==`string`&&typeof t.apiKey==`string`&&Mt(t.kind)&&Nt(t.authMode)&&(t.connectionRevision===void 0||typeof t.connectionRevision==`number`&&Number.isSafeInteger(t.connectionRevision)&&t.connectionRevision>=0)}function Ft(e){try{let{hostname:t}=new URL(e);return t===`localhost`||t===`127.0.0.1`||t===`::1`||t===`[::1]`}catch{return!1}}function It(e,t){return e.id!==`default-local`||e.kind!==`local`?!1:e.host===t.host||Ft(e.host)&&Ft(t.host)}function Lt(e){let t=w();if(!t)return e;let n=!1,r=e.map(e=>!It(e,t)||e.apiKey===t.apiKey?e:(n=!0,{...e,apiKey:t.apiKey}));return n?(E(r),r):e}function E(e){if(!(typeof window>`u`))try{window.localStorage.setItem(jt,JSON.stringify(e))}catch{}}function Rt(){if(typeof window>`u`)return[];try{let e=At();if(e)return E([e]),Ut()?.backendId!==e.id&&D({backendId:e.id}),[e];let t=window.localStorage.getItem(jt);if(t===null){let e=w();return e?(E([e]),[e]):[]}let n=JSON.parse(t);if(!Array.isArray(n))return[];let r=n.filter(Pt);if(r.length===0){let e=w();return e?(E([e]),[e]):[]}return Lt(r)}catch{return[]}}function zt(e){if(!e)return null;try{let t=JSON.parse(e);if(typeof t!=`object`||!t||typeof t.backendId!=`string`)return null;let n=t.orgId;return{backendId:t.backendId,orgId:typeof n==`string`&&n.length>0?n:null}}catch{return null}}function Bt(e,t){try{return e?.getItem(t)??null}catch{return null}}function Vt(e,t,n){try{e?.setItem(t,n)}catch{}}function Ht(e,t){try{e?.removeItem(t)}catch{}}function Ut(){return typeof window>`u`?null:zt(Bt(window.sessionStorage,T))||zt(Bt(window.localStorage,T))}function D(e){if(typeof window>`u`)return;if(!e){Ht(window.sessionStorage,T),Ht(window.localStorage,T);return}let t=JSON.stringify({backendId:e.backendId,orgId:e.orgId??null});Vt(window.sessionStorage,T,t),Vt(window.localStorage,T,t)}var Wt=`backend`;function Gt(e,t){let{backend:n,orgId:r}=t;if(!n.id)return e;let[i,a=``]=e.split(`?`),o=new URLSearchParams(a);return o.set(Wt,n.id),r&&o.set(`org`,r),`${i}?${o.toString()}`}function Kt(e,t){if(!t)return null;let n;try{n=new URLSearchParams(t)}catch{return null}let r=n.get(Wt);return!r||!e.some(e=>e.id===r)?null:{backendId:r,orgId:n.get(`org`)||null}}function qt(){return typeof window>`u`?``:window.location.search}var Jt=`no-backend`,Yt={id:Jt,name:`No Backend Available`,host:``,apiKey:``,kind:`local`};function Xt(e){return e.id===Jt}function Zt(e){return e.find(e=>e.kind===`local`&&Qe(e.id)?.disabled!==!0)||(e.find(e=>e.kind===`local`)??e[0]??Yt)}function Qt(e,t){let n=null,r=null;if(t){let i=e.find(e=>e.id===t.backendId);i&&(n=i,r=t.orgId??null)}return n||(n=Zt(e),r=null),{backends:e,selection:t,active:{backend:n,orgId:r}}}function $t(e){let t=Kt(e,qt());return t?(D(t),t):Ut()}var en=Rt(),O=Qt(en,$t(en)),tn=new Set;function nn(){tn.forEach(e=>e())}function rn(){return O.active}function k(){let e=O.active.backend;return e.kind===`local`&&!Xt(e)?e:null}function A(){return O.backends}function an(){return O.selection}function j(){return O}function on(e){D(e),O=Qt(O.backends,e),nn()}function sn(e){E(e);let t=O.selection;t&&!e.some(e=>e.id===t.backendId)&&(t=null,D(null)),O=Qt(e,t),nn()}function cn(e){return tn.add(e),()=>{tn.delete(e)}}var ln=(e,t)=>{(e?.response?.status===401||e?.status===401)&&t.invalidateQueries({queryKey:[`user`,`authenticated`]})},un=e=>{if(!(e instanceof ae)||e.response?.status!==401&&e.status!==401)return!1;let t=rn().backend;if(t.kind!==`cloud`)return!1;let n=e.config?.url;return!n||n.startsWith(t.host.replace(/\/+$/,``))},dn=new Set,fn=()=>{let e=new ne({queryCache:new o({onSuccess:(e,t)=>{let n=t.meta?.backendId??t.options.meta?.backendId;typeof n==`string`&&tt(n)},onError:(t,n)=>{if(n.queryKey[0]===`user`&&n.queryKey[1]===`authenticated`||ln(t,e),!(n.meta?.disableToast??n.options.meta?.disableToast)&&!un(t)){let e=Pe(t);dn.has(e||``)||(ze(e||p.t(l.ERROR$GENERIC)),dn.add(e||``),setTimeout(()=>{dn.delete(e||``)},3e3))}}}),mutationCache:new s({onError:(t,n,r,i)=>{ln(t,e),!(i?.meta?.disableToast??i?.options.meta?.disableToast)&&!un(t)&&ze(Pe(t)||p.t(l.ERROR$GENERIC))}})});return e},pn=null,mn=null,hn=()=>(pn||=fn(),pn),gn=()=>mn??hn(),_n=e=>(mn=e??hn(),mn),vn=new Proxy({},{get:(e,t)=>{let n=gn(),r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=gn();return Reflect.set(r,t,n,r)}});function yn(e){if(e&&!e.startsWith(`/`))try{let t=new URL(e),n=t.hostname,r=window.location.hostname??window.location.host?.split(`:`)[0];return r&&(n===`localhost`||n===`127.0.0.1`)&&r!==`localhost`&&r!==`127.0.0.1`?`${r}:${t.port}`:t.host}catch{return window.location.host}return window.location.host}function bn(e){if(e&&!e.startsWith(`/`))try{return(new URL(e).pathname.split(`/api/conversations`)[0]||``).replace(/\/$/,``)}catch{return``}return``}function xn(e){let t=yn(e),n=bn(e),r=window.location.protocol===`https:`,i=Sn(e)===`https:`;return`${r||i?`https:`:`http:`}//${t}${n}`}function Sn(e){if(!e||e.startsWith(`/`))return null;try{return new URL(e).protocol}catch{return null}}function Cn(e){let t=yn(e),n=bn(e),r=window.location.protocol===`https:`,i=Sn(e)===`https:`;return`${r||i?`wss:`:`ws:`}//${t}${n}/sockets/bash-events`}function wn(e,t){if(!e)return null;let n=yn(t),r=bn(t),i=window.location.protocol===`https:`,a=Sn(t)===`https:`;return`${i||a?`wss:`:`ws:`}//${n}${r}/sockets/events/${e}`}var Tn=class extends Error{constructor(){super(`No backend is configured.`),this.name=`NoBackendAvailableError`}};function En(e){return e.replace(/\/+$/,``)}function Dn(e,t){return e.host?En(e.host):e.conversationUrl?En(xn(e.conversationUrl)):En(t?.host??``)}function On(e={}){let t=k();if(!t&&!e.host&&!e.conversationUrl)throw new Tn;let n=e.sessionApiKey??e.apiKey??t?.apiKey??void 0;return{host:Dn(e,t),...n?{apiKey:n}:{},workingDir:e.workingDir??St(),...e.timeout===void 0?{}:{timeout:e.timeout}}}function kn(e){let{host:t,apiKey:n,timeout:r}=On(e);return{baseUrl:t,...n?{apiKey:n}:{},timeout:r??6e4}}var An={_comment:`Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.`,versions:{agentServer:`1.40.1`,agentCanvas:`1.11.0`,automation:`1.6.0`},compatibility:{minimumAgentServer:`1.28.0`},constraints:{_comment:`Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).`,agentClientProtocol:`agent-client-protocol<0.11`},images:{agentServer:`ghcr.io/openhands/agent-server`,agentCanvas:`ghcr.io/openhands/agent-canvas`},ports:{agentServer:18e3,automation:18001,proxy:8e3},paths:{stateSubdir:`agent-canvas`,conversations:`agent-canvas/conversations`,bashEvents:`agent-canvas/bash_events`,automationDb:`automation/automations.db`,canvasBasePath:`/canvas`},packages:{agentServer:`openhands-agent-server`,automation:`openhands-automation`,tools:`openhands-tools`,workspace:`openhands-workspace`},telemetry:{posthogApiKey:`phc_kBtz5nKmxVRRQ7HtPwr2QX9eMC5j65zE86QKocVNwb4U`,posthogHost:`https://us.i.posthog.com`}},jn=5e3,Mn=`unknown`,M=An.compatibility.minimumAgentServer,Nn=`AGENT_SERVER_UNSUPPORTED_VERSION`,Pn=`AGENT_SERVER_UNKNOWN_VERSION`,N=null,Fn=null,In=e=>Array.isArray(e?.usable_tools)?e.usable_tools:null,P=class extends Error{details;noBackendConfigured;constructor(e,t){let n=t?.noBackendConfigured??!1;super(n?`No agent server backend is configured yet. Add a backend to get started.`:`Could not connect to the configured agent server. Make sure it is running and reachable, then reload the page.`),this.name=`AgentServerUnavailableError`,this.details=e??null,this.noBackendConfigured=n}},Ln=e=>e instanceof P||typeof e==`object`&&!!e&&`name`in e&&e.name===`AgentServerUnavailableError`,Rn=class extends P{code=Nn;actualVersion;requiredVersion=M;constructor(e){let t=`Agent Canvas requires agent-server ${M} or newer; this backend is running ${e}. Please upgrade the agent-server backend.`;super(t),this.name=`AgentServerUnsupportedVersionError`,this.message=t,this.actualVersion=e}},zn=class extends P{code=Pn;actualVersion;requiredVersion=M;constructor(e){let t=`Could not determine this backend's agent-server version.${e?` It reported "${e}".`:``} Agent Canvas requires agent-server ${M} or newer, but this backend did not return a valid version from /server_info. Restart or rebuild the agent-server backend, then try again.`;super(t),this.name=`AgentServerUnknownVersionError`,this.message=t,this.actualVersion=e}},Bn=e=>C()&&I(e,401);function F(){N=null,Fn=null}function Vn(e){return e?.host&&e.host!==Fn?null:N}function Hn(e){let t=In(N);return Array.isArray(t)?t.includes(e):!0}function Un(e){return e instanceof Error&&e.name===`HttpError`&&`status`in e&&typeof e.status==`number`}function I(e,t){return Un(e)&&e.status===t}function Wn(e){return typeof e==`string`&&e.trim()||null}function Gn(e){return Wn(e.sdk_version)}function Kn(e){return Wn(e.version)??Gn(e)}function qn(e){let t=Kn(e);return!t||t.toLowerCase()===Mn?null:t}function Jn(e){let t=qn(e);return!t||!Zn(t)?null:t}function Yn(e){return!N||e&&k()?.host!==e?null:Jn(N)}function Xn(e,t){let n=Zn(e),r=Zn(t);if(!n||!r)return null;for(let e of[`major`,`minor`,`patch`]){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return n.prerelease&&!r.prerelease?-1:!n.prerelease&&r.prerelease?1:n.prerelease&&r.prerelease?n.prerelease.localeCompare(r.prerelease):0}function Zn(e){let[t]=e.trim().replace(/^v/,``).split(`+`),[n,r]=t.split(`-`,2),i=n.split(`.`);if(i.length!==3)return null;let[a,o,s]=i.map(e=>Number(e));return[a,o,s].every(e=>Number.isInteger(e)&&e>=0)?{major:a,minor:o,patch:s,prerelease:r}:null}function Qn(e){let t=qn(e);if(!t)throw F(),new zn(Kn(e));let n=Xn(t,M);if(n===null)throw F(),new zn(t);if(n<0)throw F(),new Rn(t)}async function $n(){let e=k();if(!e){if(F(),Xt(rn().backend))throw new P(`No backend configured`,{noBackendConfigured:!0});return null}let t=On({host:e.host,sessionApiKey:e.apiKey||null,timeout:jn}),n;try{n=await new oe(t).getServerInfo()}catch(e){throw F(),I(e,401)?e:new P(e instanceof Error?e.message:null)}if(Qn(n),C())try{await new ie(t).getSettings()}catch(e){if(I(e,401))throw e;console.warn(`[agent-server] getSettings() probe failed (non-401):`,e)}return N=n,Fn=t.host,n}var er={WEB_CLIENT_CONFIG:[`web-client-config`],MAIN_APP_COOKIE_AUTH:[`main-app-cookie-auth`]},tr={all:[`settings`],byScope:e=>[`settings`,e],personal:()=>[`settings`,`personal`]},nr={all:[`llm-profiles`]},rr={all:[`agent-profiles`]},ir={retry:!1},ar={all:[`llm-subscription`],openaiStatus:[`llm-subscription`,`openai`,`status`],openaiModels:[`llm-subscription`,`openai`,`models`]},or={all:[`local-workspaces`]},sr={marketplace:[`plugins-marketplace`],installed:[`plugins-installed`],local:[`plugins-local`]},cr={capabilities:()=>[`setup-capabilities`]},lr={latestVersion:[`agent-canvas-latest-version`]},ur={staleTime:1e3*60*5,gcTime:1e3*60*15},dr={name:`@openhands/agent-canvas`,version:`1.11.0`,description:`Agent Canvas UI for OpenHands - run AI coding agents with a visual interface`,license:`MIT`,private:!1,type:`module`,repository:{type:`git`,url:`https://github.com/OpenHands/OpenHands`},homepage:`https://github.com/OpenHands/OpenHands#readme`,bugs:{url:`https://github.com/OpenHands/OpenHands/issues`},bin:{"agent-canvas":`bin/agent-canvas.mjs`},engines:{node:`>=22.12.0`},dependencies:{"@heroui/react":`2.8.10`,"@microlink/react-json-view":`1.31.20`,"@monaco-editor/react":`4.7.0`,"@openhands/extensions":`0.16.0`,"@openhands/typescript-client":`1.36.1`,"@react-router/node":`7.18.2`,"@react-router/serve":`7.18.2`,"@tailwindcss/vite":`4.3.3`,"@tanstack/react-query":`5.101.4`,"@types/shell-quote":`1.7.5`,"@uidotdev/usehooks":`2.4.1`,"@xterm/addon-fit":`0.11.0`,"@xterm/xterm":`6.0.0`,axios:`1.18.0`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,downshift:`9.3.2`,"framer-motion":`12.38.0`,httpxy:`0.5.3`,i18next:`26.3.6`,"i18next-browser-languagedetector":`8.2.1`,"i18next-http-backend":`4.0.0`,isbot:`5.1.39`,"lucide-react":`1.25.0`,"monaco-editor":`0.56.0`,"posthog-js":`1.380.0`,react:`19.2.8`,"react-dom":`19.2.8`,"react-hot-toast":`2.6.0`,"react-i18next":`17.0.11`,"react-icons":`5.6.0`,"react-markdown":`10.1.0`,"react-router":`7.18.2`,"react-syntax-highlighter":`16.1.1`,"rehype-raw":`7.0.0`,"rehype-sanitize":`6.0.0`,"remark-breaks":`4.0.0`,"remark-gfm":`4.0.1`,"shell-quote":`1.9.0`,sirv:`3.0.2`,"sirv-cli":`3.0.1`,"socket.io-client":`4.8.3`,"tailwind-merge":`3.6.0`,"tailwind-scrollbar":`4.0.2`,"unist-util-visit":`5.1.0`,uuid:`14.0.0`,vite:`8.0.16`,winston:`3.19.0`,"winston-daily-rotate-file":`5.0.0`,zustand:`5.0.12`},scripts:{dev:`node --env-file-if-exists=.env scripts/dev-with-automation.mjs`,"dev:static":`node --env-file-if-exists=.env scripts/dev-static.mjs`,"dev:extra-backend":`node --env-file-if-exists=.env scripts/dev-extra-backend.mjs`,"dev:minimal":`node --env-file-if-exists=.env scripts/dev-safe.mjs`,"dev:frontend":`npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev`,"dev:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev`,build:`npm run build:app`,"build:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router build`,start:`npx sirv-cli build/ --single`,test:`npm run make-i18n && vitest run`,"test:e2e":`playwright test --pass-with-no-tests`,"test:e2e:live":`node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs`,"test:e2e:mock-llm":`playwright test --config=playwright.mock-llm.config.ts`,"test:e2e:mock-llm:docker":`playwright test --config=playwright.mock-llm-docker.config.ts`,"test:coverage":`npm run make-i18n && vitest run --coverage`,"test:mutation":`npm run make-i18n && stryker run`,"test:mutation:diff":`npm run make-i18n && node scripts/stryker-diff.mjs`,"test:mutation:incremental":`npm run make-i18n && stryker run --incremental`,dev_wsl:`VITE_WATCH_USE_POLLING=true vite`,preview:`vite preview`,"make-i18n":`node scripts/make-i18n-translations.cjs`,prelint:`npm run make-i18n`,lint:`npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}`,"lint:fix":`eslint src --fix && prettier --write src/**/*.{ts,tsx}`,prepare:`husky`,typecheck:`react-router typegen && tsc`,"typecheck:staged":`react-router typegen && npx tsc --noEmit --skipLibCheck`,"check-translation-completeness":`node scripts/check-translation-completeness.cjs`,"build:app":`npm run make-i18n && react-router build`,"build:lib":`npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true vite build && tsc -p tsconfig.lib.json`,"build:docker":`node scripts/docker-build.mjs`,"example:acp-docker:env":`node scripts/gen-acp-docker-env.mjs`,predesktop:`node scripts/brand-dev-electron.mjs`,desktop:`npm run build:app && electron electron`,"build:desktop":`npm run build:app && node scripts/download-uv.mjs && node scripts/download-node.mjs && electron-builder --config electron-builder.config.mjs --publish never`,"build:desktop:universal":`npm run build:app && node scripts/download-uv.mjs && node scripts/download-node.mjs && cross-env ELECTRON_ARCH=universal electron-builder --config electron-builder.config.mjs --publish never`,"download-uv":`node scripts/download-uv.mjs`,"download-node":`node scripts/download-node.mjs`,"generate-icons":`node scripts/generate-icons.mjs`},"lint-staged":{"src/**/*.{ts,tsx,js}":[`eslint --fix`,`prettier --write`],"src/**/*.{ts,tsx}":[`node scripts/run-staged-typecheck.mjs`],"src/**/*":[`npm run check-translation-completeness`]},devDependencies:{"@eslint/eslintrc":`3.3.1`,"@eslint/js":`9.39.4`,"@mswjs/socket.io-binding":`0.2.0`,"@playwright/test":`1.62.0`,"@react-router/dev":`7.18.2`,"@stryker-mutator/core":`9.6.1`,"@stryker-mutator/vitest-runner":`9.6.1`,"@tailwindcss/typography":`0.5.20`,"@tanstack/eslint-plugin-query":`5.101.4`,"@testing-library/dom":`10.4.1`,"@testing-library/jest-dom":`7.0.0`,"@testing-library/react":`16.3.2`,"@testing-library/user-event":`14.6.1`,"@types/mdast":`4.0.4`,"@types/node":`26.1.2`,"@types/react":`19.2.17`,"@types/react-dom":`19.2.3`,"@types/react-syntax-highlighter":`15.5.13`,"@typescript-eslint/eslint-plugin":`8.59.2`,"@typescript-eslint/parser":`8.59.2`,"@vercel/react-router":`1.3.0`,"@vitest/coverage-v8":`4.1.10`,"cross-env":`10.1.0`,electron:`42.3.3`,"electron-builder":`26.15.3`,eslint:`9.39.4`,"eslint-config-prettier":`10.1.8`,"eslint-import-resolver-typescript":`4.4.5`,"eslint-plugin-i18next":`6.1.5`,"eslint-plugin-import-x":`4.16.2`,"eslint-plugin-jsx-a11y":`6.10.2`,"eslint-plugin-prettier":`5.5.5`,"eslint-plugin-react":`7.37.5`,"eslint-plugin-react-hooks":`7.1.1`,"eslint-plugin-unused-imports":`4.4.1`,globals:`16.5.0`,husky:`9.1.7`,jsdom:`30.0.0`,"lint-staged":`16.4.0`,msw:`2.15.0`,png2icons:`2.0.1`,"postcss-prefix-selector":`2.1.1`,prettier:`3.8.3`,tailwindcss:`4.3.3`,typescript:`6.0.3`,"vite-plugin-svgr":`5.2.0`,vitest:`4.1.10`},packageManager:`npm@10.5.0`,volta:{node:`22.12.0`},msw:{workerDirectory:[`public`]},overrides:{"@vercel/static-config":{ajv:`8.20.0`},dompurify:`3.4.12`,"typed-rest-client":{qs:`6.15.3`}},main:`./dist/index.cjs`,module:`./dist/index.js`,types:`./dist/index.d.ts`,files:[`dist`,`bin`,`build`,`config`,`scripts`,`tools`],exports:{".":{types:`./dist/index.d.ts`,import:`./dist/index.js`,require:`./dist/index.cjs`},"./browser":{types:`./dist/components/browser/index.d.ts`,import:`./dist/components/browser/index.js`,require:`./dist/components/browser/index.cjs`},"./conversation":{types:`./dist/components/conversation/index.d.ts`,import:`./dist/components/conversation/index.js`,require:`./dist/components/conversation/index.cjs`},"./files":{types:`./dist/components/files/index.d.ts`,import:`./dist/components/files/index.js`,require:`./dist/components/files/index.cjs`},"./settings":{types:`./dist/components/settings/index.d.ts`,import:`./dist/components/settings/index.js`,require:`./dist/components/settings/index.cjs`},"./sidebar":{types:`./dist/components/sidebar/index.d.ts`,import:`./dist/components/sidebar/index.js`,require:`./dist/components/sidebar/index.cjs`},"./terminal":{types:`./dist/components/terminal/index.d.ts`,import:`./dist/components/terminal/index.js`,require:`./dist/components/terminal/index.cjs`},"./i18n":{types:`./dist/i18n/index.d.ts`,import:`./dist/i18n/index.js`,require:`./dist/i18n/index.cjs`},"./package.json":`./package.json`},peerDependencies:{react:`19.2.8`,"react-dom":`19.2.8`,"react-router":`7.18.2`}},fr=`agent_canvas`,pr=dr.version,mr=`X-OpenHands-Client`,hr=`X-OpenHands-Client-Version`,gr=`X-OpenHands-Telemetry-Distinct-Id`,_r={[mr]:fr,[hr]:pr};function vr(e){return e?.trim()||`unknown`}function yr(e){return e?.trim()||null}function L({backendKind:e,agentServerVersion:t,automationSdkVersion:n,backendVersion:r,connectionMethod:i}){let a=vr(t??r),o=vr(n),s=vr(r??t);return{backend_kind:e??null,agent_server_version:a,automation_sdk_version:o,backend_version:s,...i?{connection_method:i}:{}}}function br(e=null){return{cloud_user_id:yr(e?.userId),cloud_user_email:yr(e?.email),cloud_org_id:yr(e?.orgId)}}var R=`openhands-telemetry-consent`,z=`openhands-telemetry-consent-pending-cloud-sync`,B=`openhands-telemetry-consent-pending-local-revocation`,xr=`openhands-telemetry-consent-change`,Sr=`openhands-telemetry-first-use`,Cr=`openhands-telemetry-session`,wr=`agent-canvas`,Tr=`history_change`,Er=`phc_BgzfxKdgsYMLFTmJqt424ZoyVHvKFfrwttLimzdYTKFK`,Dr=`https://z.openhands.dev`,Or=`https://us.posthog.com`,V=null,H=null,kr,U={},W=!1,G,K=0,q=-1,Ar=Object.freeze({client_source:fr,client_version:pr,package_name:dr.name,package_version:dr.version}),jr=L({}),Mr=br();function Nr(e){jr=L(e)}function Pr(e){Mr=br(e)}function Fr(e){return e?{...e,properties:{...jr,...Mr,...e.properties,...Ar}}:null}function Ir(e){W||Z()!==`granted`?e.opt_out_capturing():e.opt_in_capturing()}function Lr(e,t=!1){e.reset(t),q=-1,Ir(e)}function J(e){if(G===void 0||!$())return;let t=G?.distinctId,n=e.get_property(`$user_id`);if(n!=null&&n!==t&&Lr(e),G===null){q=K;return}(e.get_property(`$user_id`)!==G.distinctId||q!==K)&&(e.identify(G.distinctId,G.properties),q=K)}function Rr(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}function zr(e){if(e===!1){if(W)return;W=!0,V?.opt_out_capturing(),Q();return}let t=W;if(W=!1,!V&&!H){let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));U={...U,...t}}t&&(V&&(Ir(V),J(V)),Q())}function Br(){return W?null:{apiKey:U.apiKey||Er,apiHost:U.apiHost||Dr,uiHost:U.uiHost||Or}}function Y(){return typeof window<`u`&&typeof localStorage<`u`}async function Vr(){if(!Y())return null;if(V)return V;try{let{default:e}=await n(async()=>{let{default:e}=await import(`./vendor~module-DyG7x7JT.js`).then(e=>e.t);return{default:e}},__vite__mapDeps([0,1]));return e}catch{return null}}function Hr(){return!!(W||typeof process<`u`&&{}.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`))}function Ur(e){V||(kr=e)}async function X(e=!1){if(V)return V;if(H)return H;H=(async()=>{let t=Br();if(!t)return null;let n=await Vr();if(!n)return null;let r=n.init(t.apiKey,{api_host:t.apiHost,ui_host:t.uiHost,opt_out_capturing_by_default:!e,persistence:`localStorage`,persistence_name:wr,consent_persistence_name:`${wr}-consent`,person_profiles:`always`,capture_pageview:Tr,autocapture:!0,disable_session_recording:!0,bootstrap:kr,before_send:Fr},wr);return r?(V=r,kr=void 0,W?V.opt_out_capturing():Z()===`granted`?(V.opt_in_capturing(),J(V)):e||V.opt_out_capturing(),V):null})();try{return await H}finally{V||(H=null)}}function Z(){if(!Y())return`pending`;if(Hr())return`denied`;if(bt()===`cookie`)return`granted`;try{let e=localStorage.getItem(R);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}function Wr(){if(!Y())return null;try{let e=localStorage.getItem(z);return e===`granted`||e===`denied`?e:null}catch{return null}}function Gr(){if(!Y())return null;try{return localStorage.getItem(B)}catch{return null}}function Kr(e){if(!Y())return()=>{};let t=t=>{(t.key===R||t.key===z)&&e()};return window.addEventListener(xr,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(xr,e),window.removeEventListener(`storage`,t)}}function Q(){Y()&&window.dispatchEvent(new Event(xr))}function qr(e){if(Y())try{localStorage.setItem(z,e)}catch{}}function Jr(e){if(!(!Y()||!e))try{localStorage.setItem(B,e)}catch{}}function Yr(e){if(Y())try{if(localStorage.getItem(B)!==e)return;localStorage.removeItem(B)}catch{}}function Xr(e){if(Y())try{if(e!==void 0&&localStorage.getItem(z)!==e)return;localStorage.removeItem(z),Q()}catch{}}async function Zr(e,{syncToCloud:t=!0}={}){if(Y())try{let t=Z()===e;if(localStorage.setItem(R,e),W||t)return;let n=V??await X();if(!n)return;e===`granted`?(n.opt_in_capturing(),J(n)):(Jr(n.get_distinct_id?.()??null),n.get_property?.(`$user_id`)==null?n.opt_out_capturing():Lr(n))}catch{}finally{t&&qr(e),Q()}}async function Qr(e,t={}){let n=e===null?null:{distinctId:e,properties:t};if(G===n||G!=null&&n!==null&&G.distinctId===n.distinctId&&Rr(G.properties,t)||(G=n,K+=1,q=-1,!$()))return;let r=V??await X();r&&$()&&J(r)}function $(){return Z()===`granted`}function $r(){if(!Y())return!1;try{return localStorage.getItem(Sr)===`true`}catch{return!1}}function ei(){if(Y())try{localStorage.setItem(Sr,`true`)}catch{}}async function ti(){if(Hr()||$r())return;let e=await X(!0);!e||Hr()||((e.has_opted_out_capturing?.()??!1)&&e.opt_in_capturing(),e.capture(`canvas_install`,{platform:typeof navigator<`u`?navigator.platform:`unknown`,user_agent:typeof navigator<`u`?navigator.userAgent:`unknown`,referrer:typeof document<`u`?document.referrer:``,url_origin:typeof window<`u`?window.location.origin:``,embedded:typeof window<`u`&&window.self!==window.top}),ei(),Z()!==`granted`&&e.opt_out_capturing())}function ni(){if(!Y())return!1;try{return sessionStorage.getItem(Cr)===`true`}catch{return!1}}function ri(){if(Y())try{sessionStorage.setItem(Cr,`true`)}catch{}}async function ii(){if(!$()||Z()!==`granted`)return null;let e=await X();return!e||!$()?null:(e.has_opted_out_capturing?.()&&e.opt_in_capturing(),J(e),e)}async function ai(){if(ni())return;let e=await ii();e&&(e.capture(`canvas_new_session`,{is_first_use:!$r()}),ri())}async function oi(){return(await ii())?.get_distinct_id?.()??null}async function si(){if(!Y())return null;if(Z()!==`granted`){let e=Gr();if(e)return e}return W||Hr()?null:(await X())?.get_distinct_id?.()??null}async function ci(e,t={}){let n=await ii();n&&n.capture(e,t)}async function li(e,t={}){let n=await ii();n&&n.captureException(e,t)}async function ui(){if(Y()){try{Jr(V?.get_distinct_id?.()??null),localStorage.removeItem(R),localStorage.removeItem(Sr)}catch{}Xr();try{sessionStorage.removeItem(Cr)}catch{}jr=L({}),Mr=br(),G=null,K+=1,q=-1;try{V&&Lr(V,!0)}catch{try{V?.opt_out_capturing()}catch{}}finally{Q()}}}var di=u.createContext(null);function fi(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`backend-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function pi(e,t){let n=e.backend.kind===`cloud`,r=t.backend.kind===`cloud`;!n&&!r||(Pr(null),r&&(!n||e.backend.id!==t.backend.id)&&Qr(null))}function mi({children:e}){let t=u.useSyncExternalStore(cn,j,j),n=u.useCallback(()=>{F(),vn.invalidateQueries({queryKey:er.WEB_CLIENT_CONFIG})},[]),r=u.useCallback((e,t)=>{let r=j(),i=an()?.backendId??null,a=an()?.orgId??null,o=t??null;if(e===i&&o===a)return;let s=A(),ee=s.find(t=>t.id===e),te={backend:ee??s[0]??Yt,orgId:ee?o:null};pi(r.active,te),on({backendId:e,orgId:o}),n()},[n]),i=u.useCallback(e=>{let t=j().active,r={...e,id:fi()},i=[...A(),r];return pi(t,{backend:r,orgId:null}),sn(i),on({backendId:r.id}),n(),r},[n]),a=u.useCallback((e,t)=>{let r=A().find(t=>t.id===e),i=j().active.backend.id,a=t.host!==void 0&&r!==void 0&&t.host!==r.host,o=t.apiKey!==void 0&&r!==void 0&&t.apiKey!==r.apiKey;sn(A().map(n=>n.id===e?{...n,...t,connectionRevision:a||o?(n.connectionRevision??0)+1:n.connectionRevision}:n)),(a||o)&&(nt(e),i===e&&(r?.kind===`cloud`&&(Pr(null),Qr(null)),n()))},[n]),o=u.useCallback(e=>{let t=A().find(t=>t.id===e),r=t?.kind===`cloud`&&j().active.backend.id===t.id;sn(A().filter(t=>t.id!==e)),r&&(Pr(null),Qr(null)),rt(e),n()},[n]),s=u.useMemo(()=>({backends:t.backends,active:t.active,setActive:r,addBackend:i,updateBackend:a,removeBackend:o}),[t,r,i,a,o]);return(0,g.jsx)(di.Provider,{value:s,children:e})}function hi(){let e=u.useContext(di);if(!e)throw Error(`useActiveBackendContext must be used inside <ActiveBackendProvider>`);return e}function gi(){let e=u.useContext(di);return e?e.active:{backend:w()??Yt,orgId:null}}export{On as $,ir as A,ze as At,Qn as B,d as Bt,ai as C,Tt as Ct,pr as D,tt as Dt,fr as E,et as Et,or as F,Me as Ft,Jn as G,xe as Gt,Xn as H,ye as Ht,sr as I,je as It,Ln as J,Bn as K,fe as Kt,er as L,Ae as Lt,ur as M,Ve as Mt,nr as N,He as Nt,gr as O,$e as Ot,ar as P,Pe as Pt,Tn as Q,tr as R,m as Rt,ti as S,C as St,_r as T,Ze as Tt,Vn as U,p as Ut,F as V,f as Vt,Yn as W,be as Wt,I as X,Un as Y,$n as Z,Zr as _,vt as _t,Yr as a,gn as at,ci as b,bt,zr as c,rn as ct,Z as d,Xt as dt,kn as et,oi as f,Gt as ft,Pr as g,xt as gt,Nr as h,Ct as ht,Xr as i,hn as it,lr as j,Be as jt,rr as k,_ as kt,Wr as l,k as lt,X as m,it as mt,gi as n,xn as nt,ui as o,vn as ot,si as p,Dt as pt,Hn as q,hi as r,wn as rt,Ur as s,_n as st,mi as t,Cn as tt,Gr as u,A as ut,Qr as v,wt as vt,L as w,yt as wt,li as x,x as xt,Kr as y,St as yt,cr as z,pe as zt};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{n as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as s}from"./useMutation-ChpkYxI5.js";import{At as c,Pt as l,jt as u,k as d}from"./active-backend-context-BBvP-bI2.js";import{t as f,z as p}from"./utils-DPQfkd-7.js";import{t as m}from"./back-nav-button-B3pYwmUJ.js";import{t as h}from"./loading-spinner-CN3riY7k.js";import{t as g}from"./brand-button-CJcwjnfb.js";import{i as _}from"./dropdown-classes-zFW7qPSK.js";import{t as v}from"./use-llm-profiles-CU8ah1pz.js";import{n as y,t as b}from"./use-agent-profiles-BHLkLbRR.js";import{i as x,n as S,t as C}from"./use-can-manage-org-profiles-Bu4y8gSx.js";import{t as w}from"./u-edit-DAkcF52u.js";import{t as T}from"./settings-dropdown-input-TWIeiG02.js";import{r as E}from"./typography-D9tiHct7.js";import{o as D}from"./extension-module-card-classes-Bo43vY5V.js";import{i as O,n as k,o as A,r as j,t as M}from"./badge-yR53enbU.js";import{t as N}from"./u-check-circle-BKn1spCL.js";import{i as P,n as F,r as I,t as L}from"./settings-list-classes-sE0ASr1s.js";import{n as R}from"./settings-section-header-context-BOJ_Fbak.js";import{t as z}from"./use-save-agent-profile-DgI_Uz9a.js";import{n as B}from"./use-activate-agent-profile-CeFfYwu_.js";import{t as V}from"./merge-agent-profile-save-input-WcFmQVKK.js";import{i as H,t as U}from"./agent-settings-h8hQz-IU.js";var W=e(t(),1),G=e(n(),1),K=r();function q({onEdit:e,onSetActive:t,onDelete:n,isActive:r,isActivating:i,onClose:a,anchorRef:s}){let{t:c}=o(`openhands`),l=(0,W.useRef)(null),u=(0,W.useRef)([]),d=s?.current??null,[m,h]=(0,W.useState)();(0,W.useLayoutEffect)(()=>{if(!d)return;let e=()=>{let e=d.getBoundingClientRect();e&&h({position:`fixed`,zIndex:9999,top:e.bottom+8,right:window.innerWidth-e.right,width:`max-content`})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[d]),(0,W.useEffect)(()=>{u.current[0]?.focus()},[]),(0,W.useEffect)(()=>{let e=e=>{let t=e.target;l.current&&!l.current.contains(t)&&a()},t=e=>{e.key===`Escape`&&a()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[a]);let g=e=>{e(),a()},v=(0,W.useCallback)((e,t)=>{if(e.key===`Tab`){a();return}let n=u.current.filter(Boolean).length;if(e.key===`ArrowDown`){e.preventDefault();let r=(t+1)%n;u.current[r]?.focus()}else if(e.key===`ArrowUp`){e.preventDefault();let r=(t-1+n)%n;u.current[r]?.focus()}},[a]),y=r||i,b=!!d,S=(0,K.jsxs)(`div`,{ref:l,className:f(`absolute right-0 top-full z-10 mt-2 w-[160px] rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg`,_,b&&`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0`),role:`menu`,"aria-orientation":`vertical`,"data-testid":`agent-profile-actions-menu`,children:[(0,K.jsx)(k,{index:0,icon:(0,K.jsx)(w,{width:16,height:16}),label:c(p.SETTINGS$PROFILE_EDIT),onClick:()=>g(e),onKeyDown:v,menuItemsRef:u,testId:`agent-profile-edit`}),(0,K.jsx)(k,{index:1,icon:(0,K.jsx)(N,{width:16,height:16}),label:c(p.SETTINGS$PROFILE_SET_ACTIVE),onClick:()=>g(t),onKeyDown:v,menuItemsRef:u,disabled:y,testId:`agent-profile-set-active`}),(0,K.jsx)(k,{index:2,icon:(0,K.jsx)(x,{width:16,height:16}),label:c(p.BUTTON$DELETE),onClick:()=>g(n),onKeyDown:v,menuItemsRef:u,testId:`agent-profile-delete`})]});return b?typeof document>`u`||!m?null:G.createPortal((0,K.jsx)(`div`,{style:m,children:S}),document.body):S}function J({profile:e,isActive:t,canManage:n,onActivate:r,onEdit:i,onDelete:a,isActivating:s}){let{t:c}=o(`openhands`),[l,u]=(0,W.useState)(!1),d=(0,W.useRef)(null),m=e.agent_kind===`openhands`?e.llm_profile_ref:c(p.SETTINGS$AGENT_TYPE_ACP);return(0,K.jsxs)(`div`,{"data-testid":`agent-profile-row`,className:f(P,`justify-between gap-3`),children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,K.jsx)(`span`,{className:`min-w-0 max-w-full truncate text-sm font-medium text-white`,title:e.name,children:e.name}),m?(0,K.jsx)(`span`,{className:`min-w-0 max-w-full truncate text-sm text-[var(--oh-muted)]`,title:m,children:m}):null,t&&(0,K.jsx)(M,{className:`shrink-0 whitespace-nowrap px-2.5 py-1 text-xs`,"data-testid":`agent-profile-active-badge`,children:c(p.SETTINGS$PROFILE_DEFAULT)})]}),n&&(0,K.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,K.jsx)(S,{ref:d,onClick:()=>u(e=>!e),ariaLabel:c(p.SETTINGS$PROFILE_MENU),testId:`agent-profile-menu-trigger`,className:I}),l&&(0,K.jsx)(q,{anchorRef:d,onEdit:()=>i(e),onSetActive:()=>r(e),onDelete:()=>a(e),isActive:t,isActivating:s,onClose:()=>u(!1)})]})]})}function Y({isLoading:e,loadError:t,profiles:n,activeId:r,canManage:i,onActivate:a,onEdit:s,onDelete:c,isActivating:l}){let{t:u}=o(`openhands`);return e?(0,K.jsx)(`div`,{className:`flex justify-center p-4`,children:(0,K.jsx)(h,{size:`large`})}):t?(0,K.jsx)(`div`,{"data-testid":`agent-profiles-load-error`,className:D,children:(0,K.jsx)(`p`,{className:`text-sm text-red-400`,children:u(p.SETTINGS$PROFILES_LOAD_ERROR)})}):n.length===0?(0,K.jsx)(`div`,{"data-testid":`agent-profiles-empty`,className:D,children:(0,K.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:u(p.SETTINGS$PROFILES_EMPTY)})}):(0,K.jsx)(`div`,{className:f(L,F),children:n.map(e=>(0,K.jsx)(J,{profile:e,isActive:!!e.id&&e.id===r,canManage:i,onActivate:a,onEdit:s,onDelete:c,isActivating:l},e.name))})}function X(){let e=a();return s({mutationFn:e=>y.deleteProfile(e),onSuccess:async()=>{await e.invalidateQueries({queryKey:d.all})},meta:{disableToast:!0}})}function Z({profile:e,onClose:t}){let{t:n}=o(`openhands`),r=X(),i=(0,W.useRef)(null);if(!e)return null;let a=async()=>{try{await r.mutateAsync(e.name),u(n(p.SETTINGS$PROFILE_DELETED,{name:e.name})),t()}catch(e){c(e instanceof Error?e.message:n(p.ERROR$GENERIC))}},s=()=>{r.isPending||t()},l=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(g,{ref:i,type:`button`,variant:`tertiary`,onClick:s,isDisabled:r.isPending,children:n(p.BUTTON$CANCEL)}),(0,K.jsx)(g,{testId:`delete-agent-profile-confirm`,type:`button`,variant:`danger`,onClick:a,isDisabled:r.isPending,"aria-busy":r.isPending,children:r.isPending?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(h,{size:`small`}),(0,K.jsx)(`span`,{className:`sr-only`,children:n(p.BUTTON$DELETE)})]}):n(p.BUTTON$DELETE)})]});return(0,K.jsx)(j,{isOpen:!0,title:n(p.SETTINGS$PROFILE_DELETE_TITLE),footer:l,onClose:s,initialFocusRef:i,children:(0,K.jsx)(`p`,{className:`text-sm break-all`,children:n(p.SETTINGS$PROFILE_DELETE_CONFIRMATION,{name:e.name})})})}function Q({onAddProfile:e,onEditProfile:t}){let{t:n}=o(`openhands`),{data:r,isLoading:i,error:a}=b(),s=B(),c=C(),[l,d]=(0,W.useState)(null),f=r?.profiles??[],m=r?.active_agent_profile_id??null;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsx)(`h2`,{className:`text-base font-medium text-white`,children:n(p.SETTINGS$AVAILABLE_PROFILES)}),e&&c?(0,K.jsx)(g,{testId:`add-agent-profile`,type:`button`,variant:`secondary`,className:`ml-auto`,onClick:e,children:n(p.SETTINGS$ADD_AGENT_PROFILE)}):null]}),(0,K.jsx)(Y,{isLoading:i,loadError:a??null,profiles:f,activeId:m,canManage:c,onActivate:async e=>{if(e.id)try{await s.mutateAsync(e.id),u(n(p.SETTINGS$PROFILE_ACTIVATED,{name:e.name}))}catch(e){console.error(`Failed to activate agent profile:`,e)}},onEdit:e=>t?.(e),onDelete:d,isActivating:s.isPending})]}),(0,K.jsx)(Z,{profile:l,onClose:()=>d(null)})]})}function $(){let e=a();return s({mutationFn:({name:e,newName:t})=>y.renameProfile(e,t),onSuccess:async()=>{await e.invalidateQueries({queryKey:d.all})},meta:{disableToast:!0}})}function ee(e){return e.agent_kind===`acp`?{agent_kind:`acp`,acp_server:e.acp_server,acp_command:e.acp_command?H(e.acp_command):[],acp_args:e.acp_args??[],acp_model:e.acp_model??``}:{agent_kind:`openhands`,enable_sub_agents:e.enable_sub_agents,tool_concurrency_limit:e.tool_concurrency_limit}}function te(){let{t:e}=o(`openhands`),{setHideSectionHeader:t}=R(),n=z(),r=$(),{data:i}=b(),{data:a,isLoading:s}=v(),[d,f]=(0,W.useState)(`list`),[h,_]=(0,W.useState)(``),[x,S]=(0,W.useState)(null),[C,w]=(0,W.useState)(null),[D,k]=(0,W.useState)(``),[j,M]=(0,W.useState)(null),[N,P]=(0,W.useState)(!1);(0,W.useEffect)(()=>(t(d!==`list`),()=>t(!1)),[d,t]);let F=a?.profiles??[],I=a?.active_profile??F[0]?.name??``,L=(0,W.useMemo)(()=>new Set(i?.profiles?.map(e=>e.name)??[]),[i]),B=(0,W.useMemo)(()=>!(!A(h,{isRequired:!0})||d===`create`&&L.has(h)||d===`edit`&&h!==x?.name&&L.has(h)),[h,d,L,x?.name]),H=(0,W.useCallback)(()=>{_(``),S(null),w({agent_kind:`openhands`}),k(I),M(null),f(`create`)},[I]),G=(0,W.useCallback)(async t=>{try{let e=(await y.getProfile(t.name,`encrypted`)).profile;S(e),w(ee(e)),e.agent_kind===`openhands`?k(s||F.some(t=>t.name===e.llm_profile_ref)?e.llm_profile_ref:I):k(``),_(e.name),M(null),f(`edit`)}catch(t){console.error(`Failed to fetch agent profile:`,t),c(e(p.ERROR$GENERIC))}},[e,F,s,I]),q=(0,W.useCallback)(()=>{f(`list`),S(null),_(``),w(null),M(null)},[]),J=(0,W.useCallback)(async()=>{if(!j||!B)return;let t;try{let n=j.buildAgentProfileFields();if(n.agent_kind===`openhands`){if(!D){c(e(p.SETTINGS$AGENT_PROFILE_LLM_REQUIRED));return}t={...n,llm_profile_ref:D}}else t=n}catch(t){c(t instanceof Error?t.message:e(p.ERROR$GENERIC));return}let i=h.trim(),a=x?.name,o=d===`edit`&&a&&a!==i;P(!0);try{if(j.credentials.isDirty){if(!await j.credentials.save({silent:!0}))return;j.credentials.reset()}o&&await r.mutateAsync({name:a,newName:i});let s=V(d===`edit`?x:null,t);await n.mutateAsync({name:i,profile:s}),u(e(d===`create`?p.SETTINGS$PROFILE_CREATED:p.SETTINGS$PROFILE_UPDATED,{name:i})),q()}catch(t){c(l(t)||e(p.ERROR$GENERIC))}finally{P(!1)}},[j,B,D,h,d,x,n,r,e,q]);if(d===`list`)return(0,K.jsx)(Q,{onAddProfile:H,onEditProfile:G});let Y=e(d===`edit`?p.SETTINGS$EDIT_AGENT_PROFILE:p.SETTINGS$ADD_AGENT_PROFILE),X=d===`edit`&&x?e(p.SETTINGS$PROFILE_LOADED,{name:x.name}):e(p.SETTINGS$PROFILE_SAVE_HINT),Z=j?.agentType!==`acp`;return(0,K.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(m,{testId:`back-to-agent-profiles`,onClick:q,children:e(p.BUTTON$BACK)}),(0,K.jsx)(E.H2,{testId:`agent-profile-editor-title`,children:Y}),(0,K.jsx)(`p`,{"data-testid":`agent-profile-editor-description`,className:`text-sm leading-5 text-tertiary-light`,children:X})]}),(0,K.jsx)(O,{testId:`agent-profile-name-input`,value:h,onChange:_,isRequired:!0}),(0,K.jsx)(U,{embedded:!0,agentSettingsOverride:C,onSaveControlChange:M},d===`edit`?`edit-${x?.id}`:`new-profile`),Z&&(F.length>0?(0,K.jsx)(T,{testId:`agent-profile-llm-selector`,name:`agent-profile-llm`,label:e(p.SETTINGS$AGENT_PROFILE_LLM_LABEL),items:F.map(e=>({key:e.name,label:e.model?`${e.name} (${e.model})`:e.name})),selectedKey:D,onSelectionChange:e=>e&&k(String(e))}):(0,K.jsx)(`p`,{"data-testid":`agent-profile-no-llm`,className:`text-sm text-red-400`,children:e(p.SETTINGS$AGENT_PROFILE_NO_LLM)})),(0,K.jsxs)(`div`,{className:`flex justify-start gap-3 pt-4`,children:[(0,K.jsx)(g,{testId:`cancel-agent-profile-btn`,type:`button`,variant:`secondary`,onClick:q,children:e(p.BUTTON$CANCEL)}),(0,K.jsx)(g,{testId:`save-agent-profile-btn`,type:`button`,variant:`primary`,onClick:J,isDisabled:!B||N||!j?.isValid,"aria-busy":N,children:e(N?p.SETTINGS$SAVING:p.BUTTON$SAVE)})]})]})}var ne={hideTitle:!1},re=i(function(){return(0,K.jsx)(te,{})});export{re as default,ne as handle};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/secrets-service-DjgGduXk.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/active-backend-context-BBvP-bI2.js","assets/vendor-styling-Ck5D_A2Q.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js","assets/utils-DPQfkd-7.js","assets/proxy-DCI9S-LA.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{xt as e}from"./vendor-styling-Ck5D_A2Q.js";import{_ as t,c as n,f as r,g as i,y as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";import{$ as o,Q as s,T as c,U as l,ct as u,ht as ee,lt as d,nt as f,q as p,ut as m,yt as h}from"./active-backend-context-BBvP-bI2.js";import{C as g}from"./utils-DPQfkd-7.js";import{r as _,t as v}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js";import{t as y}from"./proxy-DCI9S-LA.js";import{t as te}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js";import{t as b}from"./settings-CWFxymAf.js";import{t as ne}from"./settings-service.api-DZp7E7A9.js";import{t as re}from"./profiles-service.api-CoLTwjc1.js";import{f as x,o as S,s as C}from"./acp-providers-BkL3HWa3.js";import{d as ie,f as w,r as ae}from"./llm-subscription-DTqtBCWz.js";import{t as oe}from"./llm-subscription-service-7eVfDIE1.js";var T=[];for(let e=0;e<256;++e)T.push((e+256).toString(16).slice(1));function se(e,t=0){return(T[e[t+0]]+T[e[t+1]]+T[e[t+2]]+T[e[t+3]]+`-`+T[e[t+4]]+T[e[t+5]]+`-`+T[e[t+6]]+T[e[t+7]]+`-`+T[e[t+8]]+T[e[t+9]]+`-`+T[e[t+10]]+T[e[t+11]]+T[e[t+12]]+T[e[t+13]]+T[e[t+14]]+T[e[t+15]]).toLowerCase()}var ce=new Uint8Array(16);function le(){return crypto.getRandomValues(ce)}function E(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():ue(e,t,n)}function ue(e,t,n){e||={};let r=e.random??e.rng?.()??le();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return se(r)}var D=new Map;function de(e){return/^([/\\]|[a-zA-Z]:[/\\])/.test(e)}function fe(e,t){return`${e.replace(/[/\\]+$/,``)}/${t.replace(/^[/\\]+/,``)}`}async function pe(e={}){let t=o(e),n=t.host,r=D.get(n);if(r)return r;let a=(async()=>{let{home:e}=await new i(t).getHome();if(!e||typeof e!=`string`)throw Error(`Agent server returned an empty home directory`);return e.replace(/[/\\]+$/,``)})();D.set(n,a);try{return await a}catch(e){throw D.delete(n),e}}async function me(e,t={}){let n=e.replace(/[/\\]+$/,``);return n?de(n)?n:fe(await pe(t),n):pe(t)}var O=`openhands-agent-server-conversation-metadata`,he=e=>({source:e.source,ref:e.ref??null,repo_path:e.repo_path??null}),k=()=>{if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(O);if(!e)return{};let t=JSON.parse(e);return!t||typeof t!=`object`?{}:t}catch{return{}}},A=e=>{if(!(typeof window>`u`)){if(Object.keys(e).length===0){window.localStorage.removeItem(O);return}window.localStorage.setItem(O,JSON.stringify(e))}},j=e=>k()[e]??null,M=(e,t)=>{let n=k();n[e]=t,A(n)},N=e=>{let t=k();e in t&&(delete t[e],A(t))};function P(e){if(!e?.id)return e;let t=j(e.id);return t?{...e,selected_repository:e.selected_repository??t.selected_repository??null,selected_branch:e.selected_branch??t.selected_branch??null,git_provider:e.git_provider??t.git_provider??null,selected_workspace:e.selected_workspace??t.selected_workspace??null}:e}function F(){let e=u().backend;if(e.kind!==`cloud`)throw Error(`Cloud conversations call requires a cloud backend.`);return e}function ge(){let e=u().backend;return e.kind===`cloud`?e:m().find(e=>e.kind===`cloud`&&!!e.apiKey)??null}async function _e(e=20,t){let n=F(),r=new URLSearchParams;r.set(`limit`,String(e)),t&&r.set(`page_id`,t),r.set(`sort_order`,`UPDATED_AT_DESC`);let i=await y({backend:n,method:`GET`,path:`/api/v1/app-conversations/search?${r.toString()}`});return{items:(i?.items??[]).map(e=>P(e)),next_page_id:i?.next_page_id??null}}async function I(e){if(e.length===0)return[];let t=F(),n=new URLSearchParams;for(let t of e)n.append(`ids`,t);return(await y({backend:t,method:`GET`,path:`/api/v1/app-conversations?${n.toString()}`})??[]).map(P)}async function L(e,t){return await y({backend:t??F(),method:`POST`,path:`/api/v1/app-conversations`,body:e,headers:c})}async function ve(e){return y({backend:F(),method:`GET`,path:`/api/v1/app-conversations/${e}/download`,responseType:`blob`})}async function ye(e){await y({backend:F(),method:`DELETE`,path:`/api/v1/app-conversations/${e}`})}async function be(e,t){return await y({backend:F(),method:`PATCH`,path:`/api/v1/app-conversations/${e}`,body:{public:t}})}async function xe(e){await y({backend:F(),method:`POST`,path:`/api/v1/sandboxes/${e}/pause`})}async function Se(e){await y({backend:F(),method:`POST`,path:`/api/v1/sandboxes/${e}/resume`})}async function R(e,t){let n=F(),r=new URLSearchParams;return r.append(`file_path`,t),await y({backend:n,method:`GET`,path:`/api/v1/app-conversations/${e}/file?${r.toString()}`})??``}async function z(e,t){let n=t??F(),r=new URLSearchParams;return r.set(`ids`,e),(await y({backend:n,method:`GET`,path:`/api/v1/app-conversations/start-tasks?${r.toString()}`}))?.[0]??null}function Ce(e){return e.kind===`cloud`&&e.authMode===`cookie`||!e.apiKey?{}:e.kind===`cloud`?{Authorization:`Bearer ${e.apiKey}`}:{"X-Session-API-Key":e.apiKey}}var B=`canvas_ui`,V=`canvas_ui_control`,we=`ClientAction_${V}`,Te={name:V,description:`The user is interacting with you inside Agent Canvas — a web UI with a chat panel on the left and a tabbed right-side panel (files, terminal, browser, vscode, planner, tasklist). This tool lets you drive that right-side panel so the user sees what you just produced.
|
|
3
|
-
|
|
4
|
-
They will NOT see the files you wrote, the terminal output, or the browser
|
|
5
|
-
unless you call this tool to switch the right-side panel to the relevant
|
|
6
|
-
tab. Call this every time you finish work that produces something the user
|
|
7
|
-
should look at — don't rely on them noticing on their own.
|
|
8
|
-
|
|
9
|
-
When to call (pick the most specific option that matches your last action):
|
|
10
|
-
|
|
11
|
-
* You wrote or modified a single file (ANY language, ANY size — including
|
|
12
|
-
small scripts like a hello-world bash file) →
|
|
13
|
-
command="navigate_to_file", path=<workspace-relative path of that file>
|
|
14
|
-
|
|
15
|
-
* You generated an HTML page, image, SVG, PDF, markdown report, or other
|
|
16
|
-
previewable artifact →
|
|
17
|
-
command="show_preview", path=<that file>
|
|
18
|
-
|
|
19
|
-
* You finished editing multiple files in one logical step →
|
|
20
|
-
command="open_tab", tab="files"
|
|
21
|
-
(The Files tab automatically renders a diff view when the workspace has
|
|
22
|
-
uncommitted git changes, which covers the "highlight changes" case.)
|
|
23
|
-
|
|
24
|
-
* You ran a long-running terminal command, or one whose output the user
|
|
25
|
-
should inspect →
|
|
26
|
-
command="open_tab", tab="terminal"
|
|
27
|
-
|
|
28
|
-
* You browsed to a URL the user should see →
|
|
29
|
-
First call browser_get_state(include_screenshot=true) after your final
|
|
30
|
-
browser interaction so Agent Canvas has a screenshot to display, then call
|
|
31
|
-
command="open_tab", tab="browser"
|
|
32
|
-
(browser_navigate alone only updates the URL; without browser_get_state,
|
|
33
|
-
the Browser tab will open without a screenshot.)
|
|
34
|
-
|
|
35
|
-
Call this BEFORE writing your chat-message summary of the change, so the
|
|
36
|
-
artifact is visible while the user reads what you did. One canvas_ui_control
|
|
37
|
-
call per logical step is enough — don't repeat it for the same file or tab in
|
|
38
|
-
the same turn.`,parameters:{type:`object`,additionalProperties:!1,properties:{command:{type:`string`,enum:[`navigate_to_file`,`open_tab`,`show_preview`],description:`UI command to dispatch.`},path:{type:`string`,description:`Workspace-relative file path. Required for navigate_to_file and show_preview; ignored otherwise.`},tab:{type:`string`,enum:[`files`,`browser`,`vscode`,`terminal`,`planner`,`tasklist`],description:`Tab to open. Required for open_tab; ignored otherwise.`}},required:[`command`]},annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},H=`launch_child_conversation`,Ee=`ClientAction_${H}`,U=`[child-conversation] `,De=[`local`,`cloud`],Oe=[`worktree`,`shared`],ke=`1.37.1`,Ae={name:H,description:`Start a NEW, independent conversation to work on a well-scoped task in parallel with this one, without the user having to run any CLI command. The new conversation is recorded as a child of this one.
|
|
39
|
-
|
|
40
|
-
The child runs on its own. It does not block you, you do not see its output,
|
|
41
|
-
and it cannot see this conversation's history — everything it needs must be in
|
|
42
|
-
the task brief.
|
|
43
|
-
|
|
44
|
-
Choosing target:
|
|
45
|
-
|
|
46
|
-
* target="local" — runs on the same machine, in this conversation's workspace.
|
|
47
|
-
Fast, no repository clone, no sandbox provisioning. Use this by default when
|
|
48
|
-
the work is on code that is already checked out here.
|
|
49
|
-
|
|
50
|
-
* target="cloud" — runs on OpenHands Cloud in its own isolated sandbox, from a
|
|
51
|
-
git repository. Use this when the work should not touch the user's machine or
|
|
52
|
-
when it needs a repository that is not checked out locally. Requires the user
|
|
53
|
-
to have an OpenHands Cloud backend connected in Agent Canvas; if none is
|
|
54
|
-
connected you will be told so and should fall back to target="local".
|
|
55
|
-
|
|
56
|
-
Writing the task brief:
|
|
57
|
-
|
|
58
|
-
* Put everything the child needs in "task": the goal, the relevant file paths,
|
|
59
|
-
the constraints, the expected deliverable, and how it should report back.
|
|
60
|
-
* Keep each child's scope independent of its siblings so parallel children do
|
|
61
|
-
not fight over the same files.
|
|
62
|
-
* One call per delegated task. Do NOT call this tool twice for the same task.
|
|
63
|
-
|
|
64
|
-
Parameter rules (a call that breaks one of these launches nothing and comes
|
|
65
|
-
back with corrective guidance):
|
|
66
|
-
|
|
67
|
-
* "repository" and "branch" apply to target="cloud" only. A local child always
|
|
68
|
-
inherits this conversation's workspace, so do not pass them with
|
|
69
|
-
target="local".
|
|
70
|
-
* "isolation" applies to target="local" only. Cloud sandboxes are always
|
|
71
|
-
isolated, so do not pass it with target="cloud".
|
|
72
|
-
* isolation="worktree" (the default) gives the child its own git worktree and
|
|
73
|
-
branch, cut from the repository's default branch — it will NOT see this
|
|
74
|
-
conversation's uncommitted or committed work. isolation="shared" puts the
|
|
75
|
-
child in this conversation's exact directory; only choose it when the child
|
|
76
|
-
genuinely must see work in progress, and expect the two agents to conflict.
|
|
77
|
-
|
|
78
|
-
What comes back: this tool is acknowledged immediately, before the conversation
|
|
79
|
-
exists. The real outcome arrives moments later as a follow-up message starting
|
|
80
|
-
with "${U.trim()}" that carries the child's
|
|
81
|
-
conversation id, URL, target and initial status — or an error with guidance.
|
|
82
|
-
Wait for it, then tell the user what you launched and give them the URL. If it
|
|
83
|
-
reports an error, fix the parameters and call this tool again.`,parameters:{type:`object`,additionalProperties:!1,properties:{target:{type:`string`,enum:[...De],description:`Where the child runs. 'local' reuses this machine and this conversation's workspace; 'cloud' runs in an isolated OpenHands Cloud sandbox.`},task:{type:`string`,description:`Self-contained task brief, sent as the child's first message. The child cannot see this conversation, so state the goal, constraints, expected output and handoff criteria.`},title:{type:`string`,description:`Optional short title for the child conversation. Omit to let it title itself from the task.`},repository:{type:`string`,description:`target='cloud' only. Repository to clone into the sandbox, as 'owner/repo'. Defaults to this conversation's repository when it has one.`},branch:{type:`string`,description:`target='cloud' only, and only together with 'repository'. Defaults to the repository's default branch.`},isolation:{type:`string`,enum:[...Oe],description:`target='local' only. 'worktree' (default) gives the child its own git worktree and branch; 'shared' runs it in this conversation's exact directory.`}},required:[`target`,`task`]},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},je=[`terminal`,`file_editor`,`task_tracker`],Me=`browser_tool_set`,Ne=`task_tool_set`;function Pe(){return!0}function W(e){if(typeof e==`string`){let t=e.trim();if(!t)return null;try{return W(JSON.parse(t))}catch{return null}}if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e;return!t.services||typeof t.services!=`object`?null:t}async function Fe(){let e;try{e=o({timeout:3e3})}catch{return null}let t=W(l({host:e.host})?.runtime_services);if(t)return t;try{return W((await new a(e).getServerInfo()).runtime_services)}catch{return null}}function Ie(e){let t=W(e);if(!t?.services)return;let n=[];n.push(`<RUNTIME_SERVICES>`),t.mode?n.push(`You are running inside an agent-canvas dev stack started in '${t.mode}' mode.`):n.push(`You are running inside an agent-canvas dev stack.`),n.push(`The following services are reachable from your sandbox. URLs are written`,`from your point of view (i.e., as you should curl/fetch them).`,``);let{agent_server:r,ingress:i,automation:a}=t.services,{frontend:o}=t.services;r?.url_from_agent&&n.push(`* Agent Server (you): ${r.url_from_agent}`,` ${r.description??`The agent-server hosting your tool calls.`}`),i?.url_from_agent&&n.push(`* Ingress: ${i.url_from_agent}`,` ${i.description??`Unified entry point for browser-facing traffic.`}`),o?.url_from_agent&&n.push(`* Frontend: ${o.url_from_agent}`,` ${o.description??`Frontend dev server.`}`),a?.url_from_agent?(n.push(`* Automation backend: ${a.url_from_agent}`,` ${a.description??`OpenHands Automations service.`}`),a.docs_url&&n.push(` Docs: ${a.docs_url}`),a.openapi_url&&n.push(` OpenAPI: ${a.openapi_url}`),a.auth_env_var&&n.push(` Auth: header 'X-Session-API-Key: $${a.auth_env_var}'`)):n.push(`* Automation backend: not running in this dev mode (skip /api/automation calls).`);let s=r?.url_from_agent;return n.push(``,`Trust this block over guessing: do not assume any other URLs are running.`),s&&n.push(`In particular, ${s} inside your sandbox is the Agent Server`,`you are running inside of — NOT the automation backend.`),n.push(`</RUNTIME_SERVICES>`),n.join(`
|
|
84
|
-
`)}function Le(e){let{host:t}=o();return`${t}/api/conversations/${e}`}function Re(e){return`Conversation ${e.slice(0,5)}`}function ze(e){let t=j(e.id),n=e.agent?.kind===`ACPAgent`,r=n?e.tags?.acpserver??e.agent?.acp_server??null:null;return{id:e.id,created_by_user_id:null,selected_repository:t?.selected_repository??null,selected_branch:t?.selected_branch??null,git_provider:t?.git_provider??null,selected_workspace:t?.selected_workspace??null,active_profile:t?.active_profile??null,title:e.title?.trim()?e.title:Re(e.id),trigger:null,pr_number:[],agent_kind:n?`acp`:`openhands`,acp_server:r,tags:e.tags??null,launched_agent_profile:e.launched_agent_profile??null,llm_model:n?x({runtimeName:e.current_model_name,runtimeId:e.current_model_id,configured:e.agent?.acp_model,sdkLlm:e.agent?.llm?.model}):e.agent?.llm?.model??b.llm_model,metrics:e.metrics?{accumulated_cost:e.metrics.accumulated_cost??null,max_budget_per_task:e.metrics.max_budget_per_task??null,accumulated_token_usage:e.metrics.accumulated_token_usage?{prompt_tokens:e.metrics.accumulated_token_usage.prompt_tokens??0,completion_tokens:e.metrics.accumulated_token_usage.completion_tokens??0,cache_read_tokens:e.metrics.accumulated_token_usage.cache_read_tokens??0,cache_write_tokens:e.metrics.accumulated_token_usage.cache_write_tokens??0,context_window:e.metrics.accumulated_token_usage.context_window??0,per_turn_token:e.metrics.accumulated_token_usage.per_turn_token??0}:null}:null,created_at:e.created_at,updated_at:e.updated_at,execution_status:e.execution_status??g.IDLE,sandbox_status:e.sandbox_status??null,conversation_url:Le(e.id),session_api_key:o().apiKey??null,sandbox_id:null,workspace:{working_dir:e.workspace?.working_dir??h()},public:!1,sub_conversation_ids:[]}}function Be(e){return{items:e.items.map(ze),next_page_id:e.next_page_id??null}}var Ve=`acpserver`,He=`automationtrigger`,Ue=`automationid`,We=`automationname`,Ge=`automationrunid`,Ke=[He,Ue,We,Ge],qe=new Set([Ve,Ue,Ge,`title`,`git_provider`,`repo_name`,`repo`,`repository`,`selected_branch`,`branch`,`archiveworkspacepath`,`workspace`,`working_dir`]),Je=[`origin`];function Ye(e){if(!e)return[];let t=e=>{let t=Je.indexOf(e.trim().toLowerCase());return t===-1?1/0:t};return Object.entries(e).filter(([e,t])=>!qe.has(e.trim().toLowerCase())&&typeof t==`string`&&t.trim().length>0).sort(([e],[n])=>{let r=t(e),i=t(n);return r===i?e.localeCompare(n):r-i})}var Xe=`gAAAAA`,Ze=new Set([`schema_version`,`agent_settings`,`workspace`,`conversation_id`,`initial_message`,`plugins`]);function G(e){return!e||typeof e!=`object`||Array.isArray(e)?{}:structuredClone(e)}function Qe(e){if(typeof e!=`string`)return;let t=e.trim();return t.length>0?t:void 0}function $e(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function K(e){return typeof e==`string`?e.startsWith(Xe):Array.isArray(e)?e.some(K):$e(e)?Object.values(e).some(K):!1}function et(e){return $e(e)?Object.values(e).some(K):!1}function tt(e){return e.confirmation_mode===!0?e.security_analyzer===`llm`?{kind:`ConfirmRisky`,threshold:`HIGH`,confirm_unknown:!0}:{kind:`AlwaysConfirm`}:{kind:`NeverConfirm`}}function nt(e){switch(e.security_analyzer){case`llm`:return{kind:`LLMSecurityAnalyzer`};case`pattern`:return{kind:`PatternSecurityAnalyzer`};case`policy_rail`:return{kind:`PolicyRailSecurityAnalyzer`};default:return}}function rt(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.name==`string`}function q(e,t){return e===Me?Pe()&&p(e):e===Ne?t.enable_sub_agents===!0&&p(e):!0}function it(e){let t=new Map;for(let n of je)q(n,e)&&t.set(n,{name:n,params:{}});for(let n of[Me,Ne])q(n,e)&&t.set(n,{name:n,params:{}});let n=e.tools;if(Array.isArray(n)&&n.every(e=>rt(e)))for(let r of n)q(r.name,e)&&t.set(r.name,{name:r.name,params:G(r.params)});return Array.from(t.values())}function at(e,t){let n=[e?.trim(),t?.trim()].filter(Boolean);return n.length===0?null:{role:`user`,content:[{type:`text`,text:n.join(`
|
|
85
|
-
|
|
86
|
-
`)}],run:!0}}function ot(){return te.map(e=>{let t=e.triggers?.length>0?{type:`keyword`,keywords:e.triggers}:null,n=`/home/runner/work/OpenHands/OpenHands/node_modules/@openhands/extensions/skills/${e.name}/SKILL.md`;return{name:e.name,content:e.content,trigger:t,source:n,description:e.description??null,is_agentskills_format:!0,...e.license?{license:e.license}:{},...e.compatibility?{compatibility:e.compatibility}:{}}})}function st(e,t,n=[]){let r=Ie(t),i=G(e.agent_context),a=Array.isArray(i.skills)?i.skills:[],o=new Set(n),s=[...a,...ot()].filter(e=>typeof e.name!=`string`||!o.has(e.name));return{...i,skills:s,load_public_skills:!1,load_user_skills:!0,load_project_skills:!0,...r?{system_message_suffix:r}:{}}}function ct(e){return G(e.agent_settings).agent_kind===`acp`}function lt(e){let t=G(e.agent_settings).acp_server;return typeof t==`string`&&t.length>0?t:void 0}function ut(e){let t=e.acp_command;if(!(Array.isArray(t)&&t.length===0)&&t!==void 0)return t;let n=C(typeof e.acp_server==`string`?e.acp_server:void 0);return n?[...n.default_command]:t}function dt(e,t){let n=G(e.agent_settings),r={agent_kind:`acp`,agent_context:st(n,t,e.disabled_skills)};for(let e of v){if(e===`acp_model`||e===`acp_env`)continue;let t=e===`acp_command`?ut(n):n[e];t!=null&&(r[e]=t)}let i=G(n.mcp_config);Object.keys(i).length>0&&(r.mcp_config=i);let a=typeof n.acp_server==`string`?n.acp_server:void 0,o=x({configured:n.acp_model,providerDefault:S(a)});return o&&(r.acp_model=o),r}function ft(e,t){let n=G(e.agent_settings),r=G(n.llm);r.model=typeof r.model==`string`&&r.model.trim().length>0?r.model:b.llm_model,r.stream=!0;let i=Qe(r.api_key);i?r.api_key=i:delete r.api_key;let a=Qe(r.base_url);a?r.base_url=a:delete r.base_url,w(r)?(r.auth_type=ae,r.subscription_vendor=ie,delete r.api_key,delete r.base_url):(delete r.auth_type,delete r.subscription_vendor);let o=G(n.mcp_config);Object.keys(o).length===0&&delete n.mcp_config,delete n.acp_server;for(let e of v)delete n[e];return delete n.acp_env,{...n,llm:r,agent_context:st(n,t,e.disabled_skills),tools:it(n)}}function pt(e,t){return ct(e)?dt(e,t):ft(e,t)}function mt(e){let{settings:t,query:n,conversationInstructions:r,plugins:i,workingDir:a}=e,o=G(t.conversation_settings),s=at(n,r);return Ze.forEach(e=>delete o[e]),{...o,workspace:{kind:`LocalWorkspace`,working_dir:a??h()},...s?{initial_message:s}:{},...i?.length?{plugins:i.map(e=>({source:e.source,...e.ref?{ref:e.ref}:{},...e.repo_path?{repo_path:e.repo_path}:{}}))}:{}}}function ht(e){let t=e.encryptedAgentSettings?{...e.settings,agent_settings:e.encryptedAgentSettings}:e.settings,n=ct(t),r=e.agentProfileId?e.agentProfileKind:n?`acp`:`openhands`,i=pt(t,e.runtimeServicesInfo),a=n?lt(t):void 0,o=mt(e.encryptedConversationSettings?{...e,settings:{...e.settings,conversation_settings:e.encryptedConversationSettings}}:e),s={...e.agentProfileId?{agent_profile_id:e.agentProfileId}:{agent_settings:i},workspace:o.workspace,client_tools:r===`openhands`?[Te,Ae]:[],confirmation_policy:tt(o),max_iterations:typeof o.max_iterations==`number`?o.max_iterations:500,stuck_detection:!0,autotitle:!0,...e.titleLlmProfile?{title_llm_profile:e.titleLlmProfile}:{},worktree:e.worktree??!0};!e.agentProfileId&&a&&(s.tags={[Ve]:a}),!e.agentProfileId&&e.secretsEncrypted&&(!n||et(i.mcp_config))&&(s.secrets_encrypted=!0),e.conversationId&&(s.conversation_id=e.conversationId),e.parentConversationId&&(s.parent_conversation_id=e.parentConversationId);let c=nt(o);c&&(s.security_analyzer=c),o.initial_message&&(s.initial_message=o.initial_message),o.plugins&&(s.plugins=o.plugins),o.hook_config&&(s.hook_config=o.hook_config);let l={...o.tool_module_qualnames??{}};if(delete l[B],delete l[V],delete l[H],Object.keys(l).length>0&&(s.tool_module_qualnames=l),o.agent_definitions&&(s.agent_definitions=o.agent_definitions),e.customSecrets&&e.customSecrets.length>0){let t=d(),n=t?Ce(t):{},r={};for(let t of e.customSecrets){let e={kind:`LookupSecret`,url:`/api/settings/secrets/${encodeURIComponent(t.name)}`,description:t.description};Object.keys(n).length>0&&(e.headers=n),r[t.name]=e}s.secrets=r}return s}var gt=`Connect your ChatGPT subscription before starting a conversation with this LLM profile.`;async function _t(e){if(w(G(e.llm))&&!(await oe.getOpenAIStatus()).connected)throw Error(gt)}async function vt(t){let{SecretsService:n}=await e(async()=>{let{SecretsService:e}=await import(`./secrets-service-DjgGduXk.js`).then(e=>e.n);return{SecretsService:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8])),[r,i,a]=await Promise.all([ne.getSettingsForConversation(),n.getSecrets(),Fe()]),{agentSettings:o,conversationSettings:s,secretsEncrypted:c}=r;return t.agentProfileId||await _t(o),ht({...t,encryptedAgentSettings:o,encryptedConversationSettings:s,secretsEncrypted:c,customSecrets:i,runtimeServicesInfo:a})}function yt(){return{hooks:[]}}function bt(e,t){if(!t)return;let n=new Set(t.profiles.map(e=>e.name));if(e&&n.has(e))return e;if(t.active_profile&&n.has(t.active_profile))return t.active_profile}var xt=`1970-01-01T00:00:00.000Z`,St=300*1e3,Ct=`Unable to load conversations because the selected agent server returned data this UI does not understand. Check the backend URL/session key and update the agent server if needed.`;function J(){return Error(Ct)}function Y(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function wt(e){return typeof e==`number`?e:null}function X(e){return typeof e==`number`?e:0}function Z(e){return typeof e==`string`?e:null}function Tt(e,t,n){let r=e[t]??e[n];return typeof r==`string`&&r.trim()?r:xt}function Et(e){return Y(e)?{prompt_tokens:X(e.prompt_tokens),completion_tokens:X(e.completion_tokens),cache_read_tokens:X(e.cache_read_tokens),cache_write_tokens:X(e.cache_write_tokens),context_window:X(e.context_window),per_turn_token:X(e.per_turn_token)}:null}function Dt(e){return Y(e)?{accumulated_cost:wt(e.accumulated_cost),max_budget_per_task:wt(e.max_budget_per_task),accumulated_token_usage:Et(e.accumulated_token_usage)}:null}function Ot(e){if(!Y(e))return null;let t=Y(e.llm)?{model:Z(e.llm.model)}:null;return{kind:Z(e.kind),acp_server:Z(e.acp_server),acp_model:Z(e.acp_model),llm:t}}function kt(e){return Y(e)?{working_dir:Z(e.working_dir)}:null}function At(e){if(!Y(e))return null;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function jt(e){if(!Y(e))return null;let{agent_profile_id:t,revision:n}=e;return typeof t!=`string`||typeof n!=`number`?null:{agent_profile_id:t,revision:n}}function Mt(e){if(!e.startsWith(`/`))return null;let t=[];for(let n of e.split(`/`))if(n&&n!==`.`)if(n===`..`){if(!t.length)return null;t.pop()}else t.push(n);return`/${t.join(`/`)}`}function Nt(e,t){let n=Mt(e),r=Mt(t);if(!n||!r||n!==r&&!n.startsWith(`${r}/`))throw Error(`Conversation file path must stay inside the workspace`);return n}function Q(e){if(!Y(e)||typeof e.id!=`string`||!e.id.trim())throw J();return{id:e.id.trim(),title:Z(e.title),created_at:Tt(e,`created_at`,`createdAt`),updated_at:Tt(e,`updated_at`,`updatedAt`),execution_status:Z(e.execution_status),sandbox_status:Z(e.sandbox_status),metrics:Dt(e.metrics),agent:Ot(e.agent),workspace:kt(e.workspace),tags:At(e.tags),launched_agent_profile:jt(e.launched_agent_profile),current_model_id:Z(e.current_model_id),current_model_name:Z(e.current_model_name)}}function $(e){if(!Array.isArray(e))throw J();return e.map(Q)}function Pt(e){if(Array.isArray(e))return{items:$(e),next_page_id:null};if(!Y(e))throw J();return{items:$(e.items),next_page_id:typeof e.next_page_id==`string`?e.next_page_id:null}}var Ft=new Set([`idle`,`running`,`paused`,`waiting_for_confirmation`,`finished`,`error`,`stuck`]);function It(e){let t=e??`idle`;return Ft.has(t)?t:`idle`}function Lt(e,t){if(!e)throw Error(`Conversation ${t} was not found`);return e}var Rt=class{static async sendMessage(e,n,r){let i=u().backend,a=r?.conversationUrl??null,s=r?.sessionApiKey??null;if(i.kind===`cloud`){if(!a||!s){let[t]=await I([e]);a=t?.conversation_url?.trim()??null,s=t?.session_api_key?.trim()??null}if(!a||!s)throw Error(`Conversation sandbox is still starting. Wait for it to finish, then try again.`);return await y({backend:i,method:`POST`,hostOverride:f(a),path:`/api/conversations/${e}/events`,body:{...n,run:!0},authMode:`session-api-key`,sessionApiKey:s}),n}return await new t(o({conversationUrl:a,sessionApiKey:s})).sendEvent(e,n,{run:!0}),n}static async createConversation(e,n,r,i,a,c,l,f,p,m,h){if(u().backend.kind===`cloud`)return L({initial_message:e?{role:`user`,content:[{type:`text`,text:e}]}:null,title:n??null,selected_repository:i?.selected_repository??null,selected_branch:i?.selected_branch??null,git_provider:i?.git_provider??null,plugins:r??null,parent_conversation_id:l??null,agent_type:f,sandbox_id:p??null,agent_profile_id:m??null});let[g,_]=await Promise.all([ne.getSettings(),re.listProfiles().catch(()=>void 0)]),v=bt(g.title_llm_profile,_),y=E(),te=await me(a??ee(y)),b=c??(a?`local_repo`:`new_worktree`),x=await vt({settings:g,query:e,conversationInstructions:n,plugins:r,conversationId:y,parentConversationId:l,workingDir:te,worktree:b===`new_worktree`,agentProfileId:m,agentProfileKind:h,titleLlmProfile:v}),S=await new t(o({timeout:St})).createConversation(x),C=d();if(!C)throw new s;return(i?.selected_repository||a)&&M(S.id,{selected_repository:i?.selected_repository??null,selected_branch:i?.selected_branch??null,git_provider:i?.git_provider??null,selected_workspace:a??null,workspace_mode:b}),{id:S.id,created_by_user_id:null,status:`READY`,detail:null,app_conversation_id:S.id,agent_server_url:C.host,request:{initial_message:x.initial_message,plugins:r??null},created_at:S.created_at,updated_at:S.updated_at}}static async getStartTask(e){return u().backend.kind===`cloud`?z(e):null}static async getVSCodeUrl(e,t,r){let i=await this.resolveConversationWorkingDir(e);return{vscode_url:await new n(o({conversationUrl:t,sessionApiKey:r})).getUrl({baseUrl:typeof window<`u`?window.location.origin:void 0,workspaceDir:i})}}static async resolveConversationWorkingDir(e){let[t]=await this.batchGetAppConversations([e]);return t?.workspace?.working_dir??h()}static async batchGetAppConversations(e){return e.length===0?[]:u().backend.kind===`cloud`?I(e):$(await new t(o()).getConversations(e)).map(e=>ze(e))}static async updateConversationPublicFlag(e,t){if(u().backend.kind!==`cloud`)throw Error(`Public sharing requires a cloud backend.`);return be(e,t)}static async updateConversationRepository(e,t,n,r){t?M(e,{...j(e)??{},selected_repository:t,selected_branch:n??null,git_provider:r??null}):N(e);let[i]=await this.batchGetAppConversations([e]);return Lt(i,e)}static async readConversationFile(e,t){if(u().backend.kind===`cloud`)return R(e,Nt(t??`/workspace/project/.agents_tmp/PLAN.md`,`/workspace/project`));let n=await this.resolveConversationWorkingDir(e),r=Nt(t??`${n}/.agents_tmp/PLAN.md`,n);return new i(o()).downloadTextFile(r)}static async downloadConversation(e){return u().backend.kind===`cloud`?ve(e):new i(o()).downloadTrajectory(e)}static async getHooks(e){return yt()}static async getRuntimeConversation(e,n,r){let i=await new t(o({conversationUrl:n,sessionApiKey:r})).getConversation(e),a=Q(i),s=Y(i)?i.stats:null;return{id:a.id,title:a.title?.trim()?a.title:Re(a.id),metrics:Dt(a.metrics),created_at:a.created_at,updated_at:a.updated_at,status:It(a.execution_status),stats:Y(s)?s:{usage_to_metrics:{}}}}static async searchConversations(e=20,n){return u().backend.kind===`cloud`?_e(e,n):Be(Pt(await new t(o()).searchConversations({limit:e,page_id:n,sort_order:_.UPDATED_AT_DESC})))}static async deleteConversation(e){u().backend.kind===`cloud`?await ye(e):await new t(o()).deleteConversation(e),N(e)}static async updateConversationTitle(e,n){await new t(o()).updateConversation(e,{title:n});let[r]=await this.batchGetAppConversations([e]);return Lt(r,e)}static async forkConversation(e,n,r){if(u().backend.kind===`cloud`)throw Error(`Branching a conversation isn't supported on the cloud backend yet.`);let i=await new t(o()).forkConversation(e,{from_event_id:n,...r?{title:r}:{}}),a=j(e);return a&&M(i.id,a),i}static async getEventParentId(e,n){return(await new t(o()).getEvent(e,n)).parent_id??void 0}static async switchProfile(e,n){let{backend:i}=u();if(i.kind===`cloud`){if(!e){await re.activateProfile(n);return}await y({backend:i,method:`POST`,path:`/api/v1/app-conversations/${e}/switch_profile`,body:{profile_name:n}});return}if(!e){await new r(o()).activateProfile(n);return}let a=o(),s=new t(a),c=await new r(a).getProfile(n,{exposeSecrets:`encrypted`}),l=typeof c.config.model==`string`?c.config.model:``;if(!l)throw Error(`Profile '${n}' has no model.`);await _t({llm:c.config}),await s.switchLLM(e,{...c.config,model:l,stream:!0,usage_id:`profile:${n}:${E()}`})}static async switchAcpModel(e,n){let{backend:r}=u();if(r.kind===`cloud`){await y({backend:r,method:`POST`,path:`/api/v1/app-conversations/${e}/switch_acp_model`,body:{model:n}});return}await new t(o()).switchAcpModel(e,n)}};export{he as C,M as S,E as T,xe as _,Oe as a,Se as b,Ee as c,we as d,V as f,z as g,L as h,Ye as i,H as l,I as m,We as n,U as o,B as p,Ke as r,De as s,Rt as t,ke as u,ge as v,me as w,j as x,R as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t}from"./agent-settings-h8hQz-IU.js";export{e as default,t as handle};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{At as a,Pt as o,_ as s,jt as c,n as l,zt as u}from"./active-backend-context-BBvP-bI2.js";import{z as d}from"./utils-DPQfkd-7.js";import{t as f}from"./settings-CWFxymAf.js";import{n as p}from"./use-settings-BHWsOcIG.js";import{t as m}from"./use-save-settings-pSjRhD_m.js";import{t as h}from"./brand-button-CJcwjnfb.js";import{i as g,n as _,r as v,t as y}from"./color-themes-DTj5Ylbr.js";import{t as b}from"./navigation-link-Bxo3-4vo.js";import{t as x}from"./settings-input-D61Vzp9e.js";import{t as S}from"./use-llm-profiles-CU8ah1pz.js";import{t as C}from"./settings-dropdown-input-TWIeiG02.js";import{n as w,t as T}from"./switch-skeleton-DwOoCqaL.js";import{t as E}from"./settings-switch-Drt-rF5s.js";var D=e(t(),1),O=n();function k({defaultKey:e,onChange:t,name:n}){let{t:r}=i(`openhands`);return(0,O.jsx)(C,{testId:n,name:n,onInputChange:t,label:r(d.SETTINGS$LANGUAGE),items:u.map(e=>({key:e.value,label:e.label})),defaultSelectedKey:e,isClearable:!1,wrapperClassName:`w-full min-w-0`})}function A(){let{t:e}=i(`openhands`),t=D.useCallback(e=>{if(!e)return;let t=e;_(t),v(t)},[]);return(0,O.jsx)(C,{testId:`color-theme-input`,name:`color-theme-input`,label:e(d.SETTINGS$COLOR_THEME),items:y.map(e=>({key:e.key,label:e.label})),defaultSelectedKey:g(),onSelectionChange:t,isClearable:!1,wrapperClassName:`w-full min-w-0`})}function j(){return(0,O.jsxs)(`div`,{"data-testid":`app-settings-skeleton`,className:`px-11 py-9 flex flex-col gap-6`,children:[(0,O.jsx)(w,{}),(0,O.jsx)(T,{}),(0,O.jsx)(T,{})]})}var M=`__automatic__`;function N(){let{t:e}=i(`openhands`),{mutate:t,isPending:n}=m(),{data:r,isLoading:g}=p(),_=l().backend.kind===`cloud`,{data:v,isLoading:y}=S(),[w,T]=D.useState(!1),[N,P]=D.useState(!1),[F,I]=D.useState(!1),[L,R]=D.useState(!1),[z,B]=D.useState(!1),[V,H]=D.useState(void 0),U=D.useMemo(()=>{let e=r?.title_llm_profile??null;return!e||!v||v.profiles.some(t=>t.name===e)?e:null},[v,r?.title_llm_profile]),W=V===void 0?U:V,G=D.useMemo(()=>[{key:M,label:e(d.SETTINGS$TITLE_GENERATION_AUTOMATIC)},...v?.profiles.map(t=>({key:t.name,label:t.model?e(d.SETTINGS$TITLE_GENERATION_PROFILE_OPTION,{name:t.name,model:t.model}):t.name}))??[]],[v?.profiles,e]),K=n=>{let r=n.get(`language-input`)?.toString(),i=u.find(({label:e})=>e===r)?.value||f.language,l=_?!0:n.get(`enable-analytics-switch`)?.toString()===`on`,p=n.get(`enable-sound-notifications-switch`)?.toString()===`on`,m=n.get(`git-user-name-input`)?.toString()||f.git_user_name,h=n.get(`git-user-email-input`)?.toString()||f.git_user_email;t({language:i,...!_&&{user_consents_to_analytics:l},enable_sound_notifications:p,git_user_name:m,git_user_email:h,title_llm_profile:W},{onSuccess:()=>{s(l?`granted`:`denied`),c(e(d.SETTINGS$SAVED))},onError:t=>{a(o(t)||e(d.ERROR$GENERIC))},onSettled:()=>{T(!1),P(!1),I(!1),R(!1),B(!1),H(void 0)}})},q=e=>{let t=u.find(({label:t})=>t===e)?.label,n=u.find(({value:e})=>e===r?.language)?.label;T(t!==n)},J=e=>{P(e!==(r?.user_consents_to_analytics??!0))},Y=e=>{I(e!==!!r?.enable_sound_notifications)},X=e=>{let t=r?.git_user_name;R(e!==t)},Z=e=>{let t=r?.git_user_email;B(e!==t)},Q=!w&&!N&&!F&&W===U&&!L&&!z,$=!r||g||y||n;return(0,O.jsxs)(`form`,{"data-testid":`app-settings-screen`,action:K,className:`flex flex-col gap-6`,children:[$&&(0,O.jsx)(j,{}),!$&&(0,O.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,O.jsx)(k,{name:`language-input`,defaultKey:r.language,onChange:q}),(0,O.jsx)(A,{}),(0,O.jsx)(E,{testId:`enable-analytics-switch`,name:_?void 0:`enable-analytics-switch`,defaultIsToggled:_?!0:r.user_consents_to_analytics??!0,isToggled:_?!0:void 0,isDisabled:_,onToggle:_?void 0:J,children:e(d.ANALYTICS$SEND_ANONYMOUS_DATA)}),(0,O.jsx)(E,{testId:`enable-sound-notifications-switch`,name:`enable-sound-notifications-switch`,defaultIsToggled:!!r.enable_sound_notifications,onToggle:Y,children:e(d.SETTINGS$SOUND_NOTIFICATIONS)}),(0,O.jsxs)(`div`,{className:`border-t border-[var(--oh-border)] pt-6 mt-2`,children:[(0,O.jsx)(`h3`,{className:`text-lg font-medium mb-2`,children:e(d.SETTINGS$CONVERSATION_TITLES)}),(0,O.jsx)(`p`,{className:`mb-4 text-sm leading-5 text-tertiary-light`,children:e(d.SETTINGS$TITLE_GENERATION_DESCRIPTION)}),(0,O.jsx)(C,{testId:`title-llm-profile-input`,name:`title-llm-profile-input`,label:e(d.SETTINGS$TITLE_GENERATION_MODEL),items:G,selectedKey:W??M,onSelectionChange:e=>{let t=e?.toString();H(!t||t===M?null:t)}}),(0,O.jsx)(b,{to:`/settings/llm`,className:`mt-3 inline-block text-sm text-primary hover:underline`,children:e(d.SETTINGS$MANAGE_LLM_PROFILES)})]}),(0,O.jsxs)(`div`,{className:`border-t border-[var(--oh-border)] pt-6 mt-2`,children:[(0,O.jsx)(`h3`,{className:`text-lg font-medium mb-2`,children:e(d.SETTINGS$GIT_SETTINGS)}),(0,O.jsx)(`p`,{className:`mb-4 text-sm leading-5 text-tertiary-light`,children:e(d.SETTINGS$GIT_SETTINGS_DESCRIPTION)}),(0,O.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,O.jsx)(x,{testId:`git-user-name-input`,name:`git-user-name-input`,type:`text`,label:e(d.SETTINGS$GIT_USERNAME),defaultValue:r.git_user_name||``,onChange:X,placeholder:e(d.SETTINGS$GIT_USERNAME_PLACEHOLDER),className:`w-full min-w-0`}),(0,O.jsx)(x,{testId:`git-user-email-input`,name:`git-user-email-input`,type:`email`,label:e(d.SETTINGS$GIT_EMAIL),defaultValue:r.git_user_email||``,onChange:Z,placeholder:e(d.SETTINGS$GIT_EMAIL_PLACEHOLDER),className:`w-full min-w-0`})]}),(0,O.jsx)(`div`,{className:`flex justify-start pt-4`,children:(0,O.jsxs)(h,{testId:`submit-button`,variant:`primary`,type:`submit`,isDisabled:n||Q,children:[!n&&e(d.SETTINGS$SAVE_CHANGES),n&&e(d.SETTINGS$SAVING)]})})]})]})]})}var P=r(N);export{P as default};
|